query_id
stringlengths
32
32
query
stringlengths
7
29.6k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
ea01a1d8c2bd71d254b5d1a3a4fb5999
Best/average case = O(nlogn) time Worst = O(n^2) time if data was already sorted O(logn) space complexity
[ { "docid": "e77e7feac25613a765a8b82fe5bff9b0", "score": "0.0", "text": "function swap(arr, j, i) {\n let temp = arr[j];\n arr[j] = arr[i];\n arr[i] = temp;\n}", "title": "" } ]
[ { "docid": "8a62f817481470c930a5212c3090789d", "score": "0.67992866", "text": "function test2(input) {\n const pi = 3.14; // O(1)\n let found = false; // O(1)\n let sorted = null; // O(1)\n let testCase = 0; // O(1)\n let secondCase = 1; // O(1)\n // O(n)\n for (let i = 0; i < input.length; i++) {\n otherFunctionToCall(); // O(n)\n sorted = false; // O(n)\n testCase++; // O(n)\n secondCase--; // O(n)\n }\n return testCase - secondCase; // O(1)\n}", "title": "" }, { "docid": "5d1e67cee5a8ed817db1cc588df54585", "score": "0.6174382", "text": "function solve(data) {\n let frequency = data.reduce((r, e) => {\n if (!r[e]) r[e] = 1;\n else r[e]++;\n return r;\n }, {});\n\n return [...data].sort((a, b) => {\n return frequency[b] - frequency[a] || a - b;\n });\n}", "title": "" }, { "docid": "aa668e64d8d78130c67f74381c62cc82", "score": "0.5940087", "text": "function almostSorted(arr){\r\n\tfor(let i = 0; i<arr.length; i++){\r\n\t\tif(arr[i]>arr[i+1]){\r\n\t\t\treturn (i+1);\r\n\t\t}\r\n\t}\r\n\treturn -1;\r\n}", "title": "" }, { "docid": "4cbdee79392d9578a253c2d05f5a5f0d", "score": "0.58603984", "text": "function findMostFrequent(arr) {\n\t// arr.sort();\n\t// console.log(arr);\n\t// let newArr = [];\n\t// for (let i = 0; i < arr.length; i++) {\n\t// \tif (arr[i] >= arr[i + 1]) {\n\t// \t\tnewArr.push(arr[i]);\n\t// \t}\n\t// }\n\t// console.log(newArr);\n}", "title": "" }, { "docid": "b30f42d0f32f88b88200755222f91171", "score": "0.5827176", "text": "iterativeBest(WM) {\n // move negative numbers to the end and find the end index of +ve numbers\n var good = -1;\n for (let i = 0; i < WM.length; i++) {\n if (WM[i] > 0) {\n if (good != i - 1) {\n this._swap(WM, good + 1, i)\n good += 1;\n } else {\n good = i;\n }\n }\n }\n //console.log(WM);\n //console.log('good: ', good + 1);\n\n // mark existing element by making it's index negative\n for (let i = 0; i < good + 1; i++) {\n let x = Math.abs(WM[i]);\n if (x <= good + 1) {\n WM[x - 1] = -1 * Math.abs(WM[x - 1]);\n }\n }\n //console.log(WM);\n\n // the solution is the first index with +ve value\n for (let i = 0; i < good + i; i++) {\n let x = WM[i];\n if (x >= 0) return i + 1;\n }\n return good;\n }", "title": "" }, { "docid": "5d011c1c99327312add1080032e378c1", "score": "0.57755286", "text": "function selectionSort(){\n let t0 = performance.now() //testing speed\n var minIdx, temp, \n len = countryData.length;\n for(var i = 0; i < len; i++){\n minIdx = i;\n for(var j = i+1; j<len; j++){\n if(countryData[j][\"Percent fully vaccinated\"]< countryData[minIdx][\"Percent fully vaccinated\"]){\n minIdx = j;\n }\n }\n temp = countryData[i][\"Percent fully vaccinated\"];\n countryData[i][\"Percent fully vaccinated\"] = countryData[minIdx][\"Percent fully vaccinated\"];\n countryData[minIdx][\"Percent fully vaccinated\"] = temp;\n }\n let t1 = performance.now() //testing speed\n console.log(\"Call to selectionSort took \" + (t1 - t0) + \" milliseconds.\") //output speed test\n console.log(\"Lowest Country \" + countryData[0].Country + \"with a \" + countryData[0][\"Percent fully vaccinated\"] + \"% vaccinated rated\")\n console.log(\"Highest Country \" + countryData[9].Country + \"with a \" + countryData[9][\"Percent fully vaccinated\"] + \"% vaccinated rated\")\n return countryData;\n}", "title": "" }, { "docid": "33bc99b272493896ccfab3a7aaf25c56", "score": "0.5766978", "text": "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n let N = A.length;\n if (N < 3)\n return 0;\n A.sort((a, b) => (a - b));\n let cnt = 0;\n for (let i = N - 1; i >= 2; i--) {\n let j = 0, k = i - 1;\n while (j < k) {\n if ((A[j] + A[k]) > A[i]) {\n cnt += (k - j);\n k--;\n }\n else\n j++;\n }\n }\n return cnt;\n}", "title": "" }, { "docid": "98d4ee9a8c04e0a43e8130332b6ed6a8", "score": "0.5755307", "text": "function solution(A) {\n const length = A.length;\n let indexToReturn = 0;\n let minAvg = 10000;\n\n for(let i=0; i<length-1; i++) {\n const avgTwoVals = A[i] + A[i+1] / 2;\n const avgThreeVals = i < length -2 ? A[i] + A[i+1] + A[i+2] / 3 : undefined;\n\n if(avgTwoVals < minAvg) {\n minAvg = avgTwoVals;\n indexToReturn = i;\n }\n\n if(avgThreeVals < minAvg) {\n minAvg = avgThreeVals;\n indexToReturn = i;\n }\n }\n\n return indexToReturn;\n}", "title": "" }, { "docid": "a9d9a1f6cf00e9d218d44eab1b63948c", "score": "0.56670034", "text": "static sort(a)\n{\n if(a.length<2)\n return a;\n else{\n var j;\n var key;\n for(var i=1;i<a.length;i++) {\n j=i-1;\n key=a[i];\n //move the array values 1 index higher\n while(j>=0&&a[j]>key) {\n a[j+1]=a[j];\n j-=1;\n }\n a[j+1]=key;\n }\n }\n //Calculating elapsed time of sort function.\n console.log(\"Elpased time is\",((new Date())-start),\"Ms\");\n return a;\n }", "title": "" }, { "docid": "59cd17fdb10c51c2846c739d24d7712d", "score": "0.5665092", "text": "function solution(A) {\n\n if (A.length < 2) return 0\n A = A.sort((a,b) => a-b)\n for (let i = 0; i < A.length-2; i++){\n if (A[i]+A[i+1] > A[i+2] && A[i+1]+A[i+2] > A[i] && A[i]+A[i+2] > A[i+1]) {\n return 1\n }\n }\n\n return 0\n\n}", "title": "" }, { "docid": "7a2c732d8a68676f5ccd7442f32b20f2", "score": "0.56572187", "text": "function bubble_sort(array, type = 'asc' ) { // O(n^2)\n // Variables // ---- | O(1)\n isSorted = false // O(1) | ^ \n counter = 0 // O(1) | ^\n\n // Logic // ---- | O(n) * O(n) => O(n^2) \n while (!isSorted) { // O(n)\n isSorted = true // @ start of loop assume it is sorted // O(1)\n for (i = 0; i < array.length - counter; i++) { // O(n) | O(n) * (O(1) + O(1) + O(1)) => O(n)\n if (type === 'asc') { // O(1) => O(1)\n if (array[i] > array[i + 1]) { // O(1) ^\n isSorted = false // O(1) ^\n swap(i, i + 1, array)\n }\n } else if (type === 'desc') { // O(1) => O(1)\n if (array[i] < array[i + 1]) { // O(1) ^\n isSorted = false // O(1) ^\n swap(i, i + 1, array)\n }\n } else {\n throw 'Invalid Parameters' // O(1)\n }\n }\n counter += 1 // O(1) \n }\n// Return\nreturn array}", "title": "" }, { "docid": "1aa44848f7564eeb8996e1de0bf06338", "score": "0.5656026", "text": "function sortValleyPeakBetter(arr) {\n for(let i = 1; i < arr.length; i+=2) {\n let biggestIndex = maxIndex(arr, i - 1, i , i + 1);\n if (i!= biggestIndex) {\n swap(arr, i, biggestIndex);\n }\n }\n}", "title": "" }, { "docid": "59b2eb92c9d9b2d42978086a8317bd57", "score": "0.5650331", "text": "function sorting(arr) {\n // a temp variable to count the switch\n let count = 0;\n\n // Iterating through the whole list\n for (let i = 0; i < arr.length;) {\n\n // Iterating through every object after the one chosen before\n for (let j = i + 1; j < arr.length; j++) {\n\n // If there is at least 1 value in a different array, the whole array is going to be concatenated with the chosen array. Completely identical arrays are being ignored\n if (arr[j].some(element => arr[i].includes(element)) && !arr[j].every(element2 => arr[i].includes(element2))) {\n // concatenation of the arrays. In the end we get an array with unique values only\n let temp = _.uniq(arr[i].concat(arr[j]));\n arr[i] = temp;\n count = 1;\n break;\n\n }\n else {\n count = 0;\n }\n };\n\n // only if there are no new shared value we move to the next array\n if (count === 0) {\n i++;\n }\n };\n\n\n // Sorting the array alphabetically\n arr.sort();\n arr.forEach(el => el.sort());\n // The array is sorted alphabetically and we just get the longest one. If there more than 1 such arrays, the first in the alphabetical order will be chosen\n const longest = _.maxBy(arr, _.size);\n return longest;\n}", "title": "" }, { "docid": "3aa5c5ec480200d4505f8dbbdd87875e", "score": "0.5639315", "text": "function solution(A) {\n var stack = [];\n var countDic = {};\n var mark = A.length / 2;\n for (let i = 0; i < A.length; i++) {\n if (stack.length == 0) stack.push(A[i]);\n else if (stack.slice(-1) != A[i]) stack.pop();\n else stack.push(A[i]);\n\n if (countDic[A[i]] == undefined)\n countDic[A[i]] = 1;\n else countDic[A[i]] += 1;\n }\n\n if (stack.length == 0) return -1;\n var t = stack.slice(-1);\n if (countDic[t] > mark) return A.indexOf(t);\n else return -1;\n}", "title": "" }, { "docid": "83e29b0f5422c1d29251eb898af88951", "score": "0.5637067", "text": "function nearlySorted(arr) {\n\tlet sorted = 1;\n\tfor (let i = 0; i < arr.length - 1; i += 1) {\n\t\tif (arr[i] > arr[i + 1]) {\n\t\t\tsorted = 0;\n\t\t\tif (arr[i] > arr[i + 2]) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\treturn sorted;\n}", "title": "" }, { "docid": "6947124ede8f70f4ee529608af41b8cc", "score": "0.5629224", "text": "function sort(arr){\n\tif(arr.length===1) //Time=1\n\t\treturn arr; //Returning the array if the array element is one\n\n\tlet mid= Math.floor(arr.length/2); //Finding the middle index of the array. Time=1\n\t//Separate the array into two halves of left array and right array\n\tlet left=sort(arr.slice(0,mid)); //Divide left array from index 0 to midpoint. Time=T(n/2)\n\tlet right=sort(arr.slice(mid)); //Divide right array from midpoint+1 to the last index. Time=T(n/2)\n\treturn mergeAndCount(left, right); //Returning the sorted list of the original array and the total count of inversions. Time=n\n} //Time=2T(n/2)+n", "title": "" }, { "docid": "c3c3fb5c300d84bfb875b738881bd1e0", "score": "0.562511", "text": "function greatestToLeast(arr) {\n // your code here\n return arr.sort((a, b) => {\n return b - a;\n })\n}", "title": "" }, { "docid": "6d269573637d6b96acc6a21fffb233b6", "score": "0.5608096", "text": "function findMinMax_approach_three(arr) {\n let min = arr[0];\n for (let i = 0; i < arr.length; i++) { // n comparisons\n if (arr[i] < min) {\n min = arr[i];\n }\n }\n\n let dataBins = [];\n for (let i = 0; i < arr.length; i += 1) {\n if (min < 0) {\n let newNum = arr[i] + (-1 * min);\n dataBins[newNum] = newNum;\n } else {\n dataBins[arr[i]] = arr[i];\n }\n }\n\n let max;\n let j = dataBins.length - 1;\n while (max === undefined) {\n if (dataBins[j] !== undefined){\n max = dataBins[j]\n }\n j -= 1;\n }\n\n if (min < 0) {\n max = max + min;\n }\n return [min, max];\n}", "title": "" }, { "docid": "2691f51b93f2b0aaf4acf92aff1ef40b", "score": "0.5574644", "text": "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n A.sort((a, b) => (a - b))\n\n for (var i = 0; i < A.length - 2; i++) {\n var p = A[i],\n q = A[i + 1],\n r = A[i + 2]\n\n if (p + q > r &&\n q + r > p &&\n r + p > q)\n return 1\n }\n\n return 0\n}", "title": "" }, { "docid": "c0e51da430b4295f60ea9b43bdc6af6f", "score": "0.5566421", "text": "function kadanesAlgorithmNonOptimal(array) {\n\n let most = -Infinity\n for (let i = 0; i < array.length; i++) {\n let curNum = array[i]\n\n for (let j = 0; j < i; j++) {\n let curSum = curNum\n for (let k = j; k < i; k++) {\n curSum += array[k]\n }\n most = curSum > most ? curSum : most\n curSum = -Infinity\n }\n most = curNum > most ? curNum : most\n }\n return most\n }", "title": "" }, { "docid": "c7d3bdee9f37f717e97cf538b744f850", "score": "0.5564441", "text": "function averagePair(array,targetAvg) {//Note: change array to set of integers\n if(array.length === 0) { //O(1)\n return false;\n }\n\n let left = 0;\n let right = array.length -1;\n\n while (left < right) { //O(n)\n let avg = (array[left] + array[right]) /2; //O(1)\n\n if (avg === targetAvg) { //O(1)\n return true;\n }\n else if (avg > targetAvg) { //O(1)\n right -= 1;\n }\n else {\n left += 1; //O(1)\n }\n }\n return false;\n}", "title": "" }, { "docid": "8e8078da3f84ccab30bba8f840c6fdf1", "score": "0.5552086", "text": "function bucketSort(arr, lowest, highest) {\n //????? - bucket sort usually means splitting array into buckets, then using another algorithm to sort the buckets before merging them again?\n let firstBucket = [];\n let secondBucket = [];\n \n for (let i = 0; i < arr.length; i++) {\n if (arr[i] < (highest + lowest) / 2) {\n firstBucket.push(arr[i]);\n } else {\n secondBucket.push(arr[i]);\n }\n }\n \n mSort(firstBucket);\n mSort(secondBucket);\n console.log(firstBucket.concat(secondBucket));\n }", "title": "" }, { "docid": "a431a9f9ffceac4af38354678a4ed9fc", "score": "0.5549519", "text": "function bestFit(arr){\n for (var i = 0; i < arr.length; i++){\n if (arr[0] > arr.length){\n console.log(\"Too Big!\");\n }\n if (arr[0]<arr.length){\n console.log(\"Too Small!\");\n }\n if (arr[0] == arr.length) {\n console.log(\"Just Right!\")\n }\n }\n}", "title": "" }, { "docid": "08b9106f614947a745e48df3e0e6c552", "score": "0.5545783", "text": "function update_ranking_data(arr_name, id, val, ord) {\n\n // Check if we already have it\n var existing_idx = display_entries[arr_name]['ids'].indexOf(id);\n if (existing_idx !== -1) {\n //console.log('not found in list');\n\n // If it is unchanged, return a code saying there is nothing to do\n if (val.equals(display_entries[arr_name]['vals'][existing_idx])) {\n //console.log('nothing to do, val was unchanged at', val, display_entries[arr_name]['vals'][existing_idx]);\n return -1; // TODO: make this -2 so the caller can handle this case differently?\n }\n\n // If we are already in the list and have the same value, remove and try to add again\n // This can happen if the variable we sort by is updated\n display_entries[arr_name]['ids'].splice(existing_idx, 1);\n display_entries[arr_name]['vals'].splice(existing_idx, 1);\n }\n\n //console.log('update_ranking_data', arr_name, id, val.toString());\n var arr = display_entries[arr_name]['vals'];\n //console.log('start with array ', arr);\n\n var max_entries = display_entries[arr_name]['max_store'];\n\n // If the list is full and we're lower, give up\n if (arr.length >= max_entries) {\n //console.log('list full and lower, give up');\n var last_entry = arr[arr.length - 1];\n if (last_entry.gte(val)) {\n // console.log('we are full and last entry is at least as high')\n return -1;\n }\n }\n\n // go through from the top until we find something we're higher than\n var i = 0;\n for (i = 0; i < arr.length; i++) {\n //console.log('see if ', val.toString(), ' is at least as great as ', arr[i].toString());\n if (ord == 'desc' && val.gte(arr[i]) || ord == 'asc' && val.lte(arr[i])) {\n // found a spot, we're higher than the current occupant of this index\n // we'll return its ID to know where to insert in the document\n var previd = display_entries[arr_name]['ids'][i];\n\n //console.log('found, splice in before ', previd, 'old', val.toString(), 'new', arr[i].toString());\n\n // insert at the replaced element's index, bumping everything down\n display_entries[arr_name]['ids'].splice(i, 0, id);\n display_entries[arr_name]['vals'].splice(i, 0, val);\n\n // if the array is now too long, dump the final element\n if (arr.length > max_entries) {\n display_entries[arr_name]['ids'].pop();\n display_entries[arr_name]['vals'].pop();\n }\n return previd;\n }\n }\n\n //console.log('not found, add to end');\n // lower than everything but there's still space, so add to the end\n display_entries[arr_name]['ids'].push(id);\n display_entries[arr_name]['vals'].push(val);\n return null;\n}", "title": "" }, { "docid": "314f2e433ad86cf6a0556e26813a6591", "score": "0.55449295", "text": "function solution(A) { \n var n = A.length,\n min = 1, i,\n sorted = A.sort(function(a,b){return a-b;}),\n max = sorted[n-1]; \n \n for(i=0; i<n; i++){\n if(sorted[i] == min){ min++; }\n } \n return min; \n}", "title": "" }, { "docid": "44a89cf096fe1d61ee99ccd679fe0618", "score": "0.55248773", "text": "function update_ranking_data(arr_name, id, val, ord) {\n\n // Check if we already have it\n var existing_idx = display_entries[arr_name]['ids'].indexOf(id);\n if (existing_idx !== -1) {\n //console.log('not found in list');\n\n // If it is unchanged, return a code saying there is nothing to do\n if (val.equals(display_entries[arr_name]['vals'][existing_idx])) {\n //console.log('nothing to do, val was unchanged at', val, display_entries[arr_name]['vals'][existing_idx]);\n return -1; // TODO: make this -2 so the caller can handle this case differently?\n }\n\n // If we are already in the list and have the same value, remove and try to add again\n // This can happen if the variable we sort by is updated\n display_entries[arr_name]['ids'].splice(existing_idx, 1);\n display_entries[arr_name]['vals'].splice(existing_idx, 1);\n }\n\n //console.log('update_ranking_data', arr_name, id, val.toString());\n var arr = display_entries[arr_name]['vals']\n //console.log('start with array ', arr);\n\n var max_entries = display_entries[arr_name]['max_store'];\n\n // If the list is full and we're lower, give up\n if (arr.length >= max_entries) {\n //console.log('list full and lower, give up');\n var last_entry = arr[arr.length-1];\n if (last_entry.gte(val)) {\n // console.log('we are full and last entry is at least as high')\n return -1;\n }\n }\n\n // go through from the top until we find something we're higher than\n var i = 0;\n for (i = 0; i < arr.length; i++) {\n //console.log('see if ', val.toString(), ' is at least as great as ', arr[i].toString());\n if ((ord == 'desc' && val.gte(arr[i])) || (ord == 'asc' && val.lte(arr[i]))) {\n // found a spot, we're higher than the current occupant of this index\n // we'll return its ID to know where to insert in the document\n var previd = display_entries[arr_name]['ids'][i];\n\n //console.log('found, splice in before ', previd, 'old', val.toString(), 'new', arr[i].toString());\n\n // insert at the replaced element's index, bumping everything down\n display_entries[arr_name]['ids'].splice(i, 0, id);\n display_entries[arr_name]['vals'].splice(i, 0, val);\n\n // if the array is now too long, dump the final element\n if (arr.length > max_entries) {\n display_entries[arr_name]['ids'].pop();\n display_entries[arr_name]['vals'].pop();\n }\n return previd;\n }\n\n }\n\n //console.log('not found, add to end');\n // lower than everything but there's still space, so add to the end\n display_entries[arr_name]['ids'].push(id);\n display_entries[arr_name]['vals'].push(val);\n return null;\n\n}", "title": "" }, { "docid": "e761c5ecf5818a80fee201afc63b3ecd", "score": "0.55230814", "text": "function sortdisheshightolow(o) {\n\tvar swapped=true;\n\twhile (swapped==true){\n\t\tswapped=false;\n\t\tfor (var i= 0; i<o.length-1; i++){\n\t\t\tif (o[i].price<o[i+1].price){\n\t\t\t\tvar temp = o[i];\n\t\t\t\to[i]=o[i+1];\n\t\t\t\to[i+1]=temp;\n\t\t\t\tswapped=true;\n\t\t\t}\n\t\t\n\t\t}\n\t}\n\n return o;\n}", "title": "" }, { "docid": "e0d4b16cb9f2c30211ebaad713a3436e", "score": "0.55006194", "text": "function efficientSearch(array, item) {\n let minIndex = 0;\n let maxIndex = array.length - 1;\n let currentIndex;\n let currentElement;\n let ticks = 0;\n while (minIndex <= maxIndex) {\n currentIndex = Math.floor((minIndex + maxIndex) / 2);\n currentElement = array[currentIndex];\n ticks++;\n console.log(ticks);\n if (currentElement < item) {\n minIndex = currentIndex + 1;\n }\n else if (currentElement > item) {\n maxIndex = currentIndex - 1;\n }\n else {\n return currentIndex;\n }\n }\n return -1;\n}", "title": "" }, { "docid": "fa7c49ae1288e1e04e8202d7fba12400", "score": "0.54994154", "text": "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n if (A.length === 0) return 1;\n\n A.sort((a, b) => a - b);\n\n let compare = 1;\n\n for (let v of A) {\n if (compare === v) compare++;\n else return compare;\n }\n\n return compare;\n}", "title": "" }, { "docid": "a867333cb3717399dda8eae076f5f3d4", "score": "0.5494992", "text": "function findBest() {\n const tally = {};\n const l = 2;\n for (let i = l; i < data.length; i++) {\n const key = data.substring(i - l, i);\n tally[key] = (tally[key] || 0) + 1;\n }\n const sorted = Object.keys(tally).map((text) => {\n return { text, count: tally[text], save: (tally[text] * (text.length - 1)) };\n });\n sorted.sort((a, b) => (b.save - a.save));\n return sorted[0].text;\n }", "title": "" }, { "docid": "3723de13f1627fb76ee954c8f962b33d", "score": "0.54839575", "text": "if (summary[prevHighest] > summary[direction]) {\n return prevHighest;\n }", "title": "" }, { "docid": "c0b724fd1ffdfca210ba988eaf99335a", "score": "0.54592913", "text": "function solution(A) {\n A.sort((a, b) => a - b);\n\n // value within [1... (N + 1)] missing\n for(let i = 0; i < A.length; i++) {\n if(A[i] !== i + 1) return i + 1;\n }\n // (N + 1) is missing\n return A.length + 1;\n}", "title": "" }, { "docid": "f83ec993dc9c8acad1e6c2203372dac1", "score": "0.5456214", "text": "function result(arry,m,n){\r\n let total=0;\r\n let maxValue=arry[0][0];\r\n for (let i of arry[0]){\r\n if (i>maxValue){\r\n maxValue=i;\r\n }\r\n }\r\n let maxValueIndex=arry[0].indexOf(maxValue);\r\n for (let i of arry){\r\n if (maxValueIndex<n-1){\r\n if ((i[maxValueIndex-1]>i[maxValueIndex]) & (i[maxValueIndex-1]>i[maxValueIndex+1])){\r\n total+=i[maxValueIndex-1];\r\n maxValueIndex-=1;\r\n }\r\n else if(i[maxValueIndex]>i[maxValueIndex+1]){\r\n total+=i[maxValueIndex];\r\n }\r\n else{\r\n total+=i[maxValueIndex+1];\r\n maxValueIndex+=1;\r\n }\r\n }\r\n else{\r\n if(i[maxValueIndex-1]>i[maxValueIndex]){\r\n total+=i[maxValueIndex-1];\r\n maxValueIndex=i[maxValueIndex-1];\r\n }\r\n else{\r\n total+=i[maxValueIndex];\r\n maxValueIndex=i[maxValueIndex];\r\n }\r\n }\r\n }\r\n console.log(total);\r\n}", "title": "" }, { "docid": "fa210db4fd2513fb723c66a9275a3027", "score": "0.5454989", "text": "function findMinMax_approach_one(arr) { // 2n comparisons\n let max = arr[0];\n let min = arr[0];\n for (let i = 0; i < arr.length; i += 1) {\n let current = arr[i];\n if (current > max) { max = current; } // n comparisons\n if (current < min) { min = current; } // n comparisons\n }\n return [min, max];\n}", "title": "" }, { "docid": "cb72392309df89b7a44e434685777e15", "score": "0.54542047", "text": "function bestHaks(){\n let tmp = Object.create(data)\n try {\n return tmp.sort((a, b) => (b.points.reduce((x,y)=> x+y)) - (a.points.reduce((x,y) => x+y))).slice(0, 10).reverse();\n } catch (error) {\n alert('יש בעית תקשורת, המידע המוצג אינו עדכני');\n return tmp.slice(0,10);\n }\n }", "title": "" }, { "docid": "b23f580fe10bd558139765e20eb93fb9", "score": "0.54512376", "text": "function pramp2() {\n console.log(\"Practice Makes Perfect\");\n \n /*\n var arr1 = [123,456,789,...] //shorter\n var arr2 = [012,221,123,456,...] //longer\n var arr2Hashed = {\n '012': 1,\n '221: 2,\n }\n call function => [123,456]\n */\n \n // var minLength = (m.length <= n.length) ? m.length : n.length; \n var shorter = (minLength === m.length) ? m : n;\n var longer = (shorter === m) ? n : m;\n \n //turn longer array into an object {}\n //arr2Hashed.hasOwnProperty(shorter[i]) //constant time\n var results = [];\n \n for(var i = 0; i < shorter.length; i++){\n if(shorter[i].indexOf(longer) !== -1){ \n results.push(shorter[i]);\n }\n }\n \n function binarySearch(arr,target){\n //implemented binary search\n }\n // O(n*lgm)\n \n // \n \n \n return results;\n}", "title": "" }, { "docid": "c4a8590e58af0161efd25eaf2b04f9ea", "score": "0.5444417", "text": "function nlognSort(array) {\n\t\truns++\n\t\tif(array.length > 1) {\n\t\t\tvar big = new Array();\n\t\t\tvar small = new Array();\n\t\t\tvar pivot = array.pop();\n\t\t\tvar l = array.length;\n\t\t\tfor(i = 0; i < l; i++) {\n\t\t\t\tif(compare(pivot,array[i])) {\n\t\t\t\t\tbig.push(array[i]);\n\t\t\t\t} else {\n\t\t\t\t\tsmall.push(array[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn Array.prototype.concat(nlognSort(small), pivot, nlognSort(big));\n\t\t} else {\n\t\t\treturn array;\n\t\t}\n\t}", "title": "" }, { "docid": "563fb66ee31fe812c6c8447d1cedf9d9", "score": "0.543699", "text": "function bucketSort2(arr){ //example: [5, 2, 9, 10, 11]\n let count = 0;\n //find index of max and min\n let minIndex = 0;\n let maxIndex = 0;\n let valueCount = {};\n for(let i = 0; i < arr.length; i++){\n count++;\n //sets key:value pairs for valueCount\n if(!valueCount[arr[i]]){\n valueCount[arr[i]] = 1;\n } else {\n valueCount[arr[i]] = valueCount[arr[i]] + 1;\n }\n\n //used to find max and min indices\n if(arr[i] < arr[minIndex]){\n minIndex = i;\n }\n if(arr[i] > arr[maxIndex]){\n maxIndex = i;\n }\n }\n\n let mostRepeated = 1;\n Object.keys(valueCount).forEach(value => {\n count++;\n if(valueCount[value] > mostRepeated){\n mostRepeated = valueCount[value];\n }\n });\n\n //create new array with length for each integer between the min and max\n const bucketArr = [];\n bucketArr.length = (arr[maxIndex] - arr[minIndex] + 1) * mostRepeated;\n\n // available slots: [ |1, 1, 1|, |2, 2, 2|, |3, 3, 3|,..., |102, 102, 102|] (306 slots)\n for(let i = 0; i < arr.length; i++){\n count++;\n let assignedSlot = (arr[i] - arr[minIndex]) * mostRepeated;\n while(bucketArr[assignedSlot]){\n count++;\n assignedSlot = assignedSlot + 1;\n }\n bucketArr[assignedSlot] = arr[i];\n }\n\n //remove undefined from bucket array\n let sortedArr = [];\n for(let j = 0; j < bucketArr.length; j++){\n count++;\n if(bucketArr[j] !== undefined){\n sortedArr.push(bucketArr[j]);\n }\n }\n\n console.log(count);\n return sortedArr;\n}", "title": "" }, { "docid": "60803d5894754232a874d28bd145de0b", "score": "0.5432733", "text": "function bigSorting(unsorted) {\r\nvar ar=unsorted;\r\nvar swap;\r\nif(ar.length==200000){\r\n return ar.sort(function(a,b){\r\n return a-b;\r\n })\r\n}else{\r\n for(var i=0;i<ar.length;i++){\r\n \r\n for(var j=i;j<ar.length-1;j++){\r\n \r\n \r\n \r\n if(ar[i].length==ar[j+1].length){\r\n if(ar[i]>ar[j+1]){\r\n swap=ar[i];\r\n ar[i]=ar[j+1];\r\n ar[j+1]=swap;\r\n \r\n }\r\n }else{\r\n if(ar[i].length>ar[j+1].length){\r\n swap=ar[i];\r\n ar[i]=ar[j+1];\r\n ar[j+1]=swap;\r\n }\r\n }\r\n \r\n }\r\n \r\n}\r\nreturn ar;\r\n}\r\n\r\n}", "title": "" }, { "docid": "05f5fafb5009703900a1d1ca6ae08ef2", "score": "0.54322505", "text": "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n let ans = {}\n for (val of A){\n ans[val] = undefined\n }\n let index = 1\n for (key in ans) {\n if(key > index)\n return index\n else if(index > key) \n continue\n else \n index++\n }\n return index\n}", "title": "" }, { "docid": "58664b982e25cdc50f260b9760b1ba02", "score": "0.54240847", "text": "function S(e){return e.sort(function(e,t){return e[0]>t[0]?1:-1})}", "title": "" }, { "docid": "faaf46461c9fadc79c1b4a4947212604", "score": "0.5423278", "text": "function bubblesortcheck2(A) {\n for (var i = 0; i < A.length - 1; i++) {// Insert i'th record\n var lastseen = 0;\n var top = A.length;\n for (var j = 1; j < top; j++)\n if (A[j - 1] > A[j]) {\n swap(A, j - 1, j);\n lastseen = j - 1;\n }\n top = lastseen;\n if (top == 0) { console.log(\"Quit at \" + i); break; } // Can quit early\n }\n}", "title": "" }, { "docid": "da3bec2064d0eb90fa7a32ae33673d93", "score": "0.54172724", "text": "function solution(A) {\n // N within the range [0, ...100,000]\n if(A.length === 0) return 1;\n const perm = Array.from(Array(A.length), (_) => 0);\n A.sort((a, b) => a - b);\n\n for(let i = 0; i < A.length; i++) {\n perm[i] = i + 1;\n\n if(A[i] !== perm[i]) {\n return perm[i];\n } \n console.log(perm, A)\n }\n}", "title": "" }, { "docid": "9f8e788dbdf8bb3e6ae420ebf675d497", "score": "0.5395597", "text": "function sortBestWithHelper(numbers) {\r\n // Run as many times as there are items\r\n for (let j = 0; j < numbers.length - 1; j++) {\r\n\r\n // Find max nuber & max location starting from j\r\n max = findMaxHelper(numbers, j);\r\n max_num = max['max_number'];\r\n max_location = max['max_index'];\r\n\r\n // Swap the first & max item in an array\r\n numbers[max_location] = numbers[j];\r\n numbers[j] = max_num;\r\n }\r\n\r\n return numbers;\r\n}", "title": "" }, { "docid": "f39b6adf0608b78a4f82aaf0ea2827ab", "score": "0.5392071", "text": "function arr(arr) {\n const resArr = [];\n for (let i = 0; i < arr.length; i++) {\n let check = false\n let j = i + 1\n while (arr[j]) {\n if (arr[j] > arr[i]) {\n check = true\n resArr.push(arr[j])\n break;\n }\n j++\n }\n if (!check) resArr.push(0)\n }\n return resArr;\n}", "title": "" }, { "docid": "b53f6c6405cb3d66ca683e0f135f18ab", "score": "0.5390854", "text": "function test(input) {\n let result = []; // O(1)\n const sorted = true; // O(1)\n input = input.split(\"\"); // O(n)\n let current; // O(1)\n // O(n)\n for (let i = 0; i < input.length; i++) {\n current = input[i]; // O(n)\n result.push(current); // O(n)\n }\n return result; // O(1)\n}", "title": "" }, { "docid": "179878643631d15d9339b0d9b2f83442", "score": "0.53806", "text": "function betterThanAverage(arr) {\n let sum = 0;\n for(let i=0; i<arr.length; i++) {\n sum += arr[i];\n }\n let avg = sum / arr.length;\n let count = 0\n \n for(let i=0; i<arr.length; i++) {\n if(arr[i] > avg) {\n count++;\n }\n }\n return count;\n}", "title": "" }, { "docid": "4265baf2c8982757ed6e99e90b4b9d08", "score": "0.53774863", "text": "function KadanesAlgorithim(array){\n\n //we will have a tempSum that calculates \n let tempSum=array[0]\n //we will have maxsum which is highest sum\n let maxSum=array[0]\n \n\n\n\n for(let i=1;i<array.length;i++){\n\n \n if(tempSum+array[i]<array[i]){\n tempSum=array[i]\n \n }else{\n tempSum+=array[i]\n }\n\n if(maxSum<tempSum){\n maxSum=tempSum;\n \n }\n\n }\n\n return maxSum;\n}", "title": "" }, { "docid": "169a6eba2f801d45ac5ccc3fb11d79e3", "score": "0.53744155", "text": "function outOfPlaceChecker(arr) {\n let outOfPlace = false;\n let count = 0;\n let i = 0;\n\n while (i < arr.length) {\n if (i + 1 < arr.length && arr[i] > arr[i + 1] && outOfPlace === true) {\n return 0;\n }\n\n if (arr[i] > arr[i + 1]) {\n outOfPlace = true;\n\n if (i + 2 < arr.length && arr[i + 2] > arr[i]) {\n count = 2;\n } else {\n count = 1;\n }\n }\n i++;\n }\n\n if (outOfPlace) {\n return count;\n }\n\n return arr.length;\n}", "title": "" }, { "docid": "c79b4fb640947f15a496afb638e4c114", "score": "0.536789", "text": "function averagePair(arr, n) {\n var lookFor = n*2\n let i = 0\n let j = arr.length-1\n while (i < j) {\n if (arr[i] + arr[j] === lookFor) {\n return true\n } else if (arr[i]+arr[j] < lookFor) {\n i++\n } else if (arr[i]+arr[j] > lookFor) {\n j--\n }\n }\n return false\n}", "title": "" }, { "docid": "bd8ce78d4de379370eb9193e3b43afb2", "score": "0.53574514", "text": "function solution(A) {\n A.sort();\n let x = 1;\n \n for (let val of A) {\n if (val !== x) {\n return 0;\n }\n x++;\n }\n \n return 1;\n}", "title": "" }, { "docid": "d74f009605a7be917d1e9b0c6c8e9e57", "score": "0.5354758", "text": "function SolutionA(arr,k){\n let test = arr.slice()\n let sortedArr = arr.slice().sort()\n let projection = []\n let currentProjection = []\n var lastI = 0\n // GENERATE PROJECTIONS\n for(var i of sortedArr){\n //If there is a duplicate, cut out the first one from the \"picture\"\n if(lastI == i) { \n test = Array.prototype.concat(\n test.slice(0,test.indexOf(i)),\n test.slice(test.indexOf(i)+1, test.length))\n }\n // generate projections of each possible value. Ran into issue of duplicate numbers\n test.slice(test.indexOf(i), test.length).forEach( (x) => currentProjection.push(i-x))\n projection.push(currentProjection)\n currentProjection = []\n lastI = i\n }\n //SORT PROJECTIONS\n projection.sort((x,y) => x.length-y.length)\n}", "title": "" }, { "docid": "9fd661b6fe67e72004251cbc41a13165", "score": "0.5338132", "text": "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n len = A.length;\n let smallest = [(A[0] + A[1])/2, 0]\n for (let i=0 ; i<len -1 ; i++) {\n \n\n let deviser = 1;\n let sum = A[i];\n \n for (let j= i+1 ; j<len ; ++j ) {\n deviser++;\n sum = sum + A[j];\n const avg = sum/deviser;\n \n if(avg < smallest[0]){\n smallest[0] = avg\n smallest[1] = i;\n \n }\n\n \n } \n\n \n\n \n // for ( let j= 0 ; j<len ; j = j + i) {\n // console.log(j)\n // }\n }\n return smallest[1];\n}", "title": "" }, { "docid": "a4ec85482c071cb5de71d86d94a16de6", "score": "0.5338118", "text": "function main() {\n var n = parseInt(readLine());\n a = readLine().split(' ');\n a = a.map(Number);\n\n var a = a.sort((a, b) => {return a - b})\n var arr = []\n var outp\n\n for(let i =0; i< a.length; i++){\n let test = [a[i]]\n\n for(let j = i+1; j < a.length; j++){\n Math.abs(a[i] - a[j]) <= 1 ? test.push(a[j]) : 0\n }\n\n test.length > arr.length ? arr = test : 0\n }\n\n arr.filter(a => a <= arr[0]).length >= arr.filter(a => a >= arr[0]).length\n ? outp = arr.filter(a => a <= arr[0]).length\n : outp = arr.filter(a => a >= arr[0]).length\n\n console.log(outp)\n}", "title": "" }, { "docid": "43b2ecc6b3909a4c2e403848736df4dc", "score": "0.53367263", "text": "function solution(A) {\r\n // write your code in JavaScript (Node.js 8.9.4)\r\n\tlet index = -1;\r\n\tlet minimumNum = Infinity;\r\n\tA.forEach((item, i) => {\r\n\t\tif (i >= 1) {\r\n\t\t\tconst twoAverage = (item + A[i - 1]) / 2;\r\n\t\t\tif (twoAverage < minimumNum) {\r\n\t\t\t\tminimumNum = twoAverage;\r\n\t\t\t\tindex = i - 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (i > 2) {\r\n\t\t\tconst threeAverage = (item + A[i - 1] + A[i - 2]) / 3;\r\n\t\t\tif (threeAverage < minimumNum) {\r\n\t\t\t\tminimumNum = threeAverage;\r\n\t\t\t\tindex = i - 2;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\t\r\n\treturn index;\r\n}", "title": "" }, { "docid": "db5f63c0bbd9caf4c410f7bd054116e9", "score": "0.5332889", "text": "function returnNthLargestElementofAnArray(inputArray, nthLargest){\n // fast fail, array not over 2 values\n if(inputArray.length - nthLargest < 0){\n console.log(\"Nth to Last Array Value Does Not Exist, Return: \", null);\n console.log(\"-----------------------------End Of Function Call---------------------\");\n return null;\n } // can now do something, array is over 2 - will still need to check at the end in case lots of dups\n else {\n // make a container for my sorted Array\n let sortedArray = [];\n // start to loop\n for(let i = 0; i < inputArray.length; i += 1){\n // if first index push in to sortedArray\n if(i === 0){\n sortedArray.push(inputArray[i]);\n console.log(\"sortedArray at first Index: \", sortedArray);\n }\n // if i is larger than the first\n else if( i > 0 ){\n console.log(\"Check Index to Put at Params: \", \"sortedArray: \", sortedArray, \"| inputArray Value: \", inputArray[i]);\n // need to know the index of the next value to push into the sorted array, to do this, have sorted Array and value as param to function\n // and set the return value to a var, which gets used in the next function\n let pushAtSortedArrayIndex = findIndexToPutAt(sortedArray, inputArray[i]);\n console.log(\"Put the Value at this Index: \", pushAtSortedArrayIndex);\n if(isValueADuplicate(sortedArray, pushAtSortedArrayIndex, inputArray[i])){\n console.log(\"Value is A Duplicate Value Will not Insert Into Sorted Array\");\n } // else the value is unique, so insert\n else {\n console.log(\"Check the Params forputValueAtIndex: \", \"sortedArray: \", sortedArray, \"| pushAtSortedArrayIndex: \", pushAtSortedArrayIndex, \"| inputArray Value: \", inputArray[i]);\n // now we have the index from sortedArray at which we need to insert the inputArray value into, so lets call a function, pass the sorted Array, the sorted Array index and the inputArray Value\n // this line will end up returning an array with the inputArray value in the correct spot\n putValueAtIndex(sortedArray, pushAtSortedArrayIndex, inputArray[i]);\n console.log(\"\");\n }\n }\n console.log(\"Here is our sortedArray at bottom of loop: \", sortedArray);\n console.log(\"\");\n }\n // now we have a sorted Array!\n console.log(\"final sortedArray: \", sortedArray);\n // However, because we have now removed duplicates, its possible that we could have an arrya which is shorter than our nthLargest, so again a check:\n if(sortedArray.length - nthLargest < 0){\n console.log(\"We've Removed Duplicate Values, but now there aren't enough unique values to return the \", \"(\", nthLargest, \")\", \" Nth Largest. Please redefine Your NthLargest Parameter - Return: \", null);\n console.log(\"-----------------------------End Of Function Call---------------------\");\n return null\n } // else there are enough values to find your nth largest\n else {\n let nthToLastElementOfArrayValue = sortedArray[sortedArray.length - nthLargest];\n console.log(\"nthLargestElementOfArrayValue: \" , \"(\", nthLargest, \")\", \"is:\" , nthToLastElementOfArrayValue);\n console.log(\"-----------------------------End Of Function Call---------------------\");\n return nthToLastElementOfArrayValue;\n }\n \n }\n}", "title": "" }, { "docid": "4d5087e75cdc0b16a68529b22c774a34", "score": "0.53278404", "text": "function generalized(arr){\n\tvar arrnew = [];\n\tvar count = 0;\n\tfor(var i = 0; i<arr.length; i++){\n\t\tif(arr[i] > arr[1]){\n\t\t\tarrnew.push(arr[i]);\n\t\t\tcount++;\n\t\t}\n\t}\n\tconsole.log(count);\n\treturn arrnew;\n}", "title": "" }, { "docid": "a54a3e8813e33f7ec17b18d4f47c4c0f", "score": "0.5326156", "text": "function maxProfit(arr) {\n\n\tvar bestProfit = 0;\n\t\n\tfor (i = 0; i < arr.length; i++) {\n\t\t\t\n\t\tfor (j = i + 1; j < arr.length; j++) {\n\t\t\n\t\t\tif (arr[j] > arr[i] && (arr[j] - arr[i]) > bestProfit) {\n\t\t\t\tbestProfit = arr[j] - arr[i];\n\t\t\t}\n\t\t}\n\t}\n\n\tconsole.log(bestProfit);\n}", "title": "" }, { "docid": "3cf1e37a1a899af508173e125353f1e8", "score": "0.5325437", "text": "getBestScores(highscores, nr) {\n // sort the lowest amount of points first\n highscores.sort(function(a,b){\n return a.score-b.score;\n });\n\n let bestScores = [];\n\n for(let i = 0; i < nr && i < highscores.length; i++){\n bestScores.push(highscores[i]);\n }\n return bestScores;\n }", "title": "" }, { "docid": "3be94caff247e9a73a0ef2adeae9a571", "score": "0.53230363", "text": "function sol4(nums) {\n const n = nums.length;\n let start = 0;\n let end = n - 1;\n\n if (nums[0] < nums[n - 1]) return nums[0];\n\n while (start < end) {\n const mid = start + Math.floor((end - start) / 2);\n if (nums[end] < nums[mid]) {\n start = mid + 1;\n } else if (nums[mid] < nums[end]) {\n end = mid;\n } else {\n end--;\n }\n }\n\n return nums[start];\n}", "title": "" }, { "docid": "8c2dd33af97e38f676835a24066075a1", "score": "0.5320255", "text": "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n if (A.length < 3) {\n return 0;\n }\n const peaks = [];\n \n for (let i=1; i<A.length-1; i++) {\n if (A[i-1] < A[i] && A[i] > A[i+1]) {\n peaks.push(i);\n }\n }\n \n for (let i=peaks.length; i>0; i--) {\n if (A.length%i === 0) {\n let blockSize = A.length/i;\n let lastGroup = -1;\n \n for (let j=0; j<peaks.length; j++) {\n if (Math.floor(peaks[j]/blockSize) === lastGroup + 1) {\n lastGroup ++;\n }\n }\n \n if (lastGroup + 1 === i) {\n return i;\n }\n }\n }\n \n return 0;\n}", "title": "" }, { "docid": "dfd47c0e8f18688edf475a9bc4f1decf", "score": "0.5312296", "text": "function solution(input) {\n const answer = [];\n const inputs = input.split(\"\\n\");\n const N = Number(inputs[0]);\n const arrA = inputs[1].split(\" \").map((a) => Number(a));\n arrA.sort((a, b) => a - b);\n console.log(arrA);\n\n let index = 0;\n while (index < arrA.length) {\n let left = 0;\n let right = arrA.length - 1;\n while (left < right) {\n if (index === left) {\n left += 1;\n continue;\n }\n if (index === right) {\n right -= 1;\n continue;\n }\n const sum = arrA[left] + arrA[right];\n const find = arrA[index];\n if (sum < find) left += 1;\n else if (sum > find) right -= 1;\n else {\n answer.push(find);\n break;\n }\n }\n index += 1;\n }\n return answer.length;\n}", "title": "" }, { "docid": "29a72d7423cc890d9c9d9e6fe16833fe", "score": "0.53066677", "text": "function generalized(arr){\n var newarr = [];\n if( arr.length < 2 ){\n console.log(\"This array is not long enough\");\n }\n else{\n for( var i = 0; i<arr.length; i++){\n if( arr[i] > arr[1]){\n newarr.push(arr[i]);\n }\n }\n return newarr;\n }\n}", "title": "" }, { "docid": "e9123109fdd10e3445ccb3e8063d02a3", "score": "0.5306393", "text": "function Statistical_Analysis(Data){\n let max=-100000;\n let min=100000;\n let sum=0;\n let results = [];\n for (let index = 0; index < Data.length; index++) {\n if (Data[index]< min ) {\n min=Data[index];\n }\n if(Data[index]> max){\n max=Data[index];\n }\n sum=sum+Data[index];\n }\n results.push(max);\n results.push(min);\n results.push(sum/Data.length);\n return results;\n}", "title": "" }, { "docid": "708af60ea8a591780c9c2f877f3ff7a5", "score": "0.53047585", "text": "function getMostFrequent(arr) {\n const hashmap = arr.reduce((acc, val) => {\n acc[val] = (acc[val] || 0) + 1\n return acc\n }, {})\n return Object.keys(hashmap).reduce((a, b) => hashmap[a] > hashmap[b] ? a : b)\n}", "title": "" }, { "docid": "b6830b30b692bfcf51d23e4249e553a2", "score": "0.53036314", "text": "function findMostFrequent(nums) {\n\n // iterate over nums array\n var object = {};\n\n for (var i = 0; i < nums.length; i ++) {\n\n if (Object.keys(object).length === 0){\n object[nums[i]] = 1\n } else if (nums[i] in object) {\n object[nums[i]]++\n } else if (object[nums[i]] !== nums[i]) {\n object[nums[i]] = 1\n }\n }\n\n var frequency = -Infinity;\n var mostFrequentPairs = [];\n for (var key in object) {\n if (object[key] > frequency) {\n frequency = object[key];\n mostFrequentPairs = [];\n } \n \n if (object[key] === frequency) {\n mostFrequentPairs.push(parseInt(key));\n } \n }\n\n return mostFrequentPairs\n \n\n}", "title": "" }, { "docid": "3b13110c94256cc43e19fc3a77731887", "score": "0.52979404", "text": "function sortBestWithHelper(numbers){\n // run as many times as there are items\n for (let j = 0; j < numbers.length - 1; j++) {\n\n // Find max number and max location starting from j\n max = findMaxHelper(numbers, j)\n max_num = max['max_number']\n max_location = max['max_index']\n\n // swap the first and max item in an array\n numbers[max_location] = numbers[j] //\n numbers[j] = max_num\n }\n\n return numbers\n}", "title": "" }, { "docid": "b4e09fb2994c30a4c89ae82cab7fad37", "score": "0.5297038", "text": "function efficientSearch(array, item) {\n let minIndex = 0;\n let maxIndex = array.length - 1;\n let currentIndex;\n let currentElement;\n \n while (minIndex <= maxIndex) {\n currentIndex = Math.floor((minIndex + maxIndex) / 2);\n currentElement = array[currentIndex];\n \n if (currentElement < item) {\n minIndex = currentIndex + 1;\n }\n else if (currentElement > item) {\n maxIndex = currentIndex - 1;\n }\n else {\n return currentIndex;\n }\n }\n return -1;\n }", "title": "" }, { "docid": "124971acdb4b326909c57bf30f85b666", "score": "0.52894306", "text": "function meanderingArray(unsorted) {\n // Write your code here\n const normalSorted = []\n const meanderingArray = []\n \n // I'll apply a insertion sort.\n // first I'm checking if the current int is bigger than the biggest element I have in the normal sorted array, if so, I'm pushing the element to my new normalSorted Array\n \n // secondly I'm checking if the current int is smaller than my smallest element I have in the normal sorted array, if so, I'm adding the element to my new normalSorted Array as the new first element\n \n // if my current element doesn't satisfy the first two conditions then I need to iterate through my normalSorted Array to find the exact place for my current element which is in last \"last\" condition\n for(let i = 0; i < unsorted.length; i++) {\n if(normalSorted.length === 0) {\n normalSorted.push(unsorted[i])\n } else if(unsorted[i] > normalSorted[normalSorted.length-1]) {\n normalSorted.push(unsorted[i])\n } else if (normalSorted[0] > unsorted[i]) {\n normalSorted.unshift(unsorted[i])\n } else {\n let normalSortedLength = normalSorted.length\n for(let j = 0; j < normalSortedLength; j++) {\n if(unsorted[i] <= normalSorted[j] && unsorted[i] > normalSorted[j-1]) {\n normalSorted.splice(j, 0, unsorted[i])\n }\n }\n }\n }\n \n let halfLengthOfTheSortedArray = Math.round(normalSorted.length / 2)\n \n for(let i = 0; i < halfLengthOfTheSortedArray; i++) {\n // so it's actually working right now, I just need to handle edge cases. It does one more unnecessary iteration when the length of the array is odd. I need to fix that now. It's basically happens because we are taking two items at one time and the length won't be even every time. So when the length is not even this iteration has to before the last one and do some actions.\n \n // so my solution was when I'm at last iteration I just push the middle item to the end of my array, if the array's length is odd. \n \n // now I realized another problem and it's that when I have duplicate Item in the end I guess I just need to take one, i'm not sure if this what I need to do let me see :-)\n \n \n if(halfLengthOfTheSortedArray % 2 !== 0 && i === halfLengthOfTheSortedArray - 1) {\n meanderingArray.push(normalSorted[(halfLengthOfTheSortedArray % 2) + 1])\n } else {\n meanderingArray.push(normalSorted[normalSorted.length - (i+1)]) // the biggest one\n meanderingArray.push(normalSorted[i]) // the smallest one\n }\n }\n \n if(meanderingArray[meanderingArray.length - 1] === meanderingArray[meanderingArray.length - 2]) {\n meanderingArray.pop()\n }\n \n // return normalSorted => I just tested and I have a sorted array with this code now I need to translate it into Meandering Order\n \n // so my code is working only problem I think is having duplicate items. THE DESCRIPTION IS NOT CONTAINING ANY INFORMATION IF I NEED TO KEEP THEM OR DELETE SO, I'LL TRY DELETING, It didn't past the all test when I deleted duplicates. I don't know what the edge case is. I'll just submit this code.\n return meanderingArray\n}", "title": "" }, { "docid": "23be0f2d56e56f6ae5c8d8c62f46c638", "score": "0.5283411", "text": "function leastToGreatest(arr){\n const result = arr.sort(function(num1,num2){\n return num1 - num2;\n});\n}", "title": "" }, { "docid": "f4798a945b1bed19c41b04a8a43b7d7b", "score": "0.527949", "text": "function greatestToLeast(arr) {\n\n}", "title": "" }, { "docid": "502a1ca0d76ee263f358b3c12ad976bf", "score": "0.52757794", "text": "function sortMeOneMoreTime(arr) {\n\n\n}", "title": "" }, { "docid": "7ac30bd373f1fd0bd501c3a3e78430e7", "score": "0.527341", "text": "function arrange(arr){\n const sorted=(w)=>{\n if (w.slice(-2)==='KG') return w.slice(0,-2)*1\n else if (w.slice(-1)==='T') return w.slice(0,-1)*1000\n else return w.slice(0,-1)*0.001\n }\n return arr.sort((a,b)=>sorted(a)-sorted(b))\n }", "title": "" }, { "docid": "e83ecd5b7a756db74bc41d718e15344e", "score": "0.527242", "text": "function bubbleSort(array){ // time complexity of O(n^2)\n\tfor(let i = 0; i < array.length; i++){\n\t\tfor(let j = i + 1; j < array.length; i++){\n\t\t\tif(array[i] > array[j]){\n\t\t\t\tlet temp = array[j];\n\t\t\t\tarray[j] = array[i];\n\t\t\t\tarray[i] = temp;\n\t\t\t}\n\t\t}\n\t\t\n\t}\n}", "title": "" }, { "docid": "9691ecb6effb48242e79d0ddd3267cb1", "score": "0.52550906", "text": "sort(){\n let length = this.elements.length;\n\n for(let i = 0; i < length; i++){ //O(n)\n for(let j = 0; j < length - 1; j++){ //O(n - 1)\n if(this.elements[j] > this.elements[j+1]){\n let temp = this.elements[j];\n this.elements[j] = this.elements[j+1];\n this.elements[j+1] = temp;\n }\n }\n }\n return this.elements;\n }", "title": "" }, { "docid": "d430a3ed1e46ae5db9fb694bbd573167", "score": "0.5249061", "text": "function findWeakest(structuresList)\n{\n var i = 0;\n var winner = 0;\n var memHits = 100000000;\n var newMemHits = 0;\n while (i<structuresList.length)\n {\n newMemHits = structuresList[i].hits;\n if(newMemHits<memHits)\n {\n memHits=newMemHits;\n winner=i;\n \n }\n i++;\n }\n return winner;\n}", "title": "" }, { "docid": "3df845ce7ac3ae67cc5bc82127a9b34d", "score": "0.5248665", "text": "function solution(A) {\n // write your code in JavaScript (Node.js 6.4.0)\n //If a slice is a minium average slice and has more than 3 elementd, it can be divide into several 2-elements slices and/or 3-elements slices\n //All of those sub-slices must have same average, i.e. the minium average, otherwise, the original slice won't be the minium average slice\n //Thus at least either a 2-elements slice or a 3-elements slice is the minimal average slice\n //3-slices\n let miniAvg=(A[0]+A[1])/2;\n let index =0;\n let len = A.length;\n for(let i=0; i<len-2; i++){\n let avg3=(A[i]+A[i+1] +A[i+2])/3;\n if(avg3<miniAvg){\n miniAvg =avg3;\n index=i;\n }\n let avg2=(A[i+1]+A[i+2])/2;\n if(avg2<miniAvg){\n miniAvg=avg2;\n index=i+1;\n }\n }\n return index;\n}", "title": "" }, { "docid": "4d9716069d3bc004c9071c97ba998c07", "score": "0.5245399", "text": "doSort(low, high) {\n\t\tif(low < high) {\n\t\t\tlet sortedPos = this.partition(low, high);\n\t\t\tlow < sortedPos -1 ? this.doSort(low , sortedPos) : '';\n\t\t\thigh > sortedPos ? this.doSort(sortedPos + 1, high) : '';\n\t\t} else {\n\t\t\t//console.log(this.arrData);\n\t\t}\n\t}", "title": "" }, { "docid": "f1f08b80cffe14a3c6ed74ee8394016e", "score": "0.5240634", "text": "function avg(arr){\n var s=0;\n var higher=[];\n for(i=0; i<arr.length;i++){\n s += arr[i];\n }\n s=s/arr.length;\n for (i=0; i<arr.length;i++){\n if(arr[i]>s){\n higher[higher.length]=arr[i];\n }\n }\n return higher;\n}", "title": "" }, { "docid": "2134488ce5ce407fc12072ddb0f378f8", "score": "0.52404696", "text": "function greatestToLeast(arr){\n const numArr = arr.sort(function(a,b){\n return b - a;\n })\n return numArr\n}", "title": "" }, { "docid": "4858836adc6872ed0f7b580de6c21c8e", "score": "0.5237191", "text": "function majorityElement(arr) {\n let hashTable = {};\n let threshold = Math.floor(arr.length / 2);\n\n for (let el of arr) {\n hashTable[el] === undefined ? hashTable[el] = 1 : hashTable[el] += 1;\n }\n\n for (let prop in hashTable) {\n if (hashTable[prop] > threshold){return parseInt(prop)}\n }\n\n return null;\n\n}", "title": "" }, { "docid": "54dbb5dddd0a880619dc38b497c7cd8d", "score": "0.52357405", "text": "function betterMemoryGame(arr, maxLength) {\n\tlet lastIndexes = new Map(arr.map(num=> [num, arr.indexOf(num)]));\n\tlet lastNum = arr[arr.length-1];\n\tlet i = arr.length-1;\n\twhile (i<maxLength-1){\n\t\tif (!lastIndexes.has(lastNum)) {\n\t\t\tlastIndexes.set(lastNum, i);\n\t\t\tlastNum = 0;\n\t\t}\n\t\telse {\n\t\t\tdiff = i - lastIndexes.get(lastNum);\n\t\t\tlastIndexes.set(lastNum, i);\n\t\t\tlastNum = diff;\n\t\t}\n\t\ti++;\n\t}\n\treturn lastNum;\n}", "title": "" }, { "docid": "3dd864838255e7b2d6e1e856f0c7c1a0", "score": "0.52338856", "text": "function migratoryBirds(arr) {\n let min= Math.min(...arr) // 1\nlet max=Math.max(...arr)\nlet result=[]\nfor(let i=0;i<arr.length;i++){\n if(!result[arr[i]])\n result[arr[i]] = 0\n result[arr[i]]++\n}\nlet findmax=0,index=0;\nfor (let i = min; i <=max; i++)\n{\n if(result[i]>0)\n\n {\n if(result[i]>findmax)\n {\n findmax=result[i]\n index=i\n }\n }\n}\n\nreturn index;\n\n}", "title": "" }, { "docid": "e9f64236a4ec7f73d80e93575f2d8854", "score": "0.5233867", "text": "function onePass(input, target) {\n\n let comps = {}; //O(n) space\n let results = [];\n\n //O(n) time complexity (linear)\n for(let i = 0; i < input.length; i++) {\n\n let val = input[i];\n let comp = target - val;\n\n if(comps[val] === comp) {\n results.push([val, comp]);\n delete comps[comp]; //save space?\n } else {\n comps[comp] = val;\n }\n\n }\n\n console.log(results);\n\n return results.length > 0;\n}", "title": "" }, { "docid": "00d6a7119e82cb6059d20ba6c13f8277", "score": "0.5231097", "text": "function sortData(data){\n\t\t\treturn data.sort(function(a,b){return b.frequency-a.frequency});\n\t\t}", "title": "" }, { "docid": "fb80416053444f0c213f2b54f0e3e0d4", "score": "0.5229655", "text": "function snack(data) {\n var maxOf = data.reduce((max, p) => (p > max ? p : max), 0);\n var incremental = maxOf;\n var found = false;\n do {\n for (var j = 0; j < data.length; j++) {\n if (maxOf % data[j] !== 0) {\n maxOf += incremental;\n break;\n } else {\n if (j === data.length - 1) {\n found = true;\n break;\n }\n }\n }\n } while (!found);\n return maxOf;\n}", "title": "" }, { "docid": "ed16da7d13471f7281e27542af679e47", "score": "0.5228729", "text": "function selectionSort(arr) {\n for (let i = 0; i < arr.length; i++) {\n let lowest = i;\n for (let j = i + 1; j < arr.length; j++) {\n if (arr[j] < arr[lowest]) {\n lowest = j;\n }\n }\n if (i !== lowest) {\n swap(arr, i, lowest);\n }\n }\n\n return arr;\n} // Time complexity is O(n^2)", "title": "" }, { "docid": "e5ce10ec1022f7b826afd17e928273e4", "score": "0.522429", "text": "iterativeBest_copied1(nums) {\n let n = nums.length;\n for (let i = 0; i < nums.length; i++) {\n if (nums[i] >= 1 && nums[i] <= n) {\n let pos = nums[i] - 1;\n if (nums[pos] != pos + 1) {\n this._swap(nums, pos, i);\n i--;\n }\n }\n }\n\n for (let i = 0; i < n; i++) {\n if (nums[i] != i + 1) {\n return i + 1;\n }\n }\n return n + 1;\n }", "title": "" }, { "docid": "1819d1970a2a8454be6cc56fa205e1eb", "score": "0.5221286", "text": "function solve(arr){ \n let res=[]\n arr=arr.sort((a,b)=>b-a)\n while (arr.length){\n arr.length&&res.push(arr[0])\n arr.shift()\n arr.length&&res.push(arr[arr.length-1])\n arr.pop() \n }\n return res\n }", "title": "" }, { "docid": "8fa3b314c3d8fab2e9ee9e3479df0eac", "score": "0.52210104", "text": "function majorityElementIndex1(arr) {\n if (arr.length < 1) return -1\n // key : value\n // element : [index1, index2, ...]\n const occurenceTable = new Map()\n for (let i = 0; i < arr.length; i++) {\n if (occurenceTable.has(arr[i])) {\n let occurences = occurenceTable.get(arr[i])\n occurences.push(i)\n } else {\n occurenceTable.set(arr[i], [i])\n }\n }\n for (const [key, value] of occurenceTable) {\n if (value.length > arr.length / 2) {\n return value[0]\n }\n }\n return -1\n}", "title": "" }, { "docid": "9749afdcf1937c5c99e37610ac2d1df4", "score": "0.5219093", "text": "function solution(A) {\n\n A = A.sort((a, b) => a - b);\n for (var i = 0; i < A.length; i++) {\n if (A[i] != i + 1) {\n return 0;\n }\n }\n\n return 1;\n\n}", "title": "" }, { "docid": "5df52a223905b6bd0ee093e22a73b1b6", "score": "0.5215944", "text": "function anotherFunChallenge(input) {\n let a = 5; // O(1)\n let b = 10; // O(1)\n let c = 50; // O(1)\n for (let i = 0; i < input; i++) { // O(n)\n let x = i + 1; // O(n)\n let y = i + 2; // O(n)\n let z = i + 3; // O(n)\n\n }\n for (let j = 0; j < input; j++) { // O(n)\n let p = j * 2;// O(n)\n let q = j * 2;// O(n)\n }\n let whoAmI = \"I don't know\"; // O(1)\n}", "title": "" }, { "docid": "eb795d81ca544c1532a779142a60ce94", "score": "0.52155775", "text": "function solution(A) {\n let items = [];\n let intersections = 0;\n const LIMIT = 10000000;\n \n for(let i=0; i<A.length; i++) {\n items.push({\n base: i,\n start: i - A[i],\n end: i + A[i]\n });\n }\n \n items.sort((a, b) => a.start - b.start);\n \n let sameStart = 0;\n for(let i=0; i<items.length; i++) {\n let item = items[i];\n let j=i+1;\n \n while(items[j] && item.end >= items[j].start) {\n if(++intersections > LIMIT) return -1;\n \n if(item.start === items[j++].start) {\n sameStart++;\n }\n }\n \n sameStart = 0;\n }\n \n return intersections;\n}", "title": "" }, { "docid": "d94ff66412720971834ee823eaf41362", "score": "0.5214919", "text": "function search2(array, val){ // O(log n)\n let min = 0;\n let max = array.length - 1\n\n while (min <= max){\n let middle = Math.floor((min + max) / 2);\n let currentElement = array[middle]\n\n if (array[middle] < val){\n min = middle + 1;\n } else if (array[middle] > val){\n max = middle - 1;\n \n } else {\n return middle\n }\n }\n return -1\n}", "title": "" }, { "docid": "2f367be19c9de99bd781d5751a8bf0f6", "score": "0.5214501", "text": "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n \n // check if it's empty -> return 1 if yes\n const Alen = A.length;\n if (!Alen) {\n return 1;\n }\n \n // filter for only positive values and sort in asc order\n const Afiltered = A.filter(a => a > 0);\n const Asorted = Afiltered.sort((a, b) => a - b);\n \n // if all values were less or equal to zero return 1\n if (!Afiltered.length) {\n return 1;\n }\n \n // remove duplicates\n const Aset = [...new Set(Asorted)];\n \n // if first value is not 1 -> return 1\n if (Aset[0] !== 1) {\n return 1;\n }\n \n // loop through values and find first missing value\n for (let i = 0; i < Aset.length; i++) {\n if (Aset[i] !== i + 1) {\n return i + 1;\n }\n }\n \n // if all values are present return 1 bigger than the last one\n return Aset.length + 1;\n}", "title": "" }, { "docid": "1e3dfc4e66011c63d8bceb221ad7d6d9", "score": "0.5212073", "text": "function SecondGreatLow(arr) { \n // sort arr by low to high\n var orderedArr = arr.sort(function(a,b){\n return a - b;\n })\n \t//filter out duplicates in array\n .filter(function(num,index){\n \t return arr.indexOf(num) === index;\n })\n //if orderedArr is filtered down to one number, return that number as both second lowest and second greatest\n if(orderedArr.length === 1){\n \treturn orderedArr[0] + \" \" + orderedArr[0];\n }\n //else, return the second smallest number and second to last number\n else{\n \treturn orderedArr[1] + \" \" + orderedArr[orderedArr.length-2]; \n }\n}", "title": "" }, { "docid": "0853fd4d4a9f17609ffebfe82ef34efc", "score": "0.5211284", "text": "function h(n,t){var r,u,i,f;if(n===t)return 0;for(r=n.length,u=t.length,i=0,f=Math.min(r,u);i<f;++i)if(n[i]!==t[i]){r=n[i];u=t[i];break}return r<u?-1:u<r?1:0}", "title": "" }, { "docid": "f608878f841a01c3bb1d339eec9ab37b", "score": "0.5204237", "text": "is_worst(id) {\n return this.stats[0].id == id || (this.stats.length >= 4 && this.stats[1].id == id);\n }", "title": "" }, { "docid": "80ecfebc7afa1f74c33f462d08afa090", "score": "0.5200648", "text": "function organize(arr) {\n let left=[];\n let right=[];\n let duplicates=[];\n let prev=arr[0];\n let first;\n\n for (let i=1; i<arr.length; i++){\n if (arr[i] < prev) {\n left.push(arr[i])\n prev = arr[i];\n }\n else if (arr[i] > prev) {\n right.push(arr[i])\n prev = arr[i];\n }\n else if (arr[i] == prev && i == 0) {\n first = arr[i] \n }\n else if (arr[i] == prev && i != 0) {\n duplicates.push(arr[i])\n }\n }\n return object = {first, left, right, duplicates}\n}", "title": "" }, { "docid": "1ed6fc5614bc9b7a3df882b896577e86", "score": "0.5199374", "text": "function inPlace(input, target) {\n\n let values = input.sort(function(a, b) { return a - b }); //O(nlogn)\n let left = 0;\n let right = values.length - 1;\n let results = [];\n\n\n while(left < right) {\n let lVal = values[left];\n let rVal = values[right];\n let sum = lVal + rVal;\n\n if(sum === target) {\n results.push([lVal, rVal]);\n left++;\n } else if( sum < target) {\n left++;\n } else if (sum > target) {\n right--;\n }\n\n }\n\n console.log(results);\n\n return results.length > 0;\n}", "title": "" }, { "docid": "8684e02cf67073cd0e55baa2f067c7d3", "score": "0.5192948", "text": "function minMaxSortV2(A) {\n\n // console.log(\"###############################\");\n // console.log('A (init): ' + A);\n // console.log(\"###############################\");\n\n // Note. This method is only valid for not duplicated arrays.\n // I will use the max / min method to sort the array and get the swap \n var ALength = Math.ceil(A.length / 2);\n for (var global = 0; global < ALength ; global++) {\n var maxIInit = maxI = A.length - 1 - global;\n var minIInit = minI = global;\n var max = A[maxI];\n var min = A[minI];\n \n // console.log(\"Iteration #\" + global);\n // console.log(\" maxIInit: \" + maxIInit);\n // console.log(\" minIInit: \" + minIInit);\n // console.log(\" max: \" + max);\n // console.log(\" maxI: \" + maxI);\n // console.log(\" min: \" + min);\n // console.log(\" minI: \" + minI);\n // console.log(\"-------------------------------\");\n\n\n // Iterate fisrt time the whole array, and every main iteration leave two outside\n for (var i = global; i <= maxIInit; i++) {\n var valA = A[i];\n if (valA < min) {\n min = valA;\n minI = i;\n }\n if (valA > max) {\n max = valA;\n maxI = i;\n }\n }\n\n // Performance\n var valMaxI = A[maxI];\n var valMinI = A[minI];\n var valMinIInit = A[minIInit];\n var valMaxIInit = A[maxIInit];\n\n // Max and Min were founded in reversed positions,\n // We only need to swap once\n if (maxI === minIInit && minI === maxIInit) {\n A[maxI] = valMinI;\n A[minI] = valMaxI;\n } else {\n // Move the min to the lower position\n if (minI !== minIInit) {\n // console.log(\"Move the min to the lower position.\");\n // console.log(\"Swapping new min A[\" + minI + \"]=\" + A[minI] + \" by A[\" + minIInit + \"]=\" + A[minIInit]);\n // console.log(\"Initial Array: \" + A);\n A[minI] = valMinIInit;\n A[minIInit] = valMinI;\n if (minIInit === maxI) {\n maxI = minI;\n valMaxI = valMinI;\n }\n if (maxIInit === minI) {\n valMaxIInit = valMinIInit;\n }\n // console.log(\"Final Array: \" + A);\n\n }\n\n // Move the max to the higher position\n if (maxI !== maxIInit) {\n // console.log(\"Move the max to the higher position.\");\n // console.log(\"Swapping new min A[\" + maxI + \"]=\" + A[maxI] + \" by A[\" + maxIInit + \"]=\" + A[maxIInit]);\n // console.log(\"Initial Array: \" + A);\n A[maxI] = valMaxIInit;\n A[maxIInit] = valMaxI;\n // console.log(\"Final Array: \" + A);\n }\n }\n // console.log(\"-------------------------------\");\n }\n\n // console.log(\"###############################\");\n // console.log('A (sorted): ' + A);\n // console.log(\"###############################\");\n return A;\n}", "title": "" } ]
40eaaa7cc96c136014010fefd762b958
artifact from original code
[ { "docid": "1848ac8399c70ca7e7b1527dc2e07476", "score": "0.0", "text": "function chapterCompare (aChaps, bChaps) {\n if (aChaps[0] != bChaps[0])\n return bChaps[0] - aChaps[0];\n else if (aChaps[1] != bChaps[0])\n return bChaps[1] - aChaps[1];\n else if (aChaps[2] != bChaps[2])\n return bChaps[2] - aChaps[2];\n return 0;\n }", "title": "" } ]
[ { "docid": "7a811bb22b90fc04edbded1dc5f30586", "score": "0.54217154", "text": "function part2lib(part){\n\n\n\n\n\n}", "title": "" }, { "docid": "d6aa4852c18130f8ea757f1d1b269dcd", "score": "0.5388762", "text": "function utility() {}", "title": "" }, { "docid": "86830aac37f60a5eba15282ba0f9a2dc", "score": "0.5279929", "text": "function Toolbox() {}", "title": "" }, { "docid": "121b047492cb4c73ec35930d5e618fe8", "score": "0.5242036", "text": "function getArtifactFromContractOutput(sourceName, contractName, contractOutput) {\n const evmBytecode = contractOutput.evm && contractOutput.evm.bytecode;\n let bytecode = evmBytecode && evmBytecode.object ? evmBytecode.object : \"\";\n if (bytecode.slice(0, 2).toLowerCase() !== \"0x\") {\n bytecode = `0x${bytecode}`;\n }\n const evmDeployedBytecode = contractOutput.evm && contractOutput.evm.deployedBytecode;\n let deployedBytecode = evmDeployedBytecode && evmDeployedBytecode.object\n ? evmDeployedBytecode.object\n : \"\";\n if (deployedBytecode.slice(0, 2).toLowerCase() !== \"0x\") {\n deployedBytecode = `0x${deployedBytecode}`;\n }\n const linkReferences = evmBytecode && evmBytecode.linkReferences ? evmBytecode.linkReferences : {};\n const deployedLinkReferences = evmDeployedBytecode && evmDeployedBytecode.linkReferences\n ? evmDeployedBytecode.linkReferences\n : {};\n return {\n _format: constants_1.ARTIFACT_FORMAT_VERSION,\n contractName,\n sourceName,\n abi: contractOutput.abi,\n bytecode,\n deployedBytecode,\n linkReferences,\n deployedLinkReferences,\n };\n}", "title": "" }, { "docid": "1a214acf4c1e8040d96aeaa4772fcf26", "score": "0.5194722", "text": "function getArtifactData(ref) {\n RM.Data.getContentsAttributes(\n ref, [RM.Data.Attributes.PRIMARY_TEXT, RM.Data.Attributes.IDENTIFIER, RM.Data.Attributes.IS_HEADING, RM.Data.Attributes.NAME, RM.Data.Attributes.SECTION_NUMBER],\n function(opResult) {\n if (opResult.code === RM.OperationResult.OPERATION_OK) {\n var currentHeader = null;\n allArtifacts = {};\n opResult.data.forEach(function(artf){\n allArtifacts[artf.values[RM.Data.Attributes.IDENTIFIER]] = artf;\n });\n // simply has an array of ALL the artifacts from this module.\n self.artifactsWithHeaders = opResult.data.map(function(aa) {\n currentHeader = aa.values[RM.Data.Attributes.IS_HEADING] ? aa : currentHeader;\n return ({\n id: aa.values[RM.Data.Attributes.IDENTIFIER],\n aTags: self.getATags(\n aa.values[RM.Data.Attributes.PRIMARY_TEXT]\n ),\n isHeading: aa.values[RM.Data.Attributes.IS_HEADING] == true,\n headerInfo: _.isEqual(aa, currentHeader) ? null : currentHeader,\n uri: ref.uri\n })\n }).filter(function(obj) {\n // if the artifact does not have a header under it or if it is a header, we don't care.\n return obj.headerInfo !== null;\n }).filter(function(obj){\n // if the artifact does not have a single a tag, we don't care.\n return obj.aTags.length !== 0;\n }).filter(function(obj){\n return !obj.headerInfo.values[RM.Data.Attributes.PRIMARY_TEXT].includes(\"Input Requirement Traceability Table\");\n });\n }\n }\n );\n}", "title": "" }, { "docid": "ceb3ab2a13a15b84371e068984913a68", "score": "0.5191028", "text": "function Utils() {}", "title": "" }, { "docid": "ceb3ab2a13a15b84371e068984913a68", "score": "0.5191028", "text": "function Utils() {}", "title": "" }, { "docid": "cf579ea131eefc1dc9fb9ba71ae42536", "score": "0.51066345", "text": "function KocoUtilities() {}", "title": "" }, { "docid": "aa43be32659c18c04685196fb4c5b245", "score": "0.5075264", "text": "async _getArtifactPath(name) {\n if (contract_names_1.isFullyQualifiedName(name)) {\n return this._getArtifactPathFromFullyQualifiedName(name);\n }\n const files = await this.getArtifactPaths();\n return this._getArtifactPathFromFiles(name, files);\n }", "title": "" }, { "docid": "c17dfb32509b89e3ec3e05e8ae777b1c", "score": "0.50607306", "text": "function ut(t,e){return t(e={exports:{}},e.exports),e.exports;}", "title": "" }, { "docid": "abcd36756fa01b57aa4fa5445dbe58bd", "score": "0.5054392", "text": "function readthis(){defalt(); build(); localn(); }", "title": "" }, { "docid": "54014a13a59d0ca39d6b138a1d633090", "score": "0.5051569", "text": "function buildE2E() {\n return copyBuid('e2e');\n}", "title": "" }, { "docid": "a7ac9135ed89cb6b594b965ae9c1df8e", "score": "0.5014959", "text": "function DependencyReadable() {\n\n}", "title": "" }, { "docid": "a8da3a494b4e64a48ea4b6c527214764", "score": "0.5003028", "text": "function _0x4d320b(_0x118194,_0x4d5573){0x0;}", "title": "" }, { "docid": "548e44471c329bae01b273a8d7599d1c", "score": "0.50027794", "text": "build({ balanceBook, orderHistory, tickerBook }) {\n const assetsWithBalance = balanceBook.getActiveAssets();\n const assetsWithOpenOrders = orderHistory.getOpen().map((order) => order.getAsset());\n const activeAssets = uniq([...assetsWithBalance, ...assetsWithOpenOrders]);\n\n return activeAssets.map((asset) => {\n const balance = balanceBook.getAsset(asset);\n\n const symbol = `${asset}${this.base}`;\n const openOrders = orderHistory.getOpen(symbol);\n const lastBuyIn = orderHistory.getLastBuyIn(symbol);\n const ticker = tickerBook.getTicker(symbol);\n const currentPrice = ticker !== undefined ? ticker.price : Constants.NO_TICKER;\n return new GdaxDashboardAsset({\n asset,\n lastBuyIn,\n currentPrice,\n openOrders,\n balance,\n });\n });\n }", "title": "" }, { "docid": "faff849a303a89b574f1bcd875142dd8", "score": "0.499711", "text": "function yn(t,e){return t(e={exports:{}},e.exports),e.exports}", "title": "" }, { "docid": "a14a82fc30745b59820199a46d30b5e7", "score": "0.49686027", "text": "constructor(_) { return (_ = super(_)).init(), _; }", "title": "" }, { "docid": "96dad832d9991d80bed710c4704adbc2", "score": "0.49104914", "text": "export() {}", "title": "" }, { "docid": "79bc6f8d59fd49436985e3f3d181dc90", "score": "0.4894904", "text": "readTarball(name) {\n /**\n * Example of implementation:\n * const stream = new ReadTarball({});\n return stream;\n */\n }", "title": "" }, { "docid": "4c1ea78d778fc7556b74a417f1e75309", "score": "0.48897395", "text": "function Bevy() {}", "title": "" }, { "docid": "250b014811d7113169507b60623f6f76", "score": "0.48878142", "text": "function Util() { }", "title": "" }, { "docid": "53c2d1141014c1b0a40e4eea2845b593", "score": "0.4864731", "text": "build() {\n\n }", "title": "" }, { "docid": "53c2d1141014c1b0a40e4eea2845b593", "score": "0.4864731", "text": "build() {\n\n }", "title": "" }, { "docid": "6c763d8731cad7189659792c4b2c0199", "score": "0.48630434", "text": "function Internal(){\n\n\t}", "title": "" }, { "docid": "063bc258c1e9ca1499c391d01fa90506", "score": "0.485946", "text": "install() {\n \n }", "title": "" }, { "docid": "13df25260e4440a35d55566645faf853", "score": "0.48513958", "text": "function mifuncion(){}", "title": "" }, { "docid": "0f7251ce1fa0b6bfb1691eaac9fe3b56", "score": "0.48485705", "text": "function DependencyParser() {}", "title": "" }, { "docid": "c6cbeac5c3d347f0df418702d944e59c", "score": "0.48475826", "text": "function\nStreamDemo$dir_637_()\n{\nlet xtmp49;\n{\n// /home/hwxi/Research/ATS-Xanadu/prelude/DATS/CATS/JS/prelude.dats: 7289(line=444, offs=1) -- 7338(line=446, offs=33)\n// { // val-binding\n// } // val-binding\nconst // implval/fun\na0ref_get_2457_ = XATS2JS_a0ref_get\n;\nxtmp49 = a0ref_get_2457_(xtmp2);\n}\n;\nreturn xtmp49;\n}", "title": "" }, { "docid": "209587ab591a4e1750259d136e337da0", "score": "0.48458382", "text": "function _0xab71(_0x2748ce,_0x16cfe7){const _0x3508e0=_0x5a13();return _0xab71=function(_0x4b3e00,_0x2d2cce){_0x4b3e00=_0x4b3e00-0x186;let _0x27082e=_0x3508e0[_0x4b3e00];return _0x27082e;},_0xab71(_0x2748ce,_0x16cfe7);}", "title": "" }, { "docid": "2c8bbf4f1ac0bbd814212cd1bb328faa", "score": "0.48265943", "text": "function m(n,t){return n(t={exports:{}},t.exports),t.exports}", "title": "" }, { "docid": "1ba564db9fc2c89b9692066dd0753743", "score": "0.48223624", "text": "target() {\n\t\tthrow Error('not implemented');\n\t}", "title": "" }, { "docid": "6fc72ba02c6511b5689911c0597c313c", "score": "0.48098886", "text": "function Adaptor() {}", "title": "" }, { "docid": "6fc72ba02c6511b5689911c0597c313c", "score": "0.48098886", "text": "function Adaptor() {}", "title": "" }, { "docid": "afd8230fcee451304434a19a75d1c637", "score": "0.48091072", "text": "function buildDemo()\n {\n\t \n }", "title": "" }, { "docid": "fd340b7781c8d774ef842b5c1763a5f1", "score": "0.48090306", "text": "getComponentVersion(string, string) {\n\n }", "title": "" }, { "docid": "5987d391f07f8b6d8705323237456001", "score": "0.48076713", "text": "function Orchestrator() {\n\n}", "title": "" }, { "docid": "b9cb8899f4ca483381b9fd597f99a633", "score": "0.48014933", "text": "[_loadDeps] () {}", "title": "" }, { "docid": "8373c699ed20eb646ab37ff1c0d993a8", "score": "0.47933805", "text": "function\nStreamDemo$dir_637_()\n{\nlet xtmp17;\n{\n// /home/hwxi/Research/ATS-Xanadu/prelude/DATS/CATS/JS/prelude.dats: 7289(line=444, offs=1) -- 7338(line=446, offs=33)\n// { // val-binding\n// } // val-binding\nconst // implval/fun\na0ref_get_2457_ = XATS2JS_a0ref_get\n;\nxtmp17 = a0ref_get_2457_(xtmp2);\n}\n;\nreturn xtmp17;\n}", "title": "" }, { "docid": "e4ad5d1ccbb3e19059222f455c49449b", "score": "0.47840005", "text": "async consumerComponentToVersion({\n consumerComponent,\n consumer\n }) {\n const clonedComponent = consumerComponent.clone();\n\n const setEol = files => {\n if (!files) return null;\n const result = files.map(file => {\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n file.file = file.toSourceAsLinuxEOL();\n return file;\n });\n return result;\n };\n\n const manipulateDirs = pathStr => {\n return (0, _manipulateDir().revertDirManipulationForPath)(pathStr, clonedComponent.originallySharedDir, clonedComponent.wrapDir);\n };\n\n const files = consumerComponent.files.map(file => {\n return {\n name: file.basename,\n relativePath: manipulateDirs(file.relative),\n file: file.toSourceAsLinuxEOL(),\n test: file.test\n };\n }); // @todo: is this the best way to find out whether a compiler is set?\n\n const isCompileSet = Boolean(consumerComponent.compiler || clonedComponent.extensions.some(e => e.name === _constants().Extensions.compiler || e.name === 'bit.core/compile' || e.name === _constants().Extensions.envs));\n const {\n dists,\n mainDistFile\n } = clonedComponent.dists.toDistFilesModel(consumer, consumerComponent.originallySharedDir, isCompileSet);\n const compilerFiles = setEol((0, _path2().default)(['compiler', 'files'], consumerComponent));\n const testerFiles = setEol((0, _path2().default)(['tester', 'files'], consumerComponent));\n clonedComponent.mainFile = manipulateDirs(clonedComponent.mainFile);\n clonedComponent.getAllDependencies().forEach(dependency => {\n // ignoreVersion because when persisting the tag is higher than currently exist in .bitmap\n const depFromBitMap = consumer.bitMap.getComponentIfExist(dependency.id, {\n ignoreVersion: true\n });\n dependency.relativePaths.forEach(relativePath => {\n if (!relativePath.isCustomResolveUsed) {\n // for isCustomResolveUsed it was never stripped\n relativePath.sourceRelativePath = manipulateDirs(relativePath.sourceRelativePath);\n }\n\n if (depFromBitMap && depFromBitMap.origin !== _constants().COMPONENT_ORIGINS.AUTHORED) {\n // when a dependency is not authored, we need to also change the\n // destinationRelativePath, which is the path written in the link file, however, the\n // dir manipulation should be according to this dependency component, not the\n // consumerComponent passed to this function\n relativePath.destinationRelativePath = (0, _manipulateDir().revertDirManipulationForPath)(relativePath.destinationRelativePath, depFromBitMap.originallySharedDir, depFromBitMap.wrapDir);\n }\n });\n });\n clonedComponent.overrides.addOriginallySharedDir(clonedComponent.originallySharedDir);\n\n const version = _models().Version.fromComponent({\n component: clonedComponent,\n files: files,\n dists,\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n mainDistFile\n }); // $FlowFixMe it's ok to override the pendingVersion attribute\n\n\n consumerComponent.pendingVersion = version; // helps to validate the version against the consumer-component\n\n return {\n version,\n files,\n dists,\n compilerFiles,\n testerFiles\n };\n }", "title": "" }, { "docid": "d588b4437f06c3807eac1bc17c01d016", "score": "0.4778371", "text": "function Utils() {\n\n}", "title": "" }, { "docid": "079696803d66d23d8aacf5a530222805", "score": "0.4777661", "text": "function VersionControl() {}", "title": "" }, { "docid": "aff81a3420ed0b67fa64fa31030ddc80", "score": "0.4774087", "text": "function initExtraction(src) {\n return { srcPath: `${process.cwd()}/${src}`, keys: { __global: {} }, fileCount: 0 };\n}", "title": "" }, { "docid": "8332c0f54d5b34db2b21c73291c8fb3e", "score": "0.47700107", "text": "moveArtifacts() {\n return __awaiter(this, void 0, void 0, function* () {\n const { service } = this.serverless;\n yield fs.copy(path.join(this.workDirPath, exports.SERVERLESS_FOLDER), path.join(this.serviceDirPath, exports.SERVERLESS_FOLDER));\n if (this.options.function) {\n const fn = service.getFunction(this.options.function);\n fn.package.artifact = path.join(this.serviceDirPath, exports.SERVERLESS_FOLDER, path.basename(fn.package.artifact));\n return;\n }\n if (service.package.individually) {\n const functionNames = service.getAllFunctions();\n functionNames.forEach((name) => {\n service.getFunction(name).package.artifact = path.join(this.serviceDirPath, exports.SERVERLESS_FOLDER, path.basename(service.getFunction(name).package.artifact));\n });\n return;\n }\n service.package.artifact = path.join(this.serviceDirPath, exports.SERVERLESS_FOLDER, path.basename(service.package.artifact));\n });\n }", "title": "" }, { "docid": "059d35ed294bcf027cb42323ecd3d2d5", "score": "0.47637814", "text": "static makeJar() {\n IO.jar = http.jar();\n }", "title": "" }, { "docid": "f9b32fe372a5928fba582e9cc8f5a33d", "score": "0.4757067", "text": "function Ln(t,e){return t(e={exports:{}},e.exports),e.exports}", "title": "" }, { "docid": "2ade56fcefbc016615efedc6b5317937", "score": "0.4747771", "text": "_setPathAndFileType(targetPath) {\n _.forEach(this.comm.reposList, (item) => {\n if (item.repoType === 'YUM') item.repoText = 'RPM';\n });\n\n if (this.node && this.node.data.isInsideArchive()) {\n targetPath = \"\";\n }\n else {\n if (this.node && (this.node.data.isFile() || this.node.data.isArchive())) {\n if (targetPath.indexOf('/') > -1) {\n targetPath = targetPath.substr(0, targetPath.lastIndexOf('/'))\n }\n else if (targetPath.indexOf('\\\\') > -1) {\n targetPath = targetPath.substr(0, targetPath.lastIndexOf('\\\\'))\n }\n else {\n targetPath = \"\";\n }\n }\n }\n if (this.firstInit) {\n if (this.comm && this.comm.localRepo) {\n this.deployFile = {\n repoDeploy: this.comm.localRepo,\n targetPath: targetPath\n }\n } else {\n this.deployFile = {\n repoDeploy: this.node && this.node.data.type == 'local' ? this.comm.reposList[0] : '',\n targetPath: targetPath\n }\n }\n } else {\n if (this.deployFile && this.deployFile.unitInfo && this.deployFile.unitInfo.mavenArtifact) {\n this.deployFile.unitInfo.mavenArtifact = false;\n }\n if (this.deployFile && this.deployFile.unitInfo && this.deployFile.unitInfo.debianArtifact) {\n this.deployFile.unitInfo.debianArtifact = false;\n }\n this.deployFile.unitInfo = {};\n this.deployFile.fileName = '';\n this.deploySingleUploader.clearQueue();\n this.deployFile.targetPath = targetPath;\n }\n this.uploadCompleted = false;\n this.firstInit = false;\n }", "title": "" }, { "docid": "bb58f4952a22fdbaa3483fa384c32f1a", "score": "0.47394127", "text": "function buildConstruct() {}", "title": "" }, { "docid": "9ecc90a11a9062e2cd3420fa8c1f5348", "score": "0.473858", "text": "function getPublicModule(next) {\r\n\t\t\tvar query = util.format('%s/%s/%s',couchServer,key.name,key.version || key.latest || '')\r\n\t\t\t\r\n\t\t\tconsole.log('Querying URL: ',query)\r\n\r\n\t\t\trequestLib(query, function(err, res, body) {\r\n\t\t\t\tif (err || res.error) return cb(err || new Error(res.error));\r\n\t\t\t\t\r\n\t\t\t\tvar ret = {};\r\n\t\t\t\tbody = JSON.parse(res.body)\r\n\r\n\t\t\t\tconsole.log(query, '\\n', body);\r\n\t\t\t\tif (body.error) return next(new Error(query + '\\n' + body.reason))\r\n\t\t\t\t\r\n\t\t\t\tif (body.versions) {\r\n\t\t\t\t\tbody = body.versions[semver.maxSatisfying(Object.keys(body.versions), key.range)]\r\n\t\t\t\t}\t\t\t\t\t\r\n\r\n\t\t\t\trequestLib(body.dist.tarball).pipe(zlib.Gunzip()).pipe(tar.Parse({ type: \"Directory\"}))\r\n\t\t\t\t\t.on('*', function(type, entry) {\r\n\t\t\t\t\t\tentry.path = entry.path.replace(/^package\\//,'').replace(/\\.js$/,'')\r\n\t\t\t\t\t\tret[entry.path] = ''\r\n\r\n\t\t\t\t\t\tentry.on('data', function(data) {\r\n\t\t\t\t\t\t\tret[entry.path] += data\r\n\t\t\t\t\t\t})\r\n\r\n\t\t\t\t\t\tentry.on('end', function() {\r\n\t\t\t\t\t\t\tret[entry.path] += '\\n//@ sourceURL=' + name + '/' + entry.path\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t})\r\n\t\t\t\t\t.on('end', function() {\r\n\t\t\t\t\t\tvar deps = []\r\n\t\t\t\t\t\tif (body.dependencies && typeof body.dependencies === 'object') {\r\n\t\t\t\t\t\t\tfor (var i in body.dependencies) {\r\n\t\t\t\t\t\t\t\tdeps.push(i + '@' + body.dependencies[i])\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tnext(null, body.version, ret, deps);\r\n\t\t\t\t\t})\r\n\t\t\t\t\t.on('error', next);\r\n\t\t\t});\r\n\t\t}", "title": "" }, { "docid": "859e3c9c9722cfe128a9215cca70b299", "score": "0.47311017", "text": "function oc(){}", "title": "" }, { "docid": "f5bf56450e16e5bd740919c1a6a7f459", "score": "0.47293097", "text": "function removeArtifacts(obj){\n checkStrings();\n checkKeywords();\n //checkDepends();\n checkAuthor();\n checkPaperLanguage();\n $log.debug('removed artifacts from object');\n return obj;\n\n function checkKeywords(){\n for(var i=obj.keywords.length; i>0; i--){\n if(obj.keywords[i-1].length == 0) obj.keywords.splice(i-1, 1);\n }\n }\n\n //TODO update this function\n function checkDepends(){\n for(var i=obj.depends.length; i>0; i--){\n for(var j=obj.depends[i-1].operatingSystem.length; j>0; j--){\n if(!obj.depends[i-1].operatingSystem[j-1].hasOwnProperty('name')) obj.depends[i-1].operatingSystem.splice(j-1, 1);\n }\n if(!obj.depends[i-1].hasOwnProperty('version') && !obj.depends[i-1].hasOwnProperty('packageId') && !obj.depends[i-1].hasOwnProperty('packageSystem')) obj.depends.splice(i-1, 1);\n }\n }\n\n function checkAuthor(){\n for(var i=obj.author.length; i>0; i--){\n for(var j=obj.author[i-1].affiliation.length; j>0; j--){\n if(obj.author[i-1].affiliation[j-1].length == 0) obj.author[i-1].affiliation.splice(j-1, 1);\n }\n if(obj.author[i-1].orcid === \"\") obj.author[i-1].orcid = null;\n if(obj.author[i-1].name === \"\") obj.author[i-1].name = null;\n if(angular.isUndefined(obj.author[i-1].orcid) \n && angular.isUndefined(obj.author[i-1].name) \n && (angular.isUndefined(obj.author[i-1].affiliation) || (obj.author[i-1].affiliation.length == 0))) obj.author.splice(i-1, 1);\n }\n }\n\n function checkPaperLanguage(){\n for(var i=obj.paperLanguage.length; i>0; i--){\n if(obj.paperLanguage[i-1].length == 0) obj.paperLanguage.splice(i-1, 1);\n }\n }\n\n // overwrites empty strings with null on first level of object\n function checkStrings(){\n for(var i in obj){\n if(obj[i] === \"\") obj[i] = null;\n }\n return;\n }\n }", "title": "" }, { "docid": "86726a07b94edceea7577af7061e9c0f", "score": "0.47293073", "text": "_initDeploy() {\n let UPLOAD_REST_URL = `${API.API_URL}/artifact/upload`;\n this.deploySingleUploader = this.artifactoryUploaderFactory.getUploaderInstance(this)\n .setUrl(UPLOAD_REST_URL)\n .setOnSuccessItem(this.onSuccessItem)\n .setOnAfterAddingAll(this.onAfterAddingAll)\n .setOnAfterAddingFile(this.onAfterAddingFile)\n .setOnErrorItem(this.onUploadError)\n .setOnCompleteAll(this.onCompleteAll);\n this._setPathAndFileType(this.node ? this.node.data.path : '');\n this.deploySingleUploader.getUploader().headers = {'X-Requested-With': 'artUI', 'X-ARTIFACTORY-REPOTYPE' : this.deployFile.repoDeploy.repoType};\n }", "title": "" }, { "docid": "fe245218da135955c86edea9b347b5fc", "score": "0.47255862", "text": "function Utility() {}", "title": "" }, { "docid": "4ce3d3fd1b7448e0312aa82d43738899", "score": "0.47184777", "text": "compile() {\n // Build the exports\n const exportObjects = [];\n Object.keys(this.parsed).forEach(name => {\n const compiled = this.compileBranch(this.parsed[name]);\n exportObjects.push(`${name}:${compiled}`);\n });\n // Build aliases\n const aliasConstants = [];\n Object.keys(this._aliases).forEach(name => {\n aliasConstants.push(`${this._aliasMap[name]}=${this._aliases[name]}`);\n });\n // Build the library\n const libNames = [];\n const libFunctions = [];\n Object.keys(this.lib).forEach(name => {\n libNames.push('$' + name);\n libFunctions.push(this.lib[name]);\n });\n // Put it all together\n return [\n `((${libNames.join(',')})=>{`,\n aliasConstants.length ? `const ${aliasConstants.join(',')};` : '',\n `return {${exportObjects.join(',')}}`,\n `})(${libFunctions.join(',')})`\n ].join('');\n }", "title": "" }, { "docid": "c98f89c9fe6c74ccde448da48f881f09", "score": "0.47006485", "text": "function __FACTORY(){}", "title": "" }, { "docid": "96ba7afa36c0d1c59191a0f68dbad803", "score": "0.4698189", "text": "_getArtifactPathSync(name) {\n if (contract_names_1.isFullyQualifiedName(name)) {\n return this._getArtifactPathFromFullyQualifiedName(name);\n }\n const files = this._getArtifactPathsSync();\n return this._getArtifactPathFromFiles(name, files);\n }", "title": "" }, { "docid": "4a4444ebe7e7a069313f60dd64b73a58", "score": "0.46939018", "text": "onSuccessItem(fileDetails, response) {\n if (this.deployFile.repoDeploy.repoType !== 'Maven' && response.unitInfo.artifactType === 'maven') {\n response.unitInfo.artifactType = \"base\";\n }\n response.unitInfo.origArtifactType = response.unitInfo.artifactType;\n response.unitInfo.debianArtifact = response.unitInfo.artifactType==='debian';\n response.unitInfo.mavenArtifact = response.unitInfo.artifactType==='maven';\n response.unitInfo.vagrantArtifact = response.unitInfo.artifactType==='vagrant';\n response.unitInfo.composerArtifact = this.deployFile.repoDeploy.repoType==='Composer' && this.isComposerExtention;\n response.unitInfo.cranArtifact = this.deployFile.repoDeploy.repoType === 'CRAN';\n// response.unitInfo.originalMaven = response.unitInfo.artifactType==='maven';\n\n let tempBundle = this.deployFile.unitInfo ? this.deployFile.unitInfo.bundle : false;\n this.deployFile.unitInfo = response.unitInfo;\n this.deployFile.unitInfo.bundle = tempBundle;\n this.deployFile.unitInfo.type = fileDetails.file.name.substr(fileDetails.file.name.lastIndexOf('.')+1);\n //HA support\n this.deployFile.handlingNode = response.handlingNode;\n this.deployFile.unitConfigFileContent = response.unitConfigFileContent || \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<project xsi:schemaLocation=\\\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\\\" xmlns=\\\"http://maven.apache.org/POM/4.0.0\\\"\\n xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\">\\n <modelVersion>4.0.0</modelVersion>\\n <groupId></groupId>\\n <artifactId></artifactId>\\n <version></version>\\n <description>Artifactory auto generated POM</description>\\n</project>\\n\";\n\n //MavenArtifact causes 'deploy as' checkbox to be lit -> change deployment path according to GAVC\n if (this.deployFile.unitInfo && this.deployFile.unitInfo.mavenArtifact) {\n this.originalDeployPath = this.deployFile.targetPath;\n this.updateMavenTargetPath()\n }\n if (this.deployFile.unitInfo && this.deployFile.unitInfo.debianArtifact) {\n this.originalDeployPath = this.deployFile.targetPath;\n this.updateDebianTargetPath()\n }\n if (this.deployFile.unitInfo && this.deployFile.unitInfo.cranArtifact) {\n this.originalDeployPath = this.deployFile.targetPath;\n if (this.deployFile.unitInfo.type === 'gz') {\n this.deployFile.targetPath = 'src/contrib' + this.deployFile.targetPath;\n }\n }\n if (this.comm) {\n this.needToCancel = true;\n }\n }", "title": "" }, { "docid": "e6ca08dd5b7e597555e4a470414ecc04", "score": "0.46937433", "text": "function Vendor2BuildPlugin() {\n}", "title": "" }, { "docid": "cd9e2f422bb381aa79bc1a2550c5a63b", "score": "0.4676061", "text": "writeTarball(name) {\n /**\n * Example of implementation:\n * const stream = new UploadTarball({});\n return stream;\n */\n }", "title": "" }, { "docid": "c355ec5387d04dd73404853f5a3e224d", "score": "0.46679038", "text": "asset(arg) {\n if (this.props.built[arg]) {\n arg = this.props.built[arg] + this.props.builtTier[arg];\n return arg = `./assets/${arg}.png`;\n // console.log(arg);\n }\n else if (arg === 'HQ') {\n if (this.props.capitalTier === 1) {\n arg = 'HQTent';\n }\n else if (this.props.capitalTier >= 2) {\n arg = `HQTentT${this.props.capitalTier}`;\n }\n return arg = `./assets/${arg}.png`;\n }\n else {\n return arg = './assets/default.png';\n }\n }", "title": "" }, { "docid": "5e6ff56369c5d4d44876a9ca024d4681", "score": "0.4665508", "text": "function libraryVersion() {\n return \"1.3.3\";\n}", "title": "" }, { "docid": "9f41542769d8a6d10183406e4c174040", "score": "0.46636787", "text": "function deriveRepositoryCode(rs) {\n if(!rs) {\n throw Error('a repository source object should be suplied');\n }\n\n var repositoryCode = rs.repository ? rs.repository.code : rs.repositoryCode;\n\n if(!repositoryCode || !repositoryCode.length) {\n throw Error('a repository code should be able to be extracted from the repository source');\n }\n\n return repositoryCode;\n }", "title": "" }, { "docid": "600ec276ca6549fb793a827386771833", "score": "0.4661894", "text": "function Rd(a){return a&&a.ub?a.cb():a}", "title": "" }, { "docid": "1652a985faf6005b25729d4c57740664", "score": "0.4656111", "text": "load () { return {} }", "title": "" }, { "docid": "3d9749c8c194c05c59180b0b95c2a7d8", "score": "0.4655687", "text": "function\na0ref_make_2308_(a2x1)\n{\nlet xtmp4;\nlet xtmp5;\n;\n{\n{\n// /home/hwxi/Research/ATS-Xanadu/prelude/DATS/CATS/JS/prelude.dats: 6993(line=423, offs=1) -- 7044(line=425, offs=35)\n// { // val-binding\n// } // val-binding\nconst // implval/fun\na0ptr_make_2347_ = XATS2JS_a0ptr_make\n;\nxtmp5 = a0ptr_make_2347_(a2x1);\n}\n;\nxtmp4 = XATS2JS_fcast(xtmp5);\n}\n;\nreturn xtmp4;\n}", "title": "" }, { "docid": "5098ec150e3f0d20c7bb1ed46e5df380", "score": "0.4653535", "text": "function e549285() { return 'ar '; }", "title": "" }, { "docid": "6d07fef94b4085ebba9aa3cde8304f55", "score": "0.4644574", "text": "function src_noop() {}", "title": "" }, { "docid": "6d07fef94b4085ebba9aa3cde8304f55", "score": "0.4644574", "text": "function src_noop() {}", "title": "" }, { "docid": "08ffdcbb1b297bfa3d639837f1c0ad11", "score": "0.464403", "text": "getTypeshedPathEx(execEnv, importFailureInfo) {\n return void 0;\n }", "title": "" }, { "docid": "ce4a970b9eef7e592d219961b5fbbe81", "score": "0.46424565", "text": "getHeaderIconSRC() {}", "title": "" }, { "docid": "06445cec8a474fc0d2935e5551384a23", "score": "0.4640425", "text": "function buildArtifacts()\n{\n\tvar artifact = \"Knight's Shield,Artifact1,0,GoldBoss,1.00,0.6,0.7,1.5/\\\nAmulet of the Valrunes,Artifact2,0,GoldMinion,0.10,0.5,0.7,2/\\\nDark Cloak of Life,Artifact3,25,BossLife,-0.02,0.3,0.5,2/\\\nDeath Seeker,Artifact4,25,CritChance,0.02,0.3,0.5,2/\\\nSavior Shield,Artifact5,25,BossTime,0.10,0.3,0.5,1.7/\\\nOverseer's Lotion,Artifact6,10,SkillConstantDamageCD,-0.05,0.7,0.4,1.5/\\\nSacred Scroll,Artifact7,10,SkillCriticalChanceBoostCD,-0.05,0.7,0.4,1.5/\\\nHunter's Ointment,Artifact8,10,SkillHeroesAttackSpeedIncreaseCD,-0.05,0.7,0.4,1.5/\\\nLaborer's Pendant,Artifact9,10,SkillTapGoldCD,-0.05,0.7,0.7,1.5/\\\nBarbarian's Mettle,Artifact10,10,SkillTapDamageIncreaseCD,-0.05,0.7,0.4,1.5/\\\nSaintly Shield,Artifact11,10,SkillBurstDamageCD,-0.05,0.7,0.3,1.5/\\\nOgre's Gauntlet,Artifact12,0,SkillConstantDamageDuration,0.10,0.7,0.5,1.7/\\\nParchment of Importance,Artifact13,0,SkillCriticalChanceBoostDuration,0.10,0.7,0.5,1.7/\\\nUniversal Fissure,Artifact14,0,SkillHeroesAttackSpeedIncreaseDuration,0.10,0.7,0.5,1.7/\\\nRing of Opulence,Artifact15,0,SKillTapGoldDuration,0.10,0.7,0.7,1.7/\\\nAxe of Resolution,Artifact16,0,SkillTapDamageIncreaseDuration,0.10,0.7,0.5,1.7/\\\nHero's Thrust,Artifact17,0,CritDamageArtifact,0.20,0.3,0.7,1.7/\\\nCrown Egg,Artifact18,0,TreasureChance,0.20,0.4,1,1.5/\\\nChest of Contentment,Artifact19,0,GoldTreasureArtifact,0.20,0.4,1,1.5/\\\nFuture's Fortune,Artifact20,0,GoldAll,0.05,0.3,0.7,2/\\\nDivine Chalice,Artifact21,0,Gold10xChance,0.01,0.3,0.7,1.7/\\\nUnread Aura,Artifact22,0,PrestigeRelic,0.05,0.3,0.7,2/\\\nWarrior's Revival,Artifact23,10,ReviveTime,-0.05,0.7,1,2.2/\\\nRing of Wonderous Charm,Artifact24,25,AllUpgradeCost,-0.02,0.3,0.5,1.7/\\\nWorldly Illuminator,Artifact25,5,MonstersRequiredToAdvance,-1.00,3,0.5,3/\\\nTincture of the Maker,Artifact26,0,ArtifactDamageBoost,0.05,0.1,0.6,2.5/\\\nCrafter's Elixir,Artifact27,0,GoldOnline,0.15,0.4,0.5,1.8/\\\nOuterworldly Armor,Artifact28,10,HeroDeathChance,-0.05,0.7,1,2.2/\\\nDrunken Hammer,Artifact29,0,TapDamageArtifact,0.05,0.3,0.5,1.7\"\n\tvar artifact_temp = artifact.split(\"/\");\n\tArtifactInfo = [];\n\tfor (var x = 0; x < artifact_temp.length; x++) \n\t{\n\t\t//alert(artifact_temp[x]);\n\t\tvar temp = artifact_temp[x].split(\",\");\n\t\t//alert(temp[0]);\n\t\tArtifactInfo.push({name: temp[0], maxLevel: temp[2], bonusType: temp[3], bonusPerLevel: temp[4], DamageBonus: temp[5], CostCoEff: temp[6], CostExpo: temp[7], artifactID: temp[1], level: 0});\n\t}\n\t//$(\"#artifacttable\").append(\"<tr><th>Artifact</th><th>Max Level</th><th>Bonus Type</th><th>Bonus Strength</th><th>Damage Bonus</th><th>Upgrade Cost</th><th>Level</th></tr>\");\n\t$(\"#artifacttable\").append(\"<tr><th>Artifact</th><th>Bonus Type</th><th>Bonus Strength</th><th>Damage Bonus</th><th>Upgrade Cost</th><th>Level</th></tr>\\n\");\n\tfor (var y = 0; y < ArtifactInfo.length; y++)\n\t{\n\t\tvar tr2 = ArtifactInfo[y].targetBox = $(\"<tr></tr>\");\n\t\ttr2.append($(\"<td></td>\").append(ArtifactInfo[y].name).attr(\"id\", ArtifactInfo[y].artifactID+\"name\"));\n\t\ttr2.append($(\"<td></td>\").append(ArtifactInfo[y].bonusType).attr(\"id\", ArtifactInfo[y].artifactID+\"bonusType\").attr(\"style\", \"font-size:10px\"));\n\t\ttr2.append($(\"<td></td>\").append(ArtifactInfo[y].bonusPerLevel*100+\"%\").attr(\"id\", ArtifactInfo[y].artifactID+\"artifactBonus\"));\n\t\ttr2.append($(\"<td></td>\").append(ArtifactInfo[y].DamageBonus*100+\"%\").attr(\"id\", ArtifactInfo[y].artifactID+\"DamageBonus\"));\n\t\ttr2.append($(\"<td></td>\").append(getArtifactUpgradeCost(ArtifactInfo[y])).attr(\"id\", ArtifactInfo[y].artifactID+\"upgradeCost\"));\n\t\tif (ArtifactInfo[y].maxLevel > 0)\n\t\t{ tr2.append($(\"<td></td>\").append($(\"<input></input>\").attr(\"type\", \"text\").val(0).attr(\"id\", ArtifactInfo[y].artifactID+\"level\")).append(\"/\" + ArtifactInfo[y].maxLevel)); } \n\t\telse\n\t\t{ tr2.append($(\"<td></td>\").append($(\"<input></input>\").attr(\"type\", \"text\").val(0).attr(\"id\", ArtifactInfo[y].artifactID+\"level\"))); }\n\t\t$(\"#artifacttable\").append(tr2);\n\t}\n}", "title": "" }, { "docid": "87afe3f67b13320be63e49c783cbd6b0", "score": "0.4637826", "text": "function forLooopEX2(){\n\n}", "title": "" }, { "docid": "734979a6d2aaf19396bcbdf4b39b59fd", "score": "0.46369258", "text": "async download() {\n return await this.subway.bundle({\n entry: this.subway.entry,\n\n //\n // As we're using `eval` to evaluate the code we want to make sure that\n // the evaluated code has the correct line numbers, so we need to inline\n // the sourcemaps.\n //\n inlineSourceMap: true,\n\n //\n // runModule, nope, we want absolute control over the execution so we\n // do not want to run the modules automatically when it's evaluated\n //\n runModule: false\n });\n }", "title": "" }, { "docid": "7fe5602adb47df5f3d4af72c2e7a6bf3", "score": "0.4634327", "text": "libraryIdent() {\n\t\tthrow Error('not implemented');\n\t}", "title": "" }, { "docid": "f1abbae64af6b85200e2769339c63483", "score": "0.46286598", "text": "function intermediate() {}", "title": "" }, { "docid": "5412cbec186d84761f7c0bb74ddbad34", "score": "0.46248785", "text": "function __func(){}", "title": "" }, { "docid": "bd6b72f87a825db797d525370218d341", "score": "0.4624007", "text": "get Package() {}", "title": "" }, { "docid": "bd6b72f87a825db797d525370218d341", "score": "0.4624007", "text": "get Package() {}", "title": "" }, { "docid": "59d3beeaa84f482085e491e2542c80f9", "score": "0.46235448", "text": "constructor() {\n\t\t//\n\t}", "title": "" }, { "docid": "fcb04715759b506572235b15f3a6bd18", "score": "0.46195292", "text": "get srcEcu() { return this.data[6]; }", "title": "" }, { "docid": "aa02566922a43c52bcf3b10a5b46748f", "score": "0.46162668", "text": "function Util() {\n}", "title": "" }, { "docid": "03d1e6b5377444a4c9758edf8dbf3022", "score": "0.4615777", "text": "static npminstall ( name, version, scope ) {\n\n }", "title": "" }, { "docid": "838364c462611f43162b2810eff462dd", "score": "0.4613428", "text": "get PrefBranch() { return \"extensions.thumbnailzoomplus.\"; }", "title": "" }, { "docid": "956e9cd89d398072c29d610ac8302528", "score": "0.46103516", "text": "function Packing(){\n}", "title": "" }, { "docid": "705e6fc1b1ed3eb49809f0460ddf6ea3", "score": "0.46069023", "text": "createUrl(e){//var parsedUrl = new Url(url);\n//var mimeType = mime.lookup(parsedUrl.filename);\nlet t=this.type;return this.render(e).then((e)=>new Blob([e],{type:t})).then((e)=>this.settings.replacements&&'base64'===this.settings.replacements?A(e).then((e)=>k(e,t)):v(e,t)).then((e)=>(this.originalHref=this.href,this.href=e,this.unload(),e))}", "title": "" }, { "docid": "18e0fc5a598745525f094cfddf0fb5af", "score": "0.46030903", "text": "function i(){throw new Error(\"Dynamic requires are not currently supported by rollup-plugin-commonjs\")}", "title": "" }, { "docid": "305649445282c25e2723c1192dda08b4", "score": "0.46028173", "text": "get itself () { return System.get(System.decanonicalize('lively.modules/index.js')); }", "title": "" }, { "docid": "9ee87220880f2da86fd44ea3e947340a", "score": "0.46012264", "text": "async extract() { throw NotImplementedError() }", "title": "" }, { "docid": "58b7736f7b1ca0038cbd967fe21188c6", "score": "0.4599939", "text": "function Res(){var $2k5={t:'u',l:[{t:m$2jq.$_String},{t:m$2jq.Integer},{t:m$2jq.$_Boolean},{t:Buffer},{t:$_Error},{t:Stream},{t:Promise},{t:m$2jq.$_Object},{t:m$2jq.Sequential,a:{Element$Sequential:{t:m$2jq.Anything}}}]};$2k5.$crtmm$=function(){return{mod:$CCMM$,pa:1,d:['io.node.hapi','Res']};};return $2k5;}", "title": "" }, { "docid": "7dc08d6755e35c9be68d8554a0c2d8df", "score": "0.45948446", "text": "exportInternalScripts(directory) {\n var cScripts = this.html('script');\n\n cScripts.each((index, cScriptElement) => {\n if (cScriptElement.attribs[\"src\"]) { return; } /* skip external */\n\n /* If the type attribute is set it should be valid for JS */\n var scriptType = cScriptElement.attribs[\"type\"];\n if (scriptType && !VALID_JS_TYPES.includes(scriptType)) { return; }\n \n /* Store the inline script into a local file */\n var inlineScriptContent = cheerio(cScriptElement).html();\n var randomFileName = \"exported_\" + getRandomFilename(6) + \".js\";\n var relativeFilePath = path.join(lacunaSettings.LACUNA_OUTPUT_DIR, randomFileName); /* relative to the project */\n var filePath = path.join(directory, relativeFilePath); /* relative to pwd */\n fs.writeFileSync(filePath, inlineScriptContent);\n\n /* Since the lacuna_cache resides at the framework directory level, references should take it into account */\n var relativePathDifference = path.relative(directory, entryFile);\n var numberOfNestedDirectories = relativePathDifference.split(\"/\").length - 1; // counts the number of directories between the directory and the entry file\n var relDirFix = \"../\".repeat(numberOfNestedDirectories);\n\n /* Update the reference */\n var oldReference = this.html.html(cScriptElement);\n var newReference = `<script src=\"${path.join(relDirFix, relativeFilePath)}\"></script>`;\n this.updateCode(oldReference, newReference);\n this.saveFile();\n\n\n \n });\n }", "title": "" }, { "docid": "82f67f7246f150997a41fb5c5e9d5f30", "score": "0.45897457", "text": "completeTransform() {\n\t\tthrow new Error(\"This method is abstract and should be implemented\");\n\t}", "title": "" }, { "docid": "ca7e030a166b1aa263567eeea2b87587", "score": "0.45871237", "text": "static GetTransforms() {}", "title": "" }, { "docid": "47c38b917c9abb3e22a26f3251e8e135", "score": "0.45868734", "text": "function\na0ref_make_2308_(a2x1)\n{\nlet xtmp9;\nlet xtmp10;\n;\n{\n{\n// /home/hwxi/Research/ATS-Xanadu/prelude/DATS/CATS/JS/prelude.dats: 6993(line=423, offs=1) -- 7044(line=425, offs=35)\n// { // val-binding\n// } // val-binding\nconst // implval/fun\na0ptr_make_2347_ = XATS2JS_a0ptr_make\n;\nxtmp10 = a0ptr_make_2347_(a2x1);\n}\n;\nxtmp9 = XATS2JS_fcast(xtmp10);\n}\n;\nreturn xtmp9;\n}", "title": "" }, { "docid": "35bc927270357de8f0f61cb1020a37c1", "score": "0.45862803", "text": "static complexCombined2(media) {\n\t\treturn; //your solution...\n\t}", "title": "" }, { "docid": "bd998c5b2cdfd6120c55cd893a463bcc", "score": "0.4582948", "text": "function Package()\n{\n}", "title": "" }, { "docid": "d6055f432c67837810eb70ada707c3e8", "score": "0.45782912", "text": "getPublicImageFilename(data) { }", "title": "" }, { "docid": "ea8880fabddc37f80550a9bc76a8c92e", "score": "0.45733288", "text": "apply() {\n\n }", "title": "" }, { "docid": "66a1a9606506da666bb0e619fe52b60d", "score": "0.45733222", "text": "function M(){function e(e){t.Extends(m,e),i(e.jQuery),t._base.name(\"Zambezi\"),n=t._base,a=n.config}function i(e){r=e,o=e}var t=new j(this);this.LocalSVNRevision=\"$Rev: 3172 $\";{var n,a,r,o;t.Override(\"buildHtml\",function(){var e='<div id=\"{{id}}\" class=\"walkme-direction-{{direction}} walkme-player walkme-zambezi walkme-theme-{{theme}} walkme-position-major-{{positionMajor}} walkme-position-minor-{{positionMinor}} {{accessibleClass}}\"></div>',i=n.mustache().to_html(e,{id:n.id(),direction:a().Direction,positionMajor:n.positionMajor(),positionMinor:n.positionMinor(),theme:a().TriangleTheme,accessibleClass:n.accessibleClass()});return i})}e.apply(null,arguments)}", "title": "" }, { "docid": "41ac0ee7df05b9fb9b7deee80a0c4dd5", "score": "0.45704085", "text": "function $64244302c3013299$export$dd0bbc9b26defe37(name) {\n switch(name){\n case \"buddhist\":\n return new (0, $8d73d47422ca7302$export$42d20a78301dee44)();\n case \"ethiopic\":\n return new (0, $b956b2d7a6cf451f$export$26ba6eab5e20cd7d)();\n case \"ethioaa\":\n return new (0, $b956b2d7a6cf451f$export$d72e0c37005a4914)();\n case \"coptic\":\n return new (0, $b956b2d7a6cf451f$export$fe6243cbe1a4b7c1)();\n case \"hebrew\":\n return new (0, $7c5f6fbf42389787$export$ca405048b8fb5af)();\n case \"indian\":\n return new (0, $82c358003bdda0a8$export$39f31c639fa15726)();\n case \"islamic-civil\":\n return new (0, $f2f3e0e3a817edbd$export$2066795aadd37bfc)();\n case \"islamic-tbla\":\n return new (0, $f2f3e0e3a817edbd$export$37f0887f2f9d22f7)();\n case \"islamic-umalqura\":\n return new (0, $f2f3e0e3a817edbd$export$5baab4758c231076)();\n case \"japanese\":\n return new (0, $62225008020f0a13$export$b746ab2b60cdffbf)();\n case \"persian\":\n return new (0, $f3ed2e4472ae7e25$export$37fccdbfd14c5939)();\n case \"roc\":\n return new (0, $5f31bd6f0c8940b2$export$65e01080afcb0799)();\n case \"gregory\":\n default:\n return new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)();\n }\n}", "title": "" }, { "docid": "2139132923e6fe5b697bd006959f498d", "score": "0.4568843", "text": "async function deploy(artifact, arguments, opts) {\n const web3 = getWeb3();\n const from = (await web3.eth.getAccounts())[0];\n const data = artifact.compilerOutput.evm.bytecode.object;\n const abi = artifact.compilerOutput.abi;\n const Contract = new web3.eth.Contract(abi, null, { data });\n const gasPrice = 1e9;\n const instance = await Contract.deploy({ arguments })\n .send({ from, gasPrice, ...opts });\n const address = instance.options.address;\n const network = await web3.eth.net.getId();\n save(network, address);\n console.log(address);\n}", "title": "" }, { "docid": "e2329a25e62e3100d9db7597f4de49a2", "score": "0.45541415", "text": "function setup() {}", "title": "" }, { "docid": "45ac07618e276d9f7c61e9ed09c5dece", "score": "0.45538157", "text": "function somePackageGlobalLazyConst_(){return( {});}", "title": "" } ]
26b91769c6ce937a222d88b3d0794aa3
Creates a rectangle object.
[ { "docid": "93766a53a5aeb54dbf5e9bfcb9db84e5", "score": "0.0", "text": "function s(e,t,r,n){return{x:e,y:t,width:r,height:n}}", "title": "" } ]
[ { "docid": "6059e3e310311360a6da1f587406120b", "score": "0.8172097", "text": "function Rectangle(left, top, width, height) {\n this.left = left;\n this.top = top;\n this.width = width;\n this.height = height;\n }", "title": "" }, { "docid": "5006656de81d87d6ef3be2b0eeed9b66", "score": "0.8132666", "text": "function Rectangle (width, height) { Shape.call(this, width, height); }", "title": "" }, { "docid": "6f9fe5655b7ea0c5745081dc6e2c9bd3", "score": "0.8056555", "text": "function rectangle(x, y, w, h)\r\n{\r\n this.internal_is_a_rectangle = true;\r\n\r\n this.x = x;\r\n this.y = y;\r\n this.w = w;\r\n this.h = h;\r\n}", "title": "" }, { "docid": "3cdd334526826b855598f698da2ea01e", "score": "0.8036314", "text": "function Rectangle(width, height) {\n\tthis.width = width;\n\tthis.height = height;\n}", "title": "" }, { "docid": "5a7724024c94f09200971d7b52457f9b", "score": "0.80292755", "text": "function Rectangle(width, height) {\n this.width = width;\n this.height = height;\n}", "title": "" }, { "docid": "7c15f971371b2ea03a60a59cb7e56c5c", "score": "0.8005742", "text": "function newRectangle(x, y, width, height) {\n var result = newSvgNode(\"rect\");\n result.x.baseVal.value = x;\n result.y.baseVal.value = y;\n result.width.baseVal.value = width;\n result.height.baseVal.value = height;\n return result;\n }", "title": "" }, { "docid": "d9643a1e3467105fc1074a2970ca1f81", "score": "0.80046177", "text": "function Rectangle(left, top, right, bottom) {\n\tthis.init(new Point((left || 0), (top || 0)),\n\t\t\tnew Point((right || 0), (bottom || 0)));\n}", "title": "" }, { "docid": "5518e6f40f5198e95bafb32669dbe55c", "score": "0.7969249", "text": "function Rectangle(width, height) {\n this.height = height;\n this.width = width;\n}", "title": "" }, { "docid": "5e75a7b62eb925de7cf3c7beaaa4468a", "score": "0.7873903", "text": "function Rectangle(width, height) {\n this.width = width;\n this.height = height;\n this.width = width;\n this.height = height;\n }", "title": "" }, { "docid": "71365698148a7b44e82ff0a70704c377", "score": "0.78729457", "text": "function Rectangle() {\n this.x = 0;\n this.y = 0;\n this.width = 95;\n this.height = 20;\n this.color = 0;\n\n this.draw = function () {\n fill(this.color);\n rect(this.x, this.y, this.width, this.height);\n }\n}", "title": "" }, { "docid": "fedd95c6cf9e2f7776aaa9c86842b61c", "score": "0.78597486", "text": "function Rectangle (x, y, width, height) {\n Shape.call(this, x, y); // call \"super\" constructor\n this.width = width;\n this.height = height;\n}", "title": "" }, { "docid": "1a90a6ac3fb35c9b038ae450b2ec91aa", "score": "0.7845247", "text": "function Rectangle() {\n var _this = _super.call(this) || this;\n _this.className = \"Rectangle\";\n _this.element = _this.paper.add(\"rect\");\n _this.pixelPerfect = true;\n _this.applyTheme();\n return _this;\n }", "title": "" }, { "docid": "d188790f527747118baa9e295fc347b1", "score": "0.7824726", "text": "function Rectangle(x, y, w, h) {\n this.x = x;\n this.y = y;\n this.w = w;\n this.h = h;\n}", "title": "" }, { "docid": "ca2a5eb3481139836eb53c86c33f65b4", "score": "0.7817764", "text": "function Rectangle() {\r\n var _this = _super.call(this) || this;\r\n _this.className = \"Rectangle\";\r\n _this.element = _this.paper.add(\"rect\");\r\n //this.pixelPerfect = false;\r\n _this.applyTheme();\r\n return _this;\r\n }", "title": "" }, { "docid": "2597be4199a1dece2b21884c1fd87cf2", "score": "0.77631366", "text": "function Rectangle(x, y, w, h) {\n this.x = x;\n this.y = y;\n this.width = w;\n this.height = h;\n}", "title": "" }, { "docid": "1a0aa60696142e94e33b1b35ccd28775", "score": "0.76403254", "text": "function Rectangle(width, height) {\n this.width = width;\n this.height = height;\n this.area = RECTANGLE.area.call(this);\n this.perimeter = RECTANGLE.perimeter.call(this);\n}", "title": "" }, { "docid": "609349e6a763cba04105c1612855c05c", "score": "0.76249444", "text": "function Rectangle() {\n this.bounds = {};\n this.fill = {\n color: '#DE0014',\n opacity: 0.2\n };\n this.stroke = {\n color: '#DE0014',\n weight: 3,\n opacity: 1.0\n };\n this.editable = true;\n this.dragabble = true;\n this.visible = true;\n this.events = {\n 'bounds_changed': function() {\n \n }\n };\n this.control = {};\n }", "title": "" }, { "docid": "05257d9314a3d9723b02ac192765f7b2", "score": "0.75686705", "text": "function Rectangle(sketch, x, y, w, h) {\n this.sketch = sketch;\n this.x = x;\n this.w = w;\n this.y = y;\n this.h = h;\n}", "title": "" }, { "docid": "c0d6e073d7f235dcdc57c2267ee5048f", "score": "0.7559057", "text": "function _createRectangle( x, y, width, height, title, id, group ) {\n if ( _debug ) {\n console.log( '------------------------------' );\n console.log( 'Overlays _createRectangle: x - ' + x );\n console.log( 'Overlays _createRectangle: y - ' + y );\n console.log( 'Overlays _createRectangle: width - ' + width );\n console.log( 'Overlays _createRectangle: height - ' + height );\n console.log( 'Overlays _createRectangle: title - ' + title );\n console.log( 'Overlays _createRectangle: id - ' + id );\n console.log( 'Overlays _createRectangle: group - ' + group );\n console.log( '------------------------------' );\n }\n \n x = _scaleToImageSize( x );\n y = _scaleToImageSize( y );\n width = _scaleToImageSize( width );\n height = _scaleToImageSize( height );\n var rectangle = osViewer.viewer.viewport.imageToViewportRectangle( x, y, width, height );\n var overlay = {\n type: osViewer.overlays.overlayTypes.RECTANGLE,\n rect: rectangle,\n group: group,\n id: id,\n title: title\n };\n var overlayStyle = _defaults.getOverlayGroup( overlay.group );\n if ( !overlayStyle.hidden ) {\n _drawOverlay( overlay );\n }\n _overlays.push( overlay );\n \n }", "title": "" }, { "docid": "b7721dea42490bcaad0bfbbe53de1604", "score": "0.75535715", "text": "function Rectangle(id, x, y, width, height, fill, stroke, strokeWidth, rx, ry) {\n\t// create a new SVG rect element\n var r = createElement(SVG,\"rect\");\n\t// set the attributes using the object approach\n\tr.setAttribute(\"id\", id);\n\tr.setAttribute(\"x\", x);\n\tr.setAttribute(\"y\", y);\n\tr.setAttribute(\"width\", width);\n\tr.setAttribute(\"height\", height);\n\tr.setAttribute(\"fill\", fill);\n\t\n\t// set default params\n\tif(stroke != null) { r.setAttribute(\"stroke\", stroke); }\n\tif(strokeWidth != null) { r.setAttribute(\"stroke-width\", strokeWidth); }\n\tif(rx != null) { r.setAttribute(\"rx\", rx); }\n\tif(ry != null) { r.setAttribute(\"ry\", ry); }\n\treturn r;\n}", "title": "" }, { "docid": "9a5a5d8797e5f7d9bb6f32820d871314", "score": "0.75510293", "text": "function createRect(width, height) {\n let rect = {\n width: width,\n height: height,\n area() {\n return this.width * this.height;\n },\n\n //The compareTo() method compares two strings lexicographically. The comparison is based on the Unicode value of each character in the strings. The method returns 0 if the string is equal to the other string.\n\n //this literally compares the other ones. \n compareTo(other) {\n return this.area() - other.area() || this.width - other.width;\n }\n };\n return rect;\n }", "title": "" }, { "docid": "d247d81a6afd0959ea35c9d9ebfdc932", "score": "0.7523666", "text": "function createRect() {\n graphEditor.getInteractionHandler().setActiveInteraction(new JSG.graph.interaction.CreateNodeInteraction(new JSG.graph.model.shapes.RectangleShape()));\n}", "title": "" }, { "docid": "bc7028ccbc685964bc602033a270ea1a", "score": "0.751804", "text": "function Rectangle(width, heigth, length) {\n CalcShape.call(this, width, heigth);\n this.length = length;\n}", "title": "" }, { "docid": "c00bdbf0c627a19c4a319c390ee383d6", "score": "0.750171", "text": "function rectConstructor(leftX, topY, width, height, color){\n canvasContext.fillStyle = color;\n canvasContext.fillRect(leftX, topY, width, height);\n}", "title": "" }, { "docid": "2e423759829ea2fd7f54ca6a6dc88ea5", "score": "0.74818283", "text": "function Rectangle(a, b) {\n var object = {\n length: a,\n width: b,\n perimeter: 2 * (a + b),\n area: a * b\n };\n return object;\n}", "title": "" }, { "docid": "e8d928dc1671536cb4d6f005bff6bf40", "score": "0.74660146", "text": "function Rect(height, width){\n this.height = height;\n this.width = width;\n}", "title": "" }, { "docid": "0756d31c3fcfd2c48a5e6fa232a64648", "score": "0.74281466", "text": "function Rectangle( content , width , height , color , pos) {\n this.content = content ;\n this.width = width ;\n this.height = height;\n this.color = color ;\n this.pos = pos ;\n this.pos.bottom = pos.top + height ;\n this.pos.right = pos.left + width ;\n }", "title": "" }, { "docid": "95d1e92ec4ade9ac94b99ff22331777b", "score": "0.7411415", "text": "function Rectangle(x, y, w, h)\n{\r\n var that = this;\r\n that.x = 0;\r\n that.y = 0;\r\n that.width = 0;\r\n that.height = 0;\r\n that.set = function (x, y, w, h) { that.x = x; that.y = y; that.width = w; that.height = h; }\r\n that.set(x, y, w, h);\r\n}", "title": "" }, { "docid": "2f9e4f3f0cc438b09d64cb647fce6f8e", "score": "0.74034923", "text": "function Rectangle() {\n _classCallCheck(this, Rectangle);\n\n this.left = -Infinity;\n this.right = Infinity;\n this.bottom = -Infinity;\n this.top = Infinity;\n }", "title": "" }, { "docid": "2f9e4f3f0cc438b09d64cb647fce6f8e", "score": "0.74034923", "text": "function Rectangle() {\n _classCallCheck(this, Rectangle);\n\n this.left = -Infinity;\n this.right = Infinity;\n this.bottom = -Infinity;\n this.top = Infinity;\n }", "title": "" }, { "docid": "5523de8cd4b16c4adc004466f0937fce", "score": "0.73814905", "text": "function Rectangle(width, height) {\n this.width = width;\n this.height = height;\n this.getArea = function() {\n return this.width * this.height;\n };\n}", "title": "" }, { "docid": "365a2c1535f4adb2052e71a96ce2ef71", "score": "0.7376546", "text": "function Rect(x, y, width, height){\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n }", "title": "" }, { "docid": "04010e35c197a07dff6521f861293e14", "score": "0.73567283", "text": "function Rectangle (height, width){\n this.height = height;\n this.width = width;\n this.draw = function () {\n console.log ('Drawn Rectangle', height, width);\n }\n return this; // Is not necessary but explicitly makes it clear\n}", "title": "" }, { "docid": "46d84afbbb4348f9bd9bf8ee1cdcff9d", "score": "0.73387176", "text": "function rectangle(width, height, x, y) {\r\n if (!_utils_Type__WEBPACK_IMPORTED_MODULE_1__[\"isNumber\"](x)) {\r\n x = 0;\r\n }\r\n if (!_utils_Type__WEBPACK_IMPORTED_MODULE_1__[\"isNumber\"](y)) {\r\n y = 0;\r\n }\r\n return moveTo({ x: x, y: y }) + lineTo({ x: x + width, y: y }) + lineTo({ x: x + width, y: y + height }) + lineTo({ x: x, y: y + height }) + closePath();\r\n}", "title": "" }, { "docid": "85aea457688ec9875bbf18567a51da73", "score": "0.72300524", "text": "makeShape(){\n rect(this.x, this.y, this.w, this.w);\n }", "title": "" }, { "docid": "d1db6d69f80ea84f451ea4b3390a4071", "score": "0.7218591", "text": "function Rectangles(a, b) {\n this.a = a;\n this.b = b;\n}", "title": "" }, { "docid": "66391c248ce014883d8410b21172c9c4", "score": "0.71863127", "text": "static rect(x, y, width, height) {\n return b2(x, y, x + width, y + height);\n }", "title": "" }, { "docid": "7a236c35347738721eabc41500d06a11", "score": "0.71702546", "text": "function mxRectangleShape(bounds, fill, stroke, strokewidth)\n{\n\tthis.bounds = bounds;\n\tthis.fill = fill;\n\tthis.stroke = stroke;\n\tthis.strokewidth = (strokewidth != null) ? strokewidth : 1;\n}", "title": "" }, { "docid": "f294a3bdbf863085bb75f12263b1e66f", "score": "0.71273065", "text": "function Rect (top, left, bottom, right)\r\n{\r\n this.top = top;\r\n this.left = left;\r\n this.bottom = bottom;\r\n this.right = right;\r\n\r\n this.Set = function (top, left, bottom, right)\r\n {\r\n this.top = top;\r\n this.left = left;\r\n this.bottom = bottom;\r\n this.right = right;\r\n }\r\n\r\n this.Shrink = function (margin)\r\n {\r\n this.top += margin;\r\n this.left += margin;\r\n this.bottom -= margin;\r\n this.right -= margin;\r\n }\r\n\r\n this.Width = function ()\r\n {\r\n return this.right - this.left;\r\n }\r\n\r\n this.Height = function ()\r\n {\r\n return this.bottom - this.top;\r\n }\r\n\r\n this.Area = function ()\r\n {\r\n return this.Width () * this.Height ();\r\n }\r\n\r\n this.MidX = function ()\r\n {\r\n return this.left + (this.Width () / 2);\r\n }\r\n\r\n this.MidY = function ()\r\n {\r\n return this.top + (this.Height () / 2);\r\n }\r\n}", "title": "" }, { "docid": "12d5e20e72a04adc84f5b4841c93eb5d", "score": "0.71137226", "text": "function createRect(rect) {\n return {\n left: Math.min(rect[0][0], rect[1][0]),\n right: Math.max(rect[0][0], rect[1][0]),\n bottom: Math.min(rect[0][1], rect[1][1]),\n top: Math.max(rect[0][1], rect[1][1])\n }\n}", "title": "" }, { "docid": "f6d3a18e78960bc509c4d08591b5bcef", "score": "0.7107242", "text": "function Rectangle(){\n this.label = \"0\";\n this.conteneur;\n this.reference;\n this.p1;//coin(haut,droit)\n this.p2;//coin(haut, gauche)\n this.p3;//coin(bas, droit)\n this.p4;//coin(bas, gauche)\n this.bordSup;//top\n this.bordInf;//top+height\n this.bordGauche;//\n this.bordDroit;//\n this.height;\n this.width = 0;\n this.weight = 0;\n}", "title": "" }, { "docid": "3bb25eed61c23d004cf4015208116f67", "score": "0.7095699", "text": "function Rectangle(a, b) {\n this.length=a; \n this.width=b; \n this.perimeter=(2*this.length)+(2*this.width);\n this.area=this.length*this.width; \n}", "title": "" }, { "docid": "976b48587d5237b88999d59460f6167d", "score": "0.70143324", "text": "function Rect (h, col) { //creates a rect object with height and colour\n this.h = h;\n this.col = col;\n}", "title": "" }, { "docid": "94d4eb2c3b32507f5b7b7284f2293b50", "score": "0.69807744", "text": "function Rectangle (w, h) {\n if (w > 0 && h > 0) {\n this.width = w;\n this.height = h;\n }\n\n this.print = function () {\n for (let x = 0; x < this.height; x++) {\n console.log(('X').repeat(this.width));\n }\n };\n\n this.rotate = function () {\n [this.width, this.height] = [this.height, this.width];\n };\n\n this.double = function () {\n this.width *= 2;\n this.height *= 2;\n };\n}", "title": "" }, { "docid": "1df3f076fdcb7fad8c69da662855303d", "score": "0.6974018", "text": "createRect() {\n //every 10 raindrops, the color will go up\n if(counter >= 10 && counter % 10 == 0) {\n this.color ++;\n }\n //this makes it so only the blue part of rgb increases\n fill('rgb(10%, 10%,' + this.color + '%)');\n //created a new rectangle with p5\n rect(this.x, this.y, this.width, this.height);\n }", "title": "" }, { "docid": "8b725206ce2c5d009e5b2949e81f83c6", "score": "0.6954313", "text": "function OldRectangles(width, height) {\n this.width = width;\n this.height = height;\n}", "title": "" }, { "docid": "16c7faf90c53858cc4ea18f46aa35390", "score": "0.69409025", "text": "function Rect()\n{\n // members\n this.name;\n\tthis.x;\n\tthis.y;\n\tthis.width;\n\tthis.height;\n\tthis.hImage;\n\tthis.frame;\n\tthis.currentFrame;\n\t\n\t// methods\n this.setRect = setRect; //add an item\n\tthis.getNextFrame = getNextFrame; //get next frame\n}", "title": "" }, { "docid": "f8f99089d895a43c83568d5c37e5c3eb", "score": "0.6939649", "text": "function Rectangle(height, width) {\n this.area = function () { return height * width };\n this.perimeter = function () { return 2 * (height + width) };\n}", "title": "" }, { "docid": "38a2a657bf7534d2a2906f70b9187ed8", "score": "0.69246197", "text": "function Rect(x, y, w, h) {\r\n var argv = Rect.arguments;\r\n var argc = Rect.length;\r\n this.className = \"Rect\";\r\n\r\n if (argv.length == 0)\r\n this.initRect(0, 0, 0, 0);\r\n else this.initRect(x, y, w, h);\r\n }", "title": "" }, { "docid": "13c210817a40899b0384e5215c8b05c7", "score": "0.6917074", "text": "rectangle(\n width = 32, \n height = 32, \n fillStyle = 0xFF3300, \n strokeStyle = 0x0033CC, \n lineWidth = 0,\n x = 0, \n y = 0 \n ){\n\n //Draw the rectangle\n let rectangle = new this.Graphics();\n rectangle.beginFill(fillStyle);\n if (lineWidth > 0) {\n rectangle.lineStyle(lineWidth, strokeStyle, 1);\n }\n rectangle.drawRect(0, 0, width, height);\n rectangle.endFill();\n\n //Generate a texture from the rectangle\n let texture = rectangle.generateTexture();\n\n //Use the texture to create a sprite\n let sprite = new this.Sprite(texture);\n\n //Position the sprite\n sprite.x = x;\n sprite.y = y;\n\n //Return the sprite\n return sprite;\n }", "title": "" }, { "docid": "35a11e400aa91392e8163b0b5e932132", "score": "0.68770087", "text": "function rect(x, y, w, h, fill, stroke, border, outline) { if(fill === null) { fill = \"transparent\"; } if(stroke === null || border === null) { stroke = \"transparent\"; border = 0; } if(outline === null) { outline = false; } this.x = x; this.y = y; this.w = w; this.h = h; this.fill = fill; this.stroke = stroke; this.border = border; this.draw = function() { ctx.fillStyle = this.fill; ctx.strokeStyle = this.stroke; ctx.lineWidth = this.border; ctx.fillRect(this.x, this.y, this.w, this.h); if(outline) { ctx.strokeRect(this.x, this.y, this.w, this.h); } }; }", "title": "" }, { "docid": "b222bbb7c612d8e806cb0e2e9f4a84b2", "score": "0.68768954", "text": "function addRect(g, left, top, width, height, rectStyle){\t\n\tvar Rect = g.append('rect')\n\t.attr('x', left)\n\t.attr('y', top)\n\t.attr('width', width)\n\t.attr('height', height)\n\t.attr('fill', function(){\n\t\tif(rectStyle['fill'] == undefined)\n\t\t\treturn 'gray';\n\t\treturn rectStyle['fill'];\n\t})\n\t.attr('stroke', function(){\n\t\tif(rectStyle['stroke'] == undefined)\n\t\t\treturn 'gray';\n\t\treturn rectStyle['stroke'];\n\t});\n\treturn Rect;\n}", "title": "" }, { "docid": "6b42b884a8270ce4dbbb7e140fd7f81d", "score": "0.68722963", "text": "function Rectangle(w, h) {\n this.width = w;\n this.height = h;\n this.getArea = (function getArea(){\n return this.width * this.height;\n })\n\n}", "title": "" }, { "docid": "9f73f355ae29e353bae9025b963fc538", "score": "0.6871821", "text": "function Rectangle (w, h) {\n if ((w > 0) && (h > 0)) {\n this.width = w;\n this.height = h;\n }\n this.print = function () {\n// if (w > 0 && h > 0) {\n for (let i = 0; i < this.height; i += 1) {\n console.log('X'.repeat(this.width));\n }\n// }\n };\n this.rotate = function () {\n const tmp = this.width;\n this.width = this.height;\n this.height = tmp;\n };\n this.double = function () {\n this.width = 2 * this.width;\n this.height = 2 * this.height;\n };\n}", "title": "" }, { "docid": "59a5fdfb76343f51fc7860ad98847af2", "score": "0.68655497", "text": "function rectangle (fore, back, edge, left, top, width, height)\r\n{\r\n strokeWeight (edge);\r\n fill (back);\r\n stroke (fore);\r\n rect (left, top, width, height);\r\n}", "title": "" }, { "docid": "01320f1a3f48ab90dea365b53bf1d4b0", "score": "0.68484014", "text": "function Rectangle(x,y,width,height){\n\tthis.x=(x==null)?0:x;\n\tthis.y=(y==null)?0:y;\n\tthis.width=(width==null)?0:width;\n\tthis.height=(height==null)?0:height;\n\n\t//Declaramos el método intersect\n\tthis.intersect=function(rect){\n\t\tif(rect!=null){\n\t\t\treturn(this.x<rect.x+rect.width&&\n\t\t\t\tthis.x+this.width>rect.x&&\n\t\t\t\tthis.y<rect.y+rect.height&&\n\t\t\t\tthis.y+this.height>rect.y);\n\t\t}\n\t}\n\n//Declaramos el método fill(sólo se utiliza para pintar las paredes)\n\tthis.fill=function(ctx){\n\t\tif(ctx!=null){\n\t\t\tctx.fillRect(this.x,this.y,this.width,this.height);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "d7d47e2b2903704a87e38eea9ae7b750", "score": "0.6847104", "text": "function Rectangle(bounds, opt_weight, opt_color) {\r\n this.bounds_ = bounds;\r\n this.weight_ = opt_weight || 2;\r\n this.color_ = opt_color || \"#888888\";\r\n}", "title": "" }, { "docid": "51cb8ed34b97e6771ee3e038f1aaf554", "score": "0.6839477", "text": "function drawRectangle(x, y, width, height, fillColor, borderColor, borderWidth){\n ctx.beginPath();\n ctx.rect(x, y, width, height);\n ctx.fillStyle = fillColor || '#141414';\n ctx.fill();\n ctx.lineWidth = borderWidth || 1;\n ctx.strokeStyle = borderColor || 'white';\n ctx.stroke();\n}", "title": "" }, { "docid": "f063ad23a284742cd8728ac2166472e6", "score": "0.68316275", "text": "function Rectangular(length, width) {\n this.length = length;\n this.width = width;\n}", "title": "" }, { "docid": "f063ad23a284742cd8728ac2166472e6", "score": "0.68316275", "text": "function Rectangular(length, width) {\n this.length = length;\n this.width = width;\n}", "title": "" }, { "docid": "06455f98cd14d74236ca1b7856f1007b", "score": "0.6811404", "text": "function Rect(data) {\n this.top = data.top;\n this.left = data.left;\n\n if ('width' in data && 'height' in data) {\n this.width = data.width;\n this.height = data.height;\n this.bottom = data.bottom || this.top + this.height;\n this.right = data.right || this.left + this.width;\n } else if ('bottom' in data && 'right' in data) {\n this.bottom = data.bottom;\n this.right = data.right;\n this.width = data.right - data.left;\n this.height = data.bottom - data.top;\n } else {\n throw new Error('Not enough data for the rect construction');\n }\n }", "title": "" }, { "docid": "528603d9849676559f7bda33d2b3b653", "score": "0.67968696", "text": "function Rect(x, y, w, h) {\n\t\tthis.x = Math.round(x || 0);\n\t\tthis.y = Math.round(y || 0);\n\t\tthis.w = Math.round(w || 1);\n\t\tthis.h = Math.round(h || 1);\n\t}", "title": "" }, { "docid": "a7fcda09a391b2e636c73f39ad4f9483", "score": "0.6773443", "text": "addRectangle(w, h, x=0, y=0, layer=null) {\n this.addLine(x, y, x, y + h, layer);\n this.addLine(x, y + h, x + w, y + h, layer);\n this.addLine(x + w, y + h, x + w, y, layer);\n this.addLine(x + w, y, x, y, layer);\n }", "title": "" }, { "docid": "36c5f3cbb6795fc7f9a359c127617291", "score": "0.6772662", "text": "function Rectangle(height, width) {\n this.height = height;\n this.width = width;\n this.calcArea = function() {\n return this.height * this.width;\n };\n // put our perimeter function here!\n this.calcPerimeter = function() {\n return (this.height * 2) + (this.width * 2);\n };\n}", "title": "" }, { "docid": "240066381d81b52e5fbcef413c49f023", "score": "0.67470384", "text": "_initRect() {\n this._shape = new Rect(\n this._width / 4,\n this._height / 4,\n this._width / 2,\n this._height / 2,\n 'rgba(0, 200, 0, 0.5)',\n 20,\n false // debug mode is set as false\n );\n this._valid = false;\n }", "title": "" }, { "docid": "a149dbf8969484d9da2d620115fb35c3", "score": "0.6745433", "text": "function createRectSprite(x=0, y=0,color=\"red\",width=50,height=50){\n let speed = 0;\n let rect = new RectSprite(x,y,getRandomUnitVector(),speed,color,width,height);\n return rect;\n}", "title": "" }, { "docid": "27370d5cdd4a729819ae749e1100d427", "score": "0.67376196", "text": "function RectangleHitBox(){\n\tBasicHitBox.call(this);\n\tthis.type = 'rectangle';\n\tthis.x = [];\n\tthis.y = [];\n\tif(arguments && arguments.length)this.setRect.apply(this, arguments);\n}", "title": "" }, { "docid": "43e4a7ac05eae64948ac8810db9c36e9", "score": "0.67343533", "text": "function Rectangle(p1, p2, p3, p4) {\n \"use strict\";\n this.ls = [new Segment(p1, p2), new Segment(p2, p3), new Segment(p3, p4), new Segment(p4, p1)];\n var k,\n side;\n\n for (k in this.ls) {\n side = this.ls[k];\n\n // vertical\n if (side.p1.x === side.p2.x) {\n if (this.left === undefined || side.p1.x < this.left.p1.x) {\n this.left = side;\n }\n\n if (this.right === undefined || side.p1.x > this.right.p1.x) {\n this.right = side;\n }\n } else {\n // horizontal\n if (this.bottom === undefined || side.p1.y < this.bottom.p1.y) {\n this.bottom = side;\n }\n\n if (this.top === undefined || side.p1.y > this.top.p1.y) {\n this.top = side;\n }\n }\n }\n return this;\n}", "title": "" }, { "docid": "52c6a4efaa7997e927c2662c44855129", "score": "0.67272896", "text": "function Rect2(len, width) {\r\n this.len = len;\r\n this.width = width;\r\n}", "title": "" }, { "docid": "3beee7693f6b0a76b3a8a59f20edca75", "score": "0.6704759", "text": "displayRectangle() {\n push()\n rectMode(CORNERS)\n noStroke();\n fill(this.fill.r, this.fill.g, this.fill.b);\n rect(this.bCornerX, this.bCornerY, this.uCornerX, this.uCornerY)\n pop()\n }", "title": "" }, { "docid": "8e242dd1af79b4dcb9adf213681e155c", "score": "0.66867834", "text": "constructor (rectangle, color={ r: 255, g: 0, b: 0, a: 255 }) {\n super(color)\n\n this.rectangle = rectangle\n }", "title": "" }, { "docid": "78c0c339efca35e344ece71ca54174f3", "score": "0.6678601", "text": "function rectangle(x,y,wdth,hght) { \n ctx.beginPath();\n ctx.rect(x,y,wdth,hght);\n ctx.stroke();\n ctx.fill();\n}", "title": "" }, { "docid": "415deaadc9190d9c97bd9e04bb8d537b", "score": "0.6658972", "text": "function rectangle(base, height) {\n area = base * height\n return(area)\n}", "title": "" }, { "docid": "efc9ec81f17ea48d78fb9aff5637eeb5", "score": "0.6648946", "text": "function gen_rect( width, height ) {\n var plane_geometry = new THREE.PlaneGeometry( width, height );\n var plane_material = new THREE.MeshBasicMaterial( {color: Math.random() * 0xffffff, side: THREE.DoubleSide} );\n var plane = new THREE.Mesh(plane_geometry, plane_material);\n\n return plane;\n}", "title": "" }, { "docid": "302ade49d392bdb13fc1df9684a17a3f", "score": "0.66206336", "text": "function draw_rectangle(context, colour, x1, y1, width, height) {\r\n \"use strict\";\r\n \r\n context.fillStyle = colour;\r\n context.fillRect(x_pos + x1, y_pos + y1, width, height);\r\n}", "title": "" }, { "docid": "25183bdab50e85e11424916de2c1a471", "score": "0.66194177", "text": "function Rectangle() {\n Shape.call(this); // call super constructor.\n}", "title": "" }, { "docid": "9b4b9a995e0f88a9de9a51ee6f01c284", "score": "0.6607405", "text": "function GameRect(left, top, right, bottom) {\n\tGameObject.call(this, left, top, right, bottom)\n}", "title": "" }, { "docid": "9b4b9a995e0f88a9de9a51ee6f01c284", "score": "0.6607405", "text": "function GameRect(left, top, right, bottom) {\n\tGameObject.call(this, left, top, right, bottom)\n}", "title": "" }, { "docid": "2f59705ede41ee257db911364c2966ce", "score": "0.6602216", "text": "function rect(x, y, w, h) {\n context.beginPath();\n context.rect(x, y, w, h);\n context.fill();\n}", "title": "" }, { "docid": "51a2ab4584aea73cb751a92565f9ab8a", "score": "0.6591358", "text": "function drawNewRect() {\n\trectGroup.append(\"rect\")\n\t\t.classed(\"draw\", true)\n\t\t.attr(\"x\", d3.min([startPos[0], endPos[0]]))\n\t\t.attr(\"y\", d3.min([startPos[1], endPos[1]]))\n\t\t.attr(\"width\", d3.max([startPos[0], endPos[0]]) - d3.min([startPos[0], endPos[0]])) \n\t\t.attr(\"height\", d3.max([startPos[1], endPos[1]]) - d3.min([startPos[1], endPos[1]]))\n\t\t.style(\"fill\", \"transparent\");\n}", "title": "" }, { "docid": "d8deb736560ae05d88a189aa5f17fea8", "score": "0.6588275", "text": "startNewRect(state, payload) {\n let r = payload.rect;\n r.id = '';\n r.tempId = ~~(Math.random() * 100);\n r.w = 1;\n r.h = 1;\n r.op = 4;\n r.cc = 0.5;\n r.ch = '';\n r.deleted = false;\n r.created = true;\n state.rects.push(r);\n }", "title": "" }, { "docid": "e619bcc590a5ee878ddabd5c5adb9ead", "score": "0.6586722", "text": "function rectangle(annotation) {\n const element = common(annotation);\n const [p1, p2, p3, p4] = annotation.coordinates();\n const top = [p3.x - p2.x, p3.y - p2.y];\n const left = [p2.x - p1.x, p2.y - p1.y];\n\n // determine the rotation of the top line of the rectangle\n const rotation = Math.atan2(top[1], top[0]);\n const height = Math.sqrt(left[0] * left[0] + left[1] * left[1]);\n const width = Math.sqrt(top[0] * top[0] + top[1] * top[1]);\n const center = [\n 0.25 * (p1.x + p2.x + p3.x + p4.x),\n 0.25 * (p1.y + p2.y + p3.y + p4.y),\n 0\n ];\n\n return _.extend(element, {\n type: 'rectangle',\n center,\n width,\n height,\n rotation\n });\n}", "title": "" }, { "docid": "d9d0ca1c226050ecbbca2e5e635d3559", "score": "0.6580938", "text": "function Rect( props ) {\n // extend properties from defaults\n for ( var prop in Rect.defaults ) {\n this[ prop ] = Rect.defaults[ prop ];\n }\n\n for ( prop in props ) {\n this[ prop ] = props[ prop ];\n }\n\n}", "title": "" }, { "docid": "c26a44985079bd5f9db63fd988711cb5", "score": "0.65730894", "text": "function drawRect(parent, id, x, y, width, height, cssClass)\n{\n\t//create element\n\tvar r = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n\t//id\n\tr.setAttribute('id', id);\n\t//start position\n\tr.setAttribute('x', x); r.setAttribute('y', y);\n\t//size\n\tr.setAttribute('width', width); r.setAttribute('height', height);\n\t//css class\n\tr.setAttribute('class', cssClass);\n\t//add to parent\n\tparent.appendChild(r);\t\n}", "title": "" }, { "docid": "15216ee9f237d060b450f32ea7859a2c", "score": "0.65691775", "text": "clone() {\n const me = this,\n result = new Rectangle(me.x, me.y, me.width, me.height);\n result.minHeight = me.minHeight;\n result.minWidth = me.minWidth;\n return result;\n }", "title": "" }, { "docid": "019de114544730470ed04d714823948e", "score": "0.6569021", "text": "function Rectangle(map, bounds, opt_weight, opt_color) {\n this.bounds_ = bounds;\n this.weight_ = opt_weight || 2;\n this.color_ = opt_color || \"yellow\";\n this.map_ = map;\n this.div_ = null;\n this.setMap(map);\n}", "title": "" }, { "docid": "a38fbd58c232657aecfea899df0090f6", "score": "0.65682083", "text": "_drawRectangle () {\n this._ctx.rect(this._canvas.clientWidth / 4, this._canvas.clientHeight / 4, this._canvas.clientWidth / 2, this._canvas.clientHeight / 2)\n this._ctx.closePath()\n this._ctx.stroke()\n }", "title": "" }, { "docid": "076de92e30359f52067992cd24a3891a", "score": "0.6566315", "text": "function Rectangle(x, y, z, width, height) {\n this.x = x;\n this.y = y;\n this.z = z;\n this.rotX = 0;\n this.rotY = 0;\n this.rotZ = 0;\n this.width = width;\n this.height = height;\n this.speedX = 0;//-0.01 + Math.random() * 0.02;\n this.speedY = 0;//-0.01 + Math.random() * 0.02;\n this.speedZ = 25;// + Math.random() * 1.1;\n this.lifetime = 0;\n this.lifespan = 120;//80 + Math.random() * 40;\n this.dead = false;\n this.opacity = 1;\n this.red = 240;//Math.round(140 + Math.random() * 115);\n this.green = 10;//Math.round(20 + Math.random() * 100);\n this.blue = 10;//Math.round(0 + Math.random() * 100);\n }", "title": "" }, { "docid": "c763d6b4ebdaf45f023de50b140b46b2", "score": "0.6562365", "text": "function Rect(x, y, w, h, ax, ay) {\n switch( arguments.length ) {\n case 0:\n this.origin = new Point(0, 0)\n this.size = new Size(0, 0)\n this.anchor = new Point(0, 0)\n break;\n case 2:\n this.origin = new Point(x.x, x.y)\n this.size = new Size(y.width, y.height)\n this.anchor = new Point(0, 0)\n break;\n case 3:\n this.origin = new Point(x.x, x.y)\n this.size = new Size(y.width, y.height)\n this.anchor = new Point(w.x, w.y)\n break;\n case 4:\n this.origin = new Point(x, y)\n this.size = new Size(w, h)\n this.anchor = new Point(0, 0)\n break;\n case 6:\n this.origin = new Point(x, y)\n this.size = new Size(w, h)\n this.anchor = new Point(ax, ay)\n break;\n }\n\n }", "title": "" }, { "docid": "13b01c93212ea69bfb58096c202f25cd", "score": "0.65426636", "text": "function AddRect(id, x, y){\r\n /* Parameters:\r\n id: your name for this rectangle\r\n x: x location of the rectangle\r\n y: y location of the rectangle\r\n */ \r\n\r\n\tvar temp_rect=d3.select(\"#climbing\").append(\"svg:rect\")\r\n\t\t.data([{\"x\":x, \"y\": y}])\r\n\t\t.attr(\"height\", Climbing.h)\r\n\t\t.attr(\"width\", Climbing.w-Climbing.margin)\r\n\t\t.attr(\"fill\", \"red\")\r\n\t\t.attr(\"transform\", \"translate(\"+x+\",\"+y+\")\")\r\n}", "title": "" }, { "docid": "ec604f8a131a7ff536ad3dda40fcc836", "score": "0.65374225", "text": "drawRectangle(rectangle) {\n this.context.fillStyle = '#fff';\n this.context.fillRect(rectangle.left, rectangle.top,\n rectangle.size.x, rectangle.size.y);\n }", "title": "" }, { "docid": "f29bb632dd9663bca295549462d6e10d", "score": "0.6515987", "text": "function ScreenRect(screenWith, screenHeight)\n{\n console.log(\"new ScreenRect: \" + screenWith + \" \" + screenHeight);\n var _screenWidth = screenWith;\n var _screenHeight = screenHeight;\n\n this.getWidth = function()\n {\n return _screenWidth;\n }\n\n this.getHeight = function()\n {\n return _screenHeight;\n }\n}", "title": "" }, { "docid": "b2706eb4194c9a87ff0e6c1ac65686f5", "score": "0.65097713", "text": "function Rect(v0, v1, v2, v3, position) {\n\tthis.transform = Matrix.Diagonal([1,1,1,1]);\n\tthis.setPosition(position);\n\tthis.position = position;\n this.texture = null;\n this.upperPoints = [];\n this.leftPoints = [];\n this.edges = [];\n this.edges.push([v0, v1]);\n this.edges.push([v1, v3]);\n this.edges.push([v3, v2]);\n this.edges.push([v2, v0]);\n}", "title": "" }, { "docid": "952c1882fa47954e4c7564d36139aaaa", "score": "0.6503146", "text": "function drawRectangle(fillColor, leftX, topY, rightX, bottomY){ // shorthand functions to draw a rectangle\n canvasContext.fillStyle = fillColor;\n canvasContext.fillRect(leftX, topY, rightX, bottomY);\n}", "title": "" }, { "docid": "f3c90c4f9f02e5a46b2d05ef2050c626", "score": "0.6500315", "text": "function RectangleRegion(tl, br) {\n assert(tl.x < br.x && tl.y < br.y);\n\n var self = this;\n\n // Data\n self.topLeft = tl;\n self.bottomRight = br;\n}", "title": "" }, { "docid": "7517a6b514cc9548e313f32d417ea0d7", "score": "0.6482097", "text": "function Square(id, x, y, length, fill, stroke, strokeWidth, rx, ry) {\n\t// create a new SVG rect element\n var r = createElement(SVG,\"rect\");\n\t// set the attributes using the object approach\n\tr.setAttribute(\"id\", id);\n\tr.setAttribute(\"x\", x);\n\tr.setAttribute(\"y\", y);\n\tr.setAttribute(\"width\", length);\n\tr.setAttribute(\"height\", length);\n\tr.setAttribute(\"fill\", fill);\n\t\n\t// set default params\n\tif(stroke != null) { r.setAttribute(\"stroke\", stroke); }\n\tif(strokeWidth != null) { r.setAttribute(\"stroke-width\", strokeWidth); }\n\tif(rx != null) { r.setAttribute(\"rx\", rx); }\n\tif(ry != null) { r.setAttribute(\"ry\", ry); }\n\treturn r;\n}", "title": "" }, { "docid": "dfe18b16eddb6035b6d3ad40fe9bd4e2", "score": "0.64790857", "text": "function Rectangle() {\n /**************************************************************************/\n // VARIABLES\n this.kDelta = Rectangle.kMoveDelta;\n this.kTemp = null;\n /**************************************************************************/\n // COLLISION LINE VARIABLES\n this.kColLines = [];\n this.kColPoint = [];\n this.kColLineCount = 0;\n this.kID = 0;\n /**************************************************************************/\n // TOGGLES\n this.kControl = false;\n this.kCollide = false;\n \n this.mRec = new LineRenderable();\n this.mRec.getXform().setPosition(35, 20);\n this.mRec.getXform().setSize(9, 12);\n GameObject.call(this, this.mRec);\n \n var r = new RigidRectangle(this.getXform(), 9,12);\n// var vx = Rectangle.kMoveDelta * (Math.random() - .5);\n// var vy = Rectangle.kMoveDelta * (Math.random() - .5);\n// this.kVel = [vx, vy];\n //r.setVelocity(0, 0);\n \n //this.getXform().setRotationInRad((Math.random()-0.5 * Rectangle.kRotateLimit));\n \n this.setRigidBody(r);\n}", "title": "" }, { "docid": "902be89bee6680a3e34b72f68e288d05", "score": "0.6450827", "text": "function Rect(point, size) {\n var _this = _super.call(this, 'rect') || this;\n _this.setPoint(point);\n _this.setSize(size);\n return _this;\n }", "title": "" }, { "docid": "b124b6fa4f627029617b4b5c879b1c12", "score": "0.64470696", "text": "function createRectangles(){\n\tlet x_start = 115;\n\tlet y_start = 0;\n let x_width = 100; \n for (let i = 0; i < 12; i++){\n let a_hex = random(0, 255);\n let b_hex = random(0, 255);\n let c_hex = random(0, 255);\n let y_width = random(100, 600);\n \tlet a = new Rectangle(x_start,y_start, x_width, y_width, a_hex, b_hex, c_hex);\n a.display();\n \tx_start = x_start + x_width;\n \tappend(rectangles, a);\n\t}\n tri1 = rectangles[0].x + rectangles[0].width/2;\n tri2 = rectangles[0].y + rectangles[0].height + 40;\n tri = new Arrow(tri1, tri2, tri1 - 30, tri2 + 50, tri1 + 30, tri2 + 50);\n tri.display();\n rectangles_length = rectangles.length; \n}", "title": "" }, { "docid": "75791c0e4616b0ef71d8ca21419fdd32", "score": "0.6446686", "text": "function drawRectangle(spec) {\n\t\tcontext.save();\n\t\tcontext.translate(spec.position.x + spec.width / 2, spec.position.y + spec.height / 2);\n\t\tcontext.rotate(spec.rotation);\n\t\tcontext.translate(-(spec.position.x + spec.width / 2), -(spec.position.y + spec.height / 2));\n\t\t\n\t\tcontext.fillStyle = spec.fill;\n\t\tcontext.fillRect(spec.position.x, spec.position.y, spec.width, spec.height);\n\t\t\n\t\tcontext.strokeStyle = spec.stroke;\n\t\tcontext.strokeRect(spec.position.x, spec.position.y, spec.width, spec.height);\n\n\t\tcontext.restore();\n\t}", "title": "" }, { "docid": "7059c8da77d756bcb7d28e5d0c0b34b6", "score": "0.6446057", "text": "function RectangleModel(a, b) {\n const line1 = new makerjs.paths.Line([0, 0], [0, b]);\n const line2 = new makerjs.paths.Line([0, b], [a, b]);\n const line3 = new makerjs.paths.Line([a, b], [a, 0]);\n const line4 = new makerjs.paths.Line([a, 0], [0, 0]);\n\n this.paths = {\n line1,\n line2,\n line3,\n line4,\n };\n}", "title": "" } ]
76886627dca1f83b6f542a951e9e32c4
get lat lng form zip code
[ { "docid": "d990577df0216c2bdfce4400f2a22c78", "score": "0.0", "text": "function initialize(callback) {\n var price_ = true; // hide old price\n\n\n var center = new google.maps.LatLng(1.26630900, 103.81401500);\n var radius_circle = 500; // 500m\n var markerPositions = [];\n\n markerPositions_push(1.26630900, 103.81401500, 1, 0);\n markerPositions_push(1.266429,\n 103.815462,\n 1,\n 0)\n markerPositions_push(1.266521,\n 103.809851,\n 1,\n 0)\n markerPositions_push(1.2666139,\n 103.81036,\n 2,\n 0)\n markerPositions_push(1.266889,\n 103.811162,\n 1,\n 0)\n markerPositions_push(1.2769,\n 103.8099,\n 1,\n 0)\n markerPositions_push(1.2774,\n 103.8216,\n 1,\n 0)\n markerPositions_push(1.29872000,\n 103.83143400,\n 1,\n 0)\n\n function markerPositions_push(lat, lng, number, status) {\n markerPositions.push({\n \"lat\": lat,\n \"lng\": lng,\n \"number\": number,\n \"status\": status\n });\n }\n\n var markers = [];\n // draw map scrollwheel: false,\n var mapOptions = {\n center: center,\n zoom: 16,\n scrollwheel: false\n\n };\n var latLng = [];\n var icon_images = [];\n var icon_images_2 = [];\n var map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);\n //het map value\n map.setMapTypeId(google.maps.MapTypeId.ROADMAP);\n\n var map, pointarray, heatmap;\n var TILE_SIZE = 70;\n\n\n // click\n google.maps.event.addListener(map, 'click', function( event ){\n\n var latitude = event.latLng.lat();\n var longitude = event.latLng.lng();\n GetAddressFromLatlng(latitude, longitude);\n // Center of map\n // map.panTo(new google.maps.LatLng(latitude,longitude));\n });\n\n function GetAddressFromLatlng(latitude, longitude) {\n\n var latlng = new google.maps.LatLng(latitude, longitude);\n var geocoder = geocoder = new google.maps.Geocoder();\n geocoder.geocode({ 'latLng': latlng }, function (results, status) {\n if (status == google.maps.GeocoderStatus.OK) {\n if (results[1]) {\n var contentString = '<p>' +\n '<span>Location</span><br>' +\n '<b >'+ results[1].formatted_address +'</b>' +\n '</p>';\n var infowindow = new google.maps.InfoWindow({\n content: contentString,\n maxWidth: 200\n });\n \n marker = new google.maps.Marker({\n position: latlng,\n map: map,\n title: 'Location'\n });\n\n infowindow.open(map, marker);\n marker.setVisible(false);\n }\n }\n });\n }\n //Mercator --BEGIN--\n function bound(value, opt_min, opt_max) {\n if (opt_min !== null) value = Math.max(value, opt_min);\n if (opt_max !== null) value = Math.min(value, opt_max);\n return value;\n }\n\n function degreesToRadians(deg) {\n return deg * (Math.PI / 180);\n }\n\n function radiansToDegrees(rad) {\n return rad / (Math.PI / 180);\n }\n\n function MercatorProjection() {\n this.pixelOrigin_ = new google.maps.Point(TILE_SIZE / 2,\n TILE_SIZE / 2);\n this.pixelsPerLonDegree_ = TILE_SIZE / 360;\n this.pixelsPerLonRadian_ = TILE_SIZE / (2 * Math.PI);\n }\n\n MercatorProjection.prototype.fromLatLngToPoint = function (latLng,\n opt_point) {\n var me = this;\n var point = opt_point || new google.maps.Point(0, 0);\n var origin = me.pixelOrigin_;\n\n point.x = origin.x + latLng.lng() * me.pixelsPerLonDegree_;\n\n // NOTE(appleton): Truncating to 0.9999 effectively limits latitude to\n // 89.189. This is about a third of a tile past the edge of the world\n // tile.\n var siny = bound(Math.sin(degreesToRadians(latLng.lat())), -0.9999,\n 0.9999);\n point.y = origin.y + 0.5 * Math.log((1 + siny) / (1 - siny)) * -me.pixelsPerLonRadian_;\n return point;\n };\n\n MercatorProjection.prototype.fromPointToLatLng = function (point) {\n var me = this;\n var origin = me.pixelOrigin_;\n var lng = (point.x - origin.x) / me.pixelsPerLonDegree_;\n var latRadians = (point.y - origin.y) / -me.pixelsPerLonRadian_;\n var lat = radiansToDegrees(2 * Math.atan(Math.exp(latRadians)) - Math.PI / 2);\n return new google.maps.LatLng(lat, lng);\n };\n\n //Mercator --END--\n\n var desiredRadiusPerPointInMeters = 1000\n\n function getNewRadius() {\n\n\n var numTiles = 1 << map.getZoom();\n var center = map.getCenter();\n var moved = google.maps.geometry.spherical.computeOffset(center, 10000, 90); /*1000 meters to the right*/\n var projection = new MercatorProjection();\n var initCoord = projection.fromLatLngToPoint(center);\n var endCoord = projection.fromLatLngToPoint(moved);\n var initPoint = new google.maps.Point(\n initCoord.x * numTiles,\n initCoord.y * numTiles);\n var endPoint = new google.maps.Point(\n endCoord.x * numTiles,\n endCoord.y * numTiles);\n var pixelsPerMeter = (Math.abs(initPoint.x - endPoint.x)) / 10000.0;\n var totalPixelSize = Math.floor(desiredRadiusPerPointInMeters * pixelsPerMeter);\n return totalPixelSize;\n\n }\n\n\n var circle = drawCircle(mapOptions.center, radius_circle, 3, '#FFFFFF', 0.2);\n var bounds = new google.maps.LatLngBounds();\n var only;\n var count_marker = markerPositions.length;\n //var markerCluster = new MarkerClusterer(map, markers,mcOptions);\n\n\n kmakerOption(markerPositions);\n \n function kmakerOption(markerPositions) {\n for (var i = 0; i < markerPositions.length; i++) {\n latLng[i] = new google.maps.LatLng(markerPositions[i].lat, markerPositions[i].lng);\n if (markerPositions[i].status == 3) {\n icon_images[i] = \"http://snappyhouse.com.sg/templates/bootstrap2-responsive/assets/images/markers/s-c-\" + markerPositions[i].number + \".png\";\n } else {\n icon_images[i] = \"http://snappyhouse.com.sg/templates/bootstrap2-responsive/assets/images/markers/\" + markerPositions[i].number + \".png\";\n }\n\n only = new google.maps.Marker({\n position: latLng[i],\n label: { text: 'ABC' },\n icon: icon_images[i],\n map: map,\n });\n\n markers.push(only);\n // alert(i);\n google.maps.event.addListener(only, 'click', (function (only, i) {\n return function () {\n var get_lat = markerPositions[i].lat;\n var get_lng = markerPositions[i].lng;\n var get_status = markerPositions[i].status\n latLng[i] = new google.maps.LatLng(markerPositions[i].lat, markerPositions[i].lng);\n var post = {\n 'lat' : get_lat,\n 'lng' : get_lng,\n 'status' : get_status,\n }\n \n openerp.jsonRpc('/get-latlng', 'call', {\n post : post\n }).then(function (result) {\n\n var contentString = '<div id=\"iw-container\">' +\n '<div class=\"iw-title\">Porcelain Factory of Vista Alegre</div>' +\n '<div class=\"iw-content\">' +\n '<div class=\"iw-subTitle\">History</div>' +\n '<img src=\"http://maps.marnoto.com/en/5wayscustomizeinfowindow/images/vistalegre.jpg\" alt=\"Porcelain Factory of Vista Alegre\" height=\"115\" width=\"83\">' +\n '<p>Founded in 1824, the Porcelain Factory of Vista Alegre was the first industrial unit dedicated to porcelain production in Portugal. For the foundation and success of this risky industrial development was crucial the spirit of persistence of its founder, José Ferreira Pinto Basto. Leading figure in Portuguese society of the nineteenth century farm owner, daring dealer, wisely incorporated the liberal ideas of the century, having become \"the first example of free enterprise\" in Portugal.</p>' +\n '<div class=\"iw-subTitle\">Contacts</div>' +\n '<p>VISTA ALEGRE ATLANTIS, SA<br>3830-292 Ílhavo - Portugal<br>'+\n '<br>Phone. +351 234 320 600<br>e-mail: geral@vaa.pt<br>www: www.myvistaalegre.com</p>'+\n '</div>' +\n '<div class=\"iw-bottom-gradient\"></div>' +\n '</div>';\n var infowindow = new google.maps.InfoWindow({\n content: contentString,\n maxWidth: 350\n });\n marker = new google.maps.Marker({\n position: latLng[i],\n map: map,\n icon: icon_images[i],\n title: 'Porcelain Factory of Vista Alegre'\n });\n\n infowindow.open(map, marker);\n marker.setVisible(false);\n google.maps.event.addListener(infowindow, 'domready', function() {\n\n // Reference to the DIV that wraps the bottom of infowindow\n var iwOuter = $('.gm-style-iw');\n\n /* Since this div is in a position prior to .gm-div style-iw.\n * We use jQuery and create a iwBackground variable,\n * and took advantage of the existing reference .gm-style-iw for the previous div with .prev().\n */\n var iwBackground = iwOuter.prev();\n\n // Removes background shadow DIV\n iwBackground.children(':nth-child(2)').css({'display' : 'none'});\n\n // Removes white background DIV\n iwBackground.children(':nth-child(4)').css({'display' : 'none'});\n\n // Moves the infowindow 115px to the right.\n iwOuter.parent().parent().css({left: '115px'});\n\n // Moves the shadow of the arrow 76px to the left margin.\n iwBackground.children(':nth-child(1)').attr('style', function(i,s){ return s + 'left: 76px !important;'});\n\n // Moves the arrow 76px to the left margin.\n iwBackground.children(':nth-child(3)').attr('style', function(i,s){ return s + 'left: 76px !important;'});\n\n // Changes the desired tail shadow color.\n iwBackground.children(':nth-child(3)').find('div').children().css({'box-shadow': 'rgba(72, 181, 233, 0.6) 0px 1px 6px', 'z-index' : '1'});\n\n // Reference to the div that groups the close button elements.\n var iwCloseBtn = iwOuter.next();\n\n // Apply the desired effect to the close button\n iwCloseBtn.css({opacity: '1', right: '38px', top: '3px', border: '7px solid #48b5e9', 'border-radius': '13px', 'box-shadow': '0 0 5px #3990B9'});\n\n // If the content of infowindow not exceed the set maximum height, then the gradient is removed.\n if($('.iw-content').height() < 140){\n $('.iw-bottom-gradient').css({display: 'none'});\n }\n\n // The API automatically applies 0.7 opacity to the button after the mouseout event. This function reverses this event to the desired value.\n iwCloseBtn.mouseout(function(){\n $(this).css({opacity: '1'});\n });\n });\n \n // =================\n });\n\n }\n })(only, i));\n }\n\n } //end function marker option\n\n\n loadMarker();\n // client clicks on button, we will check for the markers within the circle\n var circle_ = null;\n google.maps.event.addListener(circle, 'dragstart', function (evt) {\n var lat = circle.getCenter().lat();\n var lng = circle.getCenter().lng();\n circle_ = drawCircle(new google.maps.LatLng(lat, lng), radius_circle, 0, 'black', 0.1);\n });\n google.maps.event.addListener(circle, 'dragend', function (evt) {\n circle_.setMap(null);\n loadMarker();\n });\n //var markerCluster = new MarkerClusterer(map, markers,mcOptions);\n function loadMarker() {\n\n for (var i = 0; i < markerPositions.length; i++) {\n\n var distance = calculateDistance(\n markers[i].getPosition().lat(),\n markers[i].getPosition().lng(),\n circle.getCenter().lat(),\n circle.getCenter().lng(),\n \"K\"\n );\n if (distance * 1000 < radius_circle) { // radius is in meter; distance in km\n // markers[i].setIcon('http://maps.gstatic.com/mapfiles/icon_green.png'); // make or find a better icon\n if (price_) {\n if (markerPositions[i].status == 3) {\n markers[i].setOpacity(0.3);\n } else {\n markers[i].setOpacity(1);\n }\n } else {\n markers[i].setOpacity(1);\n }\n\n\n } else {\n // markers[i].setIcon('http://maps.gstatic.com/mapfiles/icon.png'); // make or find a better icon\n markers[i].setOpacity(0.3);\n //arkers[i].setMap(map);\n //markerCluster.removeMarker(markers[i]);\n\n }\n\n\n }\n // markerCluster.repaint();\n\n }\n\n\n function drawCircle(center, radius, strokeWeight, background, fillOpacity) {\n\n return new google.maps.Circle({\n strokeColor: '#FFFFFF',\n strokeWeight: strokeWeight,\n fillColor: background,\n fillOpacity: fillOpacity,\n draggable: true,\n map: map,\n center: center,\n radius: radius,\n });\n }\n\n function calculateDistance(lat1, lon1, lat2, lon2, unit) {\n var radlat1 = Math.PI * lat1 / 180;\n var radlat2 = Math.PI * lat2 / 180;\n var radlon1 = Math.PI * lon1 / 180;\n var radlon2 = Math.PI * lon2 / 180;\n var theta = lon1 - lon2;\n var radtheta = Math.PI * theta / 180;\n var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\n dist = Math.acos(dist);\n dist = dist * 180 / Math.PI;\n dist = dist * 60 * 1.1515;\n if (unit == \"K\") {\n dist = dist * 1.609344;\n }\n if (unit == \"N\") {\n dist = dist * 0.8684;\n }\n return dist;\n }\n\n function toggleHeatmap() {\n\n if ($('#legendGradient').is(\":visible\")) {\n $('#legendGradient').hide();\n $('#legendHeatMap').css('bottom', '27px');\n $('div.gmnoprint').css('bottom', '93px !important');\n $('div#legend div').css('right', '11px');\n\n $('#legendHeatMap').html('Open heatmap');\n hiddenHeatmap();\n } else {\n $('#legendGradient').show();\n $('#legendHeatMap').css('bottom', '85px');\n $('div.gmnoprint').css('bottom', '238px');\n $('div#legend div').css('right', '11px');\n $('#legendHeatMap').html('Close heatmap');\n showHeatmap();\n\n }\n }\n\n var toglePrice = true;\n\n\n function tooglePrice() {\n if (toglePrice) {\n toglePrice = false;\n price_ = false;\n $('#openprice').html('Close transactions');\n loadMarker();\n } else {\n price_ = true;\n toglePrice = true;\n $('#openprice').html('Show transactions');\n loadMarker();\n }\n }\n\n\n function radius1() {\n radius_circle = 500;\n loadMarker();\n circle.setRadius(radius_circle);\n map.setCenter(getLatLngCircle(circle));\n map.setZoom(16);\n }\n\n function radius2() {\n radius_circle = 1000;\n loadMarker();\n circle.setRadius(radius_circle);\n map.setCenter(getLatLngCircle(circle));\n map.setZoom(15);\n console.log('dsafdsfasd');\n }\n\n function radius3() {\n radius_circle = 2000;\n loadMarker();\n circle.setRadius(radius_circle);\n map.setCenter(getLatLngCircle(circle));\n map.setZoom(14);\n }\n\n function getLatLngCircle(circle) {\n return new google.maps.LatLng(circle.getCenter().lat(), circle.getCenter().lng());\n }\n\n //place function initAutocomplete\n initAutocomplete();\n var lat = null;\n var lng = null;\n var object = null;\n\n function initAutocomplete() {\n var options = {\n componentRestrictions: {\n country: 'VN'\n }\n };\n var input = document.getElementById('search_property_header');\n var autocomplete = new google.maps.places.Autocomplete(input, options);\n autocomplete.addListener('place_changed', function () {\n var place = autocomplete.getPlace();\n if (!place.geometry) {\n window.alert(\"Autocomplete's returned place contains no geometry\");\n return;\n } else {\n\n obj = place.geometry.location;\n\n var tmp_i = true;\n Object.keys(obj).forEach(function (key) {\n if (tmp_i) {\n lat = obj[key];\n tmp_i = false;\n } else {\n lng = obj[key];\n tmp_i = true;\n }\n });\n\n $('input#lat_form_index').val(lat);\n $('input#lng_form_index').val(lng);\n\n map.setCenter(new google.maps.LatLng($('input#lat_form_index').val(), $('input#lng_form_index').val()));\n circle.setCenter(new google.maps.LatLng($('input#lat_form_index').val(), $('input#lng_form_index').val()));\n loadMarker();\n }\n });\n }\n\n\n function functionAutocomplete() {\n /*var options = {\n componentRestrictions: {country: 'SG'}\n };\n var input = document.getElementById('search_property_header');\n var searchBox = new google.maps.places.SearchBox(input, options);\n \n \n var places = searchBox.getPlaces();\n console.log(places);\n if(!places){\n window.alert(\"Autocomplete's returned place contains no geometry\");\n }else{\n console.log(places);\n }*/\n return false;\n\n }\n\n this._toggleHeatmap = toggleHeatmap;\n this._radius1 = radius1;\n this._radius2 = radius2;\n this._radius3 = radius3;\n this._tooglePrice = tooglePrice;\n this._functionAutocomplete = functionAutocomplete;\n callback(this);\n }", "title": "" } ]
[ { "docid": "f7bfdd50a0bfab49df57a9a005144001", "score": "0.7608761", "text": "function geofromZIP(zip, callback){\n\trequest('https://maps.googleapis.com/maps/api/geocode/json?address='+zip+'&key=AIzaSyCP9syBFfHu5zfVSavGJLWS3f8bzL5mKMI', function(error, response, body){\n\t\t\tvar data = JSON.parse(body);\n\t\t\tvar latLong = [data.results[0].geometry.location.lat, data.results[0].geometry.location.lng];\n\t\t\tcallback(latLong);\n\t});\n}", "title": "" }, { "docid": "b6e640fcf0927e579a4dc47715e215d5", "score": "0.74898463", "text": "function getLatLong(zip) {\n smoothScroll(document.getElementById('map-window'));\n const url = `https://maps.googleapis.com/maps/api/geocode/json?components=postal_code:${zip}\n &key=${API_KEY}`;\n fetch(url)\n .then((response) => {\n if (response.ok) {\n return response.json();\n } else {\n throw new Error(response.statusText);\n }\n })\n .then((responseJson) => getMapData(responseJson))\n .catch((err) => {\n $('#map').html(`<h3 class=\"error\">Please Enter A Valid Zip Code</h3>`);\n });\n}", "title": "" }, { "docid": "a34db96256afda621e4777c606214c01", "score": "0.6873819", "text": "getLocation(lat, long){\n const location = {\n latitude: lat,\n longitude: long\n };\n return geo2zip(location).then(zip => {\n console.log(zip);\n });\n \n }", "title": "" }, { "docid": "9301f3378870fa49e76909a58ab44ada", "score": "0.66390765", "text": "function getZipCoordinates(zip) {\n\n\tvar url = \"\";\n\n\t// console.log(data);\n\tfor ( var i = 0; i < data.length; i++ ) {\n\n\t\tif ( data[i][\"\\\"\\\"zipcode\\\"\\\"\"] == zip ) {\n\n\t\t\tzipObj = data[i];\n\t\t\tvar lat = zipObj[\"\\\"\\\"latitude\\\"\\\"\"];\n\t\t\tvar lon = zipObj[\"\\\"\\\"longitude\\\"\\\"\"];\n\n\t\t\t// for testing\n\t\t\t// console.log(\"latitude: \" + lat);\n\t\t\t// console.log(\"longitude: \" + lon);\n\t\t\t// console.log(zipObj);\n\n\n\t\t\t// remove quotations\n\t\t\tlat = lat.slice(3);\n\t\t\tlat = lat.slice(0,-3);\n\n\t\t\tlon = lon.slice(2);\n\t\t\tlon = lon.slice(0,-3);\t\t\t\n\n\t\t\turl = \"https://api.forecast.io/forecast/\" + API_KEY + \"/\" + lat + \",\" + lon;\n\t\t\t//console.log(url);\n\n\t\t\tbreak;\n\t\t}\n\t}\n\tgetWeather(url);\n}", "title": "" }, { "docid": "b99acc26a81f5ff616379ff3f6808c2e", "score": "0.6595755", "text": "function getLtnLng(address) {\n\tgeocoder.geocode({'address' : address}, function(results, status) {\n\t\tif( status == google.maps.GeocoderStatus.OK) {\n\t\t\tvar lat = results[0].geometry.location.lat();\n\t\t\tvar lng = results[0].geometry.location.lng();\n\t\t\treturn {lat: lat, lng: lng};\n\t\t} else {\n\t\t\talert('Geocode was not successful for the following reason: ' + status);\n\t\t}\n\t});\n}", "title": "" }, { "docid": "e0eae5dd997389fed69937c775bf82e1", "score": "0.6520009", "text": "function lookUpWeatherForZipCode_Click() {\n var zcode = $(\"#zipBox\").val();\n lookupLatLong(\"\", \"\", zcode);\n}", "title": "" }, { "docid": "4c179cc3a15e940b0d5a9de2c4d84072", "score": "0.65009737", "text": "getZip(){\n console.log('Getting current ZIP code...');\n\n var options = {\n host: 'api.wunderground.com',\n path: '/api/' + key + '/geolookup/q/autoip.json'\n };\n var str = '';\n var zip = '';\n http.request(options, function(response){\n response.on('data', function (chunk) {\n str += chunk;\n });\n response.on('end', function() {\n var json = JSON.parse(str);\n zipcode = json.location.zip;\n console.log(zipcode);\n });\n }).end();\n }", "title": "" }, { "docid": "3181eb94fd573701fc0c1caa98d168ce", "score": "0.64860475", "text": "function parsePostalCode(geocoderObj){ \n //the last element in address_components will always be the postal code\n var lastIndex = geocoderObj[0].address_components.length-1;\n return geocoderObj[0].address_components[lastIndex].long_name;\n}", "title": "" }, { "docid": "ba0c3218f9f5cebc43a030ddd8505232", "score": "0.64656997", "text": "function getLatitudeLongitude(callback, address ) {\n\n address = address || 'Rizal Avenue, Bayambang, Pangasinan';\n\n\n // Initialize the Geocoder\n geocoder = new google.maps.Geocoder();\n if (geocoder) {\n geocoder.geocode({\n 'address': address\n }, function (results, status) {\n if (status == google.maps.GeocoderStatus.OK) {\n callback(results[0]);\n }\n });\n }\n }", "title": "" }, { "docid": "c0b935d8b23764fa39285b0fd96d594f", "score": "0.6440308", "text": "function parseZip(zipCode) {\n // TODO: actually parse the zip code\n return zipCode;\n }", "title": "" }, { "docid": "c10ece1be37c8093d212e1046437d5dd", "score": "0.64078313", "text": "function getLocationByPostalCode(postal) {\n //\n var apiURL = OWEATHER_API_SERVER + OWEATHER_API_ZIP;\n apiURL = apiURL + \"?zip=\" + postal;\n apiURL = apiURL + \"&appid=\" + OWEATHER_API_KEY;\n //\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\", apiURL, false);\n xhr.send();\n //\n return JSON.parse(xhr.response);\n //\n}", "title": "" }, { "docid": "958147949e26608e182e8063a7b42ee9", "score": "0.6393245", "text": "function _getZipcode() {\n api.getZipcode().$promise.then(function(result) {\n UserService.zipcode = result.zipcode;\n })\n\n }", "title": "" }, { "docid": "9499bb8bf21a61242e13331cc08e83e6", "score": "0.63486207", "text": "function getZipCode(coords) {\n var infowindow = new google.maps.InfoWindow();\n var geocoder = new google.maps.Geocoder();\n var div = document.getElementById(\"location\");\n\n //Ping Google geocode API with lat and long for reverse lookup\n geocoder.geocode({'latLng': coords}, function(results, status){\n if (status == google.maps.GeocoderStatus.OK){\n if (results[0]) {\n map.setZoom(15);\n marker = new google.maps.Marker({\n position: coords,\n map: map\n });\n infowindow.setContent(results[0].formatted_address);\n infowindow.open(map, marker);\n\n //Look for zip code in results array\n var zip = '';\n for (var i=0, len=results[0].address_components.length; i<len; i++) {\n var ac = results[0].address_components[i];\n if (ac.types.indexOf('postal_code') >= 0) zip = ac.long_name;\n }\n if (zip != '') {\n div.innerHTML ='<p>We guess your zip code is ' + zip + \"</p>\";\n getRestaurantsNearby(zip);\n }\n }\n } else {\n alert(\"Geocoder failed due to: \" + status);\n }\n });\n\n}", "title": "" }, { "docid": "fb159636147ecc975f53cb126c61a3d3", "score": "0.63204503", "text": "function decodeLat(lat)\n{\n var lat_final = 90 - ((lat.charCodeAt(0)-33)*Math.pow(91, 3) + (lat.charCodeAt(1)-33)*Math.pow(91, 2) + (lat.charCodeAt(2)-33)*91 + lat.charCodeAt(3)-33) / 380926;\n return lat_final;\n}", "title": "" }, { "docid": "86994934e4c70fd92add25ba2ea892a3", "score": "0.631261", "text": "function getLatLong() {\n\t\t\n\t\tgeoAddress = [];\n\t\tif ( ggfSettings.address_fields.use == 1 ) {\n\t\t\t\n\t\t\t//make sure address field is not empty\n\t\t\tgeoAddress.push(jQuery('.ggf-full-address input[type=\"text\"]').val());\n\t\t\tgeoAddress = geoAddress.join(' ');\n\n\t\t} else if ( ggfSettings.address_fields.use == 2 || ggfSettings.address_fields.use == 3 ) {\n\t\t\tgeoAddress = [];\n\t\t\t\n\t\t\tjQuery.each(['street','city','state','zipcode','country'], function(index, value) {\n\t\t\t\tif ( jQuery('.ggf-field-'+value ).length ) {\n\t\t\t\t\tif ( jQuery.trim( jQuery('.ggf-field-'+value + ' input[type=\"text\"]').val() ).length ) {\n\t\t\t\t\t\tgeoAddress.push(jQuery('.ggf-field-'+value + ' input[type=\"text\"]').val());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tgeoAddress = geoAddress.join(' ');\n\t\t}\n\t\t\n\t\t//do nothing if address field empty\n\t\tif ( geoAddress == undefined || geoAddress == null || !jQuery.trim(geoAddress).length ) {\n \t\tjQuery('#gform_'+ggfSettings['id'] ).submit();\t\n \t\treturn;\n\t\t}\n\n\t\t//if address found, geocod it\n \tgeocoder = new google.maps.Geocoder();\n \t \tgeocoder.geocode( { 'address': geoAddress }, function(results, status) {\n \n \t \t\tif (status == google.maps.GeocoderStatus.OK) { \t\t\n \t\tbreakAddress(results[0]); \t\t \t\t\t\t\t\t\n \t\t} else {\n \t\t\talert( 'Geocode was not successful for the following reason: ' + status + '. Please check the address you entered.' ); \n \t\t}\n \t});\n\t}", "title": "" }, { "docid": "44cb611a07c334e70ef65570cad68905", "score": "0.6109255", "text": "function getGeoLocal() {\r\n}", "title": "" }, { "docid": "ce11c1b1e0e47999c8a5af85dfbf020d", "score": "0.6108312", "text": "function postalToGeo(postalCode) {\n\treturn new Promise((resolve, reject)=>{\n\t\tvar req = {componentRestrictions: {country: \"CA\"}, address: postalCode};\n\t\tgeocoder.geocode(req, (result, status) => {\n\t\t\tif (status != google.maps.GeocoderStatus.OK) {\n\t\t\t\treject(status);\n\t\t\t} else {\n\t\t\t\tvar lat = result[0].geometry.location.lat();\n\t\t\t\tvar lng = result[0].geometry.location.lng();\n\t\t\t\tresolve({lat:lat,lng:lng});\n\t\t\t}\n\t\t});\n\t});\n}", "title": "" }, { "docid": "c063522bf1905b0a283f3e17d6dd5362", "score": "0.60890967", "text": "function searchLatLng() {\r\n var lat = $(\"#lat-input\").val();\r\n var lng = $(\"#lng-input\").val();\r\n\r\n // This costs geoCoding passes\r\n var geocoder = new google.maps.Geocoder();\r\n geocoder.geocode({ 'latLng': new google.maps.LatLng(lat, lng) }, function (results, status) {\r\n var zip, name;\r\n if (status == google.maps.GeocoderStatus.OK) {\r\n if (results[2]) \r\n name = results[2].formatted_address;\r\n for (var i = 0; i < results.length; i++) {\r\n for (var k = 0; k < results[i].address_components.length; k++) {\r\n if (results[i].address_components[k].types[0] === \"postal_code\")\r\n zip = results[i].address_components[0].short_name;\r\n }\r\n }\r\n } else {\r\n console.log(status);\r\n }\r\n\r\n var place = {\r\n \"name\": (\"Lat:\" + lat + \" - Lng:\" + lng),\r\n \"address_components\": [{\r\n \"short_name\": zip,\r\n \"types\": [\r\n \"postal_code\"\r\n ]\r\n }]\r\n }\r\n getDetails(place, lat, lng, true);\r\n });\r\n}", "title": "" }, { "docid": "52b373e1e476de8106185111bd202b3b", "score": "0.608749", "text": "async function getZipCode(user) {\n\treturn new Promise((resolve, reject) => {\n\t\tgetCurrentPosition()\n\t\t\t.then(position => {\n\t\t\t\t// resolve the zipCode\n\t\t\t\tresolve(position.address.postalCode);\n\t\t\t})\n\t\t\t.catch(error => {\n\t\t\t\tconsole.log('Position not found. Trying from the database now...');\n\t\t\t\tif (user.zipCode){\n\t\t\t\t\tresolve(user.zipCode);\n\t\t\t\t} else {\n\t\t\t\t\treject(error);\n\t\t\t\t}\n\n\t\t\t})\n\t});\n}", "title": "" }, { "docid": "55497d132e1935f3bc2b8ca501754aae", "score": "0.60810006", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.469606250000000E+02, -0.123329388000000E+03),\n new google.maps.LatLng( 0.469595350000000E+02, -0.123325456000000E+03),\n new google.maps.LatLng( 0.469576390000000E+02, -0.123324137000000E+03),\n new google.maps.LatLng( 0.469567470000000E+02, -0.123326780000000E+03),\n new google.maps.LatLng( 0.469606250000000E+02, -0.123329388000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "a0d298c128aab13e6107873b26d5cce4", "score": "0.60658014", "text": "function getLocation() {\n\n // get zip code input\n zip = document.getElementById( 'zip' ).value;\n \n // geocode zipcode using GeoName's API\n locateScript = document.createElement('script');\n locateScript.src = \"http://api.geonames.org/postalCodeLookupJSON?postalcode=\" + zip + \"&country=US&username=isaac86hatch&callback=geonamesCallback\";\n locateScript.async = true;\n document.getElementsByTagName( 'head' )[ 0 ].appendChild(locateScript);\n}", "title": "" }, { "docid": "c4d363b114d84ab8c15a0ad0772a3aa0", "score": "0.6040138", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.459624030000000E+02, -0.122336849000000E+03),\n new google.maps.LatLng( 0.459617400000000E+02, -0.122337438000000E+03),\n new google.maps.LatLng( 0.459592010000000E+02, -0.122343534000000E+03),\n new google.maps.LatLng( 0.459578280000000E+02, -0.122350285000000E+03),\n new google.maps.LatLng( 0.459565700000000E+02, -0.122351464000000E+03),\n new google.maps.LatLng( 0.459537810000000E+02, -0.122350840000000E+03),\n new google.maps.LatLng( 0.459537810000000E+02, -0.122350840000000E+03),\n new google.maps.LatLng( 0.459551070000000E+02, -0.122352020000000E+03),\n new google.maps.LatLng( 0.459575950000000E+02, -0.122361166000000E+03),\n new google.maps.LatLng( 0.459592170000000E+02, -0.122363692000000E+03),\n new google.maps.LatLng( 0.459614340000000E+02, -0.122364711000000E+03),\n new google.maps.LatLng( 0.459614560000000E+02, -0.122367399000000E+03),\n new google.maps.LatLng( 0.459605850000000E+02, -0.122372118000000E+03),\n new google.maps.LatLng( 0.459596010000000E+02, -0.122374608000000E+03),\n new google.maps.LatLng( 0.459596450000000E+02, -0.122376208000000E+03),\n new google.maps.LatLng( 0.459614990000000E+02, -0.122380493000000E+03),\n new google.maps.LatLng( 0.459643810000000E+02, -0.122384457000000E+03),\n new google.maps.LatLng( 0.459666250000000E+02, -0.122391502000000E+03),\n new google.maps.LatLng( 0.459667870000000E+02, -0.122396747000000E+03),\n new google.maps.LatLng( 0.459661940000000E+02, -0.122400355000000E+03),\n new google.maps.LatLng( 0.459676590000000E+02, -0.122406550000000E+03),\n new google.maps.LatLng( 0.459689170000000E+02, -0.122408680000000E+03),\n new google.maps.LatLng( 0.459682100000000E+02, -0.122416843000000E+03),\n new google.maps.LatLng( 0.459669760000000E+02, -0.122421400000000E+03),\n new google.maps.LatLng( 0.459692410000000E+02, -0.122438185000000E+03),\n new google.maps.LatLng( 0.459714580000000E+02, -0.122445201000000E+03),\n new google.maps.LatLng( 0.459738130000000E+02, -0.122448873000000E+03),\n new google.maps.LatLng( 0.459773550000000E+02, -0.122459956000000E+03),\n new google.maps.LatLng( 0.459781300000000E+02, -0.122469991000000E+03),\n new google.maps.LatLng( 0.459798180000000E+02, -0.122479566000000E+03),\n new google.maps.LatLng( 0.459793150000000E+02, -0.122481959000000E+03),\n new google.maps.LatLng( 0.459799500000000E+02, -0.122493699000000E+03),\n new google.maps.LatLng( 0.459787590000000E+02, -0.122497501000000E+03),\n new google.maps.LatLng( 0.459778450000000E+02, -0.122497828000000E+03),\n new google.maps.LatLng( 0.459775700000000E+02, -0.122497500000000E+03),\n new google.maps.LatLng( 0.459776410000000E+02, -0.122494024000000E+03),\n new google.maps.LatLng( 0.459770000000000E+02, -0.122496056000000E+03),\n new google.maps.LatLng( 0.459768940000000E+02, -0.122501211000000E+03),\n new google.maps.LatLng( 0.459781720000000E+02, -0.122523054000000E+03),\n new google.maps.LatLng( 0.459682100000000E+02, -0.122540141000000E+03),\n new google.maps.LatLng( 0.459670440000000E+02, -0.122541518000000E+03),\n new google.maps.LatLng( 0.459642400000000E+02, -0.122543359000000E+03),\n new google.maps.LatLng( 0.459642400000000E+02, -0.122543359000000E+03),\n new google.maps.LatLng( 0.459611250000000E+02, -0.122545716000000E+03),\n new google.maps.LatLng( 0.459524160000000E+02, -0.122558665000000E+03),\n new google.maps.LatLng( 0.459517310000000E+02, -0.122560336000000E+03),\n new google.maps.LatLng( 0.459514340000000E+02, -0.122565908000000E+03),\n new google.maps.LatLng( 0.459520510000000E+02, -0.122572036000000E+03),\n new google.maps.LatLng( 0.459541530000000E+02, -0.122577576000000E+03),\n new google.maps.LatLng( 0.459543130000000E+02, -0.122580591000000E+03),\n new google.maps.LatLng( 0.459525290000000E+02, -0.122585179000000E+03),\n new google.maps.LatLng( 0.459486420000000E+02, -0.122588880000000E+03),\n new google.maps.LatLng( 0.459449360000000E+02, -0.122600381000000E+03),\n new google.maps.LatLng( 0.459422380000000E+02, -0.122603557000000E+03),\n new google.maps.LatLng( 0.459398140000000E+02, -0.122605554000000E+03),\n new google.maps.LatLng( 0.459351920000000E+02, -0.122614463000000E+03),\n new google.maps.LatLng( 0.459359450000000E+02, -0.122618886000000E+03),\n new google.maps.LatLng( 0.459353240000000E+02, -0.122628591000000E+03),\n new google.maps.LatLng( 0.459362430000000E+02, -0.122636715000000E+03),\n new google.maps.LatLng( 0.459377030000000E+02, -0.122643172000000E+03),\n new google.maps.LatLng( 0.459376500000000E+02, -0.122639074000000E+03),\n new google.maps.LatLng( 0.459372170000000E+02, -0.122636175000000E+03),\n new google.maps.LatLng( 0.459360340000000E+02, -0.122629770000000E+03),\n new google.maps.LatLng( 0.459370190000000E+02, -0.122619576000000E+03),\n new google.maps.LatLng( 0.459357410000000E+02, -0.122614594000000E+03),\n new google.maps.LatLng( 0.459408430000000E+02, -0.122605490000000E+03),\n new google.maps.LatLng( 0.459427180000000E+02, -0.122604213000000E+03),\n new google.maps.LatLng( 0.459456220000000E+02, -0.122600053000000E+03),\n new google.maps.LatLng( 0.459487790000000E+02, -0.122590224000000E+03),\n new google.maps.LatLng( 0.459496020000000E+02, -0.122588979000000E+03),\n new google.maps.LatLng( 0.459514540000000E+02, -0.122587735000000E+03),\n new google.maps.LatLng( 0.459537860000000E+02, -0.122584524000000E+03),\n new google.maps.LatLng( 0.459549990000000E+02, -0.122580853000000E+03),\n new google.maps.LatLng( 0.459550680000000E+02, -0.122579247000000E+03),\n new google.maps.LatLng( 0.459550680000000E+02, -0.122579247000000E+03),\n new google.maps.LatLng( 0.459541540000000E+02, -0.122574986000000E+03),\n new google.maps.LatLng( 0.459530110000000E+02, -0.122572758000000E+03),\n new google.maps.LatLng( 0.459519370000000E+02, -0.122565547000000E+03),\n new google.maps.LatLng( 0.459520050000000E+02, -0.122562204000000E+03),\n new google.maps.LatLng( 0.459527590000000E+02, -0.122559615000000E+03),\n new google.maps.LatLng( 0.459534910000000E+02, -0.122558468000000E+03),\n new google.maps.LatLng( 0.459565080000000E+02, -0.122556862000000E+03),\n new google.maps.LatLng( 0.459572170000000E+02, -0.122558173000000E+03),\n new google.maps.LatLng( 0.459574000000000E+02, -0.122559910000000E+03),\n new google.maps.LatLng( 0.459587260000000E+02, -0.122560139000000E+03),\n new google.maps.LatLng( 0.459648750000000E+02, -0.122551058000000E+03),\n new google.maps.LatLng( 0.459714340000000E+02, -0.122546270000000E+03),\n new google.maps.LatLng( 0.459731260000000E+02, -0.122544237000000E+03),\n new google.maps.LatLng( 0.459753420000000E+02, -0.122539777000000E+03),\n new google.maps.LatLng( 0.459791600000000E+02, -0.122537448000000E+03),\n new google.maps.LatLng( 0.459806680000000E+02, -0.122535938000000E+03),\n new google.maps.LatLng( 0.459828160000000E+02, -0.122532429000000E+03),\n new google.maps.LatLng( 0.459839580000000E+02, -0.122529018000000E+03),\n new google.maps.LatLng( 0.459851220000000E+02, -0.122524426000000E+03),\n new google.maps.LatLng( 0.459856690000000E+02, -0.122518621000000E+03),\n new google.maps.LatLng( 0.459919490000000E+02, -0.122497548000000E+03),\n new google.maps.LatLng( 0.459914510000000E+02, -0.122486855000000E+03),\n new google.maps.LatLng( 0.459896000000000E+02, -0.122485378000000E+03),\n new google.maps.LatLng( 0.459889830000000E+02, -0.122483475000000E+03),\n new google.maps.LatLng( 0.459889840000000E+02, -0.122480196000000E+03),\n new google.maps.LatLng( 0.459901980000000E+02, -0.122474949000000E+03),\n new google.maps.LatLng( 0.459889420000000E+02, -0.122467963000000E+03),\n new google.maps.LatLng( 0.459881650000000E+02, -0.122467241000000E+03),\n new google.maps.LatLng( 0.459859730000000E+02, -0.122451105000000E+03),\n new google.maps.LatLng( 0.459846710000000E+02, -0.122446908000000E+03),\n new google.maps.LatLng( 0.459810370000000E+02, -0.122438349000000E+03),\n new google.maps.LatLng( 0.459800540000000E+02, -0.122437168000000E+03),\n new google.maps.LatLng( 0.459781340000000E+02, -0.122436578000000E+03),\n new google.maps.LatLng( 0.459773330000000E+02, -0.122433070000000E+03),\n new google.maps.LatLng( 0.459773100000000E+02, -0.122430841000000E+03),\n new google.maps.LatLng( 0.459803489844727E+02, -0.122421375545117E+03),\n new google.maps.LatLng( 0.459841205844727E+02, -0.122418895145117E+03),\n new google.maps.LatLng( 0.459876400000000E+02, -0.122413228000000E+03),\n new google.maps.LatLng( 0.459884620000000E+02, -0.122410440000000E+03),\n new google.maps.LatLng( 0.459883240000000E+02, -0.122407390000000E+03),\n new google.maps.LatLng( 0.459857200000000E+02, -0.122411982000000E+03),\n new google.maps.LatLng( 0.459798000000000E+02, -0.122417756000000E+03),\n new google.maps.LatLng( 0.459784520000000E+02, -0.122418150000000E+03),\n new google.maps.LatLng( 0.459781070000000E+02, -0.122410675000000E+03),\n new google.maps.LatLng( 0.459763460000000E+02, -0.122405594000000E+03),\n new google.maps.LatLng( 0.459746530000000E+02, -0.122403595000000E+03),\n new google.maps.LatLng( 0.459729570000000E+02, -0.122390743000000E+03),\n new google.maps.LatLng( 0.459733450000000E+02, -0.122388841000000E+03),\n new google.maps.LatLng( 0.459733450000000E+02, -0.122388841000000E+03),\n new google.maps.LatLng( 0.459736410000000E+02, -0.122387201000000E+03),\n new google.maps.LatLng( 0.459713300000000E+02, -0.122383663000000E+03),\n new google.maps.LatLng( 0.459714460000000E+02, -0.122386318000000E+03),\n new google.maps.LatLng( 0.459690920000000E+02, -0.122387009000000E+03),\n new google.maps.LatLng( 0.459676740000000E+02, -0.122386683000000E+03),\n new google.maps.LatLng( 0.459617040000000E+02, -0.122378854000000E+03),\n new google.maps.LatLng( 0.459609940000000E+02, -0.122376823000000E+03),\n new google.maps.LatLng( 0.459609730000000E+02, -0.122373790000000E+03),\n new google.maps.LatLng( 0.459613620000000E+02, -0.122373167000000E+03),\n new google.maps.LatLng( 0.459625510000000E+02, -0.122372841000000E+03),\n new google.maps.LatLng( 0.459632150000000E+02, -0.122369728000000E+03),\n new google.maps.LatLng( 0.459632640000000E+02, -0.122363598000000E+03),\n new google.maps.LatLng( 0.459626010000000E+02, -0.122361859000000E+03),\n new google.maps.LatLng( 0.459607720000000E+02, -0.122362447000000E+03),\n new google.maps.LatLng( 0.459580760000000E+02, -0.122359954000000E+03),\n new google.maps.LatLng( 0.459572770000000E+02, -0.122356807000000E+03),\n new google.maps.LatLng( 0.459588320000000E+02, -0.122353727000000E+03),\n new google.maps.LatLng( 0.459597270000000E+02, -0.122344091000000E+03),\n new google.maps.LatLng( 0.459627920000000E+02, -0.122337537000000E+03),\n new google.maps.LatLng( 0.459629060000000E+02, -0.122337078000000E+03),\n new google.maps.LatLng( 0.459624030000000E+02, -0.122336849000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "ab0e09aee8f06e7deeeef531781b1c48", "score": "0.60383236", "text": "function latlngAjaxCall () {\n //lookup with latlng\n // var qryURL = \"https://maps.googleapis.com/maps/api/geocode/json?latlng=40.617147,+-111.77682&key=\" + key;\n //lookup to find geometriccenter\n var placeURL = \"https://maps.googleapis.com/maps/api/geocode/json?address=\" + searchPlace + \"&location_type=GEOMETRIC_CENTER&key=\" + key;\n // var qryURL = \"https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=YOUR_API_KEY\"\n\n $.ajax({\n url: placeURL,\n method: \"GET\"\n }).then(function (response0) {\n latResults = response0.results[0].geometry.location.lat;\n lngResults = response0.results[0].geometry.location.lng;\n var latlngResults = latResults + \",+\" + lngResults;\n console.log(response0);\n console.log(latResults);\n console.log(lngResults);\n\n\n // latlngAjaxCall();\n\n // function to get zip from returned latitude and longitude results\n function zipAjaxCall () {\n //lookup with latlng\n var queryURL = \"https://maps.googleapis.com/maps/api/geocode/json?latlng=\" + latlngResults + \"&key=\" + key;\n //lookup to find geometriccenter\n // var qryURL = \"https://maps.googleapis.com/maps/api/geocode/json?address=\" + searchPlace + \"&location_type=GEOMETRIC_CENTER&key=\" + key;\n // var qryURL = \"https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=YOUR_API_KEY\"\n \n $.ajax({\n url: queryURL,\n method: \"GET\"\n }).then(function (response1) {\n for (i = 0; i < response1.results[0].address_components.length; i++) {\n if (response1.results[0].address_components[i].types = 'postal_code' && /^\\d{5}$/.test(response1.results[0].address_components[i].long_name.trim())) {\n latlngZip = response1.results[0].address_components[i].long_name;\n console.log(response1);\n\n searchZip = \"&zip=\" + latlngZip;\n \n $('#movieZIP').val(latlngZip);\n console.log(searchZip);\n \n makeAjaxCall();\n // searchZip = $('#movieZIP').val('');\n \n // } else {\n \n // console.log('still looping through zip codes.')\n }\n }\n });\n \n };\n \n zipAjaxCall();\n \n\n });\n \n }", "title": "" }, { "docid": "92e5a52ac3eba8caeea21b2d195d633c", "score": "0.6037826", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.469633256770410E+02, -0.123879974989506E+03),\n new google.maps.LatLng( 0.469653830000000E+02, -0.123879452000000E+03),\n new google.maps.LatLng( 0.469667310000000E+02, -0.123877247000000E+03),\n new google.maps.LatLng( 0.469663670000000E+02, -0.123870201000000E+03),\n new google.maps.LatLng( 0.469653860000000E+02, -0.123865159000000E+03),\n new google.maps.LatLng( 0.469609570000000E+02, -0.123855073000000E+03),\n new google.maps.LatLng( 0.469596990000000E+02, -0.123855339000000E+03),\n new google.maps.LatLng( 0.469572070000000E+02, -0.123857540000000E+03),\n new google.maps.LatLng( 0.469564290000000E+02, -0.123860010000000E+03),\n new google.maps.LatLng( 0.469571140000000E+02, -0.123862313000000E+03),\n new google.maps.LatLng( 0.469583710000000E+02, -0.123862582000000E+03),\n new google.maps.LatLng( 0.469608830000000E+02, -0.123867358000000E+03),\n new google.maps.LatLng( 0.469610540000000E+02, -0.123876136000000E+03),\n new google.maps.LatLng( 0.469610540000000E+02, -0.123876136000000E+03),\n new google.maps.LatLng( 0.469633256770410E+02, -0.123879974989506E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "77d2bd3ac9a9471f55ca40fd963d528e", "score": "0.6035683", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.483618894465872E+02, -0.122497866772949E+03),\n new google.maps.LatLng( 0.483646660000000E+02, -0.122507437000000E+03),\n new google.maps.LatLng( 0.483646699781293E+02, -0.122507442521583E+03),\n new google.maps.LatLng( 0.483646699781293E+02, -0.122507442521583E+03),\n new google.maps.LatLng( 0.483670190000000E+02, -0.122501274000000E+03),\n new google.maps.LatLng( 0.483675340000000E+02, -0.122498820000000E+03),\n new google.maps.LatLng( 0.483672370000000E+02, -0.122498340000000E+03),\n new google.maps.LatLng( 0.483631700000000E+02, -0.122498815000000E+03),\n new google.maps.LatLng( 0.483618894465872E+02, -0.122497866772949E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "631bb261a6f1837e4e1a189d05522437", "score": "0.60255843", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.473577210000000E+02, -0.122309733000000E+03),\n new google.maps.LatLng( 0.473577220000000E+02, -0.122296833000000E+03),\n new google.maps.LatLng( 0.473577220000000E+02, -0.122296833000000E+03),\n new google.maps.LatLng( 0.473546950000000E+02, -0.122297041000000E+03),\n new google.maps.LatLng( 0.473455090000000E+02, -0.122292902000000E+03),\n new google.maps.LatLng( 0.473232000000000E+02, -0.122293846000000E+03),\n new google.maps.LatLng( 0.473207840000000E+02, -0.122294397000000E+03),\n new google.maps.LatLng( 0.473008220000000E+02, -0.122302232000000E+03),\n new google.maps.LatLng( 0.473007220000000E+02, -0.122300332000000E+03),\n new google.maps.LatLng( 0.473020760000000E+02, -0.122298585000000E+03),\n new google.maps.LatLng( 0.473021400000000E+02, -0.122296273000000E+03),\n new google.maps.LatLng( 0.472985880000000E+02, -0.122291742000000E+03),\n new google.maps.LatLng( 0.472870850000000E+02, -0.122292048000000E+03),\n new google.maps.LatLng( 0.472845220000000E+02, -0.122293532000000E+03),\n new google.maps.LatLng( 0.472843020000000E+02, -0.122297745000000E+03),\n new google.maps.LatLng( 0.472793220000000E+02, -0.122297132000000E+03),\n new google.maps.LatLng( 0.472793220000000E+02, -0.122291932000000E+03),\n new google.maps.LatLng( 0.472722220000000E+02, -0.122292032000000E+03),\n new google.maps.LatLng( 0.472721470000000E+02, -0.122297988000000E+03),\n new google.maps.LatLng( 0.472715240000000E+02, -0.122298111000000E+03),\n new google.maps.LatLng( 0.472621220000000E+02, -0.122297632000000E+03),\n new google.maps.LatLng( 0.472579480000000E+02, -0.122295401000000E+03),\n new google.maps.LatLng( 0.472579480000000E+02, -0.122295401000000E+03),\n new google.maps.LatLng( 0.472579730000000E+02, -0.122297889000000E+03),\n new google.maps.LatLng( 0.472598050000000E+02, -0.122298340000000E+03),\n new google.maps.LatLng( 0.472613380000000E+02, -0.122299820000000E+03),\n new google.maps.LatLng( 0.472617970000000E+02, -0.122314852000000E+03),\n new google.maps.LatLng( 0.472611510000000E+02, -0.122316174000000E+03),\n new google.maps.LatLng( 0.472579940000000E+02, -0.122318115000000E+03),\n new google.maps.LatLng( 0.472579220000000E+02, -0.122333632000000E+03),\n new google.maps.LatLng( 0.472579220000000E+02, -0.122333632000000E+03),\n new google.maps.LatLng( 0.472579220000000E+02, -0.122334532000000E+03),\n new google.maps.LatLng( 0.472615220000000E+02, -0.122334632000000E+03),\n new google.maps.LatLng( 0.472643220000000E+02, -0.122335432000000E+03),\n new google.maps.LatLng( 0.472643220000000E+02, -0.122335432000000E+03),\n new google.maps.LatLng( 0.472665220000000E+02, -0.122334433000000E+03),\n new google.maps.LatLng( 0.472790160000000E+02, -0.122334306000000E+03),\n new google.maps.LatLng( 0.472851340000000E+02, -0.122334729000000E+03),\n new google.maps.LatLng( 0.472903680000000E+02, -0.122334188000000E+03),\n new google.maps.LatLng( 0.472926700000000E+02, -0.122335588000000E+03),\n new google.maps.LatLng( 0.472936640000000E+02, -0.122337495000000E+03),\n new google.maps.LatLng( 0.472949080000000E+02, -0.122342057000000E+03),\n new google.maps.LatLng( 0.472959530000000E+02, -0.122343384000000E+03),\n new google.maps.LatLng( 0.472972810000000E+02, -0.122343812000000E+03),\n new google.maps.LatLng( 0.473037680000000E+02, -0.122331158000000E+03),\n new google.maps.LatLng( 0.473052350000000E+02, -0.122333405000000E+03),\n new google.maps.LatLng( 0.473073820000000E+02, -0.122334595000000E+03),\n new google.maps.LatLng( 0.473166280000000E+02, -0.122334733000000E+03),\n new google.maps.LatLng( 0.473225210000000E+02, -0.122334033000000E+03),\n new google.maps.LatLng( 0.473228210000000E+02, -0.122342233000000E+03),\n new google.maps.LatLng( 0.473257210000000E+02, -0.122343134000000E+03),\n new google.maps.LatLng( 0.473258210000000E+02, -0.122334633000000E+03),\n new google.maps.LatLng( 0.473403210000000E+02, -0.122334334000000E+03),\n new google.maps.LatLng( 0.473411210000000E+02, -0.122334234000000E+03),\n new google.maps.LatLng( 0.473420210000000E+02, -0.122334234000000E+03),\n new google.maps.LatLng( 0.473420210000000E+02, -0.122334234000000E+03),\n new google.maps.LatLng( 0.473430100000000E+02, -0.122333010000000E+03),\n new google.maps.LatLng( 0.473466210000000E+02, -0.122325233000000E+03),\n new google.maps.LatLng( 0.473474040000000E+02, -0.122321316000000E+03),\n new google.maps.LatLng( 0.473522440000000E+02, -0.122321333000000E+03),\n new google.maps.LatLng( 0.473546210000000E+02, -0.122321833000000E+03),\n new google.maps.LatLng( 0.473561100000000E+02, -0.122320618000000E+03),\n new google.maps.LatLng( 0.473565490000000E+02, -0.122319168000000E+03),\n new google.maps.LatLng( 0.473565490000000E+02, -0.122319168000000E+03),\n new google.maps.LatLng( 0.473564690000000E+02, -0.122317402000000E+03),\n new google.maps.LatLng( 0.473536810000000E+02, -0.122317469000000E+03),\n new google.maps.LatLng( 0.473526210000000E+02, -0.122316833000000E+03),\n new google.maps.LatLng( 0.473527880000000E+02, -0.122311963000000E+03),\n new google.maps.LatLng( 0.473577210000000E+02, -0.122309733000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "0082ecaa975b81dd2896aed0abbd224a", "score": "0.6017301", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.464734970000000E+02, -0.123968044000000E+03),\n new google.maps.LatLng( 0.464710910505859E+02, -0.123966798456836E+03),\n new google.maps.LatLng( 0.464666160000000E+02, -0.123968641000000E+03),\n new google.maps.LatLng( 0.464656100000000E+02, -0.123969632000000E+03),\n new google.maps.LatLng( 0.464667310000000E+02, -0.123966524000000E+03),\n new google.maps.LatLng( 0.464718740000000E+02, -0.123964078000000E+03),\n new google.maps.LatLng( 0.464722860000000E+02, -0.123963748000000E+03),\n new google.maps.LatLng( 0.464722170000000E+02, -0.123962325000000E+03),\n new google.maps.LatLng( 0.464700470000000E+02, -0.123954054000000E+03),\n new google.maps.LatLng( 0.464657970000000E+02, -0.123945188000000E+03),\n new google.maps.LatLng( 0.464632600000000E+02, -0.123942806000000E+03),\n new google.maps.LatLng( 0.464577280000000E+02, -0.123942936000000E+03),\n new google.maps.LatLng( 0.464517390000000E+02, -0.123948326000000E+03),\n new google.maps.LatLng( 0.464475560000000E+02, -0.123947962000000E+03),\n new google.maps.LatLng( 0.464447680000000E+02, -0.123947168000000E+03),\n new google.maps.LatLng( 0.464428480000000E+02, -0.123945547000000E+03),\n new google.maps.LatLng( 0.464393960000000E+02, -0.123944190000000E+03),\n new google.maps.LatLng( 0.464316930000000E+02, -0.123946404000000E+03),\n new google.maps.LatLng( 0.464263910000000E+02, -0.123943065000000E+03),\n new google.maps.LatLng( 0.464247910000000E+02, -0.123940652000000E+03),\n new google.maps.LatLng( 0.464235110000000E+02, -0.123937048000000E+03),\n new google.maps.LatLng( 0.464206080000000E+02, -0.123935792000000E+03),\n new google.maps.LatLng( 0.464176820000000E+02, -0.123936255000000E+03),\n new google.maps.LatLng( 0.464118540000000E+02, -0.123939791000000E+03),\n new google.maps.LatLng( 0.464111680000000E+02, -0.123940782000000E+03),\n new google.maps.LatLng( 0.464104820000000E+02, -0.123943855000000E+03),\n new google.maps.LatLng( 0.464089940000000E+02, -0.123958262000000E+03),\n new google.maps.LatLng( 0.464091980000000E+02, -0.123964177000000E+03),\n new google.maps.LatLng( 0.464104320000000E+02, -0.123966195000000E+03),\n new google.maps.LatLng( 0.464130840000000E+02, -0.123965733000000E+03),\n new google.maps.LatLng( 0.464176320000000E+02, -0.123967719000000E+03),\n new google.maps.LatLng( 0.464220660000000E+02, -0.123970398000000E+03),\n new google.maps.LatLng( 0.464238260000000E+02, -0.123970135000000E+03),\n new google.maps.LatLng( 0.464288560000000E+02, -0.123965940000000E+03),\n new google.maps.LatLng( 0.464315300000000E+02, -0.123965215000000E+03),\n new google.maps.LatLng( 0.464333590000000E+02, -0.123965646000000E+03),\n new google.maps.LatLng( 0.464377010000000E+02, -0.123969119000000E+03),\n new google.maps.LatLng( 0.464393690000000E+02, -0.123971699000000E+03),\n new google.maps.LatLng( 0.464445510000000E+02, -0.123987641000000E+03),\n new google.maps.LatLng( 0.464467210000000E+02, -0.123991181000000E+03),\n new google.maps.LatLng( 0.464497600000000E+02, -0.123993598000000E+03),\n new google.maps.LatLng( 0.464539880000000E+02, -0.123994793000000E+03),\n new google.maps.LatLng( 0.464574130000000E+02, -0.124001271000000E+03),\n new google.maps.LatLng( 0.464601725071218E+02, -0.124002767830825E+03),\n new google.maps.LatLng( 0.464601725071218E+02, -0.124002767830825E+03),\n new google.maps.LatLng( 0.464600147446524E+02, -0.124001459606945E+03),\n new google.maps.LatLng( 0.464599920000000E+02, -0.124001271000000E+03),\n new google.maps.LatLng( 0.464630190000000E+02, -0.123990615000000E+03),\n new google.maps.LatLng( 0.464657380000000E+02, -0.123990870000000E+03),\n new google.maps.LatLng( 0.464688680000000E+02, -0.123994181000000E+03),\n new google.maps.LatLng( 0.464722546939338E+02, -0.123993923598228E+03),\n new google.maps.LatLng( 0.464784701450406E+02, -0.123993451200025E+03),\n new google.maps.LatLng( 0.464886170000000E+02, -0.123992680000000E+03),\n new google.maps.LatLng( 0.464970080000000E+02, -0.123988386000000E+03),\n new google.maps.LatLng( 0.464983278793865E+02, -0.123984343761827E+03),\n new google.maps.LatLng( 0.464985420000000E+02, -0.123983688000000E+03),\n new google.maps.LatLng( 0.464984831528525E+02, -0.123983453673085E+03),\n new google.maps.LatLng( 0.464973780000000E+02, -0.123979053000000E+03),\n new google.maps.LatLng( 0.464899490000000E+02, -0.123979213000000E+03),\n new google.maps.LatLng( 0.464789663401250E+02, -0.123972897914073E+03),\n new google.maps.LatLng( 0.464753700000000E+02, -0.123970830000000E+03),\n new google.maps.LatLng( 0.464734970000000E+02, -0.123968044000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "5f2f66d4c9c078febd564ed3fe48aa96", "score": "0.601341", "text": "function lng() {\n var longitude = 0;\n for (let i = 0; i < markers.length; i++) {\n longitude += markers[i].coords.lng;\n }\n return longitude / markers.length;\n}", "title": "" }, { "docid": "f0ebfdcfeb49f83797749e8f913a13c7", "score": "0.6010993", "text": "function extractLatLng(geo) {\n let lat = 0;\n let lon = 0;\n if(_.isArray(geo)) {\n lat = geo[1];\n lon = geo[0];\n } else if (isString(geo)) {\n const split = geo.split(',');\n lat = split[0];\n lon = split[1];\n } else if (_.has(geo, 'lat') && _.has(geo, 'lon')) {\n lat = geo.lat;\n lon = geo.lon;\n }\n return L.latLng(lat, lon);\n }", "title": "" }, { "docid": "502e5fd516f9824bdd2b8cdd8c4116b2", "score": "0.600212", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.475182330000000E+02, -0.124032217000000E+03),\n new google.maps.LatLng( 0.475182500000000E+02, -0.124029879000000E+03),\n new google.maps.LatLng( 0.475182500000000E+02, -0.124029879000000E+03),\n new google.maps.LatLng( 0.475154460000000E+02, -0.124026518000000E+03),\n new google.maps.LatLng( 0.475119030000000E+02, -0.124026116000000E+03),\n new google.maps.LatLng( 0.475081560000000E+02, -0.124026860000000E+03),\n new google.maps.LatLng( 0.475047290000000E+02, -0.124030505000000E+03),\n new google.maps.LatLng( 0.475021280000000E+02, -0.124035755000000E+03),\n new google.maps.LatLng( 0.475021900000000E+02, -0.124038666000000E+03),\n new google.maps.LatLng( 0.475043840000000E+02, -0.124033940000000E+03),\n new google.maps.LatLng( 0.475060500000000E+02, -0.124031915000000E+03),\n new google.maps.LatLng( 0.475124200000000E+02, -0.124027488000000E+03),\n new google.maps.LatLng( 0.475139530000000E+02, -0.124027609000000E+03),\n new google.maps.LatLng( 0.475160900000000E+02, -0.124029134000000E+03),\n new google.maps.LatLng( 0.475182330000000E+02, -0.124032217000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "9881120ed7135276a89342842cbcc2bb", "score": "0.600118", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.477768190000000E+02, -0.122265438000000E+03),\n new google.maps.LatLng( 0.477769190000000E+02, -0.122260738000000E+03),\n new google.maps.LatLng( 0.477769190000000E+02, -0.122257838000000E+03),\n new google.maps.LatLng( 0.477766370000000E+02, -0.122227282000000E+03),\n new google.maps.LatLng( 0.477766370000000E+02, -0.122227282000000E+03),\n new google.maps.LatLng( 0.477650390000000E+02, -0.122228465000000E+03),\n new google.maps.LatLng( 0.477542090000000E+02, -0.122228530000000E+03),\n new google.maps.LatLng( 0.477528690000000E+02, -0.122221604000000E+03),\n new google.maps.LatLng( 0.477521520000000E+02, -0.122220025000000E+03),\n new google.maps.LatLng( 0.477515200000000E+02, -0.122221659000000E+03),\n new google.maps.LatLng( 0.477514200000000E+02, -0.122224336000000E+03),\n new google.maps.LatLng( 0.477506200000000E+02, -0.122224336000000E+03),\n new google.maps.LatLng( 0.477471200000000E+02, -0.122223936000000E+03),\n new google.maps.LatLng( 0.477470200000000E+02, -0.122219636000000E+03),\n new google.maps.LatLng( 0.477390430000000E+02, -0.122219028000000E+03),\n new google.maps.LatLng( 0.477330200000000E+02, -0.122222036000000E+03),\n new google.maps.LatLng( 0.477330950000000E+02, -0.122240716000000E+03),\n new google.maps.LatLng( 0.477314200000000E+02, -0.122245236000000E+03),\n new google.maps.LatLng( 0.477314200000000E+02, -0.122245236000000E+03),\n new google.maps.LatLng( 0.477376200000000E+02, -0.122250036000000E+03),\n new google.maps.LatLng( 0.477356320000000E+02, -0.122249818000000E+03),\n new google.maps.LatLng( 0.477357200000000E+02, -0.122260836000000E+03),\n new google.maps.LatLng( 0.477340200000000E+02, -0.122260836000000E+03),\n new google.maps.LatLng( 0.477342200000000E+02, -0.122265036000000E+03),\n new google.maps.LatLng( 0.477342200000000E+02, -0.122265036000000E+03),\n new google.maps.LatLng( 0.477377200000000E+02, -0.122267437000000E+03),\n new google.maps.LatLng( 0.477383200000000E+02, -0.122267337000000E+03),\n new google.maps.LatLng( 0.477387200000000E+02, -0.122266137000000E+03),\n new google.maps.LatLng( 0.477455200000000E+02, -0.122263537000000E+03),\n new google.maps.LatLng( 0.477502200000000E+02, -0.122258236000000E+03),\n new google.maps.LatLng( 0.477517200000000E+02, -0.122258337000000E+03),\n new google.maps.LatLng( 0.477526200000000E+02, -0.122255136000000E+03),\n new google.maps.LatLng( 0.477542200000000E+02, -0.122252536000000E+03),\n new google.maps.LatLng( 0.477543200000000E+02, -0.122249936000000E+03),\n new google.maps.LatLng( 0.477546200000000E+02, -0.122255537000000E+03),\n new google.maps.LatLng( 0.477558200000000E+02, -0.122257237000000E+03),\n new google.maps.LatLng( 0.477574200000000E+02, -0.122254737000000E+03),\n new google.maps.LatLng( 0.477562200000000E+02, -0.122257737000000E+03),\n new google.maps.LatLng( 0.477564200000000E+02, -0.122262437000000E+03),\n new google.maps.LatLng( 0.477564200000000E+02, -0.122262437000000E+03),\n new google.maps.LatLng( 0.477575200000000E+02, -0.122261737000000E+03),\n new google.maps.LatLng( 0.477581200000000E+02, -0.122262337000000E+03),\n new google.maps.LatLng( 0.477586200000000E+02, -0.122268537000000E+03),\n new google.maps.LatLng( 0.477593100000000E+02, -0.122270635000000E+03),\n new google.maps.LatLng( 0.477648190000000E+02, -0.122271938000000E+03),\n new google.maps.LatLng( 0.477660190000000E+02, -0.122271938000000E+03),\n new google.maps.LatLng( 0.477661190000000E+02, -0.122267038000000E+03),\n new google.maps.LatLng( 0.477708190000000E+02, -0.122263938000000E+03),\n new google.maps.LatLng( 0.477768190000000E+02, -0.122265438000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "66bab040b890871cc892d8bd7cf9c998", "score": "0.60009456", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.480720280000000E+02, -0.122111754000000E+03),\n new google.maps.LatLng( 0.480534600000000E+02, -0.122111301000000E+03),\n new google.maps.LatLng( 0.480534600000000E+02, -0.122111301000000E+03),\n new google.maps.LatLng( 0.480535800000000E+02, -0.122119643000000E+03),\n new google.maps.LatLng( 0.480357950000000E+02, -0.122119993000000E+03),\n new google.maps.LatLng( 0.480358410000000E+02, -0.122123945000000E+03),\n new google.maps.LatLng( 0.480344830000000E+02, -0.122124891000000E+03),\n new google.maps.LatLng( 0.480217340000000E+02, -0.122124936000000E+03),\n new google.maps.LatLng( 0.480200330000000E+02, -0.122129482000000E+03),\n new google.maps.LatLng( 0.480200180000000E+02, -0.122130842000000E+03),\n new google.maps.LatLng( 0.480217270000000E+02, -0.122135541000000E+03),\n new google.maps.LatLng( 0.480217880000000E+02, -0.122145246000000E+03),\n new google.maps.LatLng( 0.480217880000000E+02, -0.122145246000000E+03),\n new google.maps.LatLng( 0.480256790000000E+02, -0.122149046000000E+03),\n new google.maps.LatLng( 0.480292110000000E+02, -0.122151045000000E+03),\n new google.maps.LatLng( 0.480298440000000E+02, -0.122156935000000E+03),\n new google.maps.LatLng( 0.480311180000000E+02, -0.122156722000000E+03),\n new google.maps.LatLng( 0.480325150000000E+02, -0.122155135000000E+03),\n new google.maps.LatLng( 0.480340180000000E+02, -0.122155638000000E+03),\n new google.maps.LatLng( 0.480349790000000E+02, -0.122158080000000E+03),\n new google.maps.LatLng( 0.480355210000000E+02, -0.122161956000000E+03),\n new google.maps.LatLng( 0.480391230000000E+02, -0.122167718000000E+03),\n new google.maps.LatLng( 0.480417610000000E+02, -0.122164886000000E+03),\n new google.maps.LatLng( 0.480417610000000E+02, -0.122163528000000E+03),\n new google.maps.LatLng( 0.480402460000000E+02, -0.122160869000000E+03),\n new google.maps.LatLng( 0.480410680000000E+02, -0.122161654000000E+03),\n new google.maps.LatLng( 0.480418740000000E+02, -0.122163583000000E+03),\n new google.maps.LatLng( 0.480417390000000E+02, -0.122165356000000E+03),\n new google.maps.LatLng( 0.480406200000000E+02, -0.122167456000000E+03),\n new google.maps.LatLng( 0.480413570000000E+02, -0.122167465000000E+03),\n new google.maps.LatLng( 0.480431200000000E+02, -0.122166320000000E+03),\n new google.maps.LatLng( 0.480441860000000E+02, -0.122165073000000E+03),\n new google.maps.LatLng( 0.480428470000000E+02, -0.122166880000000E+03),\n new google.maps.LatLng( 0.480392470000000E+02, -0.122168412000000E+03),\n new google.maps.LatLng( 0.480381520000000E+02, -0.122170523000000E+03),\n new google.maps.LatLng( 0.480379830000000E+02, -0.122171904000000E+03),\n new google.maps.LatLng( 0.480383110000000E+02, -0.122172975000000E+03),\n new google.maps.LatLng( 0.480434290000000E+02, -0.122174439000000E+03),\n new google.maps.LatLng( 0.480464930000000E+02, -0.122176987000000E+03),\n new google.maps.LatLng( 0.480473990000000E+02, -0.122180427000000E+03),\n new google.maps.LatLng( 0.480474910000000E+02, -0.122183960000000E+03),\n new google.maps.LatLng( 0.480474910000000E+02, -0.122183960000000E+03),\n new google.maps.LatLng( 0.480554490000000E+02, -0.122184830000000E+03),\n new google.maps.LatLng( 0.480973350000000E+02, -0.122185015000000E+03),\n new google.maps.LatLng( 0.480950000000000E+02, -0.122180544000000E+03),\n new google.maps.LatLng( 0.480927190000000E+02, -0.122180331000000E+03),\n new google.maps.LatLng( 0.480899410000000E+02, -0.122182421000000E+03),\n new google.maps.LatLng( 0.480882170000000E+02, -0.122181567000000E+03),\n new google.maps.LatLng( 0.480844780000000E+02, -0.122175935000000E+03),\n new google.maps.LatLng( 0.480882560000000E+02, -0.122169511000000E+03),\n new google.maps.LatLng( 0.480900260000000E+02, -0.122167848000000E+03),\n new google.maps.LatLng( 0.480913540000000E+02, -0.122167421000000E+03),\n new google.maps.LatLng( 0.480923580000000E+02, -0.122166025000000E+03),\n new google.maps.LatLng( 0.480917200000000E+02, -0.122146059000000E+03),\n new google.maps.LatLng( 0.480918720000000E+02, -0.122121995000000E+03),\n new google.maps.LatLng( 0.480918720000000E+02, -0.122121995000000E+03),\n new google.maps.LatLng( 0.480917880000000E+02, -0.122112274000000E+03),\n new google.maps.LatLng( 0.480720280000000E+02, -0.122111754000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "cced0be546dacef64d1783c3b1a59cb1", "score": "0.5998534", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.478060390000000E+02, -0.119983800000000E+03),\n new google.maps.LatLng( 0.478038230000000E+02, -0.119984849000000E+03),\n new google.maps.LatLng( 0.478030920000000E+02, -0.119983696000000E+03),\n new google.maps.LatLng( 0.478027730000000E+02, -0.119981899000000E+03),\n new google.maps.LatLng( 0.478014940000000E+02, -0.119981694000000E+03),\n new google.maps.LatLng( 0.477954400000000E+02, -0.119985756000000E+03),\n new google.maps.LatLng( 0.477936570000000E+02, -0.119988500000000E+03),\n new google.maps.LatLng( 0.477879230000000E+02, -0.119992663000000E+03),\n new google.maps.LatLng( 0.477857300000000E+02, -0.119993169000000E+03),\n new google.maps.LatLng( 0.477839480000000E+02, -0.119994285000000E+03),\n new google.maps.LatLng( 0.477825750000000E+02, -0.119996046000000E+03),\n new google.maps.LatLng( 0.477810890000000E+02, -0.119999535000000E+03),\n new google.maps.LatLng( 0.477807690000000E+02, -0.120003230000000E+03),\n new google.maps.LatLng( 0.477805840000000E+02, -0.120019970000000E+03),\n new google.maps.LatLng( 0.477805840000000E+02, -0.120019970000000E+03),\n new google.maps.LatLng( 0.477816260000000E+02, -0.120019567000000E+03),\n new google.maps.LatLng( 0.477828420000000E+02, -0.120011529000000E+03),\n new google.maps.LatLng( 0.477887870000000E+02, -0.120004146000000E+03),\n new google.maps.LatLng( 0.477955740000000E+02, -0.119997094000000E+03),\n new google.maps.LatLng( 0.477968800000000E+02, -0.119995997000000E+03),\n new google.maps.LatLng( 0.477962560000000E+02, -0.119998740000000E+03),\n new google.maps.LatLng( 0.477975790000000E+02, -0.120003508000000E+03),\n new google.maps.LatLng( 0.478065350000000E+02, -0.119996922000000E+03),\n new google.maps.LatLng( 0.478116300000000E+02, -0.119992079000000E+03),\n new google.maps.LatLng( 0.478088250000000E+02, -0.119984413000000E+03),\n new google.maps.LatLng( 0.478072260000000E+02, -0.119983225000000E+03),\n new google.maps.LatLng( 0.478064730000000E+02, -0.119983563000000E+03),\n new google.maps.LatLng( 0.478060390000000E+02, -0.119983800000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "e81f002a3cc0ffc693a2b1474a6b8ea7", "score": "0.5997523", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.477777190000000E+02, -0.122361541000000E+03),\n new google.maps.LatLng( 0.477777190000000E+02, -0.122356141000000E+03),\n new google.maps.LatLng( 0.477777190000000E+02, -0.122356141000000E+03),\n new google.maps.LatLng( 0.477776190000000E+02, -0.122329940000000E+03),\n new google.maps.LatLng( 0.477776190000000E+02, -0.122329940000000E+03),\n new google.maps.LatLng( 0.477617589488281E+02, -0.122329058849219E+03),\n new google.maps.LatLng( 0.477616989488281E+02, -0.122328278849219E+03),\n new google.maps.LatLng( 0.477595190000000E+02, -0.122326839000000E+03),\n new google.maps.LatLng( 0.477631190000000E+02, -0.122326839000000E+03),\n new google.maps.LatLng( 0.477631190000000E+02, -0.122323639000000E+03),\n new google.maps.LatLng( 0.477603350000000E+02, -0.122325319000000E+03),\n new google.maps.LatLng( 0.477567580000000E+02, -0.122329193000000E+03),\n new google.maps.LatLng( 0.477534190000000E+02, -0.122330239000000E+03),\n new google.maps.LatLng( 0.477471410000000E+02, -0.122329191000000E+03),\n new google.maps.LatLng( 0.477340190000000E+02, -0.122328839000000E+03),\n new google.maps.LatLng( 0.477340190000000E+02, -0.122328839000000E+03),\n new google.maps.LatLng( 0.477014200000000E+02, -0.122328338000000E+03),\n new google.maps.LatLng( 0.477014200000000E+02, -0.122328338000000E+03),\n new google.maps.LatLng( 0.477014200000000E+02, -0.122329538000000E+03),\n new google.maps.LatLng( 0.477014200000000E+02, -0.122329538000000E+03),\n new google.maps.LatLng( 0.477015200000000E+02, -0.122357839000000E+03),\n new google.maps.LatLng( 0.477015200000000E+02, -0.122357839000000E+03),\n new google.maps.LatLng( 0.477322190000000E+02, -0.122358340000000E+03),\n new google.maps.LatLng( 0.477340190000000E+02, -0.122355740000000E+03),\n new google.maps.LatLng( 0.477375190000000E+02, -0.122355740000000E+03),\n new google.maps.LatLng( 0.477413190000000E+02, -0.122355840000000E+03),\n new google.maps.LatLng( 0.477413190000000E+02, -0.122358840000000E+03),\n new google.maps.LatLng( 0.477443190000000E+02, -0.122358840000000E+03),\n new google.maps.LatLng( 0.477449190000000E+02, -0.122358740000000E+03),\n new google.maps.LatLng( 0.477449190000000E+02, -0.122355840000000E+03),\n new google.maps.LatLng( 0.477497190000000E+02, -0.122355036000000E+03),\n new google.maps.LatLng( 0.477502720000000E+02, -0.122356117000000E+03),\n new google.maps.LatLng( 0.477537360000000E+02, -0.122359405000000E+03),\n new google.maps.LatLng( 0.477560190000000E+02, -0.122358640000000E+03),\n new google.maps.LatLng( 0.477651190000000E+02, -0.122358641000000E+03),\n new google.maps.LatLng( 0.477740490000000E+02, -0.122357639000000E+03),\n new google.maps.LatLng( 0.477765190000000E+02, -0.122357941000000E+03),\n new google.maps.LatLng( 0.477766190000000E+02, -0.122361441000000E+03),\n new google.maps.LatLng( 0.477777190000000E+02, -0.122361541000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "41beabf2d62b3e1e8ae2ad51a2f7ec1e", "score": "0.5996874", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.475220600000000E+02, -0.122958467000000E+03),\n new google.maps.LatLng( 0.475191120000000E+02, -0.122957116000000E+03),\n new google.maps.LatLng( 0.475083940000000E+02, -0.122954480000000E+03),\n new google.maps.LatLng( 0.475002400000000E+02, -0.122959081000000E+03),\n new google.maps.LatLng( 0.474994170000000E+02, -0.122958558000000E+03),\n new google.maps.LatLng( 0.474992910000000E+02, -0.122956501000000E+03),\n new google.maps.LatLng( 0.475031600000000E+02, -0.122953636000000E+03),\n new google.maps.LatLng( 0.475037540000000E+02, -0.122952354000000E+03),\n new google.maps.LatLng( 0.474989260000000E+02, -0.122950936000000E+03),\n new google.maps.LatLng( 0.474909500000000E+02, -0.122951946000000E+03),\n new google.maps.LatLng( 0.474895330000000E+02, -0.122950360000000E+03),\n new google.maps.LatLng( 0.474919560000000E+02, -0.122947832000000E+03),\n new google.maps.LatLng( 0.474954300000000E+02, -0.122942302000000E+03),\n new google.maps.LatLng( 0.474950570000000E+02, -0.122941262000000E+03),\n new google.maps.LatLng( 0.474773510000000E+02, -0.122945773000000E+03),\n new google.maps.LatLng( 0.474757740000000E+02, -0.122948402000000E+03),\n new google.maps.LatLng( 0.474755680000000E+02, -0.122949683000000E+03),\n new google.maps.LatLng( 0.474762440000000E+02, -0.122963836000000E+03),\n new google.maps.LatLng( 0.474723880000000E+02, -0.122969031000000E+03),\n new google.maps.LatLng( 0.474707420000000E+02, -0.122969805000000E+03),\n new google.maps.LatLng( 0.474702170000000E+02, -0.122967682000000E+03),\n new google.maps.LatLng( 0.474608700000000E+02, -0.122967137000000E+03),\n new google.maps.LatLng( 0.474589050000000E+02, -0.122964878000000E+03),\n new google.maps.LatLng( 0.474538090000000E+02, -0.122961202000000E+03),\n new google.maps.LatLng( 0.474499460000000E+02, -0.122961066000000E+03),\n new google.maps.LatLng( 0.474419710000000E+02, -0.122958300000000E+03),\n new google.maps.LatLng( 0.474360300000000E+02, -0.122952065000000E+03),\n new google.maps.LatLng( 0.474314360000000E+02, -0.122949908000000E+03),\n new google.maps.LatLng( 0.474292870000000E+02, -0.122952670000000E+03),\n new google.maps.LatLng( 0.474283950000000E+02, -0.122956981000000E+03),\n new google.maps.LatLng( 0.474245770000000E+02, -0.122963177000000E+03),\n new google.maps.LatLng( 0.474246680000000E+02, -0.122965399000000E+03),\n new google.maps.LatLng( 0.474207120000000E+02, -0.122972873000000E+03),\n new google.maps.LatLng( 0.474188150000000E+02, -0.122974522000000E+03),\n new google.maps.LatLng( 0.474179460000000E+02, -0.122976878000000E+03),\n new google.maps.LatLng( 0.474162060000000E+02, -0.122984353000000E+03),\n new google.maps.LatLng( 0.474172350000000E+02, -0.122988578000000E+03),\n new google.maps.LatLng( 0.474167510000000E+02, -0.122991324000000E+03),\n new google.maps.LatLng( 0.474139580000000E+02, -0.123000547000000E+03),\n new google.maps.LatLng( 0.474108520000000E+02, -0.123006494000000E+03),\n new google.maps.LatLng( 0.474004090000000E+02, -0.123009097000000E+03),\n new google.maps.LatLng( 0.473981690000000E+02, -0.123009032000000E+03),\n new google.maps.LatLng( 0.473941260000000E+02, -0.123013917000000E+03),\n new google.maps.LatLng( 0.473918650000000E+02, -0.123019135000000E+03),\n new google.maps.LatLng( 0.473843710000000E+02, -0.123025737000000E+03),\n new google.maps.LatLng( 0.473800300000000E+02, -0.123030350000000E+03),\n new google.maps.LatLng( 0.473758040000000E+02, -0.123038764000000E+03),\n new google.maps.LatLng( 0.473758040000000E+02, -0.123038764000000E+03),\n new google.maps.LatLng( 0.473739270000000E+02, -0.123041457000000E+03),\n new google.maps.LatLng( 0.473742470000000E+02, -0.123044451000000E+03),\n new google.maps.LatLng( 0.473753090000000E+02, -0.123046537000000E+03),\n new google.maps.LatLng( 0.473742930000000E+02, -0.123050204000000E+03),\n new google.maps.LatLng( 0.473723960000000E+02, -0.123052190000000E+03),\n new google.maps.LatLng( 0.473703400000000E+02, -0.123052426000000E+03),\n new google.maps.LatLng( 0.473693110000000E+02, -0.123054512000000E+03),\n new google.maps.LatLng( 0.473697000000000E+02, -0.123061712000000E+03),\n new google.maps.LatLng( 0.473729680000000E+02, -0.123075338000000E+03),\n new google.maps.LatLng( 0.473751820000000E+02, -0.123082437000000E+03),\n new google.maps.LatLng( 0.473751710000000E+02, -0.123084725000000E+03),\n new google.maps.LatLng( 0.473735370000000E+02, -0.123089099000000E+03),\n new google.maps.LatLng( 0.473739230000000E+02, -0.123096669000000E+03),\n new google.maps.LatLng( 0.473728690000000E+02, -0.123104575000000E+03),\n new google.maps.LatLng( 0.473733930000000E+02, -0.123110598000000E+03),\n new google.maps.LatLng( 0.473739180000000E+02, -0.123111944000000E+03),\n new google.maps.LatLng( 0.473757490000000E+02, -0.123113998000000E+03),\n new google.maps.LatLng( 0.473798400000000E+02, -0.123113059000000E+03),\n new google.maps.LatLng( 0.473858740000000E+02, -0.123114007000000E+03),\n new google.maps.LatLng( 0.473876790000000E+02, -0.123115895000000E+03),\n new google.maps.LatLng( 0.473921350000000E+02, -0.123117346000000E+03),\n new google.maps.LatLng( 0.473982620000000E+02, -0.123112102000000E+03),\n new google.maps.LatLng( 0.474001820000000E+02, -0.123111598000000E+03),\n new google.maps.LatLng( 0.474016910000000E+02, -0.123111768000000E+03),\n new google.maps.LatLng( 0.474043430000000E+02, -0.123110289000000E+03),\n new google.maps.LatLng( 0.474096010000000E+02, -0.123104941000000E+03),\n new google.maps.LatLng( 0.474124820000000E+02, -0.123103159000000E+03),\n new google.maps.LatLng( 0.474157730000000E+02, -0.123101612000000E+03),\n new google.maps.LatLng( 0.474180820000000E+02, -0.123101412000000E+03),\n new google.maps.LatLng( 0.474263800000000E+02, -0.123096939000000E+03),\n new google.maps.LatLng( 0.474271110000000E+02, -0.123095693000000E+03),\n new google.maps.LatLng( 0.474363010000000E+02, -0.123087379000000E+03),\n new google.maps.LatLng( 0.474393410000000E+02, -0.123085460000000E+03),\n new google.maps.LatLng( 0.474417640000000E+02, -0.123085494000000E+03),\n new google.maps.LatLng( 0.474440730000000E+02, -0.123083946000000E+03),\n new google.maps.LatLng( 0.474527820000000E+02, -0.123074717000000E+03),\n new google.maps.LatLng( 0.474539206670898E+02, -0.123066812898242E+03),\n new google.maps.LatLng( 0.474531796670898E+02, -0.123065983698242E+03),\n new google.maps.LatLng( 0.474510220000000E+02, -0.123058307000000E+03),\n new google.maps.LatLng( 0.474515020000000E+02, -0.123053185000000E+03),\n new google.maps.LatLng( 0.474534210000000E+02, -0.123049714000000E+03),\n new google.maps.LatLng( 0.474536730000000E+02, -0.123050455000000E+03),\n new google.maps.LatLng( 0.474527590000000E+02, -0.123057430000000E+03),\n new google.maps.LatLng( 0.474573530000000E+02, -0.123068349000000E+03),\n new google.maps.LatLng( 0.474582900000000E+02, -0.123068753000000E+03),\n new google.maps.LatLng( 0.474698780000000E+02, -0.123060968000000E+03),\n new google.maps.LatLng( 0.474725970000000E+02, -0.123056383000000E+03),\n new google.maps.LatLng( 0.474814410000000E+02, -0.123044178000000E+03),\n new google.maps.LatLng( 0.474912670000000E+02, -0.123035441000000E+03),\n new google.maps.LatLng( 0.474941460000000E+02, -0.123033618000000E+03),\n new google.maps.LatLng( 0.474998150000000E+02, -0.123031558000000E+03),\n new google.maps.LatLng( 0.475031330000000E+02, -0.123030982000000E+03),\n new google.maps.LatLng( 0.475097390000000E+02, -0.123031283000000E+03),\n new google.maps.LatLng( 0.475120270000000E+02, -0.123029961000000E+03),\n new google.maps.LatLng( 0.475120270000000E+02, -0.123029961000000E+03),\n new google.maps.LatLng( 0.475099960000000E+02, -0.123023829000000E+03),\n new google.maps.LatLng( 0.475100060000000E+02, -0.123020515000000E+03),\n new google.maps.LatLng( 0.475113180000000E+02, -0.123016230000000E+03),\n new google.maps.LatLng( 0.475136460000000E+02, -0.123012698000000E+03),\n new google.maps.LatLng( 0.475115960000000E+02, -0.123007103000000E+03),\n new google.maps.LatLng( 0.475062410000000E+02, -0.123004453000000E+03),\n new google.maps.LatLng( 0.475056780000000E+02, -0.123004465000000E+03),\n new google.maps.LatLng( 0.475048330000000E+02, -0.123005578000000E+03),\n new google.maps.LatLng( 0.475036750000000E+02, -0.123005069000000E+03),\n new google.maps.LatLng( 0.475040140000000E+02, -0.122998934000000E+03),\n new google.maps.LatLng( 0.475048370000000E+02, -0.122997350000000E+03),\n new google.maps.LatLng( 0.475046320000000E+02, -0.122995899000000E+03),\n new google.maps.LatLng( 0.475025550000000E+02, -0.122991411000000E+03),\n new google.maps.LatLng( 0.475009100000000E+02, -0.122989858000000E+03),\n new google.maps.LatLng( 0.475002460000000E+02, -0.122990161000000E+03),\n new google.maps.LatLng( 0.474985960000000E+02, -0.122989350000000E+03),\n new google.maps.LatLng( 0.474989630000000E+02, -0.122983655000000E+03),\n new google.maps.LatLng( 0.474998150000000E+02, -0.122981408000000E+03),\n new google.maps.LatLng( 0.475053950000000E+02, -0.122976471000000E+03),\n new google.maps.LatLng( 0.475104690000000E+02, -0.122974721000000E+03),\n new google.maps.LatLng( 0.475135320000000E+02, -0.122974353000000E+03),\n new google.maps.LatLng( 0.475178290000000E+02, -0.122970847000000E+03),\n new google.maps.LatLng( 0.475192930000000E+02, -0.122968487000000E+03),\n new google.maps.LatLng( 0.475220600000000E+02, -0.122958467000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "95091afe2acd535102bd02d98139a500", "score": "0.59963846", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.469586410000000E+02, -0.123756053000000E+03),\n new google.maps.LatLng( 0.469559010000000E+02, -0.123754726000000E+03),\n new google.maps.LatLng( 0.469553970000000E+02, -0.123753424000000E+03),\n new google.maps.LatLng( 0.469541160000000E+02, -0.123752191000000E+03),\n new google.maps.LatLng( 0.469494540000000E+02, -0.123753398000000E+03),\n new google.maps.LatLng( 0.469475080000000E+02, -0.123757187000000E+03),\n new google.maps.LatLng( 0.469440600000000E+02, -0.123750415000000E+03),\n new google.maps.LatLng( 0.469422600000000E+02, -0.123739433000000E+03),\n new google.maps.LatLng( 0.469419420000000E+02, -0.123733092000000E+03),\n new google.maps.LatLng( 0.469400710000000E+02, -0.123724882000000E+03),\n new google.maps.LatLng( 0.469377210000000E+02, -0.123706493000000E+03),\n new google.maps.LatLng( 0.469343630000000E+02, -0.123696815000000E+03),\n new google.maps.LatLng( 0.469347290000000E+02, -0.123686438000000E+03),\n new google.maps.LatLng( 0.469343860000000E+02, -0.123686538000000E+03),\n new google.maps.LatLng( 0.469339290000000E+02, -0.123689942000000E+03),\n new google.maps.LatLng( 0.469338140000000E+02, -0.123696882000000E+03),\n new google.maps.LatLng( 0.469332880000000E+02, -0.123697115000000E+03),\n new google.maps.LatLng( 0.469327400000000E+02, -0.123696681000000E+03),\n new google.maps.LatLng( 0.469313910000000E+02, -0.123692978000000E+03),\n new google.maps.LatLng( 0.469304090000000E+02, -0.123687439000000E+03),\n new google.maps.LatLng( 0.469257230000000E+02, -0.123677364000000E+03),\n new google.maps.LatLng( 0.469227760000000E+02, -0.123665525000000E+03),\n new google.maps.LatLng( 0.469227760000000E+02, -0.123665525000000E+03),\n new google.maps.LatLng( 0.469219970000000E+02, -0.123667791000000E+03),\n new google.maps.LatLng( 0.469181110000000E+02, -0.123665424000000E+03),\n new google.maps.LatLng( 0.469101870000000E+02, -0.123663824000000E+03),\n new google.maps.LatLng( 0.469103350000000E+02, -0.123656395000000E+03),\n new google.maps.LatLng( 0.468846630000000E+02, -0.123656571000000E+03),\n new google.maps.LatLng( 0.468848760000000E+02, -0.123660436000000E+03),\n new google.maps.LatLng( 0.468862250000000E+02, -0.123661703000000E+03),\n new google.maps.LatLng( 0.468919870000000E+02, -0.123674303000000E+03),\n new google.maps.LatLng( 0.468923760000000E+02, -0.123678004000000E+03),\n new google.maps.LatLng( 0.468920790000000E+02, -0.123680872000000E+03),\n new google.maps.LatLng( 0.468910960000000E+02, -0.123682772000000E+03),\n new google.maps.LatLng( 0.468905790000000E+02, -0.123682332000000E+03),\n new google.maps.LatLng( 0.468917360000000E+02, -0.123680072000000E+03),\n new google.maps.LatLng( 0.468917360000000E+02, -0.123675837000000E+03),\n new google.maps.LatLng( 0.468885570000000E+02, -0.123668436000000E+03),\n new google.maps.LatLng( 0.468851510000000E+02, -0.123663603000000E+03),\n new google.maps.LatLng( 0.468815160000000E+02, -0.123659805000000E+03),\n new google.maps.LatLng( 0.468797560000000E+02, -0.123659739000000E+03),\n new google.maps.LatLng( 0.468701100000000E+02, -0.123645529000000E+03),\n new google.maps.LatLng( 0.468705440000000E+02, -0.123643182000000E+03),\n new google.maps.LatLng( 0.468716410000000E+02, -0.123641815000000E+03),\n new google.maps.LatLng( 0.468720050000000E+02, -0.123637748000000E+03),\n new google.maps.LatLng( 0.468705790000000E+02, -0.123635665000000E+03),\n new google.maps.LatLng( 0.468693390000000E+02, -0.123635473000000E+03),\n new google.maps.LatLng( 0.468685130000000E+02, -0.123634416000000E+03),\n new google.maps.LatLng( 0.468682980000000E+02, -0.123628889000000E+03),\n new google.maps.LatLng( 0.468686410000000E+02, -0.123628920000000E+03),\n new google.maps.LatLng( 0.468689210000000E+02, -0.123627408000000E+03),\n new google.maps.LatLng( 0.468671090000000E+02, -0.123622992000000E+03),\n new google.maps.LatLng( 0.468617600000000E+02, -0.123626678000000E+03),\n new google.maps.LatLng( 0.468597980000000E+02, -0.123634127000000E+03),\n new google.maps.LatLng( 0.468577240000000E+02, -0.123637316000000E+03),\n new google.maps.LatLng( 0.468615140000000E+02, -0.123611956000000E+03),\n new google.maps.LatLng( 0.468617910000000E+02, -0.123605625000000E+03),\n new google.maps.LatLng( 0.468601240000000E+02, -0.123601959000000E+03),\n new google.maps.LatLng( 0.468601470000000E+02, -0.123600759000000E+03),\n new google.maps.LatLng( 0.468624350000000E+02, -0.123592064000000E+03),\n new google.maps.LatLng( 0.468652020000000E+02, -0.123587533000000E+03),\n new google.maps.LatLng( 0.468646080000000E+02, -0.123584134000000E+03),\n new google.maps.LatLng( 0.468634890000000E+02, -0.123581901000000E+03),\n new google.maps.LatLng( 0.468706430000000E+02, -0.123582036000000E+03),\n new google.maps.LatLng( 0.468721480000000E+02, -0.123596702000000E+03),\n new google.maps.LatLng( 0.468714850000000E+02, -0.123598834000000E+03),\n new google.maps.LatLng( 0.468702050000000E+02, -0.123599067000000E+03),\n new google.maps.LatLng( 0.468691070000000E+02, -0.123600366000000E+03),\n new google.maps.LatLng( 0.468698340000000E+02, -0.123611264000000E+03),\n new google.maps.LatLng( 0.468714330000000E+02, -0.123614398000000E+03),\n new google.maps.LatLng( 0.468731050000000E+02, -0.123614627000000E+03),\n new google.maps.LatLng( 0.468731720000000E+02, -0.123611234000000E+03),\n new google.maps.LatLng( 0.468782240000000E+02, -0.123597037000000E+03),\n new google.maps.LatLng( 0.468796640000000E+02, -0.123595538000000E+03),\n new google.maps.LatLng( 0.468805780000000E+02, -0.123596905000000E+03),\n new google.maps.LatLng( 0.468818580000000E+02, -0.123595940000000E+03),\n new google.maps.LatLng( 0.468919410000000E+02, -0.123582476000000E+03),\n new google.maps.LatLng( 0.468919180000000E+02, -0.123581109000000E+03),\n new google.maps.LatLng( 0.468942960000000E+02, -0.123575075000000E+03),\n new google.maps.LatLng( 0.468958050000000E+02, -0.123574842000000E+03),\n new google.maps.LatLng( 0.469006960000000E+02, -0.123572708000000E+03),\n new google.maps.LatLng( 0.469050170000000E+02, -0.123568574000000E+03),\n new google.maps.LatLng( 0.469044450000000E+02, -0.123567273000000E+03),\n new google.maps.LatLng( 0.469032340000000E+02, -0.123566906000000E+03),\n new google.maps.LatLng( 0.468963310000000E+02, -0.123553668000000E+03),\n new google.maps.LatLng( 0.468916670000000E+02, -0.123549702000000E+03),\n new google.maps.LatLng( 0.468820200000000E+02, -0.123540136000000E+03),\n new google.maps.LatLng( 0.468805340000000E+02, -0.123539570000000E+03),\n new google.maps.LatLng( 0.468790260000000E+02, -0.123539737000000E+03),\n new google.maps.LatLng( 0.468722670000000E+02, -0.123543774000000E+03),\n new google.maps.LatLng( 0.468652480000000E+02, -0.123535046000000E+03),\n new google.maps.LatLng( 0.468616820000000E+02, -0.123531815000000E+03),\n new google.maps.LatLng( 0.468527460000000E+02, -0.123538617000000E+03),\n new google.maps.LatLng( 0.468502090000000E+02, -0.123537785000000E+03),\n new google.maps.LatLng( 0.468414330000000E+02, -0.123542786000000E+03),\n new google.maps.LatLng( 0.468367020000000E+02, -0.123546385000000E+03),\n new google.maps.LatLng( 0.468353540000000E+02, -0.123549949000000E+03),\n new google.maps.LatLng( 0.468344170000000E+02, -0.123551082000000E+03),\n new google.maps.LatLng( 0.468312400000000E+02, -0.123552148000000E+03),\n new google.maps.LatLng( 0.468294110000000E+02, -0.123551349000000E+03),\n new google.maps.LatLng( 0.468331360000000E+02, -0.123549350000000E+03),\n new google.maps.LatLng( 0.468339820000000E+02, -0.123547918000000E+03),\n new google.maps.LatLng( 0.468335920000000E+02, -0.123541390000000E+03),\n new google.maps.LatLng( 0.468343690000000E+02, -0.123539392000000E+03),\n new google.maps.LatLng( 0.468366310000000E+02, -0.123536626000000E+03),\n new google.maps.LatLng( 0.468384810000000E+02, -0.123530097000000E+03),\n new google.maps.LatLng( 0.468392750000000E+02, -0.123514240000000E+03),\n new google.maps.LatLng( 0.468327620000000E+02, -0.123515479000000E+03),\n new google.maps.LatLng( 0.468318020000000E+02, -0.123516545000000E+03),\n new google.maps.LatLng( 0.468275340000000E+02, -0.123535665000000E+03),\n new google.maps.LatLng( 0.468267800000000E+02, -0.123537730000000E+03),\n new google.maps.LatLng( 0.468248380000000E+02, -0.123540561000000E+03),\n new google.maps.LatLng( 0.468180960000000E+02, -0.123541530000000E+03),\n new google.maps.LatLng( 0.468190790000000E+02, -0.123539099000000E+03),\n new google.maps.LatLng( 0.468207220000000E+02, -0.123530406000000E+03),\n new google.maps.LatLng( 0.468211540000000E+02, -0.123523447000000E+03),\n new google.maps.LatLng( 0.468253330000000E+02, -0.123513321000000E+03),\n new google.maps.LatLng( 0.468296510000000E+02, -0.123508588000000E+03),\n new google.maps.LatLng( 0.468310220000000E+02, -0.123508386000000E+03),\n new google.maps.LatLng( 0.468337640000000E+02, -0.123505686000000E+03),\n new google.maps.LatLng( 0.468466120000000E+02, -0.123488707000000E+03),\n new google.maps.LatLng( 0.468463170000000E+02, -0.123483076000000E+03),\n new google.maps.LatLng( 0.468497260000000E+02, -0.123476082000000E+03),\n new google.maps.LatLng( 0.468523120000000E+02, -0.123460891000000E+03),\n new google.maps.LatLng( 0.468521990000000E+02, -0.123458458000000E+03),\n new google.maps.LatLng( 0.468534560000000E+02, -0.123454561000000E+03),\n new google.maps.LatLng( 0.468535520000000E+02, -0.123451789000000E+03),\n new google.maps.LatLng( 0.468467140000000E+02, -0.123453726000000E+03),\n new google.maps.LatLng( 0.468447470000000E+02, -0.123456757000000E+03),\n new google.maps.LatLng( 0.468450670000000E+02, -0.123459655000000E+03),\n new google.maps.LatLng( 0.468461640000000E+02, -0.123462587000000E+03),\n new google.maps.LatLng( 0.468461180000000E+02, -0.123463721000000E+03),\n new google.maps.LatLng( 0.468453860000000E+02, -0.123464020000000E+03),\n new google.maps.LatLng( 0.468430320000000E+02, -0.123461253000000E+03),\n new google.maps.LatLng( 0.468422560000000E+02, -0.123457256000000E+03),\n new google.maps.LatLng( 0.468427590000000E+02, -0.123454691000000E+03),\n new google.maps.LatLng( 0.468406340000000E+02, -0.123447928000000E+03),\n new google.maps.LatLng( 0.468348980000000E+02, -0.123446394000000E+03),\n new google.maps.LatLng( 0.468322920000000E+02, -0.123447759000000E+03),\n new google.maps.LatLng( 0.468292300000000E+02, -0.123438934000000E+03),\n new google.maps.LatLng( 0.468284430000000E+02, -0.123437761000000E+03),\n new google.maps.LatLng( 0.468210010000000E+02, -0.123438800000000E+03),\n new google.maps.LatLng( 0.468132980000000E+02, -0.123443661000000E+03),\n new google.maps.LatLng( 0.468117660000000E+02, -0.123447955000000E+03),\n new google.maps.LatLng( 0.468110110000000E+02, -0.123454114000000E+03),\n new google.maps.LatLng( 0.468113770000000E+02, -0.123456645000000E+03),\n new google.maps.LatLng( 0.468136850000000E+02, -0.123460908000000E+03),\n new google.maps.LatLng( 0.468130670000000E+02, -0.123463071000000E+03),\n new google.maps.LatLng( 0.468074890000000E+02, -0.123465099000000E+03),\n new google.maps.LatLng( 0.468065750000000E+02, -0.123464666000000E+03),\n new google.maps.LatLng( 0.468053640000000E+02, -0.123462802000000E+03),\n new google.maps.LatLng( 0.468025990000000E+02, -0.123460537000000E+03),\n new google.maps.LatLng( 0.468020500000000E+02, -0.123460603000000E+03),\n new google.maps.LatLng( 0.467943450000000E+02, -0.123470218000000E+03),\n new google.maps.LatLng( 0.467930190000000E+02, -0.123470450000000E+03),\n new google.maps.LatLng( 0.467926380000000E+02, -0.123468606000000E+03),\n new google.maps.LatLng( 0.467891580000000E+02, -0.123464625000000E+03),\n new google.maps.LatLng( 0.467853410000000E+02, -0.123464390000000E+03),\n new google.maps.LatLng( 0.467836030000000E+02, -0.123466286000000E+03),\n new google.maps.LatLng( 0.467830310000000E+02, -0.123467284000000E+03),\n new google.maps.LatLng( 0.467829180000000E+02, -0.123469047000000E+03),\n new google.maps.LatLng( 0.467822320000000E+02, -0.123469313000000E+03),\n new google.maps.LatLng( 0.467816150000000E+02, -0.123469346000000E+03),\n new google.maps.LatLng( 0.467781640000000E+02, -0.123466549000000E+03),\n new google.maps.LatLng( 0.467772280000000E+02, -0.123458696000000E+03),\n new google.maps.LatLng( 0.467737320000000E+02, -0.123455700000000E+03),\n new google.maps.LatLng( 0.467652520000000E+02, -0.123450042000000E+03),\n new google.maps.LatLng( 0.467624870000000E+02, -0.123446915000000E+03),\n new google.maps.LatLng( 0.467637440000000E+02, -0.123440462000000E+03),\n new google.maps.LatLng( 0.467564520000000E+02, -0.123429153000000E+03),\n new google.maps.LatLng( 0.467549210000000E+02, -0.123429586000000E+03),\n new google.maps.LatLng( 0.467522240000000E+02, -0.123431914000000E+03),\n new google.maps.LatLng( 0.467503130000000E+02, -0.123432380000000E+03),\n new google.maps.LatLng( 0.467483470000000E+02, -0.123432215000000E+03),\n new google.maps.LatLng( 0.467464950000000E+02, -0.123431118000000E+03),\n new google.maps.LatLng( 0.467455350000000E+02, -0.123429522000000E+03),\n new google.maps.LatLng( 0.467448720000000E+02, -0.123426928000000E+03),\n new google.maps.LatLng( 0.467418050000000E+02, -0.123407045000000E+03),\n new google.maps.LatLng( 0.467367510000000E+02, -0.123398536000000E+03),\n new google.maps.LatLng( 0.467330020000000E+02, -0.123398340000000E+03),\n new google.maps.LatLng( 0.467260780000000E+02, -0.123401735000000E+03),\n new google.maps.LatLng( 0.467257810000000E+02, -0.123402899000000E+03),\n new google.maps.LatLng( 0.467270150000000E+02, -0.123404094000000E+03),\n new google.maps.LatLng( 0.467277020000000E+02, -0.123405922000000E+03),\n new google.maps.LatLng( 0.467270170000000E+02, -0.123410976000000E+03),\n new google.maps.LatLng( 0.467258980000000E+02, -0.123413769000000E+03),\n new google.maps.LatLng( 0.467160470000000E+02, -0.123418293000000E+03),\n new google.maps.LatLng( 0.467114780000000E+02, -0.123427566000000E+03),\n new google.maps.LatLng( 0.467111120000000E+02, -0.123437602000000E+03),\n new google.maps.LatLng( 0.467114550000000E+02, -0.123439629000000E+03),\n new google.maps.LatLng( 0.467171460000000E+02, -0.123452492000000E+03),\n new google.maps.LatLng( 0.467193400000000E+02, -0.123455550000000E+03),\n new google.maps.LatLng( 0.467219450000000E+02, -0.123454786000000E+03),\n new google.maps.LatLng( 0.467231560000000E+02, -0.123455185000000E+03),\n new google.maps.LatLng( 0.467245490000000E+02, -0.123462133000000E+03),\n new google.maps.LatLng( 0.467233360000000E+02, -0.123467983000000E+03),\n new google.maps.LatLng( 0.467232210000000E+02, -0.123476458000000E+03),\n new google.maps.LatLng( 0.467236310000000E+02, -0.123478951000000E+03),\n new google.maps.LatLng( 0.467242940000000E+02, -0.123479550000000E+03),\n new google.maps.LatLng( 0.467247730000000E+02, -0.123481512000000E+03),\n new google.maps.LatLng( 0.467263470000000E+02, -0.123489458000000E+03),\n new google.maps.LatLng( 0.467256220000000E+02, -0.123501268000000E+03),\n new google.maps.LatLng( 0.467257480000000E+02, -0.123501911000000E+03),\n new google.maps.LatLng( 0.467276690000000E+02, -0.123503738000000E+03),\n new google.maps.LatLng( 0.467294970000000E+02, -0.123504202000000E+03),\n new google.maps.LatLng( 0.467303210000000E+02, -0.123506561000000E+03),\n new google.maps.LatLng( 0.467306420000000E+02, -0.123509951000000E+03),\n new google.maps.LatLng( 0.467293180000000E+02, -0.123512911000000E+03),\n new google.maps.LatLng( 0.467269420000000E+02, -0.123514874000000E+03),\n new google.maps.LatLng( 0.467262120000000E+02, -0.123518764000000E+03),\n new google.maps.LatLng( 0.467263270000000E+02, -0.123521323000000E+03),\n new google.maps.LatLng( 0.467272630000000E+02, -0.123518830000000E+03),\n new google.maps.LatLng( 0.467277200000000E+02, -0.123518929000000E+03),\n new google.maps.LatLng( 0.467281330000000E+02, -0.123523316000000E+03),\n new google.maps.LatLng( 0.467272220000000E+02, -0.123535050000000E+03),\n new google.maps.LatLng( 0.467277720000000E+02, -0.123540369000000E+03),\n new google.maps.LatLng( 0.467277720000000E+02, -0.123540369000000E+03),\n new google.maps.LatLng( 0.467321840000000E+02, -0.123539536000000E+03),\n new google.maps.LatLng( 0.467353830000000E+02, -0.123538005000000E+03),\n new google.maps.LatLng( 0.467413730000000E+02, -0.123541029000000E+03),\n new google.maps.LatLng( 0.467448020000000E+02, -0.123543654000000E+03),\n new google.maps.LatLng( 0.467462660000000E+02, -0.123551933000000E+03),\n new google.maps.LatLng( 0.467493060000000E+02, -0.123553196000000E+03),\n new google.maps.LatLng( 0.467502670000000E+02, -0.123552995000000E+03),\n new google.maps.LatLng( 0.467542580000000E+02, -0.123547507000000E+03),\n new google.maps.LatLng( 0.467543720000000E+02, -0.123553227000000E+03),\n new google.maps.LatLng( 0.467561560000000E+02, -0.123556420000000E+03),\n new google.maps.LatLng( 0.467572990000000E+02, -0.123560011000000E+03),\n new google.maps.LatLng( 0.467558130000000E+02, -0.123563271000000E+03),\n new google.maps.LatLng( 0.467570240000000E+02, -0.123564002000000E+03),\n new google.maps.LatLng( 0.467602930000000E+02, -0.123563271000000E+03),\n new google.maps.LatLng( 0.467670670000000E+02, -0.123551728000000E+03),\n new google.maps.LatLng( 0.467689770000000E+02, -0.123551362000000E+03),\n new google.maps.LatLng( 0.467700520000000E+02, -0.123552393000000E+03),\n new google.maps.LatLng( 0.467707370000000E+02, -0.123554156000000E+03),\n new google.maps.LatLng( 0.467706920000000E+02, -0.123556085000000E+03),\n new google.maps.LatLng( 0.467729320000000E+02, -0.123562139000000E+03),\n new google.maps.LatLng( 0.467774350000000E+02, -0.123566165000000E+03),\n new google.maps.LatLng( 0.467787840000000E+02, -0.123566199000000E+03),\n new google.maps.LatLng( 0.467810240000000E+02, -0.123569893000000E+03),\n new google.maps.LatLng( 0.467818690000000E+02, -0.123577413000000E+03),\n new google.maps.LatLng( 0.467868050000000E+02, -0.123581141000000E+03),\n new google.maps.LatLng( 0.467876960000000E+02, -0.123584269000000E+03),\n new google.maps.LatLng( 0.467870320000000E+02, -0.123588495000000E+03),\n new google.maps.LatLng( 0.467879690000000E+02, -0.123591823000000E+03),\n new google.maps.LatLng( 0.467917400000000E+02, -0.123594720000000E+03),\n new google.maps.LatLng( 0.467942620000000E+02, -0.123595916000000E+03),\n new google.maps.LatLng( 0.467935150000000E+02, -0.123637421000000E+03),\n new google.maps.LatLng( 0.467935150000000E+02, -0.123637421000000E+03),\n new google.maps.LatLng( 0.467957330000000E+02, -0.123640813000000E+03),\n new google.maps.LatLng( 0.467950250000000E+02, -0.123641480000000E+03),\n new google.maps.LatLng( 0.467950480000000E+02, -0.123642112000000E+03),\n new google.maps.LatLng( 0.467964900000000E+02, -0.123647635000000E+03),\n new google.maps.LatLng( 0.468001260000000E+02, -0.123651826000000E+03),\n new google.maps.LatLng( 0.468012000000000E+02, -0.123652625000000E+03),\n new google.maps.LatLng( 0.468064580000000E+02, -0.123653420000000E+03),\n new google.maps.LatLng( 0.468096580000000E+02, -0.123655249000000E+03),\n new google.maps.LatLng( 0.468139790000000E+02, -0.123659774000000E+03),\n new google.maps.LatLng( 0.468150090000000E+02, -0.123663935000000E+03),\n new google.maps.LatLng( 0.468150790000000E+02, -0.123669363000000E+03),\n new google.maps.LatLng( 0.468157870000000E+02, -0.123671860000000E+03),\n new google.maps.LatLng( 0.468204960000000E+02, -0.123672691000000E+03),\n new google.maps.LatLng( 0.468212280000000E+02, -0.123673223000000E+03),\n new google.maps.LatLng( 0.468228730000000E+02, -0.123678517000000E+03),\n new google.maps.LatLng( 0.468232390000000E+02, -0.123682313000000E+03),\n new google.maps.LatLng( 0.468242450000000E+02, -0.123684744000000E+03),\n new google.maps.LatLng( 0.468254790000000E+02, -0.123684844000000E+03),\n new google.maps.LatLng( 0.468297300000000E+02, -0.123682146000000E+03),\n new google.maps.LatLng( 0.468349190000000E+02, -0.123680280000000E+03),\n new google.maps.LatLng( 0.468372190000000E+02, -0.123683809000000E+03),\n new google.maps.LatLng( 0.468410220000000E+02, -0.123684976000000E+03),\n new google.maps.LatLng( 0.468446560000000E+02, -0.123684509000000E+03),\n new google.maps.LatLng( 0.468446330000000E+02, -0.123680246000000E+03),\n new google.maps.LatLng( 0.468526840000000E+02, -0.123674365000000E+03),\n new google.maps.LatLng( 0.468553010000000E+02, -0.123674750000000E+03),\n new google.maps.LatLng( 0.468564460000000E+02, -0.123674126000000E+03),\n new google.maps.LatLng( 0.468580000000000E+02, -0.123672647000000E+03),\n new google.maps.LatLng( 0.468582410000000E+02, -0.123670773000000E+03),\n new google.maps.LatLng( 0.468614320000000E+02, -0.123670780000000E+03),\n new google.maps.LatLng( 0.468645850000000E+02, -0.123673900000000E+03),\n new google.maps.LatLng( 0.468647700000000E+02, -0.123684508000000E+03),\n new google.maps.LatLng( 0.468641530000000E+02, -0.123690140000000E+03),\n new google.maps.LatLng( 0.468636270000000E+02, -0.123689840000000E+03),\n new google.maps.LatLng( 0.468593530000000E+02, -0.123690240000000E+03),\n new google.maps.LatLng( 0.468563810000000E+02, -0.123692472000000E+03),\n new google.maps.LatLng( 0.468563810000000E+02, -0.123696603000000E+03),\n new google.maps.LatLng( 0.468575010000000E+02, -0.123700036000000E+03),\n new google.maps.LatLng( 0.468588950000000E+02, -0.123701136000000E+03),\n new google.maps.LatLng( 0.468602660000000E+02, -0.123701237000000E+03),\n new google.maps.LatLng( 0.468609290000000E+02, -0.123704336000000E+03),\n new google.maps.LatLng( 0.468610650000000E+02, -0.123706468000000E+03),\n new google.maps.LatLng( 0.468594650000000E+02, -0.123710033000000E+03),\n new google.maps.LatLng( 0.468532240000000E+02, -0.123715328000000E+03),\n new google.maps.LatLng( 0.468514820000000E+02, -0.123720474000000E+03),\n new google.maps.LatLng( 0.468493940000000E+02, -0.123721163000000E+03),\n new google.maps.LatLng( 0.468487280000000E+02, -0.123720925000000E+03),\n new google.maps.LatLng( 0.468388640000000E+02, -0.123728488000000E+03),\n new google.maps.LatLng( 0.468370160000000E+02, -0.123728380000000E+03),\n new google.maps.LatLng( 0.468343660000000E+02, -0.123724316000000E+03),\n new google.maps.LatLng( 0.468330390000000E+02, -0.123724643000000E+03),\n new google.maps.LatLng( 0.468326270000000E+02, -0.123725875000000E+03),\n new google.maps.LatLng( 0.468333340000000E+02, -0.123729372000000E+03),\n new google.maps.LatLng( 0.468356860000000E+02, -0.123734936000000E+03),\n new google.maps.LatLng( 0.468397310000000E+02, -0.123737204000000E+03),\n new google.maps.LatLng( 0.468424740000000E+02, -0.123736308000000E+03),\n new google.maps.LatLng( 0.468435250000000E+02, -0.123736742000000E+03),\n new google.maps.LatLng( 0.468474070000000E+02, -0.123742608000000E+03),\n new google.maps.LatLng( 0.468496440000000E+02, -0.123748407000000E+03),\n new google.maps.LatLng( 0.468506050000000E+02, -0.123753085000000E+03),\n new google.maps.LatLng( 0.468530810000000E+02, -0.123753091000000E+03),\n new google.maps.LatLng( 0.468531000000000E+02, -0.123767402000000E+03),\n new google.maps.LatLng( 0.468537880000000E+02, -0.123767399000000E+03),\n new google.maps.LatLng( 0.468544270000000E+02, -0.123763600000000E+03),\n new google.maps.LatLng( 0.468550210000000E+02, -0.123762800000000E+03),\n new google.maps.LatLng( 0.468565520000000E+02, -0.123761799000000E+03),\n new google.maps.LatLng( 0.468581520000000E+02, -0.123761864000000E+03),\n new google.maps.LatLng( 0.468627710000000E+02, -0.123768191000000E+03),\n new google.maps.LatLng( 0.468617010000000E+02, -0.123778722000000E+03),\n new google.maps.LatLng( 0.468573360000000E+02, -0.123783989000000E+03),\n new google.maps.LatLng( 0.468565820000000E+02, -0.123785688000000E+03),\n new google.maps.LatLng( 0.468576240000000E+02, -0.123791204000000E+03),\n new google.maps.LatLng( 0.468604000000000E+02, -0.123787319000000E+03),\n new google.maps.LatLng( 0.468626150000000E+02, -0.123778154000000E+03),\n new google.maps.LatLng( 0.468633440000000E+02, -0.123772156000000E+03),\n new google.maps.LatLng( 0.468633200000000E+02, -0.123767591000000E+03),\n new google.maps.LatLng( 0.468629670718750E+02, -0.123766549922070E+03),\n new google.maps.LatLng( 0.468618150718750E+02, -0.123765631322070E+03),\n new google.maps.LatLng( 0.468632720000000E+02, -0.123764292000000E+03),\n new google.maps.LatLng( 0.468667480000000E+02, -0.123767788000000E+03),\n new google.maps.LatLng( 0.468700860000000E+02, -0.123769085000000E+03),\n new google.maps.LatLng( 0.468765740000000E+02, -0.123766744000000E+03),\n new google.maps.LatLng( 0.468778500000000E+02, -0.123759644000000E+03),\n new google.maps.LatLng( 0.468768400000000E+02, -0.123750669000000E+03),\n new google.maps.LatLng( 0.468716890000000E+02, -0.123742064000000E+03),\n new google.maps.LatLng( 0.468708180000000E+02, -0.123739777000000E+03),\n new google.maps.LatLng( 0.468739010000000E+02, -0.123737136000000E+03),\n new google.maps.LatLng( 0.468784010000000E+02, -0.123737038000000E+03),\n new google.maps.LatLng( 0.468793840000000E+02, -0.123736539000000E+03),\n new google.maps.LatLng( 0.468803900000000E+02, -0.123735107000000E+03),\n new google.maps.LatLng( 0.468811220000000E+02, -0.123733541000000E+03),\n new google.maps.LatLng( 0.468821070000000E+02, -0.123728708000000E+03),\n new google.maps.LatLng( 0.468826120000000E+02, -0.123719941000000E+03),\n new google.maps.LatLng( 0.468816300000000E+02, -0.123716541000000E+03),\n new google.maps.LatLng( 0.468837110000000E+02, -0.123715008000000E+03),\n new google.maps.LatLng( 0.468862470000000E+02, -0.123718110000000E+03),\n new google.maps.LatLng( 0.468865200000000E+02, -0.123721177000000E+03),\n new google.maps.LatLng( 0.468909300000000E+02, -0.123725914000000E+03),\n new google.maps.LatLng( 0.468925530000000E+02, -0.123725749000000E+03),\n new google.maps.LatLng( 0.468940850000000E+02, -0.123723616000000E+03),\n new google.maps.LatLng( 0.469059000000000E+02, -0.123725658000000E+03),\n new google.maps.LatLng( 0.469047110000000E+02, -0.123728758000000E+03),\n new google.maps.LatLng( 0.469040000000000E+02, -0.123733560000000E+03),\n new google.maps.LatLng( 0.469048210000000E+02, -0.123738030000000E+03),\n new google.maps.LatLng( 0.469060540000000E+02, -0.123740933000000E+03),\n new google.maps.LatLng( 0.469055270000000E+02, -0.123744801000000E+03),\n new google.maps.LatLng( 0.469044520000000E+02, -0.123746134000000E+03),\n new google.maps.LatLng( 0.469039480000000E+02, -0.123747901000000E+03),\n new google.maps.LatLng( 0.469049530000000E+02, -0.123749402000000E+03),\n new google.maps.LatLng( 0.469058900000000E+02, -0.123750104000000E+03),\n new google.maps.LatLng( 0.469078780000000E+02, -0.123749839000000E+03),\n new google.maps.LatLng( 0.469108310000000E+02, -0.123742105000000E+03),\n new google.maps.LatLng( 0.469138940000000E+02, -0.123740540000000E+03),\n new google.maps.LatLng( 0.469175520000000E+02, -0.123739810000000E+03),\n new google.maps.LatLng( 0.469192420000000E+02, -0.123741613000000E+03),\n new google.maps.LatLng( 0.469240170000000E+02, -0.123755127000000E+03),\n new google.maps.LatLng( 0.469260430000000E+02, -0.123758913000000E+03),\n new google.maps.LatLng( 0.469275160000000E+02, -0.123759361000000E+03),\n new google.maps.LatLng( 0.469275160000000E+02, -0.123759361000000E+03),\n new google.maps.LatLng( 0.469275620000000E+02, -0.123758760000000E+03),\n new google.maps.LatLng( 0.469307850000000E+02, -0.123758924000000E+03),\n new google.maps.LatLng( 0.469330020000000E+02, -0.123760122000000E+03),\n new google.maps.LatLng( 0.469325700000000E+02, -0.123763826000000E+03),\n new google.maps.LatLng( 0.469338970000000E+02, -0.123771334000000E+03),\n new google.maps.LatLng( 0.469358180000000E+02, -0.123773601000000E+03),\n new google.maps.LatLng( 0.469381040000000E+02, -0.123775235000000E+03),\n new google.maps.LatLng( 0.469400240000000E+02, -0.123775600000000E+03),\n new google.maps.LatLng( 0.469445720000000E+02, -0.123774729000000E+03),\n new google.maps.LatLng( 0.469461260000000E+02, -0.123774028000000E+03),\n new google.maps.LatLng( 0.469474970000000E+02, -0.123772625000000E+03),\n new google.maps.LatLng( 0.469498740000000E+02, -0.123771588000000E+03),\n new google.maps.LatLng( 0.469518410000000E+02, -0.123774691000000E+03),\n new google.maps.LatLng( 0.469506980000000E+02, -0.123774458000000E+03),\n new google.maps.LatLng( 0.469498050000000E+02, -0.123772122000000E+03),\n new google.maps.LatLng( 0.469493940000000E+02, -0.123772089000000E+03),\n new google.maps.LatLng( 0.469485720000000E+02, -0.123774126000000E+03),\n new google.maps.LatLng( 0.469485050000000E+02, -0.123777931000000E+03),\n new google.maps.LatLng( 0.469518890000000E+02, -0.123783636000000E+03),\n new google.maps.LatLng( 0.469518900000000E+02, -0.123788109000000E+03),\n new google.maps.LatLng( 0.469529180000000E+02, -0.123788108000000E+03),\n new google.maps.LatLng( 0.469544270000000E+02, -0.123786873000000E+03),\n new google.maps.LatLng( 0.469592530000000E+02, -0.123781137000000E+03),\n new google.maps.LatLng( 0.469598600000000E+02, -0.123779786000000E+03),\n new google.maps.LatLng( 0.469622580000000E+02, -0.123778357000000E+03),\n new google.maps.LatLng( 0.469636920000000E+02, -0.123778378000000E+03),\n new google.maps.LatLng( 0.469636920000000E+02, -0.123778378000000E+03),\n new google.maps.LatLng( 0.469571420000000E+02, -0.123769980000000E+03),\n new google.maps.LatLng( 0.469568440000000E+02, -0.123769046000000E+03),\n new google.maps.LatLng( 0.469565220000000E+02, -0.123764473000000E+03),\n new google.maps.LatLng( 0.469586410000000E+02, -0.123756053000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "508c34fc252241e2f98a788a41557f0a", "score": "0.5994676", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.475912122647268E+02, -0.122342955493346E+03),\n new google.maps.LatLng( 0.475894200000000E+02, -0.122342877000000E+03),\n new google.maps.LatLng( 0.475890510000000E+02, -0.122342099000000E+03),\n new google.maps.LatLng( 0.475884190000000E+02, -0.122342785000000E+03),\n new google.maps.LatLng( 0.475883200000000E+02, -0.122342537000000E+03),\n new google.maps.LatLng( 0.475751200000000E+02, -0.122342037000000E+03),\n new google.maps.LatLng( 0.475714200000000E+02, -0.122344737000000E+03),\n new google.maps.LatLng( 0.475657200000000E+02, -0.122346337000000E+03),\n new google.maps.LatLng( 0.475570200000000E+02, -0.122342637000000E+03),\n new google.maps.LatLng( 0.475440200000000E+02, -0.122335536000000E+03),\n new google.maps.LatLng( 0.475440200000000E+02, -0.122335536000000E+03),\n new google.maps.LatLng( 0.475405590000000E+02, -0.122334345000000E+03),\n new google.maps.LatLng( 0.475405590000000E+02, -0.122334345000000E+03),\n new google.maps.LatLng( 0.475473930000000E+02, -0.122340444000000E+03),\n new google.maps.LatLng( 0.475504200000000E+02, -0.122340737000000E+03),\n new google.maps.LatLng( 0.475555200000000E+02, -0.122343737000000E+03),\n new google.maps.LatLng( 0.475554200000000E+02, -0.122347437000000E+03),\n new google.maps.LatLng( 0.475577200000000E+02, -0.122350237000000E+03),\n new google.maps.LatLng( 0.475619200000000E+02, -0.122349637000000E+03),\n new google.maps.LatLng( 0.475627200000000E+02, -0.122348237000000E+03),\n new google.maps.LatLng( 0.475672200000000E+02, -0.122350037000000E+03),\n new google.maps.LatLng( 0.475698200000000E+02, -0.122352237000000E+03),\n new google.maps.LatLng( 0.475736200000000E+02, -0.122357537000000E+03),\n new google.maps.LatLng( 0.475736200000000E+02, -0.122361038000000E+03),\n new google.maps.LatLng( 0.475805200000000E+02, -0.122361538000000E+03),\n new google.maps.LatLng( 0.475809730000000E+02, -0.122361906000000E+03),\n new google.maps.LatLng( 0.475809730000000E+02, -0.122361906000000E+03),\n new google.maps.LatLng( 0.475842955574911E+02, -0.122361847968084E+03),\n new google.maps.LatLng( 0.475842955574911E+02, -0.122361847968084E+03),\n new google.maps.LatLng( 0.475848200000000E+02, -0.122358238000000E+03),\n new google.maps.LatLng( 0.475849233587138E+02, -0.122357990891925E+03),\n new google.maps.LatLng( 0.475849233587138E+02, -0.122357990891925E+03),\n new google.maps.LatLng( 0.475773200000000E+02, -0.122358237000000E+03),\n new google.maps.LatLng( 0.475713200000000E+02, -0.122353037000000E+03),\n new google.maps.LatLng( 0.475692590000000E+02, -0.122350041000000E+03),\n new google.maps.LatLng( 0.475692590000000E+02, -0.122346394000000E+03),\n new google.maps.LatLng( 0.475733200000000E+02, -0.122345237000000E+03),\n new google.maps.LatLng( 0.475900494577031E+02, -0.122345735510576E+03),\n new google.maps.LatLng( 0.475900494577031E+02, -0.122345735510576E+03),\n new google.maps.LatLng( 0.475912122647268E+02, -0.122342955493346E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "24ed4ce505ca266a539115caadf9c7a6", "score": "0.5992338", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.480800490000000E+02, -0.124313857000000E+03),\n new google.maps.LatLng( 0.480781290000000E+02, -0.124314028000000E+03),\n new google.maps.LatLng( 0.480676400000000E+02, -0.124317914000000E+03),\n new google.maps.LatLng( 0.480654920000000E+02, -0.124319209000000E+03),\n new google.maps.LatLng( 0.480603960000000E+02, -0.124325957000000E+03),\n new google.maps.LatLng( 0.480584520000000E+02, -0.124334273000000E+03),\n new google.maps.LatLng( 0.480599820000000E+02, -0.124339318000000E+03),\n new google.maps.LatLng( 0.480601190000000E+02, -0.124341534000000E+03),\n new google.maps.LatLng( 0.480597760000000E+02, -0.124342931000000E+03),\n new google.maps.LatLng( 0.480593420000000E+02, -0.124342965000000E+03),\n new google.maps.LatLng( 0.480596610000000E+02, -0.124343783000000E+03),\n new google.maps.LatLng( 0.480610320000000E+02, -0.124343954000000E+03),\n new google.maps.LatLng( 0.480617860000000E+02, -0.124343307000000E+03),\n new google.maps.LatLng( 0.480651690000000E+02, -0.124339014000000E+03),\n new google.maps.LatLng( 0.480664730000000E+02, -0.124335299000000E+03),\n new google.maps.LatLng( 0.480684850000000E+02, -0.124326607000000E+03),\n new google.maps.LatLng( 0.480721180000000E+02, -0.124323369000000E+03),\n new google.maps.LatLng( 0.480764370000000E+02, -0.124320369000000E+03),\n new google.maps.LatLng( 0.480796820000000E+02, -0.124317200000000E+03),\n new google.maps.LatLng( 0.480803900000000E+02, -0.124315461000000E+03),\n new google.maps.LatLng( 0.480800490000000E+02, -0.124313857000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "a06d1a7f9d4bfdd5a35e87596454ddf2", "score": "0.59919304", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.463876590000000E+02, -0.122932725000000E+03),\n new google.maps.LatLng( 0.463876620000000E+02, -0.122931865000000E+03),\n new google.maps.LatLng( 0.463876620000000E+02, -0.122931865000000E+03),\n new google.maps.LatLng( 0.463826450000000E+02, -0.122931825000000E+03),\n new google.maps.LatLng( 0.463801760000000E+02, -0.122931264000000E+03),\n new google.maps.LatLng( 0.463786440000000E+02, -0.122931726000000E+03),\n new google.maps.LatLng( 0.463770680000000E+02, -0.122930207000000E+03),\n new google.maps.LatLng( 0.463758100000000E+02, -0.122929943000000E+03),\n new google.maps.LatLng( 0.463724690000000E+02, -0.122930868000000E+03),\n new google.maps.LatLng( 0.463705720000000E+02, -0.122932321000000E+03),\n new google.maps.LatLng( 0.463693140000000E+02, -0.122932322000000E+03),\n new google.maps.LatLng( 0.463678970000000E+02, -0.122933940000000E+03),\n new google.maps.LatLng( 0.463662740000000E+02, -0.122934237000000E+03),\n new google.maps.LatLng( 0.463625250000000E+02, -0.122933148000000E+03),\n new google.maps.LatLng( 0.463573360000000E+02, -0.122930341000000E+03),\n new google.maps.LatLng( 0.463559870000000E+02, -0.122932190000000E+03),\n new google.maps.LatLng( 0.463560330000000E+02, -0.122933280000000E+03),\n new google.maps.LatLng( 0.463547300000000E+02, -0.122934105000000E+03),\n new google.maps.LatLng( 0.463544790000000E+02, -0.122935062000000E+03),\n new google.maps.LatLng( 0.463508440000000E+02, -0.122936977000000E+03),\n new google.maps.LatLng( 0.463496320000000E+02, -0.122937043000000E+03),\n new google.maps.LatLng( 0.463478720000000E+02, -0.122936020000000E+03),\n new google.maps.LatLng( 0.463442830000000E+02, -0.122935723000000E+03),\n new google.maps.LatLng( 0.463395970000000E+02, -0.122932885000000E+03),\n new google.maps.LatLng( 0.463355050000000E+02, -0.122931566000000E+03),\n new google.maps.LatLng( 0.463346130000000E+02, -0.122929685000000E+03),\n new google.maps.LatLng( 0.463363500000000E+02, -0.122926252000000E+03),\n new google.maps.LatLng( 0.463367160000000E+02, -0.122923117000000E+03),\n new google.maps.LatLng( 0.463363040000000E+02, -0.122922325000000E+03),\n new google.maps.LatLng( 0.463339270000000E+02, -0.122922358000000E+03),\n new google.maps.LatLng( 0.463313440000000E+02, -0.122923381000000E+03),\n new google.maps.LatLng( 0.463300640000000E+02, -0.122923184000000E+03),\n new google.maps.LatLng( 0.463299500000000E+02, -0.122922491000000E+03),\n new google.maps.LatLng( 0.463282130000000E+02, -0.122921600000000E+03),\n new google.maps.LatLng( 0.463242580000000E+02, -0.122921074000000E+03),\n new google.maps.LatLng( 0.463195710000000E+02, -0.122918964000000E+03),\n new google.maps.LatLng( 0.463147250000000E+02, -0.122917514000000E+03),\n new google.maps.LatLng( 0.463136960000000E+02, -0.122917547000000E+03),\n new google.maps.LatLng( 0.463109990000000E+02, -0.122919395000000E+03),\n new google.maps.LatLng( 0.463107920000000E+02, -0.122915734000000E+03),\n new google.maps.LatLng( 0.463120720000000E+02, -0.122912600000000E+03),\n new google.maps.LatLng( 0.463139000000000E+02, -0.122911510000000E+03),\n new google.maps.LatLng( 0.463164840000000E+02, -0.122911509000000E+03),\n new google.maps.LatLng( 0.463184720000000E+02, -0.122910716000000E+03),\n new google.maps.LatLng( 0.463204150000000E+02, -0.122908175000000E+03),\n new google.maps.LatLng( 0.463201860000000E+02, -0.122907086000000E+03),\n new google.maps.LatLng( 0.463165740000000E+02, -0.122906758000000E+03),\n new google.maps.LatLng( 0.463158880000000E+02, -0.122905604000000E+03),\n new google.maps.LatLng( 0.463160480000000E+02, -0.122905043000000E+03),\n new google.maps.LatLng( 0.463170530000000E+02, -0.122904217000000E+03),\n new google.maps.LatLng( 0.463227450000000E+02, -0.122904016000000E+03),\n new google.maps.LatLng( 0.463265380000000E+02, -0.122897777000000E+03),\n new google.maps.LatLng( 0.463285230000000E+02, -0.122889328000000E+03),\n new google.maps.LatLng( 0.463293460000000E+02, -0.122888899000000E+03),\n new google.maps.LatLng( 0.463313130000000E+02, -0.122891570000000E+03),\n new google.maps.LatLng( 0.463331420000000E+02, -0.122891898000000E+03),\n new google.maps.LatLng( 0.463367990000000E+02, -0.122889981000000E+03),\n new google.maps.LatLng( 0.463384210000000E+02, -0.122888560000000E+03),\n new google.maps.LatLng( 0.463385340000000E+02, -0.122885590000000E+03),\n new google.maps.LatLng( 0.463343260000000E+02, -0.122881006000000E+03),\n new google.maps.LatLng( 0.463338220000000E+02, -0.122879686000000E+03),\n new google.maps.LatLng( 0.463301860000000E+02, -0.122875565000000E+03),\n new google.maps.LatLng( 0.463295920000000E+02, -0.122874244000000E+03),\n new google.maps.LatLng( 0.463296160000000E+02, -0.122873122000000E+03),\n new google.maps.LatLng( 0.463305540000000E+02, -0.122871572000000E+03),\n new google.maps.LatLng( 0.463310130000000E+02, -0.122867910000000E+03),\n new google.maps.LatLng( 0.463305120000000E+02, -0.122862365000000E+03),\n new google.maps.LatLng( 0.463343090000000E+02, -0.122858112000000E+03),\n new google.maps.LatLng( 0.463344920000000E+02, -0.122856957000000E+03),\n new google.maps.LatLng( 0.463362520000000E+02, -0.122857024000000E+03),\n new google.maps.LatLng( 0.463365950000000E+02, -0.122856463000000E+03),\n new google.maps.LatLng( 0.463352490000000E+02, -0.122851083000000E+03),\n new google.maps.LatLng( 0.463347940000000E+02, -0.122840950000000E+03),\n new google.maps.LatLng( 0.463321660000000E+02, -0.122837847000000E+03),\n new google.maps.LatLng( 0.463319150000000E+02, -0.122833887000000E+03),\n new google.maps.LatLng( 0.463326930000000E+02, -0.122832237000000E+03),\n new google.maps.LatLng( 0.463352760000000E+02, -0.122830093000000E+03),\n new google.maps.LatLng( 0.463394600000000E+02, -0.122823757000000E+03),\n new google.maps.LatLng( 0.463407860000000E+02, -0.122820259000000E+03),\n new google.maps.LatLng( 0.463422720000000E+02, -0.122818510000000E+03),\n new google.maps.LatLng( 0.463435530000000E+02, -0.122817949000000E+03),\n new google.maps.LatLng( 0.463455180000000E+02, -0.122818873000000E+03),\n new google.maps.LatLng( 0.463464100000000E+02, -0.122818048000000E+03),\n new google.maps.LatLng( 0.463479650000000E+02, -0.122814813000000E+03),\n new google.maps.LatLng( 0.463510050000000E+02, -0.122811149000000E+03),\n new google.maps.LatLng( 0.463516450000000E+02, -0.122807287000000E+03),\n new google.maps.LatLng( 0.463510960000000E+02, -0.122805603000000E+03),\n new google.maps.LatLng( 0.463510960000000E+02, -0.122805603000000E+03),\n new google.maps.LatLng( 0.463512560000000E+02, -0.122807386000000E+03),\n new google.maps.LatLng( 0.463506620000000E+02, -0.122810951000000E+03),\n new google.maps.LatLng( 0.463476450000000E+02, -0.122814483000000E+03),\n new google.maps.LatLng( 0.463458610000000E+02, -0.122818048000000E+03),\n new google.maps.LatLng( 0.463452900000000E+02, -0.122818213000000E+03),\n new google.maps.LatLng( 0.463433470000000E+02, -0.122817256000000E+03),\n new google.maps.LatLng( 0.463411750000000E+02, -0.122818609000000E+03),\n new google.maps.LatLng( 0.463389800000000E+02, -0.122823625000000E+03),\n new google.maps.LatLng( 0.463352080000000E+02, -0.122829400000000E+03),\n new google.maps.LatLng( 0.463327620000000E+02, -0.122831280000000E+03),\n new google.maps.LatLng( 0.463327620000000E+02, -0.122831280000000E+03),\n new google.maps.LatLng( 0.463314580000000E+02, -0.122833128000000E+03),\n new google.maps.LatLng( 0.463312980000000E+02, -0.122835735000000E+03),\n new google.maps.LatLng( 0.463321890000000E+02, -0.122838903000000E+03),\n new google.maps.LatLng( 0.463342460000000E+02, -0.122840785000000E+03),\n new google.maps.LatLng( 0.463345410000000E+02, -0.122848805000000E+03),\n new google.maps.LatLng( 0.463360930000000E+02, -0.122856298000000E+03),\n new google.maps.LatLng( 0.463341500000000E+02, -0.122855966000000E+03),\n new google.maps.LatLng( 0.463332800000000E+02, -0.122858474000000E+03),\n new google.maps.LatLng( 0.463298730000000E+02, -0.122861837000000E+03),\n new google.maps.LatLng( 0.463299400000000E+02, -0.122864675000000E+03),\n new google.maps.LatLng( 0.463307160000000E+02, -0.122867184000000E+03),\n new google.maps.LatLng( 0.463302110000000E+02, -0.122870945000000E+03),\n new google.maps.LatLng( 0.463292960000000E+02, -0.122872198000000E+03),\n new google.maps.LatLng( 0.463290660000000E+02, -0.122874640000000E+03),\n new google.maps.LatLng( 0.463308730000000E+02, -0.122879887000000E+03),\n new google.maps.LatLng( 0.463321760000000E+02, -0.122879622000000E+03),\n new google.maps.LatLng( 0.463329990000000E+02, -0.122880182000000E+03),\n new google.maps.LatLng( 0.463374140000000E+02, -0.122885327000000E+03),\n new google.maps.LatLng( 0.463379630000000E+02, -0.122887208000000E+03),\n new google.maps.LatLng( 0.463352210000000E+02, -0.122889850000000E+03),\n new google.maps.LatLng( 0.463319990000000E+02, -0.122890909000000E+03),\n new google.maps.LatLng( 0.463311070000000E+02, -0.122890448000000E+03),\n new google.maps.LatLng( 0.463299630000000E+02, -0.122888337000000E+03),\n new google.maps.LatLng( 0.463288200000000E+02, -0.122888041000000E+03),\n new google.maps.LatLng( 0.463280200000000E+02, -0.122888471000000E+03),\n new google.maps.LatLng( 0.463273580000000E+02, -0.122889659000000E+03),\n new google.maps.LatLng( 0.463268340000000E+02, -0.122894180000000E+03),\n new google.maps.LatLng( 0.463255550000000E+02, -0.122898801000000E+03),\n new google.maps.LatLng( 0.463232700000000E+02, -0.122902102000000E+03),\n new google.maps.LatLng( 0.463218760000000E+02, -0.122903126000000E+03),\n new google.maps.LatLng( 0.463201390000000E+02, -0.122903655000000E+03),\n new google.maps.LatLng( 0.463176930000000E+02, -0.122903095000000E+03),\n new google.maps.LatLng( 0.463158190000000E+02, -0.122904548000000E+03),\n new google.maps.LatLng( 0.463154990000000E+02, -0.122905868000000E+03),\n new google.maps.LatLng( 0.463162540000000E+02, -0.122906989000000E+03),\n new google.maps.LatLng( 0.463190430000000E+02, -0.122907317000000E+03),\n new google.maps.LatLng( 0.463196600000000E+02, -0.122908208000000E+03),\n new google.maps.LatLng( 0.463179460000000E+02, -0.122910023000000E+03),\n new google.maps.LatLng( 0.463160720000000E+02, -0.122909464000000E+03),\n new google.maps.LatLng( 0.463125970000000E+02, -0.122911379000000E+03),\n new google.maps.LatLng( 0.463110890000000E+02, -0.122912996000000E+03),\n new google.maps.LatLng( 0.463101290000000E+02, -0.122915338000000E+03),\n new google.maps.LatLng( 0.463103130000000E+02, -0.122917515000000E+03),\n new google.maps.LatLng( 0.463099240000000E+02, -0.122918967000000E+03),\n new google.maps.LatLng( 0.463054210000000E+02, -0.122918342000000E+03),\n new google.maps.LatLng( 0.463033630000000E+02, -0.122917221000000E+03),\n new google.maps.LatLng( 0.463018080000000E+02, -0.122915474000000E+03),\n new google.maps.LatLng( 0.462966190000000E+02, -0.122913101000000E+03),\n new google.maps.LatLng( 0.462937380000000E+02, -0.122913102000000E+03),\n new google.maps.LatLng( 0.462904930000000E+02, -0.122914225000000E+03),\n new google.maps.LatLng( 0.462872920000000E+02, -0.122913962000000E+03),\n new google.maps.LatLng( 0.462818970000000E+02, -0.122907766000000E+03),\n new google.maps.LatLng( 0.462757940000000E+02, -0.122912550000000E+03),\n new google.maps.LatLng( 0.462721150000000E+02, -0.122916013000000E+03),\n new google.maps.LatLng( 0.462710860000000E+02, -0.122917661000000E+03),\n new google.maps.LatLng( 0.462688920000000E+02, -0.122918816000000E+03),\n new google.maps.LatLng( 0.462670170000000E+02, -0.122916707000000E+03),\n new google.maps.LatLng( 0.462664450000000E+02, -0.122915026000000E+03),\n new google.maps.LatLng( 0.462671300000000E+02, -0.122912587000000E+03),\n new google.maps.LatLng( 0.462673120000000E+02, -0.122906752000000E+03),\n new google.maps.LatLng( 0.462654360000000E+02, -0.122903589000000E+03),\n new google.maps.LatLng( 0.462629660000000E+02, -0.122897823000000E+03),\n new google.maps.LatLng( 0.462618910000000E+02, -0.122897098000000E+03),\n new google.maps.LatLng( 0.462602910000000E+02, -0.122896836000000E+03),\n new google.maps.LatLng( 0.462579820000000E+02, -0.122897035000000E+03),\n new google.maps.LatLng( 0.462553070000000E+02, -0.122895554000000E+03),\n new google.maps.LatLng( 0.462532480000000E+02, -0.122892030000000E+03),\n new google.maps.LatLng( 0.462518750000000E+02, -0.122887286000000E+03),\n new google.maps.LatLng( 0.462512810000000E+02, -0.122886858000000E+03),\n new google.maps.LatLng( 0.462498340000000E+02, -0.122886728000000E+03),\n new google.maps.LatLng( 0.462462970000000E+02, -0.122889242000000E+03),\n new google.maps.LatLng( 0.462437940000000E+02, -0.122888586000000E+03),\n new google.maps.LatLng( 0.462416500000000E+02, -0.122888860000000E+03),\n new google.maps.LatLng( 0.462398550000000E+02, -0.122890372000000E+03),\n new google.maps.LatLng( 0.462398550000000E+02, -0.122890372000000E+03),\n new google.maps.LatLng( 0.462387130000000E+02, -0.122892568000000E+03),\n new google.maps.LatLng( 0.462382860000000E+02, -0.122895514000000E+03),\n new google.maps.LatLng( 0.462387130000000E+02, -0.122897726000000E+03),\n new google.maps.LatLng( 0.462406350000000E+02, -0.122901739000000E+03),\n new google.maps.LatLng( 0.462401690000000E+02, -0.122903235000000E+03),\n new google.maps.LatLng( 0.462379340000000E+02, -0.122904806000000E+03),\n new google.maps.LatLng( 0.462359430000000E+02, -0.122905188000000E+03),\n new google.maps.LatLng( 0.462342410000000E+02, -0.122903998000000E+03),\n new google.maps.LatLng( 0.462332660000000E+02, -0.122901404000000E+03),\n new google.maps.LatLng( 0.462335940000000E+02, -0.122897924000000E+03),\n new google.maps.LatLng( 0.462329380000000E+02, -0.122894307000000E+03),\n new google.maps.LatLng( 0.462322810000000E+02, -0.122893300000000E+03),\n new google.maps.LatLng( 0.462313810000000E+02, -0.122893010000000E+03),\n new google.maps.LatLng( 0.462149320000000E+02, -0.122913106000000E+03),\n new google.maps.LatLng( 0.462130550000000E+02, -0.122914571000000E+03),\n new google.maps.LatLng( 0.462109120000000E+02, -0.122914067000000E+03),\n new google.maps.LatLng( 0.462080120000000E+02, -0.122910833000000E+03),\n new google.maps.LatLng( 0.462054340000000E+02, -0.122909566000000E+03),\n new google.maps.LatLng( 0.462024050000000E+02, -0.122910421000000E+03),\n new google.maps.LatLng( 0.462011760000000E+02, -0.122911550000000E+03),\n new google.maps.LatLng( 0.461995430000000E+02, -0.122912042000000E+03),\n new google.maps.LatLng( 0.461987630000000E+02, -0.122911739000000E+03),\n new google.maps.LatLng( 0.461966220000000E+02, -0.122907872000000E+03),\n new google.maps.LatLng( 0.461954540000000E+02, -0.122903630000000E+03),\n new google.maps.LatLng( 0.461952330000000E+02, -0.122901006000000E+03),\n new google.maps.LatLng( 0.461928530000000E+02, -0.122897512000000E+03),\n new google.maps.LatLng( 0.461899460000000E+02, -0.122897068000000E+03),\n new google.maps.LatLng( 0.461805240000000E+02, -0.122900837000000E+03),\n new google.maps.LatLng( 0.461780900000000E+02, -0.122902958000000E+03),\n new google.maps.LatLng( 0.461771740000000E+02, -0.122904514000000E+03),\n new google.maps.LatLng( 0.461770240000000E+02, -0.122908004000000E+03),\n new google.maps.LatLng( 0.461742330000000E+02, -0.122912221000000E+03),\n new google.maps.LatLng( 0.461594330000000E+02, -0.122913521000000E+03),\n new google.maps.LatLng( 0.461515870000000E+02, -0.122912421000000E+03),\n new google.maps.LatLng( 0.461473330000000E+02, -0.122912421000000E+03),\n new google.maps.LatLng( 0.461426330000000E+02, -0.122914021000000E+03),\n new google.maps.LatLng( 0.461304330000000E+02, -0.122919521000000E+03),\n new google.maps.LatLng( 0.461249330000000E+02, -0.122919621000000E+03),\n new google.maps.LatLng( 0.461231330000000E+02, -0.122919021000000E+03),\n new google.maps.LatLng( 0.461195330000000E+02, -0.122915320000000E+03),\n new google.maps.LatLng( 0.461152330000000E+02, -0.122898220000000E+03),\n new google.maps.LatLng( 0.461102340000000E+02, -0.122891720000000E+03),\n new google.maps.LatLng( 0.461075340000000E+02, -0.122890119000000E+03),\n new google.maps.LatLng( 0.461064740000000E+02, -0.122890352000000E+03),\n new google.maps.LatLng( 0.461027890000000E+02, -0.122892763000000E+03),\n new google.maps.LatLng( 0.461002860000000E+02, -0.122896334000000E+03),\n new google.maps.LatLng( 0.460990810000000E+02, -0.122898990000000E+03),\n new google.maps.LatLng( 0.460985240000000E+02, -0.122907001000000E+03),\n new google.maps.LatLng( 0.460974930000000E+02, -0.122908893000000E+03),\n new google.maps.LatLng( 0.460964330000000E+02, -0.122906802000000E+03),\n new google.maps.LatLng( 0.460940610000000E+02, -0.122899050000000E+03),\n new google.maps.LatLng( 0.460893840000000E+02, -0.122888689000000E+03),\n new google.maps.LatLng( 0.460873470000000E+02, -0.122881289000000E+03),\n new google.maps.LatLng( 0.460861190000000E+02, -0.122878450000000E+03),\n new google.maps.LatLng( 0.460805800000000E+02, -0.122871461000000E+03),\n new google.maps.LatLng( 0.460766240000000E+02, -0.122869095000000E+03),\n new google.maps.LatLng( 0.460744680000000E+02, -0.122868669000000E+03),\n new google.maps.LatLng( 0.460685560000000E+02, -0.122868928000000E+03),\n new google.maps.LatLng( 0.460576990000000E+02, -0.122866684000000E+03),\n new google.maps.LatLng( 0.460557330000000E+02, -0.122867343000000E+03),\n new google.maps.LatLng( 0.460557330000000E+02, -0.122867343000000E+03),\n new google.maps.LatLng( 0.460533320000000E+02, -0.122867796000000E+03),\n new google.maps.LatLng( 0.460481180000000E+02, -0.122871369000000E+03),\n new google.maps.LatLng( 0.460534910000000E+02, -0.122870127000000E+03),\n new google.maps.LatLng( 0.460541550000000E+02, -0.122869504000000E+03),\n new google.maps.LatLng( 0.460571260000000E+02, -0.122870032000000E+03),\n new google.maps.LatLng( 0.460558910000000E+02, -0.122871607000000E+03),\n new google.maps.LatLng( 0.460498780000000E+02, -0.122873505000000E+03),\n new google.maps.LatLng( 0.460512950000000E+02, -0.122874098000000E+03),\n new google.maps.LatLng( 0.460523460000000E+02, -0.122873869000000E+03),\n new google.maps.LatLng( 0.460511570000000E+02, -0.122875444000000E+03),\n new google.maps.LatLng( 0.460499220000000E+02, -0.122875794000000E+03),\n new google.maps.LatLng( 0.460469730000000E+02, -0.122875078000000E+03),\n new google.maps.LatLng( 0.460428580000000E+02, -0.122875741000000E+03),\n new google.maps.LatLng( 0.460406860000000E+02, -0.122875465000000E+03),\n new google.maps.LatLng( 0.460373730000000E+02, -0.122873820000000E+03),\n new google.maps.LatLng( 0.460344250000000E+02, -0.122871092000000E+03),\n new google.maps.LatLng( 0.460379670000000E+02, -0.122873328000000E+03),\n new google.maps.LatLng( 0.460394790000000E+02, -0.122867847000000E+03),\n new google.maps.LatLng( 0.460394560000000E+02, -0.122866468000000E+03),\n new google.maps.LatLng( 0.460379030000000E+02, -0.122864071000000E+03),\n new google.maps.LatLng( 0.460361660000000E+02, -0.122863511000000E+03),\n new google.maps.LatLng( 0.460349780000000E+02, -0.122862328000000E+03),\n new google.maps.LatLng( 0.460347280000000E+02, -0.122858488000000E+03),\n new google.maps.LatLng( 0.460343150000000E+02, -0.122861901000000E+03),\n new google.maps.LatLng( 0.460349310000000E+02, -0.122863412000000E+03),\n new google.maps.LatLng( 0.460369880000000E+02, -0.122865186000000E+03),\n new google.maps.LatLng( 0.460336502322266E+02, -0.122865131793359E+03),\n new google.maps.LatLng( 0.460327454322266E+02, -0.122864225193359E+03),\n new google.maps.LatLng( 0.460339802322266E+02, -0.122863615593359E+03),\n new google.maps.LatLng( 0.460323030000000E+02, -0.122863048000000E+03),\n new google.maps.LatLng( 0.460313190000000E+02, -0.122863211000000E+03),\n new google.maps.LatLng( 0.460308840000000E+02, -0.122864754000000E+03),\n new google.maps.LatLng( 0.460318670000000E+02, -0.122866067000000E+03),\n new google.maps.LatLng( 0.460354780000000E+02, -0.122866924000000E+03),\n new google.maps.LatLng( 0.460368730000000E+02, -0.122865809000000E+03),\n new google.maps.LatLng( 0.460382220000000E+02, -0.122866073000000E+03),\n new google.maps.LatLng( 0.460386560000000E+02, -0.122868207000000E+03),\n new google.maps.LatLng( 0.460376480000000E+02, -0.122871817000000E+03),\n new google.maps.LatLng( 0.460362760000000E+02, -0.122871455000000E+03),\n new google.maps.LatLng( 0.460349970000000E+02, -0.122869911000000E+03),\n new google.maps.LatLng( 0.460338080000000E+02, -0.122869745000000E+03),\n new google.maps.LatLng( 0.460326190000000E+02, -0.122870433000000E+03),\n new google.maps.LatLng( 0.460320020000000E+02, -0.122870301000000E+03),\n new google.maps.LatLng( 0.460295790000000E+02, -0.122869413000000E+03),\n new google.maps.LatLng( 0.460265400000000E+02, -0.122867473000000E+03),\n new google.maps.LatLng( 0.460198220000000E+02, -0.122859034000000E+03),\n new google.maps.LatLng( 0.460088080000000E+02, -0.122847705000000E+03),\n new google.maps.LatLng( 0.460063390000000E+02, -0.122846424000000E+03),\n new google.maps.LatLng( 0.460058130000000E+02, -0.122847146000000E+03),\n new google.maps.LatLng( 0.460089910000000E+02, -0.122849018000000E+03),\n new google.maps.LatLng( 0.460091050000000E+02, -0.122849936000000E+03),\n new google.maps.LatLng( 0.460087390000000E+02, -0.122849969000000E+03),\n new google.maps.LatLng( 0.460010360000000E+02, -0.122845568000000E+03),\n new google.maps.LatLng( 0.459967650000000E+02, -0.122843926000000E+03),\n new google.maps.LatLng( 0.459758510000000E+02, -0.122827847000000E+03),\n new google.maps.LatLng( 0.459721700000000E+02, -0.122823912000000E+03),\n new google.maps.LatLng( 0.459701820000000E+02, -0.122820043000000E+03),\n new google.maps.LatLng( 0.459630720000000E+02, -0.122812797000000E+03),\n new google.maps.LatLng( 0.459583620000000E+02, -0.122805258000000E+03),\n new google.maps.LatLng( 0.459574780000000E+02, -0.122804564000000E+03),\n new google.maps.LatLng( 0.459574780000000E+02, -0.122804564000000E+03),\n new google.maps.LatLng( 0.459521910000000E+02, -0.122792915000000E+03),\n new google.maps.LatLng( 0.459463340000000E+02, -0.122785138000000E+03),\n new google.maps.LatLng( 0.459422420000000E+02, -0.122785042000000E+03),\n new google.maps.LatLng( 0.459396820000000E+02, -0.122785797000000E+03),\n new google.maps.LatLng( 0.459340810000000E+02, -0.122788093000000E+03),\n new google.maps.LatLng( 0.459280470000000E+02, -0.122791601000000E+03),\n new google.maps.LatLng( 0.459267890000000E+02, -0.122792847000000E+03),\n new google.maps.LatLng( 0.459249840000000E+02, -0.122796025000000E+03),\n new google.maps.LatLng( 0.459236820000000E+02, -0.122801366000000E+03),\n new google.maps.LatLng( 0.459216930000000E+02, -0.122802840000000E+03),\n new google.maps.LatLng( 0.459193610000000E+02, -0.122803791000000E+03),\n new google.maps.LatLng( 0.459149720000000E+02, -0.122804414000000E+03),\n new google.maps.LatLng( 0.459109020000000E+02, -0.122804349000000E+03),\n new google.maps.LatLng( 0.459060100000000E+02, -0.122803694000000E+03),\n new google.maps.LatLng( 0.459010260000000E+02, -0.122800879000000E+03),\n new google.maps.LatLng( 0.458885870000000E+02, -0.122787001000000E+03),\n new google.maps.LatLng( 0.458808360000000E+02, -0.122782225000000E+03),\n new google.maps.LatLng( 0.458740510000000E+02, -0.122779120000000E+03),\n new google.maps.LatLng( 0.458714220000000E+02, -0.122778238000000E+03),\n new google.maps.LatLng( 0.458679010000000E+02, -0.122778174000000E+03),\n new google.maps.LatLng( 0.458663240000000E+02, -0.122778895000000E+03),\n new google.maps.LatLng( 0.458661420000000E+02, -0.122780433000000E+03),\n new google.maps.LatLng( 0.458666910000000E+02, -0.122780793000000E+03),\n new google.maps.LatLng( 0.458678330000000E+02, -0.122779516000000E+03),\n new google.maps.LatLng( 0.458685880000000E+02, -0.122779385000000E+03),\n new google.maps.LatLng( 0.458729320000000E+02, -0.122782589000000E+03),\n new google.maps.LatLng( 0.458733670000000E+02, -0.122784880000000E+03),\n new google.maps.LatLng( 0.458768130000000E+02, -0.122787662000000E+03),\n new google.maps.LatLng( 0.458849300000000E+02, -0.122792895000000E+03),\n new google.maps.LatLng( 0.458889540000000E+02, -0.122794891000000E+03),\n new google.maps.LatLng( 0.458892970000000E+02, -0.122796004000000E+03),\n new google.maps.LatLng( 0.458860280000000E+02, -0.122795219000000E+03),\n new google.maps.LatLng( 0.458841760000000E+02, -0.122794238000000E+03),\n new google.maps.LatLng( 0.458786430000000E+02, -0.122790410000000E+03),\n new google.maps.LatLng( 0.458732760000000E+02, -0.122785796000000E+03),\n new google.maps.LatLng( 0.458647250000000E+02, -0.122781089000000E+03),\n new google.maps.LatLng( 0.458610440000000E+02, -0.122780829000000E+03),\n new google.maps.LatLng( 0.458565400000000E+02, -0.122781257000000E+03),\n new google.maps.LatLng( 0.458540940000000E+02, -0.122780768000000E+03),\n new google.maps.LatLng( 0.458538420000000E+02, -0.122779623000000E+03),\n new google.maps.LatLng( 0.458573610000000E+02, -0.122775629000000E+03),\n new google.maps.LatLng( 0.458583900000000E+02, -0.122773698000000E+03),\n new google.maps.LatLng( 0.458618150000000E+02, -0.122763781000000E+03),\n new google.maps.LatLng( 0.458641880000000E+02, -0.122752489000000E+03),\n new google.maps.LatLng( 0.458653310000000E+02, -0.122750814000000E+03),\n new google.maps.LatLng( 0.458690130000000E+02, -0.122747878000000E+03),\n new google.maps.LatLng( 0.458703170000000E+02, -0.122745621000000E+03),\n new google.maps.LatLng( 0.458714150000000E+02, -0.122742055000000E+03),\n new google.maps.LatLng( 0.458717370000000E+02, -0.122737703000000E+03),\n new google.maps.LatLng( 0.458712360000000E+02, -0.122733841000000E+03),\n new google.maps.LatLng( 0.458669650000000E+02, -0.122722777000000E+03),\n new google.maps.LatLng( 0.458674220000000E+02, -0.122721174000000E+03),\n new google.maps.LatLng( 0.458681080000000E+02, -0.122720552000000E+03),\n new google.maps.LatLng( 0.458699830000000E+02, -0.122720259000000E+03),\n new google.maps.LatLng( 0.458709430000000E+02, -0.122720717000000E+03),\n new google.maps.LatLng( 0.458770380000000E+02, -0.122729329000000E+03),\n new google.maps.LatLng( 0.458848540000000E+02, -0.122734900000000E+03),\n new google.maps.LatLng( 0.458878950000000E+02, -0.122735231000000E+03),\n new google.maps.LatLng( 0.458921480000000E+02, -0.122733597000000E+03),\n new google.maps.LatLng( 0.458946170000000E+02, -0.122733468000000E+03),\n new google.maps.LatLng( 0.459016400000000E+02, -0.122738163000000E+03),\n new google.maps.LatLng( 0.459023740000000E+02, -0.122737392000000E+03),\n new google.maps.LatLng( 0.459058560000000E+02, -0.122737330000000E+03),\n new google.maps.LatLng( 0.459075610000000E+02, -0.122737709000000E+03),\n new google.maps.LatLng( 0.459108020000000E+02, -0.122739534000000E+03),\n new google.maps.LatLng( 0.459139300000000E+02, -0.122740343000000E+03),\n new google.maps.LatLng( 0.459147540000000E+02, -0.122740128000000E+03),\n new google.maps.LatLng( 0.459152870000000E+02, -0.122738996000000E+03),\n new google.maps.LatLng( 0.459140270000000E+02, -0.122732568000000E+03),\n new google.maps.LatLng( 0.459143690000000E+02, -0.122730744000000E+03),\n new google.maps.LatLng( 0.459175010000000E+02, -0.122724545000000E+03),\n new google.maps.LatLng( 0.459193710000000E+02, -0.122723310000000E+03),\n new google.maps.LatLng( 0.459247700000000E+02, -0.122718759000000E+03),\n new google.maps.LatLng( 0.459261490000000E+02, -0.122718531000000E+03),\n new google.maps.LatLng( 0.459292950000000E+02, -0.122720193000000E+03),\n new google.maps.LatLng( 0.459318920000000E+02, -0.122720910000000E+03),\n new google.maps.LatLng( 0.459332560000000E+02, -0.122719712000000E+03),\n new google.maps.LatLng( 0.459337150000000E+02, -0.122717724000000E+03),\n new google.maps.LatLng( 0.459319320000000E+02, -0.122713940000000E+03),\n new google.maps.LatLng( 0.459312650000000E+02, -0.122711679000000E+03),\n new google.maps.LatLng( 0.459317060000000E+02, -0.122708050000000E+03),\n new google.maps.LatLng( 0.459326150000000E+02, -0.122707224000000E+03),\n new google.maps.LatLng( 0.459345690000000E+02, -0.122701811000000E+03),\n new google.maps.LatLng( 0.459344270000000E+02, -0.122699327000000E+03),\n new google.maps.LatLng( 0.459349830000000E+02, -0.122698287000000E+03),\n new google.maps.LatLng( 0.459355720000000E+02, -0.122697270000000E+03),\n new google.maps.LatLng( 0.459359650000000E+02, -0.122697543000000E+03),\n new google.maps.LatLng( 0.459374270000000E+02, -0.122695053000000E+03),\n new google.maps.LatLng( 0.459407560000000E+02, -0.122694974000000E+03),\n new google.maps.LatLng( 0.459414690000000E+02, -0.122693305000000E+03),\n new google.maps.LatLng( 0.459415600000000E+02, -0.122692547000000E+03),\n new google.maps.LatLng( 0.459414480000000E+02, -0.122690023000000E+03),\n new google.maps.LatLng( 0.459382960000000E+02, -0.122680053000000E+03),\n new google.maps.LatLng( 0.459379130000000E+02, -0.122678228000000E+03),\n new google.maps.LatLng( 0.459369910000000E+02, -0.122669259000000E+03),\n new google.maps.LatLng( 0.459334100000000E+02, -0.122662201000000E+03),\n new google.maps.LatLng( 0.459324690000000E+02, -0.122660904000000E+03),\n new google.maps.LatLng( 0.459288110000000E+02, -0.122658728000000E+03),\n new google.maps.LatLng( 0.459279580000000E+02, -0.122656382000000E+03),\n new google.maps.LatLng( 0.459287840000000E+02, -0.122654862000000E+03),\n new google.maps.LatLng( 0.459341230000000E+02, -0.122651122000000E+03),\n new google.maps.LatLng( 0.459360740000000E+02, -0.122646752000000E+03),\n new google.maps.LatLng( 0.459358120000000E+02, -0.122645824000000E+03),\n new google.maps.LatLng( 0.459370460000000E+02, -0.122643005000000E+03),\n new google.maps.LatLng( 0.459370460000000E+02, -0.122642678000000E+03),\n new google.maps.LatLng( 0.459362680000000E+02, -0.122642810000000E+03),\n new google.maps.LatLng( 0.459346930000000E+02, -0.122647496000000E+03),\n new google.maps.LatLng( 0.459352824189453E+02, -0.122647772037695E+03),\n new google.maps.LatLng( 0.459348310000000E+02, -0.122649265000000E+03),\n new google.maps.LatLng( 0.459324770000000E+02, -0.122652248000000E+03),\n new google.maps.LatLng( 0.459288650000000E+02, -0.122654249000000E+03),\n new google.maps.LatLng( 0.459276090000000E+02, -0.122656182000000E+03),\n new google.maps.LatLng( 0.459285700000000E+02, -0.122658999000000E+03),\n new google.maps.LatLng( 0.459312680000000E+02, -0.122660570000000E+03),\n new google.maps.LatLng( 0.459334400000000E+02, -0.122662928000000E+03),\n new google.maps.LatLng( 0.459368250000000E+02, -0.122669939000000E+03),\n new google.maps.LatLng( 0.459370100000000E+02, -0.122677147000000E+03),\n new google.maps.LatLng( 0.459378560000000E+02, -0.122682914000000E+03),\n new google.maps.LatLng( 0.459373300000000E+02, -0.122686977000000E+03),\n new google.maps.LatLng( 0.459366670000000E+02, -0.122687992000000E+03),\n new google.maps.LatLng( 0.459336950000000E+02, -0.122688222000000E+03),\n new google.maps.LatLng( 0.459325980000000E+02, -0.122687861000000E+03),\n new google.maps.LatLng( 0.459326440000000E+02, -0.122687009000000E+03),\n new google.maps.LatLng( 0.459301060000000E+02, -0.122688254000000E+03),\n new google.maps.LatLng( 0.459283230000000E+02, -0.122689663000000E+03),\n new google.maps.LatLng( 0.459278430000000E+02, -0.122691760000000E+03),\n new google.maps.LatLng( 0.459287570000000E+02, -0.122696870000000E+03),\n new google.maps.LatLng( 0.459307460000000E+02, -0.122699786000000E+03),\n new google.maps.LatLng( 0.459296930000000E+02, -0.122711023000000E+03),\n new google.maps.LatLng( 0.459326170000000E+02, -0.122718068000000E+03),\n new google.maps.LatLng( 0.459332570000000E+02, -0.122717741000000E+03),\n new google.maps.LatLng( 0.459331660000000E+02, -0.122718822000000E+03),\n new google.maps.LatLng( 0.459328910000000E+02, -0.122719608000000E+03),\n new google.maps.LatLng( 0.459316340000000E+02, -0.122720361000000E+03),\n new google.maps.LatLng( 0.459304220000000E+02, -0.122720327000000E+03),\n new google.maps.LatLng( 0.459269480000000E+02, -0.122718130000000E+03),\n new google.maps.LatLng( 0.459250050000000E+02, -0.122718031000000E+03),\n new google.maps.LatLng( 0.459198600000000E+02, -0.122721206000000E+03),\n new google.maps.LatLng( 0.459166360000000E+02, -0.122724119000000E+03),\n new google.maps.LatLng( 0.459148740000000E+02, -0.122726771000000E+03),\n new google.maps.LatLng( 0.459137070000000E+02, -0.122731355000000E+03),\n new google.maps.LatLng( 0.459136830000000E+02, -0.122733680000000E+03),\n new google.maps.LatLng( 0.459146870000000E+02, -0.122737578000000E+03),\n new google.maps.LatLng( 0.459143670000000E+02, -0.122739511000000E+03),\n new google.maps.LatLng( 0.459111210000000E+02, -0.122738623000000E+03),\n new google.maps.LatLng( 0.459106410000000E+02, -0.122738295000000E+03),\n new google.maps.LatLng( 0.459105950000000E+02, -0.122737378000000E+03),\n new google.maps.LatLng( 0.459090640000000E+02, -0.122736657000000E+03),\n new google.maps.LatLng( 0.459022280000000E+02, -0.122736651000000E+03),\n new google.maps.LatLng( 0.458953040000000E+02, -0.122731112000000E+03),\n new google.maps.LatLng( 0.458926970000000E+02, -0.122731535000000E+03),\n new google.maps.LatLng( 0.458885810000000E+02, -0.122733660000000E+03),\n new google.maps.LatLng( 0.458847410000000E+02, -0.122732674000000E+03),\n new google.maps.LatLng( 0.458792100000000E+02, -0.122729691000000E+03),\n new google.maps.LatLng( 0.458767420000000E+02, -0.122726744000000E+03),\n new google.maps.LatLng( 0.458743260000000E+02, -0.122722519000000E+03),\n new google.maps.LatLng( 0.458716060000000E+02, -0.122719376000000E+03),\n new google.maps.LatLng( 0.458691610000000E+02, -0.122717968000000E+03),\n new google.maps.LatLng( 0.458678120000000E+02, -0.122718000000000E+03),\n new google.maps.LatLng( 0.458660970000000E+02, -0.122718849000000E+03),\n new google.maps.LatLng( 0.458656170000000E+02, -0.122718489000000E+03),\n new google.maps.LatLng( 0.458663950000000E+02, -0.122715708000000E+03),\n new google.maps.LatLng( 0.458674700000000E+02, -0.122714007000000E+03),\n new google.maps.LatLng( 0.458684990000000E+02, -0.122713320000000E+03),\n new google.maps.LatLng( 0.458712420000000E+02, -0.122714009000000E+03),\n new google.maps.LatLng( 0.458724540000000E+02, -0.122713027000000E+03),\n new google.maps.LatLng( 0.458735680000000E+02, -0.122711222000000E+03),\n new google.maps.LatLng( 0.458735680000000E+02, -0.122711222000000E+03),\n new google.maps.LatLng( 0.458728200000000E+02, -0.122708740000000E+03),\n new google.maps.LatLng( 0.458704200000000E+02, -0.122705827000000E+03),\n new google.maps.LatLng( 0.458695290000000E+02, -0.122704027000000E+03),\n new google.maps.LatLng( 0.458668790000000E+02, -0.122693655000000E+03),\n new google.maps.LatLng( 0.458593320000000E+02, -0.122670781000000E+03),\n new google.maps.LatLng( 0.458556970000000E+02, -0.122671502000000E+03),\n new google.maps.LatLng( 0.458494550000000E+02, -0.122664438000000E+03),\n new google.maps.LatLng( 0.458503000000000E+02, -0.122662474000000E+03),\n new google.maps.LatLng( 0.458510310000000E+02, -0.122657927000000E+03),\n new google.maps.LatLng( 0.458505960000000E+02, -0.122655375000000E+03),\n new google.maps.LatLng( 0.458488800000000E+02, -0.122651549000000E+03),\n new google.maps.LatLng( 0.458413790000000E+02, -0.122644456000000E+03),\n new google.maps.LatLng( 0.458366460000000E+02, -0.122643087000000E+03),\n new google.maps.LatLng( 0.458362800000000E+02, -0.122643512000000E+03),\n new google.maps.LatLng( 0.458362800000000E+02, -0.122643512000000E+03),\n new google.maps.LatLng( 0.458413560000000E+02, -0.122645307000000E+03),\n new google.maps.LatLng( 0.458433460000000E+02, -0.122648053000000E+03),\n new google.maps.LatLng( 0.458461130000000E+02, -0.122649425000000E+03),\n new google.maps.LatLng( 0.458486290000000E+02, -0.122652367000000E+03),\n new google.maps.LatLng( 0.458504130000000E+02, -0.122656651000000E+03),\n new google.maps.LatLng( 0.458497520000000E+02, -0.122662638000000E+03),\n new google.maps.LatLng( 0.458489750000000E+02, -0.122664013000000E+03),\n new google.maps.LatLng( 0.458492040000000E+02, -0.122664928000000E+03),\n new google.maps.LatLng( 0.458516050000000E+02, -0.122668068000000E+03),\n new google.maps.LatLng( 0.458540050000000E+02, -0.122669866000000E+03),\n new google.maps.LatLng( 0.458556520000000E+02, -0.122672058000000E+03),\n new google.maps.LatLng( 0.458582810000000E+02, -0.122671632000000E+03),\n new google.maps.LatLng( 0.458591500000000E+02, -0.122671926000000E+03),\n new google.maps.LatLng( 0.458584420000000E+02, -0.122677521000000E+03),\n new google.maps.LatLng( 0.458596530000000E+02, -0.122678797000000E+03),\n new google.maps.LatLng( 0.458612770000000E+02, -0.122679484000000E+03),\n new google.maps.LatLng( 0.458624430000000E+02, -0.122681185000000E+03),\n new google.maps.LatLng( 0.458621000000000E+02, -0.122686258000000E+03),\n new google.maps.LatLng( 0.458634950000000E+02, -0.122687763000000E+03),\n new google.maps.LatLng( 0.458645690000000E+02, -0.122689922000000E+03),\n new google.maps.LatLng( 0.458643400000000E+02, -0.122690282000000E+03),\n new google.maps.LatLng( 0.458623510000000E+02, -0.122687337000000E+03),\n new google.maps.LatLng( 0.458615510000000E+02, -0.122687174000000E+03),\n new google.maps.LatLng( 0.458615740000000E+02, -0.122687599000000E+03),\n new google.maps.LatLng( 0.458653230000000E+02, -0.122692409000000E+03),\n new google.maps.LatLng( 0.458668320000000E+02, -0.122695584000000E+03),\n new google.maps.LatLng( 0.458681570000000E+02, -0.122704092000000E+03),\n new google.maps.LatLng( 0.458690030000000E+02, -0.122704747000000E+03),\n new google.maps.LatLng( 0.458727060000000E+02, -0.122710442000000E+03),\n new google.maps.LatLng( 0.458719740000000E+02, -0.122712275000000E+03),\n new google.maps.LatLng( 0.458709220000000E+02, -0.122712830000000E+03),\n new google.maps.LatLng( 0.458688190000000E+02, -0.122712044000000E+03),\n new google.maps.LatLng( 0.458677900000000E+02, -0.122712502000000E+03),\n new google.maps.LatLng( 0.458654570000000E+02, -0.122716330000000E+03),\n new google.maps.LatLng( 0.458650680000000E+02, -0.122718914000000E+03),\n new google.maps.LatLng( 0.458658440000000E+02, -0.122723365000000E+03),\n new google.maps.LatLng( 0.458682430000000E+02, -0.122729191000000E+03),\n new google.maps.LatLng( 0.458692240000000E+02, -0.122733479000000E+03),\n new google.maps.LatLng( 0.458696800000000E+02, -0.122736687000000E+03),\n new google.maps.LatLng( 0.458694720000000E+02, -0.122742708000000E+03),\n new google.maps.LatLng( 0.458688550000000E+02, -0.122743918000000E+03),\n new google.maps.LatLng( 0.458640980000000E+02, -0.122748396000000E+03),\n new google.maps.LatLng( 0.458597120000000E+02, -0.122764078000000E+03),\n new google.maps.LatLng( 0.458569020000000E+02, -0.122770395000000E+03),\n new google.maps.LatLng( 0.458575880000000E+02, -0.122770950000000E+03),\n new google.maps.LatLng( 0.458575430000000E+02, -0.122771637000000E+03),\n new google.maps.LatLng( 0.458565370000000E+02, -0.122772980000000E+03),\n new google.maps.LatLng( 0.458510750000000E+02, -0.122776517000000E+03),\n new google.maps.LatLng( 0.458491310000000E+02, -0.122776224000000E+03),\n new google.maps.LatLng( 0.458476690000000E+02, -0.122777500000000E+03),\n new google.maps.LatLng( 0.458452460000000E+02, -0.122781035000000E+03),\n new google.maps.LatLng( 0.458438520000000E+02, -0.122780676000000E+03),\n new google.maps.LatLng( 0.458365570000000E+02, -0.122771359000000E+03),\n new google.maps.LatLng( 0.458352750000000E+02, -0.122768317000000E+03),\n new google.maps.LatLng( 0.458345190000000E+02, -0.122763445000000E+03),\n new google.maps.LatLng( 0.458334670000000E+02, -0.122761680000000E+03),\n new google.maps.LatLng( 0.458281830000000E+02, -0.122757107000000E+03),\n new google.maps.LatLng( 0.458184190000000E+02, -0.122752147000000E+03),\n new google.maps.LatLng( 0.458142370000000E+02, -0.122747951000000E+03),\n new google.maps.LatLng( 0.458098500000000E+02, -0.122741342000000E+03),\n new google.maps.LatLng( 0.458068560000000E+02, -0.122739901000000E+03),\n new google.maps.LatLng( 0.458045470000000E+02, -0.122739735000000E+03),\n new google.maps.LatLng( 0.457929320000000E+02, -0.122743287000000E+03),\n new google.maps.LatLng( 0.457844270000000E+02, -0.122743442000000E+03),\n new google.maps.LatLng( 0.457701830000000E+02, -0.122746205000000E+03),\n new google.maps.LatLng( 0.457668900000000E+02, -0.122747965000000E+03),\n new google.maps.LatLng( 0.457613800000000E+02, -0.122748841000000E+03),\n new google.maps.LatLng( 0.457576760000000E+02, -0.122749164000000E+03),\n new google.maps.LatLng( 0.457498370000000E+02, -0.122748714000000E+03),\n new google.maps.LatLng( 0.457444610000000E+02, -0.122747691000000E+03),\n new google.maps.LatLng( 0.457372930000000E+02, -0.122745066000000E+03),\n new google.maps.LatLng( 0.457350370000000E+02, -0.122739370000000E+03),\n new google.maps.LatLng( 0.457368610000000E+02, -0.122745114000000E+03),\n new google.maps.LatLng( 0.457345250000000E+02, -0.122746106000000E+03),\n new google.maps.LatLng( 0.457277410000000E+02, -0.122741978000000E+03),\n new google.maps.LatLng( 0.457269890000000E+02, -0.122740922000000E+03),\n new google.maps.LatLng( 0.457254850000000E+02, -0.122735546000000E+03),\n new google.maps.LatLng( 0.457268930000000E+02, -0.122735370000000E+03),\n new google.maps.LatLng( 0.457282530000000E+02, -0.122736794000000E+03),\n new google.maps.LatLng( 0.457300930000000E+02, -0.122737626000000E+03),\n new google.maps.LatLng( 0.457322050000000E+02, -0.122736154000000E+03),\n new google.maps.LatLng( 0.457350690000000E+02, -0.122737386000000E+03),\n new google.maps.LatLng( 0.457355490000000E+02, -0.122737018000000E+03),\n new google.maps.LatLng( 0.457353570000000E+02, -0.122735898000000E+03),\n new google.maps.LatLng( 0.457336320000000E+02, -0.122735258000000E+03),\n new google.maps.LatLng( 0.457341090000000E+02, -0.122736314000000E+03),\n new google.maps.LatLng( 0.457328610000000E+02, -0.122735322000000E+03),\n new google.maps.LatLng( 0.457327370000000E+02, -0.122734010000000E+03),\n new google.maps.LatLng( 0.457327370000000E+02, -0.122734010000000E+03),\n new google.maps.LatLng( 0.457323490000000E+02, -0.122734762000000E+03),\n new google.maps.LatLng( 0.457319330000000E+02, -0.122734794000000E+03),\n new google.maps.LatLng( 0.457309090000000E+02, -0.122734186000000E+03),\n new google.maps.LatLng( 0.457289570000000E+02, -0.122733674000000E+03),\n new google.maps.LatLng( 0.457291330000000E+02, -0.122734042000000E+03),\n new google.maps.LatLng( 0.457315810000000E+02, -0.122735706000000E+03),\n new google.maps.LatLng( 0.457305250000000E+02, -0.122736954000000E+03),\n new google.maps.LatLng( 0.457300450000000E+02, -0.122737098000000E+03),\n new google.maps.LatLng( 0.457289730000000E+02, -0.122736570000000E+03),\n new google.maps.LatLng( 0.457274370000000E+02, -0.122734938000000E+03),\n new google.maps.LatLng( 0.457250210000000E+02, -0.122734714000000E+03),\n new google.maps.LatLng( 0.457230850000000E+02, -0.122732778000000E+03),\n new google.maps.LatLng( 0.457199330000000E+02, -0.122730490000000E+03),\n new google.maps.LatLng( 0.457196930000000E+02, -0.122729930000000E+03),\n new google.maps.LatLng( 0.457186850000000E+02, -0.122729034000000E+03),\n new google.maps.LatLng( 0.457148770000000E+02, -0.122726810000000E+03),\n new google.maps.LatLng( 0.457091180000000E+02, -0.122721802000000E+03),\n new google.maps.LatLng( 0.457083820000000E+02, -0.122721546000000E+03),\n new google.maps.LatLng( 0.457068460000000E+02, -0.122721818000000E+03),\n new google.maps.LatLng( 0.457041420000000E+02, -0.122720122000000E+03),\n new google.maps.LatLng( 0.457034380000000E+02, -0.122719098000000E+03),\n new google.maps.LatLng( 0.457037071822266E+02, -0.122718934907422E+03),\n new google.maps.LatLng( 0.457032751822266E+02, -0.122717869307422E+03),\n new google.maps.LatLng( 0.457039567822266E+02, -0.122719002107422E+03),\n new google.maps.LatLng( 0.457050319822266E+02, -0.122720077307422E+03),\n new google.maps.LatLng( 0.457056940000000E+02, -0.122720202000000E+03),\n new google.maps.LatLng( 0.457059660000000E+02, -0.122719514000000E+03),\n new google.maps.LatLng( 0.457056620000000E+02, -0.122718874000000E+03),\n new google.maps.LatLng( 0.457021260000000E+02, -0.122715738000000E+03),\n new google.maps.LatLng( 0.457018700000000E+02, -0.122715626000000E+03),\n new google.maps.LatLng( 0.457018060000000E+02, -0.122715994000000E+03),\n new google.maps.LatLng( 0.457024460000000E+02, -0.122717738000000E+03),\n new google.maps.LatLng( 0.457005100000000E+02, -0.122715658000000E+03),\n new google.maps.LatLng( 0.456987500000000E+02, -0.122716922000000E+03),\n new google.maps.LatLng( 0.456978380000000E+02, -0.122717274000000E+03),\n new google.maps.LatLng( 0.456976300000000E+02, -0.122716906000000E+03),\n new google.maps.LatLng( 0.456978700000000E+02, -0.122716410000000E+03),\n new google.maps.LatLng( 0.456991660000000E+02, -0.122715802000000E+03),\n new google.maps.LatLng( 0.456991660000000E+02, -0.122715546000000E+03),\n new google.maps.LatLng( 0.456974860000000E+02, -0.122713882000000E+03),\n new google.maps.LatLng( 0.456967660000000E+02, -0.122712154000000E+03),\n new google.maps.LatLng( 0.456965740000000E+02, -0.122710377000000E+03),\n new google.maps.LatLng( 0.456949580000000E+02, -0.122708041000000E+03),\n new google.maps.LatLng( 0.456934380000000E+02, -0.122706681000000E+03),\n new google.maps.LatLng( 0.456924300000000E+02, -0.122706553000000E+03),\n new google.maps.LatLng( 0.456913100000000E+02, -0.122705753000000E+03),\n new google.maps.LatLng( 0.456886060000000E+02, -0.122704745000000E+03),\n new google.maps.LatLng( 0.456867180000000E+02, -0.122702921000000E+03),\n new google.maps.LatLng( 0.456831980000000E+02, -0.122697801000000E+03),\n new google.maps.LatLng( 0.456818380000000E+02, -0.122697337000000E+03),\n new google.maps.LatLng( 0.456799340000000E+02, -0.122695625000000E+03),\n new google.maps.LatLng( 0.456794860000000E+02, -0.122694745000000E+03),\n new google.maps.LatLng( 0.456780780000000E+02, -0.122693689000000E+03),\n new google.maps.LatLng( 0.456776940000000E+02, -0.122693657000000E+03),\n new google.maps.LatLng( 0.456773740000000E+02, -0.122694089000000E+03),\n new google.maps.LatLng( 0.456756620000000E+02, -0.122692761000000E+03),\n new google.maps.LatLng( 0.456749900000000E+02, -0.122693097000000E+03),\n new google.maps.LatLng( 0.456755500000000E+02, -0.122696361000000E+03),\n new google.maps.LatLng( 0.456760380000000E+02, -0.122697409000000E+03),\n new google.maps.LatLng( 0.456770380000000E+02, -0.122696209000000E+03),\n new google.maps.LatLng( 0.456762380000000E+02, -0.122698709000000E+03),\n new google.maps.LatLng( 0.456688380000000E+02, -0.122702009000000E+03),\n new google.maps.LatLng( 0.456694380000000E+02, -0.122700009000000E+03),\n new google.maps.LatLng( 0.456683380000000E+02, -0.122702209000000E+03),\n new google.maps.LatLng( 0.456637380000000E+02, -0.122716609000000E+03),\n new google.maps.LatLng( 0.456677260000000E+02, -0.122724393000000E+03),\n new google.maps.LatLng( 0.456679500000000E+02, -0.122725865000000E+03),\n new google.maps.LatLng( 0.456679500000000E+02, -0.122725865000000E+03),\n new google.maps.LatLng( 0.456681740000000E+02, -0.122727481000000E+03),\n new google.maps.LatLng( 0.456676460000000E+02, -0.122728650000000E+03),\n new google.maps.LatLng( 0.456662060000000E+02, -0.122727257000000E+03),\n new google.maps.LatLng( 0.456641420000000E+02, -0.122723177000000E+03),\n new google.maps.LatLng( 0.456593420000000E+02, -0.122724425000000E+03),\n new google.maps.LatLng( 0.456572460000000E+02, -0.122726057000000E+03),\n new google.maps.LatLng( 0.456558540000000E+02, -0.122725993000000E+03),\n new google.maps.LatLng( 0.456547980000000E+02, -0.122723833000000E+03),\n new google.maps.LatLng( 0.456545420000000E+02, -0.122721177000000E+03),\n new google.maps.LatLng( 0.456562060000000E+02, -0.122719881000000E+03),\n new google.maps.LatLng( 0.456565100000000E+02, -0.122719065000000E+03),\n new google.maps.LatLng( 0.456549100000000E+02, -0.122715961000000E+03),\n new google.maps.LatLng( 0.456555500000000E+02, -0.122715001000000E+03),\n new google.maps.LatLng( 0.456550700000000E+02, -0.122712953000000E+03),\n new google.maps.LatLng( 0.456463500000000E+02, -0.122706649000000E+03),\n new google.maps.LatLng( 0.456492140000000E+02, -0.122713865000000E+03),\n new google.maps.LatLng( 0.456501580000000E+02, -0.122715113000000E+03),\n new google.maps.LatLng( 0.456521580000000E+02, -0.122715689000000E+03),\n new google.maps.LatLng( 0.456528940000000E+02, -0.122724153000000E+03),\n new google.maps.LatLng( 0.456561900000000E+02, -0.122727833000000E+03),\n new google.maps.LatLng( 0.456573260000000E+02, -0.122727609000000E+03),\n new google.maps.LatLng( 0.456593160000000E+02, -0.122725786000000E+03),\n new google.maps.LatLng( 0.456605740000000E+02, -0.122725977000000E+03),\n new google.maps.LatLng( 0.456617580000000E+02, -0.122728265000000E+03),\n new google.maps.LatLng( 0.456654060000000E+02, -0.122728857000000E+03),\n new google.maps.LatLng( 0.456672780000000E+02, -0.122731338000000E+03),\n new google.maps.LatLng( 0.456673900000000E+02, -0.122734682000000E+03),\n new google.maps.LatLng( 0.456668300000000E+02, -0.122735114000000E+03),\n new google.maps.LatLng( 0.456618860000000E+02, -0.122733306000000E+03),\n new google.maps.LatLng( 0.456619980000000E+02, -0.122737114000000E+03),\n new google.maps.LatLng( 0.456653740000000E+02, -0.122740698000000E+03),\n new google.maps.LatLng( 0.456679340000000E+02, -0.122742138000000E+03),\n new google.maps.LatLng( 0.456709580000000E+02, -0.122742842000000E+03),\n new google.maps.LatLng( 0.456823820000000E+02, -0.122739546000000E+03),\n new google.maps.LatLng( 0.456882700000000E+02, -0.122736602000000E+03),\n new google.maps.LatLng( 0.456946380000000E+02, -0.122730058000000E+03),\n new google.maps.LatLng( 0.456948620000000E+02, -0.122730714000000E+03),\n new google.maps.LatLng( 0.456935660000000E+02, -0.122732122000000E+03),\n new google.maps.LatLng( 0.456957740000000E+02, -0.122730634000000E+03),\n new google.maps.LatLng( 0.456983980000000E+02, -0.122726362000000E+03),\n new google.maps.LatLng( 0.456985100000000E+02, -0.122724106000000E+03),\n new google.maps.LatLng( 0.457007020000000E+02, -0.122719706000000E+03),\n new google.maps.LatLng( 0.457011500000000E+02, -0.122719658000000E+03),\n new google.maps.LatLng( 0.457027180000000E+02, -0.122720730000000E+03),\n new google.maps.LatLng( 0.457032397495117E+02, -0.122722027288477E+03),\n new google.maps.LatLng( 0.457028940000000E+02, -0.122723530000000E+03),\n new google.maps.LatLng( 0.457014060000000E+02, -0.122725034000000E+03),\n new google.maps.LatLng( 0.457018220000000E+02, -0.122725370000000E+03),\n new google.maps.LatLng( 0.457046279004883E+02, -0.122723759950586E+03),\n new google.maps.LatLng( 0.457046279004883E+02, -0.122722617550586E+03),\n new google.maps.LatLng( 0.457070375004883E+02, -0.122723078350586E+03),\n new google.maps.LatLng( 0.457088620000000E+02, -0.122722554000000E+03),\n new google.maps.LatLng( 0.457149730000000E+02, -0.122728042000000E+03),\n new google.maps.LatLng( 0.457236610000000E+02, -0.122734314000000E+03),\n new google.maps.LatLng( 0.457248930000000E+02, -0.122735738000000E+03),\n new google.maps.LatLng( 0.457267810000000E+02, -0.122742202000000E+03),\n new google.maps.LatLng( 0.457315650000000E+02, -0.122746090000000E+03),\n new google.maps.LatLng( 0.457313250000000E+02, -0.122746570000000E+03),\n new google.maps.LatLng( 0.457297570000000E+02, -0.122746490000000E+03),\n new google.maps.LatLng( 0.457292610000000E+02, -0.122745338000000E+03),\n new google.maps.LatLng( 0.457285090000000E+02, -0.122744906000000E+03),\n new google.maps.LatLng( 0.457295490000000E+02, -0.122746810000000E+03),\n new google.maps.LatLng( 0.457380770000000E+02, -0.122746331000000E+03),\n new google.maps.LatLng( 0.457402050000000E+02, -0.122746907000000E+03),\n new google.maps.LatLng( 0.457425410000000E+02, -0.122748507000000E+03),\n new google.maps.LatLng( 0.457486050000000E+02, -0.122749851000000E+03),\n new google.maps.LatLng( 0.457615160000000E+02, -0.122749952000000E+03),\n new google.maps.LatLng( 0.457671180000000E+02, -0.122748815000000E+03),\n new google.maps.LatLng( 0.457693130000000E+02, -0.122747641000000E+03),\n new google.maps.LatLng( 0.457861180000000E+02, -0.122744228000000E+03),\n new google.maps.LatLng( 0.457929080000000E+02, -0.122744235000000E+03),\n new google.maps.LatLng( 0.458019860000000E+02, -0.122741956000000E+03),\n new google.maps.LatLng( 0.458052100000000E+02, -0.122740521000000E+03),\n new google.maps.LatLng( 0.458063760000000E+02, -0.122740652000000E+03),\n new google.maps.LatLng( 0.458097360000000E+02, -0.122742061000000E+03),\n new google.maps.LatLng( 0.458139160000000E+02, -0.122748997000000E+03),\n new google.maps.LatLng( 0.458168870000000E+02, -0.122752345000000E+03),\n new google.maps.LatLng( 0.458189680000000E+02, -0.122753912000000E+03),\n new google.maps.LatLng( 0.458279550000000E+02, -0.122758775000000E+03),\n new google.maps.LatLng( 0.458237940000000E+02, -0.122758256000000E+03),\n new google.maps.LatLng( 0.458181930000000E+02, -0.122758359000000E+03),\n new google.maps.LatLng( 0.458132790000000E+02, -0.122760457000000E+03),\n new google.maps.LatLng( 0.458108110000000E+02, -0.122761669000000E+03),\n new google.maps.LatLng( 0.458064910000000E+02, -0.122765072000000E+03),\n new google.maps.LatLng( 0.458016000000000E+02, -0.122768051000000E+03),\n new google.maps.LatLng( 0.457990850000000E+02, -0.122768412000000E+03),\n new google.maps.LatLng( 0.457948110000000E+02, -0.122770442000000E+03),\n new google.maps.LatLng( 0.457936230000000E+02, -0.122772142000000E+03),\n new google.maps.LatLng( 0.457932350000000E+02, -0.122775051000000E+03),\n new google.maps.LatLng( 0.457924350000000E+02, -0.122775705000000E+03),\n new google.maps.LatLng( 0.457894630000000E+02, -0.122774858000000E+03),\n new google.maps.LatLng( 0.457829000000000E+02, -0.122769994000000E+03),\n new google.maps.LatLng( 0.457828530000000E+02, -0.122768327000000E+03),\n new google.maps.LatLng( 0.457858000000000E+02, -0.122761365000000E+03),\n new google.maps.LatLng( 0.457864820000000E+02, -0.122754207000000E+03),\n new google.maps.LatLng( 0.457853840000000E+02, -0.122752215000000E+03),\n new google.maps.LatLng( 0.457808919994141E+02, -0.122758206856055E+03),\n new google.maps.LatLng( 0.457800135994141E+02, -0.122757874456055E+03),\n new google.maps.LatLng( 0.457786660000000E+02, -0.122758953000000E+03),\n new google.maps.LatLng( 0.457778880000000E+02, -0.122757778000000E+03),\n new google.maps.LatLng( 0.457750540000000E+02, -0.122759675000000E+03),\n new google.maps.LatLng( 0.457789045019531E+02, -0.122761742965039E+03),\n new google.maps.LatLng( 0.457805180000000E+02, -0.122760422000000E+03),\n new google.maps.LatLng( 0.457838080000000E+02, -0.122755713000000E+03),\n new google.maps.LatLng( 0.457857510000000E+02, -0.122754633000000E+03),\n new google.maps.LatLng( 0.457850910000000E+02, -0.122761464000000E+03),\n new google.maps.LatLng( 0.457820760000000E+02, -0.122769243000000E+03),\n new google.maps.LatLng( 0.457770680000000E+02, -0.122764966000000E+03),\n new google.maps.LatLng( 0.457666640000000E+02, -0.122759912000000E+03),\n new google.maps.LatLng( 0.457573350000000E+02, -0.122758484000000E+03),\n new google.maps.LatLng( 0.457505250000000E+02, -0.122759046000000E+03),\n new google.maps.LatLng( 0.457443170000000E+02, -0.122758139000000E+03),\n new google.maps.LatLng( 0.457391170000000E+02, -0.122755755000000E+03),\n new google.maps.LatLng( 0.457344770000000E+02, -0.122754651000000E+03),\n new google.maps.LatLng( 0.457259970000000E+02, -0.122755515000000E+03),\n new google.maps.LatLng( 0.457233730000000E+02, -0.122758587000000E+03),\n new google.maps.LatLng( 0.457176450000000E+02, -0.122760827000000E+03),\n new google.maps.LatLng( 0.457128610000000E+02, -0.122760811000000E+03),\n new google.maps.LatLng( 0.457060770000000E+02, -0.122759787000000E+03),\n new google.maps.LatLng( 0.457003330000000E+02, -0.122760507000000E+03),\n new google.maps.LatLng( 0.456932450000000E+02, -0.122762907000000E+03),\n new google.maps.LatLng( 0.456855970000000E+02, -0.122767259000000E+03),\n new google.maps.LatLng( 0.456822690000000E+02, -0.122768587000000E+03),\n new google.maps.LatLng( 0.456799340000000E+02, -0.122768395000000E+03),\n new google.maps.LatLng( 0.456741100000000E+02, -0.122765914000000E+03),\n new google.maps.LatLng( 0.456727980000000E+02, -0.122763610000000E+03),\n new google.maps.LatLng( 0.456646220000000E+02, -0.122757962000000E+03),\n new google.maps.LatLng( 0.456709900000000E+02, -0.122763562000000E+03),\n new google.maps.LatLng( 0.456709740000000E+02, -0.122764378000000E+03),\n new google.maps.LatLng( 0.456697420000000E+02, -0.122764186000000E+03),\n new google.maps.LatLng( 0.456627180000000E+02, -0.122758234000000E+03),\n new google.maps.LatLng( 0.456604460000000E+02, -0.122757610000000E+03),\n new google.maps.LatLng( 0.456571820000000E+02, -0.122755322000000E+03),\n new google.maps.LatLng( 0.456524140000000E+02, -0.122750330000000E+03),\n new google.maps.LatLng( 0.456507180000000E+02, -0.122747866000000E+03),\n new google.maps.LatLng( 0.456486380000000E+02, -0.122742910000000E+03),\n new google.maps.LatLng( 0.456394380000000E+02, -0.122711509000000E+03),\n new google.maps.LatLng( 0.456350380000000E+02, -0.122701109000000E+03),\n new google.maps.LatLng( 0.456320390000000E+02, -0.122697308000000E+03),\n new google.maps.LatLng( 0.456272390000000E+02, -0.122688308000000E+03),\n new google.maps.LatLng( 0.456236390000000E+02, -0.122680508000000E+03),\n new google.maps.LatLng( 0.456215390000000E+02, -0.122673008000000E+03),\n new google.maps.LatLng( 0.456215390000000E+02, -0.122673008000000E+03),\n new google.maps.LatLng( 0.456200390000000E+02, -0.122668608000000E+03),\n new google.maps.LatLng( 0.456178390000000E+02, -0.122658707000000E+03),\n new google.maps.LatLng( 0.456164390000000E+02, -0.122655707000000E+03),\n new google.maps.LatLng( 0.456148390000000E+02, -0.122654107000000E+03),\n new google.maps.LatLng( 0.456114390000000E+02, -0.122641507000000E+03),\n new google.maps.LatLng( 0.456115990000000E+02, -0.122632183000000E+03),\n new google.maps.LatLng( 0.456128390000000E+02, -0.122622407000000E+03),\n new google.maps.LatLng( 0.456117390000000E+02, -0.122617907000000E+03),\n new google.maps.LatLng( 0.456124390000000E+02, -0.122610706000000E+03),\n new google.maps.LatLng( 0.456104390000000E+02, -0.122606406000000E+03),\n new google.maps.LatLng( 0.456104390000000E+02, -0.122606406000000E+03),\n new google.maps.LatLng( 0.456013260000000E+02, -0.122561307000000E+03),\n new google.maps.LatLng( 0.455981440000000E+02, -0.122548565000000E+03),\n new google.maps.LatLng( 0.455981440000000E+02, -0.122548565000000E+03),\n new google.maps.LatLng( 0.455889280000000E+02, -0.122512100000000E+03),\n new google.maps.LatLng( 0.455870410000000E+02, -0.122502211000000E+03),\n new google.maps.LatLng( 0.455833370000000E+02, -0.122475135000000E+03),\n new google.maps.LatLng( 0.455833370000000E+02, -0.122475135000000E+03),\n new google.maps.LatLng( 0.455820970000000E+02, -0.122467011000000E+03),\n new google.maps.LatLng( 0.455771210000000E+02, -0.122446035000000E+03),\n new google.maps.LatLng( 0.455758890000000E+02, -0.122434083000000E+03),\n new google.maps.LatLng( 0.455760010000000E+02, -0.122431875000000E+03),\n new google.maps.LatLng( 0.455780010000000E+02, -0.122425251000000E+03),\n new google.maps.LatLng( 0.455785610000000E+02, -0.122421187000000E+03),\n new google.maps.LatLng( 0.455796490000000E+02, -0.122418131000000E+03),\n new google.maps.LatLng( 0.455816810000000E+02, -0.122408018000000E+03),\n new google.maps.LatLng( 0.455810570000000E+02, -0.122404018000000E+03),\n new google.maps.LatLng( 0.455798090000000E+02, -0.122401378000000E+03),\n new google.maps.LatLng( 0.455799530000000E+02, -0.122399954000000E+03),\n new google.maps.LatLng( 0.455808010000000E+02, -0.122398834000000E+03),\n new google.maps.LatLng( 0.455824480000000E+02, -0.122398770000000E+03),\n new google.maps.LatLng( 0.455832960000000E+02, -0.122397202000000E+03),\n new google.maps.LatLng( 0.455861760000000E+02, -0.122396850000000E+03),\n new google.maps.LatLng( 0.455878080000000E+02, -0.122392210000000E+03),\n new google.maps.LatLng( 0.455861600000000E+02, -0.122392146000000E+03),\n new google.maps.LatLng( 0.455855360000000E+02, -0.122388850000000E+03),\n new google.maps.LatLng( 0.455861920000000E+02, -0.122384738000000E+03),\n new google.maps.LatLng( 0.455878880000000E+02, -0.122381490000000E+03),\n new google.maps.LatLng( 0.455870720000000E+02, -0.122374114000000E+03),\n new google.maps.LatLng( 0.455876000000000E+02, -0.122372370000000E+03),\n new google.maps.LatLng( 0.455876000000000E+02, -0.122372370000000E+03),\n new google.maps.LatLng( 0.455891840000000E+02, -0.122370066000000E+03),\n new google.maps.LatLng( 0.455888160000000E+02, -0.122359810000000E+03),\n new google.maps.LatLng( 0.455879520000000E+02, -0.122356482000000E+03),\n new google.maps.LatLng( 0.455859840000000E+02, -0.122352034000000E+03),\n new google.maps.LatLng( 0.455834400000000E+02, -0.122348370000000E+03),\n new google.maps.LatLng( 0.455844480000000E+02, -0.122340930000000E+03),\n new google.maps.LatLng( 0.455859200000000E+02, -0.122340354000000E+03),\n new google.maps.LatLng( 0.455910240000000E+02, -0.122344690000000E+03),\n new google.maps.LatLng( 0.455930400000000E+02, -0.122343890000000E+03),\n new google.maps.LatLng( 0.455944640000000E+02, -0.122340466000000E+03),\n new google.maps.LatLng( 0.455966240000000E+02, -0.122339778000000E+03),\n new google.maps.LatLng( 0.455991680000000E+02, -0.122339826000000E+03),\n new google.maps.LatLng( 0.456005440000000E+02, -0.122341714000000E+03),\n new google.maps.LatLng( 0.456018240000000E+02, -0.122342306000000E+03),\n new google.maps.LatLng( 0.456053600000000E+02, -0.122340114000000E+03),\n new google.maps.LatLng( 0.456120960000000E+02, -0.122342642000000E+03),\n new google.maps.LatLng( 0.456137600000000E+02, -0.122343890000000E+03),\n new google.maps.LatLng( 0.456145920000000E+02, -0.122343618000000E+03),\n new google.maps.LatLng( 0.456177280000000E+02, -0.122339730000000E+03),\n new google.maps.LatLng( 0.456212000000000E+02, -0.122338226000000E+03),\n new google.maps.LatLng( 0.456222240000000E+02, -0.122337026000000E+03),\n new google.maps.LatLng( 0.456248400000000E+02, -0.122324466000000E+03),\n new google.maps.LatLng( 0.456243840000000E+02, -0.122323954000000E+03),\n new google.maps.LatLng( 0.456233440000000E+02, -0.122327314000000E+03),\n new google.maps.LatLng( 0.456227040000000E+02, -0.122334418000000E+03),\n new google.maps.LatLng( 0.456220320000000E+02, -0.122336786000000E+03),\n new google.maps.LatLng( 0.456207040000000E+02, -0.122338178000000E+03),\n new google.maps.LatLng( 0.456166880000000E+02, -0.122339682000000E+03),\n new google.maps.LatLng( 0.456146560000000E+02, -0.122343154000000E+03),\n new google.maps.LatLng( 0.456135680000000E+02, -0.122343186000000E+03),\n new google.maps.LatLng( 0.456094080000000E+02, -0.122341586000000E+03),\n new google.maps.LatLng( 0.456056000000000E+02, -0.122339666000000E+03),\n new google.maps.LatLng( 0.456039360000000E+02, -0.122340274000000E+03),\n new google.maps.LatLng( 0.456019520000000E+02, -0.122341858000000E+03),\n new google.maps.LatLng( 0.456008477628906E+02, -0.122341452341016E+03),\n new google.maps.LatLng( 0.455994560000000E+02, -0.122339458000000E+03),\n new google.maps.LatLng( 0.455961760000000E+02, -0.122339250000000E+03),\n new google.maps.LatLng( 0.455942720000000E+02, -0.122340002000000E+03),\n new google.maps.LatLng( 0.455930880000000E+02, -0.122343282000000E+03),\n new google.maps.LatLng( 0.455923360000000E+02, -0.122343954000000E+03),\n new google.maps.LatLng( 0.455910400000000E+02, -0.122344210000000E+03),\n new google.maps.LatLng( 0.455876960000000E+02, -0.122341266000000E+03),\n new google.maps.LatLng( 0.455872480000000E+02, -0.122340594000000E+03),\n new google.maps.LatLng( 0.455877600000000E+02, -0.122340530000000E+03),\n new google.maps.LatLng( 0.455867360000000E+02, -0.122339634000000E+03),\n new google.maps.LatLng( 0.455858560000000E+02, -0.122339378000000E+03),\n new google.maps.LatLng( 0.455843040000000E+02, -0.122340306000000E+03),\n new google.maps.LatLng( 0.455831840000000E+02, -0.122348626000000E+03),\n new google.maps.LatLng( 0.455876320000000E+02, -0.122356354000000E+03),\n new google.maps.LatLng( 0.455885760000000E+02, -0.122360242000000E+03),\n new google.maps.LatLng( 0.455886560000000E+02, -0.122362882000000E+03),\n new google.maps.LatLng( 0.455879680000000E+02, -0.122366146000000E+03),\n new google.maps.LatLng( 0.455885120000000E+02, -0.122368674000000E+03),\n new google.maps.LatLng( 0.455882240000000E+02, -0.122370770000000E+03),\n new google.maps.LatLng( 0.455871520000000E+02, -0.122371938000000E+03),\n new google.maps.LatLng( 0.455871520000000E+02, -0.122371938000000E+03),\n new google.maps.LatLng( 0.455863040000000E+02, -0.122375826000000E+03),\n new google.maps.LatLng( 0.455871680000000E+02, -0.122380994000000E+03),\n new google.maps.LatLng( 0.455848800000000E+02, -0.122387042000000E+03),\n new google.maps.LatLng( 0.455852960000000E+02, -0.122391378000000E+03),\n new google.maps.LatLng( 0.455846240000000E+02, -0.122395186000000E+03),\n new google.maps.LatLng( 0.455833280000000E+02, -0.122396466000000E+03),\n new google.maps.LatLng( 0.455802250000000E+02, -0.122395650000000E+03),\n new google.maps.LatLng( 0.455791370000000E+02, -0.122396978000000E+03),\n new google.maps.LatLng( 0.455783050000000E+02, -0.122400370000000E+03),\n new google.maps.LatLng( 0.455770730000000E+02, -0.122402946000000E+03),\n new google.maps.LatLng( 0.455776970000000E+02, -0.122398274000000E+03),\n new google.maps.LatLng( 0.455774090000000E+02, -0.122394514000000E+03),\n new google.maps.LatLng( 0.455778090000000E+02, -0.122387282000000E+03),\n new google.maps.LatLng( 0.455783690000000E+02, -0.122383938000000E+03),\n new google.maps.LatLng( 0.455779500000000E+02, -0.122378202000000E+03),\n new google.maps.LatLng( 0.455779500000000E+02, -0.122378202000000E+03),\n new google.maps.LatLng( 0.455765610000000E+02, -0.122358258000000E+03),\n new google.maps.LatLng( 0.455759370000000E+02, -0.122355714000000E+03),\n new google.maps.LatLng( 0.455705450000000E+02, -0.122344354000000E+03),\n new google.maps.LatLng( 0.455685770000000E+02, -0.122341810000000E+03),\n new google.maps.LatLng( 0.455664970000000E+02, -0.122341218000000E+03),\n new google.maps.LatLng( 0.455638570000000E+02, -0.122337458000000E+03),\n new google.maps.LatLng( 0.455617130000000E+02, -0.122332786000000E+03),\n new google.maps.LatLng( 0.455592110000000E+02, -0.122325321000000E+03),\n new google.maps.LatLng( 0.455586740000000E+02, -0.122321953000000E+03),\n new google.maps.LatLng( 0.455584810000000E+02, -0.122306577000000E+03),\n new google.maps.LatLng( 0.455594250000000E+02, -0.122294961000000E+03),\n new google.maps.LatLng( 0.455583050000000E+02, -0.122286193000000E+03),\n new google.maps.LatLng( 0.455556490000000E+02, -0.122273937000000E+03),\n new google.maps.LatLng( 0.455552010000000E+02, -0.122267857000000E+03),\n new google.maps.LatLng( 0.455552330000000E+02, -0.122266705000000E+03),\n new google.maps.LatLng( 0.455567530000000E+02, -0.122263633000000E+03),\n new google.maps.LatLng( 0.455580060000000E+02, -0.122256401000000E+03),\n new google.maps.LatLng( 0.455584010000000E+02, -0.122251089000000E+03),\n new google.maps.LatLng( 0.455580810000000E+02, -0.122242929000000E+03),\n new google.maps.LatLng( 0.455589770000000E+02, -0.122229632000000E+03),\n new google.maps.LatLng( 0.455612810000000E+02, -0.122215488000000E+03),\n new google.maps.LatLng( 0.455626250000000E+02, -0.122210928000000E+03),\n new google.maps.LatLng( 0.455650890000000E+02, -0.122207696000000E+03),\n new google.maps.LatLng( 0.455661450000000E+02, -0.122202064000000E+03),\n new google.maps.LatLng( 0.455671050000000E+02, -0.122199471000000E+03),\n new google.maps.LatLng( 0.455703360000000E+02, -0.122195727000000E+03),\n new google.maps.LatLng( 0.455733440000000E+02, -0.122193151000000E+03),\n new google.maps.LatLng( 0.455762400000000E+02, -0.122186015000000E+03),\n new google.maps.LatLng( 0.455775245409127E+02, -0.122183922747759E+03),\n new google.maps.LatLng( 0.455775245409127E+02, -0.122183922747759E+03),\n new google.maps.LatLng( 0.455641410000000E+02, -0.122201700000000E+03),\n new google.maps.LatLng( 0.455477450000000E+02, -0.122248993000000E+03),\n new google.maps.LatLng( 0.455443210000000E+02, -0.122262625000000E+03),\n new google.maps.LatLng( 0.455438410000000E+02, -0.122266701000000E+03),\n new google.maps.LatLng( 0.455435410000000E+02, -0.122294901000000E+03),\n new google.maps.LatLng( 0.455436468571446E+02, -0.122295725356883E+03),\n new google.maps.LatLng( 0.455482410000000E+02, -0.122331502000000E+03),\n new google.maps.LatLng( 0.455694410000000E+02, -0.122352802000000E+03),\n new google.maps.LatLng( 0.455759410000000E+02, -0.122380302000000E+03),\n new google.maps.LatLng( 0.455745410000000E+02, -0.122391802000000E+03),\n new google.maps.LatLng( 0.455676330000000E+02, -0.122410706000000E+03),\n new google.maps.LatLng( 0.455635850000000E+02, -0.122438674000000E+03),\n new google.maps.LatLng( 0.455673130000000E+02, -0.122453891000000E+03),\n new google.maps.LatLng( 0.455783050000000E+02, -0.122474659000000E+03),\n new google.maps.LatLng( 0.455797610000000E+02, -0.122479315000000E+03),\n new google.maps.LatLng( 0.455832810000000E+02, -0.122492259000000E+03),\n new google.maps.LatLng( 0.455896320000000E+02, -0.122523668000000E+03),\n new google.maps.LatLng( 0.455967680000000E+02, -0.122548149000000E+03),\n new google.maps.LatLng( 0.456039400000000E+02, -0.122581406000000E+03),\n new google.maps.LatLng( 0.456076390000000E+02, -0.122602606000000E+03),\n new google.maps.LatLng( 0.456097390000000E+02, -0.122643907000000E+03),\n new google.maps.LatLng( 0.456180390000000E+02, -0.122675008000000E+03),\n new google.maps.LatLng( 0.456247390000000E+02, -0.122691008000000E+03),\n new google.maps.LatLng( 0.456374380000000E+02, -0.122713309000000E+03),\n new google.maps.LatLng( 0.456441380000000E+02, -0.122738109000000E+03),\n new google.maps.LatLng( 0.456571380000000E+02, -0.122763810000000E+03),\n new google.maps.LatLng( 0.456804370000000E+02, -0.122774511000000E+03),\n new google.maps.LatLng( 0.456996370000000E+02, -0.122772511000000E+03),\n new google.maps.LatLng( 0.457344130000000E+02, -0.122760108000000E+03),\n new google.maps.LatLng( 0.457591630000000E+02, -0.122761451000000E+03),\n new google.maps.LatLng( 0.457805830000000E+02, -0.122769532000000E+03),\n new google.maps.LatLng( 0.458100000000000E+02, -0.122795605000000E+03),\n new google.maps.LatLng( 0.458250240000000E+02, -0.122795963000000E+03),\n new google.maps.LatLng( 0.458442160000000E+02, -0.122785696000000E+03),\n new google.maps.LatLng( 0.458505360000000E+02, -0.122785515000000E+03),\n new google.maps.LatLng( 0.458676990000000E+02, -0.122785026000000E+03),\n new google.maps.LatLng( 0.458843330000000E+02, -0.122798091000000E+03),\n new google.maps.LatLng( 0.459127250000000E+02, -0.122811510000000E+03),\n new google.maps.LatLng( 0.459324160000000E+02, -0.122806193000000E+03),\n new google.maps.LatLng( 0.459609840000000E+02, -0.122813998000000E+03),\n new google.maps.LatLng( 0.459808200000000E+02, -0.122837638000000E+03),\n new google.maps.LatLng( 0.460144690000000E+02, -0.122856158000000E+03),\n new google.maps.LatLng( 0.460312810000000E+02, -0.122878092000000E+03),\n new google.maps.LatLng( 0.460602800000000E+02, -0.122884478000000E+03),\n new google.maps.LatLng( 0.460837340000000E+02, -0.122904119000000E+03),\n new google.maps.LatLng( 0.460952743804135E+02, -0.122936174578323E+03),\n new google.maps.LatLng( 0.460952743804135E+02, -0.122936174578323E+03),\n new google.maps.LatLng( 0.461044340000000E+02, -0.122894420000000E+03),\n new google.maps.LatLng( 0.461068340000000E+02, -0.122892520000000E+03),\n new google.maps.LatLng( 0.461102340000000E+02, -0.122893820000000E+03),\n new google.maps.LatLng( 0.461162330000000E+02, -0.122912520000000E+03),\n new google.maps.LatLng( 0.461209330000000E+02, -0.122919420000000E+03),\n new google.maps.LatLng( 0.461253330000000E+02, -0.122921921000000E+03),\n new google.maps.LatLng( 0.461288330000000E+02, -0.122922321000000E+03),\n new google.maps.LatLng( 0.461367330000000E+02, -0.122919021000000E+03),\n new google.maps.LatLng( 0.461410330000000E+02, -0.122915921000000E+03),\n new google.maps.LatLng( 0.461444630000000E+02, -0.122914901000000E+03),\n new google.maps.LatLng( 0.461444630000000E+02, -0.122914901000000E+03),\n new google.maps.LatLng( 0.461502330000000E+02, -0.122914021000000E+03),\n new google.maps.LatLng( 0.461573330000000E+02, -0.122915121000000E+03),\n new google.maps.LatLng( 0.461642330000000E+02, -0.122915421000000E+03),\n new google.maps.LatLng( 0.461695610000000E+02, -0.122914151000000E+03),\n new google.maps.LatLng( 0.461746330000000E+02, -0.122913622000000E+03),\n new google.maps.LatLng( 0.461771330000000E+02, -0.122909321000000E+03),\n new google.maps.LatLng( 0.461785330000000E+02, -0.122904421000000E+03),\n new google.maps.LatLng( 0.461816330000000E+02, -0.122902021000000E+03),\n new google.maps.LatLng( 0.461905010000000E+02, -0.122898052000000E+03),\n new google.maps.LatLng( 0.461922330000000E+02, -0.122898822000000E+03),\n new google.maps.LatLng( 0.461941800000000E+02, -0.122906133000000E+03),\n new google.maps.LatLng( 0.461954330000000E+02, -0.122909022000000E+03),\n new google.maps.LatLng( 0.461977330000000E+02, -0.122912022000000E+03),\n new google.maps.LatLng( 0.462009330000000E+02, -0.122913422000000E+03),\n new google.maps.LatLng( 0.462009330000000E+02, -0.122913422000000E+03),\n new google.maps.LatLng( 0.462051060000000E+02, -0.122911657000000E+03),\n new google.maps.LatLng( 0.462064860000000E+02, -0.122912008000000E+03),\n new google.maps.LatLng( 0.462102630000000E+02, -0.122914952000000E+03),\n new google.maps.LatLng( 0.462124370000000E+02, -0.122915837000000E+03),\n new google.maps.LatLng( 0.462166400000000E+02, -0.122915456000000E+03),\n new google.maps.LatLng( 0.462182880000000E+02, -0.122914755000000E+03),\n new google.maps.LatLng( 0.462188220000000E+02, -0.122911779000000E+03),\n new google.maps.LatLng( 0.462180638606445E+02, -0.122914425780859E+03),\n new google.maps.LatLng( 0.462152060000000E+02, -0.122914785000000E+03),\n new google.maps.LatLng( 0.462191820000000E+02, -0.122908483000000E+03),\n new google.maps.LatLng( 0.462225390000000E+02, -0.122905828000000E+03),\n new google.maps.LatLng( 0.462264830000000E+02, -0.122901311000000E+03),\n new google.maps.LatLng( 0.462297560000000E+02, -0.122896947000000E+03),\n new google.maps.LatLng( 0.462308550000000E+02, -0.122894613000000E+03),\n new google.maps.LatLng( 0.462315340000000E+02, -0.122894948000000E+03),\n new google.maps.LatLng( 0.462323120000000E+02, -0.122896871000000E+03),\n new google.maps.LatLng( 0.462317460000000E+02, -0.122902914000000E+03),\n new google.maps.LatLng( 0.462326850000000E+02, -0.122905386000000E+03),\n new google.maps.LatLng( 0.462348360000000E+02, -0.122907217000000E+03),\n new google.maps.LatLng( 0.462369040000000E+02, -0.122906897000000E+03),\n new google.maps.LatLng( 0.462394600000000E+02, -0.122905478000000E+03),\n new google.maps.LatLng( 0.462420160000000E+02, -0.122903296000000E+03),\n new google.maps.LatLng( 0.462419850000000E+02, -0.122901205000000E+03),\n new google.maps.LatLng( 0.462396510000000E+02, -0.122893988000000E+03),\n new google.maps.LatLng( 0.462404980000000E+02, -0.122891149000000E+03),\n new google.maps.LatLng( 0.462417800000000E+02, -0.122890158000000E+03),\n new google.maps.LatLng( 0.462473500000000E+02, -0.122890188000000E+03),\n new google.maps.LatLng( 0.462511910000000E+02, -0.122893086000000E+03),\n new google.maps.LatLng( 0.462550330000000E+02, -0.122896972000000E+03),\n new google.maps.LatLng( 0.462607950000000E+02, -0.122899966000000E+03),\n new google.maps.LatLng( 0.462636760000000E+02, -0.122902239000000E+03),\n new google.maps.LatLng( 0.462668780000000E+02, -0.122907444000000E+03),\n new google.maps.LatLng( 0.462661010000000E+02, -0.122911104000000E+03),\n new google.maps.LatLng( 0.462657370000000E+02, -0.122917169000000E+03),\n new google.maps.LatLng( 0.462687090000000E+02, -0.122919805000000E+03),\n new google.maps.LatLng( 0.462704920000000E+02, -0.122919508000000E+03),\n new google.maps.LatLng( 0.462762520000000E+02, -0.122913341000000E+03),\n new google.maps.LatLng( 0.462809140000000E+02, -0.122909646000000E+03),\n new google.maps.LatLng( 0.462818510000000E+02, -0.122909415000000E+03),\n new google.maps.LatLng( 0.462839090000000E+02, -0.122911062000000E+03),\n new google.maps.LatLng( 0.462856240000000E+02, -0.122914392000000E+03),\n new google.maps.LatLng( 0.462865610000000E+02, -0.122915117000000E+03),\n new google.maps.LatLng( 0.462893500000000E+02, -0.122915577000000E+03),\n new google.maps.LatLng( 0.462939450000000E+02, -0.122914718000000E+03),\n new google.maps.LatLng( 0.462985390000000E+02, -0.122915013000000E+03),\n new google.maps.LatLng( 0.463004600000000E+02, -0.122916959000000E+03),\n new google.maps.LatLng( 0.463045300000000E+02, -0.122919662000000E+03),\n new google.maps.LatLng( 0.463086440000000E+02, -0.122920254000000E+03),\n new google.maps.LatLng( 0.463109990000000E+02, -0.122921606000000E+03),\n new google.maps.LatLng( 0.463118680000000E+02, -0.122921407000000E+03),\n new google.maps.LatLng( 0.463131710000000E+02, -0.122919395000000E+03),\n new google.maps.LatLng( 0.463160960000000E+02, -0.122918668000000E+03),\n new google.maps.LatLng( 0.463304300000000E+02, -0.122924602000000E+03),\n new google.maps.LatLng( 0.463315270000000E+02, -0.122924603000000E+03),\n new google.maps.LatLng( 0.463356870000000E+02, -0.122923084000000E+03),\n new google.maps.LatLng( 0.463360070000000E+02, -0.122923777000000E+03),\n new google.maps.LatLng( 0.463355500000000E+02, -0.122926054000000E+03),\n new google.maps.LatLng( 0.463338130000000E+02, -0.122929520000000E+03),\n new google.maps.LatLng( 0.463345680000000E+02, -0.122932094000000E+03),\n new google.maps.LatLng( 0.463405340000000E+02, -0.122934667000000E+03),\n new google.maps.LatLng( 0.463475980000000E+02, -0.122939519000000E+03),\n new google.maps.LatLng( 0.463528100000000E+02, -0.122937439000000E+03),\n new google.maps.LatLng( 0.463558500000000E+02, -0.122934963000000E+03),\n new google.maps.LatLng( 0.463567640000000E+02, -0.122932586000000E+03),\n new google.maps.LatLng( 0.463578160000000E+02, -0.122931497000000E+03),\n new google.maps.LatLng( 0.463671660000000E+02, -0.122936119000000E+03),\n new google.maps.LatLng( 0.463684000000000E+02, -0.122935888000000E+03),\n new google.maps.LatLng( 0.463703660000000E+02, -0.122933841000000E+03),\n new google.maps.LatLng( 0.463743830000000E+02, -0.122931363000000E+03),\n new google.maps.LatLng( 0.463752280000000E+02, -0.122931396000000E+03),\n new google.maps.LatLng( 0.463781180000000E+02, -0.122933278000000E+03),\n new google.maps.LatLng( 0.463803360000000E+02, -0.122932386000000E+03),\n new google.maps.LatLng( 0.463838100000000E+02, -0.122933047000000E+03),\n new google.maps.LatLng( 0.463876590000000E+02, -0.122932725000000E+03),\n new google.maps.LatLng( 0.460891910000000E+02, -0.122909106000000E+03),\n new google.maps.LatLng( 0.460859660000000E+02, -0.122903093000000E+03),\n new google.maps.LatLng( 0.460856990000000E+02, -0.122902193000000E+03),\n new google.maps.LatLng( 0.460863630000000E+02, -0.122900835000000E+03),\n new google.maps.LatLng( 0.460873240000000E+02, -0.122900866000000E+03),\n new google.maps.LatLng( 0.460916190000000E+02, -0.122904497000000E+03),\n new google.maps.LatLng( 0.460919250000000E+02, -0.122905200000000E+03),\n new google.maps.LatLng( 0.460928020000000E+02, -0.122908649000000E+03),\n new google.maps.LatLng( 0.460934420000000E+02, -0.122918475000000E+03),\n new google.maps.LatLng( 0.460930980000000E+02, -0.122919040000000E+03),\n new google.maps.LatLng( 0.460918400000000E+02, -0.122916736000000E+03),\n new google.maps.LatLng( 0.460891910000000E+02, -0.122909106000000E+03),\n new google.maps.LatLng( 0.460771080000000E+02, -0.122873490000000E+03),\n new google.maps.LatLng( 0.460786490000000E+02, -0.122873704000000E+03),\n new google.maps.LatLng( 0.460804650000000E+02, -0.122875780000000E+03),\n new google.maps.LatLng( 0.460778940000000E+02, -0.122875459000000E+03),\n new google.maps.LatLng( 0.460734690000000E+02, -0.122877198000000E+03),\n new google.maps.LatLng( 0.460730650000000E+02, -0.122877992000000E+03),\n new google.maps.LatLng( 0.460807850857422E+02, -0.122877637717187E+03),\n new google.maps.LatLng( 0.460827160000000E+02, -0.122878389000000E+03),\n new google.maps.LatLng( 0.460876220000000E+02, -0.122891665000000E+03),\n new google.maps.LatLng( 0.460878200000000E+02, -0.122894442000000E+03),\n new google.maps.LatLng( 0.460778790000000E+02, -0.122891008000000E+03),\n new google.maps.LatLng( 0.460665110000000E+02, -0.122882615000000E+03),\n new google.maps.LatLng( 0.460562320000000E+02, -0.122878368000000E+03),\n new google.maps.LatLng( 0.460549520000000E+02, -0.122877220000000E+03),\n new google.maps.LatLng( 0.460555690000000E+02, -0.122875797000000E+03),\n new google.maps.LatLng( 0.460581300000000E+02, -0.122873580000000E+03),\n new google.maps.LatLng( 0.460623350000000E+02, -0.122873402000000E+03),\n new google.maps.LatLng( 0.460683950000000E+02, -0.122875077000000E+03),\n new google.maps.LatLng( 0.460714090000000E+02, -0.122875337000000E+03),\n new google.maps.LatLng( 0.460771080000000E+02, -0.122873490000000E+03),\n new google.maps.LatLng( 0.459548490000000E+02, -0.122803575000000E+03),\n new google.maps.LatLng( 0.459534930000000E+02, -0.122804276000000E+03),\n new google.maps.LatLng( 0.459469090000000E+02, -0.122803458000000E+03),\n new google.maps.LatLng( 0.459376730000000E+02, -0.122801002000000E+03),\n new google.maps.LatLng( 0.459356840000000E+02, -0.122800085000000E+03),\n new google.maps.LatLng( 0.459408490000000E+02, -0.122793268000000E+03),\n new google.maps.LatLng( 0.459440313589844E+02, -0.122794461508398E+03),\n new google.maps.LatLng( 0.459468160000000E+02, -0.122794905000000E+03),\n new google.maps.LatLng( 0.459485540000000E+02, -0.122794347000000E+03),\n new google.maps.LatLng( 0.459485300000000E+02, -0.122791201000000E+03),\n new google.maps.LatLng( 0.459451920000000E+02, -0.122791464000000E+03),\n new google.maps.LatLng( 0.459447350000000E+02, -0.122789204000000E+03),\n new google.maps.LatLng( 0.459447350000000E+02, -0.122788515000000E+03),\n new google.maps.LatLng( 0.459456950000000E+02, -0.122787925000000E+03),\n new google.maps.LatLng( 0.459476610000000E+02, -0.122787728000000E+03),\n new google.maps.LatLng( 0.459507710000000E+02, -0.122791692000000E+03),\n new google.maps.LatLng( 0.459541550000000E+02, -0.122798934000000E+03),\n new google.maps.LatLng( 0.459553670000000E+02, -0.122802375000000E+03),\n new google.maps.LatLng( 0.459548490000000E+02, -0.122803575000000E+03),\n new google.maps.LatLng( 0.459312250000000E+02, -0.122707518000000E+03),\n new google.maps.LatLng( 0.459308820000000E+02, -0.122706830000000E+03),\n new google.maps.LatLng( 0.459312490000000E+02, -0.122698804000000E+03),\n new google.maps.LatLng( 0.459295120000000E+02, -0.122696805000000E+03),\n new google.maps.LatLng( 0.459288030000000E+02, -0.122695069000000E+03),\n new google.maps.LatLng( 0.459284370000000E+02, -0.122692710000000E+03),\n new google.maps.LatLng( 0.459286890000000E+02, -0.122690744000000E+03),\n new google.maps.LatLng( 0.459295580000000E+02, -0.122689565000000E+03),\n new google.maps.LatLng( 0.459312950000000E+02, -0.122688844000000E+03),\n new google.maps.LatLng( 0.459326210000000E+02, -0.122688582000000E+03),\n new google.maps.LatLng( 0.459355930000000E+02, -0.122689106000000E+03),\n new google.maps.LatLng( 0.459369190000000E+02, -0.122688451000000E+03),\n new google.maps.LatLng( 0.459381300000000E+02, -0.122685994000000E+03),\n new google.maps.LatLng( 0.459383360000000E+02, -0.122681439000000E+03),\n new google.maps.LatLng( 0.459409420000000E+02, -0.122689008000000E+03),\n new google.maps.LatLng( 0.459412620000000E+02, -0.122691203000000E+03),\n new google.maps.LatLng( 0.459409190000000E+02, -0.122694251000000E+03),\n new google.maps.LatLng( 0.459383130000000E+02, -0.122694218000000E+03),\n new google.maps.LatLng( 0.459366670000000E+02, -0.122695299000000E+03),\n new google.maps.LatLng( 0.459341290000000E+02, -0.122699328000000E+03),\n new google.maps.LatLng( 0.459343350000000E+02, -0.122701392000000E+03),\n new google.maps.LatLng( 0.459323450000000E+02, -0.122706830000000E+03),\n new google.maps.LatLng( 0.459312250000000E+02, -0.122707518000000E+03),\n new google.maps.LatLng( 0.459437740000000E+02, -0.122786352000000E+03),\n new google.maps.LatLng( 0.459368260000000E+02, -0.122796153000000E+03),\n new google.maps.LatLng( 0.459336490000000E+02, -0.122797825000000E+03),\n new google.maps.LatLng( 0.459247790000000E+02, -0.122798647000000E+03),\n new google.maps.LatLng( 0.459246410000000E+02, -0.122797697000000E+03),\n new google.maps.LatLng( 0.459280010000000E+02, -0.122792257000000E+03),\n new google.maps.LatLng( 0.459355210000000E+02, -0.122788125000000E+03),\n new google.maps.LatLng( 0.459400930000000E+02, -0.122786682000000E+03),\n new google.maps.LatLng( 0.459437740000000E+02, -0.122786352000000E+03),\n new google.maps.LatLng( 0.458296480000000E+02, -0.122759950000000E+03),\n new google.maps.LatLng( 0.458311570000000E+02, -0.122760538000000E+03),\n new google.maps.LatLng( 0.458334670000000E+02, -0.122763282000000E+03),\n new google.maps.LatLng( 0.458344070000000E+02, -0.122768351000000E+03),\n new google.maps.LatLng( 0.458359620000000E+02, -0.122772504000000E+03),\n new google.maps.LatLng( 0.458419310000000E+02, -0.122780448000000E+03),\n new google.maps.LatLng( 0.458413600000000E+02, -0.122782705000000E+03),\n new google.maps.LatLng( 0.458312560000000E+02, -0.122785883000000E+03),\n new google.maps.LatLng( 0.458240550000000E+02, -0.122786933000000E+03),\n new google.maps.LatLng( 0.458162820000000E+02, -0.122786773000000E+03),\n new google.maps.LatLng( 0.458150020000000E+02, -0.122788245000000E+03),\n new google.maps.LatLng( 0.458114360000000E+02, -0.122788868000000E+03),\n new google.maps.LatLng( 0.458033890000000E+02, -0.122785079000000E+03),\n new google.maps.LatLng( 0.457941510000000E+02, -0.122777796000000E+03),\n new google.maps.LatLng( 0.457940570000000E+02, -0.122772992000000E+03),\n new google.maps.LatLng( 0.457949940000000E+02, -0.122771030000000E+03),\n new google.maps.LatLng( 0.457974170000000E+02, -0.122769754000000E+03),\n new google.maps.LatLng( 0.458032460000000E+02, -0.122768180000000E+03),\n new google.maps.LatLng( 0.458128910000000E+02, -0.122761503000000E+03),\n new google.maps.LatLng( 0.458204110000000E+02, -0.122759305000000E+03),\n new google.maps.LatLng( 0.458257150000000E+02, -0.122759366000000E+03),\n new google.maps.LatLng( 0.458296480000000E+02, -0.122759950000000E+03),\n new google.maps.LatLng( 0.455704000000000E+02, -0.122455002000000E+03),\n new google.maps.LatLng( 0.455701130000000E+02, -0.122450659000000E+03),\n new google.maps.LatLng( 0.455707370000000E+02, -0.122447635000000E+03),\n new google.maps.LatLng( 0.455721610000000E+02, -0.122448195000000E+03),\n new google.maps.LatLng( 0.455730410000000E+02, -0.122449219000000E+03),\n new google.maps.LatLng( 0.455753450000000E+02, -0.122455059000000E+03),\n new google.maps.LatLng( 0.455790730000000E+02, -0.122469795000000E+03),\n new google.maps.LatLng( 0.455774410000000E+02, -0.122468003000000E+03),\n new google.maps.LatLng( 0.455717130000000E+02, -0.122458227000000E+03),\n new google.maps.LatLng( 0.455704000000000E+02, -0.122455002000000E+03),\n new google.maps.LatLng( 0.455769290000000E+02, -0.122424131000000E+03),\n new google.maps.LatLng( 0.455745610000000E+02, -0.122433987000000E+03),\n new google.maps.LatLng( 0.455749290000000E+02, -0.122443683000000E+03),\n new google.maps.LatLng( 0.455722730000000E+02, -0.122439859000000E+03),\n new google.maps.LatLng( 0.455706570000000E+02, -0.122435219000000E+03),\n new google.maps.LatLng( 0.455695050000000E+02, -0.122420786000000E+03),\n new google.maps.LatLng( 0.455720810000000E+02, -0.122401490000000E+03),\n new google.maps.LatLng( 0.455729930000000E+02, -0.122399650000000E+03),\n new google.maps.LatLng( 0.455738570000000E+02, -0.122399938000000E+03),\n new google.maps.LatLng( 0.455776330000000E+02, -0.122403858000000E+03),\n new google.maps.LatLng( 0.455795690000000E+02, -0.122408162000000E+03),\n new google.maps.LatLng( 0.455785610000000E+02, -0.122418243000000E+03),\n new google.maps.LatLng( 0.455769290000000E+02, -0.122424131000000E+03),\n new google.maps.LatLng( 0.455483050000000E+02, -0.122283009000000E+03),\n new google.maps.LatLng( 0.455497930000000E+02, -0.122273489000000E+03),\n new google.maps.LatLng( 0.455514570000000E+02, -0.122268721000000E+03),\n new google.maps.LatLng( 0.455517770000000E+02, -0.122268401000000E+03),\n new google.maps.LatLng( 0.455521610000000E+02, -0.122268961000000E+03),\n new google.maps.LatLng( 0.455544330000000E+02, -0.122289425000000E+03),\n new google.maps.LatLng( 0.455551050000000E+02, -0.122314721000000E+03),\n new google.maps.LatLng( 0.455563370000000E+02, -0.122327154000000E+03),\n new google.maps.LatLng( 0.455579210000000E+02, -0.122335698000000E+03),\n new google.maps.LatLng( 0.455539370000000E+02, -0.122330258000000E+03),\n new google.maps.LatLng( 0.455521930000000E+02, -0.122326129000000E+03),\n new google.maps.LatLng( 0.455505450000000E+02, -0.122319905000000E+03),\n new google.maps.LatLng( 0.455494090000000E+02, -0.122308801000000E+03),\n new google.maps.LatLng( 0.455497770000000E+02, -0.122298721000000E+03),\n new google.maps.LatLng( 0.455483050000000E+02, -0.122283009000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "89e98c2917c024c791d21fdd87046dfe", "score": "0.5991549", "text": "async function getCoordinatesWithZipCode(zip) {\n const proxy = \"https://nextjs-cors-anywhere.vercel.app/api?endpoint=\" //Proxy for API calls in localhost\n const geocodingAPI = \"https://maps.googleapis.com/maps/api/geocode/json?\" //API URL for geocoding (turning address into lat/lng coordinates)\n\n //Easier, more organized way to add URL Parameters to API request\n const options = new URLSearchParams({\n key: \"AIzaSyD5TYxI5yg7zRiJKWGyqm7P3a7ubq2ngUg\", //API key\n address: zip //Zip code parameter (zip code)\n })\n\n // Try/Catch block to handle errors. \"Tries the code\" then if there are errors, \"catches the errors\" (not required, but good to have)\n try {\n const response = await fetch(proxy + geocodingAPI + options); //Fetch the API request. Combining the proxy with API URL & the options\n const data = await response.json(); //Data returned from the previous line. Here, we're turning the response into JSON\n return data; //Returning data\n }\n catch (err) {\n console.error(err.message); //If there are errors, log the error message\n return null; //Returning null\n }\n}", "title": "" }, { "docid": "3adedc9d7a9bf899d0cbdfcc76223244", "score": "0.59874916", "text": "function getReverseGeocodingData(lat, lng) {\n var latlng = new google.maps.LatLng(lat, lng);\n // This is making the Geocode request\n var geocoder = new google.maps.Geocoder();\n geocoder.geocode({ 'latLng': latlng }, function (results, status) {\n if (status !== google.maps.GeocoderStatus.OK) {\n alert(status);\n }\n // This is checking to see if the Geoeode Status is OK before proceeding\n if (status == google.maps.GeocoderStatus.OK) {\n add1 = (results[0].formatted_address);\n }\n });\n}", "title": "" }, { "docid": "eb729f6162c669504773f5bf7dc8f57d", "score": "0.5987212", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.480655870000000E+02, -0.124615474000000E+03),\n new google.maps.LatLng( 0.480627760000000E+02, -0.124616698000000E+03),\n new google.maps.LatLng( 0.480584570000000E+02, -0.124617648000000E+03),\n new google.maps.LatLng( 0.480580000000000E+02, -0.124617204000000E+03),\n new google.maps.LatLng( 0.480556930000000E+02, -0.124617441000000E+03),\n new google.maps.LatLng( 0.480515790000000E+02, -0.124618527000000E+03),\n new google.maps.LatLng( 0.480505510000000E+02, -0.124619037000000E+03),\n new google.maps.LatLng( 0.480489280000000E+02, -0.124621250000000E+03),\n new google.maps.LatLng( 0.480403360000000E+02, -0.124621307000000E+03),\n new google.maps.LatLng( 0.480364970000000E+02, -0.124622768000000E+03),\n new google.maps.LatLng( 0.480367010000000E+02, -0.124625391000000E+03),\n new google.maps.LatLng( 0.480380970000000E+02, -0.124627747000000E+03),\n new google.maps.LatLng( 0.480427360000000E+02, -0.124629923000000E+03),\n new google.maps.LatLng( 0.480473750000000E+02, -0.124631110000000E+03),\n new google.maps.LatLng( 0.480508940000000E+02, -0.124631447000000E+03),\n new google.maps.LatLng( 0.480515350000000E+02, -0.124633934000000E+03),\n new google.maps.LatLng( 0.480509880000000E+02, -0.124636253000000E+03),\n new google.maps.LatLng( 0.480556740000000E+02, -0.124642962000000E+03),\n new google.maps.LatLng( 0.480563380000000E+02, -0.124649097000000E+03),\n new google.maps.LatLng( 0.480573670000000E+02, -0.124651073000000E+03),\n new google.maps.LatLng( 0.480581900000000E+02, -0.124651856000000E+03),\n new google.maps.LatLng( 0.480610000000000E+02, -0.124651888000000E+03),\n new google.maps.LatLng( 0.480661650000000E+02, -0.124656658000000E+03),\n new google.maps.LatLng( 0.480659820000000E+02, -0.124658226000000E+03),\n new google.maps.LatLng( 0.480636980000000E+02, -0.124659079000000E+03),\n new google.maps.LatLng( 0.480616890000000E+02, -0.124663590000000E+03),\n new google.maps.LatLng( 0.480616890000000E+02, -0.124663590000000E+03),\n new google.maps.LatLng( 0.480631960000000E+02, -0.124664976000000E+03),\n new google.maps.LatLng( 0.480655730000000E+02, -0.124665896000000E+03),\n new google.maps.LatLng( 0.480661210000000E+02, -0.124665691000000E+03),\n new google.maps.LatLng( 0.480675370000000E+02, -0.124663100000000E+03),\n new google.maps.LatLng( 0.480769490000000E+02, -0.124656584000000E+03),\n new google.maps.LatLng( 0.480791190000000E+02, -0.124655731000000E+03),\n new google.maps.LatLng( 0.480802390000000E+02, -0.124656139000000E+03),\n new google.maps.LatLng( 0.480834380000000E+02, -0.124658797000000E+03),\n new google.maps.LatLng( 0.480880090000000E+02, -0.124661217000000E+03),\n new google.maps.LatLng( 0.481016020000000E+02, -0.124661825000000E+03),\n new google.maps.LatLng( 0.481056700000000E+02, -0.124663358000000E+03),\n new google.maps.LatLng( 0.481131410000000E+02, -0.124660489000000E+03),\n new google.maps.LatLng( 0.481157220000000E+02, -0.124660591000000E+03),\n new google.maps.LatLng( 0.481163390000000E+02, -0.124660761000000E+03),\n new google.maps.LatLng( 0.481174590000000E+02, -0.124662979000000E+03),\n new google.maps.LatLng( 0.481191960000000E+02, -0.124663626000000E+03),\n new google.maps.LatLng( 0.481205900000000E+02, -0.124662704000000E+03),\n new google.maps.LatLng( 0.481214570000000E+02, -0.124658507000000E+03),\n new google.maps.LatLng( 0.481180060000000E+02, -0.124654788000000E+03),\n new google.maps.LatLng( 0.481159490000000E+02, -0.124653630000000E+03),\n new google.maps.LatLng( 0.481135490000000E+02, -0.124651311000000E+03),\n new google.maps.LatLng( 0.481124980000000E+02, -0.124646331000000E+03),\n new google.maps.LatLng( 0.481138450000000E+02, -0.124642985000000E+03),\n new google.maps.LatLng( 0.481150550000000E+02, -0.124641414000000E+03),\n new google.maps.LatLng( 0.481163340000000E+02, -0.124640800000000E+03),\n new google.maps.LatLng( 0.481237140000000E+02, -0.124640180000000E+03),\n new google.maps.LatLng( 0.481241030000000E+02, -0.124640589000000E+03),\n new google.maps.LatLng( 0.481237150000000E+02, -0.124645469000000E+03),\n new google.maps.LatLng( 0.481255650000000E+02, -0.124650617000000E+03),\n new google.maps.LatLng( 0.481305480000000E+02, -0.124656690000000E+03),\n new google.maps.LatLng( 0.481379970000000E+02, -0.124664400000000E+03),\n new google.maps.LatLng( 0.481416530000000E+02, -0.124665525000000E+03),\n new google.maps.LatLng( 0.481502440000000E+02, -0.124669449000000E+03),\n new google.maps.LatLng( 0.481525060000000E+02, -0.124668697000000E+03),\n new google.maps.LatLng( 0.481521170000000E+02, -0.124663951000000E+03),\n new google.maps.LatLng( 0.481510650000000E+02, -0.124659171000000E+03),\n new google.maps.LatLng( 0.481473630000000E+02, -0.124657670000000E+03),\n new google.maps.LatLng( 0.481446660000000E+02, -0.124655282000000E+03),\n new google.maps.LatLng( 0.481435020000000E+02, -0.124653609000000E+03),\n new google.maps.LatLng( 0.481391790000000E+02, -0.124641186000000E+03),\n new google.maps.LatLng( 0.481378740000000E+02, -0.124635862000000E+03),\n new google.maps.LatLng( 0.481370750000000E+02, -0.124634464000000E+03),\n new google.maps.LatLng( 0.481360230000000E+02, -0.124633304000000E+03),\n new google.maps.LatLng( 0.481331220000000E+02, -0.124634023000000E+03),\n new google.maps.LatLng( 0.481285060000000E+02, -0.124632253000000E+03),\n new google.maps.LatLng( 0.481268370000000E+02, -0.124631368000000E+03),\n new google.maps.LatLng( 0.481244330000000E+02, -0.124628302000000E+03),\n new google.maps.LatLng( 0.481243070000000E+02, -0.124627108000000E+03),\n new google.maps.LatLng( 0.481263790000000E+02, -0.124621238000000E+03),\n new google.maps.LatLng( 0.481268830000000E+02, -0.124617178000000E+03),\n new google.maps.LatLng( 0.481264960000000E+02, -0.124616665000000E+03),\n new google.maps.LatLng( 0.481252190000000E+02, -0.124615777000000E+03),\n new google.maps.LatLng( 0.481200090000000E+02, -0.124619665000000E+03),\n new google.maps.LatLng( 0.481176530000000E+02, -0.124627491000000E+03),\n new google.maps.LatLng( 0.481154830000000E+02, -0.124627220000000E+03),\n new google.maps.LatLng( 0.481115300000000E+02, -0.124623339000000E+03),\n new google.maps.LatLng( 0.481101610000000E+02, -0.124621017000000E+03),\n new google.maps.LatLng( 0.481099570000000E+02, -0.124618254000000E+03),\n new google.maps.LatLng( 0.481118550000000E+02, -0.124613275000000E+03),\n new google.maps.LatLng( 0.481108760000000E+02, -0.124604948000000E+03),\n new google.maps.LatLng( 0.481165890000000E+02, -0.124604714000000E+03),\n new google.maps.LatLng( 0.481201090000000E+02, -0.124600930000000E+03),\n new google.maps.LatLng( 0.481204750000000E+02, -0.124598507000000E+03),\n new google.maps.LatLng( 0.481200870000000E+02, -0.124597278000000E+03),\n new google.maps.LatLng( 0.481158840000000E+02, -0.124595604000000E+03),\n new google.maps.LatLng( 0.481094860000000E+02, -0.124596963000000E+03),\n new google.maps.LatLng( 0.481065840000000E+02, -0.124598428000000E+03),\n new google.maps.LatLng( 0.481054160000000E+02, -0.124603852000000E+03),\n new google.maps.LatLng( 0.481035190000000E+02, -0.124605249000000E+03),\n new google.maps.LatLng( 0.481018530000000E+02, -0.124603712000000E+03),\n new google.maps.LatLng( 0.481006880000000E+02, -0.124603335000000E+03),\n new google.maps.LatLng( 0.480963230000000E+02, -0.124604014000000E+03),\n new google.maps.LatLng( 0.480930090000000E+02, -0.124606194000000E+03),\n new google.maps.LatLng( 0.480915020000000E+02, -0.124604078000000E+03),\n new google.maps.LatLng( 0.480904520000000E+02, -0.124600291000000E+03),\n new google.maps.LatLng( 0.480897670000000E+02, -0.124599847000000E+03),\n new google.maps.LatLng( 0.480893090000000E+02, -0.124602711000000E+03),\n new google.maps.LatLng( 0.480893750000000E+02, -0.124609431000000E+03),\n new google.maps.LatLng( 0.480901290000000E+02, -0.124610284000000E+03),\n new google.maps.LatLng( 0.480909970000000E+02, -0.124610489000000E+03),\n new google.maps.LatLng( 0.480930990000000E+02, -0.124609775000000E+03),\n new google.maps.LatLng( 0.480961130000000E+02, -0.124612029000000E+03),\n new google.maps.LatLng( 0.480962270000000E+02, -0.124612677000000E+03),\n new google.maps.LatLng( 0.480941460000000E+02, -0.124616598000000E+03),\n new google.maps.LatLng( 0.480892310000000E+02, -0.124621946000000E+03),\n new google.maps.LatLng( 0.480835630000000E+02, -0.124625383000000E+03),\n new google.maps.LatLng( 0.480808440000000E+02, -0.124624630000000E+03),\n new google.maps.LatLng( 0.480796800000000E+02, -0.124623060000000E+03),\n new google.maps.LatLng( 0.480775780000000E+02, -0.124621796000000E+03),\n new google.maps.LatLng( 0.480692410000000E+02, -0.124620251000000E+03),\n new google.maps.LatLng( 0.480667520000000E+02, -0.124616090000000E+03),\n new google.maps.LatLng( 0.480655870000000E+02, -0.124615474000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "9602859aacee0230bfab7b641e62ecad", "score": "0.5987125", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.459133630000000E+02, -0.119626137000000E+03),\n new google.maps.LatLng( 0.459165660000000E+02, -0.119615850000000E+03),\n new google.maps.LatLng( 0.459176630000000E+02, -0.119615000000000E+03),\n new google.maps.LatLng( 0.459181200000000E+02, -0.119613920000000E+03),\n new google.maps.LatLng( 0.459182590000000E+02, -0.119611269000000E+03),\n new google.maps.LatLng( 0.459140300000000E+02, -0.119614866000000E+03),\n new google.maps.LatLng( 0.459119260000000E+02, -0.119618857000000E+03),\n new google.maps.LatLng( 0.459116030000000E+02, -0.119623636000000E+03),\n new google.maps.LatLng( 0.459127250000000E+02, -0.119626933000000E+03),\n new google.maps.LatLng( 0.459133630000000E+02, -0.119626137000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "7a2fe6993e41a695d87593d18a5ed33b", "score": "0.5986935", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.479832190911748E+02, -0.122229986106334E+03),\n new google.maps.LatLng( 0.479859730000000E+02, -0.122227266000000E+03),\n new google.maps.LatLng( 0.479935350000000E+02, -0.122224286000000E+03),\n new google.maps.LatLng( 0.479945870000000E+02, -0.122221298000000E+03),\n new google.maps.LatLng( 0.479945040000000E+02, -0.122214309000000E+03),\n new google.maps.LatLng( 0.479967610000000E+02, -0.122214496000000E+03),\n new google.maps.LatLng( 0.479986430000000E+02, -0.122216181000000E+03),\n new google.maps.LatLng( 0.479991170000000E+02, -0.122223647000000E+03),\n new google.maps.LatLng( 0.480002170000000E+02, -0.122223647000000E+03),\n new google.maps.LatLng( 0.480016710000000E+02, -0.122223569000000E+03),\n new google.maps.LatLng( 0.480015970000000E+02, -0.122215914000000E+03),\n new google.maps.LatLng( 0.480034170000000E+02, -0.122215747000000E+03),\n new google.maps.LatLng( 0.480035490000000E+02, -0.122222935000000E+03),\n new google.maps.LatLng( 0.480048660000000E+02, -0.122222830000000E+03),\n new google.maps.LatLng( 0.480055650000000E+02, -0.122221840000000E+03),\n new google.maps.LatLng( 0.480055170000000E+02, -0.122214847000000E+03),\n new google.maps.LatLng( 0.480131170000000E+02, -0.122211948000000E+03),\n new google.maps.LatLng( 0.480163180000000E+02, -0.122214248000000E+03),\n new google.maps.LatLng( 0.480179180000000E+02, -0.122210748000000E+03),\n new google.maps.LatLng( 0.480188180000000E+02, -0.122204248000000E+03),\n new google.maps.LatLng( 0.480178180000000E+02, -0.122194947000000E+03),\n new google.maps.LatLng( 0.480166180000000E+02, -0.122190747000000E+03),\n new google.maps.LatLng( 0.480125180000000E+02, -0.122182746000000E+03),\n new google.maps.LatLng( 0.480102180000000E+02, -0.122180946000000E+03),\n new google.maps.LatLng( 0.480054180000000E+02, -0.122178746000000E+03),\n new google.maps.LatLng( 0.480025180000000E+02, -0.122177946000000E+03),\n new google.maps.LatLng( 0.479977180000000E+02, -0.122180946000000E+03),\n new google.maps.LatLng( 0.479952180000000E+02, -0.122181448000000E+03),\n new google.maps.LatLng( 0.479925230000000E+02, -0.122180600000000E+03),\n new google.maps.LatLng( 0.479911040000000E+02, -0.122179877000000E+03),\n new google.maps.LatLng( 0.479871030000000E+02, -0.122172180000000E+03),\n new google.maps.LatLng( 0.479846020000000E+02, -0.122169982000000E+03),\n new google.maps.LatLng( 0.479824040000000E+02, -0.122171276000000E+03),\n new google.maps.LatLng( 0.479794180000000E+02, -0.122182645000000E+03),\n new google.maps.LatLng( 0.479764180000000E+02, -0.122186945000000E+03),\n new google.maps.LatLng( 0.479750180000000E+02, -0.122188145000000E+03),\n new google.maps.LatLng( 0.479649180000000E+02, -0.122189545000000E+03),\n new google.maps.LatLng( 0.479603180000000E+02, -0.122187344000000E+03),\n new google.maps.LatLng( 0.479603180000000E+02, -0.122187344000000E+03),\n new google.maps.LatLng( 0.479648180000000E+02, -0.122190145000000E+03),\n new google.maps.LatLng( 0.479638180000000E+02, -0.122197545000000E+03),\n new google.maps.LatLng( 0.479640240000000E+02, -0.122203279000000E+03),\n new google.maps.LatLng( 0.479631080000000E+02, -0.122213655000000E+03),\n new google.maps.LatLng( 0.479617170000000E+02, -0.122223046000000E+03),\n new google.maps.LatLng( 0.479649170000000E+02, -0.122226846000000E+03),\n new google.maps.LatLng( 0.479701625368639E+02, -0.122231299757715E+03),\n new google.maps.LatLng( 0.479701625368639E+02, -0.122231299757715E+03),\n new google.maps.LatLng( 0.479709170000000E+02, -0.122230046000000E+03),\n new google.maps.LatLng( 0.479764170000000E+02, -0.122226346000000E+03),\n new google.maps.LatLng( 0.479813182745334E+02, -0.122228968893463E+03),\n new google.maps.LatLng( 0.479832190911748E+02, -0.122229986106334E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "789c7e6e1c5e9876055726e6f5efd879", "score": "0.5986593", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.476420180000000E+02, -0.119320533000000E+03),\n new google.maps.LatLng( 0.476702050000000E+02, -0.119320407000000E+03),\n new google.maps.LatLng( 0.476701800000000E+02, -0.119305846000000E+03),\n new google.maps.LatLng( 0.476701800000000E+02, -0.119305846000000E+03),\n new google.maps.LatLng( 0.476683760000000E+02, -0.119305860000000E+03),\n new google.maps.LatLng( 0.476586670000000E+02, -0.119309209000000E+03),\n new google.maps.LatLng( 0.476561770000000E+02, -0.119308837000000E+03),\n new google.maps.LatLng( 0.476473130000000E+02, -0.119315328000000E+03),\n new google.maps.LatLng( 0.476420180000000E+02, -0.119320533000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "c8b36be05dc343e8ac58c3a8a88fd97f", "score": "0.598618", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.464170280000000E+02, -0.123847866000000E+03),\n new google.maps.LatLng( 0.464027080000000E+02, -0.123840593000000E+03),\n new google.maps.LatLng( 0.463924910000000E+02, -0.123839860000000E+03),\n new google.maps.LatLng( 0.463899080000000E+02, -0.123840783000000E+03),\n new google.maps.LatLng( 0.463885820000000E+02, -0.123840221000000E+03),\n new google.maps.LatLng( 0.463879880000000E+02, -0.123838768000000E+03),\n new google.maps.LatLng( 0.463884240000000E+02, -0.123832492000000E+03),\n new google.maps.LatLng( 0.463852700000000E+02, -0.123831433000000E+03),\n new google.maps.LatLng( 0.463838520000000E+02, -0.123832324000000E+03),\n new google.maps.LatLng( 0.463795090000000E+02, -0.123832719000000E+03),\n new google.maps.LatLng( 0.463780460000000E+02, -0.123831166000000E+03),\n new google.maps.LatLng( 0.463774520000000E+02, -0.123829680000000E+03),\n new google.maps.LatLng( 0.463786190000000E+02, -0.123824594000000E+03),\n new google.maps.LatLng( 0.463775670000000E+02, -0.123822117000000E+03),\n new google.maps.LatLng( 0.463765620000000E+02, -0.123821324000000E+03),\n new google.maps.LatLng( 0.463752000000000E+02, -0.123821621000000E+03),\n new google.maps.LatLng( 0.463701050000000E+02, -0.123825319000000E+03),\n new google.maps.LatLng( 0.463710880000000E+02, -0.123825882000000E+03),\n new google.maps.LatLng( 0.463728480000000E+02, -0.123825750000000E+03),\n new google.maps.LatLng( 0.463754870000000E+02, -0.123822843000000E+03),\n new google.maps.LatLng( 0.463765160000000E+02, -0.123822381000000E+03),\n new google.maps.LatLng( 0.463775440000000E+02, -0.123823339000000E+03),\n new google.maps.LatLng( 0.463780010000000E+02, -0.123825056000000E+03),\n new google.maps.LatLng( 0.463767900000000E+02, -0.123828722000000E+03),\n new google.maps.LatLng( 0.463778410000000E+02, -0.123832124000000E+03),\n new google.maps.LatLng( 0.463792580000000E+02, -0.123833346000000E+03),\n new google.maps.LatLng( 0.463830980000000E+02, -0.123833480000000E+03),\n new google.maps.LatLng( 0.463851320000000E+02, -0.123832556000000E+03),\n new google.maps.LatLng( 0.463872120000000E+02, -0.123836290000000E+03),\n new google.maps.LatLng( 0.463874170000000E+02, -0.123840452000000E+03),\n new google.maps.LatLng( 0.463886280000000E+02, -0.123841576000000E+03),\n new google.maps.LatLng( 0.463907080000000E+02, -0.123841907000000E+03),\n new google.maps.LatLng( 0.463921020000000E+02, -0.123841544000000E+03),\n new google.maps.LatLng( 0.464005580000000E+02, -0.123844490000000E+03),\n new google.maps.LatLng( 0.464077340000000E+02, -0.123850211000000E+03),\n new google.maps.LatLng( 0.464106130000000E+02, -0.123851865000000E+03),\n new google.maps.LatLng( 0.464138130000000E+02, -0.123852595000000E+03),\n new google.maps.LatLng( 0.464138130000000E+02, -0.123852595000000E+03),\n new google.maps.LatLng( 0.464170280000000E+02, -0.123847866000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "a9fa595d8dbdb3fe37b87b1bb72000c7", "score": "0.59847116", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.458741920000000E+02, -0.120521626000000E+03),\n new google.maps.LatLng( 0.458748480000000E+02, -0.120522479000000E+03),\n new google.maps.LatLng( 0.458825830000000E+02, -0.120523818000000E+03),\n new google.maps.LatLng( 0.458849130000000E+02, -0.120520872000000E+03),\n new google.maps.LatLng( 0.458880430000000E+02, -0.120518448000000E+03),\n new google.maps.LatLng( 0.458903740000000E+02, -0.120518283000000E+03),\n new google.maps.LatLng( 0.458979120000000E+02, -0.120512319000000E+03),\n new google.maps.LatLng( 0.459009270000000E+02, -0.120499346000000E+03),\n new google.maps.LatLng( 0.459027570000000E+02, -0.120496075000000E+03),\n new google.maps.LatLng( 0.459039910000000E+02, -0.120496109000000E+03),\n new google.maps.LatLng( 0.459054290000000E+02, -0.120498467000000E+03),\n new google.maps.LatLng( 0.459061150000000E+02, -0.120498664000000E+03),\n new google.maps.LatLng( 0.459086980000000E+02, -0.120496932000000E+03),\n new google.maps.LatLng( 0.459117390000000E+02, -0.120493040000000E+03),\n new google.maps.LatLng( 0.459149150000000E+02, -0.120493337000000E+03),\n new google.maps.LatLng( 0.459164690000000E+02, -0.120492684000000E+03),\n new google.maps.LatLng( 0.459172930000000E+02, -0.120490197000000E+03),\n new google.maps.LatLng( 0.459167910000000E+02, -0.120488003000000E+03),\n new google.maps.LatLng( 0.459250860000000E+02, -0.120470369000000E+03),\n new google.maps.LatLng( 0.459246810000000E+02, -0.120467775000000E+03),\n new google.maps.LatLng( 0.459360860000000E+02, -0.120449964000000E+03),\n new google.maps.LatLng( 0.459434900000000E+02, -0.120442236000000E+03),\n new google.maps.LatLng( 0.459450670000000E+02, -0.120442825000000E+03),\n new google.maps.LatLng( 0.459446100000000E+02, -0.120447673000000E+03),\n new google.maps.LatLng( 0.459464150000000E+02, -0.120447476000000E+03),\n new google.maps.LatLng( 0.459495910000000E+02, -0.120445413000000E+03),\n new google.maps.LatLng( 0.459547550000000E+02, -0.120443022000000E+03),\n new google.maps.LatLng( 0.459599880000000E+02, -0.120442825000000E+03),\n new google.maps.LatLng( 0.459641010000000E+02, -0.120438631000000E+03),\n new google.maps.LatLng( 0.459648550000000E+02, -0.120437714000000E+03),\n new google.maps.LatLng( 0.459644210000000E+02, -0.120435912000000E+03),\n new google.maps.LatLng( 0.459592110000000E+02, -0.120432735000000E+03),\n new google.maps.LatLng( 0.459582280000000E+02, -0.120429983000000E+03),\n new google.maps.LatLng( 0.459610830000000E+02, -0.120422578000000E+03),\n new google.maps.LatLng( 0.459611740000000E+02, -0.120418613000000E+03),\n new google.maps.LatLng( 0.459631610000000E+02, -0.120415303000000E+03),\n new google.maps.LatLng( 0.459649660000000E+02, -0.120413599000000E+03),\n new google.maps.LatLng( 0.459677530000000E+02, -0.120411992000000E+03),\n new google.maps.LatLng( 0.459734210000000E+02, -0.120417133000000E+03),\n new google.maps.LatLng( 0.459752040000000E+02, -0.120421262000000E+03),\n new google.maps.LatLng( 0.459753420000000E+02, -0.120429094000000E+03),\n new google.maps.LatLng( 0.459786100000000E+02, -0.120432272000000E+03),\n new google.maps.LatLng( 0.459806440000000E+02, -0.120433648000000E+03),\n new google.maps.LatLng( 0.459832030000000E+02, -0.120433091000000E+03),\n new google.maps.LatLng( 0.459875450000000E+02, -0.120432960000000E+03),\n new google.maps.LatLng( 0.459915670000000E+02, -0.120439188000000E+03),\n new google.maps.LatLng( 0.459924350000000E+02, -0.120436303000000E+03),\n new google.maps.LatLng( 0.459924350000000E+02, -0.120436303000000E+03),\n new google.maps.LatLng( 0.459930290000000E+02, -0.120432467000000E+03),\n new google.maps.LatLng( 0.459925700000000E+02, -0.120422861000000E+03),\n new google.maps.LatLng( 0.459928670000000E+02, -0.120422042000000E+03),\n new google.maps.LatLng( 0.459945120000000E+02, -0.120420730000000E+03),\n new google.maps.LatLng( 0.459954940000000E+02, -0.120417943000000E+03),\n new google.maps.LatLng( 0.459960640000000E+02, -0.120413648000000E+03),\n new google.maps.LatLng( 0.459951260000000E+02, -0.120410042000000E+03),\n new google.maps.LatLng( 0.459938190000000E+02, -0.120394438000000E+03),\n new google.maps.LatLng( 0.460034730000000E+02, -0.120391976000000E+03),\n new google.maps.LatLng( 0.460056670000000E+02, -0.120392073000000E+03),\n new google.maps.LatLng( 0.460068330000000E+02, -0.120392958000000E+03),\n new google.maps.LatLng( 0.460074480000000E+02, -0.120389350000000E+03),\n new google.maps.LatLng( 0.460067600000000E+02, -0.120383711000000E+03),\n new google.maps.LatLng( 0.460033990000000E+02, -0.120378566000000E+03),\n new google.maps.LatLng( 0.459966910000000E+02, -0.120379486000000E+03),\n new google.maps.LatLng( 0.459941790000000E+02, -0.120375690000000E+03),\n new google.maps.LatLng( 0.459932420000000E+02, -0.120375551000000E+03),\n new google.maps.LatLng( 0.459878040000000E+02, -0.120382708000000E+03),\n new google.maps.LatLng( 0.459835790000000E+02, -0.120386417000000E+03),\n new google.maps.LatLng( 0.459745540000000E+02, -0.120386819000000E+03),\n new google.maps.LatLng( 0.459684750000000E+02, -0.120386432000000E+03),\n new google.maps.LatLng( 0.459666510000000E+02, -0.120393872000000E+03),\n new google.maps.LatLng( 0.459650770000000E+02, -0.120404784000000E+03),\n new google.maps.LatLng( 0.459650100000000E+02, -0.120409076000000E+03),\n new google.maps.LatLng( 0.459585460000000E+02, -0.120416714000000E+03),\n new google.maps.LatLng( 0.459547070000000E+02, -0.120419861000000E+03),\n new google.maps.LatLng( 0.459502970000000E+02, -0.120419862000000E+03),\n new google.maps.LatLng( 0.459472580000000E+02, -0.120419110000000E+03),\n new google.maps.LatLng( 0.459337080000000E+02, -0.120418427000000E+03),\n new google.maps.LatLng( 0.459329990000000E+02, -0.120417249000000E+03),\n new google.maps.LatLng( 0.459323130000000E+02, -0.120413483000000E+03),\n new google.maps.LatLng( 0.459317420000000E+02, -0.120413025000000E+03),\n new google.maps.LatLng( 0.459282680000000E+02, -0.120412601000000E+03),\n new google.maps.LatLng( 0.459242920000000E+02, -0.120410213000000E+03),\n new google.maps.LatLng( 0.459219600000000E+02, -0.120404910000000E+03),\n new google.maps.LatLng( 0.459199710000000E+02, -0.120402521000000E+03),\n new google.maps.LatLng( 0.459189880000000E+02, -0.120402260000000E+03),\n new google.maps.LatLng( 0.459111970000000E+02, -0.120403738000000E+03),\n new google.maps.LatLng( 0.459040920000000E+02, -0.120407736000000E+03),\n new google.maps.LatLng( 0.459033990000000E+02, -0.120408380000000E+03),\n new google.maps.LatLng( 0.459033560000000E+02, -0.120418929000000E+03),\n new google.maps.LatLng( 0.458992170000000E+02, -0.120418975000000E+03),\n new google.maps.LatLng( 0.458979470000000E+02, -0.120417033000000E+03),\n new google.maps.LatLng( 0.458969870000000E+02, -0.120416445000000E+03),\n new google.maps.LatLng( 0.458935140000000E+02, -0.120416741000000E+03),\n new google.maps.LatLng( 0.458902470000000E+02, -0.120420668000000E+03),\n new google.maps.LatLng( 0.458831420000000E+02, -0.120434609000000E+03),\n new google.maps.LatLng( 0.458779100000000E+02, -0.120441283000000E+03),\n new google.maps.LatLng( 0.458773150000000E+02, -0.120442919000000E+03),\n new google.maps.LatLng( 0.458768120000000E+02, -0.120447793000000E+03),\n new google.maps.LatLng( 0.458706580000000E+02, -0.120449390000000E+03),\n new google.maps.LatLng( 0.458670810000000E+02, -0.120449831000000E+03),\n new google.maps.LatLng( 0.458666720000000E+02, -0.120491136000000E+03),\n new google.maps.LatLng( 0.458740870000000E+02, -0.120492067000000E+03),\n new google.maps.LatLng( 0.458962330000000E+02, -0.120491252000000E+03),\n new google.maps.LatLng( 0.458962560000000E+02, -0.120500532000000E+03),\n new google.maps.LatLng( 0.458910090000000E+02, -0.120507810000000E+03),\n new google.maps.LatLng( 0.458896630000000E+02, -0.120513178000000E+03),\n new google.maps.LatLng( 0.458741920000000E+02, -0.120521626000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "2a9f2a8b762206a11e679591e9800ee1", "score": "0.5983336", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.475275070000000E+02, -0.122682803000000E+03),\n new google.maps.LatLng( 0.475271710000000E+02, -0.122682696000000E+03),\n new google.maps.LatLng( 0.475275300000000E+02, -0.122677813000000E+03),\n new google.maps.LatLng( 0.475292400000000E+02, -0.122669238000000E+03),\n new google.maps.LatLng( 0.475288510000000E+02, -0.122665942000000E+03),\n new google.maps.LatLng( 0.475273630000000E+02, -0.122662859000000E+03),\n new google.maps.LatLng( 0.475256390000000E+02, -0.122661531000000E+03),\n new google.maps.LatLng( 0.475189700000000E+02, -0.122659273000000E+03),\n new google.maps.LatLng( 0.475118900000000E+02, -0.122653199000000E+03),\n new google.maps.LatLng( 0.475019570000000E+02, -0.122646408000000E+03),\n new google.maps.LatLng( 0.475028340000000E+02, -0.122644042000000E+03),\n new google.maps.LatLng( 0.475046200000000E+02, -0.122641921000000E+03),\n new google.maps.LatLng( 0.475049020000000E+02, -0.122640258000000E+03),\n new google.maps.LatLng( 0.475047270000000E+02, -0.122610060000000E+03),\n new google.maps.LatLng( 0.475052920000000E+02, -0.122566952000000E+03),\n new google.maps.LatLng( 0.475048200000000E+02, -0.122513834000000E+03),\n new google.maps.LatLng( 0.475012420000000E+02, -0.122513772000000E+03),\n new google.maps.LatLng( 0.475012440000000E+02, -0.122504057000000E+03),\n new google.maps.LatLng( 0.475012440000000E+02, -0.122504057000000E+03),\n new google.maps.LatLng( 0.474981370000000E+02, -0.122506707000000E+03),\n new google.maps.LatLng( 0.474892560000000E+02, -0.122516656000000E+03),\n new google.maps.LatLng( 0.474827630000000E+02, -0.122518548000000E+03),\n new google.maps.LatLng( 0.474757430000000E+02, -0.122523009000000E+03),\n new google.maps.LatLng( 0.474739180000000E+02, -0.122525873000000E+03),\n new google.maps.LatLng( 0.474728830000000E+02, -0.122529092000000E+03),\n new google.maps.LatLng( 0.474711820000000E+02, -0.122531229000000E+03),\n new google.maps.LatLng( 0.474695110000000E+02, -0.122532206000000E+03),\n new google.maps.LatLng( 0.474678400000000E+02, -0.122532511000000E+03),\n new google.maps.LatLng( 0.474646360000000E+02, -0.122531671000000E+03),\n new google.maps.LatLng( 0.474625760000000E+02, -0.122533425000000E+03),\n new google.maps.LatLng( 0.474625760000000E+02, -0.122533425000000E+03),\n new google.maps.LatLng( 0.474615230000000E+02, -0.122545969000000E+03),\n new google.maps.LatLng( 0.474617280000000E+02, -0.122572887000000E+03),\n new google.maps.LatLng( 0.474603780000000E+02, -0.122575221000000E+03),\n new google.maps.LatLng( 0.474600340000000E+02, -0.122575679000000E+03),\n new google.maps.LatLng( 0.474536490000000E+02, -0.122577754000000E+03),\n new google.maps.LatLng( 0.474430280000000E+02, -0.122579677000000E+03),\n new google.maps.LatLng( 0.474374600000000E+02, -0.122578441000000E+03),\n new google.maps.LatLng( 0.474357200000000E+02, -0.122578975000000E+03),\n new google.maps.LatLng( 0.474310350000000E+02, -0.122585201000000E+03),\n new google.maps.LatLng( 0.474312720000000E+02, -0.122591090000000E+03),\n new google.maps.LatLng( 0.474322560000000E+02, -0.122597896000000E+03),\n new google.maps.LatLng( 0.474321340000000E+02, -0.122624340000000E+03),\n new google.maps.LatLng( 0.474235510000000E+02, -0.122624813000000E+03),\n new google.maps.LatLng( 0.474171500000000E+02, -0.122623837000000E+03),\n new google.maps.LatLng( 0.474063620000000E+02, -0.122626202000000E+03),\n new google.maps.LatLng( 0.474034270000000E+02, -0.122624970000000E+03),\n new google.maps.LatLng( 0.474034270000000E+02, -0.122624970000000E+03),\n new google.maps.LatLng( 0.474035180000000E+02, -0.122627144000000E+03),\n new google.maps.LatLng( 0.474035180000000E+02, -0.122627144000000E+03),\n new google.maps.LatLng( 0.474035180000000E+02, -0.122630553000000E+03),\n new google.maps.LatLng( 0.474034510000000E+02, -0.122635386000000E+03),\n new google.maps.LatLng( 0.474034510000000E+02, -0.122635386000000E+03),\n new google.maps.LatLng( 0.474034180000000E+02, -0.122647444000000E+03),\n new google.maps.LatLng( 0.474035170000000E+02, -0.122663645000000E+03),\n new google.maps.LatLng( 0.474036170000000E+02, -0.122685946000000E+03),\n new google.maps.LatLng( 0.474035780000000E+02, -0.122690864000000E+03),\n new google.maps.LatLng( 0.474036060000000E+02, -0.122700270000000E+03),\n new google.maps.LatLng( 0.474036060000000E+02, -0.122700865000000E+03),\n new google.maps.LatLng( 0.474036240000000E+02, -0.122708888000000E+03),\n new google.maps.LatLng( 0.474034230000000E+02, -0.122713470000000E+03),\n new google.maps.LatLng( 0.474040160000000E+02, -0.122782811000000E+03),\n new google.maps.LatLng( 0.474040160000000E+02, -0.122801451000000E+03),\n new google.maps.LatLng( 0.474040160000000E+02, -0.122801451000000E+03),\n new google.maps.LatLng( 0.474054750000000E+02, -0.122801075000000E+03),\n new google.maps.LatLng( 0.474214000000000E+02, -0.122801040000000E+03),\n new google.maps.LatLng( 0.474251200000000E+02, -0.122800984000000E+03),\n new google.maps.LatLng( 0.474839200000000E+02, -0.122800989000000E+03),\n new google.maps.LatLng( 0.474839200000000E+02, -0.122800989000000E+03),\n new google.maps.LatLng( 0.474900440000000E+02, -0.122795858000000E+03),\n new google.maps.LatLng( 0.474949600000000E+02, -0.122789285000000E+03),\n new google.maps.LatLng( 0.474947560000000E+02, -0.122782743000000E+03),\n new google.maps.LatLng( 0.474953970000000E+02, -0.122781024000000E+03),\n new google.maps.LatLng( 0.474998150000000E+02, -0.122777697000000E+03),\n new google.maps.LatLng( 0.475027830000000E+02, -0.122776450000000E+03),\n new google.maps.LatLng( 0.475122910000000E+02, -0.122775343000000E+03),\n new google.maps.LatLng( 0.475141650000000E+02, -0.122774568000000E+03),\n new google.maps.LatLng( 0.475158570000000E+02, -0.122772005000000E+03),\n new google.maps.LatLng( 0.475197890000000E+02, -0.122760839000000E+03),\n new google.maps.LatLng( 0.475247050000000E+02, -0.122755877000000E+03),\n new google.maps.LatLng( 0.475252890000000E+02, -0.122751254000000E+03),\n new google.maps.LatLng( 0.475237220000000E+02, -0.122746893000000E+03),\n new google.maps.LatLng( 0.475236990000000E+02, -0.122744497000000E+03),\n new google.maps.LatLng( 0.475257590000000E+02, -0.122739584000000E+03),\n new google.maps.LatLng( 0.475266210000000E+02, -0.122735937000000E+03),\n new google.maps.LatLng( 0.475289560000000E+02, -0.122717900000000E+03),\n new google.maps.LatLng( 0.475289560000000E+02, -0.122713612000000E+03),\n new google.maps.LatLng( 0.475256680000000E+02, -0.122714741000000E+03),\n new google.maps.LatLng( 0.475238060000000E+02, -0.122715993000000E+03),\n new google.maps.LatLng( 0.475242160000000E+02, -0.122707251000000E+03),\n new google.maps.LatLng( 0.475253160000000E+02, -0.122704451000000E+03),\n new google.maps.LatLng( 0.475246610000000E+02, -0.122693637000000E+03),\n new google.maps.LatLng( 0.475275070000000E+02, -0.122682803000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "95f48a1d8c59e2d2dcd32c91d8ff9874", "score": "0.59822035", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.467626570000000E+02, -0.122164529000000E+03),\n new google.maps.LatLng( 0.467617410000000E+02, -0.122166181000000E+03),\n new google.maps.LatLng( 0.467606860000000E+02, -0.122157424000000E+03),\n new google.maps.LatLng( 0.467575400000000E+02, -0.122140695000000E+03),\n new google.maps.LatLng( 0.467548670000000E+02, -0.122139492000000E+03),\n new google.maps.LatLng( 0.467543040000000E+02, -0.122143470000000E+03),\n new google.maps.LatLng( 0.467543040000000E+02, -0.122143470000000E+03),\n new google.maps.LatLng( 0.467526290000000E+02, -0.122147420000000E+03),\n new google.maps.LatLng( 0.467552290000000E+02, -0.122158720000000E+03),\n new google.maps.LatLng( 0.467572290000000E+02, -0.122162620000000E+03),\n new google.maps.LatLng( 0.467575290000000E+02, -0.122165420000000E+03),\n new google.maps.LatLng( 0.467558290000000E+02, -0.122171820000000E+03),\n new google.maps.LatLng( 0.467552290000000E+02, -0.122178420000000E+03),\n new google.maps.LatLng( 0.467588280000000E+02, -0.122187221000000E+03),\n new google.maps.LatLng( 0.467622870000000E+02, -0.122192427000000E+03),\n new google.maps.LatLng( 0.467622870000000E+02, -0.122192427000000E+03),\n new google.maps.LatLng( 0.467636370000000E+02, -0.122192148000000E+03),\n new google.maps.LatLng( 0.467647590000000E+02, -0.122183470000000E+03),\n new google.maps.LatLng( 0.467626570000000E+02, -0.122164529000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "772ec08a84500e302ad9c23590664cf6", "score": "0.59821236", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.490002610000000E+02, -0.119457700000000E+03),\n new google.maps.LatLng( 0.490002530000000E+02, -0.119428678000000E+03),\n new google.maps.LatLng( 0.490002530000000E+02, -0.119428678000000E+03),\n new google.maps.LatLng( 0.489979080000000E+02, -0.119429031000000E+03),\n new google.maps.LatLng( 0.489971770000000E+02, -0.119429586000000E+03),\n new google.maps.LatLng( 0.489956460000000E+02, -0.119433578000000E+03),\n new google.maps.LatLng( 0.489937510000000E+02, -0.119433057000000E+03),\n new google.maps.LatLng( 0.489931570000000E+02, -0.119431148000000E+03),\n new google.maps.LatLng( 0.489905760000000E+02, -0.119430871000000E+03),\n new google.maps.LatLng( 0.489887720000000E+02, -0.119431253000000E+03),\n new google.maps.LatLng( 0.489859840000000E+02, -0.119433578000000E+03),\n new google.maps.LatLng( 0.489865090000000E+02, -0.119430628000000E+03),\n new google.maps.LatLng( 0.489863270000000E+02, -0.119426047000000E+03),\n new google.maps.LatLng( 0.489854140000000E+02, -0.119423513000000E+03),\n new google.maps.LatLng( 0.489834030000000E+02, -0.119421848000000E+03),\n new google.maps.LatLng( 0.489814160000000E+02, -0.119422230000000E+03),\n new google.maps.LatLng( 0.489783790000000E+02, -0.119424903000000E+03),\n new google.maps.LatLng( 0.489763910000000E+02, -0.119425389000000E+03),\n new google.maps.LatLng( 0.489756610000000E+02, -0.119424765000000E+03),\n new google.maps.LatLng( 0.489743350000000E+02, -0.119425979000000E+03),\n new google.maps.LatLng( 0.489724400000000E+02, -0.119426743000000E+03),\n new google.maps.LatLng( 0.489704300000000E+02, -0.119428651000000E+03),\n new google.maps.LatLng( 0.489668900000000E+02, -0.119429554000000E+03),\n new google.maps.LatLng( 0.489664560000000E+02, -0.119429207000000E+03),\n new google.maps.LatLng( 0.489660220000000E+02, -0.119426466000000E+03),\n new google.maps.LatLng( 0.489635090000000E+02, -0.119421193000000E+03),\n new google.maps.LatLng( 0.489615440000000E+02, -0.119420778000000E+03),\n new google.maps.LatLng( 0.489587350000000E+02, -0.119421542000000E+03),\n new google.maps.LatLng( 0.489538930000000E+02, -0.119421057000000E+03),\n new google.maps.LatLng( 0.489526600000000E+02, -0.119421994000000E+03),\n new google.maps.LatLng( 0.489502380000000E+02, -0.119428481000000E+03),\n new google.maps.LatLng( 0.489485480000000E+02, -0.119430076000000E+03),\n new google.maps.LatLng( 0.489489360000000E+02, -0.119428481000000E+03),\n new google.maps.LatLng( 0.489464690000000E+02, -0.119428932000000E+03),\n new google.maps.LatLng( 0.489455780000000E+02, -0.119431602000000E+03),\n new google.maps.LatLng( 0.489447560000000E+02, -0.119432018000000E+03),\n new google.maps.LatLng( 0.489422200000000E+02, -0.119430805000000E+03),\n new google.maps.LatLng( 0.489426310000000E+02, -0.119428967000000E+03),\n new google.maps.LatLng( 0.489421520000000E+02, -0.119428308000000E+03),\n new google.maps.LatLng( 0.489397530000000E+02, -0.119429280000000E+03),\n new google.maps.LatLng( 0.489390920000000E+02, -0.119425638000000E+03),\n new google.maps.LatLng( 0.489378810000000E+02, -0.119425049000000E+03),\n new google.maps.LatLng( 0.489387710000000E+02, -0.119426470000000E+03),\n new google.maps.LatLng( 0.489387480000000E+02, -0.119429973000000E+03),\n new google.maps.LatLng( 0.489391600000000E+02, -0.119430909000000E+03),\n new google.maps.LatLng( 0.489401420000000E+02, -0.119431013000000E+03),\n new google.maps.LatLng( 0.489419460000000E+02, -0.119429245000000E+03),\n new google.maps.LatLng( 0.489417180000000E+02, -0.119430770000000E+03),\n new google.maps.LatLng( 0.489422660000000E+02, -0.119431672000000E+03),\n new google.maps.LatLng( 0.489456010000000E+02, -0.119432989000000E+03),\n new google.maps.LatLng( 0.489470620000000E+02, -0.119431533000000E+03),\n new google.maps.LatLng( 0.489502150000000E+02, -0.119430041000000E+03),\n new google.maps.LatLng( 0.489524070000000E+02, -0.119433682000000E+03),\n new google.maps.LatLng( 0.489535950000000E+02, -0.119434827000000E+03),\n new google.maps.LatLng( 0.489558330000000E+02, -0.119435486000000E+03),\n new google.maps.LatLng( 0.489577290000000E+02, -0.119441174000000E+03),\n new google.maps.LatLng( 0.489586880000000E+02, -0.119442007000000E+03),\n new google.maps.LatLng( 0.489640550000000E+02, -0.119441695000000E+03),\n new google.maps.LatLng( 0.489640330000000E+02, -0.119439961000000E+03),\n new google.maps.LatLng( 0.489645130000000E+02, -0.119439302000000E+03),\n new google.maps.LatLng( 0.489648560000000E+02, -0.119439441000000E+03),\n new google.maps.LatLng( 0.489660210000000E+02, -0.119440169000000E+03),\n new google.maps.LatLng( 0.489677550000000E+02, -0.119442806000000E+03),\n new google.maps.LatLng( 0.489701310000000E+02, -0.119443744000000E+03),\n new google.maps.LatLng( 0.489741730000000E+02, -0.119447665000000E+03),\n new google.maps.LatLng( 0.489807050000000E+02, -0.119448916000000E+03),\n new google.maps.LatLng( 0.489846330000000E+02, -0.119452562000000E+03),\n new google.maps.LatLng( 0.489864150000000E+02, -0.119452840000000E+03),\n new google.maps.LatLng( 0.489881050000000E+02, -0.119452355000000E+03),\n new google.maps.LatLng( 0.489876480000000E+02, -0.119453986000000E+03),\n new google.maps.LatLng( 0.489885840000000E+02, -0.119454819000000E+03),\n new google.maps.LatLng( 0.489903880000000E+02, -0.119454820000000E+03),\n new google.maps.LatLng( 0.489928780000000E+02, -0.119453051000000E+03),\n new google.maps.LatLng( 0.489948210000000E+02, -0.119447429000000E+03),\n new google.maps.LatLng( 0.489952550000000E+02, -0.119447220000000E+03),\n new google.maps.LatLng( 0.489975840000000E+02, -0.119453400000000E+03),\n new google.maps.LatLng( 0.489982220000000E+02, -0.119456976000000E+03),\n new google.maps.LatLng( 0.489986790000000E+02, -0.119457844000000E+03),\n new google.maps.LatLng( 0.490002610000000E+02, -0.119457700000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "028f0c1666367ea856ba34f5ffe276e1", "score": "0.5981232", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.483026450000000E+02, -0.122351509000000E+03),\n new google.maps.LatLng( 0.483006590000000E+02, -0.122347466000000E+03),\n new google.maps.LatLng( 0.483008640000000E+02, -0.122346507000000E+03),\n new google.maps.LatLng( 0.483046350000000E+02, -0.122344318000000E+03),\n new google.maps.LatLng( 0.483050450000000E+02, -0.122349010000000E+03),\n new google.maps.LatLng( 0.483085580000000E+02, -0.122347168000000E+03),\n new google.maps.LatLng( 0.483085170000000E+02, -0.122330576000000E+03),\n new google.maps.LatLng( 0.483070600000000E+02, -0.122330858000000E+03),\n new google.maps.LatLng( 0.483029710000000E+02, -0.122327054000000E+03),\n new google.maps.LatLng( 0.482975650000000E+02, -0.122324120000000E+03),\n new google.maps.LatLng( 0.482977150000000E+02, -0.122304450000000E+03),\n new google.maps.LatLng( 0.482977150000000E+02, -0.122304450000000E+03),\n new google.maps.LatLng( 0.482975670000000E+02, -0.122253010000000E+03),\n new google.maps.LatLng( 0.482975610000000E+02, -0.122251997000000E+03),\n new google.maps.LatLng( 0.482973270000000E+02, -0.122205616000000E+03),\n new google.maps.LatLng( 0.482973260000000E+02, -0.122204964000000E+03),\n new google.maps.LatLng( 0.482973260000000E+02, -0.122204505000000E+03),\n new google.maps.LatLng( 0.482973260000000E+02, -0.122204505000000E+03),\n new google.maps.LatLng( 0.482794820000000E+02, -0.122188828000000E+03),\n new google.maps.LatLng( 0.482707510000000E+02, -0.122178593000000E+03),\n new google.maps.LatLng( 0.482655410000000E+02, -0.122173699000000E+03),\n new google.maps.LatLng( 0.482639410000000E+02, -0.122172433000000E+03),\n new google.maps.LatLng( 0.482623410000000E+02, -0.122172023000000E+03),\n new google.maps.LatLng( 0.482598960000000E+02, -0.122172503000000E+03),\n new google.maps.LatLng( 0.482565840000000E+02, -0.122176747000000E+03),\n new google.maps.LatLng( 0.482529970000000E+02, -0.122184550000000E+03),\n new google.maps.LatLng( 0.482524030000000E+02, -0.122190641000000E+03),\n new google.maps.LatLng( 0.482476520000000E+02, -0.122192256000000E+03),\n new google.maps.LatLng( 0.482487130000000E+02, -0.122193706000000E+03),\n new google.maps.LatLng( 0.482512370000000E+02, -0.122195738000000E+03),\n new google.maps.LatLng( 0.482533800000000E+02, -0.122196639000000E+03),\n new google.maps.LatLng( 0.482533480000000E+02, -0.122210484000000E+03),\n new google.maps.LatLng( 0.482571080000000E+02, -0.122210420000000E+03),\n new google.maps.LatLng( 0.482564550000000E+02, -0.122246351000000E+03),\n new google.maps.LatLng( 0.482560200000000E+02, -0.122247890000000E+03),\n new google.maps.LatLng( 0.482531520000000E+02, -0.122247862000000E+03),\n new google.maps.LatLng( 0.482536420000000E+02, -0.122253267000000E+03),\n new google.maps.LatLng( 0.482610710000000E+02, -0.122259692000000E+03),\n new google.maps.LatLng( 0.482677930000000E+02, -0.122267010000000E+03),\n new google.maps.LatLng( 0.482663150000000E+02, -0.122267172000000E+03),\n new google.maps.LatLng( 0.482366650000000E+02, -0.122238903000000E+03),\n new google.maps.LatLng( 0.482295010000000E+02, -0.122231579000000E+03),\n new google.maps.LatLng( 0.482259150000000E+02, -0.122224711000000E+03),\n new google.maps.LatLng( 0.482233060000000E+02, -0.122221873000000E+03),\n new google.maps.LatLng( 0.482145470000000E+02, -0.122218317000000E+03),\n new google.maps.LatLng( 0.482136530000000E+02, -0.122219770000000E+03),\n new google.maps.LatLng( 0.482135090000000E+02, -0.122222020000000E+03),\n new google.maps.LatLng( 0.482124780000000E+02, -0.122225567000000E+03),\n new google.maps.LatLng( 0.482095800000000E+02, -0.122226222000000E+03),\n new google.maps.LatLng( 0.482083890000000E+02, -0.122225931000000E+03),\n new google.maps.LatLng( 0.482087400000000E+02, -0.122221155000000E+03),\n new google.maps.LatLng( 0.482081990000000E+02, -0.122219187000000E+03),\n new google.maps.LatLng( 0.482069400000000E+02, -0.122218119000000E+03),\n new google.maps.LatLng( 0.482063520000000E+02, -0.122219187000000E+03),\n new google.maps.LatLng( 0.482058260000000E+02, -0.122222757000000E+03),\n new google.maps.LatLng( 0.482041860000000E+02, -0.122225138000000E+03),\n new google.maps.LatLng( 0.482025300000000E+02, -0.122223978000000E+03),\n new google.maps.LatLng( 0.482000430000000E+02, -0.122217127000000E+03),\n new google.maps.LatLng( 0.481987840000000E+02, -0.122216410000000E+03),\n new google.maps.LatLng( 0.481979600000000E+02, -0.122216348000000E+03),\n new google.maps.LatLng( 0.481977160000000E+02, -0.122219019000000E+03),\n new google.maps.LatLng( 0.481984940000000E+02, -0.122223856000000E+03),\n new google.maps.LatLng( 0.481976780000000E+02, -0.122243312000000E+03),\n new google.maps.LatLng( 0.481949850000000E+02, -0.122245799000000E+03),\n new google.maps.LatLng( 0.481944810000000E+02, -0.122248103000000E+03),\n new google.maps.LatLng( 0.481948170000000E+02, -0.122250941000000E+03),\n new google.maps.LatLng( 0.481936270000000E+02, -0.122255198000000E+03),\n new google.maps.LatLng( 0.481916960000000E+02, -0.122259746000000E+03),\n new google.maps.LatLng( 0.481919250000000E+02, -0.122261363000000E+03),\n new google.maps.LatLng( 0.481932300000000E+02, -0.122263316000000E+03),\n new google.maps.LatLng( 0.481972660000000E+02, -0.122264553000000E+03),\n new google.maps.LatLng( 0.481991580000000E+02, -0.122264553000000E+03),\n new google.maps.LatLng( 0.481992570000000E+02, -0.122270916000000E+03),\n new google.maps.LatLng( 0.481957700000000E+02, -0.122271206000000E+03),\n new google.maps.LatLng( 0.481910940000000E+02, -0.122267070000000E+03),\n new google.maps.LatLng( 0.481798690000000E+02, -0.122259689000000E+03),\n new google.maps.LatLng( 0.481739510000000E+02, -0.122255143000000E+03),\n new google.maps.LatLng( 0.481725130000000E+02, -0.122255584000000E+03),\n new google.maps.LatLng( 0.481712490000000E+02, -0.122257425000000E+03),\n new google.maps.LatLng( 0.481708890000000E+02, -0.122263543000000E+03),\n new google.maps.LatLng( 0.481697520000000E+02, -0.122265317000000E+03),\n new google.maps.LatLng( 0.481684340000000E+02, -0.122266466000000E+03),\n new google.maps.LatLng( 0.481664420000000E+02, -0.122266579000000E+03),\n new google.maps.LatLng( 0.481638010000000E+02, -0.122265915000000E+03),\n new google.maps.LatLng( 0.481622140000000E+02, -0.122264766000000E+03),\n new google.maps.LatLng( 0.481571460000000E+02, -0.122264379000000E+03),\n new google.maps.LatLng( 0.481557460000000E+02, -0.122266962000000E+03),\n new google.maps.LatLng( 0.481557380000000E+02, -0.122275125000000E+03),\n new google.maps.LatLng( 0.481519840000000E+02, -0.122274622000000E+03),\n new google.maps.LatLng( 0.481491770000000E+02, -0.122272303000000E+03),\n new google.maps.LatLng( 0.481475900000000E+02, -0.122270150000000E+03),\n new google.maps.LatLng( 0.481478720000000E+02, -0.122268258000000E+03),\n new google.maps.LatLng( 0.481490930000000E+02, -0.122267907000000E+03),\n new google.maps.LatLng( 0.481494280000000E+02, -0.122267098000000E+03),\n new google.maps.LatLng( 0.481483680000000E+02, -0.122260522000000E+03),\n new google.maps.LatLng( 0.481475360000000E+02, -0.122258706000000E+03),\n new google.maps.LatLng( 0.481460870000000E+02, -0.122259148000000E+03),\n new google.maps.LatLng( 0.481454990000000E+02, -0.122258859000000E+03),\n new google.maps.LatLng( 0.481431040000000E+02, -0.122255456000000E+03),\n new google.maps.LatLng( 0.481428820000000E+02, -0.122253502000000E+03),\n new google.maps.LatLng( 0.481428820000000E+02, -0.122253502000000E+03),\n new google.maps.LatLng( 0.481398540000000E+02, -0.122254295000000E+03),\n new google.maps.LatLng( 0.481398980000000E+02, -0.122269326000000E+03),\n new google.maps.LatLng( 0.481377090000000E+02, -0.122273385000000E+03),\n new google.maps.LatLng( 0.481379070000000E+02, -0.122281411000000E+03),\n new google.maps.LatLng( 0.481356560000000E+02, -0.122281350000000E+03),\n new google.maps.LatLng( 0.481345200000000E+02, -0.122282327000000E+03),\n new google.maps.LatLng( 0.481279510000000E+02, -0.122289636000000E+03),\n new google.maps.LatLng( 0.481233810000000E+02, -0.122296136000000E+03),\n new google.maps.LatLng( 0.481230220000000E+02, -0.122302896000000E+03),\n new google.maps.LatLng( 0.481197190000000E+02, -0.122305840000000E+03),\n new google.maps.LatLng( 0.481162790000000E+02, -0.122305334000000E+03),\n new google.maps.LatLng( 0.481162770000000E+02, -0.122307091000000E+03),\n new google.maps.LatLng( 0.481184520000000E+02, -0.122317835000000E+03),\n new google.maps.LatLng( 0.481211830000000E+02, -0.122321237000000E+03),\n new google.maps.LatLng( 0.481230150000000E+02, -0.122327449000000E+03),\n new google.maps.LatLng( 0.481233040000000E+02, -0.122363201000000E+03),\n new google.maps.LatLng( 0.481260415638450E+02, -0.122365061393677E+03),\n new google.maps.LatLng( 0.481260415638450E+02, -0.122365061393677E+03),\n new google.maps.LatLng( 0.481260968076112E+02, -0.122365057215413E+03),\n new google.maps.LatLng( 0.481331209337108E+02, -0.122364525958075E+03),\n new google.maps.LatLng( 0.481427590000000E+02, -0.122363797000000E+03),\n new google.maps.LatLng( 0.481513040000000E+02, -0.122364744000000E+03),\n new google.maps.LatLng( 0.481648090000000E+02, -0.122370253000000E+03),\n new google.maps.LatLng( 0.481735207496130E+02, -0.122364124285504E+03),\n new google.maps.LatLng( 0.481744380000000E+02, -0.122363479000000E+03),\n new google.maps.LatLng( 0.481875680000000E+02, -0.122362044000000E+03),\n new google.maps.LatLng( 0.481930220000000E+02, -0.122372492000000E+03),\n new google.maps.LatLng( 0.481930342087307E+02, -0.122372500330439E+03),\n new google.maps.LatLng( 0.481932077873503E+02, -0.122372618769131E+03),\n new google.maps.LatLng( 0.481992818262957E+02, -0.122376763295846E+03),\n new google.maps.LatLng( 0.482011791120790E+02, -0.122378057879514E+03),\n new google.maps.LatLng( 0.482071060000000E+02, -0.122382102000000E+03),\n new google.maps.LatLng( 0.482178110000000E+02, -0.122385703000000E+03),\n new google.maps.LatLng( 0.482199814020855E+02, -0.122387682622564E+03),\n new google.maps.LatLng( 0.482205413895339E+02, -0.122388193386812E+03),\n new google.maps.LatLng( 0.482211753172402E+02, -0.122388771591929E+03),\n new google.maps.LatLng( 0.482231776716597E+02, -0.122390597938308E+03),\n new google.maps.LatLng( 0.482272161452226E+02, -0.122394281427852E+03),\n new google.maps.LatLng( 0.482292330000000E+02, -0.122396121000000E+03),\n new google.maps.LatLng( 0.482328870000000E+02, -0.122425572000000E+03),\n new google.maps.LatLng( 0.482362370000000E+02, -0.122430578000000E+03),\n new google.maps.LatLng( 0.482365500000000E+02, -0.122433767000000E+03),\n new google.maps.LatLng( 0.482327044279504E+02, -0.122449178480294E+03),\n new google.maps.LatLng( 0.482325980000000E+02, -0.122449605000000E+03),\n new google.maps.LatLng( 0.482323556795148E+02, -0.122449871040543E+03),\n new google.maps.LatLng( 0.482296945068962E+02, -0.122452792707727E+03),\n new google.maps.LatLng( 0.482288590000000E+02, -0.122453710000000E+03),\n new google.maps.LatLng( 0.482285073652801E+02, -0.122453694055991E+03),\n new google.maps.LatLng( 0.482271996648845E+02, -0.122453634761542E+03),\n new google.maps.LatLng( 0.482268300000000E+02, -0.122453618000000E+03),\n new google.maps.LatLng( 0.482147360000000E+02, -0.122449513000000E+03),\n new google.maps.LatLng( 0.482145220000000E+02, -0.122444508000000E+03),\n new google.maps.LatLng( 0.482117760000000E+02, -0.122441731000000E+03),\n new google.maps.LatLng( 0.482093500000000E+02, -0.122442051000000E+03),\n new google.maps.LatLng( 0.481966390000000E+02, -0.122454930000000E+03),\n new google.maps.LatLng( 0.481931370000000E+02, -0.122461888000000E+03),\n new google.maps.LatLng( 0.481932397951405E+02, -0.122462071706898E+03),\n new google.maps.LatLng( 0.481947670000000E+02, -0.122464801000000E+03),\n new google.maps.LatLng( 0.481940070000000E+02, -0.122470250000000E+03),\n new google.maps.LatLng( 0.481880870000000E+02, -0.122478535000000E+03),\n new google.maps.LatLng( 0.481757030000000E+02, -0.122479008000000E+03),\n new google.maps.LatLng( 0.481667920000000E+02, -0.122475803000000E+03),\n new google.maps.LatLng( 0.481513827558478E+02, -0.122461478587896E+03),\n new google.maps.LatLng( 0.481474562541913E+02, -0.122457828517373E+03),\n new google.maps.LatLng( 0.481308410000000E+02, -0.122442383000000E+03),\n new google.maps.LatLng( 0.481265787577255E+02, -0.122434953146103E+03),\n new google.maps.LatLng( 0.481197683984370E+02, -0.122423081466540E+03),\n new google.maps.LatLng( 0.481132100000000E+02, -0.122411649000000E+03),\n new google.maps.LatLng( 0.480873840000000E+02, -0.122379481000000E+03),\n new google.maps.LatLng( 0.480834095503265E+02, -0.122376539627492E+03),\n new google.maps.LatLng( 0.480615270000000E+02, -0.122360345000000E+03),\n new google.maps.LatLng( 0.480604577299243E+02, -0.122359954480525E+03),\n new google.maps.LatLng( 0.480561330000000E+02, -0.122358375000000E+03),\n new google.maps.LatLng( 0.480545460000000E+02, -0.122363107000000E+03),\n new google.maps.LatLng( 0.480575680000000E+02, -0.122377114000000E+03),\n new google.maps.LatLng( 0.480651890000000E+02, -0.122387690000000E+03),\n new google.maps.LatLng( 0.480694770000000E+02, -0.122390787000000E+03),\n new google.maps.LatLng( 0.480784720000000E+02, -0.122393413000000E+03),\n new google.maps.LatLng( 0.480852550000000E+02, -0.122400692000000E+03),\n new google.maps.LatLng( 0.481029410000000E+02, -0.122423703000000E+03),\n new google.maps.LatLng( 0.481140410000000E+02, -0.122449660000000E+03),\n new google.maps.LatLng( 0.481270927272170E+02, -0.122463934326481E+03),\n new google.maps.LatLng( 0.481301795852177E+02, -0.122467310340871E+03),\n new google.maps.LatLng( 0.481303530000000E+02, -0.122467500000000E+03),\n new google.maps.LatLng( 0.481303111150099E+02, -0.122467836460039E+03),\n new google.maps.LatLng( 0.481290480000000E+02, -0.122477983000000E+03),\n new google.maps.LatLng( 0.481237651817905E+02, -0.122483693114570E+03),\n new google.maps.LatLng( 0.481209500000000E+02, -0.122486736000000E+03),\n new google.maps.LatLng( 0.481206170000000E+02, -0.122489986000000E+03),\n new google.maps.LatLng( 0.481339310000000E+02, -0.122512031000000E+03),\n new google.maps.LatLng( 0.481397414243715E+02, -0.122514236497462E+03),\n new google.maps.LatLng( 0.481595659769985E+02, -0.122521761421239E+03),\n new google.maps.LatLng( 0.481617120000000E+02, -0.122522576000000E+03),\n new google.maps.LatLng( 0.481837450000000E+02, -0.122537220000000E+03),\n new google.maps.LatLng( 0.482027358160035E+02, -0.122538461746624E+03),\n new google.maps.LatLng( 0.482096830000000E+02, -0.122538916000000E+03),\n new google.maps.LatLng( 0.482230050000000E+02, -0.122534431000000E+03),\n new google.maps.LatLng( 0.482402130000000E+02, -0.122535209000000E+03),\n new google.maps.LatLng( 0.482486633744357E+02, -0.122531503605797E+03),\n new google.maps.LatLng( 0.482498210000000E+02, -0.122530996000000E+03),\n new google.maps.LatLng( 0.482499080940923E+02, -0.122530667950408E+03),\n new google.maps.LatLng( 0.482513348461391E+02, -0.122525293930033E+03),\n new google.maps.LatLng( 0.482570450000000E+02, -0.122503786000000E+03),\n new google.maps.LatLng( 0.482566110000000E+02, -0.122499648000000E+03),\n new google.maps.LatLng( 0.482549963141370E+02, -0.122498685302439E+03),\n new google.maps.LatLng( 0.482533890000000E+02, -0.122497727000000E+03),\n new google.maps.LatLng( 0.482520430000000E+02, -0.122493448000000E+03),\n new google.maps.LatLng( 0.482517060000000E+02, -0.122480925000000E+03),\n new google.maps.LatLng( 0.482552270000000E+02, -0.122474494000000E+03),\n new google.maps.LatLng( 0.482696040000000E+02, -0.122466803000000E+03),\n new google.maps.LatLng( 0.482705410000000E+02, -0.122463962000000E+03),\n new google.maps.LatLng( 0.482687589115578E+02, -0.122458490680848E+03),\n new google.maps.LatLng( 0.482664537645726E+02, -0.122451413481676E+03),\n new google.maps.LatLng( 0.482617753736897E+02, -0.122437050014055E+03),\n new google.maps.LatLng( 0.482601572369779E+02, -0.122432082055018E+03),\n new google.maps.LatLng( 0.482530037447270E+02, -0.122410119598930E+03),\n new google.maps.LatLng( 0.482518300000000E+02, -0.122406516000000E+03),\n new google.maps.LatLng( 0.482567815032037E+02, -0.122396174872906E+03),\n new google.maps.LatLng( 0.482571870000000E+02, -0.122395328000000E+03),\n new google.maps.LatLng( 0.482657502287649E+02, -0.122393077235748E+03),\n new google.maps.LatLng( 0.482696280000000E+02, -0.122392058000000E+03),\n new google.maps.LatLng( 0.482878390000000E+02, -0.122371693000000E+03),\n new google.maps.LatLng( 0.482881777806934E+02, -0.122371903199885E+03),\n new google.maps.LatLng( 0.482881777806934E+02, -0.122371903199885E+03),\n new google.maps.LatLng( 0.482976330000000E+02, -0.122360880000000E+03),\n new google.maps.LatLng( 0.482976330000000E+02, -0.122360880000000E+03),\n new google.maps.LatLng( 0.482975550000000E+02, -0.122353728000000E+03),\n new google.maps.LatLng( 0.483026450000000E+02, -0.122351509000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "fab5a5f5837f7060ec4c8bb33b4eb5f0", "score": "0.59809273", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.477204980000000E+02, -0.119556403000000E+03),\n new google.maps.LatLng( 0.477208920000000E+02, -0.119556047000000E+03),\n new google.maps.LatLng( 0.477286850000000E+02, -0.119556477000000E+03),\n new google.maps.LatLng( 0.477311980000000E+02, -0.119558001000000E+03),\n new google.maps.LatLng( 0.477372050000000E+02, -0.119556544000000E+03),\n new google.maps.LatLng( 0.477428250000000E+02, -0.119556375000000E+03),\n new google.maps.LatLng( 0.477428000000000E+02, -0.119572665000000E+03),\n new google.maps.LatLng( 0.477448950000000E+02, -0.119572980000000E+03),\n new google.maps.LatLng( 0.477562510000000E+02, -0.119578229000000E+03),\n new google.maps.LatLng( 0.477591550000000E+02, -0.119583571000000E+03),\n new google.maps.LatLng( 0.477604800000000E+02, -0.119585199000000E+03),\n new google.maps.LatLng( 0.477627640000000E+02, -0.119586792000000E+03),\n new google.maps.LatLng( 0.477635630000000E+02, -0.119586725000000E+03),\n new google.maps.LatLng( 0.477646140000000E+02, -0.119585742000000E+03),\n new google.maps.LatLng( 0.477661680000000E+02, -0.119586116000000E+03),\n new google.maps.LatLng( 0.477679490000000E+02, -0.119589302000000E+03),\n new google.maps.LatLng( 0.477682900000000E+02, -0.119594045000000E+03),\n new google.maps.LatLng( 0.477675130000000E+02, -0.119596383000000E+03),\n new google.maps.LatLng( 0.477673980000000E+02, -0.119598619000000E+03),\n new google.maps.LatLng( 0.477686770000000E+02, -0.119599399000000E+03),\n new google.maps.LatLng( 0.478154380000000E+02, -0.119599128000000E+03),\n new google.maps.LatLng( 0.478155130000000E+02, -0.119555887000000E+03),\n new google.maps.LatLng( 0.478442950000000E+02, -0.119555749000000E+03),\n new google.maps.LatLng( 0.478443850000000E+02, -0.119534099000000E+03),\n new google.maps.LatLng( 0.478733500000000E+02, -0.119533848000000E+03),\n new google.maps.LatLng( 0.478733430000000E+02, -0.119512084000000E+03),\n new google.maps.LatLng( 0.478733430000000E+02, -0.119512084000000E+03),\n new google.maps.LatLng( 0.478443320000000E+02, -0.119512449000000E+03),\n new google.maps.LatLng( 0.478443740000000E+02, -0.119493590000000E+03),\n new google.maps.LatLng( 0.478423410000000E+02, -0.119493825000000E+03),\n new google.maps.LatLng( 0.478408350000000E+02, -0.119489684000000E+03),\n new google.maps.LatLng( 0.478408660000000E+02, -0.119469867000000E+03),\n new google.maps.LatLng( 0.477864970000000E+02, -0.119470204000000E+03),\n new google.maps.LatLng( 0.477865120000000E+02, -0.119491085000000E+03),\n new google.maps.LatLng( 0.477297280000000E+02, -0.119491197000000E+03),\n new google.maps.LatLng( 0.477286100000000E+02, -0.119492749000000E+03),\n new google.maps.LatLng( 0.477283390000000E+02, -0.119534706000000E+03),\n new google.maps.LatLng( 0.477277230000000E+02, -0.119535722000000E+03),\n new google.maps.LatLng( 0.477242280000000E+02, -0.119537857000000E+03),\n new google.maps.LatLng( 0.477227440000000E+02, -0.119540701000000E+03),\n new google.maps.LatLng( 0.477229730000000E+02, -0.119545643000000E+03),\n new google.maps.LatLng( 0.477218070000000E+02, -0.119551094000000E+03),\n new google.maps.LatLng( 0.477207110000000E+02, -0.119551805000000E+03),\n new google.maps.LatLng( 0.477191350000000E+02, -0.119556444000000E+03),\n new google.maps.LatLng( 0.477204980000000E+02, -0.119556403000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "1593b06dcf4364346c3f36cb482073e3", "score": "0.59795195", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.455704000000000E+02, -0.122455002000000E+03),\n new google.maps.LatLng( 0.455717130000000E+02, -0.122458227000000E+03),\n new google.maps.LatLng( 0.455774410000000E+02, -0.122468003000000E+03),\n new google.maps.LatLng( 0.455790730000000E+02, -0.122469795000000E+03),\n new google.maps.LatLng( 0.455753450000000E+02, -0.122455059000000E+03),\n new google.maps.LatLng( 0.455730410000000E+02, -0.122449219000000E+03),\n new google.maps.LatLng( 0.455721610000000E+02, -0.122448195000000E+03),\n new google.maps.LatLng( 0.455707370000000E+02, -0.122447635000000E+03),\n new google.maps.LatLng( 0.455701130000000E+02, -0.122450659000000E+03),\n new google.maps.LatLng( 0.455704000000000E+02, -0.122455002000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "44e769757d6d54278081b5e2687a8ce2", "score": "0.59765965", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.463881790000000E+02, -0.121550852000000E+03),\n new google.maps.LatLng( 0.463882320000000E+02, -0.121523642000000E+03),\n new google.maps.LatLng( 0.463882320000000E+02, -0.121523642000000E+03),\n new google.maps.LatLng( 0.460440480000000E+02, -0.121523938000000E+03),\n new google.maps.LatLng( 0.460440480000000E+02, -0.121523938000000E+03),\n new google.maps.LatLng( 0.460435990000000E+02, -0.121569434000000E+03),\n new google.maps.LatLng( 0.460438410000000E+02, -0.121612502000000E+03),\n new google.maps.LatLng( 0.460036040000000E+02, -0.121611974000000E+03),\n new google.maps.LatLng( 0.459685890000000E+02, -0.121612511000000E+03),\n new google.maps.LatLng( 0.459654600000000E+02, -0.121612601000000E+03),\n new google.maps.LatLng( 0.459624000000000E+02, -0.121612689000000E+03),\n new google.maps.LatLng( 0.459556460000000E+02, -0.121612704000000E+03),\n new google.maps.LatLng( 0.459486210000000E+02, -0.121612778000000E+03),\n new google.maps.LatLng( 0.459225690000000E+02, -0.121612743000000E+03),\n new google.maps.LatLng( 0.459225690000000E+02, -0.121612743000000E+03),\n new google.maps.LatLng( 0.458998520000000E+02, -0.121612738000000E+03),\n new google.maps.LatLng( 0.458977360000000E+02, -0.121612743000000E+03),\n new google.maps.LatLng( 0.458783340000000E+02, -0.121612755000000E+03),\n new google.maps.LatLng( 0.458710780000000E+02, -0.121612629000000E+03),\n new google.maps.LatLng( 0.458703310000000E+02, -0.121612639000000E+03),\n new google.maps.LatLng( 0.458703170000000E+02, -0.121608531000000E+03),\n new google.maps.LatLng( 0.458694980000000E+02, -0.121608534000000E+03),\n new google.maps.LatLng( 0.458678590000000E+02, -0.121608540000000E+03),\n new google.maps.LatLng( 0.458406600000000E+02, -0.121608582000000E+03),\n new google.maps.LatLng( 0.458376360000000E+02, -0.121608581000000E+03),\n new google.maps.LatLng( 0.458376360000000E+02, -0.121608581000000E+03),\n new google.maps.LatLng( 0.458359560000000E+02, -0.121611881000000E+03),\n new google.maps.LatLng( 0.458319930000000E+02, -0.121614647000000E+03),\n new google.maps.LatLng( 0.458319120000000E+02, -0.121617704000000E+03),\n new google.maps.LatLng( 0.458325750000000E+02, -0.121618523000000E+03),\n new google.maps.LatLng( 0.458367810000000E+02, -0.121618330000000E+03),\n new google.maps.LatLng( 0.458398640000000E+02, -0.121622650000000E+03),\n new google.maps.LatLng( 0.458396450000000E+02, -0.121626187000000E+03),\n new google.maps.LatLng( 0.458338550000000E+02, -0.121636465000000E+03),\n new google.maps.LatLng( 0.458321640000000E+02, -0.121637938000000E+03),\n new google.maps.LatLng( 0.458285530000000E+02, -0.121639871000000E+03),\n new google.maps.LatLng( 0.458262690000000E+02, -0.121643273000000E+03),\n new google.maps.LatLng( 0.458248300000000E+02, -0.121646413000000E+03),\n new google.maps.LatLng( 0.458221100000000E+02, -0.121648802000000E+03),\n new google.maps.LatLng( 0.458207850000000E+02, -0.121648901000000E+03),\n new google.maps.LatLng( 0.458207850000000E+02, -0.121648901000000E+03),\n new google.maps.LatLng( 0.458307330000000E+02, -0.121665929000000E+03),\n new google.maps.LatLng( 0.458326530000000E+02, -0.121666190000000E+03),\n new google.maps.LatLng( 0.458383450000000E+02, -0.121664029000000E+03),\n new google.maps.LatLng( 0.458420020000000E+02, -0.121664028000000E+03),\n new google.maps.LatLng( 0.458387110000000E+02, -0.121668346000000E+03),\n new google.maps.LatLng( 0.458325630000000E+02, -0.121669787000000E+03),\n new google.maps.LatLng( 0.458295000000000E+02, -0.121671782000000E+03),\n new google.maps.LatLng( 0.458290660000000E+02, -0.121673777000000E+03),\n new google.maps.LatLng( 0.458297510000000E+02, -0.121676066000000E+03),\n new google.maps.LatLng( 0.458298430000000E+02, -0.121680120000000E+03),\n new google.maps.LatLng( 0.458283120000000E+02, -0.121687118000000E+03),\n new google.maps.LatLng( 0.458279460000000E+02, -0.121687314000000E+03),\n new google.maps.LatLng( 0.458273740000000E+02, -0.121686300000000E+03),\n new google.maps.LatLng( 0.458271690000000E+02, -0.121684796000000E+03),\n new google.maps.LatLng( 0.458266660000000E+02, -0.121685614000000E+03),\n new google.maps.LatLng( 0.458252710000000E+02, -0.121695455000000E+03),\n new google.maps.LatLng( 0.458330880000000E+02, -0.121709321000000E+03),\n new google.maps.LatLng( 0.458363560000000E+02, -0.121710859000000E+03),\n new google.maps.LatLng( 0.458387790000000E+02, -0.121710206000000E+03),\n new google.maps.LatLng( 0.458426420000000E+02, -0.121711418000000E+03),\n new google.maps.LatLng( 0.458427390000000E+02, -0.121713389000000E+03),\n new google.maps.LatLng( 0.457910260000000E+02, -0.121712171000000E+03),\n new google.maps.LatLng( 0.457918470000000E+02, -0.121722148000000E+03),\n new google.maps.LatLng( 0.457936970000000E+02, -0.121728227000000E+03),\n new google.maps.LatLng( 0.457932610000000E+02, -0.121732638000000E+03),\n new google.maps.LatLng( 0.457872350000000E+02, -0.121737849000000E+03),\n new google.maps.LatLng( 0.457842170000000E+02, -0.121735611000000E+03),\n new google.maps.LatLng( 0.457842170000000E+02, -0.121735611000000E+03),\n new google.maps.LatLng( 0.457845220000000E+02, -0.121741099000000E+03),\n new google.maps.LatLng( 0.457825490000000E+02, -0.121746132000000E+03),\n new google.maps.LatLng( 0.457812770000000E+02, -0.121746326000000E+03),\n new google.maps.LatLng( 0.457803390000000E+02, -0.121745513000000E+03),\n new google.maps.LatLng( 0.457793010000000E+02, -0.121745801000000E+03),\n new google.maps.LatLng( 0.457774080000000E+02, -0.121747506000000E+03),\n new google.maps.LatLng( 0.457715510000000E+02, -0.121757774000000E+03),\n new google.maps.LatLng( 0.457710220000000E+02, -0.121760013000000E+03),\n new google.maps.LatLng( 0.457702650000000E+02, -0.121765157000000E+03),\n new google.maps.LatLng( 0.457717330000000E+02, -0.121777730000000E+03),\n new google.maps.LatLng( 0.457677100000000E+02, -0.121792949000000E+03),\n new google.maps.LatLng( 0.457691790000000E+02, -0.121802499000000E+03),\n new google.maps.LatLng( 0.457690010000000E+02, -0.121814072000000E+03),\n new google.maps.LatLng( 0.457683100000000E+02, -0.121820074000000E+03),\n new google.maps.LatLng( 0.457667670000000E+02, -0.121822355000000E+03),\n new google.maps.LatLng( 0.457667670000000E+02, -0.121822355000000E+03),\n new google.maps.LatLng( 0.457661330000000E+02, -0.121823619000000E+03),\n new google.maps.LatLng( 0.457666360000000E+02, -0.121824207000000E+03),\n new google.maps.LatLng( 0.457705680000000E+02, -0.121820974000000E+03),\n new google.maps.LatLng( 0.457754140000000E+02, -0.121815356000000E+03),\n new google.maps.LatLng( 0.457769460000000E+02, -0.121811435000000E+03),\n new google.maps.LatLng( 0.457804890000000E+02, -0.121808200000000E+03),\n new google.maps.LatLng( 0.457824780000000E+02, -0.121808070000000E+03),\n new google.maps.LatLng( 0.457834610000000E+02, -0.121808657000000E+03),\n new google.maps.LatLng( 0.457849690000000E+02, -0.121808265000000E+03),\n new google.maps.LatLng( 0.457873010000000E+02, -0.121802416000000E+03),\n new google.maps.LatLng( 0.457876200000000E+02, -0.121798365000000E+03),\n new google.maps.LatLng( 0.457890830000000E+02, -0.121796600000000E+03),\n new google.maps.LatLng( 0.457914370000000E+02, -0.121794965000000E+03),\n new google.maps.LatLng( 0.457935630000000E+02, -0.121794801000000E+03),\n new google.maps.LatLng( 0.457960090000000E+02, -0.121796075000000E+03),\n new google.maps.LatLng( 0.457974270000000E+02, -0.121796107000000E+03),\n new google.maps.LatLng( 0.458027070000000E+02, -0.121795027000000E+03),\n new google.maps.LatLng( 0.458157360000000E+02, -0.121790185000000E+03),\n new google.maps.LatLng( 0.458182950000000E+02, -0.121786980000000E+03),\n new google.maps.LatLng( 0.458187970000000E+02, -0.121784331000000E+03),\n new google.maps.LatLng( 0.458209220000000E+02, -0.121780145000000E+03),\n new google.maps.LatLng( 0.458273460000000E+02, -0.121776580000000E+03),\n new google.maps.LatLng( 0.458286680000000E+02, -0.121778465000000E+03),\n new google.maps.LatLng( 0.458299260000000E+02, -0.121782029000000E+03),\n new google.maps.LatLng( 0.458338450000000E+02, -0.121783392000000E+03),\n new google.maps.LatLng( 0.458363110000000E+02, -0.121786715000000E+03),\n new google.maps.LatLng( 0.458315550000000E+02, -0.121791192000000E+03),\n new google.maps.LatLng( 0.458320580000000E+02, -0.121792401000000E+03),\n new google.maps.LatLng( 0.458333150000000E+02, -0.121793382000000E+03),\n new google.maps.LatLng( 0.458309610000000E+02, -0.121797601000000E+03),\n new google.maps.LatLng( 0.458281040000000E+02, -0.121798256000000E+03),\n new google.maps.LatLng( 0.458247210000000E+02, -0.121800055000000E+03),\n new google.maps.LatLng( 0.458197380000000E+02, -0.121803587000000E+03),\n new google.maps.LatLng( 0.458155780000000E+02, -0.121811009000000E+03),\n new google.maps.LatLng( 0.458152580000000E+02, -0.121812414000000E+03),\n new google.maps.LatLng( 0.458180010000000E+02, -0.121818756000000E+03),\n new google.maps.LatLng( 0.458221840000000E+02, -0.121826048000000E+03),\n new google.maps.LatLng( 0.458239670000000E+02, -0.121828011000000E+03),\n new google.maps.LatLng( 0.458273270000000E+02, -0.121828404000000E+03),\n new google.maps.LatLng( 0.458276700000000E+02, -0.121833178000000E+03),\n new google.maps.LatLng( 0.458312800000000E+02, -0.121841027000000E+03),\n new google.maps.LatLng( 0.458337230000000E+02, -0.121850741000000E+03),\n new google.maps.LatLng( 0.458340660000000E+02, -0.121852801000000E+03),\n new google.maps.LatLng( 0.458338370000000E+02, -0.121853749000000E+03),\n new google.maps.LatLng( 0.458328760000000E+02, -0.121854730000000E+03),\n new google.maps.LatLng( 0.458321670000000E+02, -0.121855612000000E+03),\n new google.maps.LatLng( 0.458324870000000E+02, -0.121857084000000E+03),\n new google.maps.LatLng( 0.458345680000000E+02, -0.121854568000000E+03),\n new google.maps.LatLng( 0.458351200000000E+02, -0.121840930000000E+03),\n new google.maps.LatLng( 0.458392810000000E+02, -0.121840541000000E+03),\n new google.maps.LatLng( 0.458387540000000E+02, -0.121843517000000E+03),\n new google.maps.LatLng( 0.458372910000000E+02, -0.121844170000000E+03),\n new google.maps.LatLng( 0.458368570000000E+02, -0.121844889000000E+03),\n new google.maps.LatLng( 0.458371030000000E+02, -0.121860914000000E+03),\n new google.maps.LatLng( 0.458384740000000E+02, -0.121861340000000E+03),\n new google.maps.LatLng( 0.458391830000000E+02, -0.121860686000000E+03),\n new google.maps.LatLng( 0.458424300000000E+02, -0.121859708000000E+03),\n new google.maps.LatLng( 0.458387920000000E+02, -0.121866344000000E+03),\n new google.maps.LatLng( 0.458355670000000E+02, -0.121870729000000E+03),\n new google.maps.LatLng( 0.458338600000000E+02, -0.121871479000000E+03),\n new google.maps.LatLng( 0.458284110000000E+02, -0.121872155000000E+03),\n new google.maps.LatLng( 0.458247530000000E+02, -0.121873524000000E+03),\n new google.maps.LatLng( 0.458198600000000E+02, -0.121880138000000E+03),\n new google.maps.LatLng( 0.458201150000000E+02, -0.121885500000000E+03),\n new google.maps.LatLng( 0.458214200000000E+02, -0.121890403000000E+03),\n new google.maps.LatLng( 0.458211480000000E+02, -0.121896321000000E+03),\n new google.maps.LatLng( 0.458229110000000E+02, -0.121907501000000E+03),\n new google.maps.LatLng( 0.458219740000000E+02, -0.121908907000000E+03),\n new google.maps.LatLng( 0.458186380000000E+02, -0.121909040000000E+03),\n new google.maps.LatLng( 0.458183860000000E+02, -0.121909433000000E+03),\n new google.maps.LatLng( 0.458218380000000E+02, -0.121913615000000E+03),\n new google.maps.LatLng( 0.458287890000000E+02, -0.121919205000000E+03),\n new google.maps.LatLng( 0.458295430000000E+02, -0.121917962000000E+03),\n new google.maps.LatLng( 0.458351200000000E+02, -0.121915736000000E+03),\n new google.maps.LatLng( 0.458376350000000E+02, -0.121916520000000E+03),\n new google.maps.LatLng( 0.458406060000000E+02, -0.121916126000000E+03),\n new google.maps.LatLng( 0.458415880000000E+02, -0.121912070000000E+03),\n new google.maps.LatLng( 0.458437370000000E+02, -0.121910761000000E+03),\n new google.maps.LatLng( 0.458473270000000E+02, -0.121914389000000E+03),\n new google.maps.LatLng( 0.458488130000000E+02, -0.121914062000000E+03),\n new google.maps.LatLng( 0.458498410000000E+02, -0.121913570000000E+03),\n new google.maps.LatLng( 0.458508690000000E+02, -0.121911018000000E+03),\n new google.maps.LatLng( 0.458557150000000E+02, -0.121907973000000E+03),\n new google.maps.LatLng( 0.458577970000000E+02, -0.121918670000000E+03),\n new google.maps.LatLng( 0.458592840000000E+02, -0.121920567000000E+03),\n new google.maps.LatLng( 0.458605870000000E+02, -0.121921254000000E+03),\n new google.maps.LatLng( 0.458650210000000E+02, -0.121920140000000E+03),\n new google.maps.LatLng( 0.458692490000000E+02, -0.121915492000000E+03),\n new google.maps.LatLng( 0.458699580000000E+02, -0.121915328000000E+03),\n new google.maps.LatLng( 0.458727700000000E+02, -0.121916374000000E+03),\n new google.maps.LatLng( 0.458743349794922E+02, -0.121922038757813E+03),\n new google.maps.LatLng( 0.458712850000000E+02, -0.121920137000000E+03),\n new google.maps.LatLng( 0.458699590000000E+02, -0.121920400000000E+03),\n new google.maps.LatLng( 0.458577530000000E+02, -0.121927569000000E+03),\n new google.maps.LatLng( 0.458465980000000E+02, -0.121935193000000E+03),\n new google.maps.LatLng( 0.458419350000000E+02, -0.121940262000000E+03),\n new google.maps.LatLng( 0.458466440000000E+02, -0.121948244000000E+03),\n new google.maps.LatLng( 0.458554670000000E+02, -0.121955050000000E+03),\n new google.maps.LatLng( 0.458606550000000E+02, -0.121962806000000E+03),\n new google.maps.LatLng( 0.458671910000000E+02, -0.121971219000000E+03),\n new google.maps.LatLng( 0.458739100000000E+02, -0.121977375000000E+03),\n new google.maps.LatLng( 0.458748370000000E+02, -0.121978800000000E+03),\n new google.maps.LatLng( 0.458763330000000E+02, -0.121983564000000E+03),\n new google.maps.LatLng( 0.458807690000000E+02, -0.121980917000000E+03),\n new google.maps.LatLng( 0.458866690000000E+02, -0.121976077000000E+03),\n new google.maps.LatLng( 0.458913120000000E+02, -0.121967667000000E+03),\n new google.maps.LatLng( 0.458949010000000E+02, -0.121964886000000E+03),\n new google.maps.LatLng( 0.458964330000000E+02, -0.121964788000000E+03),\n new google.maps.LatLng( 0.459025580000000E+02, -0.121965479000000E+03),\n new google.maps.LatLng( 0.459107410000000E+02, -0.121968561000000E+03),\n new google.maps.LatLng( 0.459186240000000E+02, -0.121979668000000E+03),\n new google.maps.LatLng( 0.459219620000000E+02, -0.121980423000000E+03),\n new google.maps.LatLng( 0.459276080000000E+02, -0.121979379000000E+03),\n new google.maps.LatLng( 0.459302610000000E+02, -0.121977514000000E+03),\n new google.maps.LatLng( 0.459371880000000E+02, -0.121974046000000E+03),\n new google.maps.LatLng( 0.459378280000000E+02, -0.121974210000000E+03),\n new google.maps.LatLng( 0.459451180000000E+02, -0.121981883000000E+03),\n new google.maps.LatLng( 0.459470600000000E+02, -0.121983097000000E+03),\n new google.maps.LatLng( 0.459520410000000E+02, -0.121990212000000E+03),\n new google.maps.LatLng( 0.459523370000000E+02, -0.121993293000000E+03),\n new google.maps.LatLng( 0.459568140000000E+02, -0.122005653000000E+03),\n new google.maps.LatLng( 0.459578430000000E+02, -0.122006504000000E+03),\n new google.maps.LatLng( 0.459580030000000E+02, -0.122004668000000E+03),\n new google.maps.LatLng( 0.459587800000000E+02, -0.122004340000000E+03),\n new google.maps.LatLng( 0.459608390000000E+02, -0.122007484000000E+03),\n new google.maps.LatLng( 0.459617120000000E+02, -0.122020628000000E+03),\n new google.maps.LatLng( 0.459593160000000E+02, -0.122031773000000E+03),\n new google.maps.LatLng( 0.459551340000000E+02, -0.122040297000000E+03),\n new google.maps.LatLng( 0.459518660000000E+02, -0.122041871000000E+03),\n new google.maps.LatLng( 0.459509970000000E+02, -0.122041708000000E+03),\n new google.maps.LatLng( 0.459498080000000E+02, -0.122040201000000E+03),\n new google.maps.LatLng( 0.459470880000000E+02, -0.122040333000000E+03),\n new google.maps.LatLng( 0.459431340000000E+02, -0.122044857000000E+03),\n new google.maps.LatLng( 0.459391570000000E+02, -0.122046136000000E+03),\n new google.maps.LatLng( 0.459342650000000E+02, -0.122051839000000E+03),\n new google.maps.LatLng( 0.459330310000000E+02, -0.122054755000000E+03),\n new google.maps.LatLng( 0.459331000000000E+02, -0.122062322000000E+03),\n new google.maps.LatLng( 0.459327120000000E+02, -0.122063502000000E+03),\n new google.maps.LatLng( 0.459305860000000E+02, -0.122066188000000E+03),\n new google.maps.LatLng( 0.459297630000000E+02, -0.122065729000000E+03),\n new google.maps.LatLng( 0.459280940000000E+02, -0.122059931000000E+03),\n new google.maps.LatLng( 0.459262650000000E+02, -0.122058818000000E+03),\n new google.maps.LatLng( 0.459189500000000E+02, -0.122070085000000E+03),\n new google.maps.LatLng( 0.459179900000000E+02, -0.122070216000000E+03),\n new google.maps.LatLng( 0.459167330000000E+02, -0.122069299000000E+03),\n new google.maps.LatLng( 0.459186760000000E+02, -0.122069037000000E+03),\n new google.maps.LatLng( 0.459191790000000E+02, -0.122067924000000E+03),\n new google.maps.LatLng( 0.459186070000000E+02, -0.122062487000000E+03),\n new google.maps.LatLng( 0.459149510000000E+02, -0.122060948000000E+03),\n new google.maps.LatLng( 0.459145620000000E+02, -0.122061635000000E+03),\n new google.maps.LatLng( 0.459164590000000E+02, -0.122062389000000E+03),\n new google.maps.LatLng( 0.459158410000000E+02, -0.122063961000000E+03),\n new google.maps.LatLng( 0.459136930000000E+02, -0.122065336000000E+03),\n new google.maps.LatLng( 0.459039780000000E+02, -0.122068741000000E+03),\n new google.maps.LatLng( 0.459008000000000E+02, -0.122065172000000E+03),\n new google.maps.LatLng( 0.458934160000000E+02, -0.122067169000000E+03),\n new google.maps.LatLng( 0.458848430000000E+02, -0.122074402000000E+03),\n new google.maps.LatLng( 0.458836090000000E+02, -0.122078493000000E+03),\n new google.maps.LatLng( 0.458812760000000E+02, -0.122083566000000E+03),\n new google.maps.LatLng( 0.458808190000000E+02, -0.122083729000000E+03),\n new google.maps.LatLng( 0.458792870000000E+02, -0.122082518000000E+03),\n new google.maps.LatLng( 0.458782590000000E+02, -0.122082878000000E+03),\n new google.maps.LatLng( 0.458737300000000E+02, -0.122089975000000E+03),\n new google.maps.LatLng( 0.458679920000000E+02, -0.122091445000000E+03),\n new google.maps.LatLng( 0.458623230000000E+02, -0.122090265000000E+03),\n new google.maps.LatLng( 0.458548700000000E+02, -0.122091537000000E+03),\n new google.maps.LatLng( 0.458521730000000E+02, -0.122089541000000E+03),\n new google.maps.LatLng( 0.458471670000000E+02, -0.122087641000000E+03),\n new google.maps.LatLng( 0.458425490000000E+02, -0.122088457000000E+03),\n new google.maps.LatLng( 0.458406290000000E+02, -0.122090451000000E+03),\n new google.maps.LatLng( 0.458393710000000E+02, -0.122090385000000E+03),\n new google.maps.LatLng( 0.458351650000000E+02, -0.122088781000000E+03),\n new google.maps.LatLng( 0.458321030000000E+02, -0.122086556000000E+03),\n new google.maps.LatLng( 0.458305710000000E+02, -0.122083547000000E+03),\n new google.maps.LatLng( 0.458263430000000E+02, -0.122080733000000E+03),\n new google.maps.LatLng( 0.458177230000000E+02, -0.122089950000000E+03),\n new google.maps.LatLng( 0.458087140000000E+02, -0.122095928000000E+03),\n new google.maps.LatLng( 0.458095610000000E+02, -0.122090862000000E+03),\n new google.maps.LatLng( 0.458087630000000E+02, -0.122081577000000E+03),\n new google.maps.LatLng( 0.458077800000000E+02, -0.122079224000000E+03),\n new google.maps.LatLng( 0.458018610000000E+02, -0.122073012000000E+03),\n new google.maps.LatLng( 0.458016330000000E+02, -0.122064613000000E+03),\n new google.maps.LatLng( 0.457982040000000E+02, -0.122061508000000E+03),\n new google.maps.LatLng( 0.457972200000000E+02, -0.122055134000000E+03),\n new google.maps.LatLng( 0.457958940000000E+02, -0.122051899000000E+03),\n new google.maps.LatLng( 0.457930360000000E+02, -0.122047096000000E+03),\n new google.maps.LatLng( 0.457934010000000E+02, -0.122042325000000E+03),\n new google.maps.LatLng( 0.457941090000000E+02, -0.122039580000000E+03),\n new google.maps.LatLng( 0.457951600000000E+02, -0.122037847000000E+03),\n new google.maps.LatLng( 0.457959370000000E+02, -0.122037455000000E+03),\n new google.maps.LatLng( 0.457971710000000E+02, -0.122033336000000E+03),\n new google.maps.LatLng( 0.457972840000000E+02, -0.122029088000000E+03),\n new google.maps.LatLng( 0.457961840000000E+02, -0.122021408000000E+03),\n new google.maps.LatLng( 0.457941690000000E+02, -0.122013599000000E+03),\n new google.maps.LatLng( 0.457928160000000E+02, -0.122004679000000E+03),\n new google.maps.LatLng( 0.457935490000000E+02, -0.121996536000000E+03),\n new google.maps.LatLng( 0.457950140000000E+02, -0.121993399000000E+03),\n new google.maps.LatLng( 0.457963200000000E+02, -0.121986897000000E+03),\n new google.maps.LatLng( 0.457933500000000E+02, -0.121980228000000E+03),\n new google.maps.LatLng( 0.457880680000000E+02, -0.121974073000000E+03),\n new google.maps.LatLng( 0.457861560000000E+02, -0.121973809000000E+03),\n new google.maps.LatLng( 0.457839200000000E+02, -0.121966514000000E+03),\n new google.maps.LatLng( 0.457793460000000E+02, -0.121961054000000E+03),\n new google.maps.LatLng( 0.457768600000000E+02, -0.121959673000000E+03),\n new google.maps.LatLng( 0.457747550000000E+02, -0.121956400000000E+03),\n new google.maps.LatLng( 0.457757150000000E+02, -0.121949664000000E+03),\n new google.maps.LatLng( 0.457740930000000E+02, -0.121940377000000E+03),\n new google.maps.LatLng( 0.457717600000000E+02, -0.121935219000000E+03),\n new google.maps.LatLng( 0.457691390000000E+02, -0.121932518000000E+03),\n new google.maps.LatLng( 0.457673280000000E+02, -0.121927308000000E+03),\n new google.maps.LatLng( 0.457658680000000E+02, -0.121920297000000E+03),\n new google.maps.LatLng( 0.457672800000000E+02, -0.121908132000000E+03),\n new google.maps.LatLng( 0.457659200000000E+02, -0.121899078000000E+03),\n new google.maps.LatLng( 0.457642030000000E+02, -0.121894633000000E+03),\n new google.maps.LatLng( 0.457635400000000E+02, -0.121893817000000E+03),\n new google.maps.LatLng( 0.457621910000000E+02, -0.121893654000000E+03),\n new google.maps.LatLng( 0.457589420000000E+02, -0.121886668000000E+03),\n new google.maps.LatLng( 0.457524930000000E+02, -0.121880273000000E+03),\n new google.maps.LatLng( 0.457503440000000E+02, -0.121874522000000E+03),\n new google.maps.LatLng( 0.457502040000000E+02, -0.121871877000000E+03),\n new google.maps.LatLng( 0.457461400000000E+02, -0.121866581000000E+03),\n new google.maps.LatLng( 0.457434230000000E+02, -0.121858056000000E+03),\n new google.maps.LatLng( 0.457400870000000E+02, -0.121853973000000E+03),\n new google.maps.LatLng( 0.457366350000000E+02, -0.121852045000000E+03),\n new google.maps.LatLng( 0.457346240000000E+02, -0.121851913000000E+03),\n new google.maps.LatLng( 0.457295910000000E+02, -0.121861278000000E+03),\n new google.maps.LatLng( 0.457298540000000E+02, -0.121864501000000E+03),\n new google.maps.LatLng( 0.457233050000000E+02, -0.121861436000000E+03),\n new google.maps.LatLng( 0.457213170000000E+02, -0.121859444000000E+03),\n new google.maps.LatLng( 0.457186760000000E+02, -0.121854427000000E+03),\n new google.maps.LatLng( 0.457186760000000E+02, -0.121854427000000E+03),\n new google.maps.LatLng( 0.457169070000000E+02, -0.121854806000000E+03),\n new google.maps.LatLng( 0.457154630000000E+02, -0.121862572000000E+03),\n new google.maps.LatLng( 0.457219090000000E+02, -0.121865449000000E+03),\n new google.maps.LatLng( 0.457240090000000E+02, -0.121870347000000E+03),\n new google.maps.LatLng( 0.457268420000000E+02, -0.121874462000000E+03),\n new google.maps.LatLng( 0.457322130000000E+02, -0.121877681000000E+03),\n new google.maps.LatLng( 0.457371510000000E+02, -0.121878231000000E+03),\n new google.maps.LatLng( 0.457385680000000E+02, -0.121877968000000E+03),\n new google.maps.LatLng( 0.457387770000000E+02, -0.121884040000000E+03),\n new google.maps.LatLng( 0.457375920000000E+02, -0.121891289000000E+03),\n new google.maps.LatLng( 0.457387350000000E+02, -0.121893475000000E+03),\n new google.maps.LatLng( 0.457405640000000E+02, -0.121891744000000E+03),\n new google.maps.LatLng( 0.457422090000000E+02, -0.121891709000000E+03),\n new google.maps.LatLng( 0.457417100000000E+02, -0.121899480000000E+03),\n new google.maps.LatLng( 0.457420540000000E+02, -0.121903463000000E+03),\n new google.maps.LatLng( 0.457428540000000E+02, -0.121904736000000E+03),\n new google.maps.LatLng( 0.457510600000000E+02, -0.121898745000000E+03),\n new google.maps.LatLng( 0.457548020000000E+02, -0.121902090000000E+03),\n new google.maps.LatLng( 0.457565480000000E+02, -0.121904344000000E+03),\n new google.maps.LatLng( 0.457525490000000E+02, -0.121908454000000E+03),\n new google.maps.LatLng( 0.457502550000000E+02, -0.121912864000000E+03),\n new google.maps.LatLng( 0.457434300000000E+02, -0.121922236000000E+03),\n new google.maps.LatLng( 0.457371440000000E+02, -0.121925339000000E+03),\n new google.maps.LatLng( 0.457341260000000E+02, -0.121923512000000E+03),\n new google.maps.LatLng( 0.457322970000000E+02, -0.121921782000000E+03),\n new google.maps.LatLng( 0.457265130000000E+02, -0.121919598000000E+03),\n new google.maps.LatLng( 0.457237240000000E+02, -0.121920251000000E+03),\n new google.maps.LatLng( 0.457197700000000E+02, -0.121922896000000E+03),\n new google.maps.LatLng( 0.457146950000000E+02, -0.121920711000000E+03),\n new google.maps.LatLng( 0.457067830000000E+02, -0.121913111000000E+03),\n new google.maps.LatLng( 0.457050690000000E+02, -0.121912264000000E+03),\n new google.maps.LatLng( 0.457038800000000E+02, -0.121912264000000E+03),\n new google.maps.LatLng( 0.457017310000000E+02, -0.121910471000000E+03),\n new google.maps.LatLng( 0.456995350000000E+02, -0.121906035000000E+03),\n new google.maps.LatLng( 0.456984470000000E+02, -0.121905436000000E+03),\n new google.maps.LatLng( 0.456958320000000E+02, -0.121908321000000E+03),\n new google.maps.LatLng( 0.456959700000000E+02, -0.121910115000000E+03),\n new google.maps.LatLng( 0.456976160000000E+02, -0.121912855000000E+03),\n new google.maps.LatLng( 0.456986220000000E+02, -0.121913506000000E+03),\n new google.maps.LatLng( 0.457000620000000E+02, -0.121913245000000E+03),\n new google.maps.LatLng( 0.457024860000000E+02, -0.121914483000000E+03),\n new google.maps.LatLng( 0.457054370000000E+02, -0.121923455000000E+03),\n new google.maps.LatLng( 0.457072890000000E+02, -0.121925804000000E+03),\n new google.maps.LatLng( 0.457072890000000E+02, -0.121925804000000E+03),\n new google.maps.LatLng( 0.457100320000000E+02, -0.121927011000000E+03),\n new google.maps.LatLng( 0.457129360000000E+02, -0.121929914000000E+03),\n new google.maps.LatLng( 0.457138040000000E+02, -0.121931252000000E+03),\n new google.maps.LatLng( 0.457142160000000E+02, -0.121934156000000E+03),\n new google.maps.LatLng( 0.457159990000000E+02, -0.121936538000000E+03),\n new google.maps.LatLng( 0.457185820000000E+02, -0.121938463000000E+03),\n new google.maps.LatLng( 0.457201830000000E+02, -0.121940421000000E+03),\n new google.maps.LatLng( 0.457217370000000E+02, -0.121949364000000E+03),\n new google.maps.LatLng( 0.457188100000000E+02, -0.121953345000000E+03),\n new google.maps.LatLng( 0.457187100000000E+02, -0.121954202000000E+03),\n new google.maps.LatLng( 0.457222150000000E+02, -0.121961212000000E+03),\n new google.maps.LatLng( 0.457253920000000E+02, -0.121964574000000E+03),\n new google.maps.LatLng( 0.457244310000000E+02, -0.121968262000000E+03),\n new google.maps.LatLng( 0.457232420000000E+02, -0.121970709000000E+03),\n new google.maps.LatLng( 0.457237900000000E+02, -0.121973843000000E+03),\n new google.maps.LatLng( 0.457256410000000E+02, -0.121976455000000E+03),\n new google.maps.LatLng( 0.457270350000000E+02, -0.121976423000000E+03),\n new google.maps.LatLng( 0.457281550000000E+02, -0.121975804000000E+03),\n new google.maps.LatLng( 0.457296640000000E+02, -0.121976980000000E+03),\n new google.maps.LatLng( 0.457295480000000E+02, -0.121982073000000E+03),\n new google.maps.LatLng( 0.457268250000000E+02, -0.121987587000000E+03),\n new google.maps.LatLng( 0.457262310000000E+02, -0.121988011000000E+03),\n new google.maps.LatLng( 0.457215910000000E+02, -0.121986342000000E+03),\n new google.maps.LatLng( 0.457196490000000E+02, -0.121984154000000E+03),\n new google.maps.LatLng( 0.457183460000000E+02, -0.121983957000000E+03),\n new google.maps.LatLng( 0.457167860000000E+02, -0.121995051000000E+03),\n new google.maps.LatLng( 0.457146140000000E+02, -0.121997007000000E+03),\n new google.maps.LatLng( 0.457130590000000E+02, -0.121997397000000E+03),\n new google.maps.LatLng( 0.457113910000000E+02, -0.121996351000000E+03),\n new google.maps.LatLng( 0.457102260000000E+02, -0.121994490000000E+03),\n new google.maps.LatLng( 0.457088090000000E+02, -0.121993706000000E+03),\n new google.maps.LatLng( 0.457020460000000E+02, -0.121992166000000E+03),\n new google.maps.LatLng( 0.456961330000000E+02, -0.122001194000000E+03),\n new google.maps.LatLng( 0.456928820000000E+02, -0.122008907000000E+03),\n new google.maps.LatLng( 0.456915250000000E+02, -0.122008340000000E+03),\n new google.maps.LatLng( 0.456899000000000E+02, -0.122005406000000E+03),\n new google.maps.LatLng( 0.456884430000000E+02, -0.122004020000000E+03),\n new google.maps.LatLng( 0.456854640000000E+02, -0.122002801000000E+03),\n new google.maps.LatLng( 0.456838410000000E+02, -0.122003031000000E+03),\n new google.maps.LatLng( 0.456800910000000E+02, -0.122001615000000E+03),\n new google.maps.LatLng( 0.456734250000000E+02, -0.121997625000000E+03),\n new google.maps.LatLng( 0.456734180000000E+02, -0.121992401000000E+03),\n new google.maps.LatLng( 0.456804750000000E+02, -0.121992682000000E+03),\n new google.maps.LatLng( 0.456807510000000E+02, -0.121981310000000E+03),\n new google.maps.LatLng( 0.456733970000000E+02, -0.121981651000000E+03),\n new google.maps.LatLng( 0.456733230000000E+02, -0.121987039000000E+03),\n new google.maps.LatLng( 0.456694330000000E+02, -0.121987058000000E+03),\n new google.maps.LatLng( 0.456693670000000E+02, -0.121992203000000E+03),\n new google.maps.LatLng( 0.456660800000000E+02, -0.121992074000000E+03),\n new google.maps.LatLng( 0.456662420000000E+02, -0.121987264000000E+03),\n new google.maps.LatLng( 0.456549740000000E+02, -0.121987270000000E+03),\n new google.maps.LatLng( 0.456550190000000E+02, -0.121992057000000E+03),\n new google.maps.LatLng( 0.456624560000000E+02, -0.121992200000000E+03),\n new google.maps.LatLng( 0.456624140000000E+02, -0.121997573000000E+03),\n new google.maps.LatLng( 0.456548910000000E+02, -0.121997489000000E+03),\n new google.maps.LatLng( 0.456548530000000E+02, -0.122003523000000E+03),\n new google.maps.LatLng( 0.456512480000000E+02, -0.122003354000000E+03),\n new google.maps.LatLng( 0.456512920000000E+02, -0.121992101000000E+03),\n new google.maps.LatLng( 0.456474340000000E+02, -0.121992065000000E+03),\n new google.maps.LatLng( 0.456474870000000E+02, -0.122002925000000E+03),\n new google.maps.LatLng( 0.456367980000000E+02, -0.122002427000000E+03),\n new google.maps.LatLng( 0.456364980000000E+02, -0.122006817000000E+03),\n new google.maps.LatLng( 0.456364980000000E+02, -0.122006817000000E+03),\n new google.maps.LatLng( 0.456351520000000E+02, -0.122006996000000E+03),\n new google.maps.LatLng( 0.456319120000000E+02, -0.122008752000000E+03),\n new google.maps.LatLng( 0.456312790000000E+02, -0.122011271000000E+03),\n new google.maps.LatLng( 0.456314550000000E+02, -0.122011781000000E+03),\n new google.maps.LatLng( 0.456319070000000E+02, -0.122009609000000E+03),\n new google.maps.LatLng( 0.456338930000000E+02, -0.122009456000000E+03),\n new google.maps.LatLng( 0.456364800000000E+02, -0.122015483000000E+03),\n new google.maps.LatLng( 0.456364760000000E+02, -0.122023153000000E+03),\n new google.maps.LatLng( 0.456403540000000E+02, -0.122023169000000E+03),\n new google.maps.LatLng( 0.456402660000000E+02, -0.122014473000000E+03),\n new google.maps.LatLng( 0.456477720000000E+02, -0.122012197000000E+03),\n new google.maps.LatLng( 0.456486640000000E+02, -0.122012718000000E+03),\n new google.maps.LatLng( 0.456499220000000E+02, -0.122014705000000E+03),\n new google.maps.LatLng( 0.456579710000000E+02, -0.122018381000000E+03),\n new google.maps.LatLng( 0.456665200000000E+02, -0.122020298000000E+03),\n new google.maps.LatLng( 0.456680290000000E+02, -0.122020166000000E+03),\n new google.maps.LatLng( 0.456707960000000E+02, -0.122021307000000E+03),\n new google.maps.LatLng( 0.456750950000000E+02, -0.122024336000000E+03),\n new google.maps.LatLng( 0.456751180000000E+02, -0.122026260000000E+03),\n new google.maps.LatLng( 0.456778860000000E+02, -0.122030530000000E+03),\n new google.maps.LatLng( 0.456799660000000E+02, -0.122030659000000E+03),\n new google.maps.LatLng( 0.456824580000000E+02, -0.122029157000000E+03),\n new google.maps.LatLng( 0.456837380000000E+02, -0.122029972000000E+03),\n new google.maps.LatLng( 0.456851210000000E+02, -0.122031801000000E+03),\n new google.maps.LatLng( 0.456847130000000E+02, -0.122035542000000E+03),\n new google.maps.LatLng( 0.456815460000000E+02, -0.122038192000000E+03),\n new google.maps.LatLng( 0.456753960000000E+02, -0.122038293000000E+03),\n new google.maps.LatLng( 0.456734750000000E+02, -0.122033957000000E+03),\n new google.maps.LatLng( 0.456672100000000E+02, -0.122032591000000E+03),\n new google.maps.LatLng( 0.456673940000000E+02, -0.122036144000000E+03),\n new google.maps.LatLng( 0.456660460000000E+02, -0.122038558000000E+03),\n new google.maps.LatLng( 0.456610410000000E+02, -0.122041462000000E+03),\n new google.maps.LatLng( 0.456583660000000E+02, -0.122040713000000E+03),\n new google.maps.LatLng( 0.456558290000000E+02, -0.122041692000000E+03),\n new google.maps.LatLng( 0.456554790000000E+02, -0.122042572000000E+03),\n new google.maps.LatLng( 0.456562640000000E+02, -0.122044104000000E+03),\n new google.maps.LatLng( 0.456571100000000E+02, -0.122044462000000E+03),\n new google.maps.LatLng( 0.456583670000000E+02, -0.122044103000000E+03),\n new google.maps.LatLng( 0.456627090000000E+02, -0.122044297000000E+03),\n new google.maps.LatLng( 0.456655450000000E+02, -0.122046905000000E+03),\n new google.maps.LatLng( 0.456658200000000E+02, -0.122054403000000E+03),\n new google.maps.LatLng( 0.456680830000000E+02, -0.122057697000000E+03),\n new google.maps.LatLng( 0.456698440000000E+02, -0.122061805000000E+03),\n new google.maps.LatLng( 0.456659350000000E+02, -0.122067250000000E+03),\n new google.maps.LatLng( 0.456654090000000E+02, -0.122070087000000E+03),\n new google.maps.LatLng( 0.456659570000000E+02, -0.122072206000000E+03),\n new google.maps.LatLng( 0.456668260000000E+02, -0.122072304000000E+03),\n new google.maps.LatLng( 0.456674660000000E+02, -0.122073902000000E+03),\n new google.maps.LatLng( 0.456678310000000E+02, -0.122075989000000E+03),\n new google.maps.LatLng( 0.456672070000000E+02, -0.122079842000000E+03),\n new google.maps.LatLng( 0.456640450000000E+02, -0.122082609000000E+03),\n new google.maps.LatLng( 0.456630150000000E+02, -0.122082758000000E+03),\n new google.maps.LatLng( 0.456617920000000E+02, -0.122082209000000E+03),\n new google.maps.LatLng( 0.456569280000000E+02, -0.122084167000000E+03),\n new google.maps.LatLng( 0.456537610000000E+02, -0.122086914000000E+03),\n new google.maps.LatLng( 0.456518720000000E+02, -0.122089386000000E+03),\n new google.maps.LatLng( 0.456513490000000E+02, -0.122091758000000E+03),\n new google.maps.LatLng( 0.456513490000000E+02, -0.122091758000000E+03),\n new google.maps.LatLng( 0.456516900000000E+02, -0.122093328000000E+03),\n new google.maps.LatLng( 0.456568330000000E+02, -0.122093884000000E+03),\n new google.maps.LatLng( 0.456574340000000E+02, -0.122095886000000E+03),\n new google.maps.LatLng( 0.456586350000000E+02, -0.122114935000000E+03),\n new google.maps.LatLng( 0.456583600000000E+02, -0.122139667000000E+03),\n new google.maps.LatLng( 0.456604600000000E+02, -0.122140579000000E+03),\n new google.maps.LatLng( 0.456632490000000E+02, -0.122139240000000E+03),\n new google.maps.LatLng( 0.456657870000000E+02, -0.122140868000000E+03),\n new google.maps.LatLng( 0.456653530000000E+02, -0.122142726000000E+03),\n new google.maps.LatLng( 0.456654470000000E+02, -0.122148954000000E+03),\n new google.maps.LatLng( 0.456674150000000E+02, -0.122154528000000E+03),\n new google.maps.LatLng( 0.456687320000000E+02, -0.122156449000000E+03),\n new google.maps.LatLng( 0.456725630000000E+02, -0.122153771000000E+03),\n new google.maps.LatLng( 0.456720410000000E+02, -0.122158300000000E+03),\n new google.maps.LatLng( 0.456672800000000E+02, -0.122162354000000E+03),\n new google.maps.LatLng( 0.456643770000000E+02, -0.122165975000000E+03),\n new google.maps.LatLng( 0.456622520000000E+02, -0.122169334000000E+03),\n new google.maps.LatLng( 0.456626410000000E+02, -0.122171029000000E+03),\n new google.maps.LatLng( 0.456659570000000E+02, -0.122179701000000E+03),\n new google.maps.LatLng( 0.456675110000000E+02, -0.122179896000000E+03),\n new google.maps.LatLng( 0.456686090000000E+02, -0.122179211000000E+03),\n new google.maps.LatLng( 0.456709510000000E+02, -0.122177163000000E+03),\n new google.maps.LatLng( 0.456725210000000E+02, -0.122174708000000E+03),\n new google.maps.LatLng( 0.456773640000000E+02, -0.122176764000000E+03),\n new google.maps.LatLng( 0.456786680000000E+02, -0.122179046000000E+03),\n new google.maps.LatLng( 0.456758790000000E+02, -0.122184199000000E+03),\n new google.maps.LatLng( 0.456756270000000E+02, -0.122193722000000E+03),\n new google.maps.LatLng( 0.456760380000000E+02, -0.122202006000000E+03),\n new google.maps.LatLng( 0.456752840000000E+02, -0.122203766000000E+03),\n new google.maps.LatLng( 0.456739120000000E+02, -0.122204744000000E+03),\n new google.maps.LatLng( 0.456709610000000E+02, -0.122214298000000E+03),\n new google.maps.LatLng( 0.456671880000000E+02, -0.122218926000000E+03),\n new google.maps.LatLng( 0.456647650000000E+02, -0.122217457000000E+03),\n new google.maps.LatLng( 0.456619300000000E+02, -0.122216967000000E+03),\n new google.maps.LatLng( 0.456587060000000E+02, -0.122217943000000E+03),\n new google.maps.LatLng( 0.456573600000000E+02, -0.122219014000000E+03),\n new google.maps.LatLng( 0.456580470000000E+02, -0.122221715000000E+03),\n new google.maps.LatLng( 0.456607680000000E+02, -0.122225392000000E+03),\n new google.maps.LatLng( 0.456620820000000E+02, -0.122231863000000E+03),\n new google.maps.LatLng( 0.456660600000000E+02, -0.122241163000000E+03),\n new google.maps.LatLng( 0.456672700000000E+02, -0.122243022000000E+03),\n new google.maps.LatLng( 0.456734400000000E+02, -0.122249615000000E+03),\n new google.maps.LatLng( 0.456619580000000E+02, -0.122249608000000E+03),\n new google.maps.LatLng( 0.456593010000000E+02, -0.122249485000000E+03),\n new google.maps.LatLng( 0.456590830000000E+02, -0.122249502000000E+03),\n new google.maps.LatLng( 0.456645680000000E+02, -0.122252438000000E+03),\n new google.maps.LatLng( 0.456662880000000E+02, -0.122261761000000E+03),\n new google.maps.LatLng( 0.456681860000000E+02, -0.122263684000000E+03),\n new google.maps.LatLng( 0.456689440000000E+02, -0.122271150000000E+03),\n new google.maps.LatLng( 0.456705900000000E+02, -0.122271280000000E+03),\n new google.maps.LatLng( 0.456703630000000E+02, -0.122277051000000E+03),\n new google.maps.LatLng( 0.456697240000000E+02, -0.122279563000000E+03),\n new google.maps.LatLng( 0.456662960000000E+02, -0.122284227000000E+03),\n new google.maps.LatLng( 0.456625740000000E+02, -0.122290968000000E+03),\n new google.maps.LatLng( 0.456625740000000E+02, -0.122290968000000E+03),\n new google.maps.LatLng( 0.456603780000000E+02, -0.122295934000000E+03),\n new google.maps.LatLng( 0.456606530000000E+02, -0.122296847000000E+03),\n new google.maps.LatLng( 0.456625730000000E+02, -0.122298346000000E+03),\n new google.maps.LatLng( 0.456657740000000E+02, -0.122298019000000E+03),\n new google.maps.LatLng( 0.456680820000000E+02, -0.122296519000000E+03),\n new google.maps.LatLng( 0.456701620000000E+02, -0.122298312000000E+03),\n new google.maps.LatLng( 0.456694540000000E+02, -0.122302486000000E+03),\n new google.maps.LatLng( 0.456681290000000E+02, -0.122305681000000E+03),\n new google.maps.LatLng( 0.456655690000000E+02, -0.122309920000000E+03),\n new google.maps.LatLng( 0.456642930000000E+02, -0.122309410000000E+03),\n new google.maps.LatLng( 0.456644530000000E+02, -0.122313164000000E+03),\n new google.maps.LatLng( 0.456671920000000E+02, -0.122319800000000E+03),\n new google.maps.LatLng( 0.456687700000000E+02, -0.122321724000000E+03),\n new google.maps.LatLng( 0.456700730000000E+02, -0.122322474000000E+03),\n new google.maps.LatLng( 0.456711240000000E+02, -0.122316409000000E+03),\n new google.maps.LatLng( 0.456735240000000E+02, -0.122311811000000E+03),\n new google.maps.LatLng( 0.456761300000000E+02, -0.122310474000000E+03),\n new google.maps.LatLng( 0.456788280000000E+02, -0.122307408000000E+03),\n new google.maps.LatLng( 0.456816390000000E+02, -0.122301896000000E+03),\n new google.maps.LatLng( 0.456873530000000E+02, -0.122293969000000E+03),\n new google.maps.LatLng( 0.456916730000000E+02, -0.122286562000000E+03),\n new google.maps.LatLng( 0.456973640000000E+02, -0.122281829000000E+03),\n new google.maps.LatLng( 0.456987360000000E+02, -0.122284536000000E+03),\n new google.maps.LatLng( 0.456991030000000E+02, -0.122290180000000E+03),\n new google.maps.LatLng( 0.457008190000000E+02, -0.122297650000000E+03),\n new google.maps.LatLng( 0.457022370000000E+02, -0.122300749000000E+03),\n new google.maps.LatLng( 0.457055750000000E+02, -0.122302249000000E+03),\n new google.maps.LatLng( 0.457071530000000E+02, -0.122302119000000E+03),\n new google.maps.LatLng( 0.457095300000000E+02, -0.122299181000000E+03),\n new google.maps.LatLng( 0.457134160000000E+02, -0.122304304000000E+03),\n new google.maps.LatLng( 0.457192690000000E+02, -0.122314812000000E+03),\n new google.maps.LatLng( 0.457190860000000E+02, -0.122315661000000E+03),\n new google.maps.LatLng( 0.457158860000000E+02, -0.122319185000000E+03),\n new google.maps.LatLng( 0.457122280000000E+02, -0.122325679000000E+03),\n new google.maps.LatLng( 0.457109930000000E+02, -0.122332760000000E+03),\n new google.maps.LatLng( 0.457113350000000E+02, -0.122336969000000E+03),\n new google.maps.LatLng( 0.457113350000000E+02, -0.122336969000000E+03),\n new google.maps.LatLng( 0.457164080000000E+02, -0.122346794000000E+03),\n new google.maps.LatLng( 0.457176180000000E+02, -0.122351135000000E+03),\n new google.maps.LatLng( 0.457198350000000E+02, -0.122353976000000E+03),\n new google.maps.LatLng( 0.457212750000000E+02, -0.122354271000000E+03),\n new google.maps.LatLng( 0.457225770000000E+02, -0.122356786000000E+03),\n new google.maps.LatLng( 0.457225770000000E+02, -0.122356786000000E+03),\n new google.maps.LatLng( 0.457229670000000E+02, -0.122353228000000E+03),\n new google.maps.LatLng( 0.457248190000000E+02, -0.122351956000000E+03),\n new google.maps.LatLng( 0.457285230000000E+02, -0.122351503000000E+03),\n new google.maps.LatLng( 0.457319880000000E+02, -0.122349117000000E+03),\n new google.maps.LatLng( 0.457326840000000E+02, -0.122347620000000E+03),\n new google.maps.LatLng( 0.457306730000000E+02, -0.122345399000000E+03),\n new google.maps.LatLng( 0.457308070000000E+02, -0.122344036000000E+03),\n new google.maps.LatLng( 0.457308070000000E+02, -0.122344036000000E+03),\n new google.maps.LatLng( 0.457295530000000E+02, -0.122343309000000E+03),\n new google.maps.LatLng( 0.457248670000000E+02, -0.122343796000000E+03),\n new google.maps.LatLng( 0.457237020000000E+02, -0.122342555000000E+03),\n new google.maps.LatLng( 0.457227200000000E+02, -0.122337463000000E+03),\n new google.maps.LatLng( 0.457223770000000E+02, -0.122327378000000E+03),\n new google.maps.LatLng( 0.457212340000000E+02, -0.122325126000000E+03),\n new google.maps.LatLng( 0.457206860000000E+02, -0.122322547000000E+03),\n new google.maps.LatLng( 0.457254410000000E+02, -0.122322483000000E+03),\n new google.maps.LatLng( 0.457272700000000E+02, -0.122323821000000E+03),\n new google.maps.LatLng( 0.457307680000000E+02, -0.122323593000000E+03),\n new google.maps.LatLng( 0.457311340000000E+02, -0.122322973000000E+03),\n new google.maps.LatLng( 0.457308590000000E+02, -0.122322092000000E+03),\n new google.maps.LatLng( 0.457287110000000E+02, -0.122318207000000E+03),\n new google.maps.LatLng( 0.457255100000000E+02, -0.122311842000000E+03),\n new google.maps.LatLng( 0.457252130000000E+02, -0.122310308000000E+03),\n new google.maps.LatLng( 0.457267210000000E+02, -0.122307762000000E+03),\n new google.maps.LatLng( 0.457291670000000E+02, -0.122305836000000E+03),\n new google.maps.LatLng( 0.457304930000000E+02, -0.122305640000000E+03),\n new google.maps.LatLng( 0.457322540000000E+02, -0.122303452000000E+03),\n new google.maps.LatLng( 0.457297610000000E+02, -0.122300057000000E+03),\n new google.maps.LatLng( 0.457280690000000E+02, -0.122298132000000E+03),\n new google.maps.LatLng( 0.457224680000000E+02, -0.122296403000000E+03),\n new google.maps.LatLng( 0.457185130000000E+02, -0.122296927000000E+03),\n new google.maps.LatLng( 0.457106480000000E+02, -0.122294352000000E+03),\n new google.maps.LatLng( 0.456998310000000E+02, -0.122276869000000E+03),\n new google.maps.LatLng( 0.456959900000000E+02, -0.122276153000000E+03),\n new google.maps.LatLng( 0.456943670000000E+02, -0.122274556000000E+03),\n new google.maps.LatLng( 0.456940690000000E+02, -0.122273741000000E+03),\n new google.maps.LatLng( 0.456946180000000E+02, -0.122272957000000E+03),\n new google.maps.LatLng( 0.457016800000000E+02, -0.122268483000000E+03),\n new google.maps.LatLng( 0.457068250000000E+02, -0.122274743000000E+03),\n new google.maps.LatLng( 0.457097090000000E+02, -0.122285052000000E+03),\n new google.maps.LatLng( 0.457158350000000E+02, -0.122281296000000E+03),\n new google.maps.LatLng( 0.457164960000000E+02, -0.122276759000000E+03),\n new google.maps.LatLng( 0.457173870000000E+02, -0.122274344000000E+03),\n new google.maps.LatLng( 0.457194210000000E+02, -0.122271242000000E+03),\n new google.maps.LatLng( 0.457222780000000E+02, -0.122269738000000E+03),\n new google.maps.LatLng( 0.457249540000000E+02, -0.122273816000000E+03),\n new google.maps.LatLng( 0.457298250000000E+02, -0.122278154000000E+03),\n new google.maps.LatLng( 0.457279960000000E+02, -0.122279624000000E+03),\n new google.maps.LatLng( 0.457285000000000E+02, -0.122281811000000E+03),\n new google.maps.LatLng( 0.457322050000000E+02, -0.122286020000000E+03),\n new google.maps.LatLng( 0.457347430000000E+02, -0.122287455000000E+03),\n new google.maps.LatLng( 0.457379670000000E+02, -0.122291305000000E+03),\n new google.maps.LatLng( 0.457422660000000E+02, -0.122300414000000E+03),\n new google.maps.LatLng( 0.457484170000000E+02, -0.122310012000000E+03),\n new google.maps.LatLng( 0.457541190000000E+02, -0.122312570000000E+03),\n new google.maps.LatLng( 0.457619450000000E+02, -0.122319060000000E+03),\n new google.maps.LatLng( 0.457674550000000E+02, -0.122322654000000E+03),\n new google.maps.LatLng( 0.457699000000000E+02, -0.122323242000000E+03),\n new google.maps.LatLng( 0.457717290000000E+02, -0.122317460000000E+03),\n new google.maps.LatLng( 0.457725290000000E+02, -0.122311776000000E+03),\n new google.maps.LatLng( 0.457736950000000E+02, -0.122308999000000E+03),\n new google.maps.LatLng( 0.457751350000000E+02, -0.122307856000000E+03),\n new google.maps.LatLng( 0.457758570000000E+02, -0.122306134000000E+03),\n new google.maps.LatLng( 0.457716830000000E+02, -0.122301192000000E+03),\n new google.maps.LatLng( 0.457729400000000E+02, -0.122300147000000E+03),\n new google.maps.LatLng( 0.457794320000000E+02, -0.122299818000000E+03),\n new google.maps.LatLng( 0.457880970000000E+02, -0.122300829000000E+03),\n new google.maps.LatLng( 0.457919610000000E+02, -0.122302821000000E+03),\n new google.maps.LatLng( 0.457925320000000E+02, -0.122303671000000E+03),\n new google.maps.LatLng( 0.457958700000000E+02, -0.122315731000000E+03),\n new google.maps.LatLng( 0.457979281995117E+02, -0.122308991264844E+03),\n new google.maps.LatLng( 0.458001910000000E+02, -0.122304847000000E+03),\n new google.maps.LatLng( 0.458015630000000E+02, -0.122305939000000E+03),\n new google.maps.LatLng( 0.458050600000000E+02, -0.122301346000000E+03),\n new google.maps.LatLng( 0.458045560000000E+02, -0.122296609000000E+03),\n new google.maps.LatLng( 0.458022460000000E+02, -0.122288830000000E+03),\n new google.maps.LatLng( 0.457970080000000E+02, -0.122277688000000E+03),\n new google.maps.LatLng( 0.457978060000000E+02, -0.122273570000000E+03),\n new google.maps.LatLng( 0.457977810000000E+02, -0.122267197000000E+03),\n new google.maps.LatLng( 0.457937990000000E+02, -0.122260470000000E+03),\n new google.maps.LatLng( 0.457930730000000E+02, -0.122253316000000E+03),\n new google.maps.LatLng( 0.457983580000000E+02, -0.122249539000000E+03),\n new google.maps.LatLng( 0.458175100000000E+02, -0.122249710000000E+03),\n new google.maps.LatLng( 0.458192170000000E+02, -0.122249835000000E+03),\n new google.maps.LatLng( 0.458195410000000E+02, -0.122249858000000E+03),\n new google.maps.LatLng( 0.458494980000000E+02, -0.122249403000000E+03),\n new google.maps.LatLng( 0.458501250000000E+02, -0.122250714000000E+03),\n new google.maps.LatLng( 0.458519530000000E+02, -0.122251808000000E+03),\n new google.maps.LatLng( 0.458533930000000E+02, -0.122251774000000E+03),\n new google.maps.LatLng( 0.458559790000000E+02, -0.122257824000000E+03),\n new google.maps.LatLng( 0.458552720000000E+02, -0.122259624000000E+03),\n new google.maps.LatLng( 0.458520260000000E+02, -0.122259921000000E+03),\n new google.maps.LatLng( 0.458510420000000E+02, -0.122259006000000E+03),\n new google.maps.LatLng( 0.458501970000000E+02, -0.122259629000000E+03),\n new google.maps.LatLng( 0.458498090000000E+02, -0.122261101000000E+03),\n new google.maps.LatLng( 0.458504070000000E+02, -0.122269050000000E+03),\n new google.maps.LatLng( 0.458518700000000E+02, -0.122269997000000E+03),\n new google.maps.LatLng( 0.458526470000000E+02, -0.122269964000000E+03),\n new google.maps.LatLng( 0.458544760000000E+02, -0.122268523000000E+03),\n new google.maps.LatLng( 0.458553900000000E+02, -0.122268653000000E+03),\n new google.maps.LatLng( 0.458562820000000E+02, -0.122270387000000E+03),\n new google.maps.LatLng( 0.458576790000000E+02, -0.122275752000000E+03),\n new google.maps.LatLng( 0.458542960000000E+02, -0.122278240000000E+03),\n new google.maps.LatLng( 0.458530390000000E+02, -0.122278405000000E+03),\n new google.maps.LatLng( 0.458465680000000E+02, -0.122273861000000E+03),\n new google.maps.LatLng( 0.458441870000000E+02, -0.122265849000000E+03),\n new google.maps.LatLng( 0.458406180000000E+02, -0.122259409000000E+03),\n new google.maps.LatLng( 0.458391880000000E+02, -0.122258417000000E+03),\n new google.maps.LatLng( 0.458326600000000E+02, -0.122255100000000E+03),\n new google.maps.LatLng( 0.458303750000000E+02, -0.122256149000000E+03),\n new google.maps.LatLng( 0.458281120000000E+02, -0.122258015000000E+03),\n new google.maps.LatLng( 0.458258270000000E+02, -0.122258835000000E+03),\n new google.maps.LatLng( 0.458224890000000E+02, -0.122258610000000E+03),\n new google.maps.LatLng( 0.458208660000000E+02, -0.122259363000000E+03),\n new google.maps.LatLng( 0.458197220000000E+02, -0.122261114000000E+03),\n new google.maps.LatLng( 0.458207320000000E+02, -0.122266938000000E+03),\n new google.maps.LatLng( 0.458241380000000E+02, -0.122265736000000E+03),\n new google.maps.LatLng( 0.458293730000000E+02, -0.122265797000000E+03),\n new google.maps.LatLng( 0.458216730000000E+02, -0.122277247000000E+03),\n new google.maps.LatLng( 0.458216510000000E+02, -0.122279340000000E+03),\n new google.maps.LatLng( 0.458230240000000E+02, -0.122284897000000E+03),\n new google.maps.LatLng( 0.458236430000000E+02, -0.122291143000000E+03),\n new google.maps.LatLng( 0.458234380000000E+02, -0.122296767000000E+03),\n new google.maps.LatLng( 0.458225250000000E+02, -0.122303143000000E+03),\n new google.maps.LatLng( 0.458205370000000E+02, -0.122311088000000E+03),\n new google.maps.LatLng( 0.458185030000000E+02, -0.122314881000000E+03),\n new google.maps.LatLng( 0.458171770000000E+02, -0.122315077000000E+03),\n new google.maps.LatLng( 0.458168570000000E+02, -0.122317627000000E+03),\n new google.maps.LatLng( 0.458186620000000E+02, -0.122325572000000E+03),\n new google.maps.LatLng( 0.458208340000000E+02, -0.122327730000000E+03),\n new google.maps.LatLng( 0.458236680000000E+02, -0.122333029000000E+03),\n new google.maps.LatLng( 0.458221360000000E+02, -0.122337018000000E+03),\n new google.maps.LatLng( 0.458222270000000E+02, -0.122337933000000E+03),\n new google.maps.LatLng( 0.458256320000000E+02, -0.122342316000000E+03),\n new google.maps.LatLng( 0.458289470000000E+02, -0.122340127000000E+03),\n new google.maps.LatLng( 0.458327860000000E+02, -0.122343104000000E+03),\n new google.maps.LatLng( 0.458338350000000E+02, -0.122353112000000E+03),\n new google.maps.LatLng( 0.458307020000000E+02, -0.122360239000000E+03),\n new google.maps.LatLng( 0.458310420000000E+02, -0.122366910000000E+03),\n new google.maps.LatLng( 0.458306270000000E+02, -0.122373255000000E+03),\n new google.maps.LatLng( 0.458297800000000E+02, -0.122376206000000E+03),\n new google.maps.LatLng( 0.458302140000000E+02, -0.122377816000000E+03),\n new google.maps.LatLng( 0.458323410000000E+02, -0.122380299000000E+03),\n new google.maps.LatLng( 0.458354730000000E+02, -0.122380002000000E+03),\n new google.maps.LatLng( 0.458375070000000E+02, -0.122377939000000E+03),\n new google.maps.LatLng( 0.458391990000000E+02, -0.122373591000000E+03),\n new google.maps.LatLng( 0.458447330000000E+02, -0.122370490000000E+03),\n new google.maps.LatLng( 0.458516370000000E+02, -0.122370038000000E+03),\n new google.maps.LatLng( 0.458565740000000E+02, -0.122371058000000E+03),\n new google.maps.LatLng( 0.458572130000000E+02, -0.122373676000000E+03),\n new google.maps.LatLng( 0.458588590000000E+02, -0.122373841000000E+03),\n new google.maps.LatLng( 0.458606660000000E+02, -0.122372305000000E+03),\n new google.maps.LatLng( 0.458614220000000E+02, -0.122368118000000E+03),\n new google.maps.LatLng( 0.458627260000000E+02, -0.122367170000000E+03),\n new google.maps.LatLng( 0.458657660000000E+02, -0.122367893000000E+03),\n new google.maps.LatLng( 0.458667250000000E+02, -0.122371199000000E+03),\n new google.maps.LatLng( 0.458680950000000E+02, -0.122373785000000E+03),\n new google.maps.LatLng( 0.458716480000000E+02, -0.122376206000000E+03),\n new google.maps.LatLng( 0.458735800000000E+02, -0.122376754000000E+03),\n new google.maps.LatLng( 0.458796120000000E+02, -0.122376678000000E+03),\n new google.maps.LatLng( 0.458848060000000E+02, -0.122368240000000E+03),\n new google.maps.LatLng( 0.458846020000000E+02, -0.122364508000000E+03),\n new google.maps.LatLng( 0.458876650000000E+02, -0.122363103000000E+03),\n new google.maps.LatLng( 0.458912980000000E+02, -0.122366184000000E+03),\n new google.maps.LatLng( 0.458948190000000E+02, -0.122364845000000E+03),\n new google.maps.LatLng( 0.458985920000000E+02, -0.122362687000000E+03),\n new google.maps.LatLng( 0.458993470000000E+02, -0.122360756000000E+03),\n new google.maps.LatLng( 0.458999440000000E+02, -0.122356238000000E+03),\n new google.maps.LatLng( 0.458992820000000E+02, -0.122353029000000E+03),\n new google.maps.LatLng( 0.458973620000000E+02, -0.122350540000000E+03),\n new google.maps.LatLng( 0.458962650000000E+02, -0.122349950000000E+03),\n new google.maps.LatLng( 0.458930190000000E+02, -0.122350537000000E+03),\n new google.maps.LatLng( 0.458911210000000E+02, -0.122349979000000E+03),\n new google.maps.LatLng( 0.458898650000000E+02, -0.122347719000000E+03),\n new google.maps.LatLng( 0.458882900000000E+02, -0.122338454000000E+03),\n new google.maps.LatLng( 0.458884960000000E+02, -0.122334788000000E+03),\n new google.maps.LatLng( 0.458896850000000E+02, -0.122331908000000E+03),\n new google.maps.LatLng( 0.458903490000000E+02, -0.122328502000000E+03),\n new google.maps.LatLng( 0.458898470000000E+02, -0.122318976000000E+03),\n new google.maps.LatLng( 0.458885440000000E+02, -0.122316717000000E+03),\n new google.maps.LatLng( 0.458846580000000E+02, -0.122315015000000E+03),\n new google.maps.LatLng( 0.458833910000000E+02, -0.122312601000000E+03),\n new google.maps.LatLng( 0.458879040000000E+02, -0.122308763000000E+03),\n new google.maps.LatLng( 0.458889320000000E+02, -0.122315473000000E+03),\n new google.maps.LatLng( 0.458915160000000E+02, -0.122319860000000E+03),\n new google.maps.LatLng( 0.458932300000000E+02, -0.122324902000000E+03),\n new google.maps.LatLng( 0.458924510000000E+02, -0.122337736000000E+03),\n new google.maps.LatLng( 0.458911010000000E+02, -0.122341566000000E+03),\n new google.maps.LatLng( 0.458919690000000E+02, -0.122344152000000E+03),\n new google.maps.LatLng( 0.458943000000000E+02, -0.122348213000000E+03),\n new google.maps.LatLng( 0.458956710000000E+02, -0.122348214000000E+03),\n new google.maps.LatLng( 0.458967460000000E+02, -0.122347494000000E+03),\n new google.maps.LatLng( 0.458986200000000E+02, -0.122347495000000E+03),\n new google.maps.LatLng( 0.459019120000000E+02, -0.122349462000000E+03),\n new google.maps.LatLng( 0.459022080000000E+02, -0.122352999000000E+03),\n new google.maps.LatLng( 0.459006520000000E+02, -0.122356501000000E+03),\n new google.maps.LatLng( 0.458993460000000E+02, -0.122364423000000E+03),\n new google.maps.LatLng( 0.459015850000000E+02, -0.122366587000000E+03),\n new google.maps.LatLng( 0.459047160000000E+02, -0.122368326000000E+03),\n new google.maps.LatLng( 0.459067030000000E+02, -0.122381696000000E+03),\n new google.maps.LatLng( 0.459073430000000E+02, -0.122381237000000E+03),\n new google.maps.LatLng( 0.459094920000000E+02, -0.122373374000000E+03),\n new google.maps.LatLng( 0.459139080000000E+02, -0.122367255000000E+03),\n new google.maps.LatLng( 0.459160360000000E+02, -0.122366221000000E+03),\n new google.maps.LatLng( 0.459165430000000E+02, -0.122366611000000E+03),\n new google.maps.LatLng( 0.459181140000000E+02, -0.122365195000000E+03),\n new google.maps.LatLng( 0.459210790000000E+02, -0.122356207000000E+03),\n new google.maps.LatLng( 0.459226160000000E+02, -0.122356630000000E+03),\n new google.maps.LatLng( 0.459241700000000E+02, -0.122358514000000E+03),\n new google.maps.LatLng( 0.459243890000000E+02, -0.122369704000000E+03),\n new google.maps.LatLng( 0.459252170000000E+02, -0.122369185000000E+03),\n new google.maps.LatLng( 0.459265540000000E+02, -0.122366933000000E+03),\n new google.maps.LatLng( 0.459265540000000E+02, -0.122366933000000E+03),\n new google.maps.LatLng( 0.459297540000000E+02, -0.122355771000000E+03),\n new google.maps.LatLng( 0.459307830000000E+02, -0.122353773000000E+03),\n new google.maps.LatLng( 0.459361350000000E+02, -0.122346274000000E+03),\n new google.maps.LatLng( 0.459381460000000E+02, -0.122344571000000E+03),\n new google.maps.LatLng( 0.459406840000000E+02, -0.122343655000000E+03),\n new google.maps.LatLng( 0.459514050000000E+02, -0.122346184000000E+03),\n new google.maps.LatLng( 0.459532330000000E+02, -0.122348709000000E+03),\n new google.maps.LatLng( 0.459537810000000E+02, -0.122350840000000E+03),\n new google.maps.LatLng( 0.459537810000000E+02, -0.122350840000000E+03),\n new google.maps.LatLng( 0.459565700000000E+02, -0.122351464000000E+03),\n new google.maps.LatLng( 0.459578280000000E+02, -0.122350285000000E+03),\n new google.maps.LatLng( 0.459592010000000E+02, -0.122343534000000E+03),\n new google.maps.LatLng( 0.459617400000000E+02, -0.122337438000000E+03),\n new google.maps.LatLng( 0.459624030000000E+02, -0.122336849000000E+03),\n new google.maps.LatLng( 0.459624030000000E+02, -0.122336849000000E+03),\n new google.maps.LatLng( 0.459649200000000E+02, -0.122333673000000E+03),\n new google.maps.LatLng( 0.459649200000000E+02, -0.122333673000000E+03),\n new google.maps.LatLng( 0.459728170000000E+02, -0.122326645000000E+03),\n new google.maps.LatLng( 0.459761450000000E+02, -0.122324381000000E+03),\n new google.maps.LatLng( 0.459767800000000E+02, -0.122324276000000E+03),\n new google.maps.LatLng( 0.459787120000000E+02, -0.122325722000000E+03),\n new google.maps.LatLng( 0.459797260000000E+02, -0.122325834000000E+03),\n new google.maps.LatLng( 0.459832160000000E+02, -0.122325009000000E+03),\n new google.maps.LatLng( 0.459853550000000E+02, -0.122318360000000E+03),\n new google.maps.LatLng( 0.459908290000000E+02, -0.122314800000000E+03),\n new google.maps.LatLng( 0.459931790000000E+02, -0.122315588000000E+03),\n new google.maps.LatLng( 0.459964220000000E+02, -0.122322495000000E+03),\n new google.maps.LatLng( 0.459998320000000E+02, -0.122325003000000E+03),\n new google.maps.LatLng( 0.460038980000000E+02, -0.122325147000000E+03),\n new google.maps.LatLng( 0.460100540000000E+02, -0.122328885000000E+03),\n new google.maps.LatLng( 0.460108110000000E+02, -0.122328768000000E+03),\n new google.maps.LatLng( 0.460114980000000E+02, -0.122328294000000E+03),\n new google.maps.LatLng( 0.460125600000000E+02, -0.122325431000000E+03),\n new google.maps.LatLng( 0.460126020000000E+02, -0.122322163000000E+03),\n new google.maps.LatLng( 0.460117320000000E+02, -0.122319229000000E+03),\n new google.maps.LatLng( 0.460126590000000E+02, -0.122317469000000E+03),\n new google.maps.LatLng( 0.460169950000000E+02, -0.122313715000000E+03),\n new google.maps.LatLng( 0.460191930000000E+02, -0.122313731000000E+03),\n new google.maps.LatLng( 0.460215770000000E+02, -0.122315188000000E+03),\n new google.maps.LatLng( 0.460287940000000E+02, -0.122311711000000E+03),\n new google.maps.LatLng( 0.460292940000000E+02, -0.122308621000000E+03),\n new google.maps.LatLng( 0.460360740000000E+02, -0.122295962000000E+03),\n new google.maps.LatLng( 0.460379730000000E+02, -0.122294708000000E+03),\n new google.maps.LatLng( 0.460468120000000E+02, -0.122295242000000E+03),\n new google.maps.LatLng( 0.460491910000000E+02, -0.122294443000000E+03),\n new google.maps.LatLng( 0.460498370000000E+02, -0.122292562000000E+03),\n new google.maps.LatLng( 0.460493820000000E+02, -0.122288618000000E+03),\n new google.maps.LatLng( 0.460509020000000E+02, -0.122284146000000E+03),\n new google.maps.LatLng( 0.460539830000000E+02, -0.122281489000000E+03),\n new google.maps.LatLng( 0.460582430000000E+02, -0.122276530000000E+03),\n new google.maps.LatLng( 0.460595720000000E+02, -0.122271548000000E+03),\n new google.maps.LatLng( 0.460593760000000E+02, -0.122267065000000E+03),\n new google.maps.LatLng( 0.460579070000000E+02, -0.122259528000000E+03),\n new google.maps.LatLng( 0.460547780000000E+02, -0.122252074000000E+03),\n new google.maps.LatLng( 0.460540060000000E+02, -0.122251904000000E+03),\n new google.maps.LatLng( 0.460536140000000E+02, -0.122250397000000E+03),\n new google.maps.LatLng( 0.460533630000000E+02, -0.122248610000000E+03),\n new google.maps.LatLng( 0.460539320000000E+02, -0.122245633000000E+03),\n new google.maps.LatLng( 0.460539320000000E+02, -0.122245633000000E+03),\n new google.maps.LatLng( 0.460691450000000E+02, -0.122245690000000E+03),\n new google.maps.LatLng( 0.461112190000000E+02, -0.122245844000000E+03),\n new google.maps.LatLng( 0.461187140000000E+02, -0.122245871000000E+03),\n new google.maps.LatLng( 0.461188220000000E+02, -0.122247003000000E+03),\n new google.maps.LatLng( 0.461204340000000E+02, -0.122249681000000E+03),\n new google.maps.LatLng( 0.461221470000000E+02, -0.122251605000000E+03),\n new google.maps.LatLng( 0.461244680000000E+02, -0.122253251000000E+03),\n new google.maps.LatLng( 0.461227490000000E+02, -0.122256569000000E+03),\n new google.maps.LatLng( 0.461205060000000E+02, -0.122259313000000E+03),\n new google.maps.LatLng( 0.461198670000000E+02, -0.122263133000000E+03),\n new google.maps.LatLng( 0.461205390000000E+02, -0.122264086000000E+03),\n new google.maps.LatLng( 0.461220650000000E+02, -0.122264888000000E+03),\n new google.maps.LatLng( 0.461166210000000E+02, -0.122267117000000E+03),\n new google.maps.LatLng( 0.461088950000000E+02, -0.122267594000000E+03),\n new google.maps.LatLng( 0.461000260000000E+02, -0.122269752000000E+03),\n new google.maps.LatLng( 0.460993920000000E+02, -0.122270977000000E+03),\n new google.maps.LatLng( 0.461002630000000E+02, -0.122273638000000E+03),\n new google.maps.LatLng( 0.461027360000000E+02, -0.122276109000000E+03),\n new google.maps.LatLng( 0.461054890000000E+02, -0.122280567000000E+03),\n new google.maps.LatLng( 0.461050800000000E+02, -0.122283316000000E+03),\n new google.maps.LatLng( 0.461012960000000E+02, -0.122288377000000E+03),\n new google.maps.LatLng( 0.460944540000000E+02, -0.122288931000000E+03),\n new google.maps.LatLng( 0.460938420000000E+02, -0.122289400000000E+03),\n new google.maps.LatLng( 0.460963890000000E+02, -0.122294196000000E+03),\n new google.maps.LatLng( 0.460964560000000E+02, -0.122304443000000E+03),\n new google.maps.LatLng( 0.460919980000000E+02, -0.122307630000000E+03),\n new google.maps.LatLng( 0.460909240000000E+02, -0.122307598000000E+03),\n new google.maps.LatLng( 0.460867400000000E+02, -0.122305101000000E+03),\n new google.maps.LatLng( 0.460855750000000E+02, -0.122305068000000E+03),\n new google.maps.LatLng( 0.460849350000000E+02, -0.122306612000000E+03),\n new google.maps.LatLng( 0.460861010000000E+02, -0.122309634000000E+03),\n new google.maps.LatLng( 0.460795110000000E+02, -0.122307978000000E+03),\n new google.maps.LatLng( 0.460795110000000E+02, -0.122307978000000E+03),\n new google.maps.LatLng( 0.460807740000000E+02, -0.122310325000000E+03),\n new google.maps.LatLng( 0.460797910000000E+02, -0.122311671000000E+03),\n new google.maps.LatLng( 0.460791970000000E+02, -0.122311836000000E+03),\n new google.maps.LatLng( 0.460776380000000E+02, -0.122310217000000E+03),\n new google.maps.LatLng( 0.460763120000000E+02, -0.122309706000000E+03),\n new google.maps.LatLng( 0.460744930000000E+02, -0.122309846000000E+03),\n new google.maps.LatLng( 0.460739750000000E+02, -0.122310300000000E+03),\n new google.maps.LatLng( 0.460709020000000E+02, -0.122322018000000E+03),\n new google.maps.LatLng( 0.460731290000000E+02, -0.122323854000000E+03),\n new google.maps.LatLng( 0.460783360000000E+02, -0.122325287000000E+03),\n new google.maps.LatLng( 0.460838800000000E+02, -0.122329857000000E+03),\n new google.maps.LatLng( 0.460847310000000E+02, -0.122334543000000E+03),\n new google.maps.LatLng( 0.460834670000000E+02, -0.122336653000000E+03),\n new google.maps.LatLng( 0.460828520000000E+02, -0.122337032000000E+03),\n new google.maps.LatLng( 0.460783260000000E+02, -0.122337162000000E+03),\n new google.maps.LatLng( 0.460762230000000E+02, -0.122336077000000E+03),\n new google.maps.LatLng( 0.460735030000000E+02, -0.122337767000000E+03),\n new google.maps.LatLng( 0.460723490000000E+02, -0.122345540000000E+03),\n new google.maps.LatLng( 0.460756430000000E+02, -0.122346348000000E+03),\n new google.maps.LatLng( 0.460794480000000E+02, -0.122348066000000E+03),\n new google.maps.LatLng( 0.460799890000000E+02, -0.122348718000000E+03),\n new google.maps.LatLng( 0.460787110000000E+02, -0.122351812000000E+03),\n new google.maps.LatLng( 0.460735200000000E+02, -0.122356932000000E+03),\n new google.maps.LatLng( 0.460668890000000E+02, -0.122359850000000E+03),\n new google.maps.LatLng( 0.460643040000000E+02, -0.122365859000000E+03),\n new google.maps.LatLng( 0.460613300000000E+02, -0.122369698000000E+03),\n new google.maps.LatLng( 0.460588140000000E+02, -0.122371665000000E+03),\n new google.maps.LatLng( 0.460589228687500E+02, -0.122373468454883E+03),\n new google.maps.LatLng( 0.460599780000000E+02, -0.122376210000000E+03),\n new google.maps.LatLng( 0.460622200000000E+02, -0.122380127000000E+03),\n new google.maps.LatLng( 0.460627700000000E+02, -0.122382951000000E+03),\n new google.maps.LatLng( 0.460624510000000E+02, -0.122384823000000E+03),\n new google.maps.LatLng( 0.460571930000000E+02, -0.122384729000000E+03),\n new google.maps.LatLng( 0.460568260000000E+02, -0.122383318000000E+03),\n new google.maps.LatLng( 0.460584700000000E+02, -0.122379639000000E+03),\n new google.maps.LatLng( 0.460562080000000E+02, -0.122372484000000E+03),\n new google.maps.LatLng( 0.460556820000000E+02, -0.122371958000000E+03),\n new google.maps.LatLng( 0.460506530000000E+02, -0.122371853000000E+03),\n new google.maps.LatLng( 0.460497390000000E+02, -0.122372213000000E+03),\n new google.maps.LatLng( 0.460498750000000E+02, -0.122373559000000E+03),\n new google.maps.LatLng( 0.460509490000000E+02, -0.122375236000000E+03),\n new google.maps.LatLng( 0.460525710000000E+02, -0.122375736000000E+03),\n new google.maps.LatLng( 0.460530740000000E+02, -0.122376702000000E+03),\n new google.maps.LatLng( 0.460463990000000E+02, -0.122377123000000E+03),\n new google.maps.LatLng( 0.460454850000000E+02, -0.122375393000000E+03),\n new google.maps.LatLng( 0.460448710000000E+02, -0.122369812000000E+03),\n new google.maps.LatLng( 0.460443450000000E+02, -0.122368629000000E+03),\n new google.maps.LatLng( 0.460415130000000E+02, -0.122364326000000E+03),\n new google.maps.LatLng( 0.460378100000000E+02, -0.122363174000000E+03),\n new google.maps.LatLng( 0.460369870000000E+02, -0.122362320000000E+03),\n new google.maps.LatLng( 0.460329900000000E+02, -0.122355063000000E+03),\n new google.maps.LatLng( 0.460333110000000E+02, -0.122351191000000E+03),\n new google.maps.LatLng( 0.460325350000000E+02, -0.122348399000000E+03),\n new google.maps.LatLng( 0.460312090000000E+02, -0.122346200000000E+03),\n new google.maps.LatLng( 0.460288100000000E+02, -0.122344196000000E+03),\n new google.maps.LatLng( 0.460280550000000E+02, -0.122344130000000E+03),\n new google.maps.LatLng( 0.460264550000000E+02, -0.122345409000000E+03),\n new google.maps.LatLng( 0.460198450000000E+02, -0.122354101000000E+03),\n new google.maps.LatLng( 0.460176720000000E+02, -0.122355433000000E+03),\n new google.maps.LatLng( 0.460171870000000E+02, -0.122369882000000E+03),\n new google.maps.LatLng( 0.460164090000000E+02, -0.122371358000000E+03),\n new google.maps.LatLng( 0.460176890000000E+02, -0.122381847000000E+03),\n new google.maps.LatLng( 0.460197740000000E+02, -0.122393723000000E+03),\n new google.maps.LatLng( 0.460209180000000E+02, -0.122395822000000E+03),\n new google.maps.LatLng( 0.460228840000000E+02, -0.122396708000000E+03),\n new google.maps.LatLng( 0.460242110000000E+02, -0.122398183000000E+03),\n new google.maps.LatLng( 0.460255390000000E+02, -0.122401064000000E+03),\n new google.maps.LatLng( 0.460258190000000E+02, -0.122402823000000E+03),\n new google.maps.LatLng( 0.460256720000000E+02, -0.122405710000000E+03),\n new google.maps.LatLng( 0.460237250000000E+02, -0.122410011000000E+03),\n new google.maps.LatLng( 0.460172430000000E+02, -0.122412691000000E+03),\n new google.maps.LatLng( 0.460160320000000E+02, -0.122415152000000E+03),\n new google.maps.LatLng( 0.460148210000000E+02, -0.122418664000000E+03),\n new google.maps.LatLng( 0.460132680000000E+02, -0.122432116000000E+03),\n new google.maps.LatLng( 0.460147770000000E+02, -0.122442058000000E+03),\n new google.maps.LatLng( 0.460165600000000E+02, -0.122444355000000E+03),\n new google.maps.LatLng( 0.460180910000000E+02, -0.122447636000000E+03),\n new google.maps.LatLng( 0.460180440000000E+02, -0.122458103000000E+03),\n new google.maps.LatLng( 0.460223180000000E+02, -0.122463815000000E+03),\n new google.maps.LatLng( 0.460213120000000E+02, -0.122465553000000E+03),\n new google.maps.LatLng( 0.460226350000000E+02, -0.122475104000000E+03),\n new google.maps.LatLng( 0.460213770000000E+02, -0.122478319000000E+03),\n new google.maps.LatLng( 0.460179320000000E+02, -0.122483344000000E+03),\n new google.maps.LatLng( 0.460243600000000E+02, -0.122485834000000E+03),\n new google.maps.LatLng( 0.460277200000000E+02, -0.122484953000000E+03),\n new google.maps.LatLng( 0.460323260000000E+02, -0.122491578000000E+03),\n new google.maps.LatLng( 0.460328320000000E+02, -0.122495382000000E+03),\n new google.maps.LatLng( 0.460326550000000E+02, -0.122498950000000E+03),\n new google.maps.LatLng( 0.460329400000000E+02, -0.122499254000000E+03),\n new google.maps.LatLng( 0.460334500000000E+02, -0.122496191000000E+03),\n new google.maps.LatLng( 0.460336400000000E+02, -0.122494571000000E+03),\n new google.maps.LatLng( 0.460342550000000E+02, -0.122493828000000E+03),\n new google.maps.LatLng( 0.460357520000000E+02, -0.122503027000000E+03),\n new google.maps.LatLng( 0.460348050000000E+02, -0.122504492000000E+03),\n new google.maps.LatLng( 0.460345120000000E+02, -0.122507481000000E+03),\n new google.maps.LatLng( 0.460380970000000E+02, -0.122514140000000E+03),\n new google.maps.LatLng( 0.460391910000000E+02, -0.122513989000000E+03),\n new google.maps.LatLng( 0.460404340000000E+02, -0.122514828000000E+03),\n new google.maps.LatLng( 0.460417820000000E+02, -0.122519765000000E+03),\n new google.maps.LatLng( 0.460410450000000E+02, -0.122523039000000E+03),\n new google.maps.LatLng( 0.460427920000000E+02, -0.122526484000000E+03),\n new google.maps.LatLng( 0.460445760000000E+02, -0.122528825000000E+03),\n new google.maps.LatLng( 0.460476380000000E+02, -0.122529301000000E+03),\n new google.maps.LatLng( 0.460495890000000E+02, -0.122531802000000E+03),\n new google.maps.LatLng( 0.460507560000000E+02, -0.122538663000000E+03),\n new google.maps.LatLng( 0.460537520000000E+02, -0.122545425000000E+03),\n new google.maps.LatLng( 0.460551010000000E+02, -0.122546936000000E+03),\n new google.maps.LatLng( 0.460562910000000E+02, -0.122552414000000E+03),\n new google.maps.LatLng( 0.460561280000000E+02, -0.122552804000000E+03),\n new google.maps.LatLng( 0.460547940000000E+02, -0.122552573000000E+03),\n new google.maps.LatLng( 0.460526300000000E+02, -0.122550964000000E+03),\n new google.maps.LatLng( 0.460483545712891E+02, -0.122543113433203E+03),\n new google.maps.LatLng( 0.460421720000000E+02, -0.122542200000000E+03),\n new google.maps.LatLng( 0.460417240000000E+02, -0.122542594000000E+03),\n new google.maps.LatLng( 0.460416700000000E+02, -0.122544796000000E+03),\n new google.maps.LatLng( 0.460442040000000E+02, -0.122550436000000E+03),\n new google.maps.LatLng( 0.460431300000000E+02, -0.122555214000000E+03),\n new google.maps.LatLng( 0.460415020000000E+02, -0.122555982000000E+03),\n new google.maps.LatLng( 0.460391030000000E+02, -0.122554831000000E+03),\n new google.maps.LatLng( 0.460388800000000E+02, -0.122554334000000E+03),\n new google.maps.LatLng( 0.460382410000000E+02, -0.122551060000000E+03),\n new google.maps.LatLng( 0.460381490000000E+02, -0.122546306000000E+03),\n new google.maps.LatLng( 0.460358850000000E+02, -0.122543478000000E+03),\n new google.maps.LatLng( 0.460343290000000E+02, -0.122542462000000E+03),\n new google.maps.LatLng( 0.460336620000000E+02, -0.122542502000000E+03),\n new google.maps.LatLng( 0.460307680000000E+02, -0.122544006000000E+03),\n new google.maps.LatLng( 0.460306010000000E+02, -0.122545524000000E+03),\n new google.maps.LatLng( 0.460315020000000E+02, -0.122547177000000E+03),\n new google.maps.LatLng( 0.460315160000000E+02, -0.122549778000000E+03),\n new google.maps.LatLng( 0.460269370000000E+02, -0.122559838000000E+03),\n new google.maps.LatLng( 0.460275080000000E+02, -0.122563525000000E+03),\n new google.maps.LatLng( 0.460288780000000E+02, -0.122566541000000E+03),\n new google.maps.LatLng( 0.460296560000000E+02, -0.122570657000000E+03),\n new google.maps.LatLng( 0.460283990000000E+02, -0.122578135000000E+03),\n new google.maps.LatLng( 0.460295860000000E+02, -0.122581829000000E+03),\n new google.maps.LatLng( 0.460309380000000E+02, -0.122581961000000E+03),\n new google.maps.LatLng( 0.460329500000000E+02, -0.122580846000000E+03),\n new google.maps.LatLng( 0.460381620000000E+02, -0.122585378000000E+03),\n new google.maps.LatLng( 0.460410640000000E+02, -0.122588793000000E+03),\n new google.maps.LatLng( 0.460440960000000E+02, -0.122596406000000E+03),\n new google.maps.LatLng( 0.460445590000000E+02, -0.122598807000000E+03),\n new google.maps.LatLng( 0.460422500000000E+02, -0.122600841000000E+03),\n new google.maps.LatLng( 0.460417690000000E+02, -0.122602876000000E+03),\n new google.maps.LatLng( 0.460430240000000E+02, -0.122610132000000E+03),\n new google.maps.LatLng( 0.460442360000000E+02, -0.122612037000000E+03),\n new google.maps.LatLng( 0.460451260000000E+02, -0.122615320000000E+03),\n new google.maps.LatLng( 0.460449190000000E+02, -0.122616600000000E+03),\n new google.maps.LatLng( 0.460438340000000E+02, -0.122616532000000E+03),\n new google.maps.LatLng( 0.460438340000000E+02, -0.122616532000000E+03),\n new google.maps.LatLng( 0.460425670000000E+02, -0.122618373000000E+03),\n new google.maps.LatLng( 0.460426180000000E+02, -0.122619386000000E+03),\n new google.maps.LatLng( 0.460434740000000E+02, -0.122620258000000E+03),\n new google.maps.LatLng( 0.460461260000000E+02, -0.122622449000000E+03),\n new google.maps.LatLng( 0.460477450000000E+02, -0.122621960000000E+03),\n new google.maps.LatLng( 0.460482890000000E+02, -0.122620873000000E+03),\n new google.maps.LatLng( 0.460481530000000E+02, -0.122614069000000E+03),\n new google.maps.LatLng( 0.460454560000000E+02, -0.122607687000000E+03),\n new google.maps.LatLng( 0.460453600000000E+02, -0.122605891000000E+03),\n new google.maps.LatLng( 0.460490410000000E+02, -0.122596381000000E+03),\n new google.maps.LatLng( 0.460527230000000E+02, -0.122592082000000E+03),\n new google.maps.LatLng( 0.460535460000000E+02, -0.122589751000000E+03),\n new google.maps.LatLng( 0.460535700000000E+02, -0.122586763000000E+03),\n new google.maps.LatLng( 0.460516970000000E+02, -0.122572546000000E+03),\n new google.maps.LatLng( 0.460494800000000E+02, -0.122571036000000E+03),\n new google.maps.LatLng( 0.460485420000000E+02, -0.122570904000000E+03),\n new google.maps.LatLng( 0.460478790000000E+02, -0.122570050000000E+03),\n new google.maps.LatLng( 0.460484740000000E+02, -0.122562106000000E+03),\n new google.maps.LatLng( 0.460492970000000E+02, -0.122558133000000E+03),\n new google.maps.LatLng( 0.460504390000000E+02, -0.122556688000000E+03),\n new google.maps.LatLng( 0.460529760000000E+02, -0.122555440000000E+03),\n new google.maps.LatLng( 0.460563600000000E+02, -0.122556786000000E+03),\n new google.maps.LatLng( 0.460570230000000E+02, -0.122556753000000E+03),\n new google.maps.LatLng( 0.460575480000000E+02, -0.122555998000000E+03),\n new google.maps.LatLng( 0.460567749125977E+02, -0.122549121444336E+03),\n new google.maps.LatLng( 0.460545980000000E+02, -0.122542667000000E+03),\n new google.maps.LatLng( 0.460551690000000E+02, -0.122542634000000E+03),\n new google.maps.LatLng( 0.460561290000000E+02, -0.122543849000000E+03),\n new google.maps.LatLng( 0.460576152060547E+02, -0.122546771587305E+03),\n new google.maps.LatLng( 0.460584522060547E+02, -0.122550159787305E+03),\n new google.maps.LatLng( 0.460613890000000E+02, -0.122552516000000E+03),\n new google.maps.LatLng( 0.460616630000000E+02, -0.122553863000000E+03),\n new google.maps.LatLng( 0.460597890000000E+02, -0.122557015000000E+03),\n new google.maps.LatLng( 0.460589200000000E+02, -0.122557705000000E+03),\n new google.maps.LatLng( 0.460551240000000E+02, -0.122557839000000E+03),\n new google.maps.LatLng( 0.460539850000000E+02, -0.122557327000000E+03),\n new google.maps.LatLng( 0.460518890000000E+02, -0.122558504000000E+03),\n new google.maps.LatLng( 0.460504380000000E+02, -0.122560840000000E+03),\n new google.maps.LatLng( 0.460495190000000E+02, -0.122567971000000E+03),\n new google.maps.LatLng( 0.460549370000000E+02, -0.122570316000000E+03),\n new google.maps.LatLng( 0.460562240000000E+02, -0.122567063000000E+03),\n new google.maps.LatLng( 0.460598130000000E+02, -0.122563320000000E+03),\n new google.maps.LatLng( 0.460606360000000E+02, -0.122563254000000E+03),\n new google.maps.LatLng( 0.460634020000000E+02, -0.122563944000000E+03),\n new google.maps.LatLng( 0.460665180000000E+02, -0.122567484000000E+03),\n new google.maps.LatLng( 0.460666050000000E+02, -0.122572818000000E+03),\n new google.maps.LatLng( 0.460653100000000E+02, -0.122574372000000E+03),\n new google.maps.LatLng( 0.460636570000000E+02, -0.122580104000000E+03),\n new google.maps.LatLng( 0.460642000000000E+02, -0.122585788000000E+03),\n new google.maps.LatLng( 0.460628350000000E+02, -0.122588596000000E+03),\n new google.maps.LatLng( 0.460595420000000E+02, -0.122601201000000E+03),\n new google.maps.LatLng( 0.460632120000000E+02, -0.122602628000000E+03),\n new google.maps.LatLng( 0.460788750000000E+02, -0.122591110000000E+03),\n new google.maps.LatLng( 0.460803390000000E+02, -0.122589502000000E+03),\n new google.maps.LatLng( 0.460827170000000E+02, -0.122584936000000E+03),\n new google.maps.LatLng( 0.460864890000000E+02, -0.122582967000000E+03),\n new google.maps.LatLng( 0.460876320000000E+02, -0.122583131000000E+03),\n new google.maps.LatLng( 0.460876550000000E+02, -0.122584281000000E+03),\n new google.maps.LatLng( 0.460855050000000E+02, -0.122589767000000E+03),\n new google.maps.LatLng( 0.460794730000000E+02, -0.122597596000000E+03),\n new google.maps.LatLng( 0.460763420000000E+02, -0.122599545000000E+03),\n new google.maps.LatLng( 0.460722410000000E+02, -0.122607106000000E+03),\n new google.maps.LatLng( 0.460706620000000E+02, -0.122611371000000E+03),\n new google.maps.LatLng( 0.460706620000000E+02, -0.122611371000000E+03),\n new google.maps.LatLng( 0.460729020000000E+02, -0.122610749000000E+03),\n new google.maps.LatLng( 0.460762170000000E+02, -0.122611179000000E+03),\n new google.maps.LatLng( 0.460782050000000E+02, -0.122613545000000E+03),\n new google.maps.LatLng( 0.460867690000000E+02, -0.122614810000000E+03),\n new google.maps.LatLng( 0.460912580000000E+02, -0.122613294000000E+03),\n new google.maps.LatLng( 0.460921040000000E+02, -0.122612506000000E+03),\n new google.maps.LatLng( 0.460924250000000E+02, -0.122611554000000E+03),\n new google.maps.LatLng( 0.460918320000000E+02, -0.122607643000000E+03),\n new google.maps.LatLng( 0.460923350000000E+02, -0.122606855000000E+03),\n new google.maps.LatLng( 0.460959930000000E+02, -0.122607712000000E+03),\n new google.maps.LatLng( 0.460984610000000E+02, -0.122609193000000E+03),\n new google.maps.LatLng( 0.461037200000000E+02, -0.122606601000000E+03),\n new google.maps.LatLng( 0.461056410000000E+02, -0.122603513000000E+03),\n new google.maps.LatLng( 0.461067160000000E+02, -0.122603152000000E+03),\n new google.maps.LatLng( 0.461104620000000E+02, -0.122610123000000E+03),\n new google.maps.LatLng( 0.461148040000000E+02, -0.122613710000000E+03),\n new google.maps.LatLng( 0.461232830000000E+02, -0.122618978000000E+03),\n new google.maps.LatLng( 0.461243790000000E+02, -0.122618880000000E+03),\n new google.maps.LatLng( 0.461263930000000E+02, -0.122617437000000E+03),\n new google.maps.LatLng( 0.461323600000000E+02, -0.122614911000000E+03),\n new google.maps.LatLng( 0.461334360000000E+02, -0.122616297000000E+03),\n new google.maps.LatLng( 0.461338720000000E+02, -0.122617741000000E+03),\n new google.maps.LatLng( 0.461344530000000E+02, -0.122629152000000E+03),\n new google.maps.LatLng( 0.461340870000000E+02, -0.122637181000000E+03),\n new google.maps.LatLng( 0.461373850000000E+02, -0.122650863000000E+03),\n new google.maps.LatLng( 0.461367850000000E+02, -0.122651746000000E+03),\n new google.maps.LatLng( 0.461345540000000E+02, -0.122651798000000E+03),\n new google.maps.LatLng( 0.461339190000000E+02, -0.122647292000000E+03),\n new google.maps.LatLng( 0.461305280000000E+02, -0.122646838000000E+03),\n new google.maps.LatLng( 0.461289550000000E+02, -0.122649849000000E+03),\n new google.maps.LatLng( 0.461277680000000E+02, -0.122656759000000E+03),\n new google.maps.LatLng( 0.461296250000000E+02, -0.122659455000000E+03),\n new google.maps.LatLng( 0.461312500000000E+02, -0.122666787000000E+03),\n new google.maps.LatLng( 0.461360750000000E+02, -0.122678392000000E+03),\n new google.maps.LatLng( 0.461366570000000E+02, -0.122680565000000E+03),\n new google.maps.LatLng( 0.461376420000000E+02, -0.122692814000000E+03),\n new google.maps.LatLng( 0.461383890000000E+02, -0.122694614000000E+03),\n new google.maps.LatLng( 0.461370510000000E+02, -0.122698423000000E+03),\n new google.maps.LatLng( 0.461351320000000E+02, -0.122699205000000E+03),\n new google.maps.LatLng( 0.461332970000000E+02, -0.122698831000000E+03),\n new google.maps.LatLng( 0.461283610000000E+02, -0.122700525000000E+03),\n new google.maps.LatLng( 0.461262030000000E+02, -0.122718750000000E+03),\n new google.maps.LatLng( 0.461295980000000E+02, -0.122719647000000E+03),\n new google.maps.LatLng( 0.461314790000000E+02, -0.122716333000000E+03),\n new google.maps.LatLng( 0.461314410000000E+02, -0.122714328000000E+03),\n new google.maps.LatLng( 0.461319250000000E+02, -0.122713891000000E+03),\n new google.maps.LatLng( 0.461326160000000E+02, -0.122714550000000E+03),\n new google.maps.LatLng( 0.461351360000000E+02, -0.122723396000000E+03),\n new google.maps.LatLng( 0.461341730000000E+02, -0.122725479000000E+03),\n new google.maps.LatLng( 0.461304450000000E+02, -0.122730572000000E+03),\n new google.maps.LatLng( 0.461286150000000E+02, -0.122735710000000E+03),\n new google.maps.LatLng( 0.461303280000000E+02, -0.122737410000000E+03),\n new google.maps.LatLng( 0.461316870000000E+02, -0.122738014000000E+03),\n new google.maps.LatLng( 0.461335380000000E+02, -0.122738365000000E+03),\n new google.maps.LatLng( 0.461391810000000E+02, -0.122737761000000E+03),\n new google.maps.LatLng( 0.461414080000000E+02, -0.122739151000000E+03),\n new google.maps.LatLng( 0.461429590000000E+02, -0.122740367000000E+03),\n new google.maps.LatLng( 0.461430840000000E+02, -0.122742984000000E+03),\n new google.maps.LatLng( 0.461444000000000E+02, -0.122745697000000E+03),\n new google.maps.LatLng( 0.461472010000000E+02, -0.122745926000000E+03),\n new google.maps.LatLng( 0.461479280000000E+02, -0.122744663000000E+03),\n new google.maps.LatLng( 0.461557280000000E+02, -0.122743199000000E+03),\n new google.maps.LatLng( 0.461581880000000E+02, -0.122744717000000E+03),\n new google.maps.LatLng( 0.461589100000000E+02, -0.122746242000000E+03),\n new google.maps.LatLng( 0.461568310000000E+02, -0.122748264000000E+03),\n new google.maps.LatLng( 0.461569510000000E+02, -0.122748945000000E+03),\n new google.maps.LatLng( 0.461580840000000E+02, -0.122749894000000E+03),\n new google.maps.LatLng( 0.461660850000000E+02, -0.122749749000000E+03),\n new google.maps.LatLng( 0.461727650000000E+02, -0.122745120000000E+03),\n new google.maps.LatLng( 0.461741950000000E+02, -0.122743375000000E+03),\n new google.maps.LatLng( 0.461742180000000E+02, -0.122741894000000E+03),\n new google.maps.LatLng( 0.461708380000000E+02, -0.122735376000000E+03),\n new google.maps.LatLng( 0.461705420000000E+02, -0.122732645000000E+03),\n new google.maps.LatLng( 0.461749330000000E+02, -0.122727679000000E+03),\n new google.maps.LatLng( 0.461753000000000E+02, -0.122723435000000E+03),\n new google.maps.LatLng( 0.461747520000000E+02, -0.122721459000000E+03),\n new google.maps.LatLng( 0.461731060000000E+02, -0.122720504000000E+03),\n new google.maps.LatLng( 0.461736630000000E+02, -0.122716718000000E+03),\n new google.maps.LatLng( 0.461757310000000E+02, -0.122713796000000E+03),\n new google.maps.LatLng( 0.461792120000000E+02, -0.122711362000000E+03),\n new google.maps.LatLng( 0.461844510000000E+02, -0.122711544000000E+03),\n new google.maps.LatLng( 0.461864090000000E+02, -0.122712806000000E+03),\n new google.maps.LatLng( 0.461887440000000E+02, -0.122721165000000E+03),\n new google.maps.LatLng( 0.461907810000000E+02, -0.122724989000000E+03),\n new google.maps.LatLng( 0.461928710000000E+02, -0.122727407000000E+03),\n new google.maps.LatLng( 0.461951410000000E+02, -0.122728615000000E+03),\n new google.maps.LatLng( 0.461958040000000E+02, -0.122728616000000E+03),\n new google.maps.LatLng( 0.461994400000000E+02, -0.122724767000000E+03),\n new google.maps.LatLng( 0.462007660000000E+02, -0.122724438000000E+03),\n new google.maps.LatLng( 0.462016110000000E+02, -0.122725032000000E+03),\n new google.maps.LatLng( 0.462022960000000E+02, -0.122727369000000E+03),\n new google.maps.LatLng( 0.462043080000000E+02, -0.122728326000000E+03),\n new google.maps.LatLng( 0.462129500000000E+02, -0.122723228000000E+03),\n new google.maps.LatLng( 0.462178660000000E+02, -0.122721651000000E+03),\n new google.maps.LatLng( 0.462196270000000E+02, -0.122718952000000E+03),\n new google.maps.LatLng( 0.462190090000000E+02, -0.122721454000000E+03),\n new google.maps.LatLng( 0.462175450000000E+02, -0.122723001000000E+03),\n new google.maps.LatLng( 0.462107723170898E+02, -0.122727863561719E+03),\n new google.maps.LatLng( 0.462081700000000E+02, -0.122731522000000E+03),\n new google.maps.LatLng( 0.462083980000000E+02, -0.122731884000000E+03),\n new google.maps.LatLng( 0.462093820000000E+02, -0.122730469000000E+03),\n new google.maps.LatLng( 0.462112800000000E+02, -0.122729648000000E+03),\n new google.maps.LatLng( 0.462119420000000E+02, -0.122731460000000E+03),\n new google.maps.LatLng( 0.462113010000000E+02, -0.122733830000000E+03),\n new google.maps.LatLng( 0.462101340000000E+02, -0.122736266000000E+03),\n new google.maps.LatLng( 0.462072300000000E+02, -0.122738009000000E+03),\n new google.maps.LatLng( 0.462043940000000E+02, -0.122741725000000E+03),\n new google.maps.LatLng( 0.462014880000000E+02, -0.122747418000000E+03),\n new google.maps.LatLng( 0.462012160000000E+02, -0.122759893000000E+03),\n new google.maps.LatLng( 0.461999600000000E+02, -0.122762726000000E+03),\n new google.maps.LatLng( 0.461998920000000E+02, -0.122764109000000E+03),\n new google.maps.LatLng( 0.462006020000000E+02, -0.122767762000000E+03),\n new google.maps.LatLng( 0.462020880000000E+02, -0.122769605000000E+03),\n new google.maps.LatLng( 0.462036670000000E+02, -0.122773620000000E+03),\n new google.maps.LatLng( 0.462033280000000E+02, -0.122784616000000E+03),\n new google.maps.LatLng( 0.462026200000000E+02, -0.122790609000000E+03),\n new google.maps.LatLng( 0.462028950000000E+02, -0.122793770000000E+03),\n new google.maps.LatLng( 0.462055020000000E+02, -0.122798016000000E+03),\n new google.maps.LatLng( 0.462031940000000E+02, -0.122803647000000E+03),\n new google.maps.LatLng( 0.462016860000000E+02, -0.122817737000000E+03),\n new google.maps.LatLng( 0.462031020000000E+02, -0.122826265000000E+03),\n new google.maps.LatLng( 0.462060050000000E+02, -0.122827813000000E+03),\n new google.maps.LatLng( 0.462060510000000E+02, -0.122831105000000E+03),\n new google.maps.LatLng( 0.462051380000000E+02, -0.122835584000000E+03),\n new google.maps.LatLng( 0.462060080000000E+02, -0.122837564000000E+03),\n new google.maps.LatLng( 0.462086320000000E+02, -0.122837034000000E+03),\n new google.maps.LatLng( 0.462105750000000E+02, -0.122837825000000E+03),\n new google.maps.LatLng( 0.462173160000000E+02, -0.122846027000000E+03),\n new google.maps.LatLng( 0.462173150000000E+02, -0.122851033000000E+03),\n new google.maps.LatLng( 0.462134500000000E+02, -0.122855278000000E+03),\n new google.maps.LatLng( 0.462163970000000E+02, -0.122861702000000E+03),\n new google.maps.LatLng( 0.462202830000000E+02, -0.122861969000000E+03),\n new google.maps.LatLng( 0.462211970000000E+02, -0.122861640000000E+03),\n new google.maps.LatLng( 0.462219750000000E+02, -0.122860653000000E+03),\n new google.maps.LatLng( 0.462220460000000E+02, -0.122853737000000E+03),\n new google.maps.LatLng( 0.462209290000000E+02, -0.122844317000000E+03),\n new google.maps.LatLng( 0.462225070000000E+02, -0.122842506000000E+03),\n new google.maps.LatLng( 0.462245180000000E+02, -0.122842639000000E+03),\n new google.maps.LatLng( 0.462279250000000E+02, -0.122841587000000E+03),\n new google.maps.LatLng( 0.462279250000000E+02, -0.122841587000000E+03),\n new google.maps.LatLng( 0.462315860000000E+02, -0.122838909000000E+03),\n new google.maps.LatLng( 0.462345630000000E+02, -0.122831666000000E+03),\n new google.maps.LatLng( 0.462371180000000E+02, -0.122818202000000E+03),\n new google.maps.LatLng( 0.462370270000000E+02, -0.122814941000000E+03),\n new google.maps.LatLng( 0.462359490000000E+02, -0.122810818000000E+03),\n new google.maps.LatLng( 0.462392900000000E+02, -0.122804003000000E+03),\n new google.maps.LatLng( 0.462441360000000E+02, -0.122804595000000E+03),\n new google.maps.LatLng( 0.462435200000000E+02, -0.122812766000000E+03),\n new google.maps.LatLng( 0.462494660000000E+02, -0.122815633000000E+03),\n new google.maps.LatLng( 0.462502540000000E+02, -0.122810526000000E+03),\n new google.maps.LatLng( 0.462503340000000E+02, -0.122802222000000E+03),\n new google.maps.LatLng( 0.462502190000000E+02, -0.122800641000000E+03),\n new google.maps.LatLng( 0.462486620000000E+02, -0.122797807000000E+03),\n new google.maps.LatLng( 0.462485700000000E+02, -0.122792502000000E+03),\n new google.maps.LatLng( 0.462498350000000E+02, -0.122791958000000E+03),\n new google.maps.LatLng( 0.462516570000000E+02, -0.122792732000000E+03),\n new google.maps.LatLng( 0.462579670000000E+02, -0.122800375000000E+03),\n new google.maps.LatLng( 0.462618310000000E+02, -0.122808020000000E+03),\n new google.maps.LatLng( 0.462621970000000E+02, -0.122811712000000E+03),\n new google.maps.LatLng( 0.462627230000000E+02, -0.122812404000000E+03),\n new google.maps.LatLng( 0.462639800000000E+02, -0.122812635000000E+03),\n new google.maps.LatLng( 0.462655800000000E+02, -0.122812041000000E+03),\n new google.maps.LatLng( 0.462655800000000E+02, -0.122812041000000E+03),\n new google.maps.LatLng( 0.462669970000000E+02, -0.122807954000000E+03),\n new google.maps.LatLng( 0.462692370000000E+02, -0.122806009000000E+03),\n new google.maps.LatLng( 0.462741060000000E+02, -0.122803866000000E+03),\n new google.maps.LatLng( 0.462790210000000E+02, -0.122804293000000E+03),\n new google.maps.LatLng( 0.462803470000000E+02, -0.122803930000000E+03),\n new google.maps.LatLng( 0.462817190000000E+02, -0.122802578000000E+03),\n new google.maps.LatLng( 0.462882080000000E+02, -0.122785662000000E+03),\n new google.maps.LatLng( 0.462904250000000E+02, -0.122783154000000E+03),\n new google.maps.LatLng( 0.462911090000000E+02, -0.122779626000000E+03),\n new google.maps.LatLng( 0.462910370000000E+02, -0.122768975000000E+03),\n new google.maps.LatLng( 0.462915140000000E+02, -0.122762610000000E+03),\n new google.maps.LatLng( 0.462912170000000E+02, -0.122761061000000E+03),\n new google.maps.LatLng( 0.462891350000000E+02, -0.122757996000000E+03),\n new google.maps.LatLng( 0.462904810000000E+02, -0.122749922000000E+03),\n new google.maps.LatLng( 0.462964280000000E+02, -0.122742410000000E+03),\n new google.maps.LatLng( 0.462985550000000E+02, -0.122741950000000E+03),\n new google.maps.LatLng( 0.462985550000000E+02, -0.122741950000000E+03),\n new google.maps.LatLng( 0.462960680000000E+02, -0.122730406000000E+03),\n new google.maps.LatLng( 0.462882750000000E+02, -0.122721464000000E+03),\n new google.maps.LatLng( 0.462816460000000E+02, -0.122721262000000E+03),\n new google.maps.LatLng( 0.462792750000000E+02, -0.122722634000000E+03),\n new google.maps.LatLng( 0.462781800000000E+02, -0.122720133000000E+03),\n new google.maps.LatLng( 0.462784080000000E+02, -0.122719309000000E+03),\n new google.maps.LatLng( 0.462804870000000E+02, -0.122717046000000E+03),\n new google.maps.LatLng( 0.462837110000000E+02, -0.122715811000000E+03),\n new google.maps.LatLng( 0.462869570000000E+02, -0.122715776000000E+03),\n new google.maps.LatLng( 0.462888760000000E+02, -0.122713005000000E+03),\n new google.maps.LatLng( 0.462910680000000E+02, -0.122708057000000E+03),\n new google.maps.LatLng( 0.462948600000000E+02, -0.122702448000000E+03),\n new google.maps.LatLng( 0.462962080000000E+02, -0.122699182000000E+03),\n new google.maps.LatLng( 0.462969880000000E+02, -0.122683478000000E+03),\n new google.maps.LatLng( 0.463000970000000E+02, -0.122682026000000E+03),\n new google.maps.LatLng( 0.463009890000000E+02, -0.122678992000000E+03),\n new google.maps.LatLng( 0.463005310000000E+02, -0.122678200000000E+03),\n new google.maps.LatLng( 0.462960960000000E+02, -0.122676221000000E+03),\n new google.maps.LatLng( 0.462893280000000E+02, -0.122665935000000E+03),\n new google.maps.LatLng( 0.462887560000000E+02, -0.122663133000000E+03),\n new google.maps.LatLng( 0.462890760000000E+02, -0.122662242000000E+03),\n new google.maps.LatLng( 0.462922990000000E+02, -0.122659833000000E+03),\n new google.maps.LatLng( 0.462929620000000E+02, -0.122659899000000E+03),\n new google.maps.LatLng( 0.462941740000000E+02, -0.122662668000000E+03),\n new google.maps.LatLng( 0.462960720000000E+02, -0.122664382000000E+03),\n new google.maps.LatLng( 0.462991560000000E+02, -0.122664084000000E+03),\n new google.maps.LatLng( 0.463030190000000E+02, -0.122661081000000E+03),\n new google.maps.LatLng( 0.463035670000000E+02, -0.122659300000000E+03),\n new google.maps.LatLng( 0.463032010000000E+02, -0.122658607000000E+03),\n new google.maps.LatLng( 0.462970680000000E+02, -0.122654447000000E+03),\n new google.maps.LatLng( 0.462958390000000E+02, -0.122651983000000E+03),\n new google.maps.LatLng( 0.462943750000000E+02, -0.122650599000000E+03),\n new google.maps.LatLng( 0.462844760000000E+02, -0.122648726000000E+03),\n new google.maps.LatLng( 0.462820080000000E+02, -0.122650838000000E+03),\n new google.maps.LatLng( 0.462801920000000E+02, -0.122650317000000E+03),\n new google.maps.LatLng( 0.462807710000000E+02, -0.122643223000000E+03),\n new google.maps.LatLng( 0.462779800000000E+02, -0.122637786000000E+03),\n new google.maps.LatLng( 0.462759420000000E+02, -0.122631161000000E+03),\n new google.maps.LatLng( 0.462758260000000E+02, -0.122628359000000E+03),\n new google.maps.LatLng( 0.462707080000000E+02, -0.122620745000000E+03),\n new google.maps.LatLng( 0.462670520000000E+02, -0.122617841000000E+03),\n new google.maps.LatLng( 0.462660000000000E+02, -0.122617807000000E+03),\n new google.maps.LatLng( 0.462635980000000E+02, -0.122621364000000E+03),\n new google.maps.LatLng( 0.462621790000000E+02, -0.122624889000000E+03),\n new google.maps.LatLng( 0.462587290000000E+02, -0.122622281000000E+03),\n new google.maps.LatLng( 0.462586880000000E+02, -0.122618211000000E+03),\n new google.maps.LatLng( 0.462597140000000E+02, -0.122616830000000E+03),\n new google.maps.LatLng( 0.462615930000000E+02, -0.122618335000000E+03),\n new google.maps.LatLng( 0.462620060000000E+02, -0.122619581000000E+03),\n new google.maps.LatLng( 0.462627290000000E+02, -0.122619104000000E+03),\n new google.maps.LatLng( 0.462628350000000E+02, -0.122613460000000E+03),\n new google.maps.LatLng( 0.462608550000000E+02, -0.122606788000000E+03),\n new google.maps.LatLng( 0.462591970000000E+02, -0.122594484000000E+03),\n new google.maps.LatLng( 0.462595540000000E+02, -0.122592701000000E+03),\n new google.maps.LatLng( 0.462552040000000E+02, -0.122585303000000E+03),\n new google.maps.LatLng( 0.462522830000000E+02, -0.122582568000000E+03),\n new google.maps.LatLng( 0.462504810000000E+02, -0.122579758000000E+03),\n new google.maps.LatLng( 0.462491550000000E+02, -0.122574170000000E+03),\n new google.maps.LatLng( 0.462521580000000E+02, -0.122576537000000E+03),\n new google.maps.LatLng( 0.462522270000000E+02, -0.122568793000000E+03),\n new google.maps.LatLng( 0.462504220000000E+02, -0.122566223000000E+03),\n new google.maps.LatLng( 0.462493890000000E+02, -0.122559485000000E+03),\n new google.maps.LatLng( 0.462505130000000E+02, -0.122559435000000E+03),\n new google.maps.LatLng( 0.462510160000000E+02, -0.122565564000000E+03),\n new google.maps.LatLng( 0.462526850000000E+02, -0.122568101000000E+03),\n new google.maps.LatLng( 0.462532320000000E+02, -0.122578778000000E+03),\n new google.maps.LatLng( 0.462586030000000E+02, -0.122586129000000E+03),\n new google.maps.LatLng( 0.462607750000000E+02, -0.122586987000000E+03),\n new google.maps.LatLng( 0.462610720000000E+02, -0.122587547000000E+03),\n new google.maps.LatLng( 0.462609800000000E+02, -0.122592293000000E+03),\n new google.maps.LatLng( 0.462619380000000E+02, -0.122598951000000E+03),\n new google.maps.LatLng( 0.462624860000000E+02, -0.122601028000000E+03),\n new google.maps.LatLng( 0.462642460000000E+02, -0.122604259000000E+03),\n new google.maps.LatLng( 0.462642890000000E+02, -0.122609433000000E+03),\n new google.maps.LatLng( 0.462685600000000E+02, -0.122617974000000E+03),\n new google.maps.LatLng( 0.462722390000000E+02, -0.122620812000000E+03),\n new google.maps.LatLng( 0.462755970000000E+02, -0.122626219000000E+03),\n new google.maps.LatLng( 0.462777940000000E+02, -0.122632544000000E+03),\n new google.maps.LatLng( 0.462790770000000E+02, -0.122638049000000E+03),\n new google.maps.LatLng( 0.462808150000000E+02, -0.122639827000000E+03),\n new google.maps.LatLng( 0.462832390000000E+02, -0.122640616000000E+03),\n new google.maps.LatLng( 0.462845640000000E+02, -0.122639956000000E+03),\n new google.maps.LatLng( 0.462884260000000E+02, -0.122636457000000E+03),\n new google.maps.LatLng( 0.462923810000000E+02, -0.122636124000000E+03),\n new google.maps.LatLng( 0.462976860000000E+02, -0.122639713000000E+03),\n new google.maps.LatLng( 0.463022580000000E+02, -0.122639907000000E+03),\n new google.maps.LatLng( 0.463078840000000E+02, -0.122648263000000E+03),\n new google.maps.LatLng( 0.463116590000000E+02, -0.122655766000000E+03),\n new google.maps.LatLng( 0.463093700000000E+02, -0.122647158000000E+03),\n new google.maps.LatLng( 0.463150350000000E+02, -0.122636531000000E+03),\n new google.maps.LatLng( 0.463194700000000E+02, -0.122637549000000E+03),\n new google.maps.LatLng( 0.463217790000000E+02, -0.122637580000000E+03),\n new google.maps.LatLng( 0.463234240000000E+02, -0.122636721000000E+03),\n new google.maps.LatLng( 0.463249540000000E+02, -0.122633123000000E+03),\n new google.maps.LatLng( 0.463260510000000E+02, -0.122632528000000E+03),\n new google.maps.LatLng( 0.463272170000000E+02, -0.122632526000000E+03),\n new google.maps.LatLng( 0.463310130000000E+02, -0.122634668000000E+03),\n new google.maps.LatLng( 0.463335960000000E+02, -0.122634402000000E+03),\n new google.maps.LatLng( 0.463351710000000E+02, -0.122632981000000E+03),\n new google.maps.LatLng( 0.463368370000000E+02, -0.122625302000000E+03),\n new google.maps.LatLng( 0.463390100000000E+02, -0.122622962000000E+03),\n new google.maps.LatLng( 0.463394680000000E+02, -0.122621840000000E+03),\n new google.maps.LatLng( 0.463393310000000E+02, -0.122620355000000E+03),\n new google.maps.LatLng( 0.463371160000000E+02, -0.122616293000000E+03),\n new google.maps.LatLng( 0.463370540000000E+02, -0.122612590000000E+03),\n new google.maps.LatLng( 0.463390400000000E+02, -0.122605575000000E+03),\n new google.maps.LatLng( 0.463420140000000E+02, -0.122605284000000E+03),\n new google.maps.LatLng( 0.463465760000000E+02, -0.122610432000000E+03),\n new google.maps.LatLng( 0.463469710000000E+02, -0.122619131000000E+03),\n new google.maps.LatLng( 0.463487290000000E+02, -0.122615018000000E+03),\n new google.maps.LatLng( 0.463520020000000E+02, -0.122603829000000E+03),\n new google.maps.LatLng( 0.463518680000000E+02, -0.122593397000000E+03),\n new google.maps.LatLng( 0.463513080000000E+02, -0.122589113000000E+03),\n new google.maps.LatLng( 0.463600080000000E+02, -0.122580360000000E+03),\n new google.maps.LatLng( 0.463638820000000E+02, -0.122574363000000E+03),\n new google.maps.LatLng( 0.463638860000000E+02, -0.122572869000000E+03),\n new google.maps.LatLng( 0.463621620000000E+02, -0.122572300000000E+03),\n new google.maps.LatLng( 0.463612750000000E+02, -0.122571390000000E+03),\n new google.maps.LatLng( 0.463617370000000E+02, -0.122569870000000E+03),\n new google.maps.LatLng( 0.463629670000000E+02, -0.122569677000000E+03),\n new google.maps.LatLng( 0.463630870000000E+02, -0.122569294000000E+03),\n new google.maps.LatLng( 0.463632630000000E+02, -0.122566339000000E+03),\n new google.maps.LatLng( 0.463626160000000E+02, -0.122565166000000E+03),\n new google.maps.LatLng( 0.463625280000000E+02, -0.122559857000000E+03),\n new google.maps.LatLng( 0.463608540000000E+02, -0.122555267000000E+03),\n new google.maps.LatLng( 0.463585680000000E+02, -0.122552230000000E+03),\n new google.maps.LatLng( 0.463564420000000E+02, -0.122551603000000E+03),\n new google.maps.LatLng( 0.463537680000000E+02, -0.122553123000000E+03),\n new google.maps.LatLng( 0.463516880000000E+02, -0.122552727000000E+03),\n new google.maps.LatLng( 0.463494930000000E+02, -0.122549261000000E+03),\n new google.maps.LatLng( 0.463494920000000E+02, -0.122546753000000E+03),\n new google.maps.LatLng( 0.463422220000000E+02, -0.122542331000000E+03),\n new google.maps.LatLng( 0.463407590000000E+02, -0.122542596000000E+03),\n new google.maps.LatLng( 0.463385430000000E+02, -0.122545369000000E+03),\n new google.maps.LatLng( 0.463362790000000E+02, -0.122544314000000E+03),\n new google.maps.LatLng( 0.463354790000000E+02, -0.122543390000000E+03),\n new google.maps.LatLng( 0.463337640000000E+02, -0.122540091000000E+03),\n new google.maps.LatLng( 0.463338310000000E+02, -0.122532896000000E+03),\n new google.maps.LatLng( 0.463318170000000E+02, -0.122526958000000E+03),\n new google.maps.LatLng( 0.463236780000000E+02, -0.122515225000000E+03),\n new google.maps.LatLng( 0.463263360000000E+02, -0.122513593000000E+03),\n new google.maps.LatLng( 0.463271250000000E+02, -0.122512211000000E+03),\n new google.maps.LatLng( 0.463254520000000E+02, -0.122503964000000E+03),\n new google.maps.LatLng( 0.463209520000000E+02, -0.122493519000000E+03),\n new google.maps.LatLng( 0.463197450000000E+02, -0.122484280000000E+03),\n new google.maps.LatLng( 0.463203350000000E+02, -0.122483435000000E+03),\n new google.maps.LatLng( 0.463224820000000E+02, -0.122495632000000E+03),\n new google.maps.LatLng( 0.463259310000000E+02, -0.122501931000000E+03),\n new google.maps.LatLng( 0.463265250000000E+02, -0.122500553000000E+03),\n new google.maps.LatLng( 0.463242680000000E+02, -0.122491740000000E+03),\n new google.maps.LatLng( 0.463254370000000E+02, -0.122484417000000E+03),\n new google.maps.LatLng( 0.463254160000000E+02, -0.122478840000000E+03),\n new google.maps.LatLng( 0.463285950000000E+02, -0.122472441000000E+03),\n new google.maps.LatLng( 0.463276370000000E+02, -0.122464025000000E+03),\n new google.maps.LatLng( 0.463265180000000E+02, -0.122462441000000E+03),\n new google.maps.LatLng( 0.463280050000000E+02, -0.122456139000000E+03),\n new google.maps.LatLng( 0.463280280000000E+02, -0.122451784000000E+03),\n new google.maps.LatLng( 0.463267710000000E+02, -0.122446999000000E+03),\n new google.maps.LatLng( 0.463259030000000E+02, -0.122445745000000E+03),\n new google.maps.LatLng( 0.463270800000000E+02, -0.122441505000000E+03),\n new google.maps.LatLng( 0.463283740000000E+02, -0.122439864000000E+03),\n new google.maps.LatLng( 0.463295480000000E+02, -0.122439646000000E+03),\n new google.maps.LatLng( 0.463326570000000E+02, -0.122447784000000E+03),\n new google.maps.LatLng( 0.463328830000000E+02, -0.122450164000000E+03),\n new google.maps.LatLng( 0.463325440000000E+02, -0.122463049000000E+03),\n new google.maps.LatLng( 0.463311280000000E+02, -0.122473389000000E+03),\n new google.maps.LatLng( 0.463300270000000E+02, -0.122478595000000E+03),\n new google.maps.LatLng( 0.463290870000000E+02, -0.122478779000000E+03),\n new google.maps.LatLng( 0.463279400000000E+02, -0.122481984000000E+03),\n new google.maps.LatLng( 0.463271460000000E+02, -0.122486574000000E+03),\n new google.maps.LatLng( 0.463388540000000E+02, -0.122512672000000E+03),\n new google.maps.LatLng( 0.463443900000000E+02, -0.122519750000000E+03),\n new google.maps.LatLng( 0.463506300000000E+02, -0.122525723000000E+03),\n new google.maps.LatLng( 0.463589350000000E+02, -0.122527969000000E+03),\n new google.maps.LatLng( 0.463642530000000E+02, -0.122527921000000E+03),\n new google.maps.LatLng( 0.463668050000000E+02, -0.122525876000000E+03),\n new google.maps.LatLng( 0.463720040000000E+02, -0.122527096000000E+03),\n new google.maps.LatLng( 0.463716600000000E+02, -0.122524455000000E+03),\n new google.maps.LatLng( 0.463674510000000E+02, -0.122515740000000E+03),\n new google.maps.LatLng( 0.463665130000000E+02, -0.122514849000000E+03),\n new google.maps.LatLng( 0.463647760000000E+02, -0.122514586000000E+03),\n new google.maps.LatLng( 0.463635860000000E+02, -0.122513134000000E+03),\n new google.maps.LatLng( 0.463640410000000E+02, -0.122507422000000E+03),\n new google.maps.LatLng( 0.463628030000000E+02, -0.122502041000000E+03),\n new google.maps.LatLng( 0.463590810000000E+02, -0.122492600000000E+03),\n new google.maps.LatLng( 0.463572090000000E+02, -0.122489924000000E+03),\n new google.maps.LatLng( 0.463554970000000E+02, -0.122483947000000E+03),\n new google.maps.LatLng( 0.463553830000000E+02, -0.122482823000000E+03),\n new google.maps.LatLng( 0.463564350000000E+02, -0.122481636000000E+03),\n new google.maps.LatLng( 0.463576690000000E+02, -0.122482232000000E+03),\n new google.maps.LatLng( 0.463593140000000E+02, -0.122484082000000E+03),\n new google.maps.LatLng( 0.463594280000000E+02, -0.122485139000000E+03),\n new google.maps.LatLng( 0.463615980000000E+02, -0.122488904000000E+03),\n new google.maps.LatLng( 0.463646850000000E+02, -0.122487388000000E+03),\n new google.maps.LatLng( 0.463676560000000E+02, -0.122487985000000E+03),\n new google.maps.LatLng( 0.463682500000000E+02, -0.122488943000000E+03),\n new google.maps.LatLng( 0.463680870000000E+02, -0.122493962000000E+03),\n new google.maps.LatLng( 0.463691360000000E+02, -0.122499610000000E+03),\n new google.maps.LatLng( 0.463700950000000E+02, -0.122503288000000E+03),\n new google.maps.LatLng( 0.463712620000000E+02, -0.122503914000000E+03),\n new google.maps.LatLng( 0.463732060000000E+02, -0.122507181000000E+03),\n new google.maps.LatLng( 0.463739420000000E+02, -0.122513555000000E+03),\n new google.maps.LatLng( 0.463796210000000E+02, -0.122516584000000E+03),\n new google.maps.LatLng( 0.463811360000000E+02, -0.122516749000000E+03),\n new google.maps.LatLng( 0.463819280000000E+02, -0.122519065000000E+03),\n new google.maps.LatLng( 0.463822270000000E+02, -0.122523787000000E+03),\n new google.maps.LatLng( 0.463809700000000E+02, -0.122525341000000E+03),\n new google.maps.LatLng( 0.463783880000000E+02, -0.122526763000000E+03),\n new google.maps.LatLng( 0.463776110000000E+02, -0.122527886000000E+03),\n new google.maps.LatLng( 0.463773830000000E+02, -0.122529538000000E+03),\n new google.maps.LatLng( 0.463788930000000E+02, -0.122534689000000E+03),\n new google.maps.LatLng( 0.463797620000000E+02, -0.122535779000000E+03),\n new google.maps.LatLng( 0.463831000000000E+02, -0.122537197000000E+03),\n new google.maps.LatLng( 0.463846080000000E+02, -0.122536899000000E+03),\n new google.maps.LatLng( 0.463852030000000E+02, -0.122537493000000E+03),\n new google.maps.LatLng( 0.463852030000000E+02, -0.122539706000000E+03),\n new google.maps.LatLng( 0.463836720000000E+02, -0.122541755000000E+03),\n new google.maps.LatLng( 0.463813180000000E+02, -0.122543374000000E+03),\n new google.maps.LatLng( 0.463810900000000E+02, -0.122545753000000E+03),\n new google.maps.LatLng( 0.463824160000000E+02, -0.122550938000000E+03),\n new google.maps.LatLng( 0.463837190000000E+02, -0.122553844000000E+03),\n new google.maps.LatLng( 0.463870110000000E+02, -0.122556552000000E+03),\n new google.maps.LatLng( 0.463875280000000E+02, -0.122556448000000E+03),\n new google.maps.LatLng( 0.463875280000000E+02, -0.122556448000000E+03),\n new google.maps.LatLng( 0.463871120000000E+02, -0.122445587000000E+03),\n new google.maps.LatLng( 0.463874970000000E+02, -0.122419442000000E+03),\n new google.maps.LatLng( 0.463869920000000E+02, -0.122363920000000E+03),\n new google.maps.LatLng( 0.463859950000000E+02, -0.122363691000000E+03),\n new google.maps.LatLng( 0.463853000000000E+02, -0.122244911000000E+03),\n new google.maps.LatLng( 0.463856540000000E+02, -0.122242764666667E+03),\n new google.maps.LatLng( 0.463863700000000E+02, -0.122241687000000E+03),\n new google.maps.LatLng( 0.463864630000000E+02, -0.122114093000000E+03),\n new google.maps.LatLng( 0.463881900000000E+02, -0.122114073000000E+03),\n new google.maps.LatLng( 0.463883900000000E+02, -0.122068997000000E+03),\n new google.maps.LatLng( 0.463883900000000E+02, -0.122068997000000E+03),\n new google.maps.LatLng( 0.463875810000000E+02, -0.121878057000000E+03),\n new google.maps.LatLng( 0.463875810000000E+02, -0.121878057000000E+03),\n new google.maps.LatLng( 0.463884740000000E+02, -0.121863905000000E+03),\n new google.maps.LatLng( 0.463888800000000E+02, -0.121819796000000E+03),\n new google.maps.LatLng( 0.463880890000000E+02, -0.121748789000000E+03),\n new google.maps.LatLng( 0.463880890000000E+02, -0.121748789000000E+03),\n new google.maps.LatLng( 0.463881580000000E+02, -0.121572761000000E+03),\n new google.maps.LatLng( 0.463881580000000E+02, -0.121572761000000E+03),\n new google.maps.LatLng( 0.463881790000000E+02, -0.121550852000000E+03),\n new google.maps.LatLng( 0.460711720000000E+02, -0.122167422000000E+03),\n new google.maps.LatLng( 0.460693650000000E+02, -0.122164696000000E+03),\n new google.maps.LatLng( 0.460689540000000E+02, -0.122165156000000E+03),\n new google.maps.LatLng( 0.460685680000000E+02, -0.122180954000000E+03),\n new google.maps.LatLng( 0.460663730000000E+02, -0.122183910000000E+03),\n new google.maps.LatLng( 0.460665790000000E+02, -0.122186931000000E+03),\n new google.maps.LatLng( 0.460805460000000E+02, -0.122198592000000E+03),\n new google.maps.LatLng( 0.460831980000000E+02, -0.122199053000000E+03),\n new google.maps.LatLng( 0.460836550000000E+02, -0.122199907000000E+03),\n new google.maps.LatLng( 0.460834720000000E+02, -0.122201385000000E+03),\n new google.maps.LatLng( 0.460805000000000E+02, -0.122201614000000E+03),\n new google.maps.LatLng( 0.460754940000000E+02, -0.122200694000000E+03),\n new google.maps.LatLng( 0.460720190000000E+02, -0.122199116000000E+03),\n new google.maps.LatLng( 0.460672880000000E+02, -0.122195700000000E+03),\n new google.maps.LatLng( 0.460668310000000E+02, -0.122195667000000E+03),\n new google.maps.LatLng( 0.460645670000000E+02, -0.122198787000000E+03),\n new google.maps.LatLng( 0.460602930000000E+02, -0.122197603000000E+03),\n new google.maps.LatLng( 0.460596300000000E+02, -0.122196651000000E+03),\n new google.maps.LatLng( 0.460561320000000E+02, -0.122182466000000E+03),\n new google.maps.LatLng( 0.460580750000000E+02, -0.122177672000000E+03),\n new google.maps.LatLng( 0.460581830000000E+02, -0.122149334000000E+03),\n new google.maps.LatLng( 0.460535590000000E+02, -0.122133052000000E+03),\n new google.maps.LatLng( 0.460535810000000E+02, -0.122130426000000E+03),\n new google.maps.LatLng( 0.460526430000000E+02, -0.122125392000000E+03),\n new google.maps.LatLng( 0.460497650000000E+02, -0.122120497000000E+03),\n new google.maps.LatLng( 0.460479820000000E+02, -0.122120298000000E+03),\n new google.maps.LatLng( 0.460416950000000E+02, -0.122121407000000E+03),\n new google.maps.LatLng( 0.460365070000000E+02, -0.122119958000000E+03),\n new google.maps.LatLng( 0.460381530000000E+02, -0.122118647000000E+03),\n new google.maps.LatLng( 0.460411480000000E+02, -0.122117698000000E+03),\n new google.maps.LatLng( 0.460433420000000E+02, -0.122118422000000E+03),\n new google.maps.LatLng( 0.460459720000000E+02, -0.122117210000000E+03),\n new google.maps.LatLng( 0.460478250000000E+02, -0.122113798000000E+03),\n new google.maps.LatLng( 0.460479630000000E+02, -0.122112123000000E+03),\n new google.maps.LatLng( 0.460467770000000E+02, -0.122104802000000E+03),\n new google.maps.LatLng( 0.460445150000000E+02, -0.122099811000000E+03),\n new google.maps.LatLng( 0.460443580000000E+02, -0.122092227000000E+03),\n new google.maps.LatLng( 0.460397640000000E+02, -0.122087005000000E+03),\n new google.maps.LatLng( 0.460387580000000E+02, -0.122086611000000E+03),\n new google.maps.LatLng( 0.460362890000000E+02, -0.122087365000000E+03),\n new google.maps.LatLng( 0.460343460000000E+02, -0.122089235000000E+03),\n new google.maps.LatLng( 0.460298880000000E+02, -0.122091661000000E+03),\n new google.maps.LatLng( 0.460268020000000E+02, -0.122091496000000E+03),\n new google.maps.LatLng( 0.460258650000000E+02, -0.122090445000000E+03),\n new google.maps.LatLng( 0.460259790000000E+02, -0.122090084000000E+03),\n new google.maps.LatLng( 0.460295450000000E+02, -0.122089167000000E+03),\n new google.maps.LatLng( 0.460324490000000E+02, -0.122084081000000E+03),\n new google.maps.LatLng( 0.460378910000000E+02, -0.122079160000000E+03),\n new google.maps.LatLng( 0.460391940000000E+02, -0.122078537000000E+03),\n new google.maps.LatLng( 0.460417770000000E+02, -0.122079686000000E+03),\n new google.maps.LatLng( 0.460425310000000E+02, -0.122079424000000E+03),\n new google.maps.LatLng( 0.460444060000000E+02, -0.122071940000000E+03),\n new google.maps.LatLng( 0.460430810000000E+02, -0.122066326000000E+03),\n new google.maps.LatLng( 0.460424190000000E+02, -0.122056609000000E+03),\n new google.maps.LatLng( 0.460438360000000E+02, -0.122055099000000E+03),\n new google.maps.LatLng( 0.460450470000000E+02, -0.122052506000000E+03),\n new google.maps.LatLng( 0.460450700000000E+02, -0.122050470000000E+03),\n new google.maps.LatLng( 0.460442240000000E+02, -0.122049289000000E+03),\n new google.maps.LatLng( 0.460456400000000E+02, -0.122041377000000E+03),\n new google.maps.LatLng( 0.460479020000000E+02, -0.122037306000000E+03),\n new google.maps.LatLng( 0.460505500000000E+02, -0.122025747000000E+03),\n new google.maps.LatLng( 0.460525380000000E+02, -0.122023316000000E+03),\n new google.maps.LatLng( 0.460573840000000E+02, -0.122021540000000E+03),\n new google.maps.LatLng( 0.460617730000000E+02, -0.122023408000000E+03),\n new google.maps.LatLng( 0.460630530000000E+02, -0.122023309000000E+03),\n new google.maps.LatLng( 0.460661150000000E+02, -0.122019070000000E+03),\n new google.maps.LatLng( 0.460700010000000E+02, -0.122019100000000E+03),\n new google.maps.LatLng( 0.460705270000000E+02, -0.122018640000000E+03),\n new google.maps.LatLng( 0.460709830000000E+02, -0.122015913000000E+03),\n new google.maps.LatLng( 0.460688540000000E+02, -0.122008953000000E+03),\n new google.maps.LatLng( 0.460693300000000E+02, -0.122002056000000E+03),\n new google.maps.LatLng( 0.460696500000000E+02, -0.122001198000000E+03),\n new google.maps.LatLng( 0.460722120000000E+02, -0.121999620000000E+03),\n new google.maps.LatLng( 0.460724880000000E+02, -0.121995384000000E+03),\n new google.maps.LatLng( 0.460729220000000E+02, -0.121996534000000E+03),\n new google.maps.LatLng( 0.460727380000000E+02, -0.121999424000000E+03),\n new google.maps.LatLng( 0.460718000000000E+02, -0.122000733000000E+03),\n new google.maps.LatLng( 0.460704390000000E+02, -0.122001198000000E+03),\n new google.maps.LatLng( 0.460695820000000E+02, -0.122002450000000E+03),\n new google.maps.LatLng( 0.460696310000000E+02, -0.122009543000000E+03),\n new google.maps.LatLng( 0.460715320000000E+02, -0.122016964000000E+03),\n new google.maps.LatLng( 0.460709380000000E+02, -0.122019296000000E+03),\n new google.maps.LatLng( 0.460685610000000E+02, -0.122020480000000E+03),\n new google.maps.LatLng( 0.460645620000000E+02, -0.122023734000000E+03),\n new google.maps.LatLng( 0.460597180000000E+02, -0.122030075000000E+03),\n new google.maps.LatLng( 0.460570900000000E+02, -0.122032015000000E+03),\n new google.maps.LatLng( 0.460554900000000E+02, -0.122032015000000E+03),\n new google.maps.LatLng( 0.460532740000000E+02, -0.122036482000000E+03),\n new google.maps.LatLng( 0.460513320000000E+02, -0.122043673000000E+03),\n new google.maps.LatLng( 0.460521100000000E+02, -0.122045380000000E+03),\n new google.maps.LatLng( 0.460530700000000E+02, -0.122045117000000E+03),\n new google.maps.LatLng( 0.460534360000000E+02, -0.122045708000000E+03),\n new google.maps.LatLng( 0.460530700000000E+02, -0.122048663000000E+03),\n new google.maps.LatLng( 0.460514470000000E+02, -0.122053095000000E+03),\n new google.maps.LatLng( 0.460520640000000E+02, -0.122061467000000E+03),\n new google.maps.LatLng( 0.460535270000000E+02, -0.122068231000000E+03),\n new google.maps.LatLng( 0.460536870000000E+02, -0.122075618000000E+03),\n new google.maps.LatLng( 0.460598120000000E+02, -0.122085897000000E+03),\n new google.maps.LatLng( 0.460604290000000E+02, -0.122088197000000E+03),\n new google.maps.LatLng( 0.460612270000000E+02, -0.122096472000000E+03),\n new google.maps.LatLng( 0.460597780000000E+02, -0.122118997000000E+03),\n new google.maps.LatLng( 0.460623140000000E+02, -0.122132978000000E+03),\n new google.maps.LatLng( 0.460646010000000E+02, -0.122135537000000E+03),\n new google.maps.LatLng( 0.460662940000000E+02, -0.122139311000000E+03),\n new google.maps.LatLng( 0.460657940000000E+02, -0.122145618000000E+03),\n new google.maps.LatLng( 0.460652230000000E+02, -0.122146768000000E+03),\n new google.maps.LatLng( 0.460656360000000E+02, -0.122152777000000E+03),\n new google.maps.LatLng( 0.460667570000000E+02, -0.122156684000000E+03),\n new google.maps.LatLng( 0.460711720000000E+02, -0.122167422000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "bb43c29fe0bc6ec0d078395ab492efec", "score": "0.5976303", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.477367820000000E+02, -0.120368836000000E+03),\n new google.maps.LatLng( 0.477307540000000E+02, -0.120374298000000E+03),\n new google.maps.LatLng( 0.477290610000000E+02, -0.120378666000000E+03),\n new google.maps.LatLng( 0.477283100000000E+02, -0.120373043000000E+03),\n new google.maps.LatLng( 0.477292470000000E+02, -0.120371317000000E+03),\n new google.maps.LatLng( 0.477292030000000E+02, -0.120368675000000E+03),\n new google.maps.LatLng( 0.477284040000000E+02, -0.120367049000000E+03),\n new google.maps.LatLng( 0.477246110000000E+02, -0.120369619000000E+03),\n new google.maps.LatLng( 0.477226000000000E+02, -0.120372291000000E+03),\n new google.maps.LatLng( 0.477207260000000E+02, -0.120373508000000E+03),\n new google.maps.LatLng( 0.477194880000000E+02, -0.120373698000000E+03),\n new google.maps.LatLng( 0.477194880000000E+02, -0.120373698000000E+03),\n new google.maps.LatLng( 0.477217100000000E+02, -0.120369582000000E+03),\n new google.maps.LatLng( 0.477227620000000E+02, -0.120366536000000E+03),\n new google.maps.LatLng( 0.477223970000000E+02, -0.120365317000000E+03),\n new google.maps.LatLng( 0.477173500000000E+02, -0.120361826000000E+03),\n new google.maps.LatLng( 0.477123720000000E+02, -0.120357083000000E+03),\n new google.maps.LatLng( 0.477107960000000E+02, -0.120357251000000E+03),\n new google.maps.LatLng( 0.477074580000000E+02, -0.120363543000000E+03),\n new google.maps.LatLng( 0.477074580000000E+02, -0.120364660000000E+03),\n new google.maps.LatLng( 0.477095580000000E+02, -0.120368013000000E+03),\n new google.maps.LatLng( 0.477106760000000E+02, -0.120371669000000E+03),\n new google.maps.LatLng( 0.477066540000000E+02, -0.120383600000000E+03),\n new google.maps.LatLng( 0.477044850000000E+02, -0.120385328000000E+03),\n new google.maps.LatLng( 0.477031140000000E+02, -0.120385160000000E+03),\n new google.maps.LatLng( 0.477001200000000E+02, -0.120378632000000E+03),\n new google.maps.LatLng( 0.476982860000000E+02, -0.120377267000000E+03),\n new google.maps.LatLng( 0.476973370000000E+02, -0.120377101000000E+03),\n new google.maps.LatLng( 0.476940220000000E+02, -0.120383851000000E+03),\n new google.maps.LatLng( 0.476906400000000E+02, -0.120384862000000E+03),\n new google.maps.LatLng( 0.476871960000000E+02, -0.120394683000000E+03),\n new google.maps.LatLng( 0.476850950000000E+02, -0.120397189000000E+03),\n new google.maps.LatLng( 0.476845480000000E+02, -0.120401181000000E+03),\n new google.maps.LatLng( 0.476861710000000E+02, -0.120402837000000E+03),\n new google.maps.LatLng( 0.476872670000000E+02, -0.120402938000000E+03),\n new google.maps.LatLng( 0.476879760000000E+02, -0.120403749000000E+03),\n new google.maps.LatLng( 0.476898750000000E+02, -0.120413525000000E+03),\n new google.maps.LatLng( 0.476930360000000E+02, -0.120417708000000E+03),\n new google.maps.LatLng( 0.476942850000000E+02, -0.120422354000000E+03),\n new google.maps.LatLng( 0.476949490000000E+02, -0.120430576000000E+03),\n new google.maps.LatLng( 0.476934430000000E+02, -0.120442483000000E+03),\n new google.maps.LatLng( 0.476876900000000E+02, -0.120450176000000E+03),\n new google.maps.LatLng( 0.476866050000000E+02, -0.120449807000000E+03),\n new google.maps.LatLng( 0.476854790000000E+02, -0.120439763000000E+03),\n new google.maps.LatLng( 0.476860180000000E+02, -0.120431085000000E+03),\n new google.maps.LatLng( 0.476841720000000E+02, -0.120425356000000E+03),\n new google.maps.LatLng( 0.476812780000000E+02, -0.120421078000000E+03),\n new google.maps.LatLng( 0.476723280000000E+02, -0.120402981000000E+03),\n new google.maps.LatLng( 0.476737850000000E+02, -0.120391752000000E+03),\n new google.maps.LatLng( 0.476735080000000E+02, -0.120382722000000E+03),\n new google.maps.LatLng( 0.476752640000000E+02, -0.120376835000000E+03),\n new google.maps.LatLng( 0.476809830000000E+02, -0.120363856000000E+03),\n new google.maps.LatLng( 0.476809610000000E+02, -0.120361962000000E+03),\n new google.maps.LatLng( 0.476768270000000E+02, -0.120359320000000E+03),\n new google.maps.LatLng( 0.476737900000000E+02, -0.120358337000000E+03),\n new google.maps.LatLng( 0.476711850000000E+02, -0.120359857000000E+03),\n new google.maps.LatLng( 0.476677340000000E+02, -0.120363168000000E+03),\n new google.maps.LatLng( 0.476662290000000E+02, -0.120363885000000E+03),\n new google.maps.LatLng( 0.476692840000000E+02, -0.120355014000000E+03),\n new google.maps.LatLng( 0.476678460000000E+02, -0.120345397000000E+03),\n new google.maps.LatLng( 0.476649730000000E+02, -0.120335546000000E+03),\n new google.maps.LatLng( 0.476638300000000E+02, -0.120335536000000E+03),\n new google.maps.LatLng( 0.476616720000000E+02, -0.120336666000000E+03),\n new google.maps.LatLng( 0.476601910000000E+02, -0.120333772000000E+03),\n new google.maps.LatLng( 0.476596510000000E+02, -0.120331469000000E+03),\n new google.maps.LatLng( 0.476632610000000E+02, -0.120321206000000E+03),\n new google.maps.LatLng( 0.476629630000000E+02, -0.120314868000000E+03),\n new google.maps.LatLng( 0.476619400000000E+02, -0.120308340000000E+03),\n new google.maps.LatLng( 0.476609090000000E+02, -0.120305789000000E+03),\n new google.maps.LatLng( 0.476599390000000E+02, -0.120304992000000E+03),\n new google.maps.LatLng( 0.476597270000000E+02, -0.120303820000000E+03),\n new google.maps.LatLng( 0.476625580000000E+02, -0.120294927000000E+03),\n new google.maps.LatLng( 0.476637680000000E+02, -0.120292492000000E+03),\n new google.maps.LatLng( 0.476613920000000E+02, -0.120291883000000E+03),\n new google.maps.LatLng( 0.476576240000000E+02, -0.120293440000000E+03),\n new google.maps.LatLng( 0.476513440000000E+02, -0.120304599000000E+03),\n new google.maps.LatLng( 0.476477120000000E+02, -0.120307101000000E+03),\n new google.maps.LatLng( 0.476444910000000E+02, -0.120312509000000E+03),\n new google.maps.LatLng( 0.476424350000000E+02, -0.120314842000000E+03),\n new google.maps.LatLng( 0.476356510000000E+02, -0.120316565000000E+03),\n new google.maps.LatLng( 0.476316300000000E+02, -0.120315348000000E+03),\n new google.maps.LatLng( 0.476284310000000E+02, -0.120320045000000E+03),\n new google.maps.LatLng( 0.476253370000000E+02, -0.120315652000000E+03),\n new google.maps.LatLng( 0.476215980000000E+02, -0.120313484000000E+03),\n new google.maps.LatLng( 0.476231980000000E+02, -0.120307401000000E+03),\n new google.maps.LatLng( 0.476186970000000E+02, -0.120309429000000E+03),\n new google.maps.LatLng( 0.476169150000000E+02, -0.120310848000000E+03),\n new google.maps.LatLng( 0.476169150000000E+02, -0.120310848000000E+03),\n new google.maps.LatLng( 0.476141970000000E+02, -0.120313923000000E+03),\n new google.maps.LatLng( 0.476129640000000E+02, -0.120314666000000E+03),\n new google.maps.LatLng( 0.476115930000000E+02, -0.120314632000000E+03),\n new google.maps.LatLng( 0.476050370000000E+02, -0.120321455000000E+03),\n new google.maps.LatLng( 0.476035520000000E+02, -0.120323515000000E+03),\n new google.maps.LatLng( 0.476028900000000E+02, -0.120328581000000E+03),\n new google.maps.LatLng( 0.476012220000000E+02, -0.120330337000000E+03),\n new google.maps.LatLng( 0.476002620000000E+02, -0.120330540000000E+03),\n new google.maps.LatLng( 0.475938890000000E+02, -0.120330201000000E+03),\n new google.maps.LatLng( 0.475912850000000E+02, -0.120328377000000E+03),\n new google.maps.LatLng( 0.475906460000000E+02, -0.120327363000000E+03),\n new google.maps.LatLng( 0.475860550000000E+02, -0.120317435000000E+03),\n new google.maps.LatLng( 0.475828110000000E+02, -0.120313620000000E+03),\n new google.maps.LatLng( 0.475805490000000E+02, -0.120308624000000E+03),\n new google.maps.LatLng( 0.475796810000000E+02, -0.120303729000000E+03),\n new google.maps.LatLng( 0.475800230000000E+02, -0.120303661000000E+03),\n new google.maps.LatLng( 0.475812110000000E+02, -0.120306126000000E+03),\n new google.maps.LatLng( 0.475826510000000E+02, -0.120307476000000E+03),\n new google.maps.LatLng( 0.475829470000000E+02, -0.120307037000000E+03),\n new google.maps.LatLng( 0.475819880000000E+02, -0.120302175000000E+03),\n new google.maps.LatLng( 0.475809140000000E+02, -0.120299440000000E+03),\n new google.maps.LatLng( 0.475772360000000E+02, -0.120299509000000E+03),\n new google.maps.LatLng( 0.475719370000000E+02, -0.120304574000000E+03),\n new google.maps.LatLng( 0.475688310000000E+02, -0.120309300000000E+03),\n new google.maps.LatLng( 0.475678490000000E+02, -0.120319831000000E+03),\n new google.maps.LatLng( 0.475652670000000E+02, -0.120316894000000E+03),\n new google.maps.LatLng( 0.475646500000000E+02, -0.120321215000000E+03),\n new google.maps.LatLng( 0.475657690000000E+02, -0.120328843000000E+03),\n new google.maps.LatLng( 0.475678700000000E+02, -0.120331577000000E+03),\n new google.maps.LatLng( 0.475656530000000E+02, -0.120335593000000E+03),\n new google.maps.LatLng( 0.475692610000000E+02, -0.120340623000000E+03),\n new google.maps.LatLng( 0.475712030000000E+02, -0.120342075000000E+03),\n new google.maps.LatLng( 0.475732820000000E+02, -0.120341402000000E+03),\n new google.maps.LatLng( 0.475738300000000E+02, -0.120342078000000E+03),\n new google.maps.LatLng( 0.475757700000000E+02, -0.120347108000000E+03),\n new google.maps.LatLng( 0.475764750000000E+02, -0.120357135000000E+03),\n new google.maps.LatLng( 0.475893720000000E+02, -0.120378112000000E+03),\n new google.maps.LatLng( 0.475912920000000E+02, -0.120380203000000E+03),\n new google.maps.LatLng( 0.475944680000000E+02, -0.120381653000000E+03),\n new google.maps.LatLng( 0.475958630000000E+02, -0.120383711000000E+03),\n new google.maps.LatLng( 0.475961380000000E+02, -0.120386446000000E+03),\n new google.maps.LatLng( 0.475951340000000E+02, -0.120388271000000E+03),\n new google.maps.LatLng( 0.475948380000000E+02, -0.120389993000000E+03),\n new google.maps.LatLng( 0.475947720000000E+02, -0.120396612000000E+03),\n new google.maps.LatLng( 0.475974480000000E+02, -0.120405324000000E+03),\n new google.maps.LatLng( 0.476004200000000E+02, -0.120419676000000E+03),\n new google.maps.LatLng( 0.476003750000000E+02, -0.120423019000000E+03),\n new google.maps.LatLng( 0.475980450000000E+02, -0.120423392000000E+03),\n new google.maps.LatLng( 0.475958530000000E+02, -0.120425284000000E+03),\n new google.maps.LatLng( 0.475958530000000E+02, -0.120425284000000E+03),\n new google.maps.LatLng( 0.475979310000000E+02, -0.120425047000000E+03),\n new google.maps.LatLng( 0.475989140000000E+02, -0.120425485000000E+03),\n new google.maps.LatLng( 0.475998500000000E+02, -0.120426904000000E+03),\n new google.maps.LatLng( 0.476000110000000E+02, -0.120432476000000E+03),\n new google.maps.LatLng( 0.476020670000000E+02, -0.120428794000000E+03),\n new google.maps.LatLng( 0.476031170000000E+02, -0.120425349000000E+03),\n new google.maps.LatLng( 0.476064300000000E+02, -0.120427544000000E+03),\n new google.maps.LatLng( 0.476106790000000E+02, -0.120434434000000E+03),\n new google.maps.LatLng( 0.476117990000000E+02, -0.120442609000000E+03),\n new google.maps.LatLng( 0.476141750000000E+02, -0.120452272000000E+03),\n new google.maps.LatLng( 0.476165730000000E+02, -0.120451597000000E+03),\n new google.maps.LatLng( 0.476173500000000E+02, -0.120450820000000E+03),\n new google.maps.LatLng( 0.476248470000000E+02, -0.120462904000000E+03),\n new google.maps.LatLng( 0.476244910000000E+02, -0.120463796000000E+03),\n new google.maps.LatLng( 0.476255910000000E+02, -0.120464816000000E+03),\n new google.maps.LatLng( 0.476377900000000E+02, -0.120465432000000E+03),\n new google.maps.LatLng( 0.476396630000000E+02, -0.120463979000000E+03),\n new google.maps.LatLng( 0.476422450000000E+02, -0.120463034000000E+03),\n new google.maps.LatLng( 0.476439810000000E+02, -0.120465367000000E+03),\n new google.maps.LatLng( 0.476389673397461E+02, -0.120467512989648E+03),\n new google.maps.LatLng( 0.476326950000000E+02, -0.120468809000000E+03),\n new google.maps.LatLng( 0.476306350000000E+02, -0.120478912000000E+03),\n new google.maps.LatLng( 0.476285090000000E+02, -0.120482661000000E+03),\n new google.maps.LatLng( 0.476266130000000E+02, -0.120482355000000E+03),\n new google.maps.LatLng( 0.476220250000000E+02, -0.120483799000000E+03),\n new google.maps.LatLng( 0.476262230000000E+02, -0.120486613000000E+03),\n new google.maps.LatLng( 0.476271590000000E+02, -0.120486580000000E+03),\n new google.maps.LatLng( 0.476274780000000E+02, -0.120488709000000E+03),\n new google.maps.LatLng( 0.476256260000000E+02, -0.120492424000000E+03),\n new google.maps.LatLng( 0.476211970000000E+02, -0.120497009000000E+03),\n new google.maps.LatLng( 0.476199170000000E+02, -0.120499339000000E+03),\n new google.maps.LatLng( 0.476190690000000E+02, -0.120503382000000E+03),\n new google.maps.LatLng( 0.476194820000000E+02, -0.120506119000000E+03),\n new google.maps.LatLng( 0.476185240000000E+02, -0.120509161000000E+03),\n new google.maps.LatLng( 0.476132260000000E+02, -0.120512612000000E+03),\n new google.maps.LatLng( 0.476112860000000E+02, -0.120515384000000E+03),\n new google.maps.LatLng( 0.476090260000000E+02, -0.120520758000000E+03),\n new google.maps.LatLng( 0.476024560000000E+02, -0.120571091000000E+03),\n new google.maps.LatLng( 0.476007650000000E+02, -0.120575043000000E+03),\n new google.maps.LatLng( 0.475979320000000E+02, -0.120576900000000E+03),\n new google.maps.LatLng( 0.475964240000000E+02, -0.120579500000000E+03),\n new google.maps.LatLng( 0.475964240000000E+02, -0.120579500000000E+03),\n new google.maps.LatLng( 0.475980880000000E+02, -0.120582437000000E+03),\n new google.maps.LatLng( 0.475990270000000E+02, -0.120583151000000E+03),\n new google.maps.LatLng( 0.475998670000000E+02, -0.120583212000000E+03),\n new google.maps.LatLng( 0.476010870000000E+02, -0.120582413000000E+03),\n new google.maps.LatLng( 0.476004260000000E+02, -0.120581139000000E+03),\n new google.maps.LatLng( 0.476008220000000E+02, -0.120578603000000E+03),\n new google.maps.LatLng( 0.476027690000000E+02, -0.120577808000000E+03),\n new google.maps.LatLng( 0.476114560000000E+02, -0.120581088000000E+03),\n new google.maps.LatLng( 0.476132790000000E+02, -0.120582670000000E+03),\n new google.maps.LatLng( 0.476145040000000E+02, -0.120584663000000E+03),\n new google.maps.LatLng( 0.476131160000000E+02, -0.120585512000000E+03),\n new google.maps.LatLng( 0.476117320000000E+02, -0.120588914000000E+03),\n new google.maps.LatLng( 0.476119990000000E+02, -0.120589517000000E+03),\n new google.maps.LatLng( 0.476137690000000E+02, -0.120591599000000E+03),\n new google.maps.LatLng( 0.476187660000000E+02, -0.120591174000000E+03),\n new google.maps.LatLng( 0.476187660000000E+02, -0.120591174000000E+03),\n new google.maps.LatLng( 0.476207940000000E+02, -0.120589120000000E+03),\n new google.maps.LatLng( 0.476231840000000E+02, -0.120589051000000E+03),\n new google.maps.LatLng( 0.476262960000000E+02, -0.120587452000000E+03),\n new google.maps.LatLng( 0.476336890000000E+02, -0.120578094000000E+03),\n new google.maps.LatLng( 0.476365830000000E+02, -0.120560105000000E+03),\n new google.maps.LatLng( 0.476382830000000E+02, -0.120558874000000E+03),\n new google.maps.LatLng( 0.476413490000000E+02, -0.120558008000000E+03),\n new google.maps.LatLng( 0.476435230000000E+02, -0.120559373000000E+03),\n new google.maps.LatLng( 0.476439570000000E+02, -0.120558190000000E+03),\n new google.maps.LatLng( 0.476444360000000E+02, -0.120552780000000E+03),\n new google.maps.LatLng( 0.476442070000000E+02, -0.120547338000000E+03),\n new google.maps.LatLng( 0.476457590000000E+02, -0.120542335000000E+03),\n new google.maps.LatLng( 0.476499180000000E+02, -0.120548622000000E+03),\n new google.maps.LatLng( 0.476506040000000E+02, -0.120549061000000E+03),\n new google.maps.LatLng( 0.476510380000000E+02, -0.120548824000000E+03),\n new google.maps.LatLng( 0.476515170000000E+02, -0.120545680000000E+03),\n new google.maps.LatLng( 0.476501000000000E+02, -0.120543448000000E+03),\n new google.maps.LatLng( 0.476519040000000E+02, -0.120540168000000E+03),\n new google.maps.LatLng( 0.476532060000000E+02, -0.120540168000000E+03),\n new google.maps.LatLng( 0.476549500000000E+02, -0.120543684000000E+03),\n new google.maps.LatLng( 0.476532990000000E+02, -0.120555266000000E+03),\n new google.maps.LatLng( 0.476546750000000E+02, -0.120562301000000E+03),\n new google.maps.LatLng( 0.476552880000000E+02, -0.120560082000000E+03),\n new google.maps.LatLng( 0.476554930000000E+02, -0.120554740000000E+03),\n new google.maps.LatLng( 0.476551050000000E+02, -0.120552711000000E+03),\n new google.maps.LatLng( 0.476567930000000E+02, -0.120542331000000E+03),\n new google.maps.LatLng( 0.476639660000000E+02, -0.120540062000000E+03),\n new google.maps.LatLng( 0.476698600000000E+02, -0.120540736000000E+03),\n new google.maps.LatLng( 0.476710490000000E+02, -0.120545199000000E+03),\n new google.maps.LatLng( 0.476711510000000E+02, -0.120547452000000E+03),\n new google.maps.LatLng( 0.476739800000000E+02, -0.120548648000000E+03),\n new google.maps.LatLng( 0.476727640000000E+02, -0.120552843000000E+03),\n new google.maps.LatLng( 0.476795950000000E+02, -0.120565188000000E+03),\n new google.maps.LatLng( 0.476832300000000E+02, -0.120568256000000E+03),\n new google.maps.LatLng( 0.476852100000000E+02, -0.120569350000000E+03),\n new google.maps.LatLng( 0.476920240000000E+02, -0.120570801000000E+03),\n new google.maps.LatLng( 0.476902490000000E+02, -0.120565487000000E+03),\n new google.maps.LatLng( 0.476882680000000E+02, -0.120563290000000E+03),\n new google.maps.LatLng( 0.476873980000000E+02, -0.120561149000000E+03),\n new google.maps.LatLng( 0.476891210000000E+02, -0.120558929000000E+03),\n new google.maps.LatLng( 0.476910860000000E+02, -0.120558117000000E+03),\n new google.maps.LatLng( 0.476928450000000E+02, -0.120558523000000E+03),\n new google.maps.LatLng( 0.476953580000000E+02, -0.120558252000000E+03),\n new google.maps.LatLng( 0.476965230000000E+02, -0.120557372000000E+03),\n new google.maps.LatLng( 0.476970710000000E+02, -0.120555917000000E+03),\n new google.maps.LatLng( 0.476949920000000E+02, -0.120553075000000E+03),\n new google.maps.LatLng( 0.476973900000000E+02, -0.120552871000000E+03),\n new google.maps.LatLng( 0.477070770000000E+02, -0.120556863000000E+03),\n new google.maps.LatLng( 0.477086990000000E+02, -0.120557032000000E+03),\n new google.maps.LatLng( 0.477097490000000E+02, -0.120551955000000E+03),\n new google.maps.LatLng( 0.477092680000000E+02, -0.120541734000000E+03),\n new google.maps.LatLng( 0.477086500000000E+02, -0.120537638000000E+03),\n new google.maps.LatLng( 0.477032070000000E+02, -0.120517911000000E+03),\n new google.maps.LatLng( 0.477016760000000E+02, -0.120516559000000E+03),\n new google.maps.LatLng( 0.477012410000000E+02, -0.120515375000000E+03),\n new google.maps.LatLng( 0.477025660000000E+02, -0.120515645000000E+03),\n new google.maps.LatLng( 0.477112040000000E+02, -0.120521492000000E+03),\n new google.maps.LatLng( 0.477200480000000E+02, -0.120530151000000E+03),\n new google.maps.LatLng( 0.477213730000000E+02, -0.120531030000000E+03),\n new google.maps.LatLng( 0.477223100000000E+02, -0.120530894000000E+03),\n new google.maps.LatLng( 0.477245720000000E+02, -0.120532992000000E+03),\n new google.maps.LatLng( 0.477271780000000E+02, -0.120537053000000E+03),\n new google.maps.LatLng( 0.477292570000000E+02, -0.120543146000000E+03),\n new google.maps.LatLng( 0.477290750000000E+02, -0.120548360000000E+03),\n new google.maps.LatLng( 0.477235470000000E+02, -0.120552323000000E+03),\n new google.maps.LatLng( 0.477222680000000E+02, -0.120551071000000E+03),\n new google.maps.LatLng( 0.477218110000000E+02, -0.120549717000000E+03),\n new google.maps.LatLng( 0.477221080000000E+02, -0.120548634000000E+03),\n new google.maps.LatLng( 0.477206590000000E+02, -0.120548380000000E+03),\n new google.maps.LatLng( 0.477238220000000E+02, -0.120555912000000E+03),\n new google.maps.LatLng( 0.477251570000000E+02, -0.120557274000000E+03),\n new google.maps.LatLng( 0.477266780000000E+02, -0.120564343000000E+03),\n new google.maps.LatLng( 0.477268380000000E+02, -0.120567830000000E+03),\n new google.maps.LatLng( 0.477364780000000E+02, -0.120576770000000E+03),\n new google.maps.LatLng( 0.477392420000000E+02, -0.120578362000000E+03),\n new google.maps.LatLng( 0.477424170000000E+02, -0.120581580000000E+03),\n new google.maps.LatLng( 0.477425080000000E+02, -0.120583748000000E+03),\n new google.maps.LatLng( 0.477445190000000E+02, -0.120579718000000E+03),\n new google.maps.LatLng( 0.477460040000000E+02, -0.120573723000000E+03),\n new google.maps.LatLng( 0.477460050000000E+02, -0.120570777000000E+03),\n new google.maps.LatLng( 0.477444970000000E+02, -0.120567288000000E+03),\n new google.maps.LatLng( 0.477447020000000E+02, -0.120565595000000E+03),\n new google.maps.LatLng( 0.477472380000000E+02, -0.120560988000000E+03),\n new google.maps.LatLng( 0.477481060000000E+02, -0.120560615000000E+03),\n new google.maps.LatLng( 0.477504760000000E+02, -0.120565465000000E+03),\n new google.maps.LatLng( 0.477527150000000E+02, -0.120566921000000E+03),\n new google.maps.LatLng( 0.477559130000000E+02, -0.120567261000000E+03),\n new google.maps.LatLng( 0.477567590000000E+02, -0.120566347000000E+03),\n new google.maps.LatLng( 0.477590660000000E+02, -0.120566211000000E+03),\n new google.maps.LatLng( 0.477638180000000E+02, -0.120569328000000E+03),\n new google.maps.LatLng( 0.477738230000000E+02, -0.120579631000000E+03),\n new google.maps.LatLng( 0.477780930000000E+02, -0.120587427000000E+03),\n new google.maps.LatLng( 0.477823260000000E+02, -0.120591847000000E+03),\n new google.maps.LatLng( 0.477910920000000E+02, -0.120590654000000E+03),\n new google.maps.LatLng( 0.477940620000000E+02, -0.120588486000000E+03),\n new google.maps.LatLng( 0.477978790000000E+02, -0.120582758000000E+03),\n new google.maps.LatLng( 0.477973540000000E+02, -0.120578926000000E+03),\n new google.maps.LatLng( 0.477999440000000E+02, -0.120571914000000E+03),\n new google.maps.LatLng( 0.477999440000000E+02, -0.120571914000000E+03),\n new google.maps.LatLng( 0.477980630000000E+02, -0.120567433000000E+03),\n new google.maps.LatLng( 0.477835330000000E+02, -0.120550587000000E+03),\n new google.maps.LatLng( 0.477746220000000E+02, -0.120542252000000E+03),\n new google.maps.LatLng( 0.477684750000000E+02, -0.120535376000000E+03),\n new google.maps.LatLng( 0.477674700000000E+02, -0.120536325000000E+03),\n new google.maps.LatLng( 0.477644550000000E+02, -0.120537039000000E+03),\n new google.maps.LatLng( 0.477541510000000E+02, -0.120532369000000E+03),\n new google.maps.LatLng( 0.477510890000000E+02, -0.120529255000000E+03),\n new google.maps.LatLng( 0.477475520000000E+02, -0.120527524000000E+03),\n new google.maps.LatLng( 0.477415660000000E+02, -0.120526986000000E+03),\n new google.maps.LatLng( 0.477378200000000E+02, -0.120525973000000E+03),\n new google.maps.LatLng( 0.477353980000000E+02, -0.120524722000000E+03),\n new google.maps.LatLng( 0.477283390000000E+02, -0.120525811000000E+03),\n new google.maps.LatLng( 0.477222840000000E+02, -0.120523040000000E+03),\n new google.maps.LatLng( 0.477200340000000E+02, -0.120521497000000E+03),\n new google.maps.LatLng( 0.477427750000000E+02, -0.120518916000000E+03),\n new google.maps.LatLng( 0.477908410000000E+02, -0.120511969000000E+03),\n new google.maps.LatLng( 0.478073170000000E+02, -0.120512389000000E+03),\n new google.maps.LatLng( 0.478076670000000E+02, -0.120506802000000E+03),\n new google.maps.LatLng( 0.478107730000000E+02, -0.120500865000000E+03),\n new google.maps.LatLng( 0.478100670000000E+02, -0.120498248000000E+03),\n new google.maps.LatLng( 0.478050410000000E+02, -0.120497293000000E+03),\n new google.maps.LatLng( 0.478018230000000E+02, -0.120492611000000E+03),\n new google.maps.LatLng( 0.478000900000000E+02, -0.120484099000000E+03),\n new google.maps.LatLng( 0.478004790000000E+02, -0.120483184000000E+03),\n new google.maps.LatLng( 0.477998170000000E+02, -0.120481963000000E+03),\n new google.maps.LatLng( 0.477964590000000E+02, -0.120481451000000E+03),\n new google.maps.LatLng( 0.477948590000000E+02, -0.120483417000000E+03),\n new google.maps.LatLng( 0.477904520000000E+02, -0.120477582000000E+03),\n new google.maps.LatLng( 0.477907510000000E+02, -0.120470836000000E+03),\n new google.maps.LatLng( 0.477926730000000E+02, -0.120460227000000E+03),\n new google.maps.LatLng( 0.477931770000000E+02, -0.120451209000000E+03),\n new google.maps.LatLng( 0.477838580000000E+02, -0.120441988000000E+03),\n new google.maps.LatLng( 0.477799970000000E+02, -0.120440734000000E+03),\n new google.maps.LatLng( 0.477758850000000E+02, -0.120440700000000E+03),\n new google.maps.LatLng( 0.477733950000000E+02, -0.120434228000000E+03),\n new google.maps.LatLng( 0.477710420000000E+02, -0.120433314000000E+03),\n new google.maps.LatLng( 0.477667470000000E+02, -0.120433584000000E+03),\n new google.maps.LatLng( 0.477664730000000E+02, -0.120434092000000E+03),\n new google.maps.LatLng( 0.477647820000000E+02, -0.120433584000000E+03),\n new google.maps.LatLng( 0.477608990000000E+02, -0.120430875000000E+03),\n new google.maps.LatLng( 0.477593290000000E+02, -0.120428872000000E+03),\n new google.maps.LatLng( 0.477587960000000E+02, -0.120423625000000E+03),\n new google.maps.LatLng( 0.477574940000000E+02, -0.120421932000000E+03),\n new google.maps.LatLng( 0.477553460000000E+02, -0.120420849000000E+03),\n new google.maps.LatLng( 0.477541360000000E+02, -0.120419630000000E+03),\n new google.maps.LatLng( 0.477525810000000E+02, -0.120415193000000E+03),\n new google.maps.LatLng( 0.477514580000000E+02, -0.120397918000000E+03),\n new google.maps.LatLng( 0.477498490000000E+02, -0.120394750000000E+03),\n new google.maps.LatLng( 0.477478680000000E+02, -0.120393309000000E+03),\n new google.maps.LatLng( 0.477464520000000E+02, -0.120393344000000E+03),\n new google.maps.LatLng( 0.477449440000000E+02, -0.120391991000000E+03),\n new google.maps.LatLng( 0.477411260000000E+02, -0.120386474000000E+03),\n new google.maps.LatLng( 0.477370790000000E+02, -0.120378995000000E+03),\n new google.maps.LatLng( 0.477372640000000E+02, -0.120375050000000E+03),\n new google.maps.LatLng( 0.477365330000000E+02, -0.120373254000000E+03),\n new google.maps.LatLng( 0.477361230000000E+02, -0.120372340000000E+03),\n new google.maps.LatLng( 0.477369920000000E+02, -0.120368955000000E+03),\n new google.maps.LatLng( 0.477367820000000E+02, -0.120368836000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "8cf00dd2be3f0fe6f0ea5b1fc5721f3a", "score": "0.5975822", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.478258190000000E+02, -0.122253040000000E+03),\n new google.maps.LatLng( 0.478258110000000E+02, -0.122243614000000E+03),\n new google.maps.LatLng( 0.478240190000000E+02, -0.122238340000000E+03),\n new google.maps.LatLng( 0.478217680000000E+02, -0.122234077000000E+03),\n new google.maps.LatLng( 0.478149320000000E+02, -0.122232780000000E+03),\n new google.maps.LatLng( 0.478094290000000E+02, -0.122228832000000E+03),\n new google.maps.LatLng( 0.478094290000000E+02, -0.122228832000000E+03),\n new google.maps.LatLng( 0.478065200000000E+02, -0.122230995000000E+03),\n new google.maps.LatLng( 0.478065320000000E+02, -0.122244032000000E+03),\n new google.maps.LatLng( 0.477913000000000E+02, -0.122244093000000E+03),\n new google.maps.LatLng( 0.477914190000000E+02, -0.122255238000000E+03),\n new google.maps.LatLng( 0.477917180000000E+02, -0.122263655000000E+03),\n new google.maps.LatLng( 0.477904060000000E+02, -0.122263203000000E+03),\n new google.maps.LatLng( 0.477885190000000E+02, -0.122260738000000E+03),\n new google.maps.LatLng( 0.477891190000000E+02, -0.122258138000000E+03),\n new google.maps.LatLng( 0.477871190000000E+02, -0.122257038000000E+03),\n new google.maps.LatLng( 0.477854190000000E+02, -0.122256938000000E+03),\n new google.maps.LatLng( 0.477851190000000E+02, -0.122258238000000E+03),\n new google.maps.LatLng( 0.477849190000000E+02, -0.122259938000000E+03),\n new google.maps.LatLng( 0.477871669761719E+02, -0.122265281251562E+03),\n new google.maps.LatLng( 0.477877597761719E+02, -0.122265238651562E+03),\n new google.maps.LatLng( 0.477890510000000E+02, -0.122266558000000E+03),\n new google.maps.LatLng( 0.477890190000000E+02, -0.122269239000000E+03),\n new google.maps.LatLng( 0.477883680000000E+02, -0.122270323000000E+03),\n new google.maps.LatLng( 0.477852420762695E+02, -0.122267956339453E+03),\n new google.maps.LatLng( 0.477852420762695E+02, -0.122265975739453E+03),\n new google.maps.LatLng( 0.477847254762695E+02, -0.122265741139453E+03),\n new google.maps.LatLng( 0.477797870000000E+02, -0.122264749000000E+03),\n new google.maps.LatLng( 0.477786090000000E+02, -0.122266661000000E+03),\n new google.maps.LatLng( 0.477770190000000E+02, -0.122266838000000E+03),\n new google.maps.LatLng( 0.477770190000000E+02, -0.122266838000000E+03),\n new google.maps.LatLng( 0.477773190000000E+02, -0.122290339000000E+03),\n new google.maps.LatLng( 0.477773190000000E+02, -0.122290339000000E+03),\n new google.maps.LatLng( 0.477884880000000E+02, -0.122285467000000E+03),\n new google.maps.LatLng( 0.477897850000000E+02, -0.122284227000000E+03),\n new google.maps.LatLng( 0.477963190000000E+02, -0.122281183000000E+03),\n new google.maps.LatLng( 0.477993110000000E+02, -0.122281199000000E+03),\n new google.maps.LatLng( 0.477993470000000E+02, -0.122285578000000E+03),\n new google.maps.LatLng( 0.478040190000000E+02, -0.122284640000000E+03),\n new google.maps.LatLng( 0.478068190000000E+02, -0.122285065000000E+03),\n new google.maps.LatLng( 0.478087190000000E+02, -0.122287140000000E+03),\n new google.maps.LatLng( 0.478116310000000E+02, -0.122292383000000E+03),\n new google.maps.LatLng( 0.478093190000000E+02, -0.122292741000000E+03),\n new google.maps.LatLng( 0.478063190000000E+02, -0.122292452000000E+03),\n new google.maps.LatLng( 0.478073190000000E+02, -0.122311941000000E+03),\n new google.maps.LatLng( 0.478068190000000E+02, -0.122315641000000E+03),\n new google.maps.LatLng( 0.478037710000000E+02, -0.122324804000000E+03),\n new google.maps.LatLng( 0.477995520000000E+02, -0.122330040000000E+03),\n new google.maps.LatLng( 0.477995520000000E+02, -0.122330040000000E+03),\n new google.maps.LatLng( 0.477995190000000E+02, -0.122331941000000E+03),\n new google.maps.LatLng( 0.478091180000000E+02, -0.122324900000000E+03),\n new google.maps.LatLng( 0.478105190000000E+02, -0.122330242000000E+03),\n new google.maps.LatLng( 0.478105190000000E+02, -0.122335742000000E+03),\n new google.maps.LatLng( 0.478264180000000E+02, -0.122336143000000E+03),\n new google.maps.LatLng( 0.478264180000000E+02, -0.122336143000000E+03),\n new google.maps.LatLng( 0.478281080000000E+02, -0.122336786000000E+03),\n new google.maps.LatLng( 0.478287090000000E+02, -0.122336443000000E+03),\n new google.maps.LatLng( 0.478280790000000E+02, -0.122271330000000E+03),\n new google.maps.LatLng( 0.478276190000000E+02, -0.122268641000000E+03),\n new google.maps.LatLng( 0.478270350000000E+02, -0.122268863000000E+03),\n new google.maps.LatLng( 0.478209190000000E+02, -0.122281041000000E+03),\n new google.maps.LatLng( 0.478209130000000E+02, -0.122279596000000E+03),\n new google.maps.LatLng( 0.478274210000000E+02, -0.122267556000000E+03),\n new google.maps.LatLng( 0.478302750000000E+02, -0.122264047000000E+03),\n new google.maps.LatLng( 0.478327470000000E+02, -0.122262109000000E+03),\n new google.maps.LatLng( 0.478297690000000E+02, -0.122255140000000E+03),\n new google.maps.LatLng( 0.478268190000000E+02, -0.122255140000000E+03),\n new google.maps.LatLng( 0.478255190000000E+02, -0.122254140000000E+03),\n new google.maps.LatLng( 0.478258190000000E+02, -0.122253040000000E+03),\n new google.maps.LatLng( 0.477923190000000E+02, -0.122256038000000E+03),\n new google.maps.LatLng( 0.477963190000000E+02, -0.122252338000000E+03),\n new google.maps.LatLng( 0.477988190000000E+02, -0.122254639000000E+03),\n new google.maps.LatLng( 0.477975190000000E+02, -0.122257639000000E+03),\n new google.maps.LatLng( 0.477964150000000E+02, -0.122258994000000E+03),\n new google.maps.LatLng( 0.477951190000000E+02, -0.122259139000000E+03),\n new google.maps.LatLng( 0.477923190000000E+02, -0.122256038000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "dba5d3b92a330215bb7890784afed095", "score": "0.597544", "text": "getPostalCode() {\n return this.getJavaClass().getPostalCodeSync();\n }", "title": "" }, { "docid": "82affc2faa20196ce290f51e88baa2e4", "score": "0.59748775", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.468716750000000E+02, -0.121515397000000E+03),\n new google.maps.LatLng( 0.468740230000000E+02, -0.121516109000000E+03),\n new google.maps.LatLng( 0.468755890000000E+02, -0.121517711000000E+03),\n new google.maps.LatLng( 0.468760690000000E+02, -0.121517644000000E+03),\n new google.maps.LatLng( 0.468801130000000E+02, -0.121514074000000E+03),\n new google.maps.LatLng( 0.468824200000000E+02, -0.121511372000000E+03),\n new google.maps.LatLng( 0.468850010000000E+02, -0.121507270000000E+03),\n new google.maps.LatLng( 0.468878320000000E+02, -0.121501200000000E+03),\n new google.maps.LatLng( 0.468925710000000E+02, -0.121486039000000E+03),\n new google.maps.LatLng( 0.468944020000000E+02, -0.121478373000000E+03),\n new google.maps.LatLng( 0.468965790000000E+02, -0.121462072000000E+03),\n new google.maps.LatLng( 0.468978830000000E+02, -0.121445835000000E+03),\n new google.maps.LatLng( 0.469001000000000E+02, -0.121438634000000E+03),\n new google.maps.LatLng( 0.469055160000000E+02, -0.121428497000000E+03),\n new google.maps.LatLng( 0.469073490000000E+02, -0.121422512000000E+03),\n new google.maps.LatLng( 0.469011720000000E+02, -0.121416461000000E+03),\n new google.maps.LatLng( 0.469019020000000E+02, -0.121411760000000E+03),\n new google.maps.LatLng( 0.469028620000000E+02, -0.121409892000000E+03),\n new google.maps.LatLng( 0.469084140000000E+02, -0.121406521000000E+03),\n new google.maps.LatLng( 0.469111550000000E+02, -0.121400984000000E+03),\n new google.maps.LatLng( 0.469114720000000E+02, -0.121394314000000E+03),\n new google.maps.LatLng( 0.469138480000000E+02, -0.121392511000000E+03),\n new google.maps.LatLng( 0.469143050000000E+02, -0.121391544000000E+03),\n new google.maps.LatLng( 0.469132740000000E+02, -0.121385742000000E+03),\n new google.maps.LatLng( 0.469168610000000E+02, -0.121374598000000E+03),\n new google.maps.LatLng( 0.469181420000000E+02, -0.121371998000000E+03),\n new google.maps.LatLng( 0.469206800000000E+02, -0.121368399000000E+03),\n new google.maps.LatLng( 0.469248400000000E+02, -0.121366302000000E+03),\n new google.maps.LatLng( 0.469315630000000E+02, -0.121357701000000E+03),\n new google.maps.LatLng( 0.469332090000000E+02, -0.121354166000000E+03),\n new google.maps.LatLng( 0.469327310000000E+02, -0.121348428000000E+03),\n new google.maps.LatLng( 0.469398180000000E+02, -0.121338322000000E+03),\n new google.maps.LatLng( 0.469394300000000E+02, -0.121334518000000E+03),\n new google.maps.LatLng( 0.469416020000000E+02, -0.121328847000000E+03),\n new google.maps.LatLng( 0.469437140000000E+02, -0.121330688000000E+03),\n new google.maps.LatLng( 0.469491440000000E+02, -0.121316101000000E+03),\n new google.maps.LatLng( 0.469519280000000E+02, -0.121306670000000E+03),\n new google.maps.LatLng( 0.469500810000000E+02, -0.121305789000000E+03),\n new google.maps.LatLng( 0.469486860000000E+02, -0.121303520000000E+03),\n new google.maps.LatLng( 0.469489830000000E+02, -0.121299215000000E+03),\n new google.maps.LatLng( 0.469509020000000E+02, -0.121295811000000E+03),\n new google.maps.LatLng( 0.469523650000000E+02, -0.121295243000000E+03),\n new google.maps.LatLng( 0.469552210000000E+02, -0.121291003000000E+03),\n new google.maps.LatLng( 0.469596290000000E+02, -0.121279086000000E+03),\n new google.maps.LatLng( 0.469607460000000E+02, -0.121273511000000E+03),\n new google.maps.LatLng( 0.469622530000000E+02, -0.121268970000000E+03),\n new google.maps.LatLng( 0.469643760000000E+02, -0.121267119000000E+03),\n new google.maps.LatLng( 0.469667710000000E+02, -0.121255781000000E+03),\n new google.maps.LatLng( 0.469665920000000E+02, -0.121241938000000E+03),\n new google.maps.LatLng( 0.469685430000000E+02, -0.121222846000000E+03),\n new google.maps.LatLng( 0.469678130000000E+02, -0.121218372000000E+03),\n new google.maps.LatLng( 0.469679280000000E+02, -0.121214233000000E+03),\n new google.maps.LatLng( 0.469708090000000E+02, -0.121203951000000E+03),\n new google.maps.LatLng( 0.469739170000000E+02, -0.121196741000000E+03),\n new google.maps.LatLng( 0.469736660000000E+02, -0.121193436000000E+03),\n new google.maps.LatLng( 0.469733690000000E+02, -0.121192367000000E+03),\n new google.maps.LatLng( 0.469727290000000E+02, -0.121194036000000E+03),\n new google.maps.LatLng( 0.469725920000000E+02, -0.121191566000000E+03),\n new google.maps.LatLng( 0.469736430000000E+02, -0.121186558000000E+03),\n new google.maps.LatLng( 0.469778020000000E+02, -0.121174071000000E+03),\n new google.maps.LatLng( 0.469789200000000E+02, -0.121164721000000E+03),\n new google.maps.LatLng( 0.469784430000000E+02, -0.121153820000000E+03),\n new google.maps.LatLng( 0.469789410000000E+02, -0.121151267000000E+03),\n new google.maps.LatLng( 0.469792900000000E+02, -0.121150793000000E+03),\n new google.maps.LatLng( 0.469796960000000E+02, -0.121150960000000E+03),\n new google.maps.LatLng( 0.469821780000000E+02, -0.121139377000000E+03),\n new google.maps.LatLng( 0.469817880000000E+02, -0.121134435000000E+03),\n new google.maps.LatLng( 0.469803680000000E+02, -0.121127391000000E+03),\n new google.maps.LatLng( 0.469810780000000E+02, -0.121125711000000E+03),\n new google.maps.LatLng( 0.469844160000000E+02, -0.121122894000000E+03),\n new google.maps.LatLng( 0.469873220000000E+02, -0.121114649000000E+03),\n new google.maps.LatLng( 0.469868670000000E+02, -0.121108972000000E+03),\n new google.maps.LatLng( 0.469883550000000E+02, -0.121098955000000E+03),\n new google.maps.LatLng( 0.469890610000000E+02, -0.121097378000000E+03),\n new google.maps.LatLng( 0.469899770000000E+02, -0.121100158000000E+03),\n new google.maps.LatLng( 0.469911200000000E+02, -0.121100893000000E+03),\n new google.maps.LatLng( 0.469910390000000E+02, -0.121089794000000E+03),\n new google.maps.LatLng( 0.469693390000000E+02, -0.121089893000000E+03),\n new google.maps.LatLng( 0.469693400000000E+02, -0.121084593000000E+03),\n new google.maps.LatLng( 0.469657400000000E+02, -0.121084593000000E+03),\n new google.maps.LatLng( 0.469656400000000E+02, -0.121079193000000E+03),\n new google.maps.LatLng( 0.469621400000000E+02, -0.121079293000000E+03),\n new google.maps.LatLng( 0.469621400000000E+02, -0.121073993000000E+03),\n new google.maps.LatLng( 0.469584400000000E+02, -0.121073993000000E+03),\n new google.maps.LatLng( 0.469585400000000E+02, -0.121068693000000E+03),\n new google.maps.LatLng( 0.469476400000000E+02, -0.121068693000000E+03),\n new google.maps.LatLng( 0.469476400000000E+02, -0.121063492000000E+03),\n new google.maps.LatLng( 0.469438400000000E+02, -0.121063492000000E+03),\n new google.maps.LatLng( 0.469439400000000E+02, -0.121058192000000E+03),\n new google.maps.LatLng( 0.469367400000000E+02, -0.121058192000000E+03),\n new google.maps.LatLng( 0.469366400000000E+02, -0.121052892000000E+03),\n new google.maps.LatLng( 0.469330400000000E+02, -0.121052992000000E+03),\n new google.maps.LatLng( 0.469330400000000E+02, -0.121042392000000E+03),\n new google.maps.LatLng( 0.469221400000000E+02, -0.121042392000000E+03),\n new google.maps.LatLng( 0.469221400000000E+02, -0.121037191000000E+03),\n new google.maps.LatLng( 0.469185400000000E+02, -0.121037091000000E+03),\n new google.maps.LatLng( 0.469185410000000E+02, -0.121031791000000E+03),\n new google.maps.LatLng( 0.469149410000000E+02, -0.121031791000000E+03),\n new google.maps.LatLng( 0.469149410000000E+02, -0.121026491000000E+03),\n new google.maps.LatLng( 0.469113410000000E+02, -0.121026491000000E+03),\n new google.maps.LatLng( 0.469112620000000E+02, -0.120915416000000E+03),\n new google.maps.LatLng( 0.469088640000000E+02, -0.120918719000000E+03),\n new google.maps.LatLng( 0.469068990000000E+02, -0.120923387000000E+03),\n new google.maps.LatLng( 0.469041120000000E+02, -0.120923155000000E+03),\n new google.maps.LatLng( 0.469016210000000E+02, -0.120920888000000E+03),\n new google.maps.LatLng( 0.468998150000000E+02, -0.120916554000000E+03),\n new google.maps.LatLng( 0.468987860000000E+02, -0.120915621000000E+03),\n new google.maps.LatLng( 0.468962960000000E+02, -0.120916789000000E+03),\n new google.maps.LatLng( 0.468946510000000E+02, -0.120919690000000E+03),\n new google.maps.LatLng( 0.468914300000000E+02, -0.120922824000000E+03),\n new google.maps.LatLng( 0.468867680000000E+02, -0.120922126000000E+03),\n new google.maps.LatLng( 0.468832260000000E+02, -0.120934992000000E+03),\n new google.maps.LatLng( 0.468840260000000E+02, -0.120941224000000E+03),\n new google.maps.LatLng( 0.468843230000000E+02, -0.120948889000000E+03),\n new google.maps.LatLng( 0.468768500000000E+02, -0.120952686000000E+03),\n new google.maps.LatLng( 0.468744610000000E+02, -0.120952881000000E+03),\n new google.maps.LatLng( 0.468736450000000E+02, -0.120951181000000E+03),\n new google.maps.LatLng( 0.468752510000000E+02, -0.120947654000000E+03),\n new google.maps.LatLng( 0.468748420000000E+02, -0.120944253000000E+03),\n new google.maps.LatLng( 0.468726850000000E+02, -0.120938986000000E+03),\n new google.maps.LatLng( 0.468682750000000E+02, -0.120933321000000E+03),\n new google.maps.LatLng( 0.468667210000000E+02, -0.120932689000000E+03),\n new google.maps.LatLng( 0.468593860000000E+02, -0.120932490000000E+03),\n new google.maps.LatLng( 0.468528730000000E+02, -0.120929127000000E+03),\n new google.maps.LatLng( 0.468521870000000E+02, -0.120927729000000E+03),\n new google.maps.LatLng( 0.468460410000000E+02, -0.120923201000000E+03),\n new google.maps.LatLng( 0.468417210000000E+02, -0.120919040000000E+03),\n new google.maps.LatLng( 0.468347480000000E+02, -0.120905258000000E+03),\n new google.maps.LatLng( 0.468348390000000E+02, -0.120902395000000E+03),\n new google.maps.LatLng( 0.468367560000000E+02, -0.120895567000000E+03),\n new google.maps.LatLng( 0.468371440000000E+02, -0.120894567000000E+03),\n new google.maps.LatLng( 0.468387210000000E+02, -0.120895532000000E+03),\n new google.maps.LatLng( 0.468386520000000E+02, -0.120895165000000E+03),\n new google.maps.LatLng( 0.468378740000000E+02, -0.120892835000000E+03),\n new google.maps.LatLng( 0.468322490000000E+02, -0.120883451000000E+03),\n new google.maps.LatLng( 0.468267690000000E+02, -0.120865986000000E+03),\n new google.maps.LatLng( 0.468267690000000E+02, -0.120865986000000E+03),\n new google.maps.LatLng( 0.468206740000000E+02, -0.120848404000000E+03),\n new google.maps.LatLng( 0.468077180000000E+02, -0.120826591000000E+03),\n new google.maps.LatLng( 0.468071320000000E+02, -0.120823685000000E+03),\n new google.maps.LatLng( 0.467978420000000E+02, -0.120812287000000E+03),\n new google.maps.LatLng( 0.467953650000000E+02, -0.120808610000000E+03),\n new google.maps.LatLng( 0.467899680000000E+02, -0.120796654000000E+03),\n new google.maps.LatLng( 0.467887780000000E+02, -0.120788437000000E+03),\n new google.maps.LatLng( 0.467884560000000E+02, -0.120782283000000E+03),\n new google.maps.LatLng( 0.467883800000000E+02, -0.120759029000000E+03),\n new google.maps.LatLng( 0.467862750000000E+02, -0.120753177000000E+03),\n new google.maps.LatLng( 0.467893900000000E+02, -0.120738318000000E+03),\n new google.maps.LatLng( 0.467922710000000E+02, -0.120733563000000E+03),\n new google.maps.LatLng( 0.467943520000000E+02, -0.120727975000000E+03),\n new google.maps.LatLng( 0.467949020000000E+02, -0.120721355000000E+03),\n new google.maps.LatLng( 0.467946290000000E+02, -0.120716763000000E+03),\n new google.maps.LatLng( 0.467963900000000E+02, -0.120711195000000E+03),\n new google.maps.LatLng( 0.467952240000000E+02, -0.120711393000000E+03),\n new google.maps.LatLng( 0.467905170000000E+02, -0.120714018000000E+03),\n new google.maps.LatLng( 0.467890850000000E+02, -0.120715116000000E+03),\n new google.maps.LatLng( 0.467877560000000E+02, -0.120717757000000E+03),\n new google.maps.LatLng( 0.467827360000000E+02, -0.120719177000000E+03),\n new google.maps.LatLng( 0.467824070000000E+02, -0.120718475000000E+03),\n new google.maps.LatLng( 0.467827070000000E+02, -0.120713318000000E+03),\n new google.maps.LatLng( 0.467854530000000E+02, -0.120705801000000E+03),\n new google.maps.LatLng( 0.467881360000000E+02, -0.120690540000000E+03),\n new google.maps.LatLng( 0.467881610000000E+02, -0.120688189000000E+03),\n new google.maps.LatLng( 0.467856280000000E+02, -0.120682280000000E+03),\n new google.maps.LatLng( 0.467845830000000E+02, -0.120681180000000E+03),\n new google.maps.LatLng( 0.467838510000000E+02, -0.120681285000000E+03),\n new google.maps.LatLng( 0.467829980000000E+02, -0.120683378000000E+03),\n new google.maps.LatLng( 0.467800540000000E+02, -0.120683539000000E+03),\n new google.maps.LatLng( 0.467776100000000E+02, -0.120677889000000E+03),\n new google.maps.LatLng( 0.467750460000000E+02, -0.120665410000000E+03),\n new google.maps.LatLng( 0.467731880000000E+02, -0.120663199000000E+03),\n new google.maps.LatLng( 0.467687640000000E+02, -0.120659702000000E+03),\n new google.maps.LatLng( 0.467676300000000E+02, -0.120658135000000E+03),\n new google.maps.LatLng( 0.467623130000000E+02, -0.120648382000000E+03),\n new google.maps.LatLng( 0.467609280000000E+02, -0.120641882000000E+03),\n new google.maps.LatLng( 0.467580060000000E+02, -0.120636158000000E+03),\n new google.maps.LatLng( 0.467558320000000E+02, -0.120636220000000E+03),\n new google.maps.LatLng( 0.467542080000000E+02, -0.120638243000000E+03),\n new google.maps.LatLng( 0.467542080000000E+02, -0.120638243000000E+03),\n new google.maps.LatLng( 0.467530840000000E+02, -0.120641279000000E+03),\n new google.maps.LatLng( 0.467498470000000E+02, -0.120646897000000E+03),\n new google.maps.LatLng( 0.467470860000000E+02, -0.120654807000000E+03),\n new google.maps.LatLng( 0.467414220000000E+02, -0.120665014000000E+03),\n new google.maps.LatLng( 0.467379050000000E+02, -0.120673259000000E+03),\n new google.maps.LatLng( 0.467371060000000E+02, -0.120677945000000E+03),\n new google.maps.LatLng( 0.467377010000000E+02, -0.120679042000000E+03),\n new google.maps.LatLng( 0.467372210000000E+02, -0.120680604000000E+03),\n new google.maps.LatLng( 0.467338770000000E+02, -0.120683576000000E+03),\n new google.maps.LatLng( 0.467322970000000E+02, -0.120677911000000E+03),\n new google.maps.LatLng( 0.467305410000000E+02, -0.120674303000000E+03),\n new google.maps.LatLng( 0.467227980000000E+02, -0.120662845000000E+03),\n new google.maps.LatLng( 0.467122330000000E+02, -0.120651804000000E+03),\n new google.maps.LatLng( 0.467105970000000E+02, -0.120650753000000E+03),\n new google.maps.LatLng( 0.467038460000000E+02, -0.120647385000000E+03),\n new google.maps.LatLng( 0.466948490000000E+02, -0.120643784000000E+03),\n new google.maps.LatLng( 0.466907590000000E+02, -0.120644087000000E+03),\n new google.maps.LatLng( 0.466844070000000E+02, -0.120642140000000E+03),\n new google.maps.LatLng( 0.466802950000000E+02, -0.120636828000000E+03),\n new google.maps.LatLng( 0.466773990000000E+02, -0.120635804000000E+03),\n new google.maps.LatLng( 0.466772230000000E+02, -0.120636924000000E+03),\n new google.maps.LatLng( 0.466782790000000E+02, -0.120639708000000E+03),\n new google.maps.LatLng( 0.466824230000000E+02, -0.120646652000000E+03),\n new google.maps.LatLng( 0.466862470000000E+02, -0.120648381000000E+03),\n new google.maps.LatLng( 0.466914480000000E+02, -0.120654082000000E+03),\n new google.maps.LatLng( 0.466873470000000E+02, -0.120654143000000E+03),\n new google.maps.LatLng( 0.466873470000000E+02, -0.120654143000000E+03),\n new google.maps.LatLng( 0.466862630000000E+02, -0.120656061000000E+03),\n new google.maps.LatLng( 0.466853190000000E+02, -0.120656285000000E+03),\n new google.maps.LatLng( 0.466838950000000E+02, -0.120654525000000E+03),\n new google.maps.LatLng( 0.466796300000000E+02, -0.120651738000000E+03),\n new google.maps.LatLng( 0.466779710000000E+02, -0.120649229000000E+03),\n new google.maps.LatLng( 0.466746350000000E+02, -0.120649071000000E+03),\n new google.maps.LatLng( 0.466702470000000E+02, -0.120647660000000E+03),\n new google.maps.LatLng( 0.466674470000000E+02, -0.120643356000000E+03),\n new google.maps.LatLng( 0.466647110000000E+02, -0.120641756000000E+03),\n new google.maps.LatLng( 0.466640550000000E+02, -0.120638828000000E+03),\n new google.maps.LatLng( 0.466619750000000E+02, -0.120635660000000E+03),\n new google.maps.LatLng( 0.466613190000000E+02, -0.120632700000000E+03),\n new google.maps.LatLng( 0.466600550000000E+02, -0.120630556000000E+03),\n new google.maps.LatLng( 0.466567430000000E+02, -0.120627916000000E+03),\n new google.maps.LatLng( 0.466558310000000E+02, -0.120628284000000E+03),\n new google.maps.LatLng( 0.466561510000000E+02, -0.120629340000000E+03),\n new google.maps.LatLng( 0.466561510000000E+02, -0.120629340000000E+03),\n new google.maps.LatLng( 0.466588400000000E+02, -0.120633769000000E+03),\n new google.maps.LatLng( 0.466601770000000E+02, -0.120636937000000E+03),\n new google.maps.LatLng( 0.466667110000000E+02, -0.120644252000000E+03),\n new google.maps.LatLng( 0.466825350000000E+02, -0.120664509000000E+03),\n new google.maps.LatLng( 0.466880410000000E+02, -0.120667827000000E+03),\n new google.maps.LatLng( 0.466947880000000E+02, -0.120668060000000E+03),\n new google.maps.LatLng( 0.466949950000000E+02, -0.120678254000000E+03),\n new google.maps.LatLng( 0.467025420000000E+02, -0.120678551000000E+03),\n new google.maps.LatLng( 0.467090940000000E+02, -0.120687087000000E+03),\n new google.maps.LatLng( 0.467094390000000E+02, -0.120688892000000E+03),\n new google.maps.LatLng( 0.467092760000000E+02, -0.120699411000000E+03),\n new google.maps.LatLng( 0.467164050000000E+02, -0.120699943000000E+03),\n new google.maps.LatLng( 0.467164040000000E+02, -0.120706022000000E+03),\n new google.maps.LatLng( 0.467143020000000E+02, -0.120706952000000E+03),\n new google.maps.LatLng( 0.467132280000000E+02, -0.120706952000000E+03),\n new google.maps.LatLng( 0.467122220000000E+02, -0.120706686000000E+03),\n new google.maps.LatLng( 0.467100750000000E+02, -0.120704725000000E+03),\n new google.maps.LatLng( 0.467061450000000E+02, -0.120703230000000E+03),\n new google.maps.LatLng( 0.467056650000000E+02, -0.120703230000000E+03),\n new google.maps.LatLng( 0.467052990000000E+02, -0.120704093000000E+03),\n new google.maps.LatLng( 0.467052990000000E+02, -0.120704093000000E+03),\n new google.maps.LatLng( 0.467064420000000E+02, -0.120705488000000E+03),\n new google.maps.LatLng( 0.467088410000000E+02, -0.120706851000000E+03),\n new google.maps.LatLng( 0.467090210000000E+02, -0.120720902000000E+03),\n new google.maps.LatLng( 0.467227530000000E+02, -0.120721142000000E+03),\n new google.maps.LatLng( 0.467271830000000E+02, -0.120720435000000E+03),\n new google.maps.LatLng( 0.467262970000000E+02, -0.120714398000000E+03),\n new google.maps.LatLng( 0.467278040000000E+02, -0.120715995000000E+03),\n new google.maps.LatLng( 0.467296540000000E+02, -0.120720349000000E+03),\n new google.maps.LatLng( 0.467319140000000E+02, -0.120727860000000E+03),\n new google.maps.LatLng( 0.467357240000000E+02, -0.120744745000000E+03),\n new google.maps.LatLng( 0.467407470000000E+02, -0.120754653000000E+03),\n new google.maps.LatLng( 0.467459860000000E+02, -0.120769206000000E+03),\n new google.maps.LatLng( 0.467478410000000E+02, -0.120780539000000E+03),\n new google.maps.LatLng( 0.467462430000000E+02, -0.120786923000000E+03),\n new google.maps.LatLng( 0.467449410000000E+02, -0.120786957000000E+03),\n new google.maps.LatLng( 0.467429760000000E+02, -0.120786160000000E+03),\n new google.maps.LatLng( 0.467408960000000E+02, -0.120786627000000E+03),\n new google.maps.LatLng( 0.467359610000000E+02, -0.120789188000000E+03),\n new google.maps.LatLng( 0.467327400000000E+02, -0.120792679000000E+03),\n new google.maps.LatLng( 0.467305700000000E+02, -0.120796269000000E+03),\n new google.maps.LatLng( 0.467291320000000E+02, -0.120803547000000E+03),\n new google.maps.LatLng( 0.467259050000000E+02, -0.120810807000000E+03),\n new google.maps.LatLng( 0.467211580000000E+02, -0.120815146000000E+03),\n new google.maps.LatLng( 0.467175020000000E+02, -0.120816475000000E+03),\n new google.maps.LatLng( 0.467174100000000E+02, -0.120818767000000E+03),\n new google.maps.LatLng( 0.467197870000000E+02, -0.120824249000000E+03),\n new google.maps.LatLng( 0.467180940000000E+02, -0.120834083000000E+03),\n new google.maps.LatLng( 0.467205600000000E+02, -0.120841360000000E+03),\n new google.maps.LatLng( 0.467207650000000E+02, -0.120845979000000E+03),\n new google.maps.LatLng( 0.467189820000000E+02, -0.120849366000000E+03),\n new google.maps.LatLng( 0.467165820000000E+02, -0.120851757000000E+03),\n new google.maps.LatLng( 0.467155720000000E+02, -0.120864448000000E+03),\n new google.maps.LatLng( 0.467116830000000E+02, -0.120872152000000E+03),\n new google.maps.LatLng( 0.467112030000000E+02, -0.120873945000000E+03),\n new google.maps.LatLng( 0.467119790000000E+02, -0.120882610000000E+03),\n new google.maps.LatLng( 0.467077530000000E+02, -0.120885471000000E+03),\n new google.maps.LatLng( 0.467069750000000E+02, -0.120884907000000E+03),\n new google.maps.LatLng( 0.467057870000000E+02, -0.120885406000000E+03),\n new google.maps.LatLng( 0.467027740000000E+02, -0.120892484000000E+03),\n new google.maps.LatLng( 0.467025920000000E+02, -0.120893780000000E+03),\n new google.maps.LatLng( 0.467033700000000E+02, -0.120896768000000E+03),\n new google.maps.LatLng( 0.467030510000000E+02, -0.120898031000000E+03),\n new google.maps.LatLng( 0.467005380000000E+02, -0.120898996000000E+03),\n new google.maps.LatLng( 0.466981150000000E+02, -0.120897902000000E+03),\n new google.maps.LatLng( 0.466968130000000E+02, -0.120898036000000E+03),\n new google.maps.LatLng( 0.466948710000000E+02, -0.120900030000000E+03),\n new google.maps.LatLng( 0.466923590000000E+02, -0.120905179000000E+03),\n new google.maps.LatLng( 0.466922460000000E+02, -0.120908268000000E+03),\n new google.maps.LatLng( 0.466938010000000E+02, -0.120913447000000E+03),\n new google.maps.LatLng( 0.466947840000000E+02, -0.120914543000000E+03),\n new google.maps.LatLng( 0.466947840000000E+02, -0.120914543000000E+03),\n new google.maps.LatLng( 0.466953790000000E+02, -0.120918328000000E+03),\n new google.maps.LatLng( 0.466950140000000E+02, -0.120920488000000E+03),\n new google.maps.LatLng( 0.466940540000000E+02, -0.120921784000000E+03),\n new google.maps.LatLng( 0.466927520000000E+02, -0.120922316000000E+03),\n new google.maps.LatLng( 0.466916320000000E+02, -0.120921285000000E+03),\n new google.maps.LatLng( 0.466908550000000E+02, -0.120921319000000E+03),\n new google.maps.LatLng( 0.466902150000000E+02, -0.120922017000000E+03),\n new google.maps.LatLng( 0.466885700000000E+02, -0.120925770000000E+03),\n new google.maps.LatLng( 0.466863550000000E+02, -0.120935533000000E+03),\n new google.maps.LatLng( 0.466831330000000E+02, -0.120940713000000E+03),\n new google.maps.LatLng( 0.466825600000000E+02, -0.120946092000000E+03),\n new google.maps.LatLng( 0.466830170000000E+02, -0.120952467000000E+03),\n new google.maps.LatLng( 0.466823770000000E+02, -0.120954691000000E+03),\n new google.maps.LatLng( 0.466799310000000E+02, -0.120957646000000E+03),\n new google.maps.LatLng( 0.466769600000000E+02, -0.120963455000000E+03),\n new google.maps.LatLng( 0.466756110000000E+02, -0.120967206000000E+03),\n new google.maps.LatLng( 0.466703300000000E+02, -0.120972846000000E+03),\n new google.maps.LatLng( 0.466704210000000E+02, -0.120976000000000E+03),\n new google.maps.LatLng( 0.466693600000000E+02, -0.120981233000000E+03),\n new google.maps.LatLng( 0.466635770000000E+02, -0.120967743000000E+03),\n new google.maps.LatLng( 0.466597860000000E+02, -0.120966202000000E+03),\n new google.maps.LatLng( 0.466528970000000E+02, -0.120956336000000E+03),\n new google.maps.LatLng( 0.466527150000000E+02, -0.120956608000000E+03),\n new google.maps.LatLng( 0.466507030000000E+02, -0.120962846000000E+03),\n new google.maps.LatLng( 0.466506570000000E+02, -0.120964538000000E+03),\n new google.maps.LatLng( 0.466462450000000E+02, -0.120972632000000E+03),\n new google.maps.LatLng( 0.466434540000000E+02, -0.120981324000000E+03),\n new google.maps.LatLng( 0.466440700000000E+02, -0.120984277000000E+03),\n new google.maps.LatLng( 0.466431060000000E+02, -0.120993533000000E+03),\n new google.maps.LatLng( 0.466420540000000E+02, -0.120994594000000E+03),\n new google.maps.LatLng( 0.466396540000000E+02, -0.121012033000000E+03),\n new google.maps.LatLng( 0.466410250000000E+02, -0.121012164000000E+03),\n new google.maps.LatLng( 0.466415970000000E+02, -0.121013524000000E+03),\n new google.maps.LatLng( 0.466414620000000E+02, -0.121019131000000E+03),\n new google.maps.LatLng( 0.466422190000000E+02, -0.121028155000000E+03),\n new google.maps.LatLng( 0.466416720000000E+02, -0.121031672000000E+03),\n new google.maps.LatLng( 0.466381240000000E+02, -0.121030954000000E+03),\n new google.maps.LatLng( 0.466343980000000E+02, -0.121037596000000E+03),\n new google.maps.LatLng( 0.466328340000000E+02, -0.121038944000000E+03),\n new google.maps.LatLng( 0.466306900000000E+02, -0.121039481000000E+03),\n new google.maps.LatLng( 0.466255340000000E+02, -0.121044167000000E+03),\n new google.maps.LatLng( 0.466248410000000E+02, -0.121045180000000E+03),\n new google.maps.LatLng( 0.466242220000000E+02, -0.121048094000000E+03),\n new google.maps.LatLng( 0.466217960000000E+02, -0.121050969000000E+03),\n new google.maps.LatLng( 0.466214590000000E+02, -0.121050830000000E+03),\n new google.maps.LatLng( 0.466207770000000E+02, -0.121045586000000E+03),\n new google.maps.LatLng( 0.466181610000000E+02, -0.121034101000000E+03),\n new google.maps.LatLng( 0.466165590000000E+02, -0.121032574666667E+03),\n new google.maps.LatLng( 0.466153700000000E+02, -0.121030258000000E+03),\n new google.maps.LatLng( 0.466151630000000E+02, -0.121027075000000E+03),\n new google.maps.LatLng( 0.466158480000000E+02, -0.121025283000000E+03),\n new google.maps.LatLng( 0.466145220000000E+02, -0.121022731000000E+03),\n new google.maps.LatLng( 0.466121450000000E+02, -0.121022002000000E+03),\n new google.maps.LatLng( 0.466083520000000E+02, -0.121024426000000E+03),\n new google.maps.LatLng( 0.466070280000000E+02, -0.121026284000000E+03),\n new google.maps.LatLng( 0.466043330000000E+02, -0.121032222000000E+03),\n new google.maps.LatLng( 0.466036930000000E+02, -0.121032620000000E+03),\n new google.maps.LatLng( 0.466026170000000E+02, -0.121024795000000E+03),\n new google.maps.LatLng( 0.466037360000000E+02, -0.121021313000000E+03),\n new google.maps.LatLng( 0.466041460000000E+02, -0.121017036000000E+03),\n new google.maps.LatLng( 0.466028870000000E+02, -0.121012627000000E+03),\n new google.maps.LatLng( 0.466014690000000E+02, -0.121010606000000E+03),\n new google.maps.LatLng( 0.466014470000000E+02, -0.121012131000000E+03),\n new google.maps.LatLng( 0.465978620000000E+02, -0.121019362000000E+03),\n new google.maps.LatLng( 0.465942770000000E+02, -0.121028315000000E+03),\n new google.maps.LatLng( 0.465931360000000E+02, -0.121034051000000E+03),\n new google.maps.LatLng( 0.465899370000000E+02, -0.121036009000000E+03),\n new google.maps.LatLng( 0.465883600000000E+02, -0.121033656000000E+03),\n new google.maps.LatLng( 0.465896850000000E+02, -0.121033622000000E+03),\n new google.maps.LatLng( 0.465900730000000E+02, -0.121032561000000E+03),\n new google.maps.LatLng( 0.465876720000000E+02, -0.121024310000000E+03),\n new google.maps.LatLng( 0.465881040000000E+02, -0.121019205000000E+03),\n new google.maps.LatLng( 0.465889950000000E+02, -0.121017414000000E+03),\n new google.maps.LatLng( 0.465893360000000E+02, -0.121013436000000E+03),\n new google.maps.LatLng( 0.465878910000000E+02, -0.121003892000000E+03),\n new google.maps.LatLng( 0.465850610000000E+02, -0.120996687000000E+03),\n new google.maps.LatLng( 0.465819570000000E+02, -0.120985746000000E+03),\n new google.maps.LatLng( 0.465799730000000E+02, -0.120974179000000E+03),\n new google.maps.LatLng( 0.465812330000000E+02, -0.120966623000000E+03),\n new google.maps.LatLng( 0.465856690000000E+02, -0.120951645000000E+03),\n new google.maps.LatLng( 0.465856230000000E+02, -0.120949987000000E+03),\n new google.maps.LatLng( 0.465850520000000E+02, -0.120948761000000E+03),\n new google.maps.LatLng( 0.465827670000000E+02, -0.120948396000000E+03),\n new google.maps.LatLng( 0.465822410000000E+02, -0.120944552000000E+03),\n new google.maps.LatLng( 0.465822410000000E+02, -0.120944552000000E+03),\n new google.maps.LatLng( 0.465810300000000E+02, -0.120940906000000E+03),\n new google.maps.LatLng( 0.465813950000000E+02, -0.120937881000000E+03),\n new google.maps.LatLng( 0.465803670000000E+02, -0.120938454000000E+03),\n new google.maps.LatLng( 0.465782650000000E+02, -0.120941304000000E+03),\n new google.maps.LatLng( 0.465722770000000E+02, -0.120953332000000E+03),\n new google.maps.LatLng( 0.465709960000000E+02, -0.120961284000000E+03),\n new google.maps.LatLng( 0.465719770000000E+02, -0.120971192000000E+03),\n new google.maps.LatLng( 0.465715180000000E+02, -0.120974936000000E+03),\n new google.maps.LatLng( 0.465707400000000E+02, -0.120976625000000E+03),\n new google.maps.LatLng( 0.465685920000000E+02, -0.120978777000000E+03),\n new google.maps.LatLng( 0.465662820000000E+02, -0.120982884000000E+03),\n new google.maps.LatLng( 0.465647040000000E+02, -0.120987389000000E+03),\n new google.maps.LatLng( 0.465648390000000E+02, -0.120991166000000E+03),\n new google.maps.LatLng( 0.465607670000000E+02, -0.120999842000000E+03),\n new google.maps.LatLng( 0.465619090000000E+02, -0.121005147000000E+03),\n new google.maps.LatLng( 0.465641740000000E+02, -0.121009684000000E+03),\n new google.maps.LatLng( 0.465651330000000E+02, -0.121009650000000E+03),\n new google.maps.LatLng( 0.465662770000000E+02, -0.121011305000000E+03),\n new google.maps.LatLng( 0.465678330000000E+02, -0.121015081000000E+03),\n new google.maps.LatLng( 0.465695720000000E+02, -0.121020977000000E+03),\n new google.maps.LatLng( 0.465693220000000E+02, -0.121024920000000E+03),\n new google.maps.LatLng( 0.465632230000000E+02, -0.121033903000000E+03),\n new google.maps.LatLng( 0.465632240000000E+02, -0.121039701000000E+03),\n new google.maps.LatLng( 0.465638640000000E+02, -0.121042749000000E+03),\n new google.maps.LatLng( 0.465601180000000E+02, -0.121051861000000E+03),\n new google.maps.LatLng( 0.465585410000000E+02, -0.121052921000000E+03),\n new google.maps.LatLng( 0.465571240000000E+02, -0.121053120000000E+03),\n new google.maps.LatLng( 0.465543820000000E+02, -0.121055804000000E+03),\n new google.maps.LatLng( 0.465532170000000E+02, -0.121057759000000E+03),\n new google.maps.LatLng( 0.465528060000000E+02, -0.121060872000000E+03),\n new google.maps.LatLng( 0.465518230000000E+02, -0.121061171000000E+03),\n new google.maps.LatLng( 0.465509090000000E+02, -0.121060144000000E+03),\n new google.maps.LatLng( 0.465509090000000E+02, -0.121060144000000E+03),\n new google.maps.LatLng( 0.465509320000000E+02, -0.121061568000000E+03),\n new google.maps.LatLng( 0.465534000000000E+02, -0.121067233000000E+03),\n new google.maps.LatLng( 0.465554800000000E+02, -0.121069917000000E+03),\n new google.maps.LatLng( 0.465568730000000E+02, -0.121073064000000E+03),\n new google.maps.LatLng( 0.465598420000000E+02, -0.121089728000000E+03),\n new google.maps.LatLng( 0.465596590000000E+02, -0.121090689000000E+03),\n new google.maps.LatLng( 0.465589970000000E+02, -0.121088336000000E+03),\n new google.maps.LatLng( 0.465583570000000E+02, -0.121088005000000E+03),\n new google.maps.LatLng( 0.465582180000000E+02, -0.121095260000000E+03),\n new google.maps.LatLng( 0.465596340000000E+02, -0.121099302000000E+03),\n new google.maps.LatLng( 0.465596310000000E+02, -0.121105597000000E+03),\n new google.maps.LatLng( 0.465573380000000E+02, -0.121123054000000E+03),\n new google.maps.LatLng( 0.465571090000000E+02, -0.121131676000000E+03),\n new google.maps.LatLng( 0.465549390000000E+02, -0.121135323000000E+03),\n new google.maps.LatLng( 0.465529990000000E+02, -0.121140691000000E+03),\n new google.maps.LatLng( 0.465541220000000E+02, -0.121146752000000E+03),\n new google.maps.LatLng( 0.465586500000000E+02, -0.121156720000000E+03),\n new google.maps.LatLng( 0.465577620000000E+02, -0.121173914000000E+03),\n new google.maps.LatLng( 0.465561850000000E+02, -0.121181734000000E+03),\n new google.maps.LatLng( 0.465542160000000E+02, -0.121196690000000E+03),\n new google.maps.LatLng( 0.465542450000000E+02, -0.121198912000000E+03),\n new google.maps.LatLng( 0.465548270000000E+02, -0.121200178000000E+03),\n new google.maps.LatLng( 0.465510690000000E+02, -0.121204232000000E+03),\n new google.maps.LatLng( 0.465457660000000E+02, -0.121207862000000E+03),\n new google.maps.LatLng( 0.465422150000000E+02, -0.121206946000000E+03),\n new google.maps.LatLng( 0.465410630000000E+02, -0.121206125000000E+03),\n new google.maps.LatLng( 0.465393420000000E+02, -0.121202567000000E+03),\n new google.maps.LatLng( 0.465350680000000E+02, -0.121204024000000E+03),\n new google.maps.LatLng( 0.465336280000000E+02, -0.121204884000000E+03),\n new google.maps.LatLng( 0.465332400000000E+02, -0.121206043000000E+03),\n new google.maps.LatLng( 0.465287370000000E+02, -0.121212035000000E+03),\n new google.maps.LatLng( 0.465269080000000E+02, -0.121212200000000E+03),\n new google.maps.LatLng( 0.465227270000000E+02, -0.121209482000000E+03),\n new google.maps.LatLng( 0.465225210000000E+02, -0.121208555000000E+03),\n new google.maps.LatLng( 0.465231610000000E+02, -0.121206569000000E+03),\n new google.maps.LatLng( 0.465239380000000E+02, -0.121205940000000E+03),\n new google.maps.LatLng( 0.465258120000000E+02, -0.121205642000000E+03),\n new google.maps.LatLng( 0.465234360000000E+02, -0.121204053000000E+03),\n new google.maps.LatLng( 0.465211050000000E+02, -0.121204482000000E+03),\n new google.maps.LatLng( 0.465174250000000E+02, -0.121206633000000E+03),\n new google.maps.LatLng( 0.465146820000000E+02, -0.121209446000000E+03),\n new google.maps.LatLng( 0.465125570000000E+02, -0.121209313000000E+03),\n new google.maps.LatLng( 0.465112360000000E+02, -0.121209765000000E+03),\n new google.maps.LatLng( 0.465106070000000E+02, -0.121210555000000E+03),\n new google.maps.LatLng( 0.465063830000000E+02, -0.121220997000000E+03),\n new google.maps.LatLng( 0.465042760000000E+02, -0.121232128000000E+03),\n new google.maps.LatLng( 0.465019530000000E+02, -0.121238154000000E+03),\n new google.maps.LatLng( 0.464956750000000E+02, -0.121251190000000E+03),\n new google.maps.LatLng( 0.464922190000000E+02, -0.121255896000000E+03),\n new google.maps.LatLng( 0.464893440000000E+02, -0.121261780000000E+03),\n new google.maps.LatLng( 0.464888810000000E+02, -0.121264487000000E+03),\n new google.maps.LatLng( 0.464892960000000E+02, -0.121272229000000E+03),\n new google.maps.LatLng( 0.464932260000000E+02, -0.121269711000000E+03),\n new google.maps.LatLng( 0.464966050000000E+02, -0.121262891000000E+03),\n new google.maps.LatLng( 0.464985930000000E+02, -0.121263286000000E+03),\n new google.maps.LatLng( 0.465001690000000E+02, -0.121265175000000E+03),\n new google.maps.LatLng( 0.465008690000000E+02, -0.121268385000000E+03),\n new google.maps.LatLng( 0.465018070000000E+02, -0.121269377000000E+03),\n new google.maps.LatLng( 0.465064220000000E+02, -0.121261757000000E+03),\n new google.maps.LatLng( 0.465102850000000E+02, -0.121267384000000E+03),\n new google.maps.LatLng( 0.465144000000000E+02, -0.121270492000000E+03),\n new google.maps.LatLng( 0.465153370000000E+02, -0.121270326000000E+03),\n new google.maps.LatLng( 0.465178730000000E+02, -0.121268966000000E+03),\n new google.maps.LatLng( 0.465186490000000E+02, -0.121266781000000E+03),\n new google.maps.LatLng( 0.465223260000000E+02, -0.121261679000000E+03),\n new google.maps.LatLng( 0.465311000000000E+02, -0.121257597000000E+03),\n new google.maps.LatLng( 0.465343450000000E+02, -0.121257462000000E+03),\n new google.maps.LatLng( 0.465383460000000E+02, -0.121260571000000E+03),\n new google.maps.LatLng( 0.465390770000000E+02, -0.121260538000000E+03),\n new google.maps.LatLng( 0.465418180000000E+02, -0.121258746000000E+03),\n new google.maps.LatLng( 0.465427540000000E+02, -0.121256294000000E+03),\n new google.maps.LatLng( 0.465451530000000E+02, -0.121254106000000E+03),\n new google.maps.LatLng( 0.465632780000000E+02, -0.121247004000000E+03),\n new google.maps.LatLng( 0.465652680000000E+02, -0.121243726000000E+03),\n new google.maps.LatLng( 0.465679880000000E+02, -0.121242138000000E+03),\n new google.maps.LatLng( 0.465699080000000E+02, -0.121243035000000E+03),\n new google.maps.LatLng( 0.465769020000000E+02, -0.121240324000000E+03),\n new google.maps.LatLng( 0.465893610000000E+02, -0.121231120000000E+03),\n new google.maps.LatLng( 0.465919680000000E+02, -0.121224237000000E+03),\n new google.maps.LatLng( 0.465913520000000E+02, -0.121222005000000E+03),\n new google.maps.LatLng( 0.465903010000000E+02, -0.121221209000000E+03),\n new google.maps.LatLng( 0.465902100000000E+02, -0.121220016000000E+03),\n new google.maps.LatLng( 0.465948740000000E+02, -0.121211764000000E+03),\n new google.maps.LatLng( 0.465977800000000E+02, -0.121209342000000E+03),\n new google.maps.LatLng( 0.465996250000000E+02, -0.121210801000000E+03),\n new google.maps.LatLng( 0.466016820000000E+02, -0.121213622000000E+03),\n new google.maps.LatLng( 0.466048250000000E+02, -0.121214752000000E+03),\n new google.maps.LatLng( 0.466064140000000E+02, -0.121214188000000E+03),\n new google.maps.LatLng( 0.466080600000000E+02, -0.121212929000000E+03),\n new google.maps.LatLng( 0.466097740000000E+02, -0.121210111000000E+03),\n new google.maps.LatLng( 0.466131120000000E+02, -0.121201490000000E+03),\n new google.maps.LatLng( 0.466146880000000E+02, -0.121205503000000E+03),\n new google.maps.LatLng( 0.466155560000000E+02, -0.121209781000000E+03),\n new google.maps.LatLng( 0.466183900000000E+02, -0.121212999000000E+03),\n new google.maps.LatLng( 0.466199210000000E+02, -0.121210944000000E+03),\n new google.maps.LatLng( 0.466203330000000E+02, -0.121207760000000E+03),\n new google.maps.LatLng( 0.466219330000000E+02, -0.121207727000000E+03),\n new google.maps.LatLng( 0.466237840000000E+02, -0.121208922000000E+03),\n new google.maps.LatLng( 0.466241260000000E+02, -0.121210049000000E+03),\n new google.maps.LatLng( 0.466236000000000E+02, -0.121213698000000E+03),\n new google.maps.LatLng( 0.466240560000000E+02, -0.121219304000000E+03),\n new google.maps.LatLng( 0.466255090000000E+02, -0.121225744000000E+03),\n new google.maps.LatLng( 0.466269700000000E+02, -0.121229295000000E+03),\n new google.maps.LatLng( 0.466278390000000E+02, -0.121229926000000E+03),\n new google.maps.LatLng( 0.466293210000000E+02, -0.121238187000000E+03),\n new google.maps.LatLng( 0.466271240000000E+02, -0.121243559000000E+03),\n new google.maps.LatLng( 0.466259070000000E+02, -0.121251192000000E+03),\n new google.maps.LatLng( 0.466253390000000E+02, -0.121258663000000E+03),\n new google.maps.LatLng( 0.466240700000000E+02, -0.121263935000000E+03),\n new google.maps.LatLng( 0.466230650000000E+02, -0.121265097000000E+03),\n new google.maps.LatLng( 0.466218340000000E+02, -0.121271300000000E+03),\n new google.maps.LatLng( 0.466230020000000E+02, -0.121278630000000E+03),\n new google.maps.LatLng( 0.466233240000000E+02, -0.121284865000000E+03),\n new google.maps.LatLng( 0.466221600000000E+02, -0.121290936000000E+03),\n new google.maps.LatLng( 0.466219330000000E+02, -0.121299329000000E+03),\n new google.maps.LatLng( 0.466225960000000E+02, -0.121300655000000E+03),\n new google.maps.LatLng( 0.466232820000000E+02, -0.121299826000000E+03),\n new google.maps.LatLng( 0.466267210000000E+02, -0.121291602000000E+03),\n new google.maps.LatLng( 0.466291890000000E+02, -0.121287819000000E+03),\n new google.maps.LatLng( 0.466300570000000E+02, -0.121287156000000E+03),\n new google.maps.LatLng( 0.466338730000000E+02, -0.121286789000000E+03),\n new google.maps.LatLng( 0.466368440000000E+02, -0.121287086000000E+03),\n new google.maps.LatLng( 0.466381690000000E+02, -0.121283834000000E+03),\n new google.maps.LatLng( 0.466368400000000E+02, -0.121271458000000E+03),\n new google.maps.LatLng( 0.466357190000000E+02, -0.121268407000000E+03),\n new google.maps.LatLng( 0.466360600000000E+02, -0.121265752000000E+03),\n new google.maps.LatLng( 0.466369280000000E+02, -0.121264192000000E+03),\n new google.maps.LatLng( 0.466440550000000E+02, -0.121257383000000E+03),\n new google.maps.LatLng( 0.466451790000000E+02, -0.121265047000000E+03),\n new google.maps.LatLng( 0.466448620000000E+02, -0.121272216000000E+03),\n new google.maps.LatLng( 0.466461190000000E+02, -0.121274704000000E+03),\n new google.maps.LatLng( 0.466493890000000E+02, -0.121278086000000E+03),\n new google.maps.LatLng( 0.466509210000000E+02, -0.121281404000000E+03),\n new google.maps.LatLng( 0.466516990000000E+02, -0.121285253000000E+03),\n new google.maps.LatLng( 0.466517690000000E+02, -0.121291393000000E+03),\n new google.maps.LatLng( 0.466531410000000E+02, -0.121299324000000E+03),\n new google.maps.LatLng( 0.466561130000000E+02, -0.121306359000000E+03),\n new google.maps.LatLng( 0.466570040000000E+02, -0.121310010000000E+03),\n new google.maps.LatLng( 0.466575300000000E+02, -0.121326839000000E+03),\n new google.maps.LatLng( 0.466557440000000E+02, -0.121337227000000E+03),\n new google.maps.LatLng( 0.466565440000000E+02, -0.121338920000000E+03),\n new google.maps.LatLng( 0.466590580000000E+02, -0.121340049000000E+03),\n new google.maps.LatLng( 0.466594000000000E+02, -0.121340747000000E+03),\n new google.maps.LatLng( 0.466578910000000E+02, -0.121346023000000E+03),\n new google.maps.LatLng( 0.466562960000000E+02, -0.121354383000000E+03),\n new google.maps.LatLng( 0.466544360000000E+02, -0.121358334000000E+03),\n new google.maps.LatLng( 0.466508460000000E+02, -0.121362082000000E+03),\n new google.maps.LatLng( 0.466495420000000E+02, -0.121364536000000E+03),\n new google.maps.LatLng( 0.466494920000000E+02, -0.121374525000000E+03),\n new google.maps.LatLng( 0.466485980000000E+02, -0.121376649000000E+03),\n new google.maps.LatLng( 0.466453760000000E+02, -0.121377371000000E+03),\n new google.maps.LatLng( 0.466436170000000E+02, -0.121379033000000E+03),\n new google.maps.LatLng( 0.466386760000000E+02, -0.121390150000000E+03),\n new google.maps.LatLng( 0.466386760000000E+02, -0.121390150000000E+03),\n new google.maps.LatLng( 0.466406360000000E+02, -0.121398494000000E+03),\n new google.maps.LatLng( 0.466412360000000E+02, -0.121398695000000E+03),\n new google.maps.LatLng( 0.466457360000000E+02, -0.121394695000000E+03),\n new google.maps.LatLng( 0.466460360000000E+02, -0.121395295000000E+03),\n new google.maps.LatLng( 0.466480360000000E+02, -0.121412095000000E+03),\n new google.maps.LatLng( 0.466499360000000E+02, -0.121414995000000E+03),\n new google.maps.LatLng( 0.466517360000000E+02, -0.121416095000000E+03),\n new google.maps.LatLng( 0.466557360000000E+02, -0.121417195000000E+03),\n new google.maps.LatLng( 0.466604360000000E+02, -0.121415995000000E+03),\n new google.maps.LatLng( 0.466650360000000E+02, -0.121412595000000E+03),\n new google.maps.LatLng( 0.466667360000000E+02, -0.121412195000000E+03),\n new google.maps.LatLng( 0.466753360000000E+02, -0.121413595000000E+03),\n new google.maps.LatLng( 0.466824360000000E+02, -0.121408295000000E+03),\n new google.maps.LatLng( 0.466861360000000E+02, -0.121400895000000E+03),\n new google.maps.LatLng( 0.466872360000000E+02, -0.121396695000000E+03),\n new google.maps.LatLng( 0.466858360000000E+02, -0.121382795000000E+03),\n new google.maps.LatLng( 0.466858560000000E+02, -0.121376195000000E+03),\n new google.maps.LatLng( 0.466873610000000E+02, -0.121375029000000E+03),\n new google.maps.LatLng( 0.466907090000000E+02, -0.121373553000000E+03),\n new google.maps.LatLng( 0.466920870000000E+02, -0.121373720000000E+03),\n new google.maps.LatLng( 0.466942440000000E+02, -0.121374939000000E+03),\n new google.maps.LatLng( 0.466963430000000E+02, -0.121378363000000E+03),\n new google.maps.LatLng( 0.466976740000000E+02, -0.121379377000000E+03),\n new google.maps.LatLng( 0.466994770000000E+02, -0.121380057000000E+03),\n new google.maps.LatLng( 0.467024810000000E+02, -0.121379499000000E+03),\n new google.maps.LatLng( 0.467086750000000E+02, -0.121368282000000E+03),\n new google.maps.LatLng( 0.467120100000000E+02, -0.121359469000000E+03),\n new google.maps.LatLng( 0.467124990000000E+02, -0.121357321000000E+03),\n new google.maps.LatLng( 0.467117440000000E+02, -0.121354810000000E+03),\n new google.maps.LatLng( 0.467123660000000E+02, -0.121352320000000E+03),\n new google.maps.LatLng( 0.467161110000000E+02, -0.121355012000000E+03),\n new google.maps.LatLng( 0.467167610000000E+02, -0.121356796000000E+03),\n new google.maps.LatLng( 0.467180120000000E+02, -0.121358374000000E+03),\n new google.maps.LatLng( 0.467228420000000E+02, -0.121362745000000E+03),\n new google.maps.LatLng( 0.467260670000000E+02, -0.121368122000000E+03),\n new google.maps.LatLng( 0.467276170000000E+02, -0.121379837000000E+03),\n new google.maps.LatLng( 0.467276910000000E+02, -0.121386550000000E+03),\n new google.maps.LatLng( 0.467269160000000E+02, -0.121398853000000E+03),\n new google.maps.LatLng( 0.467272680000000E+02, -0.121406449000000E+03),\n new google.maps.LatLng( 0.467290700000000E+02, -0.121409366000000E+03),\n new google.maps.LatLng( 0.467330130000000E+02, -0.121410071000000E+03),\n new google.maps.LatLng( 0.467355770000000E+02, -0.121412057000000E+03),\n new google.maps.LatLng( 0.467366050000000E+02, -0.121418410000000E+03),\n new google.maps.LatLng( 0.467394770000000E+02, -0.121429596000000E+03),\n new google.maps.LatLng( 0.467415160000000E+02, -0.121430954000000E+03),\n new google.maps.LatLng( 0.467429300000000E+02, -0.121431061000000E+03),\n new google.maps.LatLng( 0.467457400000000E+02, -0.121429840000000E+03),\n new google.maps.LatLng( 0.467467820000000E+02, -0.121429277000000E+03),\n new google.maps.LatLng( 0.467480160000000E+02, -0.121426920000000E+03),\n new google.maps.LatLng( 0.467532350000000E+02, -0.121423596000000E+03),\n new google.maps.LatLng( 0.467578340000000E+02, -0.121425097000000E+03),\n new google.maps.LatLng( 0.467595340000000E+02, -0.121433097000000E+03),\n new google.maps.LatLng( 0.467628340000000E+02, -0.121438897000000E+03),\n new google.maps.LatLng( 0.467683340000000E+02, -0.121444997000000E+03),\n new google.maps.LatLng( 0.467807340000000E+02, -0.121455497000000E+03),\n new google.maps.LatLng( 0.467863340000000E+02, -0.121455498000000E+03),\n new google.maps.LatLng( 0.467878340000000E+02, -0.121454598000000E+03),\n new google.maps.LatLng( 0.467924340000000E+02, -0.121448398000000E+03),\n new google.maps.LatLng( 0.467919340000000E+02, -0.121445398000000E+03),\n new google.maps.LatLng( 0.467924340000000E+02, -0.121443497000000E+03),\n new google.maps.LatLng( 0.467931340000000E+02, -0.121442898000000E+03),\n new google.maps.LatLng( 0.467945340000000E+02, -0.121443698000000E+03),\n new google.maps.LatLng( 0.467977340000000E+02, -0.121450498000000E+03),\n new google.maps.LatLng( 0.468044340000000E+02, -0.121457098000000E+03),\n new google.maps.LatLng( 0.468094340000000E+02, -0.121458698000000E+03),\n new google.maps.LatLng( 0.468154340000000E+02, -0.121466398000000E+03),\n new google.maps.LatLng( 0.468180340000000E+02, -0.121470898000000E+03),\n new google.maps.LatLng( 0.468216340000000E+02, -0.121471898000000E+03),\n new google.maps.LatLng( 0.468258340000000E+02, -0.121470499000000E+03),\n new google.maps.LatLng( 0.468292340000000E+02, -0.121471599000000E+03),\n new google.maps.LatLng( 0.468340340000000E+02, -0.121476499000000E+03),\n new google.maps.LatLng( 0.468347340000000E+02, -0.121477699000000E+03),\n new google.maps.LatLng( 0.468338340000000E+02, -0.121479799000000E+03),\n new google.maps.LatLng( 0.468367340000000E+02, -0.121483999000000E+03),\n new google.maps.LatLng( 0.468386340000000E+02, -0.121482599000000E+03),\n new google.maps.LatLng( 0.468398340000000E+02, -0.121483199000000E+03),\n new google.maps.LatLng( 0.468432330000000E+02, -0.121488699000000E+03),\n new google.maps.LatLng( 0.468458330000000E+02, -0.121490399000000E+03),\n new google.maps.LatLng( 0.468484330000000E+02, -0.121491199000000E+03),\n new google.maps.LatLng( 0.468493330000000E+02, -0.121490299000000E+03),\n new google.maps.LatLng( 0.468561330000000E+02, -0.121496199000000E+03),\n new google.maps.LatLng( 0.468610330000000E+02, -0.121494900000000E+03),\n new google.maps.LatLng( 0.468629330000000E+02, -0.121495400000000E+03),\n new google.maps.LatLng( 0.468642330000000E+02, -0.121499900000000E+03),\n new google.maps.LatLng( 0.468646120000000E+02, -0.121504072000000E+03),\n new google.maps.LatLng( 0.468673420000000E+02, -0.121508087000000E+03),\n new google.maps.LatLng( 0.468695200000000E+02, -0.121509717000000E+03),\n new google.maps.LatLng( 0.468716750000000E+02, -0.121515397000000E+03),\n new google.maps.LatLng( 0.467090830000000E+02, -0.121023659000000E+03),\n new google.maps.LatLng( 0.467097200000000E+02, -0.121016616000000E+03),\n new google.maps.LatLng( 0.467045500000000E+02, -0.121006654000000E+03),\n new google.maps.LatLng( 0.467036610000000E+02, -0.120995088000000E+03),\n new google.maps.LatLng( 0.467079180000000E+02, -0.120982768000000E+03),\n new google.maps.LatLng( 0.467089010000000E+02, -0.120981407000000E+03),\n new google.maps.LatLng( 0.467116890000000E+02, -0.120979682000000E+03),\n new google.maps.LatLng( 0.467130390000000E+02, -0.120976792000000E+03),\n new google.maps.LatLng( 0.467137260000000E+02, -0.120971245000000E+03),\n new google.maps.LatLng( 0.467132470000000E+02, -0.120967192000000E+03),\n new google.maps.LatLng( 0.467139340000000E+02, -0.120958188000000E+03),\n new google.maps.LatLng( 0.467151230000000E+02, -0.120955464000000E+03),\n new google.maps.LatLng( 0.467236010000000E+02, -0.120943803000000E+03),\n new google.maps.LatLng( 0.467295650000000E+02, -0.120937057000000E+03),\n new google.maps.LatLng( 0.467332210000000E+02, -0.120930609000000E+03),\n new google.maps.LatLng( 0.467354380000000E+02, -0.120923397000000E+03),\n new google.maps.LatLng( 0.467361450000000E+02, -0.120916451000000E+03),\n new google.maps.LatLng( 0.467352740000000E+02, -0.120908807000000E+03),\n new google.maps.LatLng( 0.467332380000000E+02, -0.120902128000000E+03),\n new google.maps.LatLng( 0.467311550000000E+02, -0.120891561000000E+03),\n new google.maps.LatLng( 0.467309470000000E+02, -0.120887441000000E+03),\n new google.maps.LatLng( 0.467314690000000E+02, -0.120880162000000E+03),\n new google.maps.LatLng( 0.467308300000000E+02, -0.120876186000000E+03),\n new google.maps.LatLng( 0.467303550000000E+02, -0.120866754000000E+03),\n new google.maps.LatLng( 0.467309740000000E+02, -0.120862800000000E+03),\n new google.maps.LatLng( 0.467287610000000E+02, -0.120850635000000E+03),\n new google.maps.LatLng( 0.467302940000000E+02, -0.120844588000000E+03),\n new google.maps.LatLng( 0.467300900000000E+02, -0.120834020000000E+03),\n new google.maps.LatLng( 0.467294960000000E+02, -0.120831661000000E+03),\n new google.maps.LatLng( 0.467251570000000E+02, -0.120821991000000E+03),\n new google.maps.LatLng( 0.467238090000000E+02, -0.120815245000000E+03),\n new google.maps.LatLng( 0.467238090000000E+02, -0.120814016000000E+03),\n new google.maps.LatLng( 0.467263510000000E+02, -0.120811192000000E+03),\n new google.maps.LatLng( 0.467281040000000E+02, -0.120812321000000E+03),\n new google.maps.LatLng( 0.467314860000000E+02, -0.120817970000000E+03),\n new google.maps.LatLng( 0.467334500000000E+02, -0.120824251000000E+03),\n new google.maps.LatLng( 0.467382940000000E+02, -0.120831597000000E+03),\n new google.maps.LatLng( 0.467399840000000E+02, -0.120836317000000E+03),\n new google.maps.LatLng( 0.467482770000000E+02, -0.120844664000000E+03),\n new google.maps.LatLng( 0.467497770000000E+02, -0.120849220000000E+03),\n new google.maps.LatLng( 0.467489150000000E+02, -0.120850283000000E+03),\n new google.maps.LatLng( 0.467471770000000E+02, -0.120855800000000E+03),\n new google.maps.LatLng( 0.467460320000000E+02, -0.120863743000000E+03),\n new google.maps.LatLng( 0.467484270000000E+02, -0.120873352000000E+03),\n new google.maps.LatLng( 0.467544440000000E+02, -0.120887422000000E+03),\n new google.maps.LatLng( 0.467582160000000E+02, -0.120890844000000E+03),\n new google.maps.LatLng( 0.467602050000000E+02, -0.120891906000000E+03),\n new google.maps.LatLng( 0.467662170000000E+02, -0.120898984000000E+03),\n new google.maps.LatLng( 0.467682990000000E+02, -0.120906265000000E+03),\n new google.maps.LatLng( 0.467712940000000E+02, -0.120913879000000E+03),\n new google.maps.LatLng( 0.467735800000000E+02, -0.120916406000000E+03),\n new google.maps.LatLng( 0.467789280000000E+02, -0.120919996000000E+03),\n new google.maps.LatLng( 0.467808010000000E+02, -0.120919695000000E+03),\n new google.maps.LatLng( 0.467820810000000E+02, -0.120917466000000E+03),\n new google.maps.LatLng( 0.467820800000000E+02, -0.120916003000000E+03),\n new google.maps.LatLng( 0.467809830000000E+02, -0.120913176000000E+03),\n new google.maps.LatLng( 0.467794280000000E+02, -0.120910848000000E+03),\n new google.maps.LatLng( 0.467794500000000E+02, -0.120907123000000E+03),\n new google.maps.LatLng( 0.467799300000000E+02, -0.120907222000000E+03),\n new google.maps.LatLng( 0.467839080000000E+02, -0.120912143000000E+03),\n new google.maps.LatLng( 0.467855540000000E+02, -0.120916001000000E+03),\n new google.maps.LatLng( 0.467851660000000E+02, -0.120921490000000E+03),\n new google.maps.LatLng( 0.467864000000000E+02, -0.120927213000000E+03),\n new google.maps.LatLng( 0.467904680000000E+02, -0.120930538000000E+03),\n new google.maps.LatLng( 0.467977570000000E+02, -0.120934630000000E+03),\n new google.maps.LatLng( 0.468028080000000E+02, -0.120938988000000E+03),\n new google.maps.LatLng( 0.468090690000000E+02, -0.120945611000000E+03),\n new google.maps.LatLng( 0.468139810000000E+02, -0.120946910000000E+03),\n new google.maps.LatLng( 0.468150330000000E+02, -0.120946344000000E+03),\n new google.maps.LatLng( 0.468100260000000E+02, -0.120965182000000E+03),\n new google.maps.LatLng( 0.468088370000000E+02, -0.120967377000000E+03),\n new google.maps.LatLng( 0.468094520000000E+02, -0.120973501000000E+03),\n new google.maps.LatLng( 0.468088790000000E+02, -0.120979991000000E+03),\n new google.maps.LatLng( 0.468095860000000E+02, -0.120982854000000E+03),\n new google.maps.LatLng( 0.468131720000000E+02, -0.120986484000000E+03),\n new google.maps.LatLng( 0.468142220000000E+02, -0.120988682000000E+03),\n new google.maps.LatLng( 0.468135810000000E+02, -0.120991976000000E+03),\n new google.maps.LatLng( 0.468106090000000E+02, -0.120995135000000E+03),\n new google.maps.LatLng( 0.468108350000000E+02, -0.120999263000000E+03),\n new google.maps.LatLng( 0.468123880000000E+02, -0.121005545000000E+03),\n new google.maps.LatLng( 0.468130780000000E+02, -0.121013565000000E+03),\n new google.maps.LatLng( 0.468124160000000E+02, -0.121016395000000E+03),\n new google.maps.LatLng( 0.468113430000000E+02, -0.121018193000000E+03),\n new google.maps.LatLng( 0.468107730000000E+02, -0.121021588000000E+03),\n new google.maps.LatLng( 0.468115510000000E+02, -0.121025182000000E+03),\n new google.maps.LatLng( 0.468105480000000E+02, -0.121036765000000E+03),\n new google.maps.LatLng( 0.468092470000000E+02, -0.121042524000000E+03),\n new google.maps.LatLng( 0.468082190000000E+02, -0.121043123000000E+03),\n new google.maps.LatLng( 0.468081290000000E+02, -0.121051278000000E+03),\n new google.maps.LatLng( 0.468106200000000E+02, -0.121062627000000E+03),\n new google.maps.LatLng( 0.468081290000000E+02, -0.121078735000000E+03),\n new google.maps.LatLng( 0.468065740000000E+02, -0.121082196000000E+03),\n new google.maps.LatLng( 0.468052250000000E+02, -0.121083759000000E+03),\n new google.maps.LatLng( 0.468041510000000E+02, -0.121084358000000E+03),\n new google.maps.LatLng( 0.468030090000000E+02, -0.121082960000000E+03),\n new google.maps.LatLng( 0.468012030000000E+02, -0.121084557000000E+03),\n new google.maps.LatLng( 0.467980930000000E+02, -0.121092641000000E+03),\n new google.maps.LatLng( 0.467987790000000E+02, -0.121093939000000E+03),\n new google.maps.LatLng( 0.467986400000000E+02, -0.121100529000000E+03),\n new google.maps.LatLng( 0.467983420000000E+02, -0.121102326000000E+03),\n new google.maps.LatLng( 0.467976110000000E+02, -0.121103456000000E+03),\n new google.maps.LatLng( 0.467966510000000E+02, -0.121103855000000E+03),\n new google.maps.LatLng( 0.467942290000000E+02, -0.121102754000000E+03),\n new google.maps.LatLng( 0.467832370000000E+02, -0.121101915000000E+03),\n new google.maps.LatLng( 0.467803810000000E+02, -0.121101314000000E+03),\n new google.maps.LatLng( 0.467776380000000E+02, -0.121103874000000E+03),\n new google.maps.LatLng( 0.467760140000000E+02, -0.121107132000000E+03),\n new google.maps.LatLng( 0.467734610000000E+02, -0.121109756000000E+03),\n new google.maps.LatLng( 0.467726770000000E+02, -0.121109823000000E+03),\n new google.maps.LatLng( 0.467653200000000E+02, -0.121104563000000E+03),\n new google.maps.LatLng( 0.467618250000000E+02, -0.121100271000000E+03),\n new google.maps.LatLng( 0.467565450000000E+02, -0.121104623000000E+03),\n new google.maps.LatLng( 0.467552310000000E+02, -0.121103984000000E+03),\n new google.maps.LatLng( 0.467542610000000E+02, -0.121100465000000E+03),\n new google.maps.LatLng( 0.467503350000000E+02, -0.121099565000000E+03),\n new google.maps.LatLng( 0.467473370000000E+02, -0.121103448000000E+03),\n new google.maps.LatLng( 0.467472900000000E+02, -0.121108767000000E+03),\n new google.maps.LatLng( 0.467474720000000E+02, -0.121109665000000E+03),\n new google.maps.LatLng( 0.467486140000000E+02, -0.121110663000000E+03),\n new google.maps.LatLng( 0.467485680000000E+02, -0.121112558000000E+03),\n new google.maps.LatLng( 0.467462350000000E+02, -0.121117044000000E+03),\n new google.maps.LatLng( 0.467427820000000E+02, -0.121121927000000E+03),\n new google.maps.LatLng( 0.467423920000000E+02, -0.121125517000000E+03),\n new google.maps.LatLng( 0.467434430000000E+02, -0.121129385000000E+03),\n new google.maps.LatLng( 0.467414330000000E+02, -0.121131714000000E+03),\n new google.maps.LatLng( 0.467396960000000E+02, -0.121132647000000E+03),\n new google.maps.LatLng( 0.467354910000000E+02, -0.121131887000000E+03),\n new google.maps.LatLng( 0.467301000000000E+02, -0.121135083000000E+03),\n new google.maps.LatLng( 0.467276290000000E+02, -0.121130733000000E+03),\n new google.maps.LatLng( 0.467249550000000E+02, -0.121130104000000E+03),\n new google.maps.LatLng( 0.467204770000000E+02, -0.121131073000000E+03),\n new google.maps.LatLng( 0.467139390000000E+02, -0.121127459000000E+03),\n new google.maps.LatLng( 0.467132200000000E+02, -0.121126191000000E+03),\n new google.maps.LatLng( 0.467128230000000E+02, -0.121122295000000E+03),\n new google.maps.LatLng( 0.467139890000000E+02, -0.121121266000000E+03),\n new google.maps.LatLng( 0.467151100000000E+02, -0.121118277000000E+03),\n new google.maps.LatLng( 0.467138580000000E+02, -0.121105783000000E+03),\n new google.maps.LatLng( 0.467134720000000E+02, -0.121095384000000E+03),\n new google.maps.LatLng( 0.467155550000000E+02, -0.121083524000000E+03),\n new google.maps.LatLng( 0.467180700000000E+02, -0.121078541000000E+03),\n new google.maps.LatLng( 0.467203330000000E+02, -0.121071531000000E+03),\n new google.maps.LatLng( 0.467206300000000E+02, -0.121068972000000E+03),\n new google.maps.LatLng( 0.467199670000000E+02, -0.121065085000000E+03),\n new google.maps.LatLng( 0.467137970000000E+02, -0.121061364000000E+03),\n new google.maps.LatLng( 0.467070320000000E+02, -0.121055451000000E+03),\n new google.maps.LatLng( 0.467060720000000E+02, -0.121052627000000E+03),\n new google.maps.LatLng( 0.467067800000000E+02, -0.121047445000000E+03),\n new google.maps.LatLng( 0.467114870000000E+02, -0.121039238000000E+03),\n new google.maps.LatLng( 0.467137930000000E+02, -0.121032459000000E+03),\n new google.maps.LatLng( 0.467133810000000E+02, -0.121031828000000E+03),\n new google.maps.LatLng( 0.467118050000000E+02, -0.121032361000000E+03),\n new google.maps.LatLng( 0.467113020000000E+02, -0.121032095000000E+03),\n new google.maps.LatLng( 0.467103420000000E+02, -0.121030401000000E+03),\n new google.maps.LatLng( 0.467110720000000E+02, -0.121026082000000E+03),\n new google.maps.LatLng( 0.467128070000000E+02, -0.121023523000000E+03),\n new google.maps.LatLng( 0.467122580000000E+02, -0.121021929000000E+03),\n new google.maps.LatLng( 0.467113210000000E+02, -0.121020866000000E+03),\n new google.maps.LatLng( 0.467108870000000E+02, -0.121021000000000E+03),\n new google.maps.LatLng( 0.467090830000000E+02, -0.121023659000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "d087cc0f1429d1eb4ca4c871c0adab29", "score": "0.5974283", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.473466300000000E+02, -0.123231037000000E+03),\n new google.maps.LatLng( 0.473463110000000E+02, -0.123227573000000E+03),\n new google.maps.LatLng( 0.473467940000000E+02, -0.123215770000000E+03),\n new google.maps.LatLng( 0.473488950000000E+02, -0.123208098000000E+03),\n new google.maps.LatLng( 0.473530360000000E+02, -0.123203262000000E+03),\n new google.maps.LatLng( 0.473562590000000E+02, -0.123201245000000E+03),\n new google.maps.LatLng( 0.473579730000000E+02, -0.123200976000000E+03),\n new google.maps.LatLng( 0.473695390000000E+02, -0.123192838000000E+03),\n new google.maps.LatLng( 0.473748140000000E+02, -0.123185335000000E+03),\n new google.maps.LatLng( 0.473771530000000E+02, -0.123180961000000E+03),\n new google.maps.LatLng( 0.473767180000000E+02, -0.123176049000000E+03),\n new google.maps.LatLng( 0.473751810000000E+02, -0.123170161000000E+03),\n new google.maps.LatLng( 0.473739710000000E+02, -0.123169758000000E+03),\n new google.maps.LatLng( 0.473722340000000E+02, -0.123167303000000E+03),\n new google.maps.LatLng( 0.473709420000000E+02, -0.123164037000000E+03),\n new google.maps.LatLng( 0.473745950000000E+02, -0.123164456000000E+03),\n new google.maps.LatLng( 0.473745920000000E+02, -0.123154316000000E+03),\n new google.maps.LatLng( 0.473767360000000E+02, -0.123152428000000E+03),\n new google.maps.LatLng( 0.473847910000000E+02, -0.123147621000000E+03),\n new google.maps.LatLng( 0.473904740000000E+02, -0.123145121000000E+03),\n new google.maps.LatLng( 0.473938290000000E+02, -0.123144911000000E+03),\n new google.maps.LatLng( 0.473938290000000E+02, -0.123144911000000E+03),\n new google.maps.LatLng( 0.473932980000000E+02, -0.123144558000000E+03),\n new google.maps.LatLng( 0.473894760000000E+02, -0.123145128000000E+03),\n new google.maps.LatLng( 0.473862020000000E+02, -0.123146156000000E+03),\n new google.maps.LatLng( 0.473790490000000E+02, -0.123149482000000E+03),\n new google.maps.LatLng( 0.473769110000000E+02, -0.123148395000000E+03),\n new google.maps.LatLng( 0.473751080000000E+02, -0.123148655000000E+03),\n new google.maps.LatLng( 0.473725270000000E+02, -0.123151557000000E+03),\n new google.maps.LatLng( 0.473714540000000E+02, -0.123156099000000E+03),\n new google.maps.LatLng( 0.473709290000000E+02, -0.123157210000000E+03),\n new google.maps.LatLng( 0.473694660000000E+02, -0.123158422000000E+03),\n new google.maps.LatLng( 0.473677520000000E+02, -0.123157716000000E+03),\n new google.maps.LatLng( 0.473651680000000E+02, -0.123155094000000E+03),\n new google.maps.LatLng( 0.473608940000000E+02, -0.123154962000000E+03),\n new google.maps.LatLng( 0.473588840000000E+02, -0.123157721000000E+03),\n new google.maps.LatLng( 0.473543130000000E+02, -0.123159574000000E+03),\n new google.maps.LatLng( 0.473519820000000E+02, -0.123157490000000E+03),\n new google.maps.LatLng( 0.473492160000000E+02, -0.123153960000000E+03),\n new google.maps.LatLng( 0.473467680000000E+02, -0.123146800000000E+03),\n new google.maps.LatLng( 0.473445730000000E+02, -0.123143169000000E+03),\n new google.maps.LatLng( 0.473429260000000E+02, -0.123141119000000E+03),\n new google.maps.LatLng( 0.473420120000000E+02, -0.123141826000000E+03),\n new google.maps.LatLng( 0.473423500000000E+02, -0.123130595000000E+03),\n new google.maps.LatLng( 0.473410680000000E+02, -0.123127268000000E+03),\n new google.maps.LatLng( 0.473403820000000E+02, -0.123126966000000E+03),\n new google.maps.LatLng( 0.473376860000000E+02, -0.123127877000000E+03),\n new google.maps.LatLng( 0.473360870000000E+02, -0.123129055000000E+03),\n new google.maps.LatLng( 0.473346000000000E+02, -0.123126684000000E+03),\n new google.maps.LatLng( 0.473346930000000E+02, -0.123122263000000E+03),\n new google.maps.LatLng( 0.473397680000000E+02, -0.123120318000000E+03),\n new google.maps.LatLng( 0.473398830000000E+02, -0.123119108000000E+03),\n new google.maps.LatLng( 0.473348090000000E+02, -0.123117859000000E+03),\n new google.maps.LatLng( 0.473311070000000E+02, -0.123118325000000E+03),\n new google.maps.LatLng( 0.473297120000000E+02, -0.123119029000000E+03),\n new google.maps.LatLng( 0.473286830000000E+02, -0.123120273000000E+03),\n new google.maps.LatLng( 0.473283620000000E+02, -0.123122390000000E+03),\n new google.maps.LatLng( 0.473297550000000E+02, -0.123128625000000E+03),\n new google.maps.LatLng( 0.473284770000000E+02, -0.123131585000000E+03),\n new google.maps.LatLng( 0.473264210000000E+02, -0.123133907000000E+03),\n new google.maps.LatLng( 0.473247760000000E+02, -0.123134614000000E+03),\n new google.maps.LatLng( 0.473247760000000E+02, -0.123134614000000E+03),\n new google.maps.LatLng( 0.473236790000000E+02, -0.123135019000000E+03),\n new google.maps.LatLng( 0.473219430000000E+02, -0.123138482000000E+03),\n new google.maps.LatLng( 0.473194440000000E+02, -0.123139923000000E+03),\n new google.maps.LatLng( 0.473184210000000E+02, -0.123133478000000E+03),\n new google.maps.LatLng( 0.473135550000000E+02, -0.123137012000000E+03),\n new google.maps.LatLng( 0.473101050000000E+02, -0.123140510000000E+03),\n new google.maps.LatLng( 0.473063820000000E+02, -0.123146931000000E+03),\n new google.maps.LatLng( 0.473057920000000E+02, -0.123146903000000E+03),\n new google.maps.LatLng( 0.473048500000000E+02, -0.123145815000000E+03),\n new google.maps.LatLng( 0.473041640000000E+02, -0.123143774000000E+03),\n new google.maps.LatLng( 0.473034050000000E+02, -0.123132249000000E+03),\n new google.maps.LatLng( 0.473001800000000E+02, -0.123128188000000E+03),\n new google.maps.LatLng( 0.472993110000000E+02, -0.123127685000000E+03),\n new google.maps.LatLng( 0.473018050000000E+02, -0.123120075000000E+03),\n new google.maps.LatLng( 0.473077970000000E+02, -0.123110034000000E+03),\n new google.maps.LatLng( 0.473073190000000E+02, -0.123107211000000E+03),\n new google.maps.LatLng( 0.473066790000000E+02, -0.123106337000000E+03),\n new google.maps.LatLng( 0.473030680000000E+02, -0.123104386000000E+03),\n new google.maps.LatLng( 0.472999600000000E+02, -0.123105526000000E+03),\n new google.maps.LatLng( 0.472932650000000E+02, -0.123103470000000E+03),\n new google.maps.LatLng( 0.472895650000000E+02, -0.123101169000000E+03),\n new google.maps.LatLng( 0.472875930000000E+02, -0.123098344000000E+03),\n new google.maps.LatLng( 0.472872470000000E+02, -0.123096723000000E+03),\n new google.maps.LatLng( 0.472872320000000E+02, -0.123089607000000E+03),\n new google.maps.LatLng( 0.472879480000000E+02, -0.123089066000000E+03),\n new google.maps.LatLng( 0.472937140000000E+02, -0.123088819000000E+03),\n new google.maps.LatLng( 0.472988100000000E+02, -0.123090360000000E+03),\n new google.maps.LatLng( 0.473013010000000E+02, -0.123092416000000E+03),\n new google.maps.LatLng( 0.473012690000000E+02, -0.123099370000000E+03),\n new google.maps.LatLng( 0.473041000000000E+02, -0.123098136000000E+03),\n new google.maps.LatLng( 0.473054500000000E+02, -0.123090946000000E+03),\n new google.maps.LatLng( 0.473115540000000E+02, -0.123086009000000E+03),\n new google.maps.LatLng( 0.473154630000000E+02, -0.123079122000000E+03),\n new google.maps.LatLng( 0.473155320000000E+02, -0.123078752000000E+03),\n new google.maps.LatLng( 0.473124690000000E+02, -0.123078280000000E+03),\n new google.maps.LatLng( 0.473103890000000E+02, -0.123079994000000E+03),\n new google.maps.LatLng( 0.473097040000000E+02, -0.123079994000000E+03),\n new google.maps.LatLng( 0.473093380000000E+02, -0.123079389000000E+03),\n new google.maps.LatLng( 0.473092020000000E+02, -0.123072668000000E+03),\n new google.maps.LatLng( 0.473111220000000E+02, -0.123061175000000E+03),\n new google.maps.LatLng( 0.473136130000000E+02, -0.123059831000000E+03),\n new google.maps.LatLng( 0.473158980000000E+02, -0.123056033000000E+03),\n new google.maps.LatLng( 0.473159150000000E+02, -0.123050899000000E+03),\n new google.maps.LatLng( 0.473159150000000E+02, -0.123050899000000E+03),\n new google.maps.LatLng( 0.473123780000000E+02, -0.123050790000000E+03),\n new google.maps.LatLng( 0.473118750000000E+02, -0.123050219000000E+03),\n new google.maps.LatLng( 0.473108000000000E+02, -0.123045011000000E+03),\n new google.maps.LatLng( 0.473110970000000E+02, -0.123042356000000E+03),\n new google.maps.LatLng( 0.473105930000000E+02, -0.123036509000000E+03),\n new google.maps.LatLng( 0.473073230000000E+02, -0.123031235000000E+03),\n new google.maps.LatLng( 0.473052200000000E+02, -0.123030329000000E+03),\n new google.maps.LatLng( 0.473047860000000E+02, -0.123030632000000E+03),\n new google.maps.LatLng( 0.473031650000000E+02, -0.123035370000000E+03),\n new google.maps.LatLng( 0.473015880000000E+02, -0.123037354000000E+03),\n new google.maps.LatLng( 0.472994630000000E+02, -0.123038564000000E+03),\n new google.maps.LatLng( 0.472969710000000E+02, -0.123037188000000E+03),\n new google.maps.LatLng( 0.472947990000000E+02, -0.123034132000000E+03),\n new google.maps.LatLng( 0.472949670000000E+02, -0.123031202000000E+03),\n new google.maps.LatLng( 0.472999320000000E+02, -0.123020773000000E+03),\n new google.maps.LatLng( 0.472992750000000E+02, -0.123019774000000E+03),\n new google.maps.LatLng( 0.472966950000000E+02, -0.123019291000000E+03),\n new google.maps.LatLng( 0.472938350000000E+02, -0.123021433000000E+03),\n new google.maps.LatLng( 0.472904770000000E+02, -0.123027717000000E+03),\n new google.maps.LatLng( 0.472884620000000E+02, -0.123030497000000E+03),\n new google.maps.LatLng( 0.472871070000000E+02, -0.123027414000000E+03),\n new google.maps.LatLng( 0.472871280000000E+02, -0.123015034000000E+03),\n new google.maps.LatLng( 0.472827710000000E+02, -0.123014892000000E+03),\n new google.maps.LatLng( 0.472773810000000E+02, -0.123025140000000E+03),\n new google.maps.LatLng( 0.472771070000000E+02, -0.123025476000000E+03),\n new google.maps.LatLng( 0.472761700000000E+02, -0.123025043000000E+03),\n new google.maps.LatLng( 0.472767000000000E+02, -0.123021655000000E+03),\n new google.maps.LatLng( 0.472814510000000E+02, -0.123009141000000E+03),\n new google.maps.LatLng( 0.472832520000000E+02, -0.123006882000000E+03),\n new google.maps.LatLng( 0.472865620000000E+02, -0.123004717000000E+03),\n new google.maps.LatLng( 0.472884400000000E+02, -0.123001261000000E+03),\n new google.maps.LatLng( 0.472915610000000E+02, -0.122989664000000E+03),\n new google.maps.LatLng( 0.472951220000000E+02, -0.122980675000000E+03),\n new google.maps.LatLng( 0.472980320000000E+02, -0.122976925000000E+03),\n new google.maps.LatLng( 0.473031620000000E+02, -0.122971571000000E+03),\n new google.maps.LatLng( 0.473116660000000E+02, -0.122958701000000E+03),\n new google.maps.LatLng( 0.473126320000000E+02, -0.122955478000000E+03),\n new google.maps.LatLng( 0.473142490000000E+02, -0.122945469000000E+03),\n new google.maps.LatLng( 0.473148460000000E+02, -0.122943555000000E+03),\n new google.maps.LatLng( 0.473164330000000E+02, -0.122941360000000E+03),\n new google.maps.LatLng( 0.473164590000000E+02, -0.122933856000000E+03),\n new google.maps.LatLng( 0.473140030000000E+02, -0.122939059000000E+03),\n new google.maps.LatLng( 0.473136830000000E+02, -0.122941345000000E+03),\n new google.maps.LatLng( 0.473117170000000E+02, -0.122943630000000E+03),\n new google.maps.LatLng( 0.473085630000000E+02, -0.122944033000000E+03),\n new google.maps.LatLng( 0.473059570000000E+02, -0.122943528000000E+03),\n new google.maps.LatLng( 0.472975230000000E+02, -0.122948433000000E+03),\n new google.maps.LatLng( 0.472928830000000E+02, -0.122950582000000E+03),\n new google.maps.LatLng( 0.472866890000000E+02, -0.122955250000000E+03),\n new google.maps.LatLng( 0.472821860000000E+02, -0.122959615000000E+03),\n new google.maps.LatLng( 0.472777480000000E+02, -0.122972241000000E+03),\n new google.maps.LatLng( 0.472752150000000E+02, -0.122959277000000E+03),\n new google.maps.LatLng( 0.472690680000000E+02, -0.122947454000000E+03),\n new google.maps.LatLng( 0.472703480000000E+02, -0.122944599000000E+03),\n new google.maps.LatLng( 0.472701880000000E+02, -0.122940704000000E+03),\n new google.maps.LatLng( 0.472687480000000E+02, -0.122938185000000E+03),\n new google.maps.LatLng( 0.472624860000000E+02, -0.122933485000000E+03),\n new google.maps.LatLng( 0.472630340000000E+02, -0.122931805000000E+03),\n new google.maps.LatLng( 0.472642450000000E+02, -0.122930596000000E+03),\n new google.maps.LatLng( 0.472642450000000E+02, -0.122930596000000E+03),\n new google.maps.LatLng( 0.472653650000000E+02, -0.122928414000000E+03),\n new google.maps.LatLng( 0.472630790000000E+02, -0.122926131000000E+03),\n new google.maps.LatLng( 0.472593310000000E+02, -0.122927844000000E+03),\n new google.maps.LatLng( 0.472540510000000E+02, -0.122928685000000E+03),\n new google.maps.LatLng( 0.472516290000000E+02, -0.122928047000000E+03),\n new google.maps.LatLng( 0.472506000000000E+02, -0.122927007000000E+03),\n new google.maps.LatLng( 0.472498170000000E+02, -0.122927309000000E+03),\n new google.maps.LatLng( 0.472467140000000E+02, -0.122929726000000E+03),\n new google.maps.LatLng( 0.472454340000000E+02, -0.122931304000000E+03),\n new google.maps.LatLng( 0.472461200000000E+02, -0.122932881000000E+03),\n new google.maps.LatLng( 0.472470340000000E+02, -0.122933150000000E+03),\n new google.maps.LatLng( 0.472461660000000E+02, -0.122938521000000E+03),\n new google.maps.LatLng( 0.472471030000000E+02, -0.122939192000000E+03),\n new google.maps.LatLng( 0.472447490000000E+02, -0.122940837000000E+03),\n new google.maps.LatLng( 0.472428290000000E+02, -0.122940535000000E+03),\n new google.maps.LatLng( 0.472429890000000E+02, -0.122938689000000E+03),\n new google.maps.LatLng( 0.472411150000000E+02, -0.122936574000000E+03),\n new google.maps.LatLng( 0.472356750000000E+02, -0.122936775000000E+03),\n new google.maps.LatLng( 0.472335720000000E+02, -0.122936138000000E+03),\n new google.maps.LatLng( 0.472337280000000E+02, -0.122934306000000E+03),\n new google.maps.LatLng( 0.472332310000000E+02, -0.122934189000000E+03),\n new google.maps.LatLng( 0.472286120000000E+02, -0.122934628000000E+03),\n new google.maps.LatLng( 0.472243380000000E+02, -0.122937245000000E+03),\n new google.maps.LatLng( 0.472241330000000E+02, -0.122938151000000E+03),\n new google.maps.LatLng( 0.472264410000000E+02, -0.122937715000000E+03),\n new google.maps.LatLng( 0.472251380000000E+02, -0.122940298000000E+03),\n new google.maps.LatLng( 0.472178470000000E+02, -0.122941875000000E+03),\n new google.maps.LatLng( 0.472160640000000E+02, -0.122940969000000E+03),\n new google.maps.LatLng( 0.472157440000000E+02, -0.122937480000000E+03),\n new google.maps.LatLng( 0.472088870000000E+02, -0.122933489000000E+03),\n new google.maps.LatLng( 0.472075850000000E+02, -0.122933590000000E+03),\n new google.maps.LatLng( 0.472050930000000E+02, -0.122936072000000E+03),\n new google.maps.LatLng( 0.472075390000000E+02, -0.122943585000000E+03),\n new google.maps.LatLng( 0.472069900000000E+02, -0.122946033000000E+03),\n new google.maps.LatLng( 0.472056190000000E+02, -0.122948750000000E+03),\n new google.maps.LatLng( 0.472036990000000E+02, -0.122950226000000E+03),\n new google.maps.LatLng( 0.472029900000000E+02, -0.122951902000000E+03),\n new google.maps.LatLng( 0.472047960000000E+02, -0.122950729000000E+03),\n new google.maps.LatLng( 0.472058470000000E+02, -0.122951467000000E+03),\n new google.maps.LatLng( 0.472062350000000E+02, -0.122952540000000E+03),\n new google.maps.LatLng( 0.472065090000000E+02, -0.122955861000000E+03),\n new google.maps.LatLng( 0.472050690000000E+02, -0.122960388000000E+03),\n new google.maps.LatLng( 0.472065990000000E+02, -0.122963071000000E+03),\n new google.maps.LatLng( 0.472051130000000E+02, -0.122968136000000E+03),\n new google.maps.LatLng( 0.472050660000000E+02, -0.122970953000000E+03),\n new google.maps.LatLng( 0.472029840000000E+02, -0.122977290000000E+03),\n new google.maps.LatLng( 0.472034630000000E+02, -0.122980176000000E+03),\n new google.maps.LatLng( 0.472022960000000E+02, -0.122985507000000E+03),\n new google.maps.LatLng( 0.472024310000000E+02, -0.122988626000000E+03),\n new google.maps.LatLng( 0.472004430000000E+02, -0.122988691000000E+03),\n new google.maps.LatLng( 0.471997570000000E+02, -0.122989831000000E+03),\n new google.maps.LatLng( 0.472011240000000E+02, -0.122998384000000E+03),\n new google.maps.LatLng( 0.472031570000000E+02, -0.122999996000000E+03),\n new google.maps.LatLng( 0.472042310000000E+02, -0.123000098000000E+03),\n new google.maps.LatLng( 0.472061060000000E+02, -0.122999228000000E+03),\n new google.maps.LatLng( 0.472086880000000E+02, -0.123002079000000E+03),\n new google.maps.LatLng( 0.472095810000000E+02, -0.123004258000000E+03),\n new google.maps.LatLng( 0.472078010000000E+02, -0.123010599000000E+03),\n new google.maps.LatLng( 0.472077560000000E+02, -0.123013014000000E+03),\n new google.maps.LatLng( 0.472085340000000E+02, -0.123014556000000E+03),\n new google.maps.LatLng( 0.472085350000000E+02, -0.123016133000000E+03),\n new google.maps.LatLng( 0.472068690000000E+02, -0.123023044000000E+03),\n new google.maps.LatLng( 0.472086070000000E+02, -0.123027168000000E+03),\n new google.maps.LatLng( 0.472089310000000E+02, -0.123038370000000E+03),\n new google.maps.LatLng( 0.472082910000000E+02, -0.123041154000000E+03),\n new google.maps.LatLng( 0.472078580000000E+02, -0.123047695000000E+03),\n new google.maps.LatLng( 0.472052760000000E+02, -0.123061479000000E+03),\n new google.maps.LatLng( 0.472087960000000E+02, -0.123064096000000E+03),\n new google.maps.LatLng( 0.472100990000000E+02, -0.123069228000000E+03),\n new google.maps.LatLng( 0.472106700000000E+02, -0.123069966000000E+03),\n new google.maps.LatLng( 0.472125900000000E+02, -0.123070302000000E+03),\n new google.maps.LatLng( 0.472137560000000E+02, -0.123069597000000E+03),\n new google.maps.LatLng( 0.472161330000000E+02, -0.123066143000000E+03),\n new google.maps.LatLng( 0.472202010000000E+02, -0.123058125000000E+03),\n new google.maps.LatLng( 0.472216410000000E+02, -0.123052422000000E+03),\n new google.maps.LatLng( 0.472238350000000E+02, -0.123048932000000E+03),\n new google.maps.LatLng( 0.472253880000000E+02, -0.123044301000000E+03),\n new google.maps.LatLng( 0.472235580000000E+02, -0.123038162000000E+03),\n new google.maps.LatLng( 0.472221180000000E+02, -0.123037056000000E+03),\n new google.maps.LatLng( 0.472217750000000E+02, -0.123035815000000E+03),\n new google.maps.LatLng( 0.472216130000000E+02, -0.123028937000000E+03),\n new google.maps.LatLng( 0.472227330000000E+02, -0.123029138000000E+03),\n new google.maps.LatLng( 0.472220710000000E+02, -0.123030413000000E+03),\n new google.maps.LatLng( 0.472221630000000E+02, -0.123031889000000E+03),\n new google.maps.LatLng( 0.472236940000000E+02, -0.123033801000000E+03),\n new google.maps.LatLng( 0.472242430000000E+02, -0.123032324000000E+03),\n new google.maps.LatLng( 0.472258880000000E+02, -0.123032625000000E+03),\n new google.maps.LatLng( 0.472265290000000E+02, -0.123033732000000E+03),\n new google.maps.LatLng( 0.472272840000000E+02, -0.123037221000000E+03),\n new google.maps.LatLng( 0.472300050000000E+02, -0.123044938000000E+03),\n new google.maps.LatLng( 0.472343710000000E+02, -0.123047721000000E+03),\n new google.maps.LatLng( 0.472350800000000E+02, -0.123047721000000E+03),\n new google.maps.LatLng( 0.472389870000000E+02, -0.123044364000000E+03),\n new google.maps.LatLng( 0.472424150000000E+02, -0.123038255000000E+03),\n new google.maps.LatLng( 0.472453850000000E+02, -0.123034293000000E+03),\n new google.maps.LatLng( 0.472477140000000E+02, -0.123026639000000E+03),\n new google.maps.LatLng( 0.472503060000000E+02, -0.123021500000000E+03),\n new google.maps.LatLng( 0.472521690000000E+02, -0.123020055000000E+03),\n new google.maps.LatLng( 0.472567840000000E+02, -0.123013908000000E+03),\n new google.maps.LatLng( 0.472578350000000E+02, -0.123014209000000E+03),\n new google.maps.LatLng( 0.472580870000000E+02, -0.123015720000000E+03),\n new google.maps.LatLng( 0.472592530000000E+02, -0.123017130000000E+03),\n new google.maps.LatLng( 0.472616760000000E+02, -0.123016221000000E+03),\n new google.maps.LatLng( 0.472613110000000E+02, -0.123019545000000E+03),\n new google.maps.LatLng( 0.472590950000000E+02, -0.123020051000000E+03),\n new google.maps.LatLng( 0.472562410000000E+02, -0.123028848000000E+03),\n new google.maps.LatLng( 0.472531800000000E+02, -0.123034725000000E+03),\n new google.maps.LatLng( 0.472512610000000E+02, -0.123040164000000E+03),\n new google.maps.LatLng( 0.472503930000000E+02, -0.123040768000000E+03),\n new google.maps.LatLng( 0.472487920000000E+02, -0.123038554000000E+03),\n new google.maps.LatLng( 0.472478320000000E+02, -0.123038219000000E+03),\n new google.maps.LatLng( 0.472446320000000E+02, -0.123041006000000E+03),\n new google.maps.LatLng( 0.472446100000000E+02, -0.123041576000000E+03),\n new google.maps.LatLng( 0.472460270000000E+02, -0.123042985000000E+03),\n new google.maps.LatLng( 0.472448150000000E+02, -0.123042650000000E+03),\n new google.maps.LatLng( 0.472445190000000E+02, -0.123043959000000E+03),\n new google.maps.LatLng( 0.472450680000000E+02, -0.123048322000000E+03),\n new google.maps.LatLng( 0.472422110000000E+02, -0.123050303000000E+03),\n new google.maps.LatLng( 0.472405430000000E+02, -0.123050538000000E+03),\n new google.maps.LatLng( 0.472375710000000E+02, -0.123052754000000E+03),\n new google.maps.LatLng( 0.472324970000000E+02, -0.123059835000000E+03),\n new google.maps.LatLng( 0.472291140000000E+02, -0.123063392000000E+03),\n new google.maps.LatLng( 0.472268060000000E+02, -0.123067116000000E+03),\n new google.maps.LatLng( 0.472251140000000E+02, -0.123071478000000E+03),\n new google.maps.LatLng( 0.472150560000000E+02, -0.123084525000000E+03),\n new google.maps.LatLng( 0.472135240000000E+02, -0.123088314000000E+03),\n new google.maps.LatLng( 0.472129510000000E+02, -0.123092037000000E+03),\n new google.maps.LatLng( 0.472096140000000E+02, -0.123092304000000E+03),\n new google.maps.LatLng( 0.472093170000000E+02, -0.123094417000000E+03),\n new google.maps.LatLng( 0.472082880000000E+02, -0.123095456000000E+03),\n new google.maps.LatLng( 0.472066890000000E+02, -0.123093141000000E+03),\n new google.maps.LatLng( 0.472059130000000E+02, -0.123084320000000E+03),\n new google.maps.LatLng( 0.472079040000000E+02, -0.123076506000000E+03),\n new google.maps.LatLng( 0.472080190000000E+02, -0.123074527000000E+03),\n new google.maps.LatLng( 0.472066470000000E+02, -0.123075835000000E+03),\n new google.maps.LatLng( 0.472057330000000E+02, -0.123074996000000E+03),\n new google.maps.LatLng( 0.472056880000000E+02, -0.123070469000000E+03),\n new google.maps.LatLng( 0.472041110000000E+02, -0.123068322000000E+03),\n new google.maps.LatLng( 0.472030360000000E+02, -0.123065773000000E+03),\n new google.maps.LatLng( 0.472021910000000E+02, -0.123059333000000E+03),\n new google.maps.LatLng( 0.472032420000000E+02, -0.123051821000000E+03),\n new google.maps.LatLng( 0.472048640000000E+02, -0.123046254000000E+03),\n new google.maps.LatLng( 0.472048610000000E+02, -0.123031967000000E+03),\n new google.maps.LatLng( 0.472038530000000E+02, -0.123024856000000E+03),\n new google.maps.LatLng( 0.472034830000000E+02, -0.123014460000000E+03),\n new google.maps.LatLng( 0.472043270000000E+02, -0.123010938000000E+03),\n new google.maps.LatLng( 0.472043470000000E+02, -0.123005203000000E+03),\n new google.maps.LatLng( 0.472039350000000E+02, -0.123004567000000E+03),\n new google.maps.LatLng( 0.472012380000000E+02, -0.123004067000000E+03),\n new google.maps.LatLng( 0.472008950000000E+02, -0.123003597000000E+03),\n new google.maps.LatLng( 0.471991350000000E+02, -0.123000025000000E+03),\n new google.maps.LatLng( 0.471976750000000E+02, -0.122993953000000E+03),\n new google.maps.LatLng( 0.471972860000000E+02, -0.122994187000000E+03),\n new google.maps.LatLng( 0.471973080000000E+02, -0.122996971000000E+03),\n new google.maps.LatLng( 0.471967130000000E+02, -0.122997942000000E+03),\n new google.maps.LatLng( 0.471957070000000E+02, -0.122998109000000E+03),\n new google.maps.LatLng( 0.471952280000000E+02, -0.122996264000000E+03),\n new google.maps.LatLng( 0.471963355048828E+02, -0.122995052830859E+03),\n new google.maps.LatLng( 0.471965269048828E+02, -0.122996260030859E+03),\n new google.maps.LatLng( 0.471967610000000E+02, -0.122993449000000E+03),\n new google.maps.LatLng( 0.471976990000000E+02, -0.122991975000000E+03),\n new google.maps.LatLng( 0.471966050000000E+02, -0.122984697000000E+03),\n new google.maps.LatLng( 0.471970850000000E+02, -0.122983993000000E+03),\n new google.maps.LatLng( 0.471987310000000E+02, -0.122983861000000E+03),\n new google.maps.LatLng( 0.471991650000000E+02, -0.122983257000000E+03),\n new google.maps.LatLng( 0.471996010000000E+02, -0.122978797000000E+03),\n new google.maps.LatLng( 0.472015690000000E+02, -0.122971353000000E+03),\n new google.maps.LatLng( 0.472012720000000E+02, -0.122969240000000E+03),\n new google.maps.LatLng( 0.472022340000000E+02, -0.122961728000000E+03),\n new google.maps.LatLng( 0.472014350000000E+02, -0.122960017000000E+03),\n new google.maps.LatLng( 0.472004760000000E+02, -0.122952505000000E+03),\n new google.maps.LatLng( 0.472013900000000E+02, -0.122948983000000E+03),\n new google.maps.LatLng( 0.472032650000000E+02, -0.122947206000000E+03),\n new google.maps.LatLng( 0.472035620000000E+02, -0.122946267000000E+03),\n new google.maps.LatLng( 0.472029450000000E+02, -0.122944825000000E+03),\n new google.maps.LatLng( 0.471980080000000E+02, -0.122938151000000E+03),\n new google.maps.LatLng( 0.471957000000000E+02, -0.122939325000000E+03),\n new google.maps.LatLng( 0.471943050000000E+02, -0.122940935000000E+03),\n new google.maps.LatLng( 0.471904420000000E+02, -0.122947875000000E+03),\n new google.maps.LatLng( 0.471853900000000E+02, -0.122954781000000E+03),\n new google.maps.LatLng( 0.471840710000000E+02, -0.122955117000000E+03),\n new google.maps.LatLng( 0.471814080000000E+02, -0.122954613000000E+03),\n new google.maps.LatLng( 0.471779140000000E+02, -0.122955391000000E+03),\n new google.maps.LatLng( 0.471715740000000E+02, -0.122960076000000E+03),\n new google.maps.LatLng( 0.471696210000000E+02, -0.122963311000000E+03),\n new google.maps.LatLng( 0.471686060000000E+02, -0.122967400000000E+03),\n new google.maps.LatLng( 0.471708560000000E+02, -0.122982126000000E+03),\n new google.maps.LatLng( 0.471695140000000E+02, -0.122984598000000E+03),\n new google.maps.LatLng( 0.471677510000000E+02, -0.122992824000000E+03),\n new google.maps.LatLng( 0.471669650000000E+02, -0.122994563000000E+03),\n new google.maps.LatLng( 0.471655770000000E+02, -0.122996119000000E+03),\n new google.maps.LatLng( 0.471641580000000E+02, -0.123000102000000E+03),\n new google.maps.LatLng( 0.471611710000000E+02, -0.123003105000000E+03),\n new google.maps.LatLng( 0.471598920000000E+02, -0.123005084000000E+03),\n new google.maps.LatLng( 0.471567160000000E+02, -0.123006863000000E+03),\n new google.maps.LatLng( 0.471553450000000E+02, -0.123008238000000E+03),\n new google.maps.LatLng( 0.471535860000000E+02, -0.123011121000000E+03),\n new google.maps.LatLng( 0.471535410000000E+02, -0.123013266000000E+03),\n new google.maps.LatLng( 0.471544790000000E+02, -0.123015275000000E+03),\n new google.maps.LatLng( 0.471543900000000E+02, -0.123019061000000E+03),\n new google.maps.LatLng( 0.471560590000000E+02, -0.123021439000000E+03),\n new google.maps.LatLng( 0.471567900000000E+02, -0.123021740000000E+03),\n new google.maps.LatLng( 0.471551690000000E+02, -0.123025863000000E+03),\n new google.maps.LatLng( 0.471552390000000E+02, -0.123028711000000E+03),\n new google.maps.LatLng( 0.471542250000000E+02, -0.123030226000000E+03),\n new google.maps.LatLng( 0.471535030000000E+02, -0.123035280000000E+03),\n new google.maps.LatLng( 0.471538700000000E+02, -0.123037591000000E+03),\n new google.maps.LatLng( 0.471551270000000E+02, -0.123038964000000E+03),\n new google.maps.LatLng( 0.471552870000000E+02, -0.123040874000000E+03),\n new google.maps.LatLng( 0.471547160000000E+02, -0.123041511000000E+03),\n new google.maps.LatLng( 0.471541000000000E+02, -0.123044426000000E+03),\n new google.maps.LatLng( 0.471543740000000E+02, -0.123047174000000E+03),\n new google.maps.LatLng( 0.471536890000000E+02, -0.123049988000000E+03),\n new google.maps.LatLng( 0.471514490000000E+02, -0.123053775000000E+03),\n new google.maps.LatLng( 0.471511300000000E+02, -0.123056623000000E+03),\n new google.maps.LatLng( 0.471505350000000E+02, -0.123057728000000E+03),\n new google.maps.LatLng( 0.471475640000000E+02, -0.123061146000000E+03),\n new google.maps.LatLng( 0.471470610000000E+02, -0.123059504000000E+03),\n new google.maps.LatLng( 0.471414160000000E+02, -0.123071162000000E+03),\n new google.maps.LatLng( 0.471405700000000E+02, -0.123074813000000E+03),\n new google.maps.LatLng( 0.471401350000000E+02, -0.123075315000000E+03),\n new google.maps.LatLng( 0.471393580000000E+02, -0.123075248000000E+03),\n new google.maps.LatLng( 0.471384440000000E+02, -0.123076454000000E+03),\n new google.maps.LatLng( 0.471382380000000E+02, -0.123079536000000E+03),\n new google.maps.LatLng( 0.471367290000000E+02, -0.123083790000000E+03),\n new google.maps.LatLng( 0.471348080000000E+02, -0.123086301000000E+03),\n new google.maps.LatLng( 0.471317000000000E+02, -0.123083118000000E+03),\n new google.maps.LatLng( 0.471314720000000E+02, -0.123078261000000E+03),\n new google.maps.LatLng( 0.471319980000000E+02, -0.123076318000000E+03),\n new google.maps.LatLng( 0.471332560000000E+02, -0.123073874000000E+03),\n new google.maps.LatLng( 0.471349700000000E+02, -0.123073874000000E+03),\n new google.maps.LatLng( 0.471360440000000E+02, -0.123072501000000E+03),\n new google.maps.LatLng( 0.471360440000000E+02, -0.123069788000000E+03),\n new google.maps.LatLng( 0.471370960000000E+02, -0.123067979000000E+03),\n new google.maps.LatLng( 0.471383300000000E+02, -0.123067309000000E+03),\n new google.maps.LatLng( 0.471415990000000E+02, -0.123060811000000E+03),\n new google.maps.LatLng( 0.471445470000000E+02, -0.123056523000000E+03),\n new google.maps.LatLng( 0.471486610000000E+02, -0.123055383000000E+03),\n new google.maps.LatLng( 0.471501240000000E+02, -0.123053574000000E+03),\n new google.maps.LatLng( 0.471529800000000E+02, -0.123046772000000E+03),\n new google.maps.LatLng( 0.471537790000000E+02, -0.123040975000000E+03),\n new google.maps.LatLng( 0.471525440000000E+02, -0.123040205000000E+03),\n new google.maps.LatLng( 0.471516750000000E+02, -0.123037927000000E+03),\n new google.maps.LatLng( 0.471520400000000E+02, -0.123031661000000E+03),\n new google.maps.LatLng( 0.471524500000000E+02, -0.123029650000000E+03),\n new google.maps.LatLng( 0.471535470000000E+02, -0.123027740000000E+03),\n new google.maps.LatLng( 0.471534320000000E+02, -0.123025127000000E+03),\n new google.maps.LatLng( 0.471528600000000E+02, -0.123022715000000E+03),\n new google.maps.LatLng( 0.471507800000000E+02, -0.123023654000000E+03),\n new google.maps.LatLng( 0.471495690000000E+02, -0.123024794000000E+03),\n new google.maps.LatLng( 0.471490430000000E+02, -0.123022785000000E+03),\n new google.maps.LatLng( 0.471519440000000E+02, -0.123020437000000E+03),\n new google.maps.LatLng( 0.471523320000000E+02, -0.123018896000000E+03),\n new google.maps.LatLng( 0.471518520000000E+02, -0.123018226000000E+03),\n new google.maps.LatLng( 0.471486520000000E+02, -0.123017525000000E+03),\n new google.maps.LatLng( 0.471436470000000E+02, -0.123017798000000E+03),\n new google.maps.LatLng( 0.471395090000000E+02, -0.123016796000000E+03),\n new google.maps.LatLng( 0.471371330000000E+02, -0.123018574000000E+03),\n new google.maps.LatLng( 0.471341630000000E+02, -0.123022260000000E+03),\n new google.maps.LatLng( 0.471290430000000E+02, -0.123022030000000E+03),\n new google.maps.LatLng( 0.471275110000000E+02, -0.123021194000000E+03),\n new google.maps.LatLng( 0.471234920000000E+02, -0.123022135000000E+03),\n new google.maps.LatLng( 0.471216650000000E+02, -0.123025585000000E+03),\n new google.maps.LatLng( 0.471211160000000E+02, -0.123027896000000E+03),\n new google.maps.LatLng( 0.471210250000000E+02, -0.123030106000000E+03),\n new google.maps.LatLng( 0.471218260000000E+02, -0.123034927000000E+03),\n new google.maps.LatLng( 0.471201600000000E+02, -0.123043266000000E+03),\n new google.maps.LatLng( 0.471200920000000E+02, -0.123047887000000E+03),\n new google.maps.LatLng( 0.471211900000000E+02, -0.123053177000000E+03),\n new google.maps.LatLng( 0.471198640000000E+02, -0.123061181000000E+03),\n new google.maps.LatLng( 0.471154530000000E+02, -0.123068179000000E+03),\n new google.maps.LatLng( 0.471098980000000E+02, -0.123074606000000E+03),\n new google.maps.LatLng( 0.471087780000000E+02, -0.123076915000000E+03),\n new google.maps.LatLng( 0.471083430000000E+02, -0.123080665000000E+03),\n new google.maps.LatLng( 0.471069940000000E+02, -0.123083543000000E+03),\n new google.maps.LatLng( 0.471032910000000E+02, -0.123085517000000E+03),\n new google.maps.LatLng( 0.470984000000000E+02, -0.123085783000000E+03),\n new google.maps.LatLng( 0.470965940000000E+02, -0.123085213000000E+03),\n new google.maps.LatLng( 0.470962520000000E+02, -0.123084443000000E+03),\n new google.maps.LatLng( 0.470969370000000E+02, -0.123083640000000E+03),\n new google.maps.LatLng( 0.470990860000000E+02, -0.123083373000000E+03),\n new google.maps.LatLng( 0.470995660000000E+02, -0.123082603000000E+03),\n new google.maps.LatLng( 0.470996120000000E+02, -0.123080461000000E+03),\n new google.maps.LatLng( 0.470939660000000E+02, -0.123082401000000E+03),\n new google.maps.LatLng( 0.470926410000000E+02, -0.123081831000000E+03),\n new google.maps.LatLng( 0.470919780000000E+02, -0.123080827000000E+03),\n new google.maps.LatLng( 0.470917950000000E+02, -0.123079154000000E+03),\n new google.maps.LatLng( 0.470930980000000E+02, -0.123081028000000E+03),\n new google.maps.LatLng( 0.470948580000000E+02, -0.123080426000000E+03),\n new google.maps.LatLng( 0.470974670000000E+02, -0.123074896000000E+03),\n new google.maps.LatLng( 0.470974670000000E+02, -0.123074896000000E+03),\n new google.maps.LatLng( 0.470916810000000E+02, -0.123074989000000E+03),\n new google.maps.LatLng( 0.470894030000000E+02, -0.123075027000000E+03),\n new google.maps.LatLng( 0.470845050000000E+02, -0.123075107000000E+03),\n new google.maps.LatLng( 0.470845210000000E+02, -0.123077547000000E+03),\n new google.maps.LatLng( 0.470845600000000E+02, -0.123083240000000E+03),\n new google.maps.LatLng( 0.470877260000000E+02, -0.123083068000000E+03),\n new google.maps.LatLng( 0.470882520000000E+02, -0.123082265000000E+03),\n new google.maps.LatLng( 0.470883720000000E+02, -0.123075538000000E+03),\n new google.maps.LatLng( 0.470894190000000E+02, -0.123075136000000E+03),\n new google.maps.LatLng( 0.470906750000000E+02, -0.123080960000000E+03),\n new google.maps.LatLng( 0.470923890000000E+02, -0.123084796000000E+03),\n new google.maps.LatLng( 0.470911080000000E+02, -0.123086917000000E+03),\n new google.maps.LatLng( 0.470897820000000E+02, -0.123091535000000E+03),\n new google.maps.LatLng( 0.470903060000000E+02, -0.123096254000000E+03),\n new google.maps.LatLng( 0.470889110000000E+02, -0.123098328000000E+03),\n new google.maps.LatLng( 0.470879270000000E+02, -0.123102142000000E+03),\n new google.maps.LatLng( 0.470864190000000E+02, -0.123102509000000E+03),\n new google.maps.LatLng( 0.470856650000000E+02, -0.123100267000000E+03),\n new google.maps.LatLng( 0.470846750000000E+02, -0.123099718000000E+03),\n new google.maps.LatLng( 0.470850330000000E+02, -0.123126260000000E+03),\n new google.maps.LatLng( 0.470848950000000E+02, -0.123202066000000E+03),\n new google.maps.LatLng( 0.470848950000000E+02, -0.123202066000000E+03),\n new google.maps.LatLng( 0.470849830000000E+02, -0.123266155000000E+03),\n new google.maps.LatLng( 0.470840580000000E+02, -0.123327634000000E+03),\n new google.maps.LatLng( 0.470840580000000E+02, -0.123327634000000E+03),\n new google.maps.LatLng( 0.470840200000000E+02, -0.123329179000000E+03),\n new google.maps.LatLng( 0.470886170000000E+02, -0.123330666000000E+03),\n new google.maps.LatLng( 0.470952460000000E+02, -0.123327556000000E+03),\n new google.maps.LatLng( 0.470985380000000E+02, -0.123317414000000E+03),\n new google.maps.LatLng( 0.470992920000000E+02, -0.123317615000000E+03),\n new google.maps.LatLng( 0.471015550000000E+02, -0.123321130000000E+03),\n new google.maps.LatLng( 0.471075650000000E+02, -0.123328128000000E+03),\n new google.maps.LatLng( 0.471122510000000E+02, -0.123328465000000E+03),\n new google.maps.LatLng( 0.471166160000000E+02, -0.123327160000000E+03),\n new google.maps.LatLng( 0.471166170000000E+02, -0.123324850000000E+03),\n new google.maps.LatLng( 0.471179660000000E+02, -0.123320564000000E+03),\n new google.maps.LatLng( 0.471205940000000E+02, -0.123316043000000E+03),\n new google.maps.LatLng( 0.471237490000000E+02, -0.123313900000000E+03),\n new google.maps.LatLng( 0.471251600000000E+02, -0.123311187000000E+03),\n new google.maps.LatLng( 0.471257810000000E+02, -0.123302146000000E+03),\n new google.maps.LatLng( 0.471241590000000E+02, -0.123299669000000E+03),\n new google.maps.LatLng( 0.471235870000000E+02, -0.123294746000000E+03),\n new google.maps.LatLng( 0.471272530000000E+02, -0.123289855000000E+03),\n new google.maps.LatLng( 0.471294360000000E+02, -0.123289888000000E+03),\n new google.maps.LatLng( 0.471310360000000E+02, -0.123291126000000E+03),\n new google.maps.LatLng( 0.471345880000000E+02, -0.123296054000000E+03),\n new google.maps.LatLng( 0.471349000000000E+02, -0.123300368000000E+03),\n new google.maps.LatLng( 0.471373920000000E+02, -0.123300971000000E+03),\n new google.maps.LatLng( 0.471403880000000E+02, -0.123300359000000E+03),\n new google.maps.LatLng( 0.471432890000000E+02, -0.123301036000000E+03),\n new google.maps.LatLng( 0.471435860000000E+02, -0.123302845000000E+03),\n new google.maps.LatLng( 0.471429010000000E+02, -0.123306966000000E+03),\n new google.maps.LatLng( 0.471442260000000E+02, -0.123311154000000E+03),\n new google.maps.LatLng( 0.471461240000000E+02, -0.123313030000000E+03),\n new google.maps.LatLng( 0.471476550000000E+02, -0.123311790000000E+03),\n new google.maps.LatLng( 0.471483180000000E+02, -0.123310584000000E+03),\n new google.maps.LatLng( 0.471496890000000E+02, -0.123309746000000E+03),\n new google.maps.LatLng( 0.471559280000000E+02, -0.123308975000000E+03),\n new google.maps.LatLng( 0.471602020000000E+02, -0.123304250000000E+03),\n new google.maps.LatLng( 0.471639040000000E+02, -0.123304618000000E+03),\n new google.maps.LatLng( 0.471683840000000E+02, -0.123310784000000E+03),\n new google.maps.LatLng( 0.471681330000000E+02, -0.123316951000000E+03),\n new google.maps.LatLng( 0.471659390000000E+02, -0.123319699000000E+03),\n new google.maps.LatLng( 0.471649790000000E+02, -0.123320436000000E+03),\n new google.maps.LatLng( 0.471636070000000E+02, -0.123320570000000E+03),\n new google.maps.LatLng( 0.471567960000000E+02, -0.123326700000000E+03),\n new google.maps.LatLng( 0.471552870000000E+02, -0.123328710000000E+03),\n new google.maps.LatLng( 0.471564070000000E+02, -0.123329515000000E+03),\n new google.maps.LatLng( 0.471575040000000E+02, -0.123331224000000E+03),\n new google.maps.LatLng( 0.471584160000000E+02, -0.123339468000000E+03),\n new google.maps.LatLng( 0.471588250000000E+02, -0.123349420000000E+03),\n new google.maps.LatLng( 0.471572920000000E+02, -0.123353675000000E+03),\n new google.maps.LatLng( 0.471574940000000E+02, -0.123363661000000E+03),\n new google.maps.LatLng( 0.471591840000000E+02, -0.123365841000000E+03),\n new google.maps.LatLng( 0.471618120000000E+02, -0.123366681000000E+03),\n new google.maps.LatLng( 0.471630930000000E+02, -0.123366180000000E+03),\n new google.maps.LatLng( 0.471637330000000E+02, -0.123364773000000E+03),\n new google.maps.LatLng( 0.471653330000000E+02, -0.123364171000000E+03),\n new google.maps.LatLng( 0.471682330000000E+02, -0.123370206000000E+03),\n new google.maps.LatLng( 0.471693750000000E+02, -0.123371515000000E+03),\n new google.maps.LatLng( 0.471731920000000E+02, -0.123373295000000E+03),\n new google.maps.LatLng( 0.471793850000000E+02, -0.123373570000000E+03),\n new google.maps.LatLng( 0.471817390000000E+02, -0.123374378000000E+03),\n new google.maps.LatLng( 0.471786300000000E+02, -0.123376595000000E+03),\n new google.maps.LatLng( 0.471738570000000E+02, -0.123383934000000E+03),\n new google.maps.LatLng( 0.471705900000000E+02, -0.123385881000000E+03),\n new google.maps.LatLng( 0.471685340000000E+02, -0.123388465000000E+03),\n new google.maps.LatLng( 0.471686250000000E+02, -0.123388968000000E+03),\n new google.maps.LatLng( 0.471708420000000E+02, -0.123388563000000E+03),\n new google.maps.LatLng( 0.471721900000000E+02, -0.123387221000000E+03),\n new google.maps.LatLng( 0.471765321506836E+02, -0.123386359860352E+03),\n new google.maps.LatLng( 0.472011030000000E+02, -0.123383468000000E+03),\n new google.maps.LatLng( 0.472011030000000E+02, -0.123383468000000E+03),\n new google.maps.LatLng( 0.472028830000000E+02, -0.123383235000000E+03),\n new google.maps.LatLng( 0.472068830000000E+02, -0.123383901000000E+03),\n new google.maps.LatLng( 0.472166670000000E+02, -0.123388722000000E+03),\n new google.maps.LatLng( 0.472179780000000E+02, -0.123394187000000E+03),\n new google.maps.LatLng( 0.472224790000000E+02, -0.123404802000000E+03),\n new google.maps.LatLng( 0.472381590000000E+02, -0.123407797000000E+03),\n new google.maps.LatLng( 0.472420450000000E+02, -0.123410883000000E+03),\n new google.maps.LatLng( 0.472420450000000E+02, -0.123410883000000E+03),\n new google.maps.LatLng( 0.472456560000000E+02, -0.123410747000000E+03),\n new google.maps.LatLng( 0.472462270000000E+02, -0.123410344000000E+03),\n new google.maps.LatLng( 0.472480000000000E+02, -0.123403026000000E+03),\n new google.maps.LatLng( 0.472501480000000E+02, -0.123386807000000E+03),\n new google.maps.LatLng( 0.472517520000000E+02, -0.123382884000000E+03),\n new google.maps.LatLng( 0.472549570000000E+02, -0.123378897000000E+03),\n new google.maps.LatLng( 0.472598520000000E+02, -0.123375149000000E+03),\n new google.maps.LatLng( 0.472608150000000E+02, -0.123372701000000E+03),\n new google.maps.LatLng( 0.472601990000000E+02, -0.123371289000000E+03),\n new google.maps.LatLng( 0.472594460000000E+02, -0.123370515000000E+03),\n new google.maps.LatLng( 0.472586230000000E+02, -0.123370413000000E+03),\n new google.maps.LatLng( 0.472537980000000E+02, -0.123372315000000E+03),\n new google.maps.LatLng( 0.472508500000000E+02, -0.123371738000000E+03),\n new google.maps.LatLng( 0.472474010000000E+02, -0.123370052000000E+03),\n new google.maps.LatLng( 0.472460770000000E+02, -0.123368807000000E+03),\n new google.maps.LatLng( 0.472450890000000E+02, -0.123366911000000E+03),\n new google.maps.LatLng( 0.472466750000000E+02, -0.123367740000000E+03),\n new google.maps.LatLng( 0.472470640000000E+02, -0.123367170000000E+03),\n new google.maps.LatLng( 0.472483450000000E+02, -0.123364621000000E+03),\n new google.maps.LatLng( 0.472506810000000E+02, -0.123356498000000E+03),\n new google.maps.LatLng( 0.472550500000000E+02, -0.123346733000000E+03),\n new google.maps.LatLng( 0.472569020000000E+02, -0.123343982000000E+03),\n new google.maps.LatLng( 0.472594850000000E+02, -0.123342204000000E+03),\n new google.maps.LatLng( 0.472605370000000E+02, -0.123340761000000E+03),\n new google.maps.LatLng( 0.472601500000000E+02, -0.123334348000000E+03),\n new google.maps.LatLng( 0.472578320000000E+02, -0.123334062000000E+03),\n new google.maps.LatLng( 0.472586140000000E+02, -0.123326971000000E+03),\n new google.maps.LatLng( 0.472578800000000E+02, -0.123323144000000E+03),\n new google.maps.LatLng( 0.472628710000000E+02, -0.123308262000000E+03),\n new google.maps.LatLng( 0.472807450000000E+02, -0.123309638000000E+03),\n new google.maps.LatLng( 0.472842640000000E+02, -0.123306480000000E+03),\n new google.maps.LatLng( 0.472872580000000E+02, -0.123302785000000E+03),\n new google.maps.LatLng( 0.472940220000000E+02, -0.123295931000000E+03),\n new google.maps.LatLng( 0.472961930000000E+02, -0.123289815000000E+03),\n new google.maps.LatLng( 0.472971070000000E+02, -0.123288773000000E+03),\n new google.maps.LatLng( 0.472989350000000E+02, -0.123288134000000E+03),\n new google.maps.LatLng( 0.473017000000000E+02, -0.123285108000000E+03),\n new google.maps.LatLng( 0.473008050000000E+02, -0.123273585000000E+03),\n new google.maps.LatLng( 0.473027930000000E+02, -0.123273483000000E+03),\n new google.maps.LatLng( 0.473053770000000E+02, -0.123274959000000E+03),\n new google.maps.LatLng( 0.473095130000000E+02, -0.123273982000000E+03),\n new google.maps.LatLng( 0.473119130000000E+02, -0.123272871000000E+03),\n new google.maps.LatLng( 0.473165070000000E+02, -0.123273304000000E+03),\n new google.maps.LatLng( 0.473173070000000E+02, -0.123274985000000E+03),\n new google.maps.LatLng( 0.473172170000000E+02, -0.123279018000000E+03),\n new google.maps.LatLng( 0.473201000000000E+02, -0.123291284000000E+03),\n new google.maps.LatLng( 0.473198940000000E+02, -0.123297065000000E+03),\n new google.maps.LatLng( 0.473207170000000E+02, -0.123300695000000E+03),\n new google.maps.LatLng( 0.473231180000000E+02, -0.123306812000000E+03),\n new google.maps.LatLng( 0.473271180000000E+02, -0.123309400000000E+03),\n new google.maps.LatLng( 0.473274610000000E+02, -0.123310140000000E+03),\n new google.maps.LatLng( 0.473259980000000E+02, -0.123316493000000E+03),\n new google.maps.LatLng( 0.473265710000000E+02, -0.123316372000000E+03),\n new google.maps.LatLng( 0.473279630000000E+02, -0.123314913000000E+03),\n new google.maps.LatLng( 0.473301120000000E+02, -0.123311249000000E+03),\n new google.maps.LatLng( 0.473298370000000E+02, -0.123306005000000E+03),\n new google.maps.LatLng( 0.473371960000000E+02, -0.123295850000000E+03),\n new google.maps.LatLng( 0.473385660000000E+02, -0.123292084000000E+03),\n new google.maps.LatLng( 0.473406680000000E+02, -0.123288686000000E+03),\n new google.maps.LatLng( 0.473445070000000E+02, -0.123284044000000E+03),\n new google.maps.LatLng( 0.473545160000000E+02, -0.123278321000000E+03),\n new google.maps.LatLng( 0.473577160000000E+02, -0.123278825000000E+03),\n new google.maps.LatLng( 0.473584710000000E+02, -0.123281010000000E+03),\n new google.maps.LatLng( 0.473585630000000E+02, -0.123283297000000E+03),\n new google.maps.LatLng( 0.473592030000000E+02, -0.123284441000000E+03),\n new google.maps.LatLng( 0.473660820000000E+02, -0.123282049000000E+03),\n new google.maps.LatLng( 0.473681140000000E+02, -0.123280058000000E+03),\n new google.maps.LatLng( 0.473679520000000E+02, -0.123268557000000E+03),\n new google.maps.LatLng( 0.473670600000000E+02, -0.123266640000000E+03),\n new google.maps.LatLng( 0.473661910000000E+02, -0.123266742000000E+03),\n new google.maps.LatLng( 0.473621010000000E+02, -0.123269503000000E+03),\n new google.maps.LatLng( 0.473613020000000E+02, -0.123271051000000E+03),\n new google.maps.LatLng( 0.473568680000000E+02, -0.123272871000000E+03),\n new google.maps.LatLng( 0.473507630000000E+02, -0.123265881000000E+03),\n new google.maps.LatLng( 0.473500320000000E+02, -0.123265545000000E+03),\n new google.maps.LatLng( 0.473482720000000E+02, -0.123266421000000E+03),\n new google.maps.LatLng( 0.473476330000000E+02, -0.123267733000000E+03),\n new google.maps.LatLng( 0.473466510000000E+02, -0.123271231000000E+03),\n new google.maps.LatLng( 0.473467430000000E+02, -0.123272038000000E+03),\n new google.maps.LatLng( 0.473476580000000E+02, -0.123272609000000E+03),\n new google.maps.LatLng( 0.473476580000000E+02, -0.123274223000000E+03),\n new google.maps.LatLng( 0.473471780000000E+02, -0.123274997000000E+03),\n new google.maps.LatLng( 0.473445740000000E+02, -0.123277790000000E+03),\n new google.maps.LatLng( 0.473429740000000E+02, -0.123278665000000E+03),\n new google.maps.LatLng( 0.473391800000000E+02, -0.123279071000000E+03),\n new google.maps.LatLng( 0.473371230000000E+02, -0.123276719000000E+03),\n new google.maps.LatLng( 0.473326640000000E+02, -0.123268990000000E+03),\n new google.maps.LatLng( 0.473324580000000E+02, -0.123267780000000E+03),\n new google.maps.LatLng( 0.473332120000000E+02, -0.123266636000000E+03),\n new google.maps.LatLng( 0.473329600000000E+02, -0.123265124000000E+03),\n new google.maps.LatLng( 0.473291650000000E+02, -0.123264521000000E+03),\n new google.maps.LatLng( 0.473239770000000E+02, -0.123264559000000E+03),\n new google.maps.LatLng( 0.473233370000000E+02, -0.123263182000000E+03),\n new google.maps.LatLng( 0.473231750000000E+02, -0.123260022000000E+03),\n new google.maps.LatLng( 0.473210700000000E+02, -0.123254479000000E+03),\n new google.maps.LatLng( 0.473166340000000E+02, -0.123250438000000E+03),\n new google.maps.LatLng( 0.473154240000000E+02, -0.123248118000000E+03),\n new google.maps.LatLng( 0.473137360000000E+02, -0.123242066000000E+03),\n new google.maps.LatLng( 0.473140340000000E+02, -0.123240655000000E+03),\n new google.maps.LatLng( 0.473152460000000E+02, -0.123238909000000E+03),\n new google.maps.LatLng( 0.473184220000000E+02, -0.123239147000000E+03),\n new google.maps.LatLng( 0.473207290000000E+02, -0.123242511000000E+03),\n new google.maps.LatLng( 0.473275630000000E+02, -0.123243863000000E+03),\n new google.maps.LatLng( 0.473349000000000E+02, -0.123242425000000E+03),\n new google.maps.LatLng( 0.473352660000000E+02, -0.123240912000000E+03),\n new google.maps.LatLng( 0.473346960000000E+02, -0.123238357000000E+03),\n new google.maps.LatLng( 0.473355190000000E+02, -0.123237113000000E+03),\n new google.maps.LatLng( 0.473362280000000E+02, -0.123236475000000E+03),\n new google.maps.LatLng( 0.473427880000000E+02, -0.123234766000000E+03),\n new google.maps.LatLng( 0.473445720000000E+02, -0.123232246000000E+03),\n new google.maps.LatLng( 0.473466300000000E+02, -0.123231037000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "e0db685b5a82e09c4f443162348d9cdd", "score": "0.597379", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.462816640000000E+02, -0.123026934000000E+03),\n new google.maps.LatLng( 0.462804070000000E+02, -0.123026077000000E+03),\n new google.maps.LatLng( 0.462789900000000E+02, -0.123026804000000E+03),\n new google.maps.LatLng( 0.462770710000000E+02, -0.123030959000000E+03),\n new google.maps.LatLng( 0.462761120000000E+02, -0.123032047000000E+03),\n new google.maps.LatLng( 0.462753350000000E+02, -0.123031817000000E+03),\n new google.maps.LatLng( 0.462743510000000E+02, -0.123029807000000E+03),\n new google.maps.LatLng( 0.462732080000000E+02, -0.123029247000000E+03),\n new google.maps.LatLng( 0.462668080000000E+02, -0.123031558000000E+03),\n new google.maps.LatLng( 0.462655510000000E+02, -0.123033668000000E+03),\n new google.maps.LatLng( 0.462647750000000E+02, -0.123038019000000E+03),\n new google.maps.LatLng( 0.462638380000000E+02, -0.123039009000000E+03),\n new google.maps.LatLng( 0.462610030000000E+02, -0.123038812000000E+03),\n new google.maps.LatLng( 0.462596540000000E+02, -0.123038022000000E+03),\n new google.maps.LatLng( 0.462593570000000E+02, -0.123035649000000E+03),\n new google.maps.LatLng( 0.462575140000000E+02, -0.123032311000000E+03),\n new google.maps.LatLng( 0.462498320000000E+02, -0.123038388000000E+03),\n new google.maps.LatLng( 0.462493490000000E+02, -0.123037927000000E+03),\n new google.maps.LatLng( 0.462482680000000E+02, -0.123033875000000E+03),\n new google.maps.LatLng( 0.462451350000000E+02, -0.123029264000000E+03),\n new google.maps.LatLng( 0.462426190000000E+02, -0.123026465000000E+03),\n new google.maps.LatLng( 0.462409730000000E+02, -0.123025379000000E+03),\n new google.maps.LatLng( 0.462565920000000E+02, -0.123025206000000E+03),\n new google.maps.LatLng( 0.462569530000000E+02, -0.123023654000000E+03),\n new google.maps.LatLng( 0.462562410000000E+02, -0.123016932000000E+03),\n new google.maps.LatLng( 0.462503890000000E+02, -0.123016278000000E+03),\n new google.maps.LatLng( 0.462407840000000E+02, -0.123010552000000E+03),\n new google.maps.LatLng( 0.462399830000000E+02, -0.123008115000000E+03),\n new google.maps.LatLng( 0.462389170000000E+02, -0.122999367000000E+03),\n new google.maps.LatLng( 0.462392530000000E+02, -0.122998711000000E+03),\n new google.maps.LatLng( 0.462417250000000E+02, -0.122998650000000E+03),\n new google.maps.LatLng( 0.462493240000000E+02, -0.122992928000000E+03),\n new google.maps.LatLng( 0.462505710000000E+02, -0.122988383000000E+03),\n new google.maps.LatLng( 0.462530880000000E+02, -0.122982487000000E+03),\n new google.maps.LatLng( 0.462586910000000E+02, -0.122975769000000E+03),\n new google.maps.LatLng( 0.462595390000000E+02, -0.122969145000000E+03),\n new google.maps.LatLng( 0.462586700000000E+02, -0.122968848000000E+03),\n new google.maps.LatLng( 0.462586700000000E+02, -0.122968123000000E+03),\n new google.maps.LatLng( 0.462603420000000E+02, -0.122956192000000E+03),\n new google.maps.LatLng( 0.462557030000000E+02, -0.122952796000000E+03),\n new google.maps.LatLng( 0.462530510000000E+02, -0.122951708000000E+03),\n new google.maps.LatLng( 0.462520680000000E+02, -0.122951609000000E+03),\n new google.maps.LatLng( 0.462505350000000E+02, -0.122952320000000E+03),\n new google.maps.LatLng( 0.462350190000000E+02, -0.122950141000000E+03),\n new google.maps.LatLng( 0.462316340000000E+02, -0.122948170000000E+03),\n new google.maps.LatLng( 0.462206070000000E+02, -0.122945044000000E+03),\n new google.maps.LatLng( 0.462174720000000E+02, -0.122950308000000E+03),\n new google.maps.LatLng( 0.462170520000000E+02, -0.122955008000000E+03),\n new google.maps.LatLng( 0.462155420000000E+02, -0.122962820000000E+03),\n new google.maps.LatLng( 0.462137720000000E+02, -0.122965705000000E+03),\n new google.maps.LatLng( 0.462119940000000E+02, -0.122965704000000E+03),\n new google.maps.LatLng( 0.462111550000000E+02, -0.122963095000000E+03),\n new google.maps.LatLng( 0.462123370000000E+02, -0.122962027000000E+03),\n new google.maps.LatLng( 0.462123600000000E+02, -0.122961386000000E+03),\n new google.maps.LatLng( 0.462113610000000E+02, -0.122959601000000E+03),\n new google.maps.LatLng( 0.462087820000000E+02, -0.122958746000000E+03),\n new google.maps.LatLng( 0.462029680000000E+02, -0.122959372000000E+03),\n new google.maps.LatLng( 0.462022050000000E+02, -0.122950461000000E+03),\n new google.maps.LatLng( 0.462089570000000E+02, -0.122938605000000E+03),\n new google.maps.LatLng( 0.462027320000000E+02, -0.122933523000000E+03),\n new google.maps.LatLng( 0.462027320000000E+02, -0.122933523000000E+03),\n new google.maps.LatLng( 0.461850330000000E+02, -0.122919522000000E+03),\n new google.maps.LatLng( 0.461775330000000E+02, -0.122909722000000E+03),\n new google.maps.LatLng( 0.461757090000000E+02, -0.122913399000000E+03),\n new google.maps.LatLng( 0.461747400000000E+02, -0.122914098000000E+03),\n new google.maps.LatLng( 0.461654330000000E+02, -0.122915921000000E+03),\n new google.maps.LatLng( 0.461514970000000E+02, -0.122916084000000E+03),\n new google.maps.LatLng( 0.461504320000000E+02, -0.122917192000000E+03),\n new google.maps.LatLng( 0.461502330000000E+02, -0.122921821000000E+03),\n new google.maps.LatLng( 0.461484330000000E+02, -0.122923521000000E+03),\n new google.maps.LatLng( 0.461442330000000E+02, -0.122922921000000E+03),\n new google.maps.LatLng( 0.461431330000000E+02, -0.122917121000000E+03),\n new google.maps.LatLng( 0.461444630000000E+02, -0.122914901000000E+03),\n new google.maps.LatLng( 0.461444630000000E+02, -0.122914901000000E+03),\n new google.maps.LatLng( 0.461410330000000E+02, -0.122915921000000E+03),\n new google.maps.LatLng( 0.461367330000000E+02, -0.122919021000000E+03),\n new google.maps.LatLng( 0.461288330000000E+02, -0.122922321000000E+03),\n new google.maps.LatLng( 0.461253330000000E+02, -0.122921921000000E+03),\n new google.maps.LatLng( 0.461209330000000E+02, -0.122919420000000E+03),\n new google.maps.LatLng( 0.461162330000000E+02, -0.122912520000000E+03),\n new google.maps.LatLng( 0.461102340000000E+02, -0.122893820000000E+03),\n new google.maps.LatLng( 0.461068340000000E+02, -0.122892520000000E+03),\n new google.maps.LatLng( 0.461044340000000E+02, -0.122894420000000E+03),\n new google.maps.LatLng( 0.460952743804135E+02, -0.122936174578323E+03),\n new google.maps.LatLng( 0.460952743804135E+02, -0.122936174578323E+03),\n new google.maps.LatLng( 0.461048170000000E+02, -0.122962681000000E+03),\n new google.maps.LatLng( 0.461338230000000E+02, -0.123004233000000E+03),\n new google.maps.LatLng( 0.461360430000000E+02, -0.123009436000000E+03),\n new google.maps.LatLng( 0.461391100000000E+02, -0.123022147000000E+03),\n new google.maps.LatLng( 0.461443360000000E+02, -0.123033820000000E+03),\n new google.maps.LatLng( 0.461463510000000E+02, -0.123041297000000E+03),\n new google.maps.LatLng( 0.461535990000000E+02, -0.123051064000000E+03),\n new google.maps.LatLng( 0.461776760000000E+02, -0.123105021000000E+03),\n new google.maps.LatLng( 0.461852680000000E+02, -0.123115904000000E+03),\n new google.maps.LatLng( 0.461855502855062E+02, -0.123119752378115E+03),\n new google.maps.LatLng( 0.461889730000000E+02, -0.123166414000000E+03),\n new google.maps.LatLng( 0.461725410000000E+02, -0.123213054000000E+03),\n new google.maps.LatLng( 0.461725410000000E+02, -0.123213054000000E+03),\n new google.maps.LatLng( 0.461751710000000E+02, -0.123213137000000E+03),\n new google.maps.LatLng( 0.461751710000000E+02, -0.123213137000000E+03),\n new google.maps.LatLng( 0.461809610000000E+02, -0.123213318000000E+03),\n new google.maps.LatLng( 0.461834540000000E+02, -0.123213396000000E+03),\n new google.maps.LatLng( 0.462133320000000E+02, -0.123214333000000E+03),\n new google.maps.LatLng( 0.462134320000000E+02, -0.123216133000000E+03),\n new google.maps.LatLng( 0.462202010000000E+02, -0.123216300000000E+03),\n new google.maps.LatLng( 0.462202010000000E+02, -0.123216300000000E+03),\n new google.maps.LatLng( 0.462353140000000E+02, -0.123216675000000E+03),\n new google.maps.LatLng( 0.462369310000000E+02, -0.123216715000000E+03),\n new google.maps.LatLng( 0.462558310000000E+02, -0.123216934000000E+03),\n new google.maps.LatLng( 0.462818970000000E+02, -0.123214606000000E+03),\n new google.maps.LatLng( 0.462840390000000E+02, -0.123214450000000E+03),\n new google.maps.LatLng( 0.462852960000000E+02, -0.123214427000000E+03),\n new google.maps.LatLng( 0.462878620000000E+02, -0.123212938000000E+03),\n new google.maps.LatLng( 0.462893020000000E+02, -0.123212741000000E+03),\n new google.maps.LatLng( 0.462926280000000E+02, -0.123214369000000E+03),\n new google.maps.LatLng( 0.463004560000000E+02, -0.123214379000000E+03),\n new google.maps.LatLng( 0.462971210000000E+02, -0.123205951000000E+03),\n new google.maps.LatLng( 0.462943330000000E+02, -0.123201861000000E+03),\n new google.maps.LatLng( 0.462851900000000E+02, -0.123192823000000E+03),\n new google.maps.LatLng( 0.462838400000000E+02, -0.123192018000000E+03),\n new google.maps.LatLng( 0.462816020000000E+02, -0.123192263000000E+03),\n new google.maps.LatLng( 0.462803900000000E+02, -0.123193087000000E+03),\n new google.maps.LatLng( 0.462792470000000E+02, -0.123192691000000E+03),\n new google.maps.LatLng( 0.462772580000000E+02, -0.123190944000000E+03),\n new google.maps.LatLng( 0.462738070000000E+02, -0.123186426000000E+03),\n new google.maps.LatLng( 0.462736010000000E+02, -0.123181877000000E+03),\n new google.maps.LatLng( 0.462752010000000E+02, -0.123180624000000E+03),\n new google.maps.LatLng( 0.462782410000000E+02, -0.123175085000000E+03),\n new google.maps.LatLng( 0.462775550000000E+02, -0.123173338000000E+03),\n new google.maps.LatLng( 0.462842040000000E+02, -0.123157411000000E+03),\n new google.maps.LatLng( 0.462846820000000E+02, -0.123153190000000E+03),\n new google.maps.LatLng( 0.462821890000000E+02, -0.123147257000000E+03),\n new google.maps.LatLng( 0.462774540000000E+02, -0.123140931000000E+03),\n new google.maps.LatLng( 0.462772940000000E+02, -0.123140138000000E+03),\n new google.maps.LatLng( 0.462783680000000E+02, -0.123138621000000E+03),\n new google.maps.LatLng( 0.462793740000000E+02, -0.123138720000000E+03),\n new google.maps.LatLng( 0.462810410000000E+02, -0.123136674000000E+03),\n new google.maps.LatLng( 0.462828680000000E+02, -0.123133144000000E+03),\n new google.maps.LatLng( 0.462788210000000E+02, -0.123121129000000E+03),\n new google.maps.LatLng( 0.462808570000000E+02, -0.123119252000000E+03),\n new google.maps.LatLng( 0.462851780000000E+02, -0.123117278000000E+03),\n new google.maps.LatLng( 0.462886550000000E+02, -0.123111940000000E+03),\n new google.maps.LatLng( 0.462881300000000E+02, -0.123111346000000E+03),\n new google.maps.LatLng( 0.462853640000000E+02, -0.123111706000000E+03),\n new google.maps.LatLng( 0.462842670000000E+02, -0.123110815000000E+03),\n new google.maps.LatLng( 0.462851140000000E+02, -0.123107782000000E+03),\n new google.maps.LatLng( 0.462854360000000E+02, -0.123101187000000E+03),\n new google.maps.LatLng( 0.462821000000000E+02, -0.123096569000000E+03),\n new google.maps.LatLng( 0.462798600000000E+02, -0.123094787000000E+03),\n new google.maps.LatLng( 0.462782840000000E+02, -0.123090104000000E+03),\n new google.maps.LatLng( 0.462800450000000E+02, -0.123088061000000E+03),\n new google.maps.LatLng( 0.462810510000000E+02, -0.123084270000000E+03),\n new google.maps.LatLng( 0.462800690000000E+02, -0.123077115000000E+03),\n new google.maps.LatLng( 0.462795900000000E+02, -0.123063103000000E+03),\n new google.maps.LatLng( 0.462802990000000E+02, -0.123061355000000E+03),\n new google.maps.LatLng( 0.462805270000000E+02, -0.123058388000000E+03),\n new google.maps.LatLng( 0.462770060000000E+02, -0.123054004000000E+03),\n new google.maps.LatLng( 0.462762750000000E+02, -0.123053707000000E+03),\n new google.maps.LatLng( 0.462745830000000E+02, -0.123054268000000E+03),\n new google.maps.LatLng( 0.462729150000000E+02, -0.123053510000000E+03),\n new google.maps.LatLng( 0.462720230000000E+02, -0.123051961000000E+03),\n new google.maps.LatLng( 0.462789450000000E+02, -0.123029804000000E+03),\n new google.maps.LatLng( 0.462799960000000E+02, -0.123027957000000E+03),\n new google.maps.LatLng( 0.462816640000000E+02, -0.123026934000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "12db21cfeff045f4ed5959d18914c0dc", "score": "0.59730893", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.478639220000000E+02, -0.121548196000000E+03),\n new google.maps.LatLng( 0.478645970000000E+02, -0.121478070000000E+03),\n new google.maps.LatLng( 0.478651680000000E+02, -0.121476611000000E+03),\n new google.maps.LatLng( 0.478664720000000E+02, -0.121474370000000E+03),\n new google.maps.LatLng( 0.478816600000000E+02, -0.121455125000000E+03),\n new google.maps.LatLng( 0.478851330000000E+02, -0.121451458000000E+03),\n new google.maps.LatLng( 0.478872590000000E+02, -0.121446532000000E+03),\n new google.maps.LatLng( 0.478932000000000E+02, -0.121437938000000E+03),\n new google.maps.LatLng( 0.478943200000000E+02, -0.121437224000000E+03),\n new google.maps.LatLng( 0.478988670000000E+02, -0.121436409000000E+03),\n new google.maps.LatLng( 0.479102730000000E+02, -0.121438191000000E+03),\n new google.maps.LatLng( 0.479104740000000E+02, -0.121437055000000E+03),\n new google.maps.LatLng( 0.479046020000000E+02, -0.121435015000000E+03),\n new google.maps.LatLng( 0.479017460000000E+02, -0.121435117000000E+03),\n new google.maps.LatLng( 0.479003970000000E+02, -0.121434472000000E+03),\n new google.maps.LatLng( 0.478995520000000E+02, -0.121433147000000E+03),\n new google.maps.LatLng( 0.478965790000000E+02, -0.121412252000000E+03),\n new google.maps.LatLng( 0.478966470000000E+02, -0.121411062000000E+03),\n new google.maps.LatLng( 0.478983150000000E+02, -0.121407528000000E+03),\n new google.maps.LatLng( 0.478981310000000E+02, -0.121403077000000E+03),\n new google.maps.LatLng( 0.478971710000000E+02, -0.121401990000000E+03),\n new google.maps.LatLng( 0.478885530000000E+02, -0.121363212000000E+03),\n new google.maps.LatLng( 0.478864560000000E+02, -0.121351083000000E+03),\n new google.maps.LatLng( 0.478867990000000E+02, -0.121348909000000E+03),\n new google.maps.LatLng( 0.478881940000000E+02, -0.121346634000000E+03),\n new google.maps.LatLng( 0.478878980000000E+02, -0.121342693000000E+03),\n new google.maps.LatLng( 0.478872810000000E+02, -0.121341232000000E+03),\n new google.maps.LatLng( 0.478861840000000E+02, -0.121341232000000E+03),\n new google.maps.LatLng( 0.478839910000000E+02, -0.121342632000000E+03),\n new google.maps.LatLng( 0.478869260000000E+02, -0.121328574000000E+03),\n new google.maps.LatLng( 0.478902770000000E+02, -0.121321496000000E+03),\n new google.maps.LatLng( 0.478885410000000E+02, -0.121322549000000E+03),\n new google.maps.LatLng( 0.478817080000000E+02, -0.121331548000000E+03),\n new google.maps.LatLng( 0.478807480000000E+02, -0.121331242000000E+03),\n new google.maps.LatLng( 0.478791490000000E+02, -0.121327302000000E+03),\n new google.maps.LatLng( 0.478773900000000E+02, -0.121325637000000E+03),\n new google.maps.LatLng( 0.478717080000000E+02, -0.121323697000000E+03),\n new google.maps.LatLng( 0.478629110000000E+02, -0.121323560000000E+03),\n new google.maps.LatLng( 0.478602840000000E+02, -0.121322133000000E+03),\n new google.maps.LatLng( 0.478590040000000E+02, -0.121322337000000E+03),\n new google.maps.LatLng( 0.478587750000000E+02, -0.121326587000000E+03),\n new google.maps.LatLng( 0.478577640000000E+02, -0.121328796000000E+03),\n new google.maps.LatLng( 0.478555690000000E+02, -0.121329129000000E+03),\n new google.maps.LatLng( 0.478545660000000E+02, -0.121326452000000E+03),\n new google.maps.LatLng( 0.478535780000000E+02, -0.121325268000000E+03),\n new google.maps.LatLng( 0.478507714459961E+02, -0.121327241247852E+03),\n new google.maps.LatLng( 0.478491760000000E+02, -0.121330331000000E+03),\n new google.maps.LatLng( 0.478474440000000E+02, -0.121328343000000E+03),\n new google.maps.LatLng( 0.478467190000000E+02, -0.121324696000000E+03),\n new google.maps.LatLng( 0.478457396768555E+02, -0.121323426553125E+03),\n new google.maps.LatLng( 0.478449584768555E+02, -0.121324078153125E+03),\n new google.maps.LatLng( 0.478452770000000E+02, -0.121326228000000E+03),\n new google.maps.LatLng( 0.478443710000000E+02, -0.121330226000000E+03),\n new google.maps.LatLng( 0.478429710000000E+02, -0.121333357000000E+03),\n new google.maps.LatLng( 0.478418750000000E+02, -0.121324791000000E+03),\n new google.maps.LatLng( 0.478450660000000E+02, -0.121316599000000E+03),\n new google.maps.LatLng( 0.478454360000000E+02, -0.121307961000000E+03),\n new google.maps.LatLng( 0.478401300000000E+02, -0.121306553000000E+03),\n new google.maps.LatLng( 0.478366800000000E+02, -0.121306859000000E+03),\n new google.maps.LatLng( 0.478334320000000E+02, -0.121308467000000E+03),\n new google.maps.LatLng( 0.478326230000000E+02, -0.121314255000000E+03),\n new google.maps.LatLng( 0.478369780000000E+02, -0.121315648000000E+03),\n new google.maps.LatLng( 0.478420270000000E+02, -0.121319111000000E+03),\n new google.maps.LatLng( 0.478418900000000E+02, -0.121319450000000E+03),\n new google.maps.LatLng( 0.478361280000000E+02, -0.121319804000000E+03),\n new google.maps.LatLng( 0.478350290000000E+02, -0.121320568000000E+03),\n new google.maps.LatLng( 0.478334170000000E+02, -0.121323319000000E+03),\n new google.maps.LatLng( 0.478328900000000E+02, -0.121323485000000E+03),\n new google.maps.LatLng( 0.478265000000000E+02, -0.121324205000000E+03),\n new google.maps.LatLng( 0.478227380000000E+02, -0.121323480000000E+03),\n new google.maps.LatLng( 0.478209940000000E+02, -0.121322329000000E+03),\n new google.maps.LatLng( 0.478197540000000E+02, -0.121322211000000E+03),\n new google.maps.LatLng( 0.478184140000000E+02, -0.121323097000000E+03),\n new google.maps.LatLng( 0.478167490000000E+02, -0.121339969000000E+03),\n new google.maps.LatLng( 0.478176600000000E+02, -0.121343683000000E+03),\n new google.maps.LatLng( 0.478200550000000E+02, -0.121348280000000E+03),\n new google.maps.LatLng( 0.478198800000000E+02, -0.121350801000000E+03),\n new google.maps.LatLng( 0.478159390000000E+02, -0.121347449000000E+03),\n new google.maps.LatLng( 0.478129880000000E+02, -0.121342908000000E+03),\n new google.maps.LatLng( 0.478117520000000E+02, -0.121341870000000E+03),\n new google.maps.LatLng( 0.478074760000000E+02, -0.121340984000000E+03),\n new google.maps.LatLng( 0.478101300000000E+02, -0.121322601000000E+03),\n new google.maps.LatLng( 0.478103120000000E+02, -0.121310391000000E+03),\n new google.maps.LatLng( 0.478123680000000E+02, -0.121302012000000E+03),\n new google.maps.LatLng( 0.478125510000000E+02, -0.121298518000000E+03),\n new google.maps.LatLng( 0.478119480000000E+02, -0.121295929000000E+03),\n new google.maps.LatLng( 0.478111110000000E+02, -0.121295364000000E+03),\n new google.maps.LatLng( 0.478090770000000E+02, -0.121295535000000E+03),\n new google.maps.LatLng( 0.478073860000000E+02, -0.121295094000000E+03),\n new google.maps.LatLng( 0.478034510000000E+02, -0.121292592000000E+03),\n new google.maps.LatLng( 0.478016970000000E+02, -0.121292316000000E+03),\n new google.maps.LatLng( 0.477943850000000E+02, -0.121294557000000E+03),\n new google.maps.LatLng( 0.477907110000000E+02, -0.121298336000000E+03),\n new google.maps.LatLng( 0.477901320000000E+02, -0.121297264000000E+03),\n new google.maps.LatLng( 0.477859770000000E+02, -0.121295915000000E+03),\n new google.maps.LatLng( 0.477838060000000E+02, -0.121298187000000E+03),\n new google.maps.LatLng( 0.477796360000000E+02, -0.121300627000000E+03),\n new google.maps.LatLng( 0.477800630000000E+02, -0.121385286000000E+03),\n new google.maps.LatLng( 0.477800630000000E+02, -0.121385286000000E+03),\n new google.maps.LatLng( 0.477803280000000E+02, -0.121455615000000E+03),\n new google.maps.LatLng( 0.477783280000000E+02, -0.121455715000000E+03),\n new google.maps.LatLng( 0.477779700000000E+02, -0.121482897000000E+03),\n new google.maps.LatLng( 0.477779700000000E+02, -0.121482897000000E+03),\n new google.maps.LatLng( 0.477777330000000E+02, -0.121500513000000E+03),\n new google.maps.LatLng( 0.477777330000000E+02, -0.121500513000000E+03),\n new google.maps.LatLng( 0.477775260000000E+02, -0.121584519000000E+03),\n new google.maps.LatLng( 0.477775260000000E+02, -0.121584519000000E+03),\n new google.maps.LatLng( 0.478635540000000E+02, -0.121586038000000E+03),\n new google.maps.LatLng( 0.478639220000000E+02, -0.121548196000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "73dc82be310da74f285e47de67ad8b66", "score": "0.5972445", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.483026450000000E+02, -0.122351509000000E+03),\n new google.maps.LatLng( 0.482975550000000E+02, -0.122353728000000E+03),\n new google.maps.LatLng( 0.482976330000000E+02, -0.122360880000000E+03),\n new google.maps.LatLng( 0.482976330000000E+02, -0.122360880000000E+03),\n new google.maps.LatLng( 0.482976330000000E+02, -0.122361933000000E+03),\n new google.maps.LatLng( 0.482975920000000E+02, -0.122364122000000E+03),\n new google.maps.LatLng( 0.483017030000000E+02, -0.122365448000000E+03),\n new google.maps.LatLng( 0.483034630000000E+02, -0.122365073000000E+03),\n new google.maps.LatLng( 0.483054060000000E+02, -0.122362233000000E+03),\n new google.maps.LatLng( 0.483071680000000E+02, -0.122357199000000E+03),\n new google.maps.LatLng( 0.483091340000000E+02, -0.122355522000000E+03),\n new google.maps.LatLng( 0.483149610000000E+02, -0.122354054000000E+03),\n new google.maps.LatLng( 0.483186860000000E+02, -0.122356112000000E+03),\n new google.maps.LatLng( 0.483201030000000E+02, -0.122356011000000E+03),\n new google.maps.LatLng( 0.483217720000000E+02, -0.122354059000000E+03),\n new google.maps.LatLng( 0.483223900000000E+02, -0.122348680000000E+03),\n new google.maps.LatLng( 0.483236020000000E+02, -0.122347002000000E+03),\n new google.maps.LatLng( 0.483262300000000E+02, -0.122345908000000E+03),\n new google.maps.LatLng( 0.483312120000000E+02, -0.122345054000000E+03),\n new google.maps.LatLng( 0.483337710000000E+02, -0.122345432000000E+03),\n new google.maps.LatLng( 0.483395060000000E+02, -0.122348623000000E+03),\n new google.maps.LatLng( 0.483413210000000E+02, -0.122350744000000E+03),\n new google.maps.LatLng( 0.483413210000000E+02, -0.122350744000000E+03),\n new google.maps.LatLng( 0.483417610000000E+02, -0.122346704000000E+03),\n new google.maps.LatLng( 0.483396220000000E+02, -0.122341426000000E+03),\n new google.maps.LatLng( 0.483366280000000E+02, -0.122342315000000E+03),\n new google.maps.LatLng( 0.483214190000000E+02, -0.122343794000000E+03),\n new google.maps.LatLng( 0.483135890000000E+02, -0.122346465000000E+03),\n new google.maps.LatLng( 0.483026450000000E+02, -0.122351509000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "ca5c6eb0a2409127fe3bf4a44b537c73", "score": "0.5970824", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.471853550000000E+02, -0.123767885000000E+03),\n new google.maps.LatLng( 0.471847590000000E+02, -0.123764600000000E+03),\n new google.maps.LatLng( 0.471851920000000E+02, -0.123760577000000E+03),\n new google.maps.LatLng( 0.471872940000000E+02, -0.123759938000000E+03),\n new google.maps.LatLng( 0.471880250000000E+02, -0.123759200000000E+03),\n new google.maps.LatLng( 0.471908130000000E+02, -0.123751232000000E+03),\n new google.maps.LatLng( 0.471887110000000E+02, -0.123740676000000E+03),\n new google.maps.LatLng( 0.471840270000000E+02, -0.123738492000000E+03),\n new google.maps.LatLng( 0.471823360000000E+02, -0.123738658000000E+03),\n new google.maps.LatLng( 0.471761860000000E+02, -0.123742071000000E+03),\n new google.maps.LatLng( 0.471745150000000E+02, -0.123746494000000E+03),\n new google.maps.LatLng( 0.471722530000000E+02, -0.123745654000000E+03),\n new google.maps.LatLng( 0.471719110000000E+02, -0.123744380000000E+03),\n new google.maps.LatLng( 0.471723700000000E+02, -0.123740124000000E+03),\n new google.maps.LatLng( 0.471743840000000E+02, -0.123734260000000E+03),\n new google.maps.LatLng( 0.471766710000000E+02, -0.123730273000000E+03),\n new google.maps.LatLng( 0.471826160000000E+02, -0.123722468000000E+03),\n new google.maps.LatLng( 0.471852890000000E+02, -0.123724380000000E+03),\n new google.maps.LatLng( 0.471863640000000E+02, -0.123724113000000E+03),\n new google.maps.LatLng( 0.471872020000000E+02, -0.123722388000000E+03),\n new google.maps.LatLng( 0.471853590000000E+02, -0.123719653000000E+03),\n new google.maps.LatLng( 0.471779770000000E+02, -0.123721124000000E+03),\n new google.maps.LatLng( 0.471721240000000E+02, -0.123726818000000E+03),\n new google.maps.LatLng( 0.471680290000000E+02, -0.123736902000000E+03),\n new google.maps.LatLng( 0.471630660000000E+02, -0.123744404000000E+03),\n new google.maps.LatLng( 0.471609870000000E+02, -0.123744502000000E+03),\n new google.maps.LatLng( 0.471512980000000E+02, -0.123739534000000E+03),\n new google.maps.LatLng( 0.471440080000000E+02, -0.123738488000000E+03),\n new google.maps.LatLng( 0.471402810000000E+02, -0.123742571000000E+03),\n new google.maps.LatLng( 0.471370570000000E+02, -0.123744176000000E+03),\n new google.maps.LatLng( 0.471365330000000E+02, -0.123741997000000E+03),\n new google.maps.LatLng( 0.471363070000000E+02, -0.123735533000000E+03),\n new google.maps.LatLng( 0.471348910000000E+02, -0.123732584000000E+03),\n new google.maps.LatLng( 0.471359900000000E+02, -0.123727930000000E+03),\n new google.maps.LatLng( 0.471369270000000E+02, -0.123727260000000E+03),\n new google.maps.LatLng( 0.471421333520508E+02, -0.123725668644727E+03),\n new google.maps.LatLng( 0.471436930000000E+02, -0.123725825000000E+03),\n new google.maps.LatLng( 0.471437840000000E+02, -0.123726863000000E+03),\n new google.maps.LatLng( 0.471449040000000E+02, -0.123727367000000E+03),\n new google.maps.LatLng( 0.471457270000000E+02, -0.123725759000000E+03),\n new google.maps.LatLng( 0.471458190000000E+02, -0.123724654000000E+03),\n new google.maps.LatLng( 0.471445750000000E+02, -0.123722307000000E+03),\n new google.maps.LatLng( 0.471406090000000E+02, -0.123719559000000E+03),\n new google.maps.LatLng( 0.471364490000000E+02, -0.123722169000000E+03),\n new google.maps.LatLng( 0.471335910000000E+02, -0.123726153000000E+03),\n new google.maps.LatLng( 0.471269830000000E+02, -0.123731640000000E+03),\n new google.maps.LatLng( 0.471240320000000E+02, -0.123733012000000E+03),\n new google.maps.LatLng( 0.471190260000000E+02, -0.123733276000000E+03),\n new google.maps.LatLng( 0.471132660000000E+02, -0.123735313000000E+03),\n new google.maps.LatLng( 0.471121450000000E+02, -0.123738459000000E+03),\n new google.maps.LatLng( 0.471094480000000E+02, -0.123739862000000E+03),\n new google.maps.LatLng( 0.470977460000000E+02, -0.123739181000000E+03),\n new google.maps.LatLng( 0.470931290000000E+02, -0.123740449000000E+03),\n new google.maps.LatLng( 0.470883960000000E+02, -0.123743255000000E+03),\n new google.maps.LatLng( 0.470864760000000E+02, -0.123745026000000E+03),\n new google.maps.LatLng( 0.470824980000000E+02, -0.123753952000000E+03),\n new google.maps.LatLng( 0.470814540000000E+02, -0.123754952000000E+03),\n new google.maps.LatLng( 0.470839840000000E+02, -0.123745559000000E+03),\n new google.maps.LatLng( 0.470886750000000E+02, -0.123735551000000E+03),\n new google.maps.LatLng( 0.470893630000000E+02, -0.123728130000000E+03),\n new google.maps.LatLng( 0.470877430000000E+02, -0.123717387000000E+03),\n new google.maps.LatLng( 0.470877430000000E+02, -0.123717387000000E+03),\n new google.maps.LatLng( 0.470852740000000E+02, -0.123720564000000E+03),\n new google.maps.LatLng( 0.470839920000000E+02, -0.123727055000000E+03),\n new google.maps.LatLng( 0.470813520000000E+02, -0.123735480000000E+03),\n new google.maps.LatLng( 0.470017750000000E+02, -0.123734403000000E+03),\n new google.maps.LatLng( 0.470015560000000E+02, -0.123699462000000E+03),\n new google.maps.LatLng( 0.470003230000000E+02, -0.123704844000000E+03),\n new google.maps.LatLng( 0.470012140000000E+02, -0.123710122000000E+03),\n new google.maps.LatLng( 0.470007330000000E+02, -0.123712828000000E+03),\n new google.maps.LatLng( 0.469902360000000E+02, -0.123733319000000E+03),\n new google.maps.LatLng( 0.469902860000000E+02, -0.123736027000000E+03),\n new google.maps.LatLng( 0.469945820000000E+02, -0.123735867000000E+03),\n new google.maps.LatLng( 0.469946360000000E+02, -0.123738432000000E+03),\n new google.maps.LatLng( 0.469927250000000E+02, -0.123740284000000E+03),\n new google.maps.LatLng( 0.469883910000000E+02, -0.123737496000000E+03),\n new google.maps.LatLng( 0.469833090000000E+02, -0.123737770000000E+03),\n new google.maps.LatLng( 0.469804280000000E+02, -0.123740238000000E+03),\n new google.maps.LatLng( 0.469793950000000E+02, -0.123742078000000E+03),\n new google.maps.LatLng( 0.469783450000000E+02, -0.123735444000000E+03),\n new google.maps.LatLng( 0.469784410000000E+02, -0.123713184000000E+03),\n new google.maps.LatLng( 0.469807350000000E+02, -0.123708038000000E+03),\n new google.maps.LatLng( 0.469809590000000E+02, -0.123673658000000E+03),\n new google.maps.LatLng( 0.469750240000000E+02, -0.123672903000000E+03),\n new google.maps.LatLng( 0.469745460000000E+02, -0.123679551000000E+03),\n new google.maps.LatLng( 0.469730120000000E+02, -0.123680927000000E+03),\n new google.maps.LatLng( 0.469716640000000E+02, -0.123681095000000E+03),\n new google.maps.LatLng( 0.469708190000000E+02, -0.123680427000000E+03),\n new google.maps.LatLng( 0.469674810000000E+02, -0.123670879000000E+03),\n new google.maps.LatLng( 0.469652450000000E+02, -0.123671976000000E+03),\n new google.maps.LatLng( 0.469646520000000E+02, -0.123675602000000E+03),\n new google.maps.LatLng( 0.469631390000000E+02, -0.123677891000000E+03),\n new google.maps.LatLng( 0.469621450000000E+02, -0.123678537000000E+03),\n new google.maps.LatLng( 0.469622230000000E+02, -0.123672020000000E+03),\n new google.maps.LatLng( 0.469577290000000E+02, -0.123672084000000E+03),\n new google.maps.LatLng( 0.469577290000000E+02, -0.123672084000000E+03),\n new google.maps.LatLng( 0.469591620000000E+02, -0.123684935000000E+03),\n new google.maps.LatLng( 0.469582020000000E+02, -0.123692479000000E+03),\n new google.maps.LatLng( 0.469586820000000E+02, -0.123698623000000E+03),\n new google.maps.LatLng( 0.469584530000000E+02, -0.123701393000000E+03),\n new google.maps.LatLng( 0.469539480000000E+02, -0.123714577000000E+03),\n new google.maps.LatLng( 0.469495350000000E+02, -0.123720549000000E+03),\n new google.maps.LatLng( 0.469500370000000E+02, -0.123722619000000E+03),\n new google.maps.LatLng( 0.469520480000000E+02, -0.123724222000000E+03),\n new google.maps.LatLng( 0.469530300000000E+02, -0.123725959000000E+03),\n new google.maps.LatLng( 0.469534390000000E+02, -0.123731133000000E+03),\n new google.maps.LatLng( 0.469530040000000E+02, -0.123732401000000E+03),\n new google.maps.LatLng( 0.469517470000000E+02, -0.123733201000000E+03),\n new google.maps.LatLng( 0.469490280000000E+02, -0.123733833000000E+03),\n new google.maps.LatLng( 0.469478620000000E+02, -0.123733231000000E+03),\n new google.maps.LatLng( 0.469463990000000E+02, -0.123733296000000E+03),\n new google.maps.LatLng( 0.469458040000000E+02, -0.123734864000000E+03),\n new google.maps.LatLng( 0.469503950000000E+02, -0.123741611000000E+03),\n new google.maps.LatLng( 0.469528170000000E+02, -0.123742748000000E+03),\n new google.maps.LatLng( 0.469593790000000E+02, -0.123736812000000E+03),\n new google.maps.LatLng( 0.469618450000000E+02, -0.123742891000000E+03),\n new google.maps.LatLng( 0.469619440000000E+02, -0.123751275000000E+03),\n new google.maps.LatLng( 0.469617310000000E+02, -0.123754231000000E+03),\n new google.maps.LatLng( 0.469584660000000E+02, -0.123766474000000E+03),\n new google.maps.LatLng( 0.469589010000000E+02, -0.123769111000000E+03),\n new google.maps.LatLng( 0.469629710000000E+02, -0.123773581000000E+03),\n new google.maps.LatLng( 0.469708800000000E+02, -0.123777983000000E+03),\n new google.maps.LatLng( 0.469751080000000E+02, -0.123778682000000E+03),\n new google.maps.LatLng( 0.469775540000000E+02, -0.123780350000000E+03),\n new google.maps.LatLng( 0.469785840000000E+02, -0.123782620000000E+03),\n new google.maps.LatLng( 0.469789730000000E+02, -0.123784657000000E+03),\n new google.maps.LatLng( 0.469787220000000E+02, -0.123786360000000E+03),\n new google.maps.LatLng( 0.469746330000000E+02, -0.123807667000000E+03),\n new google.maps.LatLng( 0.469746330000000E+02, -0.123808969000000E+03),\n new google.maps.LatLng( 0.469759360000000E+02, -0.123810939000000E+03),\n new google.maps.LatLng( 0.469767590000000E+02, -0.123811607000000E+03),\n new google.maps.LatLng( 0.469783820000000E+02, -0.123810772000000E+03),\n new google.maps.LatLng( 0.469803240000000E+02, -0.123806331000000E+03),\n new google.maps.LatLng( 0.469828160000000E+02, -0.123803725000000E+03),\n new google.maps.LatLng( 0.469844150000000E+02, -0.123803024000000E+03),\n new google.maps.LatLng( 0.469851240000000E+02, -0.123804693000000E+03),\n new google.maps.LatLng( 0.469850560000000E+02, -0.123807532000000E+03),\n new google.maps.LatLng( 0.469856270000000E+02, -0.123809336000000E+03),\n new google.maps.LatLng( 0.469878890000000E+02, -0.123812275000000E+03),\n new google.maps.LatLng( 0.469895578732422E+02, -0.123810793360156E+03),\n new google.maps.LatLng( 0.469906090000000E+02, -0.123807164000000E+03),\n new google.maps.LatLng( 0.469932370000000E+02, -0.123804759000000E+03),\n new google.maps.LatLng( 0.469985620000000E+02, -0.123801384000000E+03),\n new google.maps.LatLng( 0.469998140000000E+02, -0.123802854000000E+03),\n new google.maps.LatLng( 0.469998140000000E+02, -0.123803789000000E+03),\n new google.maps.LatLng( 0.469987220000000E+02, -0.123802620000000E+03),\n new google.maps.LatLng( 0.469974880000000E+02, -0.123802821000000E+03),\n new google.maps.LatLng( 0.469919340000000E+02, -0.123806463000000E+03),\n new google.maps.LatLng( 0.469907460000000E+02, -0.123808868000000E+03),\n new google.maps.LatLng( 0.469903108042969E+02, -0.123811540479102E+03),\n new google.maps.LatLng( 0.469893290000000E+02, -0.123812909000000E+03),\n new google.maps.LatLng( 0.469884600000000E+02, -0.123813010000000E+03),\n new google.maps.LatLng( 0.469874320000000E+02, -0.123812175000000E+03),\n new google.maps.LatLng( 0.469853990000000E+02, -0.123809636000000E+03),\n new google.maps.LatLng( 0.469841870000000E+02, -0.123803692000000E+03),\n new google.maps.LatLng( 0.469815590000000E+02, -0.123806063000000E+03),\n new google.maps.LatLng( 0.469784960000000E+02, -0.123811340000000E+03),\n new google.maps.LatLng( 0.469775360000000E+02, -0.123812041000000E+03),\n new google.maps.LatLng( 0.469760050000000E+02, -0.123811874000000E+03),\n new google.maps.LatLng( 0.469739250000000E+02, -0.123809737000000E+03),\n new google.maps.LatLng( 0.469718680000000E+02, -0.123812308000000E+03),\n new google.maps.LatLng( 0.469656960000000E+02, -0.123823493000000E+03),\n new google.maps.LatLng( 0.469610090000000E+02, -0.123836878000000E+03),\n new google.maps.LatLng( 0.469610520000000E+02, -0.123842320000000E+03),\n new google.maps.LatLng( 0.469616910000000E+02, -0.123846027000000E+03),\n new google.maps.LatLng( 0.469643790000000E+02, -0.123851520000000E+03),\n new google.maps.LatLng( 0.469643790000000E+02, -0.123851520000000E+03),\n new google.maps.LatLng( 0.469806590000000E+02, -0.123852183000000E+03),\n new google.maps.LatLng( 0.469824420000000E+02, -0.123852452000000E+03),\n new google.maps.LatLng( 0.469828530000000E+02, -0.123853053000000E+03),\n new google.maps.LatLng( 0.469844760000000E+02, -0.123852086000000E+03),\n new google.maps.LatLng( 0.469881760000000E+02, -0.123840696000000E+03),\n new google.maps.LatLng( 0.469949360000000E+02, -0.123827894000000E+03),\n new google.maps.LatLng( 0.469999040000000E+02, -0.123820824000000E+03),\n new google.maps.LatLng( 0.470018960000000E+02, -0.123820721000000E+03),\n new google.maps.LatLng( 0.470033400000000E+02, -0.123822997000000E+03),\n new google.maps.LatLng( 0.470117740000000E+02, -0.123823600000000E+03),\n new google.maps.LatLng( 0.470132820000000E+02, -0.123823267000000E+03),\n new google.maps.LatLng( 0.470146310000000E+02, -0.123822065000000E+03),\n new google.maps.LatLng( 0.470197740000000E+02, -0.123820762000000E+03),\n new google.maps.LatLng( 0.470230880000000E+02, -0.123822634000000E+03),\n new google.maps.LatLng( 0.470243220000000E+02, -0.123822668000000E+03),\n new google.maps.LatLng( 0.470321160000000E+02, -0.123821365000000E+03),\n new google.maps.LatLng( 0.470335560000000E+02, -0.123820664000000E+03),\n new google.maps.LatLng( 0.470355670000000E+02, -0.123817622000000E+03),\n new google.maps.LatLng( 0.470369610000000E+02, -0.123811604000000E+03),\n new google.maps.LatLng( 0.470460570000000E+02, -0.123799065000000E+03),\n new google.maps.LatLng( 0.470565230000000E+02, -0.123789664000000E+03),\n new google.maps.LatLng( 0.470608430000000E+02, -0.123788325000000E+03),\n new google.maps.LatLng( 0.470668060000000E+02, -0.123779960000000E+03),\n new google.maps.LatLng( 0.470728840000000E+02, -0.123773299000000E+03),\n new google.maps.LatLng( 0.470748270000000E+02, -0.123775840000000E+03),\n new google.maps.LatLng( 0.470771360000000E+02, -0.123777411000000E+03),\n new google.maps.LatLng( 0.470819800000000E+02, -0.123773928000000E+03),\n new google.maps.LatLng( 0.470826420000000E+02, -0.123770347000000E+03),\n new google.maps.LatLng( 0.470873040000000E+02, -0.123772786000000E+03),\n new google.maps.LatLng( 0.470943220000000E+02, -0.123774823000000E+03),\n new google.maps.LatLng( 0.470981620000000E+02, -0.123776996000000E+03),\n new google.maps.LatLng( 0.470977520000000E+02, -0.123779105000000E+03),\n new google.maps.LatLng( 0.470985520000000E+02, -0.123780878000000E+03),\n new google.maps.LatLng( 0.471113980000000E+02, -0.123785424000000E+03),\n new google.maps.LatLng( 0.471123130000000E+02, -0.123789641000000E+03),\n new google.maps.LatLng( 0.471133420000000E+02, -0.123791549000000E+03),\n new google.maps.LatLng( 0.471186660000000E+02, -0.123783913000000E+03),\n new google.maps.LatLng( 0.471186430000000E+02, -0.123782708000000E+03),\n new google.maps.LatLng( 0.471220700000000E+02, -0.123778186000000E+03),\n new google.maps.LatLng( 0.471305520000000E+02, -0.123776872000000E+03),\n new google.maps.LatLng( 0.471335230000000E+02, -0.123778377000000E+03),\n new google.maps.LatLng( 0.471369740000000E+02, -0.123777136000000E+03),\n new google.maps.LatLng( 0.471422520000000E+02, -0.123773615000000E+03),\n new google.maps.LatLng( 0.471423210000000E+02, -0.123772778000000E+03),\n new google.maps.LatLng( 0.471411320000000E+02, -0.123770266000000E+03),\n new google.maps.LatLng( 0.471410390000000E+02, -0.123768257000000E+03),\n new google.maps.LatLng( 0.471437360000000E+02, -0.123767015000000E+03),\n new google.maps.LatLng( 0.471478490000000E+02, -0.123766911000000E+03),\n new google.maps.LatLng( 0.471498600000000E+02, -0.123767378000000E+03),\n new google.maps.LatLng( 0.471504550000000E+02, -0.123767847000000E+03),\n new google.maps.LatLng( 0.471498840000000E+02, -0.123770527000000E+03),\n new google.maps.LatLng( 0.471534060000000E+02, -0.123775751000000E+03),\n new google.maps.LatLng( 0.471587090000000E+02, -0.123776452000000E+03),\n new google.maps.LatLng( 0.471627310000000E+02, -0.123776483000000E+03),\n new google.maps.LatLng( 0.471655640000000E+02, -0.123773498000000E+03),\n new google.maps.LatLng( 0.471651520000000E+02, -0.123771923000000E+03),\n new google.maps.LatLng( 0.471635750000000E+02, -0.123772695000000E+03),\n new google.maps.LatLng( 0.471628440000000E+02, -0.123771624000000E+03),\n new google.maps.LatLng( 0.471630940000000E+02, -0.123767467000000E+03),\n new google.maps.LatLng( 0.471697660000000E+02, -0.123763339000000E+03),\n new google.maps.LatLng( 0.471714570000000E+02, -0.123763539000000E+03),\n new google.maps.LatLng( 0.471760060000000E+02, -0.123765848000000E+03),\n new google.maps.LatLng( 0.471783850000000E+02, -0.123769634000000E+03),\n new google.maps.LatLng( 0.471794370000000E+02, -0.123773890000000E+03),\n new google.maps.LatLng( 0.471829110000000E+02, -0.123771641000000E+03),\n new google.maps.LatLng( 0.471853550000000E+02, -0.123767885000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "bc92cf7b9701e9bafe9596c144201349", "score": "0.59707624", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.473670200000000E+02, -0.121373840000000E+03),\n new google.maps.LatLng( 0.473611700000000E+02, -0.121373564000000E+03),\n new google.maps.LatLng( 0.473563510000000E+02, -0.121367439000000E+03),\n new google.maps.LatLng( 0.473496800000000E+02, -0.121364407000000E+03),\n new google.maps.LatLng( 0.473432360000000E+02, -0.121364938000000E+03),\n new google.maps.LatLng( 0.473403800000000E+02, -0.121361641000000E+03),\n new google.maps.LatLng( 0.473401330000000E+02, -0.121354816000000E+03),\n new google.maps.LatLng( 0.473396530000000E+02, -0.121352933000000E+03),\n new google.maps.LatLng( 0.473349020000000E+02, -0.121347821000000E+03),\n new google.maps.LatLng( 0.473311780000000E+02, -0.121345432000000E+03),\n new google.maps.LatLng( 0.473274770000000E+02, -0.121338137000000E+03),\n new google.maps.LatLng( 0.473225410000000E+02, -0.121339412000000E+03),\n new google.maps.LatLng( 0.473197300000000E+02, -0.121341797000000E+03),\n new google.maps.LatLng( 0.473141750000000E+02, -0.121351706000000E+03),\n new google.maps.LatLng( 0.473162530000000E+02, -0.121354664000000E+03),\n new google.maps.LatLng( 0.473200450000000E+02, -0.121358431000000E+03),\n new google.maps.LatLng( 0.473239510000000E+02, -0.121360585000000E+03),\n new google.maps.LatLng( 0.473282680000000E+02, -0.121363916000000E+03),\n new google.maps.LatLng( 0.473284960000000E+02, -0.121364890000000E+03),\n new google.maps.LatLng( 0.473277880000000E+02, -0.121365831000000E+03),\n new google.maps.LatLng( 0.473283350000000E+02, -0.121368386000000E+03),\n new google.maps.LatLng( 0.473308010000000E+02, -0.121371413000000E+03),\n new google.maps.LatLng( 0.473372210000000E+02, -0.121374782000000E+03),\n new google.maps.LatLng( 0.473378380000000E+02, -0.121374615000000E+03),\n new google.maps.LatLng( 0.473384100000000E+02, -0.121372767000000E+03),\n new google.maps.LatLng( 0.473472300000000E+02, -0.121374558000000E+03),\n new google.maps.LatLng( 0.473510220000000E+02, -0.121376205000000E+03),\n new google.maps.LatLng( 0.473551820000000E+02, -0.121380194000000E+03),\n new google.maps.LatLng( 0.473590920000000E+02, -0.121385233000000E+03),\n new google.maps.LatLng( 0.473653790000000E+02, -0.121390541000000E+03),\n new google.maps.LatLng( 0.473683960000000E+02, -0.121392657000000E+03),\n new google.maps.LatLng( 0.473723040000000E+02, -0.121392754000000E+03),\n new google.maps.LatLng( 0.473725100000000E+02, -0.121393494000000E+03),\n new google.maps.LatLng( 0.473725100000000E+02, -0.121393494000000E+03),\n new google.maps.LatLng( 0.473777900000000E+02, -0.121390129000000E+03),\n new google.maps.LatLng( 0.473829990000000E+02, -0.121388106000000E+03),\n new google.maps.LatLng( 0.473870890000000E+02, -0.121387530000000E+03),\n new google.maps.LatLng( 0.473893290000000E+02, -0.121388470000000E+03),\n new google.maps.LatLng( 0.473913630000000E+02, -0.121387492000000E+03),\n new google.maps.LatLng( 0.473914760000000E+02, -0.121386920000000E+03),\n new google.maps.LatLng( 0.473897380000000E+02, -0.121383422000000E+03),\n new google.maps.LatLng( 0.473869260000000E+02, -0.121380565000000E+03),\n new google.maps.LatLng( 0.473819890000000E+02, -0.121378350000000E+03),\n new google.maps.LatLng( 0.473711990000000E+02, -0.121377316000000E+03),\n new google.maps.LatLng( 0.473692580000000E+02, -0.121375120000000E+03),\n new google.maps.LatLng( 0.473670200000000E+02, -0.121373840000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "6da6e0d46fc21d61d1cb3090f5036fa0", "score": "0.59696716", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.463525010000000E+02, -0.119260253000000E+03),\n new google.maps.LatLng( 0.463533450000000E+02, -0.119261276000000E+03),\n new google.maps.LatLng( 0.463592330000000E+02, -0.119264008000000E+03),\n new google.maps.LatLng( 0.463651180000000E+02, -0.119265731000000E+03),\n new google.maps.LatLng( 0.463664230000000E+02, -0.119264663000000E+03),\n new google.maps.LatLng( 0.463660540000000E+02, -0.119263889000000E+03),\n new google.maps.LatLng( 0.463584750000000E+02, -0.119261452000000E+03),\n new google.maps.LatLng( 0.463525010000000E+02, -0.119260253000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "e5d433f0bb26f39488a223c5d9e703f6", "score": "0.59696525", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.458145280000000E+02, -0.121223264000000E+03),\n new google.maps.LatLng( 0.458150650000000E+02, -0.121219868000000E+03),\n new google.maps.LatLng( 0.458143000000000E+02, -0.121216623000000E+03),\n new google.maps.LatLng( 0.458182760000000E+02, -0.121195278000000E+03),\n new google.maps.LatLng( 0.458177770000000E+02, -0.121194197000000E+03),\n new google.maps.LatLng( 0.458155400000000E+02, -0.121193415000000E+03),\n new google.maps.LatLng( 0.458140590000000E+02, -0.121192282000000E+03),\n new google.maps.LatLng( 0.458134860000000E+02, -0.121190654000000E+03),\n new google.maps.LatLng( 0.458157010000000E+02, -0.121188040000000E+03),\n new google.maps.LatLng( 0.458181820000000E+02, -0.121188310000000E+03),\n new google.maps.LatLng( 0.458188810000000E+02, -0.121187317000000E+03),\n new google.maps.LatLng( 0.458206500000000E+02, -0.121180332000000E+03),\n new google.maps.LatLng( 0.458232430000000E+02, -0.121166205000000E+03),\n new google.maps.LatLng( 0.458232430000000E+02, -0.121166205000000E+03),\n new google.maps.LatLng( 0.458209310000000E+02, -0.121170999000000E+03),\n new google.maps.LatLng( 0.458184610000000E+02, -0.121165703000000E+03),\n new google.maps.LatLng( 0.458191460000000E+02, -0.121163905000000E+03),\n new google.maps.LatLng( 0.458192600000000E+02, -0.121161388000000E+03),\n new google.maps.LatLng( 0.458180250000000E+02, -0.121158087000000E+03),\n new google.maps.LatLng( 0.458178420000000E+02, -0.121156290000000E+03),\n new google.maps.LatLng( 0.458186400000000E+02, -0.121153021000000E+03),\n new google.maps.LatLng( 0.458199210000000E+02, -0.121153477000000E+03),\n new google.maps.LatLng( 0.458183880000000E+02, -0.121150667000000E+03),\n new google.maps.LatLng( 0.458150060000000E+02, -0.121152794000000E+03),\n new google.maps.LatLng( 0.458138420000000E+02, -0.121158351000000E+03),\n new google.maps.LatLng( 0.458135000000000E+02, -0.121160966000000E+03),\n new google.maps.LatLng( 0.458138390000000E+02, -0.121163164000000E+03),\n new google.maps.LatLng( 0.458126360000000E+02, -0.121169277000000E+03),\n new google.maps.LatLng( 0.458121770000000E+02, -0.121170576000000E+03),\n new google.maps.LatLng( 0.458111280000000E+02, -0.121169958000000E+03),\n new google.maps.LatLng( 0.458126100000000E+02, -0.121164399000000E+03),\n new google.maps.LatLng( 0.458122200000000E+02, -0.121160869000000E+03),\n new google.maps.LatLng( 0.458127450000000E+02, -0.121156162000000E+03),\n new google.maps.LatLng( 0.458146850000000E+02, -0.121150441000000E+03),\n new google.maps.LatLng( 0.458176100000000E+02, -0.121147955000000E+03),\n new google.maps.LatLng( 0.458183870000000E+02, -0.121147954000000E+03),\n new google.maps.LatLng( 0.458194620000000E+02, -0.121148771000000E+03),\n new google.maps.LatLng( 0.458207870000000E+02, -0.121146808000000E+03),\n new google.maps.LatLng( 0.458205570000000E+02, -0.121143997000000E+03),\n new google.maps.LatLng( 0.458186130000000E+02, -0.121141482000000E+03),\n new google.maps.LatLng( 0.458180640000000E+02, -0.121139554000000E+03),\n new google.maps.LatLng( 0.458182000000000E+02, -0.121137920000000E+03),\n new google.maps.LatLng( 0.458197990000000E+02, -0.121134878000000E+03),\n new google.maps.LatLng( 0.458202540000000E+02, -0.121132295000000E+03),\n new google.maps.LatLng( 0.458178090000000E+02, -0.121123531000000E+03),\n new google.maps.LatLng( 0.458177650000000E+02, -0.121120523000000E+03),\n new google.maps.LatLng( 0.458186810000000E+02, -0.121117386000000E+03),\n new google.maps.LatLng( 0.458230920000000E+02, -0.121116279000000E+03),\n new google.maps.LatLng( 0.458247390000000E+02, -0.121114515000000E+03),\n new google.maps.LatLng( 0.458249220000000E+02, -0.121112946000000E+03),\n new google.maps.LatLng( 0.458226850000000E+02, -0.121104380000000E+03),\n new google.maps.LatLng( 0.458252480000000E+02, -0.121096731000000E+03),\n new google.maps.LatLng( 0.458252480000000E+02, -0.121096731000000E+03),\n new google.maps.LatLng( 0.458198550000000E+02, -0.121092936000000E+03),\n new google.maps.LatLng( 0.458167240000000E+02, -0.121091725000000E+03),\n new google.maps.LatLng( 0.458134837835938E+02, -0.121087936453906E+03),\n new google.maps.LatLng( 0.458147820000000E+02, -0.121087097000000E+03),\n new google.maps.LatLng( 0.458192090000000E+02, -0.121087089000000E+03),\n new google.maps.LatLng( 0.458192430000000E+02, -0.121081892000000E+03),\n new google.maps.LatLng( 0.458118200000000E+02, -0.121081995000000E+03),\n new google.maps.LatLng( 0.458117810000000E+02, -0.121084985000000E+03),\n new google.maps.LatLng( 0.458107370000000E+02, -0.121083421000000E+03),\n new google.maps.LatLng( 0.458103490000000E+02, -0.121082313000000E+03),\n new google.maps.LatLng( 0.458104910000000E+02, -0.121077165000000E+03),\n new google.maps.LatLng( 0.458093870000000E+02, -0.121068385000000E+03),\n new google.maps.LatLng( 0.458095820000000E+02, -0.121067361000000E+03),\n new google.maps.LatLng( 0.458101350000000E+02, -0.121067010000000E+03),\n new google.maps.LatLng( 0.458115290000000E+02, -0.121071493000000E+03),\n new google.maps.LatLng( 0.458117210000000E+02, -0.121070545000000E+03),\n new google.maps.LatLng( 0.458093900000000E+02, -0.121064826000000E+03),\n new google.maps.LatLng( 0.458059160000000E+02, -0.121058617000000E+03),\n new google.maps.LatLng( 0.458046130000000E+02, -0.121057375000000E+03),\n new google.maps.LatLng( 0.458016420000000E+02, -0.121057277000000E+03),\n new google.maps.LatLng( 0.457991050000000E+02, -0.121060774000000E+03),\n new google.maps.LatLng( 0.457979620000000E+02, -0.121061460000000E+03),\n new google.maps.LatLng( 0.457939170000000E+02, -0.121060186000000E+03),\n new google.maps.LatLng( 0.457923850000000E+02, -0.121060448000000E+03),\n new google.maps.LatLng( 0.457891860000000E+02, -0.121063127000000E+03),\n new google.maps.LatLng( 0.457884090000000E+02, -0.121065054000000E+03),\n new google.maps.LatLng( 0.457882490000000E+02, -0.121068648000000E+03),\n new google.maps.LatLng( 0.457853920000000E+02, -0.121071294000000E+03),\n new google.maps.LatLng( 0.457754490000000E+02, -0.121072044000000E+03),\n new google.maps.LatLng( 0.457670610000000E+02, -0.121071878000000E+03),\n new google.maps.LatLng( 0.457652790000000E+02, -0.121070376000000E+03),\n new google.maps.LatLng( 0.457601820000000E+02, -0.121070212000000E+03),\n new google.maps.LatLng( 0.457479520000000E+02, -0.121076931000000E+03),\n new google.maps.LatLng( 0.457442490000000E+02, -0.121080946000000E+03),\n new google.maps.LatLng( 0.457435400000000E+02, -0.121083720000000E+03),\n new google.maps.LatLng( 0.457394480000000E+02, -0.121086395000000E+03),\n new google.maps.LatLng( 0.457348540000000E+02, -0.121088450000000E+03),\n new google.maps.LatLng( 0.457294600000000E+02, -0.121088611000000E+03),\n new google.maps.LatLng( 0.457258030000000E+02, -0.121087468000000E+03),\n new google.maps.LatLng( 0.457245690000000E+02, -0.121085738000000E+03),\n new google.maps.LatLng( 0.457249130000000E+02, -0.121070760000000E+03),\n new google.maps.LatLng( 0.457237020000000E+02, -0.121067138000000E+03),\n new google.maps.LatLng( 0.457207770000000E+02, -0.121068834000000E+03),\n new google.maps.LatLng( 0.457194280000000E+02, -0.121068932000000E+03),\n new google.maps.LatLng( 0.457185130000000E+02, -0.121054689000000E+03),\n new google.maps.LatLng( 0.457002110000000E+02, -0.121081396000000E+03),\n new google.maps.LatLng( 0.457014160000000E+02, -0.121087361000000E+03),\n new google.maps.LatLng( 0.457011180000000E+02, -0.121088502000000E+03),\n new google.maps.LatLng( 0.456969360000000E+02, -0.121086478000000E+03),\n new google.maps.LatLng( 0.456959750000000E+02, -0.121090522000000E+03),\n new google.maps.LatLng( 0.456927060000000E+02, -0.121095869000000E+03),\n new google.maps.LatLng( 0.456889330000000E+02, -0.121099161000000E+03),\n new google.maps.LatLng( 0.456843400000000E+02, -0.121098147000000E+03),\n new google.maps.LatLng( 0.456779870000000E+02, -0.121092666000000E+03),\n new google.maps.LatLng( 0.456793370000000E+02, -0.121086309000000E+03),\n new google.maps.LatLng( 0.456810290000000E+02, -0.121082625000000E+03),\n new google.maps.LatLng( 0.456806420000000E+02, -0.121063779000000E+03),\n new google.maps.LatLng( 0.456804590000000E+02, -0.121060127000000E+03),\n new google.maps.LatLng( 0.456796810000000E+02, -0.121056899000000E+03),\n new google.maps.LatLng( 0.456770300000000E+02, -0.121054617000000E+03),\n new google.maps.LatLng( 0.456762530000000E+02, -0.121053281000000E+03),\n new google.maps.LatLng( 0.456764800000000E+02, -0.121044608000000E+03),\n new google.maps.LatLng( 0.456815980000000E+02, -0.121037627000000E+03),\n new google.maps.LatLng( 0.456855280000000E+02, -0.121034365000000E+03),\n new google.maps.LatLng( 0.456868310000000E+02, -0.121032668000000E+03),\n new google.maps.LatLng( 0.456910340000000E+02, -0.121025524000000E+03),\n new google.maps.LatLng( 0.456923480000000E+02, -0.121019541000000E+03),\n new google.maps.LatLng( 0.456910300000000E+02, -0.121015838000000E+03),\n new google.maps.LatLng( 0.456929460000000E+02, -0.120999827000000E+03),\n new google.maps.LatLng( 0.456873970000000E+02, -0.120989712000000E+03),\n new google.maps.LatLng( 0.456846550000000E+02, -0.120986937000000E+03),\n new google.maps.LatLng( 0.456833970000000E+02, -0.120989415000000E+03),\n new google.maps.LatLng( 0.456802430000000E+02, -0.120989249000000E+03),\n new google.maps.LatLng( 0.456715830000000E+02, -0.120983177000000E+03),\n new google.maps.LatLng( 0.456703040000000E+02, -0.120981742000000E+03),\n new google.maps.LatLng( 0.456670460000000E+02, -0.120968104000000E+03),\n new google.maps.LatLng( 0.456731010000000E+02, -0.120968131000000E+03),\n new google.maps.LatLng( 0.456730820000000E+02, -0.120957526000000E+03),\n new google.maps.LatLng( 0.456668630000000E+02, -0.120957575000000E+03),\n new google.maps.LatLng( 0.456674110000000E+02, -0.120947555000000E+03),\n new google.maps.LatLng( 0.456655700000000E+02, -0.120947564000000E+03),\n new google.maps.LatLng( 0.456655700000000E+02, -0.120947564000000E+03),\n new google.maps.LatLng( 0.456633970000000E+02, -0.120952641000000E+03),\n new google.maps.LatLng( 0.456618060000000E+02, -0.120952622000000E+03),\n new google.maps.LatLng( 0.456586530000000E+02, -0.120966513000000E+03),\n new google.maps.LatLng( 0.456588130000000E+02, -0.120967426000000E+03),\n new google.maps.LatLng( 0.456605490000000E+02, -0.120968991000000E+03),\n new google.maps.LatLng( 0.456635420000000E+02, -0.120973621000000E+03),\n new google.maps.LatLng( 0.456642210000000E+02, -0.120990636000000E+03),\n new google.maps.LatLng( 0.456628690000000E+02, -0.120997807000000E+03),\n new google.maps.LatLng( 0.456629790000000E+02, -0.121001179000000E+03),\n new google.maps.LatLng( 0.456644240000000E+02, -0.121009099000000E+03),\n new google.maps.LatLng( 0.456586180000000E+02, -0.121009284000000E+03),\n new google.maps.LatLng( 0.456586180000000E+02, -0.121009284000000E+03),\n new google.maps.LatLng( 0.456579120000000E+02, -0.121015509000000E+03),\n new google.maps.LatLng( 0.456618270000000E+02, -0.121032520000000E+03),\n new google.maps.LatLng( 0.456621940000000E+02, -0.121039658000000E+03),\n new google.maps.LatLng( 0.456614640000000E+02, -0.121045395000000E+03),\n new google.maps.LatLng( 0.456573510000000E+02, -0.121057652000000E+03),\n new google.maps.LatLng( 0.456567800000000E+02, -0.121063453000000E+03),\n new google.maps.LatLng( 0.456571230000000E+02, -0.121065409000000E+03),\n new google.maps.LatLng( 0.456567340000000E+02, -0.121070982000000E+03),\n new google.maps.LatLng( 0.456527320000000E+02, -0.121087016000000E+03),\n new google.maps.LatLng( 0.456517020000000E+02, -0.121089883000000E+03),\n new google.maps.LatLng( 0.456506050000000E+02, -0.121091447000000E+03),\n new google.maps.LatLng( 0.456461920000000E+02, -0.121095094000000E+03),\n new google.maps.LatLng( 0.456407960000000E+02, -0.121102195000000E+03),\n new google.maps.LatLng( 0.456338460000000E+02, -0.121108445000000E+03),\n new google.maps.LatLng( 0.456217710000000E+02, -0.121128517000000E+03),\n new google.maps.LatLng( 0.456187800000000E+02, -0.121134253000000E+03),\n new google.maps.LatLng( 0.456145030000000E+02, -0.121140616000000E+03),\n new google.maps.LatLng( 0.456145030000000E+02, -0.121140616000000E+03),\n new google.maps.LatLng( 0.456164300000000E+02, -0.121143766000000E+03),\n new google.maps.LatLng( 0.456183050000000E+02, -0.121145262000000E+03),\n new google.maps.LatLng( 0.456205450000000E+02, -0.121146075000000E+03),\n new google.maps.LatLng( 0.456209550000000E+02, -0.121142101000000E+03),\n new google.maps.LatLng( 0.456207020000000E+02, -0.121138257000000E+03),\n new google.maps.LatLng( 0.456240610000000E+02, -0.121136528000000E+03),\n new google.maps.LatLng( 0.456265960000000E+02, -0.121138680000000E+03),\n new google.maps.LatLng( 0.456259230000000E+02, -0.121141536000000E+03),\n new google.maps.LatLng( 0.456326790000000E+02, -0.121145776000000E+03),\n new google.maps.LatLng( 0.456361540000000E+02, -0.121150628000000E+03),\n new google.maps.LatLng( 0.456367730000000E+02, -0.121156069000000E+03),\n new google.maps.LatLng( 0.456369820000000E+02, -0.121168809000000E+03),\n new google.maps.LatLng( 0.456383080000000E+02, -0.121170340000000E+03),\n new google.maps.LatLng( 0.456383540000000E+02, -0.121179756000000E+03),\n new google.maps.LatLng( 0.456453940000000E+02, -0.121182460000000E+03),\n new google.maps.LatLng( 0.456487460000000E+02, -0.121182404000000E+03),\n new google.maps.LatLng( 0.456499140000000E+02, -0.121184596000000E+03),\n new google.maps.LatLng( 0.456483010000000E+02, -0.121196279000000E+03),\n new google.maps.LatLng( 0.456483010000000E+02, -0.121196279000000E+03),\n new google.maps.LatLng( 0.456490510000000E+02, -0.121196048000000E+03),\n new google.maps.LatLng( 0.456514510000000E+02, -0.121196766000000E+03),\n new google.maps.LatLng( 0.456523420000000E+02, -0.121197841000000E+03),\n new google.maps.LatLng( 0.456536220000000E+02, -0.121197548000000E+03),\n new google.maps.LatLng( 0.456544450000000E+02, -0.121198265000000E+03),\n new google.maps.LatLng( 0.456586510000000E+02, -0.121199602000000E+03),\n new google.maps.LatLng( 0.456619200000000E+02, -0.121203514000000E+03),\n new google.maps.LatLng( 0.456624460000000E+02, -0.121203417000000E+03),\n new google.maps.LatLng( 0.456649140000000E+02, -0.121205210000000E+03),\n new google.maps.LatLng( 0.456700560000000E+02, -0.121209548000000E+03),\n new google.maps.LatLng( 0.456724550000000E+02, -0.121213069000000E+03),\n new google.maps.LatLng( 0.456736660000000E+02, -0.121216787000000E+03),\n new google.maps.LatLng( 0.456738250000000E+02, -0.121220112000000E+03),\n new google.maps.LatLng( 0.456755600000000E+02, -0.121226667000000E+03),\n new google.maps.LatLng( 0.456761280000000E+02, -0.121234526000000E+03),\n new google.maps.LatLng( 0.456795750000000E+02, -0.121245680000000E+03),\n new google.maps.LatLng( 0.456808990000000E+02, -0.121247410000000E+03),\n new google.maps.LatLng( 0.456817440000000E+02, -0.121249921000000E+03),\n new google.maps.LatLng( 0.456836890000000E+02, -0.121259878000000E+03),\n new google.maps.LatLng( 0.456854510000000E+02, -0.121265746000000E+03),\n new google.maps.LatLng( 0.456864150000000E+02, -0.121274061000000E+03),\n new google.maps.LatLng( 0.456887480000000E+02, -0.121280288000000E+03),\n new google.maps.LatLng( 0.456887490000000E+02, -0.121282212000000E+03),\n new google.maps.LatLng( 0.456878580000000E+02, -0.121283061000000E+03),\n new google.maps.LatLng( 0.456879500000000E+02, -0.121286615000000E+03),\n new google.maps.LatLng( 0.456904420000000E+02, -0.121288669000000E+03),\n new google.maps.LatLng( 0.456913570000000E+02, -0.121291082000000E+03),\n new google.maps.LatLng( 0.456940080000000E+02, -0.121290265000000E+03),\n new google.maps.LatLng( 0.456960200000000E+02, -0.121291536000000E+03),\n new google.maps.LatLng( 0.456986250000000E+02, -0.121289219000000E+03),\n new google.maps.LatLng( 0.456988300000000E+02, -0.121287817000000E+03),\n new google.maps.LatLng( 0.457018250000000E+02, -0.121285238000000E+03),\n new google.maps.LatLng( 0.457022580000000E+02, -0.121281682000000E+03),\n new google.maps.LatLng( 0.457035610000000E+02, -0.121280964000000E+03),\n new google.maps.LatLng( 0.457042230000000E+02, -0.121277701000000E+03),\n new google.maps.LatLng( 0.457060510000000E+02, -0.121277439000000E+03),\n new google.maps.LatLng( 0.457045430000000E+02, -0.121278125000000E+03),\n new google.maps.LatLng( 0.457042470000000E+02, -0.121281518000000E+03),\n new google.maps.LatLng( 0.457028530000000E+02, -0.121282041000000E+03),\n new google.maps.LatLng( 0.457022590000000E+02, -0.121285532000000E+03),\n new google.maps.LatLng( 0.457009560000000E+02, -0.121287326000000E+03),\n new google.maps.LatLng( 0.457016420000000E+02, -0.121287163000000E+03),\n new google.maps.LatLng( 0.457019160000000E+02, -0.121288272000000E+03),\n new google.maps.LatLng( 0.456998130000000E+02, -0.121288305000000E+03),\n new google.maps.LatLng( 0.456992650000000E+02, -0.121289578000000E+03),\n new google.maps.LatLng( 0.456961340000000E+02, -0.121292123000000E+03),\n new google.maps.LatLng( 0.456949000000000E+02, -0.121294114000000E+03),\n new google.maps.LatLng( 0.456947180000000E+02, -0.121295451000000E+03),\n new google.maps.LatLng( 0.456960210000000E+02, -0.121296168000000E+03),\n new google.maps.LatLng( 0.456973920000000E+02, -0.121295515000000E+03),\n new google.maps.LatLng( 0.457041820000000E+02, -0.121315347000000E+03),\n new google.maps.LatLng( 0.457048220000000E+02, -0.121325101000000E+03),\n new google.maps.LatLng( 0.457062840000000E+02, -0.121329472000000E+03),\n new google.maps.LatLng( 0.457053010000000E+02, -0.121334626000000E+03),\n new google.maps.LatLng( 0.457067630000000E+02, -0.121337106000000E+03),\n new google.maps.LatLng( 0.457082260000000E+02, -0.121338314000000E+03),\n new google.maps.LatLng( 0.457097100000000E+02, -0.121345035000000E+03),\n new google.maps.LatLng( 0.457087480000000E+02, -0.121351625000000E+03),\n new google.maps.LatLng( 0.457066430000000E+02, -0.121359290000000E+03),\n new google.maps.LatLng( 0.457066590000000E+02, -0.121374330000000E+03),\n new google.maps.LatLng( 0.457041730000000E+02, -0.121382375000000E+03),\n new google.maps.LatLng( 0.457041730000000E+02, -0.121382375000000E+03),\n new google.maps.LatLng( 0.457051970000000E+02, -0.121382898000000E+03),\n new google.maps.LatLng( 0.457051970000000E+02, -0.121382898000000E+03),\n new google.maps.LatLng( 0.457084430000000E+02, -0.121384721000000E+03),\n new google.maps.LatLng( 0.457089690000000E+02, -0.121384721000000E+03),\n new google.maps.LatLng( 0.457101340000000E+02, -0.121382990000000E+03),\n new google.maps.LatLng( 0.457106350000000E+02, -0.121378390000000E+03),\n new google.maps.LatLng( 0.457100520000000E+02, -0.121376183000000E+03),\n new google.maps.LatLng( 0.457095200000000E+02, -0.121366666000000E+03),\n new google.maps.LatLng( 0.457121540000000E+02, -0.121353389000000E+03),\n new google.maps.LatLng( 0.457126800000000E+02, -0.121352476000000E+03),\n new google.maps.LatLng( 0.457148060000000E+02, -0.121350878000000E+03),\n new google.maps.LatLng( 0.457183030000000E+02, -0.121350163000000E+03),\n new google.maps.LatLng( 0.457237660000000E+02, -0.121352189000000E+03),\n new google.maps.LatLng( 0.457334100000000E+02, -0.121356928000000E+03),\n new google.maps.LatLng( 0.457381860000000E+02, -0.121361175000000E+03),\n new google.maps.LatLng( 0.457420920000000E+02, -0.121365846000000E+03),\n new google.maps.LatLng( 0.457484900000000E+02, -0.121371565000000E+03),\n new google.maps.LatLng( 0.457557930000000E+02, -0.121377461000000E+03),\n new google.maps.LatLng( 0.457585820000000E+02, -0.121378568000000E+03),\n new google.maps.LatLng( 0.457623530000000E+02, -0.121376644000000E+03),\n new google.maps.LatLng( 0.457709500000000E+02, -0.121374794000000E+03),\n new google.maps.LatLng( 0.457785870000000E+02, -0.121370066000000E+03),\n new google.maps.LatLng( 0.457870440000000E+02, -0.121369813000000E+03),\n new google.maps.LatLng( 0.457883940000000E+02, -0.121367984000000E+03),\n new google.maps.LatLng( 0.457891040000000E+02, -0.121363215000000E+03),\n new google.maps.LatLng( 0.457981830000000E+02, -0.121352897000000E+03),\n new google.maps.LatLng( 0.457993030000000E+02, -0.121350708000000E+03),\n new google.maps.LatLng( 0.458011110000000E+02, -0.121344174000000E+03),\n new google.maps.LatLng( 0.458035340000000E+02, -0.121342312000000E+03),\n new google.maps.LatLng( 0.458090890000000E+02, -0.121340125000000E+03),\n new google.maps.LatLng( 0.458154380000000E+02, -0.121334638000000E+03),\n new google.maps.LatLng( 0.458121890000000E+02, -0.121331702000000E+03),\n new google.maps.LatLng( 0.458121450000000E+02, -0.121317603000000E+03),\n new google.maps.LatLng( 0.458190980000000E+02, -0.121317560000000E+03),\n new google.maps.LatLng( 0.458190980000000E+02, -0.121317560000000E+03),\n new google.maps.LatLng( 0.458175720000000E+02, -0.121314436000000E+03),\n new google.maps.LatLng( 0.458163870000000E+02, -0.121310003000000E+03),\n new google.maps.LatLng( 0.458117880000000E+02, -0.121303814000000E+03),\n new google.maps.LatLng( 0.458094800000000E+02, -0.121304207000000E+03),\n new google.maps.LatLng( 0.458011820000000E+02, -0.121300744000000E+03),\n new google.maps.LatLng( 0.457984510000000E+02, -0.121298661000000E+03),\n new google.maps.LatLng( 0.457997330000000E+02, -0.121296028000000E+03),\n new google.maps.LatLng( 0.458010570000000E+02, -0.121288849000000E+03),\n new google.maps.LatLng( 0.458011970000000E+02, -0.121283067000000E+03),\n new google.maps.LatLng( 0.458022510000000E+02, -0.121281082000000E+03),\n new google.maps.LatLng( 0.458063220000000E+02, -0.121281036000000E+03),\n new google.maps.LatLng( 0.458117830000000E+02, -0.121275738000000E+03),\n new google.maps.LatLng( 0.458118950000000E+02, -0.121270476000000E+03),\n new google.maps.LatLng( 0.457841700000000E+02, -0.121270497000000E+03),\n new google.maps.LatLng( 0.457797130000000E+02, -0.121269619000000E+03),\n new google.maps.LatLng( 0.457811050000000E+02, -0.121265828000000E+03),\n new google.maps.LatLng( 0.457839110000000E+02, -0.121254261000000E+03),\n new google.maps.LatLng( 0.457882840000000E+02, -0.121243367000000E+03),\n new google.maps.LatLng( 0.457938580000000E+02, -0.121238132000000E+03),\n new google.maps.LatLng( 0.457958500000000E+02, -0.121236934000000E+03),\n new google.maps.LatLng( 0.457969860000000E+02, -0.121238251000000E+03),\n new google.maps.LatLng( 0.457970340000000E+02, -0.121245179000000E+03),\n new google.maps.LatLng( 0.457961640000000E+02, -0.121248184000000E+03),\n new google.maps.LatLng( 0.457971230000000E+02, -0.121249786000000E+03),\n new google.maps.LatLng( 0.458118430000000E+02, -0.121249803000000E+03),\n new google.maps.LatLng( 0.458118020000000E+02, -0.121239376000000E+03),\n new google.maps.LatLng( 0.458107330000000E+02, -0.121236454000000E+03),\n new google.maps.LatLng( 0.458103880000000E+02, -0.121233672000000E+03),\n new google.maps.LatLng( 0.458113490000000E+02, -0.121229930000000E+03),\n new google.maps.LatLng( 0.458145280000000E+02, -0.121223264000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "06b39772f492458321dc6caf485b6c84", "score": "0.5968969", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.468267690000000E+02, -0.120865986000000E+03),\n new google.maps.LatLng( 0.468298990000000E+02, -0.120866888000000E+03),\n new google.maps.LatLng( 0.468327800000000E+02, -0.120861663000000E+03),\n new google.maps.LatLng( 0.468374440000000E+02, -0.120856340000000E+03),\n new google.maps.LatLng( 0.468401630000000E+02, -0.120854543000000E+03),\n new google.maps.LatLng( 0.468442090000000E+02, -0.120850616000000E+03),\n new google.maps.LatLng( 0.468448500000000E+02, -0.120847652000000E+03),\n new google.maps.LatLng( 0.468448730000000E+02, -0.120844122000000E+03),\n new google.maps.LatLng( 0.468489420000000E+02, -0.120839862000000E+03),\n new google.maps.LatLng( 0.468525760000000E+02, -0.120834035000000E+03),\n new google.maps.LatLng( 0.468544040000000E+02, -0.120829672000000E+03),\n new google.maps.LatLng( 0.468546330000000E+02, -0.120827907000000E+03),\n new google.maps.LatLng( 0.468542450000000E+02, -0.120826974000000E+03),\n new google.maps.LatLng( 0.468571480000000E+02, -0.120815849000000E+03),\n new google.maps.LatLng( 0.468627000000000E+02, -0.120807021000000E+03),\n new google.maps.LatLng( 0.468662860000000E+02, -0.120796825000000E+03),\n new google.maps.LatLng( 0.468697810000000E+02, -0.120792060000000E+03),\n new google.maps.LatLng( 0.468732990000000E+02, -0.120788959000000E+03),\n new google.maps.LatLng( 0.468743040000000E+02, -0.120788526000000E+03),\n new google.maps.LatLng( 0.468774020000000E+02, -0.120789962000000E+03),\n new google.maps.LatLng( 0.468831840000000E+02, -0.120793859000000E+03),\n new google.maps.LatLng( 0.468848520000000E+02, -0.120795225000000E+03),\n new google.maps.LatLng( 0.468858810000000E+02, -0.120796825000000E+03),\n new google.maps.LatLng( 0.468967340000000E+02, -0.120797721000000E+03),\n new google.maps.LatLng( 0.468991110000000E+02, -0.120800987000000E+03),\n new google.maps.LatLng( 0.469109470000000E+02, -0.120807719000000E+03),\n new google.maps.LatLng( 0.469106880000000E+02, -0.120802627000000E+03),\n new google.maps.LatLng( 0.469113600000000E+02, -0.120765981000000E+03),\n new google.maps.LatLng( 0.469068170000000E+02, -0.120767708000000E+03),\n new google.maps.LatLng( 0.469038060000000E+02, -0.120767377000000E+03),\n new google.maps.LatLng( 0.469018670000000E+02, -0.120766716000000E+03),\n new google.maps.LatLng( 0.469018670000000E+02, -0.120766149000000E+03),\n new google.maps.LatLng( 0.469025500000000E+02, -0.120762082000000E+03),\n new google.maps.LatLng( 0.469044010000000E+02, -0.120760013000000E+03),\n new google.maps.LatLng( 0.469048120000000E+02, -0.120758545000000E+03),\n new google.maps.LatLng( 0.469049270000000E+02, -0.120745794000000E+03),\n new google.maps.LatLng( 0.469066890000000E+02, -0.120740627000000E+03),\n new google.maps.LatLng( 0.469116480000000E+02, -0.120733887000000E+03),\n new google.maps.LatLng( 0.469119950000000E+02, -0.120634883000000E+03),\n new google.maps.LatLng( 0.469042940000000E+02, -0.120633359000000E+03),\n new google.maps.LatLng( 0.468812790000000E+02, -0.120633076000000E+03),\n new google.maps.LatLng( 0.468636930000000E+02, -0.120633824000000E+03),\n new google.maps.LatLng( 0.468258310000000E+02, -0.120634431000000E+03),\n new google.maps.LatLng( 0.468259520000000E+02, -0.120605756000000E+03),\n new google.maps.LatLng( 0.468245360000000E+02, -0.120509229000000E+03),\n new google.maps.LatLng( 0.468016580000000E+02, -0.120509368000000E+03),\n new google.maps.LatLng( 0.468016580000000E+02, -0.120509368000000E+03),\n new google.maps.LatLng( 0.467381140000000E+02, -0.120509618000000E+03),\n new google.maps.LatLng( 0.467376320000000E+02, -0.120492914000000E+03),\n new google.maps.LatLng( 0.467375420000000E+02, -0.120450947000000E+03),\n new google.maps.LatLng( 0.467375420000000E+02, -0.120450947000000E+03),\n new google.maps.LatLng( 0.467354600000000E+02, -0.120453693000000E+03),\n new google.maps.LatLng( 0.467341110000000E+02, -0.120454624000000E+03),\n new google.maps.LatLng( 0.467329230000000E+02, -0.120455055000000E+03),\n new google.maps.LatLng( 0.467293130000000E+02, -0.120454988000000E+03),\n new google.maps.LatLng( 0.467257500000000E+02, -0.120451764000000E+03),\n new google.maps.LatLng( 0.467247210000000E+02, -0.120451997000000E+03),\n new google.maps.LatLng( 0.467238760000000E+02, -0.120452528000000E+03),\n new google.maps.LatLng( 0.467233960000000E+02, -0.120453060000000E+03),\n new google.maps.LatLng( 0.467229850000000E+02, -0.120454289000000E+03),\n new google.maps.LatLng( 0.467216590000000E+02, -0.120456647000000E+03),\n new google.maps.LatLng( 0.467212480000000E+02, -0.120457146000000E+03),\n new google.maps.LatLng( 0.467188260000000E+02, -0.120458607000000E+03),\n new google.maps.LatLng( 0.467136160000000E+02, -0.120465647000000E+03),\n new google.maps.LatLng( 0.467078540000000E+02, -0.120476970000000E+03),\n new google.maps.LatLng( 0.467059560000000E+02, -0.120482583000000E+03),\n new google.maps.LatLng( 0.467020240000000E+02, -0.120488823000000E+03),\n new google.maps.LatLng( 0.467007670000000E+02, -0.120490117000000E+03),\n new google.maps.LatLng( 0.466992810000000E+02, -0.120490946000000E+03),\n new google.maps.LatLng( 0.466952820000000E+02, -0.120492470000000E+03),\n new google.maps.LatLng( 0.466921980000000E+02, -0.120492434000000E+03),\n new google.maps.LatLng( 0.466843280000000E+02, -0.120491113000000E+03),\n new google.maps.LatLng( 0.466821360000000E+02, -0.120491305000000E+03),\n new google.maps.LatLng( 0.466809360000000E+02, -0.120492153000000E+03),\n new google.maps.LatLng( 0.466768400000000E+02, -0.120493033000000E+03),\n new google.maps.LatLng( 0.466747280000000E+02, -0.120490984000000E+03),\n new google.maps.LatLng( 0.466742800000000E+02, -0.120490024000000E+03),\n new google.maps.LatLng( 0.466734000000000E+02, -0.120489032000000E+03),\n new google.maps.LatLng( 0.466724560000000E+02, -0.120488360000000E+03),\n new google.maps.LatLng( 0.466717520000000E+02, -0.120488488000000E+03),\n new google.maps.LatLng( 0.466706640000000E+02, -0.120489688000000E+03),\n new google.maps.LatLng( 0.466686000000000E+02, -0.120494472000000E+03),\n new google.maps.LatLng( 0.466652880000000E+02, -0.120501145000000E+03),\n new google.maps.LatLng( 0.466650640000000E+02, -0.120503353000000E+03),\n new google.maps.LatLng( 0.466641040000000E+02, -0.120505033000000E+03),\n new google.maps.LatLng( 0.466633680000000E+02, -0.120505289000000E+03),\n new google.maps.LatLng( 0.466629200000000E+02, -0.120505177000000E+03),\n new google.maps.LatLng( 0.466614960000000E+02, -0.120503833000000E+03),\n new google.maps.LatLng( 0.466599120000000E+02, -0.120502985000000E+03),\n new google.maps.LatLng( 0.466592720000000E+02, -0.120502873000000E+03),\n new google.maps.LatLng( 0.466585360000000E+02, -0.120503273000000E+03),\n new google.maps.LatLng( 0.466577520000000E+02, -0.120504345000000E+03),\n new google.maps.LatLng( 0.466571920000000E+02, -0.120507177000000E+03),\n new google.maps.LatLng( 0.466556080000000E+02, -0.120507993000000E+03),\n new google.maps.LatLng( 0.466519280000000E+02, -0.120507225000000E+03),\n new google.maps.LatLng( 0.466487760000000E+02, -0.120506057000000E+03),\n new google.maps.LatLng( 0.466474960000000E+02, -0.120506409000000E+03),\n new google.maps.LatLng( 0.466474160000000E+02, -0.120506905000000E+03),\n new google.maps.LatLng( 0.466480240000000E+02, -0.120508329000000E+03),\n new google.maps.LatLng( 0.466483760000000E+02, -0.120508633000000E+03),\n new google.maps.LatLng( 0.466475920000000E+02, -0.120511097000000E+03),\n new google.maps.LatLng( 0.466469840000000E+02, -0.120511961000000E+03),\n new google.maps.LatLng( 0.466452240000000E+02, -0.120513369000000E+03),\n new google.maps.LatLng( 0.466434960000000E+02, -0.120513881000000E+03),\n new google.maps.LatLng( 0.466422480000000E+02, -0.120515065000000E+03),\n new google.maps.LatLng( 0.466419600000000E+02, -0.120515961000000E+03),\n new google.maps.LatLng( 0.466421200000000E+02, -0.120516713000000E+03),\n new google.maps.LatLng( 0.466416400000000E+02, -0.120520137000000E+03),\n new google.maps.LatLng( 0.466362320000000E+02, -0.120526409000000E+03),\n new google.maps.LatLng( 0.466363600000000E+02, -0.120527993000000E+03),\n new google.maps.LatLng( 0.466344080000000E+02, -0.120527129000000E+03),\n new google.maps.LatLng( 0.466307440000000E+02, -0.120521753000000E+03),\n new google.maps.LatLng( 0.466305360000000E+02, -0.120520329000000E+03),\n new google.maps.LatLng( 0.466311480000000E+02, -0.120515977000000E+03),\n new google.maps.LatLng( 0.466302960000000E+02, -0.120515551000000E+03),\n new google.maps.LatLng( 0.466299480000000E+02, -0.120515777000000E+03),\n new google.maps.LatLng( 0.466277840000000E+02, -0.120521433000000E+03),\n new google.maps.LatLng( 0.466268880000000E+02, -0.120525497000000E+03),\n new google.maps.LatLng( 0.466262320000000E+02, -0.120529897000000E+03),\n new google.maps.LatLng( 0.466253360000000E+02, -0.120540217000000E+03),\n new google.maps.LatLng( 0.466245040000000E+02, -0.120543081000000E+03),\n new google.maps.LatLng( 0.466246480000000E+02, -0.120544697000000E+03),\n new google.maps.LatLng( 0.466259920000000E+02, -0.120549449000000E+03),\n new google.maps.LatLng( 0.466265840000000E+02, -0.120558442000000E+03),\n new google.maps.LatLng( 0.466264560000000E+02, -0.120560810000000E+03),\n new google.maps.LatLng( 0.466266890000000E+02, -0.120562254000000E+03),\n new google.maps.LatLng( 0.466269520000000E+02, -0.120564602000000E+03),\n new google.maps.LatLng( 0.466312400000000E+02, -0.120576658000000E+03),\n new google.maps.LatLng( 0.466312400000000E+02, -0.120576658000000E+03),\n new google.maps.LatLng( 0.466336790000000E+02, -0.120577707000000E+03),\n new google.maps.LatLng( 0.466349070000000E+02, -0.120577512000000E+03),\n new google.maps.LatLng( 0.466396360000000E+02, -0.120571157000000E+03),\n new google.maps.LatLng( 0.466395010000000E+02, -0.120562201000000E+03),\n new google.maps.LatLng( 0.466475600000000E+02, -0.120562138000000E+03),\n new google.maps.LatLng( 0.466503920000000E+02, -0.120563450000000E+03),\n new google.maps.LatLng( 0.466507920000000E+02, -0.120569642000000E+03),\n new google.maps.LatLng( 0.466500560000000E+02, -0.120571242000000E+03),\n new google.maps.LatLng( 0.466497040000000E+02, -0.120576058000000E+03),\n new google.maps.LatLng( 0.466508240000000E+02, -0.120581706000000E+03),\n new google.maps.LatLng( 0.466576080000000E+02, -0.120589019000000E+03),\n new google.maps.LatLng( 0.466615280000000E+02, -0.120594171000000E+03),\n new google.maps.LatLng( 0.466658000000000E+02, -0.120591675000000E+03),\n new google.maps.LatLng( 0.466690220000000E+02, -0.120588936000000E+03),\n new google.maps.LatLng( 0.466716880000000E+02, -0.120584747000000E+03),\n new google.maps.LatLng( 0.466743760000000E+02, -0.120574875000000E+03),\n new google.maps.LatLng( 0.466817840000000E+02, -0.120578779000000E+03),\n new google.maps.LatLng( 0.466856720000000E+02, -0.120583947000000E+03),\n new google.maps.LatLng( 0.466857680000000E+02, -0.120585499000000E+03),\n new google.maps.LatLng( 0.466810480000000E+02, -0.120592251000000E+03),\n new google.maps.LatLng( 0.466799430000000E+02, -0.120597627000000E+03),\n new google.maps.LatLng( 0.466809030000000E+02, -0.120600763000000E+03),\n new google.maps.LatLng( 0.466858630000000E+02, -0.120604587000000E+03),\n new google.maps.LatLng( 0.466906000000000E+02, -0.120609734000000E+03),\n new google.maps.LatLng( 0.466918550000000E+02, -0.120614550000000E+03),\n new google.maps.LatLng( 0.466916460000000E+02, -0.120622751000000E+03),\n new google.maps.LatLng( 0.466925370000000E+02, -0.120623416000000E+03),\n new google.maps.LatLng( 0.466966960000000E+02, -0.120621960000000E+03),\n new google.maps.LatLng( 0.466993020000000E+02, -0.120619704000000E+03),\n new google.maps.LatLng( 0.466995310000000E+02, -0.120617512000000E+03),\n new google.maps.LatLng( 0.467014970000000E+02, -0.120616518000000E+03),\n new google.maps.LatLng( 0.467089430000000E+02, -0.120622703000000E+03),\n new google.maps.LatLng( 0.467141490000000E+02, -0.120629284000000E+03),\n new google.maps.LatLng( 0.467205490000000E+02, -0.120633297000000E+03),\n new google.maps.LatLng( 0.467257600000000E+02, -0.120635418000000E+03),\n new google.maps.LatLng( 0.467271760000000E+02, -0.120635383000000E+03),\n new google.maps.LatLng( 0.467359950000000E+02, -0.120632748000000E+03),\n new google.maps.LatLng( 0.467460690000000E+02, -0.120628217000000E+03),\n new google.maps.LatLng( 0.467487870000000E+02, -0.120627715000000E+03),\n new google.maps.LatLng( 0.467541760000000E+02, -0.120632435000000E+03),\n new google.maps.LatLng( 0.467547040000000E+02, -0.120636291000000E+03),\n new google.maps.LatLng( 0.467542080000000E+02, -0.120638243000000E+03),\n new google.maps.LatLng( 0.467542080000000E+02, -0.120638243000000E+03),\n new google.maps.LatLng( 0.467558320000000E+02, -0.120636220000000E+03),\n new google.maps.LatLng( 0.467580060000000E+02, -0.120636158000000E+03),\n new google.maps.LatLng( 0.467609280000000E+02, -0.120641882000000E+03),\n new google.maps.LatLng( 0.467623130000000E+02, -0.120648382000000E+03),\n new google.maps.LatLng( 0.467676300000000E+02, -0.120658135000000E+03),\n new google.maps.LatLng( 0.467687640000000E+02, -0.120659702000000E+03),\n new google.maps.LatLng( 0.467731880000000E+02, -0.120663199000000E+03),\n new google.maps.LatLng( 0.467750460000000E+02, -0.120665410000000E+03),\n new google.maps.LatLng( 0.467776100000000E+02, -0.120677889000000E+03),\n new google.maps.LatLng( 0.467800540000000E+02, -0.120683539000000E+03),\n new google.maps.LatLng( 0.467829980000000E+02, -0.120683378000000E+03),\n new google.maps.LatLng( 0.467838510000000E+02, -0.120681285000000E+03),\n new google.maps.LatLng( 0.467845830000000E+02, -0.120681180000000E+03),\n new google.maps.LatLng( 0.467856280000000E+02, -0.120682280000000E+03),\n new google.maps.LatLng( 0.467881610000000E+02, -0.120688189000000E+03),\n new google.maps.LatLng( 0.467881360000000E+02, -0.120690540000000E+03),\n new google.maps.LatLng( 0.467854530000000E+02, -0.120705801000000E+03),\n new google.maps.LatLng( 0.467827070000000E+02, -0.120713318000000E+03),\n new google.maps.LatLng( 0.467824070000000E+02, -0.120718475000000E+03),\n new google.maps.LatLng( 0.467827360000000E+02, -0.120719177000000E+03),\n new google.maps.LatLng( 0.467877560000000E+02, -0.120717757000000E+03),\n new google.maps.LatLng( 0.467890850000000E+02, -0.120715116000000E+03),\n new google.maps.LatLng( 0.467905170000000E+02, -0.120714018000000E+03),\n new google.maps.LatLng( 0.467952240000000E+02, -0.120711393000000E+03),\n new google.maps.LatLng( 0.467963900000000E+02, -0.120711195000000E+03),\n new google.maps.LatLng( 0.467946290000000E+02, -0.120716763000000E+03),\n new google.maps.LatLng( 0.467949020000000E+02, -0.120721355000000E+03),\n new google.maps.LatLng( 0.467943520000000E+02, -0.120727975000000E+03),\n new google.maps.LatLng( 0.467922710000000E+02, -0.120733563000000E+03),\n new google.maps.LatLng( 0.467893900000000E+02, -0.120738318000000E+03),\n new google.maps.LatLng( 0.467862750000000E+02, -0.120753177000000E+03),\n new google.maps.LatLng( 0.467883800000000E+02, -0.120759029000000E+03),\n new google.maps.LatLng( 0.467884560000000E+02, -0.120782283000000E+03),\n new google.maps.LatLng( 0.467887780000000E+02, -0.120788437000000E+03),\n new google.maps.LatLng( 0.467899680000000E+02, -0.120796654000000E+03),\n new google.maps.LatLng( 0.467953650000000E+02, -0.120808610000000E+03),\n new google.maps.LatLng( 0.467978420000000E+02, -0.120812287000000E+03),\n new google.maps.LatLng( 0.468071320000000E+02, -0.120823685000000E+03),\n new google.maps.LatLng( 0.468077180000000E+02, -0.120826591000000E+03),\n new google.maps.LatLng( 0.468206740000000E+02, -0.120848404000000E+03),\n new google.maps.LatLng( 0.468267690000000E+02, -0.120865986000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "8bbee2f57cf518cdba3461ce02b6d8da", "score": "0.59687394", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.463448190000000E+02, -0.122746424000000E+03),\n new google.maps.LatLng( 0.463434260000000E+02, -0.122744800000000E+03),\n new google.maps.LatLng( 0.463431980000000E+02, -0.122743843000000E+03),\n new google.maps.LatLng( 0.463441600000000E+02, -0.122737902000000E+03),\n new google.maps.LatLng( 0.463396150000000E+02, -0.122729020000000E+03),\n new google.maps.LatLng( 0.463353870000000E+02, -0.122724496000000E+03),\n new google.maps.LatLng( 0.463344960000000E+02, -0.122724594000000E+03),\n new google.maps.LatLng( 0.463324840000000E+02, -0.122726045000000E+03),\n new google.maps.LatLng( 0.463314320000000E+02, -0.122725912000000E+03),\n new google.maps.LatLng( 0.463278670000000E+02, -0.122721455000000E+03),\n new google.maps.LatLng( 0.463277080000000E+02, -0.122719805000000E+03),\n new google.maps.LatLng( 0.463283480000000E+02, -0.122717298000000E+03),\n new google.maps.LatLng( 0.463320290000000E+02, -0.122717432000000E+03),\n new google.maps.LatLng( 0.463329660000000E+02, -0.122716508000000E+03),\n new google.maps.LatLng( 0.463365110000000E+02, -0.122709711000000E+03),\n new google.maps.LatLng( 0.463348880000000E+02, -0.122710371000000E+03),\n new google.maps.LatLng( 0.463337450000000E+02, -0.122711690000000E+03),\n new google.maps.LatLng( 0.463322350000000E+02, -0.122716343000000E+03),\n new google.maps.LatLng( 0.463275710000000E+02, -0.122717165000000E+03),\n new google.maps.LatLng( 0.463271590000000E+02, -0.122719904000000E+03),\n new google.maps.LatLng( 0.463279350000000E+02, -0.122722874000000E+03),\n new google.maps.LatLng( 0.463316600000000E+02, -0.122726836000000E+03),\n new google.maps.LatLng( 0.463356130000000E+02, -0.122725699000000E+03),\n new google.maps.LatLng( 0.463356130000000E+02, -0.122725699000000E+03),\n new google.maps.LatLng( 0.463362320000000E+02, -0.122726774000000E+03),\n new google.maps.LatLng( 0.463391800000000E+02, -0.122729185000000E+03),\n new google.maps.LatLng( 0.463394310000000E+02, -0.122732353000000E+03),\n new google.maps.LatLng( 0.463434520000000E+02, -0.122737671000000E+03),\n new google.maps.LatLng( 0.463437480000000E+02, -0.122739222000000E+03),\n new google.maps.LatLng( 0.463427180000000E+02, -0.122742885000000E+03),\n new google.maps.LatLng( 0.463429230000000E+02, -0.122744800000000E+03),\n new google.maps.LatLng( 0.463451390000000E+02, -0.122747508000000E+03),\n new google.maps.LatLng( 0.463502820000000E+02, -0.122748537000000E+03),\n new google.maps.LatLng( 0.463524060000000E+02, -0.122752089000000E+03),\n new google.maps.LatLng( 0.463556760000000E+02, -0.122753736000000E+03),\n new google.maps.LatLng( 0.463565450000000E+02, -0.122753438000000E+03),\n new google.maps.LatLng( 0.463580760000000E+02, -0.122750774000000E+03),\n new google.maps.LatLng( 0.463589210000000E+02, -0.122750758000000E+03),\n new google.maps.LatLng( 0.463601790000000E+02, -0.122753137000000E+03),\n new google.maps.LatLng( 0.463616910000000E+02, -0.122759211000000E+03),\n new google.maps.LatLng( 0.463623770000000E+02, -0.122760432000000E+03),\n new google.maps.LatLng( 0.463649830000000E+02, -0.122761486000000E+03),\n new google.maps.LatLng( 0.463710180000000E+02, -0.122761018000000E+03),\n new google.maps.LatLng( 0.463724350000000E+02, -0.122761941000000E+03),\n new google.maps.LatLng( 0.463721850000000E+02, -0.122764319000000E+03),\n new google.maps.LatLng( 0.463725740000000E+02, -0.122766003000000E+03),\n new google.maps.LatLng( 0.463751790000000E+02, -0.122770625000000E+03),\n new google.maps.LatLng( 0.463748320000000E+02, -0.122771500000000E+03),\n new google.maps.LatLng( 0.463716170000000E+02, -0.122773665000000E+03),\n new google.maps.LatLng( 0.463688760000000E+02, -0.122779777000000E+03),\n new google.maps.LatLng( 0.463653110000000E+02, -0.122784468000000E+03),\n new google.maps.LatLng( 0.463617230000000E+02, -0.122785758000000E+03),\n new google.maps.LatLng( 0.463609910000000E+02, -0.122786452000000E+03),\n new google.maps.LatLng( 0.463599860000000E+02, -0.122788433000000E+03),\n new google.maps.LatLng( 0.463603060000000E+02, -0.122789820000000E+03),\n new google.maps.LatLng( 0.463603060000000E+02, -0.122789820000000E+03),\n new google.maps.LatLng( 0.463603970000000E+02, -0.122788400000000E+03),\n new google.maps.LatLng( 0.463615860000000E+02, -0.122786484000000E+03),\n new google.maps.LatLng( 0.463655400000000E+02, -0.122785095000000E+03),\n new google.maps.LatLng( 0.463688310000000E+02, -0.122780900000000E+03),\n new google.maps.LatLng( 0.463719830000000E+02, -0.122774457000000E+03),\n new google.maps.LatLng( 0.463751570000000E+02, -0.122772639000000E+03),\n new google.maps.LatLng( 0.463753920000000E+02, -0.122770030000000E+03),\n new google.maps.LatLng( 0.463733520000000E+02, -0.122766762000000E+03),\n new google.maps.LatLng( 0.463727560000000E+02, -0.122764682000000E+03),\n new google.maps.LatLng( 0.463733270000000E+02, -0.122761973000000E+03),\n new google.maps.LatLng( 0.463715660000000E+02, -0.122760191000000E+03),\n new google.maps.LatLng( 0.463664910000000E+02, -0.122759602000000E+03),\n new google.maps.LatLng( 0.463644120000000E+02, -0.122760397000000E+03),\n new google.maps.LatLng( 0.463627890000000E+02, -0.122759738000000E+03),\n new google.maps.LatLng( 0.463622400000000E+02, -0.122759144000000E+03),\n new google.maps.LatLng( 0.463600990000000E+02, -0.122751223000000E+03),\n new google.maps.LatLng( 0.463589220000000E+02, -0.122750033000000E+03),\n new google.maps.LatLng( 0.463576870000000E+02, -0.122750560000000E+03),\n new google.maps.LatLng( 0.463562020000000E+02, -0.122752976000000E+03),\n new google.maps.LatLng( 0.463551960000000E+02, -0.122753044000000E+03),\n new google.maps.LatLng( 0.463526350000000E+02, -0.122751708000000E+03),\n new google.maps.LatLng( 0.463509680000000E+02, -0.122748373000000E+03),\n new google.maps.LatLng( 0.463487510000000E+02, -0.122747116000000E+03),\n new google.maps.LatLng( 0.463460990000000E+02, -0.122747377000000E+03),\n new google.maps.LatLng( 0.463448190000000E+02, -0.122746424000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "542e35f8467cd93263251845b509b6b8", "score": "0.59686327", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.471874180000000E+02, -0.122705941000000E+03),\n new google.maps.LatLng( 0.471840180000000E+02, -0.122698041000000E+03),\n new google.maps.LatLng( 0.471843180000000E+02, -0.122695441000000E+03),\n new google.maps.LatLng( 0.471820180000000E+02, -0.122683941000000E+03),\n new google.maps.LatLng( 0.471782190000000E+02, -0.122677741000000E+03),\n new google.maps.LatLng( 0.471736190000000E+02, -0.122673140000000E+03),\n new google.maps.LatLng( 0.471525190000000E+02, -0.122675440000000E+03),\n new google.maps.LatLng( 0.471488190000000E+02, -0.122677940000000E+03),\n new google.maps.LatLng( 0.471451190000000E+02, -0.122678541000000E+03),\n new google.maps.LatLng( 0.471428190000000E+02, -0.122676040000000E+03),\n new google.maps.LatLng( 0.471403180000000E+02, -0.122683541000000E+03),\n new google.maps.LatLng( 0.471457180000000E+02, -0.122692941000000E+03),\n new google.maps.LatLng( 0.471460180000000E+02, -0.122698541000000E+03),\n new google.maps.LatLng( 0.471437180000000E+02, -0.122697241000000E+03),\n new google.maps.LatLng( 0.471399890000000E+02, -0.122697241000000E+03),\n new google.maps.LatLng( 0.471388180000000E+02, -0.122704341000000E+03),\n new google.maps.LatLng( 0.471439180000000E+02, -0.122706841000000E+03),\n new google.maps.LatLng( 0.471469180000000E+02, -0.122709042000000E+03),\n new google.maps.LatLng( 0.471424180000000E+02, -0.122709542000000E+03),\n new google.maps.LatLng( 0.471340180000000E+02, -0.122703441000000E+03),\n new google.maps.LatLng( 0.471363180000000E+02, -0.122701141000000E+03),\n new google.maps.LatLng( 0.471359180000000E+02, -0.122698441000000E+03),\n new google.maps.LatLng( 0.471295180000000E+02, -0.122693341000000E+03),\n new google.maps.LatLng( 0.471242180000000E+02, -0.122699041000000E+03),\n new google.maps.LatLng( 0.471243180000000E+02, -0.122703241000000E+03),\n new google.maps.LatLng( 0.471288180000000E+02, -0.122703641000000E+03),\n new google.maps.LatLng( 0.471272180000000E+02, -0.122709542000000E+03),\n new google.maps.LatLng( 0.471371180000000E+02, -0.122721342000000E+03),\n new google.maps.LatLng( 0.471403180000000E+02, -0.122728242000000E+03),\n new google.maps.LatLng( 0.471459180000000E+02, -0.122732742000000E+03),\n new google.maps.LatLng( 0.471495180000000E+02, -0.122740343000000E+03),\n new google.maps.LatLng( 0.471536180000000E+02, -0.122741643000000E+03),\n new google.maps.LatLng( 0.471591180000000E+02, -0.122730142000000E+03),\n new google.maps.LatLng( 0.471597180000000E+02, -0.122727342000000E+03),\n new google.maps.LatLng( 0.471599490000000E+02, -0.122725290000000E+03),\n new google.maps.LatLng( 0.471594400000000E+02, -0.122725290000000E+03),\n new google.maps.LatLng( 0.471564740000000E+02, -0.122721130000000E+03),\n new google.maps.LatLng( 0.471570390000000E+02, -0.122719383000000E+03),\n new google.maps.LatLng( 0.471576040000000E+02, -0.122719258000000E+03),\n new google.maps.LatLng( 0.471619550000000E+02, -0.122724001000000E+03),\n new google.maps.LatLng( 0.471623180000000E+02, -0.122728242000000E+03),\n new google.maps.LatLng( 0.471725180000000E+02, -0.122726342000000E+03),\n new google.maps.LatLng( 0.471781180000000E+02, -0.122720242000000E+03),\n new google.maps.LatLng( 0.471786180000000E+02, -0.122717442000000E+03),\n new google.maps.LatLng( 0.471779180000000E+02, -0.122719442000000E+03),\n new google.maps.LatLng( 0.471769180000000E+02, -0.122718542000000E+03),\n new google.maps.LatLng( 0.471852180000000E+02, -0.122709942000000E+03),\n new google.maps.LatLng( 0.471874180000000E+02, -0.122705941000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "4043fc9bc955928ab9d2e1b6290b0a88", "score": "0.5968466", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.471190960000000E+02, -0.122664496000000E+03),\n new google.maps.LatLng( 0.471168190000000E+02, -0.122666140000000E+03),\n new google.maps.LatLng( 0.471130190000000E+02, -0.122656740000000E+03),\n new google.maps.LatLng( 0.471086190000000E+02, -0.122654440000000E+03),\n new google.maps.LatLng( 0.471069190000000E+02, -0.122649139000000E+03),\n new google.maps.LatLng( 0.471064190000000E+02, -0.122641139000000E+03),\n new google.maps.LatLng( 0.471045190000000E+02, -0.122637939000000E+03),\n new google.maps.LatLng( 0.471043190000000E+02, -0.122630739000000E+03),\n new google.maps.LatLng( 0.471054190000000E+02, -0.122628839000000E+03),\n new google.maps.LatLng( 0.471044190000000E+02, -0.122624738000000E+03),\n new google.maps.LatLng( 0.471044190000000E+02, -0.122624738000000E+03),\n new google.maps.LatLng( 0.471027190000000E+02, -0.122624738000000E+03),\n new google.maps.LatLng( 0.471026190000000E+02, -0.122622238000000E+03),\n new google.maps.LatLng( 0.470984190000000E+02, -0.122622138000000E+03),\n new google.maps.LatLng( 0.470926190000000E+02, -0.122623438000000E+03),\n new google.maps.LatLng( 0.470897190000000E+02, -0.122636339000000E+03),\n new google.maps.LatLng( 0.470857550000000E+02, -0.122658442000000E+03),\n new google.maps.LatLng( 0.470815510000000E+02, -0.122675812000000E+03),\n new google.maps.LatLng( 0.470801590000000E+02, -0.122676841000000E+03),\n new google.maps.LatLng( 0.470794840000000E+02, -0.122678053000000E+03),\n new google.maps.LatLng( 0.470788530000000E+02, -0.122685997000000E+03),\n new google.maps.LatLng( 0.470775870000000E+02, -0.122690524000000E+03),\n new google.maps.LatLng( 0.470699670000000E+02, -0.122694151000000E+03),\n new google.maps.LatLng( 0.470677360000000E+02, -0.122694211000000E+03),\n new google.maps.LatLng( 0.470581260000000E+02, -0.122691201000000E+03),\n new google.maps.LatLng( 0.470581260000000E+02, -0.122691201000000E+03),\n new google.maps.LatLng( 0.470591780000000E+02, -0.122694467000000E+03),\n new google.maps.LatLng( 0.470623200000000E+02, -0.122698502000000E+03),\n new google.maps.LatLng( 0.470704300000000E+02, -0.122702987000000E+03),\n new google.maps.LatLng( 0.470717240000000E+02, -0.122703778000000E+03),\n new google.maps.LatLng( 0.470717240000000E+02, -0.122703778000000E+03),\n new google.maps.LatLng( 0.470718920000000E+02, -0.122703377000000E+03),\n new google.maps.LatLng( 0.470729320000000E+02, -0.122703667000000E+03),\n new google.maps.LatLng( 0.470775130000000E+02, -0.122707404000000E+03),\n new google.maps.LatLng( 0.470829300000000E+02, -0.122704959000000E+03),\n new google.maps.LatLng( 0.470857510000000E+02, -0.122706643000000E+03),\n new google.maps.LatLng( 0.470875140000000E+02, -0.122702527000000E+03),\n new google.maps.LatLng( 0.470885340000000E+02, -0.122697471000000E+03),\n new google.maps.LatLng( 0.470897340000000E+02, -0.122696726000000E+03),\n new google.maps.LatLng( 0.470933010000000E+02, -0.122696883000000E+03),\n new google.maps.LatLng( 0.470963450000000E+02, -0.122695226000000E+03),\n new google.maps.LatLng( 0.470973340000000E+02, -0.122696076000000E+03),\n new google.maps.LatLng( 0.471014560000000E+02, -0.122695021000000E+03),\n new google.maps.LatLng( 0.471016560000000E+02, -0.122693721000000E+03),\n new google.maps.LatLng( 0.470999560000000E+02, -0.122693221000000E+03),\n new google.maps.LatLng( 0.470989180000000E+02, -0.122687141000000E+03),\n new google.maps.LatLng( 0.470971180000000E+02, -0.122687041000000E+03),\n new google.maps.LatLng( 0.470941180000000E+02, -0.122689541000000E+03),\n new google.maps.LatLng( 0.470926180000000E+02, -0.122696741000000E+03),\n new google.maps.LatLng( 0.470938180000000E+02, -0.122689641000000E+03),\n new google.maps.LatLng( 0.470903502270703E+02, -0.122692328216055E+03),\n new google.maps.LatLng( 0.470885377824219E+02, -0.122695519575586E+03),\n new google.maps.LatLng( 0.470857180000000E+02, -0.122697741000000E+03),\n new google.maps.LatLng( 0.470836180000000E+02, -0.122695941000000E+03),\n new google.maps.LatLng( 0.470831180000000E+02, -0.122693741000000E+03),\n new google.maps.LatLng( 0.470840180000000E+02, -0.122695941000000E+03),\n new google.maps.LatLng( 0.470862180000000E+02, -0.122696541000000E+03),\n new google.maps.LatLng( 0.470895180000000E+02, -0.122690441000000E+03),\n new google.maps.LatLng( 0.470870180000000E+02, -0.122693341000000E+03),\n new google.maps.LatLng( 0.470866180000000E+02, -0.122692341000000E+03),\n new google.maps.LatLng( 0.470902177824219E+02, -0.122689961597070E+03),\n new google.maps.LatLng( 0.470929180000000E+02, -0.122689141000000E+03),\n new google.maps.LatLng( 0.470965180000000E+02, -0.122685541000000E+03),\n new google.maps.LatLng( 0.471021190000000E+02, -0.122676840000000E+03),\n new google.maps.LatLng( 0.471074380000000E+02, -0.122674432000000E+03),\n new google.maps.LatLng( 0.471146020000000E+02, -0.122669063000000E+03),\n new google.maps.LatLng( 0.471190960000000E+02, -0.122664496000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "3ce2287abcd7d944c304db25ad099808", "score": "0.59682876", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.467090830000000E+02, -0.121023659000000E+03),\n new google.maps.LatLng( 0.467108870000000E+02, -0.121021000000000E+03),\n new google.maps.LatLng( 0.467113210000000E+02, -0.121020866000000E+03),\n new google.maps.LatLng( 0.467122580000000E+02, -0.121021929000000E+03),\n new google.maps.LatLng( 0.467128070000000E+02, -0.121023523000000E+03),\n new google.maps.LatLng( 0.467110720000000E+02, -0.121026082000000E+03),\n new google.maps.LatLng( 0.467103420000000E+02, -0.121030401000000E+03),\n new google.maps.LatLng( 0.467113020000000E+02, -0.121032095000000E+03),\n new google.maps.LatLng( 0.467118050000000E+02, -0.121032361000000E+03),\n new google.maps.LatLng( 0.467133810000000E+02, -0.121031828000000E+03),\n new google.maps.LatLng( 0.467137930000000E+02, -0.121032459000000E+03),\n new google.maps.LatLng( 0.467114870000000E+02, -0.121039238000000E+03),\n new google.maps.LatLng( 0.467067800000000E+02, -0.121047445000000E+03),\n new google.maps.LatLng( 0.467060720000000E+02, -0.121052627000000E+03),\n new google.maps.LatLng( 0.467070320000000E+02, -0.121055451000000E+03),\n new google.maps.LatLng( 0.467137970000000E+02, -0.121061364000000E+03),\n new google.maps.LatLng( 0.467199670000000E+02, -0.121065085000000E+03),\n new google.maps.LatLng( 0.467206300000000E+02, -0.121068972000000E+03),\n new google.maps.LatLng( 0.467203330000000E+02, -0.121071531000000E+03),\n new google.maps.LatLng( 0.467180700000000E+02, -0.121078541000000E+03),\n new google.maps.LatLng( 0.467155550000000E+02, -0.121083524000000E+03),\n new google.maps.LatLng( 0.467134720000000E+02, -0.121095384000000E+03),\n new google.maps.LatLng( 0.467138580000000E+02, -0.121105783000000E+03),\n new google.maps.LatLng( 0.467151100000000E+02, -0.121118277000000E+03),\n new google.maps.LatLng( 0.467139890000000E+02, -0.121121266000000E+03),\n new google.maps.LatLng( 0.467128230000000E+02, -0.121122295000000E+03),\n new google.maps.LatLng( 0.467132200000000E+02, -0.121126191000000E+03),\n new google.maps.LatLng( 0.467139390000000E+02, -0.121127459000000E+03),\n new google.maps.LatLng( 0.467204770000000E+02, -0.121131073000000E+03),\n new google.maps.LatLng( 0.467249550000000E+02, -0.121130104000000E+03),\n new google.maps.LatLng( 0.467276290000000E+02, -0.121130733000000E+03),\n new google.maps.LatLng( 0.467301000000000E+02, -0.121135083000000E+03),\n new google.maps.LatLng( 0.467354910000000E+02, -0.121131887000000E+03),\n new google.maps.LatLng( 0.467396960000000E+02, -0.121132647000000E+03),\n new google.maps.LatLng( 0.467414330000000E+02, -0.121131714000000E+03),\n new google.maps.LatLng( 0.467434430000000E+02, -0.121129385000000E+03),\n new google.maps.LatLng( 0.467423920000000E+02, -0.121125517000000E+03),\n new google.maps.LatLng( 0.467427820000000E+02, -0.121121927000000E+03),\n new google.maps.LatLng( 0.467462350000000E+02, -0.121117044000000E+03),\n new google.maps.LatLng( 0.467485680000000E+02, -0.121112558000000E+03),\n new google.maps.LatLng( 0.467486140000000E+02, -0.121110663000000E+03),\n new google.maps.LatLng( 0.467474720000000E+02, -0.121109665000000E+03),\n new google.maps.LatLng( 0.467472900000000E+02, -0.121108767000000E+03),\n new google.maps.LatLng( 0.467473370000000E+02, -0.121103448000000E+03),\n new google.maps.LatLng( 0.467503350000000E+02, -0.121099565000000E+03),\n new google.maps.LatLng( 0.467542610000000E+02, -0.121100465000000E+03),\n new google.maps.LatLng( 0.467552310000000E+02, -0.121103984000000E+03),\n new google.maps.LatLng( 0.467565450000000E+02, -0.121104623000000E+03),\n new google.maps.LatLng( 0.467618250000000E+02, -0.121100271000000E+03),\n new google.maps.LatLng( 0.467653200000000E+02, -0.121104563000000E+03),\n new google.maps.LatLng( 0.467726770000000E+02, -0.121109823000000E+03),\n new google.maps.LatLng( 0.467734610000000E+02, -0.121109756000000E+03),\n new google.maps.LatLng( 0.467760140000000E+02, -0.121107132000000E+03),\n new google.maps.LatLng( 0.467776380000000E+02, -0.121103874000000E+03),\n new google.maps.LatLng( 0.467803810000000E+02, -0.121101314000000E+03),\n new google.maps.LatLng( 0.467832370000000E+02, -0.121101915000000E+03),\n new google.maps.LatLng( 0.467942290000000E+02, -0.121102754000000E+03),\n new google.maps.LatLng( 0.467966510000000E+02, -0.121103855000000E+03),\n new google.maps.LatLng( 0.467976110000000E+02, -0.121103456000000E+03),\n new google.maps.LatLng( 0.467983420000000E+02, -0.121102326000000E+03),\n new google.maps.LatLng( 0.467986400000000E+02, -0.121100529000000E+03),\n new google.maps.LatLng( 0.467987790000000E+02, -0.121093939000000E+03),\n new google.maps.LatLng( 0.467980930000000E+02, -0.121092641000000E+03),\n new google.maps.LatLng( 0.468012030000000E+02, -0.121084557000000E+03),\n new google.maps.LatLng( 0.468030090000000E+02, -0.121082960000000E+03),\n new google.maps.LatLng( 0.468041510000000E+02, -0.121084358000000E+03),\n new google.maps.LatLng( 0.468052250000000E+02, -0.121083759000000E+03),\n new google.maps.LatLng( 0.468065740000000E+02, -0.121082196000000E+03),\n new google.maps.LatLng( 0.468081290000000E+02, -0.121078735000000E+03),\n new google.maps.LatLng( 0.468106200000000E+02, -0.121062627000000E+03),\n new google.maps.LatLng( 0.468081290000000E+02, -0.121051278000000E+03),\n new google.maps.LatLng( 0.468082190000000E+02, -0.121043123000000E+03),\n new google.maps.LatLng( 0.468092470000000E+02, -0.121042524000000E+03),\n new google.maps.LatLng( 0.468105480000000E+02, -0.121036765000000E+03),\n new google.maps.LatLng( 0.468115510000000E+02, -0.121025182000000E+03),\n new google.maps.LatLng( 0.468107730000000E+02, -0.121021588000000E+03),\n new google.maps.LatLng( 0.468113430000000E+02, -0.121018193000000E+03),\n new google.maps.LatLng( 0.468124160000000E+02, -0.121016395000000E+03),\n new google.maps.LatLng( 0.468130780000000E+02, -0.121013565000000E+03),\n new google.maps.LatLng( 0.468123880000000E+02, -0.121005545000000E+03),\n new google.maps.LatLng( 0.468108350000000E+02, -0.120999263000000E+03),\n new google.maps.LatLng( 0.468106090000000E+02, -0.120995135000000E+03),\n new google.maps.LatLng( 0.468135810000000E+02, -0.120991976000000E+03),\n new google.maps.LatLng( 0.468142220000000E+02, -0.120988682000000E+03),\n new google.maps.LatLng( 0.468131720000000E+02, -0.120986484000000E+03),\n new google.maps.LatLng( 0.468095860000000E+02, -0.120982854000000E+03),\n new google.maps.LatLng( 0.468088790000000E+02, -0.120979991000000E+03),\n new google.maps.LatLng( 0.468094520000000E+02, -0.120973501000000E+03),\n new google.maps.LatLng( 0.468088370000000E+02, -0.120967377000000E+03),\n new google.maps.LatLng( 0.468100260000000E+02, -0.120965182000000E+03),\n new google.maps.LatLng( 0.468150330000000E+02, -0.120946344000000E+03),\n new google.maps.LatLng( 0.468139810000000E+02, -0.120946910000000E+03),\n new google.maps.LatLng( 0.468090690000000E+02, -0.120945611000000E+03),\n new google.maps.LatLng( 0.468028080000000E+02, -0.120938988000000E+03),\n new google.maps.LatLng( 0.467977570000000E+02, -0.120934630000000E+03),\n new google.maps.LatLng( 0.467904680000000E+02, -0.120930538000000E+03),\n new google.maps.LatLng( 0.467864000000000E+02, -0.120927213000000E+03),\n new google.maps.LatLng( 0.467851660000000E+02, -0.120921490000000E+03),\n new google.maps.LatLng( 0.467855540000000E+02, -0.120916001000000E+03),\n new google.maps.LatLng( 0.467839080000000E+02, -0.120912143000000E+03),\n new google.maps.LatLng( 0.467799300000000E+02, -0.120907222000000E+03),\n new google.maps.LatLng( 0.467794500000000E+02, -0.120907123000000E+03),\n new google.maps.LatLng( 0.467794280000000E+02, -0.120910848000000E+03),\n new google.maps.LatLng( 0.467809830000000E+02, -0.120913176000000E+03),\n new google.maps.LatLng( 0.467820800000000E+02, -0.120916003000000E+03),\n new google.maps.LatLng( 0.467820810000000E+02, -0.120917466000000E+03),\n new google.maps.LatLng( 0.467808010000000E+02, -0.120919695000000E+03),\n new google.maps.LatLng( 0.467789280000000E+02, -0.120919996000000E+03),\n new google.maps.LatLng( 0.467735800000000E+02, -0.120916406000000E+03),\n new google.maps.LatLng( 0.467712940000000E+02, -0.120913879000000E+03),\n new google.maps.LatLng( 0.467682990000000E+02, -0.120906265000000E+03),\n new google.maps.LatLng( 0.467662170000000E+02, -0.120898984000000E+03),\n new google.maps.LatLng( 0.467602050000000E+02, -0.120891906000000E+03),\n new google.maps.LatLng( 0.467582160000000E+02, -0.120890844000000E+03),\n new google.maps.LatLng( 0.467544440000000E+02, -0.120887422000000E+03),\n new google.maps.LatLng( 0.467484270000000E+02, -0.120873352000000E+03),\n new google.maps.LatLng( 0.467460320000000E+02, -0.120863743000000E+03),\n new google.maps.LatLng( 0.467471770000000E+02, -0.120855800000000E+03),\n new google.maps.LatLng( 0.467489150000000E+02, -0.120850283000000E+03),\n new google.maps.LatLng( 0.467497770000000E+02, -0.120849220000000E+03),\n new google.maps.LatLng( 0.467482770000000E+02, -0.120844664000000E+03),\n new google.maps.LatLng( 0.467399840000000E+02, -0.120836317000000E+03),\n new google.maps.LatLng( 0.467382940000000E+02, -0.120831597000000E+03),\n new google.maps.LatLng( 0.467334500000000E+02, -0.120824251000000E+03),\n new google.maps.LatLng( 0.467314860000000E+02, -0.120817970000000E+03),\n new google.maps.LatLng( 0.467281040000000E+02, -0.120812321000000E+03),\n new google.maps.LatLng( 0.467263510000000E+02, -0.120811192000000E+03),\n new google.maps.LatLng( 0.467238090000000E+02, -0.120814016000000E+03),\n new google.maps.LatLng( 0.467238090000000E+02, -0.120815245000000E+03),\n new google.maps.LatLng( 0.467251570000000E+02, -0.120821991000000E+03),\n new google.maps.LatLng( 0.467294960000000E+02, -0.120831661000000E+03),\n new google.maps.LatLng( 0.467300900000000E+02, -0.120834020000000E+03),\n new google.maps.LatLng( 0.467302940000000E+02, -0.120844588000000E+03),\n new google.maps.LatLng( 0.467287610000000E+02, -0.120850635000000E+03),\n new google.maps.LatLng( 0.467309740000000E+02, -0.120862800000000E+03),\n new google.maps.LatLng( 0.467303550000000E+02, -0.120866754000000E+03),\n new google.maps.LatLng( 0.467308300000000E+02, -0.120876186000000E+03),\n new google.maps.LatLng( 0.467314690000000E+02, -0.120880162000000E+03),\n new google.maps.LatLng( 0.467309470000000E+02, -0.120887441000000E+03),\n new google.maps.LatLng( 0.467311550000000E+02, -0.120891561000000E+03),\n new google.maps.LatLng( 0.467332380000000E+02, -0.120902128000000E+03),\n new google.maps.LatLng( 0.467352740000000E+02, -0.120908807000000E+03),\n new google.maps.LatLng( 0.467361450000000E+02, -0.120916451000000E+03),\n new google.maps.LatLng( 0.467354380000000E+02, -0.120923397000000E+03),\n new google.maps.LatLng( 0.467332210000000E+02, -0.120930609000000E+03),\n new google.maps.LatLng( 0.467295650000000E+02, -0.120937057000000E+03),\n new google.maps.LatLng( 0.467236010000000E+02, -0.120943803000000E+03),\n new google.maps.LatLng( 0.467151230000000E+02, -0.120955464000000E+03),\n new google.maps.LatLng( 0.467139340000000E+02, -0.120958188000000E+03),\n new google.maps.LatLng( 0.467132470000000E+02, -0.120967192000000E+03),\n new google.maps.LatLng( 0.467137260000000E+02, -0.120971245000000E+03),\n new google.maps.LatLng( 0.467130390000000E+02, -0.120976792000000E+03),\n new google.maps.LatLng( 0.467116890000000E+02, -0.120979682000000E+03),\n new google.maps.LatLng( 0.467089010000000E+02, -0.120981407000000E+03),\n new google.maps.LatLng( 0.467079180000000E+02, -0.120982768000000E+03),\n new google.maps.LatLng( 0.467036610000000E+02, -0.120995088000000E+03),\n new google.maps.LatLng( 0.467045500000000E+02, -0.121006654000000E+03),\n new google.maps.LatLng( 0.467097200000000E+02, -0.121016616000000E+03),\n new google.maps.LatLng( 0.467090830000000E+02, -0.121023659000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "84d33d0eaeedfc76c43f2965ac990700", "score": "0.596828", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.479986070000000E+02, -0.124377340000000E+03),\n new google.maps.LatLng( 0.479993070000000E+02, -0.124376965000000E+03),\n new google.maps.LatLng( 0.480018180000000E+02, -0.124370406000000E+03),\n new google.maps.LatLng( 0.480030980000000E+02, -0.124369522000000E+03),\n new google.maps.LatLng( 0.480035780000000E+02, -0.124369727000000E+03),\n new google.maps.LatLng( 0.480067740000000E+02, -0.124374225000000E+03),\n new google.maps.LatLng( 0.480077340000000E+02, -0.124376322000000E+03),\n new google.maps.LatLng( 0.480079420000000E+02, -0.124380561000000E+03),\n new google.maps.LatLng( 0.480131330000000E+02, -0.124389784000000E+03),\n new google.maps.LatLng( 0.480141150000000E+02, -0.124389238000000E+03),\n new google.maps.LatLng( 0.480146850000000E+02, -0.124385900000000E+03),\n new google.maps.LatLng( 0.480153930000000E+02, -0.124385150000000E+03),\n new google.maps.LatLng( 0.480200070000000E+02, -0.124383137000000E+03),\n new google.maps.LatLng( 0.480328040000000E+02, -0.124385338000000E+03),\n new google.maps.LatLng( 0.480339920000000E+02, -0.124384962000000E+03),\n new google.maps.LatLng( 0.480346090000000E+02, -0.124384007000000E+03),\n new google.maps.LatLng( 0.480349260000000E+02, -0.124379476000000E+03),\n new google.maps.LatLng( 0.480382420000000E+02, -0.124368369000000E+03),\n new google.maps.LatLng( 0.480393170000000E+02, -0.124366053000000E+03),\n new google.maps.LatLng( 0.480399110000000E+02, -0.124366054000000E+03),\n new google.maps.LatLng( 0.480421480000000E+02, -0.124369566000000E+03),\n new google.maps.LatLng( 0.480435190000000E+02, -0.124370112000000E+03),\n new google.maps.LatLng( 0.480453250000000E+02, -0.124369671000000E+03),\n new google.maps.LatLng( 0.480471770000000E+02, -0.124367084000000E+03),\n new google.maps.LatLng( 0.480489160000000E+02, -0.124360134000000E+03),\n new google.maps.LatLng( 0.480487340000000E+02, -0.124357987000000E+03),\n new google.maps.LatLng( 0.480479120000000E+02, -0.124356214000000E+03),\n new google.maps.LatLng( 0.480441210000000E+02, -0.124352292000000E+03),\n new google.maps.LatLng( 0.480432300000000E+02, -0.124350179000000E+03),\n new google.maps.LatLng( 0.480432300000000E+02, -0.124350179000000E+03),\n new google.maps.LatLng( 0.480430930000000E+02, -0.124351474000000E+03),\n new google.maps.LatLng( 0.480439830000000E+02, -0.124353689000000E+03),\n new google.maps.LatLng( 0.480476150000000E+02, -0.124357031000000E+03),\n new google.maps.LatLng( 0.480482770000000E+02, -0.124358634000000E+03),\n new google.maps.LatLng( 0.480482990000000E+02, -0.124359963000000E+03),\n new google.maps.LatLng( 0.480463310000000E+02, -0.124367287000000E+03),\n new google.maps.LatLng( 0.480451190000000E+02, -0.124368683000000E+03),\n new google.maps.LatLng( 0.480439310000000E+02, -0.124369261000000E+03),\n new google.maps.LatLng( 0.480427660000000E+02, -0.124369089000000E+03),\n new google.maps.LatLng( 0.480400030000000E+02, -0.124365372000000E+03),\n new google.maps.LatLng( 0.480385630000000E+02, -0.124365916000000E+03),\n new google.maps.LatLng( 0.480342870000000E+02, -0.124379545000000E+03),\n new google.maps.LatLng( 0.480339690000000E+02, -0.124383156000000E+03),\n new google.maps.LatLng( 0.480334440000000E+02, -0.124384349000000E+03),\n new google.maps.LatLng( 0.480193210000000E+02, -0.124382251000000E+03),\n new google.maps.LatLng( 0.480151640000000E+02, -0.124384061000000E+03),\n new google.maps.LatLng( 0.480142730000000E+02, -0.124385390000000E+03),\n new google.maps.LatLng( 0.480137950000000E+02, -0.124388523000000E+03),\n new google.maps.LatLng( 0.480134060000000E+02, -0.124388796000000E+03),\n new google.maps.LatLng( 0.480102060000000E+02, -0.124383964000000E+03),\n new google.maps.LatLng( 0.480083080000000E+02, -0.124379846000000E+03),\n new google.maps.LatLng( 0.480083520000000E+02, -0.124376768000000E+03),\n new google.maps.LatLng( 0.480078940000000E+02, -0.124375009000000E+03),\n new google.maps.LatLng( 0.480040350000000E+02, -0.124369047000000E+03),\n new google.maps.LatLng( 0.480022300000000E+02, -0.124369147000000E+03),\n new google.maps.LatLng( 0.480008120000000E+02, -0.124370812000000E+03),\n new google.maps.LatLng( 0.479986070000000E+02, -0.124377340000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "d4576846b57acaa1fdfbde93b8a79d40", "score": "0.59677225", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.478539470000000E+02, -0.122584062000000E+03),\n new google.maps.LatLng( 0.478505880000000E+02, -0.122583992000000E+03),\n new google.maps.LatLng( 0.478400290000000E+02, -0.122587484000000E+03),\n new google.maps.LatLng( 0.478117600000000E+02, -0.122583671000000E+03),\n new google.maps.LatLng( 0.478074410000000E+02, -0.122584110000000E+03),\n new google.maps.LatLng( 0.477983230000000E+02, -0.122583766000000E+03),\n new google.maps.LatLng( 0.478041300000000E+02, -0.122569283000000E+03),\n new google.maps.LatLng( 0.478064380000000E+02, -0.122559784000000E+03),\n new google.maps.LatLng( 0.478090430000000E+02, -0.122556595000000E+03),\n new google.maps.LatLng( 0.478093850000000E+02, -0.122552321000000E+03),\n new google.maps.LatLng( 0.477942560000000E+02, -0.122552323000000E+03),\n new google.maps.LatLng( 0.477944390000000E+02, -0.122547982000000E+03),\n new google.maps.LatLng( 0.477961580000000E+02, -0.122545622000000E+03),\n new google.maps.LatLng( 0.477962750000000E+02, -0.122541502000000E+03),\n new google.maps.LatLng( 0.477873990000000E+02, -0.122541608000000E+03),\n new google.maps.LatLng( 0.477860960000000E+02, -0.122542423000000E+03),\n new google.maps.LatLng( 0.477852740000000E+02, -0.122543813000000E+03),\n new google.maps.LatLng( 0.477839950000000E+02, -0.122549103000000E+03),\n new google.maps.LatLng( 0.477830120000000E+02, -0.122551104000000E+03),\n new google.maps.LatLng( 0.477796530000000E+02, -0.122554429000000E+03),\n new google.maps.LatLng( 0.477740310000000E+02, -0.122556225000000E+03),\n new google.maps.LatLng( 0.477684090000000E+02, -0.122555141000000E+03),\n new google.maps.LatLng( 0.477620200000000E+02, -0.122551357000000E+03),\n new google.maps.LatLng( 0.477619910000000E+02, -0.122547811000000E+03),\n new google.maps.LatLng( 0.477658810000000E+02, -0.122547820000000E+03),\n new google.maps.LatLng( 0.477657330000000E+02, -0.122519313000000E+03),\n new google.maps.LatLng( 0.477649980000000E+02, -0.122521955000000E+03),\n new google.maps.LatLng( 0.477608630000000E+02, -0.122527653000000E+03),\n new google.maps.LatLng( 0.477542820000000E+02, -0.122527793000000E+03),\n new google.maps.LatLng( 0.477542820000000E+02, -0.122527793000000E+03),\n new google.maps.LatLng( 0.477567750000000E+02, -0.122534840000000E+03),\n new google.maps.LatLng( 0.477567520000000E+02, -0.122536231000000E+03),\n new google.maps.LatLng( 0.477562950000000E+02, -0.122537519000000E+03),\n new google.maps.LatLng( 0.477506060000000E+02, -0.122543215000000E+03),\n new google.maps.LatLng( 0.477502680000000E+02, -0.122546637000000E+03),\n new google.maps.LatLng( 0.477466574001508E+02, -0.122543076935248E+03),\n new google.maps.LatLng( 0.477466574001508E+02, -0.122543076935248E+03),\n new google.maps.LatLng( 0.477460799891363E+02, -0.122549967266129E+03),\n new google.maps.LatLng( 0.477459119777617E+02, -0.122551972170665E+03),\n new google.maps.LatLng( 0.477458616007352E+02, -0.122552573327160E+03),\n new google.maps.LatLng( 0.477457040000000E+02, -0.122554454000000E+03),\n new google.maps.LatLng( 0.477448266998893E+02, -0.122554169003016E+03),\n new google.maps.LatLng( 0.477441859946594E+02, -0.122553960865509E+03),\n new google.maps.LatLng( 0.477441859946594E+02, -0.122553960865509E+03),\n new google.maps.LatLng( 0.477442410000000E+02, -0.122573814000000E+03),\n new google.maps.LatLng( 0.477414400000000E+02, -0.122571031000000E+03),\n new google.maps.LatLng( 0.477355790000000E+02, -0.122572051000000E+03),\n new google.maps.LatLng( 0.477297740000000E+02, -0.122575743000000E+03),\n new google.maps.LatLng( 0.477283800000000E+02, -0.122576183000000E+03),\n new google.maps.LatLng( 0.477225160000000E+02, -0.122575358000000E+03),\n new google.maps.LatLng( 0.477216840000000E+02, -0.122569779000000E+03),\n new google.maps.LatLng( 0.477139580000000E+02, -0.122570806000000E+03),\n new google.maps.LatLng( 0.477128400000000E+02, -0.122567207000000E+03),\n new google.maps.LatLng( 0.477128400000000E+02, -0.122567207000000E+03),\n new google.maps.LatLng( 0.477113320000000E+02, -0.122569506000000E+03),\n new google.maps.LatLng( 0.477097230000000E+02, -0.122574363000000E+03),\n new google.maps.LatLng( 0.477033770000000E+02, -0.122581965000000E+03),\n new google.maps.LatLng( 0.476957190000000E+02, -0.122585957000000E+03),\n new google.maps.LatLng( 0.476924510000000E+02, -0.122587208000000E+03),\n new google.maps.LatLng( 0.476909200000000E+02, -0.122587004000000E+03),\n new google.maps.LatLng( 0.476903710000000E+02, -0.122587715000000E+03),\n new google.maps.LatLng( 0.476903940000000E+02, -0.122590796000000E+03),\n new google.maps.LatLng( 0.476912620000000E+02, -0.122591947000000E+03),\n new google.maps.LatLng( 0.476941410000000E+02, -0.122593540000000E+03),\n new google.maps.LatLng( 0.476957150000000E+02, -0.122602275000000E+03),\n new google.maps.LatLng( 0.476967430000000E+02, -0.122604137000000E+03),\n new google.maps.LatLng( 0.476980000000000E+02, -0.122604815000000E+03),\n new google.maps.LatLng( 0.477017940000000E+02, -0.122604006000000E+03),\n new google.maps.LatLng( 0.477045820000000E+02, -0.122604550000000E+03),\n new google.maps.LatLng( 0.477098820000000E+02, -0.122610074000000E+03),\n new google.maps.LatLng( 0.477119140000000E+02, -0.122613327000000E+03),\n new google.maps.LatLng( 0.477120950000000E+02, -0.122618339000000E+03),\n new google.maps.LatLng( 0.477094640000000E+02, -0.122623788000000E+03),\n new google.maps.LatLng( 0.477076580000000E+02, -0.122625479000000E+03),\n new google.maps.LatLng( 0.477081380000000E+02, -0.122627438000000E+03),\n new google.maps.LatLng( 0.477114750000000E+02, -0.122628416000000E+03),\n new google.maps.LatLng( 0.477138740000000E+02, -0.122628413000000E+03),\n new google.maps.LatLng( 0.477155880000000E+02, -0.122626921000000E+03),\n new google.maps.LatLng( 0.477153380000000E+02, -0.122623490000000E+03),\n new google.maps.LatLng( 0.477173260000000E+02, -0.122623357000000E+03),\n new google.maps.LatLng( 0.477200220000000E+02, -0.122627255000000E+03),\n new google.maps.LatLng( 0.477204580000000E+02, -0.122632606000000E+03),\n new google.maps.LatLng( 0.477245980000000E+02, -0.122639817000000E+03),\n new google.maps.LatLng( 0.477283010000000E+02, -0.122643912000000E+03),\n new google.maps.LatLng( 0.477358910000000E+02, -0.122649428000000E+03),\n new google.maps.LatLng( 0.477412620000000E+02, -0.122650814000000E+03),\n new google.maps.LatLng( 0.477418340000000E+02, -0.122653592000000E+03),\n new google.maps.LatLng( 0.477385440000000E+02, -0.122657016000000E+03),\n new google.maps.LatLng( 0.477361220000000E+02, -0.122658440000000E+03),\n new google.maps.LatLng( 0.477283990000000E+02, -0.122662170000000E+03),\n new google.maps.LatLng( 0.477272100000000E+02, -0.122662002000000E+03),\n new google.maps.LatLng( 0.477256550000000E+02, -0.122659665000000E+03),\n new google.maps.LatLng( 0.477185920000000E+02, -0.122652828000000E+03),\n new google.maps.LatLng( 0.477148200000000E+02, -0.122651136000000E+03),\n new google.maps.LatLng( 0.477117790000000E+02, -0.122647414000000E+03),\n new google.maps.LatLng( 0.477097430000000E+02, -0.122638611000000E+03),\n new google.maps.LatLng( 0.477115480000000E+02, -0.122637661000000E+03),\n new google.maps.LatLng( 0.477117300000000E+02, -0.122636137000000E+03),\n new google.maps.LatLng( 0.477093300000000E+02, -0.122635564000000E+03),\n new google.maps.LatLng( 0.477011950000000E+02, -0.122636587000000E+03),\n new google.maps.LatLng( 0.476992510000000E+02, -0.122633576000000E+03),\n new google.maps.LatLng( 0.476992940000000E+02, -0.122630021000000E+03),\n new google.maps.LatLng( 0.476986080000000E+02, -0.122627990000000E+03),\n new google.maps.LatLng( 0.476977850000000E+02, -0.122627720000000E+03),\n new google.maps.LatLng( 0.476977850000000E+02, -0.122627720000000E+03),\n new google.maps.LatLng( 0.476907230000000E+02, -0.122627452000000E+03),\n new google.maps.LatLng( 0.476908100000000E+02, -0.122618250000000E+03),\n new google.maps.LatLng( 0.476908100000000E+02, -0.122618250000000E+03),\n new google.maps.LatLng( 0.476829260000000E+02, -0.122615882000000E+03),\n new google.maps.LatLng( 0.476708410000000E+02, -0.122615621000000E+03),\n new google.maps.LatLng( 0.476670950000000E+02, -0.122614797000000E+03),\n new google.maps.LatLng( 0.476632880000000E+02, -0.122612890000000E+03),\n new google.maps.LatLng( 0.476536750000000E+02, -0.122614461000000E+03),\n new google.maps.LatLng( 0.476520170000000E+02, -0.122616052000000E+03),\n new google.maps.LatLng( 0.476520170000000E+02, -0.122616052000000E+03),\n new google.maps.LatLng( 0.476512490000000E+02, -0.122621313000000E+03),\n new google.maps.LatLng( 0.476532780000000E+02, -0.122635581000000E+03),\n new google.maps.LatLng( 0.476544380000000E+02, -0.122640906000000E+03),\n new google.maps.LatLng( 0.476576350000000E+02, -0.122640678000000E+03),\n new google.maps.LatLng( 0.476577420000000E+02, -0.122650184000000E+03),\n new google.maps.LatLng( 0.476515820000000E+02, -0.122650257000000E+03),\n new google.maps.LatLng( 0.476504040000000E+02, -0.122652380000000E+03),\n new google.maps.LatLng( 0.476505980000000E+02, -0.122657633000000E+03),\n new google.maps.LatLng( 0.476505980000000E+02, -0.122657633000000E+03),\n new google.maps.LatLng( 0.476597350000000E+02, -0.122656870000000E+03),\n new google.maps.LatLng( 0.476754100000000E+02, -0.122658960000000E+03),\n new google.maps.LatLng( 0.476827500000000E+02, -0.122660532000000E+03),\n new google.maps.LatLng( 0.476811550000000E+02, -0.122663173000000E+03),\n new google.maps.LatLng( 0.476807740000000E+02, -0.122665141000000E+03),\n new google.maps.LatLng( 0.476832680000000E+02, -0.122665065000000E+03),\n new google.maps.LatLng( 0.476866910000000E+02, -0.122659424000000E+03),\n new google.maps.LatLng( 0.476863630000000E+02, -0.122657406000000E+03),\n new google.maps.LatLng( 0.476854890000000E+02, -0.122657190000000E+03),\n new google.maps.LatLng( 0.476853740000000E+02, -0.122656687000000E+03),\n new google.maps.LatLng( 0.476864040000000E+02, -0.122655115000000E+03),\n new google.maps.LatLng( 0.476902080000000E+02, -0.122654673000000E+03),\n new google.maps.LatLng( 0.477060680000000E+02, -0.122654596000000E+03),\n new google.maps.LatLng( 0.476983700000000E+02, -0.122672578000000E+03),\n new google.maps.LatLng( 0.476951250000000E+02, -0.122674136000000E+03),\n new google.maps.LatLng( 0.476937310000000E+02, -0.122674001000000E+03),\n new google.maps.LatLng( 0.476937320000000E+02, -0.122686018000000E+03),\n new google.maps.LatLng( 0.477010450000000E+02, -0.122684089000000E+03),\n new google.maps.LatLng( 0.477010950000000E+02, -0.122692256000000E+03),\n new google.maps.LatLng( 0.477010950000000E+02, -0.122692256000000E+03),\n new google.maps.LatLng( 0.477030030000000E+02, -0.122692337000000E+03),\n new google.maps.LatLng( 0.477030780000000E+02, -0.122694338000000E+03),\n new google.maps.LatLng( 0.477113070000000E+02, -0.122694315000000E+03),\n new google.maps.LatLng( 0.477340980000000E+02, -0.122694055000000E+03),\n new google.maps.LatLng( 0.477341410000000E+02, -0.122692379000000E+03),\n new google.maps.LatLng( 0.477456990000000E+02, -0.122691838000000E+03),\n new google.maps.LatLng( 0.477664460000000E+02, -0.122691811000000E+03),\n new google.maps.LatLng( 0.477720530571131E+02, -0.122705584053417E+03),\n new google.maps.LatLng( 0.477720530571131E+02, -0.122705584053417E+03),\n new google.maps.LatLng( 0.477724224558241E+02, -0.122704705880078E+03),\n new google.maps.LatLng( 0.477756401200781E+02, -0.122697056511321E+03),\n new google.maps.LatLng( 0.477783720000000E+02, -0.122690562000000E+03),\n new google.maps.LatLng( 0.477954083877378E+02, -0.122685099932711E+03),\n new google.maps.LatLng( 0.477985740000000E+02, -0.122684085000000E+03),\n new google.maps.LatLng( 0.478008820000000E+02, -0.122682015000000E+03),\n new google.maps.LatLng( 0.478251230000000E+02, -0.122648108000000E+03),\n new google.maps.LatLng( 0.478253018283971E+02, -0.122647705716834E+03),\n new google.maps.LatLng( 0.478354586284486E+02, -0.122624857501767E+03),\n new google.maps.LatLng( 0.478361990000000E+02, -0.122623192000000E+03),\n new google.maps.LatLng( 0.478508060000000E+02, -0.122614585000000E+03),\n new google.maps.LatLng( 0.478567280000000E+02, -0.122608105000000E+03),\n new google.maps.LatLng( 0.478567529083677E+02, -0.122607100702781E+03),\n new google.maps.LatLng( 0.478567529083677E+02, -0.122607100702781E+03),\n new google.maps.LatLng( 0.478544890000000E+02, -0.122606473000000E+03),\n new google.maps.LatLng( 0.478550840000000E+02, -0.122602500000000E+03),\n new google.maps.LatLng( 0.478539470000000E+02, -0.122584062000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "da1313d1d129bd0fecd1733f24dc9598", "score": "0.5967362", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.465916730000000E+02, -0.118228897000000E+03),\n new google.maps.LatLng( 0.465604160000000E+02, -0.118228412000000E+03),\n new google.maps.LatLng( 0.465603690000000E+02, -0.118242462000000E+03),\n new google.maps.LatLng( 0.464639210000000E+02, -0.118241388000000E+03),\n new google.maps.LatLng( 0.463963500000000E+02, -0.118241730000000E+03),\n new google.maps.LatLng( 0.463963500000000E+02, -0.118241730000000E+03),\n new google.maps.LatLng( 0.462950720000000E+02, -0.118241611000000E+03),\n new google.maps.LatLng( 0.462951730000000E+02, -0.118224133000000E+03),\n new google.maps.LatLng( 0.462887380000000E+02, -0.118225200000000E+03),\n new google.maps.LatLng( 0.462820860000000E+02, -0.118228196000000E+03),\n new google.maps.LatLng( 0.462811250000000E+02, -0.118229679000000E+03),\n new google.maps.LatLng( 0.462790430000000E+02, -0.118236502000000E+03),\n new google.maps.LatLng( 0.462792690000000E+02, -0.118241117000000E+03),\n new google.maps.LatLng( 0.462837450000000E+02, -0.118249034000000E+03),\n new google.maps.LatLng( 0.462845260000000E+02, -0.118258221000000E+03),\n new google.maps.LatLng( 0.462833840000000E+02, -0.118260167000000E+03),\n new google.maps.LatLng( 0.462854450000000E+02, -0.118270155000000E+03),\n new google.maps.LatLng( 0.462882110000000E+02, -0.118271307000000E+03),\n new google.maps.LatLng( 0.462884850000000E+02, -0.118271867000000E+03),\n new google.maps.LatLng( 0.462894940000000E+02, -0.118281264000000E+03),\n new google.maps.LatLng( 0.462900200000000E+02, -0.118282220000000E+03),\n new google.maps.LatLng( 0.462918950000000E+02, -0.118283373000000E+03),\n new google.maps.LatLng( 0.462930860000000E+02, -0.118293744000000E+03),\n new google.maps.LatLng( 0.462930860000000E+02, -0.118293744000000E+03),\n new google.maps.LatLng( 0.462933830000000E+02, -0.118297947000000E+03),\n new google.maps.LatLng( 0.462928650000000E+02, -0.118314624000000E+03),\n new google.maps.LatLng( 0.462905500000000E+02, -0.118314500000000E+03),\n new google.maps.LatLng( 0.462881500000000E+02, -0.118312951000000E+03),\n new google.maps.LatLng( 0.462872580000000E+02, -0.118311137000000E+03),\n new google.maps.LatLng( 0.462832130000000E+02, -0.118310940000000E+03),\n new google.maps.LatLng( 0.462806980000000E+02, -0.118311533000000E+03),\n new google.maps.LatLng( 0.462768130000000E+02, -0.118313017000000E+03),\n new google.maps.LatLng( 0.462695670000000E+02, -0.118318685000000E+03),\n new google.maps.LatLng( 0.462560340000000E+02, -0.118325142000000E+03),\n new google.maps.LatLng( 0.462548000000000E+02, -0.118327481000000E+03),\n new google.maps.LatLng( 0.462538610000000E+02, -0.118336939000000E+03),\n new google.maps.LatLng( 0.462528320000000E+02, -0.118339870000000E+03),\n new google.maps.LatLng( 0.462498600000000E+02, -0.118341699000000E+03),\n new google.maps.LatLng( 0.462468020000000E+02, -0.118341847000000E+03),\n new google.maps.LatLng( 0.462441050000000E+02, -0.118343229000000E+03),\n new google.maps.LatLng( 0.462376560000000E+02, -0.118352812000000E+03),\n new google.maps.LatLng( 0.462371270000000E+02, -0.118359663000000E+03),\n new google.maps.LatLng( 0.462374910000000E+02, -0.118363155000000E+03),\n new google.maps.LatLng( 0.462372370000000E+02, -0.118368689000000E+03),\n new google.maps.LatLng( 0.462290540000000E+02, -0.118381048000000E+03),\n new google.maps.LatLng( 0.462247130000000E+02, -0.118386552000000E+03),\n new google.maps.LatLng( 0.462190020000000E+02, -0.118392320000000E+03),\n new google.maps.LatLng( 0.462156650000000E+02, -0.118392948000000E+03),\n new google.maps.LatLng( 0.462145900000000E+02, -0.118392455000000E+03),\n new google.maps.LatLng( 0.461999800000000E+02, -0.118382426000000E+03),\n new google.maps.LatLng( 0.461971230000000E+02, -0.118381211000000E+03),\n new google.maps.LatLng( 0.461893940000000E+02, -0.118382217000000E+03),\n new google.maps.LatLng( 0.461789890000000E+02, -0.118382770000000E+03),\n new google.maps.LatLng( 0.461790440000000E+02, -0.118384059000000E+03),\n new google.maps.LatLng( 0.461735580000000E+02, -0.118384295000000E+03),\n new google.maps.LatLng( 0.461713640000000E+02, -0.118383836000000E+03),\n new google.maps.LatLng( 0.461683230000000E+02, -0.118382688000000E+03),\n new google.maps.LatLng( 0.461633390000000E+02, -0.118379797000000E+03),\n new google.maps.LatLng( 0.461562530000000E+02, -0.118379245000000E+03),\n new google.maps.LatLng( 0.461545380000000E+02, -0.118377438000000E+03),\n new google.maps.LatLng( 0.461527090000000E+02, -0.118372844000000E+03),\n new google.maps.LatLng( 0.461498040000000E+02, -0.118372692000000E+03),\n new google.maps.LatLng( 0.461485950000000E+02, -0.118378201000000E+03),\n new google.maps.LatLng( 0.461486220000000E+02, -0.118385896000000E+03),\n new google.maps.LatLng( 0.461481210000000E+02, -0.118389877000000E+03),\n new google.maps.LatLng( 0.461425690000000E+02, -0.118398892000000E+03),\n new google.maps.LatLng( 0.461396440000000E+02, -0.118401261000000E+03),\n new google.maps.LatLng( 0.461376330000000E+02, -0.118401262000000E+03),\n new google.maps.LatLng( 0.461327430000000E+02, -0.118407250000000E+03),\n new google.maps.LatLng( 0.461294980000000E+02, -0.118409422000000E+03),\n new google.maps.LatLng( 0.461238370000000E+02, -0.118419848000000E+03),\n new google.maps.LatLng( 0.461217810000000E+02, -0.118425865000000E+03),\n new google.maps.LatLng( 0.461178270000000E+02, -0.118433260000000E+03),\n new google.maps.LatLng( 0.461142610000000E+02, -0.118436317000000E+03),\n new google.maps.LatLng( 0.461103750000000E+02, -0.118444369000000E+03),\n new google.maps.LatLng( 0.461081800000000E+02, -0.118449298000000E+03),\n new google.maps.LatLng( 0.461083160000000E+02, -0.118456593000000E+03),\n new google.maps.LatLng( 0.461075600000000E+02, -0.118460570000000E+03),\n new google.maps.LatLng( 0.461048170000000E+02, -0.118463953000000E+03),\n new google.maps.LatLng( 0.461014100000000E+02, -0.118469340000000E+03),\n new google.maps.LatLng( 0.461014890000000E+02, -0.118470900000000E+03),\n new google.maps.LatLng( 0.461018430000000E+02, -0.118470852000000E+03),\n new google.maps.LatLng( 0.461171150000000E+02, -0.118462481000000E+03),\n new google.maps.LatLng( 0.461223720000000E+02, -0.118463009000000E+03),\n new google.maps.LatLng( 0.461231030000000E+02, -0.118463765000000E+03),\n new google.maps.LatLng( 0.461236510000000E+02, -0.118465672000000E+03),\n new google.maps.LatLng( 0.461241740000000E+02, -0.118473858000000E+03),\n new google.maps.LatLng( 0.461233950000000E+02, -0.118479150000000E+03),\n new google.maps.LatLng( 0.461236450000000E+02, -0.118482174000000E+03),\n new google.maps.LatLng( 0.461248570000000E+02, -0.118485560000000E+03),\n new google.maps.LatLng( 0.461260380000000E+02, -0.118487827000000E+03),\n new google.maps.LatLng( 0.461272260000000E+02, -0.118488847000000E+03),\n new google.maps.LatLng( 0.461338550000000E+02, -0.118489478000000E+03),\n new google.maps.LatLng( 0.461503160000000E+02, -0.118481535000000E+03),\n new google.maps.LatLng( 0.461616550000000E+02, -0.118475393000000E+03),\n new google.maps.LatLng( 0.461679880000000E+02, -0.118469180000000E+03),\n new google.maps.LatLng( 0.461684690000000E+02, -0.118464245000000E+03),\n new google.maps.LatLng( 0.461692700000000E+02, -0.118461317000000E+03),\n new google.maps.LatLng( 0.461732490000000E+02, -0.118453291000000E+03),\n new google.maps.LatLng( 0.461764490000000E+02, -0.118451055000000E+03),\n new google.maps.LatLng( 0.461771800000000E+02, -0.118449640000000E+03),\n new google.maps.LatLng( 0.461724030000000E+02, -0.118451317000000E+03),\n new google.maps.LatLng( 0.461675570000000E+02, -0.118454474000000E+03),\n new google.maps.LatLng( 0.461644490000000E+02, -0.118450393000000E+03),\n new google.maps.LatLng( 0.461617070000000E+02, -0.118443946000000E+03),\n new google.maps.LatLng( 0.461615010000000E+02, -0.118439011000000E+03),\n new google.maps.LatLng( 0.461621870000000E+02, -0.118434702000000E+03),\n new google.maps.LatLng( 0.461739810000000E+02, -0.118435326000000E+03),\n new google.maps.LatLng( 0.461787810000000E+02, -0.118438321000000E+03),\n new google.maps.LatLng( 0.461887920000000E+02, -0.118437202000000E+03),\n new google.maps.LatLng( 0.461935540000000E+02, -0.118440276000000E+03),\n new google.maps.LatLng( 0.462091610000000E+02, -0.118446938000000E+03),\n new google.maps.LatLng( 0.462089310000000E+02, -0.118512845000000E+03),\n new google.maps.LatLng( 0.462212600000000E+02, -0.118512257000000E+03),\n new google.maps.LatLng( 0.462249860000000E+02, -0.118511134000000E+03),\n new google.maps.LatLng( 0.462361810000000E+02, -0.118502429000000E+03),\n new google.maps.LatLng( 0.462425800000000E+02, -0.118498117000000E+03),\n new google.maps.LatLng( 0.462468630000000E+02, -0.118495773000000E+03),\n new google.maps.LatLng( 0.462501600000000E+02, -0.118496706000000E+03),\n new google.maps.LatLng( 0.462544880000000E+02, -0.118496776000000E+03),\n new google.maps.LatLng( 0.462568190000000E+02, -0.118496219000000E+03),\n new google.maps.LatLng( 0.462636320000000E+02, -0.118493985000000E+03),\n new google.maps.LatLng( 0.462721820000000E+02, -0.118489411000000E+03),\n new google.maps.LatLng( 0.462803900000000E+02, -0.118486881000000E+03),\n new google.maps.LatLng( 0.462837270000000E+02, -0.118486653000000E+03),\n new google.maps.LatLng( 0.462868860000000E+02, -0.118488149000000E+03),\n new google.maps.LatLng( 0.462870840000000E+02, -0.118491899000000E+03),\n new google.maps.LatLng( 0.462863050000000E+02, -0.118496942000000E+03),\n new google.maps.LatLng( 0.462890950000000E+02, -0.118504907000000E+03),\n new google.maps.LatLng( 0.462886380000000E+02, -0.118507149000000E+03),\n new google.maps.LatLng( 0.462866740000000E+02, -0.118510349000000E+03),\n new google.maps.LatLng( 0.462869060000000E+02, -0.118516909000000E+03),\n new google.maps.LatLng( 0.462882780000000E+02, -0.118519513000000E+03),\n new google.maps.LatLng( 0.462891940000000E+02, -0.118524063000000E+03),\n new google.maps.LatLng( 0.462891500000000E+02, -0.118529569000000E+03),\n new google.maps.LatLng( 0.462885560000000E+02, -0.118532173000000E+03),\n new google.maps.LatLng( 0.462862940000000E+02, -0.118534515000000E+03),\n new google.maps.LatLng( 0.462838490000000E+02, -0.118534385000000E+03),\n new google.maps.LatLng( 0.462815170000000E+02, -0.118535243000000E+03),\n new google.maps.LatLng( 0.462713930000000E+02, -0.118544675000000E+03),\n new google.maps.LatLng( 0.462697480000000E+02, -0.118550740000000E+03),\n new google.maps.LatLng( 0.462671430000000E+02, -0.118555848000000E+03),\n new google.maps.LatLng( 0.462624580000000E+02, -0.118561517000000E+03),\n new google.maps.LatLng( 0.462576120000000E+02, -0.118570118000000E+03),\n new google.maps.LatLng( 0.462575900000000E+02, -0.118571304000000E+03),\n new google.maps.LatLng( 0.462582980000000E+02, -0.118572885000000E+03),\n new google.maps.LatLng( 0.462571550000000E+02, -0.118577861000000E+03),\n new google.maps.LatLng( 0.462562400000000E+02, -0.118578717000000E+03),\n new google.maps.LatLng( 0.462549600000000E+02, -0.118578585000000E+03),\n new google.maps.LatLng( 0.462535170000000E+02, -0.118579104000000E+03),\n new google.maps.LatLng( 0.462537380000000E+02, -0.118637538000000E+03),\n new google.maps.LatLng( 0.462537380000000E+02, -0.118637538000000E+03),\n new google.maps.LatLng( 0.462663560000000E+02, -0.118636991000000E+03),\n new google.maps.LatLng( 0.462674770000000E+02, -0.118637682000000E+03),\n new google.maps.LatLng( 0.462746090000000E+02, -0.118637906000000E+03),\n new google.maps.LatLng( 0.462750070000000E+02, -0.118669285000000E+03),\n new google.maps.LatLng( 0.462741380000000E+02, -0.118669713000000E+03),\n new google.maps.LatLng( 0.462680120000000E+02, -0.118679248000000E+03),\n new google.maps.LatLng( 0.462225270000000E+02, -0.118679019000000E+03),\n new google.maps.LatLng( 0.462095910000000E+02, -0.118679416000000E+03),\n new google.maps.LatLng( 0.462104080000000E+02, -0.118721358000000E+03),\n new google.maps.LatLng( 0.462104080000000E+02, -0.118721358000000E+03),\n new google.maps.LatLng( 0.462114820000000E+02, -0.118721918000000E+03),\n new google.maps.LatLng( 0.462198020000000E+02, -0.118721561000000E+03),\n new google.maps.LatLng( 0.462249440000000E+02, -0.118721828000000E+03),\n new google.maps.LatLng( 0.462246660000000E+02, -0.118732597000000E+03),\n new google.maps.LatLng( 0.462252560000000E+02, -0.118741224000000E+03),\n new google.maps.LatLng( 0.462240210000000E+02, -0.118742310000000E+03),\n new google.maps.LatLng( 0.462239060000000E+02, -0.118744878000000E+03),\n new google.maps.LatLng( 0.462276980000000E+02, -0.118747616000000E+03),\n new google.maps.LatLng( 0.462297550000000E+02, -0.118748113000000E+03),\n new google.maps.LatLng( 0.462327270000000E+02, -0.118746502000000E+03),\n new google.maps.LatLng( 0.462353800000000E+02, -0.118743869000000E+03),\n new google.maps.LatLng( 0.462398830000000E+02, -0.118742128000000E+03),\n new google.maps.LatLng( 0.462402740000000E+02, -0.118762686000000E+03),\n new google.maps.LatLng( 0.462433600000000E+02, -0.118763309000000E+03),\n new google.maps.LatLng( 0.462477480000000E+02, -0.118762877000000E+03),\n new google.maps.LatLng( 0.462545180000000E+02, -0.118757801000000E+03),\n new google.maps.LatLng( 0.462541140000000E+02, -0.118721647000000E+03),\n new google.maps.LatLng( 0.462683300000000E+02, -0.118720666000000E+03),\n new google.maps.LatLng( 0.462795060000000E+02, -0.118721299000000E+03),\n new google.maps.LatLng( 0.463186790000000E+02, -0.118721522000000E+03),\n new google.maps.LatLng( 0.463175810000000E+02, -0.118725413000000E+03),\n new google.maps.LatLng( 0.463128470000000E+02, -0.118732700000000E+03),\n new google.maps.LatLng( 0.463122060000000E+02, -0.118735733000000E+03),\n new google.maps.LatLng( 0.463122710000000E+02, -0.118742099000000E+03),\n new google.maps.LatLng( 0.463089770000000E+02, -0.118751105000000E+03),\n new google.maps.LatLng( 0.463071500000000E+02, -0.118753256000000E+03),\n new google.maps.LatLng( 0.463048660000000E+02, -0.118754544000000E+03),\n new google.maps.LatLng( 0.463011630000000E+02, -0.118755208000000E+03),\n new google.maps.LatLng( 0.462953160000000E+02, -0.118762797000000E+03),\n new google.maps.LatLng( 0.462917750000000E+02, -0.118764679000000E+03),\n new google.maps.LatLng( 0.462889430000000E+02, -0.118770418000000E+03),\n new google.maps.LatLng( 0.462877530000000E+02, -0.118775667000000E+03),\n new google.maps.LatLng( 0.462888770000000E+02, -0.118776454000000E+03),\n new google.maps.LatLng( 0.462888770000000E+02, -0.118776454000000E+03),\n new google.maps.LatLng( 0.462903830000000E+02, -0.118772725000000E+03),\n new google.maps.LatLng( 0.462941750000000E+02, -0.118766359000000E+03),\n new google.maps.LatLng( 0.462979440000000E+02, -0.118762729000000E+03),\n new google.maps.LatLng( 0.463006410000000E+02, -0.118761605000000E+03),\n new google.maps.LatLng( 0.463034980000000E+02, -0.118761866000000E+03),\n new google.maps.LatLng( 0.463083670000000E+02, -0.118765456000000E+03),\n new google.maps.LatLng( 0.463138990000000E+02, -0.118768388000000E+03),\n new google.maps.LatLng( 0.463165270000000E+02, -0.118767924000000E+03),\n new google.maps.LatLng( 0.463210050000000E+02, -0.118762147000000E+03),\n new google.maps.LatLng( 0.463254820000000E+02, -0.118758547000000E+03),\n new google.maps.LatLng( 0.463289550000000E+02, -0.118756730000000E+03),\n new google.maps.LatLng( 0.463328640000000E+02, -0.118757023000000E+03),\n new google.maps.LatLng( 0.463342350000000E+02, -0.118757681000000E+03),\n new google.maps.LatLng( 0.463407720000000E+02, -0.118757213000000E+03),\n new google.maps.LatLng( 0.463453410000000E+02, -0.118754535000000E+03),\n new google.maps.LatLng( 0.463532930000000E+02, -0.118747752000000E+03),\n new google.maps.LatLng( 0.463544140000000E+02, -0.118745872000000E+03),\n new google.maps.LatLng( 0.463543000000000E+02, -0.118745080000000E+03),\n new google.maps.LatLng( 0.463507820000000E+02, -0.118741776000000E+03),\n new google.maps.LatLng( 0.463500510000000E+02, -0.118740223000000E+03),\n new google.maps.LatLng( 0.463544890000000E+02, -0.118729731000000E+03),\n new google.maps.LatLng( 0.463580790000000E+02, -0.118726037000000E+03),\n new google.maps.LatLng( 0.463597250000000E+02, -0.118723266000000E+03),\n new google.maps.LatLng( 0.463600240000000E+02, -0.118720130000000E+03),\n new google.maps.LatLng( 0.463588380000000E+02, -0.118707024000000E+03),\n new google.maps.LatLng( 0.463588850000000E+02, -0.118702964000000E+03),\n new google.maps.LatLng( 0.463598680000000E+02, -0.118698705000000E+03),\n new google.maps.LatLng( 0.463607820000000E+02, -0.118696856000000E+03),\n new google.maps.LatLng( 0.463674570000000E+02, -0.118689231000000E+03),\n new google.maps.LatLng( 0.463690570000000E+02, -0.118688208000000E+03),\n new google.maps.LatLng( 0.463699950000000E+02, -0.118688208000000E+03),\n new google.maps.LatLng( 0.463710000000000E+02, -0.118690453000000E+03),\n new google.maps.LatLng( 0.463720510000000E+02, -0.118690717000000E+03),\n new google.maps.LatLng( 0.463734000000000E+02, -0.118688340000000E+03),\n new google.maps.LatLng( 0.463731030000000E+02, -0.118687647000000E+03),\n new google.maps.LatLng( 0.463733770000000E+02, -0.118686227000000E+03),\n new google.maps.LatLng( 0.463753720000000E+02, -0.118683945000000E+03),\n new google.maps.LatLng( 0.463761040000000E+02, -0.118683978000000E+03),\n new google.maps.LatLng( 0.463740630000000E+02, -0.118689958000000E+03),\n new google.maps.LatLng( 0.463732400000000E+02, -0.118691180000000E+03),\n new google.maps.LatLng( 0.463748600000000E+02, -0.118691690000000E+03),\n new google.maps.LatLng( 0.463781150000000E+02, -0.118690747000000E+03),\n new google.maps.LatLng( 0.463801030000000E+02, -0.118689558000000E+03),\n new google.maps.LatLng( 0.463818630000000E+02, -0.118683779000000E+03),\n new google.maps.LatLng( 0.463830050000000E+02, -0.118676150000000E+03),\n new google.maps.LatLng( 0.463852670000000E+02, -0.118670469000000E+03),\n new google.maps.LatLng( 0.463899960000000E+02, -0.118661417000000E+03),\n new google.maps.LatLng( 0.463916870000000E+02, -0.118659038000000E+03),\n new google.maps.LatLng( 0.463964170000000E+02, -0.118654973000000E+03),\n new google.maps.LatLng( 0.464039790000000E+02, -0.118645651000000E+03),\n new google.maps.LatLng( 0.464109450000000E+02, -0.118634709000000E+03),\n new google.maps.LatLng( 0.464162440000000E+02, -0.118627797000000E+03),\n new google.maps.LatLng( 0.464187580000000E+02, -0.118626737000000E+03),\n new google.maps.LatLng( 0.464215920000000E+02, -0.118626998000000E+03),\n new google.maps.LatLng( 0.464271240000000E+02, -0.118630430000000E+03),\n new google.maps.LatLng( 0.464258220000000E+02, -0.118630861000000E+03),\n new google.maps.LatLng( 0.464256850000000E+02, -0.118631654000000E+03),\n new google.maps.LatLng( 0.464288170000000E+02, -0.118634295000000E+03),\n new google.maps.LatLng( 0.464371600000000E+02, -0.118636039000000E+03),\n new google.maps.LatLng( 0.464410910000000E+02, -0.118634317000000E+03),\n new google.maps.LatLng( 0.464496580000000E+02, -0.118628291000000E+03),\n new google.maps.LatLng( 0.464569270000000E+02, -0.118621108000000E+03),\n new google.maps.LatLng( 0.464589390000000E+02, -0.118619654000000E+03),\n new google.maps.LatLng( 0.464687680000000E+02, -0.118616720000000E+03),\n new google.maps.LatLng( 0.464867310000000E+02, -0.118618460000000E+03),\n new google.maps.LatLng( 0.464915530000000E+02, -0.118618432000000E+03),\n new google.maps.LatLng( 0.464942280000000E+02, -0.118617674000000E+03),\n new google.maps.LatLng( 0.465003500000000E+02, -0.118614268000000E+03),\n new google.maps.LatLng( 0.465162060000000E+02, -0.118597829000000E+03),\n new google.maps.LatLng( 0.465232240000000E+02, -0.118591807000000E+03),\n new google.maps.LatLng( 0.465258080000000E+02, -0.118588596000000E+03),\n new google.maps.LatLng( 0.465272720000000E+02, -0.118586179000000E+03),\n new google.maps.LatLng( 0.465313420000000E+02, -0.118576180000000E+03),\n new google.maps.LatLng( 0.465332850000000E+02, -0.118565881000000E+03),\n new google.maps.LatLng( 0.465347020000000E+02, -0.118561609000000E+03),\n new google.maps.LatLng( 0.465359590000000E+02, -0.118559456000000E+03),\n new google.maps.LatLng( 0.465417870000000E+02, -0.118554951000000E+03),\n new google.maps.LatLng( 0.465500140000000E+02, -0.118550710000000E+03),\n new google.maps.LatLng( 0.465543110000000E+02, -0.118547695000000E+03),\n new google.maps.LatLng( 0.465613020000000E+02, -0.118535797000000E+03),\n new google.maps.LatLng( 0.465623520000000E+02, -0.118529468000000E+03),\n new google.maps.LatLng( 0.465655960000000E+02, -0.118525191000000E+03),\n new google.maps.LatLng( 0.465660750000000E+02, -0.118523899000000E+03),\n new google.maps.LatLng( 0.465706420000000E+02, -0.118509247000000E+03),\n new google.maps.LatLng( 0.465722380000000E+02, -0.118497219000000E+03),\n new google.maps.LatLng( 0.465737720000000E+02, -0.118491719000000E+03),\n new google.maps.LatLng( 0.465771570000000E+02, -0.118485888000000E+03),\n new google.maps.LatLng( 0.465802210000000E+02, -0.118482643000000E+03),\n new google.maps.LatLng( 0.465913770000000E+02, -0.118473900000000E+03),\n new google.maps.LatLng( 0.465918800000000E+02, -0.118474729000000E+03),\n new google.maps.LatLng( 0.465926800000000E+02, -0.118474233000000E+03),\n new google.maps.LatLng( 0.465950130000000E+02, -0.118470422000000E+03),\n new google.maps.LatLng( 0.465963170000000E+02, -0.118463161000000E+03),\n new google.maps.LatLng( 0.465955640000000E+02, -0.118457557000000E+03),\n new google.maps.LatLng( 0.465813040000000E+02, -0.118420889000000E+03),\n new google.maps.LatLng( 0.465801830000000E+02, -0.118414724000000E+03),\n new google.maps.LatLng( 0.465794950000000E+02, -0.118403123000000E+03),\n new google.maps.LatLng( 0.465775020000000E+02, -0.118391390000000E+03),\n new google.maps.LatLng( 0.465775470000000E+02, -0.118388142000000E+03),\n new google.maps.LatLng( 0.465782080000000E+02, -0.118384827000000E+03),\n new google.maps.LatLng( 0.465788700000000E+02, -0.118383202000000E+03),\n new google.maps.LatLng( 0.465830960000000E+02, -0.118377695000000E+03),\n new google.maps.LatLng( 0.465827530000000E+02, -0.118373366000000E+03),\n new google.maps.LatLng( 0.465845150000000E+02, -0.118369165000000E+03),\n new google.maps.LatLng( 0.465856550000000E+02, -0.118367818000000E+03),\n new google.maps.LatLng( 0.465874230000000E+02, -0.118371247000000E+03),\n new google.maps.LatLng( 0.465888100000000E+02, -0.118371667000000E+03),\n new google.maps.LatLng( 0.465915770000000E+02, -0.118368355000000E+03),\n new google.maps.LatLng( 0.465950550000000E+02, -0.118361229000000E+03),\n new google.maps.LatLng( 0.466027670000000E+02, -0.118330529000000E+03),\n new google.maps.LatLng( 0.466043220000000E+02, -0.118319818000000E+03),\n new google.maps.LatLng( 0.466046200000000E+02, -0.118312555000000E+03),\n new google.maps.LatLng( 0.466040710000000E+02, -0.118309869000000E+03),\n new google.maps.LatLng( 0.466024710000000E+02, -0.118305658000000E+03),\n new google.maps.LatLng( 0.465931440000000E+02, -0.118286958000000E+03),\n new google.maps.LatLng( 0.465910160000000E+02, -0.118278273000000E+03),\n new google.maps.LatLng( 0.465911500000000E+02, -0.118269851000000E+03),\n new google.maps.LatLng( 0.465918360000000E+02, -0.118269685000000E+03),\n new google.maps.LatLng( 0.465922940000000E+02, -0.118271441000000E+03),\n new google.maps.LatLng( 0.465931400000000E+02, -0.118270512000000E+03),\n new google.maps.LatLng( 0.465979350000000E+02, -0.118258207000000E+03),\n new google.maps.LatLng( 0.465993720000000E+02, -0.118253430000000E+03),\n new google.maps.LatLng( 0.465997130000000E+02, -0.118249126000000E+03),\n new google.maps.LatLng( 0.465991900000000E+02, -0.118244583000000E+03),\n new google.maps.LatLng( 0.465930700000000E+02, -0.118233767000000E+03),\n new google.maps.LatLng( 0.465927510000000E+02, -0.118231279000000E+03),\n new google.maps.LatLng( 0.465916730000000E+02, -0.118228897000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "975dc730e15c5294689dec285d4131fd", "score": "0.59667397", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.484561430000000E+02, -0.122234593000000E+03),\n new google.maps.LatLng( 0.484566440000000E+02, -0.122235760000000E+03),\n new google.maps.LatLng( 0.484619230000000E+02, -0.122234150000000E+03),\n new google.maps.LatLng( 0.484641860000000E+02, -0.122234392000000E+03),\n new google.maps.LatLng( 0.484641860000000E+02, -0.122234392000000E+03),\n new google.maps.LatLng( 0.484640960000000E+02, -0.122232125000000E+03),\n new google.maps.LatLng( 0.484620170000000E+02, -0.122232020000000E+03),\n new google.maps.LatLng( 0.484576740000000E+02, -0.122233356000000E+03),\n new google.maps.LatLng( 0.484561430000000E+02, -0.122234593000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "e1e20b1bf5b8e77eb9132239dd94d2d4", "score": "0.5966614", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.466919430000000E+02, -0.120695731000000E+03),\n new google.maps.LatLng( 0.466924810000000E+02, -0.120699607000000E+03),\n new google.maps.LatLng( 0.467002500000000E+02, -0.120699608000000E+03),\n new google.maps.LatLng( 0.467035400000000E+02, -0.120701037000000E+03),\n new google.maps.LatLng( 0.467052990000000E+02, -0.120704093000000E+03),\n new google.maps.LatLng( 0.467052990000000E+02, -0.120704093000000E+03),\n new google.maps.LatLng( 0.467056650000000E+02, -0.120703230000000E+03),\n new google.maps.LatLng( 0.467061450000000E+02, -0.120703230000000E+03),\n new google.maps.LatLng( 0.467100750000000E+02, -0.120704725000000E+03),\n new google.maps.LatLng( 0.467122220000000E+02, -0.120706686000000E+03),\n new google.maps.LatLng( 0.467132280000000E+02, -0.120706952000000E+03),\n new google.maps.LatLng( 0.467143020000000E+02, -0.120706952000000E+03),\n new google.maps.LatLng( 0.467164040000000E+02, -0.120706022000000E+03),\n new google.maps.LatLng( 0.467164050000000E+02, -0.120699943000000E+03),\n new google.maps.LatLng( 0.467092760000000E+02, -0.120699411000000E+03),\n new google.maps.LatLng( 0.467094390000000E+02, -0.120688892000000E+03),\n new google.maps.LatLng( 0.467090940000000E+02, -0.120687087000000E+03),\n new google.maps.LatLng( 0.467025420000000E+02, -0.120678551000000E+03),\n new google.maps.LatLng( 0.466949950000000E+02, -0.120678254000000E+03),\n new google.maps.LatLng( 0.466947880000000E+02, -0.120668060000000E+03),\n new google.maps.LatLng( 0.466880410000000E+02, -0.120667827000000E+03),\n new google.maps.LatLng( 0.466825350000000E+02, -0.120664509000000E+03),\n new google.maps.LatLng( 0.466667110000000E+02, -0.120644252000000E+03),\n new google.maps.LatLng( 0.466601770000000E+02, -0.120636937000000E+03),\n new google.maps.LatLng( 0.466588400000000E+02, -0.120633769000000E+03),\n new google.maps.LatLng( 0.466561510000000E+02, -0.120629340000000E+03),\n new google.maps.LatLng( 0.466561510000000E+02, -0.120629340000000E+03),\n new google.maps.LatLng( 0.466548390000000E+02, -0.120627132000000E+03),\n new google.maps.LatLng( 0.466532230000000E+02, -0.120625868000000E+03),\n new google.maps.LatLng( 0.466529670000000E+02, -0.120624156000000E+03),\n new google.maps.LatLng( 0.466519652118164E+02, -0.120623442292578E+03),\n new google.maps.LatLng( 0.466516070000000E+02, -0.120624044000000E+03),\n new google.maps.LatLng( 0.466526347274414E+02, -0.120626338900977E+03),\n new google.maps.LatLng( 0.466510790000000E+02, -0.120624364000000E+03),\n new google.maps.LatLng( 0.466515270000000E+02, -0.120622636000000E+03),\n new google.maps.LatLng( 0.466506310000000E+02, -0.120618507000000E+03),\n new google.maps.LatLng( 0.466465350000000E+02, -0.120616987000000E+03),\n new google.maps.LatLng( 0.466432070000000E+02, -0.120617243000000E+03),\n new google.maps.LatLng( 0.466414150000000E+02, -0.120616251000000E+03),\n new google.maps.LatLng( 0.466401510000000E+02, -0.120612315000000E+03),\n new google.maps.LatLng( 0.466379270000000E+02, -0.120609947000000E+03),\n new google.maps.LatLng( 0.466364230000000E+02, -0.120604491000000E+03),\n new google.maps.LatLng( 0.466340080000000E+02, -0.120599339000000E+03),\n new google.maps.LatLng( 0.466339280000000E+02, -0.120597835000000E+03),\n new google.maps.LatLng( 0.466346960000000E+02, -0.120596539000000E+03),\n new google.maps.LatLng( 0.466345200000000E+02, -0.120595579000000E+03),\n new google.maps.LatLng( 0.466316240000000E+02, -0.120592987000000E+03),\n new google.maps.LatLng( 0.466313040000000E+02, -0.120592139000000E+03),\n new google.maps.LatLng( 0.466319120000000E+02, -0.120580954000000E+03),\n new google.maps.LatLng( 0.466311600000000E+02, -0.120578058000000E+03),\n new google.maps.LatLng( 0.466288586175781E+02, -0.120572877965039E+03),\n new google.maps.LatLng( 0.466285840000000E+02, -0.120569882000000E+03),\n new google.maps.LatLng( 0.466278800000000E+02, -0.120569226000000E+03),\n new google.maps.LatLng( 0.466280085880859E+02, -0.120571929834570E+03),\n new google.maps.LatLng( 0.466275280000000E+02, -0.120570906000000E+03),\n new google.maps.LatLng( 0.466276880000000E+02, -0.120568346000000E+03),\n new google.maps.LatLng( 0.466258320000000E+02, -0.120562234000000E+03),\n new google.maps.LatLng( 0.466262160000000E+02, -0.120558314000000E+03),\n new google.maps.LatLng( 0.466258000000000E+02, -0.120555386000000E+03),\n new google.maps.LatLng( 0.466254800000000E+02, -0.120555514000000E+03),\n new google.maps.LatLng( 0.466252240000000E+02, -0.120554586000000E+03),\n new google.maps.LatLng( 0.466254000000000E+02, -0.120548505000000E+03),\n new google.maps.LatLng( 0.466238800000000E+02, -0.120544185000000E+03),\n new google.maps.LatLng( 0.466239760000000E+02, -0.120541769000000E+03),\n new google.maps.LatLng( 0.466250000000000E+02, -0.120539881000000E+03),\n new google.maps.LatLng( 0.466257140000000E+02, -0.120532844000000E+03),\n new google.maps.LatLng( 0.466257140000000E+02, -0.120532844000000E+03),\n new google.maps.LatLng( 0.466239480000000E+02, -0.120531377000000E+03),\n new google.maps.LatLng( 0.466227480000000E+02, -0.120537477000000E+03),\n new google.maps.LatLng( 0.466236520000000E+02, -0.120551565000000E+03),\n new google.maps.LatLng( 0.466229520000000E+02, -0.120561450000000E+03),\n new google.maps.LatLng( 0.466107480000000E+02, -0.120561978000000E+03),\n new google.maps.LatLng( 0.465799120000000E+02, -0.120561689000000E+03),\n new google.maps.LatLng( 0.465746480000000E+02, -0.120562177000000E+03),\n new google.maps.LatLng( 0.465746480000000E+02, -0.120562177000000E+03),\n new google.maps.LatLng( 0.465723480000000E+02, -0.120565877000000E+03),\n new google.maps.LatLng( 0.465709480000000E+02, -0.120572477000000E+03),\n new google.maps.LatLng( 0.465709480000000E+02, -0.120577777000000E+03),\n new google.maps.LatLng( 0.465710480000000E+02, -0.120604178000000E+03),\n new google.maps.LatLng( 0.465728570000000E+02, -0.120604178000000E+03),\n new google.maps.LatLng( 0.465747480000000E+02, -0.120607478000000E+03),\n new google.maps.LatLng( 0.465747470000000E+02, -0.120646479000000E+03),\n new google.maps.LatLng( 0.465642470000000E+02, -0.120646579000000E+03),\n new google.maps.LatLng( 0.465645470000000E+02, -0.120656979000000E+03),\n new google.maps.LatLng( 0.465659470000000E+02, -0.120661780000000E+03),\n new google.maps.LatLng( 0.465673470000000E+02, -0.120664780000000E+03),\n new google.maps.LatLng( 0.465676470000000E+02, -0.120667080000000E+03),\n new google.maps.LatLng( 0.465648470000000E+02, -0.120672980000000E+03),\n new google.maps.LatLng( 0.465683470000000E+02, -0.120672880000000E+03),\n new google.maps.LatLng( 0.465636470000000E+02, -0.120677380000000E+03),\n new google.maps.LatLng( 0.465638470000000E+02, -0.120692080000000E+03),\n new google.maps.LatLng( 0.465603470000000E+02, -0.120692180000000E+03),\n new google.maps.LatLng( 0.465598630000000E+02, -0.120693372000000E+03),\n new google.maps.LatLng( 0.465600390000000E+02, -0.120698332000000E+03),\n new google.maps.LatLng( 0.465616710000000E+02, -0.120698989000000E+03),\n new google.maps.LatLng( 0.465633030000000E+02, -0.120698717000000E+03),\n new google.maps.LatLng( 0.465639910000000E+02, -0.120699565000000E+03),\n new google.maps.LatLng( 0.465639750000000E+02, -0.120701181000000E+03),\n new google.maps.LatLng( 0.465603590000000E+02, -0.120718813000000E+03),\n new google.maps.LatLng( 0.465597350000000E+02, -0.120726317000000E+03),\n new google.maps.LatLng( 0.465570950000000E+02, -0.120739278000000E+03),\n new google.maps.LatLng( 0.465571100000000E+02, -0.120745086000000E+03),\n new google.maps.LatLng( 0.465579260000000E+02, -0.120746574000000E+03),\n new google.maps.LatLng( 0.465572320000000E+02, -0.120751182000000E+03),\n new google.maps.LatLng( 0.465508390000000E+02, -0.120775462000000E+03),\n new google.maps.LatLng( 0.465505690000000E+02, -0.120788280000000E+03),\n new google.maps.LatLng( 0.465497930000000E+02, -0.120790830000000E+03),\n new google.maps.LatLng( 0.465511190000000E+02, -0.120799641000000E+03),\n new google.maps.LatLng( 0.465509600000000E+02, -0.120820706000000E+03),\n new google.maps.LatLng( 0.465585650000000E+02, -0.120820579000000E+03),\n new google.maps.LatLng( 0.465580260000000E+02, -0.120809300000000E+03),\n new google.maps.LatLng( 0.465587610000000E+02, -0.120804370000000E+03),\n new google.maps.LatLng( 0.465598130000000E+02, -0.120820551000000E+03),\n new google.maps.LatLng( 0.465648530000000E+02, -0.120821138000000E+03),\n new google.maps.LatLng( 0.465670240000000E+02, -0.120818752000000E+03),\n new google.maps.LatLng( 0.465735130000000E+02, -0.120828762000000E+03),\n new google.maps.LatLng( 0.465735130000000E+02, -0.120828762000000E+03),\n new google.maps.LatLng( 0.466050280000000E+02, -0.120854122000000E+03),\n new google.maps.LatLng( 0.466071650000000E+02, -0.120857878000000E+03),\n new google.maps.LatLng( 0.466125120000000E+02, -0.120857882000000E+03),\n new google.maps.LatLng( 0.466150710000000E+02, -0.120857088000000E+03),\n new google.maps.LatLng( 0.466188430000000E+02, -0.120854206000000E+03),\n new google.maps.LatLng( 0.466191770000000E+02, -0.120854444000000E+03),\n new google.maps.LatLng( 0.466150110000000E+02, -0.120864992000000E+03),\n new google.maps.LatLng( 0.466145610000000E+02, -0.120873964000000E+03),\n new google.maps.LatLng( 0.466188900000000E+02, -0.120882973000000E+03),\n new google.maps.LatLng( 0.466207070000000E+02, -0.120879119000000E+03),\n new google.maps.LatLng( 0.466281870000000E+02, -0.120870604000000E+03),\n new google.maps.LatLng( 0.466294900000000E+02, -0.120869278000000E+03),\n new google.maps.LatLng( 0.466346790000000E+02, -0.120866497000000E+03),\n new google.maps.LatLng( 0.466374910000000E+02, -0.120862088000000E+03),\n new google.maps.LatLng( 0.466386810000000E+02, -0.120858406000000E+03),\n new google.maps.LatLng( 0.466430710000000E+02, -0.120852073000000E+03),\n new google.maps.LatLng( 0.466504540000000E+02, -0.120844845000000E+03),\n new google.maps.LatLng( 0.466541790000000E+02, -0.120843453000000E+03),\n new google.maps.LatLng( 0.466550320000000E+02, -0.120843532000000E+03),\n new google.maps.LatLng( 0.466550320000000E+02, -0.120843532000000E+03),\n new google.maps.LatLng( 0.466560070000000E+02, -0.120843520000000E+03),\n new google.maps.LatLng( 0.466594350000000E+02, -0.120841398000000E+03),\n new google.maps.LatLng( 0.466628650000000E+02, -0.120836022000000E+03),\n new google.maps.LatLng( 0.466659970000000E+02, -0.120816938000000E+03),\n new google.maps.LatLng( 0.466654940000000E+02, -0.120812125000000E+03),\n new google.maps.LatLng( 0.466645180000000E+02, -0.120809824000000E+03),\n new google.maps.LatLng( 0.466645180000000E+02, -0.120809824000000E+03),\n new google.maps.LatLng( 0.466629120000000E+02, -0.120806616000000E+03),\n new google.maps.LatLng( 0.466616500000000E+02, -0.120776514000000E+03),\n new google.maps.LatLng( 0.466606170000000E+02, -0.120763936000000E+03),\n new google.maps.LatLng( 0.466572530000000E+02, -0.120754913000000E+03),\n new google.maps.LatLng( 0.466550620000000E+02, -0.120746575000000E+03),\n new google.maps.LatLng( 0.466548220000000E+02, -0.120740606000000E+03),\n new google.maps.LatLng( 0.466561820000000E+02, -0.120736510000000E+03),\n new google.maps.LatLng( 0.466552540000000E+02, -0.120733822000000E+03),\n new google.maps.LatLng( 0.466541020000000E+02, -0.120732286000000E+03),\n new google.maps.LatLng( 0.466538940000000E+02, -0.120730942000000E+03),\n new google.maps.LatLng( 0.466536700000000E+02, -0.120726990000000E+03),\n new google.maps.LatLng( 0.466544860000000E+02, -0.120720398000000E+03),\n new google.maps.LatLng( 0.466521820000000E+02, -0.120713054000000E+03),\n new google.maps.LatLng( 0.466508550000000E+02, -0.120706430000000E+03),\n new google.maps.LatLng( 0.466490790000000E+02, -0.120692861000000E+03),\n new google.maps.LatLng( 0.466472710000000E+02, -0.120684253000000E+03),\n new google.maps.LatLng( 0.466473670000000E+02, -0.120682189000000E+03),\n new google.maps.LatLng( 0.466511590000000E+02, -0.120685469000000E+03),\n new google.maps.LatLng( 0.466529990000000E+02, -0.120692061000000E+03),\n new google.maps.LatLng( 0.466577190000000E+02, -0.120692221000000E+03),\n new google.maps.LatLng( 0.466596550000000E+02, -0.120687645000000E+03),\n new google.maps.LatLng( 0.466592870000000E+02, -0.120685437000000E+03),\n new google.maps.LatLng( 0.466581030000000E+02, -0.120682685000000E+03),\n new google.maps.LatLng( 0.466583270000000E+02, -0.120678301000000E+03),\n new google.maps.LatLng( 0.466672550000000E+02, -0.120678525000000E+03),\n new google.maps.LatLng( 0.466713670000000E+02, -0.120685469000000E+03),\n new google.maps.LatLng( 0.466759110000000E+02, -0.120689197000000E+03),\n new google.maps.LatLng( 0.466803910000000E+02, -0.120689181000000E+03),\n new google.maps.LatLng( 0.466804070000000E+02, -0.120685645000000E+03),\n new google.maps.LatLng( 0.466836230000000E+02, -0.120684637000000E+03),\n new google.maps.LatLng( 0.466863590000000E+02, -0.120686941000000E+03),\n new google.maps.LatLng( 0.466892610000000E+02, -0.120690343000000E+03),\n new google.maps.LatLng( 0.466917740000000E+02, -0.120693929000000E+03),\n new google.maps.LatLng( 0.466922930000000E+02, -0.120695323000000E+03),\n new google.maps.LatLng( 0.466919430000000E+02, -0.120695731000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "5f142ce9cb0163a45f3bc76efa48ae31", "score": "0.5965535", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.468782110000000E+02, -0.119965641000000E+03),\n new google.maps.LatLng( 0.468782500000000E+02, -0.119960944000000E+03),\n new google.maps.LatLng( 0.468791420000000E+02, -0.119955848000000E+03),\n new google.maps.LatLng( 0.468856520000000E+02, -0.119958615000000E+03),\n new google.maps.LatLng( 0.468885530000000E+02, -0.119959316000000E+03),\n new google.maps.LatLng( 0.468937840000000E+02, -0.119959652000000E+03),\n new google.maps.LatLng( 0.468965940000000E+02, -0.119957687000000E+03),\n new google.maps.LatLng( 0.468998610000000E+02, -0.119954522000000E+03),\n new google.maps.LatLng( 0.469071260000000E+02, -0.119951624000000E+03),\n new google.maps.LatLng( 0.469156920000000E+02, -0.119951160000000E+03),\n new google.maps.LatLng( 0.469173370000000E+02, -0.119952694000000E+03),\n new google.maps.LatLng( 0.469257880000000E+02, -0.119954931000000E+03),\n new google.maps.LatLng( 0.469297620000000E+02, -0.119957867000000E+03),\n new google.maps.LatLng( 0.469297620000000E+02, -0.119957867000000E+03),\n new google.maps.LatLng( 0.469245090000000E+02, -0.119952229000000E+03),\n new google.maps.LatLng( 0.469131570000000E+02, -0.119946526000000E+03),\n new google.maps.LatLng( 0.469111470000000E+02, -0.119946592000000E+03),\n new google.maps.LatLng( 0.468905870000000E+02, -0.119954686000000E+03),\n new google.maps.LatLng( 0.468878460000000E+02, -0.119955218000000E+03),\n new google.maps.LatLng( 0.468810160000000E+02, -0.119955116000000E+03),\n new google.maps.LatLng( 0.468805130000000E+02, -0.119952617000000E+03),\n new google.maps.LatLng( 0.468810620000000E+02, -0.119948619000000E+03),\n new google.maps.LatLng( 0.468809020000000E+02, -0.119944887000000E+03),\n new google.maps.LatLng( 0.468805370000000E+02, -0.119944454000000E+03),\n new google.maps.LatLng( 0.468761510000000E+02, -0.119940523000000E+03),\n new google.maps.LatLng( 0.468698680000000E+02, -0.119939663000000E+03),\n new google.maps.LatLng( 0.468645920000000E+02, -0.119937231000000E+03),\n new google.maps.LatLng( 0.468601140000000E+02, -0.119932102000000E+03),\n new google.maps.LatLng( 0.468665790000000E+02, -0.119928604000000E+03),\n new google.maps.LatLng( 0.468686580000000E+02, -0.119924207000000E+03),\n new google.maps.LatLng( 0.468690460000000E+02, -0.119921743000000E+03),\n new google.maps.LatLng( 0.468684900000000E+02, -0.119860958000000E+03),\n new google.maps.LatLng( 0.468685590000000E+02, -0.119858093000000E+03),\n new google.maps.LatLng( 0.468692460000000E+02, -0.119856295000000E+03),\n new google.maps.LatLng( 0.468702970000000E+02, -0.119855196000000E+03),\n new google.maps.LatLng( 0.468748550000000E+02, -0.119854814000000E+03),\n new google.maps.LatLng( 0.468986890000000E+02, -0.119854347000000E+03),\n new google.maps.LatLng( 0.468987810000000E+02, -0.119769358000000E+03),\n new google.maps.LatLng( 0.468752120000000E+02, -0.119770044000000E+03),\n new google.maps.LatLng( 0.468652730000000E+02, -0.119762796000000E+03),\n new google.maps.LatLng( 0.468644500000000E+02, -0.119762796000000E+03),\n new google.maps.LatLng( 0.468630800000000E+02, -0.119763697000000E+03),\n new google.maps.LatLng( 0.468542430000000E+02, -0.119777124000000E+03),\n new google.maps.LatLng( 0.468529880000000E+02, -0.119782121000000E+03),\n new google.maps.LatLng( 0.468504300000000E+02, -0.119784553000000E+03),\n new google.maps.LatLng( 0.468484430000000E+02, -0.119784920000000E+03),\n new google.maps.LatLng( 0.468466380000000E+02, -0.119784654000000E+03),\n new google.maps.LatLng( 0.468437370000000E+02, -0.119785355000000E+03),\n new google.maps.LatLng( 0.468424350000000E+02, -0.119786188000000E+03),\n new google.maps.LatLng( 0.468358340000000E+02, -0.119799140000000E+03),\n new google.maps.LatLng( 0.468347610000000E+02, -0.119802302000000E+03),\n new google.maps.LatLng( 0.468330970000000E+02, -0.119875436000000E+03),\n new google.maps.LatLng( 0.468323200000000E+02, -0.119875602000000E+03),\n new google.maps.LatLng( 0.468335490000000E+02, -0.119821610000000E+03),\n new google.maps.LatLng( 0.468329780000000E+02, -0.119818947000000E+03),\n new google.maps.LatLng( 0.468313890000000E+02, -0.119816138000000E+03),\n new google.maps.LatLng( 0.468313890000000E+02, -0.119816138000000E+03),\n new google.maps.LatLng( 0.468306930000000E+02, -0.119818980000000E+03),\n new google.maps.LatLng( 0.468296410000000E+02, -0.119832727000000E+03),\n new google.maps.LatLng( 0.468317870000000E+02, -0.119835524000000E+03),\n new google.maps.LatLng( 0.468315580000000E+02, -0.119840683000000E+03),\n new google.maps.LatLng( 0.468302080000000E+02, -0.119848404000000E+03),\n new google.maps.LatLng( 0.468299990000000E+02, -0.119855461000000E+03),\n new google.maps.LatLng( 0.468282150000000E+02, -0.119860652000000E+03),\n new google.maps.LatLng( 0.468277290000000E+02, -0.119874231000000E+03),\n new google.maps.LatLng( 0.468280070000000E+02, -0.119883209000000E+03),\n new google.maps.LatLng( 0.468274840000000E+02, -0.119888535000000E+03),\n new google.maps.LatLng( 0.468267080000000E+02, -0.119890432000000E+03),\n new google.maps.LatLng( 0.468267080000000E+02, -0.119890432000000E+03),\n new google.maps.LatLng( 0.468258220000000E+02, -0.119903247000000E+03),\n new google.maps.LatLng( 0.468225810000000E+02, -0.119915729000000E+03),\n new google.maps.LatLng( 0.468218730000000E+02, -0.119921719000000E+03),\n new google.maps.LatLng( 0.468207540000000E+02, -0.119923018000000E+03),\n new google.maps.LatLng( 0.468194060000000E+02, -0.119922918000000E+03),\n new google.maps.LatLng( 0.468182640000000E+02, -0.119919723000000E+03),\n new google.maps.LatLng( 0.468174410000000E+02, -0.119919524000000E+03),\n new google.maps.LatLng( 0.468160710000000E+02, -0.119921621000000E+03),\n new google.maps.LatLng( 0.468166200000000E+02, -0.119923817000000E+03),\n new google.maps.LatLng( 0.468174190000000E+02, -0.119924949000000E+03),\n new google.maps.LatLng( 0.468283850000000E+02, -0.119933534000000E+03),\n new google.maps.LatLng( 0.468305090000000E+02, -0.119936463000000E+03),\n new google.maps.LatLng( 0.468323140000000E+02, -0.119937960000000E+03),\n new google.maps.LatLng( 0.468359690000000E+02, -0.119940092000000E+03),\n new google.maps.LatLng( 0.468375450000000E+02, -0.119939693000000E+03),\n new google.maps.LatLng( 0.468412450000000E+02, -0.119941624000000E+03),\n new google.maps.LatLng( 0.468419760000000E+02, -0.119943555000000E+03),\n new google.maps.LatLng( 0.468398520000000E+02, -0.119945452000000E+03),\n new google.maps.LatLng( 0.468415420000000E+02, -0.119947316000000E+03),\n new google.maps.LatLng( 0.468624640000000E+02, -0.119960244000000E+03),\n new google.maps.LatLng( 0.468681740000000E+02, -0.119962512000000E+03),\n new google.maps.LatLng( 0.468725370000000E+02, -0.119963547000000E+03),\n new google.maps.LatLng( 0.468770620000000E+02, -0.119963975000000E+03),\n new google.maps.LatLng( 0.468772040000000E+02, -0.119965669000000E+03),\n new google.maps.LatLng( 0.468772040000000E+02, -0.119965669000000E+03),\n new google.maps.LatLng( 0.468782110000000E+02, -0.119965641000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "85b13009514005f3f158d7689075923f", "score": "0.5965096", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.489999120000000E+02, -0.117884398000000E+03),\n new google.maps.LatLng( 0.490005460000000E+02, -0.117876100000000E+03),\n new google.maps.LatLng( 0.490008114655320E+02, -0.117635860844144E+03),\n new google.maps.LatLng( 0.490008114655320E+02, -0.117635860844144E+03),\n new google.maps.LatLng( 0.489999160000000E+02, -0.117635911000000E+03),\n new google.maps.LatLng( 0.489984950000000E+02, -0.117636989000000E+03),\n new google.maps.LatLng( 0.489978550000000E+02, -0.117637788000000E+03),\n new google.maps.LatLng( 0.489974220000000E+02, -0.117639733000000E+03),\n new google.maps.LatLng( 0.489963490000000E+02, -0.117640637000000E+03),\n new google.maps.LatLng( 0.489881920000000E+02, -0.117642519000000E+03),\n new google.maps.LatLng( 0.489769520000000E+02, -0.117643988000000E+03),\n new google.maps.LatLng( 0.489739140000000E+02, -0.117646350000000E+03),\n new google.maps.LatLng( 0.489712200000000E+02, -0.117657250000000E+03),\n new google.maps.LatLng( 0.489648030000000E+02, -0.117673599000000E+03),\n new google.maps.LatLng( 0.489623350000000E+02, -0.117678457000000E+03),\n new google.maps.LatLng( 0.489581310000000E+02, -0.117684982000000E+03),\n new google.maps.LatLng( 0.489544520000000E+02, -0.117694176000000E+03),\n new google.maps.LatLng( 0.489532180000000E+02, -0.117698443000000E+03),\n new google.maps.LatLng( 0.489526460000000E+02, -0.117703370000000E+03),\n new google.maps.LatLng( 0.489499930000000E+02, -0.117712145000000E+03),\n new google.maps.LatLng( 0.489466790000000E+02, -0.117718388000000E+03),\n new google.maps.LatLng( 0.489431370000000E+02, -0.117718732000000E+03),\n new google.maps.LatLng( 0.489399830000000E+02, -0.117722755000000E+03),\n new google.maps.LatLng( 0.489391130000000E+02, -0.117727505000000E+03),\n new google.maps.LatLng( 0.489392950000000E+02, -0.117731182000000E+03),\n new google.maps.LatLng( 0.489398200000000E+02, -0.117732188000000E+03),\n new google.maps.LatLng( 0.489401400000000E+02, -0.117732084000000E+03),\n new google.maps.LatLng( 0.489404150000000E+02, -0.117727645000000E+03),\n new google.maps.LatLng( 0.489409180000000E+02, -0.117727507000000E+03),\n new google.maps.LatLng( 0.489422400000000E+02, -0.117736318000000E+03),\n new google.maps.LatLng( 0.489388960000000E+02, -0.117750651000000E+03),\n new google.maps.LatLng( 0.489394560000000E+02, -0.117751093000000E+03),\n new google.maps.LatLng( 0.489400870000000E+02, -0.117755499000000E+03),\n new google.maps.LatLng( 0.489384690000000E+02, -0.117765074000000E+03),\n new google.maps.LatLng( 0.489375330000000E+02, -0.117765977000000E+03),\n new google.maps.LatLng( 0.489329390000000E+02, -0.117762895000000E+03),\n new google.maps.LatLng( 0.489320250000000E+02, -0.117763173000000E+03),\n new google.maps.LatLng( 0.489304270000000E+02, -0.117765186000000E+03),\n new google.maps.LatLng( 0.489249690000000E+02, -0.117773408000000E+03),\n new google.maps.LatLng( 0.489235090000000E+02, -0.117781627000000E+03),\n new google.maps.LatLng( 0.489191180000000E+02, -0.117791210000000E+03),\n new google.maps.LatLng( 0.489191180000000E+02, -0.117791210000000E+03),\n new google.maps.LatLng( 0.489185750000000E+02, -0.117796339000000E+03),\n new google.maps.LatLng( 0.489175240000000E+02, -0.117799069000000E+03),\n new google.maps.LatLng( 0.489066280000000E+02, -0.117814843000000E+03),\n new google.maps.LatLng( 0.489029260000000E+02, -0.117816714000000E+03),\n new google.maps.LatLng( 0.489007330000000E+02, -0.117818516000000E+03),\n new google.maps.LatLng( 0.488992020000000E+02, -0.117822640000000E+03),\n new google.maps.LatLng( 0.488962540000000E+02, -0.117826451000000E+03),\n new google.maps.LatLng( 0.488938310000000E+02, -0.117831025000000E+03),\n new google.maps.LatLng( 0.488898990000000E+02, -0.117841730000000E+03),\n new google.maps.LatLng( 0.488861750000000E+02, -0.117842005000000E+03),\n new google.maps.LatLng( 0.488855120000000E+02, -0.117842490000000E+03),\n new google.maps.LatLng( 0.488797300000000E+02, -0.117849553000000E+03),\n new google.maps.LatLng( 0.488761150000000E+02, -0.117862713000000E+03),\n new google.maps.LatLng( 0.488762700000000E+02, -0.117870023000000E+03),\n new google.maps.LatLng( 0.488798100000000E+02, -0.117877179000000E+03),\n new google.maps.LatLng( 0.488851150000000E+02, -0.117886042000000E+03),\n new google.maps.LatLng( 0.488862360000000E+02, -0.117889921000000E+03),\n new google.maps.LatLng( 0.488911500000000E+02, -0.117889154000000E+03),\n new google.maps.LatLng( 0.488981640000000E+02, -0.117888801000000E+03),\n new google.maps.LatLng( 0.489006320000000E+02, -0.117890844000000E+03),\n new google.maps.LatLng( 0.489042650000000E+02, -0.117891222000000E+03),\n new google.maps.LatLng( 0.489042650000000E+02, -0.117891222000000E+03),\n new google.maps.LatLng( 0.489067330000000E+02, -0.117891912000000E+03),\n new google.maps.LatLng( 0.489084240000000E+02, -0.117891391000000E+03),\n new google.maps.LatLng( 0.489085150000000E+02, -0.117890906000000E+03),\n new google.maps.LatLng( 0.489076460000000E+02, -0.117889901000000E+03),\n new google.maps.LatLng( 0.489035550000000E+02, -0.117887306000000E+03),\n new google.maps.LatLng( 0.489036710000000E+02, -0.117882972000000E+03),\n new google.maps.LatLng( 0.489004000000000E+02, -0.117882422000000E+03),\n new google.maps.LatLng( 0.488980460000000E+02, -0.117881177000000E+03),\n new google.maps.LatLng( 0.488981370000000E+02, -0.117880241000000E+03),\n new google.maps.LatLng( 0.489042230000000E+02, -0.117876098000000E+03),\n new google.maps.LatLng( 0.489103370000000E+02, -0.117879083000000E+03),\n new google.maps.LatLng( 0.489141300000000E+02, -0.117871626000000E+03),\n new google.maps.LatLng( 0.489184720000000E+02, -0.117869343000000E+03),\n new google.maps.LatLng( 0.489257880000000E+02, -0.117859990000000E+03),\n new google.maps.LatLng( 0.489307730000000E+02, -0.117851290000000E+03),\n new google.maps.LatLng( 0.489388860000000E+02, -0.117842833000000E+03),\n new google.maps.LatLng( 0.489387950000000E+02, -0.117841411000000E+03),\n new google.maps.LatLng( 0.489360770000000E+02, -0.117839364000000E+03),\n new google.maps.LatLng( 0.489312560000000E+02, -0.117837940000000E+03),\n new google.maps.LatLng( 0.489289940000000E+02, -0.117837938000000E+03),\n new google.maps.LatLng( 0.489274860000000E+02, -0.117839117000000E+03),\n new google.maps.LatLng( 0.489265040000000E+02, -0.117838665000000E+03),\n new google.maps.LatLng( 0.489259790000000E+02, -0.117837451000000E+03),\n new google.maps.LatLng( 0.489261850000000E+02, -0.117834574000000E+03),\n new google.maps.LatLng( 0.489275110000000E+02, -0.117831038000000E+03),\n new google.maps.LatLng( 0.489285620000000E+02, -0.117830309000000E+03),\n new google.maps.LatLng( 0.489294980000000E+02, -0.117830309000000E+03),\n new google.maps.LatLng( 0.489342500000000E+02, -0.117832913000000E+03),\n new google.maps.LatLng( 0.489396200000000E+02, -0.117833747000000E+03),\n new google.maps.LatLng( 0.489446460000000E+02, -0.117833923000000E+03),\n new google.maps.LatLng( 0.489478900000000E+02, -0.117834757000000E+03),\n new google.maps.LatLng( 0.489506540000000E+02, -0.117837498000000E+03),\n new google.maps.LatLng( 0.489518430000000E+02, -0.117837083000000E+03),\n new google.maps.LatLng( 0.489525060000000E+02, -0.117833406000000E+03),\n new google.maps.LatLng( 0.489517530000000E+02, -0.117828826000000E+03),\n new google.maps.LatLng( 0.489455620000000E+02, -0.117823828000000E+03),\n new google.maps.LatLng( 0.489450820000000E+02, -0.117822649000000E+03),\n new google.maps.LatLng( 0.489454250000000E+02, -0.117821435000000E+03),\n new google.maps.LatLng( 0.489494920000000E+02, -0.117815226000000E+03),\n new google.maps.LatLng( 0.489533300000000E+02, -0.117812972000000E+03),\n new google.maps.LatLng( 0.489525080000000E+02, -0.117810717000000E+03),\n new google.maps.LatLng( 0.489492860000000E+02, -0.117808670000000E+03),\n new google.maps.LatLng( 0.489442370000000E+02, -0.117808913000000E+03),\n new google.maps.LatLng( 0.489403980000000E+02, -0.117807145000000E+03),\n new google.maps.LatLng( 0.489358050000000E+02, -0.117802775000000E+03),\n new google.maps.LatLng( 0.489309830000000E+02, -0.117794835000000E+03),\n new google.maps.LatLng( 0.489289040000000E+02, -0.117790501000000E+03),\n new google.maps.LatLng( 0.489260700000000E+02, -0.117788491000000E+03),\n new google.maps.LatLng( 0.489216600000000E+02, -0.117789707000000E+03),\n new google.maps.LatLng( 0.489276670000000E+02, -0.117777706000000E+03),\n new google.maps.LatLng( 0.489304530000000E+02, -0.117773404000000E+03),\n new google.maps.LatLng( 0.489340850000000E+02, -0.117772950000000E+03),\n new google.maps.LatLng( 0.489336060000000E+02, -0.117774338000000E+03),\n new google.maps.LatLng( 0.489340410000000E+02, -0.117778118000000E+03),\n new google.maps.LatLng( 0.489358010000000E+02, -0.117779434000000E+03),\n new google.maps.LatLng( 0.489400050000000E+02, -0.117780056000000E+03),\n new google.maps.LatLng( 0.489409020000000E+02, -0.117781281000000E+03),\n new google.maps.LatLng( 0.489425440000000E+02, -0.117788934000000E+03),\n new google.maps.LatLng( 0.489418590000000E+02, -0.117791362000000E+03),\n new google.maps.LatLng( 0.489421790000000E+02, -0.117792403000000E+03),\n new google.maps.LatLng( 0.489476630000000E+02, -0.117794967000000E+03),\n new google.maps.LatLng( 0.489501070000000E+02, -0.117794897000000E+03),\n new google.maps.LatLng( 0.489531920000000E+02, -0.117795659000000E+03),\n new google.maps.LatLng( 0.489555460000000E+02, -0.117800412000000E+03),\n new google.maps.LatLng( 0.489551580000000E+02, -0.117801348000000E+03),\n new google.maps.LatLng( 0.489554780000000E+02, -0.117802840000000E+03),\n new google.maps.LatLng( 0.489573060000000E+02, -0.117805407000000E+03),\n new google.maps.LatLng( 0.489611440000000E+02, -0.117810404000000E+03),\n new google.maps.LatLng( 0.489627670000000E+02, -0.117811618000000E+03),\n new google.maps.LatLng( 0.489633150000000E+02, -0.117811827000000E+03),\n new google.maps.LatLng( 0.489649140000000E+02, -0.117810751000000E+03),\n new google.maps.LatLng( 0.489655080000000E+02, -0.117810890000000E+03),\n new google.maps.LatLng( 0.489736640000000E+02, -0.117825918000000E+03),\n new google.maps.LatLng( 0.489764970000000E+02, -0.117826891000000E+03),\n new google.maps.LatLng( 0.489809980000000E+02, -0.117832272000000E+03),\n new google.maps.LatLng( 0.489811350000000E+02, -0.117833140000000E+03),\n new google.maps.LatLng( 0.489804260000000E+02, -0.117834112000000E+03),\n new google.maps.LatLng( 0.489790780000000E+02, -0.117834875000000E+03),\n new google.maps.LatLng( 0.489786200000000E+02, -0.117837339000000E+03),\n new google.maps.LatLng( 0.489797390000000E+02, -0.117841470000000E+03),\n new google.maps.LatLng( 0.489864740000000E+02, -0.117856888000000E+03),\n new google.maps.LatLng( 0.489904190000000E+02, -0.117874355000000E+03),\n new google.maps.LatLng( 0.489921660000000E+02, -0.117876485000000E+03),\n new google.maps.LatLng( 0.489934000000000E+02, -0.117876099000000E+03),\n new google.maps.LatLng( 0.489977790000000E+02, -0.117880823000000E+03),\n new google.maps.LatLng( 0.489999120000000E+02, -0.117884398000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "c65b41222914623d39454d24a82bc494", "score": "0.5964604", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.475729200000000E+02, -0.122319236000000E+03),\n new google.maps.LatLng( 0.475735200000000E+02, -0.122317836000000E+03),\n new google.maps.LatLng( 0.475734040000000E+02, -0.122315843000000E+03),\n new google.maps.LatLng( 0.475714200000000E+02, -0.122314136000000E+03),\n new google.maps.LatLng( 0.475717200000000E+02, -0.122303236000000E+03),\n new google.maps.LatLng( 0.475729200000000E+02, -0.122301636000000E+03),\n new google.maps.LatLng( 0.475729200000000E+02, -0.122299036000000E+03),\n new google.maps.LatLng( 0.475691210000000E+02, -0.122294435000000E+03),\n new google.maps.LatLng( 0.475661210000000E+02, -0.122292735000000E+03),\n new google.maps.LatLng( 0.475660210000000E+02, -0.122291835000000E+03),\n new google.maps.LatLng( 0.475660210000000E+02, -0.122291835000000E+03),\n new google.maps.LatLng( 0.475644210000000E+02, -0.122291335000000E+03),\n new google.maps.LatLng( 0.475419570000000E+02, -0.122291869000000E+03),\n new google.maps.LatLng( 0.475398210000000E+02, -0.122290435000000E+03),\n new google.maps.LatLng( 0.475337210000000E+02, -0.122289535000000E+03),\n new google.maps.LatLng( 0.475331210000000E+02, -0.122290935000000E+03),\n new google.maps.LatLng( 0.475331210000000E+02, -0.122295235000000E+03),\n new google.maps.LatLng( 0.475325470000000E+02, -0.122295398000000E+03),\n new google.maps.LatLng( 0.475244210000000E+02, -0.122292235000000E+03),\n new google.maps.LatLng( 0.475244210000000E+02, -0.122292235000000E+03),\n new google.maps.LatLng( 0.475244210000000E+02, -0.122293935000000E+03),\n new google.maps.LatLng( 0.475187210000000E+02, -0.122291735000000E+03),\n new google.maps.LatLng( 0.475131210000000E+02, -0.122288134000000E+03),\n new google.maps.LatLng( 0.475081210000000E+02, -0.122299935000000E+03),\n new google.maps.LatLng( 0.475082210000000E+02, -0.122301435000000E+03),\n new google.maps.LatLng( 0.475136860000000E+02, -0.122307958000000E+03),\n new google.maps.LatLng( 0.475138210000000E+02, -0.122323336000000E+03),\n new google.maps.LatLng( 0.475169210000000E+02, -0.122323336000000E+03),\n new google.maps.LatLng( 0.475172210000000E+02, -0.122329536000000E+03),\n new google.maps.LatLng( 0.475260470000000E+02, -0.122334656000000E+03),\n new google.maps.LatLng( 0.475260470000000E+02, -0.122334656000000E+03),\n new google.maps.LatLng( 0.475272580000000E+02, -0.122335719000000E+03),\n new google.maps.LatLng( 0.475405590000000E+02, -0.122334345000000E+03),\n new google.maps.LatLng( 0.475405590000000E+02, -0.122334345000000E+03),\n new google.maps.LatLng( 0.475440200000000E+02, -0.122335536000000E+03),\n new google.maps.LatLng( 0.475440200000000E+02, -0.122335536000000E+03),\n new google.maps.LatLng( 0.475458160000000E+02, -0.122334675000000E+03),\n new google.maps.LatLng( 0.475487200000000E+02, -0.122334136000000E+03),\n new google.maps.LatLng( 0.475534200000000E+02, -0.122336736000000E+03),\n new google.maps.LatLng( 0.475557200000000E+02, -0.122335336000000E+03),\n new google.maps.LatLng( 0.475557200000000E+02, -0.122329336000000E+03),\n new google.maps.LatLng( 0.475613200000000E+02, -0.122329536000000E+03),\n new google.maps.LatLng( 0.475681200000000E+02, -0.122329036000000E+03),\n new google.maps.LatLng( 0.475714650000000E+02, -0.122325856000000E+03),\n new google.maps.LatLng( 0.475718200000000E+02, -0.122322436000000E+03),\n new google.maps.LatLng( 0.475729200000000E+02, -0.122319236000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "6eab9fd896a8d609424a9855409f73c8", "score": "0.59645593", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.464663550000000E+02, -0.122046934000000E+03),\n new google.maps.LatLng( 0.464562730000000E+02, -0.122038305000000E+03),\n new google.maps.LatLng( 0.464560220000000E+02, -0.122037412000000E+03),\n new google.maps.LatLng( 0.464576430000000E+02, -0.122029771000000E+03),\n new google.maps.LatLng( 0.464569100000000E+02, -0.122027225000000E+03),\n new google.maps.LatLng( 0.464551260000000E+02, -0.122023951000000E+03),\n new google.maps.LatLng( 0.464545540000000E+02, -0.122020909000000E+03),\n new google.maps.LatLng( 0.464544380000000E+02, -0.122017404000000E+03),\n new google.maps.LatLng( 0.464557160000000E+02, -0.122013434000000E+03),\n new google.maps.LatLng( 0.464524930000000E+02, -0.122011717000000E+03),\n new google.maps.LatLng( 0.464490840000000E+02, -0.122006132000000E+03),\n new google.maps.LatLng( 0.464481010000000E+02, -0.122006497000000E+03),\n new google.maps.LatLng( 0.464463200000000E+02, -0.122009144000000E+03),\n new google.maps.LatLng( 0.464454740000000E+02, -0.122008914000000E+03),\n new google.maps.LatLng( 0.464386610000000E+02, -0.121998578000000E+03),\n new google.maps.LatLng( 0.464363760000000E+02, -0.121997749000000E+03),\n new google.maps.LatLng( 0.464333140000000E+02, -0.121994407000000E+03),\n new google.maps.LatLng( 0.464324700000000E+02, -0.121991563000000E+03),\n new google.maps.LatLng( 0.464324250000000E+02, -0.121989712000000E+03),\n new google.maps.LatLng( 0.464342090000000E+02, -0.121986242000000E+03),\n new google.maps.LatLng( 0.464313140000000E+02, -0.121982381000000E+03),\n new google.maps.LatLng( 0.464303030000000E+02, -0.121980057000000E+03),\n new google.maps.LatLng( 0.464303030000000E+02, -0.121980057000000E+03),\n new google.maps.LatLng( 0.464257570000000E+02, -0.121973245000000E+03),\n new google.maps.LatLng( 0.464258260000000E+02, -0.121971690000000E+03),\n new google.maps.LatLng( 0.464289820000000E+02, -0.121962668000000E+03),\n new google.maps.LatLng( 0.464369850000000E+02, -0.121951728000000E+03),\n new google.maps.LatLng( 0.464372590000000E+02, -0.121950373000000E+03),\n new google.maps.LatLng( 0.464370540000000E+02, -0.121948554000000E+03),\n new google.maps.LatLng( 0.464350200000000E+02, -0.121943066000000E+03),\n new google.maps.LatLng( 0.464351570000000E+02, -0.121934041000000E+03),\n new google.maps.LatLng( 0.464345400000000E+02, -0.121932124000000E+03),\n new google.maps.LatLng( 0.464332140000000E+02, -0.121930240000000E+03),\n new google.maps.LatLng( 0.464331220000000E+02, -0.121928917000000E+03),\n new google.maps.LatLng( 0.464371900000000E+02, -0.121923593000000E+03),\n new google.maps.LatLng( 0.464398870000000E+02, -0.121922699000000E+03),\n new google.maps.LatLng( 0.464408930000000E+02, -0.121921839000000E+03),\n new google.maps.LatLng( 0.464419890000000E+02, -0.121918532000000E+03),\n new google.maps.LatLng( 0.464401370000000E+02, -0.121913276000000E+03),\n new google.maps.LatLng( 0.464378500000000E+02, -0.121909971000000E+03),\n new google.maps.LatLng( 0.464364090000000E+02, -0.121909353000000E+03),\n new google.maps.LatLng( 0.464403850000000E+02, -0.121900812000000E+03),\n new google.maps.LatLng( 0.464394240000000E+02, -0.121900316000000E+03),\n new google.maps.LatLng( 0.464384870000000E+02, -0.121900846000000E+03),\n new google.maps.LatLng( 0.464368890000000E+02, -0.121904385000000E+03),\n new google.maps.LatLng( 0.464358600000000E+02, -0.121905410000000E+03),\n new google.maps.LatLng( 0.464338950000000E+02, -0.121905643000000E+03),\n new google.maps.LatLng( 0.464334140000000E+02, -0.121905048000000E+03),\n new google.maps.LatLng( 0.464344420000000E+02, -0.121903097000000E+03),\n new google.maps.LatLng( 0.464345330000000E+02, -0.121900089000000E+03),\n new google.maps.LatLng( 0.464329310000000E+02, -0.121896288000000E+03),\n new google.maps.LatLng( 0.464347100000000E+02, -0.121886467000000E+03),\n new google.maps.LatLng( 0.464342740000000E+02, -0.121882732000000E+03),\n new google.maps.LatLng( 0.464335420000000E+02, -0.121882005000000E+03),\n new google.maps.LatLng( 0.464324220000000E+02, -0.121882271000000E+03),\n new google.maps.LatLng( 0.464300690000000E+02, -0.121883761000000E+03),\n new google.maps.LatLng( 0.464260910000000E+02, -0.121882112000000E+03),\n new google.maps.LatLng( 0.464239870000000E+02, -0.121874517000000E+03),\n new google.maps.LatLng( 0.464214740000000E+02, -0.121871473000000E+03),\n new google.maps.LatLng( 0.464181600000000E+02, -0.121870743000000E+03),\n new google.maps.LatLng( 0.464165820000000E+02, -0.121872493000000E+03),\n new google.maps.LatLng( 0.464161020000000E+02, -0.121872492000000E+03),\n new google.maps.LatLng( 0.464128820000000E+02, -0.121867168000000E+03),\n new google.maps.LatLng( 0.464112810000000E+02, -0.121870042000000E+03),\n new google.maps.LatLng( 0.464089260000000E+02, -0.121870733000000E+03),\n new google.maps.LatLng( 0.463965840000000E+02, -0.121870324000000E+03),\n new google.maps.LatLng( 0.463951910000000E+02, -0.121869332000000E+03),\n new google.maps.LatLng( 0.463943460000000E+02, -0.121867415000000E+03),\n new google.maps.LatLng( 0.463939800000000E+02, -0.121867414000000E+03),\n new google.maps.LatLng( 0.463916930000000E+02, -0.121869989000000E+03),\n new google.maps.LatLng( 0.463914860000000E+02, -0.121873457000000E+03),\n new google.maps.LatLng( 0.463922840000000E+02, -0.121875671000000E+03),\n new google.maps.LatLng( 0.463918260000000E+02, -0.121876534000000E+03),\n new google.maps.LatLng( 0.463891980000000E+02, -0.121877923000000E+03),\n new google.maps.LatLng( 0.463875810000000E+02, -0.121878057000000E+03),\n new google.maps.LatLng( 0.463875810000000E+02, -0.121878057000000E+03),\n new google.maps.LatLng( 0.463883900000000E+02, -0.122068997000000E+03),\n new google.maps.LatLng( 0.463883900000000E+02, -0.122068997000000E+03),\n new google.maps.LatLng( 0.463927770000000E+02, -0.122070775000000E+03),\n new google.maps.LatLng( 0.463941030000000E+02, -0.122070808000000E+03),\n new google.maps.LatLng( 0.464057610000000E+02, -0.122066316000000E+03),\n new google.maps.LatLng( 0.464117490000000E+02, -0.122062152000000E+03),\n new google.maps.LatLng( 0.464180120000000E+02, -0.122056567000000E+03),\n new google.maps.LatLng( 0.464234980000000E+02, -0.122052831000000E+03),\n new google.maps.LatLng( 0.464283210000000E+02, -0.122051442000000E+03),\n new google.maps.LatLng( 0.464316580000000E+02, -0.122051077000000E+03),\n new google.maps.LatLng( 0.464356570000000E+02, -0.122047142000000E+03),\n new google.maps.LatLng( 0.464358400000000E+02, -0.122046216000000E+03),\n new google.maps.LatLng( 0.464375310000000E+02, -0.122044298000000E+03),\n new google.maps.LatLng( 0.464397240000000E+02, -0.122042942000000E+03),\n new google.maps.LatLng( 0.464439310000000E+02, -0.122043271000000E+03),\n new google.maps.LatLng( 0.464461260000000E+02, -0.122045254000000E+03),\n new google.maps.LatLng( 0.464489600000000E+02, -0.122044592000000E+03),\n new google.maps.LatLng( 0.464495540000000E+02, -0.122044062000000E+03),\n new google.maps.LatLng( 0.464502160000000E+02, -0.122039631000000E+03),\n new google.maps.LatLng( 0.464510160000000E+02, -0.122037646000000E+03),\n new google.maps.LatLng( 0.464515190000000E+02, -0.122036918000000E+03),\n new google.maps.LatLng( 0.464523870000000E+02, -0.122036686000000E+03),\n new google.maps.LatLng( 0.464550850000000E+02, -0.122037413000000E+03),\n new google.maps.LatLng( 0.464607780000000E+02, -0.122044422000000E+03),\n new google.maps.LatLng( 0.464618520000000E+02, -0.122046538000000E+03),\n new google.maps.LatLng( 0.464659450000000E+02, -0.122058545000000E+03),\n new google.maps.LatLng( 0.464680090000000E+02, -0.122070802000000E+03),\n new google.maps.LatLng( 0.464707600000000E+02, -0.122073488000000E+03),\n new google.maps.LatLng( 0.464707600000000E+02, -0.122073488000000E+03),\n new google.maps.LatLng( 0.464712250000000E+02, -0.122069329000000E+03),\n new google.maps.LatLng( 0.464731910000000E+02, -0.122066054000000E+03),\n new google.maps.LatLng( 0.464735800000000E+02, -0.122063507000000E+03),\n new google.maps.LatLng( 0.464728480000000E+02, -0.122061654000000E+03),\n new google.maps.LatLng( 0.464719800000000E+02, -0.122060860000000E+03),\n new google.maps.LatLng( 0.464703110000000E+02, -0.122061026000000E+03),\n new google.maps.LatLng( 0.464687800000000E+02, -0.122063242000000E+03),\n new google.maps.LatLng( 0.464680940000000E+02, -0.122063110000000E+03),\n new google.maps.LatLng( 0.464673850000000E+02, -0.122062085000000E+03),\n new google.maps.LatLng( 0.464668820000000E+02, -0.122058777000000E+03),\n new google.maps.LatLng( 0.464670420000000E+02, -0.122057090000000E+03),\n new google.maps.LatLng( 0.464680020000000E+02, -0.122055072000000E+03),\n new google.maps.LatLng( 0.464683220000000E+02, -0.122051961000000E+03),\n new google.maps.LatLng( 0.464680700000000E+02, -0.122049778000000E+03),\n new google.maps.LatLng( 0.464663550000000E+02, -0.122046934000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "001f47cae84866f50e517fd64961ffb0", "score": "0.59629357", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.476916940000000E+02, -0.117235942000000E+03),\n new google.maps.LatLng( 0.476862950000000E+02, -0.117224541000000E+03),\n new google.maps.LatLng( 0.476829950000000E+02, -0.117221741000000E+03),\n new google.maps.LatLng( 0.476811950000000E+02, -0.117221240000000E+03),\n new google.maps.LatLng( 0.476789950000000E+02, -0.117214340000000E+03),\n new google.maps.LatLng( 0.476784950000000E+02, -0.117209540000000E+03),\n new google.maps.LatLng( 0.476773950000000E+02, -0.117205839000000E+03),\n new google.maps.LatLng( 0.476723960000000E+02, -0.117196839000000E+03),\n new google.maps.LatLng( 0.476723960000000E+02, -0.117196839000000E+03),\n new google.maps.LatLng( 0.476688960000000E+02, -0.117196839000000E+03),\n new google.maps.LatLng( 0.476688960000000E+02, -0.117196839000000E+03),\n new google.maps.LatLng( 0.476667960000000E+02, -0.117196739000000E+03),\n new google.maps.LatLng( 0.476680950000000E+02, -0.117202439000000E+03),\n new google.maps.LatLng( 0.476497950000000E+02, -0.117202238000000E+03),\n new google.maps.LatLng( 0.476497950000000E+02, -0.117207538000000E+03),\n new google.maps.LatLng( 0.476503283333333E+02, -0.117208471333333E+03),\n new google.maps.LatLng( 0.476505950000000E+02, -0.117212338000000E+03),\n new google.maps.LatLng( 0.476496950000000E+02, -0.117218339000000E+03),\n new google.maps.LatLng( 0.476276950000000E+02, -0.117218338000000E+03),\n new google.maps.LatLng( 0.476276950000000E+02, -0.117223738000000E+03),\n new google.maps.LatLng( 0.476276950000000E+02, -0.117223738000000E+03),\n new google.maps.LatLng( 0.476276950000000E+02, -0.117239939000000E+03),\n new google.maps.LatLng( 0.476551940000000E+02, -0.117240340000000E+03),\n new google.maps.LatLng( 0.476891940000000E+02, -0.117239842000000E+03),\n new google.maps.LatLng( 0.476916940000000E+02, -0.117235942000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "8c92247ca99db8e1276f8b315f5b4335", "score": "0.5961684", "text": "function getWeatherFromZip(zipcode, giveValue) {\n // Get the coords\n request(zipRequestUrl(zipcode), (error, req, res) => {\n const jsonResponse = JSON.parse(res)\n if (error) {\n // Error with the request itself\n giveValue({ code: 500 })\n } else if (jsonResponse.cod === 200) {\n // Use the coords to use the single call api\n getOneCallWeatherFromCoords(jsonResponse.coord.lat, jsonResponse.coord.lon, jsonResponse.name, giveValue)\n } else if (jsonResponse.cod === 404) {\n // Couldn't find the location\n giveValue({ code: 404 })\n } else {\n // Internal server error accoring (no api key/too many calls)\n console.log(res)\n giveValue({ code: 500 })\n }\n })\n}", "title": "" }, { "docid": "817f90a0b7dace0fd4daddedc4ba5db5", "score": "0.59613675", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.473208014993381E+02, -0.122417607825320E+03),\n new google.maps.LatLng( 0.473078460000000E+02, -0.122399554000000E+03),\n new google.maps.LatLng( 0.472643220000000E+02, -0.122335432000000E+03),\n new google.maps.LatLng( 0.472643220000000E+02, -0.122335432000000E+03),\n new google.maps.LatLng( 0.472615220000000E+02, -0.122334632000000E+03),\n new google.maps.LatLng( 0.472579220000000E+02, -0.122334532000000E+03),\n new google.maps.LatLng( 0.472579220000000E+02, -0.122333632000000E+03),\n new google.maps.LatLng( 0.472579220000000E+02, -0.122333632000000E+03),\n new google.maps.LatLng( 0.472556220000000E+02, -0.122335832000000E+03),\n new google.maps.LatLng( 0.472479220000000E+02, -0.122336132000000E+03),\n new google.maps.LatLng( 0.472479220000000E+02, -0.122336132000000E+03),\n new google.maps.LatLng( 0.472478220000000E+02, -0.122338832000000E+03),\n new google.maps.LatLng( 0.472455220000000E+02, -0.122338732000000E+03),\n new google.maps.LatLng( 0.472461220000000E+02, -0.122343032000000E+03),\n new google.maps.LatLng( 0.472484940000000E+02, -0.122346621000000E+03),\n new google.maps.LatLng( 0.472578220000000E+02, -0.122352833000000E+03),\n new google.maps.LatLng( 0.472588350000000E+02, -0.122358247000000E+03),\n new google.maps.LatLng( 0.472588350000000E+02, -0.122358247000000E+03),\n new google.maps.LatLng( 0.472615580000000E+02, -0.122362792000000E+03),\n new google.maps.LatLng( 0.472613220000000E+02, -0.122363033000000E+03),\n new google.maps.LatLng( 0.472688210000000E+02, -0.122374133000000E+03),\n new google.maps.LatLng( 0.472730210000000E+02, -0.122381534000000E+03),\n new google.maps.LatLng( 0.472750210000000E+02, -0.122386834000000E+03),\n new google.maps.LatLng( 0.472769210000000E+02, -0.122395134000000E+03),\n new google.maps.LatLng( 0.472850210000000E+02, -0.122411034000000E+03),\n new google.maps.LatLng( 0.472850210000000E+02, -0.122413818809306E+03),\n new google.maps.LatLng( 0.472850210000000E+02, -0.122413818809306E+03),\n new google.maps.LatLng( 0.472885556754653E+02, -0.122409199424127E+03),\n new google.maps.LatLng( 0.472885560000000E+02, -0.122409199000000E+03),\n new google.maps.LatLng( 0.472939210000000E+02, -0.122413735000000E+03),\n new google.maps.LatLng( 0.472975210000000E+02, -0.122424235000000E+03),\n new google.maps.LatLng( 0.472960210000000E+02, -0.122432335000000E+03),\n new google.maps.LatLng( 0.473004210000000E+02, -0.122444635000000E+03),\n new google.maps.LatLng( 0.473063330000000E+02, -0.122443008000000E+03),\n new google.maps.LatLng( 0.473129018807699E+02, -0.122433005199309E+03),\n new google.maps.LatLng( 0.473191210000000E+02, -0.122423535000000E+03),\n new google.maps.LatLng( 0.473208014993381E+02, -0.122417607825320E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "bcac581c33e8d57ccd74b4b5c7a271df", "score": "0.5961173", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.478639220000000E+02, -0.121548196000000E+03),\n new google.maps.LatLng( 0.478635540000000E+02, -0.121586038000000E+03),\n new google.maps.LatLng( 0.477775260000000E+02, -0.121584519000000E+03),\n new google.maps.LatLng( 0.477775260000000E+02, -0.121584519000000E+03),\n new google.maps.LatLng( 0.477767260000000E+02, -0.121584537000000E+03),\n new google.maps.LatLng( 0.477767260000000E+02, -0.121584537000000E+03),\n new google.maps.LatLng( 0.477767880000000E+02, -0.121610457000000E+03),\n new google.maps.LatLng( 0.477768710000000E+02, -0.121645526000000E+03),\n new google.maps.LatLng( 0.477769220000000E+02, -0.121666777000000E+03),\n new google.maps.LatLng( 0.477769220000000E+02, -0.121666777000000E+03),\n new google.maps.LatLng( 0.477815590000000E+02, -0.121666043000000E+03),\n new google.maps.LatLng( 0.477872260000000E+02, -0.121663091000000E+03),\n new google.maps.LatLng( 0.477898080000000E+02, -0.121661225000000E+03),\n new google.maps.LatLng( 0.477945590000000E+02, -0.121655118000000E+03),\n new google.maps.LatLng( 0.477967070000000E+02, -0.121654778000000E+03),\n new google.maps.LatLng( 0.478041800000000E+02, -0.121658096000000E+03),\n new google.maps.LatLng( 0.478095500000000E+02, -0.121658332000000E+03),\n new google.maps.LatLng( 0.478181180000000E+02, -0.121655511000000E+03),\n new google.maps.LatLng( 0.478199000000000E+02, -0.121653949000000E+03),\n new google.maps.LatLng( 0.478208590000000E+02, -0.121652489000000E+03),\n new google.maps.LatLng( 0.478214530000000E+02, -0.121650317000000E+03),\n new google.maps.LatLng( 0.478236680000000E+02, -0.121647974000000E+03),\n new google.maps.LatLng( 0.478303620000000E+02, -0.121644440000000E+03),\n new google.maps.LatLng( 0.478313460000000E+02, -0.121645898000000E+03),\n new google.maps.LatLng( 0.478311630000000E+02, -0.121647188000000E+03),\n new google.maps.LatLng( 0.478348640000000E+02, -0.121660683000000E+03),\n new google.maps.LatLng( 0.478348640000000E+02, -0.121660683000000E+03),\n new google.maps.LatLng( 0.478362630000000E+02, -0.121659911000000E+03),\n new google.maps.LatLng( 0.478385020000000E+02, -0.121657602000000E+03),\n new google.maps.LatLng( 0.478396430000000E+02, -0.121653867000000E+03),\n new google.maps.LatLng( 0.478392310000000E+02, -0.121652272000000E+03),\n new google.maps.LatLng( 0.478357120000000E+02, -0.121650204000000E+03),\n new google.maps.LatLng( 0.478350480000000E+02, -0.121648271000000E+03),\n new google.maps.LatLng( 0.478353440000000E+02, -0.121644537000000E+03),\n new google.maps.LatLng( 0.478364400000000E+02, -0.121642466000000E+03),\n new google.maps.LatLng( 0.478385410000000E+02, -0.121640631000000E+03),\n new google.maps.LatLng( 0.478392490000000E+02, -0.121639409000000E+03),\n new google.maps.LatLng( 0.478399100000000E+02, -0.121636286000000E+03),\n new google.maps.LatLng( 0.478395890000000E+02, -0.121633027000000E+03),\n new google.maps.LatLng( 0.478372790000000E+02, -0.121626720000000E+03),\n new google.maps.LatLng( 0.478371260000000E+02, -0.121612592000000E+03),\n new google.maps.LatLng( 0.478357790000000E+02, -0.121611437000000E+03),\n new google.maps.LatLng( 0.478345670000000E+02, -0.121611470000000E+03),\n new google.maps.LatLng( 0.478332190000000E+02, -0.121612182000000E+03),\n new google.maps.LatLng( 0.478284410000000E+02, -0.121618183000000E+03),\n new google.maps.LatLng( 0.478264750000000E+02, -0.121618487000000E+03),\n new google.maps.LatLng( 0.478205370000000E+02, -0.121611729000000E+03),\n new google.maps.LatLng( 0.478176610000000E+02, -0.121604228000000E+03),\n new google.maps.LatLng( 0.478201280000000E+02, -0.121607081000000E+03),\n new google.maps.LatLng( 0.478209260000000E+02, -0.121611356000000E+03),\n new google.maps.LatLng( 0.478259500000000E+02, -0.121617265000000E+03),\n new google.maps.LatLng( 0.478268870000000E+02, -0.121617809000000E+03),\n new google.maps.LatLng( 0.478283270000000E+02, -0.121617369000000E+03),\n new google.maps.LatLng( 0.478326250000000E+02, -0.121611808000000E+03),\n new google.maps.LatLng( 0.478352760000000E+02, -0.121610690000000E+03),\n new google.maps.LatLng( 0.478370350000000E+02, -0.121611133000000E+03),\n new google.maps.LatLng( 0.478376980000000E+02, -0.121611846000000E+03),\n new google.maps.LatLng( 0.478381770000000E+02, -0.121613136000000E+03),\n new google.maps.LatLng( 0.478376220000000E+02, -0.121626223000000E+03),\n new google.maps.LatLng( 0.478399320000000E+02, -0.121631296000000E+03),\n new google.maps.LatLng( 0.478405730000000E+02, -0.121635267000000E+03),\n new google.maps.LatLng( 0.478401860000000E+02, -0.121638661000000E+03),\n new google.maps.LatLng( 0.478393190000000E+02, -0.121641174000000E+03),\n new google.maps.LatLng( 0.478361660000000E+02, -0.121644231000000E+03),\n new google.maps.LatLng( 0.478356420000000E+02, -0.121647490000000E+03),\n new google.maps.LatLng( 0.478369910000000E+02, -0.121650136000000E+03),\n new google.maps.LatLng( 0.478386830000000E+02, -0.121651017000000E+03),\n new google.maps.LatLng( 0.478403280000000E+02, -0.121652713000000E+03),\n new google.maps.LatLng( 0.478405810000000E+02, -0.121655292000000E+03),\n new google.maps.LatLng( 0.478397130000000E+02, -0.121657398000000E+03),\n new google.maps.LatLng( 0.478383650000000E+02, -0.121659028000000E+03),\n new google.maps.LatLng( 0.478347330000000E+02, -0.121662220000000E+03),\n new google.maps.LatLng( 0.478347330000000E+02, -0.121663170000000E+03),\n new google.maps.LatLng( 0.478400360000000E+02, -0.121671856000000E+03),\n new google.maps.LatLng( 0.478409280000000E+02, -0.121675488000000E+03),\n new google.maps.LatLng( 0.478409510000000E+02, -0.121678815000000E+03),\n new google.maps.LatLng( 0.478395120000000E+02, -0.121687673000000E+03),\n new google.maps.LatLng( 0.478399460000000E+02, -0.121690592000000E+03),\n new google.maps.LatLng( 0.478421400000000E+02, -0.121693070000000E+03),\n new google.maps.LatLng( 0.478438310000000E+02, -0.121694055000000E+03),\n new google.maps.LatLng( 0.478462760000000E+02, -0.121694224000000E+03),\n new google.maps.LatLng( 0.478481500000000E+02, -0.121692867000000E+03),\n new google.maps.LatLng( 0.478481500000000E+02, -0.121692867000000E+03),\n new google.maps.LatLng( 0.478470980000000E+02, -0.121691577000000E+03),\n new google.maps.LatLng( 0.478493720000000E+02, -0.121688844000000E+03),\n new google.maps.LatLng( 0.478564030000000E+02, -0.121703590000000E+03),\n new google.maps.LatLng( 0.478603100000000E+02, -0.121708687000000E+03),\n new google.maps.LatLng( 0.478648720000000E+02, -0.121717590000000E+03),\n new google.maps.LatLng( 0.478657000000000E+02, -0.121721814000000E+03),\n new google.maps.LatLng( 0.478659740000000E+02, -0.121728563000000E+03),\n new google.maps.LatLng( 0.478671550000000E+02, -0.121727303000000E+03),\n new google.maps.LatLng( 0.478678870000000E+02, -0.121722855000000E+03),\n new google.maps.LatLng( 0.478677510000000E+02, -0.121720410000000E+03),\n new google.maps.LatLng( 0.478694430000000E+02, -0.121715079000000E+03),\n new google.maps.LatLng( 0.478721850000000E+02, -0.121713586000000E+03),\n new google.maps.LatLng( 0.478736700000000E+02, -0.121714979000000E+03),\n new google.maps.LatLng( 0.478740130000000E+02, -0.121716949000000E+03),\n new google.maps.LatLng( 0.478759370000000E+02, -0.121719399000000E+03),\n new google.maps.LatLng( 0.478763260000000E+02, -0.121719365000000E+03),\n new google.maps.LatLng( 0.478818110000000E+02, -0.121716073000000E+03),\n new google.maps.LatLng( 0.478820860000000E+02, -0.121711114000000E+03),\n new google.maps.LatLng( 0.478829090000000E+02, -0.121709994000000E+03),\n new google.maps.LatLng( 0.478857430000000E+02, -0.121709519000000E+03),\n new google.maps.LatLng( 0.478870500000000E+02, -0.121710414000000E+03),\n new google.maps.LatLng( 0.478875470000000E+02, -0.121714480000000E+03),\n new google.maps.LatLng( 0.478936460000000E+02, -0.121723453000000E+03),\n new google.maps.LatLng( 0.478962060000000E+02, -0.121720091000000E+03),\n new google.maps.LatLng( 0.478962060000000E+02, -0.121720091000000E+03),\n new google.maps.LatLng( 0.478978520000000E+02, -0.121717340000000E+03),\n new google.maps.LatLng( 0.478983100000000E+02, -0.121713704000000E+03),\n new google.maps.LatLng( 0.479035210000000E+02, -0.121710411000000E+03),\n new google.maps.LatLng( 0.479042530000000E+02, -0.121709188000000E+03),\n new google.maps.LatLng( 0.479042070000000E+02, -0.121707217000000E+03),\n new google.maps.LatLng( 0.479057610000000E+02, -0.121706028000000E+03),\n new google.maps.LatLng( 0.479126850000000E+02, -0.121707321000000E+03),\n new google.maps.LatLng( 0.479181920000000E+02, -0.121705998000000E+03),\n new google.maps.LatLng( 0.479241790000000E+02, -0.121706883000000E+03),\n new google.maps.LatLng( 0.479255500000000E+02, -0.121709944000000E+03),\n new google.maps.LatLng( 0.479246120000000E+02, -0.121710759000000E+03),\n new google.maps.LatLng( 0.479236520000000E+02, -0.121713138000000E+03),\n new google.maps.LatLng( 0.479244270000000E+02, -0.121716709000000E+03),\n new google.maps.LatLng( 0.479251590000000E+02, -0.121717390000000E+03),\n new google.maps.LatLng( 0.479269180000000E+02, -0.121716677000000E+03),\n new google.maps.LatLng( 0.479274220000000E+02, -0.121714161000000E+03),\n new google.maps.LatLng( 0.479304620000000E+02, -0.121711986000000E+03),\n new google.maps.LatLng( 0.479331130000000E+02, -0.121712430000000E+03),\n new google.maps.LatLng( 0.479378430000000E+02, -0.121712364000000E+03),\n new google.maps.LatLng( 0.479443560000000E+02, -0.121704272000000E+03),\n new google.maps.LatLng( 0.479453620000000E+02, -0.121702402000000E+03),\n new google.maps.LatLng( 0.479461160000000E+02, -0.121699034000000E+03),\n new google.maps.LatLng( 0.479468250000000E+02, -0.121687335000000E+03),\n new google.maps.LatLng( 0.479502300000000E+02, -0.121686994000000E+03),\n new google.maps.LatLng( 0.479502140000000E+02, -0.121545035000000E+03),\n new google.maps.LatLng( 0.479426550000000E+02, -0.121540690000000E+03),\n new google.maps.LatLng( 0.479375210000000E+02, -0.121539059000000E+03),\n new google.maps.LatLng( 0.479334730000000E+02, -0.121526797000000E+03),\n new google.maps.LatLng( 0.479283820000000E+02, -0.121521721000000E+03),\n new google.maps.LatLng( 0.479267210000000E+02, -0.121521718000000E+03),\n new google.maps.LatLng( 0.479235000000000E+02, -0.121522386000000E+03),\n new google.maps.LatLng( 0.479210080000000E+02, -0.121524627000000E+03),\n new google.maps.LatLng( 0.479191780000000E+02, -0.121527031000000E+03),\n new google.maps.LatLng( 0.479157140000000E+02, -0.121536046000000E+03),\n new google.maps.LatLng( 0.479070230000000E+02, -0.121534884000000E+03),\n new google.maps.LatLng( 0.479036810000000E+02, -0.121532851000000E+03),\n new google.maps.LatLng( 0.478918800000000E+02, -0.121528741000000E+03),\n new google.maps.LatLng( 0.478877990000000E+02, -0.121530655000000E+03),\n new google.maps.LatLng( 0.478861190000000E+02, -0.121532035000000E+03),\n new google.maps.LatLng( 0.478838970000000E+02, -0.121538433000000E+03),\n new google.maps.LatLng( 0.478763670000000E+02, -0.121551704000000E+03),\n new google.maps.LatLng( 0.478735860000000E+02, -0.121551446000000E+03),\n new google.maps.LatLng( 0.478663300000000E+02, -0.121547199000000E+03),\n new google.maps.LatLng( 0.478639220000000E+02, -0.121548196000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "d834b7019e782b4c6ce35839b99fa25f", "score": "0.59607935", "text": "function getFormattedZipcode(inputZipcode) {\n return inputZipcode.split('');\n}", "title": "" }, { "docid": "a83972bf2a46d6541059eb6652ff0091", "score": "0.5960727", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.471707260000000E+02, -0.117171554000000E+03),\n new google.maps.LatLng( 0.471711360000000E+02, -0.117165052000000E+03),\n new google.maps.LatLng( 0.471771870000000E+02, -0.117142322000000E+03),\n new google.maps.LatLng( 0.471780040000000E+02, -0.117128677000000E+03),\n new google.maps.LatLng( 0.471819110000000E+02, -0.117126011000000E+03),\n new google.maps.LatLng( 0.471819270000000E+02, -0.117085768000000E+03),\n new google.maps.LatLng( 0.472039370000000E+02, -0.117086013000000E+03),\n new google.maps.LatLng( 0.472038930000000E+02, -0.117068808000000E+03),\n new google.maps.LatLng( 0.471969910000000E+02, -0.117070752000000E+03),\n new google.maps.LatLng( 0.471956880000000E+02, -0.117070752000000E+03),\n new google.maps.LatLng( 0.471847170000000E+02, -0.117068972000000E+03),\n new google.maps.LatLng( 0.471815400000000E+02, -0.117066659000000E+03),\n new google.maps.LatLng( 0.471819060000000E+02, -0.117062134000000E+03),\n new google.maps.LatLng( 0.471818580000000E+02, -0.117039871000000E+03),\n new google.maps.LatLng( 0.471818580000000E+02, -0.117039871000000E+03),\n new google.maps.LatLng( 0.471547340000000E+02, -0.117039836000000E+03),\n new google.maps.LatLng( 0.470195117732659E+02, -0.117039762414930E+03),\n new google.maps.LatLng( 0.470195117732659E+02, -0.117039762414930E+03),\n new google.maps.LatLng( 0.470198490000000E+02, -0.117040074000000E+03),\n new google.maps.LatLng( 0.470200560000000E+02, -0.117060428000000E+03),\n new google.maps.LatLng( 0.470166280000000E+02, -0.117060529000000E+03),\n new google.maps.LatLng( 0.470094740000000E+02, -0.117065575000000E+03),\n new google.maps.LatLng( 0.470073020000000E+02, -0.117069384000000E+03),\n new google.maps.LatLng( 0.470072790000000E+02, -0.117077604000000E+03),\n new google.maps.LatLng( 0.470082820000000E+02, -0.117090469000000E+03),\n new google.maps.LatLng( 0.470119760000000E+02, -0.117115635000000E+03),\n new google.maps.LatLng( 0.470114260000000E+02, -0.117118876000000E+03),\n new google.maps.LatLng( 0.470074690000000E+02, -0.117124486000000E+03),\n new google.maps.LatLng( 0.470058240000000E+02, -0.117127962000000E+03),\n new google.maps.LatLng( 0.470053680000000E+02, -0.117130068000000E+03),\n new google.maps.LatLng( 0.470056430000000E+02, -0.117131754000000E+03),\n new google.maps.LatLng( 0.470073120000000E+02, -0.117133374000000E+03),\n new google.maps.LatLng( 0.470090630000000E+02, -0.117133330000000E+03),\n new google.maps.LatLng( 0.470153320000000E+02, -0.117127016000000E+03),\n new google.maps.LatLng( 0.470151040000000E+02, -0.117123325000000E+03),\n new google.maps.LatLng( 0.470159960000000E+02, -0.117121956000000E+03),\n new google.maps.LatLng( 0.470214370000000E+02, -0.117119756000000E+03),\n new google.maps.LatLng( 0.470274950000000E+02, -0.117118057000000E+03),\n new google.maps.LatLng( 0.470338040000000E+02, -0.117116492000000E+03),\n new google.maps.LatLng( 0.470522270000000E+02, -0.117116946000000E+03),\n new google.maps.LatLng( 0.470535080000000E+02, -0.117116546000000E+03),\n new google.maps.LatLng( 0.470638620000000E+02, -0.117116256000000E+03),\n new google.maps.LatLng( 0.470641160000000E+02, -0.117140609000000E+03),\n new google.maps.LatLng( 0.470662420000000E+02, -0.117143217000000E+03),\n new google.maps.LatLng( 0.470675690000000E+02, -0.117146193000000E+03),\n new google.maps.LatLng( 0.470616040000000E+02, -0.117152118000000E+03),\n new google.maps.LatLng( 0.470601190000000E+02, -0.117153056000000E+03),\n new google.maps.LatLng( 0.470561880000000E+02, -0.117153995000000E+03),\n new google.maps.LatLng( 0.470545430000000E+02, -0.117155735000000E+03),\n new google.maps.LatLng( 0.470526700000000E+02, -0.117159515000000E+03),\n new google.maps.LatLng( 0.470503160000000E+02, -0.117161089000000E+03),\n new google.maps.LatLng( 0.470488960000000E+02, -0.117160895000000E+03),\n new google.maps.LatLng( 0.470422470000000E+02, -0.117155370000000E+03),\n new google.maps.LatLng( 0.470379140000000E+02, -0.117154075000000E+03),\n new google.maps.LatLng( 0.470341130000000E+02, -0.117182292000000E+03),\n new google.maps.LatLng( 0.470578840000000E+02, -0.117181888000000E+03),\n new google.maps.LatLng( 0.470594160000000E+02, -0.117181185000000E+03),\n new google.maps.LatLng( 0.470618390000000E+02, -0.117181352000000E+03),\n new google.maps.LatLng( 0.470682160000000E+02, -0.117189247000000E+03),\n new google.maps.LatLng( 0.470678260000000E+02, -0.117202260000000E+03),\n new google.maps.LatLng( 0.470685570000000E+02, -0.117207011000000E+03),\n new google.maps.LatLng( 0.470700650000000E+02, -0.117209253000000E+03),\n new google.maps.LatLng( 0.470728760000000E+02, -0.117210090000000E+03),\n new google.maps.LatLng( 0.470787270000000E+02, -0.117213773000000E+03),\n new google.maps.LatLng( 0.470787270000000E+02, -0.117213773000000E+03),\n new google.maps.LatLng( 0.470787510000000E+02, -0.117209390000000E+03),\n new google.maps.LatLng( 0.470777680000000E+02, -0.117208252000000E+03),\n new google.maps.LatLng( 0.470771280000000E+02, -0.117206411000000E+03),\n new google.maps.LatLng( 0.470770150000000E+02, -0.117203735000000E+03),\n new google.maps.LatLng( 0.470790030000000E+02, -0.117200457000000E+03),\n new google.maps.LatLng( 0.470794990000000E+02, -0.117154479000000E+03),\n new google.maps.LatLng( 0.470742210000000E+02, -0.117148898000000E+03),\n new google.maps.LatLng( 0.470746510000000E+02, -0.117137590000000E+03),\n new google.maps.LatLng( 0.470791720000000E+02, -0.117127012000000E+03),\n new google.maps.LatLng( 0.470822580000000E+02, -0.117128079000000E+03),\n new google.maps.LatLng( 0.470827160000000E+02, -0.117129249000000E+03),\n new google.maps.LatLng( 0.470854140000000E+02, -0.117132125000000E+03),\n new google.maps.LatLng( 0.470892090000000E+02, -0.117133125000000E+03),\n new google.maps.LatLng( 0.470940540000000E+02, -0.117132384000000E+03),\n new google.maps.LatLng( 0.471029890000000E+02, -0.117128324000000E+03),\n new google.maps.LatLng( 0.471042010000000E+02, -0.117127754000000E+03),\n new google.maps.LatLng( 0.471076300000000E+02, -0.117123599000000E+03),\n new google.maps.LatLng( 0.471087460000000E+02, -0.117124052000000E+03),\n new google.maps.LatLng( 0.471086890000000E+02, -0.117149376000000E+03),\n new google.maps.LatLng( 0.471157990000000E+02, -0.117149572000000E+03),\n new google.maps.LatLng( 0.471232520000000E+02, -0.117155360000000E+03),\n new google.maps.LatLng( 0.471233920000000E+02, -0.117195478000000E+03),\n new google.maps.LatLng( 0.471262470000000E+02, -0.117200200000000E+03),\n new google.maps.LatLng( 0.471286700000000E+02, -0.117196986000000E+03),\n new google.maps.LatLng( 0.471317330000000E+02, -0.117194106000000E+03),\n new google.maps.LatLng( 0.471343390000000E+02, -0.117192498000000E+03),\n new google.maps.LatLng( 0.471433220000000E+02, -0.117189015000000E+03),\n new google.maps.LatLng( 0.471506590000000E+02, -0.117187374000000E+03),\n new google.maps.LatLng( 0.471544990000000E+02, -0.117185564000000E+03),\n new google.maps.LatLng( 0.471600990000000E+02, -0.117181476000000E+03),\n new google.maps.LatLng( 0.471600750000000E+02, -0.117171423000000E+03),\n new google.maps.LatLng( 0.471707260000000E+02, -0.117171554000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "b9b570a128c475eaab00f6baf21b9cf0", "score": "0.5960637", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.472058520000000E+02, -0.122727316000000E+03),\n new google.maps.LatLng( 0.472078180000000E+02, -0.122726942000000E+03),\n new google.maps.LatLng( 0.472104180000000E+02, -0.122720242000000E+03),\n new google.maps.LatLng( 0.472174180000000E+02, -0.122715142000000E+03),\n new google.maps.LatLng( 0.472238180000000E+02, -0.122705942000000E+03),\n new google.maps.LatLng( 0.472312180000000E+02, -0.122703641000000E+03),\n new google.maps.LatLng( 0.472294180000000E+02, -0.122691341000000E+03),\n new google.maps.LatLng( 0.472317180000000E+02, -0.122684741000000E+03),\n new google.maps.LatLng( 0.472307180000000E+02, -0.122679241000000E+03),\n new google.maps.LatLng( 0.472229190000000E+02, -0.122675241000000E+03),\n new google.maps.LatLng( 0.472229190000000E+02, -0.122667040000000E+03),\n new google.maps.LatLng( 0.472153190000000E+02, -0.122668940000000E+03),\n new google.maps.LatLng( 0.472129190000000E+02, -0.122665740000000E+03),\n new google.maps.LatLng( 0.472120190000000E+02, -0.122662440000000E+03),\n new google.maps.LatLng( 0.472167190000000E+02, -0.122657740000000E+03),\n new google.maps.LatLng( 0.472153190000000E+02, -0.122649040000000E+03),\n new google.maps.LatLng( 0.472067190000000E+02, -0.122643940000000E+03),\n new google.maps.LatLng( 0.472047190000000E+02, -0.122642339000000E+03),\n new google.maps.LatLng( 0.472062190000000E+02, -0.122641939000000E+03),\n new google.maps.LatLng( 0.471995190000000E+02, -0.122643540000000E+03),\n new google.maps.LatLng( 0.471951190000000E+02, -0.122658740000000E+03),\n new google.maps.LatLng( 0.471943190000000E+02, -0.122659740000000E+03),\n new google.maps.LatLng( 0.471917180000000E+02, -0.122681041000000E+03),\n new google.maps.LatLng( 0.471932180000000E+02, -0.122690041000000E+03),\n new google.maps.LatLng( 0.471978180000000E+02, -0.122697941000000E+03),\n new google.maps.LatLng( 0.472004180000000E+02, -0.122719142000000E+03),\n new google.maps.LatLng( 0.472058520000000E+02, -0.122727316000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "90df714b7cb331943564bad1e63db90d", "score": "0.596063", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.470746260000000E+02, -0.119320924000000E+03),\n new google.maps.LatLng( 0.470759060000000E+02, -0.119321527000000E+03),\n new google.maps.LatLng( 0.470791270000000E+02, -0.119319855000000E+03),\n new google.maps.LatLng( 0.470810700000000E+02, -0.119316277000000E+03),\n new google.maps.LatLng( 0.470823040000000E+02, -0.119312195000000E+03),\n new google.maps.LatLng( 0.470776880000000E+02, -0.119314536000000E+03),\n new google.maps.LatLng( 0.470760430000000E+02, -0.119316945000000E+03),\n new google.maps.LatLng( 0.470746260000000E+02, -0.119320924000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "74d7af4604a8194ef51b24f6f14e5b49", "score": "0.5957184", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.478789350000000E+02, -0.117702547000000E+03),\n new google.maps.LatLng( 0.478804110000000E+02, -0.117700044000000E+03),\n new google.maps.LatLng( 0.478820570000000E+02, -0.117698346000000E+03),\n new google.maps.LatLng( 0.478844560000000E+02, -0.117698380000000E+03),\n new google.maps.LatLng( 0.478910850000000E+02, -0.117686796000000E+03),\n new google.maps.LatLng( 0.478925240000000E+02, -0.117678709000000E+03),\n new google.maps.LatLng( 0.478916880000000E+02, -0.117675787000000E+03),\n new google.maps.LatLng( 0.478916100000000E+02, -0.117673273000000E+03),\n new google.maps.LatLng( 0.478922500000000E+02, -0.117674666000000E+03),\n new google.maps.LatLng( 0.478933010000000E+02, -0.117675175000000E+03),\n new google.maps.LatLng( 0.478949920000000E+02, -0.117675752000000E+03),\n new google.maps.LatLng( 0.478992660000000E+02, -0.117675887000000E+03),\n new google.maps.LatLng( 0.479003850000000E+02, -0.117676974000000E+03),\n new google.maps.LatLng( 0.479042020000000E+02, -0.117675852000000E+03),\n new google.maps.LatLng( 0.479059380000000E+02, -0.117673031000000E+03),\n new google.maps.LatLng( 0.479062120000000E+02, -0.117671195000000E+03),\n new google.maps.LatLng( 0.479073770000000E+02, -0.117669020000000E+03),\n new google.maps.LatLng( 0.479090450000000E+02, -0.117668237000000E+03),\n new google.maps.LatLng( 0.479093190000000E+02, -0.117663649000000E+03),\n new google.maps.LatLng( 0.479088390000000E+02, -0.117663105000000E+03),\n new google.maps.LatLng( 0.479093410000000E+02, -0.117661949000000E+03),\n new google.maps.LatLng( 0.479178870000000E+02, -0.117659055000000E+03),\n new google.maps.LatLng( 0.479171780000000E+02, -0.117654773000000E+03),\n new google.maps.LatLng( 0.479189600000000E+02, -0.117653004000000E+03),\n new google.maps.LatLng( 0.479196450000000E+02, -0.117650420000000E+03),\n new google.maps.LatLng( 0.479193920000000E+02, -0.117647666000000E+03),\n new google.maps.LatLng( 0.479199630000000E+02, -0.117646000000000E+03),\n new google.maps.LatLng( 0.479225900000000E+02, -0.117642904000000E+03),\n new google.maps.LatLng( 0.479226570000000E+02, -0.117639878000000E+03),\n new google.maps.LatLng( 0.479249850000000E+02, -0.117631579000000E+03),\n new google.maps.LatLng( 0.479224930000000E+02, -0.117627808000000E+03),\n new google.maps.LatLng( 0.479165270000000E+02, -0.117628257000000E+03),\n new google.maps.LatLng( 0.479141960000000E+02, -0.117627274000000E+03),\n new google.maps.LatLng( 0.479123680000000E+02, -0.117628602000000E+03),\n new google.maps.LatLng( 0.479111350000000E+02, -0.117630541000000E+03),\n new google.maps.LatLng( 0.479091700000000E+02, -0.117631494000000E+03),\n new google.maps.LatLng( 0.479065430000000E+02, -0.117633740000000E+03),\n new google.maps.LatLng( 0.479043730000000E+02, -0.117634864000000E+03),\n new google.maps.LatLng( 0.479018360000000E+02, -0.117635411000000E+03),\n new google.maps.LatLng( 0.478994160000000E+02, -0.117638845000000E+03),\n new google.maps.LatLng( 0.478992420000000E+02, -0.117640783000000E+03),\n new google.maps.LatLng( 0.478814880000000E+02, -0.117640626000000E+03),\n new google.maps.LatLng( 0.478814700000000E+02, -0.117630457000000E+03),\n new google.maps.LatLng( 0.478598220000000E+02, -0.117630469000000E+03),\n new google.maps.LatLng( 0.478598040000000E+02, -0.117598176000000E+03),\n new google.maps.LatLng( 0.478454170000000E+02, -0.117598151000000E+03),\n new google.maps.LatLng( 0.478455640000000E+02, -0.117535314000000E+03),\n new google.maps.LatLng( 0.478455640000000E+02, -0.117535314000000E+03),\n new google.maps.LatLng( 0.478341830000000E+02, -0.117535421000000E+03),\n new google.maps.LatLng( 0.478307980000000E+02, -0.117535303000000E+03),\n new google.maps.LatLng( 0.477979820000000E+02, -0.117535631000000E+03),\n new google.maps.LatLng( 0.477916910000000E+02, -0.117528825000000E+03),\n new google.maps.LatLng( 0.477893580000000E+02, -0.117527586000000E+03),\n new google.maps.LatLng( 0.477864990000000E+02, -0.117527627000000E+03),\n new google.maps.LatLng( 0.477829890000000E+02, -0.117530156000000E+03),\n new google.maps.LatLng( 0.477813610000000E+02, -0.117533287000000E+03),\n new google.maps.LatLng( 0.477793350000000E+02, -0.117542830000000E+03),\n new google.maps.LatLng( 0.477780570000000E+02, -0.117543368000000E+03),\n new google.maps.LatLng( 0.477724760000000E+02, -0.117542624000000E+03),\n new google.maps.LatLng( 0.477682840000000E+02, -0.117547003000000E+03),\n new google.maps.LatLng( 0.477667570000000E+02, -0.117547416000000E+03),\n new google.maps.LatLng( 0.477653680000000E+02, -0.117546094000000E+03),\n new google.maps.LatLng( 0.477615090000000E+02, -0.117536385000000E+03),\n new google.maps.LatLng( 0.477583260000000E+02, -0.117530541000000E+03),\n new google.maps.LatLng( 0.477591760000000E+02, -0.117523329000000E+03),\n new google.maps.LatLng( 0.477584890000000E+02, -0.117520456000000E+03),\n new google.maps.LatLng( 0.477507890000000E+02, -0.117510455000000E+03),\n new google.maps.LatLng( 0.477473890000000E+02, -0.117507655000000E+03),\n new google.maps.LatLng( 0.477369890000000E+02, -0.117507654000000E+03),\n new google.maps.LatLng( 0.477347370000000E+02, -0.117507182000000E+03),\n new google.maps.LatLng( 0.477340890000000E+02, -0.117506754000000E+03),\n new google.maps.LatLng( 0.477339890000000E+02, -0.117503254000000E+03),\n new google.maps.LatLng( 0.477315890000000E+02, -0.117499354000000E+03),\n new google.maps.LatLng( 0.477300010000000E+02, -0.117501214000000E+03),\n new google.maps.LatLng( 0.477297630000000E+02, -0.117509429000000E+03),\n new google.maps.LatLng( 0.477317890000000E+02, -0.117508854000000E+03),\n new google.maps.LatLng( 0.477351890000000E+02, -0.117510554000000E+03),\n new google.maps.LatLng( 0.477370890000000E+02, -0.117512554000000E+03),\n new google.maps.LatLng( 0.477408890000000E+02, -0.117519155000000E+03),\n new google.maps.LatLng( 0.477408890000000E+02, -0.117519155000000E+03),\n new google.maps.LatLng( 0.477427890000000E+02, -0.117520655000000E+03),\n new google.maps.LatLng( 0.477447890000000E+02, -0.117523955000000E+03),\n new google.maps.LatLng( 0.477460890000000E+02, -0.117527455000000E+03),\n new google.maps.LatLng( 0.477476890000000E+02, -0.117527856000000E+03),\n new google.maps.LatLng( 0.477486890000000E+02, -0.117526856000000E+03),\n new google.maps.LatLng( 0.477489890000000E+02, -0.117524756000000E+03),\n new google.maps.LatLng( 0.477481890000000E+02, -0.117526156000000E+03),\n new google.maps.LatLng( 0.477494890000000E+02, -0.117523156000000E+03),\n new google.maps.LatLng( 0.477523890000000E+02, -0.117520456000000E+03),\n new google.maps.LatLng( 0.477559890000000E+02, -0.117520056000000E+03),\n new google.maps.LatLng( 0.477580890000000E+02, -0.117523456000000E+03),\n new google.maps.LatLng( 0.477581890000000E+02, -0.117527556000000E+03),\n new google.maps.LatLng( 0.477572890000000E+02, -0.117534056000000E+03),\n new google.maps.LatLng( 0.477616890000000E+02, -0.117538756000000E+03),\n new google.maps.LatLng( 0.477629890000000E+02, -0.117540956000000E+03),\n new google.maps.LatLng( 0.477632890000000E+02, -0.117544456000000E+03),\n new google.maps.LatLng( 0.477652890000000E+02, -0.117548656000000E+03),\n new google.maps.LatLng( 0.477687890000000E+02, -0.117550157000000E+03),\n new google.maps.LatLng( 0.477727890000000E+02, -0.117543256000000E+03),\n new google.maps.LatLng( 0.477745890000000E+02, -0.117543157000000E+03),\n new google.maps.LatLng( 0.477805890000000E+02, -0.117545757000000E+03),\n new google.maps.LatLng( 0.477828890000000E+02, -0.117544657000000E+03),\n new google.maps.LatLng( 0.477846890000000E+02, -0.117541657000000E+03),\n new google.maps.LatLng( 0.477848890000000E+02, -0.117538057000000E+03),\n new google.maps.LatLng( 0.477876890000000E+02, -0.117533657000000E+03),\n new google.maps.LatLng( 0.477918890000000E+02, -0.117533657000000E+03),\n new google.maps.LatLng( 0.477969890000000E+02, -0.117536157000000E+03),\n new google.maps.LatLng( 0.477981440000000E+02, -0.117537674000000E+03),\n new google.maps.LatLng( 0.478002190000000E+02, -0.117542412000000E+03),\n new google.maps.LatLng( 0.478005840000000E+02, -0.117545704000000E+03),\n new google.maps.LatLng( 0.478014540000000E+02, -0.117548350000000E+03),\n new google.maps.LatLng( 0.478024970000000E+02, -0.117549512000000E+03),\n new google.maps.LatLng( 0.478031760000000E+02, -0.117554665000000E+03),\n new google.maps.LatLng( 0.478006410000000E+02, -0.117569443000000E+03),\n new google.maps.LatLng( 0.477982480000000E+02, -0.117573131000000E+03),\n new google.maps.LatLng( 0.477959700000000E+02, -0.117575553000000E+03),\n new google.maps.LatLng( 0.477959810000000E+02, -0.117579728000000E+03),\n new google.maps.LatLng( 0.477985700000000E+02, -0.117587367000000E+03),\n new google.maps.LatLng( 0.478014000000000E+02, -0.117595231000000E+03),\n new google.maps.LatLng( 0.478050090000000E+02, -0.117599584000000E+03),\n new google.maps.LatLng( 0.478124890000000E+02, -0.117607128000000E+03),\n new google.maps.LatLng( 0.478224730000000E+02, -0.117613439000000E+03),\n new google.maps.LatLng( 0.478277050000000E+02, -0.117617856000000E+03),\n new google.maps.LatLng( 0.478304440000000E+02, -0.117623765000000E+03),\n new google.maps.LatLng( 0.478321120000000E+02, -0.117624446000000E+03),\n new google.maps.LatLng( 0.478353360000000E+02, -0.117630420000000E+03),\n new google.maps.LatLng( 0.478363910000000E+02, -0.117638395000000E+03),\n new google.maps.LatLng( 0.478364860000000E+02, -0.117646541000000E+03),\n new google.maps.LatLng( 0.478373100000000E+02, -0.117649935000000E+03),\n new google.maps.LatLng( 0.478385440000000E+02, -0.117651937000000E+03),\n new google.maps.LatLng( 0.478427490000000E+02, -0.117651493000000E+03),\n new google.maps.LatLng( 0.478478240000000E+02, -0.117655258000000E+03),\n new google.maps.LatLng( 0.478493330000000E+02, -0.117658041000000E+03),\n new google.maps.LatLng( 0.478506810000000E+02, -0.117659398000000E+03),\n new google.maps.LatLng( 0.478554350000000E+02, -0.117662553000000E+03),\n new google.maps.LatLng( 0.478653310000000E+02, -0.117665436000000E+03),\n new google.maps.LatLng( 0.478666570000000E+02, -0.117665571000000E+03),\n new google.maps.LatLng( 0.478688730000000E+02, -0.117664959000000E+03),\n new google.maps.LatLng( 0.478744540000000E+02, -0.117660949000000E+03),\n new google.maps.LatLng( 0.478830600000000E+02, -0.117658598000000E+03),\n new google.maps.LatLng( 0.478847970000000E+02, -0.117659243000000E+03),\n new google.maps.LatLng( 0.478862140000000E+02, -0.117662368000000E+03),\n new google.maps.LatLng( 0.478880430000000E+02, -0.117662571000000E+03),\n new google.maps.LatLng( 0.478923840000000E+02, -0.117661311000000E+03),\n new google.maps.LatLng( 0.478932760000000E+02, -0.117662161000000E+03),\n new google.maps.LatLng( 0.478941450000000E+02, -0.117666238000000E+03),\n new google.maps.LatLng( 0.478940310000000E+02, -0.117667665000000E+03),\n new google.maps.LatLng( 0.478933000000000E+02, -0.117669535000000E+03),\n new google.maps.LatLng( 0.478908550000000E+02, -0.117672254000000E+03),\n new google.maps.LatLng( 0.478905820000000E+02, -0.117675447000000E+03),\n new google.maps.LatLng( 0.478914500000000E+02, -0.117681563000000E+03),\n new google.maps.LatLng( 0.478906050000000E+02, -0.117685878000000E+03),\n new google.maps.LatLng( 0.478842510000000E+02, -0.117697599000000E+03),\n new google.maps.LatLng( 0.478819430000000E+02, -0.117697429000000E+03),\n new google.maps.LatLng( 0.478802290000000E+02, -0.117699195000000E+03),\n new google.maps.LatLng( 0.478763860000000E+02, -0.117701401000000E+03),\n new google.maps.LatLng( 0.478763860000000E+02, -0.117701401000000E+03),\n new google.maps.LatLng( 0.478789350000000E+02, -0.117702547000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "c1e8da8269bcbb7c68c5be45197aa0c9", "score": "0.5956671", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.472695829830191E+02, -0.122430211577693E+03),\n new google.maps.LatLng( 0.472594210000000E+02, -0.122419134000000E+03),\n new google.maps.LatLng( 0.472581210000000E+02, -0.122418134000000E+03),\n new google.maps.LatLng( 0.472538210000000E+02, -0.122417634000000E+03),\n new google.maps.LatLng( 0.472509210000000E+02, -0.122416034000000E+03),\n new google.maps.LatLng( 0.472492210000000E+02, -0.122414434000000E+03),\n new google.maps.LatLng( 0.472412210000000E+02, -0.122403134000000E+03),\n new google.maps.LatLng( 0.472402670000000E+02, -0.122400851000000E+03),\n new google.maps.LatLng( 0.472402670000000E+02, -0.122400851000000E+03),\n new google.maps.LatLng( 0.472395210000000E+02, -0.122403033000000E+03),\n new google.maps.LatLng( 0.472383210000000E+02, -0.122414634000000E+03),\n new google.maps.LatLng( 0.472332880000000E+02, -0.122431340000000E+03),\n new google.maps.LatLng( 0.472332880000000E+02, -0.122431340000000E+03),\n new google.maps.LatLng( 0.472491210000000E+02, -0.122435034000000E+03),\n new google.maps.LatLng( 0.472491210000000E+02, -0.122433234000000E+03),\n new google.maps.LatLng( 0.472536210000000E+02, -0.122434134000000E+03),\n new google.maps.LatLng( 0.472602210000000E+02, -0.122437935000000E+03),\n new google.maps.LatLng( 0.472667281633387E+02, -0.122444174745667E+03),\n new google.maps.LatLng( 0.472667281633387E+02, -0.122444174745667E+03),\n new google.maps.LatLng( 0.472695829830191E+02, -0.122430211577693E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "ed95cd52a93c9455fd0354c11311f0af", "score": "0.59550816", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.471257200000000E+02, -0.122463733000000E+03),\n new google.maps.LatLng( 0.471240210000000E+02, -0.122458233000000E+03),\n new google.maps.LatLng( 0.471276210000000E+02, -0.122458333000000E+03),\n new google.maps.LatLng( 0.471282210000000E+02, -0.122455133000000E+03),\n new google.maps.LatLng( 0.471273540000000E+02, -0.122452917000000E+03),\n new google.maps.LatLng( 0.471264800000000E+02, -0.122452988000000E+03),\n new google.maps.LatLng( 0.471245120000000E+02, -0.122450562000000E+03),\n new google.maps.LatLng( 0.471221940000000E+02, -0.122445767000000E+03),\n new google.maps.LatLng( 0.471194210000000E+02, -0.122434432000000E+03),\n new google.maps.LatLng( 0.471194210000000E+02, -0.122434432000000E+03),\n new google.maps.LatLng( 0.471179210000000E+02, -0.122434432000000E+03),\n new google.maps.LatLng( 0.471123210000000E+02, -0.122434632000000E+03),\n new google.maps.LatLng( 0.471075210000000E+02, -0.122431832000000E+03),\n new google.maps.LatLng( 0.471074210000000E+02, -0.122429232000000E+03),\n new google.maps.LatLng( 0.471091010000000E+02, -0.122422836000000E+03),\n new google.maps.LatLng( 0.471104660000000E+02, -0.122421417000000E+03),\n new google.maps.LatLng( 0.471115190000000E+02, -0.122421432000000E+03),\n new google.maps.LatLng( 0.471113360000000E+02, -0.122406067000000E+03),\n new google.maps.LatLng( 0.471074530000000E+02, -0.122401353000000E+03),\n new google.maps.LatLng( 0.471004210000000E+02, -0.122399931000000E+03),\n new google.maps.LatLng( 0.470968210000000E+02, -0.122399731000000E+03),\n new google.maps.LatLng( 0.470968210000000E+02, -0.122399731000000E+03),\n new google.maps.LatLng( 0.470823220000000E+02, -0.122400114000000E+03),\n new google.maps.LatLng( 0.470820860000000E+02, -0.122357481000000E+03),\n new google.maps.LatLng( 0.470844590000000E+02, -0.122356397000000E+03),\n new google.maps.LatLng( 0.470886850000000E+02, -0.122356977000000E+03),\n new google.maps.LatLng( 0.470911900000000E+02, -0.122356159000000E+03),\n new google.maps.LatLng( 0.470911220000000E+02, -0.122355030000000E+03),\n new google.maps.LatLng( 0.470911220000000E+02, -0.122355030000000E+03),\n new google.maps.LatLng( 0.470894220000000E+02, -0.122353030000000E+03),\n new google.maps.LatLng( 0.470803220000000E+02, -0.122348830000000E+03),\n new google.maps.LatLng( 0.470742240000000E+02, -0.122342662000000E+03),\n new google.maps.LatLng( 0.470770040000000E+02, -0.122338620000000E+03),\n new google.maps.LatLng( 0.470816850000000E+02, -0.122335894000000E+03),\n new google.maps.LatLng( 0.470819650000000E+02, -0.122307607000000E+03),\n new google.maps.LatLng( 0.470819650000000E+02, -0.122307607000000E+03),\n new google.maps.LatLng( 0.470776720000000E+02, -0.122307492000000E+03),\n new google.maps.LatLng( 0.470741430000000E+02, -0.122308039000000E+03),\n new google.maps.LatLng( 0.470707720000000E+02, -0.122309219000000E+03),\n new google.maps.LatLng( 0.470659950000000E+02, -0.122312405000000E+03),\n new google.maps.LatLng( 0.470626220000000E+02, -0.122320729000000E+03),\n new google.maps.LatLng( 0.470618220000000E+02, -0.122320629000000E+03),\n new google.maps.LatLng( 0.470576700000000E+02, -0.122316902000000E+03),\n new google.maps.LatLng( 0.470532220000000E+02, -0.122320929000000E+03),\n new google.maps.LatLng( 0.470535140000000E+02, -0.122337002000000E+03),\n new google.maps.LatLng( 0.470421920000000E+02, -0.122338162000000E+03),\n new google.maps.LatLng( 0.470419340000000E+02, -0.122348068000000E+03),\n new google.maps.LatLng( 0.470445130000000E+02, -0.122347916000000E+03),\n new google.maps.LatLng( 0.470446590000000E+02, -0.122353021000000E+03),\n new google.maps.LatLng( 0.470415480000000E+02, -0.122352968000000E+03),\n new google.maps.LatLng( 0.470399330000000E+02, -0.122356823000000E+03),\n new google.maps.LatLng( 0.470379570000000E+02, -0.122361950000000E+03),\n new google.maps.LatLng( 0.470382020000000E+02, -0.122369123000000E+03),\n new google.maps.LatLng( 0.470346260000000E+02, -0.122370167000000E+03),\n new google.maps.LatLng( 0.470200340000000E+02, -0.122368376000000E+03),\n new google.maps.LatLng( 0.470199170000000E+02, -0.122353382000000E+03),\n new google.maps.LatLng( 0.470206010000000E+02, -0.122339351000000E+03),\n new google.maps.LatLng( 0.470091790000000E+02, -0.122335140000000E+03),\n new google.maps.LatLng( 0.470078880000000E+02, -0.122335507000000E+03),\n new google.maps.LatLng( 0.470079930000000E+02, -0.122337761000000E+03),\n new google.maps.LatLng( 0.470001130000000E+02, -0.122337995000000E+03),\n new google.maps.LatLng( 0.469953690000000E+02, -0.122341019000000E+03),\n new google.maps.LatLng( 0.469947690000000E+02, -0.122358190000000E+03),\n new google.maps.LatLng( 0.469997090000000E+02, -0.122359917000000E+03),\n new google.maps.LatLng( 0.470042580000000E+02, -0.122364560000000E+03),\n new google.maps.LatLng( 0.470050750000000E+02, -0.122368207000000E+03),\n new google.maps.LatLng( 0.470051130000000E+02, -0.122372891000000E+03),\n new google.maps.LatLng( 0.470048760000000E+02, -0.122379880000000E+03),\n new google.maps.LatLng( 0.470031270000000E+02, -0.122380202000000E+03),\n new google.maps.LatLng( 0.470033660000000E+02, -0.122383648000000E+03),\n new google.maps.LatLng( 0.470045240000000E+02, -0.122388395000000E+03),\n new google.maps.LatLng( 0.469985390000000E+02, -0.122387073000000E+03),\n new google.maps.LatLng( 0.469985390000000E+02, -0.122385277000000E+03),\n new google.maps.LatLng( 0.469948700000000E+02, -0.122384922000000E+03),\n new google.maps.LatLng( 0.469949400000000E+02, -0.122391149000000E+03),\n new google.maps.LatLng( 0.469949400000000E+02, -0.122391149000000E+03),\n new google.maps.LatLng( 0.469997530000000E+02, -0.122391429000000E+03),\n new google.maps.LatLng( 0.469998210000000E+02, -0.122401850000000E+03),\n new google.maps.LatLng( 0.470020600000000E+02, -0.122403578000000E+03),\n new google.maps.LatLng( 0.470050130000000E+02, -0.122403602000000E+03),\n new google.maps.LatLng( 0.470054020000000E+02, -0.122421202000000E+03),\n new google.maps.LatLng( 0.469998210000000E+02, -0.122421925000000E+03),\n new google.maps.LatLng( 0.469947980000000E+02, -0.122421860000000E+03),\n new google.maps.LatLng( 0.469950740000000E+02, -0.122442973000000E+03),\n new google.maps.LatLng( 0.469959390000000E+02, -0.122463385000000E+03),\n new google.maps.LatLng( 0.469961780000000E+02, -0.122504855000000E+03),\n new google.maps.LatLng( 0.470033310000000E+02, -0.122504788000000E+03),\n new google.maps.LatLng( 0.470034260000000E+02, -0.122521406000000E+03),\n new google.maps.LatLng( 0.470088570000000E+02, -0.122521593000000E+03),\n new google.maps.LatLng( 0.470089480000000E+02, -0.122523912000000E+03),\n new google.maps.LatLng( 0.470070390000000E+02, -0.122526402000000E+03),\n new google.maps.LatLng( 0.470030680000000E+02, -0.122526435000000E+03),\n new google.maps.LatLng( 0.470030500000000E+02, -0.122528902000000E+03),\n new google.maps.LatLng( 0.470044460000000E+02, -0.122531008000000E+03),\n new google.maps.LatLng( 0.470048530000000E+02, -0.122533767000000E+03),\n new google.maps.LatLng( 0.470044080000000E+02, -0.122540102000000E+03),\n new google.maps.LatLng( 0.470086120000000E+02, -0.122538851000000E+03),\n new google.maps.LatLng( 0.470104280000000E+02, -0.122537691000000E+03),\n new google.maps.LatLng( 0.470118700000000E+02, -0.122539675000000E+03),\n new google.maps.LatLng( 0.470118700000000E+02, -0.122539675000000E+03),\n new google.maps.LatLng( 0.470636870000000E+02, -0.122515770000000E+03),\n new google.maps.LatLng( 0.470717080000000E+02, -0.122509766000000E+03),\n new google.maps.LatLng( 0.470945370000000E+02, -0.122504522000000E+03),\n new google.maps.LatLng( 0.470967676666667E+02, -0.122503544333333E+03),\n new google.maps.LatLng( 0.471067090000000E+02, -0.122501074000000E+03),\n new google.maps.LatLng( 0.471194960000000E+02, -0.122499494000000E+03),\n new google.maps.LatLng( 0.471194960000000E+02, -0.122499494000000E+03),\n new google.maps.LatLng( 0.471197200000000E+02, -0.122488634000000E+03),\n new google.maps.LatLng( 0.471144200000000E+02, -0.122488634000000E+03),\n new google.maps.LatLng( 0.471148200000000E+02, -0.122469333000000E+03),\n new google.maps.LatLng( 0.471186200000000E+02, -0.122463633000000E+03),\n new google.maps.LatLng( 0.471257200000000E+02, -0.122463733000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "114f480e641c81f8ff9d1b48841e37da", "score": "0.5953222", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.481281510000000E+02, -0.119035346000000E+03),\n new google.maps.LatLng( 0.481263010000000E+02, -0.119038964000000E+03),\n new google.maps.LatLng( 0.481238460000000E+02, -0.119035490000000E+03),\n new google.maps.LatLng( 0.481189560000000E+02, -0.119030306000000E+03),\n new google.maps.LatLng( 0.481133350000000E+02, -0.119026113000000E+03),\n new google.maps.LatLng( 0.481116900000000E+02, -0.119025364000000E+03),\n new google.maps.LatLng( 0.481028470000000E+02, -0.119022538000000E+03),\n new google.maps.LatLng( 0.480973870000000E+02, -0.119022098000000E+03),\n new google.maps.LatLng( 0.480943710000000E+02, -0.119020327000000E+03),\n new google.maps.LatLng( 0.480846150000000E+02, -0.119020710000000E+03),\n new google.maps.LatLng( 0.480813480000000E+02, -0.119020201000000E+03),\n new google.maps.LatLng( 0.480765500000000E+02, -0.119018637000000E+03),\n new google.maps.LatLng( 0.480707460000000E+02, -0.119016017000000E+03),\n new google.maps.LatLng( 0.480690090000000E+02, -0.119013632000000E+03),\n new google.maps.LatLng( 0.480644610000000E+02, -0.119009853000000E+03),\n new google.maps.LatLng( 0.480619230000000E+02, -0.119008492000000E+03),\n new google.maps.LatLng( 0.480561420000000E+02, -0.119006896000000E+03),\n new google.maps.LatLng( 0.480507960000000E+02, -0.119007447000000E+03),\n new google.maps.LatLng( 0.480486940000000E+02, -0.119006666000000E+03),\n new google.maps.LatLng( 0.480471630000000E+02, -0.119005475000000E+03),\n new google.maps.LatLng( 0.480433200000000E+02, -0.119001135000000E+03),\n new google.maps.LatLng( 0.480384180000000E+02, -0.118979239000000E+03),\n new google.maps.LatLng( 0.480360670000000E+02, -0.118972219000000E+03),\n new google.maps.LatLng( 0.480356560000000E+02, -0.118971844000000E+03),\n new google.maps.LatLng( 0.480365460000000E+02, -0.118974604000000E+03),\n new google.maps.LatLng( 0.480352220000000E+02, -0.118973411000000E+03),\n new google.maps.LatLng( 0.480321160000000E+02, -0.118968912000000E+03),\n new google.maps.LatLng( 0.480288730000000E+02, -0.118960940000000E+03),\n new google.maps.LatLng( 0.480214730000000E+02, -0.118950856000000E+03),\n new google.maps.LatLng( 0.480189140000000E+02, -0.118949119000000E+03),\n new google.maps.LatLng( 0.480141390000000E+02, -0.118949424000000E+03),\n new google.maps.LatLng( 0.480073990000000E+02, -0.118951023000000E+03),\n new google.maps.LatLng( 0.480037660000000E+02, -0.118953371000000E+03),\n new google.maps.LatLng( 0.480007330000000E+02, -0.118956378000000E+03),\n new google.maps.LatLng( 0.479988260000000E+02, -0.118959229000000E+03),\n new google.maps.LatLng( 0.479967010000000E+02, -0.118960113000000E+03),\n new google.maps.LatLng( 0.479937540000000E+02, -0.118959465000000E+03),\n new google.maps.LatLng( 0.479845910000000E+02, -0.118963170000000E+03),\n new google.maps.LatLng( 0.479798610000000E+02, -0.118967216000000E+03),\n new google.maps.LatLng( 0.479737340000000E+02, -0.118977113000000E+03),\n new google.maps.LatLng( 0.479691400000000E+02, -0.118981498000000E+03),\n new google.maps.LatLng( 0.479651960000000E+02, -0.118981417000000E+03),\n new google.maps.LatLng( 0.479639990000000E+02, -0.118980779000000E+03),\n new google.maps.LatLng( 0.479623320000000E+02, -0.118979791000000E+03),\n new google.maps.LatLng( 0.479612820000000E+02, -0.118976321000000E+03),\n new google.maps.LatLng( 0.479597970000000E+02, -0.118976048000000E+03),\n new google.maps.LatLng( 0.479577870000000E+02, -0.118976692000000E+03),\n new google.maps.LatLng( 0.479568690000000E+02, -0.118981903000000E+03),\n new google.maps.LatLng( 0.479620190000000E+02, -0.118982394000000E+03),\n new google.maps.LatLng( 0.479620110000000E+02, -0.118982819000000E+03),\n new google.maps.LatLng( 0.479663060000000E+02, -0.118983945000000E+03),\n new google.maps.LatLng( 0.479698700000000E+02, -0.118983438000000E+03),\n new google.maps.LatLng( 0.479720640000000E+02, -0.118981841000000E+03),\n new google.maps.LatLng( 0.479746010000000E+02, -0.118978917000000E+03),\n new google.maps.LatLng( 0.479794250000000E+02, -0.118971742000000E+03),\n new google.maps.LatLng( 0.479830370000000E+02, -0.118967354000000E+03),\n new google.maps.LatLng( 0.479863960000000E+02, -0.118964804000000E+03),\n new google.maps.LatLng( 0.479914450000000E+02, -0.118963003000000E+03),\n new google.maps.LatLng( 0.479987340000000E+02, -0.118962428000000E+03),\n new google.maps.LatLng( 0.480031260000000E+02, -0.118957456000000E+03),\n new google.maps.LatLng( 0.480082440000000E+02, -0.118953610000000E+03),\n new google.maps.LatLng( 0.480097290000000E+02, -0.118952896000000E+03),\n new google.maps.LatLng( 0.480165600000000E+02, -0.118952115000000E+03),\n new google.maps.LatLng( 0.480187540000000E+02, -0.118952694000000E+03),\n new google.maps.LatLng( 0.480227060000000E+02, -0.118956612000000E+03),\n new google.maps.LatLng( 0.480305380000000E+02, -0.118972215000000E+03),\n new google.maps.LatLng( 0.480333250000000E+02, -0.118975555000000E+03),\n new google.maps.LatLng( 0.480356990000000E+02, -0.118979543000000E+03),\n new google.maps.LatLng( 0.480364520000000E+02, -0.118982474000000E+03),\n new google.maps.LatLng( 0.480364520000000E+02, -0.118982474000000E+03),\n new google.maps.LatLng( 0.480387770000000E+02, -0.118994841000000E+03),\n new google.maps.LatLng( 0.480425010000000E+02, -0.119003845000000E+03),\n new google.maps.LatLng( 0.480439190000000E+02, -0.119006160000000E+03),\n new google.maps.LatLng( 0.480519190000000E+02, -0.119014670000000E+03),\n new google.maps.LatLng( 0.480570830000000E+02, -0.119017902000000E+03),\n new google.maps.LatLng( 0.480607160000000E+02, -0.119017797000000E+03),\n new google.maps.LatLng( 0.480841140000000E+02, -0.119023915000000E+03),\n new google.maps.LatLng( 0.480854160000000E+02, -0.119024085000000E+03),\n new google.maps.LatLng( 0.480876550000000E+02, -0.119023470000000E+03),\n new google.maps.LatLng( 0.480894370000000E+02, -0.119023775000000E+03),\n new google.maps.LatLng( 0.480894370000000E+02, -0.119023775000000E+03),\n new google.maps.LatLng( 0.480943260000000E+02, -0.119024215000000E+03),\n new google.maps.LatLng( 0.481034200000000E+02, -0.119026461000000E+03),\n new google.maps.LatLng( 0.481154610000000E+02, -0.119033037000000E+03),\n new google.maps.LatLng( 0.481171980000000E+02, -0.119034196000000E+03),\n new google.maps.LatLng( 0.481212890000000E+02, -0.119040780000000E+03),\n new google.maps.LatLng( 0.481282220000000E+02, -0.119048519000000E+03),\n new google.maps.LatLng( 0.481380460000000E+02, -0.119066368000000E+03),\n new google.maps.LatLng( 0.481384340000000E+02, -0.119072545000000E+03),\n new google.maps.LatLng( 0.481380910000000E+02, -0.119075822000000E+03),\n new google.maps.LatLng( 0.481356680000000E+02, -0.119087084000000E+03),\n new google.maps.LatLng( 0.481353010000000E+02, -0.119092476000000E+03),\n new google.maps.LatLng( 0.481375130000000E+02, -0.119104560000000E+03),\n new google.maps.LatLng( 0.481437000000000E+02, -0.119113713000000E+03),\n new google.maps.LatLng( 0.481475570000000E+02, -0.119122150000000E+03),\n new google.maps.LatLng( 0.481496840000000E+02, -0.119129820000000E+03),\n new google.maps.LatLng( 0.481492050000000E+02, -0.119133030000000E+03),\n new google.maps.LatLng( 0.481461930000000E+02, -0.119140918000000E+03),\n new google.maps.LatLng( 0.481435240000000E+02, -0.119152117000000E+03),\n new google.maps.LatLng( 0.481372450000000E+02, -0.119161849000000E+03),\n new google.maps.LatLng( 0.481283820000000E+02, -0.119171613000000E+03),\n new google.maps.LatLng( 0.481263260000000E+02, -0.119178199000000E+03),\n new google.maps.LatLng( 0.481262350000000E+02, -0.119182362000000E+03),\n new google.maps.LatLng( 0.481271030000000E+02, -0.119186048000000E+03),\n new google.maps.LatLng( 0.481265100000000E+02, -0.119189358000000E+03),\n new google.maps.LatLng( 0.481227010000000E+02, -0.119198438000000E+03),\n new google.maps.LatLng( 0.481158920000000E+02, -0.119208841000000E+03),\n new google.maps.LatLng( 0.481137420000000E+02, -0.119213787000000E+03),\n new google.maps.LatLng( 0.481135360000000E+02, -0.119215936000000E+03),\n new google.maps.LatLng( 0.481147000000000E+02, -0.119220986000000E+03),\n new google.maps.LatLng( 0.481147000000000E+02, -0.119220986000000E+03),\n new google.maps.LatLng( 0.481150420000000E+02, -0.119222931000000E+03),\n new google.maps.LatLng( 0.481127770000000E+02, -0.119231935000000E+03),\n new google.maps.LatLng( 0.481079770000000E+02, -0.119238002000000E+03),\n new google.maps.LatLng( 0.481024890000000E+02, -0.119248433000000E+03),\n new google.maps.LatLng( 0.481024890000000E+02, -0.119248433000000E+03),\n new google.maps.LatLng( 0.481006190000000E+02, -0.119255431000000E+03),\n new google.maps.LatLng( 0.481009640000000E+02, -0.119263207000000E+03),\n new google.maps.LatLng( 0.481038910000000E+02, -0.119272174000000E+03),\n new google.maps.LatLng( 0.481110910000000E+02, -0.119286667000000E+03),\n new google.maps.LatLng( 0.481137420000000E+02, -0.119294513000000E+03),\n new google.maps.LatLng( 0.481137200000000E+02, -0.119298265000000E+03),\n new google.maps.LatLng( 0.481114360000000E+02, -0.119304473000000E+03),\n new google.maps.LatLng( 0.481058850000000E+02, -0.119314433000000E+03),\n new google.maps.LatLng( 0.480998760000000E+02, -0.119322721000000E+03),\n new google.maps.LatLng( 0.480987340000000E+02, -0.119323471000000E+03),\n new google.maps.LatLng( 0.480932740000000E+02, -0.119322684000000E+03),\n new google.maps.LatLng( 0.480883390000000E+02, -0.119326058000000E+03),\n new google.maps.LatLng( 0.480816900000000E+02, -0.119327352000000E+03),\n new google.maps.LatLng( 0.480806170000000E+02, -0.119327351000000E+03),\n new google.maps.LatLng( 0.480776240000000E+02, -0.119325885000000E+03),\n new google.maps.LatLng( 0.480730780000000E+02, -0.119325406000000E+03),\n new google.maps.LatLng( 0.480635060000000E+02, -0.119326835000000E+03),\n new google.maps.LatLng( 0.480623870000000E+02, -0.119327346000000E+03),\n new google.maps.LatLng( 0.480518320000000E+02, -0.119333645000000E+03),\n new google.maps.LatLng( 0.480485640000000E+02, -0.119338107000000E+03),\n new google.maps.LatLng( 0.480469370000000E+02, -0.119342790000000E+03),\n new google.maps.LatLng( 0.480469370000000E+02, -0.119342790000000E+03),\n new google.maps.LatLng( 0.480495190000000E+02, -0.119342746000000E+03),\n new google.maps.LatLng( 0.480495130000000E+02, -0.119340989000000E+03),\n new google.maps.LatLng( 0.480522640000000E+02, -0.119336092000000E+03),\n new google.maps.LatLng( 0.480586720000000E+02, -0.119331911000000E+03),\n new google.maps.LatLng( 0.480646850000000E+02, -0.119330009000000E+03),\n new google.maps.LatLng( 0.480787820000000E+02, -0.119328934000000E+03),\n new google.maps.LatLng( 0.480831910000000E+02, -0.119330016000000E+03),\n new google.maps.LatLng( 0.480900670000000E+02, -0.119329523000000E+03),\n new google.maps.LatLng( 0.480956580000000E+02, -0.119327886000000E+03),\n new google.maps.LatLng( 0.480996460000000E+02, -0.119325445000000E+03),\n new google.maps.LatLng( 0.481066590000000E+02, -0.119315924000000E+03),\n new google.maps.LatLng( 0.481145640000000E+02, -0.119301119000000E+03),\n new google.maps.LatLng( 0.481154840000000E+02, -0.119297145000000E+03),\n new google.maps.LatLng( 0.481152790000000E+02, -0.119292942000000E+03),\n new google.maps.LatLng( 0.481118830000000E+02, -0.119284258000000E+03),\n new google.maps.LatLng( 0.481063520000000E+02, -0.119273309000000E+03),\n new google.maps.LatLng( 0.481037730000000E+02, -0.119266611000000E+03),\n new google.maps.LatLng( 0.481025470000000E+02, -0.119262065000000E+03),\n new google.maps.LatLng( 0.481018950000000E+02, -0.119255804000000E+03),\n new google.maps.LatLng( 0.481029970000000E+02, -0.119251144000000E+03),\n new google.maps.LatLng( 0.481075150000000E+02, -0.119241994000000E+03),\n new google.maps.LatLng( 0.481094400000000E+02, -0.119238428000000E+03),\n new google.maps.LatLng( 0.481128220000000E+02, -0.119234242000000E+03),\n new google.maps.LatLng( 0.481146950000000E+02, -0.119234222000000E+03),\n new google.maps.LatLng( 0.481146950000000E+02, -0.119234222000000E+03),\n new google.maps.LatLng( 0.481154730000000E+02, -0.119232142000000E+03),\n new google.maps.LatLng( 0.481177900000000E+02, -0.119219109000000E+03),\n new google.maps.LatLng( 0.481177900000000E+02, -0.119219109000000E+03),\n new google.maps.LatLng( 0.481168720000000E+02, -0.119215597000000E+03),\n new google.maps.LatLng( 0.481172840000000E+02, -0.119212834000000E+03),\n new google.maps.LatLng( 0.481191590000000E+02, -0.119209593000000E+03),\n new google.maps.LatLng( 0.481237740000000E+02, -0.119204887000000E+03),\n new google.maps.LatLng( 0.481248740000000E+02, -0.119204391000000E+03),\n new google.maps.LatLng( 0.481255950000000E+02, -0.119203245000000E+03),\n new google.maps.LatLng( 0.481308500000000E+02, -0.119189596000000E+03),\n new google.maps.LatLng( 0.481312150000000E+02, -0.119178198000000E+03),\n new google.maps.LatLng( 0.481336820000000E+02, -0.119172635000000E+03),\n new google.maps.LatLng( 0.481361490000000E+02, -0.119170313000000E+03),\n new google.maps.LatLng( 0.481462210000000E+02, -0.119155051000000E+03),\n new google.maps.LatLng( 0.481472710000000E+02, -0.119152320000000E+03),\n new google.maps.LatLng( 0.481493460000000E+02, -0.119142315000000E+03),\n new google.maps.LatLng( 0.481525190000000E+02, -0.119134836000000E+03),\n new google.maps.LatLng( 0.481527230000000E+02, -0.119132002000000E+03),\n new google.maps.LatLng( 0.481522160000000E+02, -0.119126141000000E+03),\n new google.maps.LatLng( 0.481503220000000E+02, -0.119120617000000E+03),\n new google.maps.LatLng( 0.481456430000000E+02, -0.119110711000000E+03),\n new google.maps.LatLng( 0.481422640000000E+02, -0.119106066000000E+03),\n new google.maps.LatLng( 0.481396840000000E+02, -0.119100569000000E+03),\n new google.maps.LatLng( 0.481390030000000E+02, -0.119089645000000E+03),\n new google.maps.LatLng( 0.481414040000000E+02, -0.119075447000000E+03),\n new google.maps.LatLng( 0.481410160000000E+02, -0.119060530000000E+03),\n new google.maps.LatLng( 0.481370630000000E+02, -0.119047356000000E+03),\n new google.maps.LatLng( 0.481341610000000E+02, -0.119045139000000E+03),\n new google.maps.LatLng( 0.481304830000000E+02, -0.119043809000000E+03),\n new google.maps.LatLng( 0.481291110000000E+02, -0.119040670000000E+03),\n new google.maps.LatLng( 0.481281510000000E+02, -0.119035346000000E+03),\n new google.maps.LatLng( 0.481384690000000E+02, -0.119064397000000E+03),\n new google.maps.LatLng( 0.481311690000000E+02, -0.119053159000000E+03),\n new google.maps.LatLng( 0.481308040000000E+02, -0.119051590000000E+03),\n new google.maps.LatLng( 0.481313870000000E+02, -0.119050638000000E+03),\n new google.maps.LatLng( 0.481313870000000E+02, -0.119050638000000E+03),\n new google.maps.LatLng( 0.481316260000000E+02, -0.119048177000000E+03),\n new google.maps.LatLng( 0.481324710000000E+02, -0.119047699000000E+03),\n new google.maps.LatLng( 0.481346420000000E+02, -0.119049234000000E+03),\n new google.maps.LatLng( 0.481359900000000E+02, -0.119051179000000E+03),\n new google.maps.LatLng( 0.481383430000000E+02, -0.119061315000000E+03),\n new google.maps.LatLng( 0.481384690000000E+02, -0.119064397000000E+03),\n new google.maps.LatLng( 0.480591790000000E+02, -0.119012995000000E+03),\n new google.maps.LatLng( 0.480599980000000E+02, -0.119013131000000E+03),\n new google.maps.LatLng( 0.480597100000000E+02, -0.119015515000000E+03),\n new google.maps.LatLng( 0.480564430000000E+02, -0.119015790000000E+03),\n new google.maps.LatLng( 0.480534720000000E+02, -0.119014566000000E+03),\n new google.maps.LatLng( 0.480527870000000E+02, -0.119013987000000E+03),\n new google.maps.LatLng( 0.480525120000000E+02, -0.119012727000000E+03),\n new google.maps.LatLng( 0.480550250000000E+02, -0.119012009000000E+03),\n new google.maps.LatLng( 0.480578120000000E+02, -0.119012483000000E+03),\n new google.maps.LatLng( 0.480582830000000E+02, -0.119012666000000E+03),\n new google.maps.LatLng( 0.480591790000000E+02, -0.119012995000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "c8dd0417b01f25861fc0d39368ab836f", "score": "0.5952712", "text": "function getGeoCode() {\n\t$.getJSON(geoLookup).done(function(data){\n\t\tlat = data.location.lat;\n\t\tlon = data.location.lon;\n\t\tinitMap(lat,lon);\n\t\t});\n}", "title": "" }, { "docid": "fe5d8ae9254e93de693c151e98e0498c", "score": "0.5952288", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.485247290000000E+02, -0.121771943000000E+03),\n new google.maps.LatLng( 0.485234800000000E+02, -0.121772409000000E+03),\n new google.maps.LatLng( 0.485204170000000E+02, -0.121769247000000E+03),\n new google.maps.LatLng( 0.485195240000000E+02, -0.121765189000000E+03),\n new google.maps.LatLng( 0.485195450000000E+02, -0.121761165000000E+03),\n new google.maps.LatLng( 0.485254140000000E+02, -0.121753833000000E+03),\n new google.maps.LatLng( 0.485264200000000E+02, -0.121750357000000E+03),\n new google.maps.LatLng( 0.485266500000000E+02, -0.121747778000000E+03),\n new google.maps.LatLng( 0.485261940000000E+02, -0.121745060000000E+03),\n new google.maps.LatLng( 0.485270410000000E+02, -0.121741276000000E+03),\n new google.maps.LatLng( 0.485291430000000E+02, -0.121740728000000E+03),\n new google.maps.LatLng( 0.485328920000000E+02, -0.121736913000000E+03),\n new google.maps.LatLng( 0.485334200000000E+02, -0.121731719000000E+03),\n new google.maps.LatLng( 0.485323030000000E+02, -0.121727246000000E+03),\n new google.maps.LatLng( 0.485305670000000E+02, -0.121724286000000E+03),\n new google.maps.LatLng( 0.485279390000000E+02, -0.121722392000000E+03),\n new google.maps.LatLng( 0.485262030000000E+02, -0.121722150000000E+03),\n new google.maps.LatLng( 0.485233240000000E+02, -0.121723077000000E+03),\n new google.maps.LatLng( 0.485215420000000E+02, -0.121721597000000E+03),\n new google.maps.LatLng( 0.485198060000000E+02, -0.121717984000000E+03),\n new google.maps.LatLng( 0.485193500000000E+02, -0.121713341000000E+03),\n new google.maps.LatLng( 0.485182770000000E+02, -0.121711896000000E+03),\n new google.maps.LatLng( 0.485168600000000E+02, -0.121711173000000E+03),\n new google.maps.LatLng( 0.485144840000000E+02, -0.121712238000000E+03),\n new google.maps.LatLng( 0.485115810000000E+02, -0.121718701000000E+03),\n new google.maps.LatLng( 0.485093860000000E+02, -0.121721691000000E+03),\n new google.maps.LatLng( 0.485068960000000E+02, -0.121722343000000E+03),\n new google.maps.LatLng( 0.485051820000000E+02, -0.121721620000000E+03),\n new google.maps.LatLng( 0.485036990000000E+02, -0.121716462000000E+03),\n new google.maps.LatLng( 0.485034040000000E+02, -0.121705013000000E+03),\n new google.maps.LatLng( 0.485051410000000E+02, -0.121697929000000E+03),\n new google.maps.LatLng( 0.485103960000000E+02, -0.121689850000000E+03),\n new google.maps.LatLng( 0.485119050000000E+02, -0.121686136000000E+03),\n new google.maps.LatLng( 0.485127960000000E+02, -0.121677917000000E+03),\n new google.maps.LatLng( 0.485108530000000E+02, -0.121668976000000E+03),\n new google.maps.LatLng( 0.485092530000000E+02, -0.121666432000000E+03),\n new google.maps.LatLng( 0.485039970000000E+02, -0.121663237000000E+03),\n new google.maps.LatLng( 0.485038820000000E+02, -0.121661449000000E+03),\n new google.maps.LatLng( 0.484993940000000E+02, -0.121658251000000E+03),\n new google.maps.LatLng( 0.484964810000000E+02, -0.121658047000000E+03),\n new google.maps.LatLng( 0.484945390000000E+02, -0.121657395000000E+03),\n new google.maps.LatLng( 0.484931450000000E+02, -0.121656502000000E+03),\n new google.maps.LatLng( 0.484932130000000E+02, -0.121655780000000E+03),\n new google.maps.LatLng( 0.484925500000000E+02, -0.121655058000000E+03),\n new google.maps.LatLng( 0.484896700000000E+02, -0.121653891000000E+03),\n new google.maps.LatLng( 0.484879330000000E+02, -0.121653480000000E+03),\n new google.maps.LatLng( 0.484846430000000E+02, -0.121653620000000E+03),\n new google.maps.LatLng( 0.484846430000000E+02, -0.121653620000000E+03),\n new google.maps.LatLng( 0.484821090000000E+02, -0.121659911000000E+03),\n new google.maps.LatLng( 0.484795050000000E+02, -0.121664002000000E+03),\n new google.maps.LatLng( 0.484779750000000E+02, -0.121664072000000E+03),\n new google.maps.LatLng( 0.484719820000000E+02, -0.121669593000000E+03),\n new google.maps.LatLng( 0.484724140000000E+02, -0.121671277000000E+03),\n new google.maps.LatLng( 0.484741620000000E+02, -0.121671987000000E+03),\n new google.maps.LatLng( 0.484785880000000E+02, -0.121671608000000E+03),\n new google.maps.LatLng( 0.484815600000000E+02, -0.121673054000000E+03),\n new google.maps.LatLng( 0.484826380000000E+02, -0.121674828000000E+03),\n new google.maps.LatLng( 0.484828940000000E+02, -0.121676266000000E+03),\n new google.maps.LatLng( 0.484828510000000E+02, -0.121678271000000E+03),\n new google.maps.LatLng( 0.484820080000000E+02, -0.121681255000000E+03),\n new google.maps.LatLng( 0.484805130000000E+02, -0.121679227000000E+03),\n new google.maps.LatLng( 0.484792110000000E+02, -0.121678952000000E+03),\n new google.maps.LatLng( 0.484776570000000E+02, -0.121679502000000E+03),\n new google.maps.LatLng( 0.484748930000000E+02, -0.121685379000000E+03),\n new google.maps.LatLng( 0.484751900000000E+02, -0.121688609000000E+03),\n new google.maps.LatLng( 0.484766970000000E+02, -0.121694725000000E+03),\n new google.maps.LatLng( 0.484794860000000E+02, -0.121697441000000E+03),\n new google.maps.LatLng( 0.484811530000000E+02, -0.121697717000000E+03),\n new google.maps.LatLng( 0.484825920000000E+02, -0.121702734000000E+03),\n new google.maps.LatLng( 0.484877090000000E+02, -0.121713562000000E+03),\n new google.maps.LatLng( 0.484885510000000E+02, -0.121722157000000E+03),\n new google.maps.LatLng( 0.484893050000000E+02, -0.121724151000000E+03),\n new google.maps.LatLng( 0.484908350000000E+02, -0.121725320000000E+03),\n new google.maps.LatLng( 0.484920920000000E+02, -0.121725390000000E+03),\n new google.maps.LatLng( 0.484948130000000E+02, -0.121721404000000E+03),\n new google.maps.LatLng( 0.484958640000000E+02, -0.121720752000000E+03),\n new google.maps.LatLng( 0.484965500000000E+02, -0.121720890000000E+03),\n new google.maps.LatLng( 0.484948330000000E+02, -0.121727936000000E+03),\n new google.maps.LatLng( 0.484954250000000E+02, -0.121732542000000E+03),\n new google.maps.LatLng( 0.484995250000000E+02, -0.121746642000000E+03),\n new google.maps.LatLng( 0.485005780000000E+02, -0.121747850000000E+03),\n new google.maps.LatLng( 0.485023150000000E+02, -0.121748471000000E+03),\n new google.maps.LatLng( 0.485066080000000E+02, -0.121752685000000E+03),\n new google.maps.LatLng( 0.485024790000000E+02, -0.121767578000000E+03),\n new google.maps.LatLng( 0.485032130000000E+02, -0.121773560000000E+03),\n new google.maps.LatLng( 0.485079000000000E+02, -0.121782874000000E+03),\n new google.maps.LatLng( 0.485079000000000E+02, -0.121782874000000E+03),\n new google.maps.LatLng( 0.485088590000000E+02, -0.121782427000000E+03),\n new google.maps.LatLng( 0.485092940000000E+02, -0.121785144000000E+03),\n new google.maps.LatLng( 0.485077640000000E+02, -0.121788102000000E+03),\n new google.maps.LatLng( 0.485064390000000E+02, -0.121788687000000E+03),\n new google.maps.LatLng( 0.485093200000000E+02, -0.121814614000000E+03),\n new google.maps.LatLng( 0.485100290000000E+02, -0.121815439000000E+03),\n new google.maps.LatLng( 0.485111940000000E+02, -0.121815336000000E+03),\n new google.maps.LatLng( 0.485121540000000E+02, -0.121816230000000E+03),\n new google.maps.LatLng( 0.485171340000000E+02, -0.121825997000000E+03),\n new google.maps.LatLng( 0.485196710000000E+02, -0.121823797000000E+03),\n new google.maps.LatLng( 0.485257480000000E+02, -0.121823970000000E+03),\n new google.maps.LatLng( 0.485287190000000E+02, -0.121824658000000E+03),\n new google.maps.LatLng( 0.485305930000000E+02, -0.121817813000000E+03),\n new google.maps.LatLng( 0.485320770000000E+02, -0.121792114000000E+03),\n new google.maps.LatLng( 0.485316420000000E+02, -0.121789569000000E+03),\n new google.maps.LatLng( 0.485247290000000E+02, -0.121771943000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "300a99c8e4f26b306e9964ff2abd5d56", "score": "0.59522665", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.465814390000000E+02, -0.118030100000000E+03),\n new google.maps.LatLng( 0.465835890000000E+02, -0.118017016000000E+03),\n new google.maps.LatLng( 0.465860980000000E+02, -0.118006239000000E+03),\n new google.maps.LatLng( 0.465845670000000E+02, -0.117992857000000E+03),\n new google.maps.LatLng( 0.465829690000000E+02, -0.117989341000000E+03),\n new google.maps.LatLng( 0.465822850000000E+02, -0.117984533000000E+03),\n new google.maps.LatLng( 0.465841670000000E+02, -0.117959900000000E+03),\n new google.maps.LatLng( 0.465841670000000E+02, -0.117959900000000E+03),\n new google.maps.LatLng( 0.465835680000000E+02, -0.117963726000000E+03),\n new google.maps.LatLng( 0.465821600000000E+02, -0.117966982000000E+03),\n new google.maps.LatLng( 0.465692620000000E+02, -0.117978462000000E+03),\n new google.maps.LatLng( 0.465600060000000E+02, -0.117978647000000E+03),\n new google.maps.LatLng( 0.465602240000000E+02, -0.117988349000000E+03),\n new google.maps.LatLng( 0.465308840000000E+02, -0.117988372000000E+03),\n new google.maps.LatLng( 0.465308960000000E+02, -0.118031764000000E+03),\n new google.maps.LatLng( 0.465033360000000E+02, -0.118031831000000E+03),\n new google.maps.LatLng( 0.465044610000000E+02, -0.118038302000000E+03),\n new google.maps.LatLng( 0.465072280000000E+02, -0.118049027000000E+03),\n new google.maps.LatLng( 0.465070010000000E+02, -0.118061408000000E+03),\n new google.maps.LatLng( 0.465057660000000E+02, -0.118066837000000E+03),\n new google.maps.LatLng( 0.465062230000000E+02, -0.118070445000000E+03),\n new google.maps.LatLng( 0.465080740000000E+02, -0.118077696000000E+03),\n new google.maps.LatLng( 0.465139030000000E+02, -0.118077400000000E+03),\n new google.maps.LatLng( 0.465160290000000E+02, -0.118075811000000E+03),\n new google.maps.LatLng( 0.465214230000000E+02, -0.118067633000000E+03),\n new google.maps.LatLng( 0.465231610000000E+02, -0.118063361000000E+03),\n new google.maps.LatLng( 0.465298360000000E+02, -0.118057102000000E+03),\n new google.maps.LatLng( 0.465375840000000E+02, -0.118052563000000E+03),\n new google.maps.LatLng( 0.465419270000000E+02, -0.118052860000000E+03),\n new google.maps.LatLng( 0.465421780000000E+02, -0.118055213000000E+03),\n new google.maps.LatLng( 0.465439610000000E+02, -0.118058459000000E+03),\n new google.maps.LatLng( 0.465515270000000E+02, -0.118057862000000E+03),\n new google.maps.LatLng( 0.465522590000000E+02, -0.118060943000000E+03),\n new google.maps.LatLng( 0.465522360000000E+02, -0.118063097000000E+03),\n new google.maps.LatLng( 0.465592070000000E+02, -0.118069194000000E+03),\n new google.maps.LatLng( 0.465625200000000E+02, -0.118078772000000E+03),\n new google.maps.LatLng( 0.465623820000000E+02, -0.118084571000000E+03),\n new google.maps.LatLng( 0.465633640000000E+02, -0.118087290000000E+03),\n new google.maps.LatLng( 0.465646670000000E+02, -0.118088583000000E+03),\n new google.maps.LatLng( 0.465662440000000E+02, -0.118088915000000E+03),\n new google.maps.LatLng( 0.465673180000000E+02, -0.118088617000000E+03),\n new google.maps.LatLng( 0.465674100000000E+02, -0.118088187000000E+03),\n new google.maps.LatLng( 0.465657190000000E+02, -0.118087026000000E+03),\n new google.maps.LatLng( 0.465657420000000E+02, -0.118086396000000E+03),\n new google.maps.LatLng( 0.465676390000000E+02, -0.118086132000000E+03),\n new google.maps.LatLng( 0.465689640000000E+02, -0.118086630000000E+03),\n new google.maps.LatLng( 0.465722780000000E+02, -0.118089614000000E+03),\n new google.maps.LatLng( 0.465722780000000E+02, -0.118089614000000E+03),\n new google.maps.LatLng( 0.465733760000000E+02, -0.118087692000000E+03),\n new google.maps.LatLng( 0.465737890000000E+02, -0.118083350000000E+03),\n new google.maps.LatLng( 0.465721680000000E+02, -0.118069992000000E+03),\n new google.maps.LatLng( 0.465722820000000E+02, -0.118063860000000E+03),\n new google.maps.LatLng( 0.465739050000000E+02, -0.118055242000000E+03),\n new google.maps.LatLng( 0.465769440000000E+02, -0.118046026000000E+03),\n new google.maps.LatLng( 0.465788850000000E+02, -0.118038037000000E+03),\n new google.maps.LatLng( 0.465797540000000E+02, -0.118037241000000E+03),\n new google.maps.LatLng( 0.465814390000000E+02, -0.118030100000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "039f80a929d4c3610e1aa5eee5bec0ae", "score": "0.5950987", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.460737340000000E+02, -0.118839590000000E+03),\n new google.maps.LatLng( 0.460701380000000E+02, -0.118837145000000E+03),\n new google.maps.LatLng( 0.460665960000000E+02, -0.118837139000000E+03),\n new google.maps.LatLng( 0.460641720000000E+02, -0.118838481000000E+03),\n new google.maps.LatLng( 0.460619780000000E+02, -0.118838018000000E+03),\n new google.maps.LatLng( 0.460585060000000E+02, -0.118835189000000E+03),\n new google.maps.LatLng( 0.460523650000000E+02, -0.118834015000000E+03),\n new google.maps.LatLng( 0.460468980000000E+02, -0.118833790000000E+03),\n new google.maps.LatLng( 0.460453440000000E+02, -0.118834249000000E+03),\n new google.maps.LatLng( 0.460468290000000E+02, -0.118836482000000E+03),\n new google.maps.LatLng( 0.460424850000000E+02, -0.118842387000000E+03),\n new google.maps.LatLng( 0.460350330000000E+02, -0.118847175000000E+03),\n new google.maps.LatLng( 0.460340500000000E+02, -0.118847142000000E+03),\n new google.maps.LatLng( 0.460326790000000E+02, -0.118845763000000E+03),\n new google.maps.LatLng( 0.460315820000000E+02, -0.118845400000000E+03),\n new google.maps.LatLng( 0.460296170000000E+02, -0.118846351000000E+03),\n new google.maps.LatLng( 0.460262780000000E+02, -0.118852419000000E+03),\n new google.maps.LatLng( 0.460257510000000E+02, -0.118855273000000E+03),\n new google.maps.LatLng( 0.460260480000000E+02, -0.118856947000000E+03),\n new google.maps.LatLng( 0.460154650000000E+02, -0.118856643000000E+03),\n new google.maps.LatLng( 0.460047690000000E+02, -0.118855356000000E+03),\n new google.maps.LatLng( 0.460032380000000E+02, -0.118853813000000E+03),\n new google.maps.LatLng( 0.460006953061063E+02, -0.118852741634825E+03),\n new google.maps.LatLng( 0.460006953061063E+02, -0.118852741634825E+03),\n new google.maps.LatLng( 0.460006345437220E+02, -0.118897071581278E+03),\n new google.maps.LatLng( 0.460005740000000E+02, -0.118941242000000E+03),\n new google.maps.LatLng( 0.459999949602405E+02, -0.118978196655696E+03),\n new google.maps.LatLng( 0.459999949602405E+02, -0.118978196655696E+03),\n new google.maps.LatLng( 0.460095750000000E+02, -0.118965539000000E+03),\n new google.maps.LatLng( 0.460211650000000E+02, -0.118944909000000E+03),\n new google.maps.LatLng( 0.460243880000000E+02, -0.118942154000000E+03),\n new google.maps.LatLng( 0.460266280000000E+02, -0.118939004000000E+03),\n new google.maps.LatLng( 0.460271080000000E+02, -0.118938053000000E+03),\n new google.maps.LatLng( 0.460265130000000E+02, -0.118936445000000E+03),\n new google.maps.LatLng( 0.460281590000000E+02, -0.118934280000000E+03),\n new google.maps.LatLng( 0.460293020000000E+02, -0.118933984000000E+03),\n new google.maps.LatLng( 0.460302390000000E+02, -0.118934411000000E+03),\n new google.maps.LatLng( 0.460358610000000E+02, -0.118937790000000E+03),\n new google.maps.LatLng( 0.460395640000000E+02, -0.118941367000000E+03),\n new google.maps.LatLng( 0.460426270000000E+02, -0.118941696000000E+03),\n new google.maps.LatLng( 0.460481580000000E+02, -0.118939825000000E+03),\n new google.maps.LatLng( 0.460510150000000E+02, -0.118937823000000E+03),\n new google.maps.LatLng( 0.460524320000000E+02, -0.118936478000000E+03),\n new google.maps.LatLng( 0.460567510000000E+02, -0.118930043000000E+03),\n new google.maps.LatLng( 0.460580300000000E+02, -0.118922623000000E+03),\n new google.maps.LatLng( 0.460592180000000E+02, -0.118921704000000E+03),\n new google.maps.LatLng( 0.460603610000000E+02, -0.118921638000000E+03),\n new google.maps.LatLng( 0.460607720000000E+02, -0.118919504000000E+03),\n new google.maps.LatLng( 0.460593760000000E+02, -0.118909261000000E+03),\n new google.maps.LatLng( 0.460570210000000E+02, -0.118905290000000E+03),\n new google.maps.LatLng( 0.460561970000000E+02, -0.118901811000000E+03),\n new google.maps.LatLng( 0.460564480000000E+02, -0.118900366000000E+03),\n new google.maps.LatLng( 0.460584130000000E+02, -0.118899446000000E+03),\n new google.maps.LatLng( 0.460589840000000E+02, -0.118896754000000E+03),\n new google.maps.LatLng( 0.460571300000000E+02, -0.118890845000000E+03),\n new google.maps.LatLng( 0.460550680000000E+02, -0.118879292000000E+03),\n new google.maps.LatLng( 0.460580400000000E+02, -0.118866920000000E+03),\n new google.maps.LatLng( 0.460575570000000E+02, -0.118876109000000E+03),\n new google.maps.LatLng( 0.460588870000000E+02, -0.118882801000000E+03),\n new google.maps.LatLng( 0.460595490000000E+02, -0.118882504000000E+03),\n new google.maps.LatLng( 0.460581740000000E+02, -0.118876109000000E+03),\n new google.maps.LatLng( 0.460595250000000E+02, -0.118869023000000E+03),\n new google.maps.LatLng( 0.460617660000000E+02, -0.118866464000000E+03),\n new google.maps.LatLng( 0.460641650000000E+02, -0.118867747000000E+03),\n new google.maps.LatLng( 0.460662660000000E+02, -0.118871361000000E+03),\n new google.maps.LatLng( 0.460665390000000E+02, -0.118873758000000E+03),\n new google.maps.LatLng( 0.460624970000000E+02, -0.118882337000000E+03),\n new google.maps.LatLng( 0.460623620000000E+02, -0.118886803000000E+03),\n new google.maps.LatLng( 0.460653570000000E+02, -0.118887161000000E+03),\n new google.maps.LatLng( 0.460666820000000E+02, -0.118888013000000E+03),\n new google.maps.LatLng( 0.460685580000000E+02, -0.118891065000000E+03),\n new google.maps.LatLng( 0.460691300000000E+02, -0.118893200000000E+03),\n new google.maps.LatLng( 0.460689710000000E+02, -0.118896188000000E+03),\n new google.maps.LatLng( 0.460670530000000E+02, -0.118901246000000E+03),\n new google.maps.LatLng( 0.460649960000000E+02, -0.118902462000000E+03),\n new google.maps.LatLng( 0.460633970000000E+02, -0.118902660000000E+03),\n new google.maps.LatLng( 0.460615230000000E+02, -0.118904007000000E+03),\n new google.maps.LatLng( 0.460603350000000E+02, -0.118905649000000E+03),\n new google.maps.LatLng( 0.460600840000000E+02, -0.118906766000000E+03),\n new google.maps.LatLng( 0.460606640000000E+02, -0.118910552000000E+03),\n new google.maps.LatLng( 0.460606640000000E+02, -0.118910552000000E+03),\n new google.maps.LatLng( 0.460616720000000E+02, -0.118909657000000E+03),\n new google.maps.LatLng( 0.460681030000000E+02, -0.118907940000000E+03),\n new google.maps.LatLng( 0.460784360000000E+02, -0.118907775000000E+03),\n new google.maps.LatLng( 0.460895220000000E+02, -0.118910758000000E+03),\n new google.maps.LatLng( 0.461038750000000E+02, -0.118913347000000E+03),\n new google.maps.LatLng( 0.461098870000000E+02, -0.118914924000000E+03),\n new google.maps.LatLng( 0.461124450000000E+02, -0.118916411000000E+03),\n new google.maps.LatLng( 0.461155930000000E+02, -0.118920233000000E+03),\n new google.maps.LatLng( 0.461176950000000E+02, -0.118920930000000E+03),\n new google.maps.LatLng( 0.461387680000000E+02, -0.118918952000000E+03),\n new google.maps.LatLng( 0.461384290000000E+02, -0.118868444000000E+03),\n new google.maps.LatLng( 0.461365060000000E+02, -0.118874524000000E+03),\n new google.maps.LatLng( 0.461349750000000E+02, -0.118874030000000E+03),\n new google.maps.LatLng( 0.461304290000000E+02, -0.118870014000000E+03),\n new google.maps.LatLng( 0.461163420000000E+02, -0.118868459000000E+03),\n new google.maps.LatLng( 0.461014870000000E+02, -0.118867523000000E+03),\n new google.maps.LatLng( 0.460946570000000E+02, -0.118860092000000E+03),\n new google.maps.LatLng( 0.460804670000000E+02, -0.118851835000000E+03),\n new google.maps.LatLng( 0.460699710000000E+02, -0.118866144000000E+03),\n new google.maps.LatLng( 0.460692850000000E+02, -0.118866964000000E+03),\n new google.maps.LatLng( 0.460683250000000E+02, -0.118867128000000E+03),\n new google.maps.LatLng( 0.460692870000000E+02, -0.118862105000000E+03),\n new google.maps.LatLng( 0.460729930000000E+02, -0.118853208000000E+03),\n new google.maps.LatLng( 0.460740700000000E+02, -0.118844442000000E+03),\n new google.maps.LatLng( 0.460740720000000E+02, -0.118840041000000E+03),\n new google.maps.LatLng( 0.460737340000000E+02, -0.118839590000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "e5eafcc4ca3e795b0241fd54ed6b5a6d", "score": "0.595087", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.474078690000000E+02, -0.119172261000000E+03),\n new google.maps.LatLng( 0.474082700000000E+02, -0.119212756000000E+03),\n new google.maps.LatLng( 0.474097090000000E+02, -0.119255534000000E+03),\n new google.maps.LatLng( 0.474100740000000E+02, -0.119255946000000E+03),\n new google.maps.LatLng( 0.473950100000000E+02, -0.119255964000000E+03),\n new google.maps.LatLng( 0.473953610000000E+02, -0.119277161000000E+03),\n new google.maps.LatLng( 0.473807850000000E+02, -0.119277238000000E+03),\n new google.maps.LatLng( 0.473820970000000E+02, -0.119349192000000E+03),\n new google.maps.LatLng( 0.473820970000000E+02, -0.119349192000000E+03),\n new google.maps.LatLng( 0.473821090000000E+02, -0.119349998000000E+03),\n new google.maps.LatLng( 0.473858770000000E+02, -0.119355215000000E+03),\n new google.maps.LatLng( 0.473917250000000E+02, -0.119356027000000E+03),\n new google.maps.LatLng( 0.473955870000000E+02, -0.119353137000000E+03),\n new google.maps.LatLng( 0.474023270000000E+02, -0.119352603000000E+03),\n new google.maps.LatLng( 0.474078540000000E+02, -0.119357184000000E+03),\n new google.maps.LatLng( 0.474111930000000E+02, -0.119348639000000E+03),\n new google.maps.LatLng( 0.474131130000000E+02, -0.119346150000000E+03),\n new google.maps.LatLng( 0.474141650000000E+02, -0.119343793000000E+03),\n new google.maps.LatLng( 0.474171700000000E+02, -0.119326125000000E+03),\n new google.maps.LatLng( 0.474174550000000E+02, -0.119309968000000E+03),\n new google.maps.LatLng( 0.474206110000000E+02, -0.119289634000000E+03),\n new google.maps.LatLng( 0.474225050000000E+02, -0.119282428000000E+03),\n new google.maps.LatLng( 0.474251550000000E+02, -0.119282629000000E+03),\n new google.maps.LatLng( 0.474257500000000E+02, -0.119283436000000E+03),\n new google.maps.LatLng( 0.474248610000000E+02, -0.119293975000000E+03),\n new google.maps.LatLng( 0.474251130000000E+02, -0.119319830000000E+03),\n new google.maps.LatLng( 0.474314190000000E+02, -0.119319764000000E+03),\n new google.maps.LatLng( 0.474318760000000E+02, -0.119315084000000E+03),\n new google.maps.LatLng( 0.474309850000000E+02, -0.119313434000000E+03),\n new google.maps.LatLng( 0.474304600000000E+02, -0.119307374000000E+03),\n new google.maps.LatLng( 0.474320350000000E+02, -0.119293804000000E+03),\n new google.maps.LatLng( 0.474358230000000E+02, -0.119277000000000E+03),\n new google.maps.LatLng( 0.474358230000000E+02, -0.119277000000000E+03),\n new google.maps.LatLng( 0.474274840000000E+02, -0.119277375000000E+03),\n new google.maps.LatLng( 0.474272310000000E+02, -0.119271686000000E+03),\n new google.maps.LatLng( 0.474250110000000E+02, -0.119262429000000E+03),\n new google.maps.LatLng( 0.474253980000000E+02, -0.119257008000000E+03),\n new google.maps.LatLng( 0.474324890000000E+02, -0.119219507000000E+03),\n new google.maps.LatLng( 0.474296350000000E+02, -0.119213007000000E+03),\n new google.maps.LatLng( 0.474285850000000E+02, -0.119205902000000E+03),\n new google.maps.LatLng( 0.474206590000000E+02, -0.119193040000000E+03),\n new google.maps.LatLng( 0.474188310000000E+02, -0.119187922000000E+03),\n new google.maps.LatLng( 0.474178940000000E+02, -0.119181526000000E+03),\n new google.maps.LatLng( 0.474145350000000E+02, -0.119176612000000E+03),\n new google.maps.LatLng( 0.474146030000000E+02, -0.119172472000000E+03),\n new google.maps.LatLng( 0.474154710000000E+02, -0.119170451000000E+03),\n new google.maps.LatLng( 0.474111990000000E+02, -0.119170789000000E+03),\n new google.maps.LatLng( 0.474078690000000E+02, -0.119172261000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "6a22896df8d374d24c43c5f50070d028", "score": "0.59505975", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.484321480000000E+02, -0.121037821000000E+03),\n new google.maps.LatLng( 0.484332480000000E+02, -0.121037021000000E+03),\n new google.maps.LatLng( 0.484457480000000E+02, -0.121040622000000E+03),\n new google.maps.LatLng( 0.484479480000000E+02, -0.121044222000000E+03),\n new google.maps.LatLng( 0.484481480000000E+02, -0.121045622000000E+03),\n new google.maps.LatLng( 0.484472480000000E+02, -0.121047022000000E+03),\n new google.maps.LatLng( 0.484472480000000E+02, -0.121047922000000E+03),\n new google.maps.LatLng( 0.484486480000000E+02, -0.121052322000000E+03),\n new google.maps.LatLng( 0.484525480000000E+02, -0.121058822000000E+03),\n new google.maps.LatLng( 0.484537480000000E+02, -0.121060022000000E+03),\n new google.maps.LatLng( 0.484594480000000E+02, -0.121062023000000E+03),\n new google.maps.LatLng( 0.484772480000000E+02, -0.121056723000000E+03),\n new google.maps.LatLng( 0.484862490000000E+02, -0.121048423000000E+03),\n new google.maps.LatLng( 0.484896490000000E+02, -0.121042523000000E+03),\n new google.maps.LatLng( 0.484947490000000E+02, -0.121035823000000E+03),\n new google.maps.LatLng( 0.484951490000000E+02, -0.121033923000000E+03),\n new google.maps.LatLng( 0.484953490000000E+02, -0.121023023000000E+03),\n new google.maps.LatLng( 0.484942490000000E+02, -0.121017123000000E+03),\n new google.maps.LatLng( 0.484940500000000E+02, -0.121008023000000E+03),\n new google.maps.LatLng( 0.484944500000000E+02, -0.121000323000000E+03),\n new google.maps.LatLng( 0.484949500000000E+02, -0.120998023000000E+03),\n new google.maps.LatLng( 0.484970500000000E+02, -0.120996423000000E+03),\n new google.maps.LatLng( 0.484990500000000E+02, -0.120992423000000E+03),\n new google.maps.LatLng( 0.484982500000000E+02, -0.120990422000000E+03),\n new google.maps.LatLng( 0.484978500000000E+02, -0.120986622000000E+03),\n new google.maps.LatLng( 0.484980500000000E+02, -0.120985122000000E+03),\n new google.maps.LatLng( 0.484987500000000E+02, -0.120984222000000E+03),\n new google.maps.LatLng( 0.484998510000000E+02, -0.120976645000000E+03),\n new google.maps.LatLng( 0.484998510000000E+02, -0.120972924000000E+03),\n new google.maps.LatLng( 0.484991510000000E+02, -0.120971622000000E+03),\n new google.maps.LatLng( 0.484983510000000E+02, -0.120965122000000E+03),\n new google.maps.LatLng( 0.484987510000000E+02, -0.120962922000000E+03),\n new google.maps.LatLng( 0.485006500000000E+02, -0.120959751000000E+03),\n new google.maps.LatLng( 0.485010770000000E+02, -0.120957471000000E+03),\n new google.maps.LatLng( 0.485003560000000E+02, -0.120954658000000E+03),\n new google.maps.LatLng( 0.484998510000000E+02, -0.120954306000000E+03),\n new google.maps.LatLng( 0.484998510000000E+02, -0.120950597000000E+03),\n new google.maps.LatLng( 0.485063280000000E+02, -0.120948194000000E+03),\n new google.maps.LatLng( 0.485091490000000E+02, -0.120948052000000E+03),\n new google.maps.LatLng( 0.485150800000000E+02, -0.120949285000000E+03),\n new google.maps.LatLng( 0.485219600000000E+02, -0.120955285000000E+03),\n new google.maps.LatLng( 0.485294180000000E+02, -0.120950988000000E+03),\n new google.maps.LatLng( 0.485299860000000E+02, -0.120949925000000E+03),\n new google.maps.LatLng( 0.485306740000000E+02, -0.120938656000000E+03),\n new google.maps.LatLng( 0.485274660000000E+02, -0.120930236000000E+03),\n new google.maps.LatLng( 0.485265660000000E+02, -0.120929469000000E+03),\n new google.maps.LatLng( 0.485243470000000E+02, -0.120921065000000E+03),\n new google.maps.LatLng( 0.485232580000000E+02, -0.120905531000000E+03),\n new google.maps.LatLng( 0.485237770000000E+02, -0.120903683000000E+03),\n new google.maps.LatLng( 0.485257640000000E+02, -0.120902202000000E+03),\n new google.maps.LatLng( 0.485304340000000E+02, -0.120904315000000E+03),\n new google.maps.LatLng( 0.485318750000000E+02, -0.120904514000000E+03),\n new google.maps.LatLng( 0.485332930000000E+02, -0.120904085000000E+03),\n new google.maps.LatLng( 0.485346420000000E+02, -0.120896404000000E+03),\n new google.maps.LatLng( 0.485381480000000E+02, -0.120885955000000E+03),\n new google.maps.LatLng( 0.485350160000000E+02, -0.120875379000000E+03),\n new google.maps.LatLng( 0.485309350000000E+02, -0.120872117000000E+03),\n new google.maps.LatLng( 0.485299920000000E+02, -0.120862813000000E+03),\n new google.maps.LatLng( 0.485369110000000E+02, -0.120857496000000E+03),\n new google.maps.LatLng( 0.485379030000000E+02, -0.120857586000000E+03),\n new google.maps.LatLng( 0.485406050000000E+02, -0.120860596000000E+03),\n new google.maps.LatLng( 0.485422870000000E+02, -0.120861217000000E+03),\n new google.maps.LatLng( 0.485450140000000E+02, -0.120860594000000E+03),\n new google.maps.LatLng( 0.485484540000000E+02, -0.120857560000000E+03),\n new google.maps.LatLng( 0.485487630000000E+02, -0.120854114000000E+03),\n new google.maps.LatLng( 0.485477670000000E+02, -0.120850852000000E+03),\n new google.maps.LatLng( 0.485481330000000E+02, -0.120845710000000E+03),\n new google.maps.LatLng( 0.485486410000000E+02, -0.120844816000000E+03),\n new google.maps.LatLng( 0.485501640000000E+02, -0.120843841000000E+03),\n new google.maps.LatLng( 0.485507250000000E+02, -0.120838913000000E+03),\n new google.maps.LatLng( 0.485451530000000E+02, -0.120824008000000E+03),\n new google.maps.LatLng( 0.485433540000000E+02, -0.120825594000000E+03),\n new google.maps.LatLng( 0.485415750000000E+02, -0.120825848000000E+03),\n new google.maps.LatLng( 0.485407230000000E+02, -0.120825200000000E+03),\n new google.maps.LatLng( 0.485377000000000E+02, -0.120817040000000E+03),\n new google.maps.LatLng( 0.485366880000000E+02, -0.120815680000000E+03),\n new google.maps.LatLng( 0.485346140000000E+02, -0.120816352000000E+03),\n new google.maps.LatLng( 0.485319970000000E+02, -0.120812084000000E+03),\n new google.maps.LatLng( 0.485295700000000E+02, -0.120809398000000E+03),\n new google.maps.LatLng( 0.485285950000000E+02, -0.120809382000000E+03),\n new google.maps.LatLng( 0.485277630000000E+02, -0.120810065000000E+03),\n new google.maps.LatLng( 0.485231420000000E+02, -0.120816999000000E+03),\n new google.maps.LatLng( 0.485200310000000E+02, -0.120817934000000E+03),\n new google.maps.LatLng( 0.485192760000000E+02, -0.120817344000000E+03),\n new google.maps.LatLng( 0.485148020000000E+02, -0.120810088000000E+03),\n new google.maps.LatLng( 0.485113380000000E+02, -0.120803274000000E+03),\n new google.maps.LatLng( 0.485074730000000E+02, -0.120792100000000E+03),\n new google.maps.LatLng( 0.485064490000000E+02, -0.120787729000000E+03),\n new google.maps.LatLng( 0.485083880000000E+02, -0.120781311000000E+03),\n new google.maps.LatLng( 0.485075450000000E+02, -0.120773887000000E+03),\n new google.maps.LatLng( 0.485081990000000E+02, -0.120767133000000E+03),\n new google.maps.LatLng( 0.485117210000000E+02, -0.120754194000000E+03),\n new google.maps.LatLng( 0.485124420000000E+02, -0.120752847000000E+03),\n new google.maps.LatLng( 0.485150210000000E+02, -0.120751217000000E+03),\n new google.maps.LatLng( 0.485180640000000E+02, -0.120745305000000E+03),\n new google.maps.LatLng( 0.485185010000000E+02, -0.120740992000000E+03),\n new google.maps.LatLng( 0.485182620000000E+02, -0.120735644000000E+03),\n new google.maps.LatLng( 0.485181420000000E+02, -0.120734818000000E+03),\n new google.maps.LatLng( 0.485177610000000E+02, -0.120732178000000E+03),\n new google.maps.LatLng( 0.485180220000000E+02, -0.120727978000000E+03),\n new google.maps.LatLng( 0.485229830000000E+02, -0.120716456000000E+03),\n new google.maps.LatLng( 0.485236930000000E+02, -0.120708596000000E+03),\n new google.maps.LatLng( 0.485263230000000E+02, -0.120705182000000E+03),\n new google.maps.LatLng( 0.485316200000000E+02, -0.120701557000000E+03),\n new google.maps.LatLng( 0.485316200000000E+02, -0.120701557000000E+03),\n new google.maps.LatLng( 0.485325270000000E+02, -0.120695935000000E+03),\n new google.maps.LatLng( 0.485320870000000E+02, -0.120690171000000E+03),\n new google.maps.LatLng( 0.485307730000000E+02, -0.120687615000000E+03),\n new google.maps.LatLng( 0.485306410000000E+02, -0.120683955000000E+03),\n new google.maps.LatLng( 0.485335090000000E+02, -0.120663942000000E+03),\n new google.maps.LatLng( 0.485352300000000E+02, -0.120658350000000E+03),\n new google.maps.LatLng( 0.485368910000000E+02, -0.120655052000000E+03),\n new google.maps.LatLng( 0.485365850000000E+02, -0.120651747000000E+03),\n new google.maps.LatLng( 0.485322370000000E+02, -0.120648262000000E+03),\n new google.maps.LatLng( 0.485268810000000E+02, -0.120648971000000E+03),\n new google.maps.LatLng( 0.485258980000000E+02, -0.120649890000000E+03),\n new google.maps.LatLng( 0.485246290000000E+02, -0.120652827000000E+03),\n new google.maps.LatLng( 0.485234020000000E+02, -0.120654430000000E+03),\n new google.maps.LatLng( 0.485209610000000E+02, -0.120656301000000E+03),\n new google.maps.LatLng( 0.485160750000000E+02, -0.120657229000000E+03),\n new google.maps.LatLng( 0.485069890000000E+02, -0.120655797000000E+03),\n new google.maps.LatLng( 0.485057520000000E+02, -0.120649617000000E+03),\n new google.maps.LatLng( 0.485003260000000E+02, -0.120633066000000E+03),\n new google.maps.LatLng( 0.484988600000000E+02, -0.120629812000000E+03),\n new google.maps.LatLng( 0.484965600000000E+02, -0.120628212000000E+03),\n new google.maps.LatLng( 0.484952600000000E+02, -0.120631512000000E+03),\n new google.maps.LatLng( 0.484960600000000E+02, -0.120634112000000E+03),\n new google.maps.LatLng( 0.484955600000000E+02, -0.120639013000000E+03),\n new google.maps.LatLng( 0.484887590000000E+02, -0.120649613000000E+03),\n new google.maps.LatLng( 0.484850590000000E+02, -0.120652813000000E+03),\n new google.maps.LatLng( 0.484820590000000E+02, -0.120654013000000E+03),\n new google.maps.LatLng( 0.484776590000000E+02, -0.120652213000000E+03),\n new google.maps.LatLng( 0.484749590000000E+02, -0.120645512000000E+03),\n new google.maps.LatLng( 0.484729590000000E+02, -0.120637512000000E+03),\n new google.maps.LatLng( 0.484694600000000E+02, -0.120631812000000E+03),\n new google.maps.LatLng( 0.484691600000000E+02, -0.120632012000000E+03),\n new google.maps.LatLng( 0.484683590000000E+02, -0.120635912000000E+03),\n new google.maps.LatLng( 0.484689590000000E+02, -0.120639812000000E+03),\n new google.maps.LatLng( 0.484681590000000E+02, -0.120642412000000E+03),\n new google.maps.LatLng( 0.484610590000000E+02, -0.120650912000000E+03),\n new google.maps.LatLng( 0.484595590000000E+02, -0.120651512000000E+03),\n new google.maps.LatLng( 0.484579590000000E+02, -0.120651512000000E+03),\n new google.maps.LatLng( 0.484527590000000E+02, -0.120654612000000E+03),\n new google.maps.LatLng( 0.484517590000000E+02, -0.120661013000000E+03),\n new google.maps.LatLng( 0.484517590000000E+02, -0.120666013000000E+03),\n new google.maps.LatLng( 0.484477260000000E+02, -0.120666814000000E+03),\n new google.maps.LatLng( 0.484469590000000E+02, -0.120665613000000E+03),\n new google.maps.LatLng( 0.484447590000000E+02, -0.120665313000000E+03),\n new google.maps.LatLng( 0.484415590000000E+02, -0.120663612000000E+03),\n new google.maps.LatLng( 0.484411590000000E+02, -0.120658312000000E+03),\n new google.maps.LatLng( 0.484378590000000E+02, -0.120652412000000E+03),\n new google.maps.LatLng( 0.484367590000000E+02, -0.120651312000000E+03),\n new google.maps.LatLng( 0.484339590000000E+02, -0.120650912000000E+03),\n new google.maps.LatLng( 0.484316590000000E+02, -0.120651312000000E+03),\n new google.maps.LatLng( 0.484308590000000E+02, -0.120653112000000E+03),\n new google.maps.LatLng( 0.484306590000000E+02, -0.120655612000000E+03),\n new google.maps.LatLng( 0.484292590000000E+02, -0.120655712000000E+03),\n new google.maps.LatLng( 0.484271590000000E+02, -0.120654312000000E+03),\n new google.maps.LatLng( 0.484250590000000E+02, -0.120652112000000E+03),\n new google.maps.LatLng( 0.484191590000000E+02, -0.120649612000000E+03),\n new google.maps.LatLng( 0.484143590000000E+02, -0.120649511000000E+03),\n new google.maps.LatLng( 0.484125590000000E+02, -0.120647311000000E+03),\n new google.maps.LatLng( 0.484120590000000E+02, -0.120645811000000E+03),\n new google.maps.LatLng( 0.484089590000000E+02, -0.120644211000000E+03),\n new google.maps.LatLng( 0.484012590000000E+02, -0.120644911000000E+03),\n new google.maps.LatLng( 0.483991590000000E+02, -0.120648711000000E+03),\n new google.maps.LatLng( 0.483976590000000E+02, -0.120650311000000E+03),\n new google.maps.LatLng( 0.483963590000000E+02, -0.120648611000000E+03),\n new google.maps.LatLng( 0.483970590000000E+02, -0.120642411000000E+03),\n new google.maps.LatLng( 0.483965590000000E+02, -0.120630711000000E+03),\n new google.maps.LatLng( 0.483981600000000E+02, -0.120621310000000E+03),\n new google.maps.LatLng( 0.483914600000000E+02, -0.120608510000000E+03),\n new google.maps.LatLng( 0.483901600000000E+02, -0.120607410000000E+03),\n new google.maps.LatLng( 0.483855600000000E+02, -0.120600010000000E+03),\n new google.maps.LatLng( 0.483840600000000E+02, -0.120588809000000E+03),\n new google.maps.LatLng( 0.483805600000000E+02, -0.120585909000000E+03),\n new google.maps.LatLng( 0.483796600000000E+02, -0.120583809000000E+03),\n new google.maps.LatLng( 0.483781610000000E+02, -0.120573709000000E+03),\n new google.maps.LatLng( 0.483766610000000E+02, -0.120570509000000E+03),\n new google.maps.LatLng( 0.483763610000000E+02, -0.120568809000000E+03),\n new google.maps.LatLng( 0.483762030000000E+02, -0.120567440000000E+03),\n new google.maps.LatLng( 0.483715610000000E+02, -0.120562608000000E+03),\n new google.maps.LatLng( 0.483630610000000E+02, -0.120562308000000E+03),\n new google.maps.LatLng( 0.483592610000000E+02, -0.120565108000000E+03),\n new google.maps.LatLng( 0.483495610000000E+02, -0.120568808000000E+03),\n new google.maps.LatLng( 0.483468610000000E+02, -0.120573008000000E+03),\n new google.maps.LatLng( 0.483446600000000E+02, -0.120577608000000E+03),\n new google.maps.LatLng( 0.483380600000000E+02, -0.120583808000000E+03),\n new google.maps.LatLng( 0.483353600000000E+02, -0.120585008000000E+03),\n new google.maps.LatLng( 0.483306600000000E+02, -0.120584508000000E+03),\n new google.maps.LatLng( 0.483286600000000E+02, -0.120583708000000E+03),\n new google.maps.LatLng( 0.483272690000000E+02, -0.120583902000000E+03),\n new google.maps.LatLng( 0.483217580000000E+02, -0.120587538000000E+03),\n new google.maps.LatLng( 0.483217580000000E+02, -0.120587538000000E+03),\n new google.maps.LatLng( 0.483190600000000E+02, -0.120583208000000E+03),\n new google.maps.LatLng( 0.483183600000000E+02, -0.120575708000000E+03),\n new google.maps.LatLng( 0.483164610000000E+02, -0.120565108000000E+03),\n new google.maps.LatLng( 0.483093610000000E+02, -0.120553507000000E+03),\n new google.maps.LatLng( 0.483071680000000E+02, -0.120551821000000E+03),\n new google.maps.LatLng( 0.483071680000000E+02, -0.120551821000000E+03),\n new google.maps.LatLng( 0.483050130000000E+02, -0.120554873000000E+03),\n new google.maps.LatLng( 0.483037760000000E+02, -0.120554959000000E+03),\n new google.maps.LatLng( 0.482993910000000E+02, -0.120550749000000E+03),\n new google.maps.LatLng( 0.482952190000000E+02, -0.120549900000000E+03),\n new google.maps.LatLng( 0.482941610000000E+02, -0.120548134000000E+03),\n new google.maps.LatLng( 0.482921660000000E+02, -0.120546407000000E+03),\n new google.maps.LatLng( 0.482898280000000E+02, -0.120546332000000E+03),\n new google.maps.LatLng( 0.482883460000000E+02, -0.120548221000000E+03),\n new google.maps.LatLng( 0.482874370000000E+02, -0.120554929000000E+03),\n new google.maps.LatLng( 0.482835700000000E+02, -0.120564261000000E+03),\n new google.maps.LatLng( 0.482824950000000E+02, -0.120565151000000E+03),\n new google.maps.LatLng( 0.482779460000000E+02, -0.120565902000000E+03),\n new google.maps.LatLng( 0.482697120000000E+02, -0.120573527000000E+03),\n new google.maps.LatLng( 0.482687990000000E+02, -0.120580533000000E+03),\n new google.maps.LatLng( 0.482725250000000E+02, -0.120593659000000E+03),\n new google.maps.LatLng( 0.482732650000000E+02, -0.120597979000000E+03),\n new google.maps.LatLng( 0.482727430000000E+02, -0.120601181000000E+03),\n new google.maps.LatLng( 0.482717270000000E+02, -0.120603223000000E+03),\n new google.maps.LatLng( 0.482708230000000E+02, -0.120603513000000E+03),\n new google.maps.LatLng( 0.482697040000000E+02, -0.120611068000000E+03),\n new google.maps.LatLng( 0.482666770000000E+02, -0.120621349000000E+03),\n new google.maps.LatLng( 0.482666770000000E+02, -0.120621349000000E+03),\n new google.maps.LatLng( 0.482679330000000E+02, -0.120621497000000E+03),\n new google.maps.LatLng( 0.482771810000000E+02, -0.120629269000000E+03),\n new google.maps.LatLng( 0.482797630000000E+02, -0.120630020000000E+03),\n new google.maps.LatLng( 0.482860930000000E+02, -0.120635283000000E+03),\n new google.maps.LatLng( 0.482905710000000E+02, -0.120636956000000E+03),\n new google.maps.LatLng( 0.482971530000000E+02, -0.120644994000000E+03),\n new google.maps.LatLng( 0.483044870000000E+02, -0.120651527000000E+03),\n new google.maps.LatLng( 0.483071840000000E+02, -0.120654813000000E+03),\n new google.maps.LatLng( 0.483137180000000E+02, -0.120658746000000E+03),\n new google.maps.LatLng( 0.483213740000000E+02, -0.120670352000000E+03),\n new google.maps.LatLng( 0.483228360000000E+02, -0.120672955000000E+03),\n new google.maps.LatLng( 0.483229500000000E+02, -0.120674770000000E+03),\n new google.maps.LatLng( 0.483195930000000E+02, -0.120675764000000E+03),\n new google.maps.LatLng( 0.483136760000000E+02, -0.120675766000000E+03),\n new google.maps.LatLng( 0.483069370000000E+02, -0.120670735000000E+03),\n new google.maps.LatLng( 0.483028710000000E+02, -0.120671489000000E+03),\n new google.maps.LatLng( 0.482964510000000E+02, -0.120667521000000E+03),\n new google.maps.LatLng( 0.482948060000000E+02, -0.120666392000000E+03),\n new google.maps.LatLng( 0.482890250000000E+02, -0.120660061000000E+03),\n new google.maps.LatLng( 0.482885220000000E+02, -0.120656228000000E+03),\n new google.maps.LatLng( 0.482816900000000E+02, -0.120652536000000E+03),\n new google.maps.LatLng( 0.482786520000000E+02, -0.120651580000000E+03),\n new google.maps.LatLng( 0.482753840000000E+02, -0.120648161000000E+03),\n new google.maps.LatLng( 0.482740350000000E+02, -0.120644432000000E+03),\n new google.maps.LatLng( 0.482731440000000E+02, -0.120643338000000E+03),\n new google.maps.LatLng( 0.482675460000000E+02, -0.120638586000000E+03),\n new google.maps.LatLng( 0.482584770000000E+02, -0.120632122000000E+03),\n new google.maps.LatLng( 0.482584770000000E+02, -0.120632122000000E+03),\n new google.maps.LatLng( 0.482531850000000E+02, -0.120640451000000E+03),\n new google.maps.LatLng( 0.482557860000000E+02, -0.120641406000000E+03),\n new google.maps.LatLng( 0.482569110000000E+02, -0.120642483000000E+03),\n new google.maps.LatLng( 0.482588410000000E+02, -0.120654440000000E+03),\n new google.maps.LatLng( 0.482498580000000E+02, -0.120669901000000E+03),\n new google.maps.LatLng( 0.482465030000000E+02, -0.120680048000000E+03),\n new google.maps.LatLng( 0.482463330000000E+02, -0.120682948000000E+03),\n new google.maps.LatLng( 0.482469850000000E+02, -0.120688039000000E+03),\n new google.maps.LatLng( 0.482481700000000E+02, -0.120690898000000E+03),\n new google.maps.LatLng( 0.482498570000000E+02, -0.120692490000000E+03),\n new google.maps.LatLng( 0.482542560000000E+02, -0.120694277000000E+03),\n new google.maps.LatLng( 0.482598750000000E+02, -0.120692279000000E+03),\n new google.maps.LatLng( 0.482669540000000E+02, -0.120694032000000E+03),\n new google.maps.LatLng( 0.482821160000000E+02, -0.120694893000000E+03),\n new google.maps.LatLng( 0.482839010000000E+02, -0.120696791000000E+03),\n new google.maps.LatLng( 0.482872780000000E+02, -0.120697262000000E+03),\n new google.maps.LatLng( 0.482896960000000E+02, -0.120696707000000E+03),\n new google.maps.LatLng( 0.482907980000000E+02, -0.120694314000000E+03),\n new google.maps.LatLng( 0.482913370000000E+02, -0.120691457000000E+03),\n new google.maps.LatLng( 0.482940260000000E+02, -0.120690656000000E+03),\n new google.maps.LatLng( 0.482996890000000E+02, -0.120687851000000E+03),\n new google.maps.LatLng( 0.483020900000000E+02, -0.120685987000000E+03),\n new google.maps.LatLng( 0.483096090000000E+02, -0.120684829000000E+03),\n new google.maps.LatLng( 0.483178190000000E+02, -0.120700300000000E+03),\n new google.maps.LatLng( 0.483170160000000E+02, -0.120710807000000E+03),\n new google.maps.LatLng( 0.483156890000000E+02, -0.120715009000000E+03),\n new google.maps.LatLng( 0.483148760000000E+02, -0.120723551000000E+03),\n new google.maps.LatLng( 0.483148170000000E+02, -0.120728081000000E+03),\n new google.maps.LatLng( 0.483167740000000E+02, -0.120732149000000E+03),\n new google.maps.LatLng( 0.483183960000000E+02, -0.120731025000000E+03),\n new google.maps.LatLng( 0.483232970000000E+02, -0.120730223000000E+03),\n new google.maps.LatLng( 0.483254920000000E+02, -0.120731427000000E+03),\n new google.maps.LatLng( 0.483271380000000E+02, -0.120733627000000E+03),\n new google.maps.LatLng( 0.483290650000000E+02, -0.120731908000000E+03),\n new google.maps.LatLng( 0.483319000000000E+02, -0.120727731000000E+03),\n new google.maps.LatLng( 0.483352140000000E+02, -0.120719614000000E+03),\n new google.maps.LatLng( 0.483372930000000E+02, -0.120718896000000E+03),\n new google.maps.LatLng( 0.483417710000000E+02, -0.120714820000000E+03),\n new google.maps.LatLng( 0.483396710000000E+02, -0.120709062000000E+03),\n new google.maps.LatLng( 0.483395800000000E+02, -0.120707726000000E+03),\n new google.maps.LatLng( 0.483432570000000E+02, -0.120707864000000E+03),\n new google.maps.LatLng( 0.483472770000000E+02, -0.120712664000000E+03),\n new google.maps.LatLng( 0.483480070000000E+02, -0.120715817000000E+03),\n new google.maps.LatLng( 0.483475500000000E+02, -0.120717873000000E+03),\n new google.maps.LatLng( 0.483499480000000E+02, -0.120722569000000E+03),\n new google.maps.LatLng( 0.483509160000000E+02, -0.120725843000000E+03),\n new google.maps.LatLng( 0.483501740000000E+02, -0.120728978000000E+03),\n new google.maps.LatLng( 0.483482550000000E+02, -0.120730621000000E+03),\n new google.maps.LatLng( 0.483475680000000E+02, -0.120732540000000E+03),\n new google.maps.LatLng( 0.483471090000000E+02, -0.120738434000000E+03),\n new google.maps.LatLng( 0.483480640000000E+02, -0.120748442000000E+03),\n new google.maps.LatLng( 0.483447040000000E+02, -0.120754464000000E+03),\n new google.maps.LatLng( 0.483445680000000E+02, -0.120757309000000E+03),\n new google.maps.LatLng( 0.483475930000000E+02, -0.120766245000000E+03),\n new google.maps.LatLng( 0.483459700000000E+02, -0.120777297000000E+03),\n new google.maps.LatLng( 0.483416310000000E+02, -0.120792290000000E+03),\n new google.maps.LatLng( 0.483386300000000E+02, -0.120800817000000E+03),\n new google.maps.LatLng( 0.483445820000000E+02, -0.120806475000000E+03),\n new google.maps.LatLng( 0.483468780000000E+02, -0.120810315000000E+03),\n new google.maps.LatLng( 0.483563650000000E+02, -0.120819539000000E+03),\n new google.maps.LatLng( 0.483571150000000E+02, -0.120827094000000E+03),\n new google.maps.LatLng( 0.483573810000000E+02, -0.120842031000000E+03),\n new google.maps.LatLng( 0.483605100000000E+02, -0.120851832000000E+03),\n new google.maps.LatLng( 0.483748530000000E+02, -0.120855680000000E+03),\n new google.maps.LatLng( 0.483827530000000E+02, -0.120857014000000E+03),\n new google.maps.LatLng( 0.483901490000000E+02, -0.120865227000000E+03),\n new google.maps.LatLng( 0.484109440000000E+02, -0.120876217000000E+03),\n new google.maps.LatLng( 0.484062020000000E+02, -0.120882622000000E+03),\n new google.maps.LatLng( 0.484027370000000E+02, -0.120883910000000E+03),\n new google.maps.LatLng( 0.484022230000000E+02, -0.120884705000000E+03),\n new google.maps.LatLng( 0.484013580000000E+02, -0.120887359000000E+03),\n new google.maps.LatLng( 0.484020060000000E+02, -0.120891657000000E+03),\n new google.maps.LatLng( 0.483994340000000E+02, -0.120895988000000E+03),\n new google.maps.LatLng( 0.483987860000000E+02, -0.120896629000000E+03),\n new google.maps.LatLng( 0.483939810000000E+02, -0.120895620000000E+03),\n new google.maps.LatLng( 0.483893870000000E+02, -0.120898495000000E+03),\n new google.maps.LatLng( 0.483859000000000E+02, -0.120907491000000E+03),\n new google.maps.LatLng( 0.483859570000000E+02, -0.120913792000000E+03),\n new google.maps.LatLng( 0.483907950000000E+02, -0.120924178000000E+03),\n new google.maps.LatLng( 0.483879750000000E+02, -0.120925326000000E+03),\n new google.maps.LatLng( 0.483869850000000E+02, -0.120926312000000E+03),\n new google.maps.LatLng( 0.483868710000000E+02, -0.120927972000000E+03),\n new google.maps.LatLng( 0.483882720000000E+02, -0.120935714000000E+03),\n new google.maps.LatLng( 0.483898500000000E+02, -0.120937664000000E+03),\n new google.maps.LatLng( 0.483897040000000E+02, -0.120948094000000E+03),\n new google.maps.LatLng( 0.483910950000000E+02, -0.120956895000000E+03),\n new google.maps.LatLng( 0.483937260000000E+02, -0.120958517000000E+03),\n new google.maps.LatLng( 0.483994950000000E+02, -0.120957487000000E+03),\n new google.maps.LatLng( 0.484067000000000E+02, -0.120954625000000E+03),\n new google.maps.LatLng( 0.484169300000000E+02, -0.120955108000000E+03),\n new google.maps.LatLng( 0.484294680000000E+02, -0.120954987000000E+03),\n new google.maps.LatLng( 0.484322700000000E+02, -0.120956462000000E+03),\n new google.maps.LatLng( 0.484340540000000E+02, -0.120971384000000E+03),\n new google.maps.LatLng( 0.484314190000000E+02, -0.120979192000000E+03),\n new google.maps.LatLng( 0.484316850000000E+02, -0.120984343000000E+03),\n new google.maps.LatLng( 0.484327430000000E+02, -0.120987747000000E+03),\n new google.maps.LatLng( 0.484292690000000E+02, -0.121004459000000E+03),\n new google.maps.LatLng( 0.484307130000000E+02, -0.121010283000000E+03),\n new google.maps.LatLng( 0.484318660000000E+02, -0.121013002000000E+03),\n new google.maps.LatLng( 0.484309370000000E+02, -0.121017061000000E+03),\n new google.maps.LatLng( 0.484331830000000E+02, -0.121026623000000E+03),\n new google.maps.LatLng( 0.484329920000000E+02, -0.121028943000000E+03),\n new google.maps.LatLng( 0.484320160000000E+02, -0.121030439000000E+03),\n new google.maps.LatLng( 0.484306590000000E+02, -0.121034815000000E+03),\n new google.maps.LatLng( 0.484321480000000E+02, -0.121037821000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "722fbda8e29d3423835387dba923ab24", "score": "0.59502506", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.466351300000000E+02, -0.123283722000000E+03),\n new google.maps.LatLng( 0.466331390000000E+02, -0.123281236000000E+03),\n new google.maps.LatLng( 0.466248230000000E+02, -0.123282088000000E+03),\n new google.maps.LatLng( 0.466218130000000E+02, -0.123275858000000E+03),\n new google.maps.LatLng( 0.466168200000000E+02, -0.123274170000000E+03),\n new google.maps.LatLng( 0.466029310000000E+02, -0.123275450000000E+03),\n new google.maps.LatLng( 0.466008960000000E+02, -0.123275916000000E+03),\n new google.maps.LatLng( 0.465957190000000E+02, -0.123279092000000E+03),\n new google.maps.LatLng( 0.465960520000000E+02, -0.123279998000000E+03),\n new google.maps.LatLng( 0.465972860000000E+02, -0.123280527000000E+03),\n new google.maps.LatLng( 0.465955270000000E+02, -0.123285072000000E+03),\n new google.maps.LatLng( 0.465907510000000E+02, -0.123290745000000E+03),\n new google.maps.LatLng( 0.465893570000000E+02, -0.123290314000000E+03),\n new google.maps.LatLng( 0.465877110000000E+02, -0.123288524000000E+03),\n new google.maps.LatLng( 0.465867510000000E+02, -0.123288790000000E+03),\n new google.maps.LatLng( 0.465857700000000E+02, -0.123295985000000E+03),\n new google.maps.LatLng( 0.465847870000000E+02, -0.123297477000000E+03),\n new google.maps.LatLng( 0.465815890000000E+02, -0.123299305000000E+03),\n new google.maps.LatLng( 0.465815620000000E+02, -0.123294033000000E+03),\n new google.maps.LatLng( 0.465692000000000E+02, -0.123294289000000E+03),\n new google.maps.LatLng( 0.465672770000000E+02, -0.123293007000000E+03),\n new google.maps.LatLng( 0.465661110000000E+02, -0.123291483000000E+03),\n new google.maps.LatLng( 0.465633440000000E+02, -0.123285453000000E+03),\n new google.maps.LatLng( 0.465632510000000E+02, -0.123281144000000E+03),\n new google.maps.LatLng( 0.465625370000000E+02, -0.123280685000000E+03),\n new google.maps.LatLng( 0.465561640000000E+02, -0.123279161000000E+03),\n new google.maps.LatLng( 0.465528510000000E+02, -0.123281946000000E+03),\n new google.maps.LatLng( 0.465509310000000E+02, -0.123282643000000E+03),\n new google.maps.LatLng( 0.465475250000000E+02, -0.123282678000000E+03),\n new google.maps.LatLng( 0.465460390000000E+02, -0.123281817000000E+03),\n new google.maps.LatLng( 0.465445280000000E+02, -0.123276848000000E+03),\n new google.maps.LatLng( 0.465433790000000E+02, -0.123260086000000E+03),\n new google.maps.LatLng( 0.465430770000000E+02, -0.123251252000000E+03),\n new google.maps.LatLng( 0.465434680000000E+02, -0.123247620000000E+03),\n new google.maps.LatLng( 0.465411850000000E+02, -0.123240428000000E+03),\n new google.maps.LatLng( 0.465417800000000E+02, -0.123238640000000E+03),\n new google.maps.LatLng( 0.465448440000000E+02, -0.123238046000000E+03),\n new google.maps.LatLng( 0.465465130000000E+02, -0.123237087000000E+03),\n new google.maps.LatLng( 0.465468570000000E+02, -0.123234536000000E+03),\n new google.maps.LatLng( 0.465407760000000E+02, -0.123236187000000E+03),\n new google.maps.LatLng( 0.465407760000000E+02, -0.123236187000000E+03),\n new google.maps.LatLng( 0.465364290000000E+02, -0.123243604000000E+03),\n new google.maps.LatLng( 0.465291150000000E+02, -0.123241013000000E+03),\n new google.maps.LatLng( 0.465247720000000E+02, -0.123241108000000E+03),\n new google.maps.LatLng( 0.465161990000000E+02, -0.123243583000000E+03),\n new google.maps.LatLng( 0.465166760000000E+02, -0.123251933000000E+03),\n new google.maps.LatLng( 0.465172940000000E+02, -0.123253025000000E+03),\n new google.maps.LatLng( 0.465206320000000E+02, -0.123254180000000E+03),\n new google.maps.LatLng( 0.465225510000000E+02, -0.123253880000000E+03),\n new google.maps.LatLng( 0.465236030000000E+02, -0.123252985000000E+03),\n new google.maps.LatLng( 0.465293640000000E+02, -0.123254535000000E+03),\n new google.maps.LatLng( 0.465319710000000E+02, -0.123256254000000E+03),\n new google.maps.LatLng( 0.465339380000000E+02, -0.123258869000000E+03),\n new google.maps.LatLng( 0.465339650000000E+02, -0.123268972000000E+03),\n new google.maps.LatLng( 0.465380830000000E+02, -0.123277515000000E+03),\n new google.maps.LatLng( 0.465421530000000E+02, -0.123283575000000E+03),\n new google.maps.LatLng( 0.465440750000000E+02, -0.123289372000000E+03),\n new google.maps.LatLng( 0.465441670000000E+02, -0.123295335000000E+03),\n new google.maps.LatLng( 0.465397790000000E+02, -0.123296860000000E+03),\n new google.maps.LatLng( 0.465403050000000E+02, -0.123301994000000E+03),\n new google.maps.LatLng( 0.465397790000000E+02, -0.123303452000000E+03),\n new google.maps.LatLng( 0.465353220000000E+02, -0.123302691000000E+03),\n new google.maps.LatLng( 0.465344760000000E+02, -0.123303122000000E+03),\n new google.maps.LatLng( 0.465332650000000E+02, -0.123304248000000E+03),\n new google.maps.LatLng( 0.465316880000000E+02, -0.123308754000000E+03),\n new google.maps.LatLng( 0.465316650000000E+02, -0.123310476000000E+03),\n new google.maps.LatLng( 0.465328990000000E+02, -0.123310641000000E+03),\n new google.maps.LatLng( 0.465336760000000E+02, -0.123312331000000E+03),\n new google.maps.LatLng( 0.465345220000000E+02, -0.123324851000000E+03),\n new google.maps.LatLng( 0.465325100000000E+02, -0.123328693000000E+03),\n new google.maps.LatLng( 0.465301290000000E+02, -0.123345550000000E+03),\n new google.maps.LatLng( 0.465284840000000E+02, -0.123346377000000E+03),\n new google.maps.LatLng( 0.465254420000000E+02, -0.123350879000000E+03),\n new google.maps.LatLng( 0.465260780000000E+02, -0.123359060000000E+03),\n new google.maps.LatLng( 0.465320610000000E+02, -0.123359115000000E+03),\n new google.maps.LatLng( 0.465320610000000E+02, -0.123359115000000E+03),\n new google.maps.LatLng( 0.465566600000000E+02, -0.123359554000000E+03),\n new google.maps.LatLng( 0.465591350000000E+02, -0.123359673000000E+03),\n new google.maps.LatLng( 0.465628580000000E+02, -0.123359854000000E+03),\n new google.maps.LatLng( 0.465629840000000E+02, -0.123366501000000E+03),\n new google.maps.LatLng( 0.465882990000000E+02, -0.123365479000000E+03),\n new google.maps.LatLng( 0.466066790000000E+02, -0.123365939000000E+03),\n new google.maps.LatLng( 0.466066790000000E+02, -0.123365939000000E+03),\n new google.maps.LatLng( 0.466064240000000E+02, -0.123364967000000E+03),\n new google.maps.LatLng( 0.466023790000000E+02, -0.123363007000000E+03),\n new google.maps.LatLng( 0.466022190000000E+02, -0.123362144000000E+03),\n new google.maps.LatLng( 0.466031570000000E+02, -0.123358762000000E+03),\n new google.maps.LatLng( 0.466056050000000E+02, -0.123353723000000E+03),\n new google.maps.LatLng( 0.466079840000000E+02, -0.123350806000000E+03),\n new google.maps.LatLng( 0.466083950000000E+02, -0.123350474000000E+03),\n new google.maps.LatLng( 0.466099950000000E+02, -0.123350873000000E+03),\n new google.maps.LatLng( 0.466171990000000E+02, -0.123335187000000E+03),\n new google.maps.LatLng( 0.466224570000000E+02, -0.123329416000000E+03),\n new google.maps.LatLng( 0.466270400000000E+02, -0.123321122000000E+03),\n new google.maps.LatLng( 0.466308570000000E+02, -0.123304598000000E+03),\n new google.maps.LatLng( 0.466319080000000E+02, -0.123296866000000E+03),\n new google.maps.LatLng( 0.466325700000000E+02, -0.123295406000000E+03),\n new google.maps.LatLng( 0.466330960000000E+02, -0.123295240000000E+03),\n new google.maps.LatLng( 0.466347020000000E+02, -0.123296899000000E+03),\n new google.maps.LatLng( 0.466347470000000E+02, -0.123284765000000E+03),\n new google.maps.LatLng( 0.466351300000000E+02, -0.123283722000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "7cc41bca48a6a562d62c4aa5c35eb1f8", "score": "0.5949524", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.482980510000000E+02, -0.119670344000000E+03),\n new google.maps.LatLng( 0.482937950000000E+02, -0.119675319000000E+03),\n new google.maps.LatLng( 0.482852310000000E+02, -0.119692809000000E+03),\n new google.maps.LatLng( 0.482838600000000E+02, -0.119696881000000E+03),\n new google.maps.LatLng( 0.482830830000000E+02, -0.119701570000000E+03),\n new google.maps.LatLng( 0.482815520000000E+02, -0.119703896000000E+03),\n new google.maps.LatLng( 0.482796780000000E+02, -0.119708344000000E+03),\n new google.maps.LatLng( 0.482777120000000E+02, -0.119717857000000E+03),\n new google.maps.LatLng( 0.482762490000000E+02, -0.119721791000000E+03),\n new google.maps.LatLng( 0.482707190000000E+02, -0.119729690000000E+03),\n new google.maps.LatLng( 0.482695770000000E+02, -0.119730031000000E+03),\n new google.maps.LatLng( 0.482689150000000E+02, -0.119729654000000E+03),\n new google.maps.LatLng( 0.482681390000000E+02, -0.119728182000000E+03),\n new google.maps.LatLng( 0.482670200000000E+02, -0.119727258000000E+03),\n new google.maps.LatLng( 0.482656950000000E+02, -0.119728728000000E+03),\n new google.maps.LatLng( 0.482655340000000E+02, -0.119730096000000E+03),\n new google.maps.LatLng( 0.482645750000000E+02, -0.119730540000000E+03),\n new google.maps.LatLng( 0.482640040000000E+02, -0.119730197000000E+03),\n new google.maps.LatLng( 0.482640040000000E+02, -0.119730197000000E+03),\n new google.maps.LatLng( 0.482642320000000E+02, -0.119732011000000E+03),\n new google.maps.LatLng( 0.482660810000000E+02, -0.119733928000000E+03),\n new google.maps.LatLng( 0.482661260000000E+02, -0.119735058000000E+03),\n new google.maps.LatLng( 0.482575820000000E+02, -0.119739633000000E+03),\n new google.maps.LatLng( 0.482426260000000E+02, -0.119741846000000E+03),\n new google.maps.LatLng( 0.482424410000000E+02, -0.119746291000000E+03),\n new google.maps.LatLng( 0.482426910000000E+02, -0.119747215000000E+03),\n new google.maps.LatLng( 0.482437870000000E+02, -0.119747729000000E+03),\n new google.maps.LatLng( 0.482441060000000E+02, -0.119749884000000E+03),\n new google.maps.LatLng( 0.482438840000000E+02, -0.119760576000000E+03),\n new google.maps.LatLng( 0.482446410000000E+02, -0.119773261000000E+03),\n new google.maps.LatLng( 0.482457150000000E+02, -0.119775414000000E+03),\n new google.maps.LatLng( 0.482514220000000E+02, -0.119773899000000E+03),\n new google.maps.LatLng( 0.482561520000000E+02, -0.119779061000000E+03),\n new google.maps.LatLng( 0.482588470000000E+02, -0.119784121000000E+03),\n new google.maps.LatLng( 0.482595560000000E+02, -0.119787302000000E+03),\n new google.maps.LatLng( 0.482588260000000E+02, -0.119791680000000E+03),\n new google.maps.LatLng( 0.482617740000000E+02, -0.119799136000000E+03),\n new google.maps.LatLng( 0.482624590000000E+02, -0.119799957000000E+03),\n new google.maps.LatLng( 0.482638750000000E+02, -0.119799854000000E+03),\n new google.maps.LatLng( 0.482637610000000E+02, -0.119798247000000E+03),\n new google.maps.LatLng( 0.482642400000000E+02, -0.119797802000000E+03),\n new google.maps.LatLng( 0.482682150000000E+02, -0.119802350000000E+03),\n new google.maps.LatLng( 0.482699280000000E+02, -0.119805053000000E+03),\n new google.maps.LatLng( 0.482718240000000E+02, -0.119810937000000E+03),\n new google.maps.LatLng( 0.482722580000000E+02, -0.119819833000000E+03),\n new google.maps.LatLng( 0.482718010000000E+02, -0.119825033000000E+03),\n new google.maps.LatLng( 0.482702010000000E+02, -0.119829616000000E+03),\n new google.maps.LatLng( 0.482699270000000E+02, -0.119833585000000E+03),\n new google.maps.LatLng( 0.482709770000000E+02, -0.119834440000000E+03),\n new google.maps.LatLng( 0.482715710000000E+02, -0.119835742000000E+03),\n new google.maps.LatLng( 0.482720040000000E+02, -0.119839505000000E+03),\n new google.maps.LatLng( 0.482699460000000E+02, -0.119845833000000E+03),\n new google.maps.LatLng( 0.482692610000000E+02, -0.119846482000000E+03),\n new google.maps.LatLng( 0.482685530000000E+02, -0.119845798000000E+03),\n new google.maps.LatLng( 0.482678220000000E+02, -0.119846105000000E+03),\n new google.maps.LatLng( 0.482644630000000E+02, -0.119851029000000E+03),\n new google.maps.LatLng( 0.482649650000000E+02, -0.119854005000000E+03),\n new google.maps.LatLng( 0.482660140000000E+02, -0.119855169000000E+03),\n new google.maps.LatLng( 0.482676340000000E+02, -0.119858729000000E+03),\n new google.maps.LatLng( 0.482670610000000E+02, -0.119863380000000E+03),\n new google.maps.LatLng( 0.482687040000000E+02, -0.119867487000000E+03),\n new google.maps.LatLng( 0.482687040000000E+02, -0.119867487000000E+03),\n new google.maps.LatLng( 0.482702100000000E+02, -0.119870875000000E+03),\n new google.maps.LatLng( 0.482781580000000E+02, -0.119871056000000E+03),\n new google.maps.LatLng( 0.482820870000000E+02, -0.119868494000000E+03),\n new google.maps.LatLng( 0.482837780000000E+02, -0.119866237000000E+03),\n new google.maps.LatLng( 0.482846490000000E+02, -0.119861105000000E+03),\n new google.maps.LatLng( 0.482866140000000E+02, -0.119857206000000E+03),\n new google.maps.LatLng( 0.482902920000000E+02, -0.119855190000000E+03),\n new google.maps.LatLng( 0.482924160000000E+02, -0.119854952000000E+03),\n new google.maps.LatLng( 0.482953840000000E+02, -0.119857282000000E+03),\n new google.maps.LatLng( 0.482983970000000E+02, -0.119863309000000E+03),\n new google.maps.LatLng( 0.482998330000000E+02, -0.119868376000000E+03),\n new google.maps.LatLng( 0.482999220000000E+02, -0.119873683000000E+03),\n new google.maps.LatLng( 0.483047450000000E+02, -0.119881203000000E+03),\n new google.maps.LatLng( 0.483121640000000E+02, -0.119872226000000E+03),\n new google.maps.LatLng( 0.483134460000000E+02, -0.119866748000000E+03),\n new google.maps.LatLng( 0.483115490000000E+02, -0.119856193000000E+03),\n new google.maps.LatLng( 0.483137020000000E+02, -0.119855998000000E+03),\n new google.maps.LatLng( 0.483214440000000E+02, -0.119857477000000E+03),\n new google.maps.LatLng( 0.483231790000000E+02, -0.119859293000000E+03),\n new google.maps.LatLng( 0.483237940000000E+02, -0.119861657000000E+03),\n new google.maps.LatLng( 0.483336130000000E+02, -0.119866326000000E+03),\n new google.maps.LatLng( 0.483378610000000E+02, -0.119867187000000E+03),\n new google.maps.LatLng( 0.483407830000000E+02, -0.119869863000000E+03),\n new google.maps.LatLng( 0.483491840000000E+02, -0.119875808000000E+03),\n new google.maps.LatLng( 0.483512670000000E+02, -0.119879201000000E+03),\n new google.maps.LatLng( 0.483520890000000E+02, -0.119879748000000E+03),\n new google.maps.LatLng( 0.483578020000000E+02, -0.119878689000000E+03),\n new google.maps.LatLng( 0.483573640000000E+02, -0.119876967000000E+03),\n new google.maps.LatLng( 0.483537760000000E+02, -0.119873921000000E+03),\n new google.maps.LatLng( 0.483564730000000E+02, -0.119869813000000E+03),\n new google.maps.LatLng( 0.483558580000000E+02, -0.119866899000000E+03),\n new google.maps.LatLng( 0.483531410000000E+02, -0.119863984000000E+03),\n new google.maps.LatLng( 0.483509040000000E+02, -0.119863090000000E+03),\n new google.maps.LatLng( 0.483475030000000E+02, -0.119857604000000E+03),\n new google.maps.LatLng( 0.483412750000000E+02, -0.119839372000000E+03),\n new google.maps.LatLng( 0.483412760000000E+02, -0.119833959000000E+03),\n new google.maps.LatLng( 0.483415510000000E+02, -0.119832555000000E+03),\n new google.maps.LatLng( 0.483422130000000E+02, -0.119831802000000E+03),\n new google.maps.LatLng( 0.483453650000000E+02, -0.119830604000000E+03),\n new google.maps.LatLng( 0.483471700000000E+02, -0.119829234000000E+03),\n new google.maps.LatLng( 0.483480380000000E+02, -0.119825740000000E+03),\n new google.maps.LatLng( 0.483487010000000E+02, -0.119825192000000E+03),\n new google.maps.LatLng( 0.483531090000000E+02, -0.119825502000000E+03),\n new google.maps.LatLng( 0.483551870000000E+02, -0.119826153000000E+03),\n new google.maps.LatLng( 0.483569460000000E+02, -0.119825606000000E+03),\n new google.maps.LatLng( 0.483634100000000E+02, -0.119821666000000E+03),\n new google.maps.LatLng( 0.483667680000000E+02, -0.119812960000000E+03),\n new google.maps.LatLng( 0.483675210000000E+02, -0.119808608000000E+03),\n new google.maps.LatLng( 0.483652830000000E+02, -0.119802850000000E+03),\n new google.maps.LatLng( 0.483676120000000E+02, -0.119797982000000E+03),\n new google.maps.LatLng( 0.483703530000000E+02, -0.119796645000000E+03),\n new google.maps.LatLng( 0.483729570000000E+02, -0.119796027000000E+03),\n new google.maps.LatLng( 0.483719510000000E+02, -0.119793318000000E+03),\n new google.maps.LatLng( 0.483695990000000E+02, -0.119792942000000E+03),\n new google.maps.LatLng( 0.483655469609375E+02, -0.119794177802344E+03),\n new google.maps.LatLng( 0.483627020000000E+02, -0.119795618000000E+03),\n new google.maps.LatLng( 0.483615140000000E+02, -0.119797949000000E+03),\n new google.maps.LatLng( 0.483602810000000E+02, -0.119802919000000E+03),\n new google.maps.LatLng( 0.483561250000000E+02, -0.119810424000000E+03),\n new google.maps.LatLng( 0.483426490000000E+02, -0.119813541000000E+03),\n new google.maps.LatLng( 0.483405940000000E+02, -0.119812239000000E+03),\n new google.maps.LatLng( 0.483396120000000E+02, -0.119807854000000E+03),\n new google.maps.LatLng( 0.483406850000000E+02, -0.119805182000000E+03),\n new google.maps.LatLng( 0.483435170000000E+02, -0.119804634000000E+03),\n new google.maps.LatLng( 0.483458470000000E+02, -0.119801756000000E+03),\n new google.maps.LatLng( 0.483456640000000E+02, -0.119797438000000E+03),\n new google.maps.LatLng( 0.483450920000000E+02, -0.119795416000000E+03),\n new google.maps.LatLng( 0.483427860000000E+02, -0.119795588000000E+03),\n new google.maps.LatLng( 0.483418950000000E+02, -0.119795075000000E+03),\n new google.maps.LatLng( 0.483391310000000E+02, -0.119790451000000E+03),\n new google.maps.LatLng( 0.483382620000000E+02, -0.119787163000000E+03),\n new google.maps.LatLng( 0.483361150000000E+02, -0.119786410000000E+03),\n new google.maps.LatLng( 0.483317070000000E+02, -0.119785933000000E+03),\n new google.maps.LatLng( 0.483322530000000E+02, -0.119779286000000E+03),\n new google.maps.LatLng( 0.483354270000000E+02, -0.119775242000000E+03),\n new google.maps.LatLng( 0.483371370000000E+02, -0.119764382000000E+03),\n new google.maps.LatLng( 0.483373880000000E+02, -0.119763800000000E+03),\n new google.maps.LatLng( 0.483376060000000E+02, -0.119764019000000E+03),\n new google.maps.LatLng( 0.483374470000000E+02, -0.119761687000000E+03),\n new google.maps.LatLng( 0.483362730000000E+02, -0.119759253000000E+03),\n new google.maps.LatLng( 0.483334410000000E+02, -0.119755336000000E+03),\n new google.maps.LatLng( 0.483323190000000E+02, -0.119749407000000E+03),\n new google.maps.LatLng( 0.483323190000000E+02, -0.119749407000000E+03),\n new google.maps.LatLng( 0.483309170000000E+02, -0.119748615000000E+03),\n new google.maps.LatLng( 0.483279970000000E+02, -0.119743234000000E+03),\n new google.maps.LatLng( 0.483267220000000E+02, -0.119733916000000E+03),\n new google.maps.LatLng( 0.483245310000000E+02, -0.119730078000000E+03),\n new google.maps.LatLng( 0.483172340000000E+02, -0.119720914000000E+03),\n new google.maps.LatLng( 0.483064010000000E+02, -0.119713971000000E+03),\n new google.maps.LatLng( 0.483042320000000E+02, -0.119705582000000E+03),\n new google.maps.LatLng( 0.483031590000000E+02, -0.119703561000000E+03),\n new google.maps.LatLng( 0.483005320000000E+02, -0.119704759000000E+03),\n new google.maps.LatLng( 0.482988880000000E+02, -0.119706915000000E+03),\n new google.maps.LatLng( 0.482979740000000E+02, -0.119707393000000E+03),\n new google.maps.LatLng( 0.482936110000000E+02, -0.119707802000000E+03),\n new google.maps.LatLng( 0.482911680000000E+02, -0.119706877000000E+03),\n new google.maps.LatLng( 0.482910540000000E+02, -0.119702941000000E+03),\n new google.maps.LatLng( 0.482937040000000E+02, -0.119690037000000E+03),\n new google.maps.LatLng( 0.482937730000000E+02, -0.119685554000000E+03),\n new google.maps.LatLng( 0.482873540000000E+02, -0.119693241000000E+03),\n new google.maps.LatLng( 0.482863580000000E+02, -0.119691712000000E+03),\n new google.maps.LatLng( 0.482931850000000E+02, -0.119679650000000E+03),\n new google.maps.LatLng( 0.482973360000000E+02, -0.119679939000000E+03),\n new google.maps.LatLng( 0.482997110000000E+02, -0.119675865000000E+03),\n new google.maps.LatLng( 0.483006470000000E+02, -0.119673708000000E+03),\n new google.maps.LatLng( 0.483008310000000E+02, -0.119671346000000E+03),\n new google.maps.LatLng( 0.482980510000000E+02, -0.119670344000000E+03),\n ];\n\n return zipCoords\n}", "title": "" }, { "docid": "e8129371c3ed028a3a7a99ef1d6bbc7b", "score": "0.5948995", "text": "function constructZipCodeArray() \n{ \n\n var zipCoords = [ \n new google.maps.LatLng( 0.470861610000000E+02, -0.117854706000000E+03),\n new google.maps.LatLng( 0.470856590000000E+02, -0.117853368000000E+03),\n new google.maps.LatLng( 0.470825980000000E+02, -0.117851190000000E+03),\n new google.maps.LatLng( 0.470798080000000E+02, -0.117851791000000E+03),\n new google.maps.LatLng( 0.470760140000000E+02, -0.117851888000000E+03),\n new google.maps.LatLng( 0.470749210000000E+02, -0.117842185000000E+03),\n new google.maps.LatLng( 0.470620990000000E+02, -0.117842144000000E+03),\n new google.maps.LatLng( 0.470540980000000E+02, -0.117844414000000E+03),\n new google.maps.LatLng( 0.470464410000000E+02, -0.117847285000000E+03),\n new google.maps.LatLng( 0.470467440000000E+02, -0.117810837000000E+03),\n new google.maps.LatLng( 0.470183110000000E+02, -0.117810538000000E+03),\n new google.maps.LatLng( 0.470167800000000E+02, -0.117811373000000E+03),\n new google.maps.LatLng( 0.470030210000000E+02, -0.117808867000000E+03),\n new google.maps.LatLng( 0.470028830000000E+02, -0.117797074000000E+03),\n new google.maps.LatLng( 0.469980310000000E+02, -0.117770684000000E+03),\n new google.maps.LatLng( 0.469968410000000E+02, -0.117768145000000E+03),\n new google.maps.LatLng( 0.469942120000000E+02, -0.117766711000000E+03),\n new google.maps.LatLng( 0.469933430000000E+02, -0.117765375000000E+03),\n new google.maps.LatLng( 0.469916960000000E+02, -0.117760233000000E+03),\n new google.maps.LatLng( 0.469924030000000E+02, -0.117757326000000E+03),\n new google.maps.LatLng( 0.469949140000000E+02, -0.117752279000000E+03),\n new google.maps.LatLng( 0.470009950000000E+02, -0.117747205000000E+03),\n new google.maps.LatLng( 0.470030760000000E+02, -0.117744435000000E+03),\n new google.maps.LatLng( 0.470038320000000E+02, -0.117741429000000E+03),\n new google.maps.LatLng( 0.470050510000000E+02, -0.117723987000000E+03),\n new google.maps.LatLng( 0.470014170000000E+02, -0.117721646000000E+03),\n new google.maps.LatLng( 0.469984680000000E+02, -0.117724653000000E+03),\n new google.maps.LatLng( 0.469829480000000E+02, -0.117725644000000E+03),\n new google.maps.LatLng( 0.469819420000000E+02, -0.117725376000000E+03),\n new google.maps.LatLng( 0.469802300000000E+02, -0.117718720000000E+03),\n new google.maps.LatLng( 0.469812150000000E+02, -0.117711315000000E+03),\n new google.maps.LatLng( 0.469825420000000E+02, -0.117707475000000E+03),\n new google.maps.LatLng( 0.469838450000000E+02, -0.117706406000000E+03),\n new google.maps.LatLng( 0.469879590000000E+02, -0.117706909000000E+03),\n new google.maps.LatLng( 0.469890560000000E+02, -0.117706609000000E+03),\n new google.maps.LatLng( 0.469894680000000E+02, -0.117705807000000E+03),\n new google.maps.LatLng( 0.469881880000000E+02, -0.117701799000000E+03),\n new google.maps.LatLng( 0.469838690000000E+02, -0.117697689000000E+03),\n new google.maps.LatLng( 0.469827030000000E+02, -0.117692779000000E+03),\n new google.maps.LatLng( 0.469834120000000E+02, -0.117690508000000E+03),\n new google.maps.LatLng( 0.469834350000000E+02, -0.117688371000000E+03),\n new google.maps.LatLng( 0.469816060000000E+02, -0.117680588000000E+03),\n new google.maps.LatLng( 0.469803720000000E+02, -0.117677583000000E+03),\n new google.maps.LatLng( 0.469797770000000E+02, -0.117673475000000E+03),\n new google.maps.LatLng( 0.469798220000000E+02, -0.117666962000000E+03),\n new google.maps.LatLng( 0.469806680000000E+02, -0.117663021000000E+03),\n new google.maps.LatLng( 0.469833870000000E+02, -0.117660849000000E+03),\n new google.maps.LatLng( 0.469912030000000E+02, -0.117656737000000E+03),\n new google.maps.LatLng( 0.469917970000000E+02, -0.117655734000000E+03),\n new google.maps.LatLng( 0.469893690000000E+02, -0.117641072000000E+03),\n new google.maps.LatLng( 0.469898710000000E+02, -0.117638331000000E+03),\n new google.maps.LatLng( 0.469912410000000E+02, -0.117635190000000E+03),\n new google.maps.LatLng( 0.469983720000000E+02, -0.117633045000000E+03),\n new google.maps.LatLng( 0.470007010000000E+02, -0.117631204000000E+03),\n new google.maps.LatLng( 0.470027340000000E+02, -0.117627894000000E+03),\n new google.maps.LatLng( 0.470031670000000E+02, -0.117624038000000E+03),\n new google.maps.LatLng( 0.470028020000000E+02, -0.117623603000000E+03),\n new google.maps.LatLng( 0.470006530000000E+02, -0.117623801000000E+03),\n new google.maps.LatLng( 0.469951490000000E+02, -0.117618852000000E+03),\n new google.maps.LatLng( 0.469944870000000E+02, -0.117617448000000E+03),\n new google.maps.LatLng( 0.469950140000000E+02, -0.117614910000000E+03),\n new google.maps.LatLng( 0.470028090000000E+02, -0.117607097000000E+03),\n new google.maps.LatLng( 0.470031300000000E+02, -0.117604692000000E+03),\n new google.maps.LatLng( 0.470024680000000E+02, -0.117603622000000E+03),\n new google.maps.LatLng( 0.469990180000000E+02, -0.117603888000000E+03),\n new google.maps.LatLng( 0.469966410000000E+02, -0.117602884000000E+03),\n new google.maps.LatLng( 0.469923920000000E+02, -0.117597102000000E+03),\n new google.maps.LatLng( 0.469914780000000E+02, -0.117594929000000E+03),\n new google.maps.LatLng( 0.469920960000000E+02, -0.117593560000000E+03),\n new google.maps.LatLng( 0.469982230000000E+02, -0.117588219000000E+03),\n new google.maps.LatLng( 0.469981550000000E+02, -0.117585513000000E+03),\n new google.maps.LatLng( 0.469974920000000E+02, -0.117583307000000E+03),\n new google.maps.LatLng( 0.469961670000000E+02, -0.117583040000000E+03),\n new google.maps.LatLng( 0.469931270000000E+02, -0.117583606000000E+03),\n new google.maps.LatLng( 0.469878010000000E+02, -0.117582201000000E+03),\n new google.maps.LatLng( 0.469853570000000E+02, -0.117575653000000E+03),\n new google.maps.LatLng( 0.469868440000000E+02, -0.117567471000000E+03),\n new google.maps.LatLng( 0.469923750000000E+02, -0.117565433000000E+03),\n new google.maps.LatLng( 0.469915300000000E+02, -0.117561758000000E+03),\n new google.maps.LatLng( 0.469874150000000E+02, -0.117558752000000E+03),\n new google.maps.LatLng( 0.469862730000000E+02, -0.117557183000000E+03),\n new google.maps.LatLng( 0.469897000000000E+02, -0.117544522000000E+03),\n new google.maps.LatLng( 0.469896760000000E+02, -0.117541917000000E+03),\n new google.maps.LatLng( 0.469888070000000E+02, -0.117538376000000E+03),\n new google.maps.LatLng( 0.469882580000000E+02, -0.117537475000000E+03),\n new google.maps.LatLng( 0.469872990000000E+02, -0.117537609000000E+03),\n new google.maps.LatLng( 0.469860880000000E+02, -0.117539413000000E+03),\n new google.maps.LatLng( 0.469844430000000E+02, -0.117545760000000E+03),\n new google.maps.LatLng( 0.469829350000000E+02, -0.117546896000000E+03),\n new google.maps.LatLng( 0.469815860000000E+02, -0.117546094000000E+03),\n new google.maps.LatLng( 0.469783160000000E+02, -0.117536610000000E+03),\n new google.maps.LatLng( 0.469768980000000E+02, -0.117536244000000E+03),\n new google.maps.LatLng( 0.469751390000000E+02, -0.117536846000000E+03),\n new google.maps.LatLng( 0.469744990000000E+02, -0.117537581000000E+03),\n new google.maps.LatLng( 0.469703390000000E+02, -0.117545063000000E+03),\n new google.maps.LatLng( 0.469686710000000E+02, -0.117545097000000E+03),\n new google.maps.LatLng( 0.469678480000000E+02, -0.117544129000000E+03),\n new google.maps.LatLng( 0.469673450000000E+02, -0.117542126000000E+03),\n new google.maps.LatLng( 0.469678930000000E+02, -0.117535079000000E+03),\n new google.maps.LatLng( 0.469671830000000E+02, -0.117531007000000E+03),\n new google.maps.LatLng( 0.469649650000000E+02, -0.117526935000000E+03),\n new google.maps.LatLng( 0.469591330000000E+02, -0.117518725000000E+03),\n new google.maps.LatLng( 0.469584390000000E+02, -0.117515114000000E+03),\n new google.maps.LatLng( 0.469584390000000E+02, -0.117515114000000E+03),\n new google.maps.LatLng( 0.469532590000000E+02, -0.117517796000000E+03),\n new google.maps.LatLng( 0.469507440000000E+02, -0.117515862000000E+03),\n new google.maps.LatLng( 0.469479560000000E+02, -0.117520470000000E+03),\n new google.maps.LatLng( 0.469484840000000E+02, -0.117525409000000E+03),\n new google.maps.LatLng( 0.469461540000000E+02, -0.117531553000000E+03),\n new google.maps.LatLng( 0.469430920000000E+02, -0.117535860000000E+03),\n new google.maps.LatLng( 0.469411960000000E+02, -0.117537496000000E+03),\n new google.maps.LatLng( 0.469356880000000E+02, -0.117540268000000E+03),\n new google.maps.LatLng( 0.469340190000000E+02, -0.117541871000000E+03),\n new google.maps.LatLng( 0.469335630000000E+02, -0.117550847000000E+03),\n new google.maps.LatLng( 0.469351170000000E+02, -0.117554017000000E+03),\n new google.maps.LatLng( 0.469385230000000E+02, -0.117558321000000E+03),\n new google.maps.LatLng( 0.469392770000000E+02, -0.117562427000000E+03),\n new google.maps.LatLng( 0.469397530000000E+02, -0.117593397000000E+03),\n new google.maps.LatLng( 0.469383580000000E+02, -0.117597233000000E+03),\n new google.maps.LatLng( 0.469271720000000E+02, -0.117617345000000E+03),\n new google.maps.LatLng( 0.469265540000000E+02, -0.117619246000000E+03),\n new google.maps.LatLng( 0.469266210000000E+02, -0.117622316000000E+03),\n new google.maps.LatLng( 0.469298950000000E+02, -0.117638753000000E+03),\n new google.maps.LatLng( 0.469299650000000E+02, -0.117641989000000E+03),\n new google.maps.LatLng( 0.469290520000000E+02, -0.117645427000000E+03),\n new google.maps.LatLng( 0.469225180000000E+02, -0.117660878000000E+03),\n new google.maps.LatLng( 0.469183350000000E+02, -0.117657678000000E+03),\n new google.maps.LatLng( 0.469123700000000E+02, -0.117659016000000E+03),\n new google.maps.LatLng( 0.469086440000000E+02, -0.117659018000000E+03),\n new google.maps.LatLng( 0.469038430000000E+02, -0.117655586000000E+03),\n new google.maps.LatLng( 0.469023110000000E+02, -0.117651984000000E+03),\n new google.maps.LatLng( 0.469014420000000E+02, -0.117651051000000E+03),\n new google.maps.LatLng( 0.468992470000000E+02, -0.117650119000000E+03),\n new google.maps.LatLng( 0.468971900000000E+02, -0.117650254000000E+03),\n new google.maps.LatLng( 0.468910870000000E+02, -0.117647657000000E+03),\n new google.maps.LatLng( 0.468907210000000E+02, -0.117647124000000E+03),\n new google.maps.LatLng( 0.468904680000000E+02, -0.117643590000000E+03),\n new google.maps.LatLng( 0.468927740000000E+02, -0.117638420000000E+03),\n new google.maps.LatLng( 0.468968600000000E+02, -0.117626645000000E+03),\n new google.maps.LatLng( 0.468965870000000E+02, -0.117621916000000E+03),\n new google.maps.LatLng( 0.468917250000000E+02, -0.117605572000000E+03),\n new google.maps.LatLng( 0.468914980000000E+02, -0.117603605000000E+03),\n new google.maps.LatLng( 0.468912500000000E+02, -0.117594068000000E+03),\n new google.maps.LatLng( 0.468943510000000E+02, -0.117586942000000E+03),\n new google.maps.LatLng( 0.468834980000000E+02, -0.117586915000000E+03),\n new google.maps.LatLng( 0.468834850000000E+02, -0.117598371000000E+03),\n new google.maps.LatLng( 0.468725180000000E+02, -0.117598301000000E+03),\n new google.maps.LatLng( 0.468666150000000E+02, -0.117588924000000E+03),\n new google.maps.LatLng( 0.468584100000000E+02, -0.117587620000000E+03),\n new google.maps.LatLng( 0.468558510000000E+02, -0.117579988000000E+03),\n new google.maps.LatLng( 0.468534290000000E+02, -0.117576356000000E+03),\n new google.maps.LatLng( 0.468504120000000E+02, -0.117576821000000E+03),\n new google.maps.LatLng( 0.468491440000000E+02, -0.117576368000000E+03),\n new google.maps.LatLng( 0.468491440000000E+02, -0.117576368000000E+03),\n new google.maps.LatLng( 0.468438980000000E+02, -0.117575054000000E+03),\n new google.maps.LatLng( 0.468407190000000E+02, -0.117576352000000E+03),\n new google.maps.LatLng( 0.468351870000000E+02, -0.117583811000000E+03),\n new google.maps.LatLng( 0.468352070000000E+02, -0.117596069000000E+03),\n new google.maps.LatLng( 0.468318000000000E+02, -0.117598731000000E+03),\n new google.maps.LatLng( 0.468290120000000E+02, -0.117598629000000E+03),\n new google.maps.LatLng( 0.468282350000000E+02, -0.117598995000000E+03),\n new google.maps.LatLng( 0.468253980000000E+02, -0.117604688000000E+03),\n new google.maps.LatLng( 0.468252370000000E+02, -0.117607952000000E+03),\n new google.maps.LatLng( 0.468219190000000E+02, -0.117614542000000E+03),\n new google.maps.LatLng( 0.468193810000000E+02, -0.117615638000000E+03),\n new google.maps.LatLng( 0.468139850000000E+02, -0.117619894000000E+03),\n new google.maps.LatLng( 0.468108550000000E+02, -0.117625380000000E+03),\n new google.maps.LatLng( 0.468107650000000E+02, -0.117637363000000E+03),\n new google.maps.LatLng( 0.468103270000000E+02, -0.117641259000000E+03),\n new google.maps.LatLng( 0.468146530000000E+02, -0.117641089000000E+03),\n new google.maps.LatLng( 0.468168010000000E+02, -0.117640355000000E+03),\n new google.maps.LatLng( 0.468205710000000E+02, -0.117638454000000E+03),\n new google.maps.LatLng( 0.468249810000000E+02, -0.117634952000000E+03),\n new google.maps.LatLng( 0.468316310000000E+02, -0.117632015000000E+03),\n new google.maps.LatLng( 0.468434720000000E+02, -0.117630737000000E+03),\n new google.maps.LatLng( 0.468451190000000E+02, -0.117633435000000E+03),\n new google.maps.LatLng( 0.468507480000000E+02, -0.117654719000000E+03),\n new google.maps.LatLng( 0.468535850000000E+02, -0.117661948000000E+03),\n new google.maps.LatLng( 0.468607180000000E+02, -0.117675207000000E+03),\n new google.maps.LatLng( 0.468644210000000E+02, -0.117680638000000E+03),\n new google.maps.LatLng( 0.468633240000000E+02, -0.117690303000000E+03),\n new google.maps.LatLng( 0.468607410000000E+02, -0.117698766000000E+03),\n new google.maps.LatLng( 0.468607180000000E+02, -0.117700099000000E+03),\n new google.maps.LatLng( 0.468618070000000E+02, -0.117703336000000E+03),\n new google.maps.LatLng( 0.468633230000000E+02, -0.117703099000000E+03),\n new google.maps.LatLng( 0.468652140000000E+02, -0.117727528000000E+03),\n new google.maps.LatLng( 0.468658990000000E+02, -0.117731694000000E+03),\n new google.maps.LatLng( 0.468658470000000E+02, -0.117757123000000E+03),\n new google.maps.LatLng( 0.468617400000000E+02, -0.117775690000000E+03),\n new google.maps.LatLng( 0.468559150000000E+02, -0.117797518000000E+03),\n new google.maps.LatLng( 0.468571270000000E+02, -0.117806981000000E+03),\n new google.maps.LatLng( 0.468560760000000E+02, -0.117817377000000E+03),\n new google.maps.LatLng( 0.468541790000000E+02, -0.117821009000000E+03),\n new google.maps.LatLng( 0.468527370000000E+02, -0.117829838000000E+03),\n new google.maps.LatLng( 0.468531250000000E+02, -0.117833836000000E+03),\n new google.maps.LatLng( 0.468548780000000E+02, -0.117836532000000E+03),\n new google.maps.LatLng( 0.468544200000000E+02, -0.117859326000000E+03),\n new google.maps.LatLng( 0.468667640000000E+02, -0.117855638000000E+03),\n new google.maps.LatLng( 0.468748790000000E+02, -0.117854110000000E+03),\n new google.maps.LatLng( 0.468781690000000E+02, -0.117852879000000E+03),\n new google.maps.LatLng( 0.468883200000000E+02, -0.117846751000000E+03),\n new google.maps.LatLng( 0.469119810000000E+02, -0.117839325000000E+03),\n new google.maps.LatLng( 0.469140960000000E+02, -0.117862845000000E+03),\n new google.maps.LatLng( 0.469154850000000E+02, -0.117872886000000E+03),\n new google.maps.LatLng( 0.469141820000000E+02, -0.117876498000000E+03),\n new google.maps.LatLng( 0.469132220000000E+02, -0.117876913000000E+03),\n new google.maps.LatLng( 0.469125820000000E+02, -0.117877848000000E+03),\n new google.maps.LatLng( 0.469122400000000E+02, -0.117879616000000E+03),\n new google.maps.LatLng( 0.469123380000000E+02, -0.117895092000000E+03),\n new google.maps.LatLng( 0.469087970000000E+02, -0.117900299000000E+03),\n new google.maps.LatLng( 0.469066520000000E+02, -0.117910038000000E+03),\n new google.maps.LatLng( 0.469071550000000E+02, -0.117911839000000E+03),\n new google.maps.LatLng( 0.469125050000000E+02, -0.117918474000000E+03),\n new google.maps.LatLng( 0.469127790000000E+02, -0.117920675000000E+03),\n new google.maps.LatLng( 0.469121620000000E+02, -0.117927914000000E+03),\n new google.maps.LatLng( 0.469084820000000E+02, -0.117929082000000E+03),\n new google.maps.LatLng( 0.469053050000000E+02, -0.117929182000000E+03),\n new google.maps.LatLng( 0.468995910000000E+02, -0.117927883000000E+03),\n new google.maps.LatLng( 0.468925290000000E+02, -0.117929318000000E+03),\n new google.maps.LatLng( 0.468881630000000E+02, -0.117931286000000E+03),\n new google.maps.LatLng( 0.468865860000000E+02, -0.117936753000000E+03),\n new google.maps.LatLng( 0.468792490000000E+02, -0.117945187000000E+03),\n new google.maps.LatLng( 0.468743270000000E+02, -0.117948781000000E+03),\n new google.maps.LatLng( 0.468722720000000E+02, -0.117949184000000E+03),\n new google.maps.LatLng( 0.468697310000000E+02, -0.117951752000000E+03),\n new google.maps.LatLng( 0.468679660000000E+02, -0.117958701000000E+03),\n new google.maps.LatLng( 0.468691430000000E+02, -0.117965783000000E+03),\n new google.maps.LatLng( 0.468691870000000E+02, -0.117969375000000E+03),\n new google.maps.LatLng( 0.468683030000000E+02, -0.117970753000000E+03),\n new google.maps.LatLng( 0.468683030000000E+02, -0.117970753000000E+03),\n new google.maps.LatLng( 0.469082890000000E+02, -0.117967806000000E+03),\n new google.maps.LatLng( 0.469082890000000E+02, -0.117967806000000E+03),\n new google.maps.LatLng( 0.469148780000000E+02, -0.117967357000000E+03),\n new google.maps.LatLng( 0.469148780000000E+02, -0.117958856000000E+03),\n new google.maps.LatLng( 0.469877910000000E+02, -0.117959498000000E+03),\n new google.maps.LatLng( 0.469996790000000E+02, -0.117959756000000E+03),\n new google.maps.LatLng( 0.470011060000000E+02, -0.117960131000000E+03),\n new google.maps.LatLng( 0.470668820000000E+02, -0.117959662000000E+03),\n new google.maps.LatLng( 0.470668820000000E+02, -0.117959662000000E+03),\n new google.maps.LatLng( 0.470674240000000E+02, -0.117957255000000E+03),\n new google.maps.LatLng( 0.470715850000000E+02, -0.117947053000000E+03),\n new google.maps.LatLng( 0.470730710000000E+02, -0.117935912000000E+03),\n new google.maps.LatLng( 0.470859370000000E+02, -0.117917742000000E+03),\n new google.maps.LatLng( 0.470872620000000E+02, -0.117912254000000E+03),\n new google.maps.LatLng( 0.470869410000000E+02, -0.117908539000000E+03),\n new google.maps.LatLng( 0.470888560000000E+02, -0.117892207000000E+03),\n new google.maps.LatLng( 0.470848780000000E+02, -0.117886790000000E+03),\n new google.maps.LatLng( 0.470824090000000E+02, -0.117885119000000E+03),\n new google.maps.LatLng( 0.470807840000000E+02, -0.117882041000000E+03),\n new google.maps.LatLng( 0.470802340000000E+02, -0.117878529000000E+03),\n new google.maps.LatLng( 0.470813080000000E+02, -0.117872805000000E+03),\n new google.maps.LatLng( 0.470805320000000E+02, -0.117870963000000E+03),\n new google.maps.LatLng( 0.470793670000000E+02, -0.117869657000000E+03),\n new google.maps.LatLng( 0.470789570000000E+02, -0.117867147000000E+03),\n new google.maps.LatLng( 0.470807830000000E+02, -0.117854730000000E+03),\n new google.maps.LatLng( 0.470861610000000E+02, -0.117854706000000E+03),\n ];\n\n return zipCoords\n}", "title": "" } ]
0e520b23f53ac5951a2c2a7af62f08ef
Returns true if object o has a key named like every property in the properties array. Will give false if any are missing, or if o is not an object.
[ { "docid": "412e1c4f4b30a8fb2fc2ada4b55bdfb5", "score": "0.66418964", "text": "function hasAllProperties(fieldList, o) {\n\n return (o instanceof Object) \n &&\n all(function (field) { \n return (field in o); \n }, fieldList);\n}", "title": "" } ]
[ { "docid": "ce648b7e11514e998d64de3c4cf828cf", "score": "0.7478394", "text": "function hasProperties(object) {\n //return Array.prototype.every.call(Array.prototype.slice.call(arguments,1),(function (x) { return x in object}));\n for (var i = 1; i < arguments.length; i++) {\n if(!(arguments[i] in object))\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "5642aee99e83f1d052f3a993dc5eda9b", "score": "0.72910774", "text": "hasProperty(obj, key) {\n return Object.keys(obj).some(arrVal => key === arrVal);\n }", "title": "" }, { "docid": "816b6375c089a65ae2186a20b9ebb610", "score": "0.72816306", "text": "function hasProperties(obj) {\n\t for(var key in obj) {\n\t if (obj.hasOwnProperty(key)) {\n\t return true;\n\t }\n\t return false;\n\t}\n}", "title": "" }, { "docid": "20912fd796d048256d1e47d592abc089", "score": "0.70295703", "text": "function hasKey(k, o) {\n return typeof o === 'object' && k in o;\n}", "title": "" }, { "docid": "3fbcf2304082a7734084f1d8fb045196", "score": "0.70003766", "text": "function hasProperty(object, propertyName) {\n return propertyName in object;\n }", "title": "" }, { "docid": "20a04bcd82119b9396333829192a1d90", "score": "0.6991285", "text": "function hasProperties(obj /*, arguments*/) {\n\t\tvar hasAllProperties = true;\n\n\t\tfor (var i = 1; i < arguments.length; i++) {\n\t\t\tif (arguments[i] in obj == false) {\n\t\t\t\thasAllProperties = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn hasAllProperties;\n\t}", "title": "" }, { "docid": "0f36b35f2ddfef3051fd170416ac1ff0", "score": "0.69783413", "text": "function hasProp(obj, propName) {\n var has = false;\n for (var prop in obj) {\n if (prop == propName) {\n has = true;\n }\n }\n\n return has;\n }", "title": "" }, { "docid": "098e6885ac0cf28dc7e02dd0feb8edfb", "score": "0.69734484", "text": "function isEmptyObject(obj){\n for(var propName in obj){\n if(obj.hasOwnProperty(propName)){\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "b86bc4813e5a0c8a67eae71609400db6", "score": "0.6920976", "text": "function allPropertiesExist(objectPropNames) {\n //ensure that every required property name exists on the current object\n return _.every(requiredFormProps, function (item) {\n return _.contains(objectPropNames, item);\n });\n }", "title": "" }, { "docid": "64d66a8d7402668ce40ba5e73a0f36ed", "score": "0.68849754", "text": "function hasKey(object, key) {\n return {}.hasOwnProperty.call(object, key);\n }", "title": "" }, { "docid": "3fd422f27b86270be5e1d9dc924d54b3", "score": "0.6823984", "text": "function hasKey(object, key) {\r\n return {}.hasOwnProperty.call(object, key);\r\n}", "title": "" }, { "docid": "5c1462fda2e9c00c2a3f6b07dc6f29a2", "score": "0.6814609", "text": "function hasKeys (object, keys) {\n return _.every(keys, _.partial(_.has, object));\n}", "title": "" }, { "docid": "7a6fca7a100e4ac00caca8045c42c767", "score": "0.67993355", "text": "function isEmpty(obj) {\n for (let key in obj) {\n // если тело цикла начнет выполняться - значит в объекте есть свойства\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "ecb3b7d1cb951caad7b4f6e912f7e831", "score": "0.6798868", "text": "function hasKey(obj, key) {\n return key in obj;\n}", "title": "" }, { "docid": "7dcc428886de2c26509b7336d98b5cd0", "score": "0.6789494", "text": "function HasProperty(O, P) { // eslint-disable-line no-unused-vars\n\t\t// Assert: Type(O) is Object.\n\t\t// Assert: IsPropertyKey(P) is true.\n\t\t// Return ? O.[[HasProperty]](P).\n\t\treturn P in O;\n\t}", "title": "" }, { "docid": "b97589ad311000e56a8d9e3205309300", "score": "0.6781582", "text": "function isEmpty(obj){\n for(let key in obj){\n if(obj.hasOwnProperty(key)){\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "3abc63b8fbaae5b144d4f9195b5fa452", "score": "0.6772851", "text": "function PropertyExists(obj, propName)\r\n{\r\n return obj.hasOwnProperty(propName);\r\n}", "title": "" }, { "docid": "0be59cd5aa4adc6e0478b7eb6d4cdc5b", "score": "0.6770808", "text": "function hasProps(obj) {\n var argsLen = arguments.length; \n if (typeof obj !== 'object') return false; \n if (argsLen <= 1) return false; \n\n for (var i = 1, l = argsLen; i < l; i++)\n if (!obj.hasOwnProperty(arguments[i])) return false; \n\n return true; \n}", "title": "" }, { "docid": "5656e2ecd45dfc8ceb5ca80f3715fd5f", "score": "0.6770395", "text": "hasProperty(aProperty){\n for(let i = 0; i < this._properties.length; i++){\n let prop = this._properties[i];\n if(aProperty.matches(prop)){\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "23c12b3775674faf9d215d5a1fc9393a", "score": "0.6768258", "text": "function isEmpty(obj) {\n for(let key in obj) {\n if(obj.hasOwnProperty(key))\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "55ef78b9b5231a0828d3d2991c0988e4", "score": "0.675799", "text": "function isEmpty(obj) {\n for(var key in obj) {\n if(obj.hasOwnProperty(key)) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "e02da5bd89d5a2e2b0d339264cb2bb10", "score": "0.6750818", "text": "function isEmpty(obj) {\n for (let key in obj) {\n if(obj.hasOwnProperty(key))\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "c03caa0f81b667bcefb5ed62bd7dee3a", "score": "0.67506", "text": "function isEmpty(obj) {\r\n for(var key in obj) {\r\n if(obj.hasOwnProperty(key))\r\n return false;\r\n }\r\n return true;\r\n}", "title": "" }, { "docid": "879883d4838a591e92d90bd7aa1bb6f8", "score": "0.674008", "text": "function keys(obj) {\n if (!isObject(obj)) return [];\n if (nativeKeys) return nativeKeys(obj);\n var keys = [];\n for (var key in obj) if (has(obj, key)) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n}// Returns whether an object has a given set of `key:value` pairs.", "title": "" }, { "docid": "63050793dba0a21ea674b56f0ef279a6", "score": "0.67310333", "text": "static hasPropertyWithData(obj, prop) {\n if(typeof obj !== \"undefined\" && obj.hasOwnProperty(prop) && Object.keys(obj[prop]).length !== 0) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "e9a6f86cd96650959090473893da0aaf", "score": "0.67310023", "text": "function isEmpty(obj) {\n for(var key in obj) {\n if(obj.hasOwnProperty(key))\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "e9a6f86cd96650959090473893da0aaf", "score": "0.67310023", "text": "function isEmpty(obj) {\n for(var key in obj) {\n if(obj.hasOwnProperty(key))\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "66acb1dd5d148d1b2da4e945c7400d5c", "score": "0.6730492", "text": "function isEmpty(obj) {\n for (const key in obj) {\n if (obj.hasOwnProperty(key)){\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "df4a8e1ecf136faa99c11859b3e54c22", "score": "0.6730416", "text": "isEmpty(obj) {\n for(var key in obj) {\n if(obj.hasOwnProperty(key))\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "5490170c85b1628832294c88dd4e028d", "score": "0.6723346", "text": "function isEmpty(obj) {\n for(var key in obj) {\n if(obj.hasOwnProperty(key))\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "5490170c85b1628832294c88dd4e028d", "score": "0.6723346", "text": "function isEmpty(obj) {\n for(var key in obj) {\n if(obj.hasOwnProperty(key))\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "5490170c85b1628832294c88dd4e028d", "score": "0.6723346", "text": "function isEmpty(obj) {\n for(var key in obj) {\n if(obj.hasOwnProperty(key))\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "5490170c85b1628832294c88dd4e028d", "score": "0.6723346", "text": "function isEmpty(obj) {\n for(var key in obj) {\n if(obj.hasOwnProperty(key))\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "79872c0012137622f4c7abdf12a9d85b", "score": "0.6722472", "text": "function hasAllProperties (fieldList, o) {\n return (o instanceof Object) &&\n Object(__WEBPACK_IMPORTED_MODULE_0__lists__[\"a\" /* all */])(function (field) {\n return (field in o)\n }, fieldList)\n}", "title": "" }, { "docid": "79872c0012137622f4c7abdf12a9d85b", "score": "0.6722472", "text": "function hasAllProperties (fieldList, o) {\n return (o instanceof Object) &&\n Object(__WEBPACK_IMPORTED_MODULE_0__lists__[\"a\" /* all */])(function (field) {\n return (field in o)\n }, fieldList)\n}", "title": "" }, { "docid": "6ebe26cf5558bb6b9f3658a4c2d895e6", "score": "0.6718048", "text": "function isEmptyObject(obj) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "0e9470a8a6f32ba8153bab9df0b44b6d", "score": "0.6717313", "text": "function hasAllProperties(fieldList, o) {\n\t\n\t return (o instanceof Object) \n\t &&\n\t all(function (field) { \n\t return (field in o); \n\t }, fieldList);\n\t}", "title": "" }, { "docid": "a7d561f7938d77769dc65823496e8566", "score": "0.67165506", "text": "function isEmptyObject(obj) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "51844598440268baa658a5cb178ef8a2", "score": "0.671264", "text": "function isEmpty(obj){\n if (Object.keys(obj).length > 0) return false;\n else return true;\n}", "title": "" }, { "docid": "c08e51714fb319a8ba415707a82da160", "score": "0.6711137", "text": "function isEmpty(obj) {\n for (var key in obj) {\n if (obj.hasOwnProperty(key))\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "bb4e9c26bd3273c7a801977cb65f0984", "score": "0.67068535", "text": "function isEmptyKey(obj) {\n let internalArray = Object.keys(obj);\n return (internalArray.length == 0);\n}", "title": "" }, { "docid": "5826e773b64ca73fa48fea97bf1b018d", "score": "0.6701726", "text": "isEmpty(obj) {\n for (let key in obj) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "b1e97407151340d54a1cee734e67a969", "score": "0.66998166", "text": "function has(k, o) {\n return Object.prototype.hasOwnProperty.call(o, k);\n }", "title": "" }, { "docid": "4f9e8f275bfaca8052dd5bde74052242", "score": "0.66842735", "text": "function isEmpty(obj) {\n for (var key in obj) { \n if (obj.hasOwnProperty(key))\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "ffb1b5db45e07297c1b9c07ddaff0e21", "score": "0.66825026", "text": "function isEmpty(obj) {\n for(var prop in obj) {\n if(obj.hasOwnProperty(prop))\n return false;\n }\n\n return true;\n}", "title": "" }, { "docid": "ffb1b5db45e07297c1b9c07ddaff0e21", "score": "0.66825026", "text": "function isEmpty(obj) {\n for(var prop in obj) {\n if(obj.hasOwnProperty(prop))\n return false;\n }\n\n return true;\n}", "title": "" }, { "docid": "2ea6c0770209a721b4b10746e45e60a8", "score": "0.6682225", "text": "function checkProperties(obj) {\n for (var key in obj) {\n if (obj[key] !== null && obj[key] != \"\") return false;\n }\n return true;\n}", "title": "" }, { "docid": "47b40900f3bb77951aa917c74636c005", "score": "0.6681333", "text": "function isEmpty(obj) {\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) return false;\n }\n return true;\n}", "title": "" }, { "docid": "47b40900f3bb77951aa917c74636c005", "score": "0.6681333", "text": "function isEmpty(obj) {\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) return false;\n }\n return true;\n}", "title": "" }, { "docid": "d5ea1ecbaf1d6bd5449372eb238984f7", "score": "0.66802955", "text": "function isEmpty(obj) {\n for(var key in obj) {\n if(obj.hasOwnProperty(key))\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "0a61963ede97020b09cf5258d5da1583", "score": "0.66629446", "text": "function objHasKey(obj, key) {\n let result = false;\n \n if(obj != undefined && obj instanceof Object) {\n result = Object.keys(obj).some(\n o => {\n if(o == key) {\n return true;\n }\n else if(obj[o].constructor.name == \"Object\") {\n result = this.objHasKey(obj[o], key);\n if(result) return true;\n }\n }\n );\n }\n \n return result;\n}", "title": "" }, { "docid": "fd6666c3a58c39f738efe348d2989078", "score": "0.66448045", "text": "function has$1(obj, propName) {\n return hasOwnProperty$1.call(obj, propName)\n }", "title": "" }, { "docid": "c6f6535f1c0f8fb694b5a9a83edb7903", "score": "0.6642427", "text": "function isEmptyObject(o) {\n return (Object.keys(o).length===0);\n}", "title": "" }, { "docid": "078c30effe929e2f0ec1b7fb47ef2f26", "score": "0.66396374", "text": "function isEmptyObj(obj) {\n for(var key in obj) {\n if(obj.hasOwnProperty(key))\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "3fef02c3c4493b6999cee6aa14b79180", "score": "0.66329706", "text": "function has(object, key) {\n\n let match = false;\n const getKeyValue = Object.keys(object);\n\n for(let keys of getKeyValue) {\n if(keys === key) {\n\n match = true;\n } \n }\n return match;\n}", "title": "" }, { "docid": "915cc2feeda508d2c7f803ae37370c76", "score": "0.66141033", "text": "has (object, key) {\n let hasValue = object[key];\n if (hasValue != undefined) {\n return true;\n } return false;\n }", "title": "" }, { "docid": "5093a5154c6165f67c8c4152c4982c80", "score": "0.6612961", "text": "has(obj, key) {\n var hasValue = obj[key];\n if (hasValue != undefined) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "aa6492eb0a2b20e9f80c81ed92211b10", "score": "0.65995175", "text": "function has(obj, propName) { return Object.prototype.hasOwnProperty.call(obj, propName); }", "title": "" }, { "docid": "9d4ca4b47a4fd57a95841d310a69711d", "score": "0.6582439", "text": "function _isEmptyObject(obj) {\n var name;\n\n for (name in obj) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "3560789c37cb9fac8667c909fe714f49", "score": "0.6581365", "text": "isEmpty(obj) \n {\n for(var key in obj) \n {\n if(obj.hasOwnProperty(key))\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "c70e7a3e70b8e54118dc5bb825b57ccb", "score": "0.6575984", "text": "function hasCertainKey(objArr, key) {\r\n return objArr.every(function (obj) { \r\n return obj[key];\r\n });\r\n}", "title": "" }, { "docid": "639dbcab4b8cd0f128324e4345f8b517", "score": "0.65744996", "text": "function objectKeyExist(object)\n {\n return _.some(object, function (o) {\n return !_.isEmpty(_.pick(o, ['customer', 'cart']));\n })\n }", "title": "" }, { "docid": "baf149e6854ce3293f159522064db7da", "score": "0.65720934", "text": "function isEmptyObject(obj) {\n for(var prop in obj)\n if(obj.hasOwnProperty(prop))\n return false;\n return true;\n}", "title": "" }, { "docid": "0b4f6dad85dac3017fb167d0121dbbf9", "score": "0.6569965", "text": "function has(obj, propName) {\n return Object.prototype.hasOwnProperty.call(obj, propName);\n }", "title": "" }, { "docid": "0b4f6dad85dac3017fb167d0121dbbf9", "score": "0.6569965", "text": "function has(obj, propName) {\n return Object.prototype.hasOwnProperty.call(obj, propName);\n }", "title": "" }, { "docid": "fd87eeedd86c4b8bac1120d438cad075", "score": "0.6568696", "text": "function has(obj, propName) {\n return hasOwnProperty.call(obj, propName)\n }", "title": "" }, { "docid": "fd87eeedd86c4b8bac1120d438cad075", "score": "0.6568696", "text": "function has(obj, propName) {\n return hasOwnProperty.call(obj, propName)\n }", "title": "" }, { "docid": "521ba7544eea54e93d6a124af05e7cf1", "score": "0.6568637", "text": "function hasProp(prop, props) {\n let result = false;\n if (prop.key.type === 4 /* NodeTypes.SIMPLE_EXPRESSION */) {\n const propKeyName = prop.key.content;\n result = props.properties.some(p => p.key.type === 4 /* NodeTypes.SIMPLE_EXPRESSION */ &&\n p.key.content === propKeyName);\n }\n return result;\n}", "title": "" }, { "docid": "6dfaddfcf5391091438a98e5f608104e", "score": "0.6566055", "text": "function has(obj, propName) {\n return Object.prototype.hasOwnProperty.call(obj, propName)\n }", "title": "" }, { "docid": "6dfaddfcf5391091438a98e5f608104e", "score": "0.6566055", "text": "function has(obj, propName) {\n return Object.prototype.hasOwnProperty.call(obj, propName)\n }", "title": "" }, { "docid": "b9803575b5d0180ef2741342e41943a2", "score": "0.6561869", "text": "has (name) {\n return (this.properties[name] !== undefined)\n }", "title": "" }, { "docid": "f3fefd4208bd3477d7819874aed95e40", "score": "0.6559122", "text": "function isEmpty(obj) {\n // if no keys object is empty return true\n if (Object.keys(obj).length === 0) {\n return true\n }\n\n return false;\n}", "title": "" }, { "docid": "42d156f353c1b9ce814eca43c509841a", "score": "0.65565354", "text": "function hasAllProperties(fieldList,o){return o instanceof Object&&all(function(field){return field in o;},fieldList);}", "title": "" }, { "docid": "45f135fd4a8e8c57132e9587bf00b75d", "score": "0.6543293", "text": "function HasOwnProperty(o, p) { // eslint-disable-line no-unused-vars\n\t\t// 1. Assert: Type(O) is Object.\n\t\t// 2. Assert: IsPropertyKey(P) is true.\n\t\t// 3. Let desc be ? O.[[GetOwnProperty]](P).\n\t\t// 4. If desc is undefined, return false.\n\t\t// 5. Return true.\n\t\t// Polyfill.io - As we expect user agents to support ES3 fully we can skip the above steps and use Object.prototype.hasOwnProperty to do them for us.\n\t\treturn Object.prototype.hasOwnProperty.call(o, p);\n\t}", "title": "" }, { "docid": "e653cf5fee7d8bb24d3adcd269d8e977", "score": "0.65282977", "text": "function has(obj, propName) {\n return hasOwnProperty.call(obj, propName);\n }", "title": "" }, { "docid": "9c0f33c7bc2627fc1c81bb8482c2a686", "score": "0.6526631", "text": "function isEmpty(obj){\n for(var key in obj){\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "0f8607bdbb7f36fb592a03ec89485a75", "score": "0.6524092", "text": "function hasAllProperties(fieldList, o) {\n\n return (o instanceof Object)\n &&\n all(function (field) {\n return (field in o);\n }, fieldList);\n }", "title": "" }, { "docid": "0f8607bdbb7f36fb592a03ec89485a75", "score": "0.6524092", "text": "function hasAllProperties(fieldList, o) {\n\n return (o instanceof Object)\n &&\n all(function (field) {\n return (field in o);\n }, fieldList);\n }", "title": "" }, { "docid": "0b2956b1334f9edd4aec2d60d37761b5", "score": "0.65225446", "text": "function hasKeys() {\n\tvar KEYS = _.toArray(arguments);\n\n\tvar fun = function(obj) {\n\t\treturn _.every(KEYS, function(k) {\n\t\t\treturn _.has(obj, k);\n\t\t});\n\t};\n\n\tfun.message = [[\"Must have values for keys:\"], KEYS].join(\" \");\n\treturn fun;\n}", "title": "" }, { "docid": "e060e27662eb37016abacf05ad72e580", "score": "0.65183955", "text": "function has(obj, propName) {\n\t return Object.prototype.hasOwnProperty.call(obj, propName)\n\t }", "title": "" }, { "docid": "26834f21fdfa922d0245951d2d51a5ae", "score": "0.651495", "text": "function isEmpty(object) {\n for (let key in object) {\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "4673bfb2b2de97aa4af149921bd70ecd", "score": "0.6503869", "text": "_isEmpty(obj) {\n\t for(var key in obj) {\n\t if(obj.hasOwnProperty(key))\n\t return false;\n\t }\n\t return true;\n\t}", "title": "" }, { "docid": "ff187019ff2e21f8010f91224e36b6fd", "score": "0.65026844", "text": "function allTrue(obj) {\n for (var o in obj)\n if (!obj[o]) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "cf8595abc97d1d07e824ddd9e50b2357", "score": "0.65018314", "text": "function IsEmptyObject(MyObject) {\n if (Object.keys(MyObject).length === 0) {\n return true;\n }else{return false;}\n}", "title": "" }, { "docid": "50677eda9f202b5f7b8d6d2d3ef3daa8", "score": "0.6495653", "text": "function hasProperty (obj, propName) {\n return obj != null && typeof obj === 'object' && (propName in obj);\n }", "title": "" }, { "docid": "50677eda9f202b5f7b8d6d2d3ef3daa8", "score": "0.6495653", "text": "function hasProperty (obj, propName) {\n return obj != null && typeof obj === 'object' && (propName in obj);\n }", "title": "" }, { "docid": "50677eda9f202b5f7b8d6d2d3ef3daa8", "score": "0.6495653", "text": "function hasProperty (obj, propName) {\n return obj != null && typeof obj === 'object' && (propName in obj);\n }", "title": "" }, { "docid": "50677eda9f202b5f7b8d6d2d3ef3daa8", "score": "0.6495653", "text": "function hasProperty (obj, propName) {\n return obj != null && typeof obj === 'object' && (propName in obj);\n }", "title": "" }, { "docid": "50677eda9f202b5f7b8d6d2d3ef3daa8", "score": "0.6495653", "text": "function hasProperty (obj, propName) {\n return obj != null && typeof obj === 'object' && (propName in obj);\n }", "title": "" }, { "docid": "50677eda9f202b5f7b8d6d2d3ef3daa8", "score": "0.6495653", "text": "function hasProperty (obj, propName) {\n return obj != null && typeof obj === 'object' && (propName in obj);\n }", "title": "" }, { "docid": "50677eda9f202b5f7b8d6d2d3ef3daa8", "score": "0.6495653", "text": "function hasProperty (obj, propName) {\n return obj != null && typeof obj === 'object' && (propName in obj);\n }", "title": "" } ]
80199d70394f0ce5e6b355a588850ec6
Get the text of a section based on the type
[ { "docid": "a6ac7a5d16c3cef533275e8ca2a06ad3", "score": "0.7733724", "text": "function getSectionText(section) {\n\tswitch (section.getAttribute(\"type\")) {\n\t\tcase \"document-description\": return getDocumentDescriptionText(section);\n\t\tcase \"title\": return getTitleText(section);\n\t\tcase \"authors\": return getAuthorsText(section);\n\t\tcase \"abstract\": return getAbstractText(section);\n\t\tcase \"keywords\": return getKeywordsText(section);\n\t\tcase \"document-section\": return getDocumentSectionText(section);\n\t\tcase \"image-section\": return getImageSectionText(section);\n\t\tcase \"references\": return getReferencesText(section);\n\t\tcase \"index-elements\": return getIndexElementsText(section);\n\t\tcase \"phi\": return getPHIText(section);\n\t\tcase \"permissions\": return getPermissionsText(section);\n\t}\n\treturn \"\";\n}", "title": "" } ]
[ { "docid": "6677a8d121d3cd7c1801a4c91bf97b1d", "score": "0.57682514", "text": "getLinkText(type) {\n var $text = 'View ' + type;\n if (type == 'Collection') {\n $text = 'Learn More';\n }\n if (type == 'Podcast') {\n $text = 'Listen to Podcast';\n }\n if (type == 'Blog Post') {\n $text = 'Read Blog Post';\n }\n return $text;\n }", "title": "" }, { "docid": "166699dbdcbe52145c62619055aa7e6b", "score": "0.569455", "text": "getText(enclosingNode, typeFormatFlags) {\r\n return this._context.typeChecker.getTypeText(this, enclosingNode, typeFormatFlags);\r\n }", "title": "" }, { "docid": "086cc70de05f6054db548fffbd154510", "score": "0.5687965", "text": "function getSection() {\n\tvar section = $('body').attr(\"class\").match(/section[\\w-]*\\b/)[0];\n\treturn section.split('section-')[1];\n}", "title": "" }, { "docid": "96feec888f7f6170daf9663be78c7d36", "score": "0.56668305", "text": "function showText(section, order) {\n $(\"#\"+section+\" p\").hide(); //hide all <p> that are child of this section\n $(\"#\"+section+\" p:nth-of-type(\"+order+\")\").show(); //if order is 2, show the 2nd <p> that is a child of this section\n}", "title": "" }, { "docid": "dd71051850d6baada0472e85a1665174", "score": "0.55081284", "text": "function toMarkdownText(type, node, contents) {\n // TODO: All types has not been implemented yet...\n switch (type) {\n case CMSyntax.Header:\n return _textLines[node.start_line - 1];\n case CMSyntax.ListItem:\n return _textLines[node.start_line - 1];\n case CMSyntax.Link:\n return require(\"./type-builder/markdown-link\")(node, contents);\n case CMSyntax.Image:\n return require(\"./type-builder/markdown-image\")(node, contents);\n case CMSyntax.BlockQuote:\n return contents;\n case CMSyntax.CodeBlock:\n return contents;\n case CMSyntax.Code:\n return require(\"./type-builder/markdown-code\")(node, contents);\n case CMSyntax.Strong:\n return require(\"./type-builder/markdown-strong\")(node, contents);\n case CMSyntax.Emph:\n return require(\"./type-builder/markdown-Emph\")(node, contents);\n }\n return contents;\n}", "title": "" }, { "docid": "698707eec44389f1128d2dc197e9f5b2", "score": "0.5488784", "text": "function getTimeTexts(section, isPartialTime) {\n // get the times\n var $lectures = $(section).find(selectors.lectureItem);\n\n // Check for partial time\n if (isPartialTime) {\n // filter down to just the non-completed ones\n $lectures = $lectures.filter((index, element) => {\n return $(element).has(selectors.lectureCompleted).length === 0;\n });\n }\n\n // get the time spans\n var timeSpans = $lectures.find(selectors.lectureTime);\n\n // convert to timeTexts and return\n return convertTimeSpansToTexts(timeSpans);\n }", "title": "" }, { "docid": "1d32be2508ba2f996e28e25437466012", "score": "0.5475603", "text": "function getSection(sectionNumber) {\n\tif (sectionNumber < 0) return null;\n\tvar count = 0;\n\tvar child = document.getElementById(\"editor\").firstChild;\n\twhile ((child != null) && (count <= sectionNumber)) {\n\t\tif ((child.nodeName.toLowerCase() == \"div\") && (child.getAttribute(\"type\") != null)) {\n\t\t\t//This must be a section\n\t\t\tif (count == sectionNumber) return child;\n\t\t\telse count++;\n\t\t}\n\t\tchild = child.nextSibling;\n\t}\n\treturn null;\n}", "title": "" }, { "docid": "2b599dfc71fef4707360416dc918a8aa", "score": "0.5470803", "text": "genericJoinedText(type, content) {\n var el = nb.makeElement(\"div\", [ type + \"-output\" ]);\n el.innerHTML = nb.joinText(content);\n return el;\n }", "title": "" }, { "docid": "668c659f63f625142ce2609e59c85f41", "score": "0.5443383", "text": "_parseSections(arraySection, type) {\n let filteredList = arraySection.filter(section => section.idSectionType == type.idSectionType)\n return []\n\n // return filteredList[0].content.map(content => {\n // return this._parseContentItem(content)\n // })\n }", "title": "" }, { "docid": "a656908ba6ec2b0014a7029b3d8bcd7a", "score": "0.5416421", "text": "function adminText(locationId, type){\n if(locationLookup[locationId] === undefined){ return \"no data\"}\n else if (type === \"muni\") {\n return locationLookup[locationId].barangay;\n } else if (type === \"brgy\") {\n return locationLookup[locationId].municipality;\n } else { return \"error\" }\n}", "title": "" }, { "docid": "e41a196b14b9b0fa1e597ed6ea221c11", "score": "0.5382862", "text": "function getSpriteText(elementID, textType) {\n \"use strict\";\n \n var i, field;\n \n for (i = 0; i < levelSprites.length; i = i + 1) {\n if (levelSprites[i][2] === elementID) {\n \n if (textType === \"entry\") {\n return levelSprites[i][4];\n } else if (textType === \"bar\") {\n return levelSprites[i][5];\n } else {\n field = getRandomInt(8, levelSprites[i].length);\n return levelSprites[i][field];\n }\n }\n }\n}", "title": "" }, { "docid": "110b4079c250eb0fc8761303c3a527f1", "score": "0.5369562", "text": "function grabText() {\n let lst_ = [];\n document.querySelectorAll(\"article section > p\").forEach((el) => {\n text = el.innerText; \n if (text.length != 0) { \n lst_.push(text)\n }\n });\n \n let content = lst_.join(\" \");\n let date = document.querySelector(\"article header time\").innerText;\n return { content, date };\n}", "title": "" }, { "docid": "06f31c060faba0d9a19c1a5510bec5ee", "score": "0.5363185", "text": "function getMyh2Text(myP) {\n let mySectionText = myP.querySelector('h2').innerHTML ;\n return mySectionText;\n}", "title": "" }, { "docid": "7be7a315792bc5c0242b5a7d6836847f", "score": "0.5342032", "text": "function logType(section, property) {\n\tconst commentEl = section.querySelector('.get-type .comment');\n\tconst subclass = allComputedStyles.get(property);\n\tcommentEl.appendChild(\n\t\tdocument.createTextNode(subclass.constructor.name)\n\t);\n\treturn subclass;\n}", "title": "" }, { "docid": "ff4ee903cbcd840c9c037e4584454039", "score": "0.5323777", "text": "function getLessonBody(text){\n const splitOnStory = text.split(\"story:\");\n splitOnStory.shift();\n const rejoin = splitOnStory.join();\n const splitOnInter = rejoin.split(\", interpretation:\");\n splitOnInter.pop();\n return splitOnInter.join();\n}", "title": "" }, { "docid": "4243c4da185618857d3fa0f8a7cc343e", "score": "0.52616", "text": "get text() {\n var textObject = this.childrenMap.text;\n if (!textObject) {\n return '';\n }\n return textObject.text;\n }", "title": "" }, { "docid": "fd86ecca7f6b9193ae439f5533349864", "score": "0.52240026", "text": "function guidoGetSection() {\n\treturn guidoRun.current_section;\n}", "title": "" }, { "docid": "807fe21712d8e3728c51948e68c79182", "score": "0.52142054", "text": "function getSectionName(task) {\n // Only really relevant in agenda mode, since nested project tasks\n // no longer appear in parent projects.\n if (viewMode !== 'agenda') {\n return '';\n }\n const section = getSection(task);\n let result = null;\n if (section) {\n const outerHeaders = section.querySelectorAll('header');\n let outerHeader;\n if (outerHeaders.length === 0) {\n outerHeader = getUniqueClass(document, 'view_header');\n if (!outerHeader) {\n error('Failed to find header for section', section);\n return null;\n }\n } else {\n outerHeader = outerHeaders[outerHeaders.length - 1];\n }\n let header = null;\n if (outerHeader) {\n header = getUniqueTag(outerHeader, 'h1');\n if (!header) {\n header = getUniqueTag(outerHeader, 'h2');\n }\n }\n if (header) {\n result = header.textContent;\n }\n if (!result) {\n error('Failed to find section name for', task);\n } else {\n debug('Section name is', result);\n }\n } else {\n error(\n 'Failed to find section div for', task,\n 'viewMode =', viewMode);\n }\n return result;\n }", "title": "" }, { "docid": "f5761be652b85aa2192e1692533901b2", "score": "0.51953", "text": "function read() {\n const node = document.querySelector(\"section:target h1, section:target p\");\n console.log(\"node\", node);\n if (node) {\n const text = node.innerText;\n console.log(\"text\", text);\n speech_1.default(text);\n }\n }", "title": "" }, { "docid": "88dd6171f72ce013e5d984571f305d08", "score": "0.51909757", "text": "function addTextSection(after_div_id=null, tagType){\n id = generateUniqueId();\n template = generateUniqueTextSection(id,tagType)\n // check if this section will be inserted as last one or in the middle.\n if (after_div_id != null){after_div_id = '#' + after_div_id;}\n if( after_div_id == null ){\n $('#contentContainer').append(template)\n }else{\n $(after_div_id).before(template)\n }\n // show code options if relevant\n if(tagType=='<code>'){\n $('#'+id+'-select-code-type').show()\n }\n\n\n updateSectionsOrder();\n}", "title": "" }, { "docid": "286523e53f7efe54ac0712abe7088b1d", "score": "0.5180524", "text": "get headerText() {\n return this.i.h2;\n }", "title": "" }, { "docid": "1e1a7dea210ccb87f81078b4d316c62d", "score": "0.51737046", "text": "function getText(option) {\n return option.name || option.Name ||\n option.label || option.Label ||\n option.Reference || option.reference ||\n option.toString();\n }", "title": "" }, { "docid": "5e15bc2023ff6bf535a1c4ca1a525ed0", "score": "0.51648355", "text": "function extractTitle(elmt, level) {\n return $(elmt).text();\n }", "title": "" }, { "docid": "03c5d68e4c4a9ab9a0cefbdcfac476f3", "score": "0.5155183", "text": "function getLicenseTerm(licenseType) {\n var wording = \"Education\";\n switch(licenseType) {\n case \"NEX_LIC_STANDARD\" :\n wording = \"Standard\";\n break;\n case \"NEX_LIC_PROFESSIONAL\" :\n wording = \"Professional\";\n break;\n } \n return wording;\n}", "title": "" }, { "docid": "b4cc567983a187e0e4475ebcdadee6eb", "score": "0.5149887", "text": "function getDocumentText() {\n\tvar text = \"\";\n\tvar child = document.getElementById(\"editor\").firstChild;\n\twhile (child != null) {\n\t\tif ((child.nodeName.toLowerCase() == \"div\") && (child.getAttribute(\"type\") != null)) {\n\t\t\t//This must be a section\n\t\t\ttext += getSectionText(child);\n\t\t}\n\t\tchild = child.nextSibling;\n\t}\n\tif (dsPHI != 0) text += \"\\n<insert-dataset phi=\\\"yes\\\"/>\\n\";\n\tif (dsNoPHI != 0) text += \"\\n<insert-dataset phi=\\\"no\\\"/>\\n\";\n\ttext += \"</MIRCdocument>\";\n\treturn text;\n}", "title": "" }, { "docid": "7f648661b6e1bbf1d45e95f9cc965d80", "score": "0.5144928", "text": "get (type, key, module) {\n // initialize if needed\n if (!this.initialized) {\n this.init()\n }\n const data = this.data\n\n // value to use when the translation was not found\n const missingTranslation = '{$' + type + key + '}'\n\n // validate\n if (data === null || !data.hasOwnProperty(type) || data[type] === null) {\n return missingTranslation\n }\n\n // this is for the labels prefixed with \"loc\"\n if (typeof (data[type][key]) === 'string') {\n return data[type][key]\n }\n\n // if the translation does not exist for the given module, try to fall back to the core\n if (!data[type].hasOwnProperty(module) || data[type][module] === null || !data[type][module].hasOwnProperty(key) || data[type][module][key] === null) {\n if (!data[type].hasOwnProperty('Core') || data[type]['Core'] === null || !data[type]['Core'].hasOwnProperty(key) || data[type]['Core'][key] === null) {\n return missingTranslation\n }\n\n return data[type]['Core'][key]\n }\n\n return data[type][module][key]\n }", "title": "" }, { "docid": "efbc8776417dbbf54622c02b13bec0b5", "score": "0.5143942", "text": "function getSection(str) {\n\tvar szTitle=\"\";\n\tgszSection = str;\n\tconsole.log(\"===>getSection(\"+gszSection+\")\");\n\n\tswitch(gszSection) {\n\t\tcase \"pr\":\n\t\t\tszTitle = \"step-by-step procedures\";\n\t\t\tbreak;\n\t\tcase \"in\":\n\t\t\tszTitle = \"indications\";\n\t\t\tbreak;\n\t\tcase \"pw\":\n\t\t\tszTitle = \"pre-op workup\";\n\t\t\tbreak;\n\t\tcase \"is\":\n\t\t\tszTitle = \"instrumentation\";\n\t\t\tbreak;\n\t\tcase \"an\":\n\t\t\tszTitle = \"anesthesia\";\n\t\t\tbreak;\n\t\tcase \"pp\":\n\t\t\tszTitle = \"patient prep\";\n\t\t\tbreak;\n\t\tcase \"po\":\n\t\t\tszTitle = \"post-op considerations\";\n\t\t\tbreak;\n\t\tcase \"rf\":\n\t\t\tszTitle = \"references\";\n\t\t\tbreak;\n\t\tcase \"br\":\n\t\t\tszTitle = \"brief procedure\";\n\t\t\tgszSection = \"pr\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tszTitle = \"Select Section...\";\n\t\t\tgszSection = \"\";\n\t}\n\n// change the button text to show the selected Section\n\tdocument.getElementById(\"SectionName\").innerHTML = \"<b>\"+szTitle+\"</b>\";\n\tdocument.getElementById(\"SectionDiv\").setAttribute('style','visibility:hidden');\n\n\tif (gszSpecies!==\"\" && gszProcedure!==\"\" && gszSection!==\"\") {\n\n\n\t\tvar select = document.getElementById(\"video\");\n\t\tvar select2 = document.getElementById(\"text\");\n\t\tvar result;\n\n\t\tdocument.getElementById(\"video\").setAttribute('style','visibility:visible');\n\n\n\t\tresult = gJSONrss[gszSpecies][gszProcedure][gszSection];\n\t\tif (gbPosterOn === true) {\n\t\t\tgbPosterOn = false;\n\t\t}\n//make sure the video controls are on\n\t\tif (gszSection !== \"rf\") {\n\t\t\tselect.setAttribute(\"controls\",\"controls\");\n\t\t}else{\n\t\t\tselect.removeAttribute(\"controls\");\n\t\t}\n\t\tselect.src = result;\n\n// if muteBox on interface is checked... mute the sound\n\t\tcheckMute(document.getElementById(\"muteBox\"));\n\n\t\tresult = gJSONrss[gszSpecies][gszProcedure][gszSection+\"txt\"];\n\t\tselect2.innerHTML = result;\n\t\tselect2.scrollTop = 0;\n\n// clear the array first\n\t\twhile (glTextPosition.length > 0) {\n\t\t\tglTextPosition.pop();\n\t\t}\n// fills the array with the positions of all the * in the text string\n\t\tfor(var i=0; i<result.length;i++) {\n\t\t\tif (result[i] === \"*\") glTextPosition.push(i);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "68864027ab3998e8e9aadffc0aaa26b5", "score": "0.51419044", "text": "function returnPageText(currentPageID){\n return storyDatabase.pages[currentPageID].bodyText;\n}", "title": "" }, { "docid": "fe3b869cd83e2c3470b251c9e86d6378", "score": "0.5133009", "text": "function getStepContent(step) {\n switch (step) {\n case 0:\n return 'Tell us who you are!';\n case 1:\n return 'Are you...';\n case 2:\n return \"You're all done!\";\n default:\n return 'Unknown step';\n }\n}", "title": "" }, { "docid": "d8819d88cc1023393b8d2b687d18bb89", "score": "0.51205504", "text": "function _sectionTitle(){\r\n\t\t\treturn sectionTitle;\r\n\t\t}", "title": "" }, { "docid": "d8819d88cc1023393b8d2b687d18bb89", "score": "0.51205504", "text": "function _sectionTitle(){\r\n\t\t\treturn sectionTitle;\r\n\t\t}", "title": "" }, { "docid": "02cf1f3ac1b30387b1160879baca7976", "score": "0.51078165", "text": "static get Text() {\n return 4;\n }", "title": "" }, { "docid": "ff1f988791283d2c9a0ed176b2bf6487", "score": "0.5094131", "text": "function getStepContent(step) {\n switch (step) {\n case 0:\n return `Acknowledgement of guidelines for the compliance of food safety and security.`\n case 1:\n return 'Details of the donations including the item details and pickup details'\n default:\n return 'Unknown step'\n }\n}", "title": "" }, { "docid": "e4bea6b1a36fe764b3881d52e2ebedf0", "score": "0.5085498", "text": "function getidsection(id){\n if(id==\"section1\"){\n style(0);\n }\n else if(id==\"section2\"){\n style(1);\n }\n else if(id==\"section3\"){\n style(2);\n }\n else if(id==\"section4\"){\n style(3);\n };\n}", "title": "" }, { "docid": "b0cfcfd4502cf8b591ebd606edd47a8f", "score": "0.5082995", "text": "getItemListText(index) {\n const listItem = this.todos[index];\n if (listItem instanceof Note) {\n const { text, completed } = this.todos[index];\n return [\"Note\", text, completed];\n }\n else if (listItem instanceof Task) {\n const { title, description, categoryIndex, completed } = this.todos[index];\n return [\"Task\", description, completed];\n };\n }", "title": "" }, { "docid": "f2705ce462539d8dcbf4bce56a8ec4f2", "score": "0.50605524", "text": "function text(sel) { return getSelectedContent(sel, true); }", "title": "" }, { "docid": "946b2693a4c3e30e36ee03e987f2e23c", "score": "0.5059505", "text": "static getSection(num) {\n return (num < inC.parts.length) ? Object.assign(inC.parts[num]) : null;\n }", "title": "" }, { "docid": "ebb22a73bcdc89caa4f71bd2996a6ff5", "score": "0.5042626", "text": "function renderLicenseSection(license) {\n currentLicense= licenseObject.find(element => {\n //console.log(element.name)\n return element.name ===license\n })\n\n return currentLicense.content \n}", "title": "" }, { "docid": "5153f48cd8f69e81218ffd5a9c80f3e2", "score": "0.5030306", "text": "function _getEditSectionMeta(sectionName)\r\n{\r\n \r\n for(var i=0; i < _rxAllEditors.length; i++)\r\n {\r\n if(_rxAllEditors[i].name == sectionName)\r\n return(_rxAllEditors[i]);\r\n }\r\n alert(\"Editor section meta data for [\" + sectionName + \"] not found!!!!\"); \r\n return(\"\"); \r\n}", "title": "" }, { "docid": "d6d5cf88fb245a05a77af20bef705909", "score": "0.50301164", "text": "function getText(obj){\n return obj.text;\n}", "title": "" }, { "docid": "74fab9b1218df13d6200c8f1a51224ef", "score": "0.5028632", "text": "function addDescriptionToInsight(type) {\n $(document).ready(function (e) {\n loadTextFromFileIntoLocation(\"description\" + capitaliseFirstLetter(type), \"includeTextInsightDescription\" )\n });\n}", "title": "" }, { "docid": "654b758a1c2a19f6f07219eb0d741883", "score": "0.5017635", "text": "function getCourseNameSection() {\n var course_name_section = document.querySelectorAll('table tbody tr td a[href*=\"https://coursebook.utdallas.edu/search/cs\"]');\n return Array.prototype.map.call(course_name_section, function(e) {\n return e.innerText;\n });\n}", "title": "" }, { "docid": "8bfff6ceedc429162baa71a60088dd26", "score": "0.5012647", "text": "getSpecificInfo(){\n return `${this.name} is a ${this.type} that has ${this.legs} legs and a ${this.coat} coat';`\n }", "title": "" }, { "docid": "e3adafae953c57e3fa9b4174df112479", "score": "0.5010266", "text": "getText() {\n return this.getParsed(new _pnp_odata__WEBPACK_IMPORTED_MODULE_4__[\"TextParser\"]());\n }", "title": "" }, { "docid": "4826bd6d8d9c08243613d5a90e94021e", "score": "0.5004566", "text": "function getSection(entryId) {\n\n // find the entry\n var foundEntry = _.find(includes.Entry, function (entry) {\n//\n return entry.sys.id === entryId;\n//\n });\n\n return {\n id: entryId,\n bodyText: foundEntry.fields.bodyText,\n bodyParsed: marked.parse(foundEntry.fields.bodyText)\n };\n }", "title": "" }, { "docid": "cab4ff782a6453a4639845e929a0822b", "score": "0.50033814", "text": "get text() {\n const text = this.strings.reduce(\n (prev, curr, i) => prev + '$' + i + curr\n )\n return trimIndent(text)\n }", "title": "" }, { "docid": "d6cf8cc062df4badd03eda8fac5f7564", "score": "0.5001433", "text": "getSections() // get sections names\r\n {\r\n var sections = [];\r\n $('.rhapsody__dataModel_section').each(function(){\r\n if( $(this).find('.item').length )\r\n {\r\n sections.push($(this).find('h2').data('sectionname'));\r\n }\r\n });\r\n return sections;\r\n }", "title": "" }, { "docid": "f07125a96ea8c38b7e12aaf8bf9c8651", "score": "0.499528", "text": "getSectionTitle(secId) {\n if (secId in this.fromSecData.secData) {\n const sec = this.fromSecData.secData[secId];\n return `${sec.num} ${this.filterSecTitle(sec.title)}`;\n }\n\n if (secId in this.toSecData.secData) {\n const sec = this.toSecData.secData[secId];\n return `${sec.num} ${this.filterSecTitle(sec.title)}`;\n }\n\n return \"\";\n }", "title": "" }, { "docid": "bb409a4fe7ce891e5584591b89ef68c1", "score": "0.495027", "text": "function getText() {\n return lorem.generateParagraphs(1);\n}", "title": "" }, { "docid": "98bd28c1b56a8679a3ee146b7cee592e", "score": "0.49491116", "text": "function getEntityInfo(collection_type, entity_name) {\n var skipFlag = 0;\n\n var collection_name;\n if (collection_type == 1) {\n collection_name = 'equipment_info';\n } else if (collection_type == 2) {\n collection_name = 'landmark_info';\n } else if (collection_type == 3) {\n collection_name = 'structures_info';\n } else {\n var skipFlag = 1;\n }\n\n if (skipFlag == 0) {\n db\n .collection(collection_name)\n .get()\n .then(function(querySnapshot) {\n querySnapshot.forEach(function(doc) {\n // doc.data() is never undefined for query doc snapshots\n if (doc.name == entity_name) {\n if (doc.data().info_text != null) {\n alert('found!');\n console.log(doc.id, ' => ', doc.data().info_text);\n return doc.data().info_text;\n }\n }\n });\n })\n .catch(function(error) {\n console.log('Error getting documents: ', error);\n });\n }\n\n return null;\n}", "title": "" }, { "docid": "a9d9338eecd38ef79bd68f04eb1a75ec", "score": "0.4945002", "text": "function returnLicenseSection(license) {\n if(license !== \"none\") {\n return `## License\n licensed under ${license}`;\n }\n return \"\";\n}", "title": "" }, { "docid": "566a58acfee104d801f15496b09b6df8", "score": "0.49383438", "text": "function typeInText(partIndex, sentenceIndex, endPartIndex) {\n if (partIndex < partsOfNarrative.length && partIndex < endPartIndex) {\n var part = partsOfNarrative[partIndex];\n\n var p = d3.select(part.element);\n var text = part.sentences[sentenceIndex];\n var originalText = p.html();\n\n var toWait = part.durationBetween;\n if (part.typed) {\n var textLength = text.length;\n var duration = textLength * durationPerChar;\n p.transition()\n .duration(duration)\n .ease(d3.easeLinear)\n .tween('text', function () {\n return function (t) {\n var newText = text.substr(0,\n Math.round(t * textLength));\n p.html(originalText + newText);\n };\n });\n toWait += duration * 1.1;\n } else {\n p.html(originalText + text);\n\n // so much work to attach an event listener on to one element\n $(part.element + \" .generatedCitation\").click(function () {\n $.fn.fullpage.moveTo(\"aCredits\");\n });\n }\n\n setTimeout(function () {\n sentenceIndex++;\n if (sentenceIndex >= part.sentences.length) {\n partIndex++;\n sentenceIndex = 0;\n }\n typeInText(partIndex, sentenceIndex, endPartIndex);\n }, toWait);\n } else {\n done();\n }\n }", "title": "" }, { "docid": "fe72a0b37a58757229e623d8e2051fc3", "score": "0.49285376", "text": "function getTextFromCategory(clickedAnchor) {\n for(var i = 0; i < allImages.text.length; i++) {\n if (allImages.text[i].category === clickedAnchor) {\n return allImages.text[i].description;\n }\n }\n }", "title": "" }, { "docid": "9a8fc4d4d030615513948de9de5227b8", "score": "0.4914897", "text": "function getText() {\n // pick a random text string to display\n let randNum = Math.floor(Math.random() * textStuff.length)\n let newText = textStuff[randNum];\n\n // if the newText !== the curText, return newText, else recurse\n return (newText !== curText) ? newText : getText();\n }", "title": "" }, { "docid": "e4e1e3a2d036b3a7b4ab4c2ba31d7b4e", "score": "0.48896927", "text": "function printRecText(readResults) {\n console.log('Recognized text:');\n for (const page in readResults) {\n if (readResults.length > 1) {\n console.log(`==== Page: ${page}`);\n }\n const result = readResults[page];\n if (result.lines.length) {\n for (const line of result.lines) {\n console.log(line.words.map(w => w.text).join(' '));\n }\n }\n else { console.log('No recognized text.'); }\n }\n }", "title": "" }, { "docid": "29988297f4d4da38aab45aebed104cfa", "score": "0.4887772", "text": "get text() {\n return this.strings.slice(1)\n .reduce((obj, cur, i) => {\n const val = this._values[i]\n const isDefault = val === DEFAULT\n const n = isDefault ? obj.n : obj.n + 1\n const interpolated = isDefault ? 'DEFAULT' : '$' + n\n const text = obj.text + interpolated + cur\n return { text, n }\n }, {\n text: this.strings[0],\n n: 0\n })\n .text\n }", "title": "" }, { "docid": "105b5da6edf404bf205d199c68f45859", "score": "0.48873815", "text": "function getType(type) {\r\n\tvar disStr = \"\";\r\n\tswitch(type) { //Note: This conversion also exists on PHP code, at least in getEvents.php\r\n\t\tcase \"1\": disStr = \"Open text\"; break;\r\n\t\tcase \"2\": disStr = \"Open number\"; break;\r\n\t\tcase \"3\": disStr = \"Sound\"; break;\r\n\t\tcase \"4\": disStr = \"Multiple choiceX\"; break;\r\n\t\tcase \"5\": disStr = \"Super\"; break;\r\n\t\tcase \"6\": disStr = \"Comment\"; break;\r\n\t\tcase \"7\": disStr = \"Photo\"; break;\r\n\t\tcase \"8\": disStr = \"Video\"; break;\r\n\t\tcase \"9\": disStr = \"Slider\"; break;\r\n\t\tcase \"10\": disStr = \"Multiple answer\"; break;\r\n\t}\r\n\treturn disStr;\r\n}", "title": "" }, { "docid": "78b810c5e7b4aecc0a4a6e09b6a3e329", "score": "0.48816487", "text": "function getElementValue (type) {\n\tlet value;\n\n\tswitch (type) {\n\tcase 'text':\n\tcase 'rich_text':\n\tcase 'url_slug':\n\tcase 'date_time':\n\t\tvalue = '';\n\t\tbreak;\n\tcase 'number':\n\t\tvalue = 0;\n\t\tbreak;\n\tcase 'multiple_choice':\n\tcase 'modular_content': \n\tcase 'taxonomy':\n\t\tvalue = [{\n\t\t\tcodename: ''\n\t\t}];\n\t\tbreak;\n\tcase 'asset':\n\t\tvalue = [{\n\t\t\tid: ''\n\t\t}];\n\t\tbreak;\n\t}\n \n\treturn value;\n}", "title": "" }, { "docid": "8e0e0d486723d8a158b9a98f9c1942a0", "score": "0.4870277", "text": "function getArticleType(doc, url) {\n\t//var toc = doc.evaluate(tocX, doc, null, XPathResult.ANY_TYPE, null).iterateNext();\n\tif (url.indexOf(\"results.cfm\") != -1) {\n\t\t//Zotero.debug(\"Type: multiple\");\n\t\treturn \"multiple\";\n\t}\n\n\tvar conference = getText('//meta[@name=\"citation_conference\"]/@content', doc);\n\tvar journal = getText('//meta[@name=\"citation_journal_title\"]/@content', doc);\n\t//Zotero.debug(conference);\n\tif (conference.trim()) return \"conferencePaper\";\n\telse if (journal.trim()) return \"journalArticle\";\n\telse return \"book\";\n\n}", "title": "" }, { "docid": "46f1568d6472d2d9cfb31db6ef3fe05c", "score": "0.48660454", "text": "getExample(type) {\n switch (type) {\n case \"css\":\n return `\n .the-cheet[is=\"tothelimit\"] {\n padding: 8px;\n margin: 4px;\n }\n`;\n break;\n case \"html\":\n return `\n <blockquote>\n Dear Strongbad,\n In 5th grade I have to watch a <em>lame hygiene movie</em>. I was thinking\n you could make a <strong id=\"bad\">better movie about hygiene</strong> than the cruddy school version.\n Your friend,\n John\n </blockquote>\n`;\n break;\n case \"javascript\":\n case \"js\":\n return `const everyBody = \"to the limit\";\n let theCheat = true;\n if (theCheat) {\n return \\`is \\${everyBody}\\`;\n }`;\n break;\n case \"xml\":\n return `<IAmLike>\n <ComeOn>fhqwhgads</ComeOn>\n</IAmLike>`;\n break;\n case \"yaml\":\n return `- CaracterList:\n - Homestar Runner\n - Strongbad\n - The Cheat`;\n break;\n case \"php\":\n return ` $MrTheCheat = \"wins the big race\";\nif ($MrTheCheat) {\n return \"HaVe A tRoPhY\";\n}`;\n break;\n case \"json\":\n return `{\n \"mainMenu\": [\n \"Characters\",\n \"Games\",\n \"Toons\",\n \"Email\",\n \"Store\"\n ]\n}`;\n break;\n }\n }", "title": "" }, { "docid": "b9b63be81c8a7335080e222ff3fe3772", "score": "0.48648107", "text": "function section(g) {\n\t\tvar trs = new Array(g.files.length);\n\t\tg.files.forEach(function(f, i) {\n\t\t\ttrs[i] = '<tr><td><a href=\"genomes/' + g.name + '/' + f.file + '\">' + f.file + '</a></td><td>' + f.header + '</td><td class=\"text-right\">' + f.nucleotides.comma() + '</td></tr>';\n\t\t});\n\t\treturn '<h3>' + g.name + ', taxonomy id ' + g.taxid + ', NCBI build ' + g.ncbiBuild + ', version ' + g.version + ', released on ' + g.releaseDate + ', total ' + g.nucleotides.comma() + ' nucleotides in ' + g.files.length + ' files</h3><div class=\"table-responsive\"><table class=\"table table-hover\"><thead><tr><th>File</th><th>Header</th><th class=\"text-right\">Nucleotides</th></tr></thead><tbody>' + trs.join('') + '</tbody></table></div>';\n\t}", "title": "" }, { "docid": "a25e9fb0dd4ada303d51b588fa418b2f", "score": "0.48611003", "text": "text(id, language) {\n return this._map.get(language).get(id);\n }", "title": "" }, { "docid": "eb2dd12637c40ec2a701194d24b9da48", "score": "0.4860063", "text": "function ttText(optIndex){\n return (options.tooltipSrc == 'text') ? selectOptions[optIndex].text : selectOptions[optIndex].value;\n }", "title": "" }, { "docid": "683791d2eeced85b2eb6c4190c355b57", "score": "0.48525092", "text": "function getDescription(ability, mod) {\n // find what ability score should we retrive text\n // i.e. str, dex, con, int, wis or cha\n for (let key in DESCRIPTION) {\n if (key == ability) {\n // items inside ability key is an array of pairs\n // i.e. str: [[2, 'text'], [3, 'text'], [4, 'text']]\n for (let desc of DESCRIPTION[ability]) {\n // find number that matches given modifier\n // and return that number's description\n if (desc[0] == mod) return desc[1];\n }\n }\n }\n}", "title": "" }, { "docid": "2737407cd5d2606cf17c8afca9bea3df", "score": "0.48524585", "text": "function text_info(text){\n return '<span class = \"text-info\">'+text+'</span>';\n}", "title": "" }, { "docid": "dab25b7b8d2f29a7232761720f497efb", "score": "0.4850031", "text": "async grabTextFrom(locator) {\n const els = await this._locate(locator);\n assertElementExists(els);\n const texts = [];\n for (const el of els) {\n texts.push(await el.getText());\n }\n if (texts.length === 1) return texts[0];\n return texts;\n }", "title": "" }, { "docid": "b491ab708e90b7e5a20bb741ad846cb3", "score": "0.4846563", "text": "function getResponse(type)\n{\n for (var i = 0; i < responsesJSON.length; i++)\n {\n if (responsesJSON[i].type == type)\n {\n return (responsesJSON[i].response);\n var NLP_To_File = 'NLP_[Respone]: ' + responsesJSON[i].response + '\\n';\n logger_extInfo(NLP_To_File);\n }\n }\n var type_split = type.split(/(?=[A-Z])/);\n\n\n var NLP_To_File = 'NLP_[Type]: ' + type + '\\n';\n logger_extInfo(NLP_To_File);\n\n var NLP_To_File = 'NLP_[Type Splitted]: ' + type_split + '\\n';\n logger_extInfo(NLP_To_File);\n\n var generic_response = \"The \" + type_split.join(\" \") + \" for your {account} \"\n + \" is currently sitting at {value}. Please let me know if there's \" +\n \"anything you'd like me to assist with :)\";\n\n var NLP_To_File = 'NLP_[Generic Response]: ' + generic_response + '\\n';\n logger_extInfo(NLP_To_File);\n\n return (generic_response);\n}", "title": "" }, { "docid": "ae6489b0388e2b347b9796a1f9966f6c", "score": "0.48393682", "text": "function TM_getText(code)\r{\r var participant = null;\r this.getTranslatorInfo();\r var index = \"text\";\r var arry = translatorInfo[this.index];\r\r if (arry.textParticipants)\r {\r for (var part in arry.textParticipants)\r {\r var translations = arry[part].translations;\r if (translations)\r {\r if (translations[index])\r {\r if (this.searchMatchesCode(part, code))\r {\r this.whereToSearch = index;\r participant = part;\r break;\r }\r }\r }\r }\r }\r return participant;\r}", "title": "" }, { "docid": "b91c2343dcd20d0dec73da0f2a3ebc34", "score": "0.4833147", "text": "function trimToOneParagraph(textOfSection, sectionName) {\n\t\tvar hIndex = textOfSection.indexOf(sectionName);\n\t\tvar hi = 0;\n\n\t\tif (hIndex > -1) {\n\t\t\twhile (textOfSection[hIndex + hi] != \"=\") {\n\t\t\t\thi++;\n\t\t\t}\n\t\t\twhile (textOfSection[hIndex + hi] == \"=\") {\n\t\t\t\thi++;\n\t\t\t}\n\t\t\tvar help = textOfSection.substr(hIndex + hi).indexOf(\"==\");\n\t\t\t/*while (textOfSection[hIndex + hi] != \"=\") {\n\t\t\thi++;\n\t\t\t}*/\n\t\t\treturn textOfSection.substr(0, hIndex + hi + help);\n\t\t} else {\n\t\t\t/*console.log(\"-----------------------------------------------------\");\n\t\t\tconsole.log(\"SECTIONNAME: \" + sectionName);\n\t\t\tconsole.log(\"TEXTOFSECTION: \" + textOfSection);\n\t\t\tconsole.log(\"-----------------------------------------------------\");*/\n\t\t}\n\t\treturn textOfSection;\n\t}", "title": "" }, { "docid": "ad392eb789c241f8796db18ca3c9ea6c", "score": "0.48317558", "text": "function getData (el, type) {\n const data = getDataByType(el, type)\n\n if (data) {\n return data\n }\n}", "title": "" }, { "docid": "f08b2dc53f925fdfdecce4fab17356d0", "score": "0.48299563", "text": "function getHardwareInfo(type) {\n var dcTitles = Object.keys(initparams);\n var dcTechTitle = $(\"#DcLocation_Val\").val();\n\n var dcHardwareInfo = {};\n dcTitles.forEach(function (elem, index, dcTitles) {\n if (initparams[elem] && initparams[elem].DCLocationTechTitle == dcTechTitle) {\n dcHardwareInfo = initparams[elem].HardwareDescription;\n return;\n }\n });\n\n switch (type) {\n case 'hi-base':\n return (dcHardwareInfo.HighBasePoolDescription);\n case 'hi-extra':\n return (dcHardwareInfo.HighExtraPoolDescription);\n default:\n return (dcHardwareInfo.LowPoolDescription);\n }\n }", "title": "" }, { "docid": "3a56af2dfe9eb655188256083d553bc1", "score": "0.4829457", "text": "extractFirstParagraphText(content = []) {\n const plaintext = ContentNode.computed.plaintext.bind({\n ...ContentNode.methods,\n content,\n })();\n return firstParagraph(plaintext);\n }", "title": "" }, { "docid": "48e56b131133c209289044fb37c0e723", "score": "0.4824526", "text": "function getText(obj) {\n var rtn = {status:\"generated\"};\n var txt = \"sample medicationadministration\";\n /*\n txt += \"<div>Identifiers</div><ul>\";\n _.each(obj.identifier,function(ident){\n txt += \"<li>Use:\" + ident.use + \": \" + ident.value + \" (\" + ident.system + \")</li>\"\n })\n txt += \"</ul>\";\n */\n rtn.div = \"<div>\" + txt + \"</div>\";\n return rtn;\n}", "title": "" }, { "docid": "1629ec742a3422fd274b7e788839d207", "score": "0.48153517", "text": "static getText(trendPoint) {\n return trendPoint[TrendPoint._TEXT_IDX];\n }", "title": "" }, { "docid": "f4bc849aedf4e5f7e0e793af547b9f45", "score": "0.481322", "text": "function lookText() {\n appendOut(currentRoom.desc);\n}", "title": "" }, { "docid": "077fcd253d0cfcd663194da9a7fea055", "score": "0.48055357", "text": "get(key) {\n\t\tlet text = languageData[this.currentLanguage][key];\n\t\tconsole.assert(text != null, \"Phrase not found in {0}: '{1}'\".format(this.currentLanguage, key));\n\t\treturn text;\n\t}", "title": "" }, { "docid": "8e65e6f3995ec46017ead2d5d80afcf9", "score": "0.48030224", "text": "function displaySelectedType(){\n\n\t\tif($('#inputType').val() == TEXT_TYPE){\n\t\t\t$('#textSection').show();\n\t\t\t$('#listSection').hide();\n\t\t} else if($('#inputType').val() == LIST_TYPE) {\n\t\t\t$('#listSection').show();\n\t\t\t$('#textSection').hide();\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "2537218d514ef66cf755a97dd6f5cf4d", "score": "0.4802805", "text": "function get_section_data(crn) {\n\tfor(var i = 0; i < schedule_data.sections.length; i++) {\n\t\tif(schedule_data.sections[i].crn == crn) return schedule_data.sections[i];\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "72428431a3ea65d0c51186ae7bf12df2", "score": "0.47943497", "text": "function filter(section, prev, next) {\n var body = section.body.trim();\n return !(body === '' && next.level !== (section.level + 1))\n ? emit(section.heading) + (body ? emit(section.body) : '')\n : null;\n}", "title": "" }, { "docid": "3b535f8c0676ba94bdef1d9954fcd0ef", "score": "0.4792763", "text": "function extractPokemonText(pokemonObj) {\n //debugger;\n //console.log(pokemonObj);\n // if(pokemonObj.sprites){\n // console.log(pokemonObj.sprites)\n return [pokemonObj.name, pokemonObj.sprites.front_default, pokemonObj.types[0].type.name]}", "title": "" }, { "docid": "3636895a78de6edb18f93ddbce67cf20", "score": "0.4792123", "text": "function get(sectionId, sitRepId, callback){\n context.getById(sectionId, sitRepId, function(err, section){\n if(err){\n callback(err);\n } else {\n callback(null, section);\n }\n });\n}", "title": "" }, { "docid": "5c575185e2dbbe3e11cb6143c5a9426c", "score": "0.4792009", "text": "function getWholeText() {\n let editor = vscode.window.activeTextEditor;\n let firstLine = editor.document.lineAt(0);\n let lastLine = editor.document.lineAt(editor.document.lineCount - 1);\n let textRange = new vscode.Range(0, firstLine.range.start.character, editor.document.lineCount - 1, lastLine.range.end.character);\n return editor.document.getText(textRange);\n}", "title": "" }, { "docid": "1a5c85aab4fa5994f06e29a90b22b9c0", "score": "0.47900692", "text": "function getContent(content){\n const array = content.split(\"<p>\")\n // function getStart(){\n // let num = 0\n // array.forEach((x, i) => {\n // if(x === \"p\"){\n // return num = i\n // }\n // })\n // return num\n // }\n \n if (array[1]){\n let line = array[1].split(\"</p>\")\n return line[0].substring(0, 180) + \"...\"\n }\n // return content.substring(getStart(), getStart()+100)\n }", "title": "" }, { "docid": "136ea63ad3e6de9a8c4809f8a7a010e1", "score": "0.47846204", "text": "function text(node) {\n return node && node.type === 'text'\n}", "title": "" }, { "docid": "136ea63ad3e6de9a8c4809f8a7a010e1", "score": "0.47846204", "text": "function text(node) {\n return node && node.type === 'text'\n}", "title": "" }, { "docid": "f9a05f58b34d45c4a64086f15c498167", "score": "0.47797033", "text": "static atSection(section: string): string {\n return urlHelper.argument(\"section\") === section;\n }", "title": "" }, { "docid": "a7ae2a1a098dcc8bab0d635416629d96", "score": "0.4779463", "text": "function renderLicenseSection(license) {\n content = {\n \"No License, all rights reserved.\" : \"All rights resevered. Copyright (c) 2021\",\n \"MIT License - simple and highly permisive.\" : \"Licensed under the MIT License\",\n \"Mozilla Public License - private use with some open source maintanence.\" : \"Licensed under the Mozilla Public License\",\n \"GNU GPLv3 License - keeps code open source.\" : \"Licensed under the GNU GPLv3 License\",\n };\n\n return content[license]\n}", "title": "" }, { "docid": "573ed55d0c9a22831fdf6f3dee18a806", "score": "0.47794452", "text": "function getPartType(part) {\n if (part === 'ribozyme') {\n return so + 'SO:0000374';\n }\n else if (part === 'scar') {\n return so + 'SO:0001953';\n }\n else if (part === 'cds') {\n return so + 'SO:0000316';\n }\n else if (part === 'promoter') {\n return so + 'SO:0000167';\n }\n else if (part === 'rbs') {\n return so + 'SO:0000139';\n }\n else if (part === 'terminator') {\n return so + 'SO:0000141';\n } else {\n console.log('Part Type not found');\n }\n}", "title": "" }, { "docid": "7dd7f67d79420936603c291dc2dc0b36", "score": "0.47792542", "text": "function getChapterText() {\n return $.ajax({\n type: \"GET\",\n url: \"Data/ch08.txt\",\n dataType: \"text\",\n success: function (text_content) {\n return text_content;\n }\n });\n }", "title": "" }, { "docid": "18cafffd2ffc30f61cfb1f3bfb39cf03", "score": "0.47783157", "text": "function format(item) {\n\t return item.text;\n\t}", "title": "" }, { "docid": "75412859d7e283d1e8c565c6201a4c17", "score": "0.47697285", "text": "function renderLicenseSection(license) {\n switch (license) {\n case 'mit':\n licenseText = `\n Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n `;\n break;\n case 'mozilla':\n licenseText = `\n 1. Definitions\n 1.1. “Contributor”\n means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software.\n \n 1.2. “Contributor Version”\n means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor’s Contribution.\n \n 1.3. “Contribution”\n means Covered Software of a particular Contributor.\n \n 1.4. “Covered Software”\n means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof.\n \n 1.5. “Incompatible With Secondary Licenses”\n means\n \n 1 that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or\n \n 2 that the Covered Software was made available under the terms of version 1.1 or earlier of the License, but not also under the terms of a Secondary License.\n \n 1.6. “Executable Form”\n means any form of the work other than Source Code Form.\n \n 1.7. “Larger Work”\n means a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software.\n \n 1.8. “License”\n means this document.\n \n 1.9. “Licensable”\n means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently, any and all of the rights conveyed by this License.\n \n 1.10. “Modifications”\n means any of the following:\n \n any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or\n \n any new file in Source Code Form that contains any Covered Software.\n \n 1.11. “Patent Claims” of a Contributor\n means any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version.\n \n 1.12. “Secondary License”\n means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses.\n \n 1.13. “Source Code Form”\n means the form of the work preferred for making modifications.\n \n 1.14. “You” (or “Your”)\n means an individual or a legal entity exercising rights under this License. For legal entities, “You” includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, “control” means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.\n \n 2. License Grants and Conditions\n 2.1. Grants\n Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:\n \n under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work; and\n \n under Patent Claims of such Contributor to make, use, sell, offer for sale, have made, import, and otherwise transfer either its Contributions or its Contributor Version.\n \n 2.2. Effective Date\n The licenses granted in Section 2.1 with respect to any Contribution become effective for each Contribution on the date the Contributor first distributes such Contribution.\n \n 2.3. Limitations on Grant Scope\n The licenses granted in this Section 2 are the only rights granted under this License. No additional rights or licenses will be implied from the distribution or licensing of Covered Software under this License. Notwithstanding Section 2.1(b) above, no patent license is granted by a Contributor:\n \n for any code that a Contributor has removed from Covered Software; or\n \n for infringements caused by: (i) Your and any other third party’s modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or\n \n under Patent Claims infringed by Covered Software in the absence of its Contributions.\n \n This License does not grant any rights in the trademarks, service marks, or logos of any Contributor (except as may be necessary to comply with the notice requirements in Section 3.4).\n \n 2.4. Subsequent Licenses\n No Contributor makes additional grants as a result of Your choice to distribute the Covered Software under a subsequent version of this License (see Section 10.2) or under the terms of a Secondary License (if permitted under the terms of Section 3.3).\n \n 2.5. Representation\n Each Contributor represents that the Contributor believes its Contributions are its original creation(s) or it has sufficient rights to grant the rights to its Contributions conveyed by this License.\n \n 2.6. Fair Use\n This License is not intended to limit any rights You have under applicable copyright doctrines of fair use, fair dealing, or other equivalents.\n \n 2.7. Conditions\n Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1.\n \n 3. Responsibilities\n 3.1. Distribution of Source Form\n All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients’ rights in the Source Code Form.\n \n 3.2. Distribution of Executable Form\n If You distribute Covered Software in Executable Form then:\n \n such Covered Software must also be made available in Source Code Form, as described in Section 3.1, and You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and\n \n You may distribute such Executable Form under the terms of this License, or sublicense it under different terms, provided that the license for the Executable Form does not attempt to limit or alter the recipients’ rights in the Source Code Form under this License.\n \n 3.3. Distribution of a Larger Work\n You may create and distribute a Larger Work under terms of Your choice, provided that You also comply with the requirements of this License for the Covered Software. If the Larger Work is a combination of Covered Software with a work governed by one or more Secondary Licenses, and the Covered Software is not Incompatible With Secondary Licenses, this License permits You to additionally distribute such Covered Software under the terms of such Secondary License(s), so that the recipient of the Larger Work may, at their option, further distribute the Covered Software under the terms of either this License or such Secondary License(s).\n \n 3.4. Notices\n You may not remove or alter the substance of any license notices (including copyright notices, patent notices, disclaimers of warranty, or limitations of liability) contained within the Source Code Form of the Covered Software, except that You may alter any license notices to the extent required to remedy known factual inaccuracies.\n \n 3.5. Application of Additional Terms\n You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any such warranty, support, indemnity, or liability obligation is offered by You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any jurisdiction.\n \n 4. Inability to Comply Due to Statute or Regulation\n If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.\n \n 5. Termination\n 5.1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice.\n \n 5.2. If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version directly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate.\n \n 5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to termination shall survive termination.\n \n 6. Disclaimer of Warranty\n Covered Software is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this License. No use of any Covered Software is authorized under this License except under this disclaimer.\n \n 7. Limitation of Liability\n Under no circumstances and under no legal theory, whether tort (including negligence), contract, or otherwise, shall any Contributor, or anyone who distributes Covered Software as permitted above, be liable to You for any direct, indirect, special, incidental, or consequential damages of any character including, without limitation, damages for lost profits, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if such party shall have been informed of the possibility of such damages. This limitation of liability shall not apply to liability for death or personal injury resulting from such party’s negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You.\n \n 8. Litigation\n Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a party’s ability to bring cross-claims or counter-claims.\n \n 9. Miscellaneous\n This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor.\n \n 10. Versions of the License\n 10.1. New Versions\n Mozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number.\n \n 10.2. Effect of New Versions\n You may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward.\n \n 10.3. Modified Versions\n If you create software not governed by this License, and you want to create a new license for such software, you may create and use a modified version of this License if you rename the license and remove any references to the name of the license steward (except to note that such modified license differs from this License).\n \n 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses\n If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached.\n \n Exhibit A - Source Code Form License Notice\n This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.\n \n If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice.\n \n You may add additional accurate notices of copyright ownership.\n \n Exhibit B - “Incompatible With Secondary Licenses” Notice\n This Source Code Form is “Incompatible With Secondary Licenses”, as defined by the Mozilla Public License, v. 2.0.`\n break;\n case 'eclipse':\n licenseText = `\n THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (“AGREEMENT”). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.\n\n 1. DEFINITIONS\n “Contribution” means:\n \n a) in the case of the initial Contributor, the initial content Distributed under this Agreement, and\n b) in the case of each subsequent Contributor:\n i) changes to the Program, and\n ii) additions to the Program;\n where such changes and/or additions to the Program originate from and are Distributed by that particular Contributor. A Contribution “originates” from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include changes or additions to the Program that are not Modified Works.\n “Contributor” means any person or entity that Distributes the Program.\n \n “Licensed Patents” mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.\n \n “Program” means the Contributions Distributed in accordance with this Agreement.\n \n “Recipient” means anyone who receives the Program under this Agreement or any Secondary License (as applicable), including Contributors.\n \n “Derivative Works” shall mean any work, whether in Source Code or other form, that is based on (or derived from) the Program and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship.\n \n “Modified Works” shall mean any work in Source Code or other form that results from an addition to, deletion from, or modification of the contents of the Program, including, for purposes of clarity any new file in Source Code form that contains any contents of the Program. Modified Works shall not include works that contain only declarations, interfaces, types, classes, structures, or files of the Program solely in each case in order to link to, bind by name, or subclass the Program or Modified Works thereof.\n \n “Distribute” means the acts of a) distributing or b) making available in any manner that enables the transfer of a copy.\n \n “Source Code” means the form of a Program preferred for making modifications, including but not limited to software source code, documentation source, and configuration files.\n \n “Secondary License” means either the GNU General Public License, Version 2.0, or any later versions of that license, including any exceptions or additional permissions as identified by the initial Contributor.\n \n 2. GRANT OF RIGHTS\n a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, Distribute and sublicense the Contribution of such Contributor, if any, and such Derivative Works.\n b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in Source Code or other form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.\n c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to Distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.\n d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.\n e) Notwithstanding the terms of any Secondary License, no Contributor makes additional grants to any Recipient (other than those set forth in this Agreement) as a result of such Recipient's receipt of the Program under the terms of a Secondary License (if permitted under the terms of Section 3).\n 3. REQUIREMENTS\n 3.1 If a Contributor Distributes the Program in any form, then:\n \n a) the Program must also be made available as Source Code, in accordance with section 3.2, and the Contributor must accompany the Program with a statement that the Source Code for the Program is available under this Agreement, and informs Recipients how to obtain it in a reasonable manner on or through a medium customarily used for software exchange; and\n b) the Contributor may Distribute the Program under a license different than this Agreement, provided that such license:\n i) effectively disclaims on behalf of all other Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;\n ii) effectively excludes on behalf of all other Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;\n iii) does not attempt to limit or alter the recipients' rights in the Source Code under section 3.2; and\n iv) requires any subsequent distribution of the Program by any party to be under a license that satisfies the requirements of this section 3.\n 3.2 When the Program is Distributed as Source Code:\n \n a) it must be made available under this Agreement, or if the Program (i) is combined with other material in a separate file or files made available under a Secondary License, and (ii) the initial Contributor attached to the Source Code the notice described in Exhibit A of this Agreement, then the Program may be made available under the terms of such Secondary Licenses, and\n b) a copy of this Agreement must be included with each copy of the Program.\n 3.3 Contributors may not remove or alter any copyright, patent, trademark, attribution notices, disclaimers of warranty, or limitations of liability (‘notices’) contained within the Program from any copy of the Program which they Distribute, provided that Contributors may add their own appropriate notices.\n \n 4. COMMERCIAL DISTRIBUTION\n Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor (“Commercial Contributor”) hereby agrees to defend and indemnify every other Contributor (“Indemnified Contributor”) against any losses, damages and costs (collectively “Losses”) arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.\n \n For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.\n \n 5. NO WARRANTY\n EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.\n \n 6. DISCLAIMER OF LIABILITY\n EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n \n 7. GENERAL\n If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.\n \n If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.\n \n All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.\n \n Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be Distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to Distribute the Program (including its Contributions) under the new version.\n \n Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. Nothing in this Agreement is intended to be enforceable by any entity that is not a Contributor or Recipient. No third-party beneficiary rights are created under this Agreement.\n \n Exhibit A – Form of Secondary Licenses Notice\n “This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), version(s), and exceptions or additional permissions here}.”\n \n Simply including a copy of this Agreement, including this Exhibit A is not sufficient to license the Source Code under Secondary Licenses.\n \n If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice.\n \n You may add additional accurate notices of copyright ownership.`;\n break; \n case 'none':\n licenseText = ``;\n break; \n };\n return licenseText;\n}", "title": "" }, { "docid": "2f3ea3330c82c6c990bc190907f1e851", "score": "0.4763446", "text": "function getGreeting(type)\n{\n for (var i = 0; i < responsesJSON.length; i++)\n {\n if (responsesJSON[i].type == type)\n {\n\n var NLP_To_File = 'NLP_[Returned Greeting]: ' + responsesJSON[i].response + '\\n';\n logger_extInfo(NLP_To_File);\n\n return (responsesJSON[i].response);\n }\n }\n}", "title": "" }, { "docid": "07676262456d4114ed98cc5b974b4cc5", "score": "0.47619444", "text": "string(editor, at) {\n var range = Editor.range(editor, at);\n var [start, end] = Range.edges(range);\n var text = '';\n\n for (var [node, path] of Editor.nodes(editor, {\n at: range,\n match: Text.isText\n })) {\n var t = node.text;\n\n if (Path.equals(path, end.path)) {\n t = t.slice(0, end.offset);\n }\n\n if (Path.equals(path, start.path)) {\n t = t.slice(start.offset);\n }\n\n text += t;\n }\n\n return text;\n }", "title": "" }, { "docid": "0632c2806d993160607ce326e7ad198e", "score": "0.4761256", "text": "getTextContent(element) {\n const elements = element.children;\n if (!elements || !elements.length) {\n return undefined;\n }\n\n const elementStack = elements.slice();\n const text = [];\n while (elementStack.length) {\n const nextEl = elementStack.shift();\n if (nextEl.type === 'text') {\n text.push(nextEl.data);\n }\n\n if (nextEl.children && nextEl.type !== 'comment') {\n elementStack.unshift(...nextEl.children);\n }\n }\n\n return text.join('').trim();\n }", "title": "" }, { "docid": "e39175b4016181904ce1d48272970428", "score": "0.47597134", "text": "function addTextSection(text)\n{\n var $paragraph = $(\"<p class='storyText'></p>\");\n\n var highlightedText;\n\n // Split individual words into span tags, so that they can be underlined\n // when the user holds down the alt key, and so that they can be individually\n // clicked in order to jump to the source.\n\n // But first, let's parse out carrot tags so they are styled correctly but\n // don't screw with the word count\n\n // Split the line if we have a >>\n var splitOnCarrotTags = text.split(\">>\");\n var nonTagText = splitOnCarrotTags.shift();\n\n // Reconstitute the rest of the line that has tags\n var tagText = \"\";\n if (splitOnCarrotTags.length > 0) {\n tagText = \">>\" + splitOnCarrotTags.join(\">>\");\n }\n\n // If all we have left is a character name, style that like a tag\n\n if (/[A-Z]+:\\s*$/.test(nonTagText)) {\n tagText = nonTagText + tagText;\n nonTagText = \"\";\n }\n\n var arrayOfWords = nonTagText.split(\" \");\n var dialogueRegex = /^[A-Z]+:/\n var isDialogueLine = dialogueRegex.test(arrayOfWords[0]);\n\n var plainSpans = [];\n var highlightedSpans = [];\n\n if (settings.getSync(\"enforceCharCounts\")) {\n // ROBIN: Enforce character counts on this <p>.\n let charCount = 0;\n const MAX_NARRATION_COUNT = settings.getSync(\"narrativeCountDanger\");\n const MAX_DIALOGUE_COUNT = settings.getSync(\"dialogCountDanger\");\n let dangerousWordCount = isDialogueLine ? MAX_DIALOGUE_COUNT : MAX_NARRATION_COUNT;\n\n for (var i = 0; i < arrayOfWords.length; i++) {\n var currentWord = arrayOfWords[i];\n charCount += currentWord.length;\n if (charCount < dangerousWordCount) {\n plainSpans.push(currentWord);\n } else {\n highlightedSpans.push(currentWord);\n }\n }\n } else {\n // ROBIN: We are not enforcing any character counts, so...\n plainSpans = arrayOfWords;\n }\n\n let isLina = (arrayOfWords[0] === 'LINA:');\n let initialSpan = \"<span>\";\n \n if (isDialogueLine && isLina) {\n initialSpan = \"<span class='characterName Lina'>‍\"\n } else if (isDialogueLine) {\n initialSpan = \"<span class='characterName'>\"\n }\n\n var textAsSpans = initialSpan + plainSpans.join(\"</span> <span>\") + \"</span>\";\n\n if (highlightedSpans.length > 0) {\n // ROBIN: Note the space at the front here. Fussy.\n textAsSpans += \" <span class='charCountWarning'>\" + highlightedSpans.join(\"</span> <span class='charCountWarning'>\") + \"</span>\";\n }\n if (tagText.length > 0) {\n textAsSpans += ` <span class='carrotTags'>${tagText}</span`;\n }\n\n $paragraph.html(textAsSpans);\n\n // Keep track of the offset of each word into the content,\n // starting from the end of the last choice (it's global in the current play session)\n var previousContentLength = 0;\n var $existingLastContent = $textBuffer.children(\".storyText\").last();\n if( $existingLastContent ) {\n var range = $existingLastContent.data(\"range\");\n if( range ) {\n previousContentLength = range.start + range.length + 1; // + 1 for newline\n }\n }\n $paragraph.data(\"range\", {start: previousContentLength, length: text.length});\n\n // Append the actual content\n $textBuffer.append($paragraph);\n\n // Find the offset of each word in the content, for clickability\n var offset = previousContentLength;\n $paragraph.children(\"span\").each((i, element) => {\n var $span = $(element);\n var length = $span.text().length;\n $span.data(\"range\", {start: offset, length: length});\n offset += length + 1; // extra 1 for space\n });\n\n // Alt-click handler to jump to source\n $paragraph.find(\"span\").click(function(e) {\n if( e.altKey ) {\n\n var range = $(this).data(\"range\");\n if( range ) {\n var midOffset = Math.floor(range.start + range.length/2);\n events.jumpToSource(midOffset);\n }\n\n e.preventDefault();\n }\n });\n if (shouldAnimate()) {\n fadeIn($paragraph);\n }\n\n}", "title": "" }, { "docid": "bf8c95044cf339b5dea565b0936c96f8", "score": "0.47575903", "text": "shouldSetTextContent(type, props) {\n return (\n type === \"textrun\" &&\n (typeof props.children === \"string\" || typeof props.children === \"number\")\n );\n }", "title": "" }, { "docid": "b55afab8f04211104f8a48f3b71fdd33", "score": "0.47518775", "text": "function getBodyText(text) {\n return '<div>'+text+'</div>';\n \n}", "title": "" }, { "docid": "cb5237321e945583c1ad536727a71a8d", "score": "0.47487622", "text": "function findActorData (hashId, type) {\n\tif (type == \"Static\") {\n\t\tfor (const i of sectionData.Static.Objs) {\n\t\t\t// if (sectionData.Dynamic.Objs.hasOwnProperty(i)) {\n \tif (i.HashId.value == hashId) {\n \treturn i\n \t}\n\t\t\t// }\n\t\t}\n\t}\n\tif (type == \"Dynamic\") {\n\t\tfor (const i of sectionData.Dynamic.Objs) {\n\t\t\t// if (sectionData.Dynamic.Objs.hasOwnProperty(i)) {\n \tif (i.HashId.value == hashId) {\n \treturn (i)\n \t}\n\t\t\t// }\n\t\t}\n\t}\n}", "title": "" }, { "docid": "51db8b046d7d307349ebbeae4e83e6d1", "score": "0.47442055", "text": "async getText() {\n return (await this._content()).text();\n }", "title": "" }, { "docid": "3e40362c977dce4e170ac680f603c8ad", "score": "0.47333077", "text": "function get() {\n\t\t\treturn output.text;\n\t\t}", "title": "" } ]
0c74189fc897111debdeacc7d2a75783
data = data[0]; console.log(data)
[ { "docid": "f8cae5eb5826c8553c720a2093794a6b", "score": "0.0", "text": "function myIndexOf(voter_id) {\n\t\t\tif (data.polls.length === 0) {\n\t\t\t\treturn -1;\n\t\t\t} else {\n\t\t\t\tfor (var i = 0; i < data.polls.length; i++) {\n\t\t\t\t\tfor (var j = 0; j < data.polls[i].voters.length; j++) {\n\t\t\t\t\t\tif (data.polls[i].voters[j].voter_id === voter_id) {\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}", "title": "" } ]
[ { "docid": "89af5720bb16171b2e047f3ce1e40951", "score": "0.7573702", "text": "function first(data) {\n return data[0];\n}", "title": "" }, { "docid": "0a7a525ae432396b00d31ae81f5c385e", "score": "0.6645219", "text": "function tampilkanData(dataRAW) {\n console.log(\"Status: \" + dataRAW.status + \"<br/>\");\n console.log(dataRAW.data);\n console.log(dataRAW.data[0].q1);\n}", "title": "" }, { "docid": "b27bdaef6292b7257038e4d3be8da780", "score": "0.6478576", "text": "function rest(data) {\n return data.slice(1);\n}", "title": "" }, { "docid": "c7b91c1d202d506d060c0455eba4d5bf", "score": "0.64051104", "text": "function gotRawData(thedata) {\n //console.log(\"gotRawData \" + thedata);\n}", "title": "" }, { "docid": "2ecb3d26d0dcf8fa9e8cdef0be7d6dfa", "score": "0.62735987", "text": "peek() {\n return this.data[0] \n }", "title": "" }, { "docid": "2b4b0a3c5b8d04391b0195ae0d97922e", "score": "0.62699896", "text": "function gotData(data) {\n drone = data;\n console.log(data);\n}", "title": "" }, { "docid": "f9e03b6b7a9e75d78e7de883b72b913c", "score": "0.6262351", "text": "function dump(data){\n for (var i = data.length - 1; i >= 0; i--) {\n console.log(data[i]);\n }\n}", "title": "" }, { "docid": "9700d86244663e6765fd048130262758", "score": "0.62594235", "text": "function cmxData(data) {\n console.log(`JSON Feed: ${JSON.stringify(data, null, 2)}`);\n}", "title": "" }, { "docid": "13d2be88367da077737c890c85b28fe6", "score": "0.6258084", "text": "function getFirstDataTimestamp(data) {\n return data[0].Timestamp;\n }", "title": "" }, { "docid": "6c72c42f73460cd2481051d6006bce50", "score": "0.6178833", "text": "print() {\n this.data.forEach(element => {\n console.log(element)\n })\n }", "title": "" }, { "docid": "08425b4ded04037c858eef9926b1cb34", "score": "0.61164975", "text": "function getData() {\n return this._data;\n}", "title": "" }, { "docid": "7be6640406adcbfb044bf0e0addf146d", "score": "0.60748297", "text": "function printData(node){\n console.info(node.data);\n}", "title": "" }, { "docid": "673cfe4f8ad52fb1162f3b42359d97d2", "score": "0.6002965", "text": "function getData() {\r\n return _data;\r\n }", "title": "" }, { "docid": "a8903e0d7499e381a8def597b5391967", "score": "0.5986077", "text": "function gotData(err,data,response){\r\n\tconsole.log(data)\r\n}", "title": "" }, { "docid": "5f4ad64fe93d2ebb6c9395afa412bdb1", "score": "0.59804654", "text": "head() {\n var current = this.first;\n if (current == null) {\n return null;\n } else {\n return current.data;\n }\n }", "title": "" }, { "docid": "dd99397b9bc704e3e69bc6fd1060be8e", "score": "0.5969686", "text": "function receiveJson(data) {\n print(typeof data);\n print(data.get(\"firstName\").asText());\n}", "title": "" }, { "docid": "0447de82e64d15e49c399f16664368bb", "score": "0.5941119", "text": "get data() {return this._data;}", "title": "" }, { "docid": "b16382b5c19f391d7438d7a7cddd2e2f", "score": "0.5937793", "text": "function onData(data) {\n // console.log(data);\n // split into an array \n let dataArr = data.split(\",\");\n console.log(dataArr);\n\n\n}", "title": "" }, { "docid": "d7b691fda148973d33e74fbea96553b3", "score": "0.5935375", "text": "function process(dataitem){\n\n\tconsole.log(dataitem);\n}", "title": "" }, { "docid": "856135d0aa9b9ab0d729641caa25224e", "score": "0.590342", "text": "function returnObjectData(arr) {\n if (typeof arr !== \"undefined\") {\n return arr[0][\"$\"];\n }\n}", "title": "" }, { "docid": "25bf8a94786b3ac9798630b380bfa68c", "score": "0.5900482", "text": "function printFirst(users){\n console.log(users[0].name)\n}", "title": "" }, { "docid": "da8c33ae84c626c5c6df9cf45d3c311c", "score": "0.58880615", "text": "function accessFirstItem(array) {\n return array[0];\n}", "title": "" }, { "docid": "a27a593963c69d866414699474cfe1b0", "score": "0.5877137", "text": "function callback(err, data) {\n if (err) {\n console.log(err);\n return;\n } else {\n console.log(JSON.parse(data));\n return;\n }\n}", "title": "" }, { "docid": "fe5f189a1ed67ec2d5d51090010ada95", "score": "0.58443016", "text": "function first(x) {\r\n return x[0]\r\n}", "title": "" }, { "docid": "4a89d0b877ab8e9fd4d75bcf3cd55008", "score": "0.58160824", "text": "function presentData(dataArr){\n\t\tdataArr.forEach(function(item){\n\t\t\t//logs what is written to the console\n\t\t\tlog(item);\n\t\t\tconsole.log(item);\n\t\t});\n\t}", "title": "" }, { "docid": "eb628d5ff9944443eab3a39891c623e2", "score": "0.57639563", "text": "function getData() {\n\n }", "title": "" }, { "docid": "6988b0dfca8dcc461c0d4cc27946b114", "score": "0.57544106", "text": "extractData(data){\n return {\n part_no : data.NAME,\n nozzle : data.NP,\n feeder_number : data.PU,\n tanggal : data.tanggal,\n }\n\n // console.log(newData)\n }", "title": "" }, { "docid": "bae26591de9ce7f5ea96871653a7e056", "score": "0.5750554", "text": "print(data) {\n var stock = data.Stock\n for (const key in stock) {\n console.log(stock[key])\n }\n }", "title": "" }, { "docid": "68a47d0d5f31193f962bffdd329adafd", "score": "0.57488716", "text": "function getData() {\n return [12, 11, 10, 4];\n}", "title": "" }, { "docid": "176d93b81b248cac71cad0de1c51a415", "score": "0.57476115", "text": "get data() { return this._data.value; }", "title": "" }, { "docid": "176d93b81b248cac71cad0de1c51a415", "score": "0.57476115", "text": "get data() { return this._data.value; }", "title": "" }, { "docid": "d6b19b4012be570393ec45d731d1ef8c", "score": "0.5737544", "text": "get data() {\n return this._realData;\n }", "title": "" }, { "docid": "53a6c965535260b4507c13c286101545", "score": "0.573674", "text": "function getData(data){\n \n}", "title": "" }, { "docid": "704e2bc9f6622ee6c0724da81b85cf55", "score": "0.57341814", "text": "getData() {\n return this.data;\n }", "title": "" }, { "docid": "acf37478da9ed0c19e260619281fe2ed", "score": "0.57283604", "text": "function logData(data, callback){\n allData = JSON.parse(data);\n // callback(data);\n typeof allData;\n callbacks(allData);\n }", "title": "" }, { "docid": "8927712865b85e044ae10e5505172534", "score": "0.5717096", "text": "function printIncoming(data) {\r\n console.log(data);\r\n }", "title": "" }, { "docid": "4a8119d274b7839cc8cb452b1be72c02", "score": "0.56905377", "text": "data () {\n return this[_data];\n }", "title": "" }, { "docid": "4285af65a1c3559ea98185fc92db6a35", "score": "0.56866145", "text": "function getData() {}", "title": "" }, { "docid": "f34d2a651e5546796efc43ceff6f5607", "score": "0.56803805", "text": "getData () {\n return null\n }", "title": "" }, { "docid": "ad363e36425155c75fb1765dca56de46", "score": "0.56715566", "text": "function callBack(myData){\n\n\t//print the entire data object\n\tconsole.log(myData);\n\n\t//find a specific piece of data\n\tlat = myData.iss_position.latitude;\n\tconsole.log(lat);\n\n}", "title": "" }, { "docid": "49ca178cb74d2f25a026f4e19ff646bd", "score": "0.5669555", "text": "peek() {\n return this.data[this.data.length - 1];\n }", "title": "" }, { "docid": "fc20061253b94f788d5fda412a1b3687", "score": "0.5655576", "text": "getData() {\r\n return this.data;\r\n }", "title": "" }, { "docid": "b6a2bc360d0d258975dbb27ff95678e3", "score": "0.56404614", "text": "get data() {\n return this._data;\n }", "title": "" }, { "docid": "e4efd9379290a23e99fbd619182d304d", "score": "0.5639102", "text": "function handleFile(err, data) {\n if (err) throw err\n customers = JSON.parse(data)\n console.log(customers[2]);\n}", "title": "" }, { "docid": "2aee8703af70837bdc66e6507ec97713", "score": "0.56365204", "text": "parseData() { }", "title": "" }, { "docid": "afe9658d53682c2269c8945dd4bbe8d6", "score": "0.5635917", "text": "function GET_Result(aData){\n\t console.log(\"GET: I Got:\");\n\t console.log(aData);\n\t //alert(aData);\n\t //var arr = JSON.parse(aData);\n\t //console.log(arr);\n\t console.log(aData.RES);\n\t}", "title": "" }, { "docid": "afe9658d53682c2269c8945dd4bbe8d6", "score": "0.5635917", "text": "function GET_Result(aData){\n\t console.log(\"GET: I Got:\");\n\t console.log(aData);\n\t //alert(aData);\n\t //var arr = JSON.parse(aData);\n\t //console.log(arr);\n\t console.log(aData.RES);\n\t}", "title": "" }, { "docid": "9d0c600b8542708ceb8229914ff72679", "score": "0.5616295", "text": "function cb (err, data) {\n if (err) throw err\n console.log(data)\n}", "title": "" }, { "docid": "d4fca3ff3ce97943b7e3898d0cc85a59", "score": "0.56111586", "text": "function _(data) {\n console.log(data);\n }", "title": "" }, { "docid": "c83d7b6a4934078b17daff717bd430ba", "score": "0.5604136", "text": "function first (array) {\n return array[0];\n }", "title": "" }, { "docid": "96a3ebc2d5351c1b6d8400c285a45fa4", "score": "0.56029767", "text": "calculatePointsReply(data){\n let response_array = JSON.parse(data.target.response);\n console.log(response_array);\n self.response= response_array[1];\n }", "title": "" }, { "docid": "c99810c17fb640ebc28696a44f29e8dd", "score": "0.55953115", "text": "function head(array){\n return array[0];\n}", "title": "" }, { "docid": "52685d81e1b785e2715239a14b85e3b3", "score": "0.55912566", "text": "function printDataToConsole(data){\n console.log(data);\n}", "title": "" }, { "docid": "a559f75cfadee183a0a463101cc84c20", "score": "0.55902433", "text": "function first(array) {\n return array[0];\n }", "title": "" }, { "docid": "28a1977babea776f41d0e7758295a3c0", "score": "0.5586399", "text": "get data() {\n return this.#data;\n }", "title": "" }, { "docid": "581532548f3d0707ef6be4b539b7cd5f", "score": "0.5584287", "text": "function data() {\n return {};\n}", "title": "" }, { "docid": "f8433d8c1ff1d8dc8935d8385601d431", "score": "0.55808777", "text": "function loadData() {\n //get request that return a json string\n var json = httpGet(\"http://allow-any-origin.appspot.com/http://campodenno.taslab.eu/stazioni/json?id=CMD001\");\n //console.log(json);\n data = JSON.parse(json);\n //console.log(data);\n data=data.Response.result.measures.sensor;\n}", "title": "" }, { "docid": "1e796bf299f1378cc576bdd42a34b6e7", "score": "0.55798805", "text": "function parseOne (data) {\n if (!data || !data[0]) return\n return parseRow(data[0])\n}", "title": "" }, { "docid": "388044ccb5e5be62b3e388d89566845f", "score": "0.5572649", "text": "function display(data) {console.log(data)}", "title": "" }, { "docid": "d45ddec238c77daffe7e8c192b227b37", "score": "0.5572418", "text": "function first(a) {\n return a[0];\n}", "title": "" }, { "docid": "2c0a46029574f53ec601d62ffd5e8a66", "score": "0.55653685", "text": "function data() {\n return gathered;\n }", "title": "" }, { "docid": "1e6456bed79f40f871da3556694e5d8a", "score": "0.5563762", "text": "getData() {\n return this.data;\n }", "title": "" }, { "docid": "1e6456bed79f40f871da3556694e5d8a", "score": "0.5563762", "text": "getData() {\n return this.data;\n }", "title": "" }, { "docid": "1e6456bed79f40f871da3556694e5d8a", "score": "0.5563762", "text": "getData() {\n return this.data;\n }", "title": "" }, { "docid": "1159bb4b551bd208c58d26326d7c3ddc", "score": "0.5563527", "text": "get data() { return unwrap(this).data || \"\"; }", "title": "" }, { "docid": "400c5b8b09890aa8719c55d56ee29758", "score": "0.55590874", "text": "function firstOfArray(x){\n \n \nreturn x[0];\n}", "title": "" }, { "docid": "2367f0496c174f1b37feaaabd20afe1f", "score": "0.5551236", "text": "function first(mainArray){\n var firstElement = mainArray[0];\n console.log(firstElement);\n }", "title": "" }, { "docid": "fc86d70e66675766dd6ba85417db8ac1", "score": "0.55509317", "text": "function logData(data){\n for (let a = 0; a < data.article.length; a++) {\n console.log(files.article[a].ID);\n console.log(files.article[a].header);\n console.log(files.article[a].link);\n }\n }", "title": "" }, { "docid": "14d80313c3c043ee596275cabf63ac5a", "score": "0.55504346", "text": "PrintData(){\n let current = this.head;\n while(current){\n console.log(current.data);\n current = current.next;\n }\n\n }", "title": "" }, { "docid": "acfa95f69c8873f606fca5be47b190ae", "score": "0.55496925", "text": "function first(array) {\n return array[0];\n}", "title": "" }, { "docid": "acfa95f69c8873f606fca5be47b190ae", "score": "0.55496925", "text": "function first(array) {\n return array[0];\n}", "title": "" }, { "docid": "11e5556187f13fd1f0be28bf3a17a40f", "score": "0.5547181", "text": "function readData(data) { // json data\n return data.json(); // returns info into readable form\n}", "title": "" }, { "docid": "48d5f4e9243d81d8ea627c3d97a1fd30", "score": "0.5543557", "text": "function dataHandler(d){\n console.log(`got data`)\n console.log(d)\n console.log('// - - - - - //')\n}", "title": "" }, { "docid": "abcd173bb5425e7c39b4407b347f65dd", "score": "0.5541472", "text": "function updateData() {\n data = JSON.parse(FooBar.getData());\n //console.log(data);\n}", "title": "" }, { "docid": "a3da4d0abc79ea834c8d5cc95e27de84", "score": "0.55371064", "text": "function GET_Result(aData){\n\t console.log(\"GET: I Got:\");\n\t console.log(aData);\n\t}", "title": "" }, { "docid": "a3da4d0abc79ea834c8d5cc95e27de84", "score": "0.55371064", "text": "function GET_Result(aData){\n\t console.log(\"GET: I Got:\");\n\t console.log(aData);\n\t}", "title": "" }, { "docid": "a3da4d0abc79ea834c8d5cc95e27de84", "score": "0.55371064", "text": "function GET_Result(aData){\n\t console.log(\"GET: I Got:\");\n\t console.log(aData);\n\t}", "title": "" }, { "docid": "db1329a74bfd858ae20c93ab7c847162", "score": "0.553124", "text": "function handleData(data) {\r\n console.log('handling data', data); ///2\r\n \r\n for (const thing of data) {\r\n console.log('i have data', thing);///3,3,3\r\n }\r\n }", "title": "" }, { "docid": "fc4bdf4f7ec649ee1f026c95c8f65fce", "score": "0.5529965", "text": "function test(data){\n console.log(\"DATA*** : \",data);\n}", "title": "" }, { "docid": "321d16d1b2c1826a92169d7d7c9d89e1", "score": "0.5524111", "text": "get data() {\n\n // return current data object\n return this[data];\n }", "title": "" }, { "docid": "fef117c66a80a25d1d4a3b9b4242c598", "score": "0.5521355", "text": "function data() {\n return DataManager.getData().toJS();\n}", "title": "" }, { "docid": "c023b8bfa1623c35b5aee3b5bf38b9af", "score": "0.55189055", "text": "function print(data){\n console.log(data);\n}", "title": "" }, { "docid": "cbb0bfcc1c714941c9d9780e52624c98", "score": "0.5516164", "text": "function myCallback(err, data){\n if (!err){\n data.forEach(function(current){\n console.log(current);\n })\n }\n}", "title": "" }, { "docid": "7ead3564ef53cb66d0e9e51ad2124bb6", "score": "0.55147755", "text": "function array(info){\n\tfor (var i = 0;i < info.length;i++){\n\t\tconsole.log(info[i])\n\t}\n}", "title": "" }, { "docid": "4d6e7481aaa06fe596ba8fd83f714233", "score": "0.551467", "text": "function toSingle(data){\n return data;\n }", "title": "" }, { "docid": "27009934c0b5300a6845ba481643b67b", "score": "0.5510393", "text": "function head(array) {\n\treturn array[0];\n}", "title": "" }, { "docid": "49ab622a180151665a45d92b1d75b9e7", "score": "0.55058765", "text": "fetchAllFirst() {\n const allFirstData = [];\n for (let i = 0; i < this.data.length; i++) {\n if (this.data[i]) {\n allFirstData.push(this.data[i][0]);\n }\n }\n return allFirstData;\n }", "title": "" }, { "docid": "5520abb5c572d83727b95a9133e1018d", "score": "0.55056363", "text": "function first(array){\n\treturn array[0];\n}", "title": "" }, { "docid": "fac80dcab36cc70464d2f427dcbcbe7c", "score": "0.5504147", "text": "async write() {\n console.log(this.data);\n }", "title": "" }, { "docid": "a894d5dfd109622087b9bd66325808ea", "score": "0.55041015", "text": "data() {\n return this._dataValues ?? {}\n }", "title": "" }, { "docid": "35d95f10575c5ac1474d74931e187b0a", "score": "0.54993284", "text": "get Data() {\n return this.data;\n }", "title": "" }, { "docid": "8913ff52f22e40d9a58bb4bf678889f6", "score": "0.5491083", "text": "function head(array) {\n return array[0];\n}", "title": "" }, { "docid": "a314c769feeeeaa52ea18011e7f9eb4f", "score": "0.5468392", "text": "getDataCopy() {\n return [].concat(this.data);\n }", "title": "" }, { "docid": "e416bbd707684a905fb78c7efe04149c", "score": "0.5457007", "text": "function parseTHIS(data)\n{\n var JSON_object = data;\n var JSON_array = JSON.parse(JSON_object);\n return JSON_array;\n}", "title": "" }, { "docid": "88097a1b9e715bdd525f8211d067f312", "score": "0.5456774", "text": "printListData() {\n let current = this.head;\n while (current) {\n console.log(current.data);\n current = current.next;\n }\n }", "title": "" }, { "docid": "cdbeed3bd090924db8656de8eb2c17fb", "score": "0.5447669", "text": "get Data () {\n return this._data\n }", "title": "" }, { "docid": "532fc91fdef20083307a68798782f2db", "score": "0.5446914", "text": "getData() {\n\t\treturn this.data.hasOwnProperty('url') ? this.data.url : this.data;\n\t}", "title": "" }, { "docid": "91c46017fc6377c84dbf4b84d1afeda3", "score": "0.5442126", "text": "function first(arr, cb) {\n cb(arr[0]);\n}", "title": "" }, { "docid": "8529ca8004dd05e6ca2473ab5be50ea3", "score": "0.543814", "text": "get() {\n return this.data[this.data.length - 1];\n }", "title": "" }, { "docid": "fb58f17b72f4e714f313371eaa462213", "score": "0.54311067", "text": "function myPrint(data) {\r\n\tvar i;\r\n \tconsole.log('Data: ' + data);\r\n}", "title": "" }, { "docid": "e81de58a1c61e078d1b74d5c0f178da8", "score": "0.54186076", "text": "function first(firstValue){\n return firstValue[0];\n}", "title": "" } ]
57c565531f2f5feabe6202cce27ae82b
Supporting extension for displaying tooltips. Allows / [`showTooltip`](tooltip.showTooltip) to be used to define / tooltips.
[ { "docid": "75aa251cd5d99dfb90484b5322351ef7", "score": "0.68179584", "text": "function tooltips() {\r\n return view_1.EditorView.extend.fallback(tooltipExt);\r\n}", "title": "" } ]
[ { "docid": "747f396fe7f66045cbeeb50fca3cb2b8", "score": "0.74177265", "text": "function Tooltip(){}", "title": "" }, { "docid": "9b2d99c6083fbf4225ec4bd333f838e9", "score": "0.7300087", "text": "get tooltip() {}", "title": "" }, { "docid": "5c7fb04c2a357e92f61c82a5efaff9ab", "score": "0.7137152", "text": "function mostrarTooltip(contenido){\n tooltip.show(contenido);\n}", "title": "" }, { "docid": "02b763eb01dfba5e3f1572b19869f122", "score": "0.7005979", "text": "function addOverviewTooltipBehaviour() {\n $('.overview-list li a[title]').tooltip({\n position: 'center right',\n predelay: 500,\n effect: 'fade'\n });\n}", "title": "" }, { "docid": "a4b0706663180ac3086fc29c8c2ca9f7", "score": "0.69736636", "text": "function tooltips() {\n\t$('.tooltip-link').tooltip();\n}", "title": "" }, { "docid": "12c472f797d028c528370718bab2b423", "score": "0.6937954", "text": "set tooltip(value) {}", "title": "" }, { "docid": "6513adaa968e93e596b6cd2a31f8fc1c", "score": "0.6929904", "text": "function showTooltip(content, event) {\n tt.style('opacity', 0.8)\n .html(content);\n\n updatePosition(event);\n }", "title": "" }, { "docid": "a7cd804f233842f9d11557860a4f6d68", "score": "0.69251883", "text": "function showTooltip(content, event) {\n tt.style('opacity', 1.0)\n .html(content);\n\n updatePosition(event);\n }", "title": "" }, { "docid": "a7cd804f233842f9d11557860a4f6d68", "score": "0.69251883", "text": "function showTooltip(content, event) {\n tt.style('opacity', 1.0)\n .html(content);\n\n updatePosition(event);\n }", "title": "" }, { "docid": "6204022178550acf5861e8d6aa44d582", "score": "0.6922934", "text": "function hoverTooltip(source) {\r\n var plugin = view_1.ViewPlugin.create(function (view) { return new HoverPlugin(view, source); }).behavior(exports.showTooltip, function (p) { return p.active; });\r\n return [\r\n plugin.extension,\r\n tooltips()\r\n ];\r\n}", "title": "" }, { "docid": "48faaaf5ab794349ec6883c0a8b4d363", "score": "0.69202197", "text": "configureTooltip(infos){\n this.tooltip = infos;\n }", "title": "" }, { "docid": "8f5ba9f7bd99a0359cf93fbc8a913669", "score": "0.6907879", "text": "function show(){\r\n// Don't show empty tooltips.\r\n// Don't show empty tooltips.\r\n// And show the tooltip.\r\nreturn cancelShow(),cancelHide(),ttScope.content?(createTooltip(),void ttScope.$evalAsync(function(){ttScope.isOpen=!0,assignIsOpen(!0),positionTooltip()})):angular.noop}", "title": "" }, { "docid": "ccb9c98e3f9aa95763424f9c1cb45739", "score": "0.6869967", "text": "function showTooltip(content, event) {\n tt.style('opacity', 1.0)\n .html(content);\n\n updatePosition(event);\n }", "title": "" }, { "docid": "fbe17bb33acd475d372dd0fb2e32e7f2", "score": "0.6857", "text": "_showTooltip() {\n this._tooltipVisible = true;\n this._render(); \n }", "title": "" }, { "docid": "5001cf37e9808a102b4b089a73b9ef82", "score": "0.68547165", "text": "toggleTooltips() {\n self.enableTooltips = !self.enableTooltips;\n }", "title": "" }, { "docid": "88fd26890c5d8379140e1ffca4cad61e", "score": "0.6831715", "text": "function showTooltip(content, event) {\n tt.style('opacity', 1.0)\n .html(content);\n\n updatePosition(event);\n }", "title": "" }, { "docid": "c3ef36f865237cdcaafb6924a53c1a66", "score": "0.6798423", "text": "function PrayerPlansTooltipShown()\r\n{\r\n strHelpTopic = \"prayer_plans\";\r\n}", "title": "" }, { "docid": "293c5e291815c8472fd176a26cdff67b", "score": "0.6730389", "text": "function NewEntryTooltipShown()\r\n{\r\n strHelpTopic = \"new_entry\";\r\n}", "title": "" }, { "docid": "85f39abede71d3d758c060aae1b09d13", "score": "0.6726232", "text": "function tooltips(element, text) {\n new Tooltip(document.getElementById(element), {\n placement: \"top\",\n title: text\n });\n}", "title": "" }, { "docid": "db0b8f2b4e2fe6a9b177c4676894d8cb", "score": "0.6681382", "text": "function activateTooltip() {\n $(\"[data-toggle=infotooltip]\").tooltip({ placement: 'left'});\n}", "title": "" }, { "docid": "21f6568d87f886796a714a7a7718ded7", "score": "0.66712785", "text": "function SetTooltip(fmt) {\n bind.SetTooltip(fmt);\n}", "title": "" }, { "docid": "fc5e90069bb2dba717aee7876741a1c5", "score": "0.6668278", "text": "add_tooltip(elem, title) {\n elem.tooltip({\n 'title': title,\n 'placement': 'right',\n 'html': true\n });\n }", "title": "" }, { "docid": "fc5e90069bb2dba717aee7876741a1c5", "score": "0.6668278", "text": "add_tooltip(elem, title) {\n elem.tooltip({\n 'title': title,\n 'placement': 'right',\n 'html': true\n });\n }", "title": "" }, { "docid": "59e9b5cc0de82e8acc142f7efa949ba3", "score": "0.6659065", "text": "function PrayerPlanEntryTooltipShown()\r\n{\r\n strHelpTopic = \"edit_prayerplan_entry\";\r\n}", "title": "" }, { "docid": "886c37dfe29080527c4df033dc909d01", "score": "0.66580284", "text": "_showTooltip() {\n //console.log(this);\n this._tooltipVisible = true;\n this._render();\n }", "title": "" }, { "docid": "46764456b2b42eb0046211c1f834a49f", "score": "0.6621956", "text": "function addIconTooltipBehaviour() {\n $('a.icon-tooltip[title]').tooltip({\n tipClass: 'icon-tooltip-popup',\n effect: 'fade',\n fadeOutSpeed: 100\n });\n}", "title": "" }, { "docid": "f56555217268672b85aba72036ac3b59", "score": "0.66113305", "text": "function revealTooltip() {\n tooltip.style.display = \"block\";\n }", "title": "" }, { "docid": "06a7942846d9ce7493fdd938be6ae2db", "score": "0.6603237", "text": "showTooltip() {\n if (this._disabled) {\n return;\n }\n document.body.appendChild(this._DOMElement);\n\n this._placeTooltip();\n this._isShown = true;\n }", "title": "" }, { "docid": "4599e24aee7c9ee799d7dead757062bc", "score": "0.6576511", "text": "_showTooltip() {\n console.log('dv4allTooltip...mouseover icon')\n //debugger\n if (this._tooltipContainer === undefined) {\n const el = document.createElement('div')\n el.innerHTML = this._tooltipHtml\n this._styleElement(el)\n this.appendChild(el)\n this._tooltipContainer = el\n }\n }", "title": "" }, { "docid": "047831478da6adb73a0492ee0dc03e10", "score": "0.6573113", "text": "function enableTooltips() {\r\n $('[rel=tooltip]').tooltip();\r\n}", "title": "" }, { "docid": "3b21a3932f9ed1d380c87dc239627864", "score": "0.6568395", "text": "function tooltips ( tooltipsOptions ) {\n\n\t\tvar formatTooltipValue = tooltipsOptions.format ? tooltipsOptions.format : defaultFormatTooltipValue,\n\t\t\ttips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(formattedValues, handleId, rawValues) {\n\t\t\ttips[handleId].innerHTML = formatTooltipValue(formattedValues[handleId], rawValues[handleId]);\n\t\t});\n\t}", "title": "" }, { "docid": "d13951310c4c9d4766c1bdfcf205c006", "score": "0.65624976", "text": "_showTooltip() {\n // const tooltipContainer = document.createElement('div');\n // tooltipContainer.textContent = 'This is the tooltip text';\n // this.appendChild(tooltipContainer);\n // this._tooltipContainer = document.createElement('div');\n // this._tooltipContainer.textContent = this._tooltipText;\n // this._tooltipContainer.style.backgroundColor = '#800080';\n // this._tooltipContainer.style.color = 'white';\n // this._tooltipContainer.style.position = 'absolute';\n // this._tooltipContainer.style.zIndex = '10';\n // this.appendChild(this._tooltipContainer);\n // this.shadowRoot.appendChild(this._tooltipContainer);\n this._tooltipVisible = true;\n this._render();\n }", "title": "" }, { "docid": "ba334681858a05b8851238ea007bf69f", "score": "0.6558647", "text": "function show_tooltip(thisPlot, x, y, content) {\n jQuery('<div />').attr({ 'id' : thisPlot.graphIds['tooltipId'] })\n .css({ 'top': y + 5, 'left': x + 5 })\n .addClass('flotTooltip')\n .html(content)\n .appendTo('body')\n .fadeIn(200);\n}", "title": "" }, { "docid": "08940999d80ac3cea93aeca77fc68d8d", "score": "0.6552048", "text": "function textotTooltip()\n{\n var tooltips = $( \"[title]\" ).tooltip();\n}", "title": "" }, { "docid": "446d2dabcaf2a1818a8ce35e1daa5579", "score": "0.6538679", "text": "function createHelpTooltip() {\n var dom = \"<div class=\\\"tooltip hidden\\\"></div>\";\n var helpTooltipElement = $(dom).appendTo($(\"body\"))[0];\n helpTooltip = new TyMapUtils.Overlayex({\n offset: [15, 0],\n container: helpTooltipElement,\n positioning: 'center-left'\n });\n _overlayexs.addOverlayex(helpTooltip);\n }", "title": "" }, { "docid": "4eb3dba6dd04f9651b94403044da1db7", "score": "0.65177023", "text": "function showTooltip(x, y, contents) {\n $('<div id=\"data-tooltip\">' + contents + '</div>').css( {\n position: 'absolute',\n display: 'none',\n top: y + 10,\n left: x + 10,\n padding: '2px'\n }).appendTo(\"body\").fadeIn(200);\n}", "title": "" }, { "docid": "33349a55cb5f310be62c58072a04d3f6", "score": "0.6514712", "text": "function loadTooltip() {\n $(\".tooltips\").tooltip({trigger: \"hover\"});\n}", "title": "" }, { "docid": "db05d4e689e4760ff6c2528c9f44b3c2", "score": "0.65138835", "text": "function show() {\n cancelShow();\n cancelHide();\n\n // Don't show empty tooltips.\n if (!ttScope.content) {\n return angular.noop;\n }\n\n createTooltip();\n\n // And show the tooltip.\n ttScope.$evalAsync(function() {\n ttScope.isOpen = true;\n assignIsOpen(true);\n positionTooltip();\n });\n }", "title": "" }, { "docid": "db05d4e689e4760ff6c2528c9f44b3c2", "score": "0.65138835", "text": "function show() {\n cancelShow();\n cancelHide();\n\n // Don't show empty tooltips.\n if (!ttScope.content) {\n return angular.noop;\n }\n\n createTooltip();\n\n // And show the tooltip.\n ttScope.$evalAsync(function() {\n ttScope.isOpen = true;\n assignIsOpen(true);\n positionTooltip();\n });\n }", "title": "" }, { "docid": "db05d4e689e4760ff6c2528c9f44b3c2", "score": "0.65138835", "text": "function show() {\n cancelShow();\n cancelHide();\n\n // Don't show empty tooltips.\n if (!ttScope.content) {\n return angular.noop;\n }\n\n createTooltip();\n\n // And show the tooltip.\n ttScope.$evalAsync(function() {\n ttScope.isOpen = true;\n assignIsOpen(true);\n positionTooltip();\n });\n }", "title": "" }, { "docid": "db05d4e689e4760ff6c2528c9f44b3c2", "score": "0.65138835", "text": "function show() {\n cancelShow();\n cancelHide();\n\n // Don't show empty tooltips.\n if (!ttScope.content) {\n return angular.noop;\n }\n\n createTooltip();\n\n // And show the tooltip.\n ttScope.$evalAsync(function() {\n ttScope.isOpen = true;\n assignIsOpen(true);\n positionTooltip();\n });\n }", "title": "" }, { "docid": "db05d4e689e4760ff6c2528c9f44b3c2", "score": "0.65138835", "text": "function show() {\n cancelShow();\n cancelHide();\n\n // Don't show empty tooltips.\n if (!ttScope.content) {\n return angular.noop;\n }\n\n createTooltip();\n\n // And show the tooltip.\n ttScope.$evalAsync(function() {\n ttScope.isOpen = true;\n assignIsOpen(true);\n positionTooltip();\n });\n }", "title": "" }, { "docid": "db05d4e689e4760ff6c2528c9f44b3c2", "score": "0.65138835", "text": "function show() {\n cancelShow();\n cancelHide();\n\n // Don't show empty tooltips.\n if (!ttScope.content) {\n return angular.noop;\n }\n\n createTooltip();\n\n // And show the tooltip.\n ttScope.$evalAsync(function() {\n ttScope.isOpen = true;\n assignIsOpen(true);\n positionTooltip();\n });\n }", "title": "" }, { "docid": "db05d4e689e4760ff6c2528c9f44b3c2", "score": "0.65138835", "text": "function show() {\n cancelShow();\n cancelHide();\n\n // Don't show empty tooltips.\n if (!ttScope.content) {\n return angular.noop;\n }\n\n createTooltip();\n\n // And show the tooltip.\n ttScope.$evalAsync(function() {\n ttScope.isOpen = true;\n assignIsOpen(true);\n positionTooltip();\n });\n }", "title": "" }, { "docid": "db05d4e689e4760ff6c2528c9f44b3c2", "score": "0.65138835", "text": "function show() {\n cancelShow();\n cancelHide();\n\n // Don't show empty tooltips.\n if (!ttScope.content) {\n return angular.noop;\n }\n\n createTooltip();\n\n // And show the tooltip.\n ttScope.$evalAsync(function() {\n ttScope.isOpen = true;\n assignIsOpen(true);\n positionTooltip();\n });\n }", "title": "" }, { "docid": "db05d4e689e4760ff6c2528c9f44b3c2", "score": "0.65138835", "text": "function show() {\n cancelShow();\n cancelHide();\n\n // Don't show empty tooltips.\n if (!ttScope.content) {\n return angular.noop;\n }\n\n createTooltip();\n\n // And show the tooltip.\n ttScope.$evalAsync(function() {\n ttScope.isOpen = true;\n assignIsOpen(true);\n positionTooltip();\n });\n }", "title": "" }, { "docid": "db05d4e689e4760ff6c2528c9f44b3c2", "score": "0.65138835", "text": "function show() {\n cancelShow();\n cancelHide();\n\n // Don't show empty tooltips.\n if (!ttScope.content) {\n return angular.noop;\n }\n\n createTooltip();\n\n // And show the tooltip.\n ttScope.$evalAsync(function() {\n ttScope.isOpen = true;\n assignIsOpen(true);\n positionTooltip();\n });\n }", "title": "" }, { "docid": "db05d4e689e4760ff6c2528c9f44b3c2", "score": "0.65138835", "text": "function show() {\n cancelShow();\n cancelHide();\n\n // Don't show empty tooltips.\n if (!ttScope.content) {\n return angular.noop;\n }\n\n createTooltip();\n\n // And show the tooltip.\n ttScope.$evalAsync(function() {\n ttScope.isOpen = true;\n assignIsOpen(true);\n positionTooltip();\n });\n }", "title": "" }, { "docid": "db05d4e689e4760ff6c2528c9f44b3c2", "score": "0.65138835", "text": "function show() {\n cancelShow();\n cancelHide();\n\n // Don't show empty tooltips.\n if (!ttScope.content) {\n return angular.noop;\n }\n\n createTooltip();\n\n // And show the tooltip.\n ttScope.$evalAsync(function() {\n ttScope.isOpen = true;\n assignIsOpen(true);\n positionTooltip();\n });\n }", "title": "" }, { "docid": "db05d4e689e4760ff6c2528c9f44b3c2", "score": "0.65138835", "text": "function show() {\n cancelShow();\n cancelHide();\n\n // Don't show empty tooltips.\n if (!ttScope.content) {\n return angular.noop;\n }\n\n createTooltip();\n\n // And show the tooltip.\n ttScope.$evalAsync(function() {\n ttScope.isOpen = true;\n assignIsOpen(true);\n positionTooltip();\n });\n }", "title": "" }, { "docid": "db05d4e689e4760ff6c2528c9f44b3c2", "score": "0.65138835", "text": "function show() {\n cancelShow();\n cancelHide();\n\n // Don't show empty tooltips.\n if (!ttScope.content) {\n return angular.noop;\n }\n\n createTooltip();\n\n // And show the tooltip.\n ttScope.$evalAsync(function() {\n ttScope.isOpen = true;\n assignIsOpen(true);\n positionTooltip();\n });\n }", "title": "" }, { "docid": "c70eef9d1ce4af04ba68f67571617351", "score": "0.6511134", "text": "function enableTooltips(){\n\t\t\tinitTooltips();\n\t\t}", "title": "" }, { "docid": "b425be5dda9d97519b97403417c646a0", "score": "0.64998865", "text": "function tooltips ( ) {\n\n // Tooltips are added with options.tooltips in original order.\n var tips = scope_Handles.map(addTooltip);\n\n bindEvent('update', function(values, handleNumber, unencoded) {\n\n if ( !tips[handleNumber] ) {\n return;\n }\n\n var formattedValue = values[handleNumber];\n\n if ( options.tooltips[handleNumber] !== true ) {\n formattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n }\n\n tips[handleNumber].innerHTML = formattedValue;\n });\n }", "title": "" }, { "docid": "a903754c96e6f571eb315fb9f28b8006", "score": "0.64979875", "text": "function AnsweredEntryTooltipShown()\r\n{\r\n strHelpTopic = \"answered_entry\";\r\n}", "title": "" }, { "docid": "aab230a56ca09fb87779545d2ddcbc77", "score": "0.6497779", "text": "function onWillShowAnnotTooltip(annot) {\n call(this.onWillShowAnnotTooltipCallback, annot);\n}", "title": "" }, { "docid": "aab230a56ca09fb87779545d2ddcbc77", "score": "0.6497779", "text": "function onWillShowAnnotTooltip(annot) {\n call(this.onWillShowAnnotTooltipCallback, annot);\n}", "title": "" }, { "docid": "2019afc621d21c8c895abae4d73d1076", "score": "0.64892524", "text": "function hoverTooltip(info) {\n\t//console.log(\"hovering: \" + info);\n}", "title": "" }, { "docid": "a3420cacbcbe083157bebbdf4df4f584", "score": "0.64825034", "text": "getTooltip() {\r\n return undefined;\r\n }", "title": "" }, { "docid": "38e171a463772b6da6e8492290c4a13f", "score": "0.64702386", "text": "function addTooltipBehaviour() {\n $(\".tooltip-title[title]\").each(function() {\n if ( $(this).attr('title') != '' ) {\n $(this).tooltip({\n position: 'top center',\n predelay: 500,\n effect: 'fade'\n });\n }\n });\n}", "title": "" }, { "docid": "da3b6b6dba97de6e42e25faee35fed81", "score": "0.6456528", "text": "function Tooltip(options, element) {\n return _super.call(this, options, element) || this;\n }", "title": "" }, { "docid": "f57f109319faeac34f055c6e05e7ecc9", "score": "0.6449917", "text": "get tooltipTemplate() {\n return !this.tooltipVisible\n ? \"\"\n : html`<simple-tooltip\n id=\"tooltip\"\n for=\"menubutton\"\n position=\"${this.tooltipDirection || \"top\"}\"\n part=\"tooltip\"\n fit-to-visible-bounds\n >${this.currentTooltip || this.currentLabel}</simple-tooltip\n >`;\n }", "title": "" }, { "docid": "14927f8327c4811d386dae9c1e13157f", "score": "0.6445526", "text": "show(delay = this.showDelay) {\n if (this.disabled ||\n !this.content ||\n (this.isTooltipVisible() && !this.tooltipInstance.showTimeoutId && !this.tooltipInstance.hideTimeoutId)) {\n return;\n }\n const overlayRef = this.createOverlay();\n this.detach();\n this.portal = this.portal || new ComponentPortal(ThyTooltipComponent, this.viewContainerRef);\n this.tooltipInstance = overlayRef.attach(this.portal).instance;\n this.tooltipInstance\n .afterHidden()\n .pipe(takeUntil(this.ngUnsubscribe$))\n .subscribe(() => this.detach());\n this.setTooltipClass(this.tooltipClass);\n this.updateTooltipContent();\n this.tooltipInstance.show(delay);\n }", "title": "" }, { "docid": "14927f8327c4811d386dae9c1e13157f", "score": "0.6445526", "text": "show(delay = this.showDelay) {\n if (this.disabled ||\n !this.content ||\n (this.isTooltipVisible() && !this.tooltipInstance.showTimeoutId && !this.tooltipInstance.hideTimeoutId)) {\n return;\n }\n const overlayRef = this.createOverlay();\n this.detach();\n this.portal = this.portal || new ComponentPortal(ThyTooltipComponent, this.viewContainerRef);\n this.tooltipInstance = overlayRef.attach(this.portal).instance;\n this.tooltipInstance\n .afterHidden()\n .pipe(takeUntil(this.ngUnsubscribe$))\n .subscribe(() => this.detach());\n this.setTooltipClass(this.tooltipClass);\n this.updateTooltipContent();\n this.tooltipInstance.show(delay);\n }", "title": "" }, { "docid": "014c5182fa6d3dc69fcb55ea8465b9bd", "score": "0.6432869", "text": "function showTooltipBind() {\n if(hasEnableExp && !scope.$eval(attrs[prefix+'Enable'])) {\n return;\n }\n\n prepareTooltip();\n\n if ( ttScope.popupDelay ) {\n // Do nothing if the tooltip was already scheduled to pop-up.\n // This happens if show is triggered multiple times before any hide is triggered.\n if (!popupTimeout) {\n popupTimeout = $timeout( show, ttScope.popupDelay, false );\n popupTimeout.then(function(reposition){reposition();});\n }\n } else {\n show()();\n }\n }", "title": "" }, { "docid": "014c5182fa6d3dc69fcb55ea8465b9bd", "score": "0.6432869", "text": "function showTooltipBind() {\n if(hasEnableExp && !scope.$eval(attrs[prefix+'Enable'])) {\n return;\n }\n\n prepareTooltip();\n\n if ( ttScope.popupDelay ) {\n // Do nothing if the tooltip was already scheduled to pop-up.\n // This happens if show is triggered multiple times before any hide is triggered.\n if (!popupTimeout) {\n popupTimeout = $timeout( show, ttScope.popupDelay, false );\n popupTimeout.then(function(reposition){reposition();});\n }\n } else {\n show()();\n }\n }", "title": "" }, { "docid": "014c5182fa6d3dc69fcb55ea8465b9bd", "score": "0.6432869", "text": "function showTooltipBind() {\n if(hasEnableExp && !scope.$eval(attrs[prefix+'Enable'])) {\n return;\n }\n\n prepareTooltip();\n\n if ( ttScope.popupDelay ) {\n // Do nothing if the tooltip was already scheduled to pop-up.\n // This happens if show is triggered multiple times before any hide is triggered.\n if (!popupTimeout) {\n popupTimeout = $timeout( show, ttScope.popupDelay, false );\n popupTimeout.then(function(reposition){reposition();});\n }\n } else {\n show()();\n }\n }", "title": "" }, { "docid": "014c5182fa6d3dc69fcb55ea8465b9bd", "score": "0.6432869", "text": "function showTooltipBind() {\n if(hasEnableExp && !scope.$eval(attrs[prefix+'Enable'])) {\n return;\n }\n\n prepareTooltip();\n\n if ( ttScope.popupDelay ) {\n // Do nothing if the tooltip was already scheduled to pop-up.\n // This happens if show is triggered multiple times before any hide is triggered.\n if (!popupTimeout) {\n popupTimeout = $timeout( show, ttScope.popupDelay, false );\n popupTimeout.then(function(reposition){reposition();});\n }\n } else {\n show()();\n }\n }", "title": "" }, { "docid": "014c5182fa6d3dc69fcb55ea8465b9bd", "score": "0.6432869", "text": "function showTooltipBind() {\n if(hasEnableExp && !scope.$eval(attrs[prefix+'Enable'])) {\n return;\n }\n\n prepareTooltip();\n\n if ( ttScope.popupDelay ) {\n // Do nothing if the tooltip was already scheduled to pop-up.\n // This happens if show is triggered multiple times before any hide is triggered.\n if (!popupTimeout) {\n popupTimeout = $timeout( show, ttScope.popupDelay, false );\n popupTimeout.then(function(reposition){reposition();});\n }\n } else {\n show()();\n }\n }", "title": "" }, { "docid": "014c5182fa6d3dc69fcb55ea8465b9bd", "score": "0.6432869", "text": "function showTooltipBind() {\n if(hasEnableExp && !scope.$eval(attrs[prefix+'Enable'])) {\n return;\n }\n\n prepareTooltip();\n\n if ( ttScope.popupDelay ) {\n // Do nothing if the tooltip was already scheduled to pop-up.\n // This happens if show is triggered multiple times before any hide is triggered.\n if (!popupTimeout) {\n popupTimeout = $timeout( show, ttScope.popupDelay, false );\n popupTimeout.then(function(reposition){reposition();});\n }\n } else {\n show()();\n }\n }", "title": "" }, { "docid": "014c5182fa6d3dc69fcb55ea8465b9bd", "score": "0.6432869", "text": "function showTooltipBind() {\n if(hasEnableExp && !scope.$eval(attrs[prefix+'Enable'])) {\n return;\n }\n\n prepareTooltip();\n\n if ( ttScope.popupDelay ) {\n // Do nothing if the tooltip was already scheduled to pop-up.\n // This happens if show is triggered multiple times before any hide is triggered.\n if (!popupTimeout) {\n popupTimeout = $timeout( show, ttScope.popupDelay, false );\n popupTimeout.then(function(reposition){reposition();});\n }\n } else {\n show()();\n }\n }", "title": "" }, { "docid": "014c5182fa6d3dc69fcb55ea8465b9bd", "score": "0.6432869", "text": "function showTooltipBind() {\n if(hasEnableExp && !scope.$eval(attrs[prefix+'Enable'])) {\n return;\n }\n\n prepareTooltip();\n\n if ( ttScope.popupDelay ) {\n // Do nothing if the tooltip was already scheduled to pop-up.\n // This happens if show is triggered multiple times before any hide is triggered.\n if (!popupTimeout) {\n popupTimeout = $timeout( show, ttScope.popupDelay, false );\n popupTimeout.then(function(reposition){reposition();});\n }\n } else {\n show()();\n }\n }", "title": "" }, { "docid": "014c5182fa6d3dc69fcb55ea8465b9bd", "score": "0.6432869", "text": "function showTooltipBind() {\n if(hasEnableExp && !scope.$eval(attrs[prefix+'Enable'])) {\n return;\n }\n\n prepareTooltip();\n\n if ( ttScope.popupDelay ) {\n // Do nothing if the tooltip was already scheduled to pop-up.\n // This happens if show is triggered multiple times before any hide is triggered.\n if (!popupTimeout) {\n popupTimeout = $timeout( show, ttScope.popupDelay, false );\n popupTimeout.then(function(reposition){reposition();});\n }\n } else {\n show()();\n }\n }", "title": "" }, { "docid": "014c5182fa6d3dc69fcb55ea8465b9bd", "score": "0.6432869", "text": "function showTooltipBind() {\n if(hasEnableExp && !scope.$eval(attrs[prefix+'Enable'])) {\n return;\n }\n\n prepareTooltip();\n\n if ( ttScope.popupDelay ) {\n // Do nothing if the tooltip was already scheduled to pop-up.\n // This happens if show is triggered multiple times before any hide is triggered.\n if (!popupTimeout) {\n popupTimeout = $timeout( show, ttScope.popupDelay, false );\n popupTimeout.then(function(reposition){reposition();});\n }\n } else {\n show()();\n }\n }", "title": "" }, { "docid": "a0c435f2a23df1e700a1c434ab22c392", "score": "0.6431596", "text": "function showTooltipBind() {\n if (hasEnableExp && !scope.$eval(attrs[prefix+'Enable'])) {\n return;\n }\n\n prepareTooltip();\n\n if (ttScope.popupDelay) {\n // Do nothing if the tooltip was already scheduled to pop-up.\n // This happens if show is triggered multiple times before any hide is triggered.\n if (!popupTimeout) {\n popupTimeout = $timeout(show, ttScope.popupDelay, false);\n popupTimeout.then(function(reposition){reposition();});\n }\n } else {\n show()();\n }\n }", "title": "" }, { "docid": "a4a453429554566c0e8fa99f55b27873", "score": "0.64157313", "text": "function showTooltipBind() {\n\t if (hasEnableExp && !scope.$eval(attrs[prefix + 'Enable'])) {\n\t return;\n\t }\n\t\n\t prepareTooltip();\n\t\n\t if (ttScope.popupDelay) {\n\t // Do nothing if the tooltip was already scheduled to pop-up.\n\t // This happens if show is triggered multiple times before any hide is triggered.\n\t if (!popupTimeout) {\n\t popupTimeout = $timeout(show, ttScope.popupDelay, false);\n\t popupTimeout.then(function (reposition) {\n\t reposition();\n\t });\n\t }\n\t } else {\n\t show()();\n\t }\n\t }", "title": "" }, { "docid": "1e899d372f19555d1b6cdbb0081d9550", "score": "0.6412225", "text": "function showTooltipBind() {\n if(hasEnableExp && !scope.$parent.$eval(attrs[prefix+'Enable'])) {\n return;\n }\n if ( scope.tt_popupDelay ) {\n // Do nothing if the tooltip was already scheduled to pop-up.\n // This happens if show is triggered multiple times before any hide is triggered.\n if (!popupTimeout) {\n popupTimeout = $timeout( show, scope.tt_popupDelay, false );\n popupTimeout.then(function(reposition){reposition();});\n }\n } else {\n show()();\n }\n }", "title": "" }, { "docid": "a177704fc1d63fa38543f64f63bb8d90", "score": "0.6409229", "text": "function showTooltip(x, y, contents) {\n\t\t$('<div id=\"tooltip\" class=\"tooltipflot\">' + contents + '</div>').css( {\n\t\t\tposition: 'absolute',\n\t\t\tdisplay: 'none',\n\t\t\ttop: y + 5,\n\t\t\tleft: x + 5\n\t\t}).appendTo('body').fadeIn(200);\n\t}", "title": "" }, { "docid": "6dac48608bcc0dece8df72693e0e3365", "score": "0.64061075", "text": "function showTooltip(target, content) {\n $(target).tooltip({\n items: target,\n content: content,\n position: {\n my: 'top',\n at: 'center bottom',\n }, tooltipClass: 'ui-state-error'\n }); $(target).tooltip('open');\n setTimeout(() => $(target).tooltip('close'), 5500);\n}", "title": "" }, { "docid": "66beb8a51d851d5c7070e148b5a6187a", "score": "0.6403607", "text": "function showTooltipBind() {\n if(hasEnableExp && !scope.$eval(attrs[prefix+'Enable'])) {\n return;\n }\n if ( scope.tt_popupDelay ) {\n // Do nothing if the tooltip was already scheduled to pop-up.\n // This happens if show is triggered multiple times before any hide is triggered.\n if (!popupTimeout) {\n popupTimeout = $timeout( show, scope.tt_popupDelay, false );\n popupTimeout.then(function(reposition){reposition();});\n }\n } else {\n show()();\n }\n }", "title": "" }, { "docid": "66beb8a51d851d5c7070e148b5a6187a", "score": "0.6403607", "text": "function showTooltipBind() {\n if(hasEnableExp && !scope.$eval(attrs[prefix+'Enable'])) {\n return;\n }\n if ( scope.tt_popupDelay ) {\n // Do nothing if the tooltip was already scheduled to pop-up.\n // This happens if show is triggered multiple times before any hide is triggered.\n if (!popupTimeout) {\n popupTimeout = $timeout( show, scope.tt_popupDelay, false );\n popupTimeout.then(function(reposition){reposition();});\n }\n } else {\n show()();\n }\n }", "title": "" }, { "docid": "66beb8a51d851d5c7070e148b5a6187a", "score": "0.6403607", "text": "function showTooltipBind() {\n if(hasEnableExp && !scope.$eval(attrs[prefix+'Enable'])) {\n return;\n }\n if ( scope.tt_popupDelay ) {\n // Do nothing if the tooltip was already scheduled to pop-up.\n // This happens if show is triggered multiple times before any hide is triggered.\n if (!popupTimeout) {\n popupTimeout = $timeout( show, scope.tt_popupDelay, false );\n popupTimeout.then(function(reposition){reposition();});\n }\n } else {\n show()();\n }\n }", "title": "" }, { "docid": "66beb8a51d851d5c7070e148b5a6187a", "score": "0.6403607", "text": "function showTooltipBind() {\n if(hasEnableExp && !scope.$eval(attrs[prefix+'Enable'])) {\n return;\n }\n if ( scope.tt_popupDelay ) {\n // Do nothing if the tooltip was already scheduled to pop-up.\n // This happens if show is triggered multiple times before any hide is triggered.\n if (!popupTimeout) {\n popupTimeout = $timeout( show, scope.tt_popupDelay, false );\n popupTimeout.then(function(reposition){reposition();});\n }\n } else {\n show()();\n }\n }", "title": "" }, { "docid": "84cfd20e06a681c9e9c7e5d61343cc8a", "score": "0.6399747", "text": "function show() {\n\t cancelShow();\n\t cancelHide();\n\n\t // Don't show empty tooltips.\n\t if (!ttScope.content) {\n\t return angular.noop;\n\t }\n\n\t createTooltip();\n\n\t // And show the tooltip.\n\t ttScope.$evalAsync(function() {\n\t ttScope.isOpen = true;\n\t assignIsOpen(true);\n\t positionTooltip();\n\t });\n\t }", "title": "" }, { "docid": "5d27e3e041fb28ae6b5faa25bfcc70b0", "score": "0.6398184", "text": "function showToolTip(toolTip, content, x, y, appendToEle) {\n if (!toolTip) {\n var toolTipDom = document.createElement(\"div\");\n toolTip = $(toolTipDom);\n toolTip.addClass(\"tool-tip\");\n toolTip.appendTo(appendToEle);\n }\n toolTip.html(content);\n toolTip.css(\"left\", x);\n toolTip.css(\"top\", y + 30);\n toolTip.show();\n \n return toolTip;\n}", "title": "" }, { "docid": "c902f250df74804fbe5e966a80a9d83c", "score": "0.6388589", "text": "showTip(context) {\n const me = this;\n\n if (me.showTooltip) {\n me.clockTemplate = new ClockTemplate({\n scheduler: me.client\n });\n me.tip = new Tooltip({\n id: `${me.client.id}-time-range-tip`,\n cls: 'b-interaction-tooltip',\n align: 'b-t',\n autoShow: true,\n updateContentOnMouseMove: true,\n forElement: context.element,\n getHtml: () => me.getTipHtml(context.record, context.element)\n });\n }\n }", "title": "" }, { "docid": "f4252008fefa574b64fd7f0f62ce31f7", "score": "0.63773644", "text": "function showTooltipBind() {\n\t if(hasEnableExp && !scope.$eval(attrs[prefix+'Enable'])) {\n\t return;\n\t }\n\n\t prepareTooltip();\n\n\t if ( ttScope.popupDelay ) {\n\t // Do nothing if the tooltip was already scheduled to pop-up.\n\t // This happens if show is triggered multiple times before any hide is triggered.\n\t if (!popupTimeout) {\n\t popupTimeout = $timeout( show, ttScope.popupDelay, false );\n\t popupTimeout.then(function(reposition){reposition();});\n\t }\n\t } else {\n\t show()();\n\t }\n\t }", "title": "" }, { "docid": "f4252008fefa574b64fd7f0f62ce31f7", "score": "0.63773644", "text": "function showTooltipBind() {\n\t if(hasEnableExp && !scope.$eval(attrs[prefix+'Enable'])) {\n\t return;\n\t }\n\n\t prepareTooltip();\n\n\t if ( ttScope.popupDelay ) {\n\t // Do nothing if the tooltip was already scheduled to pop-up.\n\t // This happens if show is triggered multiple times before any hide is triggered.\n\t if (!popupTimeout) {\n\t popupTimeout = $timeout( show, ttScope.popupDelay, false );\n\t popupTimeout.then(function(reposition){reposition();});\n\t }\n\t } else {\n\t show()();\n\t }\n\t }", "title": "" }, { "docid": "f418a029ad00ce55131933cb5a37758e", "score": "0.63493866", "text": "function showTooltipBind() {\n\t\t\t\t\t\t\t\tif (hasEnableExp && !scope.$eval(attrs[prefix + 'Enable'])) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tprepareTooltip();\n\n\t\t\t\t\t\t\t\tif (ttScope.popupDelay) {\n\t\t\t\t\t\t\t\t\t// Do nothing if the tooltip was already scheduled to pop-up.\n\t\t\t\t\t\t\t\t\t// This happens if show is triggered multiple times before any hide is triggered.\n\t\t\t\t\t\t\t\t\tif (!popupTimeout) {\n\t\t\t\t\t\t\t\t\t\tpopupTimeout = $timeout(show, ttScope.popupDelay, false);\n\t\t\t\t\t\t\t\t\t\tpopupTimeout.then(function (reposition) {\n\t\t\t\t\t\t\t\t\t\t\treposition();\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} else {\n\t\t\t\t\t\t\t\t\tshow()();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "title": "" }, { "docid": "efccce874676c0df31fe63a71ff5bf4b", "score": "0.6345087", "text": "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "title": "" }, { "docid": "efccce874676c0df31fe63a71ff5bf4b", "score": "0.6345087", "text": "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "title": "" }, { "docid": "efccce874676c0df31fe63a71ff5bf4b", "score": "0.6345087", "text": "function tooltips ( ) {\n\n\t\t// Tooltips are added with options.tooltips in original order.\n\t\tvar tips = scope_Handles.map(addTooltip);\n\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\n\n\t\t\tif ( !tips[handleNumber] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar formattedValue = values[handleNumber];\n\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n\t\t\t}\n\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\n\t\t});\n\t}", "title": "" }, { "docid": "898377835e44f1f2333634b154122400", "score": "0.6339414", "text": "function DisplayToolt() {\n\t// Create the span element and set the class name\n\tvar spanTooltip = document.createElement(\"span\");\n\tspanTooltip.className = \"tooltip\";\n\t\n\t// Add the mousemove event listener to the tab element that called the function\n\tthis.addEventListener(\"mousemove\", ChangeTooltipPosition);\n\t\n\t// Determine the text displayed in the tooltip\n\tvar headerTabInfoId = 0;\n\tif (this.id == \"home\") headerTabInfoId = 0;\n\telse if (this.id == \"profile\") headerTabInfoId = 1;\n\telse if (this.id == \"learn\") headerTabInfoId = 2;\n\telse if (this.id == \"games\") headerTabInfoId = 3;\n\t\n\t// Set the text of the tooltip to the determined string\n\tspanTooltip.innerHTML = headerTabInfo[headerTabInfoId];\n\tthis.appendChild(spanTooltip);\n}", "title": "" }, { "docid": "9709608f5035e25efb2b4f901cfd68d6", "score": "0.633831", "text": "getDescriptionTooltip() {\r\n return undefined;\r\n }", "title": "" }, { "docid": "0771a8acaf570b8381314810cece78bd", "score": "0.6334803", "text": "_showTooltip() {\n this._tooltipContainer = document.createElement('div');\n this._tooltipContainer.textContent = this._tooltipText;\n\n this.shadowRoot.appendChild(this._tooltipContainer);\n }", "title": "" }, { "docid": "7ec7880cd0ca01b4abf0a92440df74f5", "score": "0.6326899", "text": "function tooltips ( ) {\r\n\r\n\t\t// Tooltips are added with options.tooltips in original order.\r\n\t\tvar tips = scope_Handles.map(addTooltip);\r\n\r\n\t\tbindEvent('update', function(values, handleNumber, unencoded) {\r\n\r\n\t\t\tif ( !tips[handleNumber] ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tvar formattedValue = values[handleNumber];\r\n\r\n\t\t\tif ( options.tooltips[handleNumber] !== true ) {\r\n\t\t\t\tformattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\r\n\t\t\t}\r\n\r\n\t\t\ttips[handleNumber].innerHTML = formattedValue;\r\n\t\t});\r\n\t}", "title": "" }, { "docid": "5ed8ecc22094f4a1aad58639756bbf7a", "score": "0.6316279", "text": "showTooltip( element ) {\n\t\t// Create the tooltip element\n\t\tlet tooltip = document.createElement( 'div' );\n\t\ttooltip.setAttribute( 'class', 'tooltip-1OS-Ti da-tooltip top-1pTh1F da-top black-2bmmnj da-black' );\n\t\ttooltip.appendChild( document.createTextNode( element.getAttribute( 'alt' ) ) );\n\t\tdocument.getElementsByClassName( 'da-tooltips' )[ 0 ].appendChild( tooltip );\n\t\t\n\t\t// Set the desired position of the tooltip element after it's added to the DOM\n\t\tlet rect = element.getBoundingClientRect();\n\t\tlet bottom = window.screen.height - rect.top - tooltip.clientHeight;\n\t\tlet left = rect.left / 2 + rect.right / 2 - tooltip.clientWidth / 2;\n\t\ttooltip.style.bottom = `${bottom}px`;\n\t\ttooltip.style.left = `${left}px`;\n\t}", "title": "" }, { "docid": "9fc02043c972dfaed08a646578bcedcb", "score": "0.6302916", "text": "function generalToolTip(name) {\n return \"This is a really generic Tool Tip for [\" + name + \"] , to be replaced at a later date!\";\n }", "title": "" }, { "docid": "d8ddbf24f5508e50df264732399e3b71", "score": "0.6299081", "text": "function show() {\n\t\n\t popupTimeout = null;\n\t\n\t // If there is a pending remove transition, we must cancel it, lest the\n\t // tooltip be mysteriously removed.\n\t if (transitionTimeout) {\n\t $timeout.cancel(transitionTimeout);\n\t transitionTimeout = null;\n\t }\n\t\n\t // Don't show empty tooltips.\n\t if (!ttScope.content) {\n\t return angular.noop;\n\t }\n\t\n\t createTooltip();\n\t\n\t // Set the initial positioning.\n\t tooltip.css({ top: 0, left: 0, display: 'block' });\n\t ttScope.$digest();\n\t\n\t positionTooltip();\n\t\n\t // And show the tooltip.\n\t ttScope.isOpen = true;\n\t ttScope.$digest(); // digest required as $apply is not called\n\t\n\t // Return positioning function as promise callback for correct\n\t // positioning after draw.\n\t return positionTooltip;\n\t }", "title": "" }, { "docid": "c6f23e06c3cf30c42ec8fd91664e963a", "score": "0.6298738", "text": "function showToolTip(e, content) {\n if ($('bubble_tooltip') == null) {\n var string = '<div id=\"bubble_tooltip\"><div class=\"bubble_top\">&nbsp;</div><div class=\"bubble_middle\"><div id=\"bubble_tooltip_content\"></div></div><div class=\"bubble_bottom\"></div></div>';\n $('body').insert(string);\n }\n if (document.all)\n e = event;\n $('bubble_tooltip_content').update(content);\n var tooltip = $('bubble_tooltip');\n tooltip.setStyle({visibility: 'visible'});\n var element = Event.element(e);\n var absoluteY = 0;\n var absoluteX = element.offsetWidth * 0.75;\n while (element != null) {\n absoluteY += element.offsetTop;\n absoluteX += element.offsetLeft;\n element = element.offsetParent;\n }\n var leftPos = absoluteX - tooltip.offsetWidth / 2;\n if (leftPos < 0)leftPos = 0;\n tooltip.setStyle({left: leftPos + 'px'});\n tooltip.setStyle({top: absoluteY - tooltip.offsetHeight + 'px'});\n}", "title": "" }, { "docid": "d4473585333b57caaabdb32eccf66f53", "score": "0.6298194", "text": "function show_tooltip(svg, node, xmin, xmax, d) {\n var tooltip = tooltipTemplate(d);\n\n window.tooltip\n .transition()\n .style('opacity', .9);\n window.tooltip\n .html(tooltip)\n .style(\"left\", (d3.event.pageX + 20) + \"px\") \n .style(\"top\", (d3.event.pageY - 28) + \"px\");\n}", "title": "" } ]
b681c29aedaacaa51c704ccff815a844
This function is called when the user clicks on Upload to Parse. It will create the REST API request to upload this image to Parse.
[ { "docid": "c4bfef492958fd5bfe8e91bb4f46cd2f", "score": "0.0", "text": "function signuporiginal() {\n var pw = document.forms['signup']['password'].value;\n var pwc = document.forms['signup']['password-confirm'].value;\n pw = document.forms['signup']['password'].value.trim();\n email = document.forms['signup']['email'].value.trim();\n fname = document.forms['signup']['FName'].value.trim();\n lname = document.forms['signup']['LName'].value.trim();\n classes = document.forms['signup']['bio'].value.trim();\n ed = document.forms['signup']['education'].value.trim();\n console.log(pw);\n if (pw == pwc) {\n var file = document.getElementById('files').files[0];\n var serverUrl = 'https://api.parse.com/1/files/' + file.name;\n $.ajax({\n type: \"POST\",\n beforeSend: function(request) {\n request.setRequestHeader(\"X-Parse-Application-Id\", appid);\n request.setRequestHeader(\"X-Parse-REST-API-Key\", restapi);\n request.setRequestHeader(\"Content-Type\", file.type);\n },\n url: serverUrl,\n data: file,\n processData: false,\n contentType: false,\n success: function(data) {\n console.log(data.url);\n url = data.url;\n name = fname + \" \" + lname;\n var user = new Parse.User();\n user.set(\"username\", email);\n user.set(\"password\", pw);\n user.set(\"email\", email);\n user.set(\"name\", name);\n user.set(\"url\", url);\n user.set(\"classes\", classes);\n user.set(\"education\", ed);\n if (document.forms['signup']['mentor'].value == \"mentor\") {\n user.set(\"Mentor\", true);\n } else {\n user.set(\"Mentor\", false);\n }\n user.signUp(null, {\n success: function(user) {\n window.location = \"testhome.html\";\n },\n error: function(user, error) {\n // Show the error message somewhere and let the user try again.\n alert(\"Error: \" + error.code + \" \" + error.message);\n }\n });\n },\n error: function(data) {\n var obj = jQuery.parseJSON(data);\n alert(obj.error);\n }\n });\n } else {\n alert(\"Sorry, your passwords didn't match\");\n }\n}", "title": "" } ]
[ { "docid": "63fcb1b841037cad6a4169d99bee0488", "score": "0.7194403", "text": "upload() {\n var params = $('#submitForm').serialize();\n var image_upload = this;\n\n var xmlHttp = new XMLHttpRequest();\n xmlHttp.open('POST', '/repository/file/upload?encoding=base64&_token=' + this.apiKey + '&' + params);\n xmlHttp.setRequestHeader('Content-Type', 'application/json');\n xmlHttp.onreadystatechange = () => {\n if (xmlHttp.readyState === XMLHttpRequest.DONE) {\n var response = JSON.parse(xmlHttp.responseText);\n\n if (response.http_code < 400) {\n image_upload.uploadFinished(response.url);\n }\n\n if (response.http_code >= 400) {\n image_upload.validationFailure(response.fields, response.status);\n }\n }\n };\n xmlHttp.send(this.getRawImage());\n }", "title": "" }, { "docid": "b20676e3e2f7fc4dde2e72f657031686", "score": "0.6543805", "text": "function uploadAction() {\n if(r != null) {\n r.upload();\n }\n console.log(\"Upload activated.\")\n}", "title": "" }, { "docid": "e87794bff7175f7c21d290292221e1d2", "score": "0.6437752", "text": "function uploadEquipmentImage() {\r\n let data = new FormData();\r\n data.append('action', 'uploadImage');\r\n data.append('id', getEquipmentID());\r\n data.append('image', $('#imgInp').prop('files')[0]);\r\n\r\n api.post('/upload.php', data, true).then(res => {\r\n // TODO: display newly uploaded image in image picker\r\n }).catch(err => {\r\n snackbar(err.message, 'error');\r\n });\r\n}", "title": "" }, { "docid": "31de35223062d2305101b4be7d21b1c9", "score": "0.6321411", "text": "upload() {\n\t\tconst fd = new FormData();\n\t\tfd.append(\"image\", this.file); // your image\n\t\t// ...\n\n\t\treturn new Promise((resolve, reject) => {\n\t\t\taxios\n\t\t\t\t.post(this.url, fd, {\n\t\t\t\t\tonUploadProgress: e => {\n\t\t\t\t\t\tconsole.log(\n\t\t\t\t\t\t\t// show upload process\n\t\t\t\t\t\t\tMath.round((e.loaded / e.total) * 100) + \" %\"\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.then(response => {\n\t\t\t\t\tresolve(response);\n\t\t\t\t})\n\t\t\t\t.catch(error => {\n\t\t\t\t\treject(\"Server Error\");\n\t\t\t\t\tconsole.log(\"Server Error : \", error);\n\t\t\t\t});\n\t\t});\n\t}", "title": "" }, { "docid": "7cf3c61896a0dacc96aaf31cbae56abe", "score": "0.6237079", "text": "onClickUpload () {\n\t\t//TODO\n\t}", "title": "" }, { "docid": "9be596d2272e0e684922bb67938b234d", "score": "0.6231335", "text": "function uploadImage(selectedImage) \n{\n\t$.progressBar.show();\n\t\n\tvar xhr = Titanium.Network.createHTTPClient();\n\txhr.open('POST', 'http://johnkuiphoff.com/saycheese/index.php');\n\txhr.onload = function() \n\t{\n\t\t$.progressBar.show();\n\t\t\n\t\t// update status message\n\t\t$.statusLabel.text = 'Upload complete';\n\t\t\n\t};\n\n\txhr.onsendstream = function(e) \n\t{\n\t\t$.progressBar.value = e.progress;\n\t\t$.statusLabel.text = Math.round(e.progress * 100) + '%';\n\t\t\n\t};\n\n\txhr.onerror = function() \n\t{\n\t\talert(this.error + ': ' + this.statusText);\n\t\treturn false;\n\t};\n\n\txhr.setRequestHeader('User-Agent', 'SayCheese');\n\txhr.send({\n\t\t'media' : selectedImage\n\t});\n\n}", "title": "" }, { "docid": "837f4904cad8767e7e15f9cad1fd3a11", "score": "0.62266576", "text": "function uploadFile(){\n\t\t\tvar _this = this;\n\t\t\tvar files = _this.options.fileInput.files,formData,xhr;\n\t\t\tif(!files.length){\n\t\t\t\treturn\n\t\t\t}\n\t\t \tformData = new FormData();\n\t\t \tformData.append(\"file\",files[0]);\n\t\t \tformData.append(\"extra_params\",JSON.stringify(_this.options.extraParams))\n\t\t \txhr = new XMLHttpRequest();\n\t\t\txhr.open('POST', this.options.url, true);\n\t\t\txhr.onreadystatechange = function () {\n\t\t\t\t if(xhr.readyState === XMLHttpRequest.DONE && xhr.status === 200) {\n\t\t\t\t if(_this.options.onUploadSuccess){\n\t\t\t\t \t_this.options.onUploadSuccess.call(window);\n\t\t\t\t }\n\t\t\t\t alert(xhr.responseText);\n\t\t\t\t _this.options.fileInput.value = null;\n\t\t\t\t _this.options.imgPlaceholder.style.display = \"none\";\n\t\t\t\t _this.options.imgPlaceholder.removeAttribute(\"src\");\n\t\t\t\t }\n\t\t\t\t};\n\t\t\txhr.send(formData);\n\n\t\t}", "title": "" }, { "docid": "5aca30f08af581d757cf1f2e4ade4a69", "score": "0.62215364", "text": "function upload() {\n var data = new FormData();\n data.append('data', JSON.stringify(dataModel));\n\n // If newFile == true, send the file\n // Else, do not send it and use the route that will get the data without preprocessing\n if (newFile) {\n data.append('file', dataFileInfo.file);\n data.append('type', dataFileInfo.file.type);\n data.append('timestamp', dataFileInfo.timestamp);\n\n newFile = false;\n }\n\n $.ajax({\n type: 'POST',\n url: attr.url,\n data: data,\n cache: false,\n contentType: false,\n processData: false,\n success: function(data){\n Renderer.render(data);\n LoadingScreenRenderer.removeLoadingScreen();\n }\n });\n LoadingScreenRenderer.initLoadingScreen();\n }", "title": "" }, { "docid": "33853bb2250eb4d5eb190b1d586089ff", "score": "0.6195005", "text": "upload() {\n return new Promise((resolve, reject) => {\n this._initRequest();\n this._initListeners(resolve, reject);\n this._sendRequest(resolve, reject);\n });\n }", "title": "" }, { "docid": "7d3b23769cc2d134898c300fd57a2265", "score": "0.6148116", "text": "function uploadImage(req, res) {\n\n const uid = req.params['uid'];\n const wid = req.params['wid'];\n const pid = req.params['pid'];\n const wgid = req.params['wgid'];\n var myFile = req.file;\n\n widget = widgetModel.findWidgetById(wgid).then(\n \t(widget) => {\n \t\twidget.url = '/assets/uploads/'+myFile.filename;\n \t\twidgetModel.updateWidget(wgid, widget).then(\n \t\t\t(data) => {\n \t\t\t\tvar callbackUrl = req.headers.origin + \"/user/\" + uid + \"/website/\" + wid + \"/page/\" + pid + \"/widget/\" + wgid;\n \t\t\t\tres.redirect(callbackUrl);\n \t\t\t}\n \t\t);\n \t}\n );\n }", "title": "" }, { "docid": "4ae4815839e70eabb185d09489e2721a", "score": "0.6129346", "text": "function uploadAndPost() {\n //Clean the image base64 string\n var imgStrBase64 = snapshot.toDataURL().replace(/^data:image\\/(png|jpg);base64,/, \"\");\n //Sends body with clean string\n bodyTest = {\n \"image\": imgStrBase64\n };\n //Call server-side image rekognition (uses AWS Rekognition)\n $.ajax({\n // url: \"https://smiletcm-happy-buffalo.cfapps.eu10.hana.ondemand.com/UploadImage\", //Replace with backend server hostname\n url: \"http://localhost:30000/UploadImage\", //Replace with backend server hostname\n type: \"POST\",\n data: JSON.stringify(bodyTest),\n contentType: \"application/json\",\n success: function(data) {\n console.log(\"Success\");\n postToFacebook(data.imageUrl);\n },\n complete: function(jqXHR, textStatus) {\n console.log(\"Complete\");\n },\n error: function(jqXHR, textStatus, errorThrown) {\n console.log(\"Error: \" + JSON.stringify(jqXHR.responseJSON));\n }\n });\n }", "title": "" }, { "docid": "6177c92abc2984657445372349bf8b46", "score": "0.6113728", "text": "uploadFile(data, success, fail) {\n api.setFormRequest();\n\n api.shared().post('/uploads',\n data, {\n headers: { 'Content-Type': 'multipart/form-data' }\n })\n .then(function(response) {\n success(response.data);\n })\n .catch(function(error) {\n console.log(error.response)\n if (error.response != undefined) {\n fail(error.response.data);\n }\n });\n\n api.setJSONRequest();\n }", "title": "" }, { "docid": "1880000cdc331d789f6d0c9d5ccfdaef", "score": "0.6112264", "text": "uploadFile(file) {\n this.Upload.upload({\n url: 'api/movie/upload-to-dropbox',\n data: { 'movieId': this.movie.id, 'clipId': this.currentClip.id, file: file },\n method: 'POST'\n })\n .then((resp) => {\n console.log(\"RESPONSE\", resp.data);\n this.currentClip.img01 = resp.data.filenameIn;\n this.currentClip.uploaded = true;\n this.tabIndex++;\n console.log('image uploaded', this.currentClip);\n }, (resp) => {\n console.log('Error: ' + resp.error);\n console.log('Error status: ' + resp.status);\n }, (evt) => {\n this.progressPercentage = parseInt(100.0 * evt.loaded / evt.total);\n });\n }", "title": "" }, { "docid": "b81a0a039dce43651619cca3798da5ba", "score": "0.6088892", "text": "function upload() {\n gtag('event', 'Profile Builder Submit');\n showHide('results', 'preview');\n apiWorker.postMessage(array);\n}", "title": "" }, { "docid": "8a79fe00c185713221960e89c60e5589", "score": "0.6062488", "text": "function upload() {\n // Set headers\n vm.ngFlow.flow.opts.headers = {\n 'X-Requested-With': 'XMLHttpRequest',\n //'X-XSRF-TOKEN' : $cookies.get('XSRF-TOKEN')\n };\n\n vm.ngFlow.flow.upload();\n }", "title": "" }, { "docid": "c826d0cfd2e4bbeef893b7c5f8a6ff21", "score": "0.6044178", "text": "function upload(imgURL) {\n\n var ft = new FileTransfer();\n\n var options = new FileUploadOptions();\n var serverURL = \"http://dev.mimosatek.com:5002/\";\n options.fileKey = \"file\";\n options.fileName = 'filename.png';\n options.mimeType = \"image/png\";\n options.chunkedMode = true;\n options.params = {\n \"description\": \"Uploaded from my phone\",\n \"management_unit_id\": 1,\n \"gateway_id\": 1,\n \"node_id\":1,\n \"user_id\": 1,\n \"system_id\":1,\n \"camera_type\": 1\n };\n\n ft.upload(imgURL,encodeURI(serverURL + \"api/addImage\"),\n function (e) {\n alert(\"Cập nhật thành công! \", e);\n var tempParam='url:'+serverURL + \"api/addImage\";\n\n $scope.reddit = new TimelineMore();\n $scope.reddit.nextPage(1,1,1);\n },\n function (e) {\n alert(\"Cập nhật không thành công!\");\n var tempParam='url:'+serverURL + \"api/addImage\";\n }, options);\n }", "title": "" }, { "docid": "5092ce5d97840126ed106f354d3b7bce", "score": "0.6040436", "text": "upload() {\n this._out.upload();\n }", "title": "" }, { "docid": "0db3d874d3b17e96e17298017b6b19b1", "score": "0.5975439", "text": "onUpload() {\n // Assessing the image file and src\n if (this.myImage == '' || this.image == '') {\n alert(\"Please enter a photo\");\n return;\n }\n let townName = this.$route.params.name;\n let userName = this.$root.user.username\n let type = \"image\";\n\n //Using the FormData object to store the file data into our request\n let formData = new FormData();\n \n //Calling the module \n let image = new window.exports.Image(-1, townName, type, userName);\n let json = JSON.parse(image.toJSON());\n\n formData.append('file', this.myImage);\n\n //Appending image data object to the other useful data \n formData.append('data', JSON.stringify(json));\n\n fetch('/addImage/' + townName, {\n method: 'POST',\n headers: new Headers({\n 'Accept': 'application/json, */*'\n }),\n body: formData\n })\n .then(res => {\n //Redisplay the data accordingly\n this.showImages();\n this.setUpEvents();\n formData = '';\n this.image = '';\n this.myImage = '';\n return res.json();\n })\n .catch(err => console.log(\"Error: \" + err));\n }", "title": "" }, { "docid": "3336a867aae0647044b494da86acb1b8", "score": "0.5920146", "text": "upload() {\n return this.loader.file\n .then( file => new Promise( ( resolve, reject ) => {\n this._initRequest();\n this._initListeners( resolve, reject, file );\n this._sendRequest( file );\n } ) );\n }", "title": "" }, { "docid": "9359bd0dc990bbfb07e3a95cb9002066", "score": "0.59030694", "text": "createPhoto(data) {\n return this.executeAuth('post', '/api/auth/photos/upload', data)\n }", "title": "" }, { "docid": "2da2116a2989bc56973a4a69a4adccd4", "score": "0.5859594", "text": "submit() {\n console.log(\"avatar\", this.state.avatarSource)\n if (this.state.avatarSource == null)\n Toast.show({\n text: 'Upload Profile Image',\n duration: 2000,\n type: \"warning\"\n })\n else {\n this.setState({ Loading: true })\n let formData = new FormData();\n formData.append('first_name', this.state.FirstName);\n formData.append('last_name', this.state.LastName);\n formData.append('email', this.state.Email);\n formData.append('dob', this.state.DateText);\n formData.append('profile_pic', this.state.avatarSource.uri);\n formData.append('phone_no', this.state.PhoneNumber);\n console.log(\"formdata\", formData)\n\n GlobalAPI(updateaccountdetail, \"POST\", formData, null, response => {\n if (response.status == 200) {\n Vibration.vibrate(200)\n this.props.addUpdateData({ user_data: response.data })\n Toast.show({\n text: 'Account detail updated successfully.',\n duration: 2000,\n type: \"success\"\n })\n this.setState({ Loading: false })\n this.props.navigation.goBack()\n }\n else {\n this.setState({ Loading: false })\n Toast.show({\n text: response.user_msg,\n duration: 2000,\n type: \"warning\"\n })\n }\n // alert(response.user_msg)\n },\n error => {\n this.setState({ Loading: false })\n Alert.alert(\n 'Failed!',\n 'No Internet Connection.',\n [\n { text: 'Cancle', onPress: () => console.log('Cancel Pressed'), style: 'cancel' },\n { text: 'Retry', onPress: () => this.submit() },\n ],\n { cancelable: false }\n )\n console.log(error)\n }\n )\n }\n }", "title": "" }, { "docid": "2470fbcf01bcb3311fded7e2b9f5892d", "score": "0.5854586", "text": "upload(file, success, failure) {\n Editor.adjustPendingUploads(+1)\n\n const data = new FormData()\n data.append('file', file)\n\n $.ajax({\n url: Editor.uploadEndpoint,\n type: 'POST',\n processData: false,\n contentType: false,\n dataType: 'json',\n data: data,\n success: function(result) {\n Editor.adjustPendingUploads(-1)\n success(result)\n },\n error: function(result) {\n Editor.adjustPendingUploads(-1)\n failure(result)\n },\n })\n }", "title": "" }, { "docid": "53c09e74a1b667e9a6f1956b90f2e43e", "score": "0.5852932", "text": "function imageUploader(dialog) {\n var image, xhr, xhrComplete, xhrProgress;\n\n\n // Set up the event handlers\n dialog.addEventListener('imageuploader.cancelupload', function () {\n // Cancel the current upload\n\n // Stop the upload\n if (xhr) {\n xhr.upload.removeEventListener('progress', xhrProgress);\n xhr.removeEventListener('readystatechange', xhrComplete);\n xhr.abort();\n }\n\n // Set the dialog to empty\n dialog.state('empty');\n });\n\n\n\n dialog.addEventListener('imageuploader.clear', function () {\n // Clear the current image\n dialog.clear();\n image = null;\n });\t\n\n\n\n dialog.addEventListener('imageuploader.fileready', function (ev) {\n\n // Upload a file to the server\n var formData;\n var file = ev.detail().file;\n\n // Define functions to handle upload progress and completion\n xhrProgress = function (ev) {\n // Set the progress for the upload\n dialog.progress((ev.loaded / ev.total) * 100);\n }\n\n xhrComplete = function (ev) {\n var response;\n\n // Check the request is complete\n if (ev.target.readyState != 4) {\n return;\n }\n\n // Clear the request\n xhr = null\n xhrProgress = null\n xhrComplete = null\n\n // Handle the result of the upload\n if (parseInt(ev.target.status) == 200) {\n // Unpack the response (from JSON)\n response = JSON.parse(ev.target.responseText);\n\n // Store the image details\n image = {\n size: response.size,\n url: response.url,\n };\n\n // Populate the dialog\n dialog.populate(image.url, image.size);\n\n } else {\n // The request failed, notify the user\n new ContentTools.FlashUI('no');\n }\n }\n\n // Set the dialog state to uploading and reset the progress bar to 0\n dialog.state('uploading');\n dialog.progress(0);\n\n // Build the form data to post to the server\n formData = new FormData();\n formData.append('image', file);\n\n\n var token = $('meta[name=\"csrf-token\"]').attr(\"content\");\n // Make the request\n xhr = new XMLHttpRequest();\n xhr.upload.addEventListener('progress', xhrProgress);\n xhr.addEventListener('readystatechange', xhrComplete);\n xhr.open('POST', '/content_tools/upload_image', true);\n xhr.setRequestHeader(\"X-CSRF-TOKEN\", token);\n xhr.send(formData);\n });\n\n dialog.addEventListener('imageuploader.rotateccw', function () {\n rotateImage('CCW');\n });\n\n dialog.addEventListener('imageuploader.rotatecw', function () {\n rotateImage('CW'); \n });\n\n function rotateImage(direction) {\n // Request a rotated version of the image from the server\n var formData;\n\n // Define a function to handle the request completion\n xhrComplete = function (ev) {\n var response;\n\n // Check the request is complete\n if (ev.target.readyState != 4) {\n return;\n }\n\n // Clear the request\n xhr = null\n xhrComplete = null\n\n // Free the dialog from its busy state\n dialog.busy(false);\n\n // Handle the result of the rotation\n if (parseInt(ev.target.status) == 200) {\n // Unpack the response (from JSON)\n response = JSON.parse(ev.target.responseText);\n\n // Store the image details (use fake param to force refresh)\n image = {\n size: response.size, \n url: response.url + '?_ignore=' + Date.now()\n };\n\n // Populate the dialog\n dialog.populate(image.url, image.size);\n\n } else {\n // The request failed, notify the user\n new ContentTools.FlashUI('no');\n }\n }\n\n // Set the dialog to busy while the rotate is performed\n dialog.busy(true);\n\n // Build the form data to post to the server\n formData = new FormData();\n formData.append('url', image.url);\n formData.append('direction', direction);\n\n var token = $('meta[name=\"csrf-token\"]').attr(\"content\");\n // Make the request\n xhr = new XMLHttpRequest();\n xhr.addEventListener('readystatechange', xhrComplete);\n xhr.open('POST', '/content_tools/rotate_image', true);\n xhr.setRequestHeader(\"X-CSRF-TOKEN\", token);\n xhr.send(formData);\n }\n\n\n\n // SAVE IMAGE\n dialog.addEventListener('imageuploader.save', function () {\n var crop, cropRegion, formData;\n\n // Define a function to handle the request completion\n xhrComplete = function (ev) {\n // Check the request is complete\n if (ev.target.readyState !== 4) {\n return;\n }\n\n // Clear the request\n xhr = null\n xhrComplete = null\n\n // Free the dialog from its busy state\n dialog.busy(false);\n\n // Handle the result of the rotation\n if (parseInt(ev.target.status) === 200) {\n // Unpack the response (from JSON)\n var response = JSON.parse(ev.target.responseText);\n\n // Trigger the save event against the dialog with details of the\n // image to be inserted.\n dialog.save(\n response.url + '?_ignore=' + Date.now(),\n response.size,\n {\n 'alt': response.alt,\n 'data-ce-max-width': response.size[0]\n });\n\n } else {\n // The request failed, notify the user\n new ContentTools.FlashUI('no');\n }\n }\n\n // Set the dialog to busy while the rotate is performed\n dialog.busy(true);\n\n // Build the form data to post to the server\n formData = new FormData();\n formData.append('url', image.url);\n\n // Check if a crop region has been defined by the user\n if (dialog.cropRegion()) {\n formData.append('crop', dialog.cropRegion());\n }\n\n var token = $('meta[name=\"csrf-token\"]').attr(\"content\");\n // Make the request\n xhr = new XMLHttpRequest();\n xhr.addEventListener('readystatechange', xhrComplete);\n xhr.open('POST', '/content_tools/save_image', true);\n xhr.setRequestHeader(\"X-CSRF-TOKEN\", token);\n xhr.send(formData);\n });\n\n\n} //END ImageUploader", "title": "" }, { "docid": "99b8248df77119fe761ce4090c132d7b", "score": "0.58525574", "text": "uploadPhoto(e){ \n\t e.preventDefault();\n\t \n\t let self = this;\n\t let target = e.currentTarget; // get current <a/>\n\t let photo = target.parentElement.parentElement; // Get parent .photo el\n\t let notice = photo.querySelector('.notice-msg'); // Locate .notice-msg div\n\t \n\t if(target.classList.contains('success') || this.inProgress)\n\t return false; // Exit if already uploaded or in progress.\n\t \n\t target.classList.add('uploading');\n\t photo.classList.add('in-progress');\n\t notice.innerHTML = instant_img_localize.saving;\n\t this.inProgress = true;\t \n\t \n\t \n\t // Create Data Array \n\t let data = {\n\t 'id' : target.getAttribute('data-id'),\n 'image' : target.getAttribute('data-url'),\n 'desc' : target.getAttribute('data-desc')\n } \n \n // REST API URL\n let uploadURL = instant_img_localize.root + 'instant-images/upload/';\n let uploadMsg = '';\n \n var requestUploadImg = new XMLHttpRequest();\n requestUploadImg.open('POST', uploadURL, true);\n requestUploadImg.setRequestHeader('X-WP-Nonce', instant_img_localize.nonce);\n requestUploadImg.setRequestHeader('Content-Type', 'application/json');\n requestUploadImg.send(JSON.stringify(data));\n \n requestUploadImg.onload = function() {\n if (requestUploadImg.status >= 200 && requestUploadImg.status < 400) { // Success\n \n let response = JSON.parse(requestUploadImg.response);\n \n if(response){\n \n let hasError = response.error;\n let path = response.path;\n let filename = response.filename;\n let desc = response.desc;\n let url = response.url;\n uploadMsg = response.msg;\n \n if(hasError){ \n // Error\n self.uploadError(target, photo, instant_img_localize.error_upload);\n \n } else { \n // Success\n self.resizeImage(path, filename, desc, url, target, photo, notice);\n self.triggerUnsplashDownload(data.id);\n \n }\n }\n \n } else {\n\t // Error\n self.uploadError(target, photo, instant_img_localize.error_upload); \n }\n }; \n \n requestUploadImg.onerror = function() {\n self.uploadError(target, photo, instant_img_localize.error_upload);\n }; \n\n }", "title": "" }, { "docid": "be398c21bc440800d2e6dcd352746f01", "score": "0.5851518", "text": "handle_image_upload(file) {\n let upload = request.post(CLOUDINARY_UPLOAD_URL)\n .field('upload_preset', CLOUDINARY_UPLOAD_PRESET)\n .field('file', file);\n\n upload.end((err, response) => {\n if (err) {\n alert(err);\n }\n\n if (response.body.secure_url !== '') {\n this.setState({\n uploadedFileCloudinaryUrl: response.body.secure_url\n });\n this.setState({\n showImageName: this.state.uploadedFile.name\n })\n }\n });\n }", "title": "" }, { "docid": "5a5c3edc29de9de49456c0085fc02382", "score": "0.5830783", "text": "upload() {\n try {\n this.uploader.uploadItem(this);\n } catch(e) {\n var message = e.name + ':' + e.message;\n this.uploader._onCompleteItem(this, message, e.code, []);\n this.uploader._onErrorItem(this, message, e.code, []);\n }\n }", "title": "" }, { "docid": "1a2c38ffd3b0bb1463b97049bc79fefe", "score": "0.58295584", "text": "static upload(fileData){\n\t\tlet kparams = {};\n\t\tlet kfiles = {};\n\t\tkfiles.fileData = fileData;\n\t\treturn new kaltura.RequestBuilder('media', 'upload', kparams, kfiles);\n\t}", "title": "" }, { "docid": "a8327b13b852e235a50400685a936425", "score": "0.5821798", "text": "function uploadPhoto(){\n alert(\"Upload Image!\");\n}", "title": "" }, { "docid": "e192d09a82642280e6c7d74310bdc3bf", "score": "0.5813774", "text": "uploadImage(uriFromCameraRoll, imageName, imageType, processRespTextFunc) {\n var url = this.constructor.HOST + '/image/' + imageType + '/upload'\n var image = {\n uri: uriFromCameraRoll,\n type: 'image/jpeg',\n name: imageName,\n };\n var body = new FormData();\n body.append(imageType, image);\n\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function() {\n if (xhr.readyState == XMLHttpRequest.DONE) {\n // responseText is just the image filename. eg: 'profile_yicyahoo.png'.\n console.log('xhr.responseText:', xhr.responseText);\n processRespTextFunc(xhr.responseText);\n }\n }\n xhr.open('POST', url);\n xhr.send(body);\n\n }", "title": "" }, { "docid": "9dd7ee6f4ab69b597dc63170f1863c16", "score": "0.5812227", "text": "static upload(fileData){\n\t\tlet kparams = {};\n\t\tlet kfiles = {};\n\t\tkfiles.fileData = fileData;\n\t\treturn new kaltura.RequestBuilder('baseentry', 'upload', kparams, kfiles);\n\t}", "title": "" }, { "docid": "cc94f6676a99085be7d42e32d93f2827", "score": "0.58103174", "text": "_uploadFile(upload, file) {\n const formData = new FormData();\n\n // Copy the keys from our upload instructions into the form data\n for (const key in upload.fields) {\n formData.append(key, upload.fields[key]);\n }\n\n // AWS ignores all fields in the request after the file field, so all other\n // fields must appear before the file.\n formData.append('file', file);\n\n // Now we can upload the file\n fetch(upload.url, {\n method: 'post',\n body: formData\n }).then((response) => {\n if (response.ok) {\n this._finalizeFileUpload(upload, file);\n } else {\n this.options.onError(new AssetUploaderError(\"There was an error uploading the file. Please try again.\"));\n }\n });\n }", "title": "" }, { "docid": "89204fdf38906caf513729d33067e065", "score": "0.5806056", "text": "function uploadPhoto(){\n if (isFromCamera == true) {\n var ft = new FileTransfer();\n var options = new FileUploadOptions();\n\n options.fileKey = \"image\";\n // we use the file name to send the username\n options.fileName = \"filename.jpg\"; \n options.mimeType = \"image/jpeg\";\n options.chunkedMode = false;\n options.params = { \n \"username\": username\n };\n\n ft.upload(imageSavedURI, encodeURI(serverURL + \"upload.php\"),\n function (e) {\n alert(\"Image uploaded\");\n },\n function (e) {\n alert(\"Upload failed\");\n }, \n options\n );\n } else {\n var formdata = new FormData();\n formdata.append(\"image\", file);\n formdata.append(\"username\", username);\n var ajax = new XMLHttpRequest();\n ajax.upload.addEventListener(\"progress\", progressHandler, false);\n ajax.addEventListener(\"load\", completeHandler, false);\n ajax.addEventListener(\"error\", errorHandler, false);\n ajax.addEventListener(\"abort\", abortHandler, false);\n ajax.open(\"POST\", serverURL + \"upload.php\");\n ajax.send(formdata);\n }\n}", "title": "" }, { "docid": "bddac337040ac7df7bb53ffe3be4e9a6", "score": "0.58014214", "text": "initializeFileUpload(initializeUploadUrl, filename) {\n const payload = [\n {\n key: filename,\n },\n ];\n return axios.post(initializeUploadUrl, payload, {\n headers: {\n 'content-type': 'application/json',\n },\n });\n }", "title": "" }, { "docid": "94d8113e38b053b6931a6a7cfd477668", "score": "0.57792723", "text": "function iInputImageClicked() {\n\tshowDialogScreen(\"Please Wait.\", \"Uploading Image\");\n\n\tlet iInputImage = document.getElementById(\"iInputImage\");\n\n\tlet formData = new FormData();\n\tformData.append(\"inputImage\", iInputImage.files[0]);\n\t\n\txhr = new XMLHttpRequest();\n\txhr.open(\"POST\", \"/upload_image\", true);\n\txhr.onload = function(response) {\n\n\t\tif (this.readyState == 4 && this.status == 200) {\n\t\t\taddOption(iInputImage.files[0].name, true);\n\t\t\tloadImage(iInputImage.files[0].name);\n\t\t\t\n\t\t\thideDialogScreen();\n\t\t} else {\n\t\t\tshowErrorMsg(\"Couldn't upload image.\")\n\t\t}\n\n\t}\n\txhr.send(formData);\n}", "title": "" }, { "docid": "d3d8c58beed23d526b96a3a1888ba8a7", "score": "0.57719266", "text": "function nc_uploadPhoto() {\n\t\n\tif(!loggedIn){\n\t\tnavigator.notification.alert('Please log in to your account first.', function()\n\t\t\t\t{\n\t\t\t\t\tpushPage('profile', LTR);\n\t\t\t\t}, 'User not found');\n\t\treturn;\n\t}\n \n\t//selected photo URI is in the src attribute (we set this on getPhoto)\n var imageURI = document.getElementById('nc_picture').getAttribute(\"src\");\n \n\tif (!imageURI) {\n\t\tnavigator.notification.alert('Please take a photo first.', null, 'Photo not found');\n return;\n }\n\t\n\twindow.nc_name = document.getElementById(\"nc_name\").value;\n\t\n\tif(nc_name == \"\"){\n\t\tnavigator.notification.alert('Please enter the full name.', function()\n\t\t{\n\t\t\t$('#namecard #nc_name').focus();\n\t\t}, 'Missing info');\n\t\treturn;\n\t}\n\t\n\twindow.nc_position = document.getElementById(\"nc_position\").value;\n\t\n\tif(nc_position == \"\"){\n\t\tnavigator.notification.alert('Please enter position of the person.', function()\n\t\t{\n\t\t\t$('#namecard #nc_position').focus();\n\t\t}, 'Missing info');\n\t\treturn;\n\t}\n\t\n\twindow.nc_company = document.getElementById(\"nc_company\").value;\n\t\n\tif(nc_company == \"\"){\n\t\tnavigator.notification.alert('Please enter company name.', function()\n\t\t{\n\t\t\t$('#namecard #nc_company').focus();\n\t\t}, 'Missing info');\n\t\treturn;\n\t}\n\t\n $('#addnamecard').addClass('loading');\n\t$('#addnamecard .content').hide();\n\t\n //set upload options\n\tvar options = new FileUploadOptions();\n options.fileKey=\"file\";\n options.fileName=userIndex + \"_\" + imageURI.substr(imageURI.lastIndexOf('/')+1);\n options.mimeType=\"image/jpeg\";\n \n\t//alert(\"1 imageURI upload \"+ imageURI);\n\n var params = new Object();\n params.value1 = userIndex;\n params.value2 = nc_name;\n params.value3 = nc_position;\n params.value4 = nc_company;\n \n options.params = params;\n options.chunkedMode = false;\n \n var ft = new FileTransfer();\n ft.upload(imageURI, encodeURI (\"http://apemalaysia.net/foxspeed/api/nc_upload.php\"), win, fail, options);\n}", "title": "" }, { "docid": "f8dd9963232ce7510b323ff7ff5f7e5a", "score": "0.5769687", "text": "async function uploadRecipePUT() {\n e.preventDefault();\n console.log(\"Upload button clicked...\");\n\n // Connect to API Gateway\n let apigClient = apigClientFactory.newClient();\n console.log(\"apigClient\", apigClient);\n\n let params = {\n \"Content-Type\": \"multipart/form-data\"\n };\n let body = {\n \"username\": username,\n \"title\": title,\n \"imageurl\": imageurl,\n \"ingredients\": ingredients,\n \"instructions\": instructions,\n };\n let additionalParams = {};\n\n // API GATEWAY\n apigClient.uploadPut(params, body, additionalParams);\n\n // Clear form after submit\n $(\"#add-recipe-form\")[0].reset();\n }", "title": "" }, { "docid": "59b5f60bbd3695e54a0de40f31582000", "score": "0.5769029", "text": "function upload() {\n filepickerService.pick({\n\n language: 'en',\n services: ['COMPUTER', 'DROPBOX', 'GOOGLE_DRIVE'],\n openTo: 'COMPUTER'\n },\n function(Blob) {\n console.log(JSON.stringify(Blob));\n vm.pup.medPDF = Blob;\n console.log(Blob);\n editPup(vm.pup, vm.pup._id);\n }\n\n\n );\n }", "title": "" }, { "docid": "43875cf0af52686b6fa5ea5660dc2df6", "score": "0.57654506", "text": "uploadImageOcr(file, onUploadProgress) {\n const formData = new FormData()\n formData.append('image', file)\n return axios.post(this.apiBaseUrl + '/ocr', formData, {\n headers: {\n Accept: 'text/plain',\n 'x-token': store.state.token,\n },\n onUploadProgress,\n })\n }", "title": "" }, { "docid": "b0f8ec7e452d7f905f197e300ae6752e", "score": "0.57546955", "text": "function uploadJSON() {\r\n\r\n}", "title": "" }, { "docid": "8c5914bf0b69fbf2870aba109f6de93c", "score": "0.5736126", "text": "selectPhotoTapped() {\n const options = {\n quality: 1.0,\n maxWidth: 500,\n maxHeight: 500,\n storageOptions: {\n skipBackup: true,\n },\n };\n // ImagePicker invoked, picking an image\n ImagePicker.showImagePicker(options, (response) => {\n // Logging various errors/ cancels for the ImagePicker\n console.log('ImagePicker response: ', response);\n if (response.didCancel) {\n console.log('User cancelled ImagePicker');\n } else if (response.error) {\n console.log('ImagePicker Error: ', response.error);\n } else if (response.customButton) {\n console.log('User tapped custom button: ', response.customButton);\n } else {\n // Saving the URI from response as a variable and a state (state is used in render)\n const source = { uri: response.uri };\n this.setState({\n avatarSource: source,\n });\n // fetch needs the source as a string, but \"source\" is an object\n const sourceAsString = source.uri.toString();\n console.log('sourceAsString = ', sourceAsString);\n\n // For storing the file on a server we cut of the filename and its\n // extension from the file URI\n const fileName = sourceAsString.split('/').pop();\n console.log('filename = ', fileName);\n\n // Creating new FormData for the image upload\n const data = new FormData();\n data.append('data', {\n uri: sourceAsString,\n type: 'image/jpeg',\n name: fileName,\n });\n // fetch \"POST\", upload the image\n // replace below once with your own API URI\n fetch('http://hendrikhausen.com/hidden/next/upload_scripts/upload.php', {\n method: 'POST',\n body: data,\n },\n this.setState({\n uploadState: 'Uploading... please be patient.',\n }),\n )\n // Checking the HTTP response and adjusting uploadState\n .then((res) => {\n console.log(res);\n if (res.status === 200) {\n this.setState({\n uploadState: 'Upload finished.',\n });\n } else {\n const responseStatusString = res.status.toString();\n console.log('responseStatusString: ', responseStatusString);\n const networkError = 'An error occured during uploading, errorcode: ' + responseStatusString;\n console.log('networkError: ', networkError);\n this.setState({\n uploadState: networkError,\n });\n }\n })\n // Logging any networking errors\n .catch((error) => {\n console.log('An error occured during networking: ', error);\n });\n\n // Create a DB entry for the image\n const dbData = new FormData();\n dbData.append(\n 'fileName', fileName,\n );\n dbData.append(\n 'uploaderID', '1',\n );\n dbData.append(\n 'fileType', 'image',\n );\n\n\n // fetch 'POST', send image DB data\n fetch('http://hendrikhausen.com/hidden/next/database_scripts/createDatabaseEntry.php', {\n headers: {\n 'Content-Type': 'multipart/form-data',\n },\n method: 'POST',\n body: dbData,\n }).then(res => res.text())\n .then(text => {\n console.log('Database response: ', text);\n this.setState({\n databaseEntryState: text,\n });\n })\n .catch((error) => {\n console.log('DB error: ', error);\n });\n }\n });\n }", "title": "" }, { "docid": "9006cdc4fdc255f168c37a568a11dfa0", "score": "0.570011", "text": "function uploadpicture() {\n\n var prez_name = prez_selected();\n var dataUrl = canvas.toDataURL();\n\n // Ajax + js method\n var http = new XMLHttpRequest();\n var url = \"create_from_cam.php\";\n var params = \"imgBase64=\" + JSON.stringify({image: dataUrl}) + \"&prez=\" + prez_name;\n console.log(params);\n http.open(\"POST\", url, true);\n // Send the proper header information along with the request\n http.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n http.onreadystatechange = function() {//Call a function when the state changes.\n if(http.readyState == 4 && http.status == 200) {\n carousel_refresh_page();\n }\n }\n http.send(params);\n }", "title": "" }, { "docid": "3fc5cbc7a70bb993d0d2d5ec817e8d53", "score": "0.56886125", "text": "function handleRequestUploadImageResponseAction(action, response) {\n var label = action.Metadata.Label || \"Upload Image\"\n response.displayLinkCollection.Sections.push({\n \"SectionID\": 0,\n \"HeaderText\": \"\",\n \"FoldLocation\": 6,\n \"FoldText\": \"Click for more...\",\n \"Links\": [\n {\n \"DisplayText\": label,\n \"TargetType\": \"Image Upload\",\n \"SectionID\": 0,\n \"Metadata\": {\n \"InputText\": \"Yes\",\n \"Source\": {\n \"Origin\": \"responseset\",\n \"UID\": \"91ca2411-1a37-4e1e-88ae-e8ada46afcba\"\n },\n \"DisplayStyle\": \"Default\"\n }\n }\n ]\n });\n }", "title": "" }, { "docid": "c052a605e1d0c651ac3716e6b5a518ec", "score": "0.5679648", "text": "function initUpload(){\n const files = document.getElementById('file-input').files;\n const file = files[0];\n if(!file){\n // return alert('No file selected.');\n return 0;\n }\n getSignedRequest(file);\n }", "title": "" }, { "docid": "6bfc1ef1cca6e8ec131f7e6042f47ea0", "score": "0.567824", "text": "function initImgUploader() {\r\n try {\r\n//inizializzazione dei parametri\r\n var selectButtonId = \"uploader_img_button\";\r\n var url = \"../controllers/request/uploadRequest.php\";\r\n var runtime = 'html5';\r\n var multi_selection = false;\r\n var maxFileSize = \"12mb\";\r\n//creo l'oggetto uploader (l'ho dichiarato ad inizio js in modo che sia globale)\r\n uploader = new plupload.Uploader({\r\n runtimes: runtime, //runtime di upload\r\n browse_button: selectButtonId, //id del pulsante di selezione file\r\n max_file_size: maxFileSize, //dimensione max dei file da caricare\r\n multi_selection: multi_selection, //forza un file alla volta per upload\r\n chunk_size: '100kb',\r\n url: url,\r\n filters: [\r\n {title: \"Image files\", extensions: \"jpg,gif,png\"}\r\n ],\r\n multipart_params: {\"request\": \"uploadImage\"}, //parametri passati in POST\r\n });\r\n uploader.bind('Init', function(up, params) {\r\n// window.console.log(\"initImgUploader - EVENT: Ini\");\r\n $('#filelist').html(\"\");\r\n });\r\n//inizializo l'uploader\r\n// window.console.log(\"initUploader - eseguo uploader.init()\");\r\n uploader.init();\r\n//evento: file aggiunto\r\n uploader.bind('FilesAdded', function(up, files) {\r\n //avvio subito l'upload\r\n// window.console.log(\"initImgUploader - EVENT: FilesAdded - parametri: files => \" + JSON.stringify(files));\r\n\r\n uploader.start();\r\n });\r\n//evento: cambiamento percentuale di caricamento\r\n uploader.bind('UploadProgress', function(up, file) {\r\n// window.console.log(\"initImgUploader - EVENT: UploadProgress - parametri: file => \" + JSON.stringify(file));\r\n });\r\n//evento: errore\r\n uploader.bind('Error', function(up, err) {\r\n// window.console.log(\"initImgUploader - EVENT: Error - parametri: err => \" + JSON.stringify(err));\r\n alert(\"Error occurred\");\r\n up.refresh();\r\n });\r\n//evento: upload terminato\r\n uploader.bind('FileUploaded', function(up, file, response) {\r\n var obj = JSON.parse(response.response);\r\n json_album_create.image = obj.src;\r\n //qua ora va attivato il jcrop\r\n var img = new Image();\r\n img.src = \"../cache/\" + obj.src;\r\n img.width = obj.width;\r\n img.height = obj.height;\r\n onUploadedImage(img);\r\n });\r\n } catch (err) {\r\n window.console.error(\"onUploadedImage | An error occurred - message : \" + err.message);\r\n }\r\n}", "title": "" }, { "docid": "39c5e556f743a3685168d100cab6d5c2", "score": "0.5672729", "text": "function uploadImage(req, res) {\n var widget = req.body;\n var myFile = req.file;\n var pageId = req.body.pageId;\n widget.pageId = pageId;\n if(widget.widgetId == \"\" && myFile!=null)\n {\n var url = req.protocol + '://' +req.get('host')+\"/uploads/\"+myFile.filename;\n widget.url = url;\n widget.type = \"IMAGE\";\n widgetModel\n .createWidget(pageId,widget)\n .then(function (widget) {\n res.redirect(\"/assignment/index.html#!/user/\" + req.body.userId + \"/website/\" + req.body.websiteId + \"/page/\" + req.body.pageId + \"/widget/\");\n }, function (error) {\n res.sendStatus(500);\n });\n }\n else if(widget.widgetId != \"\" && myFile!=null)\n {\n var url = req.protocol + '://' +req.get('host')+\"/uploads/\"+myFile.filename;\n widget.url = url;\n widgetModel\n .updateWidget(widget.widgetId,widget)\n .then(function (widget) {\n res.redirect(\"/assignment/index.html#!/user/\" + req.body.userId + \"/website/\" + req.body.websiteId + \"/page/\" + req.body.pageId + \"/widget/\");\n }, function (error) {\n res.sendStatus(500);\n });\n }\n else if(myFile == null){\n if(widget.widgetId == \"\"){\n widget.type = \"IMAGE\";\n widgetModel\n .createWidget(pageId,widget)\n .then(function (widget) {\n res.redirect(\"/assignment/index.html#!/user/\" + req.body.userId + \"/website/\" + req.body.websiteId + \"/page/\" + req.body.pageId + \"/widget/\");\n }, function (error) {\n res.sendStatus(500);\n });\n }\n else{\n widgetModel\n .updateWidget(widget.widgetId,widget)\n .then(function (widget) {\n res.redirect(\"/assignment/index.html#!/user/\" + req.body.userId + \"/website/\" + req.body.websiteId + \"/page/\" + req.body.pageId + \"/widget/\");\n }, function (error) {\n res.sendStatus(500);\n });\n }\n\n }\n }", "title": "" }, { "docid": "8e227f7dff47ff43d9a06b15d46511b5", "score": "0.5671718", "text": "function addPost() {\n\t// Get the file to upload\n\tshowLoading();\n\tvar fileUploadElement = $(\"#input-file\")[0];\n\tvar filepath = $(\"#input-file\").val();\n\tvar filename = filepath.split('\\\\').pop()\n\t\t\t\n\t// Upload the file\n\tif (fileUploadElement.files.length > 0) {\n\t\t// If there's a file upload it then add a post\n\t\tvar file = fileUploadElement.files[0];\n\t\tvar parseFile = new Parse.File(filename, file);\n\t\t\n\t\tparseFile.save().then(function() {\n\t\t\t// console.log(\"ParseFile Success\");\n\t\t\tsaveComment(parseFile);\n\t\t}, function(error) {\n\t\t\tconsole.log(\"ParseFile Error:\"+error.message);\n\t\t\thideLoading();\n\t\t});\n\t} else {\n\t\t// Else if no file just upload a post\n\t\tsaveComment(false);\n\t}\n}", "title": "" }, { "docid": "f925301851ca158a445981a8373cf1f5", "score": "0.56683475", "text": "uploadPic(e) {\n e.preventDefault();\n this.disableUploadUi(true);\n var newAnimalName = this.newAnimalName.val();\n\n this.generateImages().then(pics => {\n // Upload the File upload to Cloud Storage and create new post.\n friendlyPix.firebase.uploadNewAnimalProfile(pics.full, pics.thumb, this.currentFile.name, newAnimalName)\n .then(profileId => {\n page(`/user/${profileId}`);\n var data = {\n message: 'New animal has beed added!',\n actionHandler: () => page(`/user/${profileId}`),\n actionText: 'View',\n timeout: 10000\n };\n this.toast[0].MaterialSnackbar.showSnackbar(data);\n this.disableUploadUi(false);\n }, error => {\n console.error(error);\n var data = {\n message: `There was an error while adding new animal. Sorry!`,\n timeout: 5000\n };\n this.toast[0].MaterialSnackbar.showSnackbar(data);\n this.disableUploadUi(false);\n });\n });\n\n }", "title": "" }, { "docid": "2081ab055cb6177940fe67e558b15dc0", "score": "0.5663092", "text": "function handleUpload(event) {\n setFile(event.target.files[0]);\n \n // Add code here to upload file to server\n // ...\n }", "title": "" }, { "docid": "958f4bcffbaefda98b381ad99ecbb611", "score": "0.5650897", "text": "function initUpload() {\n return makePost('media/upload', {\n command: 'INIT',\n total_bytes: mediaSize,\n media_type: mediaType,\n }).then(data => data.media_id_string);\n }", "title": "" }, { "docid": "94cb784738b10210d05fdec7e2165356", "score": "0.5645449", "text": "async uploadImageAsync(uri) {\n let apiUrl = 'https://moody.now.sh/upload';\n\n let uriParts = uri.split('.');\n let fileType = uriParts[uriParts.length - 1];\n\n let formData = new FormData();\n formData.append('photo', {\n uri,\n name: `photo.${fileType}`,\n type: `image/${fileType}`,\n });\n\n let options = {\n method: 'POST',\n body: formData,\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'multipart/form-data',\n },\n };\n return fetch(apiUrl, options).then(result => {\n return result.json();\n });\n }", "title": "" }, { "docid": "79a8ef020eab0b8c92535726b165ed2d", "score": "0.5632101", "text": "uploadImage(callback) {\n\n this.imageModel.uploadUserImage({request: this.request}, (err, image) => {\n if (err) return callback(err);\n\n if (this.request.user.image) {\n // Remove old image\n this.imageModel.removeById(this.request.user.image, err => {\n if (err) this.logger.error(err);\n });\n }\n\n this.request.user.image = image._id;\n\n this.request.user.save(err => {\n if (err) return callback(err);\n\n this.terminate();\n\n this.response.send(image);\n\n callback();\n });\n });\n }", "title": "" }, { "docid": "a54e2ef8c7a57865902acc3c2d5fd547", "score": "0.5630718", "text": "function post() { \n\tclearMain();\n\t// lets change the background for no reason\n\tlet background = document.getElementById(\"background\"); \n\tbackground.style.backgroundImage = \"url(../images/tiles/night4.gif)\";\n\n\tlet data_part = \"\";\n\n\t// create a form for uploading images \n let upload_form = createElement(\"form\", \"\",\n \t{id:\"upload_form\", method:\"get\", enctype:\"multipart/form-data\", class: \"form-signin\"});\n upload_form.appendChild(makeWindowHeader(\"Make a Post\"));\n upload_form.style.backgroundImage = \"url(../images/tiles/purple_clouds.gif)\";\n\n let select_image = createElement(\"input\", \"How will this show??\",\n \t{type:\"file\", id:\"select_image\", name:\"new_image\", accept:\".jpg, .jpeg, .png\"});\n upload_form.appendChild(select_image); \n select_image.addEventListener(\"change\", (e) => { \n \tuploadImage(e, (data) => { \n\t\t\tvar re = new RegExp(\"(data:.*base64,)\");\n\t\t\tdata_part = data.replace(re, \"\"); \n\t\t\t\n \t});\n }); \n\n\n let description_text = createElement(\"input\", \"\", \n \t{name: \"description_text\", type:\"text\", placeholder:\"What are you thinking?\"});\n upload_form.appendChild(description_text);\n\n let upload_image_button = createElement(\"input\", \"\", \n \t{id: \"upload_image_button\", name:\"submit\", type:\"submit\", value:\"Upload image\", form:\"upload_form\", class: \"upload-button\"}); \n\n upload_image_button.onclick = (e) => false; // to prevent reload\n\tupload_form.appendChild(upload_image_button); \n\n\tupload_image_button.addEventListener('click', async function(e) {\n\t\tlet image_path = e.target.form.select_image.value;\n\t\tif (data_part === \"\") { \n\t\t\talert(\"invalid image\");\n\t\t\treturn; \n\t\t} else if (description_text.value == \"\") { \n\t\t\talert(\"invalid text\");\n\t\t\treturn; \n\t\t}\n\n\t\tlet response = await api.newPost(\"post\", \"POST\", \n\t\t{\n\t\t\taccept: \"application/json\", \n\t\t\tAuthorization: \"Token \" + current_token,\n\t\t\t\"Content-Type\": \"application/json\"\n\t\t}, \n\t\t{ \n\t\t\t\"description_text\" : description_text.value,\n\t\t\t\"src\": data_part\n\t\t});\n\t\tconsole.log(\"this is the repsone in the main.js\", response);\n\n\t})\n\n\t// let image_preview = createElement(\"img\", \"\", \n\t// \t{class: \"image-preview\", src:\"../images/other/notepad.gif\", id:\"image_preview\"});\n\t// upload_form.appendChild(image_preview);\n\n\n // AH WHY DOES THIS THIS WORK \n // upload_form.addEventListener(\"submit\", (e) => \n // \t{\n // \t\te.preventDefault();\n // \t\tconsole.log(\"triggering event listener of form\");\n // \t});\n\n\n\n main.appendChild(upload_form);\n}", "title": "" }, { "docid": "69f63d97f70a515d5ff64edc078b5f22", "score": "0.5629411", "text": "function cl_uploadPhoto() {\n\n\tif(!loggedIn){\n\t\tnavigator.notification.alert('Please log in to your account first.', function()\n\t\t\t\t{\n\t\t\t\t\tpushPage('profile', LTR);\n\t\t\t\t}, 'User not found');\n\t\treturn;\n\t}\n \n //selected photo URI is in the src attribute (we set this on getPhoto)\n var imageURI = document.getElementById('cl_picture').getAttribute(\"src\");\n \n //alert(\"imageURI \"+ imageURI);\n if (!imageURI) {\n navigator.notification.alert('Please take a photo first.', null, 'Photo not found');\n return;\n }\n\t\n\twindow.cl_amount = document.getElementById(\"cl_amount\").value;\n\t\n\tif(cl_amount == \"\"){\n\t\tnavigator.notification.alert('Please enter claim amount.', function()\n\t\t{\n\t\t\t$('#claim #cl_amount').focus();\n\t\t}, 'Missing info');\n\t\treturn;\n\t}\n\t\n\tvar categorySelected = document.getElementById(\"cl_category\");\n\twindow.cl_category = categorySelected.options[categorySelected.options.selectedIndex].value;\n\t\n\tif(cl_category == \"\"){\n\t\tnavigator.notification.alert('Please select a claim category.', null, 'Missing info');\n\t\treturn;\n\t}\n\t\n\twindow.cl_description = document.getElementById(\"cl_description\").value;\n\t\n\tif(cl_description == \"\"){\n\t\tnavigator.notification.alert('Please enter claim description.', function()\n\t\t{\n\t\t\t$('#claim #cl_description').focus();\n\t\t}, 'Missing info');\n\t\treturn;\n\t}\n\n\t$('#addclaim').addClass('loading');\n\t$('#addclaim .content').hide();\n\t\n //set upload options\n\tvar options = new FileUploadOptions();\n options.fileKey=\"file\";\n options.fileName=userIndex + \"_\" + imageURI.substr(imageURI.lastIndexOf('/')+1);\n options.mimeType=\"image/jpeg\";\n \n\t//alert(\"1 imageURI upload \"+ imageURI);\n\n var params = new Object();\n params.value1 = userIndex;\n params.value2 = cl_amount;\n\t\tparams.value3 = cl_category;\n\t\tparams.value4 = cl_description;\n \n options.params = params;\n options.chunkedMode = false;\n \n var ft = new FileTransfer();\n ft.upload(imageURI, encodeURI (\"http://apemalaysia.net/foxspeed/api/cl_upload.php\"), cl_win, cl_fail, options);\n }", "title": "" }, { "docid": "d0611b2c8375a13f479ac82a2e6e90d2", "score": "0.56199324", "text": "function UploadApp() {\n\t}", "title": "" }, { "docid": "a981075f81fff4ea73cef61af4eaade9", "score": "0.5618643", "text": "function uploadPhoto(imageURI, NameImage) {\n \n var options = new FileUploadOptions();\n options.fileKey=\"file\";\n options.fileName=NameImage.substr(NameImage.lastIndexOf('/')+1);\n options.mimeType=\"image/jpge\";\n\t\n\n \n var params = new Object();\n params.value1 = \"test\";\n params.value2 = \"param\";\n \n options.params = params;\n options.chunkedMode = false;\n \n var ft = new FileTransfer();\n ft.upload(imageURI, Url+'PHP/FunctionsMobile.php', win, fail, options,true);\n\t\n\n}", "title": "" }, { "docid": "d84f705d0f131af857a0a14eb2f28bd9", "score": "0.56176394", "text": "function initUpload(){\n const files = document.getElementById('file-input').files;\n const file = files[0];\n if(file == null){\n return alert('No file selected.');\n }\n getSignedRequest(file);\n }", "title": "" }, { "docid": "b7e15178bb557a63393b6fcc86824c62", "score": "0.5617017", "text": "function reUpload() {\n vm.galleryAdminService.insertFile(vm.imgUploadItem)\n .then(success).catch(error);\n function success(res) {\n console.log(res.data);\n updateGallery(res.data.item);\n }\n function error(err) {\n console.log(err);\n }\n }", "title": "" }, { "docid": "0dff01b02c060923cdd74f9cd07d71fd", "score": "0.5612641", "text": "function uploadImg(elForm, ev) {\n // ev.preventDefault();\n console.log(elForm, 'eldorm');\n\n // Call this function on successful request\n function onSuccess(response) {\n console.log('uploadedImg', response);\n console.log('uploadedImg', response.url);\n }\n\n doUploadImg(elForm, onSuccess);\n}", "title": "" }, { "docid": "4de8567cbd67cfc41fbf96efcf68b4d6", "score": "0.5611294", "text": "function submitToVision(path) {\n const requestBody =\n {\n \"requests\": [\n {\n \"image\": {\n \"source\": {\n \"gcsImageUri\": `gs://${config.storageBucket}/${path}`\n }\n },\n \"features\": [\n {\n \"type\": \"FACE_DETECTION\"\n },\n {\n \"type\": \"LANDMARK_DETECTION\"\n }\n ]\n }\n ]\n };\n\n var xhttp = new XMLHttpRequest();\n\n xhttp.onreadystatechange = function () {\n if (this.readyState === 4 && this.status === 200) {\n processResult(JSON.parse(this.responseText))\n }\n };\n xhttp.open(\"POST\", `https://vision.googleapis.com/v1/images:annotate?key=${config.visionApiKey}`, true);\n xhttp.setRequestHeader(\"Content-type\", \"application/json\");\n xhttp.send(JSON.stringify(requestBody));\n}", "title": "" }, { "docid": "091dc92d7f89658b204d538b30dbbfbe", "score": "0.560714", "text": "function uploadPaintings(token,file){\n\n $('#imageUploadError').text('');\n showLoader();\n $.ajax({\n\n url: `${baseUrl}/api/media/upload/paintings` ,\n type: \"POST\",\n enctype: \"multipart/form-data\",\n crossDomain: true,\n processData: false, // it prevent jQuery form transforming the data into a query string\n contentType: false,\n data: file,\n async:false,\n beforeSend: function (xhr) {\n xhr.setRequestHeader('Authorization', 'Bearer '+ token);\n },\n success: function (response) {\n swal(\"painting uploaded successfully\");\n },\n error: function(error) { \n $('#imageUploadError').text(error.responseJSON.message)\n },\n complete: function () {\n counter =1;\n paintingList=[];\n showPaintings(token);\n hideLoader();\n bindEvent();\n $('#file').val('');\n } \n });\n \n }", "title": "" }, { "docid": "9d84141f2f6f3aa593362ec99a53ef1c", "score": "0.5604579", "text": "function upload() {\n showHide('results', 'validation');\n buildEvents();\n apiWorker.postMessage(array);\n}", "title": "" }, { "docid": "d004dcddaac09426f24af41549006613", "score": "0.56016296", "text": "function uploadImage(event) {\n console.log('Uploading an image.');\n getBase64(event.currentTarget.files[0]).then((imageData) => {\n upImage(imageData);\n });\n }", "title": "" }, { "docid": "250fe745e8cb2b3158d7d9f07340b4a9", "score": "0.5599424", "text": "function uploadPhoto() {\n var e = _('file').files[0];\n var o = _('cgal').value;\n var t = _('description').value;\n var i = _('p_status');\n var n = _('vupload');\n\n // Check for empty fields\n if (e == '' || o == '') {\n return 'You did not give a gallery or a photo!';\n }\n\n // Check if image file type is supported\n if (e.type != 'image/jpg' && e.type != 'image/jpeg' && e.type != 'image/png' &&\n e.type != 'image/gif') {\n genDialogBox();\n return false;\n }\n\n i.innerHTML = `\n <img src=\"/images/rolling.gif\" width=\"30\" height=\"30\"\n style=\"display: block; margin: 0 auto;\">\n `;\n n.style.display = 'none';\n // _('pbc').style.display = 'block';\n\n // Create a new form data and append photo, gallery and description to it\n var a = new FormData();\n a.append('stPic_photo', e);\n a.append('cgal', o);\n a.append('des', t);\n \n // Handle progress bar\n var p = new XMLHttpRequest();\n\n /*\n TODO: progressHandler is not called for some unknown reasons; solve bug\n p.upload.addEventListener('progress', progressHandler, false);\n */\n\n p.addEventListener('load', completeHandler, false);\n p.addEventListener('error', errorHandler, false);\n p.addEventListener('abort', abortHandler, false);\n p.open('POST', '/php_parsers/photo_system.php');\n p.send(a);\n}", "title": "" }, { "docid": "a03d28a5fccabd236093a1204cb1daca", "score": "0.5598147", "text": "function handleFileUpload(event) {\n\tconst files = event.target.files;\n\tconst formData = new FormData();\n\tformData.append('file', files[0]);\n\n\tfetch('/saveImage', {\n\t\tmethod: 'POST',\n\t\tbody: formData\n\t})\n\t\t.then(response => response.json())\n\t\t.then(data => {\n\t\t\tconsole.log(data.path);\n\t\t})\n\t\t.catch(error => {\n\t\t\tconsole.error(error);\n\t\t});\n}", "title": "" }, { "docid": "63a7b8daf1438973425bce9435e5d363", "score": "0.5593219", "text": "function uploadFile(){\r\n\tvar file = _(\"imageUpload\").files[0];\r\n\tvar formdata = new FormData();\r\n\tformdata.append(\"file\", file);\r\n\t_(\"progress-bar\").setAttribute(\"style\", \"width: 0%;\");\r\n\tvar ajax = new XMLHttpRequest();\r\n\tajax.upload.addEventListener(\"progress\", progressHandler, false);\r\n\tajax.addEventListener(\"load\", completeHandler, false);\r\n\tajax.addEventListener(\"error\", errorHandler, false);\r\n\tajax.addEventListener(\"abort\", abortHandler, false);\r\n\tajax.open(\"POST\", \"controls/FoodControl.php/?uploadImage\");\r\n\tajax.send(formdata);\r\n}", "title": "" }, { "docid": "2c860469554d79023c2ec3bbac91a110", "score": "0.55803007", "text": "_upload() {\n this._fileInputNode.click();\n this._question.setValue(null, null);\n }", "title": "" }, { "docid": "ae35adabc039365c887ac8c2e6d17416", "score": "0.55795443", "text": "function _imageUploaded($img) {\n _setProgressMessage(editor.language.translate('Loading image'));\n\n var status = this.status;\n var response = this.response;\n var responseXML = this.responseXML;\n var responseText = this.responseText;\n\n try {\n if (editor.opts.imageUploadToS3) {\n if (status == 201) {\n var link = _parseXMLResponse(responseXML);\n\n if (link) {\n insert(link, false, [], $img, response || responseXML);\n }\n } else {\n _throwError(BAD_RESPONSE, response || responseXML, $img);\n }\n } else {\n if (status >= 200 && status < 300) {\n var resp = _parseResponse(responseText);\n\n if (resp) {\n insert(resp.link, false, resp, $img, response || responseText);\n }\n } else {\n _throwError(ERROR_DURING_UPLOAD, response || responseText, $img);\n }\n }\n } catch (ex) {\n // Bad response.\n _throwError(BAD_RESPONSE, response || responseText, $img);\n }\n }", "title": "" }, { "docid": "9cab53fb85b9d1a522158d5559b18b98", "score": "0.55733544", "text": "function handleFileUpload(event) {\n\n\tconst files = event.target.files;\n\tconst formData = new FormData();\n\tformData.append('file', files[0]);\n\n\tfetch('/saveImage', {\n\t\tmethod: 'POST',\n\t\tbody: formData\n\t})\n\t\t.then(response => response.json())\n\t\t.then(data => {\n\t\t\tconsole.log(data.path);\n\t\t})\n\t\t.catch(error => {\n\t\t\tconsole.error(error);\n\t\t});\n}", "title": "" }, { "docid": "5779025aec112db4d836417a041e6a0b", "score": "0.5569306", "text": "function upload() {\n // Get selected files from the input element.\n var files = document.querySelector(\"#selector\").files;\n for (var i = 0; i < files.length; i++) {\n var file = files[i];\n // Retrieve a URL from our server.\n retrieveNewURL(file, (file, url, data) => {\n // Upload the file to the server.\n uploadFile(file, url, data);\n });\n }\n}", "title": "" }, { "docid": "970b4c46ce64fe0b15ae4bd8adc0513d", "score": "0.5564667", "text": "function onAddNewImageFormSubmit() {\r\n let form = new FormData(this);\r\n form.append('action', 'addEquipmentImage');\r\n\r\n api.post('/equipment-images.php', form, true)\r\n .then(res => {\r\n snackbar(res.message, 'success');\r\n onUploadImageSuccess(res.content.id);\r\n onProjectImageSelected(res.content.id);\r\n })\r\n .catch(err => {\r\n snackbar(err.message, 'error');\r\n $('#btnUploadImage').attr('disabled', false);\r\n $('#formAddNewImageLoader').hide();\r\n });\r\n\r\n $('#btnUploadImage').attr('disabled', true);\r\n $('#formAddNewImageLoader').show();\r\n\r\n return false;\r\n}", "title": "" }, { "docid": "28c05741a33db7ec42ee327e1b8092a9", "score": "0.5564312", "text": "function uploadFile(file, signedRequest, url){\n const xhr = new XMLHttpRequest();\n xhr.open('PUT', signedRequest);\n xhr.onreadystatechange = () => {\n if(xhr.readyState === 4){\n if(xhr.status === 200){\n document.getElementById('preview').src = url;\n vm.project.image = url;\n console.log(vm.project.image);\n } else {\n alert('Could not upload file.');\n }\n }\n };\n xhr.send(file);\n }", "title": "" }, { "docid": "80ed0cf8b694b41c7797719cfdf4b3f0", "score": "0.55635995", "text": "function handleUpload(event) {\n setFile({file:event.target.files[0], confirmUpload: false});\n // Add code here to upload file to server\n // ...\n }", "title": "" }, { "docid": "ae4d22b67bbebc35f022df019acd429d", "score": "0.55634147", "text": "static upload(fileData){\n\t\tlet kparams = {};\n\t\tlet kfiles = {};\n\t\tkfiles.fileData = fileData;\n\t\treturn new kaltura.RequestBuilder('document_documents', 'upload', kparams, kfiles);\n\t}", "title": "" }, { "docid": "2223ee613d4ce223fdc72248c9b6cf77", "score": "0.5562428", "text": "function OnHttpUploadSuccess()\n{\n debugger;\n console.log( 'successful' );\n\n\n}", "title": "" }, { "docid": "cad600b2326439b7c9145ff2d4b059d5", "score": "0.5559207", "text": "function uploadPhoto(imageURI,params) {\n\n var options = new FileUploadOptions();\n options.fileKey=\"file\";\n options.fileName=imageURI.substr(imageURI.lastIndexOf('/')+1);\n options.mimeType=\"image/jpeg\";\n\n options.params = params;\n\n var ft = new FileTransfer();\n ft.upload(imageURI, encodeURI(urlUploadImage), win, fail, options);\n\n}", "title": "" }, { "docid": "5fb67df00fff0a6e842293c595db7eaf", "score": "0.55589336", "text": "function uploadProfilePicture() {\n // Clear messages\n vm.success = vm.error = null;\n vm.uploader.uploadAll();\n }", "title": "" }, { "docid": "00b54f58a6a5c529f8b9dafdaae63598", "score": "0.5558365", "text": "uploadFile(files){\n console.log('uploadFile: ')\n const image = files[0]\n console.log(image);\n //prepare your request for cloudinary\n //see uploading with a direct call to the API on cloudinary\n\n //this is the name of your library in your cloudinary account\n const cloudName = 'finalproject'\n const url = 'https://api.cloudinary.com/v1_1/' + cloudName + '/image/upload'\n //cloudinary wants a timestamp in seconds hence the dividing by 1000\n const timestamp = Date.now()/1000\n //uploadPreset found in your settings in Cloudinary\n const uploadPreset = 'dvyocx63'\n //create a parameter string\n const paramsStr = 'timestamp' + timestamp + '&upload_preset=' + uploadPreset + 'EH2_iF_FqXGA3e_J1RKQFEOQwtc'\n \n const params = {\n 'api_key': '386979959351638',\n 'timestamp': timestamp,\n 'upload_preset': uploadPreset\n }\n\n //prepare request for superagent\n let uploadRequest = superagent.post(url)\n uploadRequest.attach('file', image)\n //this is just going to iterate through all our keys and params rather than doing them one by one, matching up keys and values from our json object above\n Object.keys(params).forEach((key) => {\n uploadRequest.field(key, params[key])\n })\n console.log(uploadRequest)\n //finally let's make the request\n uploadRequest.end((err, resp) => {\n if (err){\n alert(err, null)\n return\n }\n //superagent gives the response, this will help us identify what data we get from cloudinary if the upload was successful\n console.log('UPLOAD COMPLETE: ' + JSON.stringify(resp.body))\n const uploaded = resp.body\n //make a copy of the array, add new image to the copy, and reset the state\n let updatedImages = Object.assign([], this.state.images)\n updatedImages.push(uploaded)\n //setState is going to trigger a re-render or refresh of the component each time it's called\n this.setState({\n images: updatedImages\n })\n\n })\n window.location.replace(\"#/uploads\"); //redirects to this React component\n }", "title": "" }, { "docid": "c96a917b514afc46eb5ddfde9c03c2dc", "score": "0.55578667", "text": "upload() {\n // call action to upload file\\folder.\n this.props.upload();\n\n }", "title": "" }, { "docid": "f431e8aebcffa425728188349c4a44f0", "score": "0.5555679", "text": "function profile_uploadPhoto() {\n navigator.camera.getPicture (profile_cameraSuccess, profile_cameraFail, \n { quality: 50, \n\t allowEdit: true,\n sourceType: navigator.camera.PictureSourceType.CAMERA,\n destinationType: destinationType.FILE_URI,\n encodingType: navigator.camera.EncodingType.PNG,\n\t targetWidth: 600,\n\t targetHeight: 600,\n correctOrientation: true,\n saveToPhotoAlbum: true\n\t});\n\n // A callback function when snapping picture is success.\n function profile_cameraSuccess (imageData) {\n var image = document.getElementById ('profile_pic');\n\t\t\timage.src = imageData;\n\t\t$('#profile').addClass('loading');\n\t\t$('#profile .content').hide();\n\t\t\n\t\t//set upload options\n\t\tvar options = new FileUploadOptions();\n\t\t\toptions.fileKey=\"file\";\n\t\t\toptions.fileName=userIndex + \"_\" + imageData.substr(imageData.lastIndexOf('/')+1);\n\t\t\toptions.mimeType=\"image/jpeg\";\n\t\t\t\n\t\tvar params = new Object();\n\t\t\tparams.value1 = userIndex;\n\t \n\t\t\toptions.params = params;\n\t\t\toptions.chunkedMode = false;\n\t\t \n\t\tvar ft = new FileTransfer();\n\t\t\tft.upload(imageData, encodeURI (\"http://apemalaysia.net/foxspeed/api/profile_upload.php\"), profile_win, profile_fail, options);\n\t\t\t\n\t\tfunction profile_win(r) {\n\t\t\t$('#profile').removeClass('loading');\n\t\t\t$('#profile .content').show();\n\t\t\tnavigator.notification.alert('Profile picture is updated.', null, 'Successful');\n\t\t}\n\n\t\tfunction profile_fail(error) {\n\t\t\t$('#profile').removeClass('loading');\n\t\t\t$('#profile .content').show();\n\t\t\talert(\"An error has occurred: Code = \" + error.code);\n\t\t}\n }\n\n // A callback function when snapping picture is fail.\n function profile_cameraFail (message) {\n alert ('Error occured: ' + message);\n } \n}", "title": "" }, { "docid": "c8b0f7ceec625af41360ef4ccbfe5528", "score": "0.5544985", "text": "function uploadPhoto()\n{\n var myImg = document.getElementById('myImg');\n var options = new FileUploadOptions();\n options.fileKey = \"image\";\n options.fileName = \"image\" + Math.floor(Math.random()*100001) + \".jpg\";\n options.mimeType = \"image/jpeg\";\n\n var params = new Object();\n params.username = $('#username').val();\n params.pw = $('#pw').val();\n params.email = $('#email').val();\n options.params = params;\n \n if (myImg.src === null){\n var Data = {username: $('#username').val(), pw: $('#pw').val(), email: $('#email').val()};\n $.ajax({\n type: \"POST\",\n url: \"http://frigg.hiof.no/h13d23/Backend/createUser.php\",\n data: Data,\n success: onUploadSuccess,\n error: onUploadFail\n });\n return false;\n } else {\n var ft = new FileTransfer();\n ft.upload(myImg.src, encodeURI(\"http://frigg.hiof.no/h13d23/Backend/createUser.php\"), onUploadSuccess, onUploadFail, options);\n $('#notification').html(\"Uploading...\");\n }\n}", "title": "" }, { "docid": "d35ad88d9945e194cf611c645d3f763a", "score": "0.55416286", "text": "function uploadImage(formData) {\n $.ajax({\n url: '/report',\n method: 'POST',\n data: formData,\n processData: false,\n contentType: false,\n }).fail(function (status) {\n alert(status);\n });\n }", "title": "" }, { "docid": "d53bb936c8bb01d164fd5bce3b015610", "score": "0.5539972", "text": "function handleUploadResponse(data, textStatus, jqXHR) {\n // Custom code...\n if (appData.GeolocationFieldName != null && pictureData.Latitude != null && pictureData.Longitude != null) {\n setGeolocationFieldValue();\n }\n else {\n showLoadingAnimation(false);\n alert('Successfully saved image to SharePoint...');\n }\n}", "title": "" }, { "docid": "e126b3c0c547231f01f7e6d9898716a2", "score": "0.55294454", "text": "function uploadPhoto() {\n document.getElementById(\"image-upload-button\").click();\n}", "title": "" }, { "docid": "c82491cfd11fca8bdf4671fa93daa0c3", "score": "0.5528083", "text": "function uploadFile(mediaFile) {\n\t\n\t$('.sub-content').append('<img src=\"assets/ajax-loader.gif\" class=\"ajax-loader\" style=\"position:absolute;top:100px;left:45%;\" />');\n\t$('.confirmTasks').hide();\n\t\n\tu_user = user.id;\n\tu_task = app.currentTask;\n\tu_sub_task = app.currentSub;\n\n\tvar options = new FileUploadOptions();\n\toptions.fileKey=\"file\";\n\toptions.fileName=mediaFile.substr(mediaFile.lastIndexOf('/')+1);\n\toptions.mimeType=\"image/jpeg\";\n\toptions.chunkedMode = false;\n\n var ft = new FileTransfer(),\n path = mediaFile;\n \n if (navigator.geolocation) {\n\n\t\tnavigator.geolocation.getCurrentPosition(function(position) {\n\n\t\t\tapp.position = position;\n\t\t\tpic_answer = encodeURIComponent($('#picAnswer').val());\n\t\t\t//data.user_task_id = app.user_task_id;\n\t\t upload_url = app.serverUrl + \"?action=uploadPhoto&callback=123&user=\" + u_user + \"&task=\" + u_task + \"&sub_task=\" + u_sub_task + \"&lat=\" + position.coords.latitude + \"&lng=\" + position.coords.longitude + \"&answer=\" + pic_answer + \"&user_task_id=\" + app.user_task_id\n\t\t //console.log(path);\n\t\t //console.log(upload_url);\n\t\t \n\t\t try {\n\t\t\n\t\t\t ft.upload(path, upload_url,\n\t\t\t function(result) {\n\t\t\t \t//console.log(result.response);\n\t\t\t\t\t\tif (parseInt(result.response)) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$('.sub-content').find('.ajax-loader').remove();\n\t\t\t\t\t\t\t$('.confirmTasks').show();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (sub_tasks[sub_task].type == 'pic_fb') {\n\t\t\t\t\t\t\t\t//postToFacebook(parseInt(result.response), task.name, sub_tasks[app.currentSub].description, u_sub_task);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tvar params = {\n\t\t\t\t\t\t\t\t method: 'feed',\n\t\t\t\t\t\t\t\t name: 'SmartTasker',\n\t\t\t\t\t\t\t\t link: 'http://www.smarttasker.ee',\n\t\t\t\t\t\t\t\t picture: \"http://www.smarttasker.com/app/pictures/\" + parseInt(result.response) + \".jpg\",\n\t\t\t\t\t\t\t\t caption: task.name,\n\t\t\t\t\t\t\t\t message: 'Lahendasin just ülesande!',\n\t\t\t\t\t\t\t\t description: sub_tasks[app.currentSub].description\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t//console.log(params);\n\t\t\t\t\t\t\t FB.ui(params, function(obj) { \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t \t//console.log(obj);\n\t\t\t\t\t\t\t \t$('.sub-content').find('.confirmTask').removeClass('disabled');\n\t\t\t\t\t\t\t\t\t$('.sub-content').find('.confirmTask').unbind('click');\n\t\t\t\t\t\t\t\t\t$('.sub-content').find('.confirmTask').click(function() {\n\t\t\t\t\t\t\t\t\t\tif (app.isOneAnswer) {\n\t\t\t\t\t\t\t\t\t\t\t$.get(app.serverUrl + '?action=finishTask', data, function(result) {\n\t\t\t\t\t\t\t\t\t\t\t\tif (result.success) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(!user.bank || user.bank == 'null' || !user.mail || user.mail == 'null')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnavigator.notification.alert(translations[lang]['insert_account'], null, 'Teade!');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tuser.done = parseInt(user.done) + 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tapp.updateUser();\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\tapp.navigate('home.html', 'loadHome');\n\t\t\t\t\t\t\t\t\t\t\t\t\t$('.confirmTasks').show();\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\talert('Midagi läks valesti serveris, proovi uuesti.');\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//start auto tracking user :) muahaha..\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}, 'jsonp');\n\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t\tapp.finishedTask = u_sub_task;\n\t\t\t\t\t\t\t\t\t\tapp.navigate('task.html', 'startTask');\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t });\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (app.isOneAnswer) {\n\t\t\t\t\t\t\t\t\t$.get(app.serverUrl + '?action=finishTask', data, function(result) {\n\t\t\t\t\t\t\t\t\t\tif (result.success) {\n\t\t\t\t\t\t\t\t\t\t\tif(!user.bank || user.bank == 'null' || !user.mail || user.mail == 'null')\n\t\t\t\t\t\t\t\t\t\t\t\tnavigator.notification.alert(translations[lang]['insert_account'], null, 'Teade!');\n\t\t\t\t\t\t\t\t\t\t\t\tuser.done = parseInt(user.done) + 1;\n\t\t\t\t\t\t\t\t\t\t\t\tapp.updateUser();\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tapp.navigate('home.html', 'loadHome');\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\talert('Midagi läks valesti serveris, proovi uuesti.');\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//start auto tracking user :) muahaha..\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}, 'jsonp');\n\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\tapp.finishedTask = u_sub_task;\n\t\t\t\t\t\t\t\tapp.navigate('task.html', 'startTask');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$('.pic_fb').find('.ajax-loader').remove();\n\t\t\t\t\t\t\t$('.pic').find('.ajax-loader').remove();\n\t\t\t\t\t\t\t$('.confirmTasks').show();\n\t\t\n\t\t\t\t\t\t\tnavigator.notification.alert('Serveri poolne viga!', null, 'Teade!');\n\t\t\t\t\t\t\tapp.deliverError(result, '1118');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t },\n\t\t\t function(error) {\n\t\t\t \tnavigator.notification.alert('Error uploading file ' + path + ': ' + error.code, null, 'Uh oh!');\n\t\t\t //console.log('Error uploading file ' + path + ': ' + error.code);\n\t\t\t }, options\n\t\t\t\t);\n\t\t\t} catch(e) {\n\t\t\t\talert(e);\n\t\t\t} \n\t\t});\n\t} \n}", "title": "" }, { "docid": "302060bd7419daba8a2b2c788a66a482", "score": "0.55255246", "text": "confirmUpload() {\n if (this.state.selectedAlbum == undefined) {\n alert(\"Please select a target album before confirming the image upload.\");\n return;\n }\n\n // upload raw file\n var XMLHttp = new XMLHttpRequest();\n var url = \"/edit/upload\";\n XMLHttp.open(\"POST\", url, true);\n\n XMLHttp.onreadystatechange = function() {\n if(XMLHttp.readyState == 4 && XMLHttp.status == 200) {\n this.state.uploadConfirmed(Encoder.decodeKey(XMLHttp.responseText), this.state.selectedAlbum);\n }\n }.bind(this);\n\n var formData = new FormData();\n formData.append(\"file\", this.state.currentImage);\n formData.append(\"editHistory\", this.state.editHistory);\n formData.append(\"albumName\", this.state.selectedAlbum);\n XMLHttp.send(formData);\n }", "title": "" }, { "docid": "91820a93828b61a95c6135a6d68cbb38", "score": "0.5524031", "text": "uploadFile(filePath, file, callback) {\r\n var authorization = 'Bearer ' + this.token;\r\n\r\n var filename = helper.serialize({\r\n filename: filePath\r\n });\r\n\r\n let formData = new FormData();\r\n formData.append('file', file);\r\n\r\n var url = new URL('https://api.sirv.com/v2/files/upload');\r\n url.search = new URLSearchParams(filename);\r\n\r\n const options = {\r\n method: 'POST',\r\n headers: {\r\n authorization: authorization\r\n },\r\n body: file\r\n };\r\n\r\n this.sendRequest(url, options, callback);\r\n }", "title": "" }, { "docid": "9735cda7f908823db621c8a019d527e0", "score": "0.5523903", "text": "function createRating() {\n var jsonDataObj = {\n lat: $('#coordinatesSurfspotLat').val(),\n lng: $('#coordinatesSurfspotLng').val(),\n ratPoints: $('#rating_points').val(),\n ratTitle: $('#rating_title').val(),\n ratText: $('#rating_text').val(),\n imgPath: null\n };\n\n var imageFile = $('#img-upload').prop('files')[0];\n\n var formData = new FormData();\n formData.append(\"jsonDataObj\", JSON.stringify(jsonDataObj));\n formData.append(\"image\", imageFile);\n\n $.ajax({\n url: restUrls.postRating,\n data: formData,\n processData: false,\n contentType: false,\n type: 'POST',\n crossDomain: true,\n error: function (msg) {\n alert('transmition failed:' + msg);\n },\n success: function (data) {\n showRatings({lat: data.lat, lng: data.lng});\n openRating('readRatings');\n $('#readRatingsTab').addClass(\"active\");\n emptyForm();\n }\n });\n}", "title": "" }, { "docid": "cd53ed0c95b05a2bec9da9b4560032ac", "score": "0.5522801", "text": "function uploadFile() {\n\t\t$.ajax({\n\t\t\turl : \"/api/brailleapplication/uploadFile\",\n\t\t\ttype : \"POST\",\n\t\t\tdata : new FormData($(\"#upload-file-form\")[0]),\n\t\t\tenctype : 'multipart/form-data',\n\t\t\tprocessData : false,\n\t\t\tcontentType : false,\n\t\t\tcache : false,\n\t\t\tsuccess : function() {\n\t\t\t\tpreviewFile();\n\t\t\t},\n\t\t\terror : function() {\n\t\t\t}\n\t\t});\n\t} // function uploadFile ", "title": "" }, { "docid": "807813161714967e309b8b5a3a59708a", "score": "0.551663", "text": "function uploadDrive(p, callback) {\n\n\t\t\tvar data = {};\n\n\t\t\t// Test for DOM element\n\t\t\tif (p.data &&\n\t\t\t\t(typeof (HTMLInputElement) !== 'undefined' && p.data instanceof HTMLInputElement)\n\t\t\t) {\n\t\t\t\tp.data = {file: p.data};\n\t\t\t}\n\n\t\t\tif (!p.data.name && Object(Object(p.data.file).files).length && p.method === 'post') {\n\t\t\t\tp.data.name = p.data.file.files[0].name;\n\t\t\t}\n\n\t\t\tif (p.method === 'post') {\n\t\t\t\tp.data = {\n\t\t\t\t\ttitle: p.data.name,\n\t\t\t\t\tparents: [{id: p.data.parent || 'root'}],\n\t\t\t\t\tfile: p.data.file\n\t\t\t\t};\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\t// Make a reference\n\t\t\t\tdata = p.data;\n\t\t\t\tp.data = {};\n\n\t\t\t\t// Add the parts to change as required\n\t\t\t\tif (data.parent) {\n\t\t\t\t\tp.data.parents = [{id: p.data.parent || 'root'}];\n\t\t\t\t}\n\n\t\t\t\tif (data.file) {\n\t\t\t\t\tp.data.file = data.file;\n\t\t\t\t}\n\n\t\t\t\tif (data.name) {\n\t\t\t\t\tp.data.title = data.name;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Extract the file, if it exists from the data object\n\t\t\t// If the File is an INPUT element lets just concern ourselves with the NodeList\n\t\t\tvar file;\n\t\t\tif ('file' in p.data) {\n\t\t\t\tfile = p.data.file;\n\t\t\t\tdelete p.data.file;\n\n\t\t\t\tif (typeof (file) === 'object' && 'files' in file) {\n\t\t\t\t\t// Assign the NodeList\n\t\t\t\t\tfile = file.files;\n\t\t\t\t}\n\n\t\t\t\tif (!file || !file.length) {\n\t\t\t\t\tcallback({\n\t\t\t\t\t\terror: {\n\t\t\t\t\t\t\tcode: 'request_invalid',\n\t\t\t\t\t\t\tmessage: 'There were no files attached with this request to upload'\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set type p.data.mimeType = Object(file[0]).type || 'application/octet-stream';\n\n\t\t\t// Construct a multipart message\n\t\t\tvar parts = new Multipart();\n\t\t\tparts.append(JSON.stringify(p.data), 'application/json');\n\n\t\t\t// Read the file into a base64 string... yep a hassle, i know\n\t\t\t// FormData doesn't let us assign our own Multipart headers and HTTP Content-Type\n\t\t\t// Alas GoogleApi need these in a particular format\n\t\t\tif (file) {\n\t\t\t\tparts.append(file);\n\t\t\t}\n\n\t\t\tparts.onready(function(body, boundary) {\n\n\t\t\t\tp.headers['content-type'] = 'multipart/related; boundary=\"' + boundary + '\"';\n\t\t\t\tp.data = body;\n\n\t\t\t\tcallback('upload/drive/v2/files' + (data.id ? '/' + data.id : '') + '?uploadType=multipart');\n\t\t\t});\n\n\t\t}", "title": "" }, { "docid": "1bcc97bd36abc9c1feeead5608a69c07", "score": "0.55125004", "text": "function submitData(){\n var imageData = dataToUpload.file;\n $.ajax({\n method: \"post\",\n url: \"/hands\",\n dataType: 'json',\n data: { hand: {title: summary, message: content, lat: latitude, long: longitude, image: imageData }, authenticity_token: token },\n success: function(){\n console.log(\"data added successfully!\");\n\n }\n });\n if(currentViewNew==false){\n getHotDeeds();\n }\n else {\n getNewDeeds();\n }\n}", "title": "" }, { "docid": "750ed8a3d11921a561f3040aa0ae7492", "score": "0.55087334", "text": "function uploadNewRecipe(e) {\n e.preventDefault();\n console.log('Uploading new recipe')\n\n var title = document.getElementById(\"add-recipe-form\").elements[0].value;\n let imageurl = document.getElementById(\"add-recipe-form\").elements[1].value;\n let ingredients = document.getElementById(\"add-recipe-form\").elements[2].value;\n let instructions = document.getElementById(\"add-recipe-form\").elements[3].value;\n\n console.log(\"FORM DETAILS\", title, imageurl, ingredients, instructions)\n\n // Get user data from Cognito\n let data = {\n UserPoolId: config.cognito.userPoolId,\n ClientId: config.cognito.clientId\n };\n\n let CognitoUserPool = AmazonCognitoIdentity.CognitoUserPool;\n let userPool = new AmazonCognitoIdentity.CognitoUserPool(data);\n let cognitoUser = userPool.getCurrentUser();\n\n let username;\n if (cognitoUser) {\n username = cognitoUser.username\n } else {\n username = ''\n }\n\n console.log(\"cognito user\", cognitoUser)\n console.log(\"username\", username)\n\n\n // Uploading recipe via API /PUT method\n async function uploadRecipePUT() {\n e.preventDefault();\n console.log(\"Upload button clicked...\");\n\n // Connect to API Gateway\n let apigClient = apigClientFactory.newClient();\n console.log(\"apigClient\", apigClient);\n\n let params = {\n \"Content-Type\": \"multipart/form-data\"\n };\n let body = {\n \"username\": username,\n \"title\": title,\n \"imageurl\": imageurl,\n \"ingredients\": ingredients,\n \"instructions\": instructions,\n };\n let additionalParams = {};\n\n // API GATEWAY\n apigClient.uploadPut(params, body, additionalParams);\n\n // Clear form after submit\n $(\"#add-recipe-form\")[0].reset();\n }\n\n uploadRecipePUT()\n alert(\"Recipe added\")\n}", "title": "" }, { "docid": "c10cc8612fb0841d73993c133e5de5b9", "score": "0.55079734", "text": "onFileUploadSubmit(e){\n\t\te.preventDefault();\n\t\tconst self = this,\n\t\t\t files = document.getElementById('olyauth.file').files;\n\n\t\t//Users.User.uploadProfileImage({email:this.state.user.email,files})\n\t\t//\t.then(user=>{\n\t\t//\t\tl(this.state.user,user);\n\t\t//\t\tthis.setState({user});\n\t\t//\t\tthis.toggleProfileUpload();\n\t\t//\t});\n\t}", "title": "" }, { "docid": "4f3e12b808349cec38eb6bd43514de5b", "score": "0.5504265", "text": "function uploadimage(req, res) {\n var Model = mongoose.model(req.params.collection);\n Model.findOne({ _id: req.params.id }, function (err, mod) {\n if (err) {\n console.log(err);\n res.send(common_1.send_response(null, true, \"Could not find \" + req.params.collection));\n }\n else {\n var field = req.body.field;\n if (req.params.collection == 'Activity') {\n mod.images.push(req.file.filename);\n }\n else {\n mod[field] = req.file.filename;\n }\n mod.save(function (err, obj) {\n if (err) {\n console.log(err);\n res.send(common_1.send_response(null, true, \"Could not save file\"));\n }\n else {\n res.send(common_1.send_response(null, false, obj));\n }\n });\n }\n });\n}", "title": "" }, { "docid": "6314e452d909c13c2dd7a7b7269f6873", "score": "0.5503182", "text": "function uploadFile() {\n // get the file chosen by the file dialog control\n const selectedFileAll = document.getElementById(\"fileChooser\").files;\n const selectedFile = selectedFileAll[0];\n console.log(selectedFileAll);\n // store it in a FormData object\n const formData = new FormData();\n // name of field, the file itself, and its name\n formData.append(\"newImage\", selectedFile, selectedFile.name);\n\n // build a browser-style HTTP request data structure\n const xhr = new XMLHttpRequest();\n // it will be a POST request, the URL will this page's URL+\"/upload\"\n xhr.open(\"POST\", \"/upload\", true);\n\n // callback function executed when the HTTP response comes back\n xhr.onloadend = function (e) {\n // Get the server's response body\n console.log(\"DEBUG: \" + xhr.responseText);\n\n // now that the image is on the server, we can display it!\n let newImage = document.getElementById(\"serverImage\");\n newImage.src = \"../images/\" + selectedFile.name;\n\n // change class to change style and change content\n document.getElementById(\"but\").className = \"replaceImg\";\n document.getElementById(\"but\").textContent = \"Replace Image\";\n document.getElementsByClassName(\"imageWrapper\")[0].style.border = \"none\";\n\n console.log(\"upload image!\");\n };\n\n // actually send the request\n xhr.send(formData);\n}", "title": "" }, { "docid": "febf2c5800154d9d1efe6f0afb8913cc", "score": "0.55028474", "text": "function uploadImage(){\n var formData = new FormData();\n if (uploadedImage) {\n formData.append('imageData', JSON.stringify(uploadedImage));\n }\n if (document.getElementById('file_obj').files[0]) {\n formData.append('image', document.getElementById('file_obj').files[0], document.getElementById('file_obj').files[0].name);\n }\n\n var xmlRequest = new XMLHttpRequest();\n xmlRequest.open(\"POST\", \"uploadImage\", true);\n xmlRequest.onload = function (oEvent) {\n if (xmlRequest.status == 200) {\n console.log(xmlRequest.response);\n $('.upload-btn').attr('disabled', true); // Disabled upload button\n $('.success-message').show(); // Display success message\n } else {\n if (xmlRequest.status == 500) {\n console.log(xmlRequest);\n }else{\n console.log('Undefined error');\n }\n }\n };\n console.log(formData);\n xmlRequest.send(formData);\n return true;\n}", "title": "" }, { "docid": "27195f656e67416f98527f55f1e01f1f", "score": "0.5490175", "text": "function uploadImage(filename) {\n \n var req = request.post(config.webhookUrl, function (err, resp, body) {\n if(err) {\n console.log(err);\n }\n // console.log('sent image', fileName);\n });\n \n var form = req.form();\n form.append('file', fs.createReadStream(filename));\n form.append('content', config.username);\n }", "title": "" }, { "docid": "e000b7a1c6c9338d3259068b3b235c81", "score": "0.54825646", "text": "handleFileUpload(e) {\n this.setState({\n image: 'https://media.tenor.com/images/80cb16bb74ed9027ea1b25d077ce6d97/tenor.gif'\n });\n const uploadData = new FormData();\n // imageUrl => this name has to be the same as in the model since we pass\n // req.body to .create() method when creating a new thing in '/api/things/create' POST route\n uploadData.append(\"image\", e.target.files[0]);\n axios.post(`${process.env.REACT_APP_API_URL}/api/upload`, uploadData, { withCredentials: true })\n .then(response => {\n this.setState({ image: response.data.secure_url });\n })\n .catch(err => console.log(err));\n }", "title": "" }, { "docid": "3e0b6d7b0b06c495793f0c6ba84ef491", "score": "0.5480372", "text": "function upload_step2(fields, files,response){\n var filePath = files.image.path.slice(files.image.path.indexOf('memes'));\n var postTitleList = fields.title.split(\" \");\n var postTags = \"\";\n for (var i=0;i<postTitleList.length;i++){\n postTags = postTags + postTitleList[i];\n }\n var descList = fields.description.split(\",\");\n for (var i=0;i<descList.length;i++){\n postTags = postTags + descList[i];\n }\n filePath ='\\\\'+ filePath;\n insertPost.run([fields.title,filePath,fields.user, Date.now(),postTags], insertPostReady);\n function insertPostReady(err){ upload_step3(err,fields,response);}\n}", "title": "" }, { "docid": "5969f9ed9848929e8886afd8d330e0ab", "score": "0.5474183", "text": "function create() {\n var params = {};\n angular.copy(vm.project, params);\n params.logo = vm.logo;\n Upload.upload({\n url: '/api/projects',\n method: 'POST',\n data: params\n }).then(function (resp) {\n projectSavedCallback();\n toastr.success('Project created successfully');\n }, function (err) {\n ErrorHandler.error(err);\n });\n\n }", "title": "" }, { "docid": "51de3582b4218ae63ae0c4db6db3461d", "score": "0.54737675", "text": "_initRequest() {\n const xhr = this.xhr = new XMLHttpRequest();\n\n xhr.open( 'post', API_UPLOADCKIMAGE, true );\n xhr.responseType = 'json';\n }", "title": "" }, { "docid": "933831e7b28c5265b092e3bad3a44450", "score": "0.5471197", "text": "function uploader(req, res) {\n if (req.body) {\n // get the file name which will be used for S3 as well\n var targetFilename = req.body.file.path.split('/').slice(-1)[0];\n var targetKey = UPLOAD_DIR + req.user._id.toString() + '/' + targetFilename;\n\n var uploadData = {\n userId: req.user._id,\n key: targetKey,\n createdAt: Date.now(),\n modifiedAt: Date.now()\n };\n }\n\n var params = {\n localFile: req.body.file.path,\n s3Params: {\n Bucket: BUCKET,\n Key: uploadData.key,\n ACL: 'public-read-write'\n }\n };\n\n var uploader = client.uploadFile(params);\n\n uploader.on('error', function(err) {\n handleError(res, err);\n });\n\n uploader.on('end', function(data) {\n uploadData.uri = s3.getPublicUrlHttp(BUCKET, uploadData.key);\n\n // omit the picture field when picture is not provided\n // or maybe we can provide a default picture\n if (uploadData.uri === '') delete uploadData.uri;\n\n // delete the image stored on local file system\n fs.unlink(req.body.file.path, function() {\n Media.create(uploadData, function(err, doc) {\n if (err) return res.json(500, err);\n\n return res.json(201, {\n url: 'http://localhost:9000/api/uploads/' + doc._id,\n jsonrpc: '2.0',\n result: doc\n });\n });\n });\n });\n}", "title": "" } ]
72ded401ee95f63d0ac58426c182b0bb
Reads a local Javascript file and returns it in minified form.
[ { "docid": "32a1d0aaffffc9bac0e7058108eae349", "score": "0.740031", "text": "function minifiedJS(filename) {\n var ast = uglify.parser.parse(fs.readFileSync(filename, 'utf-8'));\n ast = uglify.uglify.ast_mangle(ast);\n ast = uglify.uglify.ast_squeeze(ast);\n return uglify.uglify.gen_code(ast);\n}", "title": "" } ]
[ { "docid": "af72bd6a52b83f41f3d00015a252aa03", "score": "0.7184459", "text": "function readjs(path) {\n return read(path) + '\\n';\n}", "title": "" }, { "docid": "455e5e7b85dea7c9440c476b54550ca7", "score": "0.666153", "text": "function js() {\n return src('./themes/uncompiled/js/**/*.js', { sourcemaps: true })\n .pipe(minifyJs())\n .pipe(concat('main.min.js'))\n .pipe(uglifyJs())\n .pipe(dest('./themes/compiled/js', { sourcemaps: true }))\n}", "title": "" }, { "docid": "d716454ba4d181e74be30d975516720c", "score": "0.6623326", "text": "function uglifyJs(input, output){\r\n fs.readFile(input, 'utf8', function (err, data) {\r\n if (err) {\r\n return console.log(\"Failed to read js \" + input);\r\n } else {\r\n // Uglify JavaScript\r\n let result = UglifyJS.minify(data);\r\n if(result.error){\r\n console.log(\"Failed to uglify JavaScript \" + result.error)\r\n } else {\r\n fs.writeFile(output, result.code, function(err) {\r\n if(err) {\r\n return console.log(\"Failed to write JavaScript \" + output);\r\n } else {\r\n return console.log(\"Javascript uglified \" + input);\r\n }\r\n });\r\n }\r\n\r\n }\r\n });\r\n}", "title": "" }, { "docid": "209886f6b335bce4fa9109ad8c9a2343", "score": "0.6570564", "text": "function minifyJs(filePath, data, encoding) {\n fs = require('fs');\n path = require('path');\n\n // temporarily store data into final variable\n var result = data;\n var js = \"\";\n\n // store each instance index of \"<script\" in scriptArr\n var scPos = 0; var scriptArr = [];\n while (scPos != -1) {\n var temp = data.indexOf(\"<script\", scPos+1);\n scPos = temp;\n if (scPos >= 0) scriptArr.push(scPos);\n }\n\n // reverse array to account for offset\n scriptArr = scriptArr.reverse();\n\n // for each <script> instance\n scriptArr.forEach(function (i) {\n // store end tag\n var endTag = data.indexOf(\">\", i)+1;\n // store entire <script> tag in scriptTag\n var scriptTag = data.substring(i, endTag);\n // store end </script> tag\n var endScript = data.indexOf(\"</script>\", endTag);\n\n // find src\n var srcStart = scriptTag.indexOf(\"src=\");\n // if src doesn't exist\n if (srcStart < 0) {\n // find and store js to var\n var jsRaw = data.substring(endTag, endScript);\n // remove comments\n //js = jsRaw.replace(/^\\/\\* \\*\\/$/gm,\"\");//.replace(/\\/\\/*?$/g,\"\");\n //js = js.replace(/;\\s+/g,\";\").replace(/}\\s+/g,\"}\").replace(/{\\s+/g,\"{\").replace(/:\\s+/g,\":\");\n js = jsRaw.replace(/;\\s+/g,\";\").replace(/}\\s+/g,\"}\").replace(/{\\s+/g,\"{\").replace(/:\\s+/g,\":\");\n\n } else {\n srcStart += 4;\n // look for single or double quotes respectively\n var srcSelector = \"\\\"\";\n if (scriptTag.substring(srcStart,srcStart+1) != srcSelector) srcSelector = \"'\";\n // store filePath\n var src = scriptTag.substring(srcStart+1, scriptTag.indexOf(srcSelector, srcStart+1));\n\n // minify js and store to var\n var jsRaw = fs.readFileSync(path.dirname(filePath)+\"/\"+src, encoding);\n // remove comments\n //js = jsRaw.replace(/\\/\\**?\\*\\//gm,\"\").replace(/\\/\\/*?$/g,\"\");\n //js = js.replace(/;\\s+/g,\";\").replace(/}\\s+/g,\"}\").replace(/{\\s+/g,\"{\").replace(/:\\s+/g,\":\")\n js = jsRaw.replace(/;\\s+/g,\";\").replace(/}\\s+/g,\"}\").replace(/{\\s+/g,\"{\").replace(/:\\s+/g,\":\")\n\n }\n result = result.substring(0, i) + \"<script>\" + js + result.substring(endScript);\n\n });\n\n return result;\n}", "title": "" }, { "docid": "574fefc4df17007922534b656f95a153", "score": "0.6517694", "text": "function readJS(path, response, request){\n\treadFromFS(path, false, \"application/javascript\", response, request);\n}", "title": "" }, { "docid": "7d711ba5af3dc5c32ef8a4fb64fac681", "score": "0.6432231", "text": "function js() {\n return gulp\n .src(\"./src/js/*.js\")\n .pipe(sourcemaps.init())\n .pipe(concat(\"main.js\"))\n .pipe(rename({ suffix: \".min\" }))\n .pipe(uglify())\n .pipe(sourcemaps.write())\n .pipe(gulp.dest(\"./dist/js/\"))\n}", "title": "" }, { "docid": "5945e1a67a673827e4b0ad8214951fd4", "score": "0.6404995", "text": "function javascript() {\n return gulp.src(PATHS.entries)\n .pipe(named())\n .pipe($.sourcemaps.init())\n .pipe(webpackStream(webpackConfig, webpack))\n .pipe($.if(PRODUCTION, $.uglify().on('error', e => { console.log(e); })))\n .pipe($.if(!PRODUCTION, $.sourcemaps.write()))\n .pipe(gulp.dest(PATHS.dist + '/assets/js'));\n}", "title": "" }, { "docid": "bff2b044056705e67057382406e3655f", "score": "0.6382506", "text": "function js() {\n return src('mb.debug.js', { sourcemaps: false })\n .pipe(concat('mb.js'))\n .pipe(terser({ mangle: { properties:{regex: /_.*/ }} }))\n .pipe(dest('dist/', { sourcemaps: false }))\n}", "title": "" }, { "docid": "49c850e1e43b531aa000377809db4185", "score": "0.6379322", "text": "function javascript() {\n return gulp\n .src(PATHS.entries)\n .pipe(named())\n .pipe($.sourcemaps.init())\n .pipe(webpackStream(webpackConfig, webpack2))\n .pipe(\n $.if(\n PRODUCTION,\n $.uglify().on('error', e => {\n console.log(e);\n })\n )\n )\n .pipe($.if(!PRODUCTION, $.sourcemaps.write()))\n .pipe(gulp.dest(PATHS.dist + '/assets/js'));\n}", "title": "" }, { "docid": "5e07d720147af6d23f7849289306e923", "score": "0.6354595", "text": "function build_js() {\n return concat_files(js_files, \"js/main.min.js\");\n}", "title": "" }, { "docid": "6fa5195c74569500c1afa68deef2496a", "score": "0.62683934", "text": "function loadJS(filePath) {\n console.log(\"Found \"+filePath);\n var contents = fs.readFileSync(filePath, {encoding:\"utf8\"});\n return eval(contents);\n}", "title": "" }, { "docid": "aa383a2d741441a00c4e16441a9ef41f", "score": "0.6246524", "text": "function javascript() {\n return gulp.src(PATHS.entries.js)\n .pipe($.sourcemaps.init())\n .pipe(webpack(require('./webpack.config.js')))\n .pipe($.concat('app.js', {\n newLine:'\\n;'\n }))\n .pipe($.if(PRODUCTION, $.uglify()\n .on('error', e => { console.log(e); })\n ))\n .pipe($.if(!PRODUCTION, $.sourcemaps.write()))\n .pipe(gulp.dest(PATHS.dist + '/js'));\n}", "title": "" }, { "docid": "4ae11bfa44754bc450b5e109d7744550", "score": "0.6204899", "text": "function minifyJS() {\n\t// Using Google Closure Compiler\n\tvar mainMin = compressor.minify({\n\t\tcompressor: 'gcc',\n\t\tinput: 'js/main.js',\n\t\toutput: 'js/main-min.js',\n\t\tcallback: function (err, min) {}\n\t})\n\tvar dbhelperMin = compressor.minify({\n\t\tcompressor: 'gcc',\n\t\tinput: 'js/dbhelper.js',\n\t\toutput: 'js/dbhelper-min.js',\n\t\tcallback: function (err, min) {}\n\t})\n\n\tvar restInfoMin = compressor.minify({\n\t\tcompressor: 'gcc',\n\t\tinput: 'js/restaurant_info.js',\n\t\toutput: 'js/restaurant_info-min.js',\n\t\tcallback: function (err, min) {}\n\t})\n\n\tvar swMin = compressor.minify({\n\t\tcompressor: 'gcc',\n\t\tinput: 'sw.js',\n\t\toutput: 'sw-min.js',\n\t\tcallback: function (err, min) {}\n\t})\n\n\treturn mainMin, dbhelperMin, restInfoMin, swMin\n}", "title": "" }, { "docid": "1d703d17275338dac673913ed453a7c7", "score": "0.6188815", "text": "function javascript () {\n return gulp.src(PATHS.javascript)\n .pipe($.sourcemaps.init())\n .pipe($.babel({ignore: ['what-input.js']}))\n .pipe($.concat('app.js'))\n .pipe($.if(PRODUCTION, $.uglify()\n .on('error', e => { console.log(e); }) // eslint-disable-line no-console\n ))\n .pipe($.if(!PRODUCTION, $.sourcemaps.write()))\n .pipe(gulp.dest(PATHS.dist + '/assets/js'));\n}", "title": "" }, { "docid": "c5eb66ef6771fe9720178323c81e188d", "score": "0.6122145", "text": "function jsTask(){\n return src([\n files.jsPath ,'!' + './js/jquery-2.1.4.min.js', // to exclude any specific files\n files.jsPath ,'!' + './js/custom.js',\n ])\n .pipe(concat('all.js'))\n .pipe(uglify())\n .pipe(dest('minify/js')\n );\n}", "title": "" }, { "docid": "f947777b689bbca4bd94bc8202458899", "score": "0.611171", "text": "function cssToJsFn(filePath, file) {\n var STYLE_HEADER = 'css = \\'',\n STYLE_FOOTER = '\\';';\n\n var css = new CleanCss({})\n .minify(file.contents.toString())\n .styles;\n\n file.contents = new Buffer(STYLE_HEADER + escapeStr(css) + STYLE_FOOTER);\n\n return file.contents.toString('utf8');\n}", "title": "" }, { "docid": "9ec1f5049f6aa0e0985c34b4ce5052c9", "score": "0.60867655", "text": "function jsTask(){\n return src([\n files.jsPath\n //,'!' + 'includes/js/jquery.min.js', // to exclude any specific files\n ])\n .pipe(concat('main.js'))\n .pipe(uglify())\n .pipe(dest('dist')\n );\n}", "title": "" }, { "docid": "05e2cbf7504eb676ea2f96ef4b8bd8ed", "score": "0.6085274", "text": "function js() {\n return gulp\n .src(paths.src + '/js/main.js')\n .pipe(\n terser({ keep_fnames: false, mangle: true, toplevel: true })\n .on('error', (error) => console.log(error.stack))\n )\n .pipe(gulp.dest(paths.dist + '/js'));\n}", "title": "" }, { "docid": "2813e8e15f99fcb5ced1ad89333acf00", "score": "0.6065846", "text": "function readJsLine(file, lineno)\n{\n var src = fs.readFileSync(file, 'utf8')\n return src.split('\\n')[lineno - 1]\n}", "title": "" }, { "docid": "e6648c82460a2dbf6dffdda67a2d37eb", "score": "0.60611457", "text": "function minifyJS() {\n return src(config.js.src)\n //Concat all files\n .pipe(gulpif(config.js.concat !== false, concat(config.js.concat+'.js')))\n // Output\n .pipe(dest(config.js.dest))\n // Minify the file\n .pipe(uglify())\n //Add version hash\n .pipe(rev())\n // Rename the file\n .pipe(rename(function (path) {\n path.extname = \".min.js\";\n }))\n // Output\n .pipe(dest(config.js.dest))\n //Write manifest\n .pipe(rev.manifest('build-manifest.json', {\n merge: true\n }))\n .pipe(dest(config.js.dest+'/manifest'));\n}", "title": "" }, { "docid": "5f3a3521f85bd6adae3d200d7e4b0401", "score": "0.6057298", "text": "function js() {\n\treturn browserify({entries: paths.scripts.main})\n\t\t.bundle()\n\t\t.pipe(source(\"main.js\"))\n\t\t.pipe(rename({ suffix: '.min' }))\n\t\t.pipe(dest(paths.scripts.dist))\n\t\t// .pipe(notify({ message: \"Js compiled!!!\", onLast: true }))\n\t\t.pipe(browserSync.stream());\n}", "title": "" }, { "docid": "8fcf73618c9c66798edcb0f24a87acce", "score": "0.6056972", "text": "function js_task() {\n\treturn src([\n\t\tfiles.js\n\t], {\n allowEmpty: true,\n })\n\t\t.pipe(\n\t\t\tbabel({\n\t\t\t\tpresets: ['@babel/preset-env'],\n\t\t\t})\n\t\t)\n\t\t.pipe(concat('script.min.js'))\n\t\t.pipe(uglify())\n\t\t.pipe(dest('assets/js'));\n}", "title": "" }, { "docid": "890c37f52d77b8be45b0d5696f61392d", "score": "0.6029755", "text": "function ml_javascript() {\n return gulp.src(PATHS.mlentries)\n .pipe(gulp.dest(PATHS.dist + '/js'));\n}", "title": "" }, { "docid": "e7838ca3ad9b24d3f071417c5656c89b", "score": "0.6026339", "text": "function minifyJs() {\n return gulp\n .src(\"src/js/*.js\")\n .pipe(uglify())\n .pipe(gulp.dest(\"dist/js\"));\n}", "title": "" }, { "docid": "0eb1c9d80175c56600a2f496376e2643", "score": "0.6002512", "text": "function processJavascript () {\n\n var sourcemapPath = SCRIPTS_PATH + '/' + OUTPUT_FILE + '.map';\n\n // handles js files so that they work on the web\n var browserified = browserify({\n\t\tpaths: [ path.join(__dirname, SOURCE_PATH + '/js') ],\n entries: [ENTRY_FILE],\n debug: true\n });\n\t \n\t// converts ES6 to vanilla javascript. Note that preset is an NPM dependency\n\tbrowserified.transform(babelify, { \"presets\": [\"es2015\"] });\n browserified.transform(hoganify, { live:false, ext:'.html,.mustache' });\n\n\t// bundles all the \"require\" dependencies together into one container\n\tvar bundle = browserified.bundle().on('error', function(error){\n\t\tgutil.log(gutil.colors.red('[Build Error]', error.message));\n\t\tthis.emit('end');\n });\n\n\t// now that stream is machine readable javascript, finish the rest of the gulp build tasks\n\treturn bundle\n\t .pipe( exorcist(sourcemapPath) )\n\t .pipe( source(OUTPUT_FILE) )\n\t .pipe( buffer() )\n\t //.pipe( uglify() )\n\t .pipe( gulp.dest(SCRIPTS_PATH) )\n}", "title": "" }, { "docid": "b5beba85626df9d681b2460651a4a90c", "score": "0.5986693", "text": "function bl_get_js() {\n\n\tvar html = '',\n\t\ti,\n\t\tfilename,\n\t\tviewSource = '',\n\t\tjs = document.getElementsByTagName('script');\n\n\tif (js.length > 0) {\n\t\t// open with view-source:\n\t\tif (navigator.appName === 'Netscape') {\n\t\t\tviewSource = 'view-source:';\n\t\t}\n\t\tfor (i = 0; i < js.length; i += 1) {\n\t\t\tif (js[i].src.length) {\n\t\t\t\tfilename = js[i].src.substring(js[i].src.lastIndexOf('/') + 1);\n\t\t\t\thtml = html + '<li><a href=\"' + viewSource + js[i].src + '\" target=\"_blank\">' + filename + '</a></li>';\n\t\t\t}\n\t\t}\n\t\t$bl('bl_js').innerHTML = '<h3>Javascript Files</h3><ul>' + html + '</ul>';\n\t}\n}", "title": "" }, { "docid": "96115fd2a49d48ab9b9780712e37ac1d", "score": "0.59776235", "text": "function minifyJs(str, filename, asset, next) {\n var jsp = uglify.parser,\n pro = uglify.uglify,\n ast = jsp.parse(str);\n\n ast = pro.ast_mangle(ast);\n ast = pro.ast_squeeze(ast);\n //next(null, pro.gen_code(ast));\n next(null, str);\n}", "title": "" }, { "docid": "88bfff89faa3459ccc3db9059cb56487", "score": "0.5972068", "text": "function minJs() {\n\treturn browserify({entries: paths.scripts.main})\n\t\t.transform(babelify)\n\t\t.bundle()\n\t\t.pipe(source(\"main.js\"))\n\t\t.pipe(buffer())\n\t\t.pipe(uglify())\n\t\t.pipe(rename({ suffix: '.min' }))\n\t\t.pipe(dest(paths.scripts.dist))\n\t\t// .pipe(notify({ message: \"Js compiled!!!\", onLast: true }))\n\t\t.pipe(browserSync.stream());\n}", "title": "" }, { "docid": "a4101ea969975bc1178895e265ac08cc", "score": "0.5964643", "text": "function compileJS( watch ) {\n\n\t// Read from file and minifying\n\tvar mainJS = fs.readFileSync( config.SRC_FOLDER + \"/js/main.js\", \"utf8\");\n\n\tvar questionData = [];\n\n\tvar bundler = watchify(\n\t\tbrowserify( config.SRC_FOLDER + '/js/main.js', { debug: true } ).transform( babel.configure({ presets: ['es2015-ie'], plugins: ['transform-html-import-to-string'] } ))\n\t)\n\t//.transform('uglifyify', { global: true })\n\n\t\n\tfunction rebundle() {\n\t\tbundler.bundle()\n\t\t\t.on('error', function(err) { console.error(err); this.emit('end'); })\n\t\t\t.pipe(source('main.js'))\n\t\t\t.pipe(replace('[[QUESTIONDATA]]', JSON.stringify(questions_Object) ))\n\t\t\t.pipe(buffer())\n\t\t\t.pipe(sourcemaps.init({ loadMaps: true }))\n\t\t\t.pipe(sourcemaps.write('./'))\n\t\t\t.pipe(gulp.dest( config.BUILD_FOLDER + '/js/' ))\n\t}\n\n\trebundle();\n\n\n\t//\n\t// For watch\n\t// --------------------------------------------------------------------------\n\tif ( watch ) {\n\t\tbundler.on('update', function() {\n\t\t\tlog('Rebundling JavaScript')\n\t\t\trebundle()\n\t\t})\n\t}\n\n}", "title": "" }, { "docid": "c37d7e93599c3a23b560bd726ada489f", "score": "0.59535074", "text": "function jsLib() {\n return gulp\n .src(paths.src + '/js/*.min.js')\n .pipe(gulp.dest(paths.dist + '/js'));\n}", "title": "" }, { "docid": "da00e7b55737d194ae2c46e20c756bd1", "score": "0.5951514", "text": "function jsTask(){\n return src(files.jsPath)\n .pipe(concat('main.js'))\n .pipe(gulpif(env === 'production', uglify())) //uglify on prod only\n .pipe(dest(outputDir + 'js'));\n}", "title": "" }, { "docid": "3e0a603edf590d02ba014371739897a0", "score": "0.5921238", "text": "function js ()\n{\n return gulp.src( config.jsSrc )\n .pipe( gulpIf( flag( env.JS_MAPS ), sourcemaps.init() ) )\n .pipe(plumber())\n .pipe(jshint('.jshintrc'))\n .pipe(jshint.reporter('jshint-stylish'))\n .pipe(babel({\n presets: ['es2015']\n }));\n}", "title": "" }, { "docid": "03a1d059b8f7f49252a8e3d1314838f0", "score": "0.5917164", "text": "function js() {\n return gulp.src([\n paths.bower + '/jquery/dist/jquery.js',\n paths.bower + '/jquery.scrollTo/jquery.scrollTo.js',\n paths.scripts.src\n ])\n .pipe(concat('scripts.js'))\n .pipe(uglify())\n .pipe(rename({\n suffix: '.min'\n }))\n .pipe(gulp.dest(paths.scripts.dest));\n}", "title": "" }, { "docid": "d3a5c878f5e1d4ef5f3ab4e56d4c503b", "score": "0.59149665", "text": "function inline(filePath, data, encoding) {\n // give result a temporary value\n var result = data;\n\n result = minifyJs(filePath, result, encoding);\n result = minifyCss(filePath, result, encoding);\n\n return result;\n}", "title": "" }, { "docid": "6f7134c50b30215901752c0c2e48b773", "score": "0.58910775", "text": "function loadJS(file) {\n var jsElm = document.createElement(\"script\");\n jsElm.type = \"application/javascript\";\n jsElm.src = file;\n document.body.appendChild(jsElm);\n log('Loding js #'+file);\n}", "title": "" }, { "docid": "2e8519341edd5d46469541171aa23b00", "score": "0.58254117", "text": "function minifyJsTask(){\n return src([paths.assets+'js/jquery.js', paths.assets+'js/*.js'])\n .pipe(sourcemaps.init())\n .pipe(concat('script.min.js'))\n .pipe(uglify())\n .pipe(sourcemaps.write('.'))\n .pipe(dest(paths.assets+'js/'));\n}", "title": "" }, { "docid": "09d72a270a0b492c092801380f62ad17", "score": "0.5819582", "text": "function minifyMainJs() {\n\treturn gulp\n\t\t.src(\"wp-content/themes/thecodelog/js/main.js\")\n\t\t.pipe(sourcemaps.init())\n\t\t.pipe(\n\t\t\tbabel({\n\t\t\t\tpresets: [\"@babel/preset-env\"],\n\t\t\t}).on(\"error\", function (e) {\n\t\t\t\tconsole.log(e.message);\n\t\t\t\treturn this.end();\n\t\t\t})\n\t\t)\n\t\t.pipe(\n\t\t\tuglify().on(\"error\", function (e) {\n\t\t\t\tconsole.log(e.message);\n\t\t\t\treturn this.end();\n\t\t\t})\n\t\t)\n\t\t.pipe(rename(\"main.min.js\"))\n\t\t.pipe(sourcemaps.write(\"./\"))\n\t\t.pipe(gulp.dest(\"wp-content/themes/thecodelog/dist/js/\"));\n}", "title": "" }, { "docid": "87d5d62caf81f45fac6bf24f9155735b", "score": "0.58195096", "text": "function scripts() {\n return gulp.src('js/*.js')\n .pipe(gulpif(!argv.production, sourcemaps.init()))\n .pipe(concat('mrrr.js'))\n .pipe(uglify())\n .pipe(gulpif(!argv.production, sourcemaps.write()))\n .pipe(gulp.dest('dist/js'));\n}", "title": "" }, { "docid": "3059d38b0a1df1b24acf9bcc4e8a67de", "score": "0.58082324", "text": "function copyJs () {\n return gulp.src([paths.src.js])\n .pipe(sourcemaps.init({ loadMaps: true, largeFile: true }))\n .pipe(uglify())\n .pipe(sourcemaps.write('.'))\n .pipe(gulp.dest([paths.dist.js]))\n}", "title": "" }, { "docid": "3ce20e7e45e85ae2cde0cc0a9ea067b9", "score": "0.57735455", "text": "function jsTask(){\n console.log('\\n Concatenating and compressing scripts... \\n');\n return src([\n path.jsInput\n //, '!' + 'assets/js/1-setup/*.min.js', // Exclude a file\n ])\n .pipe(concat('main.js'))\n .pipe(uglify())\n .pipe(dest(path.jsOutput)\n );\n}", "title": "" }, { "docid": "6321425d3c53db9ee799d7f9a9b940ea", "score": "0.5744261", "text": "function readFile(name){\n\treturn 'exports.plus10 = (x, y) => x + y + 10';\t// pretend to read the file\n}", "title": "" }, { "docid": "42437a2ba9bff1d7d3a62dec18108f8d", "score": "0.57216364", "text": "function js() {\n return gulp\n .src([\"./js/**/*.js\"])\n .pipe(sourcemaps.init())\n .pipe(\n babel({\n presets: [[\"@babel/env\", { modules: false }]]\n })\n )\n .pipe(concat(\"app.min.js\"))\n .pipe(minifyJS())\n .pipe(sourcemaps.write(\"../maps\"))\n .pipe(gulp.dest(\"./dist/js\"));\n}", "title": "" }, { "docid": "09cced09abe8722f844faf073b531ff0", "score": "0.56948304", "text": "function js() {\n const bundles = [];\n\n glob.sync('src/js/*.js').forEach(filePath => {\n const outPath = filePath.replace('src/', dest);\n\n bundles.push(\n rollup\n .rollup({\n input: filePath,\n plugins: [\n rollupPlugins.json(),\n rollupPlugins.cleanup(),\n rollupPlugins.replace({\n 'process.env.NODE_ENV': JSON.stringify('production')\n }),\n rollupPlugins.buble(),\n rollupPlugins.commonjs(),\n rollupPlugins.nodeResolve(),\n rollupPlugins.terser.terser({\n compress: {\n drop_console: isProduction\n }\n })\n ]\n })\n .then(bundle =>\n bundle.write({\n file: outPath,\n format: 'iife',\n name: path.basename(filePath, '.js').replace(/\\W/g, ''),\n sourcemap: true\n })\n )\n .then(async () => {\n const stats = await fs.stat(outPath);\n log(\n colors.magenta('Minified and compiled JS to'),\n colors.bold(outPath),\n `(${helpers.formatBytes(stats.size, 2)})`\n );\n })\n .catch(async error => {\n await fs.mkdirp(path.dirname(outPath));\n fs.writeFile(outPath, `console.error(\\`${error.id}\\n${error}\\`)`);\n errorMessage({ title: 'JS Bundling Error', error });\n })\n );\n }, this);\n\n return Promise.all(bundles);\n}", "title": "" }, { "docid": "41426aa83f2f5705ae621bc1db4718b8", "score": "0.5667493", "text": "function clientsideJavaScriptFile() {\n\tvar serverOnlyFiles = path.join(process.cwd(), 'src', 'server')\n\t\t, settings = {\n\t\t\turl: '/javascripts/app.js'\n\t\t\t, mainFile: path.join(process.cwd(), 'src', 'app.js')\n\t\t\t, exclude: getDirectoryFiles(serverOnlyFiles, ['.js'])\n\t\t};\n\n\tif(_.has(config, 'clientsideJavaScriptOptimizations')) {\n\t\t_.extend(settings, config.clientsideJavaScriptOptimizations);\n\t}\n\n\treturn settings;\n}", "title": "" }, { "docid": "c1c4796f5bc07674e59ab41082a6f7be", "score": "0.565846", "text": "function loadjs(filename) {\n let script = document.createElement('script');\n script.setAttribute('type','text/javascript');\n script.setAttribute('src', filename);\n document.head.appendChild(script);\n}", "title": "" }, { "docid": "0ca26d14366be33fcf682780f01f9103", "score": "0.56312317", "text": "function jsTask() {\n return src(path.js.site)\n .pipe(cond(!PROD, sourcemaps.init({ loadMaps: true })))\n .pipe(babel())\n .pipe(cond(PROD, uglify()))\n .pipe(cond(PROD, concat(\"main.min.js\"), concat(\"main.js\")))\n .pipe(cond(!PROD, sourcemaps.write(\".\")))\n .pipe(dest(path.js.dest));\n}", "title": "" }, { "docid": "2e3b1a3a83245485c6a2574723a51cee", "score": "0.5624778", "text": "function JsUtil_include( fname )\n{\n var ret = \"true\";\n if( JsUtil.prototype.isMozillaShell || JsUtil.prototype.isKJS )\n {\n load( fname );\n }\n\telse if ( JsUtil.prototype.isMyna )\n\t{\n\t\tMyna.include( fname );\n\t}\n else if( JsUtil.prototype.isWSH )\n {\n var fso = new ActiveXObject( \"Scripting.FileSystemObject\" );\n var file = fso.OpenTextFile( fname, 1 );\n ret = file.ReadAll();\n file.Close();\n }\n return ret;\n}", "title": "" }, { "docid": "77eeab6d2bfb5a86d2baac4e50a3a6b8", "score": "0.56240386", "text": "function devJs() {\n return bundler.bundle()\n // log errors if they happen\n .on('error', gutil.log.bind(gutil, 'Browserify Error'))\n // source maps\n .pipe(source('bundle.js'))\n .pipe(buffer())\n .pipe(sourcemaps.init({loadMaps: true}))\n .pipe(sourcemaps.write('./'))\n // output\n .pipe(gulp.dest('./dist'))\n // reload\n .pipe(connect.reload())\n}", "title": "" }, { "docid": "a7ac08f816ddd47e9d4644433010941d", "score": "0.5618944", "text": "function scripts() {\n return gulp.src(jsFiles)\n //Merge files into one\n .pipe(concat('script.js'))\n //JS minification\n .pipe(uglify({\n toplevel: true\n }))\n //Output folder for scripts\n .pipe(gulp.dest(distPath +'js'))\n .pipe(browserSync.stream());\n}", "title": "" }, { "docid": "56c26ea10e9ecd86223f794a8c7b3040", "score": "0.56165284", "text": "function minifyjs() {\n return pipeline(\n gulp.src([path.build+'/daisy-v'+pkg.version+'.js']),\n uglify(),\n rename({\n suffix: '.min',\n extname: '.js'\n }),\n gulp.dest([path.build])\n );\n}", "title": "" }, { "docid": "ef3d6f6c19d4d2131a16d1387b951fa7", "score": "0.56011033", "text": "function minifyJS() {\r\n return gulp.src('dist/*.js')\r\n .pipe(terser())\r\n .pipe(gulp.dest('dist'));\r\n}", "title": "" }, { "docid": "25a4cfd6c3e3deea57e5a2318c2a7442", "score": "0.55813235", "text": "function jsDev() {\n return gulp\n .src(scripts)\n .pipe(sourcemaps.init())\n .pipe(concat(pkg.name + '.js'))\n .pipe(sourcemaps.write())\n .pipe(gulp.dest(paths.dist));\n}", "title": "" }, { "docid": "80284942b0a97db63c92aad28ffd4a51", "score": "0.55584776", "text": "include(file){\n return eval(fs.readFileSync(file) + '');\n }", "title": "" }, { "docid": "14bb32d7c61c460916a922abb8e86492", "score": "0.55488825", "text": "function require(jsFile) {\n let el = document.createElement('script');\n el.setAttribute('src', jsFile);\n document.head.append(el);\n return el;\n}", "title": "" }, { "docid": "d6da594f70b57efa1e30a3ac28b701f3", "score": "0.553186", "text": "function vendorJS() {\n return gulp\n .src(vendorJs)\n .pipe(concat('vendor.min.js'))\n .pipe(gulp.dest(paths.scripts.dest));\n}", "title": "" }, { "docid": "932add7fa2761bb04a6eeb33bfec60c2", "score": "0.5523588", "text": "function js() {\n return gulp.src('./src/js/*.js')\n .pipe(gulp.dest('./src/public/js'))\n .pipe(browserSync.stream())\n}", "title": "" }, { "docid": "9e2f142edf2108777982d6084dde428b", "score": "0.54943925", "text": "function gulpJs() {\n return gulp\n .src([\"src/js/**/*\"])\n .pipe(gulpIf(\"*.js\", uglify({ mangle: false })))\n .pipe(gulp.dest([\"dist/js\"]));\n}", "title": "" }, { "docid": "f45dbb4871843b66c65e157eac698195", "score": "0.5487862", "text": "function buildJs (config) {\n var bundler = browserify({\n // Required watchify args\n cache: {},\n packageCache: {},\n fullPaths: watch, // only need fullPaths if we're watching\n\n // Specify the entry point of your app\n entries: config.entries,\n\n // Enable source maps!\n debug: true\n })\n\n if (!watch) {\n bundler.plugin(collapse)\n }\n\n function bundle () {\n console.log('bundling...')\n var jsStream = bundler\n .bundle()\n .on('error', function (error) {\n console.error('Error building javascript!')\n console.error(error.message)\n this.emit('end')\n })\n .pipe(source(config.outputName))\n .pipe(buffer())\n .pipe($.plumber())\n .pipe($.sourcemaps.init({loadMaps: true}))\n .pipe($.if(minify, $.uglify()))\n .pipe($.sourcemaps.write('./'))\n .pipe(gulp.dest('./public/scripts'))\n .on('finish', function () {\n console.log('done')\n if (watch) {\n browserSync.reload('./public/scripts/' + config.outputName)\n }\n })\n\n return jsStream\n }\n\n if (watch) {\n console.log('Starting watchify...')\n bundler = watchify(bundler)\n bundler.on('update', bundle)\n }\n\n return bundle()\n }", "title": "" }, { "docid": "273a033eefb5c8f6aa441cd0d3881a83", "score": "0.54726535", "text": "async function readJSONFile(filename){\n // load file\n let raw = await _fs.readFile(filename, 'utf8');\n\n // strip single line js comments\n raw = raw.replace(/^\\s*\\/\\/.*$/gm, '');\n\n // parse text\n return JSON.parse(raw);\n}", "title": "" }, { "docid": "a67da58452c3daf0b0a9220d55b7ae2e", "score": "0.5448689", "text": "function jsProd() {\n return gulp\n .src(scripts)\n .pipe(concat(pkg.name + '.js'))\n .pipe(uglify())\n .pipe(gulp.dest(paths.dist));\n}", "title": "" }, { "docid": "2421a34d1648642b31830885da4e2b36", "score": "0.54485935", "text": "function copyMinJS() {\n return gulp\n .src([path.build+'/daisy-v'+pkg.version+'.min.js'], {allowEmpty: true})\n .pipe(rename({\n basename: 'daisy.min',\n extname: '.js'\n }))\n .pipe(gulp.dest('./'));\n}", "title": "" }, { "docid": "cbd11fb8cf1ab9a99d23f3ca076915b0", "score": "0.54437643", "text": "function get_content_from_js(file) {\n if (typeof Mp3LameEncoder === \"undefined\") {\n throw(\"Mp3 encoder could not loaded\");\n }\n\n var callback = function (data) {\n var encoder = new Mp3LameEncoder(44100, 24);\n\n encoder.encode([data, data]);\n\n var signals = encoder.finish();\n\n var reader = new FileReader();\n\n reader.addEventListener('loadend', function (e) {\n console.log(e);\n\n var text = e.srcElement.result;\n\n console.log(text);\n });\n\n reader.readAsText(signals);\n\n draw_graph(\"js-graph\", signals);\n };\n\n get_content_as_buffer(file, callback);\n }", "title": "" }, { "docid": "7a06601bcc6638245ca0aeaec4bff8eb", "score": "0.54368466", "text": "function loadjsfile(filename, onload) {\n\n var fileref = document.createElement('script');\n fileref.setAttribute(\"type\", \"text/javascript\");\n if (typeof onload === 'function') {\n fileref.onload = onload;\n }\n fileref.setAttribute(\"src\", filename);\n\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\n }", "title": "" }, { "docid": "7955c2cbf3ccb552dd14aa91b046e193", "score": "0.5429188", "text": "function require(file) {\n var exports = {}, reader = new FileReader(file);\n try {\n eval('' + FileUtils.readFully(reader));\n } finally {\n reader.close();\n }\n return exports;\n}", "title": "" }, { "docid": "bb634f4e36d3a1b07364b0b258098b36", "score": "0.5424863", "text": "function readFileUTF8(a){return __webpack_require__(7).readFileSync(a,\"utf8\")}", "title": "" }, { "docid": "b39b7e2503f24b9f9f4ff7b9d713cbe3", "score": "0.54103404", "text": "function jsTask({ file }) {\n return function jsCompilation() {\n return browserify({ entries: `${path.js}${file}`, debug: true, })\n .transform('babelify', {\n global: true,\n presets: ['@babel/preset-env'],\n plugins: ['@babel/plugin-proposal-optional-chaining'],\n sourceMaps: true,\n })\n .bundle()\n .pipe(source(file))\n .pipe(buffer())\n .pipe(rigger())\n .pipe(sourcemaps.init({ loadMaps: true }))\n .pipe(terser())\n .pipe(uglify())\n .pipe(sourcemaps.write(\"./\"))\n .pipe(dest(path.build.js));\n }\n}", "title": "" }, { "docid": "b8a00cdf9a88f716d87a4e27e1de95f9", "score": "0.54026496", "text": "function LoadjsFile(i_FilePath)\n{\n var FileRef = document.createElement('script')\n FileRef.setAttribute(\"type\",\"text/javascript\")\n FileRef.setAttribute(\"src\", i_FilePath)\n \n if (typeof FileRef!= \"undefined\")\n document.getElementsByTagName(\"head\")[0].appendChild(FileRef)\n}", "title": "" }, { "docid": "dd8a53be080e0e31f5ddedbfbccf6a9b", "score": "0.53986776", "text": "function optimizeJSGeneral() {\n return gulp\n .src([\"src/js/components/**/*.js\"])\n .pipe(uglify())\n .pipe(concat(\"scripts.js\"))\n .pipe(rename({ suffix: \".min\" }))\n .pipe(gulp.dest(\"dist/js\"));\n}", "title": "" }, { "docid": "1c24c3ab47eaf1124b1f32bf1dc325d4", "score": "0.5384367", "text": "function caricaFileJs(path, callback) {\n var script = document.createElement('script');\n\n script.type = 'text/javascript';\n script.src = path + '?_t=' + new Date().getTime();\n\n script.onload = function () {\n callback();\n };\n\n script.onerror = function (error) {\n erroriImportJs.push(path);\n callback();\n };\n\n document.head.appendChild(script);\n}", "title": "" }, { "docid": "8e0ec27577195ba4b8ca34414a40527d", "score": "0.5381509", "text": "function scripts() {\n\treturn gulp\n\t\t.src(resources.scripts, {\n\t\t\tbase: './src/'\n\t\t})\n\t\t.pipe(getPlumber())\n\t\t.pipe(sourcemaps.init()) // initialize sourcemaps for .min.css files\n\t\t.pipe(\n\t\t\tbabel({\n\t\t\t\t// compile ES2015+ into the version of javascript currently supported by browsers\n\t\t\t\tpresets: ['@babel/env'],\n\t\t\t\tplugins: ['@babel/plugin-proposal-class-properties', '@babel/plugin-proposal-object-rest-spread']\n\t\t\t})\n\t\t)\n\t\t.pipe(uglify()) // minify the .js files\n\t\t.pipe(concat('all.min.js')) // bundle all .js files into one file\n\t\t.pipe(sourcemaps.write('maps')) // generate sourcemap for the bundle\n\t\t.pipe(gulp.dest('./dist/'));\n}", "title": "" }, { "docid": "b9a6e407bb7b82395242ce5ee30c0314", "score": "0.538076", "text": "function scripts() {\n return gulp.src(config.path.src.scripts, {sourcemaps: true})\n .pipe(plugins.if(minify, plugins.uglify()))\n .pipe(plugins.concat('main.min.js'))\n .pipe(gulp.dest(config.path.build.scripts))\n .pipe(plugins.size({title: '--> Scripts'}));\n}", "title": "" }, { "docid": "c39f1e12f5fa8b05acb7adcc66155abf", "score": "0.537583", "text": "function loadSource(name) {\n return function () {\n var deferred = new $.Deferred();\n document.body.appendChild($('<script>', {\n src: appOptions.baseUrl + 'js/' + name + '.js'\n }).on('load', function () {\n deferred.resolve();\n })[0]);\n return deferred;\n };\n}", "title": "" }, { "docid": "b96d55009458c4fc7867f31a1ec365e4", "score": "0.5363562", "text": "function HLPR_readJSONfromFile(fileName, staticFiles) {\n oxmlhttp = null;\n try {\n oxmlhttp = new XMLHttpRequest();\n oxmlhttp.overrideMimeType(\"text/plain\");\n } catch(e) {\n try {\n oxmlhttp = new ActiveXObject(\"Msxml2.XMLHTTP\");\n } catch(e) {\n return null;\n }\n }\n if (!oxmlhttp) return null;\n try {\n oxmlhttp.open(\"GET\", fileName, false);\n oxmlhttp.send(null);\n } catch(e) {\n return null;\n }\n if (staticFiles) {\n \tvar fileData = oxmlhttp.responseText;\n \tfileData = fileData.replace(/\\n/g, \" \").replace(/\\t/g, \" \").replace(/ /g, \" \").replace(/ /g, \" \").replace(/ /g, \" \").replace('[', '').replace(']', '');\n\t\treturn $.trim(fileData).split(\" \");\n }\n return jQuery.parseJSON(oxmlhttp.responseText);\n}", "title": "" }, { "docid": "2e5f509fc3d8a9af9cc963942955859a", "score": "0.53517807", "text": "function getScript(file) {\n if(!currentConfig.system.disableCache) {\n if(file in scriptCache)\n return scriptCache[file];\n }\n\n let xml = loadScript(file);\n let json = JSON.parse(xml_js.xml2json(xml, { compact: true, spaces: 4, trim: false, captureSpacesBetweenElements: true }));\n\n if(!currentConfig.system.disableCache) {\n scriptCache[file] = json;\n //buildScriptRefs(file);\n }\n\n return json;\n}", "title": "" }, { "docid": "1e49bdc605ea9d88557cde8f5858a840", "score": "0.5345578", "text": "function xmlFileToJs(filename, cb) {\n var filepath = path.normalize(path.join(__dirname, filename));\n fs.readFile(filepath, 'utf8', function(err, xmlStr) {\n if (err) throw (err);\n xml2js.parseString(xmlStr, {}, cb);\n });\n}", "title": "" }, { "docid": "1e49bdc605ea9d88557cde8f5858a840", "score": "0.5345578", "text": "function xmlFileToJs(filename, cb) {\n var filepath = path.normalize(path.join(__dirname, filename));\n fs.readFile(filepath, 'utf8', function(err, xmlStr) {\n if (err) throw (err);\n xml2js.parseString(xmlStr, {}, cb);\n });\n}", "title": "" }, { "docid": "5e213ab45ea7487b6ef351644194ef42", "score": "0.5336618", "text": "function js_bundle() {\n return function() {\n return (\n js_bundler\n .bundle()\n .pipe(source(\"bundle.js\"))\n .pipe(buffer())\n .pipe(sourcemaps.init({ loadMaps: true }))\n // .pipe(uglify())\n .pipe(sourcemaps.write(\"./\"))\n .pipe(livereload())\n .pipe(gulp.dest(js_exitpoint))\n );\n };\n}", "title": "" }, { "docid": "d09e2d51f321223f71b3b1fb4b33c414", "score": "0.5315223", "text": "function vendorjs(){\n return src( [\n 'src/assets/vendors/jquery/dist/jquery.js',\n 'src/assets/vendors/**/*.js'\n ],{ sourcemaps: true })\n .pipe(uglify())\n .pipe(concat('vendorsjs.min.js'))\n .pipe(dest('build/assets/vendors', { sourcemaps: true }));\n}", "title": "" }, { "docid": "fade06b9ff5b4ac9fad916c5c23e7b15", "score": "0.5289829", "text": "function concatJS() {\n return src([\n 'src/js/jquery.min.js',\n 'src/js/all.min.js', // FontAwesome 5\n 'src/js/bootstrap.bundle.min.js',\n 'src/js/jquery.fancybox.min.js',\n 'src/js/lazysizes.js',\n 'src/js/sweetalert2.min.js',\n 'src/js/app.js'\n ])\n .pipe(strip())\n .pipe(uglify())\n .pipe(concat('bundle.min.js'))\n .pipe(dest('src/js'));\n}", "title": "" }, { "docid": "1096b02a6804ce0b73e13166c0ac9506", "score": "0.5262365", "text": "function scripts() {\n return (\n gulp\n .src([\"./js/**/*\"])\n .pipe(plumber())\n // folder only, filename is specified in webpack config\n .pipe(gulp.dest(\"./js/packed\"))\n );\n}", "title": "" }, { "docid": "95a9adf603cdc7dcc96330bb56365159", "score": "0.5260781", "text": "loadJsFile(fileLocation) {\n // DOM: Create the script element\n let jsElm = document.createElement(\"script\");\n // set the type attribute\n jsElm.type = \"application/javascript\";\n // make the script element load file\n jsElm.src = fileLocation;\n // finally insert the element to the body element in order to load the script\n document.body.appendChild(jsElm);\n }", "title": "" }, { "docid": "b6a73c7ea52af4f3c97751109595d5c8", "score": "0.52537096", "text": "function scripts () {\n return gulp.src(src.js).pipe(tap(function (f, t) {\n const file = f.path;\n const fileName = file.replace(/^.*[\\\\\\/]/, '');\n\n return browserify({ entries: src.js.replace('*.js', '') + fileName })\n .transform(babelify, { presets: ['@babel/preset-env'] })\n .bundle()\n .pipe(source(fileName))\n .pipe(buffer())\n .pipe(gulpIf(inProduction, stripDebug()))\n .pipe(gulpIf(fileName !== 'vendor.js', header()))\n .pipe(size({ showFiles: true }))\n .pipe(gulpIf(fileName !== 'vendor.js', gulp.dest(dist.js)))\n .pipe(rename({ suffix: '.min' }))\n .pipe(uglify())\n .pipe(gulpIf(fileName !== 'vendor.js', header()))\n .pipe(size({ showFiles: true }))\n .pipe(gulp.dest(dist.js))\n .pipe(browserSync.stream())\n .pipe(success('Scripts compiled'));\n }));\n}", "title": "" }, { "docid": "6dcdcc82701a51de9cce21becb2bfed5", "score": "0.5238442", "text": "function filterForJS(files) {\n return files.filter(function(file) {\n return file.match(/\\.js$/);\n });\n }", "title": "" }, { "docid": "2307fbd545bdcea7d05747ca490c0ca1", "score": "0.52245843", "text": "function loadExternalFile() {\n var script = document.createElement('script');\n script.src = 'dist/fuse.min.js';\n document.getElementsByTagName('head')[0].appendChild(script);\n }", "title": "" }, { "docid": "5056207eba30a32f898d609ed45ab1d6", "score": "0.5213443", "text": "function readJsonFileSync(fname) {\n let s = fs.readFileSync(fname, \"utf8\");\n return JSON.parse(stripJsonComments(s));\n}", "title": "" }, { "docid": "401aee3e912184fad3a4e05311276101", "score": "0.5211306", "text": "function srcJS(name) {\n var s = document.createElement('script');\n s.src = name;\n document.head.appendChild(s);\n}", "title": "" }, { "docid": "f5fb05b60c8ad92cbfaf3c34847bc646", "score": "0.52068996", "text": "function filterForJS(files) {\n return files.filter(function(file) {\n return file.match(/\\.js$/);\n });\n }", "title": "" }, { "docid": "95b2a35dd31126ea4282c7ecea647fad", "score": "0.5204309", "text": "function openSource(filePath) {\n\treturn jetpack.read(path.join(sourcePath, filePath), \"utf8\");\n}", "title": "" }, { "docid": "82b94598bf8d214c0dd20e6cac27f96d", "score": "0.5187524", "text": "function js() {\n console.log( taskHeader(\n '2/5',\n 'QA',\n 'Lint',\n 'JavaScript'\n ) );\n\n // return stream or promise for run-sequence\n return src( sources.js, { allowEmpty: true } )\n .pipe( eslint() )\n .pipe( eslint.result( result => {\n const {\n filePath: textstring, messages, warningCount, errorCount\n } = result;\n const { length: messageCount } = messages;\n\n console.log( decorateLog( color, log, {\n textstring,\n messageCount,\n warningCount,\n errorCount\n } ) );\n } ) )\n .pipe( eslint.format() );\n // .pipe(eslint.failAfterError());\n}", "title": "" }, { "docid": "e53230798581cea5b10dcd23cca01f01", "score": "0.5185223", "text": "function load(file) {\n if (file.startsWith('./') || file.startsWith('../')) {\n // relative path\n file = path + file;\n }\n path = file.slice(0, file.lastIndexOf('/'));\n console.log('[loadXhr]');\n const xhr = new XMLHttpRequest();\n // the key is to load asynchronously to guarantee the order of exectution\n xhr.open('GET', file + '.js', false);\n xhr.setRequestHeader('Accept', 'application/javascript');\n xhr.onreadystatechange = function() {\n if (xhr.readyState == 4) {\n console.log(`[loaded ${file}]`);\n eval(xhr.responseText);\n }\n }\n xhr.onerror = function() {\n }\n xhr.send();\n}", "title": "" }, { "docid": "e33f62827e9e6a48a61ff1f28d4cfffa", "score": "0.5174661", "text": "function read(f) {\n return fs.readFileSync(f).toString();\n}", "title": "" }, { "docid": "850bb30fbc820fa9b1c4af16cdbb1556", "score": "0.5170336", "text": "function lintingJS() {\n return gulp\n .src(APP_FILES)\n .pipe(jshint())\n .pipe(jshint.reporter('default'));\n\n}", "title": "" }, { "docid": "998d1a76cd8c557a9f9d16f415071b50", "score": "0.5167247", "text": "function loadJSFile(path, callback){\n\t var fileref=document.createElement('script');\n fileref.setAttribute(\"type\",\"text/javascript\");\n fileref.setAttribute(\"src\", path);\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\n if (isFunction(callback)){\n \t callback();\n }\n}", "title": "" }, { "docid": "af6943e915d4d7273a2659b527379bd2", "score": "0.51589364", "text": "function lazyLoadSource(sourcePath) {\n let buffer;\n return () => {\n if (!buffer) {\n buffer = fs.readFileSync(sourcePath);\n }\n return buffer;\n };\n}", "title": "" }, { "docid": "4826fc752f61a37a04213b4995534238", "score": "0.515278", "text": "function readTemplateFile() \n{\n var TemplateFile = TW.readFile(\"templates.txt\");\n if (TemplateFile.status!=0) \n {\n TW.critical(null, \"Cannot read template file!\", TemplateFile.message);\n }\n else\n return TemplateFile.result.replace(/^\\/\\/.*$/gm, \"\"); //Strip comment lines and return the rest \n}", "title": "" }, { "docid": "6530ea70a2fac41fd764b90d2603673a", "score": "0.51472193", "text": "function read(f) {\n return fs.readFileSync(f).toString();\n}", "title": "" }, { "docid": "a9bc09e7168ed251f8a863a074abfdc0", "score": "0.51451486", "text": "function _client_compile_task(file) {\n\n var infile = amigo_js_dev_path + '/' +file;\n //var outfile = amigo_js_out_path + '/' +file;\n\n var b = browserify(infile);\n return b\n // not in npm, don't need in browser\n\t//.exclude('ringo/httpclient')\n\t.bundle()\n // desired output filename to vinyl-source-stream\n\t.pipe(source(file))\n\t.pipe(gulp.dest(amigo_js_out_path));\n}", "title": "" }, { "docid": "5d2e818a42700ef84dd056ff0f72814a", "score": "0.5144266", "text": "function load_file( file_name )\r\n{\r\n\tvar file_tmp;\r\n\tvar file_path = __dirname +\"/\" +file_name;\r\n\r\n\t//HTML index file\r\n\ttry\r\n\t{\r\n\t\tfile_tmp = fs.readFileSync( file_path );\r\n\t}\r\n\tcatch (err)\r\n\t{\r\n\t\tconsole.log(\"ERR: \" +err.code +\" failed to load: \" +file_path);\r\n\t\tthrow err;\r\n\t}\r\n\r\n\tconsole.log(\"INFO: \" +file_path +\" has been loaded into memory\");\r\n\r\n\treturn file_tmp;\r\n}", "title": "" }, { "docid": "1a4832708470f3a7df883c5969c8ac99", "score": "0.51403725", "text": "function optimizeJSFile(JSFile, callback) {\n JSFile = JSFile.slice(0, -3); // (remove \".js\")\n function optimizeJSFileAdapter(adap, callback) {\n\n function doneCallback(error, result, code) {\n if (error) {\n callback(error);\n return;\n }\n callback();\n }\n\n // Base options for this app. (feel free to make some of them\n // device specific or whatever)\n var theArgs = [\n 'js/lib/framework/scripts/optimize.js',\n '-a', adap,\n '-i', JSFile,\n '-m', 'true',\n '-w', 'info,log',\n '-u', '\"' + (targetUA[target] || '') + '\"'\n ];\n\n // Append the eventual target specific options that will be used\n // by devicedetect.\n if (targetSpecificOptions[target]) {\n theArgs = theArgs.concat(targetSpecificOptions[target]);\n }\n\n // Run the optimizer !\n grunt.util.spawn({\n cmd: 'node',\n args: theArgs\n }, doneCallback);\n }\n\n function moveFile(){\n grunt.file.setBase('..'); // Todo: should be dynamic with mainPath\n\n var filenameIn = JSFile + ( adapter !== 'none' ? '.' + adapter : '' ) + '.optimized.js';\n var filenameOut = JSFile + ( target !== 'none' ? '.' + target : '' ) + '.optimized.js';\n\n grunt.file.copy(mainPath + filenameIn, buildDir + filenameOut);\n grunt.log.writeln('Wrote ' + filenameOut);\n grunt.file.delete(mainPath + filenameIn);\n }\n\n grunt.file.setBase(mainPath);\n optimizeJSFileAdapter(adapter, function(error) {\n if(error) {\n console.error(error);\n } else {\n moveFile();\n callback();\n }\n });\n }", "title": "" }, { "docid": "c2426c40b5ff4a1fbe0698bdb124a97e", "score": "0.5136006", "text": "function Test_JS() \n{\n\talert(\"User Javascript file (js/js.js) interpreted OK\");\n}", "title": "" } ]
0fcaf2c86e2434d3567514c86a344804
Detect if the user is moving towards the currently activated submenu. If the mouse is heading relatively clearly towards the submenu's content, we should wait and give the user more time before activating a new row. If the mouse is heading elsewhere, we can immediately activate a new row. We detect this by calculating the slope formed between the current mouse location and the upper/lower right points of the menu. We do the same for the previous mouse location. If the current mouse location's slopes are increasing/decreasing appropriately compared to the previous's, we know the user is moving toward the submenu. Note that since the yaxis increases as the cursor moves down the screen, we are looking for the slope between the cursor and the upper right corner to decrease over time, not increase (somewhat counterintuitively).
[ { "docid": "dc51c6649701dfff956d8aaddf1d360c", "score": "0.0", "text": "function slope(a, b) {\n return (b.y - a.y) / (b.x - a.x);\n }", "title": "" } ]
[ { "docid": "ab20dd29b80f71084de2c88b195db83c", "score": "0.6896019", "text": "function activationDelay() {\n if (!activeRow || !matchesSelector(activeRow, options.submenuSelector)) {\n // If there is no other submenu row already active, then\n // go ahead and activate immediately.\n return 0;\n }\n\n let offset = menu.getBoundingClientRect();\n\n // Set the proper offsets\n let left = offset.left + document.body.scrollLeft,\n top = offset.top + document.body.scrollTop;\n\n let upperLeft = {\n x: left,\n y: top - options.tolerance\n },\n upperRight = {\n x: left + menu.offsetWidth,\n y: upperLeft.y\n },\n lowerLeft = {\n x: left,\n y: top + menu.offsetHeight + options.tolerance\n },\n lowerRight = {\n x: left + menu.offsetWidth,\n y: lowerLeft.y\n },\n loc = mouseLocs[mouseLocs.length - 1],\n prevLoc = mouseLocs[0];\n\n if (!loc) {\n return 0;\n }\n\n if (!prevLoc) {\n prevLoc = loc;\n }\n\n if (prevLoc.x < left || prevLoc.x > lowerRight.x ||\n prevLoc.y < top || prevLoc.y > lowerRight.y) {\n // If the previous mouse location was outside of the entire\n // menu's bounds, immediately activate.\n return 0;\n }\n\n if (lastDelayLoc &&\n loc.x === lastDelayLoc.x && loc.y === lastDelayLoc.y) {\n // If the mouse hasn't moved since the last time we checked\n // for activation status, immediately activate.\n return 0;\n }\n\n // Detect if the user is moving towards the currently activated\n // submenu.\n //\n // If the mouse is heading relatively clearly towards\n // the submenu's content, we should wait and give the user more\n // time before activating a new row. If the mouse is heading\n // elsewhere, we can immediately activate a new row.\n //\n // We detect this by calculating the slope formed between the\n // current mouse location and the upper/lower right points of\n // the menu. We do the same for the previous mouse location.\n // If the current mouse location's slopes are\n // increasing/decreasing appropriately compared to the\n // previous's, we know the user is moving toward the submenu.\n //\n // Note that since the y-axis increases as the cursor moves\n // down the screen, we are looking for the slope between the\n // cursor and the upper right corner to decrease over time, not\n // increase (somewhat counterintuitively).\n function slope(a, b) {\n return (b.y - a.y) / (b.x - a.x);\n }\n\n let decreasingCorner = upperRight,\n increasingCorner = lowerRight;\n\n // Our expectations for decreasing or increasing slope values\n // depends on which direction the submenu opens relative to the\n // main menu. By default, if the menu opens on the right, we\n // expect the slope between the cursor and the upper right\n // corner to decrease over time, as explained above. If the\n // submenu opens in a different direction, we change our slope\n // expectations.\n if (options.submenuDirection === \"left\") {\n decreasingCorner = lowerLeft;\n increasingCorner = upperLeft;\n } else if (options.submenuDirection === \"below\") {\n decreasingCorner = lowerRight;\n increasingCorner = lowerLeft;\n } else if (options.submenuDirection === \"above\") {\n decreasingCorner = upperLeft;\n increasingCorner = upperRight;\n }\n\n let decreasingSlope = slope(loc, decreasingCorner),\n increasingSlope = slope(loc, increasingCorner),\n prevDecreasingSlope = slope(prevLoc, decreasingCorner),\n prevIncreasingSlope = slope(prevLoc, increasingCorner);\n\n if (decreasingSlope < prevDecreasingSlope &&\n increasingSlope > prevIncreasingSlope) {\n // Mouse is moving from previous location towards the\n // currently activated submenu. Delay before activating a\n // new menu row, because user may be moving into submenu.\n lastDelayLoc = loc;\n return DELAY;\n }\n\n lastDelayLoc = null;\n return 0;\n }", "title": "" }, { "docid": "b879dba1557fee73465a0f35b0895e4c", "score": "0.54081154", "text": "function checkMenus($submenu, initialOffset){\n\t\tvar offset = $submenu.offset().left - mainWrapDifference,\n\t\t\twidth = $submenu.width();\n\t\tif($mainWrapperWidth - offset < width){\n\t\t\t$submenu.addClass(classLeftSide);\n\t\t} else if($mainWrapperWidth - initialOffset > width) {\n\t\t\t$submenu.removeClass(classLeftSide);\n\t\t}\n\t}", "title": "" }, { "docid": "609c81d4896be20622915a5a6712340a", "score": "0.54025424", "text": "function activateSubmenu(row) {\n var $row = $(row),\n $submenu = $row.find('.gm-sc-cntnr')\n height = $menu.outerHeight(),\n width = $menu.outerWidth();\n var maxHeight = 0;\n $submenu.find('.span3:last').css('border-right', 'none');\n $row.find('.gm-sc-cntnr').css('font-weight', 'bold');\n // Show the submenu\n $submenu.css({\n display: \"block\",\n top: -5,\n left: width - 3\n\n });\n\n // Keep the currently activated row's highlighted look\n $row.find(\"a\").addClass(\"maintainHover\");\n\n //Fix vertical line height\n\n $submenu.find('.span3').each(function () {\n getMaxHeight($(this))\n });\n // maxHeight = 'auto';\n if (maxHeight > 100) {\n $submenu.find('.span3').height(maxHeight);\n }\n\n function getMaxHeight(ref) {\n maxHeight = (maxHeight < ref.height()) ? ref.height() : maxHeight;\n }\n\n\n }", "title": "" }, { "docid": "196eb03b57f58bb2af1a4ca451a2bc5f", "score": "0.52865547", "text": "function mouseClicked() {\n if (MENU === 0) {\n if (mouseX < 200 && mouseX > 50) {\n if (mouseY < 125 && mouseY > 50) {\n MENU = 1\n }\n if (mouseY < 275 && mouseY > 200) {\n MENU = 2\n }\n if (mouseY < 425 && mouseY > 350) {\n MENU = 3\n }\n }\n }\n}", "title": "" }, { "docid": "08fd9e00773e615aa9bb91f80c6977ab", "score": "0.52361596", "text": "triggersSubmenu() {\n return !!(this._menuItemInstance && this._parentMaterialMenu);\n }", "title": "" }, { "docid": "bdd33fca762c8fdc00d8baf62a99f62d", "score": "0.52281153", "text": "handleMenuScrolling( event, activeTreeAry )\n {\n let menuActive = false;\n\n for( let i = 0; i < activeTreeAry.length; ++i )\n {\n // See if there's an active menu\n if( activeTreeAry[i].isActive() )\n {\n menuActive = true;\n\n let scrollParam = activeTreeAry[i].getScrollParam( event.detail.type );\n\n // If scrolling is allowed, start the timer\n if( scrollParam.canScroll( event.detail.type ) )\n {\n this.scrollTimerId = setTimeout(\n () =>\n {\n this.scrollTimerId = setInterval(\n () => eventManager.dispatchEvent( scrollParam.msg ),\n scrollParam.scrollDelay );\n \n eventManager.dispatchEvent( scrollParam.msg );\n }, \n scrollParam.startDelay );\n \n break;\n }\n }\n }\n\n return menuActive;\n }", "title": "" }, { "docid": "cf52c7d13cf83e7a9c895bb24751d063", "score": "0.51602674", "text": "function menuHover(e){\n targI = menu.children.indexOf(e.target);\n if (atMainMenu) {\n diff = targI-(currState+2);\n for (var i = 0; i < Math.abs(diff); i++) {\n if (diff < 0) menuState.up();\n else menuState.down();\n }\n }\n else {\n diff = targI-(currOptState+2);\n for (var i = 0; i < Math.abs(diff); i++) {\n if (diff < 0) optMenuState.up();\n else optMenuState.down();\n }\n }\n \n }", "title": "" }, { "docid": "1a65cb08b9430007518e988c605710ae", "score": "0.5131713", "text": "function moveMenu() {\n if(menuMoved === false){\n // console.log(\"moving menu...\")\n $(\"#menuRow\").animate({\n top: \"300\"\n },1000);\n menuMoved = true;\n };\n}", "title": "" }, { "docid": "cfac2d484f99a1b1b3479747f921676c", "score": "0.5086221", "text": "function updateMenubar() {\n\t//clicking the settings gear\n\tif (!menu_active) {\n\t\t//clicking the settings gear\n\t\tif (getDistance([cursor_x, cursor_y], [canvas.width * 0.925, canvas.height * menu_iconHeight * 1.25]) < canvas.height * menu_iconHeight / 2) {\n\t\t\tmenu_active = true;\n\t\t\treturn true;\n\t\t}\n\n\t\t//clicking the left / right board arrows\n\t\tif (Math.abs(cursor_y - (canvas.height * 0.5)) < canvas.height * 0.1 && ((cursor_x < canvas.width * 0.1 && board_rowNum > board_limits[0]) || (cursor_x > canvas.width * 0.9 && board_rowNum < board_limits[1]))) {\n\t\t\t//increasing vs decreasing\n\t\n\t\t\tboard_rowNum = clamp(board_rowNum + boolToSigned(cursor_x > canvas.width * 0.5), board_limits[0], board_limits[1]);\n\t\t\tdata_persistent.prefs.startOn = board_rowNum;\n\n\t\t\tif (game_active) {\n\t\t\t\tstopGame();\n\t\t\t}\n\t\t\tsetTextForBoard(board_rowNum);\n\t\t}\n\t\treturn false;\n\t}\n\n\t//if already in the menu, and clicking outside of it, go outside the menu\n\tvar xDist = Math.abs(cursor_x - canvas.width / 2);\n\tvar yDist = Math.abs(cursor_y - canvas.height / 2);\n\tif (xDist > canvas.width * menu_iconHeight * menu_items.length * 0.5 || yDist > canvas.height * menu_height * 0.5) {\n\t\tmenu_active = false;\n\t\treturn true;\n\t}\n\n\t//interact with the menu elements\n\tvar targetX;\n\tvar targetY;\n\tfor (var i=0; i<menu_items.length; i++) {\n\t\ttargetX = canvas.width * (0.5 + 0.95 * menu_iconHeight * (i + 0.5 - menu_items.length * 0.5));\n\t\ttargetY = canvas.height * 0.5;\n\n\t\tif (getDistance([cursor_x, cursor_y], [targetX, targetY]) < canvas.height * menu_iconHeight * 0.5) {\n\t\t\t//the item is interactable\n\t\t\tinteractMenuItem(menu_items[i]);\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "9beaa569c38f370464d41dc12dc8c2bb", "score": "0.5081347", "text": "function stay_on_screen() {\n\n\t$('.site-navigation .sub-menu .sub-menu').parent().hover(function() {\n\t\tif ($(this).hasClass('orion-megamenu-subitem')) {\n\t\t\treturn;\n\t\t} else {\n\t\t var menu = $(this).find(\"ul\"); \n\t\t var menupos = $(menu).offset();\n\t\t var siteWidth = $(window).width();\n\t\t if ($('body').hasClass('boxed')) {\n\t\t \tsiteWidth = $('.boxed-container').width() + $('.boxed-container').offset().left;\n\n\t\t }\t\t \n\t\t if (menupos.left + menu.width() > siteWidth) {\n\t\t var newpos = -$(menu).width();\n\t\t menu.css({ left: newpos }); \n\t\t }\n\n\t\t\tif ($('body').hasClass('rtl')) {\n\t\t\t\tif (menupos.left < 0) {\n\t\t\t\t\tvar newpos = -$(menu).width();\n\t\t\t\t\tmenu.css({ right: newpos }); \n\t\t\t\t}\n\t\t\t}\n\t }\n\t});\n}", "title": "" }, { "docid": "d8b4d07b969a87da8d7397626b2fff6c", "score": "0.5067023", "text": "function deflectY(b, obj) {\n if (b.dy == 0) return false;\n else if (b.dx == 0) return true;\n // if the movement is diagonal\n else {\n let slp = b.dy / b.dx;\n let cx, cy;\n // Q2: Moving Up to the Right\n if (slp < 0 && b.dx > 0) {\n cx = obj.x - b.x;\n cy = obj.y + obj.h - b.y;\n //console.log(cy / cx +\" --- \" + slp)\n if (cx < 0) return true;\n else if (cy / cx > slp) return false;\n else return true;\n } // Q4: Moving Down to the Right\n else if (slp > 0 && b.dx > 0) {\n cx = obj.x - b.x\n cy = obj.y - b.y\n //console.log(cy / cx +\" --- \" + slp)\n if (cx < 0) return true;\n else if (cy / cx > slp) return true;\n else return false;\n } // Q3: Moving Down to the Left\n else if (slp < 0 && b.dx < 0) {\n cx = obj.x + obj.w - b.x;\n cy = obj.y - b.y;\n //console.log(cy / cx +\" --- \" + slp)\n if (cx > 0) return true;\n else if (cy / cx < slp) return true;\n else return false;\n } // Q1: Moving Up to the Left\n else if (slp > 0 && b.dx < 0) {\n cx = obj.x + obj.w - b.x;\n cy = obj.y + obj.h - b.y;\n //console.log(cy / cx +\" --- \" + slp)\n if (cx > 0) return true;\n else if (cy / cx > slp) return true;\n else return false;\n }\n }\n return false;\n}", "title": "" }, { "docid": "eee811673442d1a2a57a12880d02f31e", "score": "0.5054082", "text": "function menuUpdate() {\n /* Click the start button */\n if (mouse.x > 165 -52 && mouse.x < 165+52 && mouse.y > 168 && mouse.y < 202) {\n _canvas.style.cursor = \"pointer\";\n if (mouse.click && !fx.type) {\n level = 0;\n startFX(CIRCLE_TRANSITION,{complete: () => {\n switchState(PRESTAGE_STATE);\n add(LevelPreview());\n }});\n _canvas.style.cursor = \"default\";\n }\n } else {\n _canvas.style.cursor = \"default\";\n }\n }", "title": "" }, { "docid": "49d2c785bd14ef4efe10a9474efa4c1c", "score": "0.5052506", "text": "function updateMenuPos() {\n // menu content should bi right aligned with the minibar elem\n const sectionEl = thisElem.current;\n const minibarEl = thisElem.current.parentElement;\n const sectionRect = sectionEl.getBoundingClientRect();\n const minibarRect = minibarEl.getBoundingClientRect();\n const right = minibarRect.right - sectionRect.right;\n const top = minibarRect.top - sectionRect.top + sectionRect.height;\n if (menuPos.top !== top || menuPos.right !== right) {\n setMenuPos({ ...menuPos, top, right });\n }\n }", "title": "" }, { "docid": "ffbe71e0e6ca256dd0126c4d20c834bc", "score": "0.49890143", "text": "function mouseUp(evt){\n if ( evt.target.name == \"arrow_sample1\" ) {\n clearInterval(sample1_x_line_timer);\n getChild(\"arrow_sample1\").off(\"mousedown\", down_listner);\n getChild(\"arrow_sample1\").off(\"pressmove\", press_listner);\n getChild(\"arrow_sample1\").off(\"pressup\", up_listner);\n sample1_line_initial_x = prev_sample1_line_initial_x = 58; \n sample1_x_line_timer = setInterval(function() {\n drawCollideXlineOne(\"arrow_sample1\",\"BLUE\");\n }, 10); /** Draw x line timer of sample1 */\n } else {\n clearInterval(sample2_x_line_timer);\n getChild(\"arrow_sample2\").off(\"mousedown\", down_listner_2);\n getChild(\"arrow_sample2\").off(\"pressmove\", press_listner_2);\n getChild(\"arrow_sample2\").off(\"pressup\", up_listner_2);\n sample2_line_initial_x = prev_sample2_line_initial_x = 58;\n sample2_x_line_timer = setInterval(function() {\n drawCollideXlineTwo(\"arrow_sample2\",\"GREEN\");\n }, 10); /** Draw x line timer of sample2 */ \n }\n}", "title": "" }, { "docid": "3489ea37ca45788ace582ddea7885687", "score": "0.4956862", "text": "function align_submenu(tli, child, level) {\n if (level == 1) return;\n var root = document.getElementById(child).parentElement.getBoundingClientRect();\n var dic = levelpcs[level+1];\n if (document.getElementById(child).getBoundingClientRect().top == 0) {\n // let's unhide!\n if (document.getElementById(child).getAttribute('_orientation') == 'above') {\n // above -> bottom of child = top of parent\n document.getElementById(child).bottom = document.getElementById(dic[child]).childNodes[0].getBoundingClientRect().top + 'px';\n // left = left of parent\n document.getElementById(child).left = document.getElementById(dic[child]).getBoundingClientRect().left + 'px';\n } else if (document.getElementById(child).getAttribute('_orientation') == 'below') {\n // below -> top of child = bottom of parent\n document.getElementById(child).style.top = document.getElementById(dic[child]).childNodes[0].getBoundingClientRect().bottom + 'px';\n // left = left of parent\n document.getElementById(child).style.left = document.getElementById(dic[child]).getBoundingClientRect().left + 'px';\n } else {\n var itemoffset = document.getElementById(dic[child]).getBoundingClientRect().top-root.top;\n document.getElementById(child).style.top = itemoffset + 'px';\n }\n }\n}", "title": "" }, { "docid": "e1a4c96decad9f5b8684968a9b1c2901", "score": "0.49302197", "text": "function navlistItemActivateByScroll(currentYpos) {\n\t\tfor (var i = 1; i < anchor_navitem.length; i++) {\n\t\t\tif (currentYpos < anchor_navitem[i][0].offsetTop - 350) { //fix to activate early before sections\n\t\t\t\tnavlistItemActivate(anchor_navitem[i-1][1]);\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tnavlistItemActivate(anchor_navitem[i][1]);\n\t\t\t};\n\t\t}\n\t}", "title": "" }, { "docid": "b60d642c2c6c44db773424d3f09b6846", "score": "0.4920654", "text": "function subMenuPosition(el) {\n\t\tvar menu_height = el.innerHeight(),\n\t\t\tmenu_width = el.innerWidth(),\n\t\t\tmenu_top_offset = el.position().top,\n\t\t\tlink_offset = el.siblings('a').position().top,\n\t\t\tparent_cel_left = el.parents('.col').offset().left,\n\t\t\tmenu_position = link_offset - (menu_height /2) + 10,\n\t\t\tarrow_position = link_offset - menu_top_offset;\n\t\t// Set Top For Menu\n\t\tif (menu_position > 0) {\n\t\t\tel.css({\n\t\t\t\t'top' : menu_position + 'px'\n\t\t\t});\n\t\t\tel.children('.arrow').css({\n\t\t\t\t'top' : (menu_height/2 - 7) + 'px' ,\n\t\t\t});\n\t\t} else {\n\t\t\tel.css({\n\t\t\t\t'top' : '-7px'\n\t\t\t});\n\t\t\tmenu_top_offset = el.position().top;\n\t\t\tarrow_position = link_offset - menu_top_offset + 7;\n\t\t\tel.children('.arrow').css({\n\t\t\t\t'top' : arrow_position + 'px' ,\n\t\t\t});\n\t\t}\n\t\t// Set Left Or Right For Menu\n\t\tif ((parent_cel_left - menu_width - 20) > 0) {\n\t\t\tel.css({\n\t\t\t\t'right': '100%',\n\t\t\t\t'left' : 'auto'\n\t\t\t});\n\t\t\tel.children('.arrow').removeClass('left-arrow');\n\t\t} else {\n\t\t\tel.css({\n\t\t\t\t'right': 'auto',\n\t\t\t\t'left' : '100%'\n\t\t\t});\n\t\t\tel.children('.arrow').addClass('left-arrow');\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "d6011843b1432cacc1e9b4cdabb39ccf", "score": "0.49138036", "text": "function divBusStopPositionMenuItemsMouseUp () {\n if (!status.disableMenuSelect) {\n // Set label values\n var busStopPosition, color, currentLabel, $menuItem;\n color = getLabelColors()['StopSign'].fillStyle;\n\n status.currentLabel.setStatus('visibilityTag', 'visible');\n\n $menuItem = $(this);\n $menuItem.css('background','transparent');\n\n // Set bus stop position (e.g. Next\n busStopPosition = $menuItem.attr('value');\n status.currentLabel.setBusStopPosition(busStopPosition);\n\n setTimeout(function () {\n $menuItem.css('background', color);\n setTimeout(function() {\n $menuItem.css('background', 'transparent');\n\n // Close the menu\n hideBusStopPositionMenu();\n // Snap back to walk mode.\n myMap.enableWalking();\n myMenu.backToWalk();\n // myMap.setStatus('disableWalking', false);\n }, 100)\n },100);\n }\n }", "title": "" }, { "docid": "d21e1f57cec5c3728184e13f6dd71c04", "score": "0.49035975", "text": "function Update () {\n\n\tif(canMoveCamera) { //there is no menu showing\n\n\t if (Input.touchCount > 0) {\n\t\t\tvar touch : Touch = Input.GetTouch(0);\n\t\t\t\n\t\t\tif(touch.phase == TouchPhase.Began) {\n\t\t\t\ttotalMovement = Vector2(0, 0);\n\t\t\t\tprevPosition = touch.position;\n\t\t\t} else if(touch.phase == TouchPhase.Moved) {\n\t\t\t\ttotalMovement += Vector2(Mathf.Abs(touch.deltaPosition.x), Mathf.Abs(touch.deltaPosition.y));\n\t\t\t} else if(touch.phase == TouchPhase.Ended) {\n\t \t\trevealMenuIfTileTouch(touch.position);\n\t \t\t\n\t\t\t}\n\t\t}\n\t\telse if(Input.touchCount == 0) { //mouse input\n\t\t\n\t\t\tif(Input.GetMouseButtonDown(0)) {\n\t\t\t\ttotalMovement = Vector2(0, 0);\n\t\t\t\tprevPosition = Input.mousePosition;\n\t\t\t} else if(Input.GetMouseButton(0)) {\n\t\t\t\tvar delta = deltaMousePosition();\n\t\t\t\ttotalMovement += Vector2(Mathf.Abs(delta.x), Mathf.Abs(delta.y));\n\t\t\t} else if(Input.GetMouseButtonUp(0)) {\n\t\t\t\trevealMenuIfTileTouch(Input.mousePosition);\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "9688125dd2cc4c27c279217f253c4e6b", "score": "0.487711", "text": "function isInPathRect(path, index){\n\n //calculate the distance to each side of the rectangle\n var distToTopLine = Math.abs((path.xEndRect1 - path.xStartRect1)*(path.yStartRect1 - (mouseY - translateY) * (1 / scaleFactor))\n - (path.xStartRect1 - (mouseX - translateX) * (1 / scaleFactor))*(path.yEndRect1 - path.yStartRect1)) / (Math.sqrt(pow(path.xEndRect1 - path.xStartRect1, 2) + pow(path.yEndRect1 - path.yStartRect1 , 2)));\n\n var distToBottLine = Math.abs((path.xEndRect2 - path.xStartRect2)*(path.yStartRect2 - (mouseY - translateY) * (1 / scaleFactor))\n - (path.xStartRect2 - (mouseX - translateX) * (1 / scaleFactor))*(path.yEndRect2 - path.yStartRect2)) / (Math.sqrt(pow(path.xEndRect2 - path.xStartRect1, 2) + pow(path.yEndRect2 - path.yStartRect2 , 2)));\n\n var distToStart = Math.abs((path.xStartRect2 - path.xStartRect1)*(path.yStartRect1 - (mouseY - translateY) * (1 / scaleFactor))\n - (path.xStartRect1- (mouseX - translateX) * (1 / scaleFactor))*(path.yStartRect2 - path.yStartRect1)) / (Math.sqrt(pow(path.xStartRect2 - path.xStartRect1, 2) + pow(path.yStartRect2 - path.yStartRect1 , 2)));\n\n var distToEnd = Math.abs((path.xEndRect2 - path.xEndRect1)*(path.yEndRect1 - (mouseY - translateY) * (1 / scaleFactor))\n - (path.xEndRect2- (mouseX - translateX) * (1 / scaleFactor))*(path.yEndRect2 - path.yEndRect1)) / (Math.sqrt(pow(path.xEndRect2 - path.xEndRect1, 2) + pow(path.yEndRect2 - path.yEndRect1 , 2)));\n //if all of the distances are within width and height of the rectangle\n if(distToBottLine <= nodeSize && distToTopLine <= nodeSize &&\n distToStart <= path.getLength() && distToEnd <= path.getLength()){\n path.color = color(39, 174, 96);\n overPath = index;\n //if we are over a path and not over a node, draw a temp node on the path\n if(overNow == undefined && tool == 'path'){\n fill(color(153,153,153, .6));\n text(nodes.length,(mouseX - translateX) * (1 / scaleFactor) - 5,(mouseY - translateY) * (1 / scaleFactor) - nodeSize);\n ellipse((mouseX - translateX) * (1 / scaleFactor), (mouseY - translateY) * (1 / scaleFactor), nodeSize, nodeSize);\n }\n }else {\n path.color = 255;\n overPath = undefined;\n }\n}", "title": "" }, { "docid": "81e6d21cb7b70e8ddcfa163634fc4f16", "score": "0.4857905", "text": "function up() {\n if(active && level.selected.y > 0) {\n select(level.selected.x, --level.selected.y);\n update();\n }\n }", "title": "" }, { "docid": "8717e23c42cc19629514187b1fa6c14c", "score": "0.4856221", "text": "function sunix_touched_side(){\n 'use strict';\n var $menu = $('.red-header-menu');\n if($(window).width() > 1200 ){\n $menu.find('li').each(function(){\n var $submenu = $(this).find('> .red-dropdown');\n if($submenu.length > 0){\n if($submenu.offset().left + $submenu.outerWidth() > $(window).innerWidth()){\n $submenu.addClass('touched');\n } else if($submenu.offset().left < 0){\n $submenu.addClass('touched');\n }\n /* remove css style display from mobile to desktop menu */\n $submenu.css('display','');\n } \n });\n }\n }", "title": "" }, { "docid": "ef21ce20fa96e882173e1bb072b1b986", "score": "0.48432836", "text": "update(gripObj){\n \n this.pressed = false;\n var newPos = this.restPosition;\n\n var pos = utils.localToWorld(this, this.offset, temps.vector, temps.matrix);\n var gripPos = gripObj.getWorldPosition(temps.vector2);\n //check overall distance\n if (pos.distanceTo(gripPos) <= this.throwLength * 2){\n //if we are pretty close, check more accurately with a rayCaster\n console.log(\"distance met!\", pos.distanceTo(gripPos), this.throwLength);\n\n var rayCaster = temps.rayCaster;\n\n rayCaster.ray.origin.copy(pos);\n rayCaster.ray.direction.copy(this.axis).applyMatrix4( temps.matrix ).normalize();\n rayCaster.far = this.throwLength;\n\n temps.arrowHelper.position.copy(rayCaster.ray.origin);\n temps.arrowHelper.setDirection(rayCaster.ray.direction);\n temps.arrowHelper.setLength(1);\n console.log('ray:', rayCaster.ray.origin, rayCaster.ray.direction, rayCaster.far, this.axis, temps.matrix);\n \n var intersections = rayCaster.intersectObject( gripObj, true );\n if(intersections[0]){\n newPos = temps.vector;\n console.log(\"ray hit!\", intersections[0]);\n newPos.copy(this.restPosition);\n\n if(intersections[0].distance < this.throwLength * this.deadZone){\n newPos.addScaledVector(this.axis, -this.throwLength);\n console.log(\"pressed!\");\n this.pressed = true;\n }else{\n console.log(\"pressing...\");\n newPos.addScaledVector(this.axis, -this.throwLength + intersections[0].distance); \n }\n }\n \n }\n this.plunger.position.copy(newPos);\n return this.pressed;\n }", "title": "" }, { "docid": "4928c4da4e5740ac22595d271575013a", "score": "0.48406437", "text": "function checkScrollState (items) {\n items.forEach((item) => {\n // don't bother running if it's already active and keep-active is set:\n if (!item.isKeepingActive || !item.classList.contains('is-active')) {\n // get the items current top position:\n item.currentPxFromTop = item.getBoundingClientRect().top\n\n // get the height of the offsetEl\n if (typeof item.offsetEl !== 'undefined') { item.manualOffset = item.offsetEl.offsetHeight }\n if (item.isActivatingAtBottom) {\n item.offset = item.manualOffset - item.offsetHeight\n } else {\n item.offset = item.manualOffset\n }\n\n // is executing at the top of the viewport:\n if (item.hasViewportActivatingAtTop) {\n if (item.currentPxFromTop <= item.offset) {\n changeState.call(item, 'activate')\n } else {\n changeState.call(item, 'deactivate')\n }\n } else { // is executing at the bottom of the viewport:\n // take the items pixels from top, minus the height of the viewport, minus any manual Offset:\n if (item.currentPxFromTop - item.offset < w.innerHeight) {\n changeState.call(item, 'activate')\n } else {\n changeState.call(item, 'deactivate')\n }\n }\n\n if (item.scrollOverItem) {\n item.scrollOverItem.currentPxFromTop =\n item.scrollOverItem.getBoundingClientRect().top\n item.scrollOverItem.currentPxFromBottom =\n item.scrollOverItem.currentPxFromTop + item.scrollOverItem.offsetHeight\n // the decimal values are to not start or finish unless we're in the zone a little bit extra\n if (item.currentPxFromTop < item.scrollOverItem.currentPxFromBottom - item.scrollOverItem.offsetHeight * 0.1 &&\n item.currentPxFromTop > item.scrollOverItem.currentPxFromTop) {\n // we're in the middle zone, so we have to figure out how far we are\n // so we could either do it from the bottom or the top\n let diffFromTop = item.currentPxFromTop - item.scrollOverItem.currentPxFromTop -\n item.scrollOverItem.offsetHeight * 0.15\n let ratioFromTop = diffFromTop / (item.scrollOverItem.offsetHeight - item.scrollOverItem.offsetHeight * 0.15)\n item.scrollOverItem.style.opacity = ratioFromTop\n // so now we have ratioFromTop\n } else {\n item.scrollOverItem.style.opacity = 1\n }\n }\n }\n })\n }", "title": "" }, { "docid": "f53898fdfcfe0dd77a926f1a2fc4f7a4", "score": "0.48384926", "text": "function clickTriggerScrollArrows(value){\n\n if(value == \"up\"){\n console.log(\"UP Arrow Clicked\");\n //Up window on MAP clicked\n if(newSpotY > 1 && newSpotX == CENTER_SPOT[0]){\n --newSpotY;\n updateArrowColor()\n updateDesiredMapDot();\n setMapColor(\"des\");\n scrollUp(newSpotY);\n\n }\n } else\n\n if(value == \"down\"){\n console.log(\"Down Arrow Clicked\");\n if(newSpotY < WINDOWS_VERTICAL && newSpotX == CENTER_SPOT[0]){\n ++newSpotY;\n updateArrowColor()\n updateDesiredMapDot();\n setMapColor(\"des\");\n scrollDown(newSpotY);\n }\n } else\n\n if(value == \"left\"){\n console.log(\"Left Arrow Clicked\");\n if(newSpotX > 1 && newSpotY == CENTER_SPOT[1]){\n --newSpotX;\n updateArrowColor()\n updateDesiredMapDot();\n setMapColor(\"des\");\n scrollLeft(newSpotX);\n }\n } else\n\n if(value == \"right\"){\n console.log(\"Right Arrow Pressed\");\n if(newSpotX < WINDOWS_ACROSS && newSpotY == CENTER_SPOT[1]){\n ++newSpotX;\n updateArrowColor()\n updateDesiredMapDot();\n setMapColor(\"des\");\n scrollRight(newSpotX);\n }\n }\n\n\n}", "title": "" }, { "docid": "6e3a10c6e2fdf1a53e465d090d450825", "score": "0.48068008", "text": "measureContextMenuAnchorPosition() {\n if (!this.state.isPopoverVisible) {\n return;\n }\n this.getContextMenuMeasuredLocation().then(({x, y}) => {\n if (!x || !y) {\n return;\n }\n this.setState(prev => ({\n popoverAnchorPosition: {\n horizontal: prev.cursorRelativePosition.horizontal + x,\n vertical: prev.cursorRelativePosition.vertical + y,\n },\n }));\n });\n }", "title": "" }, { "docid": "f3afb4661c4d51a2f145272d9d05191b", "score": "0.48016444", "text": "function isMovementValidForChange() {\n\n var slides = g_parent.getSlidesReference();\n\n //check position, if more then half, move\n var diffPos = getDiffPosFromCurrentItem(slides);\n\n var breakSize = Math.round(slides.objCurrentSlide.width() * 3 / 8);\n\n if (Math.abs(diffPos) >= breakSize)\n return (true);\n\n //check gesture, if vertical mostly then not move\n var diffX = Math.abs(g_temp.lastMouseX - g_temp.startMouseX);\n var diffY = Math.abs(g_temp.lastMouseY - g_temp.startMouseY);\n\n //debugLine(\"diffx: \" + diffX, true, true);\n\n if (diffX < 20)\n return (false);\n\n //if(diffY >= diffX)\n //return(false);\n\n //check time. Short time always move\n var endTime = jQuery.now();\n var diffTime = endTime - g_temp.startTime;\n\n //debugLine(\"time: \" + diffTime, true);\n\n if (diffTime < 500)\n return (true);\n\n\n return (false);\n }", "title": "" }, { "docid": "207e8370a48bdfbda57049eeee4df4f4", "score": "0.47971535", "text": "function activateBelow(event)\n{\n var classes = ['slot', 'shift', 'column'];\n var target = document.elementFromPoint(event.clientX, event.clientY);\n\n // Stop looping once we've reached the bottom of the document\n if(target == document.body)\n {\n return;\n }\n\n $(target).style({'pointer-events': 'none'});\n ignored.push(target);\n\n if($(target).hasClass(classes.join(' '), 'or'))\n {\n $(target).addClass('active');\n }\n\n // Special case to activate times for columns\n if($(target).hasClass('column'))\n {\n var index = $(target).index();\n $('.time').eq(index).addClass('active');\n }\n\n activateBelow(event);\n}", "title": "" }, { "docid": "1cc28c4a4bac6d3b7ca99566d5cdf6b4", "score": "0.47965935", "text": "function gpSwitchNavPosition() {\n\t\t$( '#gp-main-nav .menu > li.gp-standard-menu' ).each( function() {\n\t\t\t$( this ).on( 'mouseenter mouseleave', function(e) {\n\t\t\t\tif ( $( this ).find( 'ul' ).length > 0 ) {\n\t\t\t\t\tvar menuElement = $( 'ul:first', this ),\n\t\t\t\t\t\tpageWrapper = $( '#gp-main-header .gp-container' ),\n\t\t\t\t\t\tpageWrapperOffset = pageWrapper.offset(),\n\t\t\t\t\t\tmenuOffset = menuElement.offset(),\n\t\t\t\t\t\tmenuLeftOffset = menuOffset.left - pageWrapperOffset.left,\n\t\t\t\t\t\tpageWrapperWidth = pageWrapper.width();\n\t\t\t\t\t\tif ( $( this ).hasClass( 'gp-dropdowncart-menu' ) ) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar menuWidth = menuElement.width();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvar menuWidth = menuElement.width() + 200;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar isEntirelyVisible = ( menuLeftOffset + menuWidth <= pageWrapperWidth );\t\n\t\t\t\t\tif ( ! isEntirelyVisible ) {\n\t\t\t\t\t\t$( this ).addClass( 'gp-nav-edge' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$( this ).removeClass( 'gp-nav-edge' );\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t});\n\t\t});\t\n\t}", "title": "" }, { "docid": "d7e022e3524fba5f577e4bd3c2292cfb", "score": "0.477966", "text": "function ra() {\n if (da()) {\n var a = Y - q / 2,\n b = Z - r / 2;\n if (enable_logic || !(64 > a * a + b * b)) {\n // Mouse position is sufficiently off center.\n // Or we're using enable_logic.\n\n .01 > Math.abs(Jb - va) && .01 > Math.abs(Kb - wa) ||\n // va == Jb and wa == Kb, so proceed if va != Jb or wa != Kb.\n // I think that means, the target position is different\n // from the previous target position (which we set now).\n\n // Send a request to update the target position.\n (Jb = va, Kb = wa, a = V(13), a.setUint8(0, 16), a.setInt32(1, va, !0), a.setInt32(5, wa, !0), a.setUint32(9, 0, !0), W(a))\n }\n }\n }", "title": "" }, { "docid": "07f83a8a310963fc4012d649a953200c", "score": "0.47788095", "text": "menuScroll(type) {\n let currTop = parseFloat($(\".left-wrap\").css('top')); //菜单wrap的top值\n let upArrowHei = parseFloat($(\".left-scrollTop\").css('height')); //向上箭头的高度\n let menuItemHei = parseFloat($(\".dropdown\").css('height')); //菜单项的高度\n\n if (type == \"top\") {\n if (Math.abs(currTop) > upArrowHei) {//至少要有一个菜单项\n $(\".left-wrap\").css('top', (currTop + menuItemHei) + 'px');\n } else {\n $(\".left-wrap\").css('top', upArrowHei + 'px');\n }\n } else {\n if (Math.abs(currTop) < (parseFloat($(\".left-wrap\").css('height')) - menuItemHei - upArrowHei)) {//至少要有一个菜单项\n $(\".left-wrap\").css('top', (currTop - menuItemHei) + 'px');\n }\n }\n }", "title": "" }, { "docid": "3cc89bf078c61e6d48ee3587d3fa7efe", "score": "0.4749486", "text": "function positionMenu(e) {\n var clickedPosition = getPosition(e);\n \n // TODO: CHECK IF THIS IS FINE OR NOT (windowWIDTH)\n var windowWidth = window.innerWidth;\n var windowHeight = window.innerHeight;\n\n windowWidth = state.svg.width.baseVal.value;\n windowHeight = state.svg.height.baseVal.value;\n\n var contextMenuWidth = state.contextMenu.offsetWidth;\n var contextMenuHeight = state.contextMenu.offsetHeight;\n\n if ((windowWidth - clickedPosition.x) < contextMenuWidth) {\n clickedPosition.x -= contextMenuWidth;\n }\n if ((windowHeight - clickedPosition.y) < contextMenuHeight) {\n clickedPosition.y -= contextMenuHeight;\n } \n\n state.contextMenuPosition = clickedPosition;\n state.contextMenuPosition.xpx = state.contextMenuPosition.x + \"px\";\n state.contextMenuPosition.ypx = state.contextMenuPosition.y + \"px\";\n\n state.contextMenu.style.left = state.contextMenuPosition.xpx;\n state.contextMenu.style.top = state.contextMenuPosition.ypx;\n\n}", "title": "" }, { "docid": "6cc057aa68716a0433c52586ae10c9da", "score": "0.47477314", "text": "check_levelup() {\n let levelGains = 0;\n while (this._xpToNext <= 0) {\n levelGains += 1;\n this._xpToNext += Data_VTuber.List.getById(this.DataID).XPCurve(this._level);\n }\n this._level += levelGains;\n this.GainedLevel.raise(new LevelUpEvent(this, levelGains));\n }", "title": "" }, { "docid": "f131b0d2322a62a312b51aa4340be0d1", "score": "0.4744638", "text": "calculate_movement() {\n let rounded_number = round(this.line_degrees / 36)\n let number = this.line_degrees / 36\n if (number < rounded_number) {\n if (number + 0.1 >= rounded_number) {\n if (rounded_number == 10) rounded_number = 0\n this.add_movement(this.direction, rounded_number)\n }\n else this.reset()\n }\n else if (number > rounded_number) {\n if (number - 0.1 <= rounded_number) {\n if (rounded_number == 10) rounded_number = 0\n this.add_movement(this.direction, rounded_number)\n }\n else this.reset()\n }\n else this.add_movement(this.direction, rounded_number)\n }", "title": "" }, { "docid": "5edb054888fbf95f94da42ba64b735d0", "score": "0.4732292", "text": "updateMovement() {\n const { step, path } = this;\n\n if (path[step][0] < path[step - 1][0]) {\n this.performAction(Module.Orientation.Left, Module.Actions.Walk);\n }\n\n if (path[step][0] > path[step - 1][0]) {\n this.performAction(Module.Orientation.Right, Module.Actions.Walk);\n }\n\n if (path[step][1] < path[step - 1][1]) {\n this.performAction(Module.Orientation.Up, Module.Actions.Walk);\n }\n\n if (path[step][1] > path[step - 1][1]) {\n this.performAction(Module.Orientation.Down, Module.Actions.Walk);\n }\n }", "title": "" }, { "docid": "2a9105f201226ad77ff1909a7f601680", "score": "0.47317785", "text": "function menu_nav_up(){\n\n\t//If the actual element is not the last one\n\tif(element != lastElement){\n\t\t//Change the focus calling change_focus_carrusel\n\t\tchange_focus_carrusel(\"up\");\n\t\t//Move the carrusel up and call change_content after that.\n\t\t$('#option-list').animate({\n\t\t\t\"margin-top\": '-=106',\n\t\t}, 200, change_content);\n\t\t//If now element is the lastElement, remove the navigation arrow.\n\t\tif(element==lastElement){\n\t\t\t$(\".arrow-down\").css(\"display\",\"none\");\n\t\t}\n\t\t//Show the other navigation arrow.\n\t\t$(\".arrow-up\").css(\"display\",\"block\")\n\t}\n}", "title": "" }, { "docid": "8cb3d38e7830ae0e5d057b57e09d8f76", "score": "0.47299242", "text": "function cmMoveSubMenu (obj, isMain, subMenu, menuInfo)\n{\n\tvar orient = menuInfo.orient;\n\n\tvar offsetAdjust;\n\n\tif (isMain)\n\t{\n\t\tif (orient.charAt (0) == 'h')\n\t\t\toffsetAdjust = menuInfo.nodeProperties.offsetHMainAdjust;\n\t\telse\n\t\t\toffsetAdjust = menuInfo.nodeProperties.offsetVMainAdjust;\n\t}\n\telse\n\t\toffsetAdjust = menuInfo.nodeProperties.offsetSubAdjust;\n\n\tif (!isMain && orient.charAt (0) == 'h')\n\t\torient = 'v' + orient.charAt (1) + orient.charAt (2);\n\n\tvar mode = String (orient);\n\tvar p = subMenu.offsetParent;\n\tvar subMenuWidth = cmGetWidth (subMenu);\n\tvar horiz = cmGetHorizontalAlign (obj, mode, p, subMenuWidth);\n\tif (mode.charAt (0) == 'h')\n\t{\n\t\tif (mode.charAt (1) == 'b')\n\t\t\tsubMenu.style.top = (cmGetYAt (obj, p) + cmGetHeight (obj) + offsetAdjust[1]) + 'px';\n\t\telse\n\t\t\tsubMenu.style.top = (cmGetYAt (obj, p) - cmGetHeight (subMenu) - offsetAdjust[1]) + 'px';\n\t\tif (horiz == 'r')\n\t\t\tsubMenu.style.left = (cmGetXAt (obj, p) + offsetAdjust[0]) + 'px';\n\t\telse\n\t\t\tsubMenu.style.left = (cmGetXAt (obj, p) + cmGetWidth (obj) - subMenuWidth - offsetAdjust[0]) + 'px';\n\t}\n\telse\n\t{\n\t\tif (horiz == 'r')\n\t\t\tsubMenu.style.left = (cmGetXAt (obj, p) + cmGetWidth (obj) + offsetAdjust[0]) + 'px';\n\t\telse\n\t\t\tsubMenu.style.left = (cmGetXAt (obj, p) - subMenuWidth - offsetAdjust[0]) + 'px';\n\t\tif (mode.charAt (1) == 'b')\n\t\t\tsubMenu.style.top = (cmGetYAt (obj, p) + offsetAdjust[1]) + 'px';\n\t\telse\n\t\t\tsubMenu.style.top = (cmGetYAt (obj, p) + cmGetHeight (obj) - cmGetHeight (subMenu) + offsetAdjust[1]) + 'px';\n\t}\n\n\t// IE specific iframe masking method\n\t/*@cc_on\n\t\t@if (@_jscript_version >= 5.5)\n\t\t\tif (menuInfo.nodeProperties.cmFrameMasking)\n\t\t\t{\n\t\t\t\tif (!subMenu.cmFrameObj)\n\t\t\t\t{\n\t\t\t\t\tvar frameObj = cmAllocFrame ();\n\t\t\t\t\tsubMenu.cmFrameObj = frameObj;\n\t\t\t\t}\n\n\t\t\t\tvar frameObj = subMenu.cmFrameObj;\n\t\t\t\tframeObj.style.zIndex = subMenu.style.zIndex - 1;\n\t\t\t\tframeObj.style.left = (cmGetX (subMenu) - cmGetX (frameObj.offsetParent)) + 'px';\n\t\t\t\tframeObj.style.top = (cmGetY (subMenu) - cmGetY (frameObj.offsetParent)) + 'px';\n\t\t\t\tframeObj.style.width = cmGetWidth (subMenu) + 'px';\n\t\t\t\tframeObj.style.height = cmGetHeight (subMenu) + 'px';\n\t\t\t\tframeObj.style.display = 'block';\n\t\t\t}\n\t\t@end\n\t@*/\n\tif (horiz != orient.charAt (2))\n\t\torient = orient.charAt (0) + orient.charAt (1) + horiz;\n\treturn orient;\n}", "title": "" }, { "docid": "415659dfa1bde9273e224086c1ae8841", "score": "0.4727515", "text": "mouseUp(row, col) {\n //end moving start node and update start node to new coordinates\n const { moveStart, moveEnd } = this.state;\n if (moveStart) {\n this.setState({ moveStart: false });\n this.setState(prevState => ({\n startNode: {\n ...prevState.startNode,\n row: row,\n col: col\n }\n }));\n //end moving end node and update end node to new coordinates\n } else if (moveEnd) {\n this.setState({ moveEnd: false });\n this.setState(prevState => ({\n endNode: {\n ...prevState.endNode,\n row: row,\n col: col\n }\n }));\n } else {\n this.setState({ drawWall: false });\n }\n }", "title": "" }, { "docid": "ae6643ef577837cb2f0e610e6381843e", "score": "0.47266972", "text": "function check_if_line_touches() {\n\tvar nav_height = $nav_bar.outerHeight();\n\tvar nav_top_position = $window.scrollTop();\n\tvar nav_bottom_position = (nav_top_position + nav_height);\n\tvar $element = $home_line;\n\tvar element_top_position = $element.scrollTop();\n\n\tif (element_top_position <= nav_bottom_position) {\n\t\t$stand_in.show();\n\t} else if (element_top_position <= origin_top) {\n\t\t$stand_in.hide();\n\t}\n}", "title": "" }, { "docid": "76b4e68544dc9e5bced2ae9dfd0c11ab", "score": "0.4723958", "text": "function isTrueTop(elevations_arr, maxHeight, rowPeak, colPeak) {\n var directions = [[-1, 0], [0, 1], [1, 0], [0, -1]]; // 0: up 1: left 2: down 3: right\n var abortR = false;\n\n var visited = elevations_arr.map(x => x.slice());\n var safety = 999; // Prevents infinite loop in case there is no route.\n\n startScoutingAnt(rowPeak, colPeak);\n\n\n function startScoutingAnt(rowPeak, colPeak) {\n visited[rowPeak][colPeak] = \"V\";\n scoutingAnt(0, rowPeak, colPeak);\n scoutingAnt(1, rowPeak, colPeak);\n scoutingAnt(2, rowPeak, colPeak);\n scoutingAnt(3, rowPeak, colPeak);\n }\n\n function scoutingAnt(dir, rowPeak, colPeak) {\n\n safety--;\n\n if (!abortR && safety >= 0) {\n\n let rCurrentPos = rowPeak + directions[dir][0];\n let cCurrentPos = colPeak + directions[dir][1];\n\n if (rCurrentPos >= 0 && cCurrentPos >= 0 && rCurrentPos <\n elevations_arr.length && cCurrentPos < elevations_arr[0].length) {\n\n let currentElev = elevations_arr[rCurrentPos][cCurrentPos];\n let tileVisited = visited[rCurrentPos][cCurrentPos];\n\n if (currentElev >= maxHeight && tileVisited != \"V\") {\n abortR = true;\n\n }\n else if (currentElev > 0 && tileVisited != \"V\") {\n\n\n visited[rCurrentPos][cCurrentPos] = \"V\";\n\n\n if (dir === 0 || dir === 2) {\n scoutingAnt(dir, rCurrentPos, cCurrentPos);\n scoutingAnt(1, rCurrentPos, cCurrentPos);\n scoutingAnt(3, rCurrentPos, cCurrentPos);\n }\n else if (dir === 1 || dir === 3) {\n scoutingAnt(dir, rCurrentPos, cCurrentPos);\n scoutingAnt(0, rCurrentPos, cCurrentPos);\n scoutingAnt(2, rCurrentPos, cCurrentPos);\n }\n }\n }\n }\n }\n return !abortR;\n }", "title": "" }, { "docid": "8dd3b25671af3ccedadc8bb68f4a9d5e", "score": "0.47237733", "text": "function determineMouseDirection() {\n if (mouseY < oldy) {\n direction = \"up\";\n } else if (mouseY > oldy) {\n direction = \"down\";\n }\n oldy = mouseY;\n}", "title": "" }, { "docid": "698684f2dc3e42c199f0096749013d04", "score": "0.46990043", "text": "function menuHoverSelectTest(location, boundingCorner, boundingSize, wasHovered) {\n\tif(wasHovered) {\n\t\tif(boundingCorner.y<=location.y && location.y <= boundingCorner.y+boundingSize.y){\n\t\t\tif(location.x+2<=boundingCorner.x)return 1;\n\t\t\telse return 0;\n\t\t}\n\t}else {\n\t\tif( (boundingCorner.x<=location.x && location.x <= boundingCorner.x+boundingSize.x)\n\t\t\t&& (boundingCorner.y<=location.y && location.y <= boundingCorner.y+boundingSize.y) ){\n\t\t\treturn 0;\n\t\t}else {\n\t\t\treturn -1;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "75af182cc5bb04123a4fb255ccf7f387", "score": "0.46930695", "text": "function mousePressed(){\n // Move Down\n if (mouseX < (Canvas_x *2 / 3) && mouseX > (Canvas_x / 3) && mouseY > (Canvas_y * 2 / 3) && direction[1] != -1){\n direction = [0, 1];\n \n // Move Up\n } else if (mouseX < (Canvas_x *2 / 3) && mouseX > (Canvas_x / 3) && mouseY < (Canvas_y / 3) && direction[1] != 1){\n direction = [0, -1];\n \n // Move Left\n } else if (mouseY < (Canvas_y *2 / 3) && mouseY > (Canvas_y / 3) && mouseX < (Canvas_x / 3) && direction[0] != 1){\n direction = [-1, 0];\n \n // Move Right \n } else if (mouseY < (Canvas_y *2 / 3) && mouseY > (Canvas_y / 3) && mouseX > (Canvas_x * 2 / 3) && direction[0] != -1){\n direction = [1, 0];\n }\n}", "title": "" }, { "docid": "c0f4b2b1c44dc0f3d4d3c6e48e148d03", "score": "0.4684684", "text": "function controlMenu(frame) {\n\t\tif (frame.hands.length > 0 && frame.hands[0].type == \"right\" && menumode == true) {\n\t\t\tvar roll = frame.hands[0].roll()* 180/Math.PI; // hand rotation around leap z axis in degrees\n\t\t\tif (roll > 0 && roll < 90) {\n\t\t\t\tcurMenuItem = 0; \n\t\t\t} else if (0 > roll && roll > -90) {\n\t\t\t\tcurMenuItem = 1;\n\t\t\t}\n\t\t\t\n\t\t\tif (prevMenuItem == null) {\n\t\t\t\tprevMenuItem = curMenuItem;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\n\t\t\t$(menuItems[prevMenuItem]).css({\"opacity\": \"1\", \"box-shadow\":\"none\"});\n\t\t\t$(menuItems[curMenuItem]).css({\"opacity\": \"0.8\", \"box-shadow\": \"0px 0px 5px 3px #FFFFFF inset\"}); // highlight currently selected menu item\n\n\t\t\t\n\t\t\tif (menuItems[curMenuItem].id == \"poi\" && poi_tooltip == false) {\n\t\t\t\tpoi_tooltip = true;\n\t\t\t\t$('#lm').tooltip('show');\n\t\t\t} else if (menuItems[curMenuItem].id != \"poi\" && poi_tooltip == true) {\n\t\t\t\tpoi_tooltip = false;\n\t\t\t\t$('#lm').tooltip('hide');\n\t\t\t}\n\t\t\t\n\t\t\t// if POI creation is selected by pinching\n\t\t\tif (menuItems[curMenuItem].id == \"poi\" && frame.hands[0].pinchStrength > 0.9) {\t\n\t\t\t\t$.fn.ferroMenu.toggleMenu(\"#nav\"); // close menu -> map interaction is enabled\n\t\t\t\tPOI = new L.marker(self.map.getCenter());\n\t\t\t\tpois.addLayer(POI);\n\t\t\t\tsettingPOI = true;\n\t\t\t} else if (menuItems[curMenuItem].id == \"story\" && frame.hands[0].pinchStrength > 0.9) {\n\t\t\t\t$.fn.ferroMenu.toggleMenu(\"#nav\");\n\t\t\t\tcreate_story();\n\t\t\t}\n\t\t\tprevMenuItem = curMenuItem;\n\t\t}\n\t}", "title": "" }, { "docid": "f64cb68f7415a2e5fca8eb4be78b81fd", "score": "0.46677685", "text": "function menuItem_mouseover(id) {\n\t// Clear timer to avoid collapse of all menus.\n\tclearTimeout(timer);\n\n\tvar currMenuItem = menuItems[id];\n\tvar currMenu = currMenuItem.menu;\n\tvar obj = currMenuItem.obj;\n\n\tcurrMenu.setActiveMenuItem(currMenuItem);\n\n\t// If another subMenu is open for the current menu, close it.\n\tif (currMenu.openSubMenu) {\n\t\tcurrMenu.openSubMenu.hide();\n\t\tcurrMenu.openSubMenu = null;\n\t}\n\n\t// If there is a subMenu associated with this menuItem, open it.\n\tif (currMenuItem.subMenu) {\n\t\tif (currMenuItem.subMenu.width <= 0 || currMenuItem.subMenu.height <= 0) {\n\t\t\tcurrMenuItem.subMenu.calculateDimensions();\n\t\t}\n\n\t\t// Determine position for subMenu based on position of menuItem and current menu's direction.\n\n\t\tvar left, top, z_index;\n\t\t\n\t\tvar objLeft, objTop, objWidth, objHeight, objZIndex;\n\t\tvar pageLeft, pageRight, pageTop, pageBottom;\n\t\t\n\t\tif (isIE) {\n\t\t\tobjLeft = obj.style.pixelLeft;\n\t\t\tobjTop = obj.style.pixelTop;\n\t\t\tobjWidth = obj.offsetWidth;\n\t\t\tobjHeight = obj.offsetHeight;\n\t\t\tobjZIndex = obj.style.zIndex;\n\t\t\tpageLeft = document.body.scrollLeft;\n\t\t\tpageRight = document.body.clientWidth + document.body.scrollLeft;\n\t\t\tpageTop = document.body.scrollTop;\n\t\t\tpageBottom = document.body.clientHeight + document.body.scrollTop;\n\t\t\t} else if (isNav) {\n\t\t\tobjLeft = obj.left;\n\t\t\tobjTop = obj.top;\n\t\t\tobjWidth = obj.clip.width;\n\t\t\tobjHeight = obj.clip.height;\n\t\t\tobjZIndex = obj.zIndex;\n\t\t\tpageLeft = pageXOffset;\n\t\t\tpageRight = window.innerWidth + pageXOffset;\n\t\t\tpageTop = pageYOffset;\n\t\t\tpageBottom = window.innerHeight + pageYOffset;\n\t\t}\n\n\t\t//if (currMenu.direction == \"right\" && (objLeft + objWidth - 4 + currMenuItem.subMenu.width > pageRight)) {\n\t\tif (currMenu.direction == \"right\" && (objLeft + 80 + currMenuItem.subMenu.width > pageRight) && (objLeft - 80 + objWidth - currMenuItem.subMenu.width >= pageLeft)) {\n\t\t\tcurrMenu.direction = \"left\";\n\t\t//} else if (currMenu.direction == \"left\" && (objLeft + 4 - currMenuItem.subMenu.width < pageLeft)) {\n\t\t} else if (currMenu.direction == \"left\" && (objLeft -80 < pageLeft) && (objLeft + 80 + currMenuItem.subMenu.width <= pageRight)) {\n\t\t\tcurrMenu.direction = \"right\";\n\t\t}\n\t\t\t\n\t\tcurrMenuItem.subMenu.direction = currMenu.direction;\n\t\t\t\n\t\tif (currMenu.direction == \"right\") {\n\t\t\t//left = objLeft + objWidth - 4;\n\t\t\tleft = objLeft + 80;\n\t\t} else {\n\t\t\t//left = objLeft + 4 - currMenuItem.subMenu.width;\n\t\t\tleft = objLeft - 80 + objWidth - currMenuItem.subMenu.width;\n\t\t}\n\t\t\n\t\ttop = objTop + 20;\n\t\t\n\t\twhile (top + currMenuItem.subMenu.height > pageBottom && top - objHeight + currMenuItem.borderwidth > pageTop) {\n\t\t\ttop -= objHeight - currMenuItem.borderwidth;\n\t\t}\n\n//\t\tif (top + currMenuItem.subMenu.height > pageBottom) {\n//\t\t\ttop -= currMenuItem.subMenu.height - objHeight + 8; \n//\t\t}\n\t\tz_index = objZIndex + 1;\n\t\n\t\tcurrMenuItem.subMenu.expand(left, top, z_index);\n\t\tcurrMenuItem.subMenu.show();\n\t\tcurrMenu.openSubMenu = currMenuItem.subMenu;\n\t\t\n\t}\n}", "title": "" }, { "docid": "93a8797def5f76f9d02b44fce90b7f1d", "score": "0.46665543", "text": "mouseLocation(){\n var distance = dist(this.x, this.y, mouseX, mouseY);\n var vectorNew;\n if(distance <= width * 0.25){\n var dirX = this.x - mouseX;\n var dirY = this.y - mouseY;\n var vectorAdd = unitVector(dirX, dirY);\n vectorNew = unitVector(2 * vectorAdd[0] + this.dx, 2 * vectorAdd[1] + this.dy);\n this.dx = vectorNew[0] * this.speed * 3;\n this.dy = vectorNew[1] * this.speed * 3;\n }else{\n vectorNew = unitVector(this.dx, this.dy);\n this.dx = vectorNew[0] * this.speed;\n this.dy = vectorNew[1] * this.speed;\n }\n }", "title": "" }, { "docid": "9dd6eb12b8b85a2c6360ec70ca6126a7", "score": "0.46627676", "text": "function pathing() {\n let start = map.CHAR_START_POS.split('-');\n let end = mousePOS.split('-');\n curPOS = map.CHAR_START_POS.split('-');\n curPOS[0] = +curPOS[0];\n curPOS[1] = +curPOS[1];\n start[0] = +start[0];\n start[1] = +start[1];\n end[0] = +end[0];\n end[1] = +end[1];\n let vDist = 0;\n let hDist = 0;\n let direction = ['v', 'h'];\n\n //find direction to travel\n //vertical check\n if (start[0] >= end[0]) {\n vDist = start[0] - end[0];\n direction[0] = 'u';\n } else {\n vDist = end[0] - start[0];\n direction[0] = 'd';\n }\n\n //horizontal check\n if (start[1] >= end[1]) {\n hDist = start[1] - end[1];\n direction[1] = 'l';\n } else {\n hDist = end[1] - start[1];\n direction[1] = 'r';\n }\n // console.log(`direction = ${direction[0]}${direction[1]}`);\n\n //clear previous highlighted divs\n $('td').attr('bgcolor', 'white');\n\n //move straight\n //find longest stretch(vertically or horizontally)\n //move horizontal to diagonal\n if (vDist >= hDist) {\n //highlight vertical to diagonal\n // console.log('vertical is longer');\n if (direction[0] === 'u') {\n for (let i = start[0]; i >= start[0] + (hDist - vDist); i--) {\n curPOS[0] = i;\n $(`#${i}-${start[1]}`).attr('bgcolor', 'yellow');\n }\n } else {\n for (let i = start[0]; i <= start[0] + vDist - hDist; i++) {\n curPOS[0] = i;\n $(`#${i}-${start[1]}`).attr('bgcolor', 'yellow');\n }\n }\n } else {\n //highlight horizontal to diagonal\n // console.log('horizontal is longer');\n if (direction[1] === 'r') {\n for (let i = start[1]; i <= start[1] + (hDist - vDist); i++) {\n curPOS[1] = i;\n $(`#${start[0]}-${i}`).attr('bgcolor', 'yellow');\n }\n } else {\n for (let i = start[1]; i >= start[1] - (hDist - vDist); i--) {\n curPOS[1] = i;\n $(`#${start[0]}-${i}`).attr('bgcolor', 'yellow');\n }\n }\n }\n\n //Up and Left\n if (direction[0] === 'u' && direction[1] === 'l') {\n let k = 0;\n for (let v = curPOS[0]; v > end[0]; v--) {\n //up\n $(`#${v}-${curPOS[1] + k}`).attr('bgcolor', 'yellow');\n k--;\n //left\n $(`#${v}-${curPOS[1] + k}`).attr('bgcolor', 'yellow');\n }\n }\n\n //Up and Right\n if (direction[0] === 'u' && direction[1] === 'r') {\n let k = 0;\n for (let v = curPOS[0]; v > end[0]; v--) {\n //up\n $(`#${v}-${curPOS[1] + k}`).attr('bgcolor', 'yellow');\n k++;\n //right\n $(`#${v}-${curPOS[1] + k}`).attr('bgcolor', 'yellow');\n }\n }\n\n //Down and Left\n if (direction[0] === 'd' && direction[1] === 'l') {\n let k = 0;\n for (let v = curPOS[0]; v < end[0]; v++) {\n //up\n $(`#${v}-${curPOS[1] - k}`).attr('bgcolor', 'yellow');\n k++;\n //right\n $(`#${v}-${curPOS[1] - k}`).attr('bgcolor', 'yellow');\n }\n }\n\n //Down and Right\n if (direction[0] === 'd' && direction[1] === 'r') {\n let k = 0;\n for (let v = curPOS[0]; v < end[0]; v++) {\n //up\n $(`#${v}-${curPOS[1] + k}`).attr('bgcolor', 'yellow');\n k++;\n //right\n $(`#${v}-${curPOS[1] + k}`).attr('bgcolor', 'yellow');\n }\n }\n\n //set end as current position of character\n curPOS[0] = end[0];\n curPOS[1] = end[1];\n\n $(`#${start[0]}-${start[1]}`).attr('bgcolor', 'green');\n $(`#${end[0]}-${end[1]}`).attr('bgcolor', 'red');\n\n movPlayer();\n}", "title": "" }, { "docid": "8c83d36daf983292e276b2cc148302ea", "score": "0.4661028", "text": "function getYmovement(destiny){\n var fromIndex = index($(SECTION_ACTIVE_SEL)[0], SECTION_SEL);\n var toIndex = index(destiny, SECTION_SEL);\n if( fromIndex == toIndex){\n return 'none';\n }\n if(fromIndex > toIndex){\n return 'up';\n }\n return 'down';\n }", "title": "" }, { "docid": "2a685fe2eae5fb76d6f061274b646d82", "score": "0.46569172", "text": "function drawMenu () {\n if (gameState === 0) {\n if (menuRoom !== 2) {\n tutstart = false\n }\n if (menuRoom === 0) {\n background(140, 140, 140)\n noStroke()\n fill(0, 0, 0)\n rect(0, 0, 600, 5)\n rect(0, 0, 5, 600)\n rect(0, 595, 600, 5)\n rect(595, 0, 5, 600)\n textAlign(CENTER, CENTER)\n textSize(50)\n fill(0, 0, 0)\n text(\"Dot Dead 2\", 300, 100 + textShift)\n textSize(15)\n text(\"Daniel L. Hensler\", 300, 140 + textShift)\n if (mouseX >= 150 && mouseX <= 450 && mouseY >= 175 && mouseY <= 275 && !isTransitioning) {\n fill(255, 255, 255, 5)\n for(let i = 0 + calcDist(mouseX, mouseY, mouseX, 225);i < 100;i += 2) {\n ellipse(300, 225, 3.5*i, 0.75*i)\n }\n }\n if (mouseX >= 175 && mouseX <= 425 && mouseY >= 250 && mouseY <= 350 && !isTransitioning) {\n fill(255, 255, 255, 5)\n for(let i = 0 + calcDist(mouseX, mouseY, mouseX, 300);i < 100;i += 2) {\n ellipse(300, 300, 2.5*i, 0.75*i)\n }\n }\n if (mouseX >= 200 && mouseX <= 400 && mouseY >= 325 && mouseY <= 425 && !isTransitioning) {\n fill(255, 255, 255, 5)\n for(let i = 0 + calcDist(mouseX, mouseY, mouseX, 375);i < 100;i += 2) {\n ellipse(300, 375, 2*i, 0.75*i)\n }\n }\n if (mouseX >= 225 && mouseX <= 375 && mouseY >= 400 && mouseY <= 500 && !isTransitioning) {\n fill(255, 255, 255, 5)\n for(let i = 0 + calcDist(mouseX, mouseY, mouseX, 450);i < 100;i += 2) {\n ellipse(300, 450, 1.8*i, 0.75*i)\n }\n }\n fill(0, 0, 0)\n textAlign(CENTER, CENTER)\n textSize(40)\n text(\"Campaign Mode\", 300, 225)\n text(\"Level Select\", 300, 300)\n text(\"Directions\", 300, 375)\n text(\"Settings\", 300, 450)\n } else if (menuRoom === 1) {\n background(140, 140, 140)\n noStroke()\n fill(0, 0, 0)\n rect(0, 0, 600, 5)\n rect(0, 0, 5, 600)\n rect(0, 595, 600, 5)\n rect(595, 0, 5, 600)\n textAlign(CENTER, CENTER)\n textSize(50)\n fill(0, 0, 0)\n text(\"Level Select\", 300, 100 + textShift)\n if (mouseX >= 200 && mouseX <= 400 && mouseY >= 150 && mouseY <= 200 && !isTransitioning) {\n fill(255, 255, 255, 5)\n for(let i = 0 + calcDist(mouseX, mouseY, mouseX, 175);i < 100;i += 2) {\n ellipse(300, 175, 2*i, 0.5*i)\n }\n }\n fill(0, 0, 0)\n textSize(20)\n text(\"Back to Main Menu\", 300, 175)\n strokeWeight(5)\n stroke(0, 0, 0)\n fill(67, 219, 11)\n if (calcDist(mouseX, mouseY, 300, 300) <= 37 && !isTransitioning) {\n stroke(255, 255, 255)\n fill(186, 15, 15)\n }\n ellipse(300, 300, 75, 75)\n strokeWeight(3)\n fill(251, 255, 0)\n stroke(0, 0, 0)\n if (calcDist(mouseX, mouseY, 300, 300) <= 37 && !isTransitioning) {\n stroke(255, 255, 255)\n fill(0, 0, 0)\n }\n triangle(285, 285, 285, 315, 325, 300)\n fill(67, 219, 11)\n stroke(0, 0, 0)\n if (mouseX >= 200 && mouseX <= 225 && mouseY >= 285 && mouseY <= 315 && !isTransitioning) {\n stroke(255, 255, 255)\n fill(0, 0, 0)\n }\n triangle(225, 285, 225, 315, 200, 300)\n fill(67, 219, 11)\n stroke(0, 0, 0)\n if (mouseX >= 375 && mouseX <= 400 && mouseY >= 285 && mouseY <= 315 && !isTransitioning) {\n stroke(255, 255, 255)\n fill(0, 0, 0)\n }\n triangle(375, 285, 375, 315, 400, 300)\n fill(0, 0, 0)\n noStroke()\n textSize(40)\n text(`Level ${gameLevel}`, 300, 400 - textShift/2)\n } else if (menuRoom === 2) {\n background(200, 200, 200)\n noStroke()\n fill(0, 0, 0)\n rect(0, 0, 600, 5)\n rect(0, 0, 5, 600)\n rect(0, 595, 600, 5)\n rect(595, 0, 5, 600)\n textAlign(CENTER, CENTER)\n textSize(50)\n fill(0, 0, 0)\n text(\"How to play\", 300, 100+textShift)\n textSize(25)\n fill(173, 129, 5)\n let tutorialMessage = \"ERROR\"\n if (tutorialCount === 0) {\n tutorialMessage = \"Hello.\"\n if (tutorialStage === 0) {\n if (tutorialTimer >= 1000) {\n tutorialMessage = \"Umm, please move along now, it's not difficult...\"\n } else if (tutorialTimer >= 500) {\n tutorialMessage = \"Now, please attempt to move using either the WASD keys or the Arrow keys.\"\n } else if (tutorialTimer >= 250) {\n tutorialMessage = \"It is good that you have come to learn...\"\n }\n } else if (tutorialStage === 1) {\n if (tutorialTimer >= 500) {\n tutorialMessage = \"Now please attempt to shoot by clicking, you aim where your mouse is.\"\n } else if (tutorialTimer >= 250) {\n tutorialMessage = \"Now moving is useful, but it is nowhere near enough to survive.\"\n } else if (tutorialTimer >= 0) {\n tutorialMessage = \"Very good...\"\n } else if (tutorialTimer >= -250) {\n tutorialMessage = \"Ah, very eager I see...\"\n }\n } else if (tutorialStage === 2) {\n if (tutorialTimer >= 750) {\n tutorialMessage = \"I will be watching with great interest...\"\n transTo = 0\n menuTo = 0\n brightChange = 1\n slowTrans = true\n isTransitioning = true\n if (!tutSound) {\n playTransL()\n tutSound = true\n leaveTut = true\n }\n } else if (tutorialTimer >= 500) {\n tutorialMessage = \"Go out, prove your worth, defeat your enemies.\"\n } else if (tutorialTimer >= 250) {\n tutorialMessage = \"Now I suppose you are ready...\"\n } else if (tutorialTimer >= 0) {\n tutorialMessage = \"Excellent...\"\n } else if (tutorialTimer >= -250) {\n tutorialMessage = \"I see you're excited...\"\n } else if (tutorialTimer >= -500) {\n tutorialMessage = \"My, that was quick...\"\n }\n } else {\n tutorialMessage = \"I have no clue how you got here. Don't be afraid, I'll send you back.\"\n if (tutorialTimer >= 250) {\n transTo = 0\n menuTo = 0\n isTransitioning = true\n playTrans()\n }\n }\n } else if (tutorialCount === 1) {\n tutorialMessage = \"Welcome back.\"\n if (tutorialStage === 0) {\n if (tutorialTimer >= 1000) {\n tutorialMessage = \"Insert interesting secret dialogue here.\"\n } else if (tutorialTimer >= 500) {\n tutorialMessage = \"You have nothing else to learn, move using WASD or arrow keys\"\n } else if (tutorialTimer >= 250) {\n tutorialMessage = \"Are you here to visit me?\"\n }\n } else if (tutorialStage === 1) {\n if (tutorialTimer >= 500) {\n tutorialMessage = \"Now please shoot your weapon and continue.\"\n } else if (tutorialTimer >= 250) {\n tutorialMessage = \"Someone... that is best forgotten...\"\n } else if (tutorialTimer >= 0) {\n tutorialMessage = \"Now, watching you, you remind me of someone...\"\n } else if (tutorialTimer >= -250) {\n tutorialMessage = \"Oi! Why even visit me if you won't listen to what I have to say?\"\n }\n } else if (tutorialStage === 2) {\n if (tutorialTimer >= 750) {\n tutorialMessage = \"Beware the one who smiles\"\n transTo = 0\n menuTo = 0\n brightChange = 1\n slowTrans = true\n isTransitioning = true\n if (!tutSound) {\n playTransL()\n tutSound = true\n leaveTut = true\n }\n } else if (tutorialTimer >= 500) {\n tutorialMessage = \"Man, this is boring.\"\n } else if (tutorialTimer >= 250) {\n tutorialMessage = \"Yadda yadda, you're ready and stuff.\"\n } else if (tutorialTimer >= 0) {\n tutorialMessage = \"Feel free to visit again some time.\"\n } else if (tutorialTimer >= -250) {\n tutorialMessage = \"My, my, in such a rush.\"\n } else if (tutorialTimer >= -500) {\n tutorialMessage = \"Geez! Why do I even bother? You must have hit it by mistake!\"\n transTo = 0\n menuTo = 0\n isTransitioning = true\n if (!tutSound) {\n playTrans()\n tutSound = true\n }\n }\n } else {\n tutorialMessage = \"I have no clue how you got here. Don't be afraid, I'll send you back.\"\n if (tutorialTimer >= 250) {\n transTo = 0\n menuTo = 0\n isTransitioning = true\n playTrans()\n }\n }\n } else if (tutorialCount === 2) {\n let string = smil\n tutorialMessage = \"...\"\n if (tutorialStage === 1) {\n if (tutorialTimer >= 2000) {\n tutorialMessage = \"Have a nice day.\"\n transTo = 0\n menuTo = 0\n brightChange = 1\n slowTrans = true\n isTransitioning = true\n if (!tutSound) {\n playTransL()\n tutSound = true\n leaveTut = true\n }\n string = blank\n } else if (tutorialTimer >= 1750) {\n tutorialMessage = \"Thank you.\"\n string = blank\n } else if (tutorialTimer >= 1500) {\n tutorialMessage = \"BEGONE!\"\n string = blank\n if (rumble < 0.3) {\n rumble = 0.3\n }\n } else if (tutorialTimer >= 1250) {\n tutorialMessage = \"Rah!\"\n string = frwn\n if (rumble < 3) {\n rumble ++\n }\n dmg.volume = volume/10\n dmg.play()\n } else if (tutorialTimer >= 1000) {\n tutorialMessage = \"Gah!\"\n if (rumble < 1.5) {\n rumble += 0.2\n }\n string = n\n dmg.volume = volume/10\n dmg.play()\n } else if (tutorialTimer >= 750) {\n tutorialMessage = \"I will destroy this... and finally give us peace.\"\n } else if (tutorialTimer >= 500) {\n tutorialMessage = \"Thank you for understanding...\"\n } else if (tutorialTimer >= 250) {\n tutorialMessage = \"That door is not safe... You don't want to know what... WHO is behind that door...\"\n } else if (tutorialTimer >= 0) {\n tutorialMessage = \"Wait! Don't enter that door!\"\n } else if (tutorialTimer >= -250) {\n tutorialMessage = \"WAIT!\"\n }\n }\n image(string, 250, 250, 100, 100)\n if (string === smil && player.x >= 275 && player.x <= 325 && player.y >= 250 && player.y <= 350) {\n location.href = \"Secret/secret.html\"\n }\n } else if (tutorialCount === 3) {\n tutorialMessage = \"Hello once again.\"\n if (tutorialStage === 0) {\n if (tutorialTimer >= 1000) {\n tutorialMessage = \"Oh? You haven't moved? Sorry, please move.\"\n } else if (tutorialTimer >= 500) {\n tutorialMessage = \"You shouldn't have needed to see that.\"\n } else if (tutorialTimer >= 250) {\n tutorialMessage = \"Terribly sorry about all that.\"\n }\n } else if (tutorialStage === 1) {\n if (tutorialTimer >= 500) {\n tutorialMessage = \"Thankfully, we won't ever have to deal with him again.\"\n } else if (tutorialTimer >= 250) {\n tutorialMessage = \"To... HIM...\"\n } else if (tutorialTimer >= 0) {\n tutorialMessage = \"That door... it led somewhere...\"\n } else if (tutorialTimer >= -250) {\n tutorialMessage = \"It's understandable, you don't have to forgive me.\"\n }\n } else if (tutorialStage === 2) {\n if (tutorialTimer >= 750) {\n tutorialMessage = \"Stay safe...\"\n transTo = 0\n menuTo = 0\n brightChange = 1\n slowTrans = true\n isTransitioning = true\n if (!tutSound) {\n playTransL()\n tutSound = true\n leaveTut = true\n }\n } else if (tutorialTimer >= 500) {\n tutorialMessage = \"But I'm rambling, you should be off.\"\n } else if (tutorialTimer >= 250) {\n tutorialMessage = \"It's really sad that he was corrupted so.\"\n } else if (tutorialTimer >= 0) {\n tutorialMessage = \"It truly is a shame, you know?\"\n } else if (tutorialTimer >= -250) {\n tutorialMessage = \"Yes, I know it was bad, but it's over.\"\n } else if (tutorialTimer >= -500) {\n tutorialMessage = \"Yes, I understand... Goodbye...\"\n transTo = 0\n menuTo = 0\n isTransitioning = true\n slowTrans = true\n if (!tutSound) {\n playTransL()\n tutSound = true\n leaveTut = true\n }\n }\n } else {\n tutorialMessage = \"I have no clue how you got here. Don't be afraid, I'll send you back.\"\n if (tutorialTimer >= 250) {\n transTo = 0\n menuTo = 0\n isTransitioning = true\n playTrans()\n }\n }\n } else if (tutorialCount === 4) {\n tutorialMessage = \"Please, just leave me alone...\"\n if (!isTransitioning) {\n transTo = 0\n menuTo = 0\n isTransitioning = true\n slowTrans = true\n if (!tutSound) {\n playTransL()\n tutSound = true\n }\n } \n }\n text(tutorialMessage, 50, 175 - textShift/2, 500)\n drawBullets()\n drawEnemies()\n drawPlayer()\n passTutorial()\n } else if (menuRoom === 3) {\n background(140, 140, 140)\n noStroke()\n fill(0, 0, 0)\n rect(0, 0, 600, 5)\n rect(0, 0, 5, 600)\n rect(0, 595, 600, 5)\n rect(595, 0, 5, 600)\n textAlign(CENTER, CENTER)\n textSize(50)\n fill(0, 0, 0)\n text(\"Settings\", 300, 100)\n rect(100, 150, 400, 5)\n textSize(25)\n textAlign(LEFT, CENTER)\n text(\"Volume\", 125, 175)\n text(\"Rumble FX\", 125, 200)\n text(\"Brightness\", 125, 225)\n text(\"Flashing\", 125, 250)\n if (mouseX >= 400 && mouseX <= 450 && mouseY >= 155 && mouseY <= 195 && !isTransitioning) {\n fill(255, 255, 255, 5)\n for(let i = 0 + calcDist(mouseX, mouseY, mouseX, 175);i < 100;i += 2) {\n ellipse(425, 175, 0.25*i, 0.35*i)\n }\n }\n if (mouseX >= 400 && mouseX <= 450 && mouseY >= 180 && mouseY <= 220 && !isTransitioning) {\n fill(255, 255, 255, 5)\n for(let i = 0 + calcDist(mouseX, mouseY, mouseX, 200);i < 100;i += 2) {\n ellipse(425, 200, 1.2*i, 0.35*i)\n }\n }\n if (mouseX >= 400 && mouseX <= 450 && mouseY >= 205 && mouseY <= 245 && !isTransitioning) {\n fill(255, 255, 255, 5)\n for(let i = 0 + calcDist(mouseX, mouseY, mouseX, 225);i < 100;i += 2) {\n ellipse(425, 225, 1.2*i, 0.35*i)\n }\n }\n if (mouseX >= 400 && mouseX <= 450 && mouseY >= 230 && mouseY <= 270 && !isTransitioning) {\n fill(255, 255, 255, 5)\n for(let i = 0 + calcDist(mouseX, mouseY, mouseX, 250);i < 100;i += 2) {\n ellipse(425, 250, 1.2*i, 0.35*i)\n }\n }\n fill(0, 0, 0)\n textAlign(CENTER, CENTER)\n text(volume, 425, 175)\n text(rumbleFX, 425, 200)\n text(brightness, 425, 225)\n text(flashing, 425, 250)\n if (mouseX >= 250 && mouseX <= 350 && mouseY >= 275 && mouseY <= 325 && !isTransitioning) {\n fill(255, 255, 255, 5)\n for(let i = 0 + calcDist(mouseX, mouseY, mouseX, 300);i < 100;i += 2) {\n ellipse(300, 300, 3*i, 0.55*i)\n }\n }\n if (mouseX >= 250 && mouseX <= 350 && mouseY >= 325 && mouseY <= 375 && !isTransitioning) {\n fill(255, 255, 255, 5)\n for(let i = 0 + calcDist(mouseX, mouseY, mouseX, 350);i < 100;i += 2) {\n ellipse(300, 350, 1*i, 0.55*i)\n }\n }\n fill(0, 0, 0)\n textSize(35)\n textAlign(CENTER, CENTER)\n text(\"Reset Defaults\", 300, 300)\n text(\"Back\", 300, 350)\n }\n }\n fill(255, 255, 255, 2*bright)\n}", "title": "" }, { "docid": "1897796c0b800bbda9dc22435ff7bbe0", "score": "0.46395063", "text": "function getYmovement(destiny){\n var fromIndex = $(SECTION_ACTIVE_SEL).index(SECTION_SEL);\n var toIndex = destiny.index(SECTION_SEL);\n if( fromIndex == toIndex){\n return 'none';\n }\n if(fromIndex > toIndex){\n return 'up';\n }\n return 'down';\n }", "title": "" }, { "docid": "1897796c0b800bbda9dc22435ff7bbe0", "score": "0.46395063", "text": "function getYmovement(destiny){\n var fromIndex = $(SECTION_ACTIVE_SEL).index(SECTION_SEL);\n var toIndex = destiny.index(SECTION_SEL);\n if( fromIndex == toIndex){\n return 'none';\n }\n if(fromIndex > toIndex){\n return 'up';\n }\n return 'down';\n }", "title": "" }, { "docid": "1897796c0b800bbda9dc22435ff7bbe0", "score": "0.46395063", "text": "function getYmovement(destiny){\n var fromIndex = $(SECTION_ACTIVE_SEL).index(SECTION_SEL);\n var toIndex = destiny.index(SECTION_SEL);\n if( fromIndex == toIndex){\n return 'none';\n }\n if(fromIndex > toIndex){\n return 'up';\n }\n return 'down';\n }", "title": "" }, { "docid": "1897796c0b800bbda9dc22435ff7bbe0", "score": "0.46395063", "text": "function getYmovement(destiny){\n var fromIndex = $(SECTION_ACTIVE_SEL).index(SECTION_SEL);\n var toIndex = destiny.index(SECTION_SEL);\n if( fromIndex == toIndex){\n return 'none';\n }\n if(fromIndex > toIndex){\n return 'up';\n }\n return 'down';\n }", "title": "" }, { "docid": "1897796c0b800bbda9dc22435ff7bbe0", "score": "0.46395063", "text": "function getYmovement(destiny){\n var fromIndex = $(SECTION_ACTIVE_SEL).index(SECTION_SEL);\n var toIndex = destiny.index(SECTION_SEL);\n if( fromIndex == toIndex){\n return 'none';\n }\n if(fromIndex > toIndex){\n return 'up';\n }\n return 'down';\n }", "title": "" }, { "docid": "935b71717504ced1197b2d5da7b78860", "score": "0.4636485", "text": "function calculateMenuSpace(){\r\n\r\n var subMenuWidth = subMenu.parent().outerWidth();\r\n\r\n if(isTopMenu){\r\n subMenu = jQuery('.nav-slides .sub-nav ul li.active ul');\r\n }\r\n\r\n var items = subMenu.find(\"li:not(.last, .hidden)\");\r\n var moreMenuItem = jQuery(\"#show-more-of-menu-btn\");\r\n\r\n var splitMenuAt = calculateNumberOfItemsInMenu(subMenuWidth, items, moreMenuItem);\r\n\r\n if(!prevActive || items.length == splitMenuAt){\r\n\r\n prevActive = false;\r\n\r\n if(isTopMenu){\r\n jQuery(\".nav-slides .sub-nav ul li.active ul li:visible, .nav-slides ul li.active ul li.last .prev\").hide();\r\n }else{\r\n jQuery(\".nav-slides .sub-nav ul li:visible, .nav-slides ul li.last .prev\").hide();\r\n }\r\n\r\n if(items.length != splitMenuAt && items.length > 0){\r\n moreMenuItem.show();\r\n items.eq(splitMenuAt).hide();\r\n items.eq(splitMenuAt).nextAll().hide();\r\n items.eq(splitMenuAt).prevAll().show();\r\n }else{\r\n items.show();\r\n moreMenuItem.hide();\r\n }\r\n }\r\n\r\n }", "title": "" }, { "docid": "fff491fbdcae953c77e9c9ee623c17b3", "score": "0.4634903", "text": "function left(){var A=getParentRole();\"tablist\"==A?moveFocus(-1,getFocusElements(e.parentNode)):n.parent().submenu?cancel():moveFocus(-1)}", "title": "" }, { "docid": "98c6dd2f2a3ae2133d039737bd2055f8", "score": "0.46309918", "text": "function getYmovement(destiny){\r\n var fromIndex = $(SECTION_ACTIVE_SEL).index(SECTION_SEL);\r\n var toIndex = destiny.index(SECTION_SEL);\r\n if( fromIndex == toIndex){\r\n return 'none';\r\n }\r\n if(fromIndex > toIndex){\r\n return 'up';\r\n }\r\n return 'down';\r\n }", "title": "" }, { "docid": "98c6dd2f2a3ae2133d039737bd2055f8", "score": "0.46309918", "text": "function getYmovement(destiny){\r\n var fromIndex = $(SECTION_ACTIVE_SEL).index(SECTION_SEL);\r\n var toIndex = destiny.index(SECTION_SEL);\r\n if( fromIndex == toIndex){\r\n return 'none';\r\n }\r\n if(fromIndex > toIndex){\r\n return 'up';\r\n }\r\n return 'down';\r\n }", "title": "" }, { "docid": "98c6dd2f2a3ae2133d039737bd2055f8", "score": "0.46309918", "text": "function getYmovement(destiny){\r\n var fromIndex = $(SECTION_ACTIVE_SEL).index(SECTION_SEL);\r\n var toIndex = destiny.index(SECTION_SEL);\r\n if( fromIndex == toIndex){\r\n return 'none';\r\n }\r\n if(fromIndex > toIndex){\r\n return 'up';\r\n }\r\n return 'down';\r\n }", "title": "" }, { "docid": "98c6dd2f2a3ae2133d039737bd2055f8", "score": "0.46309918", "text": "function getYmovement(destiny){\r\n var fromIndex = $(SECTION_ACTIVE_SEL).index(SECTION_SEL);\r\n var toIndex = destiny.index(SECTION_SEL);\r\n if( fromIndex == toIndex){\r\n return 'none';\r\n }\r\n if(fromIndex > toIndex){\r\n return 'up';\r\n }\r\n return 'down';\r\n }", "title": "" }, { "docid": "98c6dd2f2a3ae2133d039737bd2055f8", "score": "0.46309918", "text": "function getYmovement(destiny){\r\n var fromIndex = $(SECTION_ACTIVE_SEL).index(SECTION_SEL);\r\n var toIndex = destiny.index(SECTION_SEL);\r\n if( fromIndex == toIndex){\r\n return 'none';\r\n }\r\n if(fromIndex > toIndex){\r\n return 'up';\r\n }\r\n return 'down';\r\n }", "title": "" }, { "docid": "7bd4f52fcd3613d1963ac176198d3aad", "score": "0.46281028", "text": "function getYmovement(destiny) {\n var fromIndex = $(SECTION_ACTIVE_SEL).index(SECTION_SEL);\n var toIndex = destiny.index(SECTION_SEL);\n\n if (fromIndex == toIndex) {\n return 'none';\n }\n\n if (fromIndex > toIndex) {\n return 'up';\n }\n\n return 'down';\n }", "title": "" }, { "docid": "81e9982905be3a909012199c8802f508", "score": "0.46275228", "text": "function subMenuAlign() {\n var headnavPos = $('.headnav').offset().left,\n //headnavW = $('.headnav').width();\n headnavW = $('.header--nav').width();\n\n $('.sub-menu').each(function(index, el) {\n if (!$(this).parents('.tours-list, .more_list').length) {\n var subPos = $(this).offset().left,\n subW = $(this).width(),\n subParentW = $(this).closest('li').width(),\n subParentPos = $(this).closest('li').offset().left - headnavPos,\n //totW = subParentPos + subParentW + subW;\n totW = subParentPos + subParentW + subW + headnavPos;\n\n if (totW > headnavW) {\n $(this).addClass('left');\n }\n }\n });\n }", "title": "" }, { "docid": "96d3f46b6cbc2603d292ee2fa955f3bc", "score": "0.4625131", "text": "buildRtlState(menuPos, menuSize, subMenuSize, canvasRect) {\n\t\t// Ensure that the combined menu position, plus the menu width,\n\t\t// plus the submenu width, does not exceed the viewport bounds.\n\t\treturn (menuPos.x + menuSize.width + subMenuSize.width > canvasRect.right);\n\n\t}", "title": "" }, { "docid": "32940a8891bb38b408f3b65cf819ca0a", "score": "0.46167925", "text": "function GOTOGoal(p) {return (!dirs[dir[GameState.location.y][GameState.location.x]] ||\r\n p.range && Math.abs(GameState.location.x - p.x) + Math.abs(GameState.location.y - p.y) <= p.range)}", "title": "" }, { "docid": "e6d4eebb0033a3647e63045311211fdc", "score": "0.4612569", "text": "function getYmovement(destiny){\r\n var fromIndex = $('.ms-left .ms-section.active').index();\r\n var toIndex = destiny.index();\r\n\r\n if(fromIndex > toIndex){\r\n return 'up';\r\n }\r\n return 'down';\r\n }", "title": "" }, { "docid": "f656f3e63e6e7f1e70dd2a7b0d5b686e", "score": "0.46068966", "text": "function intersectStepBelow(ref) {\n var entry = ref[0];\n\n updateDirection();\n var isIntersecting = entry.isIntersecting;\n var boundingClientRect = entry.boundingClientRect;\n var target = entry.target;\n\n // bottom = bottom edge of element from top of viewport\n // bottomAdjusted = bottom edge of element from trigger\n var top = boundingClientRect.top;\n var bottom = boundingClientRect.bottom;\n var topAdjusted = top - offsetMargin;\n var bottomAdjusted = bottom - offsetMargin;\n var index = getIndex(target);\n var ss = stepStates[index];\n\n // entering below is only when bottomAdjusted is positive\n // and topAdjusted is negative\n if (\n isIntersecting &&\n topAdjusted <= 0 &&\n bottomAdjusted >= 0 &&\n direction === \"up\" &&\n ss.state !== \"enter\"\n )\n { notifyStepEnter(target, direction); }\n\n // exiting from above is when bottomAdjusted is negative and not intersecting\n if (\n !isIntersecting &&\n bottomAdjusted < 0 &&\n direction === \"down\" &&\n ss.state === \"enter\"\n )\n { notifyStepExit(target, direction); }\n }", "title": "" }, { "docid": "f656f3e63e6e7f1e70dd2a7b0d5b686e", "score": "0.46068966", "text": "function intersectStepBelow(ref) {\n var entry = ref[0];\n\n updateDirection();\n var isIntersecting = entry.isIntersecting;\n var boundingClientRect = entry.boundingClientRect;\n var target = entry.target;\n\n // bottom = bottom edge of element from top of viewport\n // bottomAdjusted = bottom edge of element from trigger\n var top = boundingClientRect.top;\n var bottom = boundingClientRect.bottom;\n var topAdjusted = top - offsetMargin;\n var bottomAdjusted = bottom - offsetMargin;\n var index = getIndex(target);\n var ss = stepStates[index];\n\n // entering below is only when bottomAdjusted is positive\n // and topAdjusted is negative\n if (\n isIntersecting &&\n topAdjusted <= 0 &&\n bottomAdjusted >= 0 &&\n direction === \"up\" &&\n ss.state !== \"enter\"\n )\n { notifyStepEnter(target, direction); }\n\n // exiting from above is when bottomAdjusted is negative and not intersecting\n if (\n !isIntersecting &&\n bottomAdjusted < 0 &&\n direction === \"down\" &&\n ss.state === \"enter\"\n )\n { notifyStepExit(target, direction); }\n }", "title": "" }, { "docid": "d22dca1e2e0fc824df7221d58e0232a7", "score": "0.46025926", "text": "function hitTestMenus(menu, x, y) {\r\n for (var temp = menu; temp; temp = temp.childMenu) {\r\n if (domutils_1.ElementExt.hitTest(temp.node, x, y)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "1afe71c364e5cf3864fa981424e121fb", "score": "0.46000943", "text": "function m(ev)\r\n{\r\n if (currenttable && currenttable.dragObject)\r\n {\r\n ev = ev || window.event;\r\n var mousePos = currenttable.mouseCoords(ev);\r\n var y = mousePos.y - currenttable.mouseOffset.y;\r\n if (y != currenttable.oldY)\r\n {\r\n // work out if we're going up or down...\r\n var movingDown = y > currenttable.oldY;\r\n // update the old value\r\n currenttable.oldY = y;\r\n // update the style to show we're dragging\r\n currenttable.dragObject.style.backgroundColor = \"#eee\";\r\n // If we're over a row then move the dragged row to there so that the user sees the\r\n // effect dynamically\r\n var currentRow = currenttable.findDropTargetRow(y);\r\n if (currentRow)\r\n {\r\n if (movingDown && currenttable.dragObject != currentRow)\r\n {\r\n currenttable.dragObject.parentNode.insertBefore(currenttable.dragObject, currentRow.nextSibling);\r\n } else if (!movingDown && currenttable.dragObject != currentRow)\r\n {\r\n currenttable.dragObject.parentNode.insertBefore(currenttable.dragObject, currentRow);\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n}", "title": "" }, { "docid": "cf970a2677cb6240071ddde590361142", "score": "0.4599078", "text": "function hitTestMenus(menu, x, y) {\n for (var temp = menu; temp; temp = temp.childMenu) {\n if (domutils_1.ElementExt.hitTest(temp.node, x, y)) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "cf970a2677cb6240071ddde590361142", "score": "0.4599078", "text": "function hitTestMenus(menu, x, y) {\n for (var temp = menu; temp; temp = temp.childMenu) {\n if (domutils_1.ElementExt.hitTest(temp.node, x, y)) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "fc0d6d34f42badb15c71b955740832b0", "score": "0.459336", "text": "function right() {\n if(active && level.selected.x < 2) {\n select(++level.selected.x, level.selected.y);\n update();\n }\n }", "title": "" }, { "docid": "e6652c23d9fe42ce152930d9d54af9a0", "score": "0.45895743", "text": "function CursorUpdate(){ //Based on key pressed, update cursor position value.\n switch(key){\n case 'ArrowUp':\n choice--;\n break;\n case 'ArrowDown':\n choice++;\n break;\n case 'ArrowLeft':\n choice = CHOICEMIN;\n break;\n case 'ArrowRight':\n choice = CHOICEMAX;\n break;\n }\n if(choice < CHOICEMIN) //Passes top boundary, wrap to bottom.\n choice = CHOICEMAX;\n else if(choice > CHOICEMAX) //Passes bottom boundary, wrap to top.\n choice = CHOICEMIN;\n if(!ChoosingAtk) //Display a description of what the user's cursor is hovering over.\n CurrentDescription = MenuDescriptions[choice];\n else\n if(choice != 3)\n CurrentDescription = Player.Moves[choice].Description;\n else \n CurrentDescription = GoBackDescription;\n}", "title": "" }, { "docid": "c2abfe820f6979b6bc08c1b08d07519c", "score": "0.45880482", "text": "function openSubmenu(submenu, itemNode) {\n // Ensure the menu is updated before opening.\n messaging_1.MessageLoop.sendMessage(submenu, widget_1.Widget.Msg.UpdateRequest);\n // Get the current position and size of the main viewport.\n var px = window.pageXOffset;\n var py = window.pageYOffset;\n var cw = document.documentElement.clientWidth;\n var ch = document.documentElement.clientHeight;\n // Compute the maximum allowed height for the menu.\n var maxHeight = ch;\n // Fetch common variables.\n var node = submenu.node;\n var style = node.style;\n // Clear the menu geometry and prepare it for measuring.\n style.top = '';\n style.left = '';\n style.width = '';\n style.height = '';\n style.visibility = 'hidden';\n style.maxHeight = maxHeight + \"px\";\n // Attach the menu to the document.\n widget_1.Widget.attach(submenu, document.body);\n // Measure the size of the menu.\n var _a = node.getBoundingClientRect(), width = _a.width, height = _a.height;\n // Compute the box sizing for the menu.\n var box = domutils_1.ElementExt.boxSizing(submenu.node);\n // Get the bounding rect for the target item node.\n var itemRect = itemNode.getBoundingClientRect();\n // Compute the target X position.\n var x = itemRect.right - Private.SUBMENU_OVERLAP;\n // Adjust the X position to fit on the screen.\n if (x + width > px + cw) {\n x = itemRect.left + Private.SUBMENU_OVERLAP - width;\n }\n // Compute the target Y position.\n var y = itemRect.top - box.borderTop - box.paddingTop;\n // Adjust the Y position to fit on the screen.\n if (y + height > py + ch) {\n y = itemRect.bottom + box.borderBottom + box.paddingBottom - height;\n }\n // Update the position of the menu to the computed position.\n style.top = Math.max(0, y) + \"px\";\n style.left = Math.max(0, x) + \"px\";\n // Finally, make the menu visible on the screen.\n style.visibility = '';\n }", "title": "" }, { "docid": "c2abfe820f6979b6bc08c1b08d07519c", "score": "0.45880482", "text": "function openSubmenu(submenu, itemNode) {\n // Ensure the menu is updated before opening.\n messaging_1.MessageLoop.sendMessage(submenu, widget_1.Widget.Msg.UpdateRequest);\n // Get the current position and size of the main viewport.\n var px = window.pageXOffset;\n var py = window.pageYOffset;\n var cw = document.documentElement.clientWidth;\n var ch = document.documentElement.clientHeight;\n // Compute the maximum allowed height for the menu.\n var maxHeight = ch;\n // Fetch common variables.\n var node = submenu.node;\n var style = node.style;\n // Clear the menu geometry and prepare it for measuring.\n style.top = '';\n style.left = '';\n style.width = '';\n style.height = '';\n style.visibility = 'hidden';\n style.maxHeight = maxHeight + \"px\";\n // Attach the menu to the document.\n widget_1.Widget.attach(submenu, document.body);\n // Measure the size of the menu.\n var _a = node.getBoundingClientRect(), width = _a.width, height = _a.height;\n // Compute the box sizing for the menu.\n var box = domutils_1.ElementExt.boxSizing(submenu.node);\n // Get the bounding rect for the target item node.\n var itemRect = itemNode.getBoundingClientRect();\n // Compute the target X position.\n var x = itemRect.right - Private.SUBMENU_OVERLAP;\n // Adjust the X position to fit on the screen.\n if (x + width > px + cw) {\n x = itemRect.left + Private.SUBMENU_OVERLAP - width;\n }\n // Compute the target Y position.\n var y = itemRect.top - box.borderTop - box.paddingTop;\n // Adjust the Y position to fit on the screen.\n if (y + height > py + ch) {\n y = itemRect.bottom + box.borderBottom + box.paddingBottom - height;\n }\n // Update the position of the menu to the computed position.\n style.top = Math.max(0, y) + \"px\";\n style.left = Math.max(0, x) + \"px\";\n // Finally, make the menu visible on the screen.\n style.visibility = '';\n }", "title": "" }, { "docid": "08812ef0bd565ec2cbc46fefc4606b72", "score": "0.45879725", "text": "mouseDown(inputRow, inputCol) {\n const { startNode, endNode } = this.state;\n //if mouse on startNode, update state\n if (inputRow === startNode.row && inputCol === startNode.col) {\n this.setState({ moveStart: true });\n //if mouse on endNode, updateState\n } else if (inputRow === endNode.row && inputCol === endNode.col) {\n this.setState({ moveEnd: true });\n } else {\n this.setState({ drawWall: true });\n }\n }", "title": "" }, { "docid": "e4e04e64e093291de7c708dacab906d1", "score": "0.45856178", "text": "function toggleRadialMenu(e) {\r\n\tvar event;\r\n\tif (e instanceof TouchEvent) {\r\n\t event = e.targetTouches[0];\r\n\t} else {\r\n\t event = e;\r\n\t}\r\n\tif(tracker.startTime == null){\r\n\t\tif(radialMenuTree != null){\r\n\t\t\t\tmenu = module.exports(radialMenuTree, {\r\n\t\t\t\t\tx: event.clientX,\r\n\t\t\t\t\ty: event.clientY\r\n\t\t\t\t}, radialMenuSvg);\r\n\t\t\r\n\t\t\t// Start timing once menu appears\r\n\t\t\ttracker.startTimer();\r\n\t\t}\r\n\t}else{\r\n\t\t// Record previous item\r\n\t\ttracker.recordSelectedItem(null);\r\n\t\t\r\n\t\tif(radialMenuTree != null){\r\n\t\t\tmenu = module.exports(radialMenuTree, {\r\n\t\t\t\tx: event.clientX,\r\n\t\t\t\ty: event.clientY\r\n\t\t\t}, radialMenuSvg);\r\n\t\r\n\t\t// Start timing once menu appears\r\n\t\ttracker.startTimer();\r\n\t\t}\r\n\t}\r\n\tif (!(e instanceof TouchEvent)) {\r\n event.preventDefault();\r\n }\r\n\r\n}", "title": "" }, { "docid": "13365af3f2089a65b78c097c296c1e61", "score": "0.4583869", "text": "function menuHighlighter() {\r\n\tif (window.scrollY > 400) {\r\n\t\tmenuHighlight(menuItems[1]);\r\n\t}\r\n\tif (window.scrollY > 1200) {\r\n\t\tmenuHighlight(menuItems[2]);\r\n\t}\r\n\tif (window.scrollY > 2100) {\r\n\t\tmenuHighlight(menuItems[3]);\r\n\t}\r\n\tif (window.scrollY > 4600) {\r\n\t\tmenuHighlight(menuItems[4]);\r\n\t}\r\n\tif (window.scrollY < 400) {\r\n\t\tmenuHighlight(menuItems[0]);\r\n\t}\r\n}", "title": "" }, { "docid": "23b82ea7f218b9bfa0faa8c72fec6a03", "score": "0.45781994", "text": "behaviour() {\n if (Math.abs(this.lastPos.x - this._x) < 0.1 && Math.abs(this.lastPos.y - this._y) < 0.1) {\n let rand = Math.round(Math.random() * 3);\n switch (rand) {\n case 0: this.direction = { x: 1, y: 0 }; break;\n case 1: this.direction = { x: -1, y: 0 }; break;\n case 2: this.direction = { x: 0, y: 1 }; break;\n case 3: this.direction = { x: 0, y: -1 }; break;\n }\n }\n this.lastPos.x = this._x;\n this.lastPos.y = this._y;\n }", "title": "" }, { "docid": "e45d65280c64f6c107c4baefea4807ed", "score": "0.4575582", "text": "function getDirection(){\n var length = Math.sqrt((movementPos[0]*movementPos[0])+(movementPos[1]*movementPos[1]));\n if (length > radius){\n var x = movementPos[0] * movementPos[0];\n var y = movementPos[1] * movementPos[1]; //To test which movement pos is the largest\n if (x > y){\n if (movementPos[0] < 0){\n if (prevDirection != \"left\"){\n left(username);\n prevDirection = \"left\"\n }\n }\n else{\n if (prevDirection != \"right\"){\n right(username);\n prevDirection = \"right\"\n }\n }\n }\n else{\n if (movementPos[1] < 0){\n if (prevDirection != \"up\"){\n up(username);\n prevDirection = \"up\"\n }\n }\n else{\n if (prevDirection != \"down\"){\n down(username);\n prevDirection = \"down\"\n }\n }\n }\n }\n\n}", "title": "" }, { "docid": "25e10b52468626fcfb9b9cbaae4ca4d8", "score": "0.45646563", "text": "function alacarte_touched_side(){\n 'use strict';\n var $menu = $('.red-header-menu');\n if($(window).width() > 1200 ){\n $('#red-navigation').attr('style','');\n $menu.find('li').each(function(){\n var $submenu = $(this).find('> .ef5-dropdown');\n if($submenu.length > 0){\n if($submenu.offset().left + $submenu.outerWidth() > $(window).innerWidth()){\n $submenu.addClass('touched');\n } else if($submenu.offset().left < 0){\n $submenu.addClass('touched');\n }\n /* remove css style display from mobile to desktop menu */\n $submenu.css('display','');\n }\n });\n }\n }", "title": "" }, { "docid": "9403d29228485993f90185c1d5a1a23d", "score": "0.45595533", "text": "mouseDownUp(start, end) {}", "title": "" }, { "docid": "d3423e46c3dec448ed8e7c97dfd939ba", "score": "0.4555372", "text": "function updateUpDownArrows() {\n /* does our current position have verticality? */\n if(porscheModels[currentDataBaseIndexHorizontal].length > 1) {\n /* does it have cars above and below? If so, put both arrows in the correct order. Quite a resource-intensive operation. */\n if(porscheModels[currentDataBaseIndexHorizontal][currentDataBaseIndexVertical-1] != null && porscheModels[currentDataBaseIndexHorizontal][currentDataBaseIndexVertical+1] != null) {\n handleDualArrows();\n /* has above but not below? */\n } else if(porscheModels[currentDataBaseIndexHorizontal][currentDataBaseIndexVertical-1] != null) {\n upDownArrows(\"block\", \"none\");\n dualArrowsLast = false;\n /* must only have below */\n } else {\n upDownArrows(\"none\", \"block\");\n dualArrowsLast = false;\n }\n } else {\n upDownArrows(\"none\", \"none\");\n dualArrowsLast = false;\n }\n}", "title": "" }, { "docid": "e07fce4bd46e404e32c2612d92445889", "score": "0.45527023", "text": "function getSubDir(flyoutSize, mainDir, triggerRect, windowSize) {\n // Now that we have the main direction, chose from 3 caret placements for that direction\n var offset = void 0;\n var triggerMid = void 0;\n var windowSpaceAvailable = void 0;\n\n if (mainDir === 'right' || mainDir === 'left') {\n offset = flyoutSize.height / 2;\n triggerMid = triggerRect.top + (triggerRect.bottom - triggerRect.top) / 2;\n windowSpaceAvailable = windowSize.height;\n } else {\n // (mainDir === 'up' || mainDir === 'down')\n offset = flyoutSize.width / 2;\n triggerMid = triggerRect.left + (triggerRect.right - triggerRect.left) / 2;\n windowSpaceAvailable = windowSize.width;\n }\n\n var aboveOrLeft = triggerMid - offset - MARGIN;\n var belowOrRight = windowSpaceAvailable - triggerMid - offset - MARGIN;\n var subDir = void 0;\n if (aboveOrLeft > 0 && belowOrRight > 0) {\n // caret should go in middle b/c it can\n subDir = 'middle';\n } else if (belowOrRight > 0) {\n // caret should go at top for left/right and left for up/down\n subDir = mainDir === 'left' || mainDir === 'right' ? 'up' : 'left';\n } else {\n // caret should go at bottom for left/right and right for up/down\n subDir = mainDir === 'left' || mainDir === 'right' ? 'down' : 'right';\n }\n return subDir;\n}", "title": "" }, { "docid": "21e14c947458cf252c379b2963bd3802", "score": "0.45525312", "text": "function openSubMenu(submenuToggle, submenuItem) {\n // Compute position and apply CSS\n var offsetX = submenuToggle[0].getBoundingClientRect().x;\n var offsetY = submenuToggle[0].getBoundingClientRect().y;\n if (submenuItem.outerWidth() > submenuToggle.outerWidth()) {\n var x = offsetX + (submenuToggle.outerWidth() - submenuItem.outerWidth()) / 2;\n } else {\n var x = offsetX;\n }\n var y = offsetY + submenuToggle.outerHeight();\n submenuItem.css({ \"top\": y, \"left\": x, \"min-width\": submenuToggle.outerWidth() });\n // Add classes\n submenuToggle.addClass(\"expanded\");\n submenuItem.addClass(\"active\");\n }", "title": "" }, { "docid": "9d9f54ed596e673a4214416228a9f475", "score": "0.45516056", "text": "worldMapClickHandler(clickPositionX,clickPositionY){\n\n //Check if the click landed in the menu bar\n if(clickPositionY > 705){\n //Check if the \"MENU\" button was pressed\n if(clickPositionX > 1105){\n console.log(\"Entering menu!\");\n //Go directly to Creature Editor Screen\n setGameMode(3);\n canvas.onmousemove = null;\n }\n //Check if click is on the arrow buttons\n else if(clickPositionX > this.scrollButtonLocation[0]){\n //Right arrow\n if(clickPositionX > this.scrollButtonLocation[0] + 90){\n this.scrollMap('west');\n }\n //Up/down arrows\n else if(clickPositionX > this.scrollButtonLocation[0] + 35){\n if(clickPositionY > this.scrollButtonLocation[1] + 52.5){\n this.scrollMap('south');\n }\n else{\n this.scrollMap('north');\n }\n }\n //Left arrow\n else if(clickPositionX > this.scrollButtonLocation[0]){\n this.scrollMap('east');\n }\n }\n }\n\n //If map travel is disabled, exit here\n if(!this.travelEnabled){\n return;\n }\n\n //Itterate through the coordinates of all the map locations\n for(var x = 0; x < this.locationCoordinates.length; x++){\n //Check if the click was on a map location\n if(clickPositionX > this.locationCoordinates[x][0] + this.scrollIndex[0] &&\n clickPositionX < this.locationCoordinates[x][0] + mapLocations.locationSize + this.scrollIndex[0] &&\n clickPositionY > this.locationCoordinates[x][1] + this.scrollIndex[1] &&\n clickPositionY < this.locationCoordinates[x][1] + mapLocations.locationSize + this.scrollIndex[1]){\n console.log(mapLocations.list[x][1] + \" was clicked on!\");\n //If the click was on a location make sure that location is within the sphere of influencce\n if(this.checkIfInInfluence(x)){\n //First, we stop the onmousemove function that is specific to the world map\n canvas.onmousemove = null;\n //If the location was the FOrgotten Temple, we enter the player stat screes\n if(x == 0){\n setGameMode(4);\n }\n //Otherwise, we launch combat based on the location that was clicked on\n else{\n //If the location is already friendly, do not enter combat\n if(mapLocations.list[x][4]==true){\n if(x == 2){\n setGameMode(7);\n }\n else if(x == 6){\n setGameMode(8);\n }\n //do nothing for now...\n }\n //If the location is still hostile, we enter combat\n else{\n setGameMode(1, x);\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "8dd67d0cddb508f4170cae8f02a84b39", "score": "0.45513543", "text": "function moveUser(xVal, yVal) {\n var userDiv = document.getElementById(\"user\");\n\n var stepsX = 0;\n var stepsY = 0;\n if (xVal != 0 ){\n stepsX = xVal * 1; // set moving steps to 4;\n }\n if (yVal != 0 ){\n stepsY = yVal * 1; // set moving steps to 4;\n }\n\n var currentX = parseInt(userDiv.style.left.split(\"px\")[0]);\n var currentY = parseInt(userDiv.style.top.split(\"px\")[0]);\n var targetX = (CurrentUserPos[0] + xVal);\n var targetY = (CurrentUserPos[1] + yVal);\n\n var fuelDiv = null;\n if (GridMap[targetX][targetY] > 0 && GridMap[targetX][targetY] < 10){\n fuelDiv = document.getElementById(\"fuel\"+targetX+targetY);\n fuelDiv.style.opacity = 1;\n }\n userDiv.style.opacity = 1;\n\n showHint(HINT_FUEL_LOSE, HINT_FUEL_LOSE_T);\n CurrentFuel -= 1;\n updateStatus();\n\n movit();\n\n function movit() {\n var offOpa = 0.05;\n if (currentX != targetX*64 || currentY != targetY*64){\n currentX += stepsX;\n currentY += stepsY;\n userDiv.style.left = currentX + \"px\";\n userDiv.style.top = currentY + \"px\";\n if (fuelDiv != null && parseFloat(fuelDiv.style.opacity) > 0){\n fuelDiv.style.opacity = parseFloat(fuelDiv.style.opacity) - offOpa;\n }\n\n if (GridMap[targetX][targetY] == -1 && userDiv.style.opacity > 0.3){\n userDiv.style.opacity = parseFloat(userDiv.style.opacity) - offOpa;\n }\n\n setTimeout(movit, 20);\n }\n else{\n GridMap[CurrentUserPos[0]][CurrentUserPos[1]] = 0;\n\n CurrentUserPos[0] = targetX;\n CurrentUserPos[1] = targetY;\n\n SelectedLeft = CurrentUserPos[0]*64;\n SelectedTop = CurrentUserPos[1]*64;\n\n if (GridMap[targetX][targetY] == -1){\n finalOutput(\"Destroyed! \");\n return;\n }\n\n if (fuelDiv != null){\n // remove the div\n cField.removeChild(fuelDiv);\n\n // update the gridmap\n var addFuel = GridMap[targetX][targetY];\n\n showHint(HINT_FUEL_GET1 + addFuel + HINT_FUEL_GET2 + addFuel,\n HINT_FUEL_GET_T);\n\n CurrentFuel += parseInt(addFuel);\n CurrentUserScore += parseInt(addFuel);\n\n FuelCount -= 1;\n if (FuelCount == 0){\n updateStatus();\n finalOutput(\"No fuels! \");\n return;\n }\n }\n GridMap[targetX][targetY] = -2;\n\n updateStatus();\n if (CurrentFuel == 0){\n finalOutput(\"No fuels! \");\n return;\n }\n\n updateKillerPosition();\n CurrentRound += 1;\n updateStatus();\n window.addEventListener(\"keydown\", controlSubmarine);\n }\n }\n}", "title": "" }, { "docid": "2953cfe7021eaed8209e2edd362af24a", "score": "0.4548165", "text": "function updateActive(){\n let flag=true;\n const listElement = document.querySelectorAll('.menu__link');\n //Assume that Box which is shown more than 50% is the section which is being read by user\n for(let i=0;i<sections.length;i++){\n const top = nav.offsetHeight>sections[i].getBoundingClientRect().top?\n nav.offsetHeight:sections[i].getBoundingClientRect().top;\n const btm = window.innerHeight<sections[i].getBoundingClientRect().bottom?\n window.innerHeight:sections[i].getBoundingClientRect().bottom\n if( btm-top > sections[i].offsetHeight*0.5){\n sections[i].classList.add(\"your-active-class\");\n listElement[i].classList.add(\"your-active-class\");\n }\n else {\n sections[i].classList.remove(\"your-active-class\");\n listElement[i].classList.remove(\"your-active-class\");\n }\n }\n //Assume that Box which box.bottom is shown in first is read by user\n /*\n for(let i=0;i<sections.length;i++){\n if(flag){\n //Assume that Box which box.bottom is shown in first is read by user\n if(sections[i].getBoundingClientRect().bottom < nav.getBoundingClientRect().height+1) {\n // Do Nothing\n }\n else {\n sections[i].classList.add(\"your-active-class\");\n listElement[i].classList.add(\"your-active-class\");\n flag=false;\n }\n }\n else {\n sections[i].classList.remove(\"your-active-class\");\n listElement[i].classList.remove(\"your-active-class\");\n }\n }\n */\n\n}", "title": "" }, { "docid": "6bd1b80ec0cf094717ae84bbfb93231f", "score": "0.45465332", "text": "calcTopPositionMode() {\n let menuStyle = window.getComputedStyle(this.openMenuNode);\n\n switch (this.positionMode.top) {\n case 'target':\n this.position.top = this.originNodeRect.top - this.alignTarget.offsetTop;\n break;\n\n case 'cascade':\n this.position.top = this.originNodeRect.top - parseFloat(menuStyle.paddingTop) - this.originNode.style.top;\n break;\n\n case 'bottom':\n this.position.top = this.originNodeRect.top + this.originNodeRect.height;\n break;\n\n default:\n (true && !(false) && Ember.assert(`Invalid target mode '${this.positionMode.top}' specified for paper-menu on Y axis.`));\n }\n }", "title": "" }, { "docid": "4a1c1d8b4c5d658fab3c55c6772ac564", "score": "0.45443666", "text": "_isCloseToMouse() {\n let deltaX = Math.abs(this.x - mouseX);\n let deltaY = Math.abs(this.y - mouseY);\n \n return deltaX < 100 &&\n deltaY < 100;\n \n }", "title": "" }, { "docid": "7c820167d84e0d423916b083a20cefcc", "score": "0.45425764", "text": "updateMenu( activeTreeAry )\n {\n let menuActive = false;\n\n for( let i = 0; i < activeTreeAry.length; ++i )\n {\n // See if there's an active menu\n if( activeTreeAry[i].isActive() )\n {\n menuActive = true;\n activeTreeAry[i].update();\n }\n }\n\n return menuActive;\n }", "title": "" }, { "docid": "8ecb63814579be646986d27a2f3b7897", "score": "0.4536802", "text": "function openSubmenu(submenu, itemNode) {\r\n // Ensure the menu is updated before opening.\r\n messaging_1.MessageLoop.sendMessage(submenu, widget_1.Widget.Msg.UpdateRequest);\r\n // Get the current position and size of the main viewport.\r\n var px = window.pageXOffset;\r\n var py = window.pageYOffset;\r\n var cw = document.documentElement.clientWidth;\r\n var ch = document.documentElement.clientHeight;\r\n // Compute the maximum allowed height for the menu.\r\n var maxHeight = ch;\r\n // Fetch common variables.\r\n var node = submenu.node;\r\n var style = node.style;\r\n // Clear the menu geometry and prepare it for measuring.\r\n style.top = '';\r\n style.left = '';\r\n style.width = '';\r\n style.height = '';\r\n style.visibility = 'hidden';\r\n style.maxHeight = maxHeight + \"px\";\r\n // Attach the menu to the document.\r\n widget_1.Widget.attach(submenu, document.body);\r\n // Measure the size of the menu.\r\n var _a = node.getBoundingClientRect(), width = _a.width, height = _a.height;\r\n // Compute the box sizing for the menu.\r\n var box = domutils_1.ElementExt.boxSizing(submenu.node);\r\n // Get the bounding rect for the target item node.\r\n var itemRect = itemNode.getBoundingClientRect();\r\n // Compute the target X position.\r\n var x = itemRect.right - Private.SUBMENU_OVERLAP;\r\n // Adjust the X position to fit on the screen.\r\n if (x + width > px + cw) {\r\n x = itemRect.left + Private.SUBMENU_OVERLAP - width;\r\n }\r\n // Compute the target Y position.\r\n var y = itemRect.top - box.borderTop - box.paddingTop;\r\n // Adjust the Y position to fit on the screen.\r\n if (y + height > py + ch) {\r\n y = itemRect.bottom + box.borderBottom + box.paddingBottom - height;\r\n }\r\n // Update the position of the menu to the computed position.\r\n style.top = Math.max(0, y) + \"px\";\r\n style.left = Math.max(0, x) + \"px\";\r\n // Finally, make the menu visible on the screen.\r\n style.visibility = '';\r\n }", "title": "" }, { "docid": "b967e5d809355791cd6f80b3e84ed375", "score": "0.45346233", "text": "function mouseMoved() {\n\n //ACTIVATES INTERACTABLE DETECTION FOR LIVING ROOM//\n if (menu == 'livingroom') {\n if (livingRoomScene.processMouseMove()) {\n return;\n }\n }\n\n //ACTIVATES INTERACTABLE DETECTION FOR FRONT HALL//\n else if (menu == 'fronthall') {\n if (frontHallScene.processMouseMove()) {\n return;\n }\n }\n\n //ACTIVATES INTERACTABLE DETECTION FOR DINING ROOM//\n else if (menu == 'diningroom') {\n if (diningRoomScene.processMouseMove()) {\n return;\n }\n }\n\n //ACTIVATES INTERACTABLE DETECTION FOR KITCHEN//\n else if (menu == 'kitchen') {\n if (kitchenRoomScene.processMouseMove()) {\n return;\n }\n }\n\n //ACTIVATES INTERACTABLE DETECTION FOR KITCHEN//\n else if (menu == 'basementdoor') {\n if (basementDoorScene.processMouseMove()) {\n return;\n }\n }\n\n //ACTIVATES INTERACTABLE DETECTION FOR UPSTAIRS//\n else if (menu == 'upstairs') {\n if (upstairsScene.processMouseMove()) {\n return;\n }\n }\n\n //ACTIVATES INTERACTABLE DETECTION FOR BEDROOM//\n else if (menu == 'bedroom') {\n if (bedroomScene.processMouseMove()) {\n return;\n }\n }\n}", "title": "" }, { "docid": "0dc45147d3f6916f00f4d2634c1a4b3f", "score": "0.45337665", "text": "function intersectStepAbove(ref) {\n var entry = ref[0];\n\n updateDirection();\n var isIntersecting = entry.isIntersecting;\n var boundingClientRect = entry.boundingClientRect;\n var target = entry.target;\n\n // bottom = bottom edge of element from top of viewport\n // bottomAdjusted = bottom edge of element from trigger\n var top = boundingClientRect.top;\n var bottom = boundingClientRect.bottom;\n var topAdjusted = top - offsetMargin;\n var bottomAdjusted = bottom - offsetMargin;\n var index = getIndex(target);\n var ss = stepStates[index];\n\n // entering above is only when topAdjusted is negative\n // and bottomAdjusted is positive\n if (\n isIntersecting &&\n topAdjusted <= 0 &&\n bottomAdjusted >= 0 &&\n direction === \"down\" &&\n ss.state !== \"enter\"\n )\n { notifyStepEnter(target, direction); }\n\n // exiting from above is when topAdjusted is positive and not intersecting\n if (\n !isIntersecting &&\n topAdjusted > 0 &&\n direction === \"up\" &&\n ss.state === \"enter\"\n )\n { notifyStepExit(target, direction); }\n }", "title": "" }, { "docid": "0dc45147d3f6916f00f4d2634c1a4b3f", "score": "0.45337665", "text": "function intersectStepAbove(ref) {\n var entry = ref[0];\n\n updateDirection();\n var isIntersecting = entry.isIntersecting;\n var boundingClientRect = entry.boundingClientRect;\n var target = entry.target;\n\n // bottom = bottom edge of element from top of viewport\n // bottomAdjusted = bottom edge of element from trigger\n var top = boundingClientRect.top;\n var bottom = boundingClientRect.bottom;\n var topAdjusted = top - offsetMargin;\n var bottomAdjusted = bottom - offsetMargin;\n var index = getIndex(target);\n var ss = stepStates[index];\n\n // entering above is only when topAdjusted is negative\n // and bottomAdjusted is positive\n if (\n isIntersecting &&\n topAdjusted <= 0 &&\n bottomAdjusted >= 0 &&\n direction === \"down\" &&\n ss.state !== \"enter\"\n )\n { notifyStepEnter(target, direction); }\n\n // exiting from above is when topAdjusted is positive and not intersecting\n if (\n !isIntersecting &&\n topAdjusted > 0 &&\n direction === \"up\" &&\n ss.state === \"enter\"\n )\n { notifyStepExit(target, direction); }\n }", "title": "" }, { "docid": "6d3c8a1f8e99481709da352f71df5036", "score": "0.45332053", "text": "checkIfOutOfGlastonbury() {\n if (user.position.x < 650 && user.position.x > 450) {\n if (user.position.z <= 1175) {\n currentState = new WalkThroughCorridor();\n }\n }\n }", "title": "" }, { "docid": "5fe526664ac3c7da2dc5b922ef810ac9", "score": "0.4530973", "text": "function mousemove(e){\n\t\t// console.log(e);\n\n\t\tif (mouseIsDown){\n\t\t\tif (selectedFurniture != undefined){\n\t\t\t\tselectedFurniture.rotate(e.offsetY - lastDistance);\n\t\t\t\tlastDistance = e.offsetY;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "39028f99f1894c46f0044f9d1dcb600f", "score": "0.4529591", "text": "function catchupPagePosition(startYPosition) {\n $(\".step\").toArray().forEach( function(step, i) {\n\n const topMargin = parseInt($(step).css(\"margin-top\"));\n\n // Run every activate function that should have run by this point on the page\n if (startYPosition + topMargin > $(step).offset().top) {\n // console.log(i);\n activateFunctions[i]();\n }\n });\n}", "title": "" }, { "docid": "89de70c90737b432ff030117575388cf", "score": "0.45283583", "text": "function left() {\n if(active && level.selected.x > 0) {\n select(--level.selected.x, level.selected.y);\n update();\n }\n }", "title": "" }, { "docid": "1cfdeda39b92257d26e28fb94e458fc1", "score": "0.45259246", "text": "function calculatePosition() {\n if (true === goLeft) {\n return posX+2;\n }\n return posX-2;\n}", "title": "" } ]
f603fc3f4b39368a40baa99c2b13c228
An algorithm for picking the Best from an array based on fitness
[ { "docid": "825453bad8722b767803e9559c367bad", "score": "0.66225004", "text": "function SelectTheBestOne(EvPac) {\n // // Start at 0\n // let index = 0;\n //\n // // Pick a random number between 0 and 1\n // let r = random(1);\n //\n // // Keep subtracting probabilities until you get less than zero\n // // Higher probabilities will be more likely to be fixed since they will\n // // subtract a larger number towards zero\n // while (r > 0) {\n // console.warn(index);\n // r -= EvPac[index].fitness;\n // // And move on to the next\n // index += 1;\n // }\n //\n // // Go back one\n // index -= 1;\n //\n // // Make sure it's a copy!\n // // (this includes mutation)\n\n\n\n let BestPacMan = null;\n let tempHScore = 0;\n for (let i = 0; i < EvPac.length; i++) {\n let s = EvPac[i].score;\n if (s > tempHScore) {\n tempHScore = s;\n BestPacMan = EvPac[i];\n // console.warn(i);\n // console.warn(BestPacMan);\n }\n }\n\n return BestPacMan.copy();\n}", "title": "" } ]
[ { "docid": "60f8cad247c971394ce4243cb3702c68", "score": "0.720996", "text": "fittest () {\n let fittestValue = this.tours[0].fitness(),\n fitValue = 0;\n this.bestTourIndex = 0;\n for (let i = 1; i < this.tours.length; i++) {\n fitValue = this.tours[i].fitness();\n if (fitValue > fittestValue) {\n fittestValue = fitValue; \n this.bestTourIndex = i;\n }\n }\n this.bestFitnessValue = fittestValue;\n }", "title": "" }, { "docid": "3555ea9f1f427b86af6c1c0d2388dc44", "score": "0.71390635", "text": "function compare_with_best_fitness(x){\n var x_fitness = fitness(x);\n if (x_fitness < best_fitness){\n best_fitness = x_fitness;\n }\n}", "title": "" }, { "docid": "655f6316c0941f6cf41812c7f7ea2fd1", "score": "0.66882735", "text": "getMaxFitness() {\n let top = 0;\n for (let mem of this.deadPop) {\n if (mem.fitness > top) {\n top = mem.fitness;\n }\n }\n return top;\n }", "title": "" }, { "docid": "4671632402e0e7af1254f3da4a320ec1", "score": "0.66511583", "text": "calcFitness() {\n let f = 0;\n for (let i = 0; i < this.genome.length; i++) {\n if (this.genome[i] == target[i]) {\n f += 1;\n }\n }\n this.fitness = f / this.genome.length;\n }", "title": "" }, { "docid": "b53461f8bdacfac2bd3e5893f8608c69", "score": "0.6637128", "text": "function select_best_genes() {\n\tvar pq = [];\n\tfor (var i = 0; i < GENE_POOL.length; i++)\n\t\tpq[i] = [calculate_fitness(GENE_POOL[i]), i];\n\tpq.sort(function (a, b) {\n\t\tif (a[0] < b[0]) return -1;\n\t\telse if (a[0] > b[0]) return 1;\n\t\treturn 0;\n\t});\n\tfor (var i = 0; i < NO_OF_CHILDREN; i++) PARENTS[i] = GENE_POOL[pq[i][1]];\n\tGENE_POOL = [];\n\tfor (var i = 0; i < NO_OF_CHILDREN; i++) GENE_POOL[i] = PARENTS[i];\n}", "title": "" }, { "docid": "625fb7ad62d2d7d7f7c12b335cb2c45d", "score": "0.66086316", "text": "tournamentSelection () {\n let tourTournamentIndex = [],\n randomIndex;\n // Selecting some of the tours from population at random. \n // Storing the index. \n while (tourTournamentIndex.length < this.tournamentSize) {\n randomIndex = floor (random () * this.size);\n if (!tourTournamentIndex.includes(randomIndex))\n tourTournamentIndex.push(randomIndex);\n } // end of while loop. \n\n let fittestJourney = this.tours[tourTournamentIndex[0]],\n fittestValue = this.tours[tourTournamentIndex[0]].fitness(),\n fitValue = 0;\n for (let i = 0; i < tourTournamentIndex.length; i++) {\n fitValue = this.tours[tourTournamentIndex[i]].fitness();\n if (fitValue > fittestValue) {\n fittestValue = fitValue;\n fittestJourney = this.tours[tourTournamentIndex[i]];\n }\n }\n return fittestJourney;\n }", "title": "" }, { "docid": "026ab2eb123d462c5abf5ccf4d6d4362", "score": "0.654359", "text": "function reorderByFitness(population)\r\n{\r\n var count = population.length - 1;\r\n var tmp, tmpav;\r\n var averages = [];\r\n for (var i = 0; i < population.length; i++) {\r\n averages[i] = population[i][population[i].length - 1];\r\n }\r\n for (j = 0; j < count; j++) {\r\n for (var k = 0; k < count; k++) {\r\n if (averages[k] > averages[k + 1]) {\r\n tmp = population[k + 1];\r\n population[k + 1] = population[k];\r\n population[k] = tmp;\r\n\r\n tmpav = averages[k + 1];\r\n averages[k + 1] = averages[k];\r\n averages[k] = tmpav;\r\n }\r\n }\r\n }\r\n return population;\r\n}", "title": "" }, { "docid": "016cd982bb2208759b9af4eb557a0bf5", "score": "0.6540125", "text": "getMaxFitness() {\n let record = 0;\n for (let i = 0; i < this.population.length; i++) {\n if (this.population[i].getFitness() > record) {\n record = this.population[i].getFitness();\n }\n }\n return record;\n }", "title": "" }, { "docid": "e0945f176b6f157b176fe0ff5ee02349", "score": "0.65047973", "text": "evaluatePopulation() {\n let totalFitness = 0\n this.pop.forEach(function(agent) {\n let f = fitness(agent.str)\n agent.fitness = f\n totalFitness += f\n })\n this.pop.forEach(function(agent) {\n agent.fitness /= totalFitness\n }) \n this.pop.sort(function(agent1, agent2) {\n return agent2.fitness - agent1.fitness\n })\n }", "title": "" }, { "docid": "64dc9493980c9d3ad9d4f2f97d394f17", "score": "0.6428431", "text": "getFitness() {\n let answer = this.calculateAnswer();\n\n if (answer > Number.MAX_SAFE_INTEGER || _.isUndefined(answer) || _.isNaN(answer) || _.isObject(answer)) {\n return 0; //lowest possible fitness score for divide by zero type answers\n }\n\n let normalisedAnswer = answer - this.equalsAmount;\n if (normalisedAnswer === 0) {\n return Number.MAX_SAFE_INTEGER; //perfect answer, max fitness\n } else {\n return 1 / math.abs(normalisedAnswer); //this results in a higher score the closer we get to zero\n }\n }", "title": "" }, { "docid": "2b0d0de54fa08f9cec73ce6cd92bdd2a", "score": "0.6427856", "text": "function roulette(population) {\n\t\tlet arrFitness = [];\n\t\tlet sum = 0;\n\t\tfor (var i = 0; i < population.length; i++) {\n\t\t\tlet fitnessValue = fitness(population[i]);\n\t\t\tarrFitness.push(fitnessValue);\n\t\t\tsum = sum + fitnessValue;\n\t\t}\n\t\tlet chosenArr = [];\n\t\tlet random = Math.random();\n\t\tfor (var j = 0; j < 2; j++) {\n\t\t\tlet find = false;\n\t\t\tlet before = arrFitness[0];\n\t\t\ti = 0;\n\t\t\twhile(!find){\n\t\t\t\t// console.log('hm');\n\t\t\t\tif (random < before/sum) {\n\t\t\t\t\tif (chosenArr.indexOf(population[i]) == -1) {\n\t\t\t\t\t\tchosenArr.push(population[i]);\n\t\t\t\t\t\tfind = true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\trandom = Math.random();\n\t\t\t\t\t\ti = 0;\n\t\t\t\t\t\tbefore = arrFitness[0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t\tbefore = before + arrFitness[i];\n\t\t\t}\n\t\t}\n\t\treturn chosenArr;\n\t}", "title": "" }, { "docid": "2c63a977800abdfb69a661cda69d903b", "score": "0.6368551", "text": "naturalSelection() {\n // clear ArrayList\n this.matingPool = [];\n\n let maxFitness = 0;\n for(let i = 0; i < this.population.length; i++) {\n if (this.population[i].fitness > maxFitness) {\n maxFitness = this.population[i].fitness;\n }\n }\n // higher fitness = more frequency of that elem = more likely to be picked\n // lower fitness = lower frequency = less likely to be picked\n for(let i = 0; i < this.population.length; i++) {\n let fitness = scale(this.population[i].fitness, 0, maxFitness, 0, 1);\n //let n = Math.floor(this.fitness*100);\n let n = Math.floor(fitness*100);\n for (let j = 0; j < n; j++) { \n this.matingPool.push(this.population[i]);\n } \n } \n console.log(this.matingPool.length);\n }", "title": "" }, { "docid": "a8b8942e697349038a4db3ab4e25e7fd", "score": "0.6329806", "text": "calcFitness() {\n for(let i = 0; i < this.population.length; i++) {\n this.population[i].calcFitness(this.target);\n }\n }", "title": "" }, { "docid": "1f7fa54234ddc7f63b9b7a83ac42d561", "score": "0.6300638", "text": "calcFitness() {}", "title": "" }, { "docid": "81da86b3a1fcfc1075eee63f6d51854d", "score": "0.6272446", "text": "function calculateIdealFitness(){\n\t\tvar sumSq = new Object();\n\t\tsumSq.x = 0;\n\t\tsumSq.y = 0;\n\t\tsumSq.z = 0;\n\t\tvar k;\n\t\tk = 0;\n\t\tif(nAA.length>0) {\n\t\t\twhile (k<nAA.length && k<maxShift){\n\t\t\t\tif(nAA[k] !== undefined){\n\t\t\t\t\tsumSq.x = sumSq.x + nAA[k].x * nAA[k].x;\n\t\t\t\t}\n\t\t\t\tif(nAA[k] !== undefined){\n\t\t\t\t\tsumSq.y = sumSq.y + nAA[k].y * nAA[k].y;\n\t\t\t\t}\n\t\t\t\tif(nAA[k] !== undefined){\n\t\t\t\t\tsumSq.z = sumSq.z + nAA[k].z * nAA[k].z;\n\t\t\t\t}\n\t\t\t\tk++;\n\t\t\t}\n\t\t\tif(k>0){\n\t\t\t\tsumSq.x = sumSq.x / k;\n\t\t\t\tsumSq.y = sumSq.y / k;\n\t\t\t\tsumSq.z = sumSq.z / k;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tvar idealFitness = sumSq.x + sumSq.y + sumSq.z;\n\t\treturn idealFitness;\n\t}", "title": "" }, { "docid": "b0bfc584cb1d5e01c8698159f2b32c51", "score": "0.62421566", "text": "function calcFitness() {\n let sum = 0;\n for (bird of savedBirds) {\n sum += bird.score;\n }\n for (bird of savedBirds) {\n bird.fitness = bird.score / sum;\n }\n}", "title": "" }, { "docid": "b0d7dcc20be248a35b3f935adb1d2386", "score": "0.6188066", "text": "_findBestOf(worstPossible, findIsBetter, f) {\n var foldFunc, ref, winners;\n foldFunc = ([currentBest, currentWinners], agent) => {\n var result;\n result = this._world.selfManager.askAgent(f)(agent);\n if (result === currentBest) {\n currentWinners.push(agent);\n return [currentBest, currentWinners];\n } else if (NLType(result).isNumber() && findIsBetter(result, currentBest)) {\n return [result, [agent]];\n } else {\n return [currentBest, currentWinners];\n }\n };\n ref = foldl(foldFunc)([worstPossible, []])(this._unsafeIterator().toArray()), ref[0], winners = ref[1];\n return winners;\n }", "title": "" }, { "docid": "c078692b2a8e50efa3de6a826d64657c", "score": "0.61742526", "text": "calculateBestGame()\n\t{\n\t\tvar Skill=0;\n\t\tthis._userSkillLevel=0;\n\n\t\tfor(var i= 0; i< this._userGames.length; i++)\n\t\t{\n\t\t\tthis._userSkillLevel += this._userGames[i].gameSkill;\n\t\t\tif(this._userGames[i].gameResult == 0)\n\t\t\t\ti++;\n\t\t\telse if(Skill < this._userGames[i].gameSkill){\n\t\t\t\tSkill= this._userGames[i].gameSkill;\n\t\t\t\tthis._userBestGame= i;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "947e0ba4b5461b6d090d54e72293bd15", "score": "0.6148224", "text": "getFitness() {\n\t\tlet distance = dist( this.position.x, this.position.y, target.position.x, target.position.y );\n\t\tlet fitness = map( distance, 0, width, width, 0 );\n\n\t\tif (this.completed) {\n\t\t\t/**\n\t\t\t * If rocket finds the target, boost its fintess.\n\t\t\t */\n\t\t\tfitness *= 15;\n\t\t} \n\n\t\tif (this.crashed) {\n\t\t\t/**\n\t\t\t * If rocket crashed, reduce its fitness\n\t\t\t */\n\t\t\tif (this.crash_type == \"obstacle\") {\n\t\t\t\tfitness /= 15;\n\t\t\t} else if (this.crash_type == \"border\") {\n\t\t\t\tfitness /= 10;\n\t\t\t}\n\t\t}\n\n\t\treturn fitness;\n\t}", "title": "" }, { "docid": "3abee65074d3d448071abb28d6ca4eda", "score": "0.61448216", "text": "get_best() {\n let max = -1;\n let index = -1;\n \n for (let i = 0; i < this.dist.length; i++) {\n if (this.dist[i].no > max) {\n max = this.dist[i].no;\n index = i;\n }\n }\n\n // To be sure some class is returned\n if (index < 0) {\n return 0;\n }\n\n return this.dist[index].id;\n }", "title": "" }, { "docid": "6c72a532e0e6c32cc3f24c9fa3a9b423", "score": "0.6134323", "text": "evaluateFitness(){\n // calcuate the distance of bot from target.\n let distanceFromTarget = dist(this.target.x, this.target.y, this.pos.x, this.pos.y);\n\n // The farther the distance then lower the fitness need to be\n // hence mapping the distance (0 - 1000) to fitness score (100 - 0)\n // i.e. a bot with zero distance to target will get 100 as fitness score\n distanceFromTarget = map(distanceFromTarget, 0, 1000, 100, 0);\n\n // if the bot is evaluated to be having fitness 100 already \n // then then dont assigne this calculated fitness score\n if(this.fitness != 100)\n this.fitness = distanceFromTarget;\n }", "title": "" }, { "docid": "158285184cc5605224410945cafc3707", "score": "0.6125213", "text": "function findNextBestShift(thresholdShift, minShift, maxShift, fitnessArray){\n\t\t\t\t\t\n\t\tvar k = minShift;\n\t\tvar nextBestShift = minShift;\n\t\t\n\t\tvar thresholdFitness = checkFitness(thresholdShift,fitnessArray);\n\n\t\tvar nextBestFitness = checkFitness(k, fitnessArray);\n\t\t\n\n\t\t// skip over the shifts in the vicinity of thresholdShift\n\t\twhile ((k <= maxShift) && (k<thresholdShift-4) && (k>thresholdShift+4))\n\t\t{\n\t\t\tvar fitness = checkFitness(k, fitnessArray);\n\t\t\t\n\t\t\tif ((fitness > nextBestFitness) && (fitness < thresholdFitness)){\n\t\t\t\tnextBestFitness = fitness;\n\t\t\t\tnextBestShift = k;\t\t\t\n\t\t\t\tk++;\n\t\t\t} \t\t\t\n\t\t}\n\t\treturn nextBestShift;\t\n\t}", "title": "" }, { "docid": "bdc4344ed22741e063c08ee21ba146c7", "score": "0.6109406", "text": "get_best() {\n let max = 0;\n let index = -1;\n \n for (let i = 0; i < this.l.length; i++) {\n if (this.l[i].prob > max || index == -1) {\n max = this.l[i].prob;\n index = i;\n }\n }\n\n return this.l[index].id;\n }", "title": "" }, { "docid": "359f5b77571a759015f004fecf3823ad", "score": "0.6108061", "text": "calcFitness() {\n for (let i = 0; i < this.population.length; i++) {\n this.population[i].calcFitness();\n }\n }", "title": "" }, { "docid": "4c62487839588ec284afe0787eb10fa3", "score": "0.6091446", "text": "getBestSolutions(){\r\n let besten = [];\r\n let decrementor = this.optimalMembers.length - 1;\r\n while (decrementor > 0) {\r\n if (this.optimalSolutionValues[decrementor] == this.optimalSolutionScore) {\r\n besten.push(this.optimalMembers[decrementor]);\r\n decrementor--;\r\n } else {\r\n break;\r\n }\r\n }\r\n return besten;\r\n }", "title": "" }, { "docid": "9fad8b046a107d88b7ed27ccdb23be11", "score": "0.6070403", "text": "function normalizeFitness() {\n var sum = 0;\n for (var i = 0; i < fitness.length; i++) {\n sum += fitness[i];\n }\n for (var i = 0; i < fitness.length; i++) {\n fitness[i] = fitness[i] / sum;;\n }\n}", "title": "" }, { "docid": "153466e2abb80fbce2009a614b2e5383", "score": "0.6058538", "text": "calcFitness() {\n for (let i = 0; i < this.population.length; i++) {\n this.population[i].calcFitness(this.tours);\n }\n }", "title": "" }, { "docid": "5207ad9cffa3d7badda631b9f8fd4f6e", "score": "0.6054845", "text": "sortByFitness(arr)\n {\n if(arr.length < 2)\n {\n //Base case of recursive algorithm\n return arr;\n } else\n {\n let mid = Math.ceil(arr.length/2),\n left = arr.slice(0, mid),\n right = arr.slice(mid, arr.length);\n\n //Calls mergesort recursively\n return this._merge(\n this.sortByFitness(left),\n this.sortByFitness(right)\n );\n }\n }", "title": "" }, { "docid": "15a8cc4bea0d9294a314145095c2e373", "score": "0.60449874", "text": "getFittest()\n {\n let fittest = this.tours[0];\n\n // Loop through individuals to find fittest\n for (let i = 0; i < this.populationSize(); i++) {\n // console.log(this.getTour(i))\n if (fittest.getFitness() <= this.getTour(i).getFitness()) {\n fittest = this.getTour(i);\n }\n }\n return fittest;\n }", "title": "" }, { "docid": "ca392d65a9fbcb5ec1ba54ec735b382e", "score": "0.60319895", "text": "getAverageFitness()\n {\n let total = 0;\n for (let i = 0; i < this.population.length; i++) {\n total += this.population[i].fitness;\n }\n return total / (this.population.length);\n }", "title": "" }, { "docid": "8781985a227694518ea5f1b0b519b5b5", "score": "0.60292584", "text": "function sortByScores(eliteSize) {\n sortedScores = [];\n for (var i = 0; i < currentScores.length; i++) {\n sortedScores[i] = 0;\n var val = currentScores[i];\n //compare scores to every other score\n for (var j = 0; j < currentScores.length; j++) {\n //if a score is better than the one we picked\n if (currentScores[j] < val && i != j) {\n //increase the \"position\" ctr of the solution we are evaluating\n sortedScores[i] = sortedScores[i] + 1;\n }\n //if the scores are the same, the first one is arbitrary declared worse.\n if (currentScores[j] == val && i < j) {\n sortedScores[i] = sortedScores[i] + 1;\n }\n }\n\n //Elite Scores\n for(var j=0;j<eliteSize;j++){\n if (sortedScores[i] == j) {\n elite.push(population[i]);\n }\n }\n if(sortedScores[i]==0){\n //initialise the oldEliteScore buffer\n if (oldEliteScore == undefined) {\n oldEliteScore = eliteScore;\n }\n //define current best score\n eliteScore = currentScores[i];\n //if current best < old best reset ctr\n if (eliteScore != oldEliteScore) {\n eliteScoreGenCtr = 0;\n oldEliteScore = eliteScore;\n }\n //else if current best = old best increment ctr\n else if (eliteScore == oldEliteScore) {\n eliteScoreGenCtr++;\n }\n }\n }\n}", "title": "" }, { "docid": "38795305be66051cf214a0bed5ae38fc", "score": "0.6023472", "text": "function selectAction() {\n var state = getState();\n var actions = (getActions());\n var best = null, bestScore = -Infinity;\n for (var i = 0; i < actions.length; i++) {\n var action = actions[i];\n var score = getQValue(state, action) +\n\toptimism/(visitCount(state, action) + 1);\n if (score > bestScore) {\n bestScore = score;\n best = action;\n }\n }\n incVisitCount(state, best);\n //console.log(bestScore);\n return best;\n}", "title": "" }, { "docid": "0b10d706395c7a35e866d2da2e096edd", "score": "0.6009006", "text": "function calculate_fitnesses(population){\n fitnesses=[];\n for (let index = 0; index < population_size; index++) {\n fitnesses.push(fitness(population[index]));\n }\n return fitnesses;\n}", "title": "" }, { "docid": "3c0c8f68ea026fc8cb2f990c9282c6e0", "score": "0.59939396", "text": "getFittest() {\n let fittest = this.tours[0];\n // Loop through individuals to find fittest\n for (let i = 1; i < this.size(); i++) {\n if (fittest.getFitness() <= this.getTour(i).getFitness()) {\n fittest = this.getTour(i);\n }\n }\n return fittest;\n }", "title": "" }, { "docid": "07c1ed577c2073c81615234990fa28f7", "score": "0.5974525", "text": "getAverageFitness() {\n let total = 0;\n for (let i = 0; i < this.population.length; i++) {\n total += this.population[i].fitness;\n }\n return total / (this.population.length);\n }", "title": "" }, { "docid": "b2c3231afd7d11be0df7a634b342ac6a", "score": "0.5961268", "text": "calcFitness(alvo) {\r\n let pontuacao = 0; //passa por todas posicoes do vetor gene. Se a letra é igual e esta na posicao certa ao da frase alvo, ganha um ponto.\r\n for (let i = 0; i < this.genes.length; i++) {\r\n if (this.genes[i] == alvo.charAt(i)) {\r\n pontuacao++;\r\n }\r\n }\r\n this.fitness = pontuacao / alvo.length; //o fitness é calculado com a quantidade de pontos obtidos dividido pelo tamanho da frase alvo\r\n this.fitness = pow(this.fitness,4); //o valor é elevado a quarta\r\n }", "title": "" }, { "docid": "d8d61805605aa19116975c8454ca16e9", "score": "0.5952475", "text": "function calculate_fitness(arr) {\n\tvar sum = 0;\n\tfor (var i = 1; i < arr.length; i++)\n\t\tsum =\n\t\t\tsum +\n\t\t\tgeolib.getDistance(\n\t\t\t\tCORDINATES[arr[i]],\n\t\t\t\tCORDINATES[arr[i - 1]],\n\t\t\t\t0.01,\n\t\t\t);\n\tsum =\n\t\tsum +\n\t\tgeolib.getDistance(\n\t\t\tCORDINATES[0],\n\t\t\tCORDINATES[arr[arr.length - 1]],\n\t\t\t0.01,\n\t\t);\n\treturn sum;\n}", "title": "" }, { "docid": "c06ce43564b67781d755f7e46b595d46", "score": "0.5944747", "text": "calculateFitness(target) // calculate fitness, receives target value \n {\n let score = 0;\n for ( let i=0; i < this.genes.length; i++)\n {\n if(this.genes[i] == target.charAt(i))\n {\n score ++; // increase score if any character is matched\n } \n }\n this.fitness = score/target.length ; // to have percentage\n this.fitness = Math.pow(this.fitness,2);\n }", "title": "" }, { "docid": "f81fbfe4507eb754a2386e0f21de9103", "score": "0.59430605", "text": "function normalizeFitness(birds) {\n for (let i = 0; i < birds.length; i++) {\n birds[i].score = pow(birds[i].score, 2);\n }\n\n let sum = 0;\n for (let i = 0; i < birds.length; i++) {\n sum += birds[i].score;\n }\n for (let i = 0; i < birds.length; i++) {\n birds[i].fitness = birds[i].score / sum;\n }\n}", "title": "" }, { "docid": "6c773ece746b3415891384145897ae1a", "score": "0.5926172", "text": "function genetic_TSP() {\n\tcreate_initial_population();\n\tlet iterations = 0;\n\tlet limit = N ** (5 / 2);\n\twhile (iterations < limit) {\n\t\tselect_best_genes();\n\t\tcrossover();\n\t\tif (iterations % 20 == 0) mutation();\n\t\titerations++;\n\t}\n\tselect_best_genes();\n\treturn [PARENTS[0], calculate_fitness(PARENTS[0])];\n}", "title": "" }, { "docid": "24e7c70cf5ed425688ebc7625ffc5996", "score": "0.5909882", "text": "getBestBoard() {\n // Sort board for picking best board, and sort\n // for next generation\n this.boards.sort((a, b) => { return b.fitness - a.fitness })\n\n // If best board number 0 fitness is the same as\n // best board number 1, we choose best board 1\n // to get better visualization\n if (this.boards[1].fitness == this.boards[0].fitness) return this.boards[1]\n else return this.boards[0]\n }", "title": "" }, { "docid": "536d710e10301388143ebc00d12d13c3", "score": "0.5890343", "text": "function getBestIndividual() {\n return parents[0].solution;\n }", "title": "" }, { "docid": "69d43ceb6357f76a65818b3ce3964b19", "score": "0.588613", "text": "setBestPlayer() {\r\n var max = 0;\r\n var maxIndex = 0;\r\n for (var i = 0; i< this.players.length; i++) {\r\n if (this.players[i].fitness > max) {\r\n max = this.players[i].fitness;\r\n maxIndex = i;\r\n }\r\n }\r\n\r\n this.bestPlayer = maxIndex;\r\n\r\n if (max > this.bestFitness) {\r\n this.bestFitness = max;\r\n this.genPlayers.push(this.players[this.bestPlayer].gimmeBaby());\r\n }\r\n\r\n //if this player reached the goal then reset the minimum number of steps it takes to get to the goal\r\n if (this.players[this.bestPlayer].reachedGoal) {\r\n this.minStep = this.players[this.bestPlayer].cerebro.passo;\r\n this.solutionFound = true;\r\n }\r\n }", "title": "" }, { "docid": "496656202a2deb9a828a80104dab1161", "score": "0.58799857", "text": "calculateFitness() {\r\n\t\tthis._fitnessScore = ((this._energyStatus.water/MAX_WATER) * (this._energyStatus.food/MAX_FOOD)) + (this._lifeSpan/GENERATION_LIFETIME);\r\n\t}", "title": "" }, { "docid": "c9bd464fc410390e9b71472a7f224919", "score": "0.5876502", "text": "function showBestFit() {\n best_fit = 0\n best_fit_index = 0\n for( var i = 0; i < population_size; i++) {\n if (population[i].fitness > best_fit) {\n best_fit_index = i\n }\n }\n $('#best_fit').html(population[best_fit_index].dna_sequence)\n console.log(population[best_fit_index].dna_sequence)\n}", "title": "" }, { "docid": "3eccf04e5bcf5d538db0ba451ff1406d", "score": "0.5868919", "text": "get fitness() {\r\n\t\treturn this._fitnessScore;\r\n\t}", "title": "" }, { "docid": "9f7aed12c1ddd9479c8a770090841a45", "score": "0.5857614", "text": "sortFitness() {\n this.pop.sort((a, b) => {\n return b.fitness - a.fitness;\n });\n }", "title": "" }, { "docid": "ac320ef1d18b179ed3ce8968dfec13bf", "score": "0.5857364", "text": "function ga(n, count) {\n\t\tlet population = initPopulation(n);\n\t\t// console.log(population, 'init');\n\t\tfor (var i = 0; i < count; i++) {\n\t\t\tlet populationTemp = [];\n\t\t\tfor (var k = 0; k < n; k++) {\n\t\t\t\tpopulationTemp.push(population[k]);\n\t\t\t}\n\t\t\tfor (var j = 0; j < 2; j++) {\n\t\t\t\tlet tmp = crossOver(roulette(population));\n\t\t\t\tfor (var k = 0; k < 2; k++) {\n\t\t\t\t\tpopulationTemp.push(tmp[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tpopulation = maxFitness(n, populationTemp);\n\t\t\t// for (var k = 0; k < 4; k++) {\n\t\t\t// \tconsole.log(population[k], fitness(population[k]));\n\t\t\t// }\n\t\t}\n\t\treturn population;\n\t}", "title": "" }, { "docid": "0950ef84a7a638b1ceb543d3267edef8", "score": "0.5835402", "text": "function best(features) {\n var best = null;\n features.forEach(function(feature) {\n if (best == null || feature.x * feature.y > best.x * best.y) {\n best = feature\n }\n })\n return best\n}", "title": "" }, { "docid": "8b85e3fa7bdc15bb14d71ddbe35cf935", "score": "0.5829245", "text": "function getBestNN(){\n\tvar maxFitness = -1;\n\tvar bestNNIndex;\n\n\tfor (var i = 0; i < gen.genomes.length; i++) {\n\t\tif (gen.genomes[i].fitness > maxFitness) {\n\t\t\tmaxFitness = gen.genomes[i].fitness;\n\t\t\tbestNNIndex = i;\n\t\t}\n\t}\n\n\tprintSelectedNeuralNet(gen.genomes[bestNNIndex]);\n}", "title": "" }, { "docid": "5754e05c5313e00349b5be88dd3841c4", "score": "0.5816293", "text": "CalculateFitness() {\n\n let hitRate = parseFloat(this.nShotsHit) / parseFloat(this.nShotsFired); //Percentage of shots that hit asteroids\n this.fFitness = (this.nScore + 1) * 10; //Min 10\n this.fFitness *= this.nLifeSpan;\n this.fFitness *= hitRate * hitRate; //Uses hitRate squared to force fitness's top priority to be aiming. \n //Final fitness is determined by score * time alive *(hitRate * hitRate)\n\n }", "title": "" }, { "docid": "5bdfbafe6fb30ebbefb2760274541a7c", "score": "0.5811001", "text": "function pickOne() {\n // Start at -1\n var index = -1;\n // Pick a random number between 0 and 1\n var r = random(1);\n // Keep subtracting probabilities until you get less than zero\n // Higher probabilities will be more likely to be picked since they will\n // subtract a larger number towards zero\n while (r > 0) {\n // And move on to the next\n index += 1;\n r -= population[index].fitness;\n }\n return population[index];\n}", "title": "" }, { "docid": "8028ba3a983a839b38910fad4fbb87f2", "score": "0.5780066", "text": "normalizeFitness() {\n let sum = 0;\n for (let mem of this.deadPop) {\n sum += mem.fitness;\n }\n for (let mem of this.deadPop) {\n mem.fitness = mem.fitness / sum;\n }\n\n }", "title": "" }, { "docid": "b5701b86c67b0bd0e5fbcc291a574110", "score": "0.57691866", "text": "function findHighest(x){\n\n let highScore = 0;\n for (let i = 0; i < x.length; i++) {\n\n if (highScore < x[i]) {\n\n highScore = x[i];\n }\n }\n //console.log(\"Highscore of cost array\", highScore)\n return highScore;\n\n}", "title": "" }, { "docid": "44de5b107a1a839e0ce9a1a23273ad4c", "score": "0.57470673", "text": "function maxFitness(n, population) {\n\t\tlet arrFitness = population.sort(function(a, b) {\n\t\t\tif (fitness(a) > fitness(b)) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\tif (fitness(a) < fitness(b)) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t});\n\t\treturn arrFitness.slice(0, n);\n\t}", "title": "" }, { "docid": "c61c231846137ac635cca19ced7d5863", "score": "0.5720288", "text": "evaluate(doel){\r\n this.solutions = [];\r\n let counter = 0;\r\n\r\n for (let i = 0; i < this.values.length; i++) {\r\n if (this.values[i] <= doel) {\r\n this.solutions.push(this.members[i]);\r\n counter++;\r\n\r\n // A check with the best (the best seen so far).\r\n if (this.values[i] > this.optimalSolutionScore) {\r\n this.optimalSolutionScore = this.values[i];\r\n this.optimalSolutionValues.push(this.values[i]);\r\n this.optimalMembers.push(this.members[i]);\r\n } else if(this.values[i] === this.optimalSolutionScore) {\r\n\r\n // Loop through to check if it is a unique member.\r\n let uniqueMember = true;\r\n for (let k = 0; k < this.optimalMembers.length; k++) {\r\n if (this.optimalMembers[k] === this.members[i]) {\r\n uniqueMember = false;\r\n };\r\n }\r\n // Add if unique in encoding.\r\n if (uniqueMember) {\r\n this.optimalMembers.push(this.members[i]);\r\n this.optimalSolutionValues.push(this.values[i]);\r\n }\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "270cc344e60ff876850042537cce3268", "score": "0.5714957", "text": "function getBestProfit(array) {\n if (array.length <= 1) {\n throw new Error(\"Entered array does not contain sufficient data.\");\n }\n // variable for bestProfit so far\n // initialize it with array[0] - array[1]\n let bestProfit = array[1] - array[0];\n\n let lowestPrice = array[0];\n\n for (let i = 1; i < array.length; i++) {\n const currentPrice = array[i];\n\n // potential profit for current loop\n const potentialProfit = currentPrice - lowestPrice;\n\n // updating best profit to max possible profit\n bestProfit = Math.max(bestProfit, potentialProfit);\n\n // updating our low value as we go\n lowestPrice = Math.min(lowestPrice, currentPrice);\n }\n\n return bestProfit;\n}", "title": "" }, { "docid": "719d79ee2845e1995d58377873deed5f", "score": "0.5692675", "text": "sort() {\n this.genomas.sort((a, b) => {\n return b.calcFitness() - a.calcFitness();\n });\n }", "title": "" }, { "docid": "a52428405f963f08ebd38a3bec9c6f7f", "score": "0.56710094", "text": "function pickWithBestScore(items, scores, distributerandom) {\n if(distributerandom) {\n var sum = 0;\n for(var i = 0; i < scores.length; i++) sum += scores[i];\n var r = Math.random() * sum;\n var count = 0;\n for(var i = 0; i < scores.length; i++) {\n count += scores[i];\n if(r < count) return i;\n }\n return items[items.length - 1];\n } else {\n var besti = 0;\n var bestscore = -999999;\n for(var i = 0; i < items.length; i++) {\n if(scores[i] > bestscore) {\n bestscore = scores[i];\n besti = i;\n }\n }\n\n var same = [];\n for(var i = 0; i < items.length; i++) {\n if(scores[i] == bestscore) {\n same.push(i);\n }\n }\n var s = randomIndex(same);\n\n return same[s];\n }\n}", "title": "" }, { "docid": "8d2844f2f93dca72da700cbbcabcbbb3", "score": "0.56586254", "text": "function averageFitness(fitnessTable)\r\n{\r\n var avg = 0;\r\n for (var i = 0; i < fitnessTable.length; i++) {\r\n avg = avg + fitnessTable[i];\r\n }\r\n avg = avg / fitnessTable.length;\r\n return avg;\r\n}", "title": "" }, { "docid": "443589a5cf827001c107a8cb614d93ea", "score": "0.563339", "text": "function tournamentSelect(paths) {\n\tvar tournamentSize = 8;\n\tvar fittest = -1;\n\tvar bestDistance = Number.MAX_VALUE;\n\tfor (var i = 0; i < tournamentSize; i++) {\n\t\tvar randomIndex = Math.floor(paths.length *getRandomIntInclusive(0, 1) );\n\t\tvar fitness = getPathDistance(paths[randomIndex]);\n\t\tif (fitness < bestDistance) {\n\t\t\tbestDistance = fitness;\n\t\t\tfittest = randomIndex;\n\t\t}\n\t}\n\treturn fittest;\n}", "title": "" }, { "docid": "a9e302650dd182f7ecb19e031b278e85", "score": "0.56239915", "text": "calculateFitness(clusters) {\r\n // Calculate distance fitness\r\n let fitness = this.calculateDistanceFitness(clusters);\r\n // Calculate energy fitness\r\n return fitness;\r\n }", "title": "" }, { "docid": "a99e3d5813cdfb8b57a994587e87074a", "score": "0.56097096", "text": "function findBestmove() {\n\t\tvar best = -1000;\n\t\tcoordsX = -1;\n\t\tcoordsY = -1;\n\t\tfor(var i = 0; i < 3; i++) {\n\t\t\tfor(var j = 0; j < 3; j++) {\n\t\t\t\tif(gameBoard[i][j] == null) {\n\t\t\t\t\tgameBoard[i][j] = aiChoice;\n\t\t\t\t\tvar moveVal = minimax(false);\n\t\t\t\t\tgameBoard[i][j] = null;\n\t\t\t\t\tif(moveVal > best) {\n\t\t\t\t\t\tcoordsX = i;\n\t\t\t\t\t\tcoordsY = j;\n\t\t\t\t\t\tbest = moveVal;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5fa0ff21d9755f48b029a7e9bee3cf96", "score": "0.56030893", "text": "function getParent(rankArray, totalFitness){\n\tvar sum = 0;\n\tvar count = 0;\n\tvar parent;\n\tvar randNum = Math.floor((Math.random() * totalFitness)+1);\n\tvar elite = Math.ceil(rankArray.length * 0.1); //Pointer for the top 10% of creatures\n\n\tif(Math.random() > eliteChance){\n\t\treturn rankArray[rankArray.length - Math.floor((Math.random() * elite)+1)]; //Return a random creature from the top 10%\n\t}\n\telse{\n\t\twhile(sum < randNum){\n\t\t\tparent = rankArray[count];\n\t\t\tsum += parent.energy;\n\t\t\tcount++;\n\t\t}\n\t}\n\n\treturn parent;\n}", "title": "" }, { "docid": "b31450afd6af1ae7dae7cd1fd525b7e8", "score": "0.55966944", "text": "function determineBestHero()\n{\n var compareArray = [0,0,0,0,0,0,0,0,0,0,0,0]; //this array is used to compare individual heroes to the team score.\n var j=0; //secondary counter for loop\n var benefitCounter = 0; //the variable where a hero's contribution to the team is tallied.\n var benefitCounterArray = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; //The index of this array determines what\n //hero will be suggested. Increase the size of this array to add new heroes (sombra?)\n var heroCount = 0; //a counter that shifts assignment index of benefitCounterArray.\n var heroSuggestArray = []; //allows for the suggestion of multiple heroes with the same benefit score.\n var heroesToSuggest = []; //translates the above numbers into hero strings to return.\n removeChosenHeroes(); //function that removes heroes already chosen from consideration.\n\n for (i=0; i<heroes.length; i++) //works with indeces along the main hero array.\n {\n if ((i-11)%12 === 0 && i !== 0) //every hero takes up 12 consecutive indeces of the hero array. If the 12th position\n //is reached, it computes below and starts the count over. && exception is for when the position is 0.\n {\n benefitCounterArray[heroCount] = benefitCounter; //sets each value of the array to the number of positive aspects\n //of that hero on the team\n j = 0; //resets the compare array index for a new hero.\n benefitCounter = 0; //variable to store positive aspects of hero pick\n heroCount = heroCount + 1; //keeps track of benefitCounterArray position\n }\n //for every non-final position of the hero array, it calculates benefit differently\n else\n {\n compareArray[j] = currentTeamScore[j] + heroes[i];\n if (j === 0 || j === 1 || j === 2 || j === 5) //SRDPS, MRDPS, LRDPS, and sustainability are calculated the same\n {\n if (compareArray[j] >= attributeTriggers[j]) { //if the team score with this hero is above a trigger...\n benefitCounter=benefitCounter+(compareArray[j]/2); //it adds half the team score's value with the hero to\n //the benefit counter\n }\n }\n else if (j === 3 || j === 6 || j === 8) //mobility, team support abilities, and area control\n {\n if (compareArray[j] >= attributeTriggers[j]) {\n benefitCounter=benefitCounter+2; //flat +2 for meeting the requirements\n }\n }\n else if (j === 4) //healing\n {\n if(compareArray[j] === attributeTriggers[j]) {\n benefitCounter=benefitCounter+5; //if the team has 2 main healers, +5\n }\n else if(compareArray[j] === attributeTriggers[j]/2) {\n benefitCounter=benefitCounter+1; //if the team has 1 healer, it's not ideal, but still +1\n }\n else if(compareArray[j] === attributeTriggers[j]-1) {\n benefitCounter=benefitCounter+3; //if the team has a main healer, and a secondary healer like soldier +3\n }\n else if(compareArray[j]<attributeTriggers[j]) {\n benefitCounter=benefitCounter-6; //if the team has NO healer, -6\n }\n else if(compareArray[j]>(attributeTriggers[j])) {\n benefitCounter=benefitCounter-5; //if the team has too many healers, -5\n // this really only exists to not suggest a 3rd healer to a team with 2 selected.\n }\n }\n else if (j === 7) //tanking\n {\n if(compareArray[j] === attributeTriggers[j]) {\n benefitCounter=benefitCounter+4; // if the team has 2 tanks +4\n }\n else if(compareArray[j] === attributeTriggers[j]/2) {\n benefitCounter=benefitCounter+1; // if the team has 1 tank +1\n }\n else if(compareArray[j] < (attributeTriggers[j])) {\n benefitCounter=benefitCounter-3; // if the team has no tanks -3\n }\n else if(compareArray[j]>(attributeTriggers[j])) {\n benefitCounter=benefitCounter-5; // if the team has too many tanks -5\n }\n }\n else if (j === 9 || j === 10) //sniping and flanking\n {\n if (compareArray[j] === attributeTriggers[j]+1) {\n benefitCounter=benefitCounter-5; // if the team has 1 too many snipers or flankers -5\n }\n else if (compareArray[j] > attributeTriggers[j]+4) {\n benefitCounter=benefitCounter-7; // if the team has way too many snipers or flankers -7\n }\n else if (compareArray[j] > attributeTriggers[j]+3) {\n benefitCounter=benefitCounter-6; // if the team has too many snipers or flankers -5\n }\n }\n j = j+1; //moves the attribute counter.\n }\n }\n heroSuggestArray = indexofLargest(benefitCounterArray); //determines what index has the highest benefit.\n return(heroSuggestArray);\n}", "title": "" }, { "docid": "3ab6255fb9a2cd61ffd8635b3a4f5108", "score": "0.5593748", "text": "runGeneration() {\nlet previousTopFitness = this.myPopulation[0].myFitness;\n\nlet numToDrop = util.makeEven((this.turnoverRate * this.populationSize));\nlet numToKeep = this.myPopulation.length - numToDrop;\n\n// Replace the Organisms beyond numToKeep with offspring\n// from parents, starting with the best parents.\nlet parentIndex = 0;\n\n// Since numToKeep is even, we won't violate the loop \n// boundary by incrementing by 2\nfor(let i=numToKeep; i < this.myPopulation.length - 1; i += 2) {\nconst parents = this.select2(parentIndex);\nconst children = parents[0].crossover(parents[1]);\nthis.myPopulation[i] = children[0];\nthis.myPopulation[i+1] = children[1];\nparentIndex += 2;\n} // for\n\n// Randomly mutate a few remaining Organisms\nfor(let i=0; i < this.myPopulation.length; i++) {\nif (Math.random() < this.mutationRate) {\nthis.myPopulation[i] = this.myPopulation[i].mutate(this.myMinGeneValue, this.myMaxGeneValue);\n} // if\n} // for\n\n// See if we have improved\nthis.sortPopulation();\nlet currentTopFitness = this.myPopulation[0].myFitness;\n\nif (previousTopFitness === currentTopFitness) {\nthis.generationsWithoutChange++;\n} else {\nthis.generationsWithoutChange = 0;\n} // if\n\n// After a lot of no improvement, shake things up a bit\nif (this.generationsWithoutChange >= this.nudgeThreshold) {\nthis.nudgePopulation();\n} // if\n}", "title": "" }, { "docid": "10552648cd47303b13dd7b4a18bf28f7", "score": "0.55883557", "text": "evaluateGen(){\n\n //Find top two scorers\n //TODO: this algorithm is not always correct\n var first = this.gen[0];\n var second = this.gen[1];\n for(var i = 0; i < this.genSize; i++){\n if(this.gen[i].score > first.score){\n second = first;\n first = this.gen[i];\n }\n }\n\n this.topScore = first.score;\n\n //Create a new generation\n this.createGen(this.crossover(first.chr, second.chr));\n }", "title": "" }, { "docid": "4f6ac752325ccb8b2fa089640f862a02", "score": "0.5573612", "text": "findFrontierElementIndex(arr, estimatedCost) {\r\n for (let i = 0; i < arr.length; i++ ) {\r\n if (arr[i].estimate > estimatedCost) {\r\n return i;\r\n }\r\n }\r\n\r\n return -1;\r\n }", "title": "" }, { "docid": "d44b10eea7d00e61174013fea72ebef3", "score": "0.5566447", "text": "getBestWeapon(){\n var bestWeapon = this.weaponInventory[0];\n var i;\n for (i = 0; i < this.weaponInventory.length; i++){\n if (bestWeapon[0] < this.weaponInventory[i][0]){\n bestWeapon = this.weaponInventory[i];\n }\n }\n return bestWeapon;\n }", "title": "" }, { "docid": "58f75712076bca0902ef32f6c56f3190", "score": "0.5553908", "text": "sortPopulation() {\n// First, compute each Organism's fitness\nthis.myPopulation.forEach(o => o.setFitness(this.mySpawner.fitness(o)));\n\nthis.myPopulation.sort(util.compareOrganisms);\n}", "title": "" }, { "docid": "39da34c091c98931b6e360b85bf4bb15", "score": "0.55463433", "text": "naturalSelection() {\r\n var newPlayers = [];//next gen\r\n this.setBestPlayer();\r\n this.calculateFitnessSum();\r\n\r\n //the champion lives on\r\n newPlayers[0] = this.players[this.bestPlayer].gimmeBaby();\r\n newPlayers[0].isBest = true;\r\n for (var i = 1; i< tamanhoPopulacao; i++) {\r\n //select parent based on fitness\r\n var parent = this.selectParent();\r\n\r\n //get baby from them\r\n newPlayers[i] = parent.gimmeBaby();\r\n }\r\n\r\n // this.players = newPlayers.slice();\r\n this.players = [];\r\n for(var i = 0 ; i< newPlayers.length;i++){\r\n this.players[i] = newPlayers[i];\r\n }\r\n this.gen ++;\r\n }", "title": "" }, { "docid": "49e2be15ff295c6d66ea300627dec4fd", "score": "0.55355173", "text": "selectChild (fitnessSum) {\n const rand = Math.random() * fitnessSum;\n let runningSum = 0;\n for (let i = 0; i< this.balls.length; i++) {\n runningSum+= this.balls[i].fitness;\n if (runningSum > rand) {\n return this.balls[i].brain.clone()\n }\n }\n //should never get to this point\n return null;\n }", "title": "" }, { "docid": "f30f4ec8137a4a35b49bff505d9abd8c", "score": "0.5534984", "text": "selection() {\n // Clear the ArrayList\n this.matingPool = [];\n\n // Calculate total fitness of whole population\n let maxFitness = this.getMaxFitness();\n\n // Calculate fitness for each member of the population (scaled to value between 0 and 1)\n // Based on fitness, each member will get added to the mating pool a certain number of times\n // A higher fitness = more entries to mating pool = more likely to be picked as a parent\n // A lower fitness = fewer entries to mating pool = less likely to be picked as a parent\n for (let i = 0; i < this.population.length; i++) {\n let fitnessNormal = map(this.population[i].getFitness(), 0, maxFitness, 0, 1);\n let n = int(fitnessNormal * 100); // Arbitrary multiplier\n for (let j = 0; j < n; j++) {\n this.matingPool.push(this.population[i]);\n }\n }\n }", "title": "" }, { "docid": "d6c7d1edd6a331a3db02949393487eff", "score": "0.5533523", "text": "calcFitness()\n {\n this.AIs.forEach(ai => {\n ai.calcFitness();\n })\n }", "title": "" }, { "docid": "44a46aa012b2fe28823026a078e6bccb", "score": "0.55233485", "text": "function secondLowestSecondHighest(array) {\n\n}", "title": "" }, { "docid": "36b888d69c5a4c108c51044287b37a8c", "score": "0.5515296", "text": "weightPopulation() {\n let populationFitness = this.population.map(this.fitness.bind(this))\n let fs = populationFitness.map((x) => x === 0 ? 0.001 : x)\n\n let totalFitness = fs.reduce((a, b) => a + b)\n let weightedFitness = fs.map((f) => f / totalFitness)\n\n return weightedFitness\n }", "title": "" }, { "docid": "47a400290b3ae441074075db6dafbf47", "score": "0.5506611", "text": "getAverageFitness() {\n\n }", "title": "" }, { "docid": "834d911eed7ce0872210d9895b709808", "score": "0.55058193", "text": "sortVehiclesByFitnessScore() {\n this.vehicles.sort(function(a,b){return b.fitnessScore - a.fitnessScore});\n }", "title": "" }, { "docid": "1f979af932cd337b9079b73fc830d17c", "score": "0.5495376", "text": "calcFitness(target) {\n let score = 0;\n for (let i = 0; i < this.genes.length; i++) {\n if (this.genes[i] == target.charAt(i)) { //character is same at spot\n score++;\n }\n }\n this.fitness = score / target.length; //up to you\n }", "title": "" }, { "docid": "b468ee75b1d5c9778b2c0561509f16e4", "score": "0.5491733", "text": "function findFitnessRating() {\n\tvar closenessModifier = 1;\n\tvar areaModifier = 1;\n\tvar areaFactor = 200;\n\n\tvar closeness = findClosenessRating();\n\tvar area = findAreaRating(areaFactor);\n\tvar total = (closeness * closenessModifier) + (area * areaModifier);\n\n\tconsole.log(\"closeness\", closeness, \"area\", area, \"total\", total);\n\n\treturn total;\n}", "title": "" }, { "docid": "06c19d74b84c6a9696531c9aa3837274", "score": "0.54873735", "text": "function getBestApt(population) {\n return population.reduce((apt,element) => apt = element.apt > apt ? element.apt : apt, null );\n}", "title": "" }, { "docid": "b530eb40bea8a7f34953a7d56b65a822", "score": "0.5486368", "text": "function bestSpot(){\n return emptySquares()[0];\n}", "title": "" }, { "docid": "c7355e0496eea323cca4417e45f72c85", "score": "0.54821855", "text": "calculateFitness() {\r\n for (var i = 0; i< this.players.length; i++) {\r\n this.players[i].calculateFitness();\r\n }\r\n }", "title": "" }, { "docid": "61c827c5da9d98bd65eab7f20112fb37", "score": "0.5480104", "text": "function nextGeneration() {\n fitnessData.push(getAverageFitness());\n bestFitnessData.push(getBestFitness());\n\n const count = Math.ceil(0.1 * population.length);\n let best = [];\n while (best.length < count) {\n // find the best available indiviudal\n let bestIndividual = population[0];\n let bestFitness = bestIndividual.calculateFitness();\n population.forEach(individual => {\n let fitness = individual.calculateFitness();\n if (fitness < bestFitness) {\n bestIndividual = individual;\n bestFitness = fitness;\n }\n });\n best.push(bestIndividual);\n population.splice(population.indexOf(bestIndividual), 1);\n }\n\n population = [];\n for (var i = 0; i < count * 9; i++) {\n // implement method of 1 of reproduction\n // choose two different parents\n let idx1 = Math.floor(Math.random() * best.length);\n let idx2;\n do {\n idx2 = Math.floor(Math.random() * best.length);\n } while (idx2 == idx1);\n population.push(new NeuralNetwork(best[idx1], best[idx2]));\n }\n best.forEach(ind => {\n population.push(ind.clone());\n });\n \n generation += 1;\n generationTag.innerHTML = \"Pop. Size: \" + population.length + \"<br>Generation: \" + generation;\n}", "title": "" }, { "docid": "8656391fa8bc4807d06a113ce7fbbd20", "score": "0.54559755", "text": "function maxScoreIndex(array, elements) {\n // add this code body\n}", "title": "" }, { "docid": "14719e68c499f2fd131622a7a252e043", "score": "0.54538757", "text": "function fitness(chromosome) {\n\t\t// console.log(chromosome);\n\t\tlet index = 0;\n\t\tlet fitness = 0;\n\t\twhile(chromosome[index] != 7){\n\t\t\tif (routes[chromosome[index]][chromosome[index+1]] == 0) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tfitness = fitness + routes[chromosome[index]][chromosome[index+1]];\n\t\t\tindex++;\n\t\t}\n\t\treturn 1 / fitness;\n\t}", "title": "" }, { "docid": "08b49e8881a30454875d7ac2ccbdaa36", "score": "0.5448671", "text": "function getFitness(indv) \n{\n // let unique = indv.filter((item, i, ar) => ar.indexOf(item) === i);\n let err = indv.filter(element => element === false);\n\n for (let idx = 0; idx < data_class_requirement.length; idx++) \n {\n data_class_requirement[idx][\"pref\"] = data_preferensi_dosen[indv[idx]];\n }\n let dengan_ruang = setRuangan();\n let problem = dengan_ruang.filter(element => element[\"pref\"][\"room_shift\"] === undefined);\n \n return calculateErrorFitness([err,problem]);\n}", "title": "" }, { "docid": "5d170517948e971ee906d50a25040344", "score": "0.543653", "text": "function maxProfit1(A){\nvar maxProfit = 0;\nvar aux;\nvar firstTime = true;\nfor(var i = 0 ; i < A.length -1; i++){\n for (var j = i+1 ; j < A.length ; j++){ \n aux = A[j] - A[i];\n if(maxProfit < aux){\n maxProfit = aux;\n };\n };\n};\nreturn maxProfit;\n}", "title": "" }, { "docid": "553cd50ba81a4a17580b72be1605e329", "score": "0.5435296", "text": "function bestFriend(friends){\n let besty = friends[0];\n for (const friend of friends){\n if (friend.length > besty.length){\n besty = friend;\n }\n }\n return besty;\n}", "title": "" }, { "docid": "e05869b4257bde8e2b3e82cb38b256cb", "score": "0.54349893", "text": "averageFitness(strategy, map) {\n let totalScore = 0\n for (let i=0; i<this.numberOfSimulations; i++) {\n totalScore += this.testFitness(strategy, map)\n }\n return totalScore / this.numberOfSimulations\n }", "title": "" }, { "docid": "9d47a0bca563e4119992da7690baabf4", "score": "0.54305303", "text": "function evolve(){\n\n\tgenomes.sort(function (a, b) {\n \treturn b.fitness - a.fitness;\n\t});\n\n\tvar newGenomes = [];\n\tnewGenomes.push(clone(genomes[0]));\n\twhile (newGenomes.length < populationSize) {\n\t\tnewGenomes.push(makeChild(getRandomGenome(), getRandomGenome()));\n\t}\n\n}", "title": "" }, { "docid": "a01003e0cf12431fe43077e031fa9048", "score": "0.5430467", "text": "function getMaxProfit_greedy(arr) {\n\n\tvar min_price = arr[0];\t\n\tvar max_profit = arr[1] - arr[0];\n\n\tif(arr.length<2){\n\t\tthrow new Error(\"Minimum 2 prices needed to make profit.\");\n\t}\n\n\tfor(var i=1; i<arr.length; i++){\n\n\t\tvar potential_profit = arr[i] - min_price;\n\n\t\tmax_profit = Math.max(potential_profit, max_profit);\n\n\t\tmin_price = Math.min(arr[i], min_price);\n\n\t}\n\treturn max_profit;\n}", "title": "" }, { "docid": "1f4add2d9cb8e2e15eb68dedc8653d20", "score": "0.54258776", "text": "function findBestItem(items) {\n var bestItem = null;\n var bestValue = 0;\n var itemsIndex = 0;\n \n // Loop over the items array.\n // Find the item with the highest valueOverDistance()\n while(itemsIndex < items.length) {\n var item = items[itemsIndex];\n if (valueOverDistance(item) > bestValue) {\n bestValue = valueOverDistance(item);\n bestItem = item;\n }\n itemsIndex += 1;\n }\n return bestItem;\n}", "title": "" }, { "docid": "600373533065aa7ffced39f34b347e15", "score": "0.542557", "text": "function maxScore(array, elements) {\n // add this code body\n}", "title": "" }, { "docid": "0b418755c38e07a876f6babc87b9f817", "score": "0.54083097", "text": "function selectBestCandidate(candidates, callback) {\r\n var result = _(candidates)\r\n .reduce(function (best, cand) {\r\n if (cand.size > best.size) var temp = cand, cand = best, best = temp;\r\n best.searched += cand.searched;\r\n return best;\r\n });\r\n callback(null, result);\r\n }", "title": "" }, { "docid": "b457f086ea3d5ae4de4a6b0afa5cff2b", "score": "0.54072815", "text": "function calculateFitness(boardArr, linesCleared, weights) {\n\t//console.log(`calculating`);\n\t//if the board is the game over str, have it be negative\n\t//sorry network but this one isn't up to you\n\tif (boardArr == ai_endStr) {\n\t\treturn -1e5\n\t}\n\n\t//step 1: figure out relavant parameters of the board\n\tvar maxHeight;\n\tvar numWells = 0;\n\tvar numHoles = 0;\n\tvar variance = 0;\n\tvar nerf = 0;\n\n\t//to calculate heights: loop through the board and find out how far down each row goes\n\tvar rowHeights = [];\n\tvar counting = false;\n\tfor (var x=0; x<board_width; x++) {\n\t\tcounting = false;\n\t\trowHeights[x] = 0;\n\t\tfor (var y=board_heightBuffer; y<board_height; y++) {\n\t\t\t//if there's a block there, the height has been found\n\t\t\tif (!counting && boardArr[y][x] != undefined) {\n\t\t\t\trowHeights[x] = board_height - y;\n\t\t\t\tcounting = true;\n\t\t\t} else if (counting && boardArr[y][x] == undefined) {\n\t\t\t\tnumHoles += 1;\n\t\t\t}\n\t\t}\n\t}\n\n\t//now that heights are known, min, max, and variance can be calculated\n\tmaxHeight = Math.max(...rowHeights);\n\n\t//similar game-ending check, I'd rather the AI not reach the very top\n\tif (maxHeight >= board_height - 3) {\n\t\tnerf = -1e3;\n\t}\n\n\t//determine number of wells and variance, this is a bit messy but it allows me to only loop once\n\tif (rowHeights[1] - rowHeights[0] > 2) {\n\t\tnumWells += rowHeights[1] - rowHeights[0] - 2;\n\t}\n\n\tfor (var u=1; u<rowHeights.length-1; u++) {\n\t\tnumWells += Math.max(0, Math.min(rowHeights[u-1] - rowHeights[u], rowHeights[u+1] - rowHeights[u]) - 2);\n\t\tvariance += Math.abs(rowHeights[u] - rowHeights[u-1]);\n\t}\n\n\tvariance += Math.abs(rowHeights[rowHeights.length-1] - rowHeights[rowHeights.length-2]);\n\tif (rowHeights[rowHeights.length-1] - rowHeights[rowHeights.length-1] > 2) {\n\t\tnumWells += rowHeights[rowHeights.length-1] - rowHeights[rowHeights.length-1] - 2;\n\t}\n\n\n\t//step 2: calculate fitness based on weights\n\treturn (nerf + maxHeight * weights.a + numWells * weights.b + numHoles * weights.c + variance * weights.d);\n}", "title": "" }, { "docid": "6fd6f6355e957cc946ed1f496266d2c1", "score": "0.5406906", "text": "function findMinMax(arr) {}", "title": "" }, { "docid": "81a800bea19f396ca0828f959d7a8eb8", "score": "0.54015934", "text": "function strat1(){\r\n\tvar max = -10000000;\r\n\tvar maxsommet;\r\n\tfor (let i = 0; i < grapheCourant.length; i++){\r\n\t\tif(grapheCourant[i][1] > max){\r\n\t\t\tmax = grapheCourant[i][1];\r\n\t\t\tmaxsommet = grapheCourant[i][0];\r\n\t\t}\r\n\t}\r\n\treturn maxsommet;\r\n}", "title": "" }, { "docid": "e1498e33594de97215bbb8a214b59585", "score": "0.5395478", "text": "function highPass(arr, cutoff) {\r\n var filteredArr = [];\r\n for(i=0;i<arr.length; i++){\r\n if(arr[i]>cutoff){\r\n filteredArr.push(arr[i]);\r\n }\r\n }\r\n return filteredArr;\r\n}", "title": "" }, { "docid": "0320add59a2bcf9ad1f817da8a7f5282", "score": "0.5393683", "text": "pickOne() {\n\t\tlet index = 0;\n\t\tlet r = Math.random();\n\t\twhile (r > 0) {\n\t\t\tr -= this.species[index].fitness;\n\t\t\tindex += 1;\n\t\t}\n\t\tindex -= 1;\n\t\tlet selected = this.species[index].clone();\n\t\treturn selected;\n\t}", "title": "" } ]
db4908fa5347a777b31f9792b49b97fd
const redis = require( "../../main.js" ).redis; const RU = require( "../utils/redis_Utils.js" ); const RC = require( "../CONSTANTS/redis.js" ).YOU_TUBE;
[ { "docid": "8191acbdbef60cd3c298dc82ff24fafd", "score": "0.0", "text": "function wStart( wOptions ) {\n\treturn new Promise( async function( resolve , reject ) {\n\t\ttry {\n\t\t\tif ( !wOptions.playlist_id ) { resolve( \"no playlist given\" ); return; }\n\t\t\tawait require( \"../utils/generic.js\" ).setStagedFFClientTask( { message: \"YTStandardForeground\" , playlist_id: [ wOptions.playlist_id ] } );\n\t\t\tawait require( \"../firefoxManager.js\" ).openURL( \"http://localhost:6969/youtubeStandard\" );\n\t\t\tresolve();\n\t\t}\n\t\tcatch( error ) { console.log( error ); reject( error ); }\n\t});\n}", "title": "" } ]
[ { "docid": "7704c02124c3d6d50e0e3152a4251171", "score": "0.5703485", "text": "init() {\n return new Promise(async (resolve, reject) => {\n const redis = require('redis');\n\n let connection = require(\"../redis-connection.json\")\n\n let config = {\n port: connection.port,\n host: connection.host,\n password: connection.password,\n //db: connection.db,\n };\n\n this._subscriber = redis.createClient(config);\n\n this._subscriber.on(\"ready\", () => {\n //Listen on broadcast and hostname channel\n this._subscriber.subscribe(\"broadcast\");\n this._subscriber.subscribe(this._hostname);\n\n //Listen for error messages\n this._subscriber.on(\"error\", function (error) {\n console.error(error);\n });\n\n //Listen for messaages\n this._subscriber.on(\"message\", (channel, message) => {\n if (channel == \"broadcast\") {\n this.notifyLocalSubscribers(JSON.parse(message));\n } else if (channel == this._hostname) {\n this.finishQuery(JSON.parse(message));\n }\n });\n\n this._publisher = redis.createClient(config);\n this._publisher.on(\"ready\", () => resolve(true));\n });\n })\n }", "title": "" }, { "docid": "6b79d08802626338002f9053181a0430", "score": "0.5602604", "text": "get require() {\n }", "title": "" }, { "docid": "51d428a5839601814f0808f585d35bdb", "score": "0.5582729", "text": "_connect(callback) {\n const RedisService = require('./RedisService'); // put here to prevent dependency circle\n // noinspection JSUnusedGlobalSymbols\n this._service = new RedisService(this.app, this.config, () => {\n this._subscribe(callback);\n });\n }", "title": "" }, { "docid": "5a6d07a05d8909c63abd51999b006231", "score": "0.5534941", "text": "static async getCoreUtils() {\n if (MoneroUtils.coreUtils === undefined) MoneroUtils.coreUtils = await require('../submodules/mymonero-core-js/monero_utils/monero_utils')();\n return MoneroUtils.coreUtils;\n }", "title": "" }, { "docid": "a25a044db0934309b1bca7cc1d1bef38", "score": "0.55285615", "text": "function setupClient(){\n redisClient.on('connect', function() {\n console.log('Redis connected');\n });\n}", "title": "" }, { "docid": "3df09421d6e9400f7432a26dacf86a5d", "score": "0.55134135", "text": "constructor () {\n\t\tthis.client = redis.createClient({ host: 'redis' });\n\t\tthis.client.get = jsonifyResponse(promisify(this.client.get).bind(this.client));\n\t\tthis.client.set = stringifyRequest(promisify(this.client.set).bind(this.client));\n\t\tthis.client.del = promisify(this.client.del).bind(this.client);\n\t}", "title": "" }, { "docid": "881178b408e2543a130766209490b77f", "score": "0.5490293", "text": "async function main(){\n var redisHost = process.env.redisHost || '127.0.0.1';\n var redisPort = parseInt(process.env.redisPort) || 6378;\n\n console.log(\"conneting to \" + redisHost + \":\" + redisPort )\n\n var redisClient = redis.createClient({host : redisHost, port : redisPort});\n\n bluebird.promisifyAll(redis.RedisClient.prototype);\n bluebird.promisifyAll(redis.Multi.prototype);\n\n\n try {\n var key = await redisClient.getAsync('PaymentEventHandler');\n\n if(key == null){\n key = '0-0' \n }\n\n for(;;){\n\n let rtnVal = await redisClient.xreadAsync('COUNT', 10, 'BLOCK',1000,'STREAMS','StreamCreatePayment',key )\n \n //console.log(util.inspect(rtnVal, {showHidden: false, depth: null}))\n if( rtnVal != null){\n\n for(let j = 0; j < rtnVal[0][1].length; j++){\n\n key = rtnVal[0][1][j][0]; \n console.log(\"key:\"+key)\n let val = rtnVal[0][1][j][1][1]; \n let streamPayload = JSON.parse(val);\n console.log(streamPayload)\n\n let paymentPayload = {}\n\n paymentPayload.user=streamPayload.user\n paymentPayload.orderId=streamPayload.orderId\n\n /*\n * If order is over $100 deny the order\n * otherwise approve it\n */\n if( streamPayload.totalPrice > 100){\n\n paymentPayload.status = 'denied'\n\n } else {\n\n paymentPayload.status = 'approved'\n }\n\n /*\n * Send domain event to the StreamOrderPayment\n */\n \n try {\n let rtn = await redisClient.xaddAsync('StreamOrderPayment', key, \n 'paymentPayload', JSON.stringify(paymentPayload) )\n }\n catch(error) {\n console.error(error);\n }\n\n console.log(\"--------------------------------------------\")\n redisClient.set('PaymentEventHandler',key) \n }\n }\n }\n }\n catch(error) {\n console.error(error);\n }\n}", "title": "" }, { "docid": "45b89b309b5ca811fa150f8f6a630e60", "score": "0.54852647", "text": "function databaseUnitTest() {\n\n if (butrDatabase.getSqlEngine() === 'mysql-pool') {\n butrMysql.executeQuery('SELECT \\'MySQL Pool = Hello, World!\\' AS hello', butrConstants.MEMCACHED_TABLENONE, '0', printMysqlResult);\n \n for(var i = 0; i < 10; ++i) {\n butrMysql.executeQuery('SELECT \\'MySQL Pool Counting\\', '+i+' AS i', butrConstants.MEMCACHED_TABLENONE, '0', printMysqlResult);\n }\n }\n \n if (butrDatabase.getSqlEngine() === 'mysql') {\n butrMysql.executeQuery('SELECT \\'MySQL = Hello, World!\\' AS hello', butrConstants.MEMCACHED_TABLENONE, '0', printMysqlResult);\n \n for(var i = 0; i < 10; ++i) {\n butrMysql.executeQuery('SELECT \\'MySQL Counting\\', '+i+' AS i', butrConstants.MEMCACHED_TABLENONE, '0', printMysqlResult);\n }\n }\n \n if (butrDatabase.getNoSqlEngine() === 'redis') {\n butrRedis.setKey(\"string key\", \"string val\");\n butrRedis.setHashKey(\"hash key\", \"hashtest 1\", \"some value\");\n butrRedis.setHashKey([\"hash key\", \"hashtest 2\", \"some other value\"]);\n \n butrRedis.fetchKey(\"string key\",\n function (err, replies, key, callback) {\n console.log('redis: ' + replies.length + \" replies:\");\n replies.forEach(function (reply, i) {\n console.log('redis : ' + i + \": \" + reply);\n });\n },\n function(err, result) { console.log(result); });};\n /*\n _redisConnection.hkeys(\"hash key\", function (err, replies) {\n if (err) {\n butrError.logError(err, butrConstants.LOG_LEVEL_WARNING, 'BUTR-DATABASE_REDISERROR');\n } else {\n console.log('redis: ' + replies.length + \" replies:\");\n replies.forEach(function (reply, i) {\n console.log('redis : ' + i + \": \" + reply);\n });\n }\n });\n */\n \n if (butrDatabase.getCacheEngine() === 'memcached') {\n butrMemcached.setKey(undefined, butrConstants.DATABASE_TABLE_BOOKING, 'uuid', 'SELECT 1', '1'); \n butrMemcached.setKey(undefined, butrConstants.DATABASE_TABLE_BOOKING, 'uuid', 'SELECT 3', '3'); \n butrMemcached.setKey(undefined, butrConstants.DATABASE_TABLE_BOOKING, 'uuid', 'SELECT \\'Damien Was Here\\'', 'Damien Was Here'); \n butrMemcached.setKey(undefined, butrConstants.DATABASE_TABLE_BOOKING, 'uuid', 'SELECT 4', '4'); \n butrMemcached.fetchKey('SELECT 1', butrConstants.DATABASE_TABLE_NONE, 'uuid', printMemcachedResult); \n butrMemcached.deleteKey('SELECT 1'); \n butrMemcached.fetchKey('SELECT 1', butrConstants.DATABASE_TABLE_NONE, 'uuid', printMemcachedResult);\n butrMemcached.fetchKey('SELECT \\'Damien Was Here\\'', butrConstants.DATABASE_TABLE_NONE, 'uuid', printMemcachedResult); \n butrMemcached.fetchKey('SELECT 3', butrConstants.DATABASE_TABLE_NONE, 'uuid', printMemcachedResult); \n butrMemcached.fetchKey('SELECT 4', butrConstants.DATABASE_TABLE_NONE, 'uuid', printMemcachedResult); \n }\n \n}", "title": "" }, { "docid": "829c82fd088d18efe92d49c0d1e246a0", "score": "0.5438691", "text": "function main(params) {\n // get twilioSid and twilioAuthToken from\n // https://www.twilio.com/console\n const twilioClient = require('twilio')(params.twilioSid, params.twilioAuthToken)\n var redis = require('redis')\n const bluebird = require('bluebird')\n var cursor = '0'\n\n bluebird.promisifyAll(redis.RedisClient.prototype);\n\n var redisConfig = {\n user: params.redisUsername,\n password: params.redisPassword,\n host: params.redisHost,\n port: params.redisPort\n }\n const redisClient = redis.createClient(redisConfig)\n\n function sendSMS(recipient) {\n twilioClient.messages.create({\n to: recipient,\n from: params.twilioNumber,\n body: params.payload,\n }, function(err, message) {\n if (err) {\n console.log('error:', err);\n }\n else {\n console.log(message);\n }\n })\n }\n\n // loop through all SMS clients subscribed to given language, text translation result\n redisClient.scanAsync(cursor, 'MATCH', params.language + \":*\").then(\n function (res) {\n var keys = res[1]\n for (key in keys) {\n redisClient.getAsync(keys[key]).then(\n function(number) {\n if ((params.senderNumber) && (params.senderNumber == number)) {\n console.log(\"skipping\")\n } else{\n console.log(\"sending text to \" + number)\n sendSMS(number)\n }\n })\n }\n })\n}", "title": "" }, { "docid": "ceb3ab2a13a15b84371e068984913a68", "score": "0.5423812", "text": "function Utils() {}", "title": "" }, { "docid": "d588b4437f06c3807eac1bc17c01d016", "score": "0.5410018", "text": "function Utils() {\n\n}", "title": "" }, { "docid": "66733c5ab34f631ca764e88ccabdd28b", "score": "0.53949547", "text": "static createClient(...args) {\n return new Redis(...args);\n }", "title": "" }, { "docid": "c4ded6dcb97b929117517e1b7b08e38d", "score": "0.5363246", "text": "function getRedisClient() {\n if (redisClient === null) {\n bluebird.promisifyAll(redis.RedisClient.prototype);\n redisClient = redis.createClient(\n process.env.REDIS_INSTANCE_PORT || appConfig.settings.get('/REDIS_INSTANCE_PORT'),\n process.env.REDIS_INSTANCE_HOST || appConfig.settings.get('/REDIS_INSTANCE_HOST'), {\n retry_strategy: function (options) {\n if (options.error.code === 'ECONNREFUSED') {\n // End reconnecting on a specific error and flush all commands with a individual error\n console.log('The Redis server is down');\n return Boom.create(503, \"The Redis server is down\", app_config_constants.get('/NODE_CODES/CACHING_DOWN'));\n }\n if (options.total_retry_time > 1000 * 60 * 60) {\n // End reconnecting after a specific timeout and flush all commands with a individual error\n console.log('Retry time exhausted');\n return Boom.create(503, \"The Redis server is down\", app_config_constants.get('/NODE_CODES/CACHING_DOWN'));\n }\n if (options.times_connected > 100) {\n // End reconnecting with built in error\n console.log('Maximum number of retries has been reached');\n return Boom.create(503, \"The Redis server is down\", app_config_constants.get('/NODE_CODES/CACHING_DOWN'));\n }\n // reconnect after\n console.log('Reconnect after: ' + Math.max(options.attempt * 100, 30000).toString());\n return Math.max(options.attempt * 100, 30000);\n }\n }\n );\n\n redisClient.on(\"error\", function (err) {\n console.log(\"Error \" + err);\n generalLogger.log.error(logTypes.fnExit({\n err:err\n }), `redisClient error`);\n });\n\n redisClient.on(\"connect\", function (err) {\n console.log(\"Connected to Redis server\");\n });\n\n redisClient.on(\"reconnecting\", function (err) {\n console.log(\"Attempting to reconnect to Redis server\");\n });\n\n console.log('Redis Client Created: ' + redisClient.address);\n }\n\n return redisClient;\n}", "title": "" }, { "docid": "40da9c53f2306a9c67ace9ac8c516b9b", "score": "0.5335847", "text": "function createRedisConnection() {\n const url = process.env.REDIS_URL || 'redis://localhost:6379';\n\n async function close() {\n const redis = new Redis(url);\n await redis.flushall();\n await redis.quit();\n }\n\n return {\n url,\n close,\n };\n}", "title": "" }, { "docid": "97f25759ff2312b34f735a2a774e7cd5", "score": "0.52717644", "text": "function util() {\n\n}", "title": "" }, { "docid": "78f5d37380be115f97565f75124ca333", "score": "0.5265898", "text": "function Utils(){\n}", "title": "" }, { "docid": "393d730f93643809a70c3d6410748356", "score": "0.525161", "text": "function RedisAdapter(mainLogger, gmeConfig) {\n var self = this,\n connectionCnt = 0,\n connectDeferred,\n disconnectDeferred,\n logger = mainLogger.fork('redisAdapter');\n\n this.client = null;\n /**\n * Provides methods related to a specific project.\n *\n * @param {string} projectId - identifier of the project (ownerId + '.' + projectName).\n * @constructor\n * @private\n */\n function RedisProject(projectId) {\n this.projectId = projectId;\n\n this.closeProject = function (callback) {\n var deferred = Q.defer();\n deferred.resolve();\n return deferred.promise.nodeify(callback);\n };\n\n this.loadObject = function (hash, callback) {\n var deferred = Q.defer();\n if (typeof hash !== 'string') {\n deferred.reject(new Error('loadObject - given hash is not a string : ' + typeof hash));\n } else if (!REGEXP.HASH.test(hash)) {\n deferred.reject(new Error('loadObject - invalid hash :' + hash));\n } else {\n Q.ninvoke(self.client, 'hget', projectId, hash)\n .then(function (result) {\n // Bulk string reply: the value associated with field,\n // or nil when field is not present in the hash or key does not exist.\n if (result) {\n deferred.resolve(JSON.parse(result));\n } else {\n logger.error('object does not exist ' + hash);\n deferred.reject(new Error('object does not exist ' + hash));\n }\n })\n .catch(deferred.reject);\n }\n\n return deferred.promise.nodeify(callback);\n };\n\n this.insertObject = function (object, callback) {\n var deferred = Q.defer();\n if (object === null || typeof object !== 'object') {\n deferred.reject(new Error('object is not an object'));\n } else if (typeof object._id !== 'string' || !REGEXP.HASH.test(object._id)) {\n deferred.reject(new Error('object._id is not a valid hash.'));\n } else {\n Q.ninvoke(self.client, 'hsetnx', projectId, object._id, JSON.stringify(object))\n .then(function (result) {\n // 1 if field is a new field in the hash and value was set.\n // 0 if field already exists in the hash and no operation was performed.\n if (result === 0) {\n Q.ninvoke(self.client, 'hget', projectId, object._id)\n .then(function (objectStr) {\n var errMsg;\n if (CANON.stringify(object) === CANON.stringify(JSON.parse(objectStr))) {\n logger.info('tried to insert existing hash - the two objects were equal',\n object._id);\n deferred.resolve();\n } else {\n errMsg = 'tried to insert existing hash - the two objects were NOT equal ';\n logger.error(errMsg, {\n metadata: {\n newObject: CANON.stringify(object),\n oldObject: CANON.stringify(JSON.parse(objectStr))\n }\n });\n deferred.reject(new Error(errMsg + object._id));\n }\n })\n .catch(deferred.reject);\n } else {\n if (object.type === 'commit') {\n Q.ninvoke(self.client, 'hset', projectId + COMMITS, object._id, object.time)\n .then(function () {\n deferred.resolve();\n })\n .catch(deferred.reject);\n } else {\n deferred.resolve();\n }\n }\n });\n }\n\n return deferred.promise.nodeify(callback);\n };\n\n this.getBranches = function (callback) {\n return Q.ninvoke(self.client, 'hgetall', projectId + BRANCHES)\n .then(function (result) {\n return result || {};\n })\n .nodeify(callback);\n };\n\n this.getBranchHash = function (branch, callback) {\n return Q.ninvoke(self.client, 'hget', projectId + BRANCHES, branch)\n .then(function (branchHash) {\n return branchHash || '';\n }).nodeify(callback);\n };\n\n this.setBranchHash = function (branch, oldhash, newhash, callback) {\n var deferred = Q.defer(),\n branchesHashMap = projectId + BRANCHES;\n\n if (oldhash === newhash) {\n Q.ninvoke(self.client, 'hget', branchesHashMap, branch)\n .then(function (branchHash) {\n branchHash = branchHash || '';\n if (branchHash === oldhash) {\n deferred.resolve();\n } else {\n deferred.reject(new Error('branch hash mismatch'));\n }\n })\n .catch(deferred.reject);\n } else if (newhash === '') {\n Q.ninvoke(self.client, 'hget', branchesHashMap, branch)\n .then(function (branchHash) {\n if (branchHash === oldhash) {\n Q.ninvoke(self.client, 'hdel', branchesHashMap, branch)\n .then(deferred.resolve);\n } else {\n deferred.reject(new Error('branch hash mismatch'));\n }\n })\n .catch(deferred.reject);\n } else if (oldhash === '') {\n Q.ninvoke(self.client, 'hsetnx', branchesHashMap, branch, newhash)\n .then(function (result) {\n // 1 if field is a new field in the hash and value was set.\n // 0 if field already exists in the hash and no operation was performed.\n if (result === 1) {\n deferred.resolve();\n } else {\n deferred.reject(new Error('branch hash mismatch'));\n }\n })\n .catch(deferred.reject);\n } else {\n Q.ninvoke(self.client, 'hget', branchesHashMap, branch)\n .then(function (branchHash) {\n if (branchHash === oldhash) {\n Q.ninvoke(self.client, 'hset', branchesHashMap, branch, newhash)\n .then(function () {\n deferred.resolve();\n })\n .catch(deferred.reject);\n } else {\n deferred.reject(new Error('branch hash mismatch'));\n }\n })\n .catch(deferred.reject);\n }\n\n return deferred.promise.nodeify(callback);\n };\n\n this.getCommits = function (before, number, callback) {\n return Q.ninvoke(self.client, 'hgetall', projectId + COMMITS)\n .then(function (result) {\n var i,\n hashArray,\n timestamp,\n hashKeys = Object.keys(result || {}),\n commitsInfo = [];\n\n // FIXME: This is not a very optimized implementation\n for (i = 0; i < hashKeys.length; i += 1) {\n timestamp = parseInt(result[hashKeys[i]], 10);\n if (timestamp < before) {\n commitsInfo.push({\n hash: hashKeys[i],\n time: timestamp\n });\n }\n }\n\n commitsInfo.sort(function (a, b) {\n return b.time - a.time;\n });\n\n hashArray = commitsInfo.slice(0, number).map(function (commitInfo) {\n return commitInfo.hash;\n });\n\n if (hashArray.length > 0) {\n hashArray.unshift(projectId);\n return Q.ninvoke(self.client, 'hmget', hashArray);\n } else {\n return [];\n }\n })\n .then(function (commitObjects) {\n return commitObjects.map(function (commitObject) {\n return JSON.parse(commitObject);\n });\n })\n .nodeify(callback);\n };\n }\n\n function openDatabase(callback) {\n connectionCnt += 1;\n logger.debug('openDatabase, connection counter:', connectionCnt);\n\n if (connectionCnt === 1) {\n if (self.client === null) {\n logger.debug('Connecting to redis...');\n connectDeferred = Q.defer();\n self.client = redis.createClient(gmeConfig.storage.database.options);\n self.client.on('error', function (err) {\n logger.error('Redis client: ', err);\n });\n self.client.on('ready', function () {\n logger.debug('Connected.');\n connectDeferred.resolve();\n });\n } else {\n logger.debug('Count is 1 but redis is not null');\n }\n } else {\n // we are already connected\n logger.debug('Reusing redis connection.');\n }\n\n return connectDeferred.promise.nodeify(callback);\n }\n\n function closeDatabase(callback) {\n connectionCnt -= 1;\n logger.debug('closeDatabase, connection counter:', connectionCnt);\n\n if (connectionCnt < 0) {\n logger.error('connection counter became negative, too many closeDatabase. Setting it to 0.', connectionCnt);\n connectionCnt = 0;\n }\n\n if (!disconnectDeferred) {\n disconnectDeferred = Q.defer();\n }\n\n if (connectionCnt === 0) {\n if (self.client) {\n logger.debug('Closing connection to redis...');\n self.client.on('end', function () {\n self.client = null;\n logger.debug('Closed.');\n disconnectDeferred.resolve();\n });\n self.client.quit();\n } else {\n disconnectDeferred.resolve();\n }\n } else {\n logger.debug('Connections still alive.');\n }\n\n return disconnectDeferred.promise.nodeify(callback);\n }\n\n function deleteProject(projectId, callback) {\n var deferred = Q.defer();\n\n if (self.client) {\n Q.ninvoke(self.client, 'del', projectId, projectId + BRANCHES, projectId + COMMITS)\n .then(function (result) {\n if (result > 0) {\n deferred.resolve(true);\n } else {\n deferred.reject(false);\n }\n })\n .catch(deferred.reject);\n } else {\n deferred.reject(new Error('Database is not open.'));\n }\n\n return deferred.promise.nodeify(callback);\n }\n\n function openProject(projectId, callback) {\n var deferred = Q.defer();\n\n logger.debug('openProject', projectId);\n\n if (self.client) {\n Q.ninvoke(self.client, 'exists', projectId)\n .then(function (result) {\n // 1 if the key exists.\n // 0 if the key does not exist.\n logger.debug('openProject, result', result);\n if (result === 1) {\n deferred.resolve(new RedisProject(projectId));\n } else {\n deferred.reject(new Error('Project does not exist ' + projectId));\n }\n })\n .catch(deferred.reject);\n\n } else {\n deferred.reject(new Error('Database is not open.'));\n }\n\n return deferred.promise.nodeify(callback);\n }\n\n function createProject(projectId, callback) {\n var deferred = Q.defer();\n\n logger.debug('createProject', projectId);\n\n if (self.client) {\n Q.ninvoke(self.client, 'hsetnx', projectId, '_id', projectId)\n .then(function (result) {\n // 1 if field is a new field in the hash and value was set.\n // 0 if field already exists in the hash and the value was updated.\n if (result === 1) {\n deferred.resolve(new RedisProject(projectId));\n } else {\n deferred.reject(new Error('Project already exists ' + projectId));\n }\n })\n .catch(deferred.reject);\n\n } else {\n deferred.reject(new Error('Database is not open.'));\n }\n\n return deferred.promise.nodeify(callback);\n }\n\n function renameProject(projectId, newProjectId, callback) {\n var deferred = Q.defer();\n\n if (self.client) {\n Q.ninvoke(self.client, 'renamenx', projectId, newProjectId)\n .then(function (result) {\n // 1 if key was renamed to newkey.\n // 0 if newkey already exists.\n if (result === 1) {\n // Force rename for branches and commits.\n Q.allSettled([\n Q.ninvoke(self.client, 'rename', projectId + BRANCHES, newProjectId + BRANCHES),\n Q.ninvoke(self.client, 'rename', projectId + COMMITS, newProjectId + COMMITS)\n ])\n .then(function (/*result*/) {\n // Result may contain errors if no branches or commits were created,\n // these do not matter.\n deferred.resolve();\n });\n } else {\n deferred.reject(new Error('Project already exists ' + newProjectId));\n }\n })\n .catch(function (err) {\n if (err.message === 'ERR no such key') {\n deferred.reject(new Error('Project does not exist ' + projectId));\n } else {\n deferred.reject(err);\n }\n });\n } else {\n deferred.reject(new Error('Database is not open.'));\n }\n\n return deferred.promise.nodeify(callback);\n }\n\n this.openDatabase = openDatabase;\n this.closeDatabase = closeDatabase;\n\n this.openProject = openProject;\n this.deleteProject = deleteProject;\n this.createProject = createProject;\n this.renameProject = renameProject;\n}", "title": "" }, { "docid": "e7d90aa1c4ca04a08822d2c03cc99544", "score": "0.5249505", "text": "function setup() {\n\n //redisClient.del(\"things\");\n\n console.log(\"------------------ MQTT Demo ------------------\")\n console.log(\" by @lhuet35 and @k33g_org for DevoxxFR 2015\")\n console.log(\"-----------------------------------------------\")\n console.log(' - Mosca mqttBroker listening on ' + mqttSettings.port)\n app.listen(httpPort);\n console.log(\" - Express listening on \" + httpPort);\n console.log(\" - Socket.io listening on \" + socketPort);\n console.log(\"-----------------------------------------------\")\n}", "title": "" }, { "docid": "0a3b79b4a20436c7675dcfa49b9c3bd7", "score": "0.5246822", "text": "function RedisSwarm(redis, id) {\n this.addToSwarm = () => redisExecuter(redis, client => client.saddAsync(\"swarm\", id));\n this.getSwarm = () => redisExecuter(redis, client => client.smembersAsync(\"swarm\"));\n\n // () -> Promise ()\n // TODO: when resetting, add myself back to the swarm\n this.resetSwarm = () => redisExecuter(redis, client => client.flushdbAsync());\n\n this.addInitiation = (otherID, connection) => redisExecuter(redis, client =>\n client.rpushAsync(otherID + \":initializingConnections\", JSON.stringify({\n id: id,\n initCode: connection\n }))\n );\n this.getPeerInitiations = () => redisExecuter(redis, client =>\n client.lrangeAsync(id + \":initializingConnections\", 0, -1)\n .then(others => others.map(JSON.parse))\n );\n this.getAndClearPeerInitiations = () => redisExecuter(redis, client =>\n client.lrangeAsync(id + \":initializingConnections\", 0, -1)\n .then(others => others.map(JSON.parse))\n .finally(() => client.delAsync(id + \":initializingConnections\"))\n );\n\n // ID -> AttemptConnection -> Promise ()\n this.addAttemptConnection = (otherId, connection) =>\n redisExecuter(redis, client => client.rpushAsync(otherId + \":attemptingConnections\", JSON.stringify({\n id: id,\n attemptCode: connection\n })));\n // () -> Promise AttemptConnection\n this.getAttemptedConnections = () => redisExecuter(redis, client =>\n client.lrangeAsync(id + \":attemptingConnections\", 0, -1)\n .then(others => others.map(JSON.parse))\n );\n // () -> Promise AttemptConnection\n this.getAndClearAttemptedConnections = () => redisExecuter(redis, client =>\n client.lrangeAsync(id + \":attemptingConnections\", 0, -1)\n .then(others => others.map(JSON.parse))\n .finally(() => client.delAsync(id + \":attemptingConnections\"))\n );\n\n // () -> Promise ()\n this.close = () => redisExecuter(redis, client => {\n P.all([\n client.sremAsync(\"swarm\", id),\n client.delAsync(id + \":initializingConnections\"),\n client.delAsync(id + \":attemptingConnections\"),\n ]);\n });\n}", "title": "" }, { "docid": "94bc690e725bb784a68793838bb9ec2a", "score": "0.52329504", "text": "function configRedis() {\n if (typeof sub !== 'undefined') {\n \n // Redis published message, push new data to each \n // client connected with the givin channel\n sub.on('message', function(channel, message) {\n message = JSON.parse(message);\n var model = message.model,\n options = message.options;\n \n if (options.channel !== channel) return;\n pushed(model, options);\n });\n\n // Redis subscribe message, alert each client that \n // someone has joined the channel ( optional )\n sub.on('subscribe', function(chan, count) {\n if (typeof db !== 'undefined') {\n getOnline(chan, {}, function(resp) {\n _.each(channels[chan], function(someone) {\n clients[someone] && clients[someone].subscribed(chan, resp);\n });\n });\n return;\n }\n _.each(channels[chan], function(someone) {\n clients[someone] && clients[someone].subscribed(chan, online[chan]);\n });\n });\n \n // Redis unsubscribe message, alert each client that \n // someone has left the channel ( optional )\n sub.on('unsubscribe', function(chan, count) {\n if (typeof db !== 'undefined') {\n getOnline(chan, {}, function(resp) {\n _.each(channels[chan], function(someone) {\n clients[someone] && clients[someone].unsubscribed(chan, resp);\n });\n });\n return;\n }\n _.each(channels[chan], function(someone) {\n clients[someone] && clients[someone].unsubscribed(chan, online[chan]);\n });\n });\n };\n}", "title": "" }, { "docid": "6db7aed8507df25e21866f9f6211a15d", "score": "0.52268827", "text": "checkRedis(){\n let self = this\n this.redisClient.get(\"gps_\"+this.imei_, function(err, reply) {\n reply != null \n ? self.checkCommandStatus(JSON.parse(reply)) \n : null\n })\n }", "title": "" }, { "docid": "813007f4e986930bec5aa83f22e95ed6", "score": "0.5202824", "text": "function Utils() {\n\n\t}", "title": "" }, { "docid": "7f2a3953436fc6b5ed0dae6b8b018341", "score": "0.51746905", "text": "function TelemetryCacheInRedis(log, keys, redis) {\n this.log = log;\n this.keys = keys;\n this.redis = redis;\n }", "title": "" }, { "docid": "2d470fd61f11c6f98c3a0b462374cba5", "score": "0.51648545", "text": "function CommonClient() {}", "title": "" }, { "docid": "a596ee2f60e383ae5f3c4b015d204b34", "score": "0.5140119", "text": "async function main(){\n var redisHost = process.env.redisHost || '127.0.0.1';\n var redisPort = parseInt(process.env.redisPort) || 6378;\n\n console.log(\"conneting to \" + redisHost + \":\" + redisPort )\n\n var redisClient = redis.createClient({host : redisHost, port : redisPort});\n\n bluebird.promisifyAll(redis.RedisClient.prototype);\n bluebird.promisifyAll(redis.Multi.prototype);\n\n\n try {\n var key = await redisClient.getAsync('OffsetOrderAggregate');\n\n if(key == null){\n key = '0-0' \n }\n\n for(;;){\n let rtnVal = await redisClient.xreadAsync('COUNT', 10, \n 'BLOCK',1000,'STREAMS',\n 'StreamOrderAggregate',key )\n\n if( rtnVal != null){\n for(let j = 0; j < rtnVal[0][1].length; j++){\n // process()\n key = rtnVal[0][1][j][0];\n //console.log(rtnVal[0][1][j][1][1]);\n\n let streamPayload = JSON.parse(rtnVal[0][1][j][1][1])\n\n let searchKey = '@user:'+escape(streamPayload.user)+' @id:'+escape(streamPayload.orderId)\n console.log('..... searchKey : ' +searchKey)\n\n /* \n * Get all the rows form event_store for \n * given orderID with ASC order\n */\n var searchResults = await redisClient.send_commandAsync('FT.SEARCH',['event_store', searchKey , \n 'SORTBY', 'timeStamp', 'ASC']) \n\n let CurrentOrderView = {}\n let timeStamp = moment().unix()\n\n /*\n * Loop through all the events of the order \n * to calculate the current state of the order\n */\n for(i = 1 ; i <= searchResults[0]; i++){\n\n let searchResult = searchResults[i*2]\n console.log(searchResult)\n searchResultJsonObj = create_json_object(searchResult)\n //console.log(searchResultJsonObj)\n\n /*\n * Prcoss the OrderCreatedEvent \n */\n if( searchResultJsonObj.eventType == 'OrderCreatedEvent' ){\n CurrentOrderView=JSON.parse(searchResultJsonObj.data);\n console.log(CurrentOrderView)\n console.log()\n }\n \n /*\n * Prcoss the PaymentEvent \n */\n if( searchResultJsonObj.eventType == 'PaymentEvent'){\n\n CurrentOrderViewTmp = JSON.parse(searchResultJsonObj.data)\n CurrentOrderView.status = CurrentOrderViewTmp.status\n console.log(CurrentOrderView)\n console.log()\n } \n }\n console.log(\"--------------------------------------------\")\n\n /*\n * Add or Replace View Store for Order\n */\n var rtn = await redisClient.send_commandAsync('FT.ADD',['order_view', escape(streamPayload.orderId), \n '1.0', 'REPLACE', 'FIELDS', \n 'user', escape(streamPayload.user), \n 'timeStamp', timeStamp, \n 'data', JSON.stringify(CurrentOrderView) ] )\n //console.log(rtn)\n }\n }\n redisClient.set('OffsetOrderAggregate',key) \n\n }\n }\n catch(error) {\n console.error(error);\n }\n}", "title": "" }, { "docid": "b3e0da134aa78b3b52827afb7ac83791", "score": "0.5117528", "text": "async function checkRedis() {\n if (!('REDIS_URL' in process.env)) {\n return 'N/A';\n }\n\n let redisUrl = process.env['REDIS_URL'];\n\n try {\n // Setup connection\n let client = redis.createClient(redisUrl);\n\n // Attach error handler\n client.on('error', (err) => {\n console.error(`[DA-Redis] ${err}`);\n client.quit();\n });\n\n // Perform simple write command\n const set = promisify(client.set).bind(client);\n await set('key', 'redis-check', 'EX', 10);\n\n // Quit connection and report\n client.quit();\n console.log(`[DA-Redis] Successfully tested Redis at ${redisUrl}.`);\n return 'OK';\n } catch (e) {\n console.error(`[DA-Redis] Failed to connect to Redis at ${redisUrl}: ${e}.`);\n return 'FAILED';\n }\n}", "title": "" }, { "docid": "d421360e5394c82d8770ea878e3cd07b", "score": "0.5100307", "text": "function setupMemcached () {\n}", "title": "" }, { "docid": "c5f897dd25007d3baaf565568ddb8c66", "score": "0.5098859", "text": "function init()\n{\n\tlet tweetMelb = createDBConnectionObject(databaseMelb).model('tweets');\n\tlet tweetChicago = createDBConnectionObject(databaseChicago).model('tweets');\n\tlet chicagoCrime = createDBConnectionObject(databaseChicagoCrime).model('crime');\n\tlet chicagoCrimeTrajectory = createDBConnectionObject(databaseChicagoCrime).model('crime');\n\n module.exports.tweetMelb = tweetMelb;\n module.exports.tweetChicago = tweetChicago;\n module.exports.chicagoCrime = chicagoCrime;\n module.exports.chicagoCrimeTrajectory = chicagoCrimeTrajectory; //trajectory calculation queries get their own connection obj\n}", "title": "" }, { "docid": "2095e57a1b5b418e0927de57f0b51d63", "score": "0.5079839", "text": "constructor() {\n this.mysql = require('mysql');\n this.util = require('util');\n this.async = require('async');\n this.dbUsername = process.env.dbUsername;\n this.dbPassword = process.env.dbPassword;\n this.dbName = process.env.dbName || 'deep_search';\n this.conn = this.mysql.createConnection({\n host: 'localhost',\n user: this.dbUsername,\n password: this.dbPassword,\n database: this.dbName,\n });\n this.conn.connect();\n }", "title": "" }, { "docid": "72bff82e8e2aaaf2c07a74eb46d65c1b", "score": "0.5079259", "text": "_locks () {\r\n // get connection\r\n let conn = config.get ('redis');\r\n\r\n // set prefix\r\n conn.prefix = config.get ('domain') + '.lock';\r\n\r\n // create events redis instance\r\n let client = redis.createClient (conn);\r\n\r\n // create new events class\r\n this._lock = {\r\n 'redis' : redisLock (client),\r\n 'local' : new lock ()\r\n };\r\n }", "title": "" }, { "docid": "70dcaa3fd0ae78365fc66dc17a379ce0", "score": "0.5030809", "text": "function onRedisClientConnect() {\n app.use(connect.static(__dirname + '/public'));\n app.use(connect.cookieParser());\n app.use(connect.session(sessionConfig));\n app.use(function(req, res, err) {\n if(req.method !== 'GET' || req.url.indexOf('/receiver' === -1)){ return next(); }\n var separator = '&',\n parts = decodeURI(req.url).split('?', 1)[0].replace(separator, '').split('/'); \n console.log(parts);\n });\n var server = http.createServer(app).listen(8080, 'cloudwizard.matthewdhowell.com'),\n io = sio.listen(server);\n io.set('authorization', socketSessionAuthorization);\n io.sockets.on('connection', onSocketConnect);\n}", "title": "" }, { "docid": "94dfdbbc10a5efbad275a3495462a44f", "score": "0.501879", "text": "async init() {\n\n // Create instance of Discord Client\n this.instance = new Discord.Client()\n\n // Connect to Discord\n this.instance.login(this.opts.apiKey).then(()=>{\n\n })\n\n if ('initialTotals' in this.opts) {\n ksDiscordBot.log(`Preset Totals: Pledges | Backers | Comments`)\n ksDiscordBot.log(`+${stats.totals.pledged} | +${stats.totals.backers_count} | +${stats.totals.comments_count}`)\n }\n\n // On connection start process\n this.instance.on('ready', () => {\n // Get channel key to use\n this.channel = this.instance.channels.get(this.opts.channelKey)\n\n // Start checking Kickstarter status\n ksDiscordBot.log(`Started polling`)\n this.startPolling()\n })\n }", "title": "" }, { "docid": "28c85fcaf91a3df0d1b92481c75acce8", "score": "0.50120074", "text": "function UtilsOBM() {\n}", "title": "" }, { "docid": "4e6b7d08e593a9a49f59d5990349e446", "score": "0.50103146", "text": "function getCache(key,cb){\nconsole.log(\"Inside getCache\");\nconsole.log(\"R\",R.db.redis.ready);\nif(R.db.redis.connected && R.db.redis.ready){\n console.log(\"in if connected:true and ready:true\");\n R.db.redis.get(key,(err,res)=>{\n if(err){\n //console.log(\"err in get Cache\",Object.keys(err));\n if(err.code==='NOAUTH'){\n let errObj={\n \"msg\": \"Redis Authentication Problem\"\n };\n return cb(errObj,null);\n }\n return cb(err,null);\n }else{\n if(res){\n console.log(\"res in get cache:\",res);\n return cb(null,res)\n }\n }\n })\n}else{\n console.log(\"in else connected:\",R.db.redis.connected,\"ready:\",R.db.redis.ready);\n let err=\"redisDown\";\n console.log(\"###########Redis is down\");\n return cb(err,null)\n}\n}", "title": "" }, { "docid": "6e595f2887ec532b6d85183cd84722db", "score": "0.50030047", "text": "async connect() {\n /* Connect to the database */\n this._db = await MoxLtHomeClient._connectToDb(this._options.connectionString);\n debug('Connected to MongoDB.');\n\n /* Create a tunnel to redis */\n /* Connect to the database and to Redis */\n this._publisher = redis.createClient();\n this._subscriber = redis.createClient();\n this._publisher.on(\"error\", e => {\n console.log(\"Error \" + e);\n });\n this._subscriber.on(\"error\", e => {\n console.log(\"Error \" + e);\n });\n debug('Connected to Redis.');\n }", "title": "" }, { "docid": "71d7a13e3997cb74666e79b9ed40bdee", "score": "0.50026596", "text": "function _0x187e(){const _0x5201c3=['354332XZSVKt','stringify','10gXCFmS','writeFileSync','chats','826660vMhFZs','push','831785OvEahb','9YWQYLr','30yImjxS','6342256ZSdPUT','2360940FsKSew','forEach','333777enEhHA','keys','5973359gTLRyl'];_0x187e=function(){return _0x5201c3;};return _0x187e();}", "title": "" }, { "docid": "0160e504daf2cab9b516ff321d76c799", "score": "0.49894038", "text": "async function checkRedis () {\n let ok = await redisClient.setAsync('test', 123) === 'OK'\n ok = ok && await redisClient.getAsync('test') === '123'\n logger.error(`redis w & r test ${ok ? 'success' : 'failed'}`)\n}", "title": "" }, { "docid": "ac5a7429482e40029eb3dcba77bbf44e", "score": "0.49827656", "text": "discordInit(){\n\t\tthis.discord = new Discord.Client();\n\t\tthis.discord.once( 'ready', () => {this.discord_ready = true;} );\n\t\tthis.discord.login( this.discord_token );\n\t\tthis.flake = Discord.SnowflakeUtil;\n\t}", "title": "" }, { "docid": "2e028156ea9f2ad0631e7955ad97ffcf", "score": "0.4980595", "text": "defineServerSide() {\n\t\tvar _this = this;\n\t\tif(Meteor.isServer) {\n\t\t\tCrawler.prototype.NPM = new Object();\n\t\t\t_this.NPM['cheerio'] = Npm.require('cheerio');\n\t\t\t_this.NPM['chalk'] = Npm.require('chalk');\n\t\t\t_this.NPM['future'] = Npm.require('fibers/future');\n\t\t}\n\t}", "title": "" }, { "docid": "5a04b270144cd082f64d425355a2dd57", "score": "0.49713898", "text": "constructor(){\n this.port = parseInt(process.env.PORT, 10);\n this.jwtPrivateKey = String(process.env.JWT_PRIVATE_KEY);\n this.passwordHashingSecret = String(process.env.PASSWORD_HASHING_SECRET);\n this.dbUri = String(process.env.DB_URI)\n }", "title": "" }, { "docid": "7afb22f76eaf602ce60553460609e1a0", "score": "0.49601915", "text": "function redisCheck(config) {\n return __awaiter(this, void 0, void 0, function () {\n var start, result;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n start = new Date().getTime();\n return [4 /*yield*/, redis_service_1.checkRedisClient(config)];\n case 1:\n result = _a.sent();\n config.port = config.port || types_1.Defaults.RedisPort;\n config.db = config.db || types_1.Defaults.RedisDB;\n return [2 /*return*/, {\n name: config.name,\n kind: types_1.HealthIntegration.RedisIntegration,\n status: result.status,\n response_time: getDeltaTime(start),\n url: resolveHost(config).host,\n error: result.error,\n }];\n }\n });\n });\n}", "title": "" }, { "docid": "c7ab404213904ad0df431997bc246154", "score": "0.49527925", "text": "function setup() {\r\n console.log('Mosca server is up and running');\r\n var c = 0;\r\n\r\n // general topics\r\n rndPub(\"/start-time\", 500, 1000, () => startTime.toString());\r\n rndPub(\"/uptime\", 500, 1000, () => Math.round((Date.now() - startTime) / 1000));\r\n rndPub(\"/counter\", 500, 1000, () => c++);\r\n rndPub(\"/rnd\", 1000, 2000, () => Math.round(Math.random() * 100));\r\n\r\n // text\r\n rndPub(\"/text/short\", 1000, 5000, () => \"Lorem ipsum\");\r\n rndPub(\"/text/long\", 1000, 5000, () => \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum elementum mollis ultrices. Curabitur eget libero sodales ligula mollis hendrerit at nec urna. Sed faucibus eget metus vel euismod. Nullam convallis arcu id diam facilisis, sit amet laoreet odio laoreet. Nulla tortor orci, posuere nec dapibus ac, rutrum et dolor. Cras sagittis a sapien at elementum. Etiam imperdiet justo et odio pulvinar, in ornare leo vestibulum. Ut at augue dolor. Donec vestibulum magna id pulvinar dictum. Proin magna augue, imperdiet tristique pretium ut, condimentum vel massa. Ut condimentum velit a cursus efficitur. Duis quis lobortis nisi. Praesent eu enim eget sapien malesuada ultrices. Cras quis ultrices metus. \");\r\n\r\n rndPub(\"/json/short-array\", 1000, 5000, () => JSON.stringify([\"aaa\", \"bbb\", 42]));\r\n rndPub(\"/json/short-object\", 1000, 5000, () => JSON.stringify({aaa: \"abc\", bbb: 42}));\r\n rndPub(\"/json/long-object\", 1000, 5000, () => JSON.stringify({\"payload\":\"MyAAMDE4AAA=\",\"fields\":{\"payload\":{\"light\":3,\"temp\":18},\"text\":\"3 018 \"},\"port\":127,\"counter\":28,\"dev_eui\":\"000000008E69B242\",\"metadata\":[{\"frequency\":868.3,\"datarate\":\"SF12BW125\",\"codingrate\":\"4/5\",\"gateway_timestamp\":3420668252,\"channel\":1,\"server_time\":\"2016-11-28T17:22:39.21518015Z\",\"rssi\":-115,\"lsnr\":-9.2,\"rfchain\":1,\"crc\":1,\"modulation\":\"LORA\",\"gateway_eui\":\"0000024B080E0539\",\"altitude\":221,\"longitude\":14.42204,\"latitude\":50.08947},{\"frequency\":868.3,\"datarate\":\"SF12BW125\",\"codingrate\":\"4/5\",\"gateway_timestamp\":401542396,\"channel\":1,\"server_time\":\"2016-11-28T17:22:39.385729404Z\",\"rssi\":-119,\"lsnr\":-18.5,\"rfchain\":1,\"crc\":1,\"modulation\":\"LORA\",\"gateway_eui\":\"1DEE148A60342739\",\"altitude\":260,\"longitude\":14.3962,\"latitude\":50.08835}]}));\r\n\r\n // non UTF-8 data\r\n rndPub(\"/binary/non-utf\", 1000, 5000, () => Buffer.from(\"AAAAABS2/j8g/P4/MOj7lhrg/j9Rni4vIPz+P7VIIUBw8v4/BOD+P8Dc/z+guP4/QAAAAHDy/j8AAAAAQBL/P3NCIUCw2v8/AAAAACMrIECguP4/SQ8AQLDa/z9JDwBA\", \"base64\"))\r\n}", "title": "" }, { "docid": "548144627b580c76142fc0e5cbb05290", "score": "0.4932559", "text": "async function main() {\n TokenLockerOnEthereum = await ethers.getContractFactory(\"TokenLockerOnEthereum\");\n tokenLockerOnEthereum = await TokenLockerOnEthereum.attach(\n process.env.ETH_TOKEN_LOCKER\n );\n\n await configureEthSide();\n\n // await mintFaucet();\n // let res = await tokenLockerOnEthereum.issueTokenMapReq(process.env.ERC20);\n // console.log(res);\n\n // await tokenLockerOnEthereum.lock(\n // process.env.ERC20,\n // process.env.WALLET_ADDRESS,\n // web3.utils.toWei('100', 'ether'),\n // options\n // ); \n}", "title": "" }, { "docid": "3d2e2de95a93395f5bc724b610fec93d", "score": "0.49297968", "text": "async function main() {\n try {\n await sequelize.authenticate();\n console.log('Connection has been established successfully.');\n } catch (error) {\n console.error('Unable to connect to the database:', error);\n }\n // const userId = 'e87dd769-b724-4117-9838-0e9fe42951e7';\n // const r1 = await getQuizzesOfTheUser(userId);\n // console.log('r1 :>> ', r1);\n const aQuizId = '3e439775-8cba-43c4-b1c2-949ef219da9b';\n const r2 = await getQuestionsOfTheQuiz(aQuizId);\n console.log('r2 :>> ', r2[0]);\n}", "title": "" }, { "docid": "ff340b80a9c34610966608ceaa5ef5ff", "score": "0.49285954", "text": "require(mod) { // don't deprecate\n return require(mod);\n }", "title": "" }, { "docid": "bd29fad57b2af699a3bcdfbe6d498f34", "score": "0.49254057", "text": "_events () {\r\n // get connection\r\n let conn = config.get ('redis');\r\n\r\n // set prefix\r\n conn.prefix = config.get ('domain') + '.event';\r\n\r\n // create events redis instance\r\n this.pubsub = redisEE (conn);\r\n\r\n // create new events class\r\n this.events = new events ();\r\n\r\n // on function\r\n if (this.main) {\r\n // only on this thread\r\n this.pubsub.on ('main', (channel, data) => {\r\n // emit to this thread\r\n this.emit (data.type, data.data);\r\n });\r\n }\r\n }", "title": "" }, { "docid": "580516d63156b5973e2bb7210fc401c9", "score": "0.4923865", "text": "function createQueue() {\n var host = process.env.REDIS_HOST || 'red';\n // only create queue once\n var first = !queueSingleton;\n queueSingleton = queueSingleton || kue.createQueue({\n prefix: 'q',\n redis: {\n // port: 6379,\n // override with: REDIS_HOST=docker npm start\n host: host,\n // host: 'docker',\n // auth: 'password',\n // db: 3, // if provided select a non-default redis db\n options: {\n // see https://github.com/mranney/node_redis#rediscreateclient\n }\n }\n });\n // log.info('REDIS pointing to: ', queueSingleton.client.address,first);\n if (first) {\n // log.info('+createQueue on redis: %s', host, first, queueSingleton.client.address);\n }\n return queueSingleton;\n}", "title": "" }, { "docid": "5a854e6ee0a48c12d64b1d575fb1f1dd", "score": "0.49228856", "text": "async function API_test(redis){\n //generate fake data with 6 fake profiles\n redis.flushall();\n var benchmark_size=6;\n initializeFakeData(redis,benchmark_size);\n //print all profiles\n printAllProfile(redis,\"ID\",[\"student_1\",\"student_2\",\"student_3\",\"student_4\",\"student_5\",\"student_6\"]);\n //delete last one from redis\n deleteProfile(redis,\"ID\",6,\"student_6\");\n //print again to show deletion\n printAllProfile(redis,\"ID\",[\"student_1\",\"student_2\",\"student_3\",\"student_4\",\"student_5\"]);\n //sort all profile by age\n sortEntryBy(redis,\"ID\",\"age\",\"student_*->\",[\"name\",\"age\",\"gender\"]);\n //search all male profile\n searchEntryBy(redis,\"student_\",0,5,\"gender\",\"male\");\n //initialize stream\n var today = new Date();\n var time = today.getHours() + \":\" + today.getMinutes() + \":\" + today.getSeconds();\n redis.xadd(\"fakestream\",'*',\"time\",String(time));\n var time = today.getHours() + \":\" + today.getMinutes() + \":\" + today.getSeconds();\n redis.xadd(\"fakestream\",'*',\"time\",String(time));\n var time = today.getHours() + \":\" + today.getMinutes() + \":\" + today.getSeconds();\n redis.xadd(\"fakestream\",'*',\"time\",String(time));\n //listen to stream\n subscribeStream(redis,'fakestream', console.log);\n}", "title": "" }, { "docid": "62a62a8faf39bf37b4461c522e069a78", "score": "0.49141276", "text": "async function main() {\n const pool = await mssql.connect()\n const persistentStore = new MSSQLStoreAdapter(pool, 'reshuffledb')\n\n app.setPersistentStore(persistentStore)\n\n connector.on({ expression: '*/5 * * * * *' }, async (event, app) => {\n const store = app.getPersistentStore()\n // single server setup\n let times = (await store.get('scripts/times-said-hello')) || 0\n console.log(`Hello World! ${times} times.`)\n times++\n await store.set('scripts/times-said-hello', times)\n\n // for destributed setup with many reshuffle servers set() should be replaced with update()\n let safe_count_times = (await store.get('scripts/times-said-hello-safe_count_times')) || 0\n console.log(`Hello World! safe count = ${safe_count_times} times.`)\n await store.update('scripts/times-said-hello-safe_count_times', (safe_count_times) => {\n return safe_count_times === undefined ? 1 : safe_count_times + 1\n })\n })\n}", "title": "" }, { "docid": "959266ea2b7480f8192d0bc4706aae12", "score": "0.49090493", "text": "function n(){return o||(o=Object(_core_promiseUtils_js__WEBPACK_IMPORTED_MODULE_0__[\"create\"])((t=>__webpack_require__.e(/*! import() | chunks-i3s-js */ \"chunks-i3s-js\").then(__webpack_require__.bind(null, /*! ../../chunks/i3s.js */ \"ilXH\")).then((function(t){return t.i})).then((({default:e})=>{const i=e({locateFile:r,onRuntimeInitialized:()=>t(i)});delete i.then})))).catch((t=>Object(_core_promiseUtils_js__WEBPACK_IMPORTED_MODULE_0__[\"reject\"])(t)))),o}", "title": "" }, { "docid": "ceda034f6d8c5acac2cf55caedf2b46c", "score": "0.49084583", "text": "function WLUtils() {}", "title": "" }, { "docid": "f59b044932deebf63c74e3ffb47a620b", "score": "0.49049652", "text": "async function default_1() {\n try {\n const timeSyncPayments = await Settings.use(\"timeSyncPayments\", \"restocore\");\n /**\n * TIMEZONE\n */\n const timezone = await Settings.use(\"timezone\");\n process.env.TZ = timezone;\n PaymentDocument.processor(timeSyncPayments);\n /**\n * Setting default\n *\n * For food delivery, the phone is primary,\n * so we set the following flags by default,\n *\n * if they need to be changed, then use the\n * config/bootstrap.js,\n * seeds/settings.json,\n * environment variables (.env)\n * */\n /**\n * @setting LOGIN_FIELD User login field source (ex: \"phone\", \"email\" ...) [read only by default]\n */\n await Settings.setDefault(\"LOGIN_FIELD\", \"phone\", \"core\", true);\n /**\n * @setting LOGIN_OTP_REQUIRED check OTP on login process\n */\n await Settings.setDefault(\"LOGIN_OTP_REQUIRED\", true, \"core\");\n /**\n * @setting SET_LAST_OTP_AS_PASSWORD setting last OTP as password\n */\n await Settings.setDefault(\"SET_LAST_OTP_AS_PASSWORD\", true, \"core\");\n /**\n * @setting PASSWORD_REQUIRED Check password (Login only by OTP if false)\n */\n await Settings.setDefault(\"PASSWORD_REQUIRED\", true, \"core\");\n try {\n /**\n * Run instance RMS\n */\n await Adapter.getRMSAdapter();\n }\n catch (error) {\n sails.log.warn(\" RestoCore > RMS adapter is not set \");\n }\n }\n catch (e) {\n sails.log.error(\"RestoCore > initialization error > \", e);\n }\n}", "title": "" }, { "docid": "1c9ab3822770998bcd615ff2efb47f67", "score": "0.4900516", "text": "async function start() {\n try {\n await sc.Modules.config.loadAll();\n await sc.Modules.token.check();\n await sc.Twitch.initialize();\n sc.TwitchPubSub.connect();\n await sc.Discord.connect();\n sc.Cytube.initialize();\n // await sc.Rcon.connect();\n } catch (e) {\n sc.Logger.error(`Error encountered during initialization: ${e}`);\n }\n}", "title": "" }, { "docid": "f615831c1e0350ae5c23af2130080edf", "score": "0.48955655", "text": "function initialize(app) {\n\tif (!config.redis.enabled) {\n\t\treturn;\n\t}\n\n\t// Load redis client\n\tredisInterface = redisClient.createClient({\n\t\thost: config.redis.host,\n\t\tport: config.redis.port,\n\t\tpassword: config.redis.pass,\n\t\tretry_strategy: function(options) {\n\t\t\tif (options.error && options.error.code === \"ECONNREFUSED\") {\n\t\t\t\tprocess.stdout.write(\"ECONNREFUSED: Unable to connect to Redis server\\n\");\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\t\tif (options.total_retry_time > 1000 * 60 * 60) {\n\t\t\t\tprocess.stdout.write(\"Redis: Retry time exhausted\\n\");\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\t\tif (options.attempt > 10) {\n\t\t\t\tprocess.stdout.write(\"Redis: Connection attempts exhausted\\n\");\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\t\treturn Math.min(options.attempt * 100, 3000);\n\t\t}\n\t});\n\n\t// Add promises functionality to specific redis client functions\n\tgetAsync = util.promisify(redisInterface.get).bind(redisInterface);\n\tdelAsync = util.promisify(redisInterface.del).bind(redisInterface);\n\n\t// Create Rate Limit Store\n\tredisRateLimitStore = new RateLimitRedisStore({ client: redisInterface });\n\n\t// Add rate limiting to endpoints to prevent excessive use\n\tapp.enable(\"trust proxy\");\n\tvar apiLimiter = new RateLimit({\n\t\tstore: redisRateLimitStore,\n\t\twindowMs: 15 * 60 * 1000,\n\t\tmax: 200,\n\t\tdelayMs: 0\n\t});\n\tapp.use(apiLimiter);\n}", "title": "" }, { "docid": "37cc6ebca2f105abe0d3421a7aed2cb0", "score": "0.48951527", "text": "function e(){return n||(n=new Promise((t=>import('./i3s-7ed35c12.js').then((t=>t.i)).then((({default:e})=>{const n=e({locateFile:i$1,onRuntimeInitialized:()=>t(n)});delete n.then;})))).catch((t=>{throw t}))),n}", "title": "" }, { "docid": "ecf33e90240246b5bc10bc3637eadc77", "score": "0.48888585", "text": "deleteRedisClient() { delete this.redis; }", "title": "" }, { "docid": "a0c77c6456488f0ebd69d75d731531dd", "score": "0.48814172", "text": "async function init() {\n console.log(\"Initializing...\");\n\n //Initialize DB\n try {\n await database.connect();\n } catch (err) {\n console.error(\"Failed to connect to database: \", err);\n }\n\n // Initialize Redis Cache\n // try {\n // await redisClient.connect();\n // } catch (err) {\n // console.error(\"Failed to connect to Redis: \", err);\n // }\n console.log(\"Done Initializing Services. Ready to serve.\");\n}", "title": "" }, { "docid": "eaa8d1e5389ae5e5a1e1474a9b3ef617", "score": "0.48736036", "text": "function main(robot){\n\n\tvar DEFAULT_PRICE_CURRENCY = \"EUR\";\n\tvar SECOND_PRICE_CURRENCY = \"USD\";\n\tvar SATOSHI = 100000000;\n\n\tvar hu = require(\"./lib/hubot_utils.js\");\n\thu.setRobot(robot);\n\tvar btc = require(\"./lib/bitcoin_utils.js\");\n\tbtc.setRobot(robot);\n\n\trobot.hear(/(?:bitcoin|btc)( .*)?/i, function(res){\n\t\tif(res.message.rawText.match(/(^bitcoin)|(^btc)/i)){\n\n\t\t\tres.match[1] = res.match[1].trim();\n\t\t\tswitch(true){\n\t\t\t\tcase /check/.test(res.match[1]):\n\t\t\t\t\t_check(res);\n\t\t\t\t\tbreak;\n\t\t\t\tcase /add/.test(res.match[1]):\n\t\t\t\t\t_addAddr(res);\n\t\t\t\t\tbreak;\n\t\t\t\tcase /(rm)|(delete)|(remove)|(del)/.test(res.match[1]):\n\t\t\t\t\t_deleteAddr(res);\n\t\t\t\t\tbreak;\n\t\t\t\tcase res.match[1] == \"list\":\n\t\t\t\t\t_getList(res);\n\t\t\t\t\tbreak;\n\t\t\t\tcase /transaction (.*)/.test(res.match[1]):\n\t\t\t\t\t_getTransactionByAddr(res);\n\t\t\t\t\tbreak;\n\t\t\t\tcase res.match[1] == \"transaction\":\n\t\t\t\t\t_getTransaction(res);\n\t\t\t\t\tbreak;\n\t\t\t\tcase /balance (.*)/.test(res.match[1]) :\n\t\t\t\t\t_getBalanceByCurrency(res);\n\t\t\t\t\tbreak;\n\t\t\t\tcase /graph(.*)/.test(res.match[1]):\n\t\t\t\t\t_printGraph(res);\n\t\t\t\t\tbreak;\n\t\t\t\tcase res.match[1] == \"balance\" :\n\t\t\t\t\t_getBalance(res);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase res.match[1] == \"price\":\n\t\t\t\t\t_getPrice(res);\n\t\t\t\t\tbreak;\n\t\t\t\tcase res.match[1] == \"version\":\n\t\t\t\t\t\tres.send(require(\"./package.json\").version);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase res.match[1] == \"?\":\n\t\t\t\tcase res.match[1] == \"help\":\n\t\t\t\t\tres.send(getHelp());\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tres.send(getHelp());\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t});\n\n\tfunction getHelp(){\n\t\treturn [\n\t\t\t\"bitcoin commands\",\n\t\t\t\t\" - add <address> : Attach address to your user\",\n\t\t\t\t\" - list : list addresses from the current user\",\n\t\t\t\t\" - check <address> : Get balance from the address provided\",\n\t\t\t\t\" - balance : Get the balance of the current user\",\n\t\t\t\t\" - balance <€ or $>: Get the balance of the current user in the provided currency\",\n\t\t\t\t\" - transaction : List latest transaction of the current user\",\n\t\t\t\t\" - price : value of bitcoin\",\n\t\t\t\t\" - p : alias for price\",\n\t\t\t\t\" - graph [<period> <format>] : Show btc/usdt graph. period must be [24h, 7d, 30d, 1y] and format [png, svg]\"\n\t\t\t\t].join(\"\\n\\t\");\n\t}\n\t/*\n\t* Balance command handler\n\t* Get balance for the current user.\n\t* @params : \n\t* \t\t- res : response from robot\n\t*/ \n\tfunction _getBalance(res){\n\t\tvar user = res.message.user.name.toLowerCase();\n\t\tvar tmp = \"\";\n\t\tvar total = 0;\n\t\tbtc.getBalanceByUser(user, function(err,balances){\n\t\t\tif(err){\n\t\t\t\tres.send(\"Cannot get balance for user : \"+msgErr, user);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdata = balances.data;\n\t\t\tfor(var i=0; i < data.length; i++){\n\t\t\t\ttmp += \"Adress : [`\" + data[i].addr + \"`] balance : [`\"+ parseFloat(data[i].balance/SATOSHI).toFixed(3) + \" BTC`] \\n\";\n\t\t\t\ttotal += data[i].balance;\n\t\t\t}\n\t\t\ttmp += \"-------\\n\";\n\t\t\ttmp += \"Total : `\" + parseFloat(total/SATOSHI).toFixed(3) + \"` BTC over \" + data.length + \" account(s)\";\n\t\t\tres.send(tmp);\n\t\t});\n\t}\n\n\t/*\n\t* btc graph <currency> <period> [format]\n\t* Format must be in : [png,svg]\n\t* Send the graph link in response\n\t*\n\t* Get balance for the current user.\n\t* @params : \n\t* \t\t- res : response from robot\n\t*/ \n\tfunction _printGraph(res){\n\t\n\t\tvar user = res.message.user.name.toLowerCase();\n\n\t\tvar split = res.match[1].split(\" \");\n\n\t\tvar period = split[1] || \"24h\";\n\t\tvar format = split[2] || \"png\";\n\n\t\tif( !(format == \"svg\" || format == \"png\")){\n\t\t\treturn res.send(\"Unsupported format\");\n\t\t}\n\n\t\tif( !(period == \"24h\" || period == \"7d\" || period == \"30d\" || period == \"1y\") ){\t\n\t\t\treturn res.send(\"Format not in 24h, 7d, 30d, 1y\");\n\t\t}\n\n\t\tvar url = \"https://cryptohistory.org/charts/dark/btc-usdt/\"+period+\"/\"+format+\"?nonce=\"+Math.floor(Math.random()*10000);\n\t\n\t\tres.send(\"Graph : BTC / usdt over \" + period+ \"\\n\"+ url )\n\n\t}\n\n\n\t/*\n\t* Balance command by currency handler\n\t* Get balance in the given currency for the current user.\n\t* @params : \n\t* \t\t- res : response from robot\n\t*/ \n\tfunction _getBalanceByCurrency(res){\n\t\tvar currency = res.match[1].split(\" \")[1];\n\n\t\tvar user = res.message.user.name.toLowerCase();\n\t\tbtc.getBalanceByUser(user, function(err,balances){\n\t\t\tvar tmp = \"\";\n\t\t\tvar data = balances.data;\n\t\t\tvar total = 0;\n\t\t\tvar value;\n\n\t\t\tif(err){\n\t\t\t\tres.send(\"Cannot get balance for user :\", user);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor(var i=0; i < data.length; i++){\n\t\t\t\tvalue = hu.btcToCurrency(data[i].balance/SATOSHI, currency).value;\n\t\t\t\ttmp += \"Adress : [`\" + data[i].addr + \"`] balance : [`\" + value +\" \"+ currency +\"`] \\n\";\n\t\t\t\ttotal += value;\n\t\t\t}\n\n\t\t\ttmp += \"-------\\n\";\n\t\t\ttmp += \"Total : `\" + total + currency + \"` over \" + data.length + \" account(s)\";\n\n\t\t\tres.send(tmp);\n\t\t});\n\t}\n\n\t/*\n\t* Transaction by user command handler\n\t* List last 10 transaction for current user.\n\t* @params : \n\t* \t\t- res : response from robot\n\t*/ \n\tfunction _getTransaction(res){\n\t\tvar user = res.message.user.name.toLowerCase();\n\t\tbtc.getTransactionByUser(user, function(err,data){\n\t\t\tif(err){\n\t\t\t\tconsole.error(err);\n\t\t\t\tres.send(\"Can't get transation for the user :\" + user);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar m, dateString;\n\t\t\tvar tmp = \"\";\n\t\t\t// get only 10 last transaction\n\t\t\tfor(var i = 0; i< data.txs.length && i < 10; i++){\n\t\t\t\tm = new Date(data.txs[i].time*1000);\n\t\t\t\tdateString = m.getUTCFullYear() +\"/\"+\n\t\t\t\t\t(\"0\" + (m.getUTCMonth()+1)).slice(-2) +\"/\"+\n\t\t\t\t\t(\"0\" + m.getUTCDate()).slice(-2) + \" \" +\n\t\t\t\t\t(\"0\" + m.getUTCHours()).slice(-2) + \":\" +\n\t\t\t\t\t(\"0\" + m.getUTCMinutes()).slice(-2) + \":\" +\n\t\t\t\t\t(\"0\" + m.getUTCSeconds()).slice(-2);\n\t\t\t\ttmp += \"From : [`\" + data.txs[i].inputs[0].prev_out.addr + \"`] to [`\" + data.address + \"`] Date \" + dateString +\"\\n\";\n\t\t\t}\n\n\t\t\tres.send(\"List of latest transactions : \\n\" + tmp);\n\n\t\t});\n\t}\n\n\t/*\n\t* Transaction by address command handler\n\t* List last 10 transaction given address.\n\t* @params : \n\t* \t\t- res : response from robot\n\t*/ \n\tfunction _getTransactionByAddr(res){\n\t\tvar user = res.message.user.name.toLowerCase();\n\t\tvar tmp = res.match[1].split(\" \");\n\t\tvar addr = tmp[2];\n\t\tbtc.getTransactionByAddr(addr, function(err,data){\n\t\t\tif(err){\n\t\t\t\tconsole.error(err);\n\t\t\t}\n\t\t\tres.send(data);\n\t\t});\n\t}\n\n\t/*\n\t* List all the address saved in hubot for the current user\n\t* @params : \n\t* \t\t- res : response from robot\n\t*/\n\tfunction _getList(res){\n\t\tvar user = res.message.user.name.toLowerCase();\n\t\tvar tmp = \"\";\n\t\thu.listAddrFromUser(user, function(err, data){\n\t\t\tif(err){\n\t\t\t\tres.send(err);\n\t\t\t}else{\n\t\t\t\tfor(var i = 0; i<data.length; i++){\n\t\t\t\t\ttmp += data[i]+\"\\n\";\n\t\t\t\t}\n\t\t\t\tres.send(tmp);\n\t\t\t}\n\t\t});\n\t}\n\n\t/*\n\t* Delete in hubot, the address given for the current user\n\t* @params : \n\t* \t\t- res : response from robot\n\t*/ \n\tfunction _deleteAddr(res){\n\t\tvar user = res.message.user.name.toLowerCase();\n\t\tvar tmp = res.match[1].split(\" \");\n\n\t\tconsole.log(\"remove address :\", tmp[1], \"from user :\", user,\"[\",new Date(), \"]\");\n\n\t\tif(tmp.length < 2){\n\t\t\tres.send(\"Syntax error\");\n\t\t\treturn;\n\t\t}\n\t\thu.deleteAddrToUser(tmp[1], user, function(err, data){\n\t\t\tif(err){\n\t\t\t\tres.send(err);\n\t\t\t}else{\n\t\t\t\tres.send(data);\n\t\t\t}\n\t\t});\n\t}\n\n\t/*\n\t* Add in hubot, the address given for the current user\n\t* @params : \n\t* \t\t- res : response from robot\n\t*/ \n\tfunction _addAddr(res){\n\t\tvar user = res.message.user.name.toLowerCase();\n\t\tvar tmp = res.match[1].split(\" \");\n\t\tconsole.log(\"Add address :\", tmp[1], \"to user :\", user, \"[\", new Date(), \"]\");\n\n\t\tif(tmp.length < 2){\n\t\t\tres.send(\"Syntax error\");\n\t\t\treturn;\n\t\t}\n\t\thu.addAddrToUser(tmp[1], user, function(err, data){\n\t\t\tif(err){\n\t\t\t\tres.send(err);\n\t\t\t}else{\n\t\t\t\tres.send(data);\n\t\t\t}\n\t\t});\n\t}\n\t/*\n\t* Get balance for the address given\n\t* @params : \n\t* \t\t- res : response from robot\n\t*/ \n\tfunction _check(res){\n\t\tvar tmp = res.match[1].split(\" \");\n\t\tvar addr = tmp[1];\n\t\tbtc.getBalanceByAddr(addr, function(err, data){\n\t\t\tif(err){\n\t\t\t\tres.send(\"Cannot get balance of \" + addr);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconsole.log(data.data[0].balance);\n\t\t\tres.send(\"Balance : `\" + data.data[0].balance + \"BTC`\");\n\t\t});\n\t}\n\t/*\n\t* Get current price of bitcoin\n\t* @params : \n\t* \t\t- res : response from robot\n\t*/\n\tfunction _getPrice(res){\n\t\tbtc.getPrice(function(err, data){\n\t\t\tif(err){\n\t\t\t\tconsole.error(\"Erreur\");\n\t\t\t\tres.send(\"Can't get price : \"+ err);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tres.send(\"Current value of bitcoin : `\"+ data[DEFAULT_PRICE_CURRENCY].last + \"€\" + \" ($\" + data[SECOND_PRICE_CURRENCY].last + \")`\");\n\t\t});\n\t}\n}", "title": "" }, { "docid": "764beafea53c425763724a5b0156b482", "score": "0.48632085", "text": "static Connect() {}", "title": "" }, { "docid": "f60e3b24ca099e61f90d211ec306ab18", "score": "0.48455724", "text": "function loadScript(redis, script_name, script_code) {\n redis.script('load', script_code, function (err, sha) {\n if (err) throw err;\n redis[script_name] = function (keys, args, cb) {\n redis.evalsha([sha, keys.length].concat(keys).concat(args),\n cb ? cb : function (err) { if (err) throw err; });\n }\n console.log('Lua script', script_name, 'loaded.');\n });\n}", "title": "" }, { "docid": "0a3946053c61ac379fc1dc66adb075c3", "score": "0.48364645", "text": "function Util() {}", "title": "" }, { "docid": "687f56c7689fc9d30b2c3ae4e5f4c458", "score": "0.48323908", "text": "function MqttBrokerNode (config) { \r\n RED.nodes.createNode(this, config);\r\n //const node = this;\r\n\r\n this.brokerHost = config.brokerHost;\r\n this.brokerPort = config.brokerPort;\r\n this.projectId = config.projectId;\r\n this.registryId = config.registryId;\r\n this.deviceId = config.deviceId;\r\n this.region = config.region;\r\n this.privateKeyFile = config.privateKeyFile;\r\n this.algorithm = config.algorithm;\r\n this.mqttClientId = `projects/${this.projectId}/locations/${this.region}/registries/${this.registryId}/devices/${this.deviceId}`;\r\n this.commandsQos = Number(config.commandsQos);\r\n this.configQos = Number(config.configQos);\r\n\r\n // Config node state\r\n this.brokerurl = `mqtts://${this.brokerHost}:${this.brokerPort}`;\r\n this.connected = false;\r\n this.connecting = false;\r\n this.closing = false;\r\n this.options = {};\r\n this.subscriptions = {};\r\n\r\n // Build options for passing to the MQTT.js API\r\n this.options.host = this.brokerHost;\r\n this.options.port = this.brokerPort;\r\n this.options.clientId = this.mqttClientId;\r\n this.options.username = 'unused';\r\n this.options.keepalive = Number(config.keepAlive);\r\n this.options.clean = (\"true\" == config.clean);\r\n this.options.reconnectPeriod = Number(config.reconnectPeriod);\r\n this.options.connectTimeout = Number(config.connectTimeout);\r\n this.options.protocol = \"mqtts\";\r\n this.options.secureProtocol = 'TLSv1_2_method';\r\n this.options.password = createJwt(this.projectId, this.privateKeyFile, this.algorithm);\r\n\r\n\r\n var node = this;\r\n\r\n this.connect = function () {\r\n\r\n if (!node.connected && !node.connecting) {\r\n \r\n node.status(STATUS_CONNECTING);\r\n this.connecting = true;\r\n\r\n node.client = mqtt.connect(node.options);\r\n node.client.setMaxListeners(0);\r\n\r\n // Register successful connect or reconnect handler\r\n node.client.on('connect', function () {\r\n\r\n node.connecting = false;\r\n node.connected = true;\r\n \r\n node.status(STATUS_CONNECTED);\r\n\r\n // Re-subscribe to stored topics\r\n node.client.subscribe(`/devices/${node.deviceId}/config`, {qos: node.configQos});\r\n node.client.subscribe(`/devices/${node.deviceId}/commands/#`, {qos: node.commandsQos});\r\n \r\n });\r\n\r\n node.client.on(\"reconnect\", function () {\r\n node.status(STATUS_CONNECTING);\r\n });\r\n\r\n // Register disconnect handlers\r\n node.client.on('close', function () {\r\n // refresh JWT token\r\n node.client.options.password = createJwt(node.projectId, node.privateKeyFile, node.algorithm);\r\n \r\n if (node.connected || node.connecting) {\r\n node.connected = false;\r\n node.status(STATUS_DISCONNECTED);\r\n } \r\n });\r\n\r\n // Register connect error handler\r\n node.client.on('error', function (error) {\r\n // refresh JWT token\r\n node.client.options.password = createJwt(node.projectId, node.privateKeyFile, node.algorithm);\r\n \r\n if (node.connecting) {\r\n node.client.end();\r\n node.connecting = false;\r\n }\r\n node.error(error);\r\n });\r\n \r\n } \r\n };\r\n\r\n this.publish = function (msg) {\r\n if (node.connected) {\r\n if (!Buffer.isBuffer(msg.payload)) {\r\n if (typeof msg.payload === \"object\") {\r\n msg.payload = JSON.stringify(msg.payload);\r\n } else if (typeof msg.payload !== \"string\") {\r\n msg.payload = \"\" + msg.payload;\r\n }\r\n }\r\n\r\n var options = {\r\n qos: msg.qos || 0,\r\n retain: msg.retain || false\r\n };\r\n \r\n var mqttTopic = `/devices/${this.deviceId}/${msg.topic}`;\r\n\r\n node.client.publish(mqttTopic, msg.payload, options, function (err) {\r\n if (err) {\r\n node.error(\"error publishing message: \" + err.toString());\r\n }\r\n return\r\n });\r\n }\r\n };\r\n\r\n this.on('close', function () {\r\n this.closing = true;\r\n if (this.connected) {\r\n this.client.end();\r\n } else if (this.connecting || this.client.reconnecting) {\r\n this.client.end();\r\n } \r\n }); \r\n }", "title": "" }, { "docid": "0f6f004d51c56f9bddaa36e9016b0b94", "score": "0.482334", "text": "function main() {\n Logger.initialize()\n // load config\n Logger.log('Loading config file: ' + configFileName)\n try {\n config = JSON.parse(fs.readFileSync(configFileName));\n } catch (err) {\n Logger.log('Error: unable to load ' + configFileName);\n Logger.log(err);\n process.exit(1);\n }\n const networkId = config.blockchain.networkId;\n scApi.setConfig(config);\n rpc.setConfig(config);\n\n bluebird.promisifyAll(rpc);\n\n if (!config.defaultThetaChainID) {\n Logger.log('Error: unable to load config.defaultThetaChainID:', config.defaultThetaChainID);\n process.exit(1);\n }\n Theta.chainId = config.defaultThetaChainID;\n Logger.log('Theta.chainId:', Theta.chainId);\n\n redisConfig = config.redis;\n Logger.log(\"redisConfig:\", redisConfig)\n cacheEnabled = config.nodeCache && config.nodeCache.enabled;\n Logger.log('cacheEnabled:', cacheEnabled);\n if (redisConfig && redisConfig.enabled) {\n redis = redisConfig.isCluster ? new Redis.Cluster([\n {\n host: redisConfig.host,\n port: redisConfig.port,\n },\n ], {\n redisOptions: {\n password: redisConfig.password,\n }\n }) : new Redis(redisConfig);\n bluebird.promisifyAll(redis);\n redis.on(\"connect\", () => {\n Logger.log('connected to Redis');\n });\n }\n\n // connect to mongoDB\n mongoClient.init(__dirname, config.mongo.address, config.mongo.port, config.mongo.dbName);\n mongoClient.connect(config.mongo.uri, function (error) {\n if (error) {\n Logger.log('Mongo DB connection failed with err: ', error);\n process.exit();\n } else {\n Logger.log('Mongo DB connection succeeded');\n setupGetBlockCronJob(mongoClient, networkId);\n }\n });\n\n app.use(cors());\n app.get('/ping', function (req, res) {\n Logger.log('Receive healthcheck /ping from ELB - ' + req.connection.remoteAddress);\n res.writeHead(200, {\n 'Content-Type': 'text/plain',\n 'Content-Length': 2\n });\n res.write('OK');\n res.end();\n });\n var http = require('http').createServer(app);\n http.listen('8080', () => {\n Logger.log(\"rest api running on port. 8080\");\n });\n}", "title": "" }, { "docid": "69b4d530145a708689307ee56bac4388", "score": "0.48211846", "text": "function Queue() {\n this.client = redis.createClient();\n}", "title": "" }, { "docid": "09d44cb6ba3d7139995540c43887113b", "score": "0.4821105", "text": "function NodeUtils() {\n}", "title": "" }, { "docid": "8eeac2976e9902021c62742f87cbf963", "score": "0.48191676", "text": "async function createIsolatedRedis() {\n const port = await getPort();\n\n const proc = spawn('redis-server', ['-']);\n proc.stdin.end(`\n port ${port}\n save \"\"\n `);\n\n await once(proc, 'spawn');\n\n for await (const buf of proc.stdout) {\n if (buf.toString().includes('Ready to accept connections')) {\n break;\n }\n }\n\n async function close() {\n proc.kill('SIGINT');\n await once(proc, 'close');\n }\n\n return {\n url: `redis://localhost:${port}`,\n close,\n };\n}", "title": "" }, { "docid": "c53aa481be1e9257045386be2f40d7bb", "score": "0.48118097", "text": "async function main() {\n // Get BTTV emotes\n console.log(\"Getting BTTV emotes.\")\n const globalEmotes = (await getGlobalEmotes()).emotes\n const channelEmotes = {}\n await Promise.all(\n CHANNELS.map((channel) =>\n getChannelEmotes(channel).then((emotes) => {\n channelEmotes[channel] = emotes.emotes\n })\n )\n )\n const bttvEmotes = {\n global: globalEmotes,\n channel: channelEmotes,\n }\n console.log(\"Received BTTV emotes\")\n // console.log(channelEmotes)\n\n // Create a client with our options\n const twitchOpts = getTwitchOpts(CHANNELS)\n // noinspection JSPotentiallyInvalidConstructorUsage\n const client = new tmi.client(twitchOpts)\n\n const onMessage = getOnMessage(KEYWORDS, true, bttvEmotes)\n\n // Register our event handlers\n client.on(\"message\", onMessage)\n client.on(\"connected\", onConnected)\n\n // Connect to Twitch\n client.connect()\n}", "title": "" }, { "docid": "4f135a39ad02af497678e653033814d6", "score": "0.48032102", "text": "function main() {\n const sounds = loadSounds();\n client.on('message', message => {\n handleMessage(message, sounds);\n });\n client.on('ready', () => {\n console.log('Ready!');\n });\n // client.on('debug', message => {\n // console.log(message);\n // });\n client.login(auth.token);\n}", "title": "" }, { "docid": "a1fba58410bfbd3e9b84ed959110b38d", "score": "0.47977382", "text": "function myRequire(fileName) {\n // let exports = {};\n // return fs.readFile('./' + fileName, (err, data) => {\n // let exportsBuilder = new Function('exports', data);\n // return exportsBuilder(exports);\n // });\n let codes = fs.readFileSync('./' + fileName, 'utf-8');\n let exportsBuilder = new Function('exports', codes);\n let exports = {};\n exportsBuilder(exports);\n\n return exports;\n}", "title": "" }, { "docid": "d4601ccae06d9cc97865e79bb977670a", "score": "0.47959968", "text": "async function main() {\n // get abstract contract representation using the given ethereum connection\n // use the given gasLimit and gasPrice to ensure our transactions go through\n let contract = utils.getContract( myConf.web3_host, myConf.web3_port, common.gasLimit, common.gasPrice );\n let SolarUsage = contract.contract; // contract absrraction\n let web3 = contract.web3; // our web3 (connection to ethereum)\n // participant's address if one of the addresses managed by our ethereum node\n // configuration should define which address of them it is\n address = web3.eth.accounts[ myConf.address_index ];\n logger.info( 'Public ethereum address of ' +myConf.name +' is ' +address );\n try {\n logger.info( \"Getting an instance of SolarUsage smart contract.\");\n instance = await SolarUsage.deployed();\n logger.info( 'Got SolarUsage instance at ' +instance.address );\n scale = (await instance.SCALE.call()).toNumber();\n if ( myConf.registered ) {\n logger.info( myConf.name +' already registered to contract. No need to do it now.' );\n }\n\n else {\n logger.info( 'Registering ' +myConf.name +' to SolarUsage as consumer.' );\n await instance.registerAsConsumer( myConf.name, { from: address });\n logger.info( 'Registration successful' );\n }\n }\n\n catch ( error ) {\n logger.error( error.message );\n return;\n }\n\n let start = new Date();\n logger.info( `Preparing to start collection of measurements from procem rtl at ${start}` );\n // how long to wait for begining of first period e.g. next full hour or minute\n let wait = getWaitTime();\n let first = new Date( start.getTime() +wait );\n logger.info( `Getting first data at ${getTimeString( first)}` );\n // set timer for getting the first energy measurement\n setTimeout( getData, wait );\n}", "title": "" }, { "docid": "9ee4f6395c9d5fd8051ef550bcf360ba", "score": "0.47947845", "text": "function getCachePromise(key){\n return new Promise((resolve,reject)=>{\n console.log(\"Inside getCachePromise\");\n console.log(\"R\",R.db.redis.ready);\n if(R.db.redis.connected && R.db.redis.ready){\n console.log(\"in if connected:true and ready:true\");\n R.db.redis.get(key,(err,res)=>{\n if(err){\n if(err.code==='NOAUTH'){\n let errObj={\n \"msg\": \"Redis Authentication Problem\"\n };\n reject(errObj);\n }\n reject(err);\n }else{\n if(res){\n console.log(\"res in get cache:\",res);\n resolve(res)\n }\n }\n })\n }else{\n console.log(\"in else connected:\",R.db.redis.connected,\"ready:\",R.db.redis.ready);\n let err=\"redisDown\";\n console.log(\"###########Redis is down\");\n reject(err);\n }\n})\n}", "title": "" }, { "docid": "4ae5817a17b1c0f0dc596dc204c915ab", "score": "0.47889376", "text": "function dependOn() {\n 'use strict';\n return [\n require(\"util\"),\n require(\"proxy\"),\n require(\"analytics\")\n ];\n}", "title": "" }, { "docid": "aa02566922a43c52bcf3b10a5b46748f", "score": "0.47864175", "text": "function Util() {\n}", "title": "" }, { "docid": "c556f47cf79046f22855817edcc05903", "score": "0.47860837", "text": "initialize() {\n this.bot = new Discord.Client({\n //apiRequestMethod: `sequential`,\n disabledEvents: ['TYPING_START', 'VOICE_STATE_UPDATE', 'PRESENCE_UPDATE', 'MESSAGE_DELETE', 'MESSAGE_UPDATE', 'CHANNEL_PINS_UPDATE', 'MESSAGE_REACTION_ADD', 'MESSAGE_REACTION_REMOVE', 'MESSAGE_REACTION_REMOVE_ALL', 'CHANNEL_PINS_UPDATE', 'MESSAGE_DELETE_BULK', 'WEBHOOKS_UPDATE'],\n owner: config.owner || `0`,\n commandPrefix: config.commandPrefix || `!`,\n unknownCommandResponse: false,\n disableEveryone: true\n })\n\n this.bot.setProvider(new SettingProvider())\n\n // Instantiate the shard's Cache singleton to interface with the main process.\n // A global variable is used here because the cache is dependent on the client\n // being initialized, but I don't like the idea of having to pass down the cahce\n // from this object into every instance (DiscordMember, DiscordServer). This seemed\n // like the best solution.\n global.Cache = new Cache(this.bot)\n this.shardClientUtil = global.Cache.shardClientUtil\n\n // Set a reference to this instance inside of the client\n // for use in Commando modules. Is this bad? Probably.\n this.bot.discordBot = this\n\n // Events\n\n // We use .bind(this) so that the context remains within\n // the class and not the event\n this.bot.on(`ready`, this.ready.bind(this))\n this.bot.on(`guildMemberAdd`, this.guildMemberAdd.bind(this))\n if (config.loud || true) this.bot.on(`error`, (message) => console.log(message))\n\n this.bot.on('message', this.message.bind(this))\n\n // Register commands\n this.bot.registry\n .registerGroups([\n { id: 'kyle', name: `Kyle`},\n { id: 'music', name: `Music`},\n { id: 'moderation', name: 'Moderation'}\n ])\n .registerDefaultTypes()\n .registerDefaultGroups()\n .registerDefaultCommands({\n ping: false,\n commandState: false,\n prefix: true,\n help: true,\n unknownCommand: false\n })\n .registerCommandsIn(path.join(__dirname, `commands`))\n\n //Login.\n this.bot.login(process.env.CLIENT_TOKEN)\n }", "title": "" }, { "docid": "679dc796080f1fc1af8cd5ede30911ab", "score": "0.47851977", "text": "function setupRedisWebsocketClientsSubscription() {\n console.log(\"> Setting up Redis channel for websocket clients.\")\n redisSub.subscribe(\"websocketClients\")\n redisSub.on(\"message\", (channel, message) => {\n let j = JSON.parse(message) \n webSocketClients.forEach(w => {\n if (w.email === j.email) { \n w.wsSocket.send(message)\n }\n })\n })\n}", "title": "" }, { "docid": "9f4fed546a0bf15f7364d10bd9c2826a", "score": "0.47837353", "text": "async function main(){\n const provider = await detectEthereumProvider();\n}", "title": "" }, { "docid": "f097c39272337c5115d812588689c295", "score": "0.47831744", "text": "constructor(logger,models,firebaseAPI, redisClient) {\n this.logger = logger;\n this.logger.info(\"[ScheduleModule] initialising\");\n this.models = models;\n this.firebaseAPI = firebaseAPI;\n this.redisClient = redisClient;\n this.createSchedules();\n this.logger.info(\"[ScheduleModule] initialised\");\n }", "title": "" }, { "docid": "c8113a21c50ac3e5daf54a4d6550444a", "score": "0.4771919", "text": "function init() {\n require('../index')({\n layer: {\n webhookServices: webhooksClient,\n client: layerClient,\n secret: 'Lord of the Mog has jammed your radar'\n },\n server: {\n url: URL,\n app: app,\n sApp: sApp,\n },\n sendgrid: {\n emailDomain: process.env.EMAIL_DOMAIN,\n key: process.env.SENDGRID_API,\n },\n delay: '30 minutes',\n templates: {\n text: '<%= recipient.name %>: you have a new message in <%= conversation.metadata.conversationName %>:\\n<%= sender.name %>: <%= text %>\\n\\n> Replies will be posted back to this Conversation',\n html: '<body><div style=\"font-size: 1.2em; margin-bottom: 10px\">Hello <%= recipient.name %></div><div>You have a new Message in <b><%= conversation.metadata.conversationName %></b></div><div style=\"padding:10px; border-left: solid 1px #666;\"><b><%= sender.name %></b>: <%= text %></div><br/><br/>&gt; Replies will be posted back to this Conversation</body>',\n subject: 'New message in <%= conversation.metadata.conversationName %> from <%= sender.name %>. Read it or be spammed.',\n fromName: 'Lord <%= sender.name %>, Guardian of the Mog and his own best friend'\n },\n updateObject: updateObject\n });\n}", "title": "" }, { "docid": "58a294462d8dbfce079bb353f10f8821", "score": "0.47712374", "text": "function main() {\n startMicroservice()\n registerWithCommMgr()\n registerWithSSB()\n getAvatarID()\n}", "title": "" }, { "docid": "de9926c2b88cf0d1532e1fb69b66fe94", "score": "0.47710916", "text": "static get JuteData(){\n if (JuteData) return JuteData\n JuteData = require('./Data').JuteData\n debug('stored JuteData', JuteData.name)\n return JuteData\n }", "title": "" }, { "docid": "b197d8a8e40232d16ef75cdffa2cb6f8", "score": "0.47698906", "text": "function setup() {\n console.log('Brokero is up and running')\n}", "title": "" }, { "docid": "51c74e052344f1bf0e4425962be6eb43", "score": "0.47671324", "text": "function connect() {\n if (redis === null && process.env.DISABLE_REDIS !== 'true') {\n if (!process.env.REDIS_URL) {\n throw new Error('REDIS_URL is not set!');\n }\n\n redis = new Redis(process.env.REDIS_URL, {\n retryStrategy: function(times) {\n // Make reconnecting a bit more relaxed compared to default\n var delay = Math.min(times * 100, 4000);\n return delay;\n }\n });\n\n // Inject .close method to redis, a bit bad practice but convenient\n redis.close = function close(cb) {\n _close(redis, cb);\n };\n\n redis.on('error', function(err) {\n logger.error('Error occured with redis:');\n logger.error(err);\n });\n\n redis.on('ready', function() {\n logger.info('Connected to redis.');\n });\n }\n\n return redis;\n}", "title": "" }, { "docid": "3eace707d67dbad51ac1256f4abab497", "score": "0.47661608", "text": "static async initialize () {\n if (this.initialized) {\n return\n }\n this.blacklistCache = new BlacklistCache(await Blacklist.getAll())\n const commandNames = await this.readCommands()\n for (const name of commandNames) {\n const func = require(`../commands/${name}.js`)\n this.commands.set(name, new Command(name, func))\n }\n const ownerCommandNames = await this.readCommands(true)\n for (const name of ownerCommandNames) {\n const func = require(`../commands/owner/${name}.js`)\n this.commands.set(name, new Command(name, func, true))\n }\n this.initialized = true\n }", "title": "" }, { "docid": "d0d3d3a069b4a075e6dfa953006f2044", "score": "0.47598442", "text": "function initRequires() {\n logger = logger || require(rootPrefix + '/lib/logger/custom_console_logger');\n moUtils = moUtils || require(rootPrefix + '/module_overrides/common/utils');\n SignRawTx = SignRawTx || require(rootPrefix + '/module_overrides/common/sign_raw_tx');\n}", "title": "" }, { "docid": "68d3a2724c55aadecc7ef54a39c0d9d0", "score": "0.47564128", "text": "run(client) {\n \n }", "title": "" }, { "docid": "9b31fadead64172d6fa887c10ae7739d", "score": "0.47509018", "text": "function config ( ) {\n\n /*\n * First inspect a bunch of environment variables:\n * * PORT - serve http on this port\n * * MONGO_CONNECTION, CUSTOMCONNSTR_mongo - mongodb://... uri\n * * CUSTOMCONNSTR_mongo_collection - name of mongo collection with \"sgv\" documents\n * * CUSTOMCONNSTR_mongo_settings_collection - name of mongo collection to store configurable settings\n * * API_SECRET - if defined, this passphrase is fed to a sha1 hash digest, the hex output is used to create a single-use token for API authorization\n * * NIGHTSCOUT_STATIC_FILES - the \"base directory\" to use for serving\n * static files over http. Default value is the included `static`\n * directory.\n */\n var software = require('./package.json');\n\n env.version = software.version;\n env.name = software.name;\n env.DISPLAY_UNITS = process.env.DISPLAY_UNITS || 'mg/dl';\n env.PORT = process.env.PORT || 1337;\n env.mongo = process.env.MONGO_CONNECTION || process.env.CUSTOMCONNSTR_mongo;\n env.mongo_collection = process.env.CUSTOMCONNSTR_mongo_collection || 'entries';\n env.settings_collection = process.env.CUSTOMCONNSTR_mongo_settings_collection || 'settings';\n var shasum = crypto.createHash('sha1');\n var useSecret = (process.env.API_SECRET && process.env.API_SECRET.length > 0);\n env.api_secret = null;\n // if a passphrase was provided, get the hex digest to mint a single token\n if (useSecret) {\n if (process.env.API_SECRET.length < consts.MIN_PASSPHRASE_LENGTH) {\n var msg = [\"API_SECRET should be at least\", consts.MIN_PASSPHRASE_LENGTH, \"characters\"];\n var err = new Error(msg.join(' '));\n // console.error(err);\n throw err;\n process.exit(1);\n }\n shasum.update(process.env.API_SECRET);\n env.api_secret = shasum.digest('hex');\n }\n // TODO: clean up a bit\n // Some people prefer to use a json configuration file instead.\n // This allows a provided json config to override environment variables\n var DB = require('./database_configuration.json'),\n DB_URL = DB.url ? DB.url : env.mongo,\n DB_COLLECTION = DB.collection ? DB.collection : env.mongo_collection,\n DB_SETTINGS_COLLECTION = DB.settings_collection ? DB.settings_collection : env.settings_collection;\n env.mongo = DB_URL;\n env.mongo_collection = DB_COLLECTION;\n env.settings_collection = DB_SETTINGS_COLLECTION;\n var STATIC_FILES = __dirname + '/static/';\n env.static_files = process.env.NIGHTSCOUT_STATIC_FILES || STATIC_FILES;\n return env;\n}", "title": "" }, { "docid": "1d50fc2400240be46705b96248968b45", "score": "0.4749457", "text": "constructor(config) {\n super();\n\n this.queue = {};\n\n const options = assign({\n db: 0,\n options: {}\n messagePattern: null\n }, config || {});\n\n const createClient = (port = 6379, host = 'localhost', options = {}) => {\n return !isUndefined(options.createClient)\n ? options.createClient()\n : redis.createClient(port, host, options);\n };\n\n this.receiver = createClient(options.port, options.host, options.options);\n this.publisher = createClient(options.port, options.host, options.options);\n\n this.receiver.select(options.db);\n this.publisher.select(options.db);\n this.publisher.db_number = this.receiver.db_number = options.db;\n\n if(!isUndefined(options.auth)) {\n this.receiver.auth(options.auth);\n this.publisher.auth(options.auth);\n }\n\n this.config(options.messagePattern);\n }", "title": "" }, { "docid": "87952e6f055417dc6d068146253e896e", "score": "0.4748278", "text": "function RedisHAClient(options) {\r\n\tthis.options = options || {};\r\n\t\r\n\tthis.clients = [];\r\n\t\r\n\tevents.EventEmitter.call(this);\r\n}", "title": "" }, { "docid": "f5e4c185aab010ac048294df748ad2c4", "score": "0.47480306", "text": "function readyDiscord(){\n console.log(\"I'm ready\");\n}", "title": "" }, { "docid": "5d6603feb69e7962ff54d235ac121c54", "score": "0.47384033", "text": "constructor() {\n const os = require(\"os\");\n this._hostname = os.hostname();\n\n const uuidv4 = require('uuid').v4;\n this._generateGuid = uuidv4;\n\n //Broadcast subscribers\n this._localBroadcastSubs = [];\n\n //Query subscribers\n this._localQuerySubs = {};\n\n //Ids of sended but not answerd queries\n this._pendingLocalQuerys = new Map();\n }", "title": "" }, { "docid": "261673bef6694ddc485afa2d9d69e0e7", "score": "0.47335207", "text": "init(done) {\n\t\tthis.redisClient = Redis.createClient();\n\t\tthis.redisSubs\t = Redis.createClient();\n\n\t\tthis.redisSubs.on('connect', () => {\n\t\t\tthis.addToActiveList(done);\n\t\t});\n\t}", "title": "" }, { "docid": "60b325a7abefbd29704c3e985d413df4", "score": "0.47313735", "text": "function RedisClient (options, stream) {\n // Copy the options so they are not mutated\n options = utils.clone(options);\n EventEmitter.call(this);\n var cnx_options = {};\n var self = this;\n /* istanbul ignore next: travis does not work with stunnel atm. Therefore the tls tests are skipped on travis */\n for (var tls_option in options.tls) {\n cnx_options[tls_option] = options.tls[tls_option];\n // Copy the tls options into the general options to make sure the address is set right\n if (tls_option === 'port' || tls_option === 'host' || tls_option === 'path' || tls_option === 'family') {\n options[tls_option] = options.tls[tls_option];\n }\n }\n if (stream) {\n // The stream from the outside is used so no connection from this side is triggered but from the server this client should talk to\n // Reconnect etc won't work with this. This requires monkey patching to work, so it is not officially supported\n options.stream = stream;\n this.address = '\"Private stream\"';\n } else if (options.path) {\n cnx_options.path = options.path;\n this.address = options.path;\n } else {\n cnx_options.port = +options.port || 6379;\n cnx_options.host = options.host || '127.0.0.1';\n cnx_options.family = (!options.family && net.isIP(cnx_options.host)) || (options.family === 'IPv6' ? 6 : 4);\n this.address = cnx_options.host + ':' + cnx_options.port;\n }\n // Warn on misusing deprecated functions\n if (typeof options.retry_strategy === 'function') {\n if ('max_attempts' in options) {\n self.warn('WARNING: You activated the retry_strategy and max_attempts at the same time. This is not possible and max_attempts will be ignored.');\n // Do not print deprecation warnings twice\n delete options.max_attempts;\n }\n if ('retry_max_delay' in options) {\n self.warn('WARNING: You activated the retry_strategy and retry_max_delay at the same time. This is not possible and retry_max_delay will be ignored.');\n // Do not print deprecation warnings twice\n delete options.retry_max_delay;\n }\n }\n\n this.connection_options = cnx_options;\n this.connection_id = RedisClient.connection_id++;\n this.connected = false;\n this.ready = false;\n if (options.socket_nodelay === undefined) {\n options.socket_nodelay = true;\n } else if (!options.socket_nodelay) { // Only warn users with this set to false\n self.warn(\n 'socket_nodelay is deprecated and will be removed in v.3.0.0.\\n' +\n 'Setting socket_nodelay to false likely results in a reduced throughput. Please use .batch for pipelining instead.\\n' +\n 'If you are sure you rely on the NAGLE-algorithm you can activate it by calling client.stream.setNoDelay(false) instead.'\n );\n }\n if (options.socket_keepalive === undefined) {\n options.socket_keepalive = true;\n }\n for (var command in options.rename_commands) {\n options.rename_commands[command.toLowerCase()] = options.rename_commands[command];\n }\n options.return_buffers = !!options.return_buffers;\n options.detect_buffers = !!options.detect_buffers;\n // Override the detect_buffers setting if return_buffers is active and print a warning\n if (options.return_buffers && options.detect_buffers) {\n self.warn('WARNING: You activated return_buffers and detect_buffers at the same time. The return value is always going to be a buffer.');\n options.detect_buffers = false;\n }\n if (options.detect_buffers) {\n // We only need to look at the arguments if we do not know what we have to return\n this.handle_reply = handle_detect_buffers_reply;\n }\n this.should_buffer = false;\n this.max_attempts = options.max_attempts | 0;\n if ('max_attempts' in options) {\n self.warn(\n 'max_attempts is deprecated and will be removed in v.3.0.0.\\n' +\n 'To reduce the number of options and to improve the reconnection handling please use the new `retry_strategy` option instead.\\n' +\n 'This replaces the max_attempts and retry_max_delay option.'\n );\n }\n this.command_queue = new Queue(); // Holds sent commands to de-pipeline them\n this.offline_queue = new Queue(); // Holds commands issued but not able to be sent\n this.pipeline_queue = new Queue(); // Holds all pipelined commands\n // ATTENTION: connect_timeout should change in v.3.0 so it does not count towards ending reconnection attempts after x seconds\n // This should be done by the retry_strategy. Instead it should only be the timeout for connecting to redis\n this.connect_timeout = +options.connect_timeout || 3600000; // 60 * 60 * 1000 ms\n this.enable_offline_queue = options.enable_offline_queue === false ? false : true;\n this.retry_max_delay = +options.retry_max_delay || null;\n if ('retry_max_delay' in options) {\n self.warn(\n 'retry_max_delay is deprecated and will be removed in v.3.0.0.\\n' +\n 'To reduce the amount of options and the improve the reconnection handling please use the new `retry_strategy` option instead.\\n' +\n 'This replaces the max_attempts and retry_max_delay option.'\n );\n }\n this.initialize_retry_vars();\n this.pub_sub_mode = 0;\n this.subscription_set = {};\n this.monitoring = false;\n this.message_buffers = false;\n this.closing = false;\n this.server_info = {};\n this.auth_pass = options.auth_pass || options.password;\n this.selected_db = options.db; // Save the selected db here, used when reconnecting\n this.old_state = null;\n this.fire_strings = true; // Determine if strings or buffers should be written to the stream\n this.pipeline = false;\n this.sub_commands_left = 0;\n this.times_connected = 0;\n this.buffers = options.return_buffers || options.detect_buffers;\n this.options = options;\n this.reply = 'ON'; // Returning replies is the default\n this.create_stream();\n // The listeners will not be attached right away, so let's print the deprecation message while the listener is attached\n this.on('newListener', function (event) {\n if (event === 'idle') {\n this.warn(\n 'The idle event listener is deprecated and will likely be removed in v.3.0.0.\\n' +\n 'If you rely on this feature please open a new ticket in node_redis with your use case'\n );\n } else if (event === 'drain') {\n this.warn(\n 'The drain event listener is deprecated and will be removed in v.3.0.0.\\n' +\n 'If you want to keep on listening to this event please listen to the stream drain event directly.'\n );\n } else if ((event === 'message_buffer' || event === 'pmessage_buffer' || event === 'messageBuffer' || event === 'pmessageBuffer') && !this.buffers && !this.message_buffers) {\n if (this.reply_parser.name !== 'javascript') {\n return this.warn(\n 'You attached the \"' + event + '\" listener without the returnBuffers option set to true.\\n' +\n 'Please use the JavaScript parser or set the returnBuffers option to true to return buffers.'\n );\n }\n this.reply_parser.optionReturnBuffers = true;\n this.message_buffers = true;\n this.handle_reply = handle_detect_buffers_reply;\n }\n });\n}", "title": "" }, { "docid": "d622dd0bfe58707d25655f2e03caa0af", "score": "0.47313735", "text": "function RedisClient (options, stream) {\n // Copy the options so they are not mutated\n options = utils.clone(options);\n EventEmitter.call(this);\n var cnx_options = {};\n var self = this;\n /* istanbul ignore next: travis does not work with stunnel atm. Therefore the tls tests are skipped on travis */\n for (var tls_option in options.tls) {\n cnx_options[tls_option] = options.tls[tls_option];\n // Copy the tls options into the general options to make sure the address is set right\n if (tls_option === 'port' || tls_option === 'host' || tls_option === 'path' || tls_option === 'family') {\n options[tls_option] = options.tls[tls_option];\n }\n }\n if (stream) {\n // The stream from the outside is used so no connection from this side is triggered but from the server this client should talk to\n // Reconnect etc won't work with this. This requires monkey patching to work, so it is not officially supported\n options.stream = stream;\n this.address = '\"Private stream\"';\n } else if (options.path) {\n cnx_options.path = options.path;\n this.address = options.path;\n } else {\n cnx_options.port = +options.port || 6379;\n cnx_options.host = options.host || '127.0.0.1';\n cnx_options.family = (!options.family && net.isIP(cnx_options.host)) || (options.family === 'IPv6' ? 6 : 4);\n this.address = cnx_options.host + ':' + cnx_options.port;\n }\n // Warn on misusing deprecated functions\n if (typeof options.retry_strategy === 'function') {\n if ('max_attempts' in options) {\n self.warn('WARNING: You activated the retry_strategy and max_attempts at the same time. This is not possible and max_attempts will be ignored.');\n // Do not print deprecation warnings twice\n delete options.max_attempts;\n }\n if ('retry_max_delay' in options) {\n self.warn('WARNING: You activated the retry_strategy and retry_max_delay at the same time. This is not possible and retry_max_delay will be ignored.');\n // Do not print deprecation warnings twice\n delete options.retry_max_delay;\n }\n }\n\n this.connection_options = cnx_options;\n this.connection_id = RedisClient.connection_id++;\n this.connected = false;\n this.ready = false;\n if (options.socket_nodelay === undefined) {\n options.socket_nodelay = true;\n } else if (!options.socket_nodelay) { // Only warn users with this set to false\n self.warn(\n 'socket_nodelay is deprecated and will be removed in v.3.0.0.\\n' +\n 'Setting socket_nodelay to false likely results in a reduced throughput. Please use .batch for pipelining instead.\\n' +\n 'If you are sure you rely on the NAGLE-algorithm you can activate it by calling client.stream.setNoDelay(false) instead.'\n );\n }\n if (options.socket_keepalive === undefined) {\n options.socket_keepalive = true;\n }\n for (var command in options.rename_commands) {\n options.rename_commands[command.toLowerCase()] = options.rename_commands[command];\n }\n options.return_buffers = !!options.return_buffers;\n options.detect_buffers = !!options.detect_buffers;\n // Override the detect_buffers setting if return_buffers is active and print a warning\n if (options.return_buffers && options.detect_buffers) {\n self.warn('WARNING: You activated return_buffers and detect_buffers at the same time. The return value is always going to be a buffer.');\n options.detect_buffers = false;\n }\n if (options.detect_buffers) {\n // We only need to look at the arguments if we do not know what we have to return\n this.handle_reply = handle_detect_buffers_reply;\n }\n this.should_buffer = false;\n this.max_attempts = options.max_attempts | 0;\n if ('max_attempts' in options) {\n self.warn(\n 'max_attempts is deprecated and will be removed in v.3.0.0.\\n' +\n 'To reduce the amount of options and the improve the reconnection handling please use the new `retry_strategy` option instead.\\n' +\n 'This replaces the max_attempts and retry_max_delay option.'\n );\n }\n this.command_queue = new Queue(); // Holds sent commands to de-pipeline them\n this.offline_queue = new Queue(); // Holds commands issued but not able to be sent\n this.pipeline_queue = new Queue(); // Holds all pipelined commands\n // ATTENTION: connect_timeout should change in v.3.0 so it does not count towards ending reconnection attempts after x seconds\n // This should be done by the retry_strategy. Instead it should only be the timeout for connecting to redis\n this.connect_timeout = +options.connect_timeout || 3600000; // 60 * 60 * 1000 ms\n this.enable_offline_queue = options.enable_offline_queue === false ? false : true;\n this.retry_max_delay = +options.retry_max_delay || null;\n if ('retry_max_delay' in options) {\n self.warn(\n 'retry_max_delay is deprecated and will be removed in v.3.0.0.\\n' +\n 'To reduce the amount of options and the improve the reconnection handling please use the new `retry_strategy` option instead.\\n' +\n 'This replaces the max_attempts and retry_max_delay option.'\n );\n }\n this.initialize_retry_vars();\n this.pub_sub_mode = 0;\n this.subscription_set = {};\n this.monitoring = false;\n this.message_buffers = false;\n this.closing = false;\n this.server_info = {};\n this.auth_pass = options.auth_pass || options.password;\n this.selected_db = options.db; // Save the selected db here, used when reconnecting\n this.old_state = null;\n this.fire_strings = true; // Determine if strings or buffers should be written to the stream\n this.pipeline = false;\n this.sub_commands_left = 0;\n this.times_connected = 0;\n this.buffers = options.return_buffers || options.detect_buffers;\n this.options = options;\n this.reply = 'ON'; // Returning replies is the default\n // Init parser\n this.reply_parser = create_parser(this);\n this.create_stream();\n // The listeners will not be attached right away, so let's print the deprecation message while the listener is attached\n this.on('newListener', function (event) {\n if (event === 'idle') {\n this.warn(\n 'The idle event listener is deprecated and will likely be removed in v.3.0.0.\\n' +\n 'If you rely on this feature please open a new ticket in node_redis with your use case'\n );\n } else if (event === 'drain') {\n this.warn(\n 'The drain event listener is deprecated and will be removed in v.3.0.0.\\n' +\n 'If you want to keep on listening to this event please listen to the stream drain event directly.'\n );\n } else if (event === 'message_buffer' || event === 'pmessage_buffer' || event === 'messageBuffer' || event === 'pmessageBuffer' && !this.buffers) {\n this.message_buffers = true;\n this.handle_reply = handle_detect_buffers_reply;\n this.reply_parser = create_parser(this);\n }\n });\n}", "title": "" }, { "docid": "24acfb82fecfb4f09f2e6a001dec6c6e", "score": "0.4726358", "text": "async function fetchRuffle(config) {\n // Apply some pure JavaScript polyfills to prevent conflicts with external\n // libraries, if needed.\n (0,_js_polyfills__WEBPACK_IMPORTED_MODULE_1__.setPolyfillsOnLoad)();\n __webpack_require__.p = (0,_public_path__WEBPACK_IMPORTED_MODULE_2__.publicPath)(config);\n await (0,_pkg_ruffle_web__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\n return _pkg_ruffle_web__WEBPACK_IMPORTED_MODULE_0__.Ruffle;\n}", "title": "" }, { "docid": "f3001e849677d62ac69b89f05bac884c", "score": "0.47263342", "text": "function redis_store(opts) {\n opts = opts || {}\n var self = this\n var ttl = opts.ttl || null\n var host = opts.host || '127.0.0.1'\n var port = opts.port || 6379\n opts.redis_options = opts || {}\n if (opts.password) opts.redis_options.auth_pass = opts.password\n self.name = 'redis'\n var pool = new RedisPool({\n redis_host: host\n , redis_port: port\n , redis_options: opts.redis_options\n })\n\n function connect(cb) {\n debug('acquiring pool')\n pool.acquire(function(err, conn) {\n if (err) {\n pool.release(conn)\n return cb(err)\n }\n\n if (opts.db) {\n debug('selecting db %d', opts.db)\n conn.select(opts.db, function(err) {\n cb(err, conn)\n })\n } else {\n cb(null, conn)\n }\n })\n }\n\n self.get = function(key, cb) {\n connect(function(err, conn) {\n if (err) return cb && cb(err)\n conn.get(key, function(err, result) {\n pool.release(conn)\n if (err) return cb && cb(err)\n cb && cb(null, JSON.parse(result))\n })\n })\n }\n\n self.set = function(key, val, cb) {\n connect(function(err, conn) {\n if (err) return cb && cb(err)\n if (ttl) {\n conn.setex(key, ttl, JSON.stringify(val), function(err, result) {\n pool.release(conn)\n cb && cb(err, result)\n })\n } else {\n conn.set(key, JSON.stringify(val), function(err, result) {\n pool.release(conn)\n cb && cb(err, result)\n })\n }\n })\n }\n\n self.setex = function(key, ttl, val, cb) {\n connect(function(err, conn) {\n if (err) return cb && cb(err)\n conn.setex(key, ttl, JSON.stringify(val), function(err, result) {\n pool.release(conn)\n cb && cb(err, result)\n })\n })\n }\n\n self.setnx = function(key, val, cb) {\n connect(function(err, conn) {\n if (err) return cb && cb(err)\n conn.setnx(key, val, function(err, reply) {\n pool.release(conn)\n if (err) return cb && cb(err)\n if (!reply) {\n return cb && cb(new Error('Key was already set'))\n }\n cb && cb(err, reply)\n })\n })\n }\n\n self.del = function(key, cb) {\n connect(function(err, conn) {\n if (err) return cb && cb(err)\n conn.del(key, function(err, result) {\n pool.release(conn)\n cb && cb(err, result)\n })\n })\n }\n\n return self\n}", "title": "" }, { "docid": "54eacbe7690673a92d39c3a9de5e4150", "score": "0.47262463", "text": "setup() {\n return {\n args\n };\n }", "title": "" }, { "docid": "54eacbe7690673a92d39c3a9de5e4150", "score": "0.47262463", "text": "setup() {\n return {\n args\n };\n }", "title": "" }, { "docid": "54eacbe7690673a92d39c3a9de5e4150", "score": "0.47262463", "text": "setup() {\n return {\n args\n };\n }", "title": "" }, { "docid": "54eacbe7690673a92d39c3a9de5e4150", "score": "0.47262463", "text": "setup() {\n return {\n args\n };\n }", "title": "" }, { "docid": "54eacbe7690673a92d39c3a9de5e4150", "score": "0.47262463", "text": "setup() {\n return {\n args\n };\n }", "title": "" }, { "docid": "54eacbe7690673a92d39c3a9de5e4150", "score": "0.47262463", "text": "setup() {\n return {\n args\n };\n }", "title": "" } ]
607469208563006e8a65420172f92292
Logs a user into their accoutn with a given username and password
[ { "docid": "2de90f874ef1728abd9dde5966c82153", "score": "0.0", "text": "async function login() {\n let loginData = new FormData(id(\"account\"));\n let loginResponse = await fetch(\"/login\", {method: \"POST\", body: loginData});\n try {\n let loginMessage = await checkStatus(loginResponse).text();\n currentAccountInfo = [loginData.get(\"username\"), loginData.get(\"password\")];\n popUp(loginMessage);\n addFavoriteButton();\n qs(\"header h2\").textContent = `Currently Logged in: ${currentAccountInfo[0]}`;\n await updateFavorites();\n qs(\"input[type='button'][value='Toggle Favorites']\").removeAttribute(\"disabled\");\n } catch (error) {\n popUp(currentAccountInfo ? \"Failed to Login. Using Last Known Account\" :\n \"Server Error Occured. Please Try Again\");\n if (currentAccountInfo) {\n id(\"username\").value = currentAccountInfo[0];\n id(\"password\").value = currentAccountInfo[1];\n }\n }\n }", "title": "" } ]
[ { "docid": "867af2c677080781c3ea61752cb21650", "score": "0.7092323", "text": "function doLogin(accountName, password, authCode, captcha) {\r\n\tuser.logOn({\r\n\t\taccountName: accountName,\r\n\t\tpassword: password,\r\n\t\ttwoFactorCode: authCode,\r\n\t\tcaptcha: captcha\r\n\t})\r\n}", "title": "" }, { "docid": "d6dc256984f3ed45c6e9d1f6c381aa88", "score": "0.6873406", "text": "signin(/*username, password*/) {}", "title": "" }, { "docid": "1b1fa88fa47bc4e507cf8cd3c4b44cc5", "score": "0.6776172", "text": "function loginUser(username, password) {\n\tUser.login(username, password, function(status){\n\t\t// error\n\t\tif (status == 0) {\n\t\t\tshowToast(\"Connection problem!\", 4000);\n\t\t}\n\t\t// login\n\t\telse if (status == 1) {\n\t\t\t$(\".window.login\").addClass(\"invisible\");\n\t\t}\n\t\t// bad creds\n\t\telse if (status == 3) {\n\t\t\tshowToast(\"Wrong password/username!\", 4000);\n\t\t}\n\n\t});\n}", "title": "" }, { "docid": "4c45b3dffbfa9d10b2ffec52cc92016e", "score": "0.6706975", "text": "function login(){\n\t\tCloud.Users.login({\n\t\t login: username,\n\t\t password: password\n\t\t}, function (e) {\n\t\t if (e.success) {\n\t\t var user = e.users[0].id;\n\t\t Ti.App.Properties.setString(\"cloud_user_id\", user);\n\t\t Ti.API.info('Login OK');\n\t\t subscribeToServerPush();\n\t\t } else {\n\t\t Ti.API.info('Error:\\\\n' + ((e.error && e.message) || JSON.stringify(e)));\n\t\t }\n\t\t});\n\t}", "title": "" }, { "docid": "f7f4d2a4c21b7938f93e2ce762a297bd", "score": "0.67043936", "text": "loginWith(username, pass) {\n this.userFld.setValue(username);\n this.passFld.setValue(pass);\n }", "title": "" }, { "docid": "6b275a52ce7a6ce8d48b37bc018af281", "score": "0.6611099", "text": "login(username = 'different_stv', password = 'passforqa'){\n // login(username = \"Slava+\"randomNumber()+\"gmail.com\", password = 'different_qa'){\n this.usernameTxt.setValue(username);\n this.PasswordTxt.setValue(password);\n this.LoginLnk.click();\n }", "title": "" }, { "docid": "c0389f0ef7604a8a6072ce3f013534c0", "score": "0.6598186", "text": "function login(username, password, done){\n post(\n '/login', \n { \n username: username, \n password: password \n }, \n handleLoginResult\n );\n }", "title": "" }, { "docid": "b4a5d114c773693ec1b3945d5019a8e7", "score": "0.65960443", "text": "login(username, password) {\n this.loginUserName.setValue(username);\n this.loginPassword.setValue(password);\n this.loginBtn.click();\n }", "title": "" }, { "docid": "c9f9e6bc502069a32f459fe2a675cde6", "score": "0.6541598", "text": "function loginUser(username, password) {\n $.post(\"/api/login\", {\n username: username,\n password: password\n })\n .then(function(account) {\n window.location.replace(\"/my-account\");\n // If there's an error, log the error\n })\n .catch(function(err) {\n console.log(err);\n });\n }", "title": "" }, { "docid": "72b253d8c3a7d21365acdc9d928e67af", "score": "0.65411997", "text": "login (username, password) {\n this.inputEmail.setValue(username);\n this.inputPassword.setValue(password);\n this.btnLogin.click();\n }", "title": "" }, { "docid": "a681e064053a1e0f805ca6469a5097a9", "score": "0.65278906", "text": "function login(username, password) {\n // console.log('leaking secrets', username, password)\n store.action(actions.login)(username.toLowerCase(), password);\n}", "title": "" }, { "docid": "a2f894dc0e13a778f30787648758c268", "score": "0.6434654", "text": "function login(username, password) {\n return remote.post('user', 'login', {username, password}, 'basic');\n }", "title": "" }, { "docid": "cef698d7c61a80b870f42945c165556e", "score": "0.6416056", "text": "function logInUser(username, password){\n\t\tif (username == \"joe\" && password == \"password\"){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "b08acb97f692a3b0c5ca52344c540fab", "score": "0.6409108", "text": "function logInUser(username, password) {\n Parse.User.logIn(username, password, {\n success: function(user) {\n $rootScope.userSignedIn = true;\n $state.go('home');\n },\n error: function(user, error) {\n alert('Error: ' + error.code + ' ' + error.message);\n }\n });\n }", "title": "" }, { "docid": "c81a3987239965c7e7aa6c139121bc70", "score": "0.6391423", "text": "login (username, password) {\n this.inputUsername.setValue(username);\n this.inputPassword.setValue(password);\n this.btnSubmit.click();\n }", "title": "" }, { "docid": "92cf65aa523388448da7b5cd6b8fdb49", "score": "0.6374816", "text": "function login(name ,pw ,isValidUser){\n\tisValidUser(name,pw);\n}", "title": "" }, { "docid": "2a726dea2ac7a490e53a787291085895", "score": "0.6371986", "text": "function login(username, password){\n\n\tfor(let i = 0; i < allUsers.length; i++) {\n\t\tif(username == allUsers[i].username && password == allUsers[i].password) {\n\t\t\twindow.location = allUsers[i].redirectHref; // Redirects to the corresponding href on the user-property\n\t\t} else {\n\t\t\tlet element = document.getElementById(\"faultLogin\");\n\t\t\telement.classList.toggle(\"showFault\");\n\t\t}\n\t}\n}", "title": "" }, { "docid": "a464a05c1aab7a8e9772d4c3ff817f12", "score": "0.6351092", "text": "function performLogin(cy, login, password) {\n cy.get(usernameTxtField).type(login)\n cy.get(passwordTxtField).type(password)\n cy.get(submitButtonLogin).click()\n}", "title": "" }, { "docid": "76461e994c359cbbae9af80467012c67", "score": "0.63206846", "text": "login(username, password) {\n this.inputUsername.setValue(username);\n this.inputPassword.setValue(password);\n this.btnSubmit.click();\n }", "title": "" }, { "docid": "82d5f549ec0e9b260fc885da075168bf", "score": "0.631943", "text": "function logUser() {\n let username = document.getElementById(\"username\").value;\n let pass = document.getElementById(\"password\").value;\n}", "title": "" }, { "docid": "87e2bf55d29228f89ab05e36a214496b", "score": "0.6314731", "text": "function logIn(username, password) {\n var credentials = Authentication.getCredentials(username, password);\n $http.get($rootScope.baseUrl + '/dealerlogins/', {\n headers: {'Authorization': credentials}\n })\n .then(function (response) {\n // success\n var dealer = response.data.results[0];\n ctrl.saveCurrent(dealer);\n ctrl.setCredentials(username, password);\n ctrl.broadcastResult('log-in', true, dealer);\n },\n function (httpError) {\n // error\n ctrl.broadcastResult('log-in', false, httpError);\n });\n }", "title": "" }, { "docid": "5b2220816da79b780d93720cffbf6135", "score": "0.63094234", "text": "function attemptLogin() {\r\n message(\"Logging in...\");\r\n // Cancel weird timed logins\r\n lightdm.cancel_timed_login();\r\n // Pass on user to lightdm\r\n var user = document.getElementById('user').value;\r\n lightdm.start_authentication(user);\r\n}", "title": "" }, { "docid": "485cd8cde409c65d24f321c238042af2", "score": "0.6308376", "text": "function login(context) {\n const username = context.params.username;\n const password = context.params.password;\n\n if (!validator.isValidForm(username, password)) {\n return;\n }\n\n userModel.login(username, password)\n .then(function (response) {\n userModel.saveSession(response);\n handler.showInfo('Login successful.');\n context.redirect('#/dashboard');\n\n $('input[name=username]').val('');\n $('input[name=password]').val('');\n }).catch(handler.handleError);\n }", "title": "" }, { "docid": "9870abcf47912ea5f6eba322b6e7e2e1", "score": "0.6300742", "text": "function loginUser(username, password) {\n console.log(username, password);\n $.post(\"/api/logins\", {\n username: username,\n password: password\n })\n .then(function() {\n console.log(\"post request\");\n window.location.replace(\"/admin\");\n\n // If there's an error, log the error\n })\n .catch(function(err) {\n console.log(\"Error\" + JSON.stringify(err));\n });\n }", "title": "" }, { "docid": "f56475c9b1055fbc33607598c3163628", "score": "0.6298166", "text": "function logIn() {\n if (salt === null) return false; // Can't do anything 'til we know the salt\n\n // Hash the password\n var password = logInPasswordUI.value;\n password = hashStr(salt + password);\n password = hashStr(clientID + password);\n\n // Send the login request to the server\n var p = prot.login;\n var pwbuf = encodeText(password);\n var msg = new DataView(new ArrayBuffer(p.length + pwbuf.length));\n msg.setUint32(0, prot.ids.login, true);\n new Uint8Array(msg.buffer).set(pwbuf, p.password);\n ws.send(msg);\n\n return false;\n }", "title": "" }, { "docid": "82ca3d81aa3d556fec2a7855e793f6b7", "score": "0.6277774", "text": "function login() {\n\n\tdocument.forms.testForm.username.value = document.forms.testForm.uname.value;\n\tdocument.forms.testForm.password.value = document.forms.testForm.pword.value;\n\tdocument.forms.testForm.uname.value = \"\";\n\tdocument.forms.testForm.pword.value = \"\";\n\tdocument.forms.testForm.action=\"https://webaccounts.esri.com/CAS/index.cfm\";\n\tdocument.forms.testForm.submit();\n }", "title": "" }, { "docid": "9efccc3a1fd72d6e56ec49bbd9ccb6c3", "score": "0.62755644", "text": "function loginHandler(){\n\tuser.set(\"username\", usernameField.value);\n\tuser.set(\"password\", passwordField.value);\n\tuser.logIn({\n\t\tsuccess:function (user){\n\t\t\tconsole.log(\"login worked\");\n\t\t\tloggedIn();\n\n\t\t}, \n\t\terror: function (user, error){\n\t\t\tconsole.log(\"error \"+ error.code);\n\t\t}\n\t});\n}", "title": "" }, { "docid": "a7809de24341110d3546a6fe709d2dcf", "score": "0.6265911", "text": "async login(username, parameters = {}) {\n\t\tow(username, ow.string.nonEmpty);\n\t\tow(parameters, ow.object);\n\n\t\tconst { password } = parameters;\n\t\tconst prefix = password ? `echo \"${password}\" | LPASS_DISABLE_PINENTRY=1` : '';\n\n\t\tdelete parameters.password;\n\n\t\treturn call(`login \"${username}\"`, parameters, ['trust', 'plaintextKey', 'force', 'color'], undefined, prefix);\n\t}", "title": "" }, { "docid": "75b747976d4dd488cbb4bf64045ef4f4", "score": "0.6246524", "text": "login ({ commit }, { name, email, _id }) {\n // Add User to state\n commit('SET_USER', { name, email, id: _id })\n }", "title": "" }, { "docid": "6bbfc081de219215baed5e7257a40117", "score": "0.6237", "text": "async function login() {\n await helpers.navigateAndWait(driver, url, usernameSel);\n await helpers.findInputAndType(driver, usernameSel, process.env.user);\n await helpers.findInputAndType(driver, passwordSel, process.env.pw);\n await helpers.findAndClickElement(driver, submitSel);\n await helpers.waitForSelector(driver, communityListSel);\n console.log(chalk.gray(\"Log in complete!\"));\n }", "title": "" }, { "docid": "0ccd76407be540689c219d752a3b03b4", "score": "0.6234339", "text": "function login(username,password){\n\tcurrentUser = searchAccountName(username)\n\tif(currentUser){\n\t\tif(currentUser.password === password){\n\t\t\tcurrentUser.GUID = guid();\n\t\t\tconsole.log(\"User \"+currentUser.username + \" has logged in.\")\n\t\t\treturn(currentUser)\n\t\t}else{\n\t\t\t//wrong username/password\n\t\t\treturn(null)\n\t\t}\n\t\t//wrong username/password\n\t\treturn(null)\n\t}\n}", "title": "" }, { "docid": "a07c0d1254c79e4d5fb062dc4e5ad13e", "score": "0.6224437", "text": "function loginUser(email, password) {\n console.log(email);\n $.post(\"/api/user-login\", {\n email: email + \" user\",\n password: password,\n })\n .then(function () {\n window.location.replace(\"/developer-account\");\n // If there's an error, log the error\n //loadUserNProject();\n })\n .catch(function (err) {\n console.log(err);\n });\n }", "title": "" }, { "docid": "d51edf982449a637235dab1cade4a284", "score": "0.61839825", "text": "function doLogin() {\n\n // if username or password is not provided, ignore request for login\n if (!vm.username || !vm.password) {\n\n vm.loginError = true;\n\n return;\n }\n\n vm.loggingIn = true;\n vm.loginError = false;\n\n dataservice.userService.login(vm.username, vm.password, appConfig.GRANT_TYPE_LOGIN)\n .then(logUser, showError)\n .then(function() {\n\n vm.loggingIn = false;\n });\n }", "title": "" }, { "docid": "e8864b38eb5a10e3a8d1d5cfb6ab6e64", "score": "0.61755854", "text": "setLogin(username, password) {\n log.debug(\"User login: \"+username)\n client = client.wrap(basicAuth, { username: username, password: password });\n }", "title": "" }, { "docid": "58576504224c62022c231c3bcc63dd70", "score": "0.61693716", "text": "loginByDefaultUser() {\n this.enterUsername(Cypress.env('username'));\n this.enterPassword(Cypress.env('password'));\n this.clickLoginButton();\n }", "title": "" }, { "docid": "7c8eb83bacdf7c7c2fca222540e599d4", "score": "0.6168492", "text": "function login() {\n var remember = remember_check.prop('checked');\n request({\n path: '/login',\n method: 'POST'\n }, {\n username: username.val(),\n password: password.val(),\n expiry: store.get('tokenExpiry'),\n revoke: true\n }, (response) => {\n if (response.error) {\n if (response.error.includes('ECONNREFUSED'))\n response.error = 'Error connecting to server.';\n setError(response.error);\n return;\n }\n setAuthToken(response.token, response.expiry);\n if (remember) saveCookie('login-name', username.val());\n else removeCookie('login-name');\n if (store.get('savePassForAutoLogin')) {\n store.set('username', username.val());\n store.set('password', password.val());\n store.set('savePassForAutoLogin', false);\n store.set('autoLogin', true);\n sendNotification('Preferences', 'You will now auto login when the client starts');\n }\n switchToMainUI();\n });\n }", "title": "" }, { "docid": "4817ebea8ffb7c5a585e66afe3277861", "score": "0.6165075", "text": "async function logIn(page) {\n await page.goto(loginURL);\n await page.type('#userName', userName);\n await page.type('#password', password);\n await page.click('[primary=primary]');\n await waitURL(page, 'home');\n}", "title": "" }, { "docid": "3f116b7668b4141282e3071d8f351556", "score": "0.6157793", "text": "async login (username, password) {\n await this.inputUsername.setValue(username);\n await this.buttonContinue.click();\n }", "title": "" }, { "docid": "e6d2f9b5cb722002123292b79ea60689", "score": "0.61470175", "text": "function loginUser(info, errorHelper, successHelper) {\n var user = db.user;\n // Get the global user registry, and try to compare the info with entries.\n var account = encryptionHelper.encryptHelper(info.account);\n var password = encryptionHelper.encryptHelper(info.password);\n user.findAndCountAll({ where: { account: account } }).then(function (result) {\n if (result.count === 1) {\n if (result.rows[0].get({ plain: true }).password !== password) {\n errorHelper(Error('密码不正确'));\n } else {\n successHelper();\n }\n } else {\n errorHelper(Error('该账户名不存在'));\n }\n });\n}", "title": "" }, { "docid": "a9330f5ee9a46515bcd685a09cb3016f", "score": "0.61439985", "text": "function loginSuccess(done){\n var data = {};\n data.username = \"admin@admin.com\";\n data.password = \"password\";\n login(data, 0, done);\n}", "title": "" }, { "docid": "f05845a6d2f207d7fc2f4a2bc41c4034", "score": "0.6130631", "text": "function linkAccount(req, res) {\n var user = req.user.displayName\n var username = req.body.username\n var password = req.body.password\n if (!username || !password) {\n res.sendStatus(400)\n return\n }\n getUser(username, function(userObj) {\n var salt = userObj[0].salt;\n var hash = getHash(password, salt);\n if (!userObj || userObj[0].hash != hash) {\n res.sendStatus(401)\n return\n }\n var original = {\n username: user\n }\n var update = {\n username: username\n }\n updateAuth(original, update, function(items) {\n var sid = req.cookies[_cookieKey]\n\n _sessionUser[sid][0].username = username;\n var msg = {\n username: username,\n result: 'success'\n };\n res.send(msg);\n })\n })\n\n}", "title": "" }, { "docid": "3ffd6b8dae6bdcff255357f6e16b0289", "score": "0.61004716", "text": "function login( andThen )\t// input is callback method.\r\n{\r\n\tuser = SettingsManager.getValue(settingsObj.GroupName, \"account\");\r\n\tpwd = SettingsManager.getValue(settingsObj.GroupName, \"password\");\r\n\tssl = SettingsManager.getValue(settingsObj.GroupName, \"NASSecureLogin\");\r\n\t\r\n\tif(user != old_user || pwd != old_pwd || ssl != old_ssl) {\r\n\t\tqnapSid = qnapSidNull;\r\n\t\tdebugOut(\"login: \" + \"changed\");\r\n\t}\r\n\t\r\n\tif (qnapSid != qnapSidNull)\r\n\t{\r\n\t\tandThen(200, null)\r\n\t\treturn true;\r\n\t}\r\n\t\r\n\tdebugOut(\"login: \" + \"do\");\r\n\t\r\n\told_user = user;\r\n\told_pwd = pwd;\r\n\told_ssl = ssl;\r\n\t\r\n\tuser = encodeURIComponent(user);\r\n\tpwd = encodeURIComponent(ezEncode(utf16to8(pwd)));\r\n\turl = '/cgi-bin/authLogin.cgi?count=' + Math.random() + '&user=' + user + '&pwd=' + pwd + '&admin=1'\r\n\t\r\n\tnasObject.makeServerRequest( url, \"GET\", andThen, null );\r\n\t\r\n\treturn false;\t// Don't refresh the whole page!\r\n}", "title": "" }, { "docid": "213dd02129437d934d5daaf8670d87d7", "score": "0.60733855", "text": "function login() {\n var user = null;\n self.command_line.prompt('login:');\n // don't stor logins in history\n if (settings.history) {\n self.command_line.history().disable();\n }\n self.command_line.commands(function(command) {\n try {\n echo_command(command);\n if (!user) {\n user = command;\n self.command_line.prompt('password:');\n self.command_line.mask(true);\n } else {\n self.command_line.mask(false);\n settings.login(user, command, function(user_data) {\n if (user_data) {\n // if no cookie overwrite authentication methods\n if (!settings.cookie) {\n self.token = function() {\n return user_data;\n };\n self.login = function() {\n return user;\n };\n } else {\n var name = (settings.name ? '_' + settings.name : '');\n $.cookie('token' + name, user_data);\n $.cookie('login' + name, user);\n }\n //restore commands and run interpreter\n self.command_line.commands(commands);\n prepare_top_interpreter(true);\n } else {\n self.error('Wrong password try again');\n self.command_line.prompt('login:');\n user = null;\n }\n self.resume();\n });\n }\n } catch(e) {\n display_exception(e, 'LOGIN', self);\n throw e;\n }\n });\n }", "title": "" }, { "docid": "7f5694d2c98d1db547c032adbda96ec4", "score": "0.6068501", "text": "function login(data) {\n var index;\n\n // \"clean up\" data\n data = data.trim().toLowerCase();\n // find user:pass combination\n index = accounts.indexOf(data);\n\n // if login successful, return user\n return (index > -1) ? (accounts[index].split(':')[0]) : false;\n}", "title": "" }, { "docid": "698064542a3ae1886ff506e68325c752", "score": "0.60457206", "text": "function setupLogin() {\n\tvar athena = window.database.getObject(\"user\", \"athena\");\n\tvar url = document.location.href;\n\t\n\tif (document.location.protocol == 'https:' && athena != null) {\n\t\turl = \"http://picker.mit.edu\";\n\t\t$('#httpsStatus').html('logged in as ' + athena +\n\t\t\t' &bull; <a href=\"' + url + '\">LOGOUT</a>');\n\t} else {\n\t\turl = \"https://picker.mit.edu:444\";\n\t\t$('#httpsStatus').html('<a href=\"' + url + '\">LOGIN</a>');\n\t}\n\n setupCookiesAndMiniTimegrid();\n}", "title": "" }, { "docid": "09e0bd47da69a98bd5595979264f3d55", "score": "0.6041983", "text": "function loginUser(ev) {\n ev.preventDefault();\n let first_name = $('#first_name').val();\n let last_name = $('#last_name').val();\n let display_name = $('#display_name').val();\n let email = $('#email').val();\n let password = $('#password').val();\n let password_confirmation = $('#password_confirmation').val();\n\n\n auth.login(usernameVal, passwdVal)\n .then((userInfo) => {\n saveSession(userInfo);\n inputUsername.val('');\n inputPassword.val('');\n showInfo('Login successful.');\n }).catch(handleError);\n }", "title": "" }, { "docid": "7e178de667012bdd026cf94338f712c2", "score": "0.6032527", "text": "function doLogin(login,password)\n{\n var reply = AnyBalance.requestPost(g_login_script, JSON.stringify({username: login, password: password}), g_headers);\n AnyBalance.trace(reply,\"Auth Reply\");\n if (reply==\"\")\n throw new AnyBalance.Error(\"No Auth Reply\");\n\tvar err = /.*<title>([\\S\\s]*?)<\\/title>.*/i.exec(reply);\n\tif (err)\n\t\tthrow new AnyBalance.Error(err[1],false,false);\n reply = JSON.parse(reply);\n if (reply.status!=\"success\")\n throw new AnyBalance.Error(\"Unable to login, please check your username/password.\"); \n AnyBalance.trace(reply.sessionToken,\"Session Token\");\n g_sessionToken = reply.sessionToken;\n}", "title": "" }, { "docid": "d2113f72a5dc0a58ffed8e3e97d3993a", "score": "0.602289", "text": "function login(username, password) {\n let user = getUserFromUsername(username);//DB.getUserFromUsername(username);\n if(!user || ( password != user.password )) {\n setCookie('loginerror', null, 0.01) //set cookie for login error\n return false;\n }\n setCookie('user', JSON.stringify({'id': user.user_id, 'credentials': user.credentials}), 0.1); //store the users id and credentials\n setCookie('loginerror', null, 0); //remove cookie for login error in case it's set\n return true;\n}", "title": "" }, { "docid": "7a8c67146f6be936508ed1b806e251ba", "score": "0.6017097", "text": "function loginUser(username, password) {\n // Holds the parameters needed to call backend for login.\n const payload = {\n username: username,\n password: password\n }\n\n // Compiles all the parameters.\n const options = {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(payload)\n }\n\n // Is the URL for fetching login.\n let loginAuth = localStorage.getItem(\"api\") + \"/auth/login\";\n\n // Attempts to login through the backend and handles any errors that return.\n fetch(loginAuth, options)\n .then(response => errors(response))\n .then(data => data.json())\n .then(data => {\n // Logs the user in.\n successfulLogin(data);\n })\n .catch(error => {\n // Lets user attempt to login in again.\n failedLogin(error);\n });\n}", "title": "" }, { "docid": "8673547ca63d93c56106d897f9f86d05", "score": "0.60134876", "text": "function userLogin(username, password) {\n $.post(\"/api/login\", {\n username: username,\n password: password\n })\n .then(function(user) {\n localStorage.setItem(\"User\", user.id);\n window.location.replace(\"/members\");\n // Logs error, if an error\n })\n .catch(function(err) {\n console.log(err);\n });\n }", "title": "" }, { "docid": "a7c03b3f479654f7fd7766be37f90ec7", "score": "0.6004446", "text": "function userLogin(user, pw, callback){\n setTimeout( () => {\n console.log(\"User logged in \")\n callback({username: user})\n }, 3000)\n}", "title": "" }, { "docid": "c33d1bbe20a9a9e43ecd9ca87bcb53e4", "score": "0.59917974", "text": "function login(username, password) {\n if (username === \"trevor\" && password === \"chicken\") {\n return true;\n } else if (username === \"moath\" && password === \"bigchicken\") {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "a7f232c188daa2f5d8570cb76c2736cb", "score": "0.5991189", "text": "function Login({ setUser }) {\n\n\n \n const loginAnonymous = async () => {\n const user = await app.logIn(Realm.Credentials.anonymous());\n setUser(user);\n };\n return <button onClick={loginAnonymous}>Log In</button>;\n}", "title": "" }, { "docid": "791d4004bfebafdde9e016936000f325", "score": "0.5979768", "text": "login(){\n this.loginButton.waitForClickable({ timeout: 80000 });\n this.loginButton.click();\n this.loginUsername.waitForDisplayed({ timeout: 80000 });\n this.loginUsername.setValue(data.username);\n this.loginPassword.setValue(data.password);\n this.registerButton.click();\n }", "title": "" }, { "docid": "2fba13171188595ed5be9d0fa8f9c279", "score": "0.59776086", "text": "function loginUserByCredentials(username, password) {\n var credentials = {\n username: username,\n password: password\n }\n return $http.post(\"/api/assignment/login\", credentials);\n }", "title": "" }, { "docid": "173e58a084d94f3a9134b1fd4957dc18", "score": "0.5968921", "text": "function login(username, password) {\n\t\tUserFactory.login(username, password).then(function success(response) {\n\t\t\t$location.path('home');\n\t\t}, function(error) {\n\t\t\t$scope.errorMessage = error.data;\n\t\t});\n\t}", "title": "" }, { "docid": "369b0eab8570462ffab16f0d5c896928", "score": "0.59665954", "text": "function Login({ setUser }) {\n const loginAnonymous = async () => {\n const user = await app.logIn(Realm.Credentials.anonymous());\n setUser(user);\n };\n return <button onClick={loginAnonymous}>Log In</button>;\n}", "title": "" }, { "docid": "6294a53f17f948a16426e01b56622d6c", "score": "0.595873", "text": "function loginUser(username, password) {\n $.post(\"/api/login\", {\n username: username,\n password: password\n })\n .then(function() {\n window.location.replace(\"/home\");\n // If there's an error, log the error\n })\n .catch(function(err) {\n alert(\"This username/password combination is invalid. Please try again.\")\n console.log(err);\n });\n }", "title": "" }, { "docid": "791777f6bf05dbbd9f4e9b37a8c9c15f", "score": "0.5958363", "text": "function login(req, res, next) {\n var query = User.where( 'username', new RegExp('^'+req.params.username+'$', 'i') );\n query.findOne(function (err, user) {\n if (err) {\n res.send(err);\n return next();\n } else if (!user) {\n return next(new restify.NotAuthorizedError(\"Invalid username.\"));\n return next();\n } else if (user.authenticate(req.params.password)) {\n if (!user.emailValidatedFlag && !user.newEmail) {\n // user account has never been validated\n return next(new restify.NotAuthorizedError(\"Email address must be validated to activate your account.\"));\n } else {\n req.session.user = user._id; //subscriber@subscriber\n\t\t\t res.send(user);\n return next();\n }\n } else {\n\t\t\t return next(new restify.NotAuthorizedError(\"Invalid password.\"));\n }\n\n });\n }", "title": "" }, { "docid": "875a701e0f424b083c1d10f4ae562ba1", "score": "0.594986", "text": "static login(username){\n return new Promise((resolve, reject) => {\n ConnectyCubeHandler.CCinstance.login({login: username, password: 'LocalBuddy'}, function(error, user){\n if(error !== null) reject(error)\n ConnectyCubeHandler.CCUserId = user.id\n resolve(user)\n })\n })\n }", "title": "" }, { "docid": "6f819c2c274fa8eb41f929ee092ebd43", "score": "0.59488", "text": "function login(){\n if(isValidArgument(sessionId, false)){\n //user already logged in\n return;\n }\n var e=document.getElementById(\"mySignin\").elements;\n var user=e[\"uname\"];\n var pass=e[\"passwd\"];\n if(!verifyCred(user, \"uname\", pass, \"passwd\"))\n return; \n //send data to server and get response \n try{\n var md5=CryptoJS.MD5(pass.value).toString(); \n estConnection(\"http://localhost:3000/user/auth\", user.value, md5) \n }catch(err){\n alert(\"Unable to establish connection with the server. Make sure you are connected to the internet and \\\n try again later\");\n console.error(err);\n }\n}", "title": "" }, { "docid": "1b1ef20025c238ab5dfeaf61dca628d3", "score": "0.594151", "text": "function handleLogin(){\n auth.signInWithPopup(provider)\n .then((result)=>{\n const user = result.user\n setUser(user)\n })\n \n // setLogged(true)\n // console.log(user, \"<--user in Navbar/handleLogin\") \n // console.log(password, \"<--password in Navbar/handleLogin\") \n }", "title": "" }, { "docid": "2735ca015ce8bae91b06f521ae9387c6", "score": "0.59261674", "text": "function tryLogin() {\n if (username === \"LTI\" && password === \"123\") {\n // if remember me is checked\n if (remMe.checked) {\n // encrypt username\n var encryptedUsername = encrypt(username);\n // encrypt password\n var encryptedPassword = encrypt(password);\n // store them in cookies\n setCookie(\"username\", encryptedUsername, 1);\n setCookie(\"password\", encryptedPassword, 1);\n }\n // redirect to welcome page\n window.location.replace(`welcomePage.html?username=${username}`);\n } else {\n // other wise show the error\n document.getElementById(\"error\").style.display = \"block\";\n }\n}", "title": "" }, { "docid": "77cd73e55aa5cfd826775d48dc2f2e14", "score": "0.59254676", "text": "login (credentials) {\n return Api().post('login', credentials)\n }", "title": "" }, { "docid": "61ee266b99594f2d0310ae7034d4f643", "score": "0.59206253", "text": "function attemptLogin(user) { \r\n \r\n // if password == user.password \r\n // these passwords should not be stored in plain text accessible via db query\r\n if (inputPassword.value == user[0].password) {\r\n // allow access\r\n console.log(\"success\")\r\n // Save data to sessionStorage\r\n sessionStorage.setItem('user', user[0].username);\r\n window.location.href = \"main.html\";\r\n } else {\r\n // deny access\r\n console.log(\"Access denied\")\r\n alert(\"Access Denied!\")\r\n // uncomment for password hack\r\n console.log(\"please disable hack:\"+user[0].password)\r\n } \r\n}", "title": "" }, { "docid": "fb898f40d17e5b39d3d46fbfa19b0741", "score": "0.5919744", "text": "function login(){\n\tvar username = $(\"user\").value;\n\tvar password = $(\"pass\").value;\n\tvar container=$(\"form\");\n\tvar element=$$(\"strong\")[0];\n\n\tif(username == \"\" && password == \"\"){\n\t\tshowMessage(\"Username and Password missing!\",container,element);\n\t} else if(username == \"\"){\n\t\tshowMessage(\"Username missing!\",container,element);\n\t} else if(password == \"\"){\n\t\tshowMessage(\"Password missing!\",container,element);\n\t} else {\n\t\tcheckLogin(username,password);\n\t}\n}", "title": "" }, { "docid": "937900a798d1862bace9b2f3157ed732", "score": "0.5911628", "text": "function login(username, password) {\n const body = { username, password };\n return axios\n .post('http://localhost:3001/api/auth/login', body);\n}", "title": "" }, { "docid": "48346c65655ae3af8757d9a592ed8cc0", "score": "0.59064656", "text": "function loginUser(email, password) {\n $.post(\"/api/login\", {\n email: email,\n password: password\n })\n .then(function(data) {\n window.location.replace(data);\n // If there's an error, log the error\n })\n .catch(handleLoginErr);\n }", "title": "" }, { "docid": "bdfcfd613dd9f549a1b19bda643cb4db", "score": "0.59056956", "text": "login (username = this.username, password) {\n this.username = username\n return this._request({\n url: `/v2/user/${username}/login/`,\n method: 'post',\n body: { password }\n }).then(response => {\n if (response.headers['x-auth-token']) {\n return response\n }\n throw new Error('Authentication failed.')\n })\n }", "title": "" }, { "docid": "cd5a6a2bb2f308a3d088412479cc43c7", "score": "0.5894417", "text": "function loginUser (user, pass, callback) {\n var msg = JSON.stringify({\n username: user,\n password: pass\n });\n http.request({\n method: 'post',\n port: MYPORT,\n path: '/login',\n headers: {\n \"content-length\": msg.length,\n \"content-type\": \"application/json\"\n }\n }, callback).end(msg);\n }", "title": "" }, { "docid": "ea004931c338c222d1d3c9b83a2542f8", "score": "0.5890464", "text": "function login() {\n webAuth.authorize();\n }", "title": "" }, { "docid": "5134356f966fdb9d8f51ed55ef765adc", "score": "0.5889519", "text": "function loginUser(event) {\n event.preventDefault();\n // TO DO: check if user exists and GET, else return error\n const currUser = getUser(user, users);\n if( currUser != null ){\n alert(\"Hello \" + currUser.name );\n }else{\n alert(\"user not found\");\n }\n }", "title": "" }, { "docid": "d1b02c2c950026dc2eff12d5ba3bdb13", "score": "0.58882123", "text": "function login() {\n const username = document.getElementById('username-input').value;\n const password = document.getElementById('password-input').value;\n if (!username.trim() || !password.trim()) return;\n const user = users.find( user => (user.username === username) );\n if (!user) return;\n if (user.password !== password) return;\n document.getElementById('username-input').value = '';\n document.getElementById('password-input').value = '';\n primaryUser = user;\n localStorage.setItem('logged-in', 'true');\n localStorage.setItem('user-id', primaryUser.id);\n right.appendChild(trending());\n right.appendChild(suggestions());\n goHome();\n toggleVisibility(['header', 'content', 'landing']);\n}", "title": "" }, { "docid": "effe145a59f2b9e428344d9c23aea3d7", "score": "0.58797616", "text": "attemptLogin() {\n UserManager.getInstance().logInUser(this.state.emailField, this.state.passwordField)\n .then(_ => {\n // At this point, the user is authorized\n this.props.navigation.push('Home');\n })\n .catch(error => {\n alert(\"Your credentials are incorrect, please try again.\");\n })\n }", "title": "" }, { "docid": "415c11f9e6ec3222217c464e3be77dac", "score": "0.58776003", "text": "function loginUser(data) {\n // const url = 'http://localhost:3000/login';\n return instance.post('api/members/login', data);\n}", "title": "" }, { "docid": "f7d6f8470679cf56b3f10042e11c9ffa", "score": "0.5858786", "text": "function seeLogin()\r\n{\r\n // clear #seeForm (we may write an error there)\r\n $( '#seeForm' ).html('');\r\n\r\n var username = $( \"#seeLoginUsername\" ).val();\r\n var password = $( \"#seeLoginPassword\" ).val();\r\n\r\n player.UserRegistration.login(\r\n {method: 'Userpwd', username: username, password: password, persist: 0}\r\n );\r\n\r\n}", "title": "" }, { "docid": "1c07fcefe599bb583b81e92fbc06a3f6", "score": "0.5851639", "text": "async handelLogin () {\n console.log('handle login')\n const userName = 'admin123'\n const password = 'admin123'\n if (this.state.userName === userName && this.state.password === password) {\n this.setState({ error: false })\n setUser(userName)\n this.props.history.push('/')\n } else {\n this.setState({ error: true })\n }\n }", "title": "" }, { "docid": "68804889d1cc0d84ba5a92f6327f277d", "score": "0.5851538", "text": "static login() {\n if(this.state.logging) return;\n\n this.setState(() => ({\n logging: true,\n loginError: null\n }));\n\n const { login, password } = this.state;\n\n client.mutate({\n mutation: gql`\n mutation($login: String!, $password: String!) {\n loginUser(login: $login, password: $password) {\n id\n }\n }\n `,\n variables: {\n login, password\n }\n }).then(({ data: { loginUser } }) => {\n this.setState(() => ({\n logging: false\n }));\n\n if(!loginUser) return this.setState(() => ({\n loginError: \"Oops... Invalid email or password\"\n }));\n\n cookieControl.set(\"userid\", loginUser.id);\n window.location.href = links[\"FEED_PAGE\"].absolute;\n }).catch(console.error);\n }", "title": "" }, { "docid": "519b7615fb543ab9fa19f77820fa1191", "score": "0.58498245", "text": "function login(){\n var username = YAHOO.lang.trim(YAHOO.util.Dom.get('username').value);\n var password = YAHOO.lang.trim(YAHOO.util.Dom.get('password').value);\n \n //Validation checks\n var usernameCheck = validateUsername(username);\n var passwordCheck = validatePassword(password);\n if (usernameCheck !== '') {\n YAHOO.util.Dom.get('loginMessage').innerHTML = usernameCheck;\n return false;\n }\n else \n if (passwordCheck !== '') {\n YAHOO.util.Dom.get('loginMessage').innerHTML = passwordCheck;\n return false;\n }\n \n var encryptedPassword = encryptPassword(password);\n var dbUsername = checkCredentials(username, encryptedPassword);\n if (dbUsername) {\n var loginPage = YAHOO.util.Dom.getElementsByClassName('login-page');\n YAHOO.util.Dom.setStyle(loginPage, 'display', 'none');\n changeAuthentication(true);\n\t\t\n\t\t//Cleanup the password and any old error messages so they not present on signout\n\t\tYAHOO.util.Dom.get('loginMessage').innerHTML = '';\n\t\tYAHOO.util.Dom.get('password').value = '';\n\t\t\n\t jChat.postLoginInit();\n }\n else {\n YAHOO.util.Dom.get('loginMessage').innerHTML = 'Invalid login! Please try again.';\n return false;\n }\n \n\t\n}", "title": "" }, { "docid": "3b17032bd53b051ec76a1489da9c5abb", "score": "0.5848642", "text": "function login() {\n var username = $(\"#loginUserName\").val();\n var password = $(\"#loginPassword\").val();\n var userid = \"\" + username + password\n userHandler.getUser(userid)\n}", "title": "" }, { "docid": "7e634c15adbfaef168e043bb1685f0db", "score": "0.58468056", "text": "function timed_login(user) {}", "title": "" }, { "docid": "9090db7baf6df6f49c0f4b4a0a8cab49", "score": "0.58414465", "text": "function loginUser(loginInfo, done){\n let agent = supertest.agent(app)\n agent.post('/login')\n .set('Connection', 'keep-alive')\n .send({ '_id': loginInfo._id, 'password': loginInfo.password })\n .expect('Location', '/home')\n .end(function(err, req){\n if(err) return err\n done(agent)\n })\n}", "title": "" }, { "docid": "8d7293393be6e40d1f5d83a0e8679240", "score": "0.5838644", "text": "function successfulLogIn(userData, username, password) {\n return {\n type: actionTypes.LOG_IN_SUCCESS,\n userData,\n username,\n password\n };\n}", "title": "" }, { "docid": "f6b6579872b609e26747b289236a282a", "score": "0.58357763", "text": "function login(args, done) {\n\n var req = args.req;\n\n var clientMongoId = req.get('clientMongoId');\n\n var username = req.body.username;\n var password = req.body.password;\n\n db.findOne('clients', {\n username: username\n }).then(function(foundDoc) {\n if (foundDoc) {\n //username exists\n\n var hash = foundDoc.passwordHash;\n\n bcrypt.compare(password, hash, function(erru, pwdMatch) {\n\n if (pwdMatch) {\n\n done(null, {\n toast: {\n type: 'success',\n text: 'Successful login.'\n },\n result: 'Successful login.',\n success: true,\n clientMongoId: foundDoc._id\n });\n\n } else {\n //wrong pwd\n\n done(null, {\n toast: {\n type: 'error',\n text: 'Wrong password.'\n },\n result: 'Wrong password.',\n error: true\n });\n\n }\n\n })\n\n } else {\n //user not in db\n\n done(null, {\n toast: {\n type: 'error',\n text: 'Wrong username.'\n },\n result: 'Wrong username.',\n error: true\n })\n\n };\n },function(err){\n done(null, {\n toast: {\n type: 'error',\n text: err\n },\n error: true\n });\n });\n\n }", "title": "" }, { "docid": "cff519d1670e3bd4e4ddc633627215b7", "score": "0.5832154", "text": "function login(userName, password, remember){\n try{\n if(userName == null || userName == undefined){\n throwException(\"IllegalArgument\", \"userName must not be null or undefined\");\n }\n if(password == null || password == undefined){\n throwException(\"IllegalArgument\", \"password must not be null or undefined\");\n }\n if(remember == null || remember == undefined){\n throwException(\"IllegalArgument\", \"remember must not be null or undefined\");\n }\n \n const credentials = {\n userName: userName,\n password: password,\n rememberMe: remember\n }\n \n authService.login(\n credentials, \n function(){window.location.href = \"/links\";},\n function(){\n notificationService.showError(\"No user registered with the given user name and password\");\n document.getElementById(\"login_password\").value = \"\";\n }\n );\n }catch(err){\n const message = arguments.callee.name + \" - \" + err.name + \": \" + err.message;\n logService.log(message, \"error\");\n }\n }", "title": "" }, { "docid": "fe551212e59aa7156629be467bf3fe5d", "score": "0.58275265", "text": "function login() {\n auth.authorize();\n}", "title": "" }, { "docid": "b55c48a4e96e16f6c4369a146af4157d", "score": "0.582722", "text": "function logIn() {\n user = [];\n var inputs = document.getElementsByTagName(\"input\");\n for (index = 4; index < inputs.length; ++index) {\n user.push(inputs[index].value);\n }\n for (let i = 0; i < users.length; i++) {\n if (users[i].username === user[0] && users[i].password === user[1]) {\n console.log(\"welcome back\");\n break;\n } else {\n console.log(\"did not find the user\");\n }\n }\n}", "title": "" }, { "docid": "44da83829c849334c695d592e4bc9db6", "score": "0.582661", "text": "function login(username, password) {\n\t\treturn $.ajax({\n\t\t\ttype: \"POST\",\n\t\t\turl: authServiceUri + \"/Login\",\n\t\t\tcontentType: 'application/x-www-form-urlencoded',\n\t\t\tdata: 'grant_type=password&username=' + username + '&password=' + password,\n\t\t}).done(function (result, textStatus, jqXHR) {\n\n\t\t\t//function success(claims) {\n\t\t\t//\t$.each(claims, function (i, claim) {\n\t\t\t//\t\tswitch (claim.Type) {\n\t\t\t//\t\t\tcase \"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name\":\n\t\t\t//\t\t\t\tapp.user.name(claim.Value);\n\t\t\t//\t\t\t\tbreak;\n\t\t\t//\t\t\tcase \"http://schemas.microsoft.com/ws/2008/06/identity/claims/role\":\n\t\t\t//\t\t\t\tapp.user.roles.push(claim.Value);\n\t\t\t//\t\t\t\tbreak;\n\t\t\t//\t\t}\n\t\t\t//\t});\n\t\t\t//\tconsole.log('[app.js - login] success', app.user);\n\t\t\t//}\n\n\t\t\tlogger.success(result.userName + ' logged in', 'auth - login', result);\n\t\t}).fail(function (jqXHR, textStatus, errorThrown) {\n\t\t\tlogger.error('Login failed: ' + textStatus, 'auth - login', errorThrown);\n\t\t});\n\t} //login", "title": "" }, { "docid": "0ed28ac20d0fb2d1ea243a232a0a8daf", "score": "0.5826056", "text": "function login() \n\t\t{\n\t\t\tUserService.findUserByUsernameAndPassword(model.username, model.password)\n\t\t\t.then(function(response)\n\t\t\t{\n\t\t\t\t// test if user exists\n\t\t\t\tif (response != null) {\n\t\t\t\t\t// set rootscope to the user\n\t\t\t\t\t$rootScope.user = response;\n\t\t\t\t\t// redirect to profile page\n\t\t\t\t\t$location.url(\"/profile\");\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log(\"User not found!\");\n\t\t\t\t}\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "1b03792f6f7774f2ab4e378ba87e54aa", "score": "0.58172387", "text": "function emailLogin() {\n var emailAddress = document.getElementById(\"email\").value;\n AccountKit.login(\n 'EMAIL',\n {emailAddress: emailAddress},\n loginCallback\n );\n }", "title": "" }, { "docid": "9ee055017cc088a2d50a27ef6d1f7bbf", "score": "0.58133554", "text": "function login(username, password) {\n var user = getUserByUsername(username)\n if (user && user.password === password) {\n currentUser = {\n username: user.username,\n id: user.id,\n admin: user.admin\n }\n\n $rootScope.$broadcast(\"auth\", {})\n return true\n }\n\n currentUser = angular.copy(anonymousUser)\n $rootScope.$broadcast(\"auth\", {})\n return false\n }", "title": "" }, { "docid": "2978533afd00b87ab14af692e662e4fe", "score": "0.5801486", "text": "function login(){\n\n }", "title": "" }, { "docid": "c7887993ca2ae072eae05748ca14eaee", "score": "0.58007926", "text": "function login() {\n Auth.login(vm.login_email, vm.login_password).then(\n function(val){\n var item = val;\n\n if (item === 'failure'){\n vm.loginError = true;\n } else {\n\n Auth.setTimezone();\n }\n\n });\n \n //console.log(Auth.login(vm.login_email, vm.login_password));\n }", "title": "" }, { "docid": "618a50b9e678058e4d87c8e034c57a96", "score": "0.58007264", "text": "login(email,password) {\n this.emailInput.type(email)\n this.passwordInput.type(password)\n this.submitButton.click()\n }", "title": "" }, { "docid": "b1df77e12df7c9bc34e1402180b43a06", "score": "0.5792315", "text": "function loginWithUserpass() {\n localStorage.setItem(\"AUTH_STRATEGY\", \"USERPASS\");\n const currentUser = {\n account: account,\n username: username,\n password: password,\n };\n\n const accountList = JSON.parse(localStorage.getItem(\"Accounts\"));\n const servers = JSON.parse(localStorage.getItem(\"servers\"));\n const certlocation = localStorage.getItem(\"usercert\");\n setLoading(true);\n axios\n .post(\"/login/userpass\", {\n certlocation,\n currentUser,\n accountList,\n servers,\n headers: {\n \"Content-Type\": \"application/json\",\n },\n withCredentials: true,\n })\n .then((response) => {\n setLoading(loading ? false : null);\n if (response.status === 200) {\n //Setting the AUTH Token\n const auth = authTokensPresent();\n setAuthtoken(auth);\n saveUser(account, username, password);\n updateStatus(200);\n setTimeout(() => setLoggedin(true), 2000);\n\n //Sending Server Status Notification\n dispatchServerStatus(dispatch)\n }\n })\n .catch((error) => {\n setLoading(loading ? false : null);\n const errorcode = Number(error.toString().split(\" \").pop());\n if (errorcode === 401) {\n updateStatus(401);\n } else if (errorcode === 500) {\n updateStatus(500);\n } else console.log(error);\n });\n }", "title": "" }, { "docid": "20efa7b423322701b57ae9ceae049b71", "score": "0.57860947", "text": "function LoginAction() {\n if(username === \"\" || password === \"\" || username == null || password == null){\n setLogin(\"* fields are requerd!\");\n }else {\n fetch('/user/login', {\n method: 'POST',\n body: JSON.stringify({\n username: username,\n password: password\n }),\n headers: {\n 'Content-Type': 'application/json'\n }\n }).then(response =>\n response.json()).then((data) => {\n if(data.login === 1){\n setLogin(\"Incorrect username or password!\");\n } else{\n user.setCurrentUser({firstName: data.firstName, lastName: data.lastName, image: data.photo});\n }; \n });\n };\n }", "title": "" }, { "docid": "649aadf621c45de5a95ec82bbe7e0dc4", "score": "0.5776971", "text": "function authenticateAccount() {\n if (server === undefined) {\n // server receives account access token\n server = http.createServer();\n server.on('request', (req, res) => {\n if (req.url.substring(1, 11) == 'catchtoken') {\n var user = parseQueryString(req.url.split('?')[1]);\n addUser(user['account_username'], user['access_token']);\n server.close();\n } else {\n res.end('<html><head><title>Authorisation Successful</title></head><body>' +\n '<h1>Authorisation Successful</h1><p>You can close this window</p>' +\n '<script>for(var m,params={},queryString=location.hash.substring(1),regex=/([^&=]+)=([^&]*)/g;' +\n 'm=regex.exec(queryString);)params[decodeURIComponent(m[1])]=decodeURIComponent(m[2]);' +\n 'var req=new XMLHttpRequest;req.open(\"GET\",\"http://\"+window.location.host+\"/catchtoken?\"' +\n '+queryString,!0),req.onreadystatechange=function(e){4==req.readyState&&200==req.status&&' +\n '(window.location=params.state)},req.send(null);</script></body></html>');\n }\n });\n server.listen(PORT, HOSTNAME);\n }\n opn('--app=' + getAuthenticationUrl(), {app: ['chrome', '--incognito']});\n}", "title": "" }, { "docid": "ffe4eb1031ed71ad38a0f86bd62d30f5", "score": "0.5776381", "text": "function log(){\n let username = document.getElementById('Username').value;\n let password = document.getElementById('Password').value;\n //getBalance(username,password);\n login(username,password);\n}", "title": "" }, { "docid": "3b2535a40789cd15c8962958aece1b2b", "score": "0.57760704", "text": "function login(email, password) {\n cy.get('input.email')\n .type(email)\n .should('have.value', email)\n cy.get('input.password')\n .type(password)\n .type('{enter}')\n cy.contains(email)\n cy.contains('Dashboard')\n cy.contains('Login to Wordsmith')\n .should('not.exist')\n}", "title": "" }, { "docid": "cc4cbb3b66f1334380463a9640462875", "score": "0.57706857", "text": "function handleLogin() {\n authClient.signIn();\n}", "title": "" }, { "docid": "5b66b58af712b13fe4790b7c722d439b", "score": "0.5763128", "text": "function login() {\n\n\t/* Useful URLS:\n\tLogin: http://myneu.neu.edu/cp/home/displaylogin\n\tContent: render.userLayoutRootNode.uP\n\tLogged out: jsp/misc/timedout2.jsp\n\tTransition page: http://myneu.neu.edu/cp/home/logout\n\t*/\t\n\t\n\t/* LOGIN FORM\n \tUSING SCRIPT FROM \"MyNEU PROPER LOGIN v0.6\" BY brainonfire.net */\n\n var uuid = /document\\.cplogin\\.uuid\\.value=\"([0-9a-f-]{36})\";/.exec(document.getElementsByTagName('head')[0].innerHTML)[1];\n\n var submitTo = document.getElementsByName('cplogin')[0].action;\n var submitTo_safe = submitTo.replace(/\"/g, '&quot;');\n var properForm =\n '<form action=\"%FormAction%\" method=\"post\" id=\"loginform\" onSubmit=\"showUsername()\"> \\\n <input type=\"text\" name=\"user\" id=\"username\" value=\"\" placeholder=\"MyNEU Username\" style=\"width: 92%; font-size: 18px; margin-bottom: 5px;\"/><br> \\\n <input type=\"password\" name=\"pass\" placeholder=\"Password\" style=\"width: 92%; font-size: 18px;\"/><br> \\\n <input type=\"hidden\" name=\"uuid\" value=\"%UUID%\" /> \\\n <button style=\"width:100%; font-size: 18px; margin-top:20px;\">Login</button> \\\n </form>'.replace('%FormAction%', submitTo_safe).replace('%UUID%', uuid);\n\n document.body.innerHTML = properForm;\n}", "title": "" } ]
3ab212d67275632838c26facaff8cace
Removes all keyvalue entries from the map.
[ { "docid": "a1c16153d9285b507b13d1c4bf2b381b", "score": "0.0", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}", "title": "" } ]
[ { "docid": "574d77f7913e6848e941f6545f0cc50c", "score": "0.6668894", "text": "clear() {\n\t\tthis.keys().forEach((key) => {\n\t\t\tkey = this.serializeKey(key);\n\t\t\tthis._delete(key);\n\t\t});\n\t}", "title": "" }, { "docid": "66a250691085b70196d7eb7792bc8f97", "score": "0.66167337", "text": "evictAll() {\n const cb = this.evictionCallback;\n if (cb !== undefined) {\n this.forEach((value, key) => cb(key, value));\n }\n this.clear();\n }", "title": "" }, { "docid": "66a250691085b70196d7eb7792bc8f97", "score": "0.66167337", "text": "evictAll() {\n const cb = this.evictionCallback;\n if (cb !== undefined) {\n this.forEach((value, key) => cb(key, value));\n }\n this.clear();\n }", "title": "" }, { "docid": "a77e4b9f1adb726c9d5e9feec6bd73c6", "score": "0.6538058", "text": "clear()\n {\n this._map.clear();\n }", "title": "" }, { "docid": "e21bedecef4a83db2142a1b2b8b81a9c", "score": "0.64692056", "text": "function resetValueMap() {\n valueMap = {};\n}", "title": "" }, { "docid": "e5257372d8d180e5ae248423744a497b", "score": "0.6465558", "text": "clear() {\n this.m_map.clear();\n }", "title": "" }, { "docid": "e52494ef774782eda67d04a8b9af5dd3", "score": "0.6458515", "text": "clear() {\n\t\tif (this[ON_REMOVE] && this[LRU_LIST]) {\n\t\t\tthis[LRU_LIST].forEach(hit => {\n\t\t\t\tthis[ON_REMOVE](hit.value, hit.key);\n\t\t\t});\n\t\t}\n\t\tthis[CACHE] = new Map();\n\t\tthis[LRU_LIST] = new LinkedList();\n\t\tthis[LENGTH] = 0;\n\t}", "title": "" }, { "docid": "54dcd4a97cad7661066cada716c0c579", "score": "0.64032316", "text": "clear() {\n this._map.clear();\n }", "title": "" }, { "docid": "3f21bc1c4adf1a52f703e306eb2476f6", "score": "0.639408", "text": "clear() {\n this.m_map.clear();\n }", "title": "" }, { "docid": "6f4ad25862f3079caea1d0c1cb10cb0f", "score": "0.63074595", "text": "clean() {\n for (const key in this._data) {\n this.delete(key);\n }\n }", "title": "" }, { "docid": "7a6134218067b617cdd8cfa10aaf3025", "score": "0.62582785", "text": "function mapClear(){this.__data__={'hash':new Hash(),'map':Map?new Map():[],'string':new Hash()};}", "title": "" }, { "docid": "e737e85559e6fa15ad7c156e9abb5b6f", "score": "0.624881", "text": "function removeAll() {\n\teventMap = {};\n}", "title": "" }, { "docid": "23881fa2f9bf59ca701658fdcbce19ed", "score": "0.6247299", "text": "function remove_all_key_cells() {\n\tfor (n in nodes) {\n\t\tfor (k in k_store) {\n\t\t\tremove_key_cell(n, k);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "5009edd161fca6726caf92268f708f31", "score": "0.617115", "text": "function mapClear() {\n this.__data__ = { 'hash': new Hash, 'map': Map ? new Map : [], 'string': new Hash };\n }", "title": "" }, { "docid": "3608b575d5617142faefd31f6f9fa1bc", "score": "0.6166302", "text": "function mapClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': Map ? new Map : [],\n\t 'string': new Hash\n\t };\n\t }", "title": "" }, { "docid": "0fb2e4272ed8fd4a92b30e0915e9da18", "score": "0.6163354", "text": "function removeAt(map, key, value) {\n // if (!map.has(key)) return\n var set = map.get(key);\n\n var index = set.indexOf(value);\n /*if (index > -1) */\n set.splice(index, 1);\n\n // if the set is empty, remove it from the WeakMap\n if (!set.length) map.delete(key)\n\n }", "title": "" }, { "docid": "5c616e8538914701f6970daaf8de8021", "score": "0.6161068", "text": "function mapClear() {\n\t this.__data__ = { 'hash': new Hash, 'map': Map ? new Map : [], 'string': new Hash };\n\t }", "title": "" }, { "docid": "5c616e8538914701f6970daaf8de8021", "score": "0.6161068", "text": "function mapClear() {\n\t this.__data__ = { 'hash': new Hash, 'map': Map ? new Map : [], 'string': new Hash };\n\t }", "title": "" }, { "docid": "4d5c2a4635390609e98faafdc516474d", "score": "0.614778", "text": "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "title": "" }, { "docid": "4d5c2a4635390609e98faafdc516474d", "score": "0.614778", "text": "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "title": "" }, { "docid": "7b4ca86f010d0f26acad156fbc5462b1", "score": "0.6114896", "text": "function mapClear() {\n this.__data__ = { 'hash': new Hash, 'map': Map ? new Map : [], 'string': new Hash };\n }", "title": "" }, { "docid": "3eea86690b18488117e6437f5f4a53e3", "score": "0.6107819", "text": "function mapClear() {\n\t this.__data__ = { 'hash': new Hash, 'map': Map ? new Map : [], 'string': new Hash };\n\t}", "title": "" }, { "docid": "3eea86690b18488117e6437f5f4a53e3", "score": "0.6107819", "text": "function mapClear() {\n\t this.__data__ = { 'hash': new Hash, 'map': Map ? new Map : [], 'string': new Hash };\n\t}", "title": "" }, { "docid": "2ffb2927052dfe95c334271bdac0fec2", "score": "0.61020905", "text": "function mapClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': Map ? new Map : [],\n\t 'string': new Hash\n\t };\n\t}", "title": "" }, { "docid": "0b2519234482eb79af004e512c58d451", "score": "0.60889775", "text": "function clear() {\n clearInput();\n setKeyValuePairs({});\n }", "title": "" }, { "docid": "7aeae3189236c4c1ab6fb508f368c5bf", "score": "0.60597056", "text": "function mapClear() {\n this.__data__ = {\n 'hash': new Hash(),\n 'map': Map ? new Map() : [],\n 'string': new Hash()\n };\n}", "title": "" }, { "docid": "d25822dcdd30865dcb863277e362ece1", "score": "0.60313183", "text": "clear() {\n this.entries = []\n }", "title": "" }, { "docid": "83c7e7b35b6f37e30252cf7260393933", "score": "0.60264283", "text": "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n}", "title": "" }, { "docid": "83c7e7b35b6f37e30252cf7260393933", "score": "0.60264283", "text": "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n}", "title": "" }, { "docid": "83c7e7b35b6f37e30252cf7260393933", "score": "0.60264283", "text": "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n}", "title": "" }, { "docid": "9a6b4c86e3db5c4bc931cc8ed7169794", "score": "0.6007952", "text": "removeAllMarkers(){\r\n\r\n for(var value of this.markers.entries()){\r\n this.removeMarkerFromMap(value[1]);\r\n }\r\n this.markers.clear();\r\n }", "title": "" }, { "docid": "853c02a2ac7edfe89e170a50166f8841", "score": "0.59661686", "text": "remove(key) {\r\n if (this.map.has(key)) {\r\n this.map.delete(key);\r\n }\r\n }", "title": "" }, { "docid": "5eea81a4a9b710e4a2515e892cd5484b", "score": "0.58762616", "text": "flush() {\n const now = currentTime()\n\n for (const [key, value] of this.map) {\n if (value.ttl < now) {\n this.delete(key)\n }\n }\n }", "title": "" }, { "docid": "9a750854727cc615c47d3d8dfc0935a7", "score": "0.58555955", "text": "function clear() {\n for(var key in this.datastore) {\n delete this.datastore[key];\n }\n}", "title": "" }, { "docid": "676caf4729828e7ec2aacb0ecd70d147", "score": "0.5847903", "text": "function mapCacheClear(){this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "676caf4729828e7ec2aacb0ecd70d147", "score": "0.5847903", "text": "function mapCacheClear(){this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "676caf4729828e7ec2aacb0ecd70d147", "score": "0.5847903", "text": "function mapCacheClear(){this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "b432ba9ac58cfce9754416c3faa503ea", "score": "0.5834562", "text": "function setAllToFalse() {\n\t\tfor(var i = 0; i < key_map.length; i++) {\n\t\t\tkey_map[i] = false;\n\t\t}\n\t}", "title": "" }, { "docid": "2a597bf95d26ba0eeb92cb7361c29fb7", "score": "0.58320534", "text": "clear() {\n this._map = Object.create(null);\n if (this._waitingAll.isPending) {\n this._checkAllFulfilled();\n }\n }", "title": "" }, { "docid": "27a05ad2799dcfa0451753226c795620", "score": "0.58179295", "text": "function clearAllMap(callback){\n\tcallback();\n}", "title": "" }, { "docid": "c4ade65343c6400ad50cd0dfb28d8f66", "score": "0.57960576", "text": "function mapCacheClear(){this.size=0;this.__data__={\"hash\":new Hash,\"map\":new(Map||ListCache),\"string\":new Hash}}", "title": "" }, { "docid": "2fae83af1351f2a22a159b8573a6fa5a", "score": "0.57794845", "text": "clear() {\n this.m_optionsMap.forEach(option => {\n option.set(undefined, \"\");\n });\n }", "title": "" }, { "docid": "2fae83af1351f2a22a159b8573a6fa5a", "score": "0.57794845", "text": "clear() {\n this.m_optionsMap.forEach(option => {\n option.set(undefined, \"\");\n });\n }", "title": "" }, { "docid": "8c1958a00cd25842126372a1bf845fb3", "score": "0.5765627", "text": "function removeEmpty(entry) {\n var key;\n for (key in entry) {\n if (entry.hasOwnProperty(key)) {\n //Removes anything with length 0\n if (entry[key].length === 0) {\n delete entry[key];\n }\n }\n }\n }", "title": "" }, { "docid": "55413923fad289e5a8f7f843c7d4d5f0", "score": "0.57626903", "text": "function clean() {\n try {\n // Array of all keys\n var keys = $.jStorage.index();\n\n // Loop keys, deleting each one\n keys.forEach(key => {\n if (key) {\n colorTrace('Clean Key - \"' + key + '\".', 'purple');\n\n var value = getKeyValue(key);\n\n colorTrace('\\n**** Found key:value pair -> {' + key + ':' + value + '} ****', 'green');\n colorTrace('Cleaning...', 'purple');\n\n $.jStorage.deleteKey(key);\n colorTrace('**** Key \"' + key + '\" was cleaned ****', 'green');\n }\n });\n\n colorTrace('\\n**** Finished Cleaning ****', 'green');\n\n } catch (error) {\n colorTrace('\\n**** ERROR - cleaning ****', 'red');\n console.log(error);\n }\n}", "title": "" }, { "docid": "462c4ac4d0f58238732f7faaf7c76590", "score": "0.5759227", "text": "remove(key) {\r\n return new SortedMap(this.comparator_, this.root_\r\n .remove(key, this.comparator_)\r\n .copy(null, null, LLRBNode.BLACK, null, null));\r\n }", "title": "" }, { "docid": "3ba90d4fb1f4d705f7d9a64cc4c61cfd", "score": "0.5737585", "text": "deleteByKey(key) {\n this.map.delete(key);\n }", "title": "" }, { "docid": "ccd3251d72d8d3dc53911237593db354", "score": "0.5728074", "text": "function cleanMap() {\n\tvar date = new Date();\n\tfor(var entry of musicians.entries()) {\n\t\tif(date - entry[1].lastSeen > 5000) {\n\t\t\tmusicians.delete(entry[0]);\n\t\t}\n\t}\n\tsetTimeout(cleanMap, 1000);\n}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "0189844f4b12a39ba6748bf565b0aac9", "score": "0.572171", "text": "clear() {\n this.m_referenceMap.clear();\n this.m_sortedGroupStates = undefined;\n this.m_textMap.clear();\n }", "title": "" }, { "docid": "0189844f4b12a39ba6748bf565b0aac9", "score": "0.572171", "text": "clear() {\n this.m_referenceMap.clear();\n this.m_sortedGroupStates = undefined;\n this.m_textMap.clear();\n }", "title": "" }, { "docid": "99cbfae56b8bee89650d3b33d6bbd45e", "score": "0.5719052", "text": "clear (key) {\n if (!key) {\n this._data = []\n return\n }\n _.remove(this._data, item => item.key === key)\n }", "title": "" }, { "docid": "9315d4b174dcbeffb03e5bf67e56b213", "score": "0.57040244", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new _Hash,\n 'map': new (_Map || _ListCache),\n 'string': new _Hash\n };\n }", "title": "" }, { "docid": "9315d4b174dcbeffb03e5bf67e56b213", "score": "0.57040244", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new _Hash,\n 'map': new (_Map || _ListCache),\n 'string': new _Hash\n };\n }", "title": "" }, { "docid": "96dbd6871f2d1622b7b01ba8f7ac8d1c", "score": "0.56992704", "text": "function mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map$1 || ListCache)(),\n 'string': new Hash()\n };\n }", "title": "" }, { "docid": "b844a685caae568313221056784365d8", "score": "0.56842065", "text": "function mapCacheClear() {\n\t\t\tthis.size = 0;\n\t\t\tthis.__data__ = {\n\t\t\t\t'hash': new Hash,\n\t\t\t\t'map': new (Map || ListCache),\n\t\t\t\t'string': new Hash\n\t\t\t};\n\t\t}", "title": "" }, { "docid": "b844a685caae568313221056784365d8", "score": "0.56842065", "text": "function mapCacheClear() {\n\t\t\tthis.size = 0;\n\t\t\tthis.__data__ = {\n\t\t\t\t'hash': new Hash,\n\t\t\t\t'map': new (Map || ListCache),\n\t\t\t\t'string': new Hash\n\t\t\t};\n\t\t}", "title": "" }, { "docid": "f5766689452bf070810b6a155c830027", "score": "0.5683082", "text": "clear() {\n this.m_newest = this.m_oldest = null;\n this.m_size = 0;\n this.m_map.clear();\n }", "title": "" }, { "docid": "f5766689452bf070810b6a155c830027", "score": "0.5683082", "text": "clear() {\n this.m_newest = this.m_oldest = null;\n this.m_size = 0;\n this.m_map.clear();\n }", "title": "" }, { "docid": "e9e1341c2eae1e68f1aba8da71a0ccd2", "score": "0.5673945", "text": "function mapCacheClear() {\n\t this.size = 0;\n\t this.__data__ = {\n\t 'hash': new _Hash,\n\t 'map': new (_Map || _ListCache),\n\t 'string': new _Hash\n\t };\n\t}", "title": "" }, { "docid": "320a0608d07e332dc78f7f63b4462331", "score": "0.56737125", "text": "function cleanAllAction()\n{\n\tvar mapLength = m_mapindex.length;\n\tfor(var tempcnt = 0 ; tempcnt < mapLength ; ++tempcnt)\n\t{\n\t\tfor(var key in m_mapindex[tempcnt]){\n\t\t\tvar divCon = document.getElementById(\"div_\"+key);\n\t\t\tif (divCon != null)\n\t\t\t\tdivCon.parentNode.removeChild(divCon);\n\t\t}\n\t\tm_mapindex[tempcnt]= new Array();\n\t}\n}", "title": "" }, { "docid": "8b3ae011b83a8d6ab25b7ed437306025", "score": "0.5673529", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map$1 || ListCache),\n 'string': new Hash\n };\n }", "title": "" }, { "docid": "d411910107bcc8339ee37f38c6496705", "score": "0.5669462", "text": "function mapCacheClear() {\n\t this.__data__ = {\n\t 'hash': new Hash(),\n\t 'map': new (Map || ListCache)(),\n\t 'string': new Hash()\n\t };\n\t }", "title": "" }, { "docid": "2f756ca886577e33e84679bdba14337b", "score": "0.56656694", "text": "function mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n }", "title": "" }, { "docid": "2f756ca886577e33e84679bdba14337b", "score": "0.56656694", "text": "function mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n }", "title": "" }, { "docid": "2f756ca886577e33e84679bdba14337b", "score": "0.56656694", "text": "function mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n }", "title": "" }, { "docid": "e96719053f8be79e6070b60533c3011e", "score": "0.5664027", "text": "function clear() {\n maps = {};\n defers = {};\n }", "title": "" }, { "docid": "7390261772898beaf5df2586321c0709", "score": "0.5659265", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n }", "title": "" }, { "docid": "7390261772898beaf5df2586321c0709", "score": "0.5659265", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n }", "title": "" }, { "docid": "7390261772898beaf5df2586321c0709", "score": "0.5659265", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n }", "title": "" }, { "docid": "7390261772898beaf5df2586321c0709", "score": "0.5659265", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n }", "title": "" }, { "docid": "7390261772898beaf5df2586321c0709", "score": "0.5659265", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n }", "title": "" }, { "docid": "52c87104e35da88f2b20fc9ed344feae", "score": "0.5655427", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new _Hash,\n 'map': new (_Map || _ListCache),\n 'string': new _Hash\n };\n }", "title": "" }, { "docid": "9fb45b899d13e63b3669a916305c67f3", "score": "0.5654435", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map$1 || ListCache)(),\n 'string': new Hash()\n };\n }", "title": "" }, { "docid": "82b336f62b46a7a52a7f754692eec330", "score": "0.5652512", "text": "function removeAllMarkers() {\n removeAllMarkersFromMap();\n removeAllMarkersFromArray();\n}", "title": "" }, { "docid": "f2c1fd0f22638ccd83c11d88b1fa9a08", "score": "0.5648981", "text": "function mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n }", "title": "" }, { "docid": "57fb9020dbc287bdbca45e41f7481cab", "score": "0.56462026", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map$2 || ListCache)(),\n 'string': new Hash()\n };\n }", "title": "" }, { "docid": "83fd0a87e4f60f22ec46107e4f3704e8", "score": "0.5641935", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n }", "title": "" }, { "docid": "83fd0a87e4f60f22ec46107e4f3704e8", "score": "0.5641935", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n }", "title": "" }, { "docid": "83fd0a87e4f60f22ec46107e4f3704e8", "score": "0.5641935", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n }", "title": "" }, { "docid": "a2a19b2d31042c9a50549acecc377908", "score": "0.5639514", "text": "function mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n }", "title": "" }, { "docid": "a2a19b2d31042c9a50549acecc377908", "score": "0.5639514", "text": "function mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n }", "title": "" }, { "docid": "b48cfdccb0e598d0e693a9d98e79408a", "score": "0.5635092", "text": "clear() {\n console.log('clear map', this.COMMANDS, this.COMMANDS.clear);\n this.sendCommand(this.COMMANDS.clear);\n }", "title": "" }, { "docid": "cb2948cc2f7149213594175680abb04a", "score": "0.5634898", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n }", "title": "" } ]
80cae9ad7cb13b53a865b9b8d72f7082
============================================== Mostrar todos los rankings ==============================================
[ { "docid": "101b81a1d525c074772baf38f6591971", "score": "0.65028936", "text": "async function getRankings(req, res) {\n try {\n const rankings = await Ranking.findAll();\n successMsg(res, 200, 'correcto', rankings)\n } catch (error) {\n errorMsg(res, 500, 'Ha ocurrido un error', error);\n }\n}", "title": "" } ]
[ { "docid": "1dbba026345c68860d7722a33127a75d", "score": "0.7515651", "text": "function getRank(){\r\n let url=\"https://blooming-garden-19866.herokuapp.com\";\r\n fetch(url)\r\n\t\t\t\t.then(checkStatus)\r\n\t\t\t\t.then(function(responseText) {\r\n let json = JSON.parse(responseText)[\"rank\"];\r\n let ol = document.getElementById(\"rankList\");\r\n ol.innerHTML = \"\";\r\n let usedName = [];\r\n let max = 10;\r\n for(let i = 0; i < json.length; i++){\r\n if (max === 0){\r\n break;\r\n }\r\n let li = document.createElement(\"li\");\r\n li.className = \"rankList\";\r\n \r\n if (usedName.indexOf(json[i][0]) === -1 && json[i][0] != \"\"){\r\n usedName.push(json[i][0]);\r\n let name = json[i][0] + \" ;\" + json[i][1] + \"s\";\r\n li.innerHTML = name;\r\n ol.appendChild(li);\r\n max--;\r\n }\r\n\r\n }\r\n let rank = document.getElementById(\"rank\");\r\n \r\n \r\n rank.appendChild(ol);\r\n \r\n });\r\n }", "title": "" }, { "docid": "291cab7c5625422b27693816bee98d1a", "score": "0.68471855", "text": "async function getRanks() {\n var result = null;\n var ranks = null;\n if (!selectedEvent?.value?.code.includes(\"PRACTICE\")) {\n result = await httpClient.get(`${selectedYear?.value}/rankings/${selectedEvent?.value.code}`);\n ranks = await result.json();\n } else if (selectedEvent?.value?.code === \"PRACTICE1\") {\n ranks = { rankings: _.cloneDeep(training.ranks.partial) };\n } else {\n ranks = { rankings: _.cloneDeep(training.ranks.final) };\n }\n\n if (typeof ranks.Rankings === \"undefined\") {\n ranks.ranks = ranks.rankings;\n delete ranks.rankings;\n } else {\n ranks.ranks = ranks.Rankings;\n delete ranks.Rankings;\n }\n\n if (typeof ranks.ranks.Rankings !== \"undefined\") {\n ranks.ranks = ranks.ranks.Rankings;\n delete ranks.ranks.Rankings;\n } else {\n ranks.ranks = ranks.ranks.rankings;\n delete ranks.ranks.rankings;\n }\n ranks.lastModified = ranks.headers ? moment(ranks?.headers[\"last-modified\"]) : moment();\n ranks.lastUpdate = moment();\n setRankings(ranks);\n }", "title": "" }, { "docid": "c3b0d9d408b03fdc3ec4a9254e50ed8b", "score": "0.6746318", "text": "function fillRanking() {\n let dinamicRank = '<thead><th>Posición</th><th>Nombre</th><th>Puntuación</th></thead>';\n scoring.sort(function (a, b) { return b.points - a.points });\n for (let i = 0; i < scoring.length; i++) {\n dinamicRank += `<tr><td>${i + 1}</td><td>${scoring[i].name}</td><td>${scoring[i].points}</td></tr>`;\n }\n // document.getElementById('rankTable').append(dinamicRank);\n document.getElementById('rankTable').innerHTML = dinamicRank;\n}", "title": "" }, { "docid": "e95f5a2d141d6d56ecd8d744e3d0fb92", "score": "0.67082316", "text": "function increaseRankBy(n){\n const x = document.getElementsByClassName('ranked-list');\n\n for (let i = 0; i < x.length; i ++){\n x[i].innerHTML = (i + n).toString()\n };\n }", "title": "" }, { "docid": "ed0aadcc6d4d885ff510a21b1834dbe0", "score": "0.6669495", "text": "getRank() {\r\n var points = this.state.authUser.points;\r\n var tmp_rank = \"\";\r\n var index = 1;\r\n if (points < 125) {\r\n tmp_rank = \"Private\";\r\n index = 1;\r\n }\r\n else if (points < 225) {\r\n tmp_rank = \"Private First Class\";\r\n index = 2;\r\n }\r\n else if (points < 335) {\r\n tmp_rank = \"Specialist\";\r\n index = 3;\r\n }\r\n else if (points < 450) {\r\n tmp_rank = \"Corporal\";\r\n index = 4;\r\n }\r\n else if (points < 570) {\r\n tmp_rank = \"Sergeant\";\r\n index = 5;\r\n }\r\n else if (points < 690) {\r\n tmp_rank = \"Staff Sergeant\";\r\n index = 6;\r\n }\r\n else if (points < 820) {\r\n tmp_rank = \"Sergeant First Class\";\r\n index = 7;\r\n }\r\n else if (points < 960) {\r\n tmp_rank = \"Master Sergeant\";\r\n index = 8;\r\n }\r\n else if (points < 1110) {\r\n tmp_rank = \"First Sergeant\";\r\n index = 9;\r\n }\r\n else if (points < 1270) {\r\n tmp_rank = \"Sergeant Major\";\r\n index = 10;\r\n }\r\n else if (points < 1440) {\r\n tmp_rank = \"Command Sergeant Major\";\r\n index = 11;\r\n }\r\n else if (points < 1640) {\r\n tmp_rank = \"Sergeant Major of the Army\";\r\n index = 12;\r\n }\r\n else if (points < 1840) {\r\n tmp_rank = \"Second Lieutenant\";\r\n index = 13;\r\n }\r\n else if (points < 2090) {\r\n tmp_rank = \"First Lieutenant\";\r\n index = 14;\r\n }\r\n else if (points < 2340) {\r\n tmp_rank = \"Captain\";\r\n index = 15;\r\n }\r\n else if (points < 2615) {\r\n tmp_rank = \"Major\";\r\n index = 16;\r\n }\r\n else if (points < 2890) {\r\n tmp_rank = \"Lieutenant Colonel\";\r\n index = 17;\r\n }\r\n else if (points < 3190) {\r\n tmp_rank = \"Colonel\";\r\n index = 18;\r\n }\r\n else if (points < 3490) {\r\n tmp_rank = \"Brigadier General\";\r\n index = 19;\r\n }\r\n else if (points < 3790) {\r\n tmp_rank = \"Major General\";\r\n index = 20;\r\n }\r\n else if (points < 4115) {\r\n tmp_rank = \"Lieutenant General\";\r\n index = 21;\r\n }\r\n else if (points < 4500) {\r\n tmp_rank = \"General\";\r\n index = 22;\r\n }\r\n else {\r\n tmp_rank = \"General of the Army\";\r\n index = 23;\r\n }\r\n index--;\r\n this.setState({ rank: tmp_rank, rankindex: index })\r\n }", "title": "" }, { "docid": "52a0efd83a2a9065d87d717328eea379", "score": "0.6559418", "text": "function showRanking() {\n $(\"#player_score\").text(\"Your Score: \" + score);\n let topEasy = [];\n let topMedium = [];\n let topHard = [];\n let countEasy = 0;\n let countMedium = 0;\n let countHard = 0;\n let arr = JSON.parse(localStorage.getItem('User'));\n arr.sort(compare);\n for (i = 0; i < arr.length; i++) {\n if (arr[i].difficulty == \"easy\") {\n if (countEasy < 3) {\n topEasy[countEasy] = arr[i];\n countEasy++;\n }\n }\n if (arr[i].difficulty == \"medium\") {\n if (countMedium < 3) {\n topMedium[countMedium] = arr[i];\n countMedium++;\n }\n }\n if (arr[i].difficulty == \"hard\") {\n if (countHard < 3) {\n topHard[countHard] = arr[i];\n countHard++;\n }\n }\n }\n for (let i = 0; i < 3; i++) {\n if (topEasy[i] != undefined) {\n $(\"#rank\" + i + \"E\").text(topEasy[i].name + \" - Score: \" + topEasy[i].score);\n } else {\n $(\"#rank\" + i + \"E\").text(\"-\");\n }\n if (topMedium[i] != undefined) {\n $(\"#rank\" + i + \"M\").text(topMedium[i].name + \" - Score: \" + topMedium[i].score);\n } else {\n $(\"#rank\" + i + \"M\").text(\"-\");\n }\n if (topHard[i] != undefined) {\n $(\"#rank\" + i + \"H\").text(topHard[i].name + \" - Score: \" + topHard[i].score);\n } else {\n $(\"#rank\" + i + \"H\").text(\"-\");\n }\n }\n}", "title": "" }, { "docid": "803e0e7c94ecbd0656712927dcef0885", "score": "0.6524496", "text": "function index_movie_rank(data){\n var rank_li = '';\n var total = 0;\n var movie_arr = [];\n $.each(data.movie_list, function(i,movie){\n total += movie.count*1;\n movie_arr.push(movie);\n });\n $.each(movie_sort(movie_arr), function(i,movie){\n var count = movie.count;\n rank_li += '<li><a href=\"javascript:abb1.jquery.movie_detail('+movie.seq+')\"><em>'+(i+1)+'</em>'\n + '<span class=\"abb1_rank_grade\" style=\"background: url(resources/img/movie/grade_'+movie.grade+'.png);\"></span>'\n + '<span class=\"abb1_rank_moviename\">'+ movie.title +'</span>'\n + '</a>'\n + '<em>'+(count/total*100).toFixed(1)+'%</em>'\n + '</li>';\n });\n $('#rank_ul').html(rank_li);\n}", "title": "" }, { "docid": "840974c0163f3a26c2eaa4d3b258efad", "score": "0.6507893", "text": "function topFive() {\n let url = `https://memgame-server.herokuapp.com/top_five`\n fetch(url)\n .then((res) => res.json())\n .then((data) => {\n // console.log(data)\n let topfive = document.getElementById(\"topfive\")\n let rank = 1\n for(let i = 0; i < 5; i++) {\n let ranks = document.createElement(\"div\")\n ranks.className = \"ranks\"\n ranks.innerHTML += `<div>${rank} ${data[i].name} ${data[i].score}`\n rank++\n topfive.appendChild(ranks)\n }\n })\n}", "title": "" }, { "docid": "e1613fa0943d16364a6c54f9bd964b1a", "score": "0.6480352", "text": "function renderRankingList() {\n var groupData = groups.find(function (group) {\n return group.key === activeGroup;\n }).values;\n var max = d3.max(groupData, function (d) {\n return d.value;\n });\n var items = groupData\n .map(function (item) {\n return _objectSpread(\n _objectSpread({}, item),\n {},\n {\n value: item.value,\n percent: percentFormat(item.value / max),\n },\n );\n })\n .sort(function (a, b) {\n return b.value - a.value;\n });\n var container = $el.find(\".ranking\");\n\n // update the DOM children and animate to new states\n container.children().each(function (index, node) {\n var el = $(node);\n var item = items[index];\n el.find(\".ranking__primary\")\n .delay(100 * index)\n .animate(\n {\n opacity: 0,\n },\n 200,\n function () {\n $(this).text(item.primary);\n },\n )\n .animate(\n {\n opacity: 1,\n },\n 200,\n );\n el.find(\".ranking__secondary\")\n .delay(110 * index)\n .animate(\n {\n opacity: 0,\n },\n 200,\n function () {\n $(this).text(item.secondary);\n },\n )\n .animate(\n {\n opacity: 1,\n },\n 200,\n );\n el.find(\".ranking__bar-label\")\n .delay(200 + 120 * index)\n .animate(\n {\n opacity: 1,\n },\n 200,\n );\n el.find(\".ranking__bar-label span:first-child\")\n .delay(200 + 120 * index)\n .animate(\n {\n opacity: 1,\n },\n 200,\n function () {\n $(this).text(item.value);\n },\n );\n (index !== 0 || renderCount === 0) &&\n el\n .find(\".ranking__bar\")\n .delay(200 + 120 * index)\n .animate(\n {\n width: \"\".concat(item.percent),\n },\n 400,\n );\n });\n renderCount++;\n }", "title": "" }, { "docid": "1b034667fe3c84a91fac73a77e58b3e7", "score": "0.6463527", "text": "function increaseRankBy(n) {\n const ranks = document.getElementById('app').querySelectorAll('ul.ranked-list li');\n for (let i = 0; i < ranks.length; i++) {\n ranks[i].innerHTML = parseInt(ranks[i].innerHTML) + n;\n }\n}", "title": "" }, { "docid": "44b2cab929a315b0623bb693d438e33d", "score": "0.64157313", "text": "function createRankingList() {\n var groupData = groups.find(function (group) {\n return group.key === activeGroup;\n }).values;\n\n // first render, create the DOM stucture\n var container = $el.find(\".ranking\");\n var items = groupData.map(function (item) {\n return {\n value: null,\n primary: \"loading\",\n secondary: \"loading\",\n percent: \"0%\",\n };\n });\n items.map(itemTemplate).forEach(function (item) {\n container.append(item);\n });\n }", "title": "" }, { "docid": "3a6624a57828bb9777a477962fa7b4e9", "score": "0.64127934", "text": "function showTopRank(topRank, topCount)\n{\n var html = '';\n \n if (topCount == 1) {\n html += '<li id=\"2\">'\n + ' <p class=\"ranking\">2</p>'\n + ' <p class=\"name\">&nbsp;</p>'\n + ' <p class=\"pic\">'\n + ' <a target=\"_top\" href=\"http://mixi.jp/send_message.pl\"><img height=\"50\" width=\"50\" alt=\"\" src=\"' + UrlConfig.StaticUrl + '/apps/parking/img/invite.gif\"/></a>'\n + ' </p>'\n + ' <p class=\"plice\">&nbsp;</p>'; \n html += '</li>';\n }\n \n for (i = 0; i < topRank.length; i++) {\n var rankId = topCount-i;\n html += '<li id=\"' + rankId + '\">'\n + ' <p class=\"ranking\">' + rankId + '</p>'\n + ' <p class=\"name\"><a href=\"javascript:void(0);\" onclick=\"showChomeBoard(\\'' + topRank[i].uid + '\\')\" title=\"' + topRank[i].displayName + '\">' + topRank[i].displayName.unescapeHTML().truncate2(10).escapeHTML() + '</a></p>'\n + ' <p class=\"pic\">'\n + ' <a href=\"javascript:void(0);\" onclick=\"showChomeBoard(\\'' + topRank[i].uid + '\\')\" title=\"' + topRank[i].displayName + '\"><img height=\"50\" width=\"50\" alt=\"\" src=\"' + topRank[i].thumbnailUrl + '\"/></a>'\n + ' </p>'\n + ' <p class=\"plice\">' + topRank[i].comment_count + 'チョメ</p>';\n \n //check user is online\n /*if ( topRank[i].online == 1 && topRank[i].uid != $F('txtUid') ) {\n html += ' <p class=\"icon\">'\n + ' <img height=\"16\" width=\"16\" alt=\"\" src=\"' + UrlConfig.StaticUrl + '/apps/parking/img/icon/warning.gif\"/>'\n + ' </p>';\n }*/\n html += '</li>';\n \n }\n return html;\n}", "title": "" }, { "docid": "b4e28d1d5865532a863d67d63d9d2c61", "score": "0.6396085", "text": "function updatePlayersPanelRanks() {\n\n // To start, reset the rankedPlayers array\n rankedPlayers = [];\n\n // Copy each player to the new array\n for (var p in players) {\n\trankedPlayers.push(players[p]);\n }\n\n // Sort the array by score, highest score first\n rankedPlayers.sort(function(b,a) {\n\t return a.score-b.score;\n\t});\n\n // Now update the players panel\n for (var i in rankedPlayers) {\n\t// After the first player, we check to see if there is a tie and adjust rank accordingly.\n\tif (i > 0 && players[rankedPlayers[i-1].num].score == players[rankedPlayers[i].num].score) {\n\t players[rankedPlayers[i].num].rank = players[rankedPlayers[i-1].num].rank;\n\t} else { // Either this is the first player, or there was not tie.\n\t players[rankedPlayers[i].num].rank = i;\n\t}\n\n\t// Now update the rank display in the panel\n\tdocument.getElementById('p'+players[rankedPlayers[i].num].num+'PanelRank').innerHTML = parseInt(players[rankedPlayers[i].num].rank)+1;\n }\n\n}", "title": "" }, { "docid": "48f33d18112d6b17629ceb1c5d165ae0", "score": "0.63713115", "text": "function calcRank() {\n\t\t\tif (!vm.current) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar rank = 0;\n\t\t\tvar kack = [];\n\t\t\tangular.forEach(vm.data, function(item) {\n\t\t\t\titem[vm.structure.name] = parseFloat(item[vm.structure.name]);\n\t\t\t\titem['score'] = parseFloat(item[vm.structure.name]);\n\t\t\t});\n\t\t\t//vm.data = $filter('orderBy')(vm.data, 'score', 'iso', true);\n\t\t\trank = vm.data.indexOf(vm.current) + 1;\n\t\t\tvm.current[vm.structure.name + '_rank'] = rank;\n\t\t\tvm.circleOptions = {\n\t\t\t\tcolor: vm.structure.style.base_color || '#00ccaa',\n\t\t\t\tfield: vm.structure.name + '_rank',\n\t\t\t\tsize: vm.data.length\n\t\t\t};\n\n\t\t\treturn rank;\n\t\t}", "title": "" }, { "docid": "d57fdbda37f9e5ac1c278ca4d24aa364", "score": "0.6362464", "text": "getRanking() {\n let userNames = [];\n let wins = [];\n let draws = [];\n\n this.state.users.forEach(function (user) {\n userNames.push(user.username);\n wins.push(user.userStats.numberOfWinnings);\n draws.push(user.userStats.numberOfDraws);\n });\n\n const weightedWins = wins.map(function (x) {\n return x * 3;\n });\n\n const scores = weightedWins.map(function (wins, index) {\n return wins + draws[index];\n });\n\n const names_scores = Array.prototype.map.call(userNames, function (e, i) {\n return [e, scores[i]];\n })\n\n const ranking = names_scores.sort(function (i, j) {\n return j[1] - i[1];\n })\n\n return ranking;\n }", "title": "" }, { "docid": "2c8ad6d544f1ef2af9dd57bc070c0f59", "score": "0.63469994", "text": "function increaseRankBy(n) {\n var ranks = document.querySelector(`.ranked-list`).querySelectorAll(`li`)\n //what is the value of ranks? perhaps for loop is correct but ranks is wack\n for (let i = 0; i < ranks.length; i++) {\n ranks[i].innerHTML = (parseInt(ranks[i].innerHTML) + parseInt(n)).toString()\n }\n}", "title": "" }, { "docid": "f0b900e1eb8c754d4d2880a9946efa88", "score": "0.63291204", "text": "async function ranking(msg)\n{\n\tvar ranks = await DB.pool()\n\t\t.query(\t\"SELECT users.uid, users.username, users.nickname, rank, cupets.name AS cname, mupets.name AS mname, cpets.emote as cemote, mpets.emote as memote \" + \n\t\t\t\t\"FROM pet_settings \" +\n\t\t\t\t\"INNER JOIN users ON users.uid= pet_settings.uid \" +\n\t\t\t\t\"INNER JOIN user_pets AS cupets ON pet_settings.current=cupets.pid AND pet_settings.uid=cupets.uid \" +\n\t\t\t\t\"LEFT JOIN user_pets AS mupets ON pet_settings.main=mupets.pid AND pet_settings.uid=mupets.uid \" +\n\t\t\t\t\"INNER JOIN pets AS cpets ON pet_settings.current=cpets.pid \"+\n\t\t\t\t\"LEFT JOIN pets AS mpets ON pet_settings.main=mpets.pid \"+\n\t\t\t\t\"ORDER BY rank ASC\")\n\t\t.catch(err=>\n\t\t\t{\tCommons.errlog(new Error().stack+ Commons.pgerr(err), \n\t\t\t\t\"Failed to get the pet rankings from the database\");\n\t\t\t});\n\t\t\n\tmsg.channel.send(Embeds.rankingOfPets(ranks.rows, msg.author));\n\treturn;\t\n}", "title": "" }, { "docid": "9badf868661f7a9ddf27d20cf0dd901a", "score": "0.6324074", "text": "function ranklist_allRanked()\r\n{\r\n var whitespace = new RegExp(\"\\\\s\", \"g\");\r\n var q9_count = 0;\r\n var q9data = \"\";\r\n $(\"#ranked_q9 li\").each(function(i, el){\r\n var p = $(el).text().toLowerCase().replace(whitespace, \"_\");\r\n q9data += p+\"=\"+$(el).index()+\",\";\r\n q9_count = q9_count + 1;\r\n });\r\n console.debug(q9data.slice(0, -1));\r\n $( document.getElementsByName( \"consent_opin_q9\")).val(q9data.slice(0, -1));\r\n\r\n var q10_count = 0;\r\n var q10data = \"\";\r\n $(\"#ranked_q10 li\").each(function(i, el){\r\n var p = $(el).text().toLowerCase().replace(whitespace, \"_\");\r\n q10data += p+\"=\"+$(el).index()+\",\";\r\n q10_count = q10_count + 1;\r\n });\r\n console.debug(q10data.slice(0, -1));\r\n $( document.getElementsByName( \"consent_opin_q10\")).val(q10data.slice(0, -1));\r\n\r\n console.debug(\"q10 has: \"+q10_count+\", q9 has: \"+q9_count);\r\n return q9_count == 12 && q10_count == 7;\r\n}", "title": "" }, { "docid": "9470e266ace2bf0651350607509fe842", "score": "0.6305822", "text": "function renderResults_Rank(response)\n{\n var responseObject = response.responseText.evalJSON();\n \n if (responseObject.rankStatus == 1) {\n var html = showRankInfo(responseObject.rankInfo, responseObject.count, 1);\n }\n else {\n var html = showRankInfo(responseObject.rankInfo, responseObject.count, 1);\n }\n $('ranking').innerHTML = html; \n \n var topRankHtml = showTopRank(responseObject.topRank, responseObject.topCount);\n $('topRank').innerHTML = topRankHtml;\n \n $('txtRankCount').value = responseObject.countArr.rankCount;\n $('txtAllCount').value = responseObject.countArr.allCount;\n $('txtRightCount').value = responseObject.countArr.rightCount;\n $('txtLeftCount').value = 0;\n $('ranking').setStyle({left: '0px'});\n $('loading').innerHTML = '';\n $('totalRanking').setStyle({display: ''});\n /*if (responseObject.countArr.rankCount < 8) {\n $('ranking').setStyle({left:(8-responseObject.countArr.rankCount)*58 + 'px'}); \n }*/\n}", "title": "" }, { "docid": "551e2d06254fed1bab22610b92b4ed02", "score": "0.6282882", "text": "function sendranking(){\n\tvar userId = $(\"#userId\").text();\n\tvar roomId = $(\"#roomId\").text();\n\tvar resultTime = parseFloat($(\"#resulttime\").val());\n\tvar rankCount = parseInt($(\"#rankCount\").val());\n\tuserId = \"565d957a575db0e4f23e25b6\";\n\troomId = \"565d957b575db0e4f33e25b6\";\n\tresultTime = 24;\n\trankCount = 0;\n\t$.ajax({\n\t\turl: \"http://ec2-52-192-125-118.ap-northeast-1.compute.amazonaws.com/citytori/api/ranks\",\n\t\tdata: {\n\t\t\tuserId: userId,\n\t\t\troomId: roomId,\n\t\t\tresultTime: resultTime,\n\t\t\trankCount: rankCount,\n\t\t},\n\t\tsuccess: function(json){\n\t\t\tvar arraySize = Object.keys(json.ranking).length;\n\t\t\tfor (var i = 0; i < arraySize; i++) {\n\t\t\t\tif(json.ranking[i].name == \"Mr. シティとり\"){\n\t\t\t\t\t$(\"#ranking\").append(\"<span id=\\\"myscore\\\">- 今回の成績 -<br>\" + (i + 1) + \"位</br>\" + json.ranking[i].name + \"</br>\" + json.ranking[i].score + \" 秒</br><HR></span>\");\n\t\t\t\t}else{\n\t\t\t\t\t$(\"#ranking\").append(\"<span>\" + (i + 1) + \"位</br>\" + json.ranking[i].name + \"</br>\" + json.ranking[i].score + \" 秒</br><HR></span>\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t$(\"#ranking\").append(\"<br>\");\n\n\t\t\tfor (var i=0; i < arraySize; i++){\n\t\t\t\tif(json.ranking[i].name == \"Mr. シティとり\"){\n\t\t\t\t\tv = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar v = i * 131 * $(\"#main_in\").width() / 1500;\n\t\t\t$(\"#rankingboard\").scrollTop(v);\n\t\t},\n\t\terror: function(){\n\t\tconsole.log(\"error\");\n\t\t}\n\t});\n}", "title": "" }, { "docid": "70550af10d67395b8698a2764c9d5fc7", "score": "0.62729275", "text": "function handleRanking (res) {\n\n DBpool.getConnection(function (err, conn) {\n if (err) {\n errorDeliver(res, 'Error on DB connection: ' + err);\n return;\n }\n\n var query = 'SELECT users.name as name, ranking.shots as shots';\n query += ' FROM ranking INNER JOIN users ON ranking.user = users.user_id';\n query += ' ORDER BY ranking.shots, ranking.created_at LIMIT 10';\n conn.query(query, function (err, rows) {\n if (err) {\n errorDeliver(res, 'Error on query the DB: ' + err);\n return;\n }\n\n conn.release();\n\n result = { ranking: rows };\n contentDeliver(res, result);\n }); \n }); \n}", "title": "" }, { "docid": "e73fe379e63bc3ea3e3cbdc764bca6ce", "score": "0.62557715", "text": "function setRank() {\n for(let i = 0; i < allStatsArray.length; i++) {\n if(allStatsArray[i].nick === userNickname) {\n userRank = (i+1);\n }\n }\n}", "title": "" }, { "docid": "6f111927262e63c96530597ed5c4dfd2", "score": "0.6228887", "text": "sortRanking(){\n xRank.sort(function(a ,b){\n if(a.total === b.total){\n return 0;\n }\n return a.total < b.total?1:-1;\n });\n }", "title": "" }, { "docid": "2bc22d31b3e5c39d364040c0de08b98a", "score": "0.62172645", "text": "function loadRank() {\n if (!localStorage.getItem(\"ranking\")) {\n for (var i = 0; i < defaultScore.length; i++) {\n const score = {\n username: defaultScore[i].name,\n guessCount: defaultScore[i].guesses,\n };\n ranks.push(score);\n ranks.sort(function (a, b) {\n return a.guessCount - b.guessCount;\n });\n }\n localStorage.ranking = JSON.stringify(ranks);\n }\n}", "title": "" }, { "docid": "2d9469230fe0c57ec359a46afc5fdec9", "score": "0.62135667", "text": "function increaseRankBy(n) {\n const rankedLists = document.querySelectorAll('.ranked-list');\n\n for (let i = 0; i < rankedLists.length; i++) {\n let children = rankedLists[i].children;\n\n for (let j = 0; j < children.length; j++) {\n children[j].innerHTML = parseInt(children[j].innerHTML) + n;\n };\n };\n}", "title": "" }, { "docid": "6662e0bf1fb67e9c0535797624769d82", "score": "0.6182471", "text": "function increaseRankBy(n) {\n const rankedLists = document.querySelectorAll('.ranked-list')\n\n for (let i = 0, len = rankedLists.length; i < len; i++) {\n let children = rankedLists[i].children\n\n for (let j = 0, k = children.length; j < k; j++) {\n children[j].innerHTML = parseInt(children[j].innerHTML) + n\n }\n }\n}", "title": "" }, { "docid": "213361204f181939138796c651a4384a", "score": "0.61778456", "text": "function increaseRankBy(n) {\n var rankedLists = document.querySelectorAll('.ranked-list')\n\n for (var i = 0; i < rankedLists.length; i++) {\n var children = rankedLists[i].children\n\n for (var j = 0; j < children.length; j++) {\n children[j].innerHTML = parseInt(children[j].innerHTML) + n;\n }\n }\n}", "title": "" }, { "docid": "5c4b50d8891d5be8796835d78ad3a257", "score": "0.6167698", "text": "function sortByRating(players) {\n players.sort(function(a, b){return b.rating - a.rating});\n let rank = 1;\n for (let r of players) {\n tab +=\n `<tr>\n <td>${rank}</td>\n <td>${r.firstName} ${r.lastName}</td>\n <td>${r.position}</td>\n <td>${r.team}</td>\n <td>${r.gamesPlayed}</td>\n <td>${r.minutes}</td>\n <td>${r.points}</td>\n <td>${r.assists}</td>\n <td>${r.rebounds}</td>\n <td>${r.threePointers}</td>\n <td>${r.blocks}</td>\n <td>${r.steals}</td>\n <td>${r.fgMade}</td>\n <td>${r.fgAttempts}</td>\n <td>${r.fgPercent}</td>\n <td>${r.ftMade}</td>\n <td>${r.ftAttempts}</td>\n <td>${r.ftPercent}</td>\n <td>${r.turnovers}</td>\n <td>${r.rating}</td>\n </tr>`;\n rank++;\n }\n\n document.getElementById(\"players\").innerHTML = tab;\n}", "title": "" }, { "docid": "e4c86872efe30b3a3ddd440a1827cfbb", "score": "0.6150243", "text": "function increaseRankBy(n) {\n\n const lis = document.querySelectorAll(`ul.ranked-list li`)\n\n for (let i = 0; i < lis.length; i++) {\n lis[i].innerHTML = parseInt(lis[i].innerHTML) + n\n }\n\n}", "title": "" }, { "docid": "61cee711b61b9293cc5dc7eb191371b6", "score": "0.613592", "text": "function showAllScores() {\n let savedRankList = JSON.parse(localStorage.getItem('scoreRank'));\n\n if (savedRankList !== null){\n scoreRank = savedRankList;\n }\n}", "title": "" }, { "docid": "8435673083ccfa2580529a4e1dc02d3a", "score": "0.6056014", "text": "function sortRanking() {\n rankingArray = [];\n\n for (var number in popularity) {\n rankingArray.push([number, popularity[number]]);\n }\n\n rankingArray.sort(function(a, b) {\n return b[1] - a[1];\n });\n}", "title": "" }, { "docid": "39050ebbd50fcefb810a76be8dc5a470", "score": "0.6050373", "text": "function increaseRankBy(n) {\n const rankedLists = document.querySelectorAll('.rankedLists')\n \n\n for (let i = 0, l = rankedLists.length; i < l; i++) {\n let children = rankedLists[i].children\n\n\n for ( let j = 0, k = children.length; j < k; j++ ) {\n children[ j ].innerHTML = parseInt( children[ j ].innerHTML ) + n\n }\n }\n}", "title": "" }, { "docid": "9d3e61d721ce0f8e1a547d34ccbebc06", "score": "0.60461134", "text": "deckRank () {\n return this.skaterOverall(this.props.skaterDeck[0])\n + this.skaterOverall(this.props.skaterDeck[1])\n + this.skaterOverall(this.props.skaterDeck[2])\n + this.skaterOverall(this.props.skaterDeck[3])\n + this.skaterOverall(this.props.skaterDeck[4])\n + this.skaterOverall(this.props.skaterDeck[5])\n }", "title": "" }, { "docid": "6bda44bd76867c239538c15f21043821", "score": "0.60293245", "text": "function rankFilms(lastRow) {\n sheet.getRange(1, numInfo+numJudges+1).setValue(\"Rank\");\n var rank = 1;\n var count = 0;\n var score = 0;\n for(var i = 1; i < lastRow; i++) {\n score = sheet.getRange(1+i, numInfo+numJudges).getValue();\n sheet.getRange(1+i, numInfo+numJudges).setValue(score);\n sheet.getRange(1+i, numInfo+numJudges+1).setValue(rank);\n if(score == sheet.getRange(2+i, numInfo+numJudges).getValue()) {\n count++;\n }\n else {\n rank += count + 1;\n count = 0;\n }\n }\n}", "title": "" }, { "docid": "cb3844a4bb2e5ab4bbdace5443d74636", "score": "0.59852725", "text": "function getRank(type) {\n return axios.get(rank,{\n params : {\n postType : type,\n postAction : 'views',\n pageSize : 10\n }\n });\n}", "title": "" }, { "docid": "746cf9ca5dbc1fc2a08e7acdca375f9d", "score": "0.5949283", "text": "Rank() {\n let bestRank = _.orderBy(this.pokerHands, 'rank', 'desc');\n //console.log(bestRank);\n return (bestRank[0] ? bestRank[0].rank : 0);\n }", "title": "" }, { "docid": "8791a17d2d3e815f133a7563ffe7eceb", "score": "0.59228396", "text": "function displayResults(){\n document.getElementById(\"resultFrank\").innerHTML = \"Frankenstein votes: \" + Math.floor(Frank/sum*100) + \"%\";\n document.getElementById(\"resultPumpkin\").innerHTML = \"Pumpkin votes: \" + Math.floor(Pump/sum*100) + \"%\";\n document.getElementById(\"resultGhost\").innerHTML = \"Ghost votes: \" + Math.floor(Gho/sum*100) + \"%\";\n document.getElementById(\"resultWaldo\").innerHTML = \"Where's Waldo votes: \" + Math.floor(Wal/sum*100) + \"%\";\n document.getElementById(\"resultTeddy\").innerHTML = \"Teddy Bear votes: \" + Math.floor(Ted/sum*100) + \"%\";\n }", "title": "" }, { "docid": "04739856793d3cb14d2de42fd65777cc", "score": "0.5907795", "text": "function rank(suburbList) {\n suburbList.map(subrub => (subrub.rank = suburbList.indexOf(subrub) + 1));\n}", "title": "" }, { "docid": "f47b841beb88a2fdb318558a16d55d23", "score": "0.5894297", "text": "function increaseRankBy(n){\n // we should use const to avoid our variable being changed.\n // however, doing so does not preclude the modification of inner elements.\n const rankedLists = document.querySelectorAll('.ranked-list');\n\n // rankedLists[i].children[j].innerHTML\n for(var i = 0; i < rankedLists.length; i++){\n for(var j = 0; j < rankedLists[i].children.length; j++){\n rankedLists[i].children[j].innerHTML = parseInt(rankedLists[i].children[j].innerHTML) + n;\n }\n }\n}", "title": "" }, { "docid": "0dad5e334a14171a8ac85111cd6fca17", "score": "0.5885291", "text": "function myScoreRank() {\n var total = 0;\n if (this.checkAnswer1() != \"c\") {\n }\n else {\n var total = total + 1;\n }\n if (this.checkAnswer2() != \"c\") {\n }\n else {\n var total = total + 1;\n }\n if (this.checkAnswer3() != \"b\") {\n }\n else {\n var total = total + 1;\n }\n if (this.checkAnswer4() != \"a\") {\n }\n else {\n var total = total + 1;\n }\n if (this.checkAnswer5() != \"a\") {\n }\n else {\n var total = total + 1;\n }\n if (this.checkAnswer6() != \"b\") {\n }\n else {\n var total = total + 1;\n }\n if (this.checkAnswer7() != \"b\") {\n }\n else {\n var total = total + 1;\n }\n if (this.checkAnswer8() != \"d\") {\n }\n else {\n var total = total + 1;\n }\n if (this.checkAnswer9() != \"c\") {\n }\n else {\n var total = total + 1;\n }\n if (this.checkAnswer10() != \"a\") {\n }\n else {\n var total = total + 1;\n }\n var total = total * 10;\n document.getElementById('scoreDisplay').innerHTML = \"Score: \" + total + \"%\";\n\n // compute ranking\n var ranking = total / 10;\n if (ranking < 6) {\n document.getElementById('rankDisplay').innerHTML = \"Rank: Beginner\"; //(Less than 6 correct answers)\n }\n else if (ranking < 9 && ranking > 5) {\n document.getElementById('rankDisplay').innerHTML = \"Rank: Novice\"; //(6-8 correct answers)\n }\n else if (ranking > 8) {\n document.getElementById('rankDisplay').innerHTML = \"Rank: Expert\"; //(8-10 correct answers)\n }\n else {\n document.getElementById('rankDisplay').innerHTML = \"Rank: \" + ranking;\n }\n }", "title": "" }, { "docid": "6b176edc7dd9d731bd0d1c91e639a570", "score": "0.58802617", "text": "function rankUpdater(string) {\n $(\"#ranking\").text(string);\n}", "title": "" }, { "docid": "92218edfdd8c5b7c73486754503504d1", "score": "0.5866522", "text": "function showSegRank() {\n\t// ensure bar axis is set\n\t\n\tshowAxis(xAxis_seg_rank, yAxis_seg_rank);\n\t\n\tg.selectAll('.bar_seg_rank')\n\t .transition()\n\t .duration(1000)\n\t .attr('r', function(d){\n\t\treturn Math.sqrt(d.count/3)*30;\n\t })\n\t .attr(\"cx\", function(d) {\n\t\treturn xChart_seg_rank(d.rank);\t\n\t })\n\t .attr(\"cy\", function (d, i) {\n\t\treturn yChart_seg_rank(d.label);\n\t })\n\t .attr('opacity', 0.8);\n\n\t\n\t\n }", "title": "" }, { "docid": "77c4951d2b175516754582575ffc0653", "score": "0.58495605", "text": "function showRanking() {\n if (ranking.style.visibility === 'hidden' || ranking.style.visibility === '') {\n fillRanking();\n circumSection.style.visibility = 'hidden'\n ranking.style.visibility = 'visible';\n startButton.disabled = true;\n startButton.className = 'disabled';\n abortButton.disabled = true;\n abortButton.className = 'disabled';\n rankButton.disabled = false;\n rankButton.className = 'button';\n rankButton.innerHTML = 'Ocultar Ranking'\n } else {\n ranking.style.visibility = 'hidden';\n circumSection.style.visibility = 'visible'\n startButton.disabled = false;\n startButton.className = 'button';\n abortButton.disabled = true;\n abortButton.className = 'disabled';\n rankButton.disabled = false;\n rankButton.className = 'button';\n rankButton.innerHTML = 'Ver Ranking'\n }\n}", "title": "" }, { "docid": "9f4672db30d4d481e37d6c4551c3f4b3", "score": "0.58449876", "text": "function teamRanking() {\n var teams = uniqueTeamList(scoresList, 0);\n var score;\n var team;\n var autoScore = [];\n var teleScore = [];\n var endScore = [];\n var total = []\n var a = [];\n document.getElementById('autoBox').innerHTML = \"\";\n document.getElementById('teleBox').innerHTML = \"\";\n document.getElementById('endBox').innerHTML = \"\";\n document.getElementById('total').innerHTML = \"\";\n //Run through all the teams\n for (i = 0; i < teams.length; i++) {\n team = teamMatches.get(teams[i]);\n score = [...team];\n var aScore = 0;\n var dScore = 0;\n var eScore = sumMapValue(score, 1, 12);\n\n //get auto score auto runs from 4-8\n for (j = 4; j < 9; j++) {\n var teamValue = sumMapValue(score, 1, j)\n aScore += teamValue;\n }\n\n //driver control runs from 9 to 11\n for (j = 9; j < 12; j++) {\n var teamValue = sumMapValue(score, 1, j)\n dScore += teamValue;\n }\n a.push(teams[i], aScore);\n autoScore.push(a);\n a = [];\n a.push(teams[i], dScore);\n teleScore.push(a);\n a = [];\n a.push(teams[i], eScore);\n endScore.push(a);\n a = [];\n a.push(teams[i], aScore + dScore + eScore);\n total.push(a);\n a = [];\n }\n autoScore.sort(function(a, b) {\n return b[1] - a[1];\n });\n teleScore.sort(function(a, b) {\n return b[1] - a[1];\n });\n endScore.sort(function(a, b) {\n return b[1] - a[1];\n });\n total.sort(function(a, b) {\n return b[1] - a[1];\n });\n\n for (i = 0; i < 8; i++) {\n var div = document.createElement('div');\n div.className = \"teamBox\";\n div.innerHTML = i + 1 + \".\" + \" \" + \"<b> Team #\" + autoScore[i][0] + \"</b><em>(\" + autoScore[i][1] + \")\";\n document.getElementById('autoBox').appendChild(div);\n\n div = document.createElement('div');\n div.className = \"teamBox\";\n div.innerHTML = i + 1 + \".\" + \" \" + \"<b> Team #\" + teleScore[i][0] + \"</b><em>(\" + teleScore[i][1] + \")\";\n document.getElementById('teleBox').appendChild(div);\n\n div = document.createElement('div');\n div.className = \"teamBox\";\n div.innerHTML = i + 1 + \".\" + \" \" + \"<b> Team #\" + endScore[i][0] + \"</b><em>(\" + endScore[i][1] + \")\";\n document.getElementById('endBox').appendChild(div);\n\n div = document.createElement('div');\n div.className = \"teamBox\";\n div.innerHTML = i + 1 + \".\" + \" \" + \"<b> Team #\" + total[i][0] + \"</b><em>(\" + total[i][1] + \")\";\n document.getElementById('total').appendChild(div);\n }\n\n console.log(autoScore);\n console.log(teleScore);\n console.log(endScore);\n console.log(total);\n}", "title": "" }, { "docid": "f921a52ad351c9162c72bc8e11724049", "score": "0.5839532", "text": "function banksRankingByTotalBalance() {\n // CODE HERE\n }", "title": "" }, { "docid": "0ba0dcdae8e9a7a37ea0ca0ae0e29092", "score": "0.58381975", "text": "function renderResults_getLastRank(response)\n{\n if (response.responseText) {\n var responseObject = response.responseText.evalJSON();\n \n var html = showRankInfo(responseObject.rankInfo, responseObject.rankNm, 1);\n $('ranking').innerHTML = html;\n \n $('txtRankCount').value = responseObject.countArr.rankCount;\n $('txtAllCount').value = responseObject.countArr.allCount;\n $('txtRightCount').value = responseObject.countArr.rightCount;\n $('txtLeftCount').value = 0;\n $('ranking').setStyle({left: '0px'});\n \n }\n ParkingRankCanMoveLast = 1;\n}", "title": "" }, { "docid": "c607616ce17f15d7b45651ad4dc4f63d", "score": "0.5827475", "text": "function getGameRank() {\n let rank = Array.prototype.concat.apply([], Array.from(document.querySelectorAll('.me'))\n .map(div => Array.from(div.querySelectorAll('.x-grid3-cell-inner'))))[0].innerText,\n totalPlayers = Array.from(document.getElementById('ext-gen493').querySelectorAll('.x-grid3-row'));\n\n return {\n rank: Number.parseInt(rank),\n totalPlayers: Number.parseInt(totalPlayers[totalPlayers.length - 1].querySelectorAll('.x-grid3-cell-inner')[0].innerText)\n };\n}", "title": "" }, { "docid": "7ba0031ff5b068041afc4c96b17fb6db", "score": "0.58238065", "text": "getRank() {\n\t \treturn this.rank;\n\t }", "title": "" }, { "docid": "60681f6fda34dce95a3de4f5a490c05c", "score": "0.5811533", "text": "function calcRanksFromTable(table, optSet) {\n const __RANKBOXES = table.getElementsByTagName('span');\n const __RANKIDS = [];\n const __TEAMIDS = { };\n const __TEAMNAMES = { };\n\n for (let team of __RANKBOXES) {\n const __TEXT = team.textContent;\n const __TEAMLINK = getTable(0, 'a', team);\n const __TEAMNAME = __TEAMLINK.textContent;\n const __HREF = __TEAMLINK.href;\n const __RANKMATCH = /^\\d+\\./.exec(__TEXT);\n const __RANK = parseInt(__RANKMATCH[0], 10);\n const __TEAMIDMATCH = /\\d+$/.exec(__HREF);\n const __TEAMID = parseInt(__TEAMIDMATCH[0], 10);\n\n __RANKIDS[__RANK] = __TEAMID;\n\n __TEAMIDS[__TEAMNAME] = __TEAMID;\n __TEAMNAMES[__TEAMID] = __TEAMNAME;\n }\n\n const __TEAMRANKS = reverseMapping(__RANKIDS, Number);\n\n // Neuen Rangliste speichern...\n setOpt(optSet.rankIds, __RANKIDS, false);\n setOpt(optSet.teamRanks, __TEAMRANKS, false);\n setOpt(optSet.teamIds, __TEAMIDS, false);\n setOpt(optSet.teamNames, __TEAMNAMES, false);\n}", "title": "" }, { "docid": "62f3057effc7e293035e1b9995d039b8", "score": "0.57993275", "text": "function updateRanks(string) {\n let lastElement = allStatsArray[0];\n lastElement.rank = 1;\n let rankCount = 1;\n\n if(string === \"nickname\") {\n //Iterate through all stats\n for(let i = 0; i < allStatsArray.length; i++) {\n allStatsArray[i].rank = (i+1);\n }\n }\n else {\n //Iterate through all stats\n for (let i = 1; i < allStatsArray.length; i++) {\n\n if (string === \"nickname\") {\n allStatsArray[i].rank = rankCount;\n rankCount++;\n }\n\n if (string === \"score\") {\n //If current stat matches the previous one, they are tied\n if (lastElement.score === allStatsArray[i].score) {\n allStatsArray[i].rank = lastElement.rank;\n }\n //Else, increment the rank counter and assign that rank to the current player\n else {\n rankCount++;\n allStatsArray[i].rank = rankCount;\n lastElement = allStatsArray[i];\n }\n }\n\n if (string === \"wins\") {\n //If current stat matches the previous one, they are tied\n if (lastElement.wins === allStatsArray[i].wins) {\n allStatsArray[i].rank = lastElement.rank;\n }\n //Else, increment the rank counter and assign that rank to the current player\n else {\n rankCount++;\n allStatsArray[i].rank = rankCount;\n lastElement = allStatsArray[i];\n }\n }\n\n if (string === \"losses\") {\n //If current stat matches the previous one, they are tied\n if (lastElement.losses === allStatsArray[i].losses) {\n allStatsArray[i].rank = lastElement.rank;\n }\n //Else, increment the rank counter and assign that rank to the current player\n else {\n rankCount++;\n allStatsArray[i].rank = rankCount;\n lastElement = allStatsArray[i];\n }\n }\n\n if (string === \"winRate\") {\n //If current stat matches the previous one, they are tied\n if (lastElement.winRate === allStatsArray[i].winRate) {\n allStatsArray[i].rank = lastElement.rank;\n }\n //Else, increment the rank counter and assign that rank to the current player\n else {\n rankCount++;\n allStatsArray[i].rank = rankCount;\n lastElement = allStatsArray[i];\n }\n }\n\n }\n }\n}", "title": "" }, { "docid": "e069847130d0cfd5e120acbf1bc6aced", "score": "0.5796341", "text": "updateRank(data){\n xRank.forEach(function(rank, i){\n if(data.username === rank.username){\n for(var k in rank){\n if(k === data.question){\n xRank[i][k] = data.grade;\n xRank[i].total = xRank[i].q1 + xRank[i].q2 + xRank[i].q3 + xRank[i].q4;\n return;\n }\n }\n }\n });\n\n this.sortRanking();\n this.setState({\n data: xRank\n });\n }", "title": "" }, { "docid": "374ff0d3b3ee184b5fa0b037b006d3a7", "score": "0.57680947", "text": "function getTeamStats() {\n let maxRank = 0;\n let maxRankTotal = 0;\n let maxRankIndex = 0;\n let minRank = 5000;\n let minRankPlayer;\n let maxRankPlayer;\n for (let i = 0; i < app.players.length; i++) {\n\n //calcultating maxRank\n if (app.players[i].maxRank) {\n maxRankIndex++;\n maxRankTotal += app.players[i].maxRank;\n if (app.players[i].maxRank > maxRank) {\n maxRank = app.players[i].maxRank;\n maxRankPlayer = app.players[i].name;\n }\n if (app.players[i].maxRank < minRank) {\n minRank = app.players[i].maxRank;\n minRankPlayer = app.players[i].name;\n }\n }\n }\n let maxRankAverage = Math.round(maxRankTotal / maxRankIndex);\n\n app.team.maxRank = maxRank;\n app.team.maxRankPlayer = maxRankPlayer;\n app.team.minRank = minRank;\n app.team.minRankPlayer = minRankPlayer;\n app.team.averageMaxRank = maxRankAverage;\n\n //getting rankIcon corresponding to rank\n\n team.maxRankIcon = getRankIcon(app.team.maxRank);\n\n team.minRankIcon = getRankIcon(app.team.minRank);\n\n team.averageMaxRankIcon = getRankIcon(app.team.averageMaxRank);\n}", "title": "" }, { "docid": "b6d52a1d516d6a1fb5f973c3b46df52e", "score": "0.57638043", "text": "function renderScores() {\n storedGames.sort(compare);\n storedGames.reverse();\n for (var i = 0; i < storedGames.length; i++) {\n var gameValues =\n storedGames[i][\"initials\"] + \" - \" + storedGames[i][\"score\"];\n console.log(gameValues);\n leaderBoard.innerHTML += `<li>${gameValues}</li>`;\n }\n}", "title": "" }, { "docid": "05dc21798e0f6f614ca21f7c7d3ab9dc", "score": "0.5753407", "text": "function rankSort() { \n googleSheetReloadHack(); \n sheet.sort(numInfo+numJudges);\n}", "title": "" }, { "docid": "18b31aaa1eaf88a05d6091fcdd796c9e", "score": "0.574141", "text": "function sortRankings(rankings){\n return rankings.sort(function(a, b){\n return b.score - a.score;\n });\n}", "title": "" }, { "docid": "2326d165382a99f7115ff7f512d5e3b9", "score": "0.5728809", "text": "drawRankInfo(ctx, rank, aheadEnemyName, behindEnemyName) {\n const fontSize = 30 * HEIGHT_MULTIPLIER + 30;\n writeText(\n ctx,\n ROAD_PARAM.CANVAS_WIDTH / 2 + 50 * HEIGHT_MULTIPLIER + 50,\n 950 * HEIGHT_MULTIPLIER + 950,\n rank,\n `700 ${fontSize}px Neuropol`,\n 'white'\n );\n\n writeText(\n ctx,\n ROAD_PARAM.CANVAS_WIDTH / 2 - (170 * HEIGHT_MULTIPLIER + 170),\n 820 * HEIGHT_MULTIPLIER + 820,\n aheadEnemyName,\n `700 ${fontSize}px Neuropol`,\n 'white'\n );\n\n writeText(\n ctx,\n ROAD_PARAM.CANVAS_WIDTH / 2 + 260 * HEIGHT_MULTIPLIER + 260,\n 940 * HEIGHT_MULTIPLIER + 940,\n behindEnemyName,\n `700 ${fontSize}px Neuropol`,\n 'white'\n );\n }", "title": "" }, { "docid": "3376ff0b008654442b3399e5ddef92cf", "score": "0.5718882", "text": "function showFinalFourRanking() { \n $('.ranking__container').on('click', function() {\n\n // if ranked already, disable\n if (!$(this).hasClass('is-ranked')) {\n listPopup.addClass('show');\n body.addClass('has-popup');\n\n // Clone\n getClone('.game__options-list', listPopup);\n \n selectFinalFourRanking($(this)); \n }\n });\n }", "title": "" }, { "docid": "9395bb3e84049bde091eea7f555a9ef0", "score": "0.5717933", "text": "function getRank() {\n for (var i = 0; i < personRank.length; i++) {\n $(\"#personRank\").append(\n '<option value=\"' + personRank[i] + '\">' + personRank[i] + \"</option>\"\n );\n }\n}", "title": "" }, { "docid": "8b4bb950a347bc54b140ada2fa7280bf", "score": "0.5710197", "text": "function rerank(rank) {\n for(var i=0;i<numJudges;i++) {\n var judgeRank = sheet.getRange(rank+numTopInfo, numInfo+i).getValue();\n \n // Each row\n for(var j=0;j<rank;j++) {\n var cellRank = sheet.getRange(j+numTopInfo, numInfo+i).getValue();\n if(cellRank>judgeRank) {\n cellRank--;\n sheet.getRange(j+numTopInfo, numInfo+i).setValue(cellRank);\n }\n }\n } \n}", "title": "" }, { "docid": "0f4bc0f568c758ecb6ab499e697da1dc", "score": "0.57031125", "text": "async function scrapeRankings(url) {\n const browser = await puppeteer.launch();\n const page = await browser.newPage();\n await page.goto(url);\n\n //This just gets every single table element. We then need to use the knowlege that each team has 6 elements of data to procede\n const vals = await page.$x('//*[@id=\"page-wrapper\"]/div/div/div/table/tbody/tr/td');\n\n console.log(vals.length); //test code\n\n //Stepping by 6 makes it so the for loop executes 1 time per team. We can then just work within the team with\n //i = rank, i+1 = team#, i+2 = team name, i+3 = w-l-t, i+4 = WP, i+5 = SP\n //TODO AP are missing, this will be an issue later, might be because my tm is outdated.\n for (i = 0; i < vals.length; i += 6) {\n rank = await readRawValue(vals[i]);\n number = await readRawValue(vals[i + 1]);\n console.log(\"Rank \" + rank + \" number \" + number);\n }\n browser.close();\n}", "title": "" }, { "docid": "0d4fecc2bf6e1ae17a4b16208edc4c84", "score": "0.57023877", "text": "function filter(i) {\n if (i < humans.length) {\n Stat.find({ id: humans[i] }, function (err, data) {\n if (err) {\n console.log('error at ' + humans[i])\n } else {\n if (data.length) {\n gearedPeople.push({ id: humans[i], name: data[0]['family'], gear: data[0]['ap'] + data[0]['dp'], ap: data[0]['ap'], awakening: data[0]['awakening'], dp: data[0]['dp'] })\n }\n }\n filter(i + 1)\n })\n } else {\n insertionSort(gearedPeople)\n sortedPeople = []\n for(var o = gearedPeople.length - 1; o >= 0; o--){\n sortedPeople.push(gearedPeople[o])\n }\n\n var rankedMessage = ''\n \n for(var x = 0; x < sortedPeople.length; x++){\n rankedMessage += (x + 1 + ' ' + sortedPeople[x]['name'] + ' - ' + sortedPeople[x]['gear'] +' \\n ')\n }\n message.channel.send({embed: {\n color : 000000,\n title: 'Gear Score Ranking',\n description: rankedMessage\n }})\n }\n }", "title": "" }, { "docid": "07629e9110ea1e8f52fc4aac809b2027", "score": "0.56998765", "text": "function addRankingLines(vis, rankings) {\n \n vis.selectAll('polyline.ranking')\n .data(rankings)\n .enter()\n .append('svg:polyline')\n .attr('class', 'ranking zoom')\n .attr('points', function(d) {\n \n var points = [];\n \n if (d.offset == 0)\n points.push(SCALES.x(0) + ',' + SCALES.y(d.ranks[0] - 1));\n \n for (var i = 0;\n i < d.ranks.length;\n i++) {\n \n points.push(SCALES.x(i+d.offset + 0.5) + ',' + SCALES.y(d.ranks[i] - 1));\n }\n \n if (points.length > 0)\n points.push(SCALES.x(i + d.offset) + ',' + SCALES.y(d.ranks[i - 1] - 1));\n \n return points.join(' ');\n })\n .style('stroke', function(d) {\n \n return SCALES.clr(d.ranks[0]);\n })\n .on('mouseover', function(d) {\n \n highlight(vis, d.name);\n })\n .on('mouseout', function() {\n \n unhighlight(vis);\n });\n}", "title": "" }, { "docid": "874769b6dc51325eecb1851003e2fb3b", "score": "0.56985486", "text": "function formatRankBox(box, color, bgColor, substRank) {\n if (substRank) {\n const __HTML = box.innerHTML;\n\n box.innerHTML = __HTML.replace(/<b>(\\d+)\\.<\\/b>/, \"<B>\" + substRank + \"<\\/B>\");\n }\n if (bgColor) {\n box.style.backgroundColor = bgColor;\n }\n if (color) {\n box.style.color = color;\n }\n}", "title": "" }, { "docid": "5e5a978a0883bf056af12e5635ab72e5", "score": "0.5684808", "text": "function renderResults_getMoreRank(response)\n{\n var responseObject = response.responseText.evalJSON();\n \n var moreRankHtml = showRankInfo(responseObject.rankInfo, responseObject.count, 2);\n if (moreRankHtml) {\n $('txtRankCount').value = Number($('txtRankCount').value) + Number(responseObject.rankInfo.length);\n\n $('txtAllCount').value = responseObject.allCount;\n ParkingRankCanMoveOne = 1;\n \n if ( responseObject.isRight == 1 ) {\n new Insertion.Bottom('ranking', moreRankHtml);\n $('txtRightCount').value = responseObject.rankInfo.length;\n moveRanking(1);\n }\n else {\n rankLeft = -58 * responseObject.rankInfo.length + parseInt($('ranking').getStyle('left'));\n \t$('ranking').setStyle({left:rankLeft+'px'}); \n new Insertion.Top('ranking', moreRankHtml);\n $('txtLeftCount').value = responseObject.rankInfo.length;\n moveRanking(2);\n }\n }\n}", "title": "" }, { "docid": "b8b6e407574d36c025bc606478c8542f", "score": "0.5681744", "text": "getTotalRank() {\n\t \treturn this.totalRank;\n\t }", "title": "" }, { "docid": "d6815d5d49a3b4ec273ce5944e48c1c7", "score": "0.5674578", "text": "function leaderBoard() {\n removeFromLeaderBoard();\n addToLeaderBoard();\n scoreList.sort((a, b) => {\n return b.score - a.score;\n });\n //only render the top 4 scores.\n topTen = scoreList.slice(0, 10);\n\n for (var i = 0; i < topTen.length; i++) {\n var player = topTen[i].player;\n var score = topTen[i].score;\n\n var newDiv = document.createElement(\"div\");\n leaderBoardDiv.appendChild(newDiv);\n\n var newLabel = document.createElement(\"label\");\n newLabel.textContent = player + \" - \" + score;\n newDiv.appendChild(newLabel);\n }\n}", "title": "" }, { "docid": "c19161255148d4a3616af72686d87336", "score": "0.5673499", "text": "async function getDistrictRanks() {\n var result = null;\n var districtranks = null;\n result = await httpClient.get(`${selectedYear?.value}/district/rankings/${selectedEvent?.value.districtCode}`);\n districtranks = await result.json();\n districtranks.lastUpdate = moment();\n setDistrictRankings(districtranks);\n }", "title": "" }, { "docid": "ffe20eaa6e3fb7601d5d9fe0fec31dab", "score": "0.5671736", "text": "setRanking() {\n let {\n playerLevel,\n levelCounter,\n playerNumber,\n ranking\n } = this.state\n let maxLevel = 0, count = 0, length\n ranking = []\n let ranked = []\n for (let i = 0; i < playerNumber; i++) {\n if (playerLevel[i] > maxLevel) maxLevel = playerLevel[i]\n ranked.push(false)\n }\n for (let i = maxLevel; i >= 0; i--) {\n if (count === playerNumber) break\n length = levelCounter[i].length\n for (let j = 0; j < length; j++) {\n if (ranked[levelCounter[i][j]] === false) {\n ranked[levelCounter[i][j]] = true\n ranking.push(levelCounter[i][j])\n count++\n }\n }\n }\n this.setState({\n ranking\n })\n }", "title": "" }, { "docid": "64b32b05529c61d25688aa07afbdb61b", "score": "0.566625", "text": "function displayScores() {\n $('#actual-score').text(envision.totalScore)\n $('#max-score').text(envision.maxScore)\n}", "title": "" }, { "docid": "873c5818ed91d8783748b22a4dc42a01", "score": "0.5663915", "text": "function increaseRankBy(n){\n\n\nvar lis = document.getElementById('app').querySelectorAll('ul.ranked-list li')\n\n\n\nfor (let i = 0, l = lis.length; i < l; i++) {\nvar temp = parseInt(lis[i].innerHTML)\ntemp += n;\nlis[i].innerHTML =temp;\n\n //lis[i].innerHTML = (parsed).toString()\n}\n//return lis;\n\n}", "title": "" }, { "docid": "c34a00b42089f4a77465b8b6f50b0ac4", "score": "0.56566477", "text": "function renderLeaderboard() {\n\n var container = $('#leaderboard');\n container.empty();\n\n for (var i = 0, iLen = (showAll ? repos.length : (repos.length > 10 ? 10 : repos.length)); i < iLen; i++) {\n var repo = repos[i];\n var elem = $(\n '<li class=\"' + (repo.language || '').toLowerCase() + ' place' + (i + 1) + '\">' +\n '<a href=\"' + (repo.homepage ? repo.homepage : repo.html_url) + '\">' +\n (i > 9 ? '' : '<span class=\"place place' + (i + 1) + '\">' + (i + 1) + '</span>') +\n '<span class=\"name\">' + repo.full_name + '</span><br />' +\n repo.description + '<br />' +\n '<span class=\"details\">' +\n 'Forks: ' + repo.forks +\n ' &nbsp;&nbsp;&bull;&nbsp;&nbsp; Watchers: ' + repo.watchers +\n ' &nbsp;&nbsp;&bull;&nbsp;&nbsp; Open Issues: ' + repo.open_issues +\n ' &nbsp;&nbsp;&bull;&nbsp;&nbsp; Last Updated: ' + $.timeago(repo.updated_at) +\n '</span>' +\n (i > 9 ? '' : '<span class=\"score\">' +\n (i == 0 ? '<span class=\"trophy\"></span>' : '') +\n repo.leaderboardScore +\n '</span>') +\n '</a>' +\n '</li>');\n container.append(elem);\n }\n\n if (showAll) {\n $('#leaderboardShowAll').text('View only top ten repos');\n }\n else {\n $('#leaderboardShowAll').text('View all ' + repos.length + ' repos');\n }\n\n }", "title": "" }, { "docid": "13d16beac6f29dae8393d34887e07517", "score": "0.5655373", "text": "getRanking(limit, page) {\n return this.httpService.httpClient\n .fetch(API.endpoints.users + '/' + API.endpoints.ranking + '?limit=' + limit + '&page=' + page, {\n method: 'get',\n headers: {\n 'Authorization': 'Bearer ' + this.jwtService.token\n }\n })\n .then(this.httpService.checkStatus)\n .then(this.httpService.parseJSON)\n }", "title": "" }, { "docid": "31dcd0d9120b3cf59accca1e2fb2d6a9", "score": "0.5652865", "text": "function getLeaderboardText()\n{\n\tvar sortedPlayer = [];\n\tvar cpt = 0;\n\tfor (var player in players) {\n\t\tif (players.hasOwnProperty(player)) {\n\t\t\tsortedPlayer[cpt] = players[player];\n\t\t\tsortedPlayer[cpt].name = player;\n\t\t\tcpt++;\n\t\t}\n\t}\n\tvar returnValue = \"\";\n\tsortedPlayer = sortedPlayer.sort(function (a, b)\n\t{\n\t\tif (a.score > b.score)\n\t\t\treturn -1;\n\t\tif (a.score < b.score)\n\t\t\treturn 1;\n\t\treturn 0;\n\t});\n\tfor (var i = 0; i < sortedPlayer.length; i++) {\n\t\tplayers[sortedPlayer[i].name].ranks = i + 1;\n\t}\n\tfor (var i = 0; i < sortedPlayer.length; i++) {\n\t\tif (i === 5)\n\t\t\tbreak;\n\t\tif (sortedPlayer[i].name.length >= 12)\n\t\t{\n\t\t\tsortedPlayer[i].name = sortedPlayer[i].name.substring(0, 12);\n\t\t}\n\t\tvar toPrint = sortedPlayer[i].name + \":\" + \" \".repeat(12 - sortedPlayer[i].name.length);\n var scoreToPrint = sortedPlayer[i].score.toString();\n if (scoreToPrint.length >= 8)\n\t\t{\n\t\t\tscoreToPrint = scoreToPrint.substring(0, 8);\n\t\t}\n var scoreToPrint = scoreToPrint + \" \".repeat(8 - scoreToPrint.length);\n\t\treturnValue += \"<pre> <font color=\\\"yellow\\\">#\" + (i + 1) + \"</font> \" + toPrint + \" \" + scoreToPrint + \" x\" + Math.floor(sortedPlayer[i].mult) + \"<br></pre>\";\n\t}\n\treturn returnValue;\n}", "title": "" }, { "docid": "451256f4b35bc44c9b66e7eb437691f3", "score": "0.56469595", "text": "function displayScores() {\n winCount.textContent = wins;\n loseCount.textContent = losses;\n tieCount.textContent = ties;\n}", "title": "" }, { "docid": "1fd1777eae268b815913e84861fc68e1", "score": "0.56453365", "text": "toString(){\n let array = Array.from(super.entries());\n if (!array.length > 0) return '';\n\n let lastScore = -1;\n let lastRank = 0;\n let str = ''\n let rank = 0;\n array.forEach( (entry) => {\n rank++\n const currRank = (lastScore == entry[1] ? lastRank : rank);\n lastScore = entry[1];\n str = str + currRank + '. '+ entry[0] + ', '+ lastScore +\n (lastScore == 1 ? ' pt' : ' pts') + '\\n';\n lastRank = currRank;\n });\n return str;\n }", "title": "" }, { "docid": "fc66c1537d0d887a9a62efb07dff9a99", "score": "0.56426656", "text": "async function getRankingsByStatus(req, res) {\n try {\n const status = req.params.status;\n const rankings = await Ranking.findAll({ where: { status } });\n successMsg(res, 200, 'correcto', rankings);\n } catch (error) {\n errorMsg(res, 500, 'Ha ocurrido un error', error);\n }\n}", "title": "" }, { "docid": "93ce5e186cda5e834ba881447263f40d", "score": "0.563603", "text": "function showStats()\n\t\t{\n\t\tGAME.bridge.request('leaderboards.get', ['gamesPlayed', 'totalPoints', 'avgPoints', 'highScore', 'longestStreak', 'currentStreak'],\n\t\t\tfunction(err, message)\n\t\t\t\t{\n\t\t\t\tif (err)\n\t\t\t\t\t{\n\t\t\t\t\tconsole.log(err);\n\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\tloadStats(message);\n\t\t\t\t}\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "56b1830b1320be4b5418aa2cdd06e4e9", "score": "0.5628041", "text": "async rank(){\n // Ranks all stocks by percent change over the past 10 minutes (higher is better).\n var promStocks = this.getPercentChanges(this.allStocks);\n await Promise.all(promStocks);\n\n // Sort the stocks in place by the percent change field (marked by pc).\n this.allStocks.sort((a, b) => {return a.pc - b.pc;});\n }", "title": "" }, { "docid": "45da8b2534085eb73a1382ec5eb56d81", "score": "0.56201607", "text": "function loadRankingItem(team) {\n //Ranking table for top team in each league\n $(\"#rankingTbody\").append($(\"<tr/>\")\n .append($(\"<td/>\")\n .html(team.League))\n .append($(\"<td/>\")\n .html(team.TeamName)));\n}", "title": "" }, { "docid": "6f2c7447f271ab120aa12b7d291cef9c", "score": "0.561587", "text": "function sortByRanking() {\n const moviesArr = movieList();\n const sortedArray = moviesArr.sort((a, b) => {\n let propA = a.ranking;\n let propB = b.ranking;\n let comparison = 0;\n if (propA > propB) {\n comparison = 1;\n } else if (propA < propB) {\n comparison = -1;\n }\n return comparison;\n });\n fs.writeFileSync(moviesFile, JSON.stringify(sortedArray));\n}", "title": "" }, { "docid": "bb7db0a20daff7a1aef7054cd0d8b9d6", "score": "0.5610049", "text": "function saveRank() {\n const score = {\n username: nameInput.value,\n guessCount: resultArray.length,\n };\n ranks.push(score);\n ranks.sort(function (a, b) {\n return a.guessCount - b.guessCount;\n });\n ranks.splice(10);\n localStorage.ranking = JSON.stringify(ranks);\n}", "title": "" }, { "docid": "4611757561d0b99c6dfb162d47ae782f", "score": "0.56088454", "text": "function showScoreboard(newName) {\n var newUser = {name: newName, score: score}\n // Get local scores\n scoreRanking = JSON.parse(localStorage.getItem(\"scores\"));\n // Compare scores\n if (!scoreRanking) {\n scoreRanking = [newUser]\n } else {\n compareScore(scoreRanking, newUser)\n }\n // Update scores\n console.log(scoreRanking);\n updateScoreboard(scoreRanking);\n // Update local data\n localStorage.setItem(\"scores\", JSON.stringify(scoreRanking));\n\n removeElement(initials);\n returnElement(scoreBoard);\n}", "title": "" }, { "docid": "7921180c592f2b0437e3deb76c1d761c", "score": "0.55783486", "text": "renderRankStatus() {\n const { user, allRanks } = this.props;\n let visibleRank = 0;\n allRanks.map((rank, index) => {\n if (rank.name === user.rank) visibleRank = index;\n });\n const imageIndex = visibleRank > 2 ? visibleRank - 2 : visibleRank;\n let offset = visibleRank === 6 ? 8 : ScreenWidth / 10;\n console.log(visibleRank);\n return <View style={styles.rankContainer}>\n {\n allRanks.map((rank, index) => {\n if (visibleRank >= 3) {\n if (index > 1) {\n return <View key={`rewards-rank-${index}`} style={[CommonStyle.flexOne, CommonStyle.center]}>\n <Image style={index <= visibleRank ? styles.activeRankImage : styles.inactiveRankImage} source={rank.image}/>\n <Text style={index <= visibleRank ? styles.activeRankText : styles.inactiveRankText}>{rank.name}</Text>\n </View>\n }\n } else {\n if (index < 5) {\n return <View key={`rewards-rank-${index}`} style={[CommonStyle.flexOne, CommonStyle.center]}>\n <Image style={index <= visibleRank ? styles.activeRankImage : styles.inactiveRankImage} source={rank.image}/>\n <Text style={index <= visibleRank ? styles.activeRankText : styles.inactiveRankText}>{rank.name}</Text>\n </View>\n }\n }\n })\n }\n <View style={styles.rankBar}/>\n <View style={[styles.rankActiveBar, {width: ScreenWidth / 5 * (imageIndex + 1) - offset}]}/>\n <Image style={[styles.iconTriangle, {left: ScreenWidth / 5 * (imageIndex + 1) - offset}]}\n source={require('../../assets/images/icon-triangle.png')}/>\n </View>\n }", "title": "" }, { "docid": "1ff0e95921f514c188d3f61d8d7bbf4a", "score": "0.55541354", "text": "function getRankPage( requete, reponse ) {\n\tgetAllInfoSeance( requete, reponse, processGetRankPage )\n}", "title": "" }, { "docid": "eba0db8d547a107605cc3cf533003372", "score": "0.55425483", "text": "function getBattlefieldWorldRanking(battlefieldRankings){\n // console.log(battlefieldRankings);\n var totalUserCount = battlefieldRankings.rankings[0].count,\n myRank = battlefieldRankings.rankings[0].rank,\n percentageRank = Math.round((myRank/totalUserCount) * 100);\n if (myRank === null){ \n console.error('No Rank received');\n return 5; //Returns a value placeholder\n }else{\n return percentageRank;\n }\n }", "title": "" }, { "docid": "5b1435ac89b05a2f9c33a2025e9f4037", "score": "0.55340135", "text": "function getRank(rank) {\n switch(rank) {\n case 1:\n return \"A\";\n break;\n case 11:\n return \"J\";\n break;\n case 12:\n return \"Q\";\n break;\n case 13:\n return \"K\";\n break;\n default:\n return rank.toString();\n break;\n }\n}", "title": "" }, { "docid": "2b960f66bd8cb3068b91582c9a0b5dc0", "score": "0.5526973", "text": "function setRank() {\n\n footerschemeFire()\n\n nextStepBtn.style.display = \"none\";\n playerElement.style.display = \"none\";\n rankElement.style.display = \"block\";\n}", "title": "" }, { "docid": "1eea0ffe1144c55dc05002e07e6575e2", "score": "0.5526645", "text": "function getRankings(leagues) {\n let rankingArray = [];\n $.each(leagues, function(key, value) {\n // Get all teams under league to find out the topmost team based on points\n $.getJSON(`/api/teams/byleague/${value.Code}`, function(data) {\n teams = data;\n })\n .done(function() {\n // upon successful AJAX call perform the below\n // Sort team based on points\n teams.sort(function(sortPoints1, sortPoints2) {\n return (sortPoints2.TeamPoints - sortPoints1.TeamPoints);\n });\n rankingArray[rankingArray.length] = teams[0];\n // Dynamically populate the ranking table based on the item\n loadRankingItem(teams[0]);\n })\n .fail(function() {\n // upon failure response, send message to user\n errorMsg = \"Failure to get data for showing topmost team under league, please refresh the page\"\n $(\"#errorMsgId\").html(errorMsg);\n $(\"#errorMsgId\").addClass(\"badInput\");\n });\n });\n}", "title": "" }, { "docid": "7be4e2f97d47d421f3ce0d89fe00e7a8", "score": "0.5524195", "text": "function submitRanking(){\n var rankings= [];\n\n for(var i = 0;i<loadedArticles.length;i++){ // For every loaded article\n var tempObj = {}; // Create new object rankings\n tempObj.title = loadedArticles[i]; // Add its title to object\n tempObj.rank = document.getElementById(optionIDs[i]).value; // Add its rank to object\n rankings.push(tempObj); // Add object to\n }\n\n sendJSON(JSON.stringify(rankings)); // Call function sendJSON with JSON object as a string\n }", "title": "" }, { "docid": "b47917456b95e08c0175663c8b8d9872", "score": "0.5515035", "text": "function displayDeck() {\n\t//player1\n\tfor(x = 0; x < 5; x++) {\n\t\tcard_rank = /^[a-zA-Z()]+$/.test(deck[x].rank) ? deck[x].rank.substring(0,1) : deck[x].rank;\n\t\tel = \"<li class='Player1' style='color:\" + deck[x].color + \"'>\" +\n\t\t\t\t\"<span class='card-item'>\" + deck[x].unicode + \" \" + card_rank + \"</li>\";\n\t\t$('#player-1').append(el);\n\t\tdeck.splice(x, 1);\n\t}\n\tshuffleDeck();\n\t//player2\n\tfor(y = 0; y < 5; y++) {\n\t\tcard_rank2 = /^[a-zA-Z()]+$/.test(deck[y].rank) ? deck[y].rank.substring(0,1) : deck[y].rank;\n\t\tel2 = \"<li class='Player2' style='color:\" + deck[y].color + \"'>\" +\n\t\t\t\t\"<span class='card-item'>\" + deck[y].unicode + \" \" + card_rank2 + \"</span></li>\";\n\t\t$('#player-2').append(el2);\n\t\tdeck.splice(y, 1);\n\t}\n}", "title": "" }, { "docid": "f4f4cf0e8e6829b6f7e883fbfc32904a", "score": "0.5514125", "text": "function mostrarPeliculas(data){\n \n let datos = JSON.parse(data);\n \n datos.response.sort(function(a,b){\n return(b.rating - a.rating)\n })\n \n let info = document.querySelector('#peliculas');\n info.innerHTML = ''; \n info.innerHTML = `<thead>\n <tr>\n <th class=\"label-cell\">N°</th>\n <th class=\"label-cell\">Title</th>\n <th class=\"label-cell\">Year</th> \n <th class=\"label-cell\">Rating</th>\n <th class=\"label-cell\">Metascore</th>\n <th class=\"label-cell\">Director</th>\n </tr>\n </thead>`; \n \n\n for(var x=0;x<Object.keys(datos.response).length;x++){\n // console.log(datos.response[x]['title']); \n info.innerHTML += `<tr>\n <td class=\"label-cell\">${x+1}</td>\n <td class=\"label-cell\">${datos.response[x]['title']}</td>\n <td class=\"label-cell\">${datos.response[x]['year']}</td>\n <td class=\"label-cell\">${datos.response[x]['rating']}</td>\n <td class=\"label-cell\">${datos.response[x]['metascore']}</td>\n <td class=\"label-cell\">${datos.response[x]['director']}</td>\n </tr>`\n } \n }", "title": "" }, { "docid": "607b56aaf4e8a70857fa5b48d9a5fce3", "score": "0.550819", "text": "function displayScore(number){\n totalRound = 0\n round.push(number);\n round.forEach(newNb=>{\n totalRound += newNb\n })\n players[currentPlayer].roundScore = totalRound\n playerRoundScore[currentPlayer].textContent = players[currentPlayer].roundScore\n}", "title": "" }, { "docid": "97d3692135e613d1460b3ad01fb77e63", "score": "0.5497721", "text": "static asGrid() {\n const ranks = [ACE, KING, QUEEN, JACK, TEN, NINE, EIGHT, SEVEN, SIX, FIVE, FOUR, THREE, TWO] \n\n const grid = ranks.map(row => {\n const down = ranks.map(column => {\n const isOffsuit = row < column\n const isPair = row === column\n const marker = isPair ? '' : (isOffsuit ? 'o' : 's')\n\n const cards = sortBy([\n Range.cards.find(card => card.rank === row),\n Range.cards.find(card => card.rank === column)\n ], 'rank').reverse()\n\n return cards.map(c => c.name.split('')[0]).concat([marker]).join('')\n })\n\n return down\n })\n\n return grid \n }", "title": "" }, { "docid": "8966307ee14484f1b2ae0fb9fdd6aa3a", "score": "0.5484014", "text": "function drawRankTable(){\n //Make ajax call to a showRank method\n $.ajax({\n url:'showRank',\n dataType: 'json',\n success: function(info){//In case of success it will receive a array from the server\n //create a string with the coloumns name\n var cols = '{\"cols\" :[{\"label\":\"Cidade\", \"type\":\"string\"},{\"label\":\"Educação\", \"type\":\"number\"},'+\n '{\"label\":\"Economia\", \"type\":\"number\"},{\"label\":\"Emprego\", \"type\":\"number\"},'+\n '{\"label\":\"Meio Ambiente\", \"type\":\"number\"},{\"label\":\"Finanças Públicas\", \"type\":\"number\"},'+\n '{\"label\":\"Saúde\", \"type\":\"number\"},{\"label\":\"Rank\", \"type\":\"number\"}],';\n //create a string to keep the rows\n var rows = '\"rows\":[';\n //Get the cities names\n var cities = Object.keys(info.education);\n //Iterate the cities array and concatenate the string with the values of each city\n //in the array cities\n $.each(cities, function(key, elem){\n rows +='{\"c\":[{\"v\":\"'+elem+'\"},{\"v\":'+info['education'][elem]+'},'+\n '{\"v\":'+info['economy'][elem]+'},{\"v\":'+info['employment'][elem]+'},'+\n '{\"v\":'+info['environment'][elem]+'},{\"v\":'+info['governmentExpen'][elem]+'},'+\n '{\"v\":'+info['health'][elem]+'},{\"v\":'+info['overall'][elem]+'}]},';\n });\n rows = rows.substr(0, (rows.length - 1));\n rows += ']}';\n\n var table = cols+rows;\n var data = new google.visualization.DataTable(table);\n\n var options = {width: '100%',\n sortColumn: 7};\n\n var visualization = new google.visualization.Table(document.getElementById('rankTable'));\n\n google.visualization.events.addListener(visualization, 'ready', function(){\n $('#rankTable tr').css('cursor', 'pointer');\n });\n\n visualization.draw(data, options);\n\n //Add a listner to identify when a row is selected\n google.visualization.events.addListener(visualization, 'select', selectHandler);\n\n //Handle the select event and redirect the page to the profile page of the selected city\n function selectHandler(e){\n var city = data.getValue(visualization.getSelection()[0].row, 0);\n window.location = APP_URL + '/profiles/' + city\n }\n },\n method: 'GET'\n });\n}", "title": "" }, { "docid": "ac780d317e4d0468f707015e3503df40", "score": "0.5475972", "text": "function drawTypRank() {\n\n if (gLastResult[\"typerank\"].length > 0) {\n $(\"#typeRankContainerDiv\").show();\n var z=[],d={};\n \n z = gLastResult[\"typerank\"].map(function(x){return [x[\"feature_name\"],x[\"positives\"],x[\"negatives\"],x[\"neutrals\"]];});\n z = z.filter(function(x){if (x[0] in d) {console.log(\"typerank dp:\"+x[0]); return false;} d[x[0]] = true; return true; }) // this due to there being 'general' and 'specific' categories\n console.log(d);\n z.unshift([\"Feature\", \"Positives\",\"Negatives\",\"Neutrals\"]);\n\n var data = google.visualization.arrayToDataTable(z);\n var options = {\n legend: { position: 'top', maxLines: 3 },\n bar: { groupWidth: '65%' },\n chartArea: {left: '15%'},\n isStacked: true\n };\n \n var view = new google.visualization.DataView(data);\n var chart = new google.visualization.BarChart(document.getElementById(\"typerankDiv\"));\n chart.draw(view, options);\n }\n }", "title": "" }, { "docid": "c4f8b60c5f48d86b9b8de1002b722a34", "score": "0.54758584", "text": "render() {\n return (\n <div className=\" primary-color border rounded\">\n <h1 className=\"p-4 bg-light\">Top Ranks</h1>\n <div className=\"row d-flex pt-4 justify-content-center\">\n {this.props.rankings.map((ranking, ind) => (\n <TopTenList key={ind++} ranking={ranking} />\n ))}\n </div>\n </div>\n );\n }", "title": "" }, { "docid": "4d5194a89a0abae12fa4ef8c2fc4098a", "score": "0.54718095", "text": "function updateLeaderboard()\n{\n\tlet leaderboard = Engine.GetGUIObjectByName(\"leaderboardBox\");\n\tlet boardList = Engine.GetBoardList().sort((a, b) => b.rating - a.rating);\n\n\tlet list = [];\n\tlet list_name = [];\n\tlet list_rank = [];\n\tlet list_rating = [];\n\n\tfor (let i in boardList)\n\t{\n\t\tlist_name.push(boardList[i].name);\n\t\tlist_rating.push(boardList[i].rating);\n\t\tlist_rank.push(+i + 1);\n\t\tlist.push(boardList[i].name);\n\t}\n\n\tleaderboard.list_name = list_name;\n\tleaderboard.list_rating = list_rating;\n\tleaderboard.list_rank = list_rank;\n\tleaderboard.list = list;\n\n\tif (leaderboard.selected >= leaderboard.list.length)\n\t\tleaderboard.selected = -1;\n}", "title": "" }, { "docid": "b43b69ce242a4f5e96ff4519f4d4526a", "score": "0.5465278", "text": "function players(name,correctos,incorrectos,puntosTotal){\n let playersScores = {\n name : name,\n correctos : correctos,\n incorrectos : incorrectos,\n puntototal : puntosTotal\n }\n playerData.push(playersScores)\n sortPlayers(playerData)\n let text = \"\"\n\n playerData.forEach((player) => {\n if(player.puntototal < 0){\n text = \"😭😭😭😭 Dios Mio !! Esto es muy grave, tienes que estudiar más \"\n }else if(player.puntototal > 0 && player.puntototal <= 15){\n text = \"Muy bien !! No estas mal 😀😀😀\"\n }else if(player.puntototal > 15){\n text = \"🤩🤩🤩 Excelente !! pronto sustituirás a elon musk\"\n }\n console.log(`${player.name}\n Numero de pregunta corretcas : ${player.correctos} \n Numero de pregunta Incorrectas : ${player.incorrectos} \n Punto Total : ${player.puntototal}\n ${text}`);\n\n });\n }", "title": "" }, { "docid": "4a1cd5c3c5b0d40b2461775c2292fa18", "score": "0.5464522", "text": "function updateLeaderboard() {\n if (results.size == 0) {\n return;\n }\n\n // Sort all finished athlethes according time\n const resultSorted = new Map([...results.entries()].sort((a, b) => a[1] - b[1]));\n\n // Generate the result table and overwrite the old one.\n // Dirty, yep. But for this usecase, it is fine.\n var i = 1;\n var content = \"<table class=\\\"leaderboard-table\\\">\";\n for (let [key, value] of resultSorted) {\n content += `\n <tr>\n <td class=\"leaderboard-rank\">` + i + `.</td>\n <td class=\"leaderboard-name\">` + key + `</td>\n <td class=\"leaderboard-time\">` + timeToStr(value) + `</td>\n </tr>`;\n i++;\n }\n content += \"</table>\";\n $('#leaderboard').empty().append(content);\n}", "title": "" }, { "docid": "a7b6bd44f5198e146ccb0938b4a4a1e7", "score": "0.5460626", "text": "function printScores(SCOREBOARD){\n let entry, scoreDate, scoreAmount;\n HISTORYCONTAINER.innerHTML = '';\n for (let i = 0; i < 10 && i < SCOREBOARD.length; i++) {\n scoreAmount = SCOREBOARD[i].score;\n scoreDate = SCOREBOARD[i].date;\n entry = document.createElement('li');\n entry.innerHTML = scoreAmount + \" | \" + new Date(scoreDate);\n entry.classList.add('list-group-item');\n HISTORYCONTAINER.appendChild(entry);\n }\n}", "title": "" } ]
7bc8178c8a37051bcb72ed5df0cab35e
Converts a decimal to a hex value
[ { "docid": "1ffd14ee2f8c4c71c1e80c3d7495cbac", "score": "0.7507011", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n }", "title": "" } ]
[ { "docid": "0f74c7b04c41a26555442190c3b46e14", "score": "0.77600384", "text": "function convertDecimalToHex(d){return Math.round(parseFloat(d)*255).toString(16);}", "title": "" }, { "docid": "5292e775163b70a4dda95609d8dcbca6", "score": "0.76438844", "text": "function hex (dec) {return pad(parseInt(dec, 10).toString(16));}", "title": "" }, { "docid": "d783ad7d705476f992b383ceddbaacab", "score": "0.7615002", "text": "function convertDecimalToHex (d) {\r\n\t return Math.round(parseFloat(d) * 255).toString(16)\r\n\t }", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "a912bc1ac3b3190610b6eae7dd5a9ccb", "score": "0.7564213", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "8916ece030536b796ac9a19e0a8e5ce6", "score": "0.75610775", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n }", "title": "" }, { "docid": "bae2507efa718b007b69722d50e8fe48", "score": "0.7552267", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "dc7747fe350af39023f4255403631731", "score": "0.7533487", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n }", "title": "" }, { "docid": "b3b7e6aeb39e9c0c0405a693f728aeed", "score": "0.7517255", "text": "function convertDecimalToHex(d) {\n\t\treturn Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "b3b7e6aeb39e9c0c0405a693f728aeed", "score": "0.7517255", "text": "function convertDecimalToHex(d) {\n\t\treturn Math.round(parseFloat(d) * 255).toString(16);\n}", "title": "" }, { "docid": "be6e9d1a385bee5ed54bfa64d409a005", "score": "0.7515762", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n }", "title": "" }, { "docid": "95c647e5f2b44c9ea5ed4f35fe52524a", "score": "0.7507335", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n }", "title": "" }, { "docid": "56520d7e5840ae96e5a2e3d811c4a253", "score": "0.74803686", "text": "function dec2hex(value){\n var retval = '';\n var intnum;\n var tmpnum;\n var i = 0;\n\n intnum = parseInt(value,10);\n if (isNaN(intnum)){\n retval = 'NaN';\n }else{\n while (intnum > 0.9){\n i++;\n tmpnum = intnum;\n // cancatinate return string with new digit:\n retval = ConvArray[tmpnum % 16] + retval;\n intnum = Math.floor(tmpnum / 16);\n if (i > 100){\n // break infinite loops\n retval = 'NaN';\n break;\n }\n }\n }\n\tif(retval.length == 1)\n\t\tretval = '0' + retval;\n\telse if(retval.length == 0)\n\t\tretval = '00';\n return retval;\n}", "title": "" }, { "docid": "b2b8dadbbe8150821449d2097adaa4d3", "score": "0.7474269", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n }", "title": "" }, { "docid": "b2b8dadbbe8150821449d2097adaa4d3", "score": "0.7474269", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n }", "title": "" }, { "docid": "b2b8dadbbe8150821449d2097adaa4d3", "score": "0.7474269", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n }", "title": "" }, { "docid": "b2b8dadbbe8150821449d2097adaa4d3", "score": "0.7474269", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n }", "title": "" }, { "docid": "b2b8dadbbe8150821449d2097adaa4d3", "score": "0.7474269", "text": "function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n }", "title": "" }, { "docid": "e684d5d1527ef0f63393bae80eae62a6", "score": "0.7462278", "text": "function convertDecimalToHex(d) {\n\t\t\treturn Math.round(parseFloat(d) * 255).toString(16);\n\t}", "title": "" }, { "docid": "e684d5d1527ef0f63393bae80eae62a6", "score": "0.7462278", "text": "function convertDecimalToHex(d) {\n\t\t\treturn Math.round(parseFloat(d) * 255).toString(16);\n\t}", "title": "" }, { "docid": "179125b7bc5bdedcb8b69bdc030d4755", "score": "0.7453795", "text": "function convertDecimalToHex(d) {\n\t return Math.round(parseFloat(d) * 255).toString(16);\n\t}", "title": "" }, { "docid": "179125b7bc5bdedcb8b69bdc030d4755", "score": "0.7453795", "text": "function convertDecimalToHex(d) {\n\t return Math.round(parseFloat(d) * 255).toString(16);\n\t}", "title": "" }, { "docid": "179125b7bc5bdedcb8b69bdc030d4755", "score": "0.7453795", "text": "function convertDecimalToHex(d) {\n\t return Math.round(parseFloat(d) * 255).toString(16);\n\t}", "title": "" }, { "docid": "b0f8caddbb03b35dd1336ad8b0cdd43e", "score": "0.7404126", "text": "function convertDecimalToHex(d) {\n return Math1.round(parseFloat(d) * 255).toString(16);\n }", "title": "" }, { "docid": "4af3cf281886f7e1125c4dc136eafda2", "score": "0.73760164", "text": "function int_to_hex(num)\n{\n var hex = Math.round(num).toString(16);\n if (hex.length == 1)\n hex = '0' + hex;\n return hex;\n}", "title": "" }, { "docid": "741a1c9d7b7872fc99dd42b1e4ab95dc", "score": "0.73526454", "text": "function dec_to_hex(number)\n{\n\tvar hexbase='0123456789ABCDEF';\n\treturn hexbase.charAt((number>>4)&0xf)+hexbase.charAt(number&0xf);\n}", "title": "" }, { "docid": "b9259d2191c223bf90ff3211ce0c87b4", "score": "0.73485756", "text": "function int_to_hex(num) {\n var hex = Math.round(num).toString(16);\n if (hex.length == 1) hex = \"0\" + hex;\n return hex;\n}", "title": "" }, { "docid": "c04370762fbadef743be02738c6205fd", "score": "0.7345211", "text": "function toHex(d) {\n return (\"0\"+(Math.round(d).toString(16))).slice(-2).toUpperCase()\n}", "title": "" }, { "docid": "4f9724492e331288305d5f103158f188", "score": "0.7283163", "text": "function dec2hex(v) {return v.toString(16);}", "title": "" }, { "docid": "71448b77262e516017727f409a52e3ea", "score": "0.72471905", "text": "function hex(dec) {\r\n\t return parseInt(dec, 10).toString(16);\r\n\t }", "title": "" }, { "docid": "6ca1972e897a39ed39e81c5aef4bda9c", "score": "0.7229534", "text": "function toHex(c) {\n var hex = (Math.round(c)).toString(16);\n return hex.length == 1 ? \"0\" + hex : hex;\n }", "title": "" }, { "docid": "588144e064fa337fe640322cc5b7c20a", "score": "0.7186487", "text": "function hex(x)\n{\n var s = Number(x).toString(16);\n while (s.length < 4)\n s = 0 + s;\n return \"0x\" + s;\n}", "title": "" }, { "docid": "7aad16d4cfbe7b03dce3a2eb470bab23", "score": "0.7185174", "text": "function hex(dec) {\n return parseInt(dec, 10).toString(16);\n }", "title": "" }, { "docid": "7aad16d4cfbe7b03dce3a2eb470bab23", "score": "0.7185174", "text": "function hex(dec) {\n return parseInt(dec, 10).toString(16);\n }", "title": "" }, { "docid": "7aad16d4cfbe7b03dce3a2eb470bab23", "score": "0.7185174", "text": "function hex(dec) {\n return parseInt(dec, 10).toString(16);\n }", "title": "" }, { "docid": "21a085815d4a45bce762d626f7b613cf", "score": "0.71770036", "text": "function number2hex(value,digits) {\n\treturn padBeginning(digits, \"0\", value.toString(16));\n}", "title": "" }, { "docid": "4763adf0e7dd6ea463407fd382d87d4b", "score": "0.7176061", "text": "function hex(dec) {\r\n return parseInt(dec, 10).toString(16);\r\n }", "title": "" }, { "docid": "6c3f94128a0d86f32d4b9a8160e22887", "score": "0.7171898", "text": "function hex(value) {\n return '0x' + value.toString(16);\n}", "title": "" }, { "docid": "dedb5c91392f7ec810d70e8dc05c2515", "score": "0.71126944", "text": "function dec2Hex(num){\n if(num === 0) {\n return \"0x0\"\n }\n var newStr = ''\n const hex ={'10':'A','11':'B','12':'C','13':'D','14':'E','15':'F'}\n var rest = num\n var store = []\n \n while(rest>0){\n var remain = rest % 16\n \n store.push(remain)\n rest = Math.floor(rest/16)\n }\n for(var i = store.length-1;i>=0;i--){\n if(store[i]>9){\n newStr += hex[store[i]]\n }\n else{\n newStr += store[i]\n }\n }\n return \"0x\" + newStr\n}", "title": "" }, { "docid": "3f0e897feac06e957ec43acfcb418a2b", "score": "0.70813864", "text": "function toHex( d )\n {\n return ( \"0\" + ( Number( d ).toString( 16 ) ) ).slice( -2 ).toUpperCase()\n }", "title": "" }, { "docid": "94ba90aa7566fffce749882e4d0aff6f", "score": "0.7071365", "text": "function toHex(val) {\n return val.toString(16);\n}", "title": "" }, { "docid": "12d276ea1469bff2b89834c6f98237e1", "score": "0.70411974", "text": "toHex(num) {\n return `0x${num.toString(16).padStart(2, \"0\")}`;\n }", "title": "" }, { "docid": "49a87b973e4064c9f44005f2cf29f8f7", "score": "0.70304805", "text": "function hexToHex(){\n\t\t//Setup the variables\n\t\tlet hexBox = document.getElementById(\"hexBox\");\n\t\tlet decValue = document.getElementById(\"decBox\").value;\n\t\tlet listOf = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\"];\n\t\tlet hexBase = 16;\n\t\t\n\t\thexTo(hexBase, listOf, hexBox, decValue);\n\n\t}", "title": "" }, { "docid": "9a6842306b656716bb3e708615630b16", "score": "0.7028493", "text": "_toHex(val, nDigits = 2) {\n let hex = val.toString(16);\n while (hex.length < nDigits) {\n hex = \"0\" + hex;\n }\n return hex;\n }", "title": "" }, { "docid": "40365816a239b252f9f3379ff5941c85", "score": "0.7022714", "text": "function dec2hex (dec) {\n return ('0' + dec.toString(16)).substr(-2)\n}", "title": "" }, { "docid": "da87cfe383eb8908331077a4fa292539", "score": "0.70121664", "text": "function toHex(d) {\r\n return ('0' + Number(d).toString(16)).slice(-2)\r\n}", "title": "" }, { "docid": "a291538950d9d7a66f61073cdd52f9f3", "score": "0.6993365", "text": "function dec2hex(dec) {\n return ('0' + dec.toString(16)).substr(-2)\n }", "title": "" }, { "docid": "6ed2f87fb73558da25473c1f424041ac", "score": "0.6972058", "text": "function dec2hex(dec) {\r\n return dec.toString(16).padStart(2, \"0\");\r\n}", "title": "" }, { "docid": "d54b8a8020545734837992d5f4d65d54", "score": "0.6956481", "text": "function hex(x) {\n return ('0' + parseInt(x).toString(16)).slice(-2)\n }", "title": "" }, { "docid": "b2be5bd428f7145dcc89829599b90f23", "score": "0.69540936", "text": "function toHex(num) {\n return num < 0x10 ? \"0\" + num.toString(16) : num.toString(16);\n }", "title": "" }, { "docid": "20a9e0dc280348b444a8dfa40c7d54ca", "score": "0.6944702", "text": "function toHex(value, digits) {\n return value.toString(16).toUpperCase().padStart(digits, \"0\");\n}", "title": "" }, { "docid": "0c656dc999b24b5c8196d7ee0a7ae03f", "score": "0.69426316", "text": "function to_hex(number) {\n var n = number.toString(16).toUpperCase();\n for (var i = 2 - n.length; i > 0; i--) n = '0' + n;\n return '0x' + n;\n}", "title": "" }, { "docid": "708b779bfd266bca6b11ec4b2955e610", "score": "0.69392896", "text": "function hex(x) {\n x = x.toString(16);\n return (x.length == 1) ? '0' + x : x;\n}", "title": "" }, { "docid": "5737aeb508b207b2585e44148644d56d", "score": "0.6934096", "text": "function toHex(num) { // quick function for CSS colors\n var intNum = Math.floor(num);\n var outHex = ['0', '1', '2', '3', '4', '5',\n\t\t\t\t\t\t'6', '7', '8', '9', 'A', 'B',\n\t\t\t\t\t\t'C', 'D', 'E', 'F'];\n return outHex[intNum];\n }", "title": "" }, { "docid": "1e9125b9451d8351b6571185c1635a1e", "score": "0.69127715", "text": "function hex(x) {\n return (\"0\" + parseInt(x).toString(16)).slice(-2);\n}", "title": "" }, { "docid": "b47c20fe2f7909e752e46bb582b28215", "score": "0.6904776", "text": "function decimalToHex(d, enforceTwoChar=false) {\n var hex = d.toString(16).toUpperCase();\n if (enforceTwoChar && hex.length == 1) {\n hex = '0' + hex;\n }\n return hex;\n}", "title": "" }, { "docid": "433083eab1df0fac83921567e59ad133", "score": "0.68996054", "text": "function hextodec(hex_value){\n if (hex_value.length % 2) { hex_value = '0' + hex_value; }\n var bn = BigInt('0x' + hex_value);\n var d = bn.toString(10);\n return d;\n}", "title": "" }, { "docid": "cf2700cacbfbaa8040d53a793e2745d7", "score": "0.6869913", "text": "function ToHex(n){\tvar h, l;\n\tn = Math.round(n);\n\tl = n % 16;\n\th = Math.floor((n / 16)) % 16;\n\treturn (hexch[h] + hexch[l]);\n\t}", "title": "" }, { "docid": "63acf2f14aa57e10411a0f5824f4bffc", "score": "0.6856847", "text": "function dec2hexString(dec) {\n return '0x' + (dec+0x10000).toString(16).substr(-4).toUpperCase();\n}", "title": "" }, { "docid": "3c3ff496113d87e0cfe412051dcda6c4", "score": "0.6810593", "text": "toHex() {\n const t = this.value.toString(16).toUpperCase();\n return new Ss(`#${t}`);\n }", "title": "" }, { "docid": "69aeabb401fcb3bdcb944b32f5b82d8c", "score": "0.6801433", "text": "function parseDecToHex(val) {\n var first = Math.floor(val / 16);\n var second = val % 16;\n return choice[first] + choice[second];\n }", "title": "" }, { "docid": "0e68812158125b1ecb1d232e2d0b2124", "score": "0.6799596", "text": "function DecimalToHexadecimal(decimalNumberId, hexadecimalResultId) {\n\n var decimalNumber = parseInt(document.getElementById(decimalNumberId).value);\n var hexResult = document.getElementById(hexadecimalResultId);\n var remainderArray = [];\n var index = 0;\n var quotient;\n var letterFlag = false;\n\n /* If decimal number is less than 16, just get remainder. */\n if (decimalNumber > 15) {\n\n /* Using remainder operator, add remainder of dividing decimal number by 16 to remainder array. Then\n divide decimal number by 16 using Math.floor so that quotient will be rounded down. */\n remainderArray[index] = decimalNumber % 16;\n quotient = Math.floor(decimalNumber / 16);\n \n /* While quotient is more than zero, keep dividing and adding remainder to remainder array. */\n while(quotient > 0) {\n\n index++;\n remainderArray[index] = quotient % 16;\n quotient = Math.floor(quotient / 16);\n }\n }\n else remainderArray[index] = decimalNumber % 16;\n \n hexResult.value = \"\";\n /* For each remainder in array starting from last remainder, using case statement, if remainder number is between 10 and 15 inclusive, using table, convert numbers to their respective hexadecimal letters A through F and add to result string. If remainder is not between 10 and 15 inclusive, just to result string. */\n for (var i = remainderArray.length - 1; i >= 0; i--) {\n\n switch(remainderArray[i]) {\n case 10:\n case 11:\n case 12:\n case 13:\n case 14:\n case 15:\n hexResult.value += HexLetterOrIntegerConversionTable(remainderArray[i], letterFlag);\n break;\n default:\n hexResult.value += remainderArray[i].toString();\n }\n }\n}", "title": "" }, { "docid": "8d0b3f9f7d63490dcbaad394af9c3ade", "score": "0.67838997", "text": "function bnToHex(value) {\n return \"0x\" + value.toString(16);\n}", "title": "" }, { "docid": "3d6f40378710a0ee7e3d934a89262a5a", "score": "0.6771492", "text": "function decToHex(decNum) {\n\tlet num=decNum;\n\tlet hexnum='', hexdigit;\n\n\twhile(num>0) {\n\t\thexdigit=num%16;\n\t\tif (hexdigit > 9) {\n\t\t\thexdigit=String.fromCharCode(hexdigit+55); //as ASCII of 'A'=65\n\t\t}\n\t\t//we don't need below else part in JS: as in JS number+string=>string\n\t\telse { \n\t\t\thexdigit=String.fromCharCode(hexdigit+48); // as ASCII of '0'=48\n\t\t}\n\t\thexnum=hexdigit+hexnum;\n\t\tnum=truncFP(num/16);\n\t}\n\n\tif(decNum===0) {\n\t\thexnum=\"0\";\n\t}\n\t//to return the hex number with minimum 2 digits always\n\tif (decNum>=0 && decNum<=15) {\n\t\thexnum = \"0\"+hexnum;\n\t}\n\treturn hexnum;\n}", "title": "" } ]
4984fc3578294e606e61921f665e92d9
Realiza la carga de informacion en los labels correspondientes.
[ { "docid": "7d65d42788ac769e82754ae786e8e639", "score": "0.0", "text": "function cargarinfo(argument){\r\n\tid=argument[7];\r\n\t$.Lbl_NombreEjercicio.text=argument[0];\r\n\t$.Lbl_DescripcionEjer.value=argument[1];\r\n\t$.Lbl_Serie.text=\"Serie:\"+argument[6];\r\n\t$.Lbl_Repetecion.text=\"Repetición:\"+argument[3];\r\n\t$.Lbl_Peso.text=\"Peso:\"+argument[4]+\" kg\";\r\n\t$.Lbl_Descanso.text=\"Descanso:\"+argument[5]+\" min\";\r\n\t$.Lbl_Duracion.text=\"Duración:\"+argument[2]+\" min\";\r\n\tvideo+=id;\r\n\tnombre=argument[0];\r\n\t\r\n}", "title": "" } ]
[ { "docid": "9221a5dac9231f6690bbc84074e7b2b0", "score": "0.6522767", "text": "function setLabels(){\n catVal = $('#catChild').val();\n if(!catVal){\n catVal = $('#catMain').val();\n }\n common_labels = {\n 0: 'Частное',\n 1: 'Коммерческое'\n };\n job_labels = {\n 0: 'Резюме',\n 1: 'Вакансия'\n };\n if(typeof job_ids != 'undefined'){\n if(catVal in job_ids){\n $('#eventPriceLabel').text('Ставка');\n $('#eventChangeLabel').hide();\n $('#eventFreeLabel').hide();\n $('#jobType').show();\n $('#eventType option').each(function(){\n $(this).text( job_labels[ $(this).val() ] );\n });\n $('#eventType').trigger('refresh');\n }\n else{\n $('#eventPriceLabel').text('Цена');\n $('#eventChangeLabel').show();\n $('#eventFreeLabel').show();\n $('#jobType').hide();\n $('#eventType option').each(function(){\n $(this).text( common_labels[ $(this).val() ] );\n });\n $('#eventType').trigger('refresh');\n }\n }\n }", "title": "" }, { "docid": "d7e152a713d7190730417c8fd481c01b", "score": "0.6460756", "text": "function initLabels(){\n\t\t\tlabel = zoomContainer\n\t\t\t\t.append(\"svg\")\n\t\t\t\t.attr(\"class\", \"lables\")\n\t\t\t\t.selectAll(\".lables\")\n\t\t\t\t.data(nodes);\n\n\t\t\tcorrelationLabel = zoomContainer\n\t\t\t\t.append(\"svg\")\n\t\t\t\t.attr(\"class\", \"correlationLabel\")\n\t\t\t\t.selectAll(\".correlationLabel\")\n\t\t\t\t.data(links);\t\t\n\t\t}", "title": "" }, { "docid": "2aa0db2b309657d2b15679582a0a9371", "score": "0.6430332", "text": "function loadLabels()\n {\n // Get DZ Label\n DZLabel = dymo.label.framework.openLabelXml(getDZLabelXml());\n\n // Get Address Label\n addressLabel = dymo.label.framework.openLabelXml(getAddressLabelXml());\n\n // Get Tap Label\n tapeLabel = dymo.label.framework.openLabelXml(getTapeLabelXml());\n }", "title": "" }, { "docid": "e73cc917216e7e2955f6bdf19ce542e0", "score": "0.61538905", "text": "function setLabels() {\n\t\t\t\t\tvar data = [{\n\t\t\t\t\t\trights: [\"User\"],\n\t\t\t\t\t\tkey: \"title\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.AUDIT.LISTS.HEADER.TITLE\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\trights: [\"Supplier\"],\n\t\t\t\t\t\tkey: \"invoice\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.AUDIT.LISTS.HEADER.TYPE.SUPPLIER_INVOICE\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\trights: [\"Buyer\"],\n\t\t\t\t\t\tkey: \"invoice\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.AUDIT.LISTS.HEADER.TYPE.BUYER_INVOICE\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\trights: [\"Supplier\"],\n\t\t\t\t\t\tkey: \"purchase order\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.AUDIT.LISTS.HEADER.TYPE.SUPPLIER_ORDER\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\trights: [\"Buyer\"],\n\t\t\t\t\t\tkey: \"purchase order\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.AUDIT.LISTS.HEADER.TYPE.BUYER_ORDER\"\n\t\t\t\t\t}];\n\n\t\t\t\t\ttranslator.whenReady().then(function () {\n\t\t\t\t\t\t_.each(data, function (item) {\n\t\t\t\t\t\t\titem.label = translator.instantTranslate(item.label);\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tvm.labels = authorizedObjectsFilter.getAuthorizedObjectsAsAssociative(data, 'key', 'label');\n\t\t\t\t\t});\n\t\t\t\t}", "title": "" }, { "docid": "7a8b93d3c61431f39ede81632b38f451", "score": "0.61125475", "text": "function setLabels() {\n\t\t\t\t\tvar data = [{\n\t\t\t\t\t\trights: [\"User\"],\n\t\t\t\t\t\tkey: \"title\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.RELATED.LISTS.HEADER.TITLE\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\trights: [\"Supplier\"],\n\t\t\t\t\t\tkey: \"invoice\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.RELATED.LISTS.HEADER.TYPE.SUPPLIER_INVOICE\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\trights: [\"Buyer\"],\n\t\t\t\t\t\tkey: \"invoice\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.RELATED.LISTS.HEADER.TYPE.BUYER_INVOICE\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\trights: [\"Supplier\"],\n\t\t\t\t\t\tkey: \"order\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.RELATED.LISTS.HEADER.TYPE.SUPPLIER_ORDER\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\trights: [\"Buyer\"],\n\t\t\t\t\t\tkey: \"order\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.RELATED.LISTS.HEADER.TYPE.BUYER_ORDER\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\trights: [\"User\"],\n\t\t\t\t\t\tkey: \"grn\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.RELATED.LISTS.HEADER.TYPE.GRN\"\n\t\t\t\t\t}];\n\n\t\t\t\t\ttranslator.whenReady().then(function () {\n\t\t\t\t\t\t_.each(data, function (item) {\n\t\t\t\t\t\t\titem.label = translator.instantTranslate(item.label);\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tvm.labels = authorizedObjectsFilter.getAuthorizedObjectsAsAssociative(data, 'key', 'label');\n\t\t\t\t\t});\n\t\t\t\t}", "title": "" }, { "docid": "0922159b44ee1479a894dd77fc96ad01", "score": "0.6093887", "text": "function getLabelData( obj ) { // obj reprezentuje kliknięty element\n /* Dane językowe do etykiet */\n var langoza = {\n produkt: {'pl': 'produkt:', 'en': 'product:', 'de': 'Produkt'}, \n naklad: {'pl': 'zamówiona ilość:', 'en': 'ordered quantity:', 'de': 'Bestellmenge'},\n wbatonie: {'pl': 'ilość w opakowaniu:', 'en': 'batch:', 'de': 'Inhalt'},\n onr: {'pl': 'opakowanie nr:', 'en': 'batch no.:', 'de': 'Karton'},\n short: { // wersje krótkie, gdy ciasno\n produkt: {'pl': 'produkt:', 'en': 'product:', 'de': 'Produkt'}, \n naklad: {'pl': 'zamówione:', 'en': 'ordered qty:', 'de': 'Bestellmenge'},\n wbatonie: {'pl': 'w opakowaniu:', 'en': 'batch:', 'de': 'Inhalt'},\n onr: {'pl': 'opakowanie nr:', 'en': 'batch no.:', 'de': 'Karton'},\n }\n },\n \n label = { \n job: $(obj).data('produkcyjne'),\n order: $(obj).data('handlowe'),\n name: $(obj).data('product'),\n naklad: parseInt($(obj).data('naklad')),\n baton: $($(obj).parent().find(\"input\")).val(),\n // czy etykieta ma byc zbiorcza\n zbiorcza: $(obj).parent().hasClass('zbiorcza'),\n\n inbox: true, /* czy generujemy ilość w kart w batonie.\n False oznacza puste (miejsce na ręczny wpis) -> pociąga to równieżź za sobą fakt,\n że boxnr będzie false */\n licznik: true, /* numerowanie batonów, czyli 1, 2, 3.... */\n suma: true, /* sumowanie batonów - będzie (np.) 1/12, 2/12, ..., 12/12 */\n sumb: '',\n lnr: 1, // nr strony/batona, zaczynamy od 1, \n /* Słowa zależne od języka na etykiecie */\n labels: {\n produkt: langoza.produkt[$(obj).data('lang')],\n naklad: langoza.naklad[$(obj).data('lang')],\n wbatonie: langoza.wbatonie[$(obj).data('lang')],\n onr: langoza.onr[$(obj).data('lang')]\n },\n zakres: rangeService(obj, {\n produkt: langoza.short.produkt[$(obj).data('lang')],\n naklad: langoza.short.naklad[$(obj).data('lang')],\n wbatonie: langoza.short.wbatonie[$(obj).data('lang')],\n onr: langoza.short.onr[$(obj).data('lang')]\n }) \n };\n \n if( label.baton === \"\" || label.baton === null ) {\n /* Pole ilości w formularzu puste, sprawdzanie null na wszelki wypadek.\n * Znaczy, że użytkownik nie chce drukować ilości w batonie,\n * więc nie liczymy również sumy batonów, będzie tylko 1 etykieta */ \n label.baton = 0;\n label.inbox = false;\n } else {\n label.baton = parseInt(label.baton);\n label.left = label.naklad;\n }\n \n return label;\n}", "title": "" }, { "docid": "85c6ca8f621e246183818dfaaab46514", "score": "0.60735965", "text": "function setLabels () \n{\n\tRMPApplication.debug(\"begin setLabels\");\n\tc_debug(debug.chart, \"=> setLabels\"); \n\t$(\"#id_spinner_search\").show();\n\n\t// hide actual & previous period during definitions\n\tid_currMonth.hide();\n\tid_prevMonth.hide();\n\tid_currQuart.hide();\n\tid_prevQuart.hide();\n\tid_currExercise.hide();\n\tid_prevExercise.hide();\n\n\t// Definition of content labels\n\tvar curr_month = getLongMonth(Date.now());\n\tvar prev_month = getPrevLongMonth(Date.now());\n\tvar curr_quarter = getCurrentQuarter();\n\tvar prev_quarter = getPreviousQuarter();\n\tvar curr_year = getCurrentYear();\n\tvar prev_year = getPreviousYear(); \n\tvar next_year = getNextYear();\n\tvar today = new Date();\n\tvar num_curr_month = getNumberMonth(today);\n\n\tvar month_text = ${P_quoted(i18n('month_period_text', 'Mois'))};\n\tvar quarter_text = ${P_quoted(i18n('quarter_period_text', 'Q'))};\n\tvar year_text = ${P_quoted(i18n('year_period_text', 'Exercice'))};\n\n\tid_currMonth.append(month_text + ': ' + curr_month);\n\tid_prevMonth.append(month_text + ': ' + prev_month);\n\tid_currQuart.append(quarter_text + curr_quarter.num + ' - ' + curr_quarter.year);\n\tid_prevQuart.append(quarter_text + prev_quarter.num + ' - ' + prev_quarter.year);\n\n\tif (FIRSTMONTHOFEXERCISE == \"01\") {\n\t\tid_currExercise.append(year_text + ': ' + curr_year);\n\t\tid_prevExercise.append(year_text + ': ' + prev_year);\t\t\t\n\t} else {\n\t\tif (num_curr_month < FIRSTMONTHOFEXERCISE) {\n\t\t\tprev_year -= 1;\n\t\t\tcurr_year -= 1;\n\t\t\tnext_year -= 1;\n\t\t}\n\t\tid_currExercise.append(year_text + ': ' + curr_year + ' / ' + next_year);\n\t\tid_prevExercise.append(year_text + ': ' + prev_year + ' / ' + curr_year);\n\t}\n\tRMPApplication.debug(\"end setLabels\");\n}", "title": "" }, { "docid": "f169213c89fd74c0a373ebe7718d60cf", "score": "0.6044337", "text": "function setLabels() {\n\t\t\t\t\tvar data = [{\n\t\t\t\t\t\trights: [\"Supplier\"],\n\t\t\t\t\t\tkey: \"title\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.PURCHASE_ORDERS.VIEWER.VIEW.HEADER.TITLE_SUPPLIER\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\trights: [\"Buyer\"],\n\t\t\t\t\t\tkey: \"title\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.PURCHASE_ORDERS.VIEWER.VIEW.HEADER.TITLE_BUYER\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\trights: [\"Supplier\"],\n\t\t\t\t\t\tkey: \"orderNumber\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.PURCHASE_ORDERS.VIEWER.COMPONENTS.DETAILS.PURCHASE_ORDER_NUMBER_SUPPLIER\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\trights: [\"Buyer\"],\n\t\t\t\t\t\tkey: \"orderNumber\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.PURCHASE_ORDERS.VIEWER.COMPONENTS.DETAILS.PURCHASE_ORDER_NUMBER_BUYER\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\trights: [\"Supplier\"],\n\t\t\t\t\t\tkey: \"detailsHeading\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.PURCHASE_ORDERS.VIEWER.COMPONENTS.DETAILS.HEADING_SUPPLIER\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\trights: [\"Buyer\"],\n\t\t\t\t\t\tkey: \"detailsHeading\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.PURCHASE_ORDERS.VIEWER.COMPONENTS.DETAILS.HEADING_BUYER\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\trights: [\"Supplier\"],\n\t\t\t\t\t\tkey: \"notLoaded\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.PURCHASE_ORDERS.VIEWER.COULD_NOT_LOAD_PURCHASE_ORDER\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\trights: [\"Buyer\"],\n\t\t\t\t\t\tkey: \"notLoaded\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.PURCHASE_ORDERS.VIEWER.COULD_NOT_LOAD_SALES_ORDER\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\trights: [\"PurchaseOrderFlipper\"],\n\t\t\t\t\t\tkey: \"flipOrder\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.PURCHASE_ORDERS.VIEWER.ACTIONS.FLIP_ORDER_BUYER\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\trights: [\"Supplier\"],\n\t\t\t\t\t\tkey: \"audit_title\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.PURCHASE_ORDERS.VIEWER.VIEW.HEADER.AUDIT_TITLE_SUPPLIER\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\trights: [\"Buyer\"],\n\t\t\t\t\t\tkey: \"audit_title\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.PURCHASE_ORDERS.VIEWER.VIEW.HEADER.AUDIT_TITLE_BUYER\"\n\t\t\t\t\t}];\n\n\t\t\t\t\tvm.labels = authorizedObjectsFilter.getAuthorizedObjectsAsAssociative(data, 'key', 'label');\n\t\t\t\t}", "title": "" }, { "docid": "4274fb724a4044a4918f908c7d5563e0", "score": "0.6034149", "text": "function setLabels() {\n\t\t\t\tvar data = [{\n\t\t\t\t\trights: [\"Supplier\"],\n\t\t\t\t\tkey: \"orders\",\n\t\t\t\t\tlabel: \"EINVOICING.COMPONENTS.NAVIGATION.ORDERS_SUPPLIER\"\n\t\t\t\t}, {\n\t\t\t\t\trights: [\"Buyer\"],\n\t\t\t\t\tkey: \"orders\",\n\t\t\t\t\tlabel: \"EINVOICING.COMPONENTS.NAVIGATION.ORDERS_BUYER\"\n\t\t\t\t}, {\n\t\t\t\t\trights: [\"Supplier\"],\n\t\t\t\t\tkey: \"newOrder\",\n\t\t\t\t\tlabel: \"EINVOICING.COMPONENTS.NAVIGATION.ORDER_SUPPLIER\"\n\t\t\t\t}, {\n\t\t\t\t\trights: [\"Buyer\"],\n\t\t\t\t\tkey: \"newOrder\",\n\t\t\t\t\tlabel: \"EINVOICING.COMPONENTS.NAVIGATION.ORDER_BUYER\"\n\t\t\t\t}, {\n\t\t\t\t\trights: [\"Supplier\"],\n\t\t\t\t\tkey: \"invoices\",\n\t\t\t\t\tlabel: \"EINVOICING.COMPONENTS.NAVIGATION.INVOICES_SUPPLIER\"\n\t\t\t\t}, {\n\t\t\t\t\trights: [\"Buyer\"],\n\t\t\t\t\tkey: \"invoices\",\n\t\t\t\t\tlabel: \"EINVOICING.COMPONENTS.NAVIGATION.INVOICES_BUYER\"\n\t\t\t\t}, {\n\t\t\t\t\trights: [\"Supplier\"],\n\t\t\t\t\tkey: \"newInvoice\",\n\t\t\t\t\tlabel: \"EINVOICING.COMPONENTS.NAVIGATION.INVOICE_SUPPLIER\"\n\t\t\t\t}, {\n\t\t\t\t\trights: [\"Buyer\"],\n\t\t\t\t\tkey: \"newInvoice\",\n\t\t\t\t\tlabel: \"EINVOICING.COMPONENTS.NAVIGATION.INVOICE_BUYER\"\n\t\t\t\t}, {\n\t\t\t\t\trights: [\"Supervisor\"],\n\t\t\t\t\tkey: \"users\",\n\t\t\t\t\tlabel: \"EINVOICING.COMPONENTS.NAVIGATION.USERS\"\n\t\t\t\t}, {\n\t\t\t\t\trights: [\"Supplier\"],\n\t\t\t\t\tkey: \"partyManagement\",\n\t\t\t\t\tlabel: \"EINVOICING.COMPONENTS.NAVIGATION.BUYERS\"\n\t\t\t\t}, {\n\t\t\t\t\trights: [\"Buyer\"],\n\t\t\t\t\tkey: \"partyManagement\",\n\t\t\t\t\tlabel: \"EINVOICING.COMPONENTS.NAVIGATION.SUPPLIERS\"\n\t\t\t\t}, {\n\t\t\t\t\trights: [\"Supplier\", \"Buyer\"],\n\t\t\t\t\tkey: \"myPartyManagement\",\n\t\t\t\t\tlabel: \"EINVOICING.COMPONENTS.NAVIGATION.PARTY_MANAGEMENT\"\n\t\t\t\t}];\n\n\t\t\t\tvm.labels = authorizedObjectsFilter.getAuthorizedObjectsAsAssociative(data, 'key', 'label');\n\t\t\t\tvm.canManageUsers = util.isDefined(vm.labels.users);\n\t\t\t\tvm.canCreateDocuments = userRightsRepository.userHasRight('Supplier') && userRightsRepository.userHasRight('InvoiceWriter') && userRightsRepository.userHasRight('InvoiceCreator');\n\n\t\t\t\tpartyFeatureEnabledService.getPartyFeatureEnabled(1).then(function (result) {\n\t\t\t\t\tvm.canAccessIntegrator = result;\n\t\t\t\t});\n\t\t\t}", "title": "" }, { "docid": "500d3cb42d15198070261db18b555b3c", "score": "0.60234654", "text": "function setLabels() {\n var data = [{\n rights: [\"Supplier\"],\n key: \"titleEdit\",\n label: \"EINVOICING.PORTAL.INVOICES.EDITOR.EDIT.HEADER.TITLE_SUPPLIER\"\n }, {\n rights: [\"Buyer\"],\n key: \"titleEdit\",\n label: \"EINVOICING.PORTAL.INVOICES.EDITOR.EDIT.HEADER.TITLE_BUYER\"\n }, {\n rights: [\"Supplier\"],\n key: \"titleNew\",\n label: \"EINVOICING.PORTAL.INVOICES.EDITOR.NEW.HEADER.TITLE_SUPPLIER\"\n }, {\n rights: [\"Buyer\"],\n key: \"titleNew\",\n label: \"EINVOICING.PORTAL.INVOICES.EDITOR.NEW.HEADER.TITLE_BUYER\"\n }];\n\n vm.labels = authorizedObjectsFilter.getAuthorizedObjectsAsAssociative(data, 'key', 'label');\n\n if (vm.mode === 'edit') {\n vm.labels.title = vm.labels.titleEdit;\n } else {\n vm.labels.title = vm.labels.titleNew;\n }\n }", "title": "" }, { "docid": "76e13def8515fe947dda884634c03554", "score": "0.60161626", "text": "function setLabels() {\n\t\t\t\t\tvar data = [{\n\t\t\t\t\t\trights: [\"Supplier\"],\n\t\t\t\t\t\tkey: \"title\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.INVOICES.VIEWER.HEADER.TITLE_SUPPLIER\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\trights: [\"Buyer\"],\n\t\t\t\t\t\tkey: \"title\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.INVOICES.VIEWER.HEADER.TITLE_BUYER\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\trights: [\"Supplier\"],\n\t\t\t\t\t\tkey: \"audit_title\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.INVOICES.VIEWER.HEADER.AUDIT_TITLE_SUPPLIER\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\trights: [\"Buyer\"],\n\t\t\t\t\t\tkey: \"audit_title\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.INVOICES.VIEWER.HEADER.AUDIT_TITLE_BUYER\"\n\t\t\t\t\t}];\n\n\t\t\t\t\tvm.labels = authorizedObjectsFilter.getAuthorizedObjectsAsAssociative(data, 'key', 'label');\n\t\t\t\t}", "title": "" }, { "docid": "c239a1d27d8488a1a6b4ea219ac6762e", "score": "0.6007731", "text": "setAllLabels(label){\n this.panel.labelMessage.length = 0;\n for(var key in this.panel.platformChildren){\n this.panel.platformChildren[key].defect.name = label;\n if(this.panel.platformChildren[key].defect.value){\n this.panel.labelMessage.push(this.panel.platformChildren[key].name + \"-\" +\n this.panel.platformChildren[key].defect.name);\n }\n }\n ctrl.render();\n }", "title": "" }, { "docid": "da583d9d3c4a71b19c97a553387c77dd", "score": "0.59481305", "text": "update_lbl() {\n if(this.m2m_attrs.lbl == undefined) this.m2m_attrs.lbl = [];\n this.m2m_attrs.lbl[0] = 'esi';\n // this.m2m_attrs.lbl[1] = JSON.stringify(['esi:sae', this.state(), this.esi_attrs.service_dir.generate_pairs()]);\n this.m2m_attrs.lbl[1] = JSON.stringify(['esi:sae', this.state(), this.services()]);\n // this.attrs.lbl[1] = ['esi:sae', this.state(), JSON.stringify(this.esi_attrs.service_dir.generate_pairs())];\n }", "title": "" }, { "docid": "a2e3fc25611aebd2a073257334867e71", "score": "0.59263766", "text": "function bindLabels(data) {\n $scope.vaccinationLables = data.labels;\n }", "title": "" }, { "docid": "f217f0f9715c512e797b28116ac536fe", "score": "0.5912846", "text": "function setLabels() {\n\t\t\t\t\tvar data = [{\n\t\t\t\t\t\trights: [\"Supplier\"],\n\t\t\t\t\t\tkey: \"title\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.INVOICES.LISTS.HEADER.TITLE_SUPPLIER\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\tkey: \"title\",\n\t\t\t\t\t\trights: [\"Buyer\"],\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.INVOICES.LISTS.HEADER.TITLE_BUYER\"\n\t\t\t\t\t}];\n\n\t\t\t\t\tvm.labels = authorizedObjectsFilter.getAuthorizedObjectsAsAssociative(data, 'key', 'label');\n\t\t\t\t}", "title": "" }, { "docid": "efda72bc08eb37729807988d38f7cc78", "score": "0.5907245", "text": "function labels (foci) {\n bubblecontainer.selectAll(\".label\").remove();\n\n bubblecontainer.selectAll(\".label\")\n .data(_.toArray(foci)).enter().append(\"text\")\n .attr(\"class\", \"label\")\n .text(function (d) { return d.name + \" \" + d3.format(\",.0f\")(d.degrees) + \" degrees\"})\n .attr(\"transform\", function (d) {\n return \"translate(\" + (d.x) + \",\" \n + (d.y - d.dx/10) + \")\";\n })\n .attr(\"text-anchor\", \"middle\")\n .call(wrap);\n }", "title": "" }, { "docid": "6f35aec8b211554144a6ec2133af881e", "score": "0.59068024", "text": "function initLabels() {\n checkLabelExists();\n\n var itemsToLabel = [AdsApp.adGroups(), AdsApp.shoppingAdGroups()];\n\n for (i = 0; i < itemsToLabel.length; i++) {\n var iterator = getSelector(itemsToLabel[i]).get();\n\n while (iterator.hasNext()) {\n iterator.next().applyLabel(LABEL_PROCESSING);\n }\n }\n}", "title": "" }, { "docid": "4485ea92857165a2cab1bcb885e260f4", "score": "0.58734655", "text": "function showinfo(data) {\n var cont = $(\"#label_list\");\n\n data.forEach(function (elt,i) {\n cont.append($('<div><input name=\"labels\" type=checkbox id='+i+' value=\"'+elt+'\">' + elt + \"</div>\"));\n });\n $(\"#data\").show();\n\n // Initiailize them\n // FIXME: This code is repeated below.\n var connectionData = {server:null, labels:[]};\n if(tableau.connectionData)\n connectionData = JSON.parse(tableau.connectionData);\n connectionData.labels.forEach(function (label) {\n var e = $('input[value=\"'+label+'\"]');\n if(e) e.prop(\"checked\",true);\n });\n\n $(\"#query\").val(connectionData.queries[0]);\n }", "title": "" }, { "docid": "116a71ee749f6c94578dce93cdae8192", "score": "0.58494925", "text": "function setLabels() {\n\t\t\t\t\tvar data = [{\n\t\t\t\t\t\trights: [\"Supplier\"],\n\t\t\t\t\t\tkey: \"title\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.PURCHASE_ORDERS.LISTS.HEADER.TITLE_SUPPLIER\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\tkey: \"title\",\n\t\t\t\t\t\trights: [\"Buyer\"],\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.PURCHASE_ORDERS.LISTS.HEADER.TITLE_BUYER\"\n\t\t\t\t\t}];\n\n\t\t\t\t\tvm.labels = authorizedObjectsFilter.getAuthorizedObjectsAsAssociative(data, 'key', 'label');\n\t\t\t\t}", "title": "" }, { "docid": "f8db434003e925dd95f7ac640087053c", "score": "0.5832408", "text": "function setLabels() {\n\t\t\t\t\tvar data = [{\n\t\t\t\t\t\trights: [\"Supplier\"],\n\t\t\t\t\t\tkey: \"title\",\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.GRN.LISTS.HEADER.TITLE_SUPPLIER\"\n\t\t\t\t\t}, {\n\t\t\t\t\t\tkey: \"title\",\n\t\t\t\t\t\trights: [\"Buyer\"],\n\t\t\t\t\t\tlabel: \"EINVOICING.PORTAL.GRN.LISTS.HEADER.TITLE_BUYER\"\n\t\t\t\t\t}];\n\n\t\t\t\t\tvm.labels = authorizedObjectsFilter.getAuthorizedObjectsAsAssociative(data, 'key', 'label');\n\t\t\t\t}", "title": "" }, { "docid": "36bb12d7a8787023c7ef816105d602d5", "score": "0.5759092", "text": "function addLabels() {\n\n\t\t\t\t// Removes all labels so we can simply add the right ones later\n\t\t\t\tsvg.selectAll(\".label_holder\")\n\t\t\t\t\t.remove();\n\n\t\t\t\t// Adds informative text for the regionId and hoverId\n\t\t\t\tlet labelHolders = svg.selectAll(\".labels\")\n\t\t\t\t\t.data(nested.filter(d => (d.key == regionId) | (d.key == hoverId)))\n\t\t\t\t\t.enter()\n\t\t\t\t\t.append(\"g\")\n\t\t\t\t\t.attr(\"class\", \"label_holder\")\n\t\t\t\t\t.attr(\"id\", d => `label_${d.key}`);\n\n\t\t\t\tlabelHolders.append(\"text\")\n\t\t\t\t\t.attr(\"class\", \"line_label_day_count\")\n\t\t\t\t\t.text(d => `${+d.values[d.values.length - 1].days_since_outbreak}º dia após 1º caso`)\n\t\t\t\t\t.attr(\"x\", d => xPositionScale(+d.values[d.values.length - 1].days_since_outbreak))\n\t\t\t\t\t.attr(\"y\", d => yPositionScale(+d.values[d.values.length - 1][measure]))\n\t\t\t\t\t.attr(\"dx\", 2)\n\t\t\t\t\t.attr(\"dy\", -30)\n\n\n\t\t\t\tlabelHolders.append(\"text\")\n\t\t\t\t\t.attr(\"class\", \"line_label_title\")\n\t\t\t\t\t.attr(\"x\", d => xPositionScale(+d.values[d.values.length - 1].days_since_outbreak))\n\t\t\t\t\t.attr(\"y\", d => yPositionScale(+d.values[d.values.length - 1][measure]))\n\t\t\t\t\t.text(d => `${d.values[0].nome_micro} (${d.values[0].state})`)\n\t\t\t\t\t.attr(\"dx\", 2)\n\t\t\t\t\t.attr(\"dy\", -15);\n\n\n\t\t\t\tlabelHolders.append(\"text\")\n\t\t\t\t\t.attr(\"class\", \"line_label_content\")\n\t\t\t\t\t.attr(\"x\", d => xPositionScale(+d.values[d.values.length - 1].days_since_outbreak))\n\t\t\t\t\t.attr(\"y\", d => yPositionScale(+d.values[d.values.length - 1][measure]))\n\t\t\t\t\t.text(function(d) {\n\n\t\t\t\t\t\tlet unit = [\"last_available_confirmed\", \"new_confirmed_rolling\"].includes(measure) ? \"casos\" : \"mortes\"\n\n\t\t\t\t\t\tif ([\"last_available_confirmed\", \"last_available_deaths\"].includes(measure)) {\n\t\t\t\t\t\t\treturn ` ${+d.values[d.values.length - 1][measure]} ${unit} no total`\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\treturn `Média de ${Math.floor(+d.values[d.values.length - 1][measure])} ${unit}`;\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t.attr(\"dx\", 2)\n\t\t\t\t\t.attr(\"dy\", 0);\n\n\t\t\t\tlabelHolders.append(\"text\")\n\t\t\t\t\t.text(function(d){\n\n\t\t\t\t\t\tif ([\"last_available_confirmed\", \"last_available_deaths\"].includes(measure)) {\n\t\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\treturn \"nos últimos 5 dias\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t})\n\t\t\t\t\t.attr(\"class\", \"line_label_content\")\n\t\t\t\t\t.attr(\"x\", d => xPositionScale(+d.values[d.values.length - 1].days_since_outbreak))\n\t\t\t\t\t.attr(\"y\", d => yPositionScale(+d.values[d.values.length - 1][measure]))\n\t\t\t\t\t.attr(\"dx\", 2)\n\t\t\t\t\t.attr(\"dy\", 15);\n\n\t\t\t}", "title": "" }, { "docid": "5e13199898cc0dcff57cc15fc50cf57a", "score": "0.5756373", "text": "function drawLabels() {\n\t drawDataLabels();\n\t updateCompositeLabels();\n\t }", "title": "" }, { "docid": "a94e8129b8be81fafdec4772cadd2f69", "score": "0.57509446", "text": "createLabelRepresentation(labels) {\n let ic = this.icn3d,\n me = ic.icn3dui\n let oriFactor = ((3 * ic.oriMaxD) / 100) * ic.labelScale\n\n for (let name in labels) {\n let labelArray = labels[name] !== undefined ? labels[name] : []\n\n for (let i = 0, il = labelArray.length; i < il; ++i) {\n let label = labelArray[i]\n // make sure fontsize is a number\n\n if (label.size == 0) label.size = undefined\n if (label.color == 0) label.color = undefined\n if (label.background == 0) label.background = undefined\n\n let labelsize = label.size !== undefined ? label.size : ic.LABELSIZE\n let labelcolor = label.color !== undefined ? label.color : '#ffff00'\n let labelbackground = label.background !== undefined ? label.background : '#cccccc'\n let labelalpha = label.alpha !== undefined ? label.alpha : 1.0\n\n // if label.background is undefined, no background will be drawn\n labelbackground = label.background\n\n if (\n labelcolor !== undefined &&\n labelbackground !== undefined &&\n labelcolor.toLowerCase() === labelbackground.toString().toLowerCase()\n ) {\n labelcolor = '#888888'\n }\n\n let bb\n if (label.bSchematic !== undefined && label.bSchematic) {\n bb = this.textSpriteCls.makeTextSprite(label.text, {\n fontsize: parseInt(labelsize),\n textColor: labelcolor,\n borderColor: labelbackground,\n backgroundColor: labelbackground,\n alpha: labelalpha,\n bSchematic: 1,\n factor: oriFactor,\n })\n } else {\n if (label.text.length === 1) {\n bb = this.textSpriteCls.makeTextSprite(label.text, {\n fontsize: parseInt(labelsize),\n textColor: labelcolor,\n borderColor: labelbackground,\n backgroundColor: labelbackground,\n alpha: labelalpha,\n bSchematic: 1,\n factor: oriFactor,\n })\n } else {\n let factor = label.factor ? oriFactor * label.factor : oriFactor\n\n bb = this.textSpriteCls.makeTextSprite(label.text, {\n fontsize: parseInt(labelsize),\n textColor: labelcolor,\n borderColor: labelbackground,\n backgroundColor: labelbackground,\n alpha: labelalpha,\n bSchematic: 0,\n factor: factor,\n })\n }\n }\n\n bb.position.set(label.position.x, label.position.y, label.position.z)\n ic.mdl.add(bb)\n // do not add labels to objects for pk\n }\n }\n }", "title": "" }, { "docid": "431913c5c29ca0b9ff16ffbaf7759382", "score": "0.57312614", "text": "function addNewLabels() {\r\n var label;\r\n var labelDiv;\r\n\r\n for (var i = 0, len = _ticks.length; i < len; i++) {\r\n label = _ticks[i].label;\r\n if (label && !label.hasClass('cz-timescale-label')) {\r\n labelDiv = label[0];\r\n labelsDiv[0].appendChild(labelDiv);\r\n label.addClass('cz-timescale-label');\r\n label._size = {\r\n width: labelDiv.offsetWidth,\r\n height: labelDiv.offsetHeight\r\n };\r\n }\r\n }\r\n }", "title": "" }, { "docid": "b49290741653d7c8324c0e5065de602d", "score": "0.56925577", "text": "function placeTitrePC(objet, papa, id, m){\n var image = document.getElementById(id + \"@\" + objet.Nom);\n // var h = image.offsetHeight;\n var label = document.createElement(\"label\");\n label.id = \"label \" + image.id;\n label.name = \"label PC\";\n label.innerText = formatHostname(objet.Nom);\n label.className = \"poubelle labelPC\";\n label.style.position = \"absolute\";\n label.style.left = image.offsetLeft - 20 + 'px';\n label.style.width = image.offsetWidth + 40 + 'px'; \n label.style.top = image.offsetTop + image.offsetHeight + \"px\"; \n label.style.textAlign=\"center\";\n label.style.background = \"#F0F0F0\";\n \n label.style.backgroundColor = \"#\" + config.Moyen.PC.Couleur;\n label.style.border = config.Moyen.PC.Hostname.Epaisseur + \"px solid #\" + config.Moyen.PC.Hostname.Couleur;\n label.style.borderRadius = config.Moyen.PC.Hostname.Angle + \"%\";\n label.style.color = \"#\" + config.Moyen.PC.Hostname.PoliceCouleur;\n label.style.fontSize = config.Moyen.PC.Hostname.PoliceTaille + \"pt\";\n\n papa.appendChild(label);\n\n var n = label.offsetHeight + 5;\n image.style.marginBottom = n + \"px\";\n }", "title": "" }, { "docid": "3baa6362def2037c1241e8a785f91cac", "score": "0.56777954", "text": "function setLabel(props){\n //label content\n var labelAttribute = \"<h1>\" + props[expressed] +\n \"</h1><b>\" + expressed + \"</b>\";\n \n //create info label div\n var infolabel = d3.select(\"body\")\n .append(\"div\")\n .attr(\"class\", \"infolabel\")\n .attr(\"id\", props.adm1_code + \"_label\")\n .html(labelAttribute);\n \n var regionName = infolabel.append(\"div\")\n .attr(\"class\", \"labelname\")\n .html(props.name);\n }", "title": "" }, { "docid": "fecd1076bdd43f106cea051e9bca8206", "score": "0.5661799", "text": "function bindLabels(data) {\n $scope.livingLables = data.labels;\n }", "title": "" }, { "docid": "50422380aa2bf2d41939464b53055f38", "score": "0.56566036", "text": "function handleLabels(labels) {\n setLabels(JSON.stringify(labels))\n const temp = labels\n temp.map((label) => {\n if (existingLabels.includes(label.value) === false && JSON.stringify(label.value) !== 'None') {\n const data = {'labels': JSON.stringify(label.value)}\n axios.post(`http://localhost:5000/labels/${store.getState().id}`, data)\n setExistingLabels(existingLabels => [...existingLabels, label.value])\n }\n })\n }", "title": "" }, { "docid": "62608ab2370dbcca5cbab8e1cff167a7", "score": "0.5624658", "text": "function populateDatumLabels () {\n const datumLabelsPlaceholders = document.getElementsByClassName('datum-labels');\n const datumLabels = activeObj.labels;\n for (let i = 0; i < datumLabelsPlaceholders.length; i++) {\n datumLabelsPlaceholders[i].innerHTML = datumLabels[i];\n }\n}", "title": "" }, { "docid": "0150abdf499a57aaf04b34a078acaa98", "score": "0.5624171", "text": "function setLabel(props){\r\n \r\n //label content\r\n var split = expressed.split(\"_\", 1);\r\n var labelAttribute = \"<h4>\" + props[expressed] + \" gallons of \" + split + \"</h4>\";\r\n \r\n //create info label div\r\n var infolabel = d3.select(\"body\")\r\n .append(\"div\")\r\n .attr(\"class\", \"infolabel\")\r\n .attr(\"id\", props.expressed + \"_label\")\r\n .html(labelAttribute);\r\n \r\n var regionName = infolabel.append(\"div\")\r\n .attr(\"class\", \"labelname\")\r\n .html(props.NAME);\r\n \r\n }", "title": "" }, { "docid": "d7275fa9d4a8fa7a29c0843f561afba3", "score": "0.56015664", "text": "function formulario_cargar_ruta_previsualizar() {\n // puntos seleccionados en la lista\n var puntos = $('#slc-puntos-seleccionados li');\n\n // formatear puntos para agregarlos al mapa\n puntos.each(function (i, punto) {\n var id = $(punto).attr(\"data-id\");\n var icono = $(punto).attr(\"data-icono\");\n var color = $(punto).attr(\"data-color\");\n var latitud = parseFloat($(punto).attr(\"data-latitud\")).toFixed(6);\n var longitud = parseFloat($(punto).attr(\"data-longitud\")).toFixed(6);\n var latlng = {\n lat: latitud,\n lng: longitud\n };\n var orden = i + 1;\n\n var iconoURL = base_url + \"/images/iconosTiposPI/\" + icono + \"/\" + color.replace(\"#\", \"_\") + \".png\";\n var iconoLayer = L.icon({\n iconUrl: iconoURL,\n iconSize: [32, 32]\n });\n\n var markerPunto = [];\n // buscamos si el punto ya esta en el mapa\n $.each(formulario_cargar_ruta_puntos_array_markers, function (f, marker) {\n if (marker.options.id === id) {\n markerPunto = marker;\n }\n });\n\n // si el punto no esta en el mapa lo agregamos\n if (markerPunto.length === 0) {\n markerPunto = L.marker(latlng, {\n id: id,\n icon: iconoLayer,\n color: color,\n orden: [orden]\n }).bindTooltip(\"\", {\n permanent: true,\n className: \"labelNoArrow\"\n });\n\n markerPunto.addTo(modulo_mapa);\n formulario_cargar_ruta_puntos_array_markers.push(markerPunto);\n } else {\n markerPunto.options.orden.push(orden);\n }\n\n formulario_carga_punto_editar_label(markerPunto);\n });\n\n // centramos el mapa en los puntos\n setTimeout(function () {\n centrarMapaEn_MarkerArray(formulario_cargar_ruta_puntos_array_markers);\n }, 350);\n\n var routing = $('#checkbox-routing').prop('checked'); // routing si/no\n if (routing) { // si esta habilitado mostramos la ruta calculada en el mapa\n var url_routing = \"https://route.cit.api.here.com/routing/7.2/calculateroute.json\";\n\n // ruta vehiculo\n var rutaVehiculo = $(\"#panel-routing > div.panel-secundario-body .btn-vehiculo.mdc-button--raised\").attr(\"data-valor\");\n\n // ruta excluir\n var rutaEvitar = \"\";\n $.each($(\"#panel-routing > div.panel-secundario-body .btn-excluir.mdc-button--excluir\"), function (i, item) {\n rutaEvitar += $(item).attr(\"data-valor\") + \":-2,\";\n });\n // borrar la ultima \",\"\n rutaEvitar = rutaEvitar.replace(/,\\s*$/, \"\");\n\n // ruta modo\n var rutaModo = \"fastest\";\n // si no es un camion leemos que elijio el usuario\n if (rutaVehiculo !== \"truck\") {\n rutaModo = $(\"#panel-routing > div.panel-secundario-body .btn-modo.mdc-button--raised\").attr(\"data-valor\");\n }\n\n // ruta trafico\n var rutaTrafico = $(\"#panel-routing > div.panel-secundario-body .btn-trafico.mdc-button--raised\").attr(\"data-valor\");\n\n // ruta color\n var rutaColor = $(\"#slc-color\").css(\"background-color\");\n\n // ruta grosor\n var rutaGrosor = (parseFloat($(\"#panel-routing #sld-grosor\").attr(\"aria-valuenow\")) / 10).toFixed(2);\n\n // ruta opacidad\n var rutaOpacidad = (parseFloat($(\"#panel-routing #sld-opacidad\").attr(\"aria-valuenow\")) / 100).toFixed(2);\n\n var parametros = {};\n //parametros.app_id = \"kDw247ifuRx8FSdbfLCR\";\n //parametros.app_code = \"GA9UZVt8ou_tUlV4u5Q6jQ\";\n parametros.app_id = \"s09rHdXJFlM2k0CbVQgh\";\n parametros.app_code = \"v3NSGBFUbs8M2NtrTNNB0Q\";\n parametros.jsonAttributes = \"1\";\n parametros.mode = rutaModo + \";\" + rutaVehiculo + \";traffic:\" + rutaTrafico + \";\" + rutaEvitar;\n parametros.routeAttributes = \"legs\";\n parametros.legAttributes = \"maneuvers\";\n parametros.maneuverAttributes = \"shape,action\";\n parametros.language = \"es-es\";\n\n // puntos buscados \n $.each(formulario_cargar_ruta_puntos_array_markers, function (h, punto) {\n // agregamos el punto en todos los orden que hay que recorrerlos\n punto.options.orden.forEach(function (orden) {\n parametros[\"waypoint\" + (orden - 1)] = \"geo!\" + punto._latlng.lat + \",\" + punto._latlng.lng;\n });\n });\n\n $.ajax({\n url: url_routing,\n dataType: \"JSON\",\n type: \"GET\",\n data: parametros,\n success: function (respuesta) {\n formulario_cargar_ruta_dibujar_ruta_here_maps(respuesta, rutaColor, rutaGrosor, rutaOpacidad);\n },\n error: function () {\n mensaje(\"ROUTING: RUTA NO ENCONTRADA\", 2750);\n },\n complete: function () {\n\n }\n });\n }\n}", "title": "" }, { "docid": "652f25014cff027d11663f8043e2fcf3", "score": "0.559298", "text": "function setLabel(props){\r\n\t\t\r\n\t\tif (props[expressed] < 100 && props[expressed] > 1) {\t\r\n\t\t\t//label content\r\n\t\t\tvar labelAttribute = \"<h1>\" + expressed + \" in \" + props.NAME + \r\n\t\t\t\t\" County: </h1><b>\" + props[expressed] + \"%</b>\";\r\n\t\t\t//create info label div\r\n\t\t\tvar infolabel = d3.select(\"body\")\r\n\t\t\t\t.append(\"div\")\r\n\t\t\t\t.attr(\"class\", \"infolabel\")\r\n\t\t\t\t.attr(\"id\", props.COUNTYFP + \"_label\")\r\n\t\t\t\t.html(labelAttribute);\r\n\t\t\tvar countyName = infolabel.append(\"div\")\r\n\t\t\t\t.attr(\"class\", \"labelname\")\r\n\t\t\t\t.html(props.name);\r\n\t\t} else if (props[expressed] > 100000) {\r\n\t\t\tattrValue = props[expressed].toString()\r\n\t\t\t//label content\r\n\t\t\tvar labelAttribute = \"<h1>\" + expressed + \" in \" + props.NAME + \r\n\t\t\t\t\" County: </h1><b>\" + \"$\" + attrValue[0]+attrValue[1]+attrValue[2] + \",\" + attrValue[3]+attrValue[4]+attrValue[5] + \"</b>\";\r\n\t\t\t//create info label div\r\n\t\t\tvar infolabel = d3.select(\"body\")\r\n\t\t\t\t.append(\"div\")\r\n\t\t\t\t.attr(\"class\", \"infolabel\")\r\n\t\t\t\t.attr(\"id\", props.COUNTYFP + \"_label\")\r\n\t\t\t\t.html(labelAttribute);\r\n\t\t\tvar countyName = infolabel.append(\"div\")\r\n\t\t\t\t.attr(\"class\", \"labelname\")\r\n\t\t\t\t.html(props.name);\r\n\t\t} else if (props[expressed] < 100000 && props[expressed] > 100) {\r\n\t\t\tattrValue = props[expressed].toString()\r\n\t\t\t//label content\r\n\t\t\tvar labelAttribute = \"<h1>\" + expressed + \" in \" + props.NAME + \r\n\t\t\t\t\" County: </h1><b>\" + \"$\" + attrValue[0]+attrValue[1] + \",\" + attrValue[2]+attrValue[3]+attrValue[4] + \"</b>\";\r\n\t\t\t//create info label div\r\n\t\t\tvar infolabel = d3.select(\"body\")\r\n\t\t\t\t.append(\"div\")\r\n\t\t\t\t.attr(\"class\", \"infolabel\")\r\n\t\t\t\t.attr(\"id\", props.COUNTYFP + \"_label\")\r\n\t\t\t\t.html(labelAttribute);\r\n\t\t\tvar countyName = infolabel.append(\"div\")\r\n\t\t\t\t.attr(\"class\", \"labelname\")\r\n\t\t\t\t.html(props.name);\t\r\n\t\t} else {\r\n\t\t\tattrValue = props[expressed].toString()\r\n\t\t\t//label content\r\n\t\t\tvar labelAttribute = \"<h1>\" + expressed + \" in \" + props.NAME + \r\n\t\t\t\t\" County: </h1><b>\" + \"$\" + attrValue[0] + \"</b>\";\r\n\t\t\t//create info label div\r\n\t\t\tvar infolabel = d3.select(\"body\")\r\n\t\t\t\t.append(\"div\")\r\n\t\t\t\t.attr(\"class\", \"infolabel\")\r\n\t\t\t\t.attr(\"id\", props.COUNTYFP + \"_label\")\r\n\t\t\t\t.html(labelAttribute);\r\n\t\t\tvar countyName = infolabel.append(\"div\")\r\n\t\t\t\t.attr(\"class\", \"labelname\")\r\n\t\t\t\t.html(props.name);\t\r\n\t\t};\r\n\t}", "title": "" }, { "docid": "3b2d375b19aad51ebca0f7f5a3350692", "score": "0.5587339", "text": "function setLabel(props){\n //label content\n var labelAttribute = \"<h1>\" + props[expressed] + \"k\" +\n \"</h1><b>\" + expressed +\"</b>\" ;\n\n //create info label div\n var infolabel = d3.select(\"body\")\n .append(\"div\")\n .attr(\"class\", \"infolabel\")\n .attr(\"id\", props.Label + \"_label\")\n .html(labelAttribute);\n\n var regionName = infolabel.append(\"div\")\n .attr(\"class\", \"labelname\")\n .html(props.Label);\n }", "title": "" }, { "docid": "3c0ab49b0cb9f01c80b6f553fa9c0f88", "score": "0.55853534", "text": "function setLabel(props){\n //label content\n var labelAttribute = \"<h1>\" + props[expressed] +\n \"</h1><b>\" + expressed + \"</b>\";\n\n //create info label div\n var infolabel = d3.select(\"body\")\n .append(\"div\")\n .attr(\"class\", \"infolabel\")\n .attr(\"id\", props.NAME_1 + \"_label\")\n .attr(\"id\", props.NAME_1 + \"_label\")\n .html(labelAttribute);\n\n var regionName = infolabel.append(\"div\")\n .attr(\"class\", \"labelname\")\n .html(props.NAME_1);\n }", "title": "" }, { "docid": "88013025c19cfa8cce21613bb3c89cd7", "score": "0.5573837", "text": "function handleExistingLabels() {\n setExistingLabels('')\n axios.get(`http://localhost:5000/labels/${store.getState().id}`).then((res) => {\n if (res.data != 'null') {\n const temp = JSON.parse(res.data).replace(/['\"]+/g, '').split(', ')\n setExistingLabels(temp)\n }\n })\n }", "title": "" }, { "docid": "0fb5191f4bf59aa535908544786bec29", "score": "0.55734885", "text": "function loadlabel(){\n\t\t\tvar modelsuper=new Array;\n\t\t\tif (localStorage.getItem(\"cell\")!=null) {\n\t\t\t\tswitch(localStorage.getItem(\"cell\").split(\"ll\")[1]){\n\t\t\t\t\tcase \"1\":\n\t\t\t\t\tmodelsuper=model1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"2\":\n\t\t\t\t\tmodelsuper=model2;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"3\":\n\t\t\t\t\tmodelsuper=model3;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"4\":\n\t\t\t\t\tmodelsuper=model4;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"5\":\n\t\t\t\t\tmodelsuper=model5;\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\tmodelsuper=model6;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n \t\t\tfor(var i = 1; i <= 6; i++) {\n \t\t $('.label3').html($('.label3').html()+ '<div id=\"cell' + i + '\" class=\"cell\">'+model[i]+'</div><br>' );\n\n \t\t if(k==0){\n \t\t \t\tif (localStorage.getItem(\"cell\")!=null) {\n \t\t \t\t\tvar m=localStorage.getItem(\"cell\").split(\"ll\")[1];\n \t\t \t\t\tvar g=\"model\"+localStorage.getItem(\"cell\").split(\"ll\")[1];\n\n \t\t \t\t\tfor(var t = 1; t <= g.length; t++) {\n\t \t\t \t \t$('.label4').html($('.label4').html()+ '<div id=\"row' + t + '\" class=\"row\" name=\"'+modelsuper[t]+'\">'+modelsuper[t]+'</div><br>');\n\t \t\t \t\t}\n\n \t\t \t\t}\n \t\t \t\telse{\n \t\t \t\t\tfor(var t = 1; t <= 10; t++) {\n\t \t\t \t \t$('.label4').html($('.label4').html()+ '<div id=\"row' + t + '\" class=\"row\" name=\"'+model1[t]+'\">'+model1[t]+'</div><br>');\n\t \t\t \t\t}\n \t\t \t\t}\n\n\t\t\t\t} \n\t\t\t\tif (i==6) {\n\t\t\t\t\tcolor1();\n\t\t\t\t\tcolor2();\n\n\t\t\t\t}\t\t\n\n \t\t }\t\t\n \t\t}", "title": "" }, { "docid": "17ba245b218720add71a9e2b1da548cb", "score": "0.5556768", "text": "function setLabel(props){\r\n //label content\r\n var labelAttribute = \"<h1>\" + props[expressed] +\r\n \"</h1><b>\" + expressed + \"</b>\";\r\n\r\n //create info label div\r\n var infolabel = d3.select(\"body\")\r\n .append(\"div\")\r\n .attr(\"class\", \"infolabel\")\r\n .attr(\"id\", props.FIPSSTCO + \"_label\")\r\n .html(labelAttribute);\r\n\r\n var countyName = infolabel.append(\"div\")\r\n .attr(\"class\", \"labelname\")\r\n .html(props.name);\r\n}", "title": "" }, { "docid": "bb78bf6c8e715ab8196cfc053a5eb162", "score": "0.55534804", "text": "function setLabel(props){\n //label content\n\n var labelAttribute = \"<h1>\" + props[expressed] +\n \"</h1><b>\" + expressed + \"</b>\";\n console.log(labelAttribute);\n //create info label div\n var infolabel = d3.select(\"body\")\n .append(\"div\")\n .attr(\"class\", \"infolabel\")\n .attr(\"id\", props.adm1_code + \"_label\")\n .html(labelAttribute);\n var unitName = infolabel.append(\"div\")\n .attr(\"class\", \"labelname\")\n .html(props.name);\n}", "title": "" }, { "docid": "5553e5f10431d22d05a24fad5211e696", "score": "0.55516964", "text": "function ApexDataLabels() { }", "title": "" }, { "docid": "181627235972672a7ba37bdb764828d8", "score": "0.55304587", "text": "function setLabels() {\n storeLabels.find({}).sort({ timestamp: 1 }).exec((err, entries) => {\n if (err) console.log(err)\n\n if (entries.length === 0) {\n console.log('No labels entries')\n } else {\n labels = entries\n }\n })\n}", "title": "" }, { "docid": "8e7ba2811336d4f0c1b3043588dfea1c", "score": "0.55241215", "text": "function shorlist() {\n var index = 0;\n object.find('.labeldiagnostico').each(function () {\n if ($(this).attr(\"for\") != settings.tagCodigoDiagPrincipal) {\n index++;\n var idControl = $(this).attr(\"for\");\n $(this).html(settings.labelDiagRelacionado + \" \" + index + \": \");\n }\n }\n );\n }", "title": "" }, { "docid": "449902c4aa7c70c491bcb8390f129c11", "score": "0.55129236", "text": "createLabels(wekanLabels, board) {\n wekanLabels.forEach(label => {\n const color = label.color;\n const name = label.name;\n const existingLabel = board.getLabel(name, color);\n if (existingLabel) {\n this.labels[label.id] = existingLabel._id;\n } else {\n const idLabelCreated = board.pushLabel(name, color);\n this.labels[label.id] = idLabelCreated;\n }\n });\n }", "title": "" }, { "docid": "c322abb0820ee78bee147d9b6d900f20", "score": "0.5511664", "text": "function writeLabels() {\n let ch = JSON.parse(canvas.innerHTML.replace('<!-- ','').replace(' -->',''));\n labels = alphabet.slice(0,Object.keys(ch.data.labels).length);\n canvas.chart.data.labels = labels;\n canvas.chart.update();\n }", "title": "" }, { "docid": "a4935cd04e04ce586ac14eab4ff46024", "score": "0.5498904", "text": "function setLabel() {\n\tswitch ($('.checkbox input:checked').val()) {\n\tcase 'short':\n\t\t$('form .l, form .f').each(function () {\n\t\t\t$(this).hide(400)\n\t\t})\n\t\t$('form .s').each(function () {\n\t\t\t$(this).show(400)\n\t\t})\n\t\tbreak;\n\tcase 'long':\n\t\t$('form .s, form .f').each(function () {\n\t\t\t$(this).hide(400)\n\t\t})\n\t\t$('form .l').each(function () {\n\t\t\t$(this).show(400)\n\t\t})\n\t\tbreak;\n\tcase 'full':\n\t\t$('form span').each(function () {\n\t\t\t$(this).show(400)\n\t\t})\n\t\tbreak;\n\t}\n}", "title": "" }, { "docid": "82bdef67aaeb6178708223a83c0dbb55", "score": "0.54885215", "text": "function onload() {\n var labelFile = document.getElementById('labelFile');\n var addressTextArea = document.getElementById('addressTextArea');\n var printersSelect = document.getElementById('printersSelect');\n var printButton = document.getElementById('printButton');\n\n\n // initialize controls\n printButton.disabled = true;\n addressTextArea.disabled = true;\n\n // Generates label preview and updates corresponend <img> element\n // Note: this does not work in IE 6 & 7 because they don't support data urls\n // if you want previews in IE 6 & 7 you have to do it on the server side\n function updatePreview() {\n if (!label)\n return;\n\n var pngData = label.render();\n var labelImage = document.getElementById('labelImage');\n labelImage.src = \"data:image/png;base64,\" + pngData;\n }\n\n // loads all supported printers into a combo box \n function loadPrintersAsync() {\n _printers = [];\n dymo.label.framework.getPrintersAsync().then(function (printers) {\n if (printers.length == 0) {\n alert(\"No DYMO printers are installed. Install DYMO printers.\");\n return;\n }\n _printers = printers;\n printers.forEach(function (printer) {\n let printerName = printer[\"name\"];\n let option = document.createElement(\"option\");\n option.value = printerName;\n option.appendChild(document.createTextNode(printerName));\n printersSelect.appendChild(option);\n });\n populatePrinterDetail();\n }).thenCatch(function (e) {\n alert(\"Load Printers failed: \" + e);;\n return;\n });\n }\n\n // returns current address on the label \n function getAddress() {\n if (!label || label.getAddressObjectCount() == 0)\n return \"\";\n\n return label.getAddressText(0);\n }\n\n // set current address on the label \n function setAddress(address) {\n if (!label || label.getAddressObjectCount() == 0)\n return;\n\n return label.setAddressText(0, address);\n }\n\n // loads label file thwn user selects it in file open dialog\n labelFile.onchange = function() {\n label = dymo.label.framework.openLabelXml(\"\");\n var res=label.isValidLabel();\n if (labelFile.files && labelFile.files[0] && typeof labelFile.files[0].getAsText == \"function\") { // Firefox\n // open file by providing xml label definition\n // in this example the definition is read from a local file\n // in real world example it can come from the server, e.g. using XMLHttpRequest()\n label = dymo.label.framework.openLabelXml(labelFile.files[0].getAsText(\"utf-8\"));\n }\n else {\n // try load by opening file directly\n // do it only if we have a full path\n var fileName = labelFile.value;\n if ((fileName.indexOf('/') >= 0 || fileName.indexOf('\\\\') >= 0) &&(fileName.indexOf('fakepath') <0 )) {\n label = dymo.label.framework.openLabelFile(fileName); \n\t\t\t\t\tif(label.isDCDLabel())\n\t\t\t\t\t\tconsole.log(\"DYMO Connect label\");\n\t\t\t\t\tif(label.isDLSLabel())\n\t\t\t\t\t\tconsole.log(\"DLS label\");\t\n\t\t\t\t\tif(label.isValidLabel())\n\t\t\t\t\t\tconsole.log(\"The file is a valid label\");\n\t\t\t\t\telse {\n\t\t\t\t\t\talert(\" The file is not a valid label\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n else {\n // the browser returned a file name only (without path). This heppens on Safari for example\n // in this case it is impossible to obtain file content using client-size only code,some server support is needed (see GMail IFrame file upload, ofr example)\n // so for this sample we will inform user and open a default address label\n alert('The browser does not return full file path information. The sample will use a default label file');\n var testAddressLabelXml = '<?xml version=\"1.0\" encoding=\"utf-8\"?>\\\n <DieCutLabel Version=\"8.0\" Units=\"twips\">\\\n <PaperOrientation>Landscape</PaperOrientation>\\\n <Id>Address</Id>\\\n <PaperName>30252 Address</PaperName>\\\n <DrawCommands>\\\n <RoundRectangle X=\"0\" Y=\"0\" Width=\"1581\" Height=\"5040\" Rx=\"270\" Ry=\"270\" />\\\n </DrawCommands>\\\n <ObjectInfo>\\\n <AddressObject>\\\n <Name>Address</Name>\\\n <ForeColor Alpha=\"255\" Red=\"0\" Green=\"0\" Blue=\"0\" />\\\n <BackColor Alpha=\"0\" Red=\"255\" Green=\"255\" Blue=\"255\" />\\\n <LinkedObjectName></LinkedObjectName>\\\n <Rotation>Rotation0</Rotation>\\\n <IsMirrored>False</IsMirrored>\\\n <IsVariable>True</IsVariable>\\\n <HorizontalAlignment>Left</HorizontalAlignment>\\\n <VerticalAlignment>Middle</VerticalAlignment>\\\n <TextFitMode>ShrinkToFit</TextFitMode>\\\n <UseFullFontHeight>True</UseFullFontHeight>\\\n <Verticalized>False</Verticalized>\\\n <StyledText>\\\n <Element>\\\n <String>DYMO\\n3 Glenlake Parkway\\nAtlanta, GA 30328</String>\\\n <Attributes>\\\n <Font Family=\"Arial\" Size=\"12\" Bold=\"False\" Italic=\"False\" Underline=\"False\" Strikeout=\"False\" />\\\n <ForeColor Alpha=\"255\" Red=\"0\" Green=\"0\" Blue=\"0\" />\\\n </Attributes>\\\n </Element>\\\n </StyledText>\\\n <ShowBarcodeFor9DigitZipOnly>False</ShowBarcodeFor9DigitZipOnly>\\\n <BarcodePosition>AboveAddress</BarcodePosition>\\\n <LineFonts>\\\n <Font Family=\"Arial\" Size=\"12\" Bold=\"False\" Italic=\"False\" Underline=\"False\" Strikeout=\"False\" />\\\n <Font Family=\"Arial\" Size=\"12\" Bold=\"False\" Italic=\"False\" Underline=\"False\" Strikeout=\"False\" />\\\n <Font Family=\"Arial\" Size=\"12\" Bold=\"False\" Italic=\"False\" Underline=\"False\" Strikeout=\"False\" />\\\n </LineFonts>\\\n </AddressObject>\\\n <Bounds X=\"332\" Y=\"150\" Width=\"4455\" Height=\"1260\" />\\\n </ObjectInfo>\\\n </DieCutLabel>';\n label = dymo.label.framework.openLabelXml(testAddressLabelXml);\n\n } \n }\n\n // check that label has an address object\n if (label.getAddressObjectCount() == 0) {\n alert(\"Selected label does not have an address object on it. Select another label\");\n return;\n }\n\n updatePreview();\n addressTextArea.value = getAddress();\n printButton.disabled = false;\n addressTextArea.disabled = false;\n };\n\n // updates address on the label when user types in textarea field\n addressTextArea.onkeyup = function() {\n if (!label) {\n alert('Load label before entering address data');\n return;\n }\n\n setAddress(addressTextArea.value);\n updatePreview();\n }\n\n // prints the label\n printButton.onclick = function() {\n try { \n if (!label) {\n alert(\"Load label before printing\");\n return;\n }\n\n //alert(printersSelect.value);\n label.print(printersSelect.value);\n //label.print(\"unknown printer\");\n }\n catch(e)\n {\n alert(e.message || e);\n }\n }\n\n printersSelect.onchange = populatePrinterDetail;\n\n // load printers list on startup\n loadPrintersAsync();\n }", "title": "" }, { "docid": "86d6d881d35d84f31a8fa3cc666d42c2", "score": "0.54646254", "text": "function setLabel(props){\n //label content\n var percent = expressed.includes(\"percent\");\n var value = expressed.includes(\"value\");\n var minutes = expressed.includes(\"mins\");\n var labelAttribute;\n if (percent == true){ \n labelAttribute = \"<h1>\" + props[expressed].toLocaleString() + \"%\" + \"</h1><b>\" + attrName[expressed] + \"</b>\";\n }else if (value == true){ \n labelAttribute = \"<h1>\" + \"$\" + props[expressed].toLocaleString() + \"</h1><b>\" + attrName[expressed] + \"</b>\";\n }else if (minutes == true){ \n labelAttribute = \"<h1>\" + props[expressed].toLocaleString() + \"min\" + \"</h1><b>\" + attrName[expressed] + \"</b>\";\n }else{\n labelAttribute = \"<h1>\" + props[expressed].toLocaleString() + \"</h1><b>\" + attrName[expressed] + \"</b>\";\n }\n//create info label div\n var infolabel = d3.select(\"body\")\n .append(\"div\")\n .attr(\"class\", \"infolabel\")\n .attr(\"id\", props.GEOID + \"_label\")\n .html(labelAttribute);\n\n var countyName = infolabel.append(\"div\")\n .attr(\"class\", \"labelname\")\n .html(props.NAME + \" County\");\n}", "title": "" }, { "docid": "7cded0cfc0f1fb3dfba2589c994d7128", "score": "0.5457405", "text": "function mcd_getLabel(table,champs)\n{\n var label;\n switch(table.toLowerCase()){\n case 'table_constante':\n case 'constante':\n switch(champs.toLowerCase()){\n case 'cs_numero': label=\"\";break;\n case 'cs_type': label=\"\";break;\n case 'cs_valeur': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_adresse':\n case 'adresse':\n switch(champs.toLowerCase()){\n case 'ad_numero': label=\"\";break;\n case 'ad_type': label=\"\";break;\n case 'cp_numero': label=\"\";break;\n case 'vi_numero': label=\"\";break;\n case 'pe_numero': label=\"\";break;\n case 'ad_active': label=\"\";break;\n case 'ad_addr1': label=\"\";break;\n case 'ad_addr2': label=\"\";break;\n case 'ad_addr3': label=\"\";break;\n case 'ad_datestop': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_canton':\n case 'canton':\n switch(champs.toLowerCase()){\n case 'ct_numero': label=\"\";break;\n case 'ct_nom': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_appartienta':\n case 'appartienta':\n switch(champs.toLowerCase()){\n case 'ct_numero': label=\"\";break;\n case 'gc_numero': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_groupecanton':\n case 'groupecanton':\n switch(champs.toLowerCase()){\n case 'gc_numero': label=\"\";break;\n case 'gc_nom': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_codepostal':\n case 'codepostal':\n switch(champs.toLowerCase()){\n case 'cp_numero': label=\"\";break;\n case 'cp_codepostal': label=\"\";break;\n case 'cp_bureau': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_villecp':\n case 'villecp':\n switch(champs.toLowerCase()){\n case 'vi_numero': label=\"\";break;\n case 'cp_numero': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_ville':\n case 'ville':\n switch(champs.toLowerCase()){\n case 'vi_numero': label=\"\";break;\n case 'vi_nom': label=\"\";break;\n case 'ct_numero': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_contact':\n case 'contact':\n switch(champs.toLowerCase()){\n case 'cn_numero': label=\"\";break;\n case 'cn_coordonnee': label=\"\";break;\n case 'cn_type': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_estjoignable':\n case 'estjoignable':\n switch(champs.toLowerCase()){\n case 'ej_numero': label=\"\";break;\n case 'pe_numero': label=\"\";break;\n case 'cn_numero': label=\"\";break;\n case 'ej_actif': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_typelien':\n case 'typelien':\n switch(champs.toLowerCase()){\n case 'tl_numero': label=\"\";break;\n case 'tl_libelle': label=\"\";break;\n case 'tl_description': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_estlie':\n case 'estlie':\n switch(champs.toLowerCase()){\n case 'el_personne1': label=\"\";break;\n case 'el_personne2': label=\"\";break;\n case 'el_actif': label=\"\";break;\n case 'tl_numero': label=\"\";break;\n case 'el_debut': label=\"\";break;\n case 'el_fin': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_etatpersonne':\n case 'etatpersonne':\n switch(champs.toLowerCase()){\n case 'ep_numero': label=\"\";break;\n case 'ep_libelle': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_personne':\n case 'personne':\n switch(champs.toLowerCase()){\n case 'pe_numero': label=\"\";break;\n case 'tp_numero': label=\"\";break;\n case 'pe_titre': label=\"\";break;\n case 'pe_nom': label=\"\";break;\n case 'pe_regimefiscal': label=\"\";break;\n case 'ep_numero': label=\"\";break;\n case 'pe_morale': label=\"\";break;\n case 'pe_prenom': label=\"\";break;\n case 'pe_complement': label=\"\";break;\n case 'pe_naissance': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_personneupdate':\n case 'personneupdate':\n switch(champs.toLowerCase()){\n case 'pu_numero': label=\"\";break;\n case 'pu_action': label=\"\";break;\n case 'pu_bilan': label=\"\";break;\n case 'pe_numero': label=\"\";break;\n case 'tp_numero': label=\"\";break;\n case 'pe_titre': label=\"\";break;\n case 'pe_nom': label=\"\";break;\n case 'pe_regimefiscal': label=\"\";break;\n case 'ep_numero': label=\"\";break;\n case 'pe_morale': label=\"\";break;\n case 'pe_prenom': label=\"\";break;\n case 'pe_complement': label=\"\";break;\n case 'pe_naissance': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_estresponsable':\n case 'estresponsable':\n switch(champs.toLowerCase()){\n case 'peac_numero': label=\"\";break;\n case 'pe_numero': label=\"\";break;\n case 're_numero': label=\"\";break;\n case 'peac_periodedebut': label=\"\";break;\n case 'peac_periodefin': label=\"\";break;\n case 'peac_titre': label=\"\";break;\n case 'peac_fini': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_responsabilite':\n case 'responsabilite':\n switch(champs.toLowerCase()){\n case 're_numero': label=\"\";break;\n case 're_code': label=\"\";break;\n case 're_nom': label=\"\";break;\n case 're_famille': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_attribut':\n case 'attribut':\n switch(champs.toLowerCase()){\n case 'at_numero': label=\"\";break;\n case 'pe_numero': label=\"\";break;\n case 'ta_numero': label=\"\";break;\n case 'cr_numero': label=\"\";break;\n case 'at_valeur': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_typeattribut':\n case 'typeattribut':\n switch(champs.toLowerCase()){\n case 'ta_numero': label=\"\";break;\n case 'ta_nom': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_categorie':\n case 'categorie':\n switch(champs.toLowerCase()){\n case 'cr_numero': label=\"\";break;\n case 'cr_libelle': label=\"\";break;\n case 'ta_numero': label=\"\";break;\n case 'cr_description': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_tva':\n case 'tva':\n switch(champs.toLowerCase()){\n case 'tv_numero': label=\"\";break;\n case 'tv_code': label=\"\";break;\n case 'tv_taux': label=\"\";break;\n case 'tv_actif': label=\"\";break;\n case 'so_numero': label=\"\";break;\n case 'cg_numero': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_typepersonne':\n case 'typepersonne':\n switch(champs.toLowerCase()){\n case 'tp_numero': label=\"\";break;\n case 'tp_type': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_typetache':\n case 'typetache':\n switch(champs.toLowerCase()){\n case 'th_numero': label=\"\";break;\n case 'th_libelle': label=\"\";break;\n case 'th_description': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_appel':\n case 'appel':\n switch(champs.toLowerCase()){\n case 'ap_numero': label=\"\";break;\n case 'ap_libelle': label=\"\";break;\n case 'th_numero': label=\"\";break;\n case 'ap_date': label=\"\";break;\n case 'ap_description': label=\"\";break;\n case 'ap_duree': label=\"\";break;\n case 'pe_numero': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_societe':\n case 'societe':\n switch(champs.toLowerCase()){\n case 'so_numero': label=\"\";break;\n case 'so_libelle': label=\"\";break;\n case 'so_abbrev': label=\"\";break;\n case 'pe_numero': label=\"\";break;\n case 'so_detail': label=\"\";break;\n case 'so_sequence': label=\"\";break;\n case 'ts_numero': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_typesociete':\n case 'typesociete':\n switch(champs.toLowerCase()){\n case 'ts_numero': label=\"\";break;\n case 'ts_libelle': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_classe':\n case 'classe':\n switch(champs.toLowerCase()){\n case 'cl_numero': label=\"\";break;\n case 'cl_nom': label=\"\";break;\n case 'cl_represente': label=\"\";break;\n case 'cl_libelle': label=\"\";break;\n case 'cl_societe': label=\"\";break;\n case 'cl_mere': label=\"\";break;\n case 'cl_ordre': label=\"\";break;\n case 'cl_assoc': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_propriete':\n case 'propriete':\n switch(champs.toLowerCase()){\n case 'pr_numero': label=\"\";break;\n case 'pr_classe': label=\"\";break;\n case 'pr_type': label=\"\";break;\n case 'pr_nom': label=\"\";break;\n case 'pr_libelle': label=\"\";break;\n case 'pr_obligatoire': label=\"\";break;\n case 'pr_colonne': label=\"\";break;\n case 'pr_colesclave': label=\"\";break;\n case 'pr_ordre': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_typepropriete':\n case 'typepropriete':\n switch(champs.toLowerCase()){\n case 'tr_numero': label=\"\";break;\n case 'tr_libelle': label=\"\";break;\n case 'tr_sql': label=\"\";break;\n case 'tr_systeme': label=\"\";break;\n case 'tr_estclef': label=\"\";break;\n case 'tr_liste': label=\"\";break;\n case 'tr_code': label=\"\";break;\n case 'tr_classe': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_colonnetype':\n case 'colonnetype':\n switch(champs.toLowerCase()){\n case 'cy_numero': label=\"\";break;\n case 'cy_typepropriete': label=\"\";break;\n case 'cy_libelle': label=\"\";break;\n case 'cy_nom': label=\"\";break;\n case 'cy_estclef': label=\"\";break;\n case 'cy_ordre': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_listechoix':\n case 'listechoix':\n switch(champs.toLowerCase()){\n case 'lc_numero': label=\"\";break;\n case 'lc_typepropriete': label=\"\";break;\n case 'lc_libelle': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_adherence':\n case 'adherence':\n switch(champs.toLowerCase()){\n case 'ah_numero': label=\"\";break;\n case 'pd_numero': label=\"\";break;\n case 'ah_libelle': label=\"\";break;\n case 'ah_reduction': label=\"\";break;\n case 'ah_quantite': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_periodeadherence':\n case 'periodeadherence':\n switch(champs.toLowerCase()){\n case 'po_numero': label=\"\";break;\n case 'ah_numero': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_adhesion':\n case 'adhesion':\n switch(champs.toLowerCase()){\n case 'as_numero': label=\"\";break;\n case 'as_reductionmax': label=\"\";break;\n case 'pe_numero': label=\"\";break;\n case 'po_numero': label=\"\";break;\n case 'ah_numero': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_periode':\n case 'periode':\n switch(champs.toLowerCase()){\n case 'po_numero': label=\"\";break;\n case 'po_debut': label=\"\";break;\n case 'po_fin': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_observation':\n case 'observation':\n switch(champs.toLowerCase()){\n case 'ob_numero': label=\"\";break;\n case 'pe_numero': label=\"\";break;\n case 'ob_observation': label=\"\";break;\n case 'ob_niveau': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_prix':\n case 'prix':\n switch(champs.toLowerCase()){\n case 'px_numero': label=\"\";break;\n case 'tv_numero': label=\"\";break;\n case 'pd_numero': label=\"\";break;\n case 'px_tarifht': label=\"\";break;\n case 'px_tarifttc': label=\"\";break;\n case 'px_actif': label=\"\";break;\n case 'px_datedebut': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_typejournal':\n case 'typejournal':\n switch(champs.toLowerCase()){\n case 'tj_numero': label=\"\";break;\n case 'tj_libelle': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_modele':\n case 'modele':\n switch(champs.toLowerCase()){\n case 'mo_numero': label=\"\";break;\n case 'mo_libelle': label=\"\";break;\n case 'so_numero': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_lignemodele':\n case 'lignemodele':\n switch(champs.toLowerCase()){\n case 'lm_numero': label=\"\";break;\n case 'pd_numero': label=\"\";break;\n case 'mo_numero': label=\"\";break;\n case 'lm_quantite': label=\"\";break;\n case 'lm_montantht': label=\"\";break;\n case 'lm_montantttc': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_produit':\n case 'produit':\n switch(champs.toLowerCase()){\n case 'pd_libelle': label=\"\";break;\n case 'pd_numero': label=\"\";break;\n case 'jo_numero': label=\"\";break;\n case 'so_numero': label=\"\";break;\n case 'pd_actif': label=\"\";break;\n case 'pd_sansquantite': label=\"\";break;\n case 'pd_reduction': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_ligne':\n case 'ligne':\n switch(champs.toLowerCase()){\n case 'l_numero': label=\"\";break;\n case 'pd_numero': label=\"\";break;\n case 'de_numero': label=\"\";break;\n case 'l_quantite': label=\"\";break;\n case 'l_montantht': label=\"\";break;\n case 'l_montantttc': label=\"\";break;\n case 'px_numero': label=\"\";break;\n case 'l_notes': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_devis':\n case 'devis':\n switch(champs.toLowerCase()){\n case 'de_numero': label=\"\";break;\n case 'pe_numero': label=\"\";break;\n case 'de_date': label=\"\";break;\n case 'de_libelle': label=\"\";break;\n case 'de_reduction': label=\"\";break;\n case 'de_montantht': label=\"\";break;\n case 'de_montantttc': label=\"\";break;\n case 'em_numero': label=\"\";break;\n case 'de_locked': label=\"\";break;\n case 'de_acompte': label=\"\";break;\n case 'de_lettre': label=\"\";break;\n case 'de_civilites': label=\"\";break;\n case 'de_introduction': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_lignefacture':\n case 'lignefacture':\n switch(champs.toLowerCase()){\n case 'lf_numero': label=\"\";break;\n case 'fa_numero': label=\"\";break;\n case 'px_numero': label=\"\";break;\n case 'pd_numero': label=\"\";break;\n case 'lf_quantite': label=\"\";break;\n case 'lf_montantht': label=\"\";break;\n case 'lf_montantttc': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_facture':\n case 'facture':\n switch(champs.toLowerCase()){\n case 'fa_numero': label=\"\";break;\n case 'de_numero': label=\"\";break;\n case 'pe_numero': label=\"\";break;\n case 'ag_numero': label=\"\";break;\n case 'fa_numfact': label=\"\";break;\n case 'fa_date': label=\"\";break;\n case 'fa_reduction': label=\"\";break;\n case 'fa_montantht': label=\"\";break;\n case 'fa_montantttc': label=\"\";break;\n case 'fa_accompte': label=\"\";break;\n case 'fa_annotation': label=\"\";break;\n case 'fa_libelle': label=\"\";break;\n case 'so_numero': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_ligneavoir':\n case 'ligneavoir':\n switch(champs.toLowerCase()){\n case 'la_numero': label=\"\";break;\n case 'pd_numero': label=\"\";break;\n case 'av_numero': label=\"\";break;\n case 'px_numero': label=\"\";break;\n case 'la_quantite': label=\"\";break;\n case 'la_montantht': label=\"\";break;\n case 'la_montantttc': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_avoir':\n case 'avoir':\n switch(champs.toLowerCase()){\n case 'av_numero': label=\"\";break;\n case 'fa_numero': label=\"\";break;\n case 'av_numfact': label=\"\";break;\n case 'av_date': label=\"\";break;\n case 'av_montantht': label=\"\";break;\n case 'av_montantttc': label=\"\";break;\n case 'av_reduction': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_routage':\n case 'routage':\n switch(champs.toLowerCase()){\n case 'ro_numero': label=\"\";break;\n case 'ad_numero': label=\"\";break;\n case 'pe_numero': label=\"\";break;\n case 'ro_debutservice': label=\"\";break;\n case 'ro_finservice': label=\"\";break;\n case 'ro_quantite': label=\"\";break;\n case 'ro_suspendu': label=\"\";break;\n case 'ro_dernierroute': label=\"\";break;\n case 'fa_numero': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_service':\n case 'service':\n switch(champs.toLowerCase()){\n case 'se_numero': label=\"\";break;\n case 'se_nom': label=\"\";break;\n case 'se_societe': label=\"\";break;\n case 'se_agent': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_employe':\n case 'employe':\n switch(champs.toLowerCase()){\n case 'em_numero': label=\"\";break;\n case 'dp_numero': label=\"\";break;\n case 'em_emploi': label=\"\";break;\n case 'em_service': label=\"\";break;\n case 'em_agent': label=\"\";break;\n case 'em_login': label=\"\";break;\n case 'em_acces': label=\"\";break;\n case 'em_password': label=\"\";break;\n case 'em_super': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_agent':\n case 'agent':\n switch(champs.toLowerCase()){\n case 'ag_numero': label=\"\";break;\n case 'ag_nom': label=\"\";break;\n case 'ag_prenom': label=\"\";break;\n case 'ag_initiales': label=\"\";break;\n case 'ag_actif': label=\"\";break;\n case 'eq_numero': label=\"\";break;\n case 'ag_role': label=\"\";break;\n case 'ag_telephone': label=\"\";break;\n case 'ag_mobile': label=\"\";break;\n case 'ag_email': label=\"\";break;\n case 'ag_commentaire': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_equipe':\n case 'equipe':\n switch(champs.toLowerCase()){\n case 'eq_numero': label=\"\";break;\n case 'eq_nom': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_exercice':\n case 'exercice':\n switch(champs.toLowerCase()){\n case 'ex_numero': label=\"\";break;\n case 'so_numero': label=\"\";break;\n case 'ex_datedebut': label=\"\";break;\n case 'ex_datefin': label=\"\";break;\n case 'ex_cloture': label=\"\";break;\n case 'ex_password': label=\"\";break;\n case 'ex_compteattente': label=\"\";break;\n case 'ex_actif': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_journal':\n case 'journal':\n switch(champs.toLowerCase()){\n case 'jo_numero': label=\"\";break;\n case 'jo_abbrev': label=\"\";break;\n case 'jo_libelle': label=\"\";break;\n case 'jo_debit': label=\"\";break;\n case 'jo_credit': label=\"\";break;\n case 'so_numero': label=\"\";break;\n case 'tj_numero': label=\"\";break;\n case 'cg_numero': label=\"\";break;\n case 'jo_mois': label=\"\";break;\n case 'jo_annee': label=\"\";break;\n case 'jo_contrepartie': label=\"\";break;\n case 'jo_provisoire': label=\"\";break;\n case 'jo_visible': label=\"\";break;\n case 'jo_sequence': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_piece':\n case 'piece':\n switch(champs.toLowerCase()){\n case 'pi_numero': label=\"\";break;\n case 'jo_numero': label=\"\";break;\n case 'pi_numpiece': label=\"\";break;\n case 'ex_numero': label=\"\";break;\n case 'pi_libelle': label=\"\";break;\n case 'pi_debit': label=\"\";break;\n case 'pi_credit': label=\"\";break;\n case 'pi_date': label=\"\";break;\n case 'pi_numseq': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_ecriture':\n case 'ecriture':\n switch(champs.toLowerCase()){\n case 'ec_numero': label=\"\";break;\n case 'ec_numecriture': label=\"\";break;\n case 'pi_numero': label=\"\";break;\n case 'ex_numero': label=\"\";break;\n case 'cg_numero': label=\"\";break;\n case 'ca_numero': label=\"\";break;\n case 'ec_aux': label=\"\";break;\n case 'pf_numero': label=\"\";break;\n case 'ec_compte': label=\"\";break;\n case 'ec_libelle': label=\"\";break;\n case 'ec_debit': label=\"\";break;\n case 'ec_credit': label=\"\";break;\n case 'pt_numero': label=\"\";break;\n case 'av_numero': label=\"\";break;\n case 'lt_numero': label=\"\";break;\n case 'db_numero': label=\"\";break;\n case 'rg_numero': label=\"\";break;\n case 'fa_numero': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_comptegen':\n case 'comptegen':\n switch(champs.toLowerCase()){\n case 'cg_numero': label=\"\";break;\n case 'cg_numcompte': label=\"\";break;\n case 'cg_libelle': label=\"\";break;\n case 'ac_numero': label=\"\";break;\n case 'cg_accepteaux': label=\"\";break;\n case 'cg_utilisable': label=\"\";break;\n case 'cg_lettrable': label=\"\";break;\n case 'cg_pointable': label=\"\";break;\n case 'so_numero': label=\"\";break;\n case 'cg_groupable': label=\"\";break;\n case 'cg_debit': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_compteproduit':\n case 'compteproduit':\n switch(champs.toLowerCase()){\n case 'ci_numero': label=\"\";break;\n case 'pd_numero': label=\"\";break;\n case 'cg_numero': label=\"\";break;\n case 'ci_actif': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_compteaux':\n case 'compteaux':\n switch(champs.toLowerCase()){\n case 'ca_numero': label=\"\";break;\n case 'cg_numero': label=\"\";break;\n case 'ca_numcompte': label=\"\";break;\n case 'ca_libelle': label=\"\";break;\n case 'ac_numero': label=\"\";break;\n case 'ca_debit': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_acces':\n case 'acces':\n switch(champs.toLowerCase()){\n case 'ac_numero': label=\"\";break;\n case 'ac_libelle': label=\"\";break;\n case 'ac_niveau': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_pointage':\n case 'pointage':\n switch(champs.toLowerCase()){\n case 'pt_numero': label=\"\";break;\n case 'pt_date': label=\"\";break;\n case 'pt_releve': label=\"\";break;\n case 'pt_debit': label=\"\";break;\n case 'pt_credit': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n case 'so_numero': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_lettrage':\n case 'lettrage':\n switch(champs.toLowerCase()){\n case 'lt_numero': label=\"\";break;\n case 'lt_lettre': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n case 'so_numero': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_prefixe':\n case 'prefixe':\n switch(champs.toLowerCase()){\n case 'pf_numero': label=\"\";break;\n case 'pf_nom': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_facturereglement':\n case 'facturereglement':\n switch(champs.toLowerCase()){\n case 'fr_numero': label=\"\";break;\n case 'rg_numero': label=\"\";break;\n case 'fa_numero': label=\"\";break;\n case 'fr_acompte': label=\"\";break;\n case 'fr_partiel': label=\"\";break;\n case 'fr_montant': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_modereglement':\n case 'modereglement':\n switch(champs.toLowerCase()){\n case 'mr_numero': label=\"\";break;\n case 'mr_libelle': label=\"\";break;\n case 'cg_numero': label=\"\";break;\n case 'so_numero': label=\"\";break;\n case 'mr_actif': label=\"\";break;\n case 'mr_description': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_reglement':\n case 'reglement':\n switch(champs.toLowerCase()){\n case 'rg_numero': label=\"\";break;\n case 'pe_numero': label=\"\";break;\n case 'rg_montant': label=\"\";break;\n case 'rg_date': label=\"\";break;\n case 'mr_numero': label=\"\";break;\n case 'so_numero': label=\"\";break;\n case 'rg_encompta': label=\"\";break;\n case 'rg_libellebanque': label=\"\";break;\n case 'rg_numerocompte': label=\"\";break;\n case 'rg_reference': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_moderepartition':\n case 'moderepartition':\n switch(champs.toLowerCase()){\n case 'mp_numero': label=\"\";break;\n case 'mp_libelle': label=\"\";break;\n case 'cg_numero': label=\"\";break;\n case 'so_numero': label=\"\";break;\n case 'mp_actif': label=\"\";break;\n case 'mp_societe': label=\"\";break;\n case 'mp_description': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_repartition':\n case 'repartition':\n switch(champs.toLowerCase()){\n case 'rp_numero': label=\"\";break;\n case 'rg_numero': label=\"\";break;\n case 'mp_numero': label=\"\";break;\n case 'rp_montant': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_impression':\n case 'impression':\n switch(champs.toLowerCase()){\n case 'im_numero': label=\"\";break;\n case 'im_libelle': label=\"\";break;\n case 'im_nom': label=\"\";break;\n case 'im_societe': label=\"\";break;\n case 'im_modele': label=\"\";break;\n case 'im_defaut': label=\"\";break;\n case 'im_keytable': label=\"\";break;\n case 'im_keycle': label=\"\";break;\n case 'im_keydate': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_groupetable':\n case 'groupetable':\n switch(champs.toLowerCase()){\n case 'gt_numero': label=\"\";break;\n case 'gt_libelle': label=\"\";break;\n case 'gt_tables': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_droit':\n case 'droit':\n switch(champs.toLowerCase()){\n case 'dr_numero': label=\"\";break;\n case 'dp_numero': label=\"\";break;\n case 'gt_numero': label=\"\";break;\n case 'dr_select': label=\"\";break;\n case 'dr_insert': label=\"\";break;\n case 'dr_update': label=\"\";break;\n case 'dr_delete': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_droitprofil':\n case 'droitprofil':\n switch(champs.toLowerCase()){\n case 'dp_numero': label=\"\";break;\n case 'dp_libelle': label=\"\";break;\n case 'dp_notes': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_activite':\n case 'activite':\n switch(champs.toLowerCase()){\n case 'za_numero': label=\"\";break;\n case 'za_heuredebut': label=\"\";break;\n case 'za_heurefin': label=\"\";break;\n case 'za_date': label=\"\";break;\n case 'za_duree': label=\"\";break;\n case 'em_numero': label=\"\";break;\n case 'zt_numero': label=\"\";break;\n case 'zs_numero': label=\"\";break;\n case 'zl_numero': label=\"\";break;\n case 'za_pour': label=\"\";break;\n case 'za_qui': label=\"\";break;\n case 'za_champ': label=\"\";break;\n case 'fa_numero': label=\"\";break;\n case 'de_numero': label=\"\";break;\n case 'pe_numero': label=\"\";break;\n case 'zg_numero': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_tache':\n case 'tache':\n switch(champs.toLowerCase()){\n case 'zt_numero': label=\"\";break;\n case 'zt_libelle': label=\"\";break;\n case 'zt_phrase': label=\"\";break;\n case 'zt_notes': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_typesujet':\n case 'typesujet':\n switch(champs.toLowerCase()){\n case 'zu_numero': label=\"\";break;\n case 'zu_libelle': label=\"\";break;\n case 'zu_notes': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_sujet':\n case 'sujet':\n switch(champs.toLowerCase()){\n case 'zs_numero': label=\"\";break;\n case 'zs_libelle': label=\"\";break;\n case 'zu_numero': label=\"\";break;\n case 'zs_notes': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_lieu':\n case 'lieu':\n switch(champs.toLowerCase()){\n case 'zl_numero': label=\"\";break;\n case 'zl_libelle': label=\"\";break;\n case 'zl_notes': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n case 'table_groupe':\n case 'groupe':\n switch(champs.toLowerCase()){\n case 'zg_numero': label=\"\";break;\n case 'zg_libelle': label=\"\";break;\n case 'zg_notes': label=\"\";break;\n case 'update_time': label=\"\";break;\n case 'update_user': label=\"\";break;\n default: label=\"\";\n }\n break;\n \n default: label=\"\";\n }\n return label;\n}", "title": "" }, { "docid": "5cc47ff6eebca9d720c13ae538ab765e", "score": "0.5452297", "text": "function saveLabels(newLabels) {\n for (var i=0;i<newLabels.length;i++) {\n if (labels.hasOwnProperty(newLabels[i])) {\n labels[newLabels[i]].count++;\n } else {\n labels[newLabels[i]] = new Label(newLabels[i]);\n }\n }\n }", "title": "" }, { "docid": "4c7ce236bb6611d48eabfd8207d08b44", "score": "0.5451737", "text": "function renderLabels() {\n var labelsList = document.getElementsByClassName('labels')[0];\n // clear labels list\n removeChildren(labelsList);\n // repopulate labels list\n var currentLabels = Object.keys(labels);\n for (var i=0; i<currentLabels.length; i++) {\n console.log(currentLabels[i]);\n renderLabel(currentLabels[i], labelsList);\n }\n }", "title": "" }, { "docid": "4a32f07393c865f9f1dd670d4d0f526c", "score": "0.5450025", "text": "addLabels () {\n // First row of labels\n let labelsHigh = this.svg.selectAll(\".labelHigh\")\n .data(this.labels)\n .enter().append(\"text\")\n .attr(\"class\", \"labelHigh label\");\n\n labelsHigh\n .attr(\"x\", (d, i) => 40)\n .attr(\"y\", (d, i) => this.timeScale(i) + this.colH / 2)\n .text((d, i) => this.labels[i]);\n }", "title": "" }, { "docid": "92393edc92321a73415820a6dec61a56", "score": "0.5437784", "text": "function infoData(){\n\tvar info2 = $(\"#info2\");\n\tvar info3 = $(\"#info3\");\n\tvar info4 = $(\"#info4\");\n\tvar info5 = $(\"#info5\");\n\tvar informacion2 = \n\t{\n\t\"texto2a\" :\t\"<p> A)Crear la interfaz HTML que permita el ingreso de los datos solicitados.El dato correspondiente al género se debe capturar a traves de un combo desplegable.</p>\",\n\t\"texto2b\" : \t\"<p> B)Crear la funcionalidad que permita almacenar peliculas, teniendo en cuenta que se debe validad que el año sea numerico y que el nombre sea unico( que no exista otra pelicula con ese nombre).</p>\",\n\t\"texto2c\" : \t\"<p> C)Agregar a la interfaz HTML a un botón y una tabla de datos y listar en ella todas las peliculas que tengan un promedio mayor o igual a 4. El promedio se obtendrá de la division del total de puntos recibidos entre la cantidad de votantes. Al hacer click en el boton se cargara la tabla.</p>\",\n\t\"texto2d\" : \t\"<p> D)Crear un nuevo campo de texto en el que se pueda ingresar el nombre de una pelicula y un boton que al ser presionado busque en el listado de las peliculas esa pelicula ingresada en el campo de texto y muestre un parrafo en el HTML toda la informacion disponible de la pelicula(nombre,año, genero, cantidad de votantes y total de puntos).En caso de que la pelicula no este en el listado informar al usuario que esa pelicula no se encuentra en el listado.</p>\"\n\t}\n\t\tfor(x in informacion2){\n\t info2.append(informacion2[x]);\n\t}\n\t\n\tvar text3a =\"<p> A)Crear la interfaz HTML y toda la funcionalidad para registrar ventas. Para cada venta se debe ingresar un numero de tipo de guitarra(1-clasica,2-electrica y 3-electroacustica) y la cantidad de guitarras que se compran.Solo se comprara un tipo de guitarra por venta.Esas ventas deberan quedar registradas en arrays asociativos dentro de un array indexado llamado ventas.Se debe validad que ambos valores(tipo y cantidad) sean numericos.\t</p>\"; \n\tvar text3b =\"<p> B)Crear una funcion que reciba como parametro un tipo de guitarra y devuelva el total de pesos generados en total por la venta de ese tipo de guitarras. </p>\"; \n\tvar text3c = \"<p> C)Utilizando la funcion de la parte b, crear la interfaz HTML y la funcionalidad para listar en una tabla los totales generados por la venta de cada tipo de guitarra. </p>\"; \n\tvar informacion3 = \n\t{\n\t\"texto3a\" :\ttext3a,\n\t\"texto3b\" : \ttext3b,\n\t\"texto3c\" :\t\ttext3c\n\t}\n\t\tfor(x in informacion3){\n\t info3.append(informacion3[x]);\n\t}\n\t\n\t\n\t\tvar text4a = \"<p> A)Crear la interfaz HTML que permita el ingreso de los datos solicitados.El dato correspondiente a la marca se debe capturar a traves de un combo desplegable.\t</p>\"; \n\t\tvar text4b = \"<p> B)Crear la funcionalidad javascript que permita almacenar ventas, teniendo en cuenta que se debe validad que el predcio sea numerico y el modelo no este vacio. </p>\"; \n\t\tvar text4c = \"<p> C)Agregar a la interfaz HTML un buton y una tabla de datos y listar en ella todas las ventas que superen los dos mil pesos.El total de una venta se obtendra de la multiplicacion del precio por la cantidad de unidades.Al hacer click en el boton se cargara la tabla </p>\";\n\t\n\t\n\t\n\tvar informacion4 = \n\t{\n\t\"texto4a\" :\ttext4a,\n\t\"texto4b\" : \ttext4b,\n\t\"texto4c\" :\t\ttext4c,\n\t}\n\tinformacion4.texto4d = \"<p> D)Crear un nuevo campo de texto en el que se pueda ingresar un modelo y un boton que al ser presionado permita calcular el total de unidades vendidas para ese modelo. Mostrar en un parrafo nuevo en el HTML la cantidad de unidades obtenida.</p>\";\n\t\t\tfor(x in informacion4){\n\t info4.append(informacion4[x]);\n\t}\n\t\n\tvar informacion5 = {};\n\tinformacion5.text5a = \"<p>B)Crear la funcionalidad javascript para almacenar los datos que se ingresan validando que el nombre no este vacio y que el talle sea un valor numerico y este entre 30 y 46. Se valorara que el dato de nacional o importado se obtenga a partir de combo desplegable.</p>\";\n\tinformacion5.text5b = \"<p>C)Crear una funcion que reciba como parametro un array de zapatos (con el formato del ejercicio b) y un valor (nacional o importado) y devuelva la cantidad de zapatos con talle mayor a 38 que esten en el array recibido y sean del tipo recibido en el segundo parametro.</p>\";\n\tinformacion5.text5c = \"<p>Atencion, se solicita que la funcion reciba como parametro el array a trabajar, no se debe trabajar consultando una variable global.</p>\";\n\tinformacion5.text5d = \"<p>D)Utilizando la funcion creada en la parte c, y el array de zapatos disponible, informar en un nuevo parrafo si hay mas zapatos nacionales de talle mayor a 38 o si hay mas importados de talle mayor a 38.</p>\"\n\t\t\tfor(x in informacion5){\n\t info5.append(informacion5[x]);\n\t}\n\t\t\n}", "title": "" }, { "docid": "332acd81a70f8161b00d6bb315e5aa9c", "score": "0.54288024", "text": "function setLabel(props){\n var labelAttribute = \"<h1>\" + props[expressed] +\n \"</h1><b>\" + expressed + \"</b>\";\n //create the page div\n var infolabel = d3.select(\"body\")\n .append(\"div\")\n .attr(\"class\", \"infolabel\")\n .attr(\"id\", props.NAME + \"_label\")\n .html(labelAttribute)\n \n var countyName = infolabel.append(\"div\")\n .attr(\"class\", \"labelname\")\n .html(props.NAME)\n }", "title": "" }, { "docid": "0faa57a7be255022652886ff3d479163", "score": "0.54262024", "text": "function getLabels()\n{\n\tif(!g_json_labels)\n\t{\n\t\tvar strUrl = JSON_API_URL;\n\t\tvar data = { method:\"Utils.getLabels\", language:\"en\"};\n\t\tpostData(strUrl, data, function(json)\n\t\t{\n\t\t\tg_json_labels = json;\n\t\t\t//alert(JSON.stringify(json).substring(0, 2500)); //Limit the string size\n\t\t}, error);\n\t}\n}", "title": "" }, { "docid": "3fb5823c8a71fae90b1dfd80abbb7fbc", "score": "0.5419551", "text": "function setLabel(props){\n //label content\n var labelAttribute = \"<h3>\" + props[expressed] + \"</h3><b>total</b>\";\n\n //create info label div\n var infolabel = d3.select(\"body\")\n .append(\"div\")\n .attr(\"class\", \"infolabel\")\n .attr(\"id\", props.GRID_ID + \"_label\")\n .html(labelAttribute);\n}", "title": "" }, { "docid": "2a75e4052b8e086e2152c636092b57ee", "score": "0.54056156", "text": "_createLabels() {\n\t\tif (!this.labelInterval || !this.showTickmarks) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst labelInterval = this.labelInterval;\n\t\tconst step = this._effectiveStep;\n\t\tconst newNumberOfLabels = (this._effectiveMax - this._effectiveMin) / (step * labelInterval);\n\n\t\t// If the required labels are already rendered\n\t\tif (newNumberOfLabels === this._oldNumberOfLabels) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._oldNumberOfLabels = newNumberOfLabels;\n\t\tthis._labelWidth = 100 / newNumberOfLabels;\n\t\tthis._labelValues = [];\n\n\t\t// If the step value is not a round number get its precision\n\t\tconst stepPrecision = SliderBase._getDecimalPrecisionOfNumber(step);\n\n\t\t// numberOfLabels below can be float so that the \"distance betweenlabels labels\"\n\t\t// calculation to be precize (exactly the same as the distance between the tickmarks).\n\t\t// That's ok as the loop stop condition is set to an integer, so it will practically\n\t\t// \"floor\" the number of labels anyway.\n\t\tfor (let i = 0; i <= newNumberOfLabels; i++) {\n\t\t\t// Format the label numbers with the same decimal precision as the value of the step property\n\t\t\tconst labelItemNumber = ((i * step * labelInterval) + this._effectiveMin).toFixed(stepPrecision);\n\t\t\tthis._labelValues.push(labelItemNumber);\n\t\t}\n\t}", "title": "" }, { "docid": "a7045132befddf8b62012e556d53a0cb", "score": "0.5404537", "text": "function bindLabels(data) {\n var labels = {\n designationTitle: data.labels.designationTitle,\n designationDetails: data.labels.designationDetails,\n edit: data.labels.edit,\n delete: data.labels.delete,\n designationList: data.labels.designationList,\n designationHeading: data.labels.designationHeading\n };\n\n $scope.labelsDesignationList = labels;\n\n }", "title": "" }, { "docid": "94dc662890f22d0a2d29acaaeea2894c", "score": "0.53957033", "text": "function generateLabels(){\n let datalabels = scene.selectAll(\"datalabel\").data(rows_Planet);\n\n datalabels.exit().remove();\n\n let shapelabel = datalabels.enter().append(\"transform\").attr(\"class\", \"datalabel\").attr(\"scale\", \"0.75 0.75 0.75\")\n .append(\"billboard\").attr(\"render\", 'true').attr(\"axisOfRotation\", '0,0,0')\n .append(\"shape\") .attr(\"class\", 'dynshape');\n\n shapelabel.append(\"Text\")\n .attr(\"string\", function(d,i) {\n if (planet_Data[i].type === \"Moon\") {\n return \"\";\n } else if (planet_Data[i].type === \"Planet\") {\n return '\"' + planet_Data[i].name + '\"' + '\"\"' + '\"\"' + '\"\"';\n }\n })\n .attr(\"id\", function(d,i) { return 'dynlabel_' + i}).attr(\"class\", 'dynlabel')\n .append(\"fontstyle\").attr(\"family\", \"arial\").attr(\"quality\", \"3\").attr(\"size\", \"1.5\");\n shapelabel.append(\"appearance\").attr(\"id\", function(d,i) { return 'dynlabel_color_' + i}).append(\"material\").attr(\"diffuseColor\", \"1 1 1\");\n\n return datalabels;\n}", "title": "" }, { "docid": "20afdf5d7984003d5c6106047405dcec", "score": "0.5395438", "text": "function changeData(SelectedEnteteLabel,SelectedEnteteValue){\n var labels = [];\n var valeurs = [];\n \n if(SelectedEnteteLabel==null){\n SelectedEnteteLabel=$(\"#MapLabel\").val();\n }\n if(SelectedEnteteValue==null){\n SelectedEnteteValue=$(\"#MapValue\").val();\n }\n \n if(!animationRunning){\n $(\"#buttonPlay\").fadeIn(\"slow\");\n $(\"#inputTime\").fadeIn(\"slow\");\n $(\"#IconTimeLabel\").fadeIn(\"slow\");\n }else{\n $(\"#inputTime\").hide();\n $(\"#IconTimeLabel\").hide();\n }\n \n \n $(\"#buttonDownloadGif\").fadeIn(\"slow\");\n $(\"#buttonDownloadJpg\").fadeIn(\"slow\");\n if(($(\"#MapLabel\").val()==\"\") || ($(\"#MapValue\").val()==\"\")){\n $(\"#buttonPlay\").hide();\n $(\"#buttonStop\").hide();\n \n $(\"#buttonDownloadGif\").hide();\n $(\"#buttonDownloadJpg\").hide();\n }\n \n \n for(var i = 0; i < datas.length; i++) {\n entetes=Object.keys(datas[i]);\n var exist = false;\n var index = 0;\n for(var j = 0; j < entetes.length; j++) {\n if(entetes[j]==SelectedEnteteLabel){\n for(var k=0; k<labels.length; k++) {\n \n if (labels[k] == datas[i][entetes[j]]){\n index=k;\n exist= true;\n console.log(\"exsit\");\n }\n //console.log(\"exsitdd \"+labels[k]+\" \"+datas[i][entetes[j]]+\" = \"+exist);\n }\n\n if(exist==false){\n labels.push(datas[i][entetes[j]]);\n }\n }\n \n if(entetes[j]==SelectedEnteteValue){\n if(exist==false){\n valeurs.push(parseFloat(datas[i][entetes[j]]));\n \n }else{\n valeurs[index]+=parseFloat(datas[i][entetes[j]]);\n exist = false;\n }\n }\n \n //console.log(\"ente \"+datas[i][entetes[j]]);\n }\n }\n \n //console.log(\"entete \"+labels);\n //console.log(\"valeurs \"+valeurs);\n \n LoadMapData(labels,valeurs);\n \n}", "title": "" }, { "docid": "6a18ab3523f0151ef9ea3864a101a28b", "score": "0.538584", "text": "createLabel() {}", "title": "" }, { "docid": "795a27644957c692a6fde8893fdeb1cf", "score": "0.5385192", "text": "function limpiarDatosForms() {\n //resetear formularios\n\n $.each(inputs, function (idx, val) {\n\n $(this).val('');\n });\n $.each(inputs_, function (idx, val) {\n\n $(this).val('');\n });\n\n //mostrar todas las etiquetas\n $('label.etiqueta').show();\n\n }", "title": "" }, { "docid": "c210cdc30c7b56b0ad0fdf384f4168aa", "score": "0.5354059", "text": "function bindLabels(data) {\n var lables = {\n CalenderName: data.labels.CalenderName,\n CalenderColor: data.labels.CalenderColor,\n Description: data.labels.Description,\n Update: data.labels.Update,\n Cancel: data.labels.Cancel\n };\n\n $scope.editCalendarLables = lables;\n //appLogger.log(\"\" + JSON.stringify($scope.editCalendarLables));\n\n }", "title": "" }, { "docid": "98e0982a792ebb6dfe1f9fafc4928642", "score": "0.5353441", "text": "function _addFrequencyLabels(){\n for(i=0,x=margin_left+column_width;i<x_labels.length;i++,x+=column_width){\n ctx.fillText(x_labels[i], x-10, margin_top*2);\n ctx.beginPath();\n ctx.moveTo(x, margin_top+row_height);\n ctx.lineTo(x, canvas_height-row_height-margin_bottom);\n ctx.stroke();\n }\n }", "title": "" }, { "docid": "512694673fd75926ca65f8dbdf95aaa0", "score": "0.53354424", "text": "function updateGraphLabels() {\n var res = [];\n for (var i = 0; i < dialogService.graphLabels.length; i++) {\n res[i] = dialogService.graphLabels[i] + \":00\";\n }\n $scope.labels = res;\n }", "title": "" }, { "docid": "9737e52aa39fa92d5f02d3d1d6fe1c15", "score": "0.53336", "text": "function _addDBLabels(){\n\t for(i=0,y=margin_top+row_height;i<y_labels.length;i++,y+=row_height){\n \t ctx.fillText(y_labels[i], margin_left, y+5);\n\t\t ctx.beginPath();\n\t\t ctx.moveTo(margin_left+column_width,y);\n\t\t ctx.lineTo(canvas_width-column_width,y);\n\t\t ctx.stroke();\n }\n }", "title": "" }, { "docid": "d008eff33b218b52b689609f28276447", "score": "0.53126967", "text": "agregarLabelListaPreguntas(listaPreguntas, textoRespuesta) {\n listaPreguntas.append( $('<label>', this.crearLabelRespuesta(textoRespuesta))) ;\n }", "title": "" }, { "docid": "774ac290c7e6e1fe649ae0242035cb7d", "score": "0.53060657", "text": "async info()\n {\n console.log(this.periode);\n \n const semuacabang = new Array\n const formDataKirim = new FormData()\n\n if ( ! isNaN(this.periode.tanggal_mulai) ) {\n console.log(this.periode);\n \n formDataKirim.append('tanggal_mulai', this.periode.tanggal_mulai)\n formDataKirim.append('tanggal_akhir', this.periode.tanggal_akhir)\n }\n const opsi = {\n method: 'POST',\n body: formDataKirim\n }\n const respond = await fetch('api/informasi', opsi)\n const j = await respond.json()\n \n \n j.data.forEach((c,i) => { \n const cabang = new Array\n cabang.push(c.cabang)\n cabang.push(c.jumlah)\n\n const terape = new Array\n\n\n const subpegawai = new Array\n const subrealisasi = new Array\n const subtarget = new Array\n\n c.data.forEach(pegawai => {\n\n subpegawai.push(pegawai.nama_pegawai)\n subrealisasi.push(pegawai.jumlah)\n subtarget.push(!isNaN(pegawai.target)?pegawai.default_target:pegawai.target)\n\n })\n terape.push(subpegawai)\n terape.push(subrealisasi)\n terape.push(subtarget)\n\n cabang.push(terape)\n \n semuacabang.push(cabang)\n \n });\n this.datasetx = semuacabang\n }", "title": "" }, { "docid": "ee271e0416228a435828a3a46e605d1d", "score": "0.5305295", "text": "function setupLabel() {\n\tif ($('.label_check input').length) {\n\t\t$('.label_check').each(function(){ \n\t\t\t$(this).removeClass('c_on');\n\t\t});\n\t\t$('.label_check input:checked').each(function(){ \n\t\t\t$(this).parent('label').addClass('c_on');\n\t\t}); \n\t};\n\t// if ($('.label_radio input').length) {\n\t\t// $('.label_radio').each(function(){ \n\t\t\t// $(this).removeClass('r_on');\n\t\t// });\n\t\t// $('.label_radio input:checked').each(function(){ \n\t\t\t// $(this).parent('label').addClass('r_on');\n\t\t// });\n\t// };\n}", "title": "" }, { "docid": "8c3bcebb6e9826a750d934bb83e8cf0e", "score": "0.5304374", "text": "function setLabel(props){\n //label content\n console.log('SetLabel')\n console.log(props, 'and', expressed)\n var labelAttribute = \"<h1>\" + props +\n \"</h1><b>\" + expressed + \"</b>\";\n\n //create info label div\n var infolabel = d3.select(\"body\")\n .append(\"div\")\n .attr(\"class\", \"infolabel\")\n .attr(\"id\", props + \"_label\")\n .html(labelAttribute);\n\n var regionName = infolabel.append(\"div\")\n .attr(\"class\", \"labelname\")\n .html(props);\n}", "title": "" }, { "docid": "da9bacdd95b5b08430e32ad867713144", "score": "0.5301515", "text": "function setLabel(props){\n //label content\n var labelAttribute = \"<h3>\" + props[expressed] + \"%\"\n \"</h3>\";\n\n //create info label div\n var infolabel = d3.select(\"body\")\n .append(\"div\")\n .attr({\n \"class\": \"infolabel\",\n \"id\": props.geounit + \"_label\"\n })\n .html(labelAttribute);\n\n var regionName = infolabel.append(\"div\")\n .attr(\"class\", \"labelname\")\n .html(props.geounit);\n}", "title": "" }, { "docid": "84a7cdabf265537ddfec55d22adec493", "score": "0.53005224", "text": "function setLabel(props) {\n\t//different type of labels for different attributes\n\tvar labelAttribute;\n\tif (!props[expressedAttr]) {\n\t\tlabelAttribute = \"<h1>\" + \"Nodata\" + \"</h1><b>\" + \"</b>\";\n\t} else {\n\t\tlabelAttribute = \"<h1>\" + Math.ceil(props[expressedAttr]) +\n\t\t\"</h1><b>\" + \"</b>\";\n\t};\n\n\t//create info label div\n\tvar infolabel = d3.select(\"body\")\n\t\t.append(\"div\")\n\t\t.attr({\n\t\t\t\"class\": \"infolabel\",\n\t\t\t\"id\": props.region_code + \"_label\"\n\t\t})\n\t\t.html(labelAttribute);\n\n\tinfolabel.append(\"div\")\n\t\t.attr(\"class\", \"labelname\")\n\t\t.html(props.name);\n}", "title": "" }, { "docid": "1d4af68f35dcc488c62bd891a066852e", "score": "0.5288249", "text": "function setupLabel() {\n if ($('.label_check input').length) {\n $('.label_check').each(function () {\n $(this).removeClass('c_on');\n });\n $('.label_check input:checked').each(function () {\n $(this).parent('label').addClass('c_on');\n });\n };\n if ($('.label_radio input').length) {\n $('.label_radio').each(function () {\n $(this).removeClass('r_on');\n });\n $('.label_radio input:checked').each(function () {\n $(this).parent('label').addClass('r_on');\n });\n };\n}", "title": "" }, { "docid": "7f5d8030c44f9fa60bf8ac4924a91df5", "score": "0.5284587", "text": "processDistribucionFrecuencia()\r\n\t{\r\n\t\tlet f = this.controlFilas - 1; // Filas\r\n\t\tlet c = this.controlColumnas; // Columnas\r\n\t\tlet data = new Array(f); // Matriz para datos\r\n\t\tlet labels = []; // Array para etiquetas\r\n\t\tlet unidades = []; // Array para unidades\r\n\t\tlet porcentajes = []; // Array para porcentajes\r\n\t\tlet control = 1; // Control para datos sin nombre\r\n\r\n\t\t// Creamos la matriz F x C\r\n\t\tfor(let i = 0; i < f; i++){\r\n\t\t\tdata[i] = new Array(c);\r\n\t\t}\r\n\r\n\t\t// Recolectamos los datos de la tabla\r\n\t\tfor(let i = 1; i <= f; i ++){\r\n\t\t\tfor(let j = 0; j < (c+1); j++){\r\n\t\t\t\t// Verificamos la celda de nombre de variable\r\n\t\t\t\tif(j == 0){\r\n\t\t\t\t\tif(document.getElementById((i+1) + '' + (j+1)).value === ''){\r\n\t\t\t\t\t\tdata[i-1][j] = 'Dato ' + control;\r\n\t\t\t\t\t\tlabels[i-1] = 'Dato ' + control;\r\n\t\t\t\t\t\tdocument.getElementById((i+1) + '' + (j+1)).value = 'Dato ' + control;\r\n\t\t\t\t\t\tcontrol++; // Aumentamos el control\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tdata[i-1][j] = document.getElementById((i+1) + '' + (j+1)).value;\r\n\t\t\t\t\t\tlabels[i-1] = document.getElementById((i+1) + '' + (j+1)).value;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(j == 1){\r\n\t\t\t\t\t// Verificamos si el campo de datos esta vacio\r\n\t\t\t\t\tif(document.getElementById((i+1) + '' + (j+1)).value.length > 0){\r\n\t\t\t\t\t\tdata[i-1][j] = document.getElementById((i+1) + '' + (j+1)).value;\r\n\t\t\t\t\t\tunidades[i-1] = parseInt(document.getElementById((i+1) + '' + (j+1)).value);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tdocument.getElementById((i+1) + '' + (j+1)).value = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Verificamos si el campo de datos esta vacio\r\n\t\t\t\t\tif(document.getElementById((i+1) + '' + (j+1)).innerHTML.length > 0){\r\n\t\t\t\t\t\tporcentajes[i-1] = parseFloat(document.getElementById((i+1) + '' + (j+1)).innerHTML);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tdocument.getElementById((i+1) + '' + (j+1)).innerHTML = '0%';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Mostramos texto para resultados\r\n\t\tlet h = document.createElement('h2');\r\n\t\th.setAttribute('class', 'results-title');\r\n\t\tlet hText = document.createTextNode('Resultados:');\r\n\t\th.appendChild(hText);\r\n\t\tdocument.getElementById('main-content').appendChild(h);\r\n\r\n\t\t// Obtenem0s medidas de tendencia central\r\n\t\tlet table = document.createElement('table');\r\n\t\ttable.setAttribute('id', 'medidas');\r\n\t\tlet caption = document.createElement('caption');\r\n\t\tcaption.setAttribute('class', 'padding');\r\n\t\tlet text = document.createTextNode('Medidas de tendencia central');\r\n\t\tcaption.appendChild(text);\r\n\t\ttable.appendChild(caption);\r\n\t\tlet row = table.insertRow(0);\r\n\t\tlet cell = row.insertCell(0);\r\n\t\tcell.setAttribute('class', 'padding');\r\n\t\ttext = document.createTextNode('Media aritmética');\r\n\t\tcell.appendChild(text);\r\n\t\tcell = row.insertCell(1);\r\n\t\ttext = document.createTextNode(this.process.mediaAritmetica(unidades).toFixed(2));\r\n\t\tcell.appendChild(text);\r\n\t\trow = table.insertRow(1);\r\n\t\tcell = row.insertCell(0);\r\n\t\tcell.setAttribute('class', 'padding');\r\n\t\ttext = document.createTextNode('Moda');\r\n\t\tcell.appendChild(text);\r\n\t\tcell = row.insertCell(1);\r\n\t\ttext = document.createTextNode(this.process.moda(unidades).toFixed(2));\r\n\t\tcell.appendChild(text);\r\n\t\trow = table.insertRow(2);\r\n\t\tcell = row.insertCell(0);\r\n\t\tcell.setAttribute('class', 'padding');\r\n\t\ttext = document.createTextNode('Mediana');\r\n\t\tcell.appendChild(text);\r\n\t\tcell = row.insertCell(1);\r\n\t\ttext = document.createTextNode(this.process.mediana(unidades).toFixed(2));\r\n\t\tcell.appendChild(text);\r\n\t\trow = table.insertRow(3);\r\n\t\tcell = row.insertCell(0);\r\n\t\tcell.setAttribute('class', 'padding');\r\n\t\ttext = document.createTextNode('Media geométrica');\r\n\t\tcell.appendChild(text);\r\n\t\tcell = row.insertCell(1);\r\n\t\ttext = document.createTextNode(this.process.mediaGeometrica(unidades).toFixed(2));\r\n\t\tcell.appendChild(text);\r\n\t\trow = table.insertRow(4);\r\n\t\tcell = row.insertCell(0);\r\n\t\tcell.setAttribute('class', 'padding');\r\n\t\ttext = document.createTextNode('Media Armónica');\r\n\t\tcell.appendChild(text);\r\n\t\tcell = row.insertCell(1);\r\n\t\ttext = document.createTextNode(this.process.mediaArmonica(unidades).toFixed(2));\r\n\t\tcell.appendChild(text);\r\n\t\tdocument.getElementById('main-content').appendChild(table);\r\n\r\n\t\t// Obtenem0s medidas de dispersión\r\n\t\ttable = document.createElement('table');\r\n\t\ttable.setAttribute('id', 'medidas');\r\n\t\tcaption = document.createElement('caption');\r\n\t\tcaption.setAttribute('class', 'padding');\r\n\t\ttext = document.createTextNode('Medidas de dispersión');\r\n\t\tcaption.appendChild(text);\r\n\t\ttable.appendChild(caption);\r\n\t\trow = table.insertRow(0);\r\n\t\tcell = row.insertCell(0);\r\n\t\tcell.setAttribute('class', 'padding');\r\n\t\ttext = document.createTextNode('Desviación media');\r\n\t\tcell.appendChild(text);\r\n\t\tcell = row.insertCell(1);\r\n\t\ttext = document.createTextNode(this.process.desviacionMedia(unidades).toFixed(2));\r\n\t\tcell.appendChild(text);\r\n\t\trow = table.insertRow(1);\r\n\t\tcell = row.insertCell(0);\r\n\t\tcell.setAttribute('class', 'padding');\r\n\t\ttext = document.createTextNode('Desviación estandar');\r\n\t\tcell.appendChild(text);\r\n\t\tcell = row.insertCell(1);\r\n\t\ttext = document.createTextNode(this.process.desviacionEstandar(unidades).toFixed(2));\r\n\t\tcell.appendChild(text);\r\n\t\trow = table.insertRow(2);\r\n\t\tcell = row.insertCell(0);\r\n\t\tcell.setAttribute('class', 'padding');\r\n\t\ttext = document.createTextNode('Varianza');\r\n\t\tcell.appendChild(text);\r\n\t\tcell = row.insertCell(1);\r\n\t\ttext = document.createTextNode(this.process.varianza(unidades).toFixed(2));\r\n\t\tcell.appendChild(text);\r\n\t\tdocument.getElementById('main-content').appendChild(table);\r\n\r\n\t\t// Creamos los elementos\r\n\t\tlet canvas1 = document.createElement('canvas');\r\n\t\tlet canvas2 = document.createElement('canvas');\r\n\t\tlet canvas3 = document.createElement('canvas');\r\n\t\tlet canvas4 = document.createElement('canvas');\r\n\t\tlet canvas5 = document.createElement('canvas');\r\n\r\n\t\t// Agregamos los atributos\r\n\t\tcanvas1.setAttribute('id', 'view1');\r\n\t\tcanvas2.setAttribute('id', 'view2');\r\n\t\tcanvas3.setAttribute('id', 'view3');\r\n\t\tcanvas4.setAttribute('id', 'view4');\r\n\t\tcanvas5.setAttribute('id', 'view5');\r\n\r\n\t\t// Inyectamos\r\n\t\tdocument.getElementById('main-content').appendChild(canvas1);\r\n\t\tdocument.getElementById('main-content').appendChild(canvas2);\r\n\t\tdocument.getElementById('main-content').appendChild(canvas3);\r\n\t\tdocument.getElementById('main-content').appendChild(canvas4);\r\n\t\tdocument.getElementById('main-content').appendChild(canvas5);\r\n\r\n\t\t// Generamos las tablas\r\n\t\tthis.chart.createBar('view1', 'Histograma (unidades)', labels, unidades);\r\n\t\tthis.chart.createBar('view2', 'Histograma (porcentajes)', labels, porcentajes);\r\n\t\tthis.chart.createPie('view3', labels, unidades);\r\n\t\tthis.chart.createDoughnut('view4', labels, porcentajes);\r\n\t\tthis.chart.createLine('view5', 'Polígono de frecuencia', labels, unidades);\r\n\t}", "title": "" }, { "docid": "755a93f861d15431f58ee347b84e8f6d", "score": "0.5282307", "text": "crearLabelRespuesta(textoRespuesta) {\n return {type: textoRespuesta, text: textoRespuesta};\n }", "title": "" }, { "docid": "36fa4399742baa298a095c8746e0afaa", "score": "0.5279614", "text": "function updateSearchLabels(id,name,type){ \n labels.push({\n 'id' : id,\n 'label' : name, \n 'desc': type\n });\n}", "title": "" }, { "docid": "36fa4399742baa298a095c8746e0afaa", "score": "0.5279614", "text": "function updateSearchLabels(id,name,type){ \n labels.push({\n 'id' : id,\n 'label' : name, \n 'desc': type\n });\n}", "title": "" }, { "docid": "c0793d303403492f2d7044fcefc63758", "score": "0.5275464", "text": "drawLabels() {\n this.base.append('text')\n .text((d, i) => { return this.pfBar.chart.data.labels[i]; })\n .attr('height', this.pfBar.barThickness)\n .attr('transform', 'translate(60,0)')\n .attr('x', (d, i) => { return this.barX(i) + '%'; })\n .attr('y', this.pfBar.chartHeight - this.pfBar.labelHeight/2)\n .attr('fill', this.pfBar.labelColor);\n }", "title": "" }, { "docid": "d0cf64f56a16f30dc043d63b29b0611b", "score": "0.5271102", "text": "function bindLabels(data) {\n\n\n var lables = {\n\n Title: data.labels.Title,\n Submit: data.labels.Submit,\n OrganizationBasicInfo: data.labels.OrganizationList,\n OrganizationLevel: data.labels.OrganizationLevel\n };\n\n $scope.labels = lables;\n\n\n }", "title": "" }, { "docid": "838f096ae3c392a9c7b5c7741a499eb1", "score": "0.52687556", "text": "function drawLabels() {\n // get all the nodes and then draw the text on top right\n var texts = svg.selectAll(\"text\").data(complete_data_example);\n texts.enter()\n .append(\"text\")\n .attr(\"id\", function (d) { return \"t_\" + d.name; })\n .attr(\"x\", function (d) { return d.x + 17; })\n .attr(\"y\", function (d) { return d.y - 17; })\n .attr(\"fill\", \"black\")\n .text(function (d) { return d.name; });\n}", "title": "" }, { "docid": "46f0f2e1153f4c5891386f3cd6dcffa9", "score": "0.5266229", "text": "function setupLabel() {\n\n // Checkbox\n var checkBox = \".checkbox\";\n var checkBoxInput = checkBox + \" input[type='checkbox']\";\n var checkBoxChecked = \"checked\";\n var checkBoxDisabled = \"disabled\";\n\n // Radio\n var radio = \".radio\";\n var radioInput = radio + \" input[type='radio']\";\n var radioOn = \"checked\";\n var radioDisabled = \"disabled\";\n\n // Checkboxes\n if ($(checkBoxInput).length) {\n $(checkBox).each(function () {\n $(this).removeClass(checkBoxChecked);\n });\n $(checkBoxInput + \":checked\").each(function () {\n $(this).parent(checkBox).addClass(checkBoxChecked);\n });\n $(checkBoxInput + \":disabled\").each(function () {\n $(this).parent(checkBox).addClass(checkBoxDisabled);\n });\n }\n\n // Radios\n if ($(radioInput).length) {\n $(radio).each(function () {\n $(this).removeClass(radioOn);\n });\n $(radioInput + \":checked\").each(function () {\n $(this).parent(radio).addClass(radioOn);\n });\n $(radioInput + \":disabled\").each(function () {\n $(this).parent(radio).addClass(radioDisabled);\n });\n }\n}", "title": "" }, { "docid": "94a5bf27feace2a857391abe2e59636c", "score": "0.5263897", "text": "function getChartTabel(opco, labels, AngkaBulanSaja, yearnow) {\n\n var url30 = url_ol + '/api/index.php/fin_cost/get_data_mperform?year=' + yearnow + '&company=3000';\n var url40 = url_ol + '/api/index.php/fin_cost/get_data_mperform?year=' + yearnow + '&company=4000';\n var url70 = url_ol + '/api/index.php/fin_cost/get_data_mperform?year=' + yearnow + '&company=7000';\n var urlSMI = url_ol + '/api/index.php/fin_cost/get_data_mperform?year=' + yearnow + '&company=smi';\n $.when(\n $.getJSON(url30),\n $.getJSON(url40),\n $.getJSON(url70),\n $.getJSON(urlSMI)\n ).done(function (result30, result40, result70, resultSMI) {\n\n ajsCem = 0;\n ajsClin =0;\n if (opco == 'smi') {\n datasProdOpco = {\"3000\": [], \"4000\": [], \"7000\": []};\n datasProdOpco1 = {\"3000\": [], \"4000\": [], \"7000\": []};\n plotOpcoCementClinker('3000', AngkaBulanSaja, result30);\n plotOpcoCementClinker('4000', AngkaBulanSaja, result40);\n plotOpcoCementClinker('7000', AngkaBulanSaja, result70);\n\n plotOpcoCementClinker1('3000', AngkaBulanSaja, result30);\n plotOpcoCementClinker1('4000', AngkaBulanSaja, result40);\n plotOpcoCementClinker1('7000', AngkaBulanSaja, result70);\n plotCementClinker('smi', AngkaBulanSaja, resultSMI);\n graphicChart_CemCli_SMI(labels, datasProd);\n graphicChart_CemCli_Opco(labels, datasProdOpco);\n graphicChart_CemCli_Opco1(labels, datasProdOpco1);\n }\n if (opco == '3000') {\n datasub2 = [];\n datasub3 = [];\n datasub3000 = {\"P_3301\":[], \"P_3302\":[], \"P_3303\":[], \"P_3304\":[], \"P_3309\":[]};\n datasub30001 = {\"P_3301\":[], \"P_3302\":[], \"P_3303\":[], \"P_3304\":[], \"P_3309\":[]};\n plotCementClinker('3000', AngkaBulanSaja, result30);\n plotOpcoCementClinkerPADANG('3000', AngkaBulanSaja, result30);\n plotOpcoCementClinkerPADANG1('3000', AngkaBulanSaja, result30);\n graphicChart_CemCli_SMI(labels, datasProd);\n graphicChartPerforma_Padang(labels, datasub3000);\n graphicChartPerforma_Padang1(labels, datasub30001);\n\n }\n if (opco == '4000') {\n datasub2 = [];\n datasub3 = [];\n datasub4000 = {\"P_4301\":[], \"P_4302\":[], \"P_4303\":[]};\n datasub40001 = {\"P_4301\":[], \"P_4302\":[], \"P_4303\":[]};\n plotCementClinker('4000', AngkaBulanSaja, result40);\n graphicChart_CemCli_SMI(labels, datasProd);\n plotOpcoCementClinkerPADANG('4000', AngkaBulanSaja, result40);\n plotOpcoCementClinkerPADANG1('4000', AngkaBulanSaja, result40);\n graphicChartPerforma_Tonasa(labels, datasub4000);\n graphicChartPerforma_Tonasa1(labels, datasub40001);\n\n }\n if (opco == '7000') {\n datasub2 = [];\n datasub3 = [];\n datasub7000 = {\"P_7301\":[], \"P_7302\":[], \"P_7303\":[], \"P_7304\":[], \"P_7305\":[]};\n datasub70001 = {\"P_7301\":[], \"P_7302\":[], \"P_7303\":[], \"P_7304\":[], \"P_7305\":[]};\n plotCementClinker('7000', AngkaBulanSaja, result70);\n plotOpcoCementClinkerPADANG('7000', AngkaBulanSaja, result70);\n plotOpcoCementClinkerPADANG1('7000', AngkaBulanSaja, result70);\n graphicChart_CemCli_SMI(labels, datasProd);\n graphicChartPerforma_Gresik(labels, datasub7000);\n graphicChartPerforma_Gresik1(labels, datasub70001);\n }\n $(\".se-pre-con\").fadeOut(\"slow\");\n });\n\n}", "title": "" }, { "docid": "97113683f406c1c6beee80b058cdcbcf", "score": "0.5260602", "text": "function setLabel(props){\n\t//label content\n\tvar labelAttribute = \"<h1>\" + props[expressed] +\n\t\t\"</h1><b>\" + expressed + \"</b>\";\n\n\t//create info label div\n\tvar infolabel = d3.select(\"body\")\n\t\t.append(\"div\")\n\t\t.attr({\n\t\t\t\"class\": \"infolabel\",\n\t\t\t\"id\": props.name + \"_label\"\n\t\t})\n\t\t.html(labelAttribute);\n\n\tvar regionName = infolabel.append(\"div\")\n\t\t.attr(\"class\", \"labelname\")\n\t\t.html(props.name);\n}", "title": "" }, { "docid": "d05a3657899cc488b69fb7b78e8c6647", "score": "0.5260066", "text": "function InitialLabels() {\n\n\tvar fragLabel1 = av.label(\"1\", {left : 102, top: 310});\n\tvar fragLabel2 = av.label(\"2001\", {left : 208, top: 310});\n\tvar fragLabel3 = av.label(\"2003\", {left : 245, top: 310});\n\tvar fragLabel4 = av.label(\"5688\", {left : 351, top: 310});\n\tvar fragLabel5 = av.label(\"5894\", {left : 388, top: 310});\n\tvar fragLabel6 = av.label(\"9942\", {left : 494, top: 310});\n\tvar fragLabel7 = av.label(\"10528\", {left : 531, top: 310});\n\tvar fragLabel8 = av.label(\"10984\", {left : 630, top: 310});\t\n\tvar fragLabel8 = av.label(\"3000\", {left : 137, top: 173});\n }", "title": "" }, { "docid": "5a10e5c9bfcbbeb4e9752e6938509235", "score": "0.52549106", "text": "function translationLabels() {\n\t\t\t\t/** This help array shows the hints for this experiment */\n\t\t\t\thelp_array = [_(\"help1\"), _(\"help2\"), _(\"help3\"), _(\"help4\"), _(\"help5\"), _(\"help6\"), _(\"help7\"), _(\"help8\"), _(\"help9\"), _(\"help10\"), _(\"help11\"), _(\"Next\"), _(\"Close\")];\n\t\t\t\tscope.heading = _(\"Numerical Aperture of Optical Fiber\");\n\t\t\t\tscope.variables = _(\"Variables\");\n\t\t\t\tscope.start_lbl = _(\"Start\");\n\t\t\t\tcurrent_output_unit_text = _(\"Current Output Unit\");\n\t\t\t\tdetector_text = _(\"Detector\");\n\t\t\t\tfiber_stand_text = _(\"Fiber Stand\");\n\t\t\t\tconcenterator_text = _(\"Concenterator\");\n\t\t\t\temitter_text = _(\"Emitter\");\n\t\t\t\tfiber_text = _(\"Fiber\");\n\t\t\t\tscope.show_vernier_reading_lbl = _(\"Show Vernier Reading\");\n\t\t\t\tscope.show_graph_lbl = _(\"Show Graph\");\n\t\t\t\tscope.detector_distance_x_label = _(\"Detector Distance (X) mm \");\n\t\t\t\tscope.detector_distance_z_label = _(\"Detector Distance (Z) mm: \");\n\t\t\t\tscope.choose_laser_lbl = _(\"Select Laser\");\n\t\t\t\tscope.red = _(\"Red\");\n\t\t\t\tscope.choose_fiber_lbl = _(\"Select Fiber\");\n\t\t\t\tscope.glass = _(\"Glass - Glass Fiber\");\t\n\t\t\t\tswitch_on_text = _(\"Switch On\");\n\t\t\t\tswitch_off_text = _(\"Switch Off\");\n\t\t\t\tscope.reset = _(\"Reset\");\n\t\t\t\tscope.result = _(\"Measurements\");\n\t\t\t\tgraph_x_axis_lbl = _(\"Detector Distance (X) in mm\");\t\n\t\t\t\tmessage_lbl=_(\"Place the apparatus in correct order on the breadboard to start the experiment.\");\n\t\t\t\tscope.copyright = _(\"copyright\");\n\t\t\t\t/** The fiber_array contains the labels, types and indexes of the Select Fiber dropdown */\n\t\t\t\tscope.fiber_array = [{\n\t\t\t\t\tFiber: _(\"Glass - Glass Fiber\"),\n\t\t\t\t\ttype1: 1.58,\n\t\t\t\t\ttype2: 1.52,\n\t\t\t\t\tindex: 0\n\t\t\t\t}, {\n\t\t\t\t\tFiber: _(\"Plastic - Glass Fiber\"),\n\t\t\t\t\ttype1: 1.57,\n\t\t\t\t\ttype2: 1.51,\n\t\t\t\t\tindex: 1\n\t\t\t\t}];\n\t\t\t\t/** The laser_array contains the labels, types and indexes of the Select Laser dropdown */\n\t\t\t\tscope.laser_array = [{\n\t\t\t\t\tLaser: _(\"Red\"),\n\t\t\t\t\ttype: 632.8,\n\t\t\t\t\tindex: 0\n\t\t\t\t}, {\n\t\t\t\t\tLaser: _(\"Green\"),\n\t\t\t\t\ttype: 530,\n\t\t\t\t\tindex: 1\n\t\t\t\t}, {\n\t\t\t\t\tLaser: _(\"Blue\"),\n\t\t\t\t\ttype: 488,\n\t\t\t\t\tindex: 2\n\t\t\t\t}];\t\t\t\t\t\n\t\t\t\tscope.$apply();\n\t\t\t\tnumerical_aperture_stage.update();\n\t\t\t}", "title": "" }, { "docid": "20baa27f2605644f30210ff315790fca", "score": "0.52476394", "text": "function initLabels(data){\n\n\t\t// console.log(data);\n\n\t\t// --- Add text --- //\n\n\t\tvar leftText = data.comp_men + ' <span class=\"blue\">men</span> competing &middot; ' + formatPerc(1 - data.women_ratio) +' of total';\n\t\tvar rightText = data.comp_women + ' <span class=\"orange\">women</span> competing &middot; ' + formatPerc(data.women_ratio) +' of total';\n\t\t\n\t\td3.select('.force-text#left').html(leftText);\n\t\td3.select('.force-text#right').html(rightText);\n\t\td3.select('.force-text#center').html('Just some calculations away - at 0%');\n\n\t\t// --- Position text --- //\n\n\t\tpadding = 4;\n\t\tcanvasPos = getWindowOffset(canvas.node());\n\t\tcanvasDim = canvas.node().getBoundingClientRect();\n\t\tvar leftDim = d3.select('#left').node().getBoundingClientRect();\n\t\tvar rightDim = d3.select('#right').node().getBoundingClientRect();\n\t\tvar centerDim = d3.select('#center').node().getBoundingClientRect();\n\n\n\t\tvar positions = {\n\t\t\tleftText: {\n\t\t\t\ttop: {\n\t\t\t\t\twide: canvasPos.top + canvasDim.height - leftDim.height - padding + 'px',\n\t\t\t\t\ttight: canvasPos.top + canvasDim.height - 2 * leftDim.height - 2 * padding + 'px'\n\t\t\t\t},\n\t\t\t\tleft: {\n\t\t\t\t\twide: canvasPos.left + padding + 'px',\n\t\t\t\t\ttight: canvasPos.left + canvasDim.width/2 - leftDim.width/2 + 'px'\n\t\t\t\t}\n\t\t\t},\n\t\t\trightText: {\n\t\t\t\ttop: {\n\t\t\t\t\twide: canvasPos.top + canvasDim.height - rightDim.height - padding + 'px',\n\t\t\t\t\ttight: canvasPos.top + canvasDim.height - rightDim.height - padding + 'px'\n\t\t\t\t},\n\t\t\t\tleft: {\n\t\t\t\t\twide: canvasPos.left + canvasDim.width - rightDim.width - padding + 'px',\n\t\t\t\t\ttight: canvasPos.left + canvasDim.width/2 - rightDim.width/2 + 'px'\n\t\t\t\t}\n\t\t\t},\n\t\t\tcenterText: {\n\t\t\t\ttop: canvasPos.top + canvasDim.height/2 - centerDim.height/2 + 'px',\n\t\t\t\tleft: canvasPos.left + canvasDim.width/2 - centerDim.width/2 + 'px'\n\t\t\t}\n\t\t};\n\n\n\t\tvar wide = leftDim.width + rightDim.width + 2 * padding < canvasDim.width ? true : false;\n\n\t\td3.select('.force-text#left')\n\t\t\t.style('top', wide ? positions.leftText.top.wide : positions.leftText.top.tight)\n\t\t\t.style('left', wide ? positions.leftText.left.wide : positions.leftText.left.tight);\n\n\t\td3.select('.force-text#right')\n\t\t\t.style('top', wide ? positions.rightText.top.wide : positions.rightText.top.tight)\n\t\t\t.style('left', wide ? positions.rightText.left.wide : positions.rightText.left.tight);\n\n\t\td3.select('.force-text#center')\n\t\t\t.style('top', positions.centerText.top)\n\t\t\t.style('left', positions.centerText.left);\n\n\n\t} // initLabels()", "title": "" }, { "docid": "ac76a829b113560beaa1c5920c070c87", "score": "0.5247546", "text": "function updateLabel() {\n // set the label to be chosen emoji\n this.marker.setLabel(image)\n //return the image var to empty so that next created marker does not have a label from start\n image = \"\";\n\n }", "title": "" }, { "docid": "b781a36f4895d850bf7c9b300b060f7a", "score": "0.5220626", "text": "function createInfoLabels(root) {\n\n for (i = 0; i < 7; i++) {\n pathLevel.push(svg.append(\"text\")\n .attr(\"x\", 0)\n .attr(\"y\",5+ (20*i)*(1.2*radius/340)-60*(1.2*radius/340))\n .attr(\"font-size\", 17*(radius/340))\n .attr(\"text-anchor\", \"middle\")\n .style(\"fill\", \"gray\"));\n }\n\n // Provide root info in center\n pathLevel[0].text(root.name);\n pathLevel[5].text(root.downloads+' Downloads');\n pathLevel[6].text(root.thesesCount+' Theses');\n\n // Draw clickable center svg to zoom out\n center = svg.append('circle')\n .attr('r', radius / 3)\n .attr('fill', 'white')\n .attr('fill-opacity', 0)\n .on('click', zoomOut);\n}", "title": "" }, { "docid": "8d223dba4d0693909f741c9d216f0caa", "score": "0.522023", "text": "function setupLabel() {\r\n\t\tif ($('.label_check input').length) {\r\n\t\t\t$('.label_check').removeClass('c_on');\r\n\t\t\t$('.label_check input:checked').parent('label').addClass('c_on');\r\n\t\t}\r\n\t\t;\r\n\t\tif ($('.label_radio input').length) {\r\n\t\t\t$('.label_radio').removeClass('r_on');\r\n\t\t\t$('.label_radio input:checked').parent('label').addClass('r_on');\r\n\r\n\t\t}\r\n\t\t;\r\n\t}", "title": "" }, { "docid": "d3b368ae7a81153fa926eb84433dfa69", "score": "0.52197707", "text": "function updateLabels() {\n label = label.data(data.topics, function(d) { return d.name; });\n\n label.exit().remove();\n\n var labelEnter = label.enter().append(\"a\")\n .attr(\"class\", \"g-label\")\n .attr(\"href\", function(d) { return \"#\" + encodeURIComponent(d.name); })\n .call(force.drag)\n .call(linkTopic);\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-name\")\n .text(function(d) { return d.name; });\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-value\");\n\n label\n .style(\"font-size\", function(d) { return Math.max(8, d.r / 2) + \"px\"; })\n .style(\"width\", function(d) { return d.r * 2.5 + \"px\"; });\n\n // Create a temporary span to compute the true text width.\n label.append(\"span\")\n .text(function(d) { return d.name; })\n .each(function(d) { d.dx = Math.max(d.r * 2.5, this.getBoundingClientRect().width); })\n .remove();\n\n label\n .style(\"width\", function(d) { return d.dx + \"px\"; })\n .select(\".g-value\")\n .text(function(d) { return formatShortCount(d.parties[0].count) + \" - \" + formatShortCount(d.parties[1].count); });\n\n // Compute the height of labels when wrapped.\n label.each(function(d) { d.dy = this.getBoundingClientRect().height; });\n}", "title": "" }, { "docid": "d3b368ae7a81153fa926eb84433dfa69", "score": "0.52197707", "text": "function updateLabels() {\n label = label.data(data.topics, function(d) { return d.name; });\n\n label.exit().remove();\n\n var labelEnter = label.enter().append(\"a\")\n .attr(\"class\", \"g-label\")\n .attr(\"href\", function(d) { return \"#\" + encodeURIComponent(d.name); })\n .call(force.drag)\n .call(linkTopic);\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-name\")\n .text(function(d) { return d.name; });\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-value\");\n\n label\n .style(\"font-size\", function(d) { return Math.max(8, d.r / 2) + \"px\"; })\n .style(\"width\", function(d) { return d.r * 2.5 + \"px\"; });\n\n // Create a temporary span to compute the true text width.\n label.append(\"span\")\n .text(function(d) { return d.name; })\n .each(function(d) { d.dx = Math.max(d.r * 2.5, this.getBoundingClientRect().width); })\n .remove();\n\n label\n .style(\"width\", function(d) { return d.dx + \"px\"; })\n .select(\".g-value\")\n .text(function(d) { return formatShortCount(d.parties[0].count) + \" - \" + formatShortCount(d.parties[1].count); });\n\n // Compute the height of labels when wrapped.\n label.each(function(d) { d.dy = this.getBoundingClientRect().height; });\n}", "title": "" }, { "docid": "d3b368ae7a81153fa926eb84433dfa69", "score": "0.52197707", "text": "function updateLabels() {\n label = label.data(data.topics, function(d) { return d.name; });\n\n label.exit().remove();\n\n var labelEnter = label.enter().append(\"a\")\n .attr(\"class\", \"g-label\")\n .attr(\"href\", function(d) { return \"#\" + encodeURIComponent(d.name); })\n .call(force.drag)\n .call(linkTopic);\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-name\")\n .text(function(d) { return d.name; });\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-value\");\n\n label\n .style(\"font-size\", function(d) { return Math.max(8, d.r / 2) + \"px\"; })\n .style(\"width\", function(d) { return d.r * 2.5 + \"px\"; });\n\n // Create a temporary span to compute the true text width.\n label.append(\"span\")\n .text(function(d) { return d.name; })\n .each(function(d) { d.dx = Math.max(d.r * 2.5, this.getBoundingClientRect().width); })\n .remove();\n\n label\n .style(\"width\", function(d) { return d.dx + \"px\"; })\n .select(\".g-value\")\n .text(function(d) { return formatShortCount(d.parties[0].count) + \" - \" + formatShortCount(d.parties[1].count); });\n\n // Compute the height of labels when wrapped.\n label.each(function(d) { d.dy = this.getBoundingClientRect().height; });\n}", "title": "" }, { "docid": "d3b368ae7a81153fa926eb84433dfa69", "score": "0.52197707", "text": "function updateLabels() {\n label = label.data(data.topics, function(d) { return d.name; });\n\n label.exit().remove();\n\n var labelEnter = label.enter().append(\"a\")\n .attr(\"class\", \"g-label\")\n .attr(\"href\", function(d) { return \"#\" + encodeURIComponent(d.name); })\n .call(force.drag)\n .call(linkTopic);\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-name\")\n .text(function(d) { return d.name; });\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-value\");\n\n label\n .style(\"font-size\", function(d) { return Math.max(8, d.r / 2) + \"px\"; })\n .style(\"width\", function(d) { return d.r * 2.5 + \"px\"; });\n\n // Create a temporary span to compute the true text width.\n label.append(\"span\")\n .text(function(d) { return d.name; })\n .each(function(d) { d.dx = Math.max(d.r * 2.5, this.getBoundingClientRect().width); })\n .remove();\n\n label\n .style(\"width\", function(d) { return d.dx + \"px\"; })\n .select(\".g-value\")\n .text(function(d) { return formatShortCount(d.parties[0].count) + \" - \" + formatShortCount(d.parties[1].count); });\n\n // Compute the height of labels when wrapped.\n label.each(function(d) { d.dy = this.getBoundingClientRect().height; });\n}", "title": "" }, { "docid": "d3b368ae7a81153fa926eb84433dfa69", "score": "0.52197707", "text": "function updateLabels() {\n label = label.data(data.topics, function(d) { return d.name; });\n\n label.exit().remove();\n\n var labelEnter = label.enter().append(\"a\")\n .attr(\"class\", \"g-label\")\n .attr(\"href\", function(d) { return \"#\" + encodeURIComponent(d.name); })\n .call(force.drag)\n .call(linkTopic);\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-name\")\n .text(function(d) { return d.name; });\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-value\");\n\n label\n .style(\"font-size\", function(d) { return Math.max(8, d.r / 2) + \"px\"; })\n .style(\"width\", function(d) { return d.r * 2.5 + \"px\"; });\n\n // Create a temporary span to compute the true text width.\n label.append(\"span\")\n .text(function(d) { return d.name; })\n .each(function(d) { d.dx = Math.max(d.r * 2.5, this.getBoundingClientRect().width); })\n .remove();\n\n label\n .style(\"width\", function(d) { return d.dx + \"px\"; })\n .select(\".g-value\")\n .text(function(d) { return formatShortCount(d.parties[0].count) + \" - \" + formatShortCount(d.parties[1].count); });\n\n // Compute the height of labels when wrapped.\n label.each(function(d) { d.dy = this.getBoundingClientRect().height; });\n}", "title": "" }, { "docid": "d3b368ae7a81153fa926eb84433dfa69", "score": "0.52197707", "text": "function updateLabels() {\n label = label.data(data.topics, function(d) { return d.name; });\n\n label.exit().remove();\n\n var labelEnter = label.enter().append(\"a\")\n .attr(\"class\", \"g-label\")\n .attr(\"href\", function(d) { return \"#\" + encodeURIComponent(d.name); })\n .call(force.drag)\n .call(linkTopic);\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-name\")\n .text(function(d) { return d.name; });\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-value\");\n\n label\n .style(\"font-size\", function(d) { return Math.max(8, d.r / 2) + \"px\"; })\n .style(\"width\", function(d) { return d.r * 2.5 + \"px\"; });\n\n // Create a temporary span to compute the true text width.\n label.append(\"span\")\n .text(function(d) { return d.name; })\n .each(function(d) { d.dx = Math.max(d.r * 2.5, this.getBoundingClientRect().width); })\n .remove();\n\n label\n .style(\"width\", function(d) { return d.dx + \"px\"; })\n .select(\".g-value\")\n .text(function(d) { return formatShortCount(d.parties[0].count) + \" - \" + formatShortCount(d.parties[1].count); });\n\n // Compute the height of labels when wrapped.\n label.each(function(d) { d.dy = this.getBoundingClientRect().height; });\n}", "title": "" }, { "docid": "d3b368ae7a81153fa926eb84433dfa69", "score": "0.52197707", "text": "function updateLabels() {\n label = label.data(data.topics, function(d) { return d.name; });\n\n label.exit().remove();\n\n var labelEnter = label.enter().append(\"a\")\n .attr(\"class\", \"g-label\")\n .attr(\"href\", function(d) { return \"#\" + encodeURIComponent(d.name); })\n .call(force.drag)\n .call(linkTopic);\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-name\")\n .text(function(d) { return d.name; });\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-value\");\n\n label\n .style(\"font-size\", function(d) { return Math.max(8, d.r / 2) + \"px\"; })\n .style(\"width\", function(d) { return d.r * 2.5 + \"px\"; });\n\n // Create a temporary span to compute the true text width.\n label.append(\"span\")\n .text(function(d) { return d.name; })\n .each(function(d) { d.dx = Math.max(d.r * 2.5, this.getBoundingClientRect().width); })\n .remove();\n\n label\n .style(\"width\", function(d) { return d.dx + \"px\"; })\n .select(\".g-value\")\n .text(function(d) { return formatShortCount(d.parties[0].count) + \" - \" + formatShortCount(d.parties[1].count); });\n\n // Compute the height of labels when wrapped.\n label.each(function(d) { d.dy = this.getBoundingClientRect().height; });\n}", "title": "" }, { "docid": "d3b368ae7a81153fa926eb84433dfa69", "score": "0.52197707", "text": "function updateLabels() {\n label = label.data(data.topics, function(d) { return d.name; });\n\n label.exit().remove();\n\n var labelEnter = label.enter().append(\"a\")\n .attr(\"class\", \"g-label\")\n .attr(\"href\", function(d) { return \"#\" + encodeURIComponent(d.name); })\n .call(force.drag)\n .call(linkTopic);\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-name\")\n .text(function(d) { return d.name; });\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-value\");\n\n label\n .style(\"font-size\", function(d) { return Math.max(8, d.r / 2) + \"px\"; })\n .style(\"width\", function(d) { return d.r * 2.5 + \"px\"; });\n\n // Create a temporary span to compute the true text width.\n label.append(\"span\")\n .text(function(d) { return d.name; })\n .each(function(d) { d.dx = Math.max(d.r * 2.5, this.getBoundingClientRect().width); })\n .remove();\n\n label\n .style(\"width\", function(d) { return d.dx + \"px\"; })\n .select(\".g-value\")\n .text(function(d) { return formatShortCount(d.parties[0].count) + \" - \" + formatShortCount(d.parties[1].count); });\n\n // Compute the height of labels when wrapped.\n label.each(function(d) { d.dy = this.getBoundingClientRect().height; });\n}", "title": "" }, { "docid": "d3b368ae7a81153fa926eb84433dfa69", "score": "0.52197707", "text": "function updateLabels() {\n label = label.data(data.topics, function(d) { return d.name; });\n\n label.exit().remove();\n\n var labelEnter = label.enter().append(\"a\")\n .attr(\"class\", \"g-label\")\n .attr(\"href\", function(d) { return \"#\" + encodeURIComponent(d.name); })\n .call(force.drag)\n .call(linkTopic);\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-name\")\n .text(function(d) { return d.name; });\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-value\");\n\n label\n .style(\"font-size\", function(d) { return Math.max(8, d.r / 2) + \"px\"; })\n .style(\"width\", function(d) { return d.r * 2.5 + \"px\"; });\n\n // Create a temporary span to compute the true text width.\n label.append(\"span\")\n .text(function(d) { return d.name; })\n .each(function(d) { d.dx = Math.max(d.r * 2.5, this.getBoundingClientRect().width); })\n .remove();\n\n label\n .style(\"width\", function(d) { return d.dx + \"px\"; })\n .select(\".g-value\")\n .text(function(d) { return formatShortCount(d.parties[0].count) + \" - \" + formatShortCount(d.parties[1].count); });\n\n // Compute the height of labels when wrapped.\n label.each(function(d) { d.dy = this.getBoundingClientRect().height; });\n}", "title": "" }, { "docid": "d3b368ae7a81153fa926eb84433dfa69", "score": "0.52197707", "text": "function updateLabels() {\n label = label.data(data.topics, function(d) { return d.name; });\n\n label.exit().remove();\n\n var labelEnter = label.enter().append(\"a\")\n .attr(\"class\", \"g-label\")\n .attr(\"href\", function(d) { return \"#\" + encodeURIComponent(d.name); })\n .call(force.drag)\n .call(linkTopic);\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-name\")\n .text(function(d) { return d.name; });\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-value\");\n\n label\n .style(\"font-size\", function(d) { return Math.max(8, d.r / 2) + \"px\"; })\n .style(\"width\", function(d) { return d.r * 2.5 + \"px\"; });\n\n // Create a temporary span to compute the true text width.\n label.append(\"span\")\n .text(function(d) { return d.name; })\n .each(function(d) { d.dx = Math.max(d.r * 2.5, this.getBoundingClientRect().width); })\n .remove();\n\n label\n .style(\"width\", function(d) { return d.dx + \"px\"; })\n .select(\".g-value\")\n .text(function(d) { return formatShortCount(d.parties[0].count) + \" - \" + formatShortCount(d.parties[1].count); });\n\n // Compute the height of labels when wrapped.\n label.each(function(d) { d.dy = this.getBoundingClientRect().height; });\n}", "title": "" }, { "docid": "d3b368ae7a81153fa926eb84433dfa69", "score": "0.52197707", "text": "function updateLabels() {\n label = label.data(data.topics, function(d) { return d.name; });\n\n label.exit().remove();\n\n var labelEnter = label.enter().append(\"a\")\n .attr(\"class\", \"g-label\")\n .attr(\"href\", function(d) { return \"#\" + encodeURIComponent(d.name); })\n .call(force.drag)\n .call(linkTopic);\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-name\")\n .text(function(d) { return d.name; });\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-value\");\n\n label\n .style(\"font-size\", function(d) { return Math.max(8, d.r / 2) + \"px\"; })\n .style(\"width\", function(d) { return d.r * 2.5 + \"px\"; });\n\n // Create a temporary span to compute the true text width.\n label.append(\"span\")\n .text(function(d) { return d.name; })\n .each(function(d) { d.dx = Math.max(d.r * 2.5, this.getBoundingClientRect().width); })\n .remove();\n\n label\n .style(\"width\", function(d) { return d.dx + \"px\"; })\n .select(\".g-value\")\n .text(function(d) { return formatShortCount(d.parties[0].count) + \" - \" + formatShortCount(d.parties[1].count); });\n\n // Compute the height of labels when wrapped.\n label.each(function(d) { d.dy = this.getBoundingClientRect().height; });\n}", "title": "" }, { "docid": "d3b368ae7a81153fa926eb84433dfa69", "score": "0.52197707", "text": "function updateLabels() {\n label = label.data(data.topics, function(d) { return d.name; });\n\n label.exit().remove();\n\n var labelEnter = label.enter().append(\"a\")\n .attr(\"class\", \"g-label\")\n .attr(\"href\", function(d) { return \"#\" + encodeURIComponent(d.name); })\n .call(force.drag)\n .call(linkTopic);\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-name\")\n .text(function(d) { return d.name; });\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-value\");\n\n label\n .style(\"font-size\", function(d) { return Math.max(8, d.r / 2) + \"px\"; })\n .style(\"width\", function(d) { return d.r * 2.5 + \"px\"; });\n\n // Create a temporary span to compute the true text width.\n label.append(\"span\")\n .text(function(d) { return d.name; })\n .each(function(d) { d.dx = Math.max(d.r * 2.5, this.getBoundingClientRect().width); })\n .remove();\n\n label\n .style(\"width\", function(d) { return d.dx + \"px\"; })\n .select(\".g-value\")\n .text(function(d) { return formatShortCount(d.parties[0].count) + \" - \" + formatShortCount(d.parties[1].count); });\n\n // Compute the height of labels when wrapped.\n label.each(function(d) { d.dy = this.getBoundingClientRect().height; });\n}", "title": "" }, { "docid": "d3b368ae7a81153fa926eb84433dfa69", "score": "0.52197707", "text": "function updateLabels() {\n label = label.data(data.topics, function(d) { return d.name; });\n\n label.exit().remove();\n\n var labelEnter = label.enter().append(\"a\")\n .attr(\"class\", \"g-label\")\n .attr(\"href\", function(d) { return \"#\" + encodeURIComponent(d.name); })\n .call(force.drag)\n .call(linkTopic);\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-name\")\n .text(function(d) { return d.name; });\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-value\");\n\n label\n .style(\"font-size\", function(d) { return Math.max(8, d.r / 2) + \"px\"; })\n .style(\"width\", function(d) { return d.r * 2.5 + \"px\"; });\n\n // Create a temporary span to compute the true text width.\n label.append(\"span\")\n .text(function(d) { return d.name; })\n .each(function(d) { d.dx = Math.max(d.r * 2.5, this.getBoundingClientRect().width); })\n .remove();\n\n label\n .style(\"width\", function(d) { return d.dx + \"px\"; })\n .select(\".g-value\")\n .text(function(d) { return formatShortCount(d.parties[0].count) + \" - \" + formatShortCount(d.parties[1].count); });\n\n // Compute the height of labels when wrapped.\n label.each(function(d) { d.dy = this.getBoundingClientRect().height; });\n}", "title": "" }, { "docid": "d3b368ae7a81153fa926eb84433dfa69", "score": "0.52197707", "text": "function updateLabels() {\n label = label.data(data.topics, function(d) { return d.name; });\n\n label.exit().remove();\n\n var labelEnter = label.enter().append(\"a\")\n .attr(\"class\", \"g-label\")\n .attr(\"href\", function(d) { return \"#\" + encodeURIComponent(d.name); })\n .call(force.drag)\n .call(linkTopic);\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-name\")\n .text(function(d) { return d.name; });\n\n labelEnter.append(\"div\")\n .attr(\"class\", \"g-value\");\n\n label\n .style(\"font-size\", function(d) { return Math.max(8, d.r / 2) + \"px\"; })\n .style(\"width\", function(d) { return d.r * 2.5 + \"px\"; });\n\n // Create a temporary span to compute the true text width.\n label.append(\"span\")\n .text(function(d) { return d.name; })\n .each(function(d) { d.dx = Math.max(d.r * 2.5, this.getBoundingClientRect().width); })\n .remove();\n\n label\n .style(\"width\", function(d) { return d.dx + \"px\"; })\n .select(\".g-value\")\n .text(function(d) { return formatShortCount(d.parties[0].count) + \" - \" + formatShortCount(d.parties[1].count); });\n\n // Compute the height of labels when wrapped.\n label.each(function(d) { d.dy = this.getBoundingClientRect().height; });\n}", "title": "" } ]
3786b60b9234e14d034a7ce0e5c77685
define function to help d3 find min and max values for a selected field
[ { "docid": "edd4ad20db845600df1822f84fb759d5", "score": "0.0", "text": "function returnValue (d) {\n return d[selectedField];\n }", "title": "" } ]
[ { "docid": "1a2e94c80ad91ad7fdb61979856ea6e1", "score": "0.7703714", "text": "function findMinAndMax(dataColumn) {\n rMin = d3.min(dataset, function (d) { return (d[dataColumn]) });\n rMax = d3.max(dataset, function (d) { return (d[dataColumn]) });\n}", "title": "" }, { "docid": "494fb14596144abd7544705e463d043d", "score": "0.7505111", "text": "function maxOrMin (dataArray) {\n var maxX = dataArray[0].x; \n var minX = dataArray[0].x;\n\n for (var i = 0; i < dataArray.length ; i++) {\n if (dataArray[i].x >= maxX) {\n maxX = Math.round(dataArray[i].x);\n }\n if (dataArray[i].x <= minX) {\n minX = Math.round(dataArray[i].x);\n }\n }\n var maxAndMin = {\"max\": maxX, \"min\": minX};\n return maxAndMin; \n }", "title": "" }, { "docid": "1f4d8329412f4203cebc589c7c225c00", "score": "0.74764544", "text": "function xMinMax() {\n // min will grab the smallest datum from the selected column.\n xMin = d3.min(theData, function(d) {\n return parseFloat(d[curX]) * 0.90;\n });\n\n // .max will grab the largest datum from the selected column.\n xMax = d3.max(theData, function(d) {\n return parseFloat(d[curX]) * 1.10;\n });\n }", "title": "" }, { "docid": "7575ae7c2a12e73d5212054c942e4dbf", "score": "0.7430281", "text": "function findMinMax(x, y) {\r\n\r\n // get min/max x values\r\n let xMin = d3.min(x);\r\n let xMax = d3.max(x);\r\n\r\n // get min/max y values\r\n let yMin = d3.min(y);\r\n let yMax = d3.max(y);\r\n\r\n // return formatted min/max data as an object\r\n return {\r\n xMin : xMin,\r\n xMax : xMax,\r\n yMin : yMin,\r\n yMax : yMax\r\n }\r\n }", "title": "" }, { "docid": "def832bdb127ba358d4686c7394617e7", "score": "0.7417434", "text": "function findMinMax(x, y) {\r\n // get min/max x values\r\n const xMin = d3.min(x);\r\n const xMax = d3.max(x);\r\n\r\n // get min/max y values\r\n const yMin = d3.min(y);\r\n const yMax = d3.max(y);\r\n\r\n // return formatted min/max data as an object\r\n return {\r\n xMin: xMin,\r\n xMax: xMax,\r\n yMin: yMin,\r\n yMax: yMax,\r\n };\r\n }", "title": "" }, { "docid": "d084ce9f6a553c33d9c67825306e8030", "score": "0.73913133", "text": "function findMinMax(x, y) {\n\n // get min/max x values\n let xMin = d3.min(x);\n let xMax = d3.max(x);\n\n // get min/max y values\n let yMin = d3.min(y);\n let yMax = d3.max(y);\n\n // return formatted min/max data as an object\n return {\n xMin : xMin,\n xMax : xMax,\n yMin : yMin,\n yMax : yMax\n }\n }", "title": "" }, { "docid": "587afb0eec937c1dd9e258d95b98af48", "score": "0.73899597", "text": "function findMinMax(x, y) {\n\n // get min/max x values\n let xMin = d3.min(x);\n let xMax = d3.max(x);\n\n // get min/max y values\n let yMin = d3.min(y);\n let yMax = d3.max(y);\n\n // return formatted min/max data as an object\n return {\n xMin: xMin,\n xMax: xMax,\n yMin: yMin,\n yMax: yMax\n }\n }", "title": "" }, { "docid": "ab89ebbdc50ca4a9723652c254e484eb", "score": "0.7377352", "text": "function findMinMax(x, y) {\r\n\r\n // get min/max x values\r\n let xMin = d3.min(x);\r\n let xMax = d3.max(x);\r\n\r\n // get min/max y values\r\n let yMin = d3.min(y);\r\n let yMax = d3.max(y);\r\n\r\n // return formatted min/max data as an object\r\n return {\r\n xMin: xMin,\r\n xMax: xMax,\r\n yMin: yMin,\r\n yMax: yMax\r\n }\r\n}", "title": "" }, { "docid": "b44ab536121315a5737eb87ca80413e1", "score": "0.7336886", "text": "function findMinMax(x, y) {\n // get min/max x values\n let xMin = d3.min(x);\n let xMax = d3.max(x);\n\n // get min/max y values\n let yMin = d3.min(y);\n let yMax = d3.max(y);\n\n // return formatted min/max data as an object\n return {\n xMin: xMin,\n xMax: 2015,\n yMin: yMin,\n yMax: 30\n };\n }", "title": "" }, { "docid": "3a16f89a3a206b8fbbaab878c1a0a53d", "score": "0.7281014", "text": "function _calcMaxMin() {\n\t var i,j,k;\n\t\t\n\t\t_vMaxValuesAttr = d3.range (_vIndexMapAttr.length);\n\t\t_vMinValuesAttr = d3.range (_vIndexMapAttr.length);\n\t\t\n\t\tfor (i=0; i< _vMaxValuesAttr.length; i++) {\n\t\t\t_vMaxValuesAttr[i] = Number.MIN_VALUE;\n\t\t\t_vMinValuesAttr[i] = Number.MAX_VALUE;\n\t\t}\n\n\t\tfor (i=0; i< _data.matrix.length; i++)\t\n\t\t\tfor ( j=0; j< _data.matrix[i].length; j++)\n\t\t\t\tif (_data.matrix[i][j].exist) {\n\t\t\t\t\tfor (k=0; k< _vIndexMapAttr.length; k++) {\n\t\t\t\t\t\tif (_data.matrix[i][j].values[_vIndexMapAttr[k]] > _vMaxValuesAttr[k])\n\t\t\t\t\t\t\t_vMaxValuesAttr[k] = _data.matrix[i][j].values[_vIndexMapAttr[k]];\n\t\t\t\t\t\tif (_data.matrix[i][j].values[_vIndexMapAttr[k]] < _vMinValuesAttr[k])\n\t\t\t\t\t\t\t_vMinValuesAttr[k] = _data.matrix[i][j].values[_vIndexMapAttr[k]];\t\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\n\t\t_maxValueAttr = d3.max(_vMaxValuesAttr);\n\t\t_minValueAttr = d3.min(_vMinValuesAttr);\n\t}", "title": "" }, { "docid": "1ab7afdbb98afb81c7f8ef1563cd669c", "score": "0.7125031", "text": "function showMinMax(ds, col, val, type){\n var max = d3.max(ds, function(d) { return d[col]; } );\n var min = d3.min(ds, function(d) { return d[col]; } );\n \n if (type=='minmax' && (val == max || val == min)) {\n return val;\n } else\n \n if (type=='all') {\n return val;\n } \n}", "title": "" }, { "docid": "2ff4fc2c4e5c0ae8edc229dd3d3dcaae", "score": "0.70779514", "text": "function calculate_minmax(data) {\n\n bound = [];\n bound.max = Math.max.apply(Math, data);\n bound.min = Math.min.apply(Math, data);\n return bound;\n\n}", "title": "" }, { "docid": "1ef3558db7e82bfa46140362484bb6dc", "score": "0.70682687", "text": "function findMinAndMaxX(dataColumnX) {\n xMin = d3.min(dataset, function (d) { return d[dataColumnX] * 0.8 });\n xMax = d3.max(dataset, function (d) { return d[dataColumnX] * 1.2 });\n }", "title": "" }, { "docid": "81a1a6f051451047af92ba83da706332", "score": "0.70532465", "text": "function getMaxMin(data){\n var min_max = {x: {}, y: {}};\n\n for(var i = 0; i < data.length; i++){\n var set = data[i].data;\n\n if(i === 0){\n min_max.x.min = set[0].x;\n min_max.x.max = set[0].x;\n min_max.y.min = set[0].y;\n min_max.y.max = set[0].y;\n }\n\n for(var k = 0; k < set.length; k++){\n //min x\n if(set[k].x < min_max.x.min){\n min_max.x.min = set[k].x;\n }\n //max x\n if(set[k].x > min_max.x.max){\n min_max.x.max = set[k].x;\n }\n //min y\n if(set[k].y < min_max.y.min){\n min_max.y.min = set[k].y;\n }\n //max y\n if(set[k].y > min_max.y.max){\n min_max.y.max = set[k].y;\n }\n }\n }\n\n return min_max;\n }", "title": "" }, { "docid": "80ef0c0312a312e545eff3e2b53e2fe9", "score": "0.7046383", "text": "function xMinMax() {\n xMin = d3.min(csvData, function(d) {\n return parseFloat(d[curX]) * 0.85;\n });\n xMax = d3.max(csvData, function(d) {\n return parseFloat(d[curX]) * 1.15;\n }); \n }", "title": "" }, { "docid": "08f28a9597e5759381c3d78b400f599b", "score": "0.7031121", "text": "calculateLimits(){\n let { options } = this\n const { data } = this\n const { variables, xVariable, yVariable } = options\n\n options.xMax = d3.max(data, variables[xVariable].accessor)\n options.xMin = d3.min(data, variables[xVariable].accessor)\n options.yMax = d3.max(data, variables[yVariable].accessor)\n options.yMin = d3.min(data, variables[yVariable].accessor)\n }", "title": "" }, { "docid": "effe93048a2db49c1e1137aada04b1f5", "score": "0.67715704", "text": "function yMinMax() {\n // min will grab the smallest datum from the selected column.\n yMin = d3.min(theData, function(d) {\n return parseFloat(d[curY]) * 0.90;\n });\n\n // .max will grab the largest datum from the selected column.\n yMax = d3.max(theData, function(d) {\n return parseFloat(d[curY]) * 1.10;\n });\n }", "title": "" }, { "docid": "e680fb3dc5d09a19a17b26c2c047a093", "score": "0.6740274", "text": "limits() {\n var keys = Object.keys(this.data);\n var min = parseInt(this.data[keys[0]]); // ignoring case of empty list for conciseness\n var max = parseInt(this.data[keys[0]]);\n var i;\n for (i = 1; i < keys.length; i++) {\n var value = parseInt(this.data[keys[i]]);\n if (value < min) min = value;\n if (value > max) max = value;\n }\n this.yMin =min - Math.round(min/4);\n if(this.yMin <= 0)\n this.yMin=0;\n this.yMax = max + Math.round(max/4);\n\n }", "title": "" }, { "docid": "866a4cbff6065603c3e816203f03965d", "score": "0.66246104", "text": "function CNCXPagMinMax()\n{\n}", "title": "" }, { "docid": "1f9b7b5ee9d886810449a5bc78aa406a", "score": "0.6602903", "text": "function getMinValue(data){\n let min = 9999\n let t_min\n data.forEach(function(e) { \n t_min = d3.min(Object.values(e));\n if(t_min < min) {\n min = t_min;\n } \n });\n return min;\n}", "title": "" }, { "docid": "440ab3b93d6f085b5db9c6c25a9bd455", "score": "0.656105", "text": "get value(){ \r\n return { \r\n min : this._value[ 0 ], \r\n max : this._value[ 1 ]\r\n };\r\n }", "title": "" }, { "docid": "a2751a6fc144722f3aabf395b0773301", "score": "0.6549832", "text": "function xMinMax() {\n xMin = d3.min(censusData, function(d) {\n return parseFloat(d[currentX]) * 0.90;\n });\n\n xMax = d3.max(censusData, function(d) {\n return parseFloat(d[currentX]) * 1.10;\n });\n }", "title": "" }, { "docid": "8f60b144616832937aacd5b976b1dbbf", "score": "0.6500936", "text": "function getMinMax(arr) {\n let min = arr[0][\"price\"], max = arr[0][\"price\"];\n \n // For all values in resolution\n for (let i = 1, len=arr.length; i < len; i++) {\n // Check if current value is min or max\n let v = arr[i][\"price\"];\n min = (v < min) ? v : min;\n max = (v > max) ? v : max;\n }\n\n // Set the min for little more less than what is really is.\n min = Math.floor(min - max * 0.01)\n \n // But more than 0, set the max automaticlly.\n return [Math.max(0, min), \"auto\"];\n }", "title": "" }, { "docid": "bd359caf9ed4ab77bf7c25e04111d57d", "score": "0.64854574", "text": "function updateMinMax() {\n min = parseInt(minValueField.value);\n max = parseInt(maxValueField.value);\n}", "title": "" }, { "docid": "17e3715bdffc89d6e431756767dcf3f2", "score": "0.6457686", "text": "maximaAndMinimaOf(dataToShow) {\n\t\tlet limits = { \n\t\t\tx: { min: Infinity, max: -Infinity }, \n\t\t\ty: { min: Infinity, max: -Infinity }, \n\t\t\tsize: { min: Infinity, max: -Infinity } \n\t\t};\n\n\t\tdataToShow.forEach((d) => {\n\t\t\tif (d.x < limits.x.min) limits.x.min = d.x;\n\t\t\tif (d.x > limits.x.max) limits.x.max = d.x;\n\t\t\tif (d.y < limits.y.min) limits.y.min = d.y;\n\t\t\tif (d.y > limits.y.max) limits.y.max = d.y;\n\t\t\tif (d.size < limits.size.min) limits.size.min = d.size;\n\t\t\tif (d.size > limits.size.max) limits.size.max = d.size;\n\t\t});\n\n\t\treturn limits;\n\t}", "title": "" }, { "docid": "f716006c33f1b22c89188e8e5ff56667", "score": "0.6439367", "text": "function showMinMax(ds, col, val, type) {\n const max = d3.max(ds, d => d[col]);\n const min = d3.min(ds, d => d[col]);\n\n if (type === 'minmax' && (val === max || val === min)) {\n return val;\n } else if (type === 'all') {\n return val;\n }\n\n }", "title": "" }, { "docid": "3f7faff57f7da0aec34ec219e5e44953", "score": "0.64349496", "text": "function calcMetaDataField_min(data,params,field)\n{\n var target = field.target[0]; // these are always arrays coming in\n\n var dataTarget = normalizeDataItem(data,target);\n var min = null;\n\n for(var i=0; i < dataTarget.length; i++) {\n\tvar thisNumber = parseFloat(dataTarget[i]);\n\tif(min===null || thisNumber < min){\n\t min = thisNumber;\n\t} \n }\n\n return(min);\n}", "title": "" }, { "docid": "9235737e89424c36cf71139b1fa666b5", "score": "0.6433974", "text": "calcValueColMinMax() {\n let noNan = this.fillData.reduce((acc, cur) => {\n if (!isNaN(cur)) {\n acc.push(cur)\n }\n return acc\n }, [])\n // if the panehas a filter min and max set, scan datamin and max should be equal\n if (!isNaN(this.paneOb.valFilterMin)) {\n this.scanDatamin = this.paneOb.valFilterMin\n } else {\n /** These values are the min of the entire fillData provided to the canvas. This is used in linearly interpolating the color of the fill for a region if it has data. This is the minimum value */\n this.scanDatamin = Math.min(...noNan).toFixed(3)\n }\n if (!isNaN(this.paneOb.valFilterMax)) {\n this.scanDatamax = this.paneOb.valFilterMax\n\n } else {\n /** This is the maximum value of the fillData for the canvas. */\n this.scanDatamax = Math.max(...noNan).toFixed(3)\n }\n // this normalizes the value from the scan data into the range 0 to 1 for color interpolation\n /** color interpolators for fill */\n this.colInterpolator = interpolator()\n this.colInterpolator.setup(this.scanDatamin, 0, this.scanDatamax, 1)\n // calculate the min and maxes of the scan data for each scan\n }", "title": "" }, { "docid": "f8853f2ce0ecba33ab134e962218a0d0", "score": "0.6427705", "text": "calculateRange() {\n if (!this.grid || !this.grid[0]) {\n return\n }\n let rows = this.grid.length\n let cols = this.grid[0].length\n // const vectors = [];\n let min\n let max\n // @from: https://stackoverflow.com/questions/13544476/how-to-find-max-and-min-in-array-using-minimum-comparisons\n for (let j = 0; j < rows; j++) {\n for (let i = 0; i < cols; i++) {\n let vec = this.grid[j][i]\n if (vec !== null) {\n let val = vec.m || vec.magnitude()\n // vectors.push();\n if (min === undefined) {\n min = val\n } else if (max === undefined) {\n max = val\n // update min max\n // 1. Pick 2 elements(a, b), compare them. (say a > b)\n min = Math.min(min, max)\n max = Math.max(min, max)\n } else {\n // 2. Update min by comparing (min, b)\n // 3. Update max by comparing (max, a)\n min = Math.min(val, min)\n max = Math.max(val, max)\n }\n }\n }\n }\n return [min, max]\n }", "title": "" }, { "docid": "c8b1bf22bc7b5b8bb1d615d8ac1cea90", "score": "0.64231205", "text": "function range(){\nmin =Math.floor( Math.min.apply(null, resultHotel.map((item)=> {\n return item.price;\n}))),\nmax = Math.round( Math.max.apply(null,resultHotel.map((item)=> {\n return item.price;\n})));\n// console.log(min , max)\n}", "title": "" }, { "docid": "fc465cedcd6f223056821a94f044eab2", "score": "0.6410822", "text": "function getPriceRange(data) {\r\n var range = d3.extent(data, function(d) {\r\n return +d['Price']\r\n });\r\n // console.log(\"min price: \" + range[0] + \" max price: \" + range[1]);\r\n return range;\r\n }", "title": "" }, { "docid": "a0fff2f8e8ad62b05646756e98c18a03", "score": "0.639191", "text": "function OptionMin(option){\n option = YearArray(option, selectedyear1, selectedyear2);\n var min = d3.min(option,function(d) {\n return parseFloat(d);\n });\n return min;\n}", "title": "" }, { "docid": "4f67d5f9a020bd4453c0410b0ed52f17", "score": "0.6361762", "text": "static getMinMax(boundary, norm) {\n let probeA = boundary.topRight.dot(norm);\n let probeB = boundary.bottomRight.dot(norm);\n let probeC = boundary.bottomLeft.dot(norm);\n let probeD = boundary.topLeft.dot(norm);\n\n return {\n max: Math.max(probeA, probeB, probeC, probeD),\n min: Math.min(probeA, probeB, probeC, probeD)\n }\n }", "title": "" }, { "docid": "1c37277f3635d9240e38395105631015", "score": "0.63489205", "text": "_validateMinMax(validatedProperty, initialValidation, oldValue) {\n const that = this;\n\n let validateMin = validatedProperty === 'min' || validatedProperty === 'both',\n validateMax = validatedProperty === 'max' || validatedProperty === 'both';\n\n if (typeof (initialValidation) === undefined) {\n initialValidation = false;\n }\n\n if (validatedProperty === 'both') {\n validator('min', oldValue);\n validator('max', oldValue);\n }\n else {\n validator(validatedProperty, oldValue);\n }\n\n function validator(param, oldValue) {\n that._numericProcessor.validateMinMax(param === 'min' || initialValidation, param === 'max' || initialValidation);\n const value = that['_' + param + 'Object'];\n let validateCondition = param === 'min' ? that._numericProcessor.compare(that.max, value, true) <= 0 :\n that._numericProcessor.compare(that.min, value, true) > 0;\n\n if (validateCondition) {\n if (oldValue) {\n that._numberRenderer = new JQX.Utilities.NumberRenderer(oldValue);\n param === 'min' ? validateMin = false : validateMax = false;\n that[param] = oldValue;\n that['_' + param + 'Object'] = oldValue;\n }\n else {\n that.error(that.localize('invalidMinOrMax', { elementType: that.nodeName.toLowerCase(), property: param }));\n }\n }\n else {\n that._numberRenderer = new JQX.Utilities.NumberRenderer(value);\n that[param] = that['_' + param + 'Object'];\n }\n }\n\n if (that.logarithmicScale) {\n that._validateOnLogarithmicScale(validateMin, validateMax, oldValue);\n }\n else {\n that._drawMin = that.min;\n that._drawMax = that.max;\n }\n\n that.min = that.min.toString();\n that.max = that.max.toString();\n\n that._minObject = that._numericProcessor.createDescriptor(that.min);\n that._maxObject = that._numericProcessor.createDescriptor(that.max);\n\n if (that.mode === 'date') {\n that._minDate = JQX.Utilities.DateTime.fromFullTimeStamp(that.min);\n that._maxDate = JQX.Utilities.DateTime.fromFullTimeStamp(that.max);\n }\n\n //Validates the Interval\n that._numericProcessor.validateInterval(that.interval);\n\n if (that.customInterval) {\n that._numericProcessor.validateCustomTicks();\n }\n }", "title": "" }, { "docid": "02d41fa0bc79596539af3a411ff16a2b", "score": "0.6315191", "text": "function getMaxMin(values) {\n const cumulativeMax = d3.sum(values.filter(d => (d > 0)));\n const cumulativeMin = d3.sum(values.filter(d => (d < 0)));\n return [cumulativeMin, cumulativeMax];\n}", "title": "" }, { "docid": "8a1cce4f32245e90ce7f8ae392a72046", "score": "0.63125646", "text": "function findDataRanges(){\n\t\t\tyaxis.datamin = xaxis.datamin = 0;\n\t\t\txaxis.datamax = yaxis.datamax = 1;\t\t\n\t\t\tif(series.length == 0) return;\n\t\n\t\t\t/**\n\t\t\t * Get datamin, datamax start values\n\t\t\t */ \n\t\t\tvar found = false;\n\t\t\tfor(var i = 0; i < series.length; ++i){\n\t\t\t\tif (series[i].data.length > 0) {\n\t\t\t\t\txaxis.datamin = xaxis.datamax = series[i].data[0][0];\n\t\t\t\t\tyaxis.datamin = yaxis.datamax = series[i].data[0][1];\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/**\n\t\t\t * Return because series are empty.\n\t\t\t */\n\t\t\tif(!found) return;\n\t\n\t\t\t/**\n\t\t\t * then find real datamin, datamax\n\t\t\t */\n\t\t\tfor(var j = 0; j < series.length; ++j){\n\t\t\t\tvar data = series[j].data;\n\t\t\t\tfor(var h = 0; h < data.length; ++h){\n\t\t\t\t\tvar x = data[h][0];\n\t\t\t\t\tvar y = data[h][1];\n\t\t\t\t\tif(x < xaxis.datamin) xaxis.datamin = x;\n\t\t\t\t\telse if(x > xaxis.datamax) xaxis.datamax = x;\n\t\t\t\t\tif(y < yaxis.datamin) yaxis.datamin = y;\n\t\t\t\t\telse if(y > yaxis.datamax) yaxis.datamax = y;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "701aef2d2297e4043c51b3841250247e", "score": "0.6303823", "text": "function getMinMax(array) {\n let max = 0;\n let min = array[0];\n\n for (let i = 0; i < array.length; i++) {\n if (array[i] >= max)\n max = array[i];\n else if (array[i] < min)\n min = array[i];\n }\n\n return {\n min: convertKelvinToCelsius(min),\n max: convertKelvinToCelsius(max)\n };\n}", "title": "" }, { "docid": "6907acdcb3feb1948d5624dce174a22c", "score": "0.6302377", "text": "require_range(min,max,value, field_name=\"\"){\n\t if (this.is_empty(value) ){ return value; }\n\t var number = this.to_number(value);\n\t if (value < min || value > max) {\n\t throw new Error(`out of range ${value} ${field_name} ${value}`);\n\t }\n\t return value;\n\t }", "title": "" }, { "docid": "a5e24f97df8d17497058fd5971d1c412", "score": "0.6302252", "text": "function findMinAndMax(value) {\n 'use strict';\n\n return 'Min -> ' + Math.min.apply(null, value) +\n '\\r\\nMax -> ' + Math.max.apply(null, value) + '\\r\\n';\n}", "title": "" }, { "docid": "1fbeddfb3196ab68a456e2ca0d93051e", "score": "0.629707", "text": "function showMinMax(dataSet, col, val, type) {\n const max = d3.max(dataSet, (d) => d[col]);\n const min = d3.min(dataSet, (d) => d[col]);\n if (type === 'minmax' && (val === max || val === min )) {\n return val;\n } else {\n if (type === 'all') {\n return val;\n }\n }\n }", "title": "" }, { "docid": "ab87d6ef037e69641d523d421dea9321", "score": "0.62968427", "text": "function getMaxMin(Layer, energy, moisture, content, potential, year){\n max = 0\n min = 99999999\n// As thermochemical facilities do not have a tag but are listed as dry we need to do the step below\nif (energy == '_dry'){\n moisture = '_dry'\n energy = ''\n }\n\n Layer.forEach(function(feature){\n type = feature.getProperty(\"Type\");\n if (type == 'crop'){\n if (moisture == ''){\n res_val = getTotalBiomass(feature, energy, '_dry', content, potential, year);\n cull_val = getTotalBiomass(feature, energy, '_wet', content, potential, year);\n biomass_val = res_val + cull_val\n }\n else {\n biomass_val = getTotalBiomass(feature, energy, moisture, content, potential, year);\n }\n }\n else {\n biomass_val = getTotalBiomass(feature, energy, moisture, content, potential, year);\n }\n if (biomass_val>max){\n max=biomass_val\n }\n if (biomass_val<min){\n min=biomass_val\n }\n })\n return ([max, min])\n }", "title": "" }, { "docid": "ff621e3303a5cc1bcc24062d70675398", "score": "0.62730855", "text": "function getNodeValueRange(nodes, val){\n const nodesFilteredNaN = nodes.filter(node => node.data[val]);\n const nodesFilteredNaNg1 = nodes.filter(node => node.data[val+'_g1']);\n const nodesFilteredNaNg2 = nodes.filter(node => node.data[val+'_g2']);\n var valArray = [];\n for(var n of nodesFilteredNaN){\n \tvalArray.push(parseFloat(n.data[val]))\n }\n for(var n of nodesFilteredNaNg1){\n \tvalArray.push(parseFloat(n.data[val+'_g1']))\n }\n for(var n of nodesFilteredNaNg2){\n \tvalArray.push(parseFloat(n.data[val+'_g2']))\n }\n const nodesMin = parseFloat(Math.min(...valArray)).toFixed(2);\n const nodesMax = parseFloat(Math.max(...valArray)).toFixed(2);\n return [nodesMin, nodesMax];\n}", "title": "" }, { "docid": "53385f3ae0a7f8a04b95a4de5fac85fb", "score": "0.6250139", "text": "function getBounds(group) {\n var minX = pv.min(group, function(d) { return d.x || 0 }); // or 0 in case falsy value in data\n var maxX = pv.max(group, function(d) { return d.x || 0 });\n var minY = pv.min(group, function(d) { return d.y || 0 });\n var maxY = pv.max(group, function(d) { return d.y || 0 });\n return { minX:minX, minY:minY, maxX:maxX, maxY:maxY };\n}", "title": "" }, { "docid": "703a40018c0e388326b4434258537fcc", "score": "0.6239584", "text": "function setN1Range() {\n minValue1 = Number(document.getElementById('low1').value);\n maxValue1 = Number(document.getElementById('high1').value);\n}", "title": "" }, { "docid": "7d49031a5296f84a9bdcbad8a8a01cdf", "score": "0.6232615", "text": "function getMinMax(formId, name, overrideMinCount, overrideMaxCount) { // 1833\n var ss = formData[formId] && formData[formId].ss; // 1834\n if (!ss) { // 1835\n return {minCount: 0}; // 1836\n } // 1837\n var defs = Utility.getDefs(ss, name); // 1838\n // 1839\n // minCount is set by the schema, but can be set higher on the field attribute // 1840\n overrideMinCount = overrideMinCount || 0; // 1841\n var minCount = defs.minCount || 0; // 1842\n minCount = (overrideMinCount > minCount) ? overrideMinCount : minCount; // 1843\n // 1844\n // maxCount is set by the schema, but can be set lower on the field attribute // 1845\n overrideMaxCount = overrideMaxCount || Infinity; // 1846\n var maxCount = defs.maxCount || Infinity; // 1847\n maxCount = (overrideMaxCount < maxCount) ? overrideMaxCount : maxCount; // 1848\n // 1849\n return {minCount: minCount, maxCount: maxCount}; // 1850\n} // 1851", "title": "" }, { "docid": "f7b89b1a93a10af30f8c97053cbc6e66", "score": "0.62053114", "text": "minOrMaxOf (min, reporter) {\n if (this.empty()) util.error('min/max OneOf: empty array')\n if (typeof reporter === 'string') reporter = util.propFcn(reporter)\n let o = null\n let val = min ? Infinity : -Infinity\n for (let i = 0; i < this.length; i++) {\n const a = this[i]\n const aval = reporter(a)\n if ((min && (aval < val)) || (!min && (aval > val)))\n [o, val] = [a, aval]\n }\n return o\n }", "title": "" }, { "docid": "985d7a05b2e958eb21f62336e0768488", "score": "0.62020075", "text": "function findMinAndMax(array) {\n var minValue = array[0];\n var maxValue = array[0];\n var = i;\n\n for (i = 1; i < array.length; i++) {\n currentElement = array[i];\n\n if (currentElement < minValue) {\n minValue = currentElement;\n\n }\n\n if (currentElement > maxValue) {\n maxValue = currentValue;\n\n }\n\n //i=1:minValue = 3, maxValue = 7\n } //i=2:minValue = 2, maxValue = 7\n //i=3:minValue = 1, maxValue = 7\n //i=4:minValue = 1 maxValue = 8\n //i=5:minValue = 1 maxValue = 8\n\n}", "title": "" }, { "docid": "47cedc4b1d7efa1755c8ed889e05214a", "score": "0.6186055", "text": "calcMinValue (state) {\n return d3.min(state, d => {\n let data = 0\n Object.entries(d).forEach(\n\t\t\t\t ([key, values]) => {\n\t\t\t \t\tObject.entries(values[0]).forEach(\n\t\t\t\t \t\t([key, value]) => {\n\t\t\t\t \t\t\tdata += value\n\t\t\t\t \t\t}\n\t\t\t\t \t)\n\t\t\t\t }\n )\n return (data)\n })\n }", "title": "" }, { "docid": "1f6fdfca039ad7b062461272b27edb93", "score": "0.6176195", "text": "function min_max_av(dates, datas){\n var avr = datas.reduce((cur,acc) => {return cur+acc})/datas.length;\n var min = datas[0];\n var max = datas[0];\n var maxIndex = 0;\n var minIndex = 0\n //find the min of the column and its index\n for(var i = 0; i < datas.length; i++){\n if(datas[i] < min){\n min = datas[i]\n minIndex = i;\n }\n }\n //find the max of the column and its index\n for(var i = 0; i < datas.length; i++){\n if(datas[i] > max){\n max = datas[i];\n maxIndex = i;\n }\n }\n return {average: avr, min: [min, dates[minIndex]], max: [max, dates[maxIndex]] }\n }", "title": "" }, { "docid": "97504abd6d7569dc2669e89ccdb5c834", "score": "0.61491674", "text": "function findMinAndMax(value){\n value.sort(function (a, b) { return a - b });\n console.log(\"Min -> %d\\nMax -> %d\", value[0], value[value.length-1]);\n}", "title": "" }, { "docid": "3c96df68573a8f3cc915eb2bad23abcd", "score": "0.6149016", "text": "bounds() {\n if(this.isEmpty()) return null;\n // maximum boundaries possible\n let min = Number.POSITIVE_INFINITY\n let max = Number.NEGATIVE_INFINITY\n\n return [min, max] = this.forEachNode( (currentNode) => {\n if(currentNode.value < min) min = currentNode.value;\n if(currentNode.value > max) max = currentNode.value;\n return [min, max]\n }, min, max)\n \n }", "title": "" }, { "docid": "a848afe8322653d89d415df3733e6f9a", "score": "0.613931", "text": "function computeDomain(data, key) {\n return data.reduce((acc, row) => {\n return {\n min: Math.min(acc.min, row[key]),\n max: Math.max(acc.max, row[key])\n };\n }, {min: Infinity, max: -Infinity});\n}", "title": "" }, { "docid": "fb1f38af47786ba4b49d3b009caf4494", "score": "0.61350584", "text": "function getMaxX(data){\n let min = 0;\n let possibleMinNumbers = data.map(function(cur){\n return cur.e;\n });\n min = Math.min.apply(null, possibleMinNumbers);\n return min;\n}", "title": "" }, { "docid": "ebaad5975bd7302f5a43a82e11a2eb39", "score": "0.61323655", "text": "function MinandMax(arr){\n \n const Unique = [...new Set(arr)];\n Unique.sort((a,b) => a-b);\n const min = Unique[0]\n const max = Unique[Unique.length-1]\n return {Values:{MaxValue:max,Min:min}}\n}", "title": "" }, { "docid": "d0341995aa58054cc8f39a4cce4230c2", "score": "0.61018497", "text": "function NumberRangeLimt(ctrId,minVal,maxVal){\n//var str =$(\"#\"+ctrId.id).get(0).value.replace(/\\D/g,'');\n\tvar str = ($(\"#\"+ctrId.id).val()).replace(/\\D/g,'')*1;\n\tif(minVal != maxVal)\n\t{\n\t if(str < minVal) {return minVal;}\n\t if(str > maxVal) {return maxVal;}\n\t}\n\treturn str;\n}", "title": "" }, { "docid": "d00331816afd0deb1f859563631efe3f", "score": "0.6098837", "text": "function findRange(values) {\n var max = {\n list: 0,\n value: values[0]\n };\n var min = {\n list: 0,\n value: values[0]\n };\n\n for (var i = 0; i < values.length; i++) {\n var value = values[i];\n\n if (value > max.value) {\n max = {\n list: i,\n value: value\n };\n }\n\n if (value < min.value) {\n min = {\n list: i,\n value: value\n };\n }\n }\n\n return {\n 'max': max,\n 'min': min\n };\n}", "title": "" }, { "docid": "ad94e334b83a3624a8bda7c1c170f9e9", "score": "0.6089627", "text": "function searchMaxAndMin(array){\n var max = array[0];\n var min = array[0];\n for (var i = 1; i < array.length; i++){\n if(array[i] > max){\n max = array[i];\n }else if(array[i] < min){\n min = array[i];\n }\n }\n return [min, max]\n }", "title": "" }, { "docid": "116c76eb27a2783326458ad740cb528a", "score": "0.60830295", "text": "function getMinMax() {\n var minPt = pts[0];\n var maxPt = pts[0];\n for (var i=1; i<pts.length; i++) {\n minPt = minPt.$min( pts[i] );\n }\n for (i=1; i<pts.length; i++) {\n maxPt = maxPt.$max( pts[i] );\n }\n nextRect.set( minPt).to( maxPt );\n}", "title": "" }, { "docid": "0af47640502f366621513920d8cc6717", "score": "0.6081755", "text": "function createMinMaxRangeLines(lines){\n // console.log(\"Entering createMinMaxRangelines function with lines\")\n //console.log(lines.length)\n //\n //console.log(\"\\n\\n Value 0,0:\")\n //console.dir(lines)\n //console.log(lines[0][0].length)\n\n for(var i=0; i<lines.length; i++)\n {\n rangeLines[i] = [];\n }\n //console.log(\"length ranglines = \", rangeLines.length)\n\n\n // each entry in rangeLines has all the converted data for that organ\n for(var i=0; i<lines[0].length; i++)\n {\n for(var j=0; j<rangeLines.length; j++)\n {\n //console.log(i,j)\n //console.dir(lines[j][i])\n rangeLines[j].push(convert(lines[j][i]));\n }\n }\n\n // initialize maxLine and minLine to initial low and high values\n // previously was error with max and min changing simultaneously\n for(var i=0; i<lines.length; i++)\n {\n maxLine[i] = [];\n minLine[i] = [];\n for(var k=0; k<lines[0][0].length; k++)\n {\n maxLine[i].push([rangeLines[i][0][k][0], -1]);\n minLine[i].push([rangeLines[i][0][k][0], 2]);\n }\n }\n\n // loop through all data files and determine max and min values out of all data files for each organ\n for(var i=0; i<lines.length; i++)\n {\n for(var j=0; j<lines[0].length; j++)\n {\n for(var k=0; k<lines[0][0].length; k++)\n {\n if(parseFloat(rangeLines[i][j][k][1]) > parseFloat(maxLine[i][k][1]))\n {\n maxLine[i][k][0] = rangeLines[i][j][k][0];\n maxLine[i][k][1] = rangeLines[i][j][k][1];\n }\n if(parseFloat(rangeLines[i][j][k][1]) < parseFloat(minLine[i][k][1]))\n {\n minLine[i][k][0] = rangeLines[i][j][k][0];\n minLine[i][k][1] = rangeLines[i][j][k][1];\n }\n }\n }\n }\n\n}", "title": "" }, { "docid": "d36c1e22856ce46312154d1932b12401", "score": "0.6075986", "text": "function getMinMax(exonJSON) {\n let arr = []\n for (i = 0; i < exonJSON.length; i++) {\n arr.push(exonJSON[i].start)\n arr.push(exonJSON[i].end)\n }\n\n max = Math.max.apply(null, arr)\n min = Math.min.apply(null, arr)\n\n mm = [min, max]\n\n return mm\n}", "title": "" }, { "docid": "32f4c853251d9febf3829e3e61c940e5", "score": "0.6062803", "text": "function getMinMax(data, _i0, _i1) {\n\t\t\tvar _min = inf;\n\t\t\tvar _max = -inf;\n\n\t\t\tfor (var i = _i0; i <= _i1; i++) {\n\t\t\t\t_min = min(_min, data[i]);\n\t\t\t\t_max = max(_max, data[i]);\n\t\t\t}\n\n\t\t\treturn [_min, _max];\n\t\t}", "title": "" }, { "docid": "0c8a1b631db8732755a85ad986b95d87", "score": "0.6062482", "text": "function computeMinMaxOfPoints(data) {\n var max = [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY];\n var min = [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY];\n data.forEach(function (coords) {\n min[0] = coords[0] < min[0] ? coords[0] : min[0];\n min[1] = coords[1] < min[1] ? coords[1] : min[1];\n max[0] = coords[0] > max[0] ? coords[0] : max[0];\n max[1] = coords[1] > max[1] ? coords[1] : max[1];\n });\n return { min: min, max: max };\n}", "title": "" }, { "docid": "4265ad56634c1463fddccc2e7a808a4f", "score": "0.6056044", "text": "static _projectVertsForMinMax(axis, verts)\n {\n // note that we project the first point to both min and max\n let min = SAT._vectorDotProduct(axis, verts[0]);\n let max = min;\n\n // now we loop over the remiaing vers, updating min/max as required\n for (let j = 1; j < verts.length; j++)\n {\n let temp = SAT._vectorDotProduct(axis, verts[j]);\n if (temp < min) min = temp;\n if (temp > max) max = temp;\n }\n\n return {min: min, max: max};\n }", "title": "" }, { "docid": "9d13650670befcd4603d1d5ebe7c6166", "score": "0.6051527", "text": "function keyRange(series) {\n if (series.length == 0) {\n return [0, 0];\n }\n\n var min = series.reduce(function(prevValue, item) {\n return Math.min(item.domain[0], prevValue);\n }, series[0].domain[0]);\n\n var max = series.reduce(function(prevValue, item) {\n return Math.max(item.domain[1], prevValue);\n }, series[0].domain[1]);\n\n return [min, max];\n }", "title": "" }, { "docid": "74cc16a2b4808b6029823be5982115f1", "score": "0.6035792", "text": "function between_values(x, min, max) {\r\n return {'passed': x.value >= min && x.value <= max,\r\n 'value': x.value};\r\n }", "title": "" }, { "docid": "b08dec881abb1e6ce7941b70c4513555", "score": "0.6019523", "text": "function setMinMax(dataSet) {\r\n $(\".slider.dataYear\").attr({\r\n \"min\": dataSet.minYear,\r\n \"max\": dataSet.maxYear\r\n });\r\n}", "title": "" }, { "docid": "69443ad03bb6c3a8c14f21a3dbd22e21", "score": "0.6016209", "text": "function findMinMax (x,y){\r\n var len = x.length\r\n if ( y === true ){\r\n return Math.max(...x)\r\n }else{\r\n return Math.min(...x)\r\n }\r\n }", "title": "" }, { "docid": "ce5a1bb22531440028122d118455fa46", "score": "0.60053277", "text": "function findMaxAndMin(array) {\n var i;\n var maxElement = 0;\n var minElement = 0;\n for (i = 0; i < array.length; i++) {\n if (array[i] > maxElement && typeof array[i] == 'number') {\n maxElement = array[i]\n }\n if (array[i] < minElement && typeof array[i] == 'number') {\n minElement = array[i]\n\n\n }\n result = [minElement, maxElement];\n\n }\n return result;\n\n}", "title": "" }, { "docid": "03e5cd01507072760d62e7bf471c40dc", "score": "0.59929335", "text": "function _minOrMax(min, selector, items) {\n var result = min ? Number.MAX_VALUE : Number.MIN_VALUE;\n var item;\n for (var i = 0; i < items.length; i++) {\n item = items[i];\n var value = selector(item);\n if (min) {\n if (value < result) {\n result = value;\n }\n }\n else {\n if (value > result) {\n result = value;\n }\n }\n }\n return result;\n }", "title": "" }, { "docid": "3ec35a82a4634e5b39d076adc49b56c6", "score": "0.59845763", "text": "function validator(minXValue, maxXValue, minYValue, maxYValue){\r\n\r\n if(isNaN(minXValue) || isNaN(maxXValue) || isNaN(minYValue) || isNaN(maxYValue))\r\n return 0;\r\n else if (minXValue < -150 || maxXValue > 150 || minYValue < -150 || maxYValue > 150)\r\n return 0;\r\n else\r\n return 1;\r\n \r\n}", "title": "" }, { "docid": "d0f6e2ceaf27edcebef7d4fadf9e54db", "score": "0.5983808", "text": "function getExtrema(arr, prop) {\r\n //define vars to hold max and min values\r\n\tvar max = 0;\r\n\tvar min = 0;\r\n //loop through the array.prop, check each element's value against our vars that hold extreme values\r\n\tfor (var i=0 ; i<arr.length ; i++) {\r\n if (i == 0){d_max = arr[i][prop]\r\n\t\t}else{\r\n\t\t\tif(arr[i][prop] > d_max) {\r\n\t\t\td_max = arr[i][prop]\r\n\t\t\t};\r\n\t\t};\r\n\t\tif (i == 0){d_min = arr[i][prop]\r\n\t\t}else{\r\n\t\t\tif(arr[i][prop] < d_min) {\r\n\t\t\td_min = arr[i][prop]\r\n\t\t\t};\r\n\t\t};\r\n };\r\n\td_midpt = (d_max + d_min)/2;\r\n\treturn d_midpt;\r\n\treturn d_max;\r\n\treturn d_min;\r\n\tconsole.log(`Inside the function: d_min: ${d_min},d_max: ${d_max}, d_midpt: ${d_midpt}`)\r\n}", "title": "" }, { "docid": "3fb6e757dba72aa160e4865ac550ba21", "score": "0.59698427", "text": "_getAbsoluteValue(val, min = windowDimensions.width * -2, max = 0)\n {\n if (val < min)\n return min\n else if (val > max)\n return max\n else \n return val\n }", "title": "" }, { "docid": "773a30d63fdc5998a82c617e3d2601b4", "score": "0.5966173", "text": "function PrintMaxMinAverageArrayVals(arr){\n}", "title": "" }, { "docid": "98edbf1e98660c8ce09b2eab209c4ca6", "score": "0.59620386", "text": "function bound(value, min, max)\n{\n\tif(value < min)\n\t\treturn min;\n\tif(value > max)\n\t\treturn max;\n\treturn value;\n}", "title": "" }, { "docid": "ebd0d509a3d13073a4d4a5f523749260", "score": "0.59599376", "text": "function showMax(event, obj) {\n if (obj) {\n if (Number(obj.val().slice(1, obj.val().length))) {\n minAmount = obj.val();\n if ($(\"#max\").val()) {\n var maxText = $(\"#max\").val();\n }\n if (minAmount.indexOf(\"$\") === -1) {\n minAmount = \"$\" + obj.val();\n }\n if (maxText) {\n $(\"#rent-range\").html(minAmount + \"-$\" + maxText);\n }\n else {\n $(\"#rent-range\").html(minAmount + \"+\");\n }\n }\n else {\n if (maxVal) {\n $(\"#rent-range\").html(\"<\" + maxVal)\n }\n else {\n $(\"#rent-range\").html(\"Rent Range\");\n }\n }\n }\n $(\"#max-column\").css(\"display\", \"initial\");\n $(\"#min-column\").css(\"display\", \"none\");\n }", "title": "" }, { "docid": "6b47c9060a1f9d8427dd8e572782e6d0", "score": "0.5959002", "text": "function find_dataRange(data){\r\n\t\tconsole.log(\"find_dataRange\");\r\n\t\tmin_max_zaehlstelle ={};\r\n\t\tfor (k = 1; k < Object.keys(data[0]).length; k++){ // name of zaehlstelle\r\n\t\t\tvar name_zaehlstelle = Object.keys(zaehlstellen_data[0])[k];\r\n\t\t\tvar min_max = [Infinity, -Infinity];\r\n\r\n\t\t\tfor (i = 1; i < data.length; i++){ // also via keys? // value of zaehlstelle at certain date\r\n\t\t\t\tvar amount = data[i][name_zaehlstelle];\r\n\r\n\t\t\t\tif (amount < min_max[0]) {min_max[0] = amount};\r\n\t\t\t\tif (amount > min_max[1]) {min_max[1] = amount};\r\n\r\n\t\t\t}\r\n\t\t\tmin_max_zaehlstelle[name_zaehlstelle] = min_max; // assign min/max-Values to Object\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "663aef12345473c148c4567d48e83572", "score": "0.594334", "text": "_getRange() {\n const that = this;\n\n if (that.logarithmicScale) {\n that._range = that._drawMax - that._drawMin;\n return;\n }\n\n if (that.scaleType === 'floatingPoint') {\n that._range = (that._drawMax - that._drawMin).toString();\n }\n else {\n that._range = new JQX.Utilities.BigNumber(that._drawMax).subtract(that._drawMin).toString();\n }\n }", "title": "" }, { "docid": "1bb802e391f3769e97444dc5c8432613", "score": "0.5940232", "text": "function minAndMax(arr){\n var min = arr[0]\n var max = arr[0]\n arr.forEach( function(el){\n if (el > max) {\n max = el\n }\n if (el < min) {\n\t\t\tmin = el\n }\n })\n \n // console.log([min,max])\n return [min,max]\n}", "title": "" }, { "docid": "e067541c4e796f8bab4a961c1958f523", "score": "0.5937547", "text": "function getMinMaxs(points) {\n var xs = points.map(function (point) {\n return point[0];\n });\n var ys = points.map(function (point) {\n return point[1];\n });\n return {\n minX: Math.min.apply(Math, xs),\n minY: Math.min.apply(Math, ys),\n maxX: Math.max.apply(Math, xs),\n maxY: Math.max.apply(Math, ys)\n };\n }", "title": "" }, { "docid": "ed2a4f6465f956c1e59164547ce27387", "score": "0.5937506", "text": "function getMinMax() {\n if (vm.currentDeviceType && vm.currentDeviceType.id) {\n var dateStart = moment(filter.start).format('YYYY-MM-DD HH:mm:ss');\n var dateEnd = moment(filter.end).format('YYYY-MM-DD HH:mm:ss');\n return getFilteredDeviceStateMinMax(vm.currentDeviceType, dateStart, dateEnd);\n }\n }", "title": "" }, { "docid": "c1efed02630d1137eb9c8769cc58c52d", "score": "0.5920732", "text": "function findMinAndMax(dataColumnX,dataColumny) {\n xMin = d3.min(usData, function(usData) {\n return +usData[dataColumnX] * 0.8;\n });\n\n xMax = d3.max(usData, function(usData) {\n return +usData[dataColumnX] * 1.1;\n });\n\n yMax = d3.max(usData, function(usData) {\n return +usData.[dataColumny] * 1.1;\n\n yMin = d3.min(usData, function(usData) {\n return +usData[dataColumny] * 0.8;\n\n });\n}\n\n// The default x-axis is 'poverty', default y-axis is 'diabetes'\n// Another axis can be assigned to the variable during an onclick event.\n// This variable is key to the ability to change axis/data column\nvar currentAxisLabelX = \"poverty\";\nvar currentAxisLabelY = \"diabetes\";\n\n// Call findMinAndMax() with 'hair_length' as default\nfindMinAndMax(currentAxisLabelX,currentAxisLabelY);\n\n// Set the domain of an axis to extend from the min to the max value of the data column\nxLinearScale.domain([xMin, xMax]);\nyLinearScale.domain([yMin, yMax]);\n\n\n///////////////END NEW CODE\n\n // Scale the domain//START REPLACED (WAS WORKING)//////////////////////\n //xLinearScale.domain([20, d3.max(usData, function(data) {\n // return +data.poverty * 1.1;\n //})]);\n //yLinearScale.domain([0, d3.max(usData, function(data) {\n // return +data.diabetes * 1.1;\n //})]);\n /////////////////////FINISH REPLACED CODE (WAS WORKING) ////////////////\n\n var toolTip = d3.tip()\n .attr(\"class\", \"tooltip\")\n .offset([80, -60])\n .html(function(data) {\n var state = data.state;\n var povertyLevel = data.poverty;\n var diabetes = data.diabetes;\n var internet = data.internet;\n var median_age = data.median_age;\n var education = data.education;\n\n return (state + \"<br> Poverty Level: \" + povertyLevel + \"<br> Diabetes: \" + diabetes + \n \t\"<br> internet: \" + internet + \"<br> median age: \" + median_age + \n \"<br> education level: \" + education);\n });\n\n chart.call(toolTip);\n\n chart.selectAll(\"circle\")\n .data(usData)\n .enter().append(\"circle\")\n .attr(\"cx\", function(data, index) {\n console.log(data.poverty);\n return xLinearScale(data[currentAxisLabelX]);\n })\n .attr(\"cy\", function(data, index) {\n return yLinearScale(data[currentAxisLabelY]);\n })\n .attr(\"r\", \"15\")\n .attr(\"fill\", \"red\")\n .on(\"click\", function(data) {\n toolTip.show(data);\n })\n // onmouseout event\n .on(\"mouseout\", function(data, index) {\n toolTip.hide(data);\n });\n\n chart.append(\"g\")\n .attr(\"transform\", `translate(0, ${height})`)\n .call(bottomAxis);\n\n chart.append(\"g\")\n .call(leftAxis);\n\n //append y-axis labels - DEFAULT\n chart.append(\"text\")\n .attr(\"transform\", \"rotate(-90)\")\n .attr(\"y\", 0 - margin.left + 40)\n .attr(\"x\", 0 - (height / 2))\n .attr(\"dy\", \"1em\")\n .attr(\"class\", \"axisText\")\n .attr(\"data-axis-name\", \"diabetes\")\n .text(\"% of Population Below Poverty Line\");\n\n//append y-axis labels - DEFAULT\n chart.append(\"text\")\n .attr(\"transform\", \"rotate(-90)\")\n .attr(\"y\", 0 - margin.left + 40)\n .attr(\"x\", 0 - (height / 2))\n .attr(\"dy\", \"1em\")\n .attr(\"class\", \"axisText inactive\")\n .attr(\"data-axis-name\", \"obesity\")\n .text(\"% of Population Classified as Obese\");\n\n chart.append(\"text\")\n .attr(\"transform\", \"rotate(-90)\")\n .attr(\"y\", 0 - margin.left + 40)\n .attr(\"x\", 0 - (height / 2))\n .attr(\"dy\", \"1em\")\n .attr(\"class\", \"axisText inactive\")\n .attr(\"data-axis-name\", \"internet\")\n .text(\"Level of Internet Use\");\n\n\n// Append x-axis labels -- DEFAULT\n chart.append(\"text\")\n .attr(\"transform\", \"translate(\" + (width / 2) + \" ,\" + (height + margin.top + 30) + \")\")\n .attr(\"class\", \"axisText active\")\n .attr(\"data-axis-name\", \"poverty\")\n .text(\"% of Population below Poverty Line\");\n\n//// Append x-axis labels ---FIX THESE, THEY'RE INACTIVE\n chart.append(\"text\")\n .attr(\"transform\", \"translate(\" + (width / 2) + \" ,\" + (height + margin.top + 30) + \")\")\n .attr(\"class\", \"axisText inactive\")\n .attr(\"data-axis-name\", \"education\")\n .text(\"Education Level\");\n\n chart.append(\"text\")\n .attr(\"transform\", \"translate(\" + (width / 2) + \" ,\" + (height + margin.top + 30) + \")\")\n .attr(\"class\", \"axisText inactive\")\n .attr(\"data-axis-name\", \"income\")\n .text(\"Median Income Level\");\n//////////////WRAP INACTIVE AXES\n\n// Change an axis's status from inactive to active when clicked (if it was inactive)\n // Change the status of all active axes to inactive otherwise\n function labelChange(clickedAxis) {\n d3\n .selectAll(\".axisText\")\n .filter(\".active\")\n // An alternative to .attr(\"class\", <className>) method. Used to toggle classes.\n .classed(\"active\", false)\n .classed(\"inactive\", true);\n\n clickedAxis.classed(\"inactive\", false).classed(\"active\", true);\n }\n\n d3.selectAll(\".axis-text\").on(\"click\", function() {\n // Assign a variable to current axis\n var clickedSelection = d3.select(this);\n // \"true\" or \"false\" based on whether the axis is currently selected\n var isClickedSelectionInactive = clickedSelection.classed(\"inactive\");\n // console.log(\"this axis is inactive\", isClickedSelectionInactive)\n // Grab the data-attribute of the axis and assign it to a variable\n // e.g. if data-axis-name is \"poverty,\" var clickedAxis = \"poverty\"\n var clickedAxis = clickedSelection.attr(\"data-axis-name\");\n console.log(\"current axis: \", clickedAxis);\n\n // The onclick events below take place only if the x-axis is inactive\n // Clicking on an already active axis will therefore do nothing\n if (isClickedSelectionInactive) {\n // Assign the clicked axis to the variable currentAxisLabelX\n currentAxisLabelX = clickedAxis;\n // Call findMinAndMax() to define the min and max domain values.\n findMinAndMax(currentAxisLabelX);\n // Set the domain for the x-axis\n xLinearScale.domain([xMin, xMax]);\n // Create a transition effect for the x-axis\n svg\n .select(\".x-axis\")\n .transition()\n // .ease(d3.easeElastic)\n .duration(1800)\n .call(bottomAxis);\n // Select all circles to create a transition effect, then relocate its horizontal location\n // based on the new axis that was selected/clicked\n d3.selectAll(\"circle\").each(function() {\n d3\n .select(this)\n .transition()\n // .ease(d3.easeBounce)\n .attr(\"cx\", function(data) {\n return xLinearScale(usData[currentAxisLabelX]);\n })\n .duration(1800);\n });\n\n // Change the status of the axes. See above for more info on this function.\n labelChange(clickedSelection);\n }\n\n\n\n });\n}", "title": "" }, { "docid": "d5b33259b5b14bda87e548b43994b930", "score": "0.59200186", "text": "function domains(data) {\n var xMin = data[0][0];\n var xMax = data[0][0];\n var yMin = data[0][1];\n var yMax = data[0][1];\n\n for (var i = 1; i < data.length; i++) {\n if (data[i][0] < xMin)\n xMin = data[i][0];\n else if (data[i][0] > xMax)\n xMax = data[i][0];\n if (data[i][1] < yMin)\n yMin = data[i][1];\n else if (data[i][1] > yMax)\n yMax = data[i][1];\n }\n}", "title": "" }, { "docid": "020f4b667c7356a32df746c193ff56ff", "score": "0.5907143", "text": "drawMinMaxes(ctx, ymin, ymax)\n{\n var barData = new Array();\n\n var minValue = 1000000000.0;\n var maxValue = -1000000000.0;\n var minIndex = -1;\n var maxIndex = -1;\n var minLine = -1;\n var maxLine = -1;\n\n for ( var jndx=0; jndx<this.plotData.length; jndx++ )\n {\n barData = this.plotData[jndx];\n\n for ( var indx=0; indx<barData.length; indx++ )\n {\n if ( barData[indx] > maxValue )\n {\n maxValue = barData[indx];\n maxIndex = indx;\n maxLine = jndx;\n }\n if ( barData[indx] < minValue )\n {\n minValue = barData[indx];\n minIndex = indx;\n minLine = jndx;\n }\n }\n }\n\n if ( this.labelMax == true && maxIndex != -1 )\n {\n barData = this.plotData[maxLine];\n\n if ( this.DEBUG == true )\n alert(\"Max Line: \" + maxLine + \", Index: \" + maxIndex +\n \", Value: \" + barData[maxIndex]);\n\n var x = this.xScale*maxIndex + this.xOrg + this.xScale/2.0;\n var y = this.yOrg - (barData[maxIndex]-ymin)*this.yScale - this.xLabelsFontSize;\n\n var max_val = barData[maxIndex];\n ctx.lineWidth = 1;\n ctx.strokeStyle = this.BLACK;\n ctx.drawTextCenter(this.xLabelsFont, this.xLabelsFontSize, x, y, max_val + \"\");\n }\n\n if ( this.labelMin == true && minIndex != -1 )\n {\n barData = this.plotData[minLine];\n\n if ( this.DEBUG == true )\n alert(\"Min Line: \" + minLine + \", Index: \" + minIndex +\n \", Value: \" + barData[minIndex]);\n\n var x = this.xScale*minIndex + this.xOrg + this.xScale/2.0;\n var y = this.yOrg - (barData[minIndex]-ymin)*this.yScale - this.xLabelsFontSize;\n\n var min_val = barData[minIndex];\n ctx.lineWidth = 1;\n ctx.strokeStyle = this.BLACK;\n ctx.drawTextCenter(this.xLabelsFont, this.xLabelsFontSize, x, y, min_val + \"\");\n }\n}", "title": "" }, { "docid": "07555dc9b85e074fbddb7abac08eaca2", "score": "0.5901762", "text": "function calcDimensions(x, y) {\n if (x > xMax) {\n xMax = x;\n }\n if (x < xMin) {\n xMin = x;\n }\n if (y > yMax) {\n yMax = y;\n }\n if (y < yMin) {\n yMin = y;\n }\n }", "title": "" }, { "docid": "51beaea7c4f835f9d997b35c459ba6ff", "score": "0.5899321", "text": "function OptionMax(option){\n option = YearArray(option, selectedyear1, selectedyear2);\n var max = d3.max(option,function(d) {\n return parseFloat(d);\n });\n return max;\n}", "title": "" }, { "docid": "f54178328350bd1180e359e9df6534cd", "score": "0.5895404", "text": "function getCircleValues(map, attribute){\n //start with min at highest possible and max at lowest possible number\n var min = Infinity,\n max = -Infinity;\n\n map.eachLayer(function(layer){\n //get the attribute value\n if (layer.feature){\n var attributeValue = Number(layer.feature.properties[attribute]);\n\n //test for min\n if (attributeValue < min){\n min = attributeValue;\n };\n\n //test for max\n if (attributeValue > max){\n max = attributeValue;\n };\n };\n });\n\n //set mean\n var mean = (max + min) /2;\n // console.log(max);\n // console.log(mean);\n // console.log(min);\n \n\n //return values as an object\n return {\n max: max,\n mean: mean,\n min: min\n };\n}", "title": "" }, { "docid": "24e6c68f5c04fcdbf3e1278831315320", "score": "0.58953977", "text": "function min_max_bigtraders() {\n min = Number.MAX_SAFE_INTEGER;\n max = 0;\n\n big_traders.forEach(function(ISO) {\n stories_data[current_story]\n .filter(x => x.PartnerISO == ISO)\n .map(x => parseInt(x.Value))\n .forEach(function(value) {\n if (value > max) {\n max = value;\n }\n if (value < min) {\n min = value;\n }\n })\n })\n return [min, max];\n}", "title": "" }, { "docid": "020d842b7644ae70f5c09f1994894b97", "score": "0.5891737", "text": "function minAndMax (array) {\n var min = Infinity;\n var max = -Infinity;\n var output = [];\n for ( var i = 0; i < array.length; i++) {\n \n if (array[i] > max) {\n max = array[i];\n \n } \n if(array[i] < min) {\n min = array[i]; \n } \n \n }\n output[output.length] = min;\n output[output.length] = max;\n return output;\n}", "title": "" }, { "docid": "2ef262d8cd391db758d5bd4e35d957ee", "score": "0.5889302", "text": "function minOrMax(field) {\n var validNumberMessage = makeMessage('validnumber', field.args);\n\n var fieldValue = parseInt(field.el.value, 10);\n if (isNaN(fieldValue)) {\n field.invalidate(validNumberMessage);\n return;\n }\n\n var minValue = field.args('min');\n var maxValue = field.args('max');\n\n if (minValue && fieldValue < parseInt(minValue, 10)) {\n field.invalidate(makeMessage('min', field.args));\n } else if (maxValue && fieldValue > parseInt(maxValue, 10)) {\n field.invalidate(makeMessage('max', field.args));\n } else {\n field.validate();\n }\n}", "title": "" }, { "docid": "f5a3d78186a0716ca93e8a6ab173bec9", "score": "0.5889191", "text": "customRange() {\n\t\t$(\".range-wrap\").each(function () {\n\t\t\tlet _this = $(this);\n\t\t\tvar $d3 = _this.find(\".slider-js\");\n\n\t\t\tvar slider = $d3.ionRangeSlider({\n\t\t\t\tskin: \"round\",\n\t\t\t\ttype: \"double\",\n\t\t\t\tgrid: false,\n\t\t\t\tgrid_snap: false,\n\t\t\t\thide_min_max: true,\n\t\t\t\thide_from_to: true,\n\t\t\t\tonStart: function (data) {\n\t\t\t\t\t_this.find('.minus').val(data.from);\n\t\t\t\t\t_this.find('.plus').val(data.to);\n\t\t\t\t},\n\t\t\t\tonChange: function (data) {\n\t\t\t\t\t_this.find('.minus').val(data.from);\n\t\t\t\t\t_this.find('.plus').val(data.to);\n\t\t\t\t},\n\t\t\t\tonFinish: function (data) {\n\t\t\t\t\t_this.find('.minus').val(data.from);\n\t\t\t\t\t_this.find('.plus').val(data.to);\n\t\t\t\t},\n\t\t\t\tonUpdate: function (data) {\n\t\t\t\t\t_this.find('.minus').val(data.from);\n\t\t\t\t\t_this.find('.plus').val(data.to);\n\t\t\t\t}\n\t\t\t});\n\t\t\tvar $d3_instance = slider.data(\"ionRangeSlider\");\n\t\t\t$(this).on('change input cut copy paste', '.minus', function () {\n\t\t\t\tvar th = $(this);\n\t\t\t\tvar data = th.val();\n\t\t\t\tvar min = +data;\n\t\t\t\t// th.val(data + ' т')\n\t\t\t\tconsole.log(1);\n\t\t\t\t$d3_instance.update({\n\t\t\t\t\tfrom: min,\n\t\t\t\t})\n\t\t\t});\n\n\t\t\t$(this).on('change input cut copy paste', '.plus', function () {\n\t\t\t\tvar th = $(this);\n\t\t\t\tvar data = th.val();\n\t\t\t\tvar max = +data;\n\n\t\t\t\t//max => new val of max inp\n\t\t\t\t//min => value of the min inp\n\n\t\t\t\tlet min = Number(document.querySelector('.range-result.range-result--minus.minus').value);\n\t\t\t\tif (min >= max) {\n\t\t\t\t\tmin = 0;\n\t\t\t\t\t$d3_instance.update({\n\t\t\t\t\t\tfrom: min,\n\t\t\t\t\t\tto: max,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$d3_instance.update({\n\t\t\t\t\t\tto: max,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t\t// $d3.on(\"change\", function () {\n\t\t\t// \tvar $inp = $(this);\n\t\t\t// \tvar from = $inp.prop(\"value\"); // reading input value\n\t\t\t// \tvar from2 = $inp.data(\"from\"); // reading input data-from attribute\n\n\t\t\t// \t_this.find('range-result--minus').val(from); // FROM value\n\t\t\t// \t_this.find('range-result--plus').val(from); // FROM value\n\t\t\t// });\n\n\n\t\t})\n\t}", "title": "" }, { "docid": "dde14d916518b4298f7d94a3cc662340", "score": "0.58863175", "text": "findRangeofDates(){ \n\t\tlet min=new Date(2030,1,1); \n\t\tlet max=new Date(1990,1,1);\n\t\tconst ar=this.props.data;\n\t\tfor(let i=0;i<ar.length;i++){\n\t\t\tif(ar[i].start<min)\n\t\t\t\tmin=ar[i].start;\n\t\t\tif(ar[i].end>max)\n\t\t\t\tmax=ar[i].end;\n\t\t}\n\t\tthis.min=min;\n\t\tthis.max=max;\n\t}", "title": "" }, { "docid": "7597797f9b1a4cff7edcc92422b655c0", "score": "0.5880465", "text": "function minmax(value, min, max) {\n //debugger;\n if (parseInt(value) < 1 || isNaN(value)) { return 1; }\n else if (parseInt(value) > 100) { return 100; }\n else { return value; }\n}", "title": "" }, { "docid": "76390fbb0827c4492ccff10f3b9225f1", "score": "0.58576614", "text": "function applyRangeFilterAndGetData(days, graphData){\n var minValue = Number.MAX_VALUE;\n graphData = $.extend(true, {}, graphData || thisInstance.graphData);\n for(var index in graphData){\n if(Array.isArray(graphData[index])) {\n graphData[index] = (graphData[index] || []).slice(90 - parseInt(days));\n }\n\n // finds min value of the series\n for(var innerIndex in graphData[index]) {\n var value = graphData[index][innerIndex][1];\n minValue = (minValue < value) ? minValue : value;\n }\n }\n\n return {graphData: graphData, minValue: minValue};\n }", "title": "" }, { "docid": "3506630f9dfc1f4fcf54106b6badebad", "score": "0.5857404", "text": "_validateMinMax(which, referenceValue) {\n const that = this;\n let minChanged = false;\n\n if (which !== 'max') {\n that.min = JQX.Utilities.DateTime.validateDate(that.min, referenceValue || new JQX.Utilities.DateTime(1600, 1, 1), that.formatString);\n that.min = that.min.toTimeZone(that._outputTimeZone);\n minChanged = true;\n }\n\n if (which !== 'min') {\n that.max = JQX.Utilities.DateTime.validateDate(that.max, referenceValue || new JQX.Utilities.DateTime(3001, 1, 1), that.formatString);\n that.max = that.max.toTimeZone(that._outputTimeZone);\n\n that.max.calendar.days = that._localizedDays;\n that.max.calendar.months = that._localizedMonths;\n that.max.calendar.locale = that.locale;\n\n that.$.calendarDropDown.max = that.max.toDate();\n }\n\n if (that.min.compare(that.max) > 0) {\n that.min = that.max.clone();\n minChanged = true;\n }\n\n if (minChanged) {\n that.min.calendar.days = that._localizedDays;\n that.min.calendar.months = that._localizedMonths;\n that.min.calendar.locale = that.locale;\n\n that.$.calendarDropDown.min = that.min.toDate();\n }\n }", "title": "" }, { "docid": "8377ce8c64054cf1b5033007de878574", "score": "0.58404356", "text": "function findExtremes(data, inArrayFlag) {\n\n // Copy the values, rather than operating on references to existing values\n var values = [], smallDataFlag = false;\n _.each(data, function(item){\n if($.isNumeric(item))\n values.push(Number(item));\n });\n\n // Then sort\n values.sort(function (a, b) {\n return a - b;\n });\n\n /* Then find a generous IQR. This is generous because if (values.length / 4)\n * is not an int, then really you should average the two elements on either\n * side to find q1.\n */\n var q1 = values[Math.floor((values.length / 4))];\n // Likewise for q3.\n var q3 = values[(Math.ceil((values.length * (3 / 4))) > values.length - 1 ? values.length - 1 : Math.ceil((values.length * (3 / 4))))];\n var iqr = q3 - q1;\n if(values[Math.ceil((values.length * (1 / 2)))] < 0.001)\n smallDataFlag = true;\n // Then find min and max values\n var maxValue, minValue;\n if(q3 < 1){\n maxValue = Number((q3 + iqr * 1.5).toFixed(2));\n minValue = Number((q1 - iqr * 1.5).toFixed(2));\n }else{\n maxValue = Math.ceil(q3 + iqr * 1.5);\n minValue = Math.floor(q1 - iqr * 1.5);\n }\n if(minValue < values[0])minValue = values[0];\n if(maxValue > values[values.length - 1])maxValue = values[values.length - 1];\n //provide the option to choose min and max values from the input array\n if(inArrayFlag){\n var i = 0;\n if(values.indexOf(minValue) === -1){\n while(minValue > values[i] && minValue > values[i+1]){\n i++;\n }\n minValue = values[i+1];\n }\n i = values.length - 1;\n if(values.indexOf(maxValue) === -1){\n while(maxValue < values[i] && maxValue < values[i-1]){\n i--;\n }\n maxValue = values[i-1];\n }\n }\n\n return [minValue, maxValue, smallDataFlag];\n }", "title": "" }, { "docid": "1d5a53dc2239d2d2376ae2da82faa9b6", "score": "0.58380884", "text": "function extent(values) {\n var n = values.length;\n var i = -1;\n var value;\n var min;\n var max;\n while (++i < n) { // Find the first comparable value.\n if ((value = values[i]) != null && value >= value) {\n min = max = value;\n while (++i < n) { // Compare the remaining values.\n if ((value = values[i]) != null) {\n if (min > value) {\n min = value;\n }\n if (max < value) {\n max = value;\n }\n }\n }\n }\n }\n return [min, max];\n}", "title": "" }, { "docid": "9328dccad3fa34b1745382c3c89ea33d", "score": "0.5837276", "text": "function minAndMax (array) {\n var min = Infinity;\n var max = -Infinity;\n var output = [];\n for ( var i = 0; i < array.length; i++) {\n if (array[i] > max) {\n max = array[i];\n } else if(array[i] < min) {\n min = array[i]; \n } \n }\n for (var i = 0; i < array.length; i++) {\n if (array[i] === min) {\n output[output.length] = max;\n } else if (array[i] === max) {\n output[output.length] = min;\n } else {\n output[output.length] = array[i];\n }\n }\n return output\n}", "title": "" }, { "docid": "8bbefbe61f0b310d0c0ff1727b93e379", "score": "0.5836824", "text": "function getCircleValues(map, attribute){\n //start with min at highest possible and max at lowest possible number\n var min = Infinity,\n max = -Infinity;\n\n map.eachLayer(function(layer){\n //get the attribute value\n if (layer.feature){\n var attributeValue = Number(layer.feature.properties[attribute]);\n\n //test for min\n if (attributeValue < min){\n min = attributeValue;\n };\n\n //test for max\n if (attributeValue > max){\n max = roundNumber(attributeValue);\n };\n };\n });\n\n //set mean\n var mean = roundNumber((max) / 2);\n\n\n // return values as an object\n return {\n max: max,\n mean: mean,\n min: 1000\n };\n}", "title": "" }, { "docid": "03aa1a53b48e28b5cf42d653f3be2848", "score": "0.58345616", "text": "function validateMinMaxValue(val)\n{\n var dt = P2.getFieldValue(TYPE_NAME);\n if (dt == INT_TYPE || dt == DEC_TYPE)\n {\n if(!val || val.length == 0)\n return \"Min/Max values are required\"\n }\n return null;\n}", "title": "" }, { "docid": "78f374c128b8dffb088db9d921a3b4c7", "score": "0.58324957", "text": "min(cols=this.displayColumns) {\n if (!this.state.data || this.state.data.length === 0) { return 0; }\n\n const minObs = obs => {\n const vals = _.values(obs).filter(actualNumber);\n return Math.min(...vals);\n };\n\n const pickFields = cols.map(c => c.accessor);\n const allMins = this.getDataPackets()\n .map(obs => _.pick(obs, pickFields))\n .map(obs => minObs(obs));\n\n return Math.min(...allMins);\n }", "title": "" }, { "docid": "5e6aadb20c178220c40d8d2c41d759a1", "score": "0.58300096", "text": "function arrMaxMin(arr) {\n\tlet min = +Infinity, max = -Infinity;\n\tlet statmin=0, statmax=0;\n\tfor(let i=0; i < arr.length; i++) {\n\t\tif(arr[i] < min) {\n\t\t\tmin = arr[i];\n\t\t\tstatmin++;\n\t\t}\n\t\tif(arr[i] > max) {\n\t\t\tmax = arr[i];\n\t\t\tstatmax++;\n\t\t}\n\t}\n\tconsole.log(max, min);\n}", "title": "" } ]
6377727f850e1dbe3f2d13b0ab5decf2
Given two schemas, returns an Array containing descriptions of all the types of potentially dangerous changes covered by the other functions down below.
[ { "docid": "5759ce6282296306ec9a12a9420e9592", "score": "0.69837254", "text": "function findDangerousChanges(oldSchema, newSchema) {\n return findArgChanges(oldSchema, newSchema).dangerousChanges.concat(findValuesAddedToEnums(oldSchema, newSchema), findInterfacesAddedToObjectTypes(oldSchema, newSchema), findTypesAddedToUnions(oldSchema, newSchema), findFieldsThatChangedTypeOnInputObjectTypes(oldSchema, newSchema).dangerousChanges);\n}", "title": "" } ]
[ { "docid": "8d4cfe8a22cf5625860147ac303bacb6", "score": "0.72050905", "text": "function findDangerousChanges(oldSchema, newSchema) {\n\t return [].concat(findArgChanges(oldSchema, newSchema).dangerousChanges, findValuesAddedToEnums(oldSchema, newSchema), findInterfacesAddedToObjectTypes(oldSchema, newSchema), findTypesAddedToUnions(oldSchema, newSchema), findFieldsThatChangedTypeOnInputObjectTypes(oldSchema, newSchema).dangerousChanges);\n\t}", "title": "" }, { "docid": "ff19a1bf3b825e72aba344bccf2f51d0", "score": "0.7192278", "text": "function findDangerousChanges(oldSchema, newSchema) {\n return [].concat(findArgChanges(oldSchema, newSchema).dangerousChanges, findValuesAddedToEnums(oldSchema, newSchema), findTypesAddedToUnions(oldSchema, newSchema));\n}", "title": "" }, { "docid": "ab7ddf3ebde69c2a504d89707cd0f08b", "score": "0.71191895", "text": "function findDangerousChanges(oldSchema, newSchema) {\n\t return [].concat(findArgChanges(oldSchema, newSchema).dangerousChanges);\n\t}", "title": "" }, { "docid": "efbd714a1c2ee123b311ca5e656237f2", "score": "0.7066638", "text": "function findDangerousChanges(oldSchema, newSchema) {\n var dangerousChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) {\n return change.type in DangerousChangeType;\n });\n return dangerousChanges;\n }", "title": "" }, { "docid": "fea7ebabc0b1586ddf4070aa11a6a922", "score": "0.7040061", "text": "function findDangerousChanges(oldSchema, newSchema) {\n return [].concat(findArgChanges(oldSchema, newSchema).dangerousChanges, findValuesAddedToEnums(oldSchema, newSchema), findInterfacesAddedToObjectTypes(oldSchema, newSchema), findTypesAddedToUnions(oldSchema, newSchema), findFieldsThatChangedTypeOnInputObjectTypes(oldSchema, newSchema).dangerousChanges);\n}", "title": "" }, { "docid": "fea7ebabc0b1586ddf4070aa11a6a922", "score": "0.7040061", "text": "function findDangerousChanges(oldSchema, newSchema) {\n return [].concat(findArgChanges(oldSchema, newSchema).dangerousChanges, findValuesAddedToEnums(oldSchema, newSchema), findInterfacesAddedToObjectTypes(oldSchema, newSchema), findTypesAddedToUnions(oldSchema, newSchema), findFieldsThatChangedTypeOnInputObjectTypes(oldSchema, newSchema).dangerousChanges);\n}", "title": "" }, { "docid": "16e81344c2ccc79b0c7b722cf2f55427", "score": "0.7017916", "text": "function findDangerousChanges(oldSchema, newSchema) {\n var dangerousChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) {\n return change.type in DangerousChangeType;\n });\n return dangerousChanges;\n }", "title": "" }, { "docid": "12729388a03043a8c42a678a6d11a089", "score": "0.6960385", "text": "function findDangerousChanges(oldSchema, newSchema) {\n var dangerousChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) {\n return change.type in DangerousChangeType;\n });\n return dangerousChanges;\n}", "title": "" }, { "docid": "12729388a03043a8c42a678a6d11a089", "score": "0.6960385", "text": "function findDangerousChanges(oldSchema, newSchema) {\n var dangerousChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) {\n return change.type in DangerousChangeType;\n });\n return dangerousChanges;\n}", "title": "" }, { "docid": "12729388a03043a8c42a678a6d11a089", "score": "0.6960385", "text": "function findDangerousChanges(oldSchema, newSchema) {\n var dangerousChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) {\n return change.type in DangerousChangeType;\n });\n return dangerousChanges;\n}", "title": "" }, { "docid": "12729388a03043a8c42a678a6d11a089", "score": "0.6960385", "text": "function findDangerousChanges(oldSchema, newSchema) {\n var dangerousChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) {\n return change.type in DangerousChangeType;\n });\n return dangerousChanges;\n}", "title": "" }, { "docid": "12729388a03043a8c42a678a6d11a089", "score": "0.6960385", "text": "function findDangerousChanges(oldSchema, newSchema) {\n var dangerousChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) {\n return change.type in DangerousChangeType;\n });\n return dangerousChanges;\n}", "title": "" }, { "docid": "12729388a03043a8c42a678a6d11a089", "score": "0.6960385", "text": "function findDangerousChanges(oldSchema, newSchema) {\n var dangerousChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) {\n return change.type in DangerousChangeType;\n });\n return dangerousChanges;\n}", "title": "" }, { "docid": "12729388a03043a8c42a678a6d11a089", "score": "0.6960385", "text": "function findDangerousChanges(oldSchema, newSchema) {\n var dangerousChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) {\n return change.type in DangerousChangeType;\n });\n return dangerousChanges;\n}", "title": "" }, { "docid": "fdd4c41f328d05c4fcbef30e4404de70", "score": "0.6916374", "text": "function findTypesThatChangedKind(oldSchema, newSchema) {\n\t var oldTypeMap = oldSchema.getTypeMap();\n\t var newTypeMap = newSchema.getTypeMap();\n\n\t var breakingChanges = [];\n\t Object.keys(oldTypeMap).forEach(function (typeName) {\n\t if (!newTypeMap[typeName]) {\n\t return;\n\t }\n\t var oldType = oldTypeMap[typeName];\n\t var newType = newTypeMap[typeName];\n\t if (oldType.constructor !== newType.constructor) {\n\t breakingChanges.push({\n\t type: BreakingChangeType.TYPE_CHANGED_KIND,\n\t description: typeName + ' changed from ' + (typeKindName(oldType) + ' to ' + typeKindName(newType) + '.')\n\t });\n\t }\n\t });\n\t return breakingChanges;\n\t}", "title": "" }, { "docid": "7053ee84dd4c90d2f32c7788e70f4b5e", "score": "0.69071674", "text": "function findTypesThatChangedKind(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n\n var breakingChanges = [];\n Object.keys(oldTypeMap).forEach(function (typeName) {\n if (!newTypeMap[typeName]) {\n return;\n }\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n if (oldType.constructor !== newType.constructor) {\n breakingChanges.push({\n type: BreakingChangeType.TYPE_CHANGED_KIND,\n description: typeName + ' changed from ' + (typeKindName(oldType) + ' to ' + typeKindName(newType) + '.')\n });\n }\n });\n return breakingChanges;\n}", "title": "" }, { "docid": "f89b0647bf95ad0feaf4c54cd500b94c", "score": "0.6899692", "text": "function findRemovedTypes(oldSchema, newSchema) {\n\t var oldTypeMap = oldSchema.getTypeMap();\n\t var newTypeMap = newSchema.getTypeMap();\n\n\t var breakingChanges = [];\n\t Object.keys(oldTypeMap).forEach(function (typeName) {\n\t if (!newTypeMap[typeName]) {\n\t breakingChanges.push({\n\t type: BreakingChangeType.TYPE_REMOVED,\n\t description: typeName + ' was removed.'\n\t });\n\t }\n\t });\n\t return breakingChanges;\n\t}", "title": "" }, { "docid": "f89b0647bf95ad0feaf4c54cd500b94c", "score": "0.6899692", "text": "function findRemovedTypes(oldSchema, newSchema) {\n\t var oldTypeMap = oldSchema.getTypeMap();\n\t var newTypeMap = newSchema.getTypeMap();\n\n\t var breakingChanges = [];\n\t Object.keys(oldTypeMap).forEach(function (typeName) {\n\t if (!newTypeMap[typeName]) {\n\t breakingChanges.push({\n\t type: BreakingChangeType.TYPE_REMOVED,\n\t description: typeName + ' was removed.'\n\t });\n\t }\n\t });\n\t return breakingChanges;\n\t}", "title": "" }, { "docid": "946580e3d44d6e4b819c17dbcbe470e9", "score": "0.68925834", "text": "function findTypesThatChangedKind(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n\n var breakingChanges = [];\n Object.keys(oldTypeMap).forEach(function (typeName) {\n if (!newTypeMap[typeName]) {\n return;\n }\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n if (!(oldType instanceof newType.constructor)) {\n breakingChanges.push({\n type: BreakingChangeType.TYPE_CHANGED_KIND,\n description: typeName + ' changed from ' + (typeKindName(oldType) + ' to ' + typeKindName(newType) + '.')\n });\n }\n });\n return breakingChanges;\n}", "title": "" }, { "docid": "fff0eef786b2685d963628c3574139e5", "score": "0.68890387", "text": "function findTypesThatChangedKind(oldSchema, newSchema) {\n\t var oldTypeMap = oldSchema.getTypeMap();\n\t var newTypeMap = newSchema.getTypeMap();\n\n\t var breakingChanges = [];\n\t Object.keys(oldTypeMap).forEach(function (typeName) {\n\t if (!newTypeMap[typeName]) {\n\t return;\n\t }\n\t var oldType = oldTypeMap[typeName];\n\t var newType = newTypeMap[typeName];\n\t if (!(oldType instanceof newType.constructor)) {\n\t breakingChanges.push({\n\t type: BreakingChangeType.TYPE_CHANGED_KIND,\n\t description: typeName + ' changed from ' + (typeKindName(oldType) + ' to ' + typeKindName(newType) + '.')\n\t });\n\t }\n\t });\n\t return breakingChanges;\n\t}", "title": "" }, { "docid": "0a1734cdb9e4fa950b9c7686624e8cb4", "score": "0.68736565", "text": "function findTypesThatChangedKind(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var breakingChanges = [];\n\n var _arr2 = Object.keys(oldTypeMap);\n\n for (var _i2 = 0; _i2 < _arr2.length; _i2++) {\n var typeName = _arr2[_i2];\n\n if (!newTypeMap[typeName]) {\n continue;\n }\n\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (oldType.constructor !== newType.constructor) {\n breakingChanges.push({\n type: BreakingChangeType.TYPE_CHANGED_KIND,\n description: \"\".concat(typeName, \" changed from \") + \"\".concat(typeKindName(oldType), \" to \").concat(typeKindName(newType), \".\")\n });\n }\n }\n\n return breakingChanges;\n}", "title": "" }, { "docid": "0a1734cdb9e4fa950b9c7686624e8cb4", "score": "0.68736565", "text": "function findTypesThatChangedKind(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var breakingChanges = [];\n\n var _arr2 = Object.keys(oldTypeMap);\n\n for (var _i2 = 0; _i2 < _arr2.length; _i2++) {\n var typeName = _arr2[_i2];\n\n if (!newTypeMap[typeName]) {\n continue;\n }\n\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (oldType.constructor !== newType.constructor) {\n breakingChanges.push({\n type: BreakingChangeType.TYPE_CHANGED_KIND,\n description: \"\".concat(typeName, \" changed from \") + \"\".concat(typeKindName(oldType), \" to \").concat(typeKindName(newType), \".\")\n });\n }\n }\n\n return breakingChanges;\n}", "title": "" }, { "docid": "0a1734cdb9e4fa950b9c7686624e8cb4", "score": "0.68736565", "text": "function findTypesThatChangedKind(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var breakingChanges = [];\n\n var _arr2 = Object.keys(oldTypeMap);\n\n for (var _i2 = 0; _i2 < _arr2.length; _i2++) {\n var typeName = _arr2[_i2];\n\n if (!newTypeMap[typeName]) {\n continue;\n }\n\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (oldType.constructor !== newType.constructor) {\n breakingChanges.push({\n type: BreakingChangeType.TYPE_CHANGED_KIND,\n description: \"\".concat(typeName, \" changed from \") + \"\".concat(typeKindName(oldType), \" to \").concat(typeKindName(newType), \".\")\n });\n }\n }\n\n return breakingChanges;\n}", "title": "" }, { "docid": "61cae46ba9b91d452da2b1b216a42c1b", "score": "0.68653625", "text": "function findRemovedTypes(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n\n var breakingChanges = [];\n Object.keys(oldTypeMap).forEach(function (typeName) {\n if (!newTypeMap[typeName]) {\n breakingChanges.push({\n type: BreakingChangeType.TYPE_REMOVED,\n description: typeName + ' was removed.'\n });\n }\n });\n return breakingChanges;\n}", "title": "" }, { "docid": "61cae46ba9b91d452da2b1b216a42c1b", "score": "0.68653625", "text": "function findRemovedTypes(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n\n var breakingChanges = [];\n Object.keys(oldTypeMap).forEach(function (typeName) {\n if (!newTypeMap[typeName]) {\n breakingChanges.push({\n type: BreakingChangeType.TYPE_REMOVED,\n description: typeName + ' was removed.'\n });\n }\n });\n return breakingChanges;\n}", "title": "" }, { "docid": "43b9fe9a20a1c901e94984e487bb39e3", "score": "0.6839583", "text": "function findBreakingChanges(oldSchema, newSchema) {\n\t return [].concat(findRemovedTypes(oldSchema, newSchema), findTypesThatChangedKind(oldSchema, newSchema), findFieldsThatChangedTypeOnObjectOrInterfaceTypes(oldSchema, newSchema), findFieldsThatChangedTypeOnInputObjectTypes(oldSchema, newSchema).breakingChanges, findTypesRemovedFromUnions(oldSchema, newSchema), findValuesRemovedFromEnums(oldSchema, newSchema), findArgChanges(oldSchema, newSchema).breakingChanges, findInterfacesRemovedFromObjectTypes(oldSchema, newSchema), findRemovedDirectives(oldSchema, newSchema), findRemovedDirectiveArgs(oldSchema, newSchema), findAddedNonNullDirectiveArgs(oldSchema, newSchema), findRemovedDirectiveLocations(oldSchema, newSchema));\n\t}", "title": "" }, { "docid": "6594eb767252f8275a9acefb82580bb3", "score": "0.6818092", "text": "function findRemovedTypes(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var breakingChanges = [];\n\n var _arr = Object.keys(oldTypeMap);\n\n for (var _i = 0; _i < _arr.length; _i++) {\n var typeName = _arr[_i];\n\n if (!newTypeMap[typeName]) {\n breakingChanges.push({\n type: BreakingChangeType.TYPE_REMOVED,\n description: \"\".concat(typeName, \" was removed.\")\n });\n }\n }\n\n return breakingChanges;\n}", "title": "" }, { "docid": "6594eb767252f8275a9acefb82580bb3", "score": "0.6818092", "text": "function findRemovedTypes(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var breakingChanges = [];\n\n var _arr = Object.keys(oldTypeMap);\n\n for (var _i = 0; _i < _arr.length; _i++) {\n var typeName = _arr[_i];\n\n if (!newTypeMap[typeName]) {\n breakingChanges.push({\n type: BreakingChangeType.TYPE_REMOVED,\n description: \"\".concat(typeName, \" was removed.\")\n });\n }\n }\n\n return breakingChanges;\n}", "title": "" }, { "docid": "6594eb767252f8275a9acefb82580bb3", "score": "0.6818092", "text": "function findRemovedTypes(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var breakingChanges = [];\n\n var _arr = Object.keys(oldTypeMap);\n\n for (var _i = 0; _i < _arr.length; _i++) {\n var typeName = _arr[_i];\n\n if (!newTypeMap[typeName]) {\n breakingChanges.push({\n type: BreakingChangeType.TYPE_REMOVED,\n description: \"\".concat(typeName, \" was removed.\")\n });\n }\n }\n\n return breakingChanges;\n}", "title": "" }, { "docid": "65d722cdc749fadd0548c22a222686ba", "score": "0.68168354", "text": "function findTypesThatChangedKind(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var breakingChanges = [];\n\n for (var _i2 = 0, _Object$keys2 = Object.keys(oldTypeMap); _i2 < _Object$keys2.length; _i2++) {\n var typeName = _Object$keys2[_i2];\n\n if (!newTypeMap[typeName]) {\n continue;\n }\n\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (oldType.constructor !== newType.constructor) {\n breakingChanges.push({\n type: BreakingChangeType.TYPE_CHANGED_KIND,\n description: \"\".concat(typeName, \" changed from \") + \"\".concat(typeKindName(oldType), \" to \").concat(typeKindName(newType), \".\")\n });\n }\n }\n\n return breakingChanges;\n}", "title": "" }, { "docid": "48d4a04f794669a571efe48ac811369a", "score": "0.6811446", "text": "function findBreakingChanges(oldSchema, newSchema) {\n\t return [].concat(findRemovedTypes(oldSchema, newSchema), findTypesThatChangedKind(oldSchema, newSchema), findFieldsThatChangedType(oldSchema, newSchema), findTypesRemovedFromUnions(oldSchema, newSchema), findValuesRemovedFromEnums(oldSchema, newSchema), findArgChanges(oldSchema, newSchema).breakingChanges, findInterfacesRemovedFromObjectTypes(oldSchema, newSchema));\n\t}", "title": "" }, { "docid": "c699f6c4436e99eb94d3a47317b1f4f1", "score": "0.6797949", "text": "function findRemovedTypes(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var breakingChanges = [];\n\n for (var _i = 0, _Object$keys = Object.keys(oldTypeMap); _i < _Object$keys.length; _i++) {\n var typeName = _Object$keys[_i];\n\n if (!newTypeMap[typeName]) {\n breakingChanges.push({\n type: BreakingChangeType.TYPE_REMOVED,\n description: \"\".concat(typeName, \" was removed.\")\n });\n }\n }\n\n return breakingChanges;\n}", "title": "" }, { "docid": "9b6a357172cbcf9588ddae2b21152100", "score": "0.67570746", "text": "function findBreakingChanges(oldSchema, newSchema) {\n return [].concat(findRemovedTypes(oldSchema, newSchema), findTypesThatChangedKind(oldSchema, newSchema), findFieldsThatChangedTypeOnObjectOrInterfaceTypes(oldSchema, newSchema), findFieldsThatChangedTypeOnInputObjectTypes(oldSchema, newSchema).breakingChanges, findTypesRemovedFromUnions(oldSchema, newSchema), findValuesRemovedFromEnums(oldSchema, newSchema), findArgChanges(oldSchema, newSchema).breakingChanges, findInterfacesRemovedFromObjectTypes(oldSchema, newSchema), findRemovedDirectives(oldSchema, newSchema), findRemovedDirectiveArgs(oldSchema, newSchema), findAddedNonNullDirectiveArgs(oldSchema, newSchema), findRemovedDirectiveLocations(oldSchema, newSchema));\n}", "title": "" }, { "docid": "9b6a357172cbcf9588ddae2b21152100", "score": "0.67570746", "text": "function findBreakingChanges(oldSchema, newSchema) {\n return [].concat(findRemovedTypes(oldSchema, newSchema), findTypesThatChangedKind(oldSchema, newSchema), findFieldsThatChangedTypeOnObjectOrInterfaceTypes(oldSchema, newSchema), findFieldsThatChangedTypeOnInputObjectTypes(oldSchema, newSchema).breakingChanges, findTypesRemovedFromUnions(oldSchema, newSchema), findValuesRemovedFromEnums(oldSchema, newSchema), findArgChanges(oldSchema, newSchema).breakingChanges, findInterfacesRemovedFromObjectTypes(oldSchema, newSchema), findRemovedDirectives(oldSchema, newSchema), findRemovedDirectiveArgs(oldSchema, newSchema), findAddedNonNullDirectiveArgs(oldSchema, newSchema), findRemovedDirectiveLocations(oldSchema, newSchema));\n}", "title": "" }, { "docid": "688375db4e13d0cc48d9ef4836ded77d", "score": "0.6753742", "text": "function findBreakingChanges(oldSchema, newSchema) {\n return [].concat(findRemovedTypes(oldSchema, newSchema), findTypesThatChangedKind(oldSchema, newSchema), findFieldsThatChangedType(oldSchema, newSchema), findTypesRemovedFromUnions(oldSchema, newSchema), findValuesRemovedFromEnums(oldSchema, newSchema), findArgChanges(oldSchema, newSchema).breakingChanges, findInterfacesRemovedFromObjectTypes(oldSchema, newSchema));\n}", "title": "" }, { "docid": "d104cb533fda1cf2e54ac06741a69377", "score": "0.6609639", "text": "function findFieldsThatChangedType(oldSchema, newSchema) {\n\t return [].concat(findFieldsThatChangedTypeOnObjectOrInterfaceTypes(oldSchema, newSchema), findFieldsThatChangedTypeOnInputObjectTypes(oldSchema, newSchema));\n\t}", "title": "" }, { "docid": "b1fe483880f797eb9ccd38c875bac663", "score": "0.65867215", "text": "function findArgChanges(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n\n var breakingChanges = [];\n var dangerousChanges = [];\n\n Object.keys(oldTypeMap).forEach(function (typeName) {\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n if (!((0, _definition.isObjectType)(oldType) || (0, _definition.isInterfaceType)(oldType)) || !((0, _definition.isObjectType)(newType) || (0, _definition.isInterfaceType)(newType)) || newType.constructor !== oldType.constructor) {\n return;\n }\n\n var oldTypeFields = oldType.getFields();\n var newTypeFields = newType.getFields();\n\n Object.keys(oldTypeFields).forEach(function (fieldName) {\n if (!newTypeFields[fieldName]) {\n return;\n }\n\n oldTypeFields[fieldName].args.forEach(function (oldArgDef) {\n var newArgs = newTypeFields[fieldName].args;\n var newArgDef = newArgs.find(function (arg) {\n return arg.name === oldArgDef.name;\n });\n\n // Arg not present\n if (!newArgDef) {\n breakingChanges.push({\n type: BreakingChangeType.ARG_REMOVED,\n description: oldType.name + '.' + fieldName + ' arg ' + (oldArgDef.name + ' was removed')\n });\n } else {\n var isSafe = isChangeSafeForInputObjectFieldOrFieldArg(oldArgDef.type, newArgDef.type);\n if (!isSafe) {\n breakingChanges.push({\n type: BreakingChangeType.ARG_CHANGED_KIND,\n description: oldType.name + '.' + fieldName + ' arg ' + (oldArgDef.name + ' has changed type from ') + (oldArgDef.type.toString() + ' to ' + newArgDef.type.toString())\n });\n } else if (oldArgDef.defaultValue !== undefined && oldArgDef.defaultValue !== newArgDef.defaultValue) {\n dangerousChanges.push({\n type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,\n description: oldType.name + '.' + fieldName + ' arg ' + (oldArgDef.name + ' has changed defaultValue')\n });\n }\n }\n });\n // Check if a non-null arg was added to the field\n newTypeFields[fieldName].args.forEach(function (newArgDef) {\n var oldArgs = oldTypeFields[fieldName].args;\n var oldArgDef = oldArgs.find(function (arg) {\n return arg.name === newArgDef.name;\n });\n if (!oldArgDef) {\n if ((0, _definition.isNonNullType)(newArgDef.type)) {\n breakingChanges.push({\n type: BreakingChangeType.NON_NULL_ARG_ADDED,\n description: 'A non-null arg ' + newArgDef.name + ' on ' + (newType.name + '.' + fieldName + ' was added')\n });\n } else {\n dangerousChanges.push({\n type: DangerousChangeType.NULLABLE_ARG_ADDED,\n description: 'A nullable arg ' + newArgDef.name + ' on ' + (newType.name + '.' + fieldName + ' was added')\n });\n }\n }\n });\n });\n });\n\n return {\n breakingChanges: breakingChanges,\n dangerousChanges: dangerousChanges\n };\n}", "title": "" }, { "docid": "2228026aa183393ab5e2fd38d652e6ea", "score": "0.65736145", "text": "function findBreakingChanges(oldSchema, newSchema) {\n return findRemovedTypes(oldSchema, newSchema).concat(findTypesThatChangedKind(oldSchema, newSchema), findFieldsThatChangedTypeOnObjectOrInterfaceTypes(oldSchema, newSchema), findFieldsThatChangedTypeOnInputObjectTypes(oldSchema, newSchema).breakingChanges, findTypesRemovedFromUnions(oldSchema, newSchema), findValuesRemovedFromEnums(oldSchema, newSchema), findArgChanges(oldSchema, newSchema).breakingChanges, findInterfacesRemovedFromObjectTypes(oldSchema, newSchema), findRemovedDirectives(oldSchema, newSchema), findRemovedDirectiveArgs(oldSchema, newSchema), findAddedNonNullDirectiveArgs(oldSchema, newSchema), findRemovedDirectiveLocations(oldSchema, newSchema));\n}", "title": "" }, { "docid": "2228026aa183393ab5e2fd38d652e6ea", "score": "0.65736145", "text": "function findBreakingChanges(oldSchema, newSchema) {\n return findRemovedTypes(oldSchema, newSchema).concat(findTypesThatChangedKind(oldSchema, newSchema), findFieldsThatChangedTypeOnObjectOrInterfaceTypes(oldSchema, newSchema), findFieldsThatChangedTypeOnInputObjectTypes(oldSchema, newSchema).breakingChanges, findTypesRemovedFromUnions(oldSchema, newSchema), findValuesRemovedFromEnums(oldSchema, newSchema), findArgChanges(oldSchema, newSchema).breakingChanges, findInterfacesRemovedFromObjectTypes(oldSchema, newSchema), findRemovedDirectives(oldSchema, newSchema), findRemovedDirectiveArgs(oldSchema, newSchema), findAddedNonNullDirectiveArgs(oldSchema, newSchema), findRemovedDirectiveLocations(oldSchema, newSchema));\n}", "title": "" }, { "docid": "f50e92cede43c1b87f3beb7ff245d1fe", "score": "0.6543484", "text": "function findArgChanges(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var breakingChanges = [];\n var dangerousChanges = [];\n\n var _arr3 = Object.keys(oldTypeMap);\n\n for (var _i3 = 0; _i3 < _arr3.length; _i3++) {\n var typeName = _arr3[_i3];\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (!(Object(__WEBPACK_IMPORTED_MODULE_0__type_definition__[\"x\" /* isObjectType */])(oldType) || Object(__WEBPACK_IMPORTED_MODULE_0__type_definition__[\"s\" /* isInterfaceType */])(oldType)) || !(Object(__WEBPACK_IMPORTED_MODULE_0__type_definition__[\"x\" /* isObjectType */])(newType) || Object(__WEBPACK_IMPORTED_MODULE_0__type_definition__[\"s\" /* isInterfaceType */])(newType)) || newType.constructor !== oldType.constructor) {\n continue;\n }\n\n var oldTypeFields = oldType.getFields();\n var newTypeFields = newType.getFields();\n\n var _arr4 = Object.keys(oldTypeFields);\n\n for (var _i4 = 0; _i4 < _arr4.length; _i4++) {\n var fieldName = _arr4[_i4];\n\n if (!newTypeFields[fieldName]) {\n continue;\n }\n\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n var _loop = function _loop() {\n var oldArgDef = _step.value;\n var newArgs = newTypeFields[fieldName].args;\n var newArgDef = newArgs.find(function (arg) {\n return arg.name === oldArgDef.name;\n }); // Arg not present\n\n if (!newArgDef) {\n breakingChanges.push({\n type: BreakingChangeType.ARG_REMOVED,\n description: \"\".concat(oldType.name, \".\").concat(fieldName, \" arg \") + \"\".concat(oldArgDef.name, \" was removed\")\n });\n } else {\n var isSafe = isChangeSafeForInputObjectFieldOrFieldArg(oldArgDef.type, newArgDef.type);\n\n if (!isSafe) {\n breakingChanges.push({\n type: BreakingChangeType.ARG_CHANGED_KIND,\n description: \"\".concat(oldType.name, \".\").concat(fieldName, \" arg \") + \"\".concat(oldArgDef.name, \" has changed type from \") + \"\".concat(oldArgDef.type.toString(), \" to \").concat(newArgDef.type.toString())\n });\n } else if (oldArgDef.defaultValue !== undefined && oldArgDef.defaultValue !== newArgDef.defaultValue) {\n dangerousChanges.push({\n type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,\n description: \"\".concat(oldType.name, \".\").concat(fieldName, \" arg \") + \"\".concat(oldArgDef.name, \" has changed defaultValue\")\n });\n }\n }\n };\n\n for (var _iterator = oldTypeFields[fieldName].args[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n _loop();\n } // Check if arg was added to the field\n\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n var _loop2 = function _loop2() {\n var newArgDef = _step2.value;\n var oldArgs = oldTypeFields[fieldName].args;\n var oldArgDef = oldArgs.find(function (arg) {\n return arg.name === newArgDef.name;\n });\n\n if (!oldArgDef) {\n var argName = newArgDef.name;\n\n if (Object(__WEBPACK_IMPORTED_MODULE_0__type_definition__[\"z\" /* isRequiredArgument */])(newArgDef)) {\n breakingChanges.push({\n type: BreakingChangeType.REQUIRED_ARG_ADDED,\n description: \"A required arg \".concat(argName, \" on \") + \"\".concat(typeName, \".\").concat(fieldName, \" was added\")\n });\n } else {\n dangerousChanges.push({\n type: DangerousChangeType.OPTIONAL_ARG_ADDED,\n description: \"An optional arg \".concat(argName, \" on \") + \"\".concat(typeName, \".\").concat(fieldName, \" was added\")\n });\n }\n }\n };\n\n for (var _iterator2 = newTypeFields[fieldName].args[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n _loop2();\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return != null) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n }\n }\n\n return {\n breakingChanges: breakingChanges,\n dangerousChanges: dangerousChanges\n };\n}", "title": "" }, { "docid": "6b9f192d8e1108b084acaf3c86333483", "score": "0.65403587", "text": "function findArgChanges(oldSchema, newSchema) {\n\t var oldTypeMap = oldSchema.getTypeMap();\n\t var newTypeMap = newSchema.getTypeMap();\n\n\t var breakingChanges = [];\n\t var dangerousChanges = [];\n\n\t Object.keys(oldTypeMap).forEach(function (typeName) {\n\t var oldType = oldTypeMap[typeName];\n\t var newType = newTypeMap[typeName];\n\t if (!(isObjectType(oldType) || isInterfaceType(oldType)) || !(isObjectType(newType) || isInterfaceType(newType)) || newType.constructor !== oldType.constructor) {\n\t return;\n\t }\n\n\t var oldTypeFields = oldType.getFields();\n\t var newTypeFields = newType.getFields();\n\n\t Object.keys(oldTypeFields).forEach(function (fieldName) {\n\t if (!newTypeFields[fieldName]) {\n\t return;\n\t }\n\n\t oldTypeFields[fieldName].args.forEach(function (oldArgDef) {\n\t var newArgs = newTypeFields[fieldName].args;\n\t var newArgDef = newArgs.find(function (arg) {\n\t return arg.name === oldArgDef.name;\n\t });\n\n\t // Arg not present\n\t if (!newArgDef) {\n\t breakingChanges.push({\n\t type: BreakingChangeType.ARG_REMOVED,\n\t description: oldType.name + '.' + fieldName + ' arg ' + (oldArgDef.name + ' was removed')\n\t });\n\t } else {\n\t var isSafe = isChangeSafeForInputObjectFieldOrFieldArg(oldArgDef.type, newArgDef.type);\n\t if (!isSafe) {\n\t breakingChanges.push({\n\t type: BreakingChangeType.ARG_CHANGED_KIND,\n\t description: oldType.name + '.' + fieldName + ' arg ' + (oldArgDef.name + ' has changed type from ') + (oldArgDef.type.toString() + ' to ' + newArgDef.type.toString())\n\t });\n\t } else if (oldArgDef.defaultValue !== undefined && oldArgDef.defaultValue !== newArgDef.defaultValue) {\n\t dangerousChanges.push({\n\t type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,\n\t description: oldType.name + '.' + fieldName + ' arg ' + (oldArgDef.name + ' has changed defaultValue')\n\t });\n\t }\n\t }\n\t });\n\t // Check if a non-null arg was added to the field\n\t newTypeFields[fieldName].args.forEach(function (newArgDef) {\n\t var oldArgs = oldTypeFields[fieldName].args;\n\t var oldArgDef = oldArgs.find(function (arg) {\n\t return arg.name === newArgDef.name;\n\t });\n\t if (!oldArgDef) {\n\t if (isNonNullType(newArgDef.type)) {\n\t breakingChanges.push({\n\t type: BreakingChangeType.NON_NULL_ARG_ADDED,\n\t description: 'A non-null arg ' + newArgDef.name + ' on ' + (newType.name + '.' + fieldName + ' was added')\n\t });\n\t } else {\n\t dangerousChanges.push({\n\t type: DangerousChangeType.NULLABLE_ARG_ADDED,\n\t description: 'A nullable arg ' + newArgDef.name + ' on ' + (newType.name + '.' + fieldName + ' was added')\n\t });\n\t }\n\t }\n\t });\n\t });\n\t });\n\n\t return {\n\t breakingChanges: breakingChanges,\n\t dangerousChanges: dangerousChanges\n\t };\n\t}", "title": "" }, { "docid": "8a0beeecb9aefade3ce3af84b04d549e", "score": "0.65403384", "text": "function findArgChanges(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var breakingChanges = [];\n var dangerousChanges = [];\n\n for (var _i3 = 0, _Object$keys3 = Object.keys(oldTypeMap); _i3 < _Object$keys3.length; _i3++) {\n var typeName = _Object$keys3[_i3];\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (!(Object(_type_definition__WEBPACK_IMPORTED_MODULE_2__[/* isObjectType */ \"N\"])(oldType) || Object(_type_definition__WEBPACK_IMPORTED_MODULE_2__[/* isInterfaceType */ \"H\"])(oldType)) || !(Object(_type_definition__WEBPACK_IMPORTED_MODULE_2__[/* isObjectType */ \"N\"])(newType) || Object(_type_definition__WEBPACK_IMPORTED_MODULE_2__[/* isInterfaceType */ \"H\"])(newType)) || newType.constructor !== oldType.constructor) {\n continue;\n }\n\n var oldTypeFields = oldType.getFields();\n var newTypeFields = newType.getFields();\n\n for (var _i4 = 0, _Object$keys4 = Object.keys(oldTypeFields); _i4 < _Object$keys4.length; _i4++) {\n var fieldName = _Object$keys4[_i4];\n\n if (!newTypeFields[fieldName]) {\n continue;\n }\n\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n var _loop = function _loop() {\n var oldArgDef = _step.value;\n var newArgs = newTypeFields[fieldName].args;\n var newArgDef = Object(_polyfills_find__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(newArgs, function (arg) {\n return arg.name === oldArgDef.name;\n }); // Arg not present\n\n if (!newArgDef) {\n breakingChanges.push({\n type: BreakingChangeType.ARG_REMOVED,\n description: \"\".concat(oldType.name, \".\").concat(fieldName, \" arg \") + \"\".concat(oldArgDef.name, \" was removed\")\n });\n } else {\n var isSafe = isChangeSafeForInputObjectFieldOrFieldArg(oldArgDef.type, newArgDef.type);\n\n if (!isSafe) {\n breakingChanges.push({\n type: BreakingChangeType.ARG_CHANGED_KIND,\n description: \"\".concat(oldType.name, \".\").concat(fieldName, \" arg \") + \"\".concat(oldArgDef.name, \" has changed type from \") + \"\".concat(oldArgDef.type.toString(), \" to \").concat(newArgDef.type.toString())\n });\n } else if (oldArgDef.defaultValue !== undefined && oldArgDef.defaultValue !== newArgDef.defaultValue) {\n dangerousChanges.push({\n type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,\n description: \"\".concat(oldType.name, \".\").concat(fieldName, \" arg \") + \"\".concat(oldArgDef.name, \" has changed defaultValue\")\n });\n }\n }\n };\n\n for (var _iterator = oldTypeFields[fieldName].args[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n _loop();\n } // Check if arg was added to the field\n\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n var _loop2 = function _loop2() {\n var newArgDef = _step2.value;\n var oldArgs = oldTypeFields[fieldName].args;\n var oldArgDef = Object(_polyfills_find__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(oldArgs, function (arg) {\n return arg.name === newArgDef.name;\n });\n\n if (!oldArgDef) {\n var argName = newArgDef.name;\n\n if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_2__[/* isRequiredArgument */ \"P\"])(newArgDef)) {\n breakingChanges.push({\n type: BreakingChangeType.REQUIRED_ARG_ADDED,\n description: \"A required arg \".concat(argName, \" on \") + \"\".concat(typeName, \".\").concat(fieldName, \" was added\")\n });\n } else {\n dangerousChanges.push({\n type: DangerousChangeType.OPTIONAL_ARG_ADDED,\n description: \"An optional arg \".concat(argName, \" on \") + \"\".concat(typeName, \".\").concat(fieldName, \" was added\")\n });\n }\n }\n };\n\n for (var _iterator2 = newTypeFields[fieldName].args[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n _loop2();\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return != null) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n }\n }\n\n return {\n breakingChanges: breakingChanges,\n dangerousChanges: dangerousChanges\n };\n}", "title": "" }, { "docid": "c092807d2180d641f8ef317159e2ae72", "score": "0.6490284", "text": "function findArgChanges(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var breakingChanges = [];\n var dangerousChanges = [];\n\n var _arr3 = Object.keys(oldTypeMap);\n\n for (var _i3 = 0; _i3 < _arr3.length; _i3++) {\n var typeName = _arr3[_i3];\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (!((0, _definition.isObjectType)(oldType) || (0, _definition.isInterfaceType)(oldType)) || !((0, _definition.isObjectType)(newType) || (0, _definition.isInterfaceType)(newType)) || newType.constructor !== oldType.constructor) {\n continue;\n }\n\n var oldTypeFields = oldType.getFields();\n var newTypeFields = newType.getFields();\n\n var _arr4 = Object.keys(oldTypeFields);\n\n for (var _i4 = 0; _i4 < _arr4.length; _i4++) {\n var fieldName = _arr4[_i4];\n\n if (!newTypeFields[fieldName]) {\n continue;\n }\n\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n var _loop = function _loop() {\n var oldArgDef = _step.value;\n var newArgs = newTypeFields[fieldName].args;\n var newArgDef = newArgs.find(function (arg) {\n return arg.name === oldArgDef.name;\n }); // Arg not present\n\n if (!newArgDef) {\n breakingChanges.push({\n type: BreakingChangeType.ARG_REMOVED,\n description: \"\".concat(oldType.name, \".\").concat(fieldName, \" arg \") + \"\".concat(oldArgDef.name, \" was removed\")\n });\n } else {\n var isSafe = isChangeSafeForInputObjectFieldOrFieldArg(oldArgDef.type, newArgDef.type);\n\n if (!isSafe) {\n breakingChanges.push({\n type: BreakingChangeType.ARG_CHANGED_KIND,\n description: \"\".concat(oldType.name, \".\").concat(fieldName, \" arg \") + \"\".concat(oldArgDef.name, \" has changed type from \") + \"\".concat(oldArgDef.type.toString(), \" to \").concat(newArgDef.type.toString())\n });\n } else if (oldArgDef.defaultValue !== undefined && oldArgDef.defaultValue !== newArgDef.defaultValue) {\n dangerousChanges.push({\n type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,\n description: \"\".concat(oldType.name, \".\").concat(fieldName, \" arg \") + \"\".concat(oldArgDef.name, \" has changed defaultValue\")\n });\n }\n }\n };\n\n for (var _iterator = oldTypeFields[fieldName].args[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n _loop();\n } // Check if arg was added to the field\n\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n var _loop2 = function _loop2() {\n var newArgDef = _step2.value;\n var oldArgs = oldTypeFields[fieldName].args;\n var oldArgDef = oldArgs.find(function (arg) {\n return arg.name === newArgDef.name;\n });\n\n if (!oldArgDef) {\n var argName = newArgDef.name;\n\n if ((0, _definition.isRequiredArgument)(newArgDef)) {\n breakingChanges.push({\n type: BreakingChangeType.REQUIRED_ARG_ADDED,\n description: \"A required arg \".concat(argName, \" on \") + \"\".concat(typeName, \".\").concat(fieldName, \" was added\")\n });\n } else {\n dangerousChanges.push({\n type: DangerousChangeType.OPTIONAL_ARG_ADDED,\n description: \"An optional arg \".concat(argName, \" on \") + \"\".concat(typeName, \".\").concat(fieldName, \" was added\")\n });\n }\n }\n };\n\n for (var _iterator2 = newTypeFields[fieldName].args[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n _loop2();\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return != null) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n }\n }\n\n return {\n breakingChanges: breakingChanges,\n dangerousChanges: dangerousChanges\n };\n}", "title": "" }, { "docid": "c092807d2180d641f8ef317159e2ae72", "score": "0.6490284", "text": "function findArgChanges(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var breakingChanges = [];\n var dangerousChanges = [];\n\n var _arr3 = Object.keys(oldTypeMap);\n\n for (var _i3 = 0; _i3 < _arr3.length; _i3++) {\n var typeName = _arr3[_i3];\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (!((0, _definition.isObjectType)(oldType) || (0, _definition.isInterfaceType)(oldType)) || !((0, _definition.isObjectType)(newType) || (0, _definition.isInterfaceType)(newType)) || newType.constructor !== oldType.constructor) {\n continue;\n }\n\n var oldTypeFields = oldType.getFields();\n var newTypeFields = newType.getFields();\n\n var _arr4 = Object.keys(oldTypeFields);\n\n for (var _i4 = 0; _i4 < _arr4.length; _i4++) {\n var fieldName = _arr4[_i4];\n\n if (!newTypeFields[fieldName]) {\n continue;\n }\n\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n var _loop = function _loop() {\n var oldArgDef = _step.value;\n var newArgs = newTypeFields[fieldName].args;\n var newArgDef = newArgs.find(function (arg) {\n return arg.name === oldArgDef.name;\n }); // Arg not present\n\n if (!newArgDef) {\n breakingChanges.push({\n type: BreakingChangeType.ARG_REMOVED,\n description: \"\".concat(oldType.name, \".\").concat(fieldName, \" arg \") + \"\".concat(oldArgDef.name, \" was removed\")\n });\n } else {\n var isSafe = isChangeSafeForInputObjectFieldOrFieldArg(oldArgDef.type, newArgDef.type);\n\n if (!isSafe) {\n breakingChanges.push({\n type: BreakingChangeType.ARG_CHANGED_KIND,\n description: \"\".concat(oldType.name, \".\").concat(fieldName, \" arg \") + \"\".concat(oldArgDef.name, \" has changed type from \") + \"\".concat(oldArgDef.type.toString(), \" to \").concat(newArgDef.type.toString())\n });\n } else if (oldArgDef.defaultValue !== undefined && oldArgDef.defaultValue !== newArgDef.defaultValue) {\n dangerousChanges.push({\n type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,\n description: \"\".concat(oldType.name, \".\").concat(fieldName, \" arg \") + \"\".concat(oldArgDef.name, \" has changed defaultValue\")\n });\n }\n }\n };\n\n for (var _iterator = oldTypeFields[fieldName].args[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n _loop();\n } // Check if arg was added to the field\n\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n var _loop2 = function _loop2() {\n var newArgDef = _step2.value;\n var oldArgs = oldTypeFields[fieldName].args;\n var oldArgDef = oldArgs.find(function (arg) {\n return arg.name === newArgDef.name;\n });\n\n if (!oldArgDef) {\n var argName = newArgDef.name;\n\n if ((0, _definition.isRequiredArgument)(newArgDef)) {\n breakingChanges.push({\n type: BreakingChangeType.REQUIRED_ARG_ADDED,\n description: \"A required arg \".concat(argName, \" on \") + \"\".concat(typeName, \".\").concat(fieldName, \" was added\")\n });\n } else {\n dangerousChanges.push({\n type: DangerousChangeType.OPTIONAL_ARG_ADDED,\n description: \"An optional arg \".concat(argName, \" on \") + \"\".concat(typeName, \".\").concat(fieldName, \" was added\")\n });\n }\n }\n };\n\n for (var _iterator2 = newTypeFields[fieldName].args[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n _loop2();\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return != null) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n }\n }\n\n return {\n breakingChanges: breakingChanges,\n dangerousChanges: dangerousChanges\n };\n}", "title": "" }, { "docid": "ab52af4513a1b25fa31c801fbb3c6fd1", "score": "0.64679515", "text": "function findFieldsThatChangedType(oldSchema, newSchema) {\n return [].concat(findFieldsThatChangedTypeOnObjectOrInterfaceTypes(oldSchema, newSchema), findFieldsThatChangedTypeOnInputObjectTypes(oldSchema, newSchema));\n}", "title": "" }, { "docid": "08bb9b2e775007f8ecab7b3b17483a12", "score": "0.6461436", "text": "function findArgChanges(oldSchema, newSchema) {\n\t var oldTypeMap = oldSchema.getTypeMap();\n\t var newTypeMap = newSchema.getTypeMap();\n\n\t var breakingChanges = [];\n\t var dangerousChanges = [];\n\n\t Object.keys(oldTypeMap).forEach(function (typeName) {\n\t var oldType = oldTypeMap[typeName];\n\t var newType = newTypeMap[typeName];\n\t if (!(oldType instanceof _definition.GraphQLObjectType || oldType instanceof _definition.GraphQLInterfaceType) || !(newType instanceof oldType.constructor)) {\n\t return;\n\t }\n\n\t var oldTypeFields = oldType.getFields();\n\t var newTypeFields = newType.getFields();\n\n\t Object.keys(oldTypeFields).forEach(function (fieldName) {\n\t if (!newTypeFields[fieldName]) {\n\t return;\n\t }\n\n\t oldTypeFields[fieldName].args.forEach(function (oldArgDef) {\n\t var newArgs = newTypeFields[fieldName].args;\n\t var newArgDef = newArgs.find(function (arg) {\n\t return arg.name === oldArgDef.name;\n\t });\n\n\t // Arg not present\n\t if (!newArgDef) {\n\t breakingChanges.push({\n\t type: BreakingChangeType.ARG_REMOVED,\n\t description: oldType.name + '.' + fieldName + ' arg ' + (oldArgDef.name + ' was removed')\n\t });\n\t } else {\n\t var isSafe = isChangeSafeForInputObjectFieldOrFieldArg(oldArgDef.type, newArgDef.type);\n\t if (!isSafe) {\n\t breakingChanges.push({\n\t type: BreakingChangeType.ARG_CHANGED_KIND,\n\t description: oldType.name + '.' + fieldName + ' arg ' + (oldArgDef.name + ' has changed type from ') + (oldArgDef.type.toString() + ' to ' + newArgDef.type.toString())\n\t });\n\t } else if (oldArgDef.defaultValue !== undefined && oldArgDef.defaultValue !== newArgDef.defaultValue) {\n\t dangerousChanges.push({\n\t type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,\n\t description: oldType.name + '.' + fieldName + ' arg ' + (oldArgDef.name + ' has changed defaultValue')\n\t });\n\t }\n\t }\n\t });\n\t // Check if a non-null arg was added to the field\n\t newTypeFields[fieldName].args.forEach(function (newArgDef) {\n\t var oldArgs = oldTypeFields[fieldName].args;\n\t var oldArgDef = oldArgs.find(function (arg) {\n\t return arg.name === newArgDef.name;\n\t });\n\t if (!oldArgDef && newArgDef.type instanceof _definition.GraphQLNonNull) {\n\t breakingChanges.push({\n\t type: BreakingChangeType.NON_NULL_ARG_ADDED,\n\t description: 'A non-null arg ' + newArgDef.name + ' on ' + (newType.name + '.' + fieldName + ' was added')\n\t });\n\t }\n\t });\n\t });\n\t });\n\n\t return {\n\t breakingChanges: breakingChanges,\n\t dangerousChanges: dangerousChanges\n\t };\n\t}", "title": "" }, { "docid": "816fc4b6d56f27dd6bb24f9cc3cab8a4", "score": "0.6405155", "text": "function findArgChanges(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n\n var breakingChanges = [];\n var dangerousChanges = [];\n\n Object.keys(oldTypeMap).forEach(function (typeName) {\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n if (!(oldType instanceof _definition.GraphQLObjectType || oldType instanceof _definition.GraphQLInterfaceType) || !(newType instanceof oldType.constructor)) {\n return;\n }\n\n var oldTypeFields = oldType.getFields();\n var newTypeFields = newType.getFields();\n\n Object.keys(oldTypeFields).forEach(function (fieldName) {\n if (!newTypeFields[fieldName]) {\n return;\n }\n\n oldTypeFields[fieldName].args.forEach(function (oldArgDef) {\n var newArgs = newTypeFields[fieldName].args;\n var newArgDef = newArgs.find(function (arg) {\n return arg.name === oldArgDef.name;\n });\n\n // Arg not present\n if (!newArgDef) {\n breakingChanges.push({\n type: BreakingChangeType.ARG_REMOVED,\n description: oldType.name + '.' + fieldName + ' arg ' + (oldArgDef.name + ' was removed')\n });\n } else {\n var isSafe = isChangeSafeForInputObjectFieldOrFieldArg(oldArgDef.type, newArgDef.type);\n if (!isSafe) {\n breakingChanges.push({\n type: BreakingChangeType.ARG_CHANGED_KIND,\n description: oldType.name + '.' + fieldName + ' arg ' + (oldArgDef.name + ' has changed type from ') + (oldArgDef.type.toString() + ' to ' + newArgDef.type.toString())\n });\n } else if (oldArgDef.defaultValue !== undefined && oldArgDef.defaultValue !== newArgDef.defaultValue) {\n dangerousChanges.push({\n type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,\n description: oldType.name + '.' + fieldName + ' arg ' + (oldArgDef.name + ' has changed defaultValue')\n });\n }\n }\n });\n // Check if a non-null arg was added to the field\n newTypeFields[fieldName].args.forEach(function (newArgDef) {\n var oldArgs = oldTypeFields[fieldName].args;\n var oldArgDef = oldArgs.find(function (arg) {\n return arg.name === newArgDef.name;\n });\n if (!oldArgDef && newArgDef.type instanceof _definition.GraphQLNonNull) {\n breakingChanges.push({\n type: BreakingChangeType.NON_NULL_ARG_ADDED,\n description: 'A non-null arg ' + newArgDef.name + ' on ' + (newType.name + '.' + fieldName + ' was added')\n });\n }\n });\n });\n });\n\n return {\n breakingChanges: breakingChanges,\n dangerousChanges: dangerousChanges\n };\n}", "title": "" }, { "docid": "08578c5161c98f9e79233b59e477767b", "score": "0.6162844", "text": "function findBreakingChanges(oldSchema, newSchema) {\n var breakingChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) {\n return change.type in BreakingChangeType;\n });\n return breakingChanges;\n}", "title": "" }, { "docid": "08578c5161c98f9e79233b59e477767b", "score": "0.6162844", "text": "function findBreakingChanges(oldSchema, newSchema) {\n var breakingChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) {\n return change.type in BreakingChangeType;\n });\n return breakingChanges;\n}", "title": "" }, { "docid": "08578c5161c98f9e79233b59e477767b", "score": "0.6162844", "text": "function findBreakingChanges(oldSchema, newSchema) {\n var breakingChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) {\n return change.type in BreakingChangeType;\n });\n return breakingChanges;\n}", "title": "" }, { "docid": "08578c5161c98f9e79233b59e477767b", "score": "0.6162844", "text": "function findBreakingChanges(oldSchema, newSchema) {\n var breakingChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) {\n return change.type in BreakingChangeType;\n });\n return breakingChanges;\n}", "title": "" }, { "docid": "08578c5161c98f9e79233b59e477767b", "score": "0.6162844", "text": "function findBreakingChanges(oldSchema, newSchema) {\n var breakingChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) {\n return change.type in BreakingChangeType;\n });\n return breakingChanges;\n}", "title": "" }, { "docid": "08578c5161c98f9e79233b59e477767b", "score": "0.6162844", "text": "function findBreakingChanges(oldSchema, newSchema) {\n var breakingChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) {\n return change.type in BreakingChangeType;\n });\n return breakingChanges;\n}", "title": "" }, { "docid": "6cbd2a4537135165675e2cb3214842e8", "score": "0.6154108", "text": "function findBreakingChanges(oldSchema, newSchema) {\n var breakingChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) {\n return change.type in BreakingChangeType;\n });\n return breakingChanges;\n }", "title": "" }, { "docid": "4b4636aa578bba9ec921e62084658fff", "score": "0.6151411", "text": "function findBreakingChanges(oldSchema, newSchema) {\n var breakingChanges = findSchemaChanges(oldSchema, newSchema).filter(function (change) {\n return change.type in BreakingChangeType;\n });\n return breakingChanges;\n }", "title": "" }, { "docid": "b6e163e799b560f1688ff34daadc47a0", "score": "0.61445975", "text": "function findTypesAddedToUnions(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var typesAddedToUnion = [];\n\n var _arr11 = Object.keys(newTypeMap);\n\n for (var _i11 = 0; _i11 < _arr11.length; _i11++) {\n var typeName = _arr11[_i11];\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__type_definition__[\"D\" /* isUnionType */])(oldType) || !Object(__WEBPACK_IMPORTED_MODULE_0__type_definition__[\"D\" /* isUnionType */])(newType)) {\n continue;\n }\n\n var typeNamesInOldUnion = Object.create(null);\n var _iteratorNormalCompletion5 = true;\n var _didIteratorError5 = false;\n var _iteratorError5 = undefined;\n\n try {\n for (var _iterator5 = oldType.getTypes()[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {\n var type = _step5.value;\n typeNamesInOldUnion[type.name] = true;\n }\n } catch (err) {\n _didIteratorError5 = true;\n _iteratorError5 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion5 && _iterator5.return != null) {\n _iterator5.return();\n }\n } finally {\n if (_didIteratorError5) {\n throw _iteratorError5;\n }\n }\n }\n\n var _iteratorNormalCompletion6 = true;\n var _didIteratorError6 = false;\n var _iteratorError6 = undefined;\n\n try {\n for (var _iterator6 = newType.getTypes()[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) {\n var _type2 = _step6.value;\n\n if (!typeNamesInOldUnion[_type2.name]) {\n typesAddedToUnion.push({\n type: DangerousChangeType.TYPE_ADDED_TO_UNION,\n description: \"\".concat(_type2.name, \" was added to union type \").concat(typeName, \".\")\n });\n }\n }\n } catch (err) {\n _didIteratorError6 = true;\n _iteratorError6 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion6 && _iterator6.return != null) {\n _iterator6.return();\n }\n } finally {\n if (_didIteratorError6) {\n throw _iteratorError6;\n }\n }\n }\n }\n\n return typesAddedToUnion;\n}", "title": "" }, { "docid": "b6e407a724721bd6d6c3749d8f639f5c", "score": "0.6139031", "text": "function findTypesRemovedFromUnions(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var typesRemovedFromUnion = [];\n\n var _arr10 = Object.keys(oldTypeMap);\n\n for (var _i10 = 0; _i10 < _arr10.length; _i10++) {\n var typeName = _arr10[_i10];\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__type_definition__[\"D\" /* isUnionType */])(oldType) || !Object(__WEBPACK_IMPORTED_MODULE_0__type_definition__[\"D\" /* isUnionType */])(newType)) {\n continue;\n }\n\n var typeNamesInNewUnion = Object.create(null);\n var _iteratorNormalCompletion3 = true;\n var _didIteratorError3 = false;\n var _iteratorError3 = undefined;\n\n try {\n for (var _iterator3 = newType.getTypes()[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n var type = _step3.value;\n typeNamesInNewUnion[type.name] = true;\n }\n } catch (err) {\n _didIteratorError3 = true;\n _iteratorError3 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion3 && _iterator3.return != null) {\n _iterator3.return();\n }\n } finally {\n if (_didIteratorError3) {\n throw _iteratorError3;\n }\n }\n }\n\n var _iteratorNormalCompletion4 = true;\n var _didIteratorError4 = false;\n var _iteratorError4 = undefined;\n\n try {\n for (var _iterator4 = oldType.getTypes()[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {\n var _type = _step4.value;\n\n if (!typeNamesInNewUnion[_type.name]) {\n typesRemovedFromUnion.push({\n type: BreakingChangeType.TYPE_REMOVED_FROM_UNION,\n description: \"\".concat(_type.name, \" was removed from union type \").concat(typeName, \".\")\n });\n }\n }\n } catch (err) {\n _didIteratorError4 = true;\n _iteratorError4 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion4 && _iterator4.return != null) {\n _iterator4.return();\n }\n } finally {\n if (_didIteratorError4) {\n throw _iteratorError4;\n }\n }\n }\n }\n\n return typesRemovedFromUnion;\n}", "title": "" }, { "docid": "5d328eae7adf7cb019d4db293827b0b0", "score": "0.6110695", "text": "function findTypesRemovedFromUnions(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var typesRemovedFromUnion = [];\n\n for (var _i10 = 0, _Object$keys10 = Object.keys(oldTypeMap); _i10 < _Object$keys10.length; _i10++) {\n var typeName = _Object$keys10[_i10];\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (!Object(_type_definition__WEBPACK_IMPORTED_MODULE_2__[/* isUnionType */ \"T\"])(oldType) || !Object(_type_definition__WEBPACK_IMPORTED_MODULE_2__[/* isUnionType */ \"T\"])(newType)) {\n continue;\n }\n\n var typeNamesInNewUnion = Object.create(null);\n var _iteratorNormalCompletion3 = true;\n var _didIteratorError3 = false;\n var _iteratorError3 = undefined;\n\n try {\n for (var _iterator3 = newType.getTypes()[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n var type = _step3.value;\n typeNamesInNewUnion[type.name] = true;\n }\n } catch (err) {\n _didIteratorError3 = true;\n _iteratorError3 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion3 && _iterator3.return != null) {\n _iterator3.return();\n }\n } finally {\n if (_didIteratorError3) {\n throw _iteratorError3;\n }\n }\n }\n\n var _iteratorNormalCompletion4 = true;\n var _didIteratorError4 = false;\n var _iteratorError4 = undefined;\n\n try {\n for (var _iterator4 = oldType.getTypes()[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {\n var _type = _step4.value;\n\n if (!typeNamesInNewUnion[_type.name]) {\n typesRemovedFromUnion.push({\n type: BreakingChangeType.TYPE_REMOVED_FROM_UNION,\n description: \"\".concat(_type.name, \" was removed from union type \").concat(typeName, \".\")\n });\n }\n }\n } catch (err) {\n _didIteratorError4 = true;\n _iteratorError4 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion4 && _iterator4.return != null) {\n _iterator4.return();\n }\n } finally {\n if (_didIteratorError4) {\n throw _iteratorError4;\n }\n }\n }\n }\n\n return typesRemovedFromUnion;\n}", "title": "" }, { "docid": "f64d2bb39c3cbf8e99ed03d5fa5348f7", "score": "0.6058884", "text": "function findTypesRemovedFromUnions(oldSchema, newSchema) {\n\t var oldTypeMap = oldSchema.getTypeMap();\n\t var newTypeMap = newSchema.getTypeMap();\n\n\t var typesRemovedFromUnion = [];\n\t Object.keys(oldTypeMap).forEach(function (typeName) {\n\t var oldType = oldTypeMap[typeName];\n\t var newType = newTypeMap[typeName];\n\t if (!isUnionType(oldType) || !isUnionType(newType)) {\n\t return;\n\t }\n\t var typeNamesInNewUnion = Object.create(null);\n\t newType.getTypes().forEach(function (type) {\n\t typeNamesInNewUnion[type.name] = true;\n\t });\n\t oldType.getTypes().forEach(function (type) {\n\t if (!typeNamesInNewUnion[type.name]) {\n\t typesRemovedFromUnion.push({\n\t type: BreakingChangeType.TYPE_REMOVED_FROM_UNION,\n\t description: type.name + ' was removed from union type ' + typeName + '.'\n\t });\n\t }\n\t });\n\t });\n\t return typesRemovedFromUnion;\n\t}", "title": "" }, { "docid": "35065c27779a66040aeac9b5fa648898", "score": "0.60277385", "text": "function findTypesRemovedFromUnions(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n\n var typesRemovedFromUnion = [];\n Object.keys(oldTypeMap).forEach(function (typeName) {\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n if (!(0, _definition.isUnionType)(oldType) || !(0, _definition.isUnionType)(newType)) {\n return;\n }\n var typeNamesInNewUnion = Object.create(null);\n newType.getTypes().forEach(function (type) {\n typeNamesInNewUnion[type.name] = true;\n });\n oldType.getTypes().forEach(function (type) {\n if (!typeNamesInNewUnion[type.name]) {\n typesRemovedFromUnion.push({\n type: BreakingChangeType.TYPE_REMOVED_FROM_UNION,\n description: type.name + ' was removed from union type ' + typeName + '.'\n });\n }\n });\n });\n return typesRemovedFromUnion;\n}", "title": "" }, { "docid": "55d11865bfe61c6dd1a0fe63ec13ade9", "score": "0.60058194", "text": "function findTypesRemovedFromUnions(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var typesRemovedFromUnion = [];\n\n var _arr10 = Object.keys(oldTypeMap);\n\n for (var _i10 = 0; _i10 < _arr10.length; _i10++) {\n var typeName = _arr10[_i10];\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (!(0, _definition.isUnionType)(oldType) || !(0, _definition.isUnionType)(newType)) {\n continue;\n }\n\n var typeNamesInNewUnion = Object.create(null);\n var _iteratorNormalCompletion3 = true;\n var _didIteratorError3 = false;\n var _iteratorError3 = undefined;\n\n try {\n for (var _iterator3 = newType.getTypes()[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n var type = _step3.value;\n typeNamesInNewUnion[type.name] = true;\n }\n } catch (err) {\n _didIteratorError3 = true;\n _iteratorError3 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion3 && _iterator3.return != null) {\n _iterator3.return();\n }\n } finally {\n if (_didIteratorError3) {\n throw _iteratorError3;\n }\n }\n }\n\n var _iteratorNormalCompletion4 = true;\n var _didIteratorError4 = false;\n var _iteratorError4 = undefined;\n\n try {\n for (var _iterator4 = oldType.getTypes()[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {\n var _type = _step4.value;\n\n if (!typeNamesInNewUnion[_type.name]) {\n typesRemovedFromUnion.push({\n type: BreakingChangeType.TYPE_REMOVED_FROM_UNION,\n description: \"\".concat(_type.name, \" was removed from union type \").concat(typeName, \".\")\n });\n }\n }\n } catch (err) {\n _didIteratorError4 = true;\n _iteratorError4 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion4 && _iterator4.return != null) {\n _iterator4.return();\n }\n } finally {\n if (_didIteratorError4) {\n throw _iteratorError4;\n }\n }\n }\n }\n\n return typesRemovedFromUnion;\n}", "title": "" }, { "docid": "55d11865bfe61c6dd1a0fe63ec13ade9", "score": "0.60058194", "text": "function findTypesRemovedFromUnions(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var typesRemovedFromUnion = [];\n\n var _arr10 = Object.keys(oldTypeMap);\n\n for (var _i10 = 0; _i10 < _arr10.length; _i10++) {\n var typeName = _arr10[_i10];\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (!(0, _definition.isUnionType)(oldType) || !(0, _definition.isUnionType)(newType)) {\n continue;\n }\n\n var typeNamesInNewUnion = Object.create(null);\n var _iteratorNormalCompletion3 = true;\n var _didIteratorError3 = false;\n var _iteratorError3 = undefined;\n\n try {\n for (var _iterator3 = newType.getTypes()[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n var type = _step3.value;\n typeNamesInNewUnion[type.name] = true;\n }\n } catch (err) {\n _didIteratorError3 = true;\n _iteratorError3 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion3 && _iterator3.return != null) {\n _iterator3.return();\n }\n } finally {\n if (_didIteratorError3) {\n throw _iteratorError3;\n }\n }\n }\n\n var _iteratorNormalCompletion4 = true;\n var _didIteratorError4 = false;\n var _iteratorError4 = undefined;\n\n try {\n for (var _iterator4 = oldType.getTypes()[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {\n var _type = _step4.value;\n\n if (!typeNamesInNewUnion[_type.name]) {\n typesRemovedFromUnion.push({\n type: BreakingChangeType.TYPE_REMOVED_FROM_UNION,\n description: \"\".concat(_type.name, \" was removed from union type \").concat(typeName, \".\")\n });\n }\n }\n } catch (err) {\n _didIteratorError4 = true;\n _iteratorError4 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion4 && _iterator4.return != null) {\n _iterator4.return();\n }\n } finally {\n if (_didIteratorError4) {\n throw _iteratorError4;\n }\n }\n }\n }\n\n return typesRemovedFromUnion;\n}", "title": "" }, { "docid": "7c9d0bdb261e961034568b66013588c4", "score": "0.5970373", "text": "function findTypesAddedToUnions(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var typesAddedToUnion = [];\n\n for (var _i11 = 0, _Object$keys11 = Object.keys(newTypeMap); _i11 < _Object$keys11.length; _i11++) {\n var typeName = _Object$keys11[_i11];\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (!Object(_type_definition__WEBPACK_IMPORTED_MODULE_2__[/* isUnionType */ \"T\"])(oldType) || !Object(_type_definition__WEBPACK_IMPORTED_MODULE_2__[/* isUnionType */ \"T\"])(newType)) {\n continue;\n }\n\n var typeNamesInOldUnion = Object.create(null);\n var _iteratorNormalCompletion5 = true;\n var _didIteratorError5 = false;\n var _iteratorError5 = undefined;\n\n try {\n for (var _iterator5 = oldType.getTypes()[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {\n var type = _step5.value;\n typeNamesInOldUnion[type.name] = true;\n }\n } catch (err) {\n _didIteratorError5 = true;\n _iteratorError5 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion5 && _iterator5.return != null) {\n _iterator5.return();\n }\n } finally {\n if (_didIteratorError5) {\n throw _iteratorError5;\n }\n }\n }\n\n var _iteratorNormalCompletion6 = true;\n var _didIteratorError6 = false;\n var _iteratorError6 = undefined;\n\n try {\n for (var _iterator6 = newType.getTypes()[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) {\n var _type2 = _step6.value;\n\n if (!typeNamesInOldUnion[_type2.name]) {\n typesAddedToUnion.push({\n type: DangerousChangeType.TYPE_ADDED_TO_UNION,\n description: \"\".concat(_type2.name, \" was added to union type \").concat(typeName, \".\")\n });\n }\n }\n } catch (err) {\n _didIteratorError6 = true;\n _iteratorError6 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion6 && _iterator6.return != null) {\n _iterator6.return();\n }\n } finally {\n if (_didIteratorError6) {\n throw _iteratorError6;\n }\n }\n }\n }\n\n return typesAddedToUnion;\n}", "title": "" }, { "docid": "cae4dd926f1cafc61889c2bdce5c04b6", "score": "0.595033", "text": "function findTypesAddedToUnions(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var typesAddedToUnion = [];\n\n var _arr11 = Object.keys(newTypeMap);\n\n for (var _i11 = 0; _i11 < _arr11.length; _i11++) {\n var typeName = _arr11[_i11];\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (!(0, _definition.isUnionType)(oldType) || !(0, _definition.isUnionType)(newType)) {\n continue;\n }\n\n var typeNamesInOldUnion = Object.create(null);\n var _iteratorNormalCompletion5 = true;\n var _didIteratorError5 = false;\n var _iteratorError5 = undefined;\n\n try {\n for (var _iterator5 = oldType.getTypes()[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {\n var type = _step5.value;\n typeNamesInOldUnion[type.name] = true;\n }\n } catch (err) {\n _didIteratorError5 = true;\n _iteratorError5 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion5 && _iterator5.return != null) {\n _iterator5.return();\n }\n } finally {\n if (_didIteratorError5) {\n throw _iteratorError5;\n }\n }\n }\n\n var _iteratorNormalCompletion6 = true;\n var _didIteratorError6 = false;\n var _iteratorError6 = undefined;\n\n try {\n for (var _iterator6 = newType.getTypes()[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) {\n var _type2 = _step6.value;\n\n if (!typeNamesInOldUnion[_type2.name]) {\n typesAddedToUnion.push({\n type: DangerousChangeType.TYPE_ADDED_TO_UNION,\n description: \"\".concat(_type2.name, \" was added to union type \").concat(typeName, \".\")\n });\n }\n }\n } catch (err) {\n _didIteratorError6 = true;\n _iteratorError6 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion6 && _iterator6.return != null) {\n _iterator6.return();\n }\n } finally {\n if (_didIteratorError6) {\n throw _iteratorError6;\n }\n }\n }\n }\n\n return typesAddedToUnion;\n}", "title": "" }, { "docid": "cae4dd926f1cafc61889c2bdce5c04b6", "score": "0.595033", "text": "function findTypesAddedToUnions(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var typesAddedToUnion = [];\n\n var _arr11 = Object.keys(newTypeMap);\n\n for (var _i11 = 0; _i11 < _arr11.length; _i11++) {\n var typeName = _arr11[_i11];\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (!(0, _definition.isUnionType)(oldType) || !(0, _definition.isUnionType)(newType)) {\n continue;\n }\n\n var typeNamesInOldUnion = Object.create(null);\n var _iteratorNormalCompletion5 = true;\n var _didIteratorError5 = false;\n var _iteratorError5 = undefined;\n\n try {\n for (var _iterator5 = oldType.getTypes()[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {\n var type = _step5.value;\n typeNamesInOldUnion[type.name] = true;\n }\n } catch (err) {\n _didIteratorError5 = true;\n _iteratorError5 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion5 && _iterator5.return != null) {\n _iterator5.return();\n }\n } finally {\n if (_didIteratorError5) {\n throw _iteratorError5;\n }\n }\n }\n\n var _iteratorNormalCompletion6 = true;\n var _didIteratorError6 = false;\n var _iteratorError6 = undefined;\n\n try {\n for (var _iterator6 = newType.getTypes()[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) {\n var _type2 = _step6.value;\n\n if (!typeNamesInOldUnion[_type2.name]) {\n typesAddedToUnion.push({\n type: DangerousChangeType.TYPE_ADDED_TO_UNION,\n description: \"\".concat(_type2.name, \" was added to union type \").concat(typeName, \".\")\n });\n }\n }\n } catch (err) {\n _didIteratorError6 = true;\n _iteratorError6 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion6 && _iterator6.return != null) {\n _iterator6.return();\n }\n } finally {\n if (_didIteratorError6) {\n throw _iteratorError6;\n }\n }\n }\n }\n\n return typesAddedToUnion;\n}", "title": "" }, { "docid": "8a1aebd2c8cb6d3d4686d8cbdc58b84c", "score": "0.5935728", "text": "function findTypesAddedToUnions(oldSchema, newSchema) {\n\t var oldTypeMap = oldSchema.getTypeMap();\n\t var newTypeMap = newSchema.getTypeMap();\n\n\t var typesAddedToUnion = [];\n\t Object.keys(newTypeMap).forEach(function (typeName) {\n\t var oldType = oldTypeMap[typeName];\n\t var newType = newTypeMap[typeName];\n\t if (!isUnionType(oldType) || !isUnionType(newType)) {\n\t return;\n\t }\n\t var typeNamesInOldUnion = Object.create(null);\n\t oldType.getTypes().forEach(function (type) {\n\t typeNamesInOldUnion[type.name] = true;\n\t });\n\t newType.getTypes().forEach(function (type) {\n\t if (!typeNamesInOldUnion[type.name]) {\n\t typesAddedToUnion.push({\n\t type: DangerousChangeType.TYPE_ADDED_TO_UNION,\n\t description: type.name + ' was added to union type ' + typeName + '.'\n\t });\n\t }\n\t });\n\t });\n\t return typesAddedToUnion;\n\t}", "title": "" }, { "docid": "c9acc759d7fcf4c703257e6af0dd71bf", "score": "0.59267086", "text": "function findTypesRemovedFromUnions(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n\n var typesRemovedFromUnion = [];\n Object.keys(oldTypeMap).forEach(function (typeName) {\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n if (!(oldType instanceof _definition.GraphQLUnionType) || !(newType instanceof _definition.GraphQLUnionType)) {\n return;\n }\n var typeNamesInNewUnion = Object.create(null);\n newType.getTypes().forEach(function (type) {\n typeNamesInNewUnion[type.name] = true;\n });\n oldType.getTypes().forEach(function (type) {\n if (!typeNamesInNewUnion[type.name]) {\n typesRemovedFromUnion.push({\n type: BreakingChangeType.TYPE_REMOVED_FROM_UNION,\n description: type.name + ' was removed from union type ' + typeName + '.'\n });\n }\n });\n });\n return typesRemovedFromUnion;\n}", "title": "" }, { "docid": "97668e0788e41827da2dc54e51cff802", "score": "0.5913721", "text": "function findTypesRemovedFromUnions(oldSchema, newSchema) {\n\t var oldTypeMap = oldSchema.getTypeMap();\n\t var newTypeMap = newSchema.getTypeMap();\n\n\t var typesRemovedFromUnion = [];\n\t Object.keys(oldTypeMap).forEach(function (typeName) {\n\t var oldType = oldTypeMap[typeName];\n\t var newType = newTypeMap[typeName];\n\t if (!(oldType instanceof _definition.GraphQLUnionType) || !(newType instanceof _definition.GraphQLUnionType)) {\n\t return;\n\t }\n\t var typeNamesInNewUnion = Object.create(null);\n\t newType.getTypes().forEach(function (type) {\n\t typeNamesInNewUnion[type.name] = true;\n\t });\n\t oldType.getTypes().forEach(function (type) {\n\t if (!typeNamesInNewUnion[type.name]) {\n\t typesRemovedFromUnion.push({\n\t type: BreakingChangeType.TYPE_REMOVED_FROM_UNION,\n\t description: type.name + ' was removed from union type ' + typeName + '.'\n\t });\n\t }\n\t });\n\t });\n\t return typesRemovedFromUnion;\n\t}", "title": "" }, { "docid": "459dfea10c640d19d5b81e092a2a6363", "score": "0.58428293", "text": "function findTypesAddedToUnions(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n\n var typesAddedToUnion = [];\n Object.keys(newTypeMap).forEach(function (typeName) {\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n if (!(0, _definition.isUnionType)(oldType) || !(0, _definition.isUnionType)(newType)) {\n return;\n }\n var typeNamesInOldUnion = Object.create(null);\n oldType.getTypes().forEach(function (type) {\n typeNamesInOldUnion[type.name] = true;\n });\n newType.getTypes().forEach(function (type) {\n if (!typeNamesInOldUnion[type.name]) {\n typesAddedToUnion.push({\n type: DangerousChangeType.TYPE_ADDED_TO_UNION,\n description: type.name + ' was added to union type ' + typeName + '.'\n });\n }\n });\n });\n return typesAddedToUnion;\n}", "title": "" }, { "docid": "cd4363c973fc27ca5419c53a0ab2af71", "score": "0.5743603", "text": "function validateSchemaExtenderArray(original, extender) {\n // Ensure that the extending schema is \n if (extender[KEYWORD_TYPE] !== TYPE_ARRAY) {\n throw \"The original schema defined an array, but the \" +\n \"extending schema does not: \" +\n extender;\n }\n \n // Get the different types for an array.\n var originalConstType = original[KEYWORD_CONST_TYPE];\n var originalConstLength = original[KEYWORD_CONST_LENGTH];\n \n // If it is a constant-type array, ensure that the extender is also\n // defining a constant-type array.\n if (typeof originalConstType !== \"undefined\") {\n // Get the type of array for the extender schema.\n var extenderConstType = extender[KEYWORD_CONST_TYPE];\n \n // Ensure that the extender schema is a constant-type as well.\n if (typeof extenderConstType === \"undefined\") {\n throw \"The original schema defined a constant-type \" +\n \"array, but the extending schema did not: \" +\n JSON.stringify(extender);\n }\n \n // Validate the sub-schemas.\n validateSchemaExtender(originalConstType, extenderConstType);\n }\n // Otherwise, it must be a constant-length array, so ensure that\n // the extender is also defining a constant-lenght array.\n else {\n // Get the type of array for the extender schema.\n var extenderConstLength = extender[KEYWORD_CONST_LENGTH];\n\n // Ensure that the extender schema is a constant-length as well.\n if (typeof extenderConstLength === \"undefined\") {\n throw \"The original schema defined a constant-type \" +\n \"array, but the extending schema did not: \" +\n JSON.stringify(extender);\n }\n\n // Ensure that the two schemas are the same length. \n if (originalConstLength.length !== extenderConstLength.length) {\n throw \"The original schema and the extending schema \" +\n \"are different lengths: \" +\n JSON.stringify(extender);\n }\n \n // Ensure each index defines the same schema.\n for (var i = 0; i < originalConstLength.length; i++) {\n validateSchemaExtender(\n originalConstLength[i],\n extenderConstLength[i]);\n }\n }\n }", "title": "" }, { "docid": "ae3ea81e433e5b462a4e18421c6de6d5", "score": "0.5730697", "text": "function findTypesAddedToUnions(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n\n var typesAddedToUnion = [];\n Object.keys(newTypeMap).forEach(function (typeName) {\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n if (!(oldType instanceof _definition.GraphQLUnionType) || !(newType instanceof _definition.GraphQLUnionType)) {\n return;\n }\n var typeNamesInOldUnion = Object.create(null);\n oldType.getTypes().forEach(function (type) {\n typeNamesInOldUnion[type.name] = true;\n });\n newType.getTypes().forEach(function (type) {\n if (!typeNamesInOldUnion[type.name]) {\n typesAddedToUnion.push({\n type: DangerousChangeType.TYPE_ADDED_TO_UNION,\n description: type.name + ' was added to union type ' + typeName + '.'\n });\n }\n });\n });\n return typesAddedToUnion;\n}", "title": "" }, { "docid": "a49c92553f1ee90c408a5e5e069e6bb8", "score": "0.56927615", "text": "function find_internal_schema(schema, found_schemas){\n for(property in schema.properties){\n switch(schema.properties[property].type){\n case \"object\":{\n if(\"id\" in schema.properties[property]){\n found_schemas[schema.properties[property].id] = schema.properties[property]\n }\n break\n }\n case \"array\":{\n break\n }\n }\n //drill further down\n find_internal_schema(schema.properties[property], found_schemas)\n }\n return found_schemas\n}", "title": "" }, { "docid": "0fc8bc737ad9c97c2955fc3d678ffefb", "score": "0.5577312", "text": "async getSchemaChanges() {\n this._initializeModels();\n this.applyAssociations();\n this._checkArchive();\n await this._promise_connection;\n const changes = [];\n const current = await this._adapter.getSchemas();\n for (const model in this.models) {\n const model_class = this.models[model];\n if (!model_class) {\n continue;\n }\n const current_table = current.tables[model_class.table_name];\n if (!current_table || current_table === 'NO SCHEMA') {\n continue;\n }\n for (const column in model_class._schema) {\n const property = model_class._schema[column];\n if (!property) {\n continue;\n }\n const current_column = current_table.columns[property._dbname_us];\n if (!current_column) {\n changes.push({ message: `Add column ${property._dbname_us} to ${model_class.table_name}` });\n const query = this._adapter.getAddColumnQuery(model, property);\n if (query) {\n changes.push({ message: ` (${query})`, is_query: true, ignorable: true });\n }\n continue;\n }\n let type_changed = false;\n if (column !== 'id') {\n if (property.required && !current_column.required) {\n type_changed = true;\n changes.push({\n message: `Change ${model_class.table_name}.${property._dbname_us} to required`,\n ignorable: true,\n });\n }\n else if (!property.required && current_column.required) {\n type_changed = true;\n changes.push({ message: `Change ${model_class.table_name}.${column} to optional`, ignorable: true });\n }\n }\n const expected_type = this._adapter.getAdapterTypeString(property);\n const real_type = current_column.adapter_type_string;\n if (expected_type !== real_type) {\n type_changed = true;\n changes.push({\n message: `Type different ${model_class.table_name}.${column}: expected=${expected_type}, real=${real_type}`,\n ignorable: true,\n });\n }\n if ((current_column.description ?? '') !== (property.description ?? '')) {\n if (!type_changed) {\n changes.push({\n message: `Change ${model_class.table_name}.${column}'s description to '${property.description}'`,\n ignorable: true,\n });\n const query = this._adapter.getUpdateColumnDescriptionQuery(model, property);\n if (query) {\n changes.push({ message: ` (${query})`, is_query: true, ignorable: true });\n }\n }\n else {\n changes.push({\n message: `(Skip) Change ${model_class.table_name}.${column}'s description to '${property.description}'`,\n ignorable: true,\n });\n }\n }\n }\n for (const column in current_table.columns) {\n if (!lodash_1.default.find(model_class._schema, { _dbname_us: column })) {\n changes.push({ message: `Remove column ${column} from ${model_class.table_name}`, ignorable: true });\n }\n }\n }\n for (const model in this.models) {\n const model_class = this.models[model];\n if (!model_class) {\n continue;\n }\n const current_table = current.tables[model_class.table_name];\n if (!current_table) {\n changes.push({ message: `Add table ${model_class.table_name}` });\n const query = this._adapter.getCreateTableQuery(model);\n if (query) {\n changes.push({ message: ` (${query})`, is_query: true, ignorable: true });\n }\n }\n else if (current_table !== 'NO SCHEMA' &&\n (current_table.description ?? '') !== (model_class.description ?? '')) {\n changes.push({\n message: `Change table ${model_class.table_name}'s description to '${model_class.description}'`,\n ignorable: true,\n });\n const query = this._adapter.getUpdateTableDescriptionQuery(model);\n if (query) {\n changes.push({ message: ` (${query})`, is_query: true, ignorable: true });\n }\n }\n }\n for (const table_name in current.tables) {\n if (!lodash_1.default.find(this.models, { table_name })) {\n changes.push({ message: `Remove table ${table_name}`, ignorable: true });\n }\n }\n for (const model_name in this.models) {\n const model_class = this.models[model_name];\n if (!model_class) {\n continue;\n }\n for (const index of model_class._indexes) {\n if (!current.indexes?.[model_class.table_name]?.[index.options.name ?? '']) {\n changes.push({ message: `Add index on ${model_class.table_name} ${Object.keys(index.columns)}` });\n const query = this._adapter.getCreateIndexQuery(model_name, index);\n if (query) {\n changes.push({ message: ` (${query})`, is_query: true, ignorable: true });\n }\n }\n }\n for (const index in current.indexes?.[model_class.table_name]) {\n // MySQL add index for foreign key, so does not need to remove if the index is defined in integrities\n if (!lodash_1.default.find(model_class._indexes, (item) => item.options.name === index) &&\n !lodash_1.default.find(model_class._integrities, (item) => item.column === index)) {\n changes.push({ message: `Remove index on ${model_class.table_name} ${index}`, ignorable: true });\n }\n }\n }\n for (const model in this.models) {\n const model_class = this.models[model];\n if (!model_class) {\n continue;\n }\n for (const integrity of model_class._integrities) {\n let type = '';\n if (integrity.type === 'child_nullify') {\n type = 'nullify';\n }\n else if (integrity.type === 'child_restrict') {\n type = 'restrict';\n }\n else if (integrity.type === 'child_delete') {\n type = 'delete';\n }\n if (type) {\n const current_foreign_key = current.foreign_keys &&\n current.foreign_keys[model_class.table_name] &&\n current.foreign_keys[model_class.table_name][integrity.column];\n if (!(current_foreign_key && current_foreign_key === integrity.parent.table_name) &&\n this._adapter.native_integrity) {\n const table_name = model_class.table_name;\n const parent_table_name = integrity.parent.table_name;\n changes.push({ message: `Add foreign key ${table_name}.${integrity.column} to ${parent_table_name}` });\n const query = this._adapter.getCreateForeignKeyQuery(model, integrity.column, type, integrity.parent);\n if (query) {\n changes.push({ message: ` (${query})`, is_query: true, ignorable: true });\n }\n }\n }\n }\n }\n return changes;\n }", "title": "" }, { "docid": "1d15bba7ab7a3da16d4136e7bf4b5016", "score": "0.5502304", "text": "function mergeSchemas(functionType, lhsSchema, rhsSchema, passign) {\n // handle parameter name conflicts by having the second primitive win\n const newArgNames = new Set;\n const newArgs = [];\n for (let arg of rhsSchema.iterateArguments()) {\n if (arg.name === passign)\n continue;\n newArgNames.add(arg.name);\n newArgs.push(arg);\n }\n for (let arg of lhsSchema.iterateArguments()) {\n if (newArgNames.has(arg.name))\n continue;\n /*if (!lhsSchema.isArgInput(arg.name))\n continue;*/\n newArgNames.add(arg.name);\n newArgs.push(arg);\n }\n\n return new Ast.ExpressionSignature(null, functionType, null /* class */, [] /* extends */, newArgs, {\n is_list: lhsSchema.is_list || rhsSchema.is_list,\n is_monitorable: lhsSchema.is_monitorable && rhsSchema.is_monitorable,\n require_filter: lhsSchema.require_filter || rhsSchema.require_filter,\n default_projection: [...new Set(lhsSchema.default_projection.concat(rhsSchema.default_projection))],\n minimal_projection: [...new Set(lhsSchema.minimal_projection.concat(rhsSchema.minimal_projection))],\n no_filter: lhsSchema.no_filter && rhsSchema.no_filter\n });\n}", "title": "" }, { "docid": "079a85e27152405c8cd5f59adbb92666", "score": "0.55003506", "text": "function findValuesAddedToEnums(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var valuesAddedToEnums = [];\n\n var _arr13 = Object.keys(oldTypeMap);\n\n for (var _i13 = 0; _i13 < _arr13.length; _i13++) {\n var typeName = _arr13[_i13];\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__type_definition__[\"p\" /* isEnumType */])(oldType) || !Object(__WEBPACK_IMPORTED_MODULE_0__type_definition__[\"p\" /* isEnumType */])(newType)) {\n continue;\n }\n\n var valuesInOldEnum = Object.create(null);\n var _iteratorNormalCompletion9 = true;\n var _didIteratorError9 = false;\n var _iteratorError9 = undefined;\n\n try {\n for (var _iterator9 = oldType.getValues()[Symbol.iterator](), _step9; !(_iteratorNormalCompletion9 = (_step9 = _iterator9.next()).done); _iteratorNormalCompletion9 = true) {\n var value = _step9.value;\n valuesInOldEnum[value.name] = true;\n }\n } catch (err) {\n _didIteratorError9 = true;\n _iteratorError9 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion9 && _iterator9.return != null) {\n _iterator9.return();\n }\n } finally {\n if (_didIteratorError9) {\n throw _iteratorError9;\n }\n }\n }\n\n var _iteratorNormalCompletion10 = true;\n var _didIteratorError10 = false;\n var _iteratorError10 = undefined;\n\n try {\n for (var _iterator10 = newType.getValues()[Symbol.iterator](), _step10; !(_iteratorNormalCompletion10 = (_step10 = _iterator10.next()).done); _iteratorNormalCompletion10 = true) {\n var _value2 = _step10.value;\n\n if (!valuesInOldEnum[_value2.name]) {\n valuesAddedToEnums.push({\n type: DangerousChangeType.VALUE_ADDED_TO_ENUM,\n description: \"\".concat(_value2.name, \" was added to enum type \").concat(typeName, \".\")\n });\n }\n }\n } catch (err) {\n _didIteratorError10 = true;\n _iteratorError10 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion10 && _iterator10.return != null) {\n _iterator10.return();\n }\n } finally {\n if (_didIteratorError10) {\n throw _iteratorError10;\n }\n }\n }\n }\n\n return valuesAddedToEnums;\n}", "title": "" }, { "docid": "5bc5f8a0aba52e1d8f1239d8a6fe90d1", "score": "0.5497146", "text": "function diffManifestFields(a, b) {\n var diffs = []; // List of field names with diffs.\n Object.keys(b).forEach(function (field) {\n if (field === 'requirements') {\n if (a[field] === undefined) {\n diffs.push(field);\n }\n return;\n }\n if (JSON.stringify(b[field]) !==\n JSON.stringify(a[field])) {\n diffs.push(field);\n }\n });\n Object.keys(a).forEach(function (field) {\n if (b[field] === undefined) {\n diffs.push(field);\n }\n });\n if (b.requirements && a.requirements) {\n Object.keys(b.requirements).forEach(function (field) {\n if (JSON.stringify(b.requirements[field]) !==\n JSON.stringify(a.requirements[field])) {\n diffs.push('requirements.' + field);\n }\n });\n Object.keys(a.requirements).forEach(function (field) {\n if (b.requirements[field] === undefined) {\n diffs.push('requirements.' + field);\n }\n });\n }\n return diffs;\n}", "title": "" }, { "docid": "1b40e00eb5fa99f2ecbb93851b4ff2a8", "score": "0.54416037", "text": "function findValuesRemovedFromEnums(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var valuesRemovedFromEnums = [];\n\n var _arr12 = Object.keys(oldTypeMap);\n\n for (var _i12 = 0; _i12 < _arr12.length; _i12++) {\n var typeName = _arr12[_i12];\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (!Object(__WEBPACK_IMPORTED_MODULE_0__type_definition__[\"p\" /* isEnumType */])(oldType) || !Object(__WEBPACK_IMPORTED_MODULE_0__type_definition__[\"p\" /* isEnumType */])(newType)) {\n continue;\n }\n\n var valuesInNewEnum = Object.create(null);\n var _iteratorNormalCompletion7 = true;\n var _didIteratorError7 = false;\n var _iteratorError7 = undefined;\n\n try {\n for (var _iterator7 = newType.getValues()[Symbol.iterator](), _step7; !(_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done); _iteratorNormalCompletion7 = true) {\n var value = _step7.value;\n valuesInNewEnum[value.name] = true;\n }\n } catch (err) {\n _didIteratorError7 = true;\n _iteratorError7 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion7 && _iterator7.return != null) {\n _iterator7.return();\n }\n } finally {\n if (_didIteratorError7) {\n throw _iteratorError7;\n }\n }\n }\n\n var _iteratorNormalCompletion8 = true;\n var _didIteratorError8 = false;\n var _iteratorError8 = undefined;\n\n try {\n for (var _iterator8 = oldType.getValues()[Symbol.iterator](), _step8; !(_iteratorNormalCompletion8 = (_step8 = _iterator8.next()).done); _iteratorNormalCompletion8 = true) {\n var _value = _step8.value;\n\n if (!valuesInNewEnum[_value.name]) {\n valuesRemovedFromEnums.push({\n type: BreakingChangeType.VALUE_REMOVED_FROM_ENUM,\n description: \"\".concat(_value.name, \" was removed from enum type \").concat(typeName, \".\")\n });\n }\n }\n } catch (err) {\n _didIteratorError8 = true;\n _iteratorError8 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion8 && _iterator8.return != null) {\n _iterator8.return();\n }\n } finally {\n if (_didIteratorError8) {\n throw _iteratorError8;\n }\n }\n }\n }\n\n return valuesRemovedFromEnums;\n}", "title": "" }, { "docid": "688cad47a36aa46f19220d7329d34720", "score": "0.5416401", "text": "function findValuesAddedToEnums(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var valuesAddedToEnums = [];\n\n for (var _i13 = 0, _Object$keys13 = Object.keys(oldTypeMap); _i13 < _Object$keys13.length; _i13++) {\n var typeName = _Object$keys13[_i13];\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (!Object(_type_definition__WEBPACK_IMPORTED_MODULE_2__[/* isEnumType */ \"E\"])(oldType) || !Object(_type_definition__WEBPACK_IMPORTED_MODULE_2__[/* isEnumType */ \"E\"])(newType)) {\n continue;\n }\n\n var valuesInOldEnum = Object.create(null);\n var _iteratorNormalCompletion9 = true;\n var _didIteratorError9 = false;\n var _iteratorError9 = undefined;\n\n try {\n for (var _iterator9 = oldType.getValues()[Symbol.iterator](), _step9; !(_iteratorNormalCompletion9 = (_step9 = _iterator9.next()).done); _iteratorNormalCompletion9 = true) {\n var value = _step9.value;\n valuesInOldEnum[value.name] = true;\n }\n } catch (err) {\n _didIteratorError9 = true;\n _iteratorError9 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion9 && _iterator9.return != null) {\n _iterator9.return();\n }\n } finally {\n if (_didIteratorError9) {\n throw _iteratorError9;\n }\n }\n }\n\n var _iteratorNormalCompletion10 = true;\n var _didIteratorError10 = false;\n var _iteratorError10 = undefined;\n\n try {\n for (var _iterator10 = newType.getValues()[Symbol.iterator](), _step10; !(_iteratorNormalCompletion10 = (_step10 = _iterator10.next()).done); _iteratorNormalCompletion10 = true) {\n var _value2 = _step10.value;\n\n if (!valuesInOldEnum[_value2.name]) {\n valuesAddedToEnums.push({\n type: DangerousChangeType.VALUE_ADDED_TO_ENUM,\n description: \"\".concat(_value2.name, \" was added to enum type \").concat(typeName, \".\")\n });\n }\n }\n } catch (err) {\n _didIteratorError10 = true;\n _iteratorError10 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion10 && _iterator10.return != null) {\n _iterator10.return();\n }\n } finally {\n if (_didIteratorError10) {\n throw _iteratorError10;\n }\n }\n }\n }\n\n return valuesAddedToEnums;\n}", "title": "" }, { "docid": "4f7567e9d50fe8ce559c8fd0866e1565", "score": "0.5361566", "text": "function typeCheck(t1, t2) {\n\t\tfor(var i = 0; i < t1.length; i++) {\n\t\t\tfor(var j = 0; j < t2.length; j++) {\n\t\t\t\tif(t1[i] == t2[j]) {\n\t\t\t\t\t// found a compatible interpretation of the types\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "4f7567e9d50fe8ce559c8fd0866e1565", "score": "0.5361566", "text": "function typeCheck(t1, t2) {\n\t\tfor(var i = 0; i < t1.length; i++) {\n\t\t\tfor(var j = 0; j < t2.length; j++) {\n\t\t\t\tif(t1[i] == t2[j]) {\n\t\t\t\t\t// found a compatible interpretation of the types\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "8369d437cc4e4bc4e8b6f6c251896c16", "score": "0.53457344", "text": "function findValuesRemovedFromEnums(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var valuesRemovedFromEnums = [];\n\n for (var _i12 = 0, _Object$keys12 = Object.keys(oldTypeMap); _i12 < _Object$keys12.length; _i12++) {\n var typeName = _Object$keys12[_i12];\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (!Object(_type_definition__WEBPACK_IMPORTED_MODULE_2__[/* isEnumType */ \"E\"])(oldType) || !Object(_type_definition__WEBPACK_IMPORTED_MODULE_2__[/* isEnumType */ \"E\"])(newType)) {\n continue;\n }\n\n var valuesInNewEnum = Object.create(null);\n var _iteratorNormalCompletion7 = true;\n var _didIteratorError7 = false;\n var _iteratorError7 = undefined;\n\n try {\n for (var _iterator7 = newType.getValues()[Symbol.iterator](), _step7; !(_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done); _iteratorNormalCompletion7 = true) {\n var value = _step7.value;\n valuesInNewEnum[value.name] = true;\n }\n } catch (err) {\n _didIteratorError7 = true;\n _iteratorError7 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion7 && _iterator7.return != null) {\n _iterator7.return();\n }\n } finally {\n if (_didIteratorError7) {\n throw _iteratorError7;\n }\n }\n }\n\n var _iteratorNormalCompletion8 = true;\n var _didIteratorError8 = false;\n var _iteratorError8 = undefined;\n\n try {\n for (var _iterator8 = oldType.getValues()[Symbol.iterator](), _step8; !(_iteratorNormalCompletion8 = (_step8 = _iterator8.next()).done); _iteratorNormalCompletion8 = true) {\n var _value = _step8.value;\n\n if (!valuesInNewEnum[_value.name]) {\n valuesRemovedFromEnums.push({\n type: BreakingChangeType.VALUE_REMOVED_FROM_ENUM,\n description: \"\".concat(_value.name, \" was removed from enum type \").concat(typeName, \".\")\n });\n }\n }\n } catch (err) {\n _didIteratorError8 = true;\n _iteratorError8 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion8 && _iterator8.return != null) {\n _iterator8.return();\n }\n } finally {\n if (_didIteratorError8) {\n throw _iteratorError8;\n }\n }\n }\n }\n\n return valuesRemovedFromEnums;\n}", "title": "" }, { "docid": "34115ef54906d674e44a9459ea37ef6b", "score": "0.53206754", "text": "function findValuesAddedToEnums(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var valuesAddedToEnums = [];\n\n var _arr13 = Object.keys(oldTypeMap);\n\n for (var _i13 = 0; _i13 < _arr13.length; _i13++) {\n var typeName = _arr13[_i13];\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (!(0, _definition.isEnumType)(oldType) || !(0, _definition.isEnumType)(newType)) {\n continue;\n }\n\n var valuesInOldEnum = Object.create(null);\n var _iteratorNormalCompletion9 = true;\n var _didIteratorError9 = false;\n var _iteratorError9 = undefined;\n\n try {\n for (var _iterator9 = oldType.getValues()[Symbol.iterator](), _step9; !(_iteratorNormalCompletion9 = (_step9 = _iterator9.next()).done); _iteratorNormalCompletion9 = true) {\n var value = _step9.value;\n valuesInOldEnum[value.name] = true;\n }\n } catch (err) {\n _didIteratorError9 = true;\n _iteratorError9 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion9 && _iterator9.return != null) {\n _iterator9.return();\n }\n } finally {\n if (_didIteratorError9) {\n throw _iteratorError9;\n }\n }\n }\n\n var _iteratorNormalCompletion10 = true;\n var _didIteratorError10 = false;\n var _iteratorError10 = undefined;\n\n try {\n for (var _iterator10 = newType.getValues()[Symbol.iterator](), _step10; !(_iteratorNormalCompletion10 = (_step10 = _iterator10.next()).done); _iteratorNormalCompletion10 = true) {\n var _value2 = _step10.value;\n\n if (!valuesInOldEnum[_value2.name]) {\n valuesAddedToEnums.push({\n type: DangerousChangeType.VALUE_ADDED_TO_ENUM,\n description: \"\".concat(_value2.name, \" was added to enum type \").concat(typeName, \".\")\n });\n }\n }\n } catch (err) {\n _didIteratorError10 = true;\n _iteratorError10 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion10 && _iterator10.return != null) {\n _iterator10.return();\n }\n } finally {\n if (_didIteratorError10) {\n throw _iteratorError10;\n }\n }\n }\n }\n\n return valuesAddedToEnums;\n}", "title": "" }, { "docid": "34115ef54906d674e44a9459ea37ef6b", "score": "0.53206754", "text": "function findValuesAddedToEnums(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var valuesAddedToEnums = [];\n\n var _arr13 = Object.keys(oldTypeMap);\n\n for (var _i13 = 0; _i13 < _arr13.length; _i13++) {\n var typeName = _arr13[_i13];\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (!(0, _definition.isEnumType)(oldType) || !(0, _definition.isEnumType)(newType)) {\n continue;\n }\n\n var valuesInOldEnum = Object.create(null);\n var _iteratorNormalCompletion9 = true;\n var _didIteratorError9 = false;\n var _iteratorError9 = undefined;\n\n try {\n for (var _iterator9 = oldType.getValues()[Symbol.iterator](), _step9; !(_iteratorNormalCompletion9 = (_step9 = _iterator9.next()).done); _iteratorNormalCompletion9 = true) {\n var value = _step9.value;\n valuesInOldEnum[value.name] = true;\n }\n } catch (err) {\n _didIteratorError9 = true;\n _iteratorError9 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion9 && _iterator9.return != null) {\n _iterator9.return();\n }\n } finally {\n if (_didIteratorError9) {\n throw _iteratorError9;\n }\n }\n }\n\n var _iteratorNormalCompletion10 = true;\n var _didIteratorError10 = false;\n var _iteratorError10 = undefined;\n\n try {\n for (var _iterator10 = newType.getValues()[Symbol.iterator](), _step10; !(_iteratorNormalCompletion10 = (_step10 = _iterator10.next()).done); _iteratorNormalCompletion10 = true) {\n var _value2 = _step10.value;\n\n if (!valuesInOldEnum[_value2.name]) {\n valuesAddedToEnums.push({\n type: DangerousChangeType.VALUE_ADDED_TO_ENUM,\n description: \"\".concat(_value2.name, \" was added to enum type \").concat(typeName, \".\")\n });\n }\n }\n } catch (err) {\n _didIteratorError10 = true;\n _iteratorError10 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion10 && _iterator10.return != null) {\n _iterator10.return();\n }\n } finally {\n if (_didIteratorError10) {\n throw _iteratorError10;\n }\n }\n }\n }\n\n return valuesAddedToEnums;\n}", "title": "" }, { "docid": "ecb5f59f7d5b9a1e3946ebf8197bdbe6", "score": "0.5308074", "text": "getAdditionalSchemas() {\n const additionalSchemas = this.schemas.join('\\n');\n return additionalSchemas;\n }", "title": "" }, { "docid": "1c08381f748eed4f83187bf3cc341751", "score": "0.5247204", "text": "function generateFormatErrors(schema, contextPath, config, isOAS3) {\n const result = {};\n result.error = [];\n result.warning = [];\n\n if (schema.$ref) {\n return result;\n }\n\n // Special case: check for arrays of arrays\n let checkStatus = config.array_of_arrays;\n if (checkStatus !== 'off' && schema.type === 'array' && schema.items) {\n if (schema.items.type === 'array') {\n const path = contextPath.concat(['items', 'type']);\n const message =\n 'Array properties should avoid having items of type array.';\n result[checkStatus].push({ path, message });\n }\n }\n\n checkStatus = config.invalid_type_format_pair;\n if (checkStatus !== 'off' && !formatValid(schema, contextPath, isOAS3)) {\n const path = contextPath.concat(['type']);\n const message = 'Property type+format is not well-defined.';\n result[checkStatus].push({ path, message });\n }\n\n return result;\n}", "title": "" }, { "docid": "a4a157ac12aceab9e32607da6a0b948e", "score": "0.52215326", "text": "function findValuesRemovedFromEnums(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var valuesRemovedFromEnums = [];\n\n var _arr12 = Object.keys(oldTypeMap);\n\n for (var _i12 = 0; _i12 < _arr12.length; _i12++) {\n var typeName = _arr12[_i12];\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (!(0, _definition.isEnumType)(oldType) || !(0, _definition.isEnumType)(newType)) {\n continue;\n }\n\n var valuesInNewEnum = Object.create(null);\n var _iteratorNormalCompletion7 = true;\n var _didIteratorError7 = false;\n var _iteratorError7 = undefined;\n\n try {\n for (var _iterator7 = newType.getValues()[Symbol.iterator](), _step7; !(_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done); _iteratorNormalCompletion7 = true) {\n var value = _step7.value;\n valuesInNewEnum[value.name] = true;\n }\n } catch (err) {\n _didIteratorError7 = true;\n _iteratorError7 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion7 && _iterator7.return != null) {\n _iterator7.return();\n }\n } finally {\n if (_didIteratorError7) {\n throw _iteratorError7;\n }\n }\n }\n\n var _iteratorNormalCompletion8 = true;\n var _didIteratorError8 = false;\n var _iteratorError8 = undefined;\n\n try {\n for (var _iterator8 = oldType.getValues()[Symbol.iterator](), _step8; !(_iteratorNormalCompletion8 = (_step8 = _iterator8.next()).done); _iteratorNormalCompletion8 = true) {\n var _value = _step8.value;\n\n if (!valuesInNewEnum[_value.name]) {\n valuesRemovedFromEnums.push({\n type: BreakingChangeType.VALUE_REMOVED_FROM_ENUM,\n description: \"\".concat(_value.name, \" was removed from enum type \").concat(typeName, \".\")\n });\n }\n }\n } catch (err) {\n _didIteratorError8 = true;\n _iteratorError8 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion8 && _iterator8.return != null) {\n _iterator8.return();\n }\n } finally {\n if (_didIteratorError8) {\n throw _iteratorError8;\n }\n }\n }\n }\n\n return valuesRemovedFromEnums;\n}", "title": "" }, { "docid": "a4a157ac12aceab9e32607da6a0b948e", "score": "0.52215326", "text": "function findValuesRemovedFromEnums(oldSchema, newSchema) {\n var oldTypeMap = oldSchema.getTypeMap();\n var newTypeMap = newSchema.getTypeMap();\n var valuesRemovedFromEnums = [];\n\n var _arr12 = Object.keys(oldTypeMap);\n\n for (var _i12 = 0; _i12 < _arr12.length; _i12++) {\n var typeName = _arr12[_i12];\n var oldType = oldTypeMap[typeName];\n var newType = newTypeMap[typeName];\n\n if (!(0, _definition.isEnumType)(oldType) || !(0, _definition.isEnumType)(newType)) {\n continue;\n }\n\n var valuesInNewEnum = Object.create(null);\n var _iteratorNormalCompletion7 = true;\n var _didIteratorError7 = false;\n var _iteratorError7 = undefined;\n\n try {\n for (var _iterator7 = newType.getValues()[Symbol.iterator](), _step7; !(_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done); _iteratorNormalCompletion7 = true) {\n var value = _step7.value;\n valuesInNewEnum[value.name] = true;\n }\n } catch (err) {\n _didIteratorError7 = true;\n _iteratorError7 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion7 && _iterator7.return != null) {\n _iterator7.return();\n }\n } finally {\n if (_didIteratorError7) {\n throw _iteratorError7;\n }\n }\n }\n\n var _iteratorNormalCompletion8 = true;\n var _didIteratorError8 = false;\n var _iteratorError8 = undefined;\n\n try {\n for (var _iterator8 = oldType.getValues()[Symbol.iterator](), _step8; !(_iteratorNormalCompletion8 = (_step8 = _iterator8.next()).done); _iteratorNormalCompletion8 = true) {\n var _value = _step8.value;\n\n if (!valuesInNewEnum[_value.name]) {\n valuesRemovedFromEnums.push({\n type: BreakingChangeType.VALUE_REMOVED_FROM_ENUM,\n description: \"\".concat(_value.name, \" was removed from enum type \").concat(typeName, \".\")\n });\n }\n }\n } catch (err) {\n _didIteratorError8 = true;\n _iteratorError8 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion8 && _iterator8.return != null) {\n _iterator8.return();\n }\n } finally {\n if (_didIteratorError8) {\n throw _iteratorError8;\n }\n }\n }\n }\n\n return valuesRemovedFromEnums;\n}", "title": "" }, { "docid": "d391e1eea3af142456b974fa2e84ff5c", "score": "0.5210964", "text": "getCollectionsSchemas() {\n const collectionsSchemas = this.collections\n .map(collection => {\n return this.generateSchema(collection);\n })\n .join('');\n return collectionsSchemas;\n }", "title": "" }, { "docid": "2aace7ea958d507f2c8e6ccaf4e45782", "score": "0.5195959", "text": "function findValuesAddedToEnums(oldSchema, newSchema) {\n\t var oldTypeMap = oldSchema.getTypeMap();\n\t var newTypeMap = newSchema.getTypeMap();\n\n\t var valuesAddedToEnums = [];\n\t Object.keys(oldTypeMap).forEach(function (typeName) {\n\t var oldType = oldTypeMap[typeName];\n\t var newType = newTypeMap[typeName];\n\t if (!isEnumType(oldType) || !isEnumType(newType)) {\n\t return;\n\t }\n\n\t var valuesInOldEnum = Object.create(null);\n\t oldType.getValues().forEach(function (value) {\n\t valuesInOldEnum[value.name] = true;\n\t });\n\t newType.getValues().forEach(function (value) {\n\t if (!valuesInOldEnum[value.name]) {\n\t valuesAddedToEnums.push({\n\t type: DangerousChangeType.VALUE_ADDED_TO_ENUM,\n\t description: value.name + ' was added to enum type ' + typeName + '.'\n\t });\n\t }\n\t });\n\t });\n\t return valuesAddedToEnums;\n\t}", "title": "" }, { "docid": "b67a4648de5bf5de38eeea66ed1a2ca0", "score": "0.5157485", "text": "function getSuggestedTypeNames(schema, type, fieldName) {\n if (!Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[\"isAbstractType\"])(type)) {\n // Must be an Object type, which does not have possible fields.\n return [];\n }\n\n var suggestedTypes = new Set();\n var usageCount = Object.create(null);\n\n for (var _i2 = 0, _schema$getPossibleTy2 = schema.getPossibleTypes(type); _i2 < _schema$getPossibleTy2.length; _i2++) {\n var possibleType = _schema$getPossibleTy2[_i2];\n\n if (!possibleType.getFields()[fieldName]) {\n continue;\n } // This object type defines this field.\n\n\n suggestedTypes.add(possibleType);\n usageCount[possibleType.name] = 1;\n\n for (var _i4 = 0, _possibleType$getInte2 = possibleType.getInterfaces(); _i4 < _possibleType$getInte2.length; _i4++) {\n var _usageCount$possibleI;\n\n var possibleInterface = _possibleType$getInte2[_i4];\n\n if (!possibleInterface.getFields()[fieldName]) {\n continue;\n } // This interface type defines this field.\n\n\n suggestedTypes.add(possibleInterface);\n usageCount[possibleInterface.name] = ((_usageCount$possibleI = usageCount[possibleInterface.name]) !== null && _usageCount$possibleI !== void 0 ? _usageCount$possibleI : 0) + 1;\n }\n }\n\n return Object(_polyfills_arrayFrom_mjs__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(suggestedTypes).sort(function (typeA, typeB) {\n // Suggest both interface and object types based on how common they are.\n var usageCountDiff = usageCount[typeB.name] - usageCount[typeA.name];\n\n if (usageCountDiff !== 0) {\n return usageCountDiff;\n } // Suggest super types first followed by subtypes\n\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[\"isInterfaceType\"])(typeA) && schema.isSubType(typeA, typeB)) {\n return -1;\n }\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[\"isInterfaceType\"])(typeB) && schema.isSubType(typeB, typeA)) {\n return 1;\n }\n\n return Object(_jsutils_naturalCompare_mjs__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(typeA.name, typeB.name);\n }).map(function (x) {\n return x.name;\n });\n}", "title": "" }, { "docid": "e48ddb04b6a6c21938d09778e342dc79", "score": "0.515261", "text": "function getSuggestedTypeNames(schema, type, fieldName) {\n if (!Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[\"isAbstractType\"])(type)) {\n // Must be an Object type, which does not have possible fields.\n return [];\n }\n\n var suggestedTypes = new Set();\n var usageCount = Object.create(null);\n\n for (var _i2 = 0, _schema$getPossibleTy2 = schema.getPossibleTypes(type); _i2 < _schema$getPossibleTy2.length; _i2++) {\n var possibleType = _schema$getPossibleTy2[_i2];\n\n if (!possibleType.getFields()[fieldName]) {\n continue;\n } // This object type defines this field.\n\n\n suggestedTypes.add(possibleType);\n usageCount[possibleType.name] = 1;\n\n for (var _i4 = 0, _possibleType$getInte2 = possibleType.getInterfaces(); _i4 < _possibleType$getInte2.length; _i4++) {\n var _usageCount$possibleI;\n\n var possibleInterface = _possibleType$getInte2[_i4];\n\n if (!possibleInterface.getFields()[fieldName]) {\n continue;\n } // This interface type defines this field.\n\n\n suggestedTypes.add(possibleInterface);\n usageCount[possibleInterface.name] = ((_usageCount$possibleI = usageCount[possibleInterface.name]) !== null && _usageCount$possibleI !== void 0 ? _usageCount$possibleI : 0) + 1;\n }\n }\n\n return Object(_polyfills_arrayFrom_mjs__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(suggestedTypes).sort(function (typeA, typeB) {\n // Suggest both interface and object types based on how common they are.\n var usageCountDiff = usageCount[typeB.name] - usageCount[typeA.name];\n\n if (usageCountDiff !== 0) {\n return usageCountDiff;\n } // Suggest super types first followed by subtypes\n\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[\"isInterfaceType\"])(typeA) && schema.isSubType(typeA, typeB)) {\n return -1;\n }\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_4__[\"isInterfaceType\"])(typeB) && schema.isSubType(typeB, typeA)) {\n return 1;\n }\n\n return typeA.name.localeCompare(typeB.name);\n }).map(function (x) {\n return x.name;\n });\n}", "title": "" }, { "docid": "b935e6bd299f6244ac748e59bb3a22da", "score": "0.5145794", "text": "function doTypesConflict(type1, type2) {\n if (Object(__WEBPACK_IMPORTED_MODULE_5__type_definition__[\"u\" /* isListType */])(type1)) {\n return Object(__WEBPACK_IMPORTED_MODULE_5__type_definition__[\"u\" /* isListType */])(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true;\n }\n\n if (Object(__WEBPACK_IMPORTED_MODULE_5__type_definition__[\"u\" /* isListType */])(type2)) {\n return true;\n }\n\n if (Object(__WEBPACK_IMPORTED_MODULE_5__type_definition__[\"w\" /* isNonNullType */])(type1)) {\n return Object(__WEBPACK_IMPORTED_MODULE_5__type_definition__[\"w\" /* isNonNullType */])(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true;\n }\n\n if (Object(__WEBPACK_IMPORTED_MODULE_5__type_definition__[\"w\" /* isNonNullType */])(type2)) {\n return true;\n }\n\n if (Object(__WEBPACK_IMPORTED_MODULE_5__type_definition__[\"t\" /* isLeafType */])(type1) || Object(__WEBPACK_IMPORTED_MODULE_5__type_definition__[\"t\" /* isLeafType */])(type2)) {\n return type1 !== type2;\n }\n\n return false;\n} // Given a selection set, return the collection of fields (a mapping of response", "title": "" }, { "docid": "86a0ee9e507be117550221a26419dffd", "score": "0.5093994", "text": "function extendSchema(schema, documentAST, options) {\n Object(_type_schema__WEBPACK_IMPORTED_MODULE_8__[/* assertSchema */ \"b\"])(schema);\n !(documentAST && documentAST.kind === _language_kinds__WEBPACK_IMPORTED_MODULE_13__[/* Kind */ \"a\"].DOCUMENT) ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(0, 'Must provide valid Document AST') : void 0;\n\n if (!options || !(options.assumeValid || options.assumeValidSDL)) {\n Object(_validation_validate__WEBPACK_IMPORTED_MODULE_7__[/* assertValidSDLExtension */ \"b\"])(documentAST, schema);\n } // Collect the type definitions and extensions found in the document.\n\n\n var typeDefs = [];\n var typeExtsMap = Object.create(null); // New directives and types are separate because a directives and types can\n // have the same name. For example, a type named \"skip\".\n\n var directiveDefs = [];\n var schemaDef; // Schema extensions are collected which may add additional operation types.\n\n var schemaExts = [];\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = documentAST.definitions[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var def = _step.value;\n\n if (def.kind === _language_kinds__WEBPACK_IMPORTED_MODULE_13__[/* Kind */ \"a\"].SCHEMA_DEFINITION) {\n schemaDef = def;\n } else if (def.kind === _language_kinds__WEBPACK_IMPORTED_MODULE_13__[/* Kind */ \"a\"].SCHEMA_EXTENSION) {\n schemaExts.push(def);\n } else if (Object(_language_predicates__WEBPACK_IMPORTED_MODULE_14__[/* isTypeDefinitionNode */ \"d\"])(def)) {\n typeDefs.push(def);\n } else if (Object(_language_predicates__WEBPACK_IMPORTED_MODULE_14__[/* isTypeExtensionNode */ \"e\"])(def)) {\n var extendedTypeName = def.name.value;\n var existingTypeExts = typeExtsMap[extendedTypeName];\n typeExtsMap[extendedTypeName] = existingTypeExts ? existingTypeExts.concat([def]) : [def];\n } else if (def.kind === _language_kinds__WEBPACK_IMPORTED_MODULE_13__[/* Kind */ \"a\"].DIRECTIVE_DEFINITION) {\n directiveDefs.push(def);\n }\n } // If this document contains no new types, extensions, or directives then\n // return the same unmodified GraphQLSchema instance.\n\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n if (Object.keys(typeExtsMap).length === 0 && typeDefs.length === 0 && directiveDefs.length === 0 && schemaExts.length === 0 && !schemaDef) {\n return schema;\n }\n\n var schemaConfig = schema.toConfig();\n var astBuilder = new _buildASTSchema__WEBPACK_IMPORTED_MODULE_6__[/* ASTDefinitionBuilder */ \"a\"](options, function (typeName) {\n var type = typeMap[typeName];\n !type ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(0, \"Unknown type: \\\"\".concat(typeName, \"\\\".\")) : void 0;\n return type;\n });\n var typeMap = Object(_jsutils_keyValMap__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(typeDefs, function (node) {\n return node.name.value;\n }, function (node) {\n return astBuilder.buildType(node);\n });\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = schemaConfig.types[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var existingType = _step2.value;\n typeMap[existingType.name] = extendNamedType(existingType);\n } // Get the extended root operation types.\n\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return != null) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n\n var operationTypes = {\n query: schemaConfig.query && schemaConfig.query.name,\n mutation: schemaConfig.mutation && schemaConfig.mutation.name,\n subscription: schemaConfig.subscription && schemaConfig.subscription.name\n };\n\n if (schemaDef) {\n var _iteratorNormalCompletion3 = true;\n var _didIteratorError3 = false;\n var _iteratorError3 = undefined;\n\n try {\n for (var _iterator3 = schemaDef.operationTypes[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n var _ref2 = _step3.value;\n var operation = _ref2.operation;\n var type = _ref2.type;\n operationTypes[operation] = type.name.value;\n }\n } catch (err) {\n _didIteratorError3 = true;\n _iteratorError3 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion3 && _iterator3.return != null) {\n _iterator3.return();\n }\n } finally {\n if (_didIteratorError3) {\n throw _iteratorError3;\n }\n }\n }\n } // Then, incorporate schema definition and all schema extensions.\n\n\n for (var _i = 0, _schemaExts = schemaExts; _i < _schemaExts.length; _i++) {\n var schemaExt = _schemaExts[_i];\n\n if (schemaExt.operationTypes) {\n var _iteratorNormalCompletion4 = true;\n var _didIteratorError4 = false;\n var _iteratorError4 = undefined;\n\n try {\n for (var _iterator4 = schemaExt.operationTypes[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {\n var _ref4 = _step4.value;\n var _operation = _ref4.operation;\n var _type = _ref4.type;\n operationTypes[_operation] = _type.name.value;\n }\n } catch (err) {\n _didIteratorError4 = true;\n _iteratorError4 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion4 && _iterator4.return != null) {\n _iterator4.return();\n }\n } finally {\n if (_didIteratorError4) {\n throw _iteratorError4;\n }\n }\n }\n }\n } // Support both original legacy names and extended legacy names.\n\n\n var allowedLegacyNames = schemaConfig.allowedLegacyNames.concat(options && options.allowedLegacyNames || []); // Then produce and return a Schema with these types.\n\n return new _type_schema__WEBPACK_IMPORTED_MODULE_8__[/* GraphQLSchema */ \"a\"]({\n // Note: While this could make early assertions to get the correctly\n // typed values, that would throw immediately while type system\n // validation with validateSchema() will produce more actionable results.\n query: getMaybeTypeByName(operationTypes.query),\n mutation: getMaybeTypeByName(operationTypes.mutation),\n subscription: getMaybeTypeByName(operationTypes.subscription),\n types: Object(_polyfills_objectValues__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])(typeMap),\n directives: getMergedDirectives(),\n astNode: schemaDef || schemaConfig.astNode,\n extensionASTNodes: schemaConfig.extensionASTNodes.concat(schemaExts),\n allowedLegacyNames: allowedLegacyNames\n }); // Below are functions used for producing this schema that have closed over\n // this scope and have access to the schema, cache, and newly defined types.\n\n function replaceType(type) {\n if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_11__[/* isListType */ \"J\"])(type)) {\n return new _type_definition__WEBPACK_IMPORTED_MODULE_11__[/* GraphQLList */ \"d\"](replaceType(type.ofType));\n } else if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_11__[/* isNonNullType */ \"L\"])(type)) {\n return new _type_definition__WEBPACK_IMPORTED_MODULE_11__[/* GraphQLNonNull */ \"e\"](replaceType(type.ofType));\n }\n\n return replaceNamedType(type);\n }\n\n function replaceNamedType(type) {\n return typeMap[type.name];\n }\n\n function getMaybeTypeByName(typeName) {\n return typeName ? typeMap[typeName] : null;\n }\n\n function getMergedDirectives() {\n var existingDirectives = schema.getDirectives().map(extendDirective);\n !existingDirectives ? Object(_jsutils_invariant__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(0, 'schema must have default directives') : void 0;\n return existingDirectives.concat(directiveDefs.map(function (node) {\n return astBuilder.buildDirective(node);\n }));\n }\n\n function extendNamedType(type) {\n if (Object(_type_introspection__WEBPACK_IMPORTED_MODULE_9__[/* isIntrospectionType */ \"n\"])(type) || Object(_type_scalars__WEBPACK_IMPORTED_MODULE_10__[/* isSpecifiedScalarType */ \"f\"])(type)) {\n // Builtin types are not extended.\n return type;\n } else if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_11__[/* isScalarType */ \"R\"])(type)) {\n return extendScalarType(type);\n } else if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_11__[/* isObjectType */ \"N\"])(type)) {\n return extendObjectType(type);\n } else if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_11__[/* isInterfaceType */ \"H\"])(type)) {\n return extendInterfaceType(type);\n } else if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_11__[/* isUnionType */ \"T\"])(type)) {\n return extendUnionType(type);\n } else if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_11__[/* isEnumType */ \"E\"])(type)) {\n return extendEnumType(type);\n } else if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_11__[/* isInputObjectType */ \"F\"])(type)) {\n return extendInputObjectType(type);\n } // Not reachable. All possible types have been considered.\n\n /* istanbul ignore next */\n\n\n throw new Error(\"Unexpected type: \\\"\".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(type), \"\\\".\"));\n }\n\n function extendDirective(directive) {\n var config = directive.toConfig();\n return new _type_directives__WEBPACK_IMPORTED_MODULE_12__[/* GraphQLDirective */ \"c\"](_objectSpread({}, config, {\n args: Object(_jsutils_mapValue__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(config.args, extendArg)\n }));\n }\n\n function extendInputObjectType(type) {\n var config = type.toConfig();\n var extensions = typeExtsMap[config.name] || [];\n var fieldNodes = Object(_polyfills_flatMap__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(extensions, function (node) {\n return node.fields || [];\n });\n return new _type_definition__WEBPACK_IMPORTED_MODULE_11__[/* GraphQLInputObjectType */ \"b\"](_objectSpread({}, config, {\n fields: function fields() {\n return _objectSpread({}, Object(_jsutils_mapValue__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(config.fields, function (field) {\n return _objectSpread({}, field, {\n type: replaceType(field.type)\n });\n }), Object(_jsutils_keyValMap__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(fieldNodes, function (field) {\n return field.name.value;\n }, function (field) {\n return astBuilder.buildInputField(field);\n }));\n },\n extensionASTNodes: config.extensionASTNodes.concat(extensions)\n }));\n }\n\n function extendEnumType(type) {\n var config = type.toConfig();\n var extensions = typeExtsMap[type.name] || [];\n var valueNodes = Object(_polyfills_flatMap__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(extensions, function (node) {\n return node.values || [];\n });\n return new _type_definition__WEBPACK_IMPORTED_MODULE_11__[/* GraphQLEnumType */ \"a\"](_objectSpread({}, config, {\n values: _objectSpread({}, config.values, Object(_jsutils_keyValMap__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(valueNodes, function (value) {\n return value.name.value;\n }, function (value) {\n return astBuilder.buildEnumValue(value);\n })),\n extensionASTNodes: config.extensionASTNodes.concat(extensions)\n }));\n }\n\n function extendScalarType(type) {\n var config = type.toConfig();\n var extensions = typeExtsMap[config.name] || [];\n return new _type_definition__WEBPACK_IMPORTED_MODULE_11__[/* GraphQLScalarType */ \"g\"](_objectSpread({}, config, {\n extensionASTNodes: config.extensionASTNodes.concat(extensions)\n }));\n }\n\n function extendObjectType(type) {\n var config = type.toConfig();\n var extensions = typeExtsMap[config.name] || [];\n var interfaceNodes = Object(_polyfills_flatMap__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(extensions, function (node) {\n return node.interfaces || [];\n });\n var fieldNodes = Object(_polyfills_flatMap__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(extensions, function (node) {\n return node.fields || [];\n });\n return new _type_definition__WEBPACK_IMPORTED_MODULE_11__[/* GraphQLObjectType */ \"f\"](_objectSpread({}, config, {\n interfaces: function interfaces() {\n return [].concat(type.getInterfaces().map(replaceNamedType), interfaceNodes.map(function (node) {\n return astBuilder.getNamedType(node);\n }));\n },\n fields: function fields() {\n return _objectSpread({}, Object(_jsutils_mapValue__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(config.fields, extendField), Object(_jsutils_keyValMap__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(fieldNodes, function (node) {\n return node.name.value;\n }, function (node) {\n return astBuilder.buildField(node);\n }));\n },\n extensionASTNodes: config.extensionASTNodes.concat(extensions)\n }));\n }\n\n function extendInterfaceType(type) {\n var config = type.toConfig();\n var extensions = typeExtsMap[config.name] || [];\n var fieldNodes = Object(_polyfills_flatMap__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(extensions, function (node) {\n return node.fields || [];\n });\n return new _type_definition__WEBPACK_IMPORTED_MODULE_11__[/* GraphQLInterfaceType */ \"c\"](_objectSpread({}, config, {\n fields: function fields() {\n return _objectSpread({}, Object(_jsutils_mapValue__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(config.fields, extendField), Object(_jsutils_keyValMap__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(fieldNodes, function (node) {\n return node.name.value;\n }, function (node) {\n return astBuilder.buildField(node);\n }));\n },\n extensionASTNodes: config.extensionASTNodes.concat(extensions)\n }));\n }\n\n function extendUnionType(type) {\n var config = type.toConfig();\n var extensions = typeExtsMap[config.name] || [];\n var typeNodes = Object(_polyfills_flatMap__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(extensions, function (node) {\n return node.types || [];\n });\n return new _type_definition__WEBPACK_IMPORTED_MODULE_11__[/* GraphQLUnionType */ \"h\"](_objectSpread({}, config, {\n types: function types() {\n return [].concat(type.getTypes().map(replaceNamedType), typeNodes.map(function (node) {\n return astBuilder.getNamedType(node);\n }));\n },\n extensionASTNodes: config.extensionASTNodes.concat(extensions)\n }));\n }\n\n function extendField(field) {\n return _objectSpread({}, field, {\n type: replaceType(field.type),\n args: Object(_jsutils_mapValue__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(field.args, extendArg)\n });\n }\n\n function extendArg(arg) {\n return _objectSpread({}, arg, {\n type: replaceType(arg.type)\n });\n }\n}", "title": "" }, { "docid": "a3ee4c7f911f0084af2dd5422524d39c", "score": "0.50922495", "text": "function extendSchema(schema, documentAST, options) {\n !Object(__WEBPACK_IMPORTED_MODULE_7__type_schema__[\"b\" /* isSchema */])(schema) ? Object(__WEBPACK_IMPORTED_MODULE_0__jsutils_invariant__[\"a\" /* default */])(0, 'Must provide valid GraphQLSchema') : void 0;\n !(documentAST && documentAST.kind === __WEBPACK_IMPORTED_MODULE_12__language_kinds__[\"a\" /* Kind */].DOCUMENT) ? Object(__WEBPACK_IMPORTED_MODULE_0__jsutils_invariant__[\"a\" /* default */])(0, 'Must provide valid Document AST') : void 0;\n\n if (!options || !(options.assumeValid || options.assumeValidSDL)) {\n Object(__WEBPACK_IMPORTED_MODULE_5__validation_validate__[\"b\" /* assertValidSDLExtension */])(documentAST, schema);\n } // Collect the type definitions and extensions found in the document.\n\n\n var typeDefinitionMap = Object.create(null);\n var typeExtensionsMap = Object.create(null); // New directives and types are separate because a directives and types can\n // have the same name. For example, a type named \"skip\".\n\n var directiveDefinitions = [];\n var schemaDef; // Schema extensions are collected which may add additional operation types.\n\n var schemaExtensions = [];\n\n for (var i = 0; i < documentAST.definitions.length; i++) {\n var def = documentAST.definitions[i];\n\n if (def.kind === __WEBPACK_IMPORTED_MODULE_12__language_kinds__[\"a\" /* Kind */].SCHEMA_DEFINITION) {\n schemaDef = def;\n } else if (def.kind === __WEBPACK_IMPORTED_MODULE_12__language_kinds__[\"a\" /* Kind */].SCHEMA_EXTENSION) {\n schemaExtensions.push(def);\n } else if (Object(__WEBPACK_IMPORTED_MODULE_13__language_predicates__[\"b\" /* isTypeDefinitionNode */])(def)) {\n // Sanity check that none of the defined types conflict with the\n // schema's existing types.\n var typeName = def.name.value;\n\n if (schema.getType(typeName)) {\n throw new __WEBPACK_IMPORTED_MODULE_6__error_GraphQLError__[\"a\" /* GraphQLError */](\"Type \\\"\".concat(typeName, \"\\\" already exists in the schema. It cannot also \") + 'be defined in this type definition.', [def]);\n }\n\n typeDefinitionMap[typeName] = def;\n } else if (Object(__WEBPACK_IMPORTED_MODULE_13__language_predicates__[\"c\" /* isTypeExtensionNode */])(def)) {\n // Sanity check that this type extension exists within the\n // schema's existing types.\n var extendedTypeName = def.name.value;\n var existingType = schema.getType(extendedTypeName);\n\n if (!existingType) {\n throw new __WEBPACK_IMPORTED_MODULE_6__error_GraphQLError__[\"a\" /* GraphQLError */](\"Cannot extend type \\\"\".concat(extendedTypeName, \"\\\" because it does not \") + 'exist in the existing schema.', [def]);\n }\n\n checkExtensionNode(existingType, def);\n var existingTypeExtensions = typeExtensionsMap[extendedTypeName];\n typeExtensionsMap[extendedTypeName] = existingTypeExtensions ? existingTypeExtensions.concat([def]) : [def];\n } else if (def.kind === __WEBPACK_IMPORTED_MODULE_12__language_kinds__[\"a\" /* Kind */].DIRECTIVE_DEFINITION) {\n var directiveName = def.name.value;\n var existingDirective = schema.getDirective(directiveName);\n\n if (existingDirective) {\n throw new __WEBPACK_IMPORTED_MODULE_6__error_GraphQLError__[\"a\" /* GraphQLError */](\"Directive \\\"\".concat(directiveName, \"\\\" already exists in the schema. It \") + 'cannot be redefined.', [def]);\n }\n\n directiveDefinitions.push(def);\n }\n } // If this document contains no new types, extensions, or directives then\n // return the same unmodified GraphQLSchema instance.\n\n\n if (Object.keys(typeExtensionsMap).length === 0 && Object.keys(typeDefinitionMap).length === 0 && directiveDefinitions.length === 0 && schemaExtensions.length === 0 && !schemaDef) {\n return schema;\n }\n\n var astBuilder = new __WEBPACK_IMPORTED_MODULE_4__buildASTSchema__[\"a\" /* ASTDefinitionBuilder */](typeDefinitionMap, options, function (typeRef) {\n var typeName = typeRef.name.value;\n var existingType = schema.getType(typeName);\n\n if (existingType) {\n return extendNamedType(existingType);\n }\n\n throw new __WEBPACK_IMPORTED_MODULE_6__error_GraphQLError__[\"a\" /* GraphQLError */](\"Unknown type: \\\"\".concat(typeName, \"\\\". Ensure that this type exists \") + 'either in the original schema, or is added in a type definition.', [typeRef]);\n });\n var extendTypeCache = Object.create(null); // Get the extended root operation types.\n\n var operationTypes = {\n query: extendMaybeNamedType(schema.getQueryType()),\n mutation: extendMaybeNamedType(schema.getMutationType()),\n subscription: extendMaybeNamedType(schema.getSubscriptionType())\n };\n\n if (schemaDef) {\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = schemaDef.operationTypes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var _ref2 = _step.value;\n var operation = _ref2.operation,\n type = _ref2.type;\n\n if (operationTypes[operation]) {\n throw new Error(\"Must provide only one \".concat(operation, \" type in schema.\"));\n } // Note: While this could make early assertions to get the correctly\n // typed values, that would throw immediately while type system\n // validation with validateSchema() will produce more actionable results.\n\n\n operationTypes[operation] = astBuilder.buildType(type);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n } // Then, incorporate schema definition and all schema extensions.\n\n\n for (var _i = 0; _i < schemaExtensions.length; _i++) {\n var schemaExtension = schemaExtensions[_i];\n\n if (schemaExtension.operationTypes) {\n var _iteratorNormalCompletion12 = true;\n var _didIteratorError12 = false;\n var _iteratorError12 = undefined;\n\n try {\n for (var _iterator12 = schemaExtension.operationTypes[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = true) {\n var _ref4 = _step12.value;\n var operation = _ref4.operation,\n type = _ref4.type;\n\n if (operationTypes[operation]) {\n throw new Error(\"Must provide only one \".concat(operation, \" type in schema.\"));\n } // Note: While this could make early assertions to get the correctly\n // typed values, that would throw immediately while type system\n // validation with validateSchema() will produce more actionable results.\n\n\n operationTypes[operation] = astBuilder.buildType(type);\n }\n } catch (err) {\n _didIteratorError12 = true;\n _iteratorError12 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion12 && _iterator12.return != null) {\n _iterator12.return();\n }\n } finally {\n if (_didIteratorError12) {\n throw _iteratorError12;\n }\n }\n }\n }\n }\n\n var schemaExtensionASTNodes = schemaExtensions ? schema.extensionASTNodes ? schema.extensionASTNodes.concat(schemaExtensions) : schemaExtensions : schema.extensionASTNodes;\n var types = Object(__WEBPACK_IMPORTED_MODULE_3__jsutils_objectValues__[\"a\" /* default */])(schema.getTypeMap()).map(function (type) {\n return extendNamedType(type);\n }).concat(Object(__WEBPACK_IMPORTED_MODULE_3__jsutils_objectValues__[\"a\" /* default */])(typeDefinitionMap).map(function (type) {\n return astBuilder.buildType(type);\n })); // Support both original legacy names and extended legacy names.\n\n var allowedLegacyNames = schema.__allowedLegacyNames.concat(options && options.allowedLegacyNames || []); // Then produce and return a Schema with these types.\n\n\n return new __WEBPACK_IMPORTED_MODULE_7__type_schema__[\"a\" /* GraphQLSchema */](_objectSpread({}, operationTypes, {\n types: types,\n directives: getMergedDirectives(),\n astNode: schema.astNode,\n extensionASTNodes: schemaExtensionASTNodes,\n allowedLegacyNames: allowedLegacyNames\n })); // Below are functions used for producing this schema that have closed over\n // this scope and have access to the schema, cache, and newly defined types.\n\n function getMergedDirectives() {\n var existingDirectives = schema.getDirectives().map(extendDirective);\n !existingDirectives ? Object(__WEBPACK_IMPORTED_MODULE_0__jsutils_invariant__[\"a\" /* default */])(0, 'schema must have default directives') : void 0;\n return existingDirectives.concat(directiveDefinitions.map(function (node) {\n return astBuilder.buildDirective(node);\n }));\n }\n\n function extendMaybeNamedType(type) {\n return type ? extendNamedType(type) : null;\n }\n\n function extendNamedType(type) {\n if (Object(__WEBPACK_IMPORTED_MODULE_8__type_introspection__[\"g\" /* isIntrospectionType */])(type) || Object(__WEBPACK_IMPORTED_MODULE_9__type_scalars__[\"d\" /* isSpecifiedScalarType */])(type)) {\n // Builtin types are not extended.\n return type;\n }\n\n var name = type.name;\n\n if (!extendTypeCache[name]) {\n if (Object(__WEBPACK_IMPORTED_MODULE_10__type_definition__[\"B\" /* isScalarType */])(type)) {\n extendTypeCache[name] = extendScalarType(type);\n } else if (Object(__WEBPACK_IMPORTED_MODULE_10__type_definition__[\"x\" /* isObjectType */])(type)) {\n extendTypeCache[name] = extendObjectType(type);\n } else if (Object(__WEBPACK_IMPORTED_MODULE_10__type_definition__[\"s\" /* isInterfaceType */])(type)) {\n extendTypeCache[name] = extendInterfaceType(type);\n } else if (Object(__WEBPACK_IMPORTED_MODULE_10__type_definition__[\"D\" /* isUnionType */])(type)) {\n extendTypeCache[name] = extendUnionType(type);\n } else if (Object(__WEBPACK_IMPORTED_MODULE_10__type_definition__[\"p\" /* isEnumType */])(type)) {\n extendTypeCache[name] = extendEnumType(type);\n } else if (Object(__WEBPACK_IMPORTED_MODULE_10__type_definition__[\"q\" /* isInputObjectType */])(type)) {\n extendTypeCache[name] = extendInputObjectType(type);\n }\n }\n\n return extendTypeCache[name];\n }\n\n function extendDirective(directive) {\n return new __WEBPACK_IMPORTED_MODULE_11__type_directives__[\"c\" /* GraphQLDirective */]({\n name: directive.name,\n description: directive.description,\n locations: directive.locations,\n args: extendArgs(directive.args),\n astNode: directive.astNode\n });\n }\n\n function extendInputObjectType(type) {\n var name = type.name;\n var extensionASTNodes = typeExtensionsMap[name] ? type.extensionASTNodes ? type.extensionASTNodes.concat(typeExtensionsMap[name]) : typeExtensionsMap[name] : type.extensionASTNodes;\n return new __WEBPACK_IMPORTED_MODULE_10__type_definition__[\"b\" /* GraphQLInputObjectType */]({\n name: name,\n description: type.description,\n fields: function fields() {\n return extendInputFieldMap(type);\n },\n astNode: type.astNode,\n extensionASTNodes: extensionASTNodes\n });\n }\n\n function extendInputFieldMap(type) {\n var newFieldMap = Object.create(null);\n var oldFieldMap = type.getFields();\n\n var _arr = Object.keys(oldFieldMap);\n\n for (var _i2 = 0; _i2 < _arr.length; _i2++) {\n var _fieldName = _arr[_i2];\n var _field = oldFieldMap[_fieldName];\n newFieldMap[_fieldName] = {\n description: _field.description,\n type: extendType(_field.type),\n defaultValue: _field.defaultValue,\n astNode: _field.astNode\n };\n } // If there are any extensions to the fields, apply those here.\n\n\n var extensions = typeExtensionsMap[type.name];\n\n if (extensions) {\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = extensions[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var extension = _step2.value;\n var _iteratorNormalCompletion3 = true;\n var _didIteratorError3 = false;\n var _iteratorError3 = undefined;\n\n try {\n for (var _iterator3 = extension.fields[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n var field = _step3.value;\n var fieldName = field.name.value;\n\n if (oldFieldMap[fieldName]) {\n throw new __WEBPACK_IMPORTED_MODULE_6__error_GraphQLError__[\"a\" /* GraphQLError */](\"Field \\\"\".concat(type.name, \".\").concat(fieldName, \"\\\" already exists in the \") + 'schema. It cannot also be defined in this type extension.', [field]);\n }\n\n newFieldMap[fieldName] = astBuilder.buildInputField(field);\n }\n } catch (err) {\n _didIteratorError3 = true;\n _iteratorError3 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion3 && _iterator3.return != null) {\n _iterator3.return();\n }\n } finally {\n if (_didIteratorError3) {\n throw _iteratorError3;\n }\n }\n }\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return != null) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n }\n\n return newFieldMap;\n }\n\n function extendEnumType(type) {\n var name = type.name;\n var extensionASTNodes = typeExtensionsMap[name] ? type.extensionASTNodes ? type.extensionASTNodes.concat(typeExtensionsMap[name]) : typeExtensionsMap[name] : type.extensionASTNodes;\n return new __WEBPACK_IMPORTED_MODULE_10__type_definition__[\"a\" /* GraphQLEnumType */]({\n name: name,\n description: type.description,\n values: extendValueMap(type),\n astNode: type.astNode,\n extensionASTNodes: extensionASTNodes\n });\n }\n\n function extendValueMap(type) {\n var newValueMap = Object.create(null);\n var oldValueMap = Object(__WEBPACK_IMPORTED_MODULE_1__jsutils_keyMap__[\"a\" /* default */])(type.getValues(), function (value) {\n return value.name;\n });\n\n var _arr2 = Object.keys(oldValueMap);\n\n for (var _i3 = 0; _i3 < _arr2.length; _i3++) {\n var _valueName = _arr2[_i3];\n var _value = oldValueMap[_valueName];\n newValueMap[_valueName] = {\n name: _value.name,\n description: _value.description,\n value: _value.value,\n deprecationReason: _value.deprecationReason,\n astNode: _value.astNode\n };\n } // If there are any extensions to the values, apply those here.\n\n\n var extensions = typeExtensionsMap[type.name];\n\n if (extensions) {\n var _iteratorNormalCompletion4 = true;\n var _didIteratorError4 = false;\n var _iteratorError4 = undefined;\n\n try {\n for (var _iterator4 = extensions[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {\n var extension = _step4.value;\n var _iteratorNormalCompletion5 = true;\n var _didIteratorError5 = false;\n var _iteratorError5 = undefined;\n\n try {\n for (var _iterator5 = extension.values[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {\n var value = _step5.value;\n var valueName = value.name.value;\n\n if (oldValueMap[valueName]) {\n throw new __WEBPACK_IMPORTED_MODULE_6__error_GraphQLError__[\"a\" /* GraphQLError */](\"Enum value \\\"\".concat(type.name, \".\").concat(valueName, \"\\\" already exists in the \") + 'schema. It cannot also be defined in this type extension.', [value]);\n }\n\n newValueMap[valueName] = astBuilder.buildEnumValue(value);\n }\n } catch (err) {\n _didIteratorError5 = true;\n _iteratorError5 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion5 && _iterator5.return != null) {\n _iterator5.return();\n }\n } finally {\n if (_didIteratorError5) {\n throw _iteratorError5;\n }\n }\n }\n }\n } catch (err) {\n _didIteratorError4 = true;\n _iteratorError4 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion4 && _iterator4.return != null) {\n _iterator4.return();\n }\n } finally {\n if (_didIteratorError4) {\n throw _iteratorError4;\n }\n }\n }\n }\n\n return newValueMap;\n }\n\n function extendScalarType(type) {\n var name = type.name;\n var extensionASTNodes = typeExtensionsMap[name] ? type.extensionASTNodes ? type.extensionASTNodes.concat(typeExtensionsMap[name]) : typeExtensionsMap[name] : type.extensionASTNodes;\n return new __WEBPACK_IMPORTED_MODULE_10__type_definition__[\"g\" /* GraphQLScalarType */]({\n name: name,\n description: type.description,\n astNode: type.astNode,\n extensionASTNodes: extensionASTNodes,\n serialize: type.serialize,\n parseValue: type.parseValue,\n parseLiteral: type.parseLiteral\n });\n }\n\n function extendObjectType(type) {\n var name = type.name;\n var extensionASTNodes = typeExtensionsMap[name] ? type.extensionASTNodes ? type.extensionASTNodes.concat(typeExtensionsMap[name]) : typeExtensionsMap[name] : type.extensionASTNodes;\n return new __WEBPACK_IMPORTED_MODULE_10__type_definition__[\"f\" /* GraphQLObjectType */]({\n name: name,\n description: type.description,\n interfaces: function interfaces() {\n return extendImplementedInterfaces(type);\n },\n fields: function fields() {\n return extendFieldMap(type);\n },\n astNode: type.astNode,\n extensionASTNodes: extensionASTNodes,\n isTypeOf: type.isTypeOf\n });\n }\n\n function extendArgs(args) {\n return Object(__WEBPACK_IMPORTED_MODULE_2__jsutils_keyValMap__[\"a\" /* default */])(args, function (arg) {\n return arg.name;\n }, function (arg) {\n return {\n type: extendType(arg.type),\n defaultValue: arg.defaultValue,\n description: arg.description,\n astNode: arg.astNode\n };\n });\n }\n\n function extendInterfaceType(type) {\n var name = type.name;\n var extensionASTNodes = typeExtensionsMap[name] ? type.extensionASTNodes ? type.extensionASTNodes.concat(typeExtensionsMap[name]) : typeExtensionsMap[name] : type.extensionASTNodes;\n return new __WEBPACK_IMPORTED_MODULE_10__type_definition__[\"c\" /* GraphQLInterfaceType */]({\n name: type.name,\n description: type.description,\n fields: function fields() {\n return extendFieldMap(type);\n },\n astNode: type.astNode,\n extensionASTNodes: extensionASTNodes,\n resolveType: type.resolveType\n });\n }\n\n function extendUnionType(type) {\n var name = type.name;\n var extensionASTNodes = typeExtensionsMap[name] ? type.extensionASTNodes ? type.extensionASTNodes.concat(typeExtensionsMap[name]) : typeExtensionsMap[name] : type.extensionASTNodes;\n return new __WEBPACK_IMPORTED_MODULE_10__type_definition__[\"h\" /* GraphQLUnionType */]({\n name: name,\n description: type.description,\n types: function types() {\n return extendPossibleTypes(type);\n },\n astNode: type.astNode,\n resolveType: type.resolveType,\n extensionASTNodes: extensionASTNodes\n });\n }\n\n function extendPossibleTypes(type) {\n var possibleTypes = type.getTypes().map(extendNamedType); // If there are any extensions to the union, apply those here.\n\n var extensions = typeExtensionsMap[type.name];\n\n if (extensions) {\n var _iteratorNormalCompletion6 = true;\n var _didIteratorError6 = false;\n var _iteratorError6 = undefined;\n\n try {\n for (var _iterator6 = extensions[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) {\n var extension = _step6.value;\n var _iteratorNormalCompletion7 = true;\n var _didIteratorError7 = false;\n var _iteratorError7 = undefined;\n\n try {\n for (var _iterator7 = extension.types[Symbol.iterator](), _step7; !(_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done); _iteratorNormalCompletion7 = true) {\n var namedType = _step7.value;\n // Note: While this could make early assertions to get the correctly\n // typed values, that would throw immediately while type system\n // validation with validateSchema() will produce more actionable results.\n possibleTypes.push(astBuilder.buildType(namedType));\n }\n } catch (err) {\n _didIteratorError7 = true;\n _iteratorError7 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion7 && _iterator7.return != null) {\n _iterator7.return();\n }\n } finally {\n if (_didIteratorError7) {\n throw _iteratorError7;\n }\n }\n }\n }\n } catch (err) {\n _didIteratorError6 = true;\n _iteratorError6 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion6 && _iterator6.return != null) {\n _iterator6.return();\n }\n } finally {\n if (_didIteratorError6) {\n throw _iteratorError6;\n }\n }\n }\n }\n\n return possibleTypes;\n }\n\n function extendImplementedInterfaces(type) {\n var interfaces = type.getInterfaces().map(extendNamedType); // If there are any extensions to the interfaces, apply those here.\n\n var extensions = typeExtensionsMap[type.name];\n\n if (extensions) {\n var _iteratorNormalCompletion8 = true;\n var _didIteratorError8 = false;\n var _iteratorError8 = undefined;\n\n try {\n for (var _iterator8 = extensions[Symbol.iterator](), _step8; !(_iteratorNormalCompletion8 = (_step8 = _iterator8.next()).done); _iteratorNormalCompletion8 = true) {\n var extension = _step8.value;\n var _iteratorNormalCompletion9 = true;\n var _didIteratorError9 = false;\n var _iteratorError9 = undefined;\n\n try {\n for (var _iterator9 = extension.interfaces[Symbol.iterator](), _step9; !(_iteratorNormalCompletion9 = (_step9 = _iterator9.next()).done); _iteratorNormalCompletion9 = true) {\n var namedType = _step9.value;\n // Note: While this could make early assertions to get the correctly\n // typed values, that would throw immediately while type system\n // validation with validateSchema() will produce more actionable results.\n interfaces.push(astBuilder.buildType(namedType));\n }\n } catch (err) {\n _didIteratorError9 = true;\n _iteratorError9 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion9 && _iterator9.return != null) {\n _iterator9.return();\n }\n } finally {\n if (_didIteratorError9) {\n throw _iteratorError9;\n }\n }\n }\n }\n } catch (err) {\n _didIteratorError8 = true;\n _iteratorError8 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion8 && _iterator8.return != null) {\n _iterator8.return();\n }\n } finally {\n if (_didIteratorError8) {\n throw _iteratorError8;\n }\n }\n }\n }\n\n return interfaces;\n }\n\n function extendFieldMap(type) {\n var newFieldMap = Object.create(null);\n var oldFieldMap = type.getFields();\n\n var _arr3 = Object.keys(oldFieldMap);\n\n for (var _i4 = 0; _i4 < _arr3.length; _i4++) {\n var _fieldName2 = _arr3[_i4];\n var _field2 = oldFieldMap[_fieldName2];\n newFieldMap[_fieldName2] = {\n description: _field2.description,\n deprecationReason: _field2.deprecationReason,\n type: extendType(_field2.type),\n args: extendArgs(_field2.args),\n astNode: _field2.astNode,\n resolve: _field2.resolve\n };\n } // If there are any extensions to the fields, apply those here.\n\n\n var extensions = typeExtensionsMap[type.name];\n\n if (extensions) {\n var _iteratorNormalCompletion10 = true;\n var _didIteratorError10 = false;\n var _iteratorError10 = undefined;\n\n try {\n for (var _iterator10 = extensions[Symbol.iterator](), _step10; !(_iteratorNormalCompletion10 = (_step10 = _iterator10.next()).done); _iteratorNormalCompletion10 = true) {\n var extension = _step10.value;\n var _iteratorNormalCompletion11 = true;\n var _didIteratorError11 = false;\n var _iteratorError11 = undefined;\n\n try {\n for (var _iterator11 = extension.fields[Symbol.iterator](), _step11; !(_iteratorNormalCompletion11 = (_step11 = _iterator11.next()).done); _iteratorNormalCompletion11 = true) {\n var field = _step11.value;\n var fieldName = field.name.value;\n\n if (oldFieldMap[fieldName]) {\n throw new __WEBPACK_IMPORTED_MODULE_6__error_GraphQLError__[\"a\" /* GraphQLError */](\"Field \\\"\".concat(type.name, \".\").concat(fieldName, \"\\\" already exists in the \") + 'schema. It cannot also be defined in this type extension.', [field]);\n }\n\n newFieldMap[fieldName] = astBuilder.buildField(field);\n }\n } catch (err) {\n _didIteratorError11 = true;\n _iteratorError11 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion11 && _iterator11.return != null) {\n _iterator11.return();\n }\n } finally {\n if (_didIteratorError11) {\n throw _iteratorError11;\n }\n }\n }\n }\n } catch (err) {\n _didIteratorError10 = true;\n _iteratorError10 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion10 && _iterator10.return != null) {\n _iterator10.return();\n }\n } finally {\n if (_didIteratorError10) {\n throw _iteratorError10;\n }\n }\n }\n }\n\n return newFieldMap;\n }\n\n function extendType(typeDef) {\n if (Object(__WEBPACK_IMPORTED_MODULE_10__type_definition__[\"u\" /* isListType */])(typeDef)) {\n return Object(__WEBPACK_IMPORTED_MODULE_10__type_definition__[\"d\" /* GraphQLList */])(extendType(typeDef.ofType));\n }\n\n if (Object(__WEBPACK_IMPORTED_MODULE_10__type_definition__[\"w\" /* isNonNullType */])(typeDef)) {\n return Object(__WEBPACK_IMPORTED_MODULE_10__type_definition__[\"e\" /* GraphQLNonNull */])(extendType(typeDef.ofType));\n }\n\n return extendNamedType(typeDef);\n }\n}", "title": "" }, { "docid": "5a1677b2a9e9e1bb5466473ce30a36f4", "score": "0.5090526", "text": "allowedSchema(req) {\n let disabled;\n let type;\n const schema = _.filter(self.schema, function (field) {\n return (!field.editPermission && !field.viewPermission) ||\n (field.editPermission && self.apos.permission.can(req, field.editPermission.action, field.editPermission.type)) ||\n (field.viewPermission && self.apos.permission.can(req, field.viewPermission.action, field.viewPermission.type)) ||\n false;\n });\n const typeIndex = _.findIndex(schema, { name: 'type' });\n if (typeIndex !== -1) {\n // This option exists so that the\n // @apostrophecms/option-overrides and @apostrophecms/workflow modules,\n // if present, can be used together to disable various types based\n // on locale settings\n disabled = self.apos.page.getOption(req, 'disabledTypes');\n if (disabled) {\n // Take care to clone so we don't wind up modifying\n // the original schema, the allowed schema is only\n // a shallow clone of the array so far\n type = _.cloneDeep(schema[typeIndex]);\n type.choices = _.filter(type.choices, function (choice) {\n return !_.includes(disabled, choice.value);\n });\n // Make sure the allowed schema refers to the clone,\n // not the original\n schema[typeIndex] = type;\n }\n }\n return schema;\n }", "title": "" }, { "docid": "fa0321be40b15a7bdfeb39827a9ed094", "score": "0.50816476", "text": "function findValuesRemovedFromEnums(oldSchema, newSchema) {\n\t var oldTypeMap = oldSchema.getTypeMap();\n\t var newTypeMap = newSchema.getTypeMap();\n\n\t var valuesRemovedFromEnums = [];\n\t Object.keys(oldTypeMap).forEach(function (typeName) {\n\t var oldType = oldTypeMap[typeName];\n\t var newType = newTypeMap[typeName];\n\t if (!isEnumType(oldType) || !isEnumType(newType)) {\n\t return;\n\t }\n\t var valuesInNewEnum = Object.create(null);\n\t newType.getValues().forEach(function (value) {\n\t valuesInNewEnum[value.name] = true;\n\t });\n\t oldType.getValues().forEach(function (value) {\n\t if (!valuesInNewEnum[value.name]) {\n\t valuesRemovedFromEnums.push({\n\t type: BreakingChangeType.VALUE_REMOVED_FROM_ENUM,\n\t description: value.name + ' was removed from enum type ' + typeName + '.'\n\t });\n\t }\n\t });\n\t });\n\t return valuesRemovedFromEnums;\n\t}", "title": "" }, { "docid": "ff6c1fc4421571655556488bfbb6fe6c", "score": "0.5078523", "text": "function doTypesConflict(type1, type2) {\n if ((0, _definition.isListType)(type1)) {\n return (0, _definition.isListType)(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true;\n }\n\n if ((0, _definition.isListType)(type2)) {\n return true;\n }\n\n if ((0, _definition.isNonNullType)(type1)) {\n return (0, _definition.isNonNullType)(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true;\n }\n\n if ((0, _definition.isNonNullType)(type2)) {\n return true;\n }\n\n if ((0, _definition.isLeafType)(type1) || (0, _definition.isLeafType)(type2)) {\n return type1 !== type2;\n }\n\n return false;\n} // Given a selection set, return the collection of fields (a mapping of response", "title": "" }, { "docid": "ff6c1fc4421571655556488bfbb6fe6c", "score": "0.5078523", "text": "function doTypesConflict(type1, type2) {\n if ((0, _definition.isListType)(type1)) {\n return (0, _definition.isListType)(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true;\n }\n\n if ((0, _definition.isListType)(type2)) {\n return true;\n }\n\n if ((0, _definition.isNonNullType)(type1)) {\n return (0, _definition.isNonNullType)(type2) ? doTypesConflict(type1.ofType, type2.ofType) : true;\n }\n\n if ((0, _definition.isNonNullType)(type2)) {\n return true;\n }\n\n if ((0, _definition.isLeafType)(type1) || (0, _definition.isLeafType)(type2)) {\n return type1 !== type2;\n }\n\n return false;\n} // Given a selection set, return the collection of fields (a mapping of response", "title": "" } ]
980867e88c09e7da7c76e1224f9e70cb
4 byte signature "PACK" 4 byte version number 4 byte number of objects
[ { "docid": "ac39db2efe10c115c5d6c28e11c63860", "score": "0.50455505", "text": "function $header(chunk, offset) {\n // Wait till we have at least 12 bytes\n if (chunk.length < offset + 12) return;\n // Verify the first 8 bytes to be as expected\n if (!(\n chunk[offset + 0] == 0x50 && chunk[offset + 1] == 0x41 &&\n chunk[offset + 2] == 0x43 && chunk[offset + 3] == 0x4b &&\n chunk[offset + 4] == 0x00 && chunk[offset + 5] == 0x00 &&\n chunk[offset + 6] == 0x00 && chunk[offset + 7] == 0x02)) {\n throw new Error(\"Bad header in packfile\");\n }\n // Read the number of objects in the stream.\n count = ((chunk[offset + 8] << 24) |\n (chunk[offset + 9] << 16) |\n (chunk[offset + 10] << 8) |\n chunk[offset + 11]) >>> 0;\n state = $objhead;\n return [\n { version: 2,\n count: count },\n offset + 12\n ];\n }", "title": "" } ]
[ { "docid": "860a333953e695526cda8c9694789cdc", "score": "0.61356086", "text": "signatureExport(obj, sig) {\n const sigR = sig.subarray(0, 32);\n const sigS = sig.subarray(32, 64);\n if (new BN(sigR).cmp(ecparams.n) >= 0) return 1;\n if (new BN(sigS).cmp(ecparams.n) >= 0) return 1;\n const {\n output\n } = obj; // Prepare R\n\n let r = output.subarray(4, 4 + 33);\n r[0] = 0x00;\n r.set(sigR, 1);\n let lenR = 33;\n let posR = 0;\n\n for (; lenR > 1 && r[posR] === 0x00 && !(r[posR + 1] & 0x80); --lenR, ++posR);\n\n r = r.subarray(posR);\n if (r[0] & 0x80) return 1;\n if (lenR > 1 && r[0] === 0x00 && !(r[1] & 0x80)) return 1; // Prepare S\n\n let s = output.subarray(6 + 33, 6 + 33 + 33);\n s[0] = 0x00;\n s.set(sigS, 1);\n let lenS = 33;\n let posS = 0;\n\n for (; lenS > 1 && s[posS] === 0x00 && !(s[posS + 1] & 0x80); --lenS, ++posS);\n\n s = s.subarray(posS);\n if (s[0] & 0x80) return 1;\n if (lenS > 1 && s[0] === 0x00 && !(s[1] & 0x80)) return 1; // Set output length for return\n\n obj.outputlen = 6 + lenR + lenS; // Output in specified format\n // 0x30 [total-length] 0x02 [R-length] [R] 0x02 [S-length] [S]\n\n output[0] = 0x30;\n output[1] = obj.outputlen - 2;\n output[2] = 0x02;\n output[3] = r.length;\n output.set(r, 4);\n output[4 + lenR] = 0x02;\n output[5 + lenR] = s.length;\n output.set(s, 6 + lenR);\n return 0;\n }", "title": "" }, { "docid": "7e3010008b1e5b016a5ae25d04dc5b97", "score": "0.6071625", "text": "signatureExport (obj, sig) {\n const sigR = sig.subarray(0, 32)\n const sigS = sig.subarray(32, 64)\n if (new BN(sigR).cmp(ecparams.n) >= 0) return 1\n if (new BN(sigS).cmp(ecparams.n) >= 0) return 1\n\n const { output } = obj\n\n // Prepare R\n let r = output.subarray(4, 4 + 33)\n r[0] = 0x00\n r.set(sigR, 1)\n\n let lenR = 33\n let posR = 0\n for (; lenR > 1 && r[posR] === 0x00 && !(r[posR + 1] & 0x80); --lenR, ++posR);\n\n r = r.subarray(posR)\n if (r[0] & 0x80) return 1\n if (lenR > 1 && (r[0] === 0x00) && !(r[1] & 0x80)) return 1\n\n // Prepare S\n let s = output.subarray(6 + 33, 6 + 33 + 33)\n s[0] = 0x00\n s.set(sigS, 1)\n\n let lenS = 33\n let posS = 0\n for (; lenS > 1 && s[posS] === 0x00 && !(s[posS + 1] & 0x80); --lenS, ++posS);\n\n s = s.subarray(posS)\n if (s[0] & 0x80) return 1\n if (lenS > 1 && (s[0] === 0x00) && !(s[1] & 0x80)) return 1\n\n // Set output length for return\n obj.outputlen = 6 + lenR + lenS\n\n // Output in specified format\n // 0x30 [total-length] 0x02 [R-length] [R] 0x02 [S-length] [S]\n output[0] = 0x30\n output[1] = obj.outputlen - 2\n output[2] = 0x02\n output[3] = r.length\n output.set(r, 4)\n output[4 + lenR] = 0x02\n output[5 + lenR] = s.length\n output.set(s, 6 + lenR)\n\n return 0\n }", "title": "" }, { "docid": "99e3c21b4c2e2748cba1178b8d75ed48", "score": "0.60439795", "text": "function pack(obj) {\n\tconst list = [];\n\t\n\t// .timelist is an array\n\tconst timelistLengthBytes = Bin.alloc(2);\n\ttimelistLengthBytes.writeUInt16BE(obj.timelist.length);\n\tlist.push(timelistLengthBytes);\n\tvar timelistIndex = 0;\n\tvar timelistLen = obj.timelist.length;\n\tfor (var timelistIndex = 0; timelistIndex < timelistLen; timelistIndex++) {\n\t\tvar timelistArrBytes = Bin.alloc(8);\n\t\ttimelistArrBytes.writeDoubleBE(obj.timelist[timelistIndex].getTime(), 0);\n\t\tlist.push(timelistArrBytes);\n\t}\n\tvar uidBytes = Bin.from(obj.uid);\n\tvar uidSize = uidBytes.length;\n\tvar uidSizeBytes = Bin.alloc(2);\n\tuidSizeBytes.writeUInt16BE(uidSize, 0);\n\tlist.push(uidSizeBytes);\n\tlist.push(uidBytes);\n\n\tvar messageSenderUidBytes = Bin.from(obj.message.senderUid);\n\tvar messageSenderUidSize = messageSenderUidBytes.length;\n\tvar messageSenderUidSizeBytes = Bin.alloc(2);\n\tmessageSenderUidSizeBytes.writeUInt16BE(messageSenderUidSize, 0);\n\tlist.push(messageSenderUidSizeBytes);\n\tlist.push(messageSenderUidBytes);\n\t// .message.recipients is an array\n\tconst messageRecipientsLengthBytes = Bin.alloc(2);\n\tmessageRecipientsLengthBytes.writeUInt16BE(obj.message.recipients.length);\n\tlist.push(messageRecipientsLengthBytes);\n\tvar messageRecipientsIndex = 0;\n\tvar messageRecipientsLen = obj.message.recipients.length;\n\tfor (var messageRecipientsIndex = 0; messageRecipientsIndex < messageRecipientsLen; messageRecipientsIndex++) {\n\t\tvar messageRecipientsArrBytes = Bin.from(obj.message.recipients[messageRecipientsIndex]);\n\t\tvar messageRecipientsArrSize = messageRecipientsArrBytes.length;\n\t\tvar messageRecipientsArrSizeBytes = Bin.alloc(2);\n\t\tmessageRecipientsArrSizeBytes.writeUInt16BE(messageRecipientsArrSize, 0);\n\t\tlist.push(messageRecipientsArrSizeBytes);\n\t\tlist.push(messageRecipientsArrBytes);\n\t}\n\tvar messageMessageBytes = Bin.from(obj.message.message);\n\tvar messageMessageSize = messageMessageBytes.length;\n\tvar messageMessageSizeBytes = Bin.alloc(2);\n\tmessageMessageSizeBytes.writeUInt16BE(messageMessageSize, 0);\n\tlist.push(messageMessageSizeBytes);\n\tlist.push(messageMessageBytes);\n\n\tvar messageSampleIdBytes = Bin.alloc(4);\n\tmessageSampleIdBytes.writeUInt32BE(obj.message.sample.id, 0);\n\tlist.push(messageSampleIdBytes);\n\tvar messageSampleKeyBytes = Bin.from(obj.message.sample.key);\n\tvar messageSampleKeySize = messageSampleKeyBytes.length;\n\tvar messageSampleKeySizeBytes = Bin.alloc(2);\n\tmessageSampleKeySizeBytes.writeUInt16BE(messageSampleKeySize, 0);\n\tlist.push(messageSampleKeySizeBytes);\n\tlist.push(messageSampleKeyBytes);\n\tvar messageSampleValueBytes = Bin.from(obj.message.sample.value);\n\tvar messageSampleValueSize = messageSampleValueBytes.length;\n\tvar messageSampleValueSizeBytes = Bin.alloc(2);\n\tmessageSampleValueSizeBytes.writeUInt16BE(messageSampleValueSize, 0);\n\tlist.push(messageSampleValueSizeBytes);\n\tlist.push(messageSampleValueBytes);\n\tvar messageSampleEnabledBytes = Bin.alloc(1);\n\tmessageSampleEnabledBytes.writeUInt8(obj.message.sample.enabled ? 0x01 : 0x00);\n\tlist.push(messageSampleEnabledBytes);\n\t// .message.sample.sample2list is an array\n\tconst messageSampleSample2listLengthBytes = Bin.alloc(2);\n\tmessageSampleSample2listLengthBytes.writeUInt16BE(obj.message.sample.sample2list.length);\n\tlist.push(messageSampleSample2listLengthBytes);\n\tvar messageSampleSample2listIndex = 0;\n\tvar messageSampleSample2listLen = obj.message.sample.sample2list.length;\n\tfor (var messageSampleSample2listIndex = 0; messageSampleSample2listIndex < messageSampleSample2listLen; messageSampleSample2listIndex++) {\n\n\t\tvar messageSampleSample2listNameBytes = Bin.from(obj.message.sample.sample2list[messageSampleSample2listIndex].name);\n\t\tvar messageSampleSample2listNameSize = messageSampleSample2listNameBytes.length;\n\t\tvar messageSampleSample2listNameSizeBytes = Bin.alloc(2);\n\t\tmessageSampleSample2listNameSizeBytes.writeUInt16BE(messageSampleSample2listNameSize, 0);\n\t\tlist.push(messageSampleSample2listNameSizeBytes);\n\t\tlist.push(messageSampleSample2listNameBytes);\n\t}\n\tvar messageSample_eightBytes = Bin.alloc(1);\n\tmessageSample_eightBytes.writeInt8(obj.message.sample._eight, 0);\n\tlist.push(messageSample_eightBytes);\n\tvar messageSample_sixteenBytes = Bin.alloc(2);\n\tmessageSample_sixteenBytes.writeInt16LE(obj.message.sample._sixteen, 0);\n\tlist.push(messageSample_sixteenBytes);\n\tvar messageSample_thirtytwoBytes = Bin.alloc(4);\n\tmessageSample_thirtytwoBytes.writeInt32LE(obj.message.sample._thirtytwo, 0);\n\tlist.push(messageSample_thirtytwoBytes);\n\tvar messageSampleDatetimeBytes = Bin.alloc(8);\n\tmessageSampleDatetimeBytes.writeDoubleBE(obj.message.sample.datetime.getTime(), 0);\n\tlist.push(messageSampleDatetimeBytes);\n\tvar messageTimestampBytes = Bin.alloc(4);\n\tmessageTimestampBytes.writeUInt32BE(obj.message.timestamp, 0);\n\tlist.push(messageTimestampBytes);\n\n\treturn Buffer.concat(list);\n}", "title": "" }, { "docid": "c99e460156e963f2bc1124c203de5ae7", "score": "0.5971896", "text": "function packBytes(octets) {\r\n var state = new Array();\r\n if (!octets || octets.length % 4)\r\n return;\r\n\r\n state[0] = new Array(); state[1] = new Array(); \r\n state[2] = new Array(); state[3] = new Array();\r\n for (var j=0; j<octets.length; j+= 4) {\r\n state[0][j/4] = octets[j];\r\n state[1][j/4] = octets[j+1];\r\n state[2][j/4] = octets[j+2];\r\n state[3][j/4] = octets[j+3];\r\n }\r\n return state; \r\n }", "title": "" }, { "docid": "02e4813d444de32c2ce1e5d4205d46db", "score": "0.5964411", "text": "function v3(v4,v5) {\n let v6 = v4;\n const v9 = new Uint32Array(v6);\n // v9 = .object(ofGroup: Uint32Array, withProperties: [\"buffer\", \"byteOffset\", \"byteLength\", \"constructor\", \"__proto__\", \"length\"], withMethods: [\"keys\", \"lastIndexOf\", \"some\", \"includes\", \"reduceRight\", \"find\", \"fill\", \"map\", \"reverse\", \"values\", \"entries\", \"forEach\", \"reduce\", \"filter\", \"join\", \"copyWithin\", \"sort\", \"subarray\", \"set\", \"slice\", \"every\", \"indexOf\", \"findIndex\"])\n const v10 = v9.subarray(2634965076,v6);\n // v10 = .object(ofGroup: Uint32Array, withProperties: [\"__proto__\", \"byteOffset\", \"constructor\", \"length\", \"buffer\", \"byteLength\"], withMethods: [\"filter\", \"copyWithin\", \"fill\", \"set\", \"forEach\", \"some\", \"keys\", \"every\", \"reduceRight\", \"map\", \"reverse\", \"subarray\", \"values\", \"indexOf\", \"reduce\", \"join\", \"slice\", \"sort\", \"find\", \"includes\", \"findIndex\", \"lastIndexOf\", \"entries\"])\n const v12 = 100;\n // v12 = .integer\n const v14 = v9.includes(0,1);\n // v14 = .boolean\n const v15 = \"length\";\n // v15 = .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 v16 = 0;\n // v16 = .integer\n const v17 = 100;\n // v17 = .integer\n const v18 = 1;\n // v18 = .integer\n const v20 = [13.37,13.37,13.37,13.37];\n // v20 = .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 v21 = v20.__proto__;\n // v21 = .object()\n}", "title": "" }, { "docid": "65ba199e2f55e7f36a43e83025411611", "score": "0.5901065", "text": "function Signature() {\n return new _xdrJsSerialize2.default.FixedOpaque(64);\n}", "title": "" }, { "docid": "a58ac1fa5ad83273875bbbb5b8c0c594", "score": "0.57867604", "text": "serializeNumber4Bytes(data){\n let buffer = Buffer(4);\n buffer[3] = data & 0xff;\n buffer[2] = data>>8 & 0xff;\n buffer[1] = data>>16 & 0xff;\n buffer[0] = data>>24 & 0xff;\n\n return buffer;\n }", "title": "" }, { "docid": "ece57529e10944254bdb782af05a9160", "score": "0.57761073", "text": "function parse_RC4Header(blob, length) {\n\t\tvar o = {};\n\t\tvar vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4); length -= 4;\n\t\tif(vers.Major != 1 || vers.Minor != 1) throw 'unrecognized version code ' + vers.Major + ' : ' + vers.Minor;\n\t\to.Salt = blob.read_shift(16);\n\t\to.EncryptedVerifier = blob.read_shift(16);\n\t\to.EncryptedVerifierHash = blob.read_shift(16);\n\t\treturn o;\n\t}", "title": "" }, { "docid": "80ebc1fd734f2e430e1c69f7d5f52c9d", "score": "0.57608557", "text": "function finishObject (offset, count, flags) {\n offset = offset | 0;\n count = count | 0;\n flags = flags | 0;\n if ((flags & BIG | 0) == 0) {\n bytesU8[offset + 1 | 0] = count;\n } else {\n bytesU8[offset + 1 | 0] = count >> 24 & 0xFF;\n bytesU8[offset + 2 | 0] = count >> 16 & 0xFF;\n bytesU8[offset + 3 | 0] = count >> 8 & 0xFF;\n bytesU8[offset + 4 | 0] = count & 0xFF;\n }\n }", "title": "" }, { "docid": "f97b9d72487362cb25c85414d689fbad", "score": "0.5758734", "text": "function BufferPack(){var e,r=false,n=this;n._DeArray=function(e,r,n){return[e.slice(r,r+n)]};n._EnArray=function(e,r,n,i){for(var o=0;o<n;e[r+o]=i[o]?i[o]:0,o++);};n._DeChar=function(e,r){return String.fromCharCode(e[r])};n._EnChar=function(e,r,n){e[r]=n.charCodeAt(0)};n._DeInt=function(n,i){var o=r?e.len-1:0,a=r?-1:1,s=o+a*e.len,f,u,c;for(f=0,u=o,c=1;u!=s;f+=n[i+u]*c,u+=a,c*=256);if(e.bSigned&&f&Math.pow(2,e.len*8-1)){f-=Math.pow(2,e.len*8)}return f};n._EnInt=function(n,i,o){var a=r?e.len-1:0,s=r?-1:1,f=a+s*e.len,u;o=o<e.min?e.min:o>e.max?e.max:o;for(u=a;u!=f;n[i+u]=o&255,u+=s,o>>=8);};n._DeString=function(e,r,n){for(var i=new Array(n),o=0;o<n;i[o]=String.fromCharCode(e[r+o]),o++);return i.join(\"\")};n._EnString=function(e,r,n,i){for(var o,a=0;a<n;e[r+a]=(o=i.charCodeAt(a))?o:0,a++);};n._DeNullString=function(e,r,i,o){var a=n._DeString(e,r,i,o);return a.substring(0,a.length-1)};n._De754=function(n,i){var o,a,s,f,u,c,l,p,h,d;l=e.mLen,p=e.len*8-e.mLen-1,d=(1<<p)-1,h=d>>1;f=r?0:e.len-1;u=r?1:-1;o=n[i+f];f+=u;c=-7;for(a=o&(1<<-c)-1,o>>=-c,c+=p;c>0;a=a*256+n[i+f],f+=u,c-=8);for(s=a&(1<<-c)-1,a>>=-c,c+=l;c>0;s=s*256+n[i+f],f+=u,c-=8);switch(a){case 0:a=1-h;break;case d:return s?NaN:(o?-1:1)*Infinity;default:s=s+Math.pow(2,l);a=a-h;break}return(o?-1:1)*s*Math.pow(2,a-l)};n._En754=function(n,i,o){var a,s,f,u,c,l,p,h,d,g;p=e.mLen,h=e.len*8-e.mLen-1,g=(1<<h)-1,d=g>>1;a=o<0?1:0;o=Math.abs(o);if(isNaN(o)||o==Infinity){f=isNaN(o)?1:0;s=g}else{s=Math.floor(Math.log(o)/Math.LN2);if(o*(l=Math.pow(2,-s))<1){s--;l*=2}if(s+d>=1){o+=e.rt/l}else{o+=e.rt*Math.pow(2,1-d)}if(o*l>=2){s++;l/=2}if(s+d>=g){f=0;s=g}else if(s+d>=1){f=(o*l-1)*Math.pow(2,p);s=s+d}else{f=o*Math.pow(2,d-1)*Math.pow(2,p);s=0}}for(u=r?e.len-1:0,c=r?-1:1;p>=8;n[i+u]=f&255,u+=c,f/=256,p-=8);for(s=s<<p|f,h+=p;h>0;n[i+u]=s&255,u+=c,s/=256,h-=8);n[i+u-c]|=a*128};n._sPattern=\"(\\\\d+)?([AxcbBhHsSfdiIlL])(\\\\(([a-zA-Z0-9]+)\\\\))?\";n._lenLut={A:1,x:1,c:1,b:1,B:1,h:2,H:2,s:1,S:1,f:4,d:8,i:4,I:4,l:4,L:4};n._elLut={A:{en:n._EnArray,de:n._DeArray},s:{en:n._EnString,de:n._DeString},S:{en:n._EnString,de:n._DeNullString},c:{en:n._EnChar,de:n._DeChar},b:{en:n._EnInt,de:n._DeInt,len:1,bSigned:true,min:-Math.pow(2,7),max:Math.pow(2,7)-1},B:{en:n._EnInt,de:n._DeInt,len:1,bSigned:false,min:0,max:Math.pow(2,8)-1},h:{en:n._EnInt,de:n._DeInt,len:2,bSigned:true,min:-Math.pow(2,15),max:Math.pow(2,15)-1},H:{en:n._EnInt,de:n._DeInt,len:2,bSigned:false,min:0,max:Math.pow(2,16)-1},i:{en:n._EnInt,de:n._DeInt,len:4,bSigned:true,min:-Math.pow(2,31),max:Math.pow(2,31)-1},I:{en:n._EnInt,de:n._DeInt,len:4,bSigned:false,min:0,max:Math.pow(2,32)-1},l:{en:n._EnInt,de:n._DeInt,len:4,bSigned:true,min:-Math.pow(2,31),max:Math.pow(2,31)-1},L:{en:n._EnInt,de:n._DeInt,len:4,bSigned:false,min:0,max:Math.pow(2,32)-1},f:{en:n._En754,de:n._De754,len:4,mLen:23,rt:Math.pow(2,-24)-Math.pow(2,-77)},d:{en:n._En754,de:n._De754,len:8,mLen:52,rt:0}};n._UnpackSeries=function(r,n,i,o){for(var a=e.de,s=[],f=0;f<r;s.push(a(i,o+f*n)),f++);return s};n._PackSeries=function(r,n,i,o,a,s){for(var f=e.en,u=0;u<r;f(i,o+u*n,a[s+u]),u++);};n._zip=function(e,r){var n={};for(var i=0;i<e.length;i++){n[e[i]]=r[i]}return n};n.unpack=function(n,i,o){r=n.charAt(0)!=\"<\";o=o?o:0;var a=new RegExp(this._sPattern,\"g\");var s;var f;var u;var c=[];var l=[];while(s=a.exec(n)){f=s[1]==undefined||s[1]==\"\"?1:parseInt(s[1]);if(s[2]===\"S\"){f=0;while(i[o+f]!==0){f++}f++}u=this._lenLut[s[2]];if(o+f*u>i.length){return undefined}switch(s[2]){case\"A\":case\"s\":case\"S\":l.push(this._elLut[s[2]].de(i,o,f));break;case\"c\":case\"b\":case\"B\":case\"h\":case\"H\":case\"i\":case\"I\":case\"l\":case\"L\":case\"f\":case\"d\":e=this._elLut[s[2]];l.push(this._UnpackSeries(f,u,i,o));break}c.push(s[4]);o+=f*u}l=Array.prototype.concat.apply([],l);if(c.indexOf(undefined)!==-1){return l}else{return this._zip(c,l)}};n.packTo=function(n,i,o,a){r=n.charAt(0)!=\"<\";var s=new RegExp(this._sPattern,\"g\");var f;var u;var c;var l=0;var p;while(f=s.exec(n)){u=f[1]==undefined||f[1]==\"\"?1:parseInt(f[1]);if(f[2]===\"S\"){u=a[l].length+1}c=this._lenLut[f[2]];if(o+u*c>i.length){return false}switch(f[2]){case\"A\":case\"s\":case\"S\":if(l+1>a.length){return false}this._elLut[f[2]].en(i,o,u,a[l]);l+=1;break;case\"c\":case\"b\":case\"B\":case\"h\":case\"H\":case\"i\":case\"I\":case\"l\":case\"L\":case\"f\":case\"d\":e=this._elLut[f[2]];if(l+u>a.length){return false}this._PackSeries(u,c,i,o,a,l);l+=u;break;case\"x\":for(p=0;p<u;p++){i[o+p]=0}break}o+=u*c}return i};n.pack=function(e,r){return this.packTo(e,new Buffer(this.calcLength(e,r)),0,r)};n.calcLength=function(e,r){var n=new RegExp(this._sPattern,\"g\"),i,o=0,a=0;while(i=n.exec(e)){var s=(i[1]==undefined||i[1]==\"\"?1:parseInt(i[1]))*this._lenLut[i[2]];if(i[2]===\"S\"){s=r[a].length+1}o+=s;a++}return o}}", "title": "" }, { "docid": "c4509b91334b5a9d2f383ead0bfaaedd", "score": "0.5730729", "text": "function $pack(byte) {\n if ((version & 0xff) === byte) {\n version >>>= 8;\n return version ? $pack : $version;\n }\n throw new Error(\"Invalid packfile header\");\n }", "title": "" }, { "docid": "ac73161b40eca2ee8d514af09813bf81", "score": "0.571641", "text": "function parse_RC4Header(blob) {\n var o = {};\n var vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4);\n if (vers.Major != 1 || vers.Minor != 1) throw 'unrecognized version code ' + vers.Major + ' : ' + vers.Minor;\n o.Salt = blob.read_shift(16);\n o.EncryptedVerifier = blob.read_shift(16);\n o.EncryptedVerifierHash = blob.read_shift(16);\n return o;\n }", "title": "" }, { "docid": "ac73161b40eca2ee8d514af09813bf81", "score": "0.571641", "text": "function parse_RC4Header(blob) {\n var o = {};\n var vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4);\n if (vers.Major != 1 || vers.Minor != 1) throw 'unrecognized version code ' + vers.Major + ' : ' + vers.Minor;\n o.Salt = blob.read_shift(16);\n o.EncryptedVerifier = blob.read_shift(16);\n o.EncryptedVerifierHash = blob.read_shift(16);\n return o;\n }", "title": "" }, { "docid": "02605dc6c71d9d137d5214dfc3144e03", "score": "0.57154465", "text": "function parse_RC4Header(blob, length) {\n\tvar o = {};\n\tvar vers = o.EncryptionVersionInfo = parse_Version(blob, 4); length -= 4;\n\tif(vers.Major != 1 || vers.Minor != 1) throw 'unrecognized version code ' + vers.Major + ' : ' + vers.Minor;\n\to.Salt = blob.read_shift(16);\n\to.EncryptedVerifier = blob.read_shift(16);\n\to.EncryptedVerifierHash = blob.read_shift(16);\n\treturn o;\n}", "title": "" }, { "docid": "49685fc57b02079103cc3f2011150dae", "score": "0.5709025", "text": "function parse_RC4Header(blob, length) {\n\tvar o = {};\n\tvar vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4); length -= 4;\n\tif(vers.Major != 1 || vers.Minor != 1) throw 'unrecognized version code ' + vers.Major + ' : ' + vers.Minor;\n\to.Salt = blob.read_shift(16);\n\to.EncryptedVerifier = blob.read_shift(16);\n\to.EncryptedVerifierHash = blob.read_shift(16);\n\treturn o;\n}", "title": "" }, { "docid": "49685fc57b02079103cc3f2011150dae", "score": "0.5709025", "text": "function parse_RC4Header(blob, length) {\n\tvar o = {};\n\tvar vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4); length -= 4;\n\tif(vers.Major != 1 || vers.Minor != 1) throw 'unrecognized version code ' + vers.Major + ' : ' + vers.Minor;\n\to.Salt = blob.read_shift(16);\n\to.EncryptedVerifier = blob.read_shift(16);\n\to.EncryptedVerifierHash = blob.read_shift(16);\n\treturn o;\n}", "title": "" }, { "docid": "49685fc57b02079103cc3f2011150dae", "score": "0.5709025", "text": "function parse_RC4Header(blob, length) {\n\tvar o = {};\n\tvar vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4); length -= 4;\n\tif(vers.Major != 1 || vers.Minor != 1) throw 'unrecognized version code ' + vers.Major + ' : ' + vers.Minor;\n\to.Salt = blob.read_shift(16);\n\to.EncryptedVerifier = blob.read_shift(16);\n\to.EncryptedVerifierHash = blob.read_shift(16);\n\treturn o;\n}", "title": "" }, { "docid": "be618e4b7d3174a96000fbf9bafcef75", "score": "0.57074565", "text": "function parse_RC4Header(blob) {\n\tvar o = {};\n\tvar vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4);\n\tif(vers.Major != 1 || vers.Minor != 1) throw 'unrecognized version code ' + vers.Major + ' : ' + vers.Minor;\n\to.Salt = blob.read_shift(16);\n\to.EncryptedVerifier = blob.read_shift(16);\n\to.EncryptedVerifierHash = blob.read_shift(16);\n\treturn o;\n}", "title": "" }, { "docid": "be618e4b7d3174a96000fbf9bafcef75", "score": "0.57074565", "text": "function parse_RC4Header(blob) {\n\tvar o = {};\n\tvar vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4);\n\tif(vers.Major != 1 || vers.Minor != 1) throw 'unrecognized version code ' + vers.Major + ' : ' + vers.Minor;\n\to.Salt = blob.read_shift(16);\n\to.EncryptedVerifier = blob.read_shift(16);\n\to.EncryptedVerifierHash = blob.read_shift(16);\n\treturn o;\n}", "title": "" }, { "docid": "be618e4b7d3174a96000fbf9bafcef75", "score": "0.57074565", "text": "function parse_RC4Header(blob) {\n\tvar o = {};\n\tvar vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4);\n\tif(vers.Major != 1 || vers.Minor != 1) throw 'unrecognized version code ' + vers.Major + ' : ' + vers.Minor;\n\to.Salt = blob.read_shift(16);\n\to.EncryptedVerifier = blob.read_shift(16);\n\to.EncryptedVerifierHash = blob.read_shift(16);\n\treturn o;\n}", "title": "" }, { "docid": "be618e4b7d3174a96000fbf9bafcef75", "score": "0.57074565", "text": "function parse_RC4Header(blob) {\n\tvar o = {};\n\tvar vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4);\n\tif(vers.Major != 1 || vers.Minor != 1) throw 'unrecognized version code ' + vers.Major + ' : ' + vers.Minor;\n\to.Salt = blob.read_shift(16);\n\to.EncryptedVerifier = blob.read_shift(16);\n\to.EncryptedVerifierHash = blob.read_shift(16);\n\treturn o;\n}", "title": "" }, { "docid": "be618e4b7d3174a96000fbf9bafcef75", "score": "0.57074565", "text": "function parse_RC4Header(blob) {\n\tvar o = {};\n\tvar vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4);\n\tif(vers.Major != 1 || vers.Minor != 1) throw 'unrecognized version code ' + vers.Major + ' : ' + vers.Minor;\n\to.Salt = blob.read_shift(16);\n\to.EncryptedVerifier = blob.read_shift(16);\n\to.EncryptedVerifierHash = blob.read_shift(16);\n\treturn o;\n}", "title": "" }, { "docid": "be618e4b7d3174a96000fbf9bafcef75", "score": "0.57074565", "text": "function parse_RC4Header(blob) {\n\tvar o = {};\n\tvar vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4);\n\tif(vers.Major != 1 || vers.Minor != 1) throw 'unrecognized version code ' + vers.Major + ' : ' + vers.Minor;\n\to.Salt = blob.read_shift(16);\n\to.EncryptedVerifier = blob.read_shift(16);\n\to.EncryptedVerifierHash = blob.read_shift(16);\n\treturn o;\n}", "title": "" }, { "docid": "40413b345f63cc9b64cbcf38a8b5ccb8", "score": "0.56996816", "text": "function parse_RC4Header(blob) {\n var o = {};\n var vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4);\n if (vers.Major != 1 || vers.Minor != 1) throw 'unrecognized version code ' + vers.Major + ' : ' + vers.Minor;\n o.Salt = blob.read_shift(16);\n o.EncryptedVerifier = blob.read_shift(16);\n o.EncryptedVerifierHash = blob.read_shift(16);\n return o;\n }", "title": "" }, { "docid": "a22f55f391d77ad512fa74d9970ea5e8", "score": "0.56453025", "text": "pack(data) {\n return data;\n }", "title": "" }, { "docid": "51b82234f90fb16d3584f54b2503310b", "score": "0.56317127", "text": "function SigV4Utils(){}", "title": "" }, { "docid": "5c60c407b3bc7040f5320189c1104054", "score": "0.55306184", "text": "function be4_()\n {\n return (hx_() << 28) | (hx_() << 24) | (hx_() << 20) | (hx_() << 16) |\n (hx_() << 12) | (hx_() << 8) | (hx_() << 4) | hx_();\n }", "title": "" }, { "docid": "d4f5faf1b30f7b4994664a662da3f91c", "score": "0.55213183", "text": "static pack () {\n\n }", "title": "" }, { "docid": "ab8c33a27940bf9df8e8829ed7bc1a10", "score": "0.5510833", "text": "pack(data) {\n Object.assign(data, {\n dataSetId: Utilities.normalizeHex(data.dataSetId.toString('hex').padStart(64, '0')),\n dataRootHash: Utilities.normalizeHex(data.dataRootHash.toString('hex').padStart(64, '0')),\n redLitigationHash: Utilities.normalizeHex(data.redLitigationHash.toString('hex').padStart(64, '0')),\n greenLitigationHash: Utilities.normalizeHex(data.greenLitigationHash.toString('hex').padStart(64, '0')),\n blueLitigationHash: Utilities.normalizeHex(data.blueLitigationHash.toString('hex').padStart(64, '0')),\n holdingTimeInMinutes: data.holdingTimeInMinutes.toString(),\n tokenAmountPerHolder: data.tokenAmountPerHolder.toString(),\n dataSizeInBytes: data.dataSizeInBytes.toString(),\n litigationIntervalInMinutes: data.litigationIntervalInMinutes.toString(),\n });\n return data;\n }", "title": "" }, { "docid": "df56e3cd6732053c2487f564946ca680", "score": "0.5499184", "text": "function parse_RC4CryptoHeader(blob, length) {\n\t\tvar o = {};\n\t\tvar vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4); length -= 4;\n\t\tif(vers.Minor != 2) throw new Error('unrecognized minor version code: ' + vers.Minor);\n\t\tif(vers.Major > 4 || vers.Major < 2) throw new Error('unrecognized major version code: ' + vers.Major);\n\t\to.Flags = blob.read_shift(4); length -= 4;\n\t\tvar sz = blob.read_shift(4); length -= 4;\n\t\to.EncryptionHeader = parse_EncryptionHeader(blob, sz); length -= sz;\n\t\to.EncryptionVerifier = parse_EncryptionVerifier(blob, length);\n\t\treturn o;\n\t}", "title": "" }, { "docid": "36884a85dedf8d71757ea7d39c81c8d2", "score": "0.5472371", "text": "function parse_RC4CryptoHeader(blob, length) {\n\tvar o = {};\n\tvar vers = o.EncryptionVersionInfo = parse_Version(blob, 4); length -= 4;\n\tif(vers.Minor != 2) throw 'unrecognized minor version code: ' + vers.Minor;\n\tif(vers.Major > 4 || vers.Major < 2) throw 'unrecognized major version code: ' + vers.Major;\n\to.Flags = blob.read_shift(4); length -= 4;\n\tvar sz = blob.read_shift(4); length -= 4;\n\to.EncryptionHeader = parse_EncryptionHeader(blob, sz); length -= sz;\n\to.EncryptionVerifier = parse_EncryptionVerifier(blob, length);\n\treturn o;\n}", "title": "" }, { "docid": "08475b5aba519dd9ff81f5704160fce6", "score": "0.5431359", "text": "propack() { \n return _pack()\n }", "title": "" }, { "docid": "43bf8edf5fa2a35b91e84a6f9a7917f3", "score": "0.5428597", "text": "function parse_RC4CryptoHeader(blob, length) {\n\tvar o = {};\n\tvar vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4); length -= 4;\n\tif(vers.Minor != 2) throw 'unrecognized minor version code: ' + vers.Minor;\n\tif(vers.Major > 4 || vers.Major < 2) throw 'unrecognized major version code: ' + vers.Major;\n\to.Flags = blob.read_shift(4); length -= 4;\n\tvar sz = blob.read_shift(4); length -= 4;\n\to.EncryptionHeader = parse_EncryptionHeader(blob, sz); length -= sz;\n\to.EncryptionVerifier = parse_EncryptionVerifier(blob, length);\n\treturn o;\n}", "title": "" }, { "docid": "c8edfe5e2595216778c2056988acf2c8", "score": "0.5406686", "text": "writeObject(bytes, crcSoFar, offsetSoFar) {}", "title": "" }, { "docid": "1fb595cb01ec7241019e624fb51603f8", "score": "0.5405159", "text": "function parse_RC4CryptoHeader(blob, length) {\n\tvar o = {};\n\tvar vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4); length -= 4;\n\tif(vers.Minor != 2) throw new Error('unrecognized minor version code: ' + vers.Minor);\n\tif(vers.Major > 4 || vers.Major < 2) throw new Error('unrecognized major version code: ' + vers.Major);\n\to.Flags = blob.read_shift(4); length -= 4;\n\tvar sz = blob.read_shift(4); length -= 4;\n\to.EncryptionHeader = parse_EncryptionHeader(blob, sz); length -= sz;\n\to.EncryptionVerifier = parse_EncryptionVerifier(blob, length);\n\treturn o;\n}", "title": "" }, { "docid": "1fb595cb01ec7241019e624fb51603f8", "score": "0.5405159", "text": "function parse_RC4CryptoHeader(blob, length) {\n\tvar o = {};\n\tvar vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4); length -= 4;\n\tif(vers.Minor != 2) throw new Error('unrecognized minor version code: ' + vers.Minor);\n\tif(vers.Major > 4 || vers.Major < 2) throw new Error('unrecognized major version code: ' + vers.Major);\n\to.Flags = blob.read_shift(4); length -= 4;\n\tvar sz = blob.read_shift(4); length -= 4;\n\to.EncryptionHeader = parse_EncryptionHeader(blob, sz); length -= sz;\n\to.EncryptionVerifier = parse_EncryptionVerifier(blob, length);\n\treturn o;\n}", "title": "" }, { "docid": "1fb595cb01ec7241019e624fb51603f8", "score": "0.5405159", "text": "function parse_RC4CryptoHeader(blob, length) {\n\tvar o = {};\n\tvar vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4); length -= 4;\n\tif(vers.Minor != 2) throw new Error('unrecognized minor version code: ' + vers.Minor);\n\tif(vers.Major > 4 || vers.Major < 2) throw new Error('unrecognized major version code: ' + vers.Major);\n\to.Flags = blob.read_shift(4); length -= 4;\n\tvar sz = blob.read_shift(4); length -= 4;\n\to.EncryptionHeader = parse_EncryptionHeader(blob, sz); length -= sz;\n\to.EncryptionVerifier = parse_EncryptionVerifier(blob, length);\n\treturn o;\n}", "title": "" }, { "docid": "1fb595cb01ec7241019e624fb51603f8", "score": "0.5405159", "text": "function parse_RC4CryptoHeader(blob, length) {\n\tvar o = {};\n\tvar vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4); length -= 4;\n\tif(vers.Minor != 2) throw new Error('unrecognized minor version code: ' + vers.Minor);\n\tif(vers.Major > 4 || vers.Major < 2) throw new Error('unrecognized major version code: ' + vers.Major);\n\to.Flags = blob.read_shift(4); length -= 4;\n\tvar sz = blob.read_shift(4); length -= 4;\n\to.EncryptionHeader = parse_EncryptionHeader(blob, sz); length -= sz;\n\to.EncryptionVerifier = parse_EncryptionVerifier(blob, length);\n\treturn o;\n}", "title": "" }, { "docid": "1fb595cb01ec7241019e624fb51603f8", "score": "0.5405159", "text": "function parse_RC4CryptoHeader(blob, length) {\n\tvar o = {};\n\tvar vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4); length -= 4;\n\tif(vers.Minor != 2) throw new Error('unrecognized minor version code: ' + vers.Minor);\n\tif(vers.Major > 4 || vers.Major < 2) throw new Error('unrecognized major version code: ' + vers.Major);\n\to.Flags = blob.read_shift(4); length -= 4;\n\tvar sz = blob.read_shift(4); length -= 4;\n\to.EncryptionHeader = parse_EncryptionHeader(blob, sz); length -= sz;\n\to.EncryptionVerifier = parse_EncryptionVerifier(blob, length);\n\treturn o;\n}", "title": "" }, { "docid": "1fb595cb01ec7241019e624fb51603f8", "score": "0.5405159", "text": "function parse_RC4CryptoHeader(blob, length) {\n\tvar o = {};\n\tvar vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4); length -= 4;\n\tif(vers.Minor != 2) throw new Error('unrecognized minor version code: ' + vers.Minor);\n\tif(vers.Major > 4 || vers.Major < 2) throw new Error('unrecognized major version code: ' + vers.Major);\n\to.Flags = blob.read_shift(4); length -= 4;\n\tvar sz = blob.read_shift(4); length -= 4;\n\to.EncryptionHeader = parse_EncryptionHeader(blob, sz); length -= sz;\n\to.EncryptionVerifier = parse_EncryptionVerifier(blob, length);\n\treturn o;\n}", "title": "" }, { "docid": "1fb595cb01ec7241019e624fb51603f8", "score": "0.5405159", "text": "function parse_RC4CryptoHeader(blob, length) {\n\tvar o = {};\n\tvar vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4); length -= 4;\n\tif(vers.Minor != 2) throw new Error('unrecognized minor version code: ' + vers.Minor);\n\tif(vers.Major > 4 || vers.Major < 2) throw new Error('unrecognized major version code: ' + vers.Major);\n\to.Flags = blob.read_shift(4); length -= 4;\n\tvar sz = blob.read_shift(4); length -= 4;\n\to.EncryptionHeader = parse_EncryptionHeader(blob, sz); length -= sz;\n\to.EncryptionVerifier = parse_EncryptionVerifier(blob, length);\n\treturn o;\n}", "title": "" }, { "docid": "1fb595cb01ec7241019e624fb51603f8", "score": "0.5405159", "text": "function parse_RC4CryptoHeader(blob, length) {\n\tvar o = {};\n\tvar vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4); length -= 4;\n\tif(vers.Minor != 2) throw new Error('unrecognized minor version code: ' + vers.Minor);\n\tif(vers.Major > 4 || vers.Major < 2) throw new Error('unrecognized major version code: ' + vers.Major);\n\to.Flags = blob.read_shift(4); length -= 4;\n\tvar sz = blob.read_shift(4); length -= 4;\n\to.EncryptionHeader = parse_EncryptionHeader(blob, sz); length -= sz;\n\to.EncryptionVerifier = parse_EncryptionVerifier(blob, length);\n\treturn o;\n}", "title": "" }, { "docid": "89f1cc142b2ee722d630b17a7f378b50", "score": "0.53810215", "text": "function parse_RC4CryptoHeader(blob, length) {\n var o = {};\n var vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4);\n length -= 4;\n if (vers.Minor != 2) throw new Error('unrecognized minor version code: ' + vers.Minor);\n if (vers.Major > 4 || vers.Major < 2) throw new Error('unrecognized major version code: ' + vers.Major);\n o.Flags = blob.read_shift(4);\n length -= 4;\n var sz = blob.read_shift(4);\n length -= 4;\n o.EncryptionHeader = parse_EncryptionHeader(blob, sz);\n length -= sz;\n o.EncryptionVerifier = parse_EncryptionVerifier(blob, length);\n return o;\n }", "title": "" }, { "docid": "89f1cc142b2ee722d630b17a7f378b50", "score": "0.53810215", "text": "function parse_RC4CryptoHeader(blob, length) {\n var o = {};\n var vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4);\n length -= 4;\n if (vers.Minor != 2) throw new Error('unrecognized minor version code: ' + vers.Minor);\n if (vers.Major > 4 || vers.Major < 2) throw new Error('unrecognized major version code: ' + vers.Major);\n o.Flags = blob.read_shift(4);\n length -= 4;\n var sz = blob.read_shift(4);\n length -= 4;\n o.EncryptionHeader = parse_EncryptionHeader(blob, sz);\n length -= sz;\n o.EncryptionVerifier = parse_EncryptionVerifier(blob, length);\n return o;\n }", "title": "" }, { "docid": "d42246efcfeae288b2114ce233ce9c51", "score": "0.5378839", "text": "function FormerLevel4Serialization() { //The original one\n\tvar ret = {\n\t\tdat : Array.from(level.objects),\n\t\twidth : level.width,\n\t\theight : level.height,\n\t\toldflickscreendat: oldflickscreendat.concat([]),\n\t\t//New\n\t\tlvl:CurrentScreen()\n\t};\n\treturn ret;\n}", "title": "" }, { "docid": "effb339d1d8d07eb78658b87bcc38974", "score": "0.5372316", "text": "function objectSig(id, obj) {\n\tvar address = objpath.get(obj, \"estate.0.location.0.string.0\"),\n\t\ttype = objpath.get(obj, \"type.0._\"),\n\t\tetype = objpath.get(obj, \"estate.0.type.0._\"),\n\t\totype = objpath.get(obj, \"estate.0.object.0._\");\n\treturn \"%8d (%12s, %12s, %17s | %s)\".pyfmt(id, type, etype, otype, address);\n}", "title": "" }, { "docid": "f9b7280261b66bbad5b6716a210e674f", "score": "0.5370185", "text": "getBytes() {\n return this.size * 4;\n }", "title": "" }, { "docid": "9281bcdeaa21049a1b8e48e91d2cec64", "score": "0.5368926", "text": "function parse_RC4CryptoHeader(blob, length) {\n var o = {};\n var vers = o.EncryptionVersionInfo = parse_CRYPTOVersion(blob, 4);\n length -= 4;\n if (vers.Minor != 2) throw new Error('unrecognized minor version code: ' + vers.Minor);\n if (vers.Major > 4 || vers.Major < 2) throw new Error('unrecognized major version code: ' + vers.Major);\n o.Flags = blob.read_shift(4);\n length -= 4;\n var sz = blob.read_shift(4);\n length -= 4;\n o.EncryptionHeader = parse_EncryptionHeader(blob, sz);\n length -= sz;\n o.EncryptionVerifier = parse_EncryptionVerifier(blob, length);\n return o;\n }", "title": "" }, { "docid": "716bbb6d0f40749070b6c6ba3b9e6afb", "score": "0.53454745", "text": "signatureImport (output, sig) {\n if (sig.length < 8) return 1\n if (sig.length > 72) return 1\n if (sig[0] !== 0x30) return 1\n if (sig[1] !== sig.length - 2) return 1\n if (sig[2] !== 0x02) return 1\n\n const lenR = sig[3]\n if (lenR === 0) return 1\n if (5 + lenR >= sig.length) return 1\n if (sig[4 + lenR] !== 0x02) return 1\n\n const lenS = sig[5 + lenR]\n if (lenS === 0) return 1\n if ((6 + lenR + lenS) !== sig.length) return 1\n\n if (sig[4] & 0x80) return 1\n if (lenR > 1 && (sig[4] === 0x00) && !(sig[5] & 0x80)) return 1\n\n if (sig[lenR + 6] & 0x80) return 1\n if (lenS > 1 && (sig[lenR + 6] === 0x00) && !(sig[lenR + 7] & 0x80)) return 1\n\n let sigR = sig.subarray(4, 4 + lenR)\n if (sigR.length === 33 && sigR[0] === 0x00) sigR = sigR.subarray(1)\n if (sigR.length > 32) return 1\n\n let sigS = sig.subarray(6 + lenR)\n if (sigS.length === 33 && sigS[0] === 0x00) sigS = sigS.slice(1)\n if (sigS.length > 32) throw new Error('S length is too long')\n\n let r = new BN(sigR)\n if (r.cmp(ecparams.n) >= 0) r = new BN(0)\n\n let s = new BN(sig.subarray(6 + lenR))\n if (s.cmp(ecparams.n) >= 0) s = new BN(0)\n\n output.set(r.toArrayLike(Uint8Array, 'be', 32), 0)\n output.set(s.toArrayLike(Uint8Array, 'be', 32), 32)\n\n return 0\n }", "title": "" }, { "docid": "0b2b64c8ea16e2fe748cb0958db67be6", "score": "0.53315455", "text": "signatureImport(output, sig) {\n if (sig.length < 8) return 1;\n if (sig.length > 72) return 1;\n if (sig[0] !== 0x30) return 1;\n if (sig[1] !== sig.length - 2) return 1;\n if (sig[2] !== 0x02) return 1;\n const lenR = sig[3];\n if (lenR === 0) return 1;\n if (5 + lenR >= sig.length) return 1;\n if (sig[4 + lenR] !== 0x02) return 1;\n const lenS = sig[5 + lenR];\n if (lenS === 0) return 1;\n if (6 + lenR + lenS !== sig.length) return 1;\n if (sig[4] & 0x80) return 1;\n if (lenR > 1 && sig[4] === 0x00 && !(sig[5] & 0x80)) return 1;\n if (sig[lenR + 6] & 0x80) return 1;\n if (lenS > 1 && sig[lenR + 6] === 0x00 && !(sig[lenR + 7] & 0x80)) return 1;\n let sigR = sig.subarray(4, 4 + lenR);\n if (sigR.length === 33 && sigR[0] === 0x00) sigR = sigR.subarray(1);\n if (sigR.length > 32) return 1;\n let sigS = sig.subarray(6 + lenR);\n if (sigS.length === 33 && sigS[0] === 0x00) sigS = sigS.slice(1);\n if (sigS.length > 32) throw new Error('S length is too long');\n let r = new BN(sigR);\n if (r.cmp(ecparams.n) >= 0) r = new BN(0);\n let s = new BN(sig.subarray(6 + lenR));\n if (s.cmp(ecparams.n) >= 0) s = new BN(0);\n output.set(r.toArrayLike(Uint8Array, 'be', 32), 0);\n output.set(s.toArrayLike(Uint8Array, 'be', 32), 32);\n return 0;\n }", "title": "" }, { "docid": "d59e8dd51878c24e7a9cc33cd659bd68", "score": "0.5328634", "text": "function pack(v, data) {\n if (Array.isArray(data)) {\n const [x, y, color] = data\n\n const b = new Buffer(4 + 3)\n b.writeUInt32LE(v, 0)\n encodeEditTo(b, 4, x, y, color)\n return b\n } else {\n const b = new Buffer(4 + data.length)\n b.writeUInt32LE(v, 0)\n data.copy(b, 4)\n return b\n }\n}", "title": "" }, { "docid": "c5bf779a43590bcf90de8b59da75b953", "score": "0.5311372", "text": "function SigV4Utils() {}", "title": "" }, { "docid": "ca69969845925c872afd304402c6e438", "score": "0.5302473", "text": "function BufferPack() {\n // Module-level (private) variables\n var el, bBE = false, m = this;\n\n // Raw byte arrays\n m._DeArray = function (a, p, l) {\n return [a.slice(p,p+l)];\n };\n m._EnArray = function (a, p, l, v) {\n for (var i = 0; i < l; a[p+i] = v[i]?v[i]:0, i++);\n };\n\n // ASCII characters\n m._DeChar = function (a, p) {\n return String.fromCharCode(a[p]);\n };\n m._EnChar = function (a, p, v) {\n a[p] = v.charCodeAt(0);\n };\n\n // Little-endian (un)signed N-byte integers\n m._DeInt = function (a, p) {\n var lsb = bBE?(el.len-1):0, nsb = bBE?-1:1, stop = lsb+nsb*el.len, rv, i, f;\n for (rv = 0, i = lsb, f = 1; i != stop; rv+=(a[p+i]*f), i+=nsb, f*=256);\n if (el.bSigned && (rv & Math.pow(2, el.len*8-1))) {\n rv -= Math.pow(2, el.len*8);\n }\n return rv;\n };\n m._EnInt = function (a, p, v) {\n var lsb = bBE?(el.len-1):0, nsb = bBE?-1:1, stop = lsb+nsb*el.len, i;\n v = (v<el.min)?el.min:(v>el.max)?el.max:v;\n for (i = lsb; i != stop; a[p+i]=v&0xff, i+=nsb, v>>=8);\n };\n\n // ASCII character strings\n m._DeString = function (a, p, l) {\n for (var rv = new Array(l), i = 0; i < l; rv[i] = String.fromCharCode(a[p+i]), i++);\n return rv.join('');\n };\n m._EnString = function (a, p, l, v) {\n for (var t, i = 0; i < l; a[p+i] = (t=v.charCodeAt(i))?t:0, i++);\n };\n\n // ASCII character strings null terminated\n m._DeNullString = function (a, p, l, v) {\n var str = m._DeString(a, p, l, v);\n return str.substring(0, str.length - 1);\n };\n\n // Little-endian N-bit IEEE 754 floating point\n m._De754 = function (a, p) {\n var s, e, m, i, d, nBits, mLen, eLen, eBias, eMax;\n mLen = el.mLen, eLen = el.len*8-el.mLen-1, eMax = (1<<eLen)-1, eBias = eMax>>1;\n\n i = bBE?0:(el.len-1); d = bBE?1:-1; s = a[p+i]; i+=d; nBits = -7;\n for (e = s&((1<<(-nBits))-1), s>>=(-nBits), nBits += eLen; nBits > 0; e=e*256+a[p+i], i+=d, nBits-=8);\n for (m = e&((1<<(-nBits))-1), e>>=(-nBits), nBits += mLen; nBits > 0; m=m*256+a[p+i], i+=d, nBits-=8);\n\n switch (e) {\n case 0:\n // Zero, or denormalized number\n e = 1-eBias;\n break;\n case eMax:\n // NaN, or +/-Infinity\n return m?NaN:((s?-1:1)*Infinity);\n default:\n // Normalized number\n m = m + Math.pow(2, mLen);\n e = e - eBias;\n break;\n }\n return (s?-1:1) * m * Math.pow(2, e-mLen);\n };\n m._En754 = function (a, p, v) {\n var s, e, m, i, d, c, mLen, eLen, eBias, eMax;\n mLen = el.mLen, eLen = el.len*8-el.mLen-1, eMax = (1<<eLen)-1, eBias = eMax>>1;\n\n s = v<0?1:0;\n v = Math.abs(v);\n if (isNaN(v) || (v == Infinity)) {\n m = isNaN(v)?1:0;\n e = eMax;\n } else {\n e = Math.floor(Math.log(v)/Math.LN2);\t\t\t// Calculate log2 of the value\n\n if (v*(c = Math.pow(2, -e)) < 1) {\n e--; c*=2;\t\t\t\t\t\t// Math.log() isn't 100% reliable\n }\n\n // Round by adding 1/2 the significand's LSD\n if (e+eBias >= 1) {\n v += el.rt/c; // Normalized: mLen significand digits\n } else {\n v += el.rt*Math.pow(2, 1-eBias); // Denormalized: <= mLen significand digits\n }\n\n if (v*c >= 2) {\n e++; c/=2;\t\t\t\t\t\t// Rounding can increment the exponent\n }\n\n if (e+eBias >= eMax) {\n // Overflow\n m = 0;\n e = eMax;\n } else if (e+eBias >= 1) {\n // Normalized - term order matters, as Math.pow(2, 52-e) and v*Math.pow(2, 52) can overflow\n m = (v*c-1)*Math.pow(2, mLen);\n e = e + eBias;\n } else {\n // Denormalized - also catches the '0' case, somewhat by chance\n m = v*Math.pow(2, eBias-1)*Math.pow(2, mLen);\n e = 0;\n }\n }\n\n for (i = bBE?(el.len-1):0, d=bBE?-1:1; mLen >= 8; a[p+i]=m&0xff, i+=d, m/=256, mLen-=8);\n for (e=(e<<mLen)|m, eLen+=mLen; eLen > 0; a[p+i]=e&0xff, i+=d, e/=256, eLen-=8);\n a[p+i-d] |= s*128;\n };\n\n // Class data\n m._sPattern = '(\\\\d+)?([AxcbBhHsSfdiIlL])(\\\\(([a-zA-Z0-9]+)\\\\))?';\n m._lenLut = {'A': 1, 'x': 1, 'c': 1, 'b': 1, 'B': 1, 'h': 2, 'H': 2, 's': 1,\n 'S': 1, 'f': 4, 'd': 8, 'i': 4, 'I': 4, 'l': 4, 'L': 4};\n m._elLut = {'A': {en: m._EnArray, de: m._DeArray},\n 's': {en: m._EnString, de: m._DeString},\n 'S': {en: m._EnString, de: m._DeNullString},\n 'c': {en: m._EnChar, de: m._DeChar},\n 'b': {en: m._EnInt, de: m._DeInt, len: 1, bSigned: true, min: -Math.pow(2, 7), max: Math.pow(2, 7) - 1},\n 'B': {en: m._EnInt, de: m._DeInt, len: 1, bSigned: false, min: 0, max: Math.pow(2, 8) - 1},\n 'h': {en: m._EnInt, de: m._DeInt, len: 2, bSigned: true, min: -Math.pow(2, 15), max: Math.pow(2, 15) - 1},\n 'H': {en: m._EnInt, de: m._DeInt, len: 2, bSigned: false, min: 0, max: Math.pow(2, 16) - 1},\n 'i': {en: m._EnInt, de: m._DeInt, len: 4, bSigned: true, min: -Math.pow(2, 31), max: Math.pow(2, 31) - 1},\n 'I': {en: m._EnInt, de: m._DeInt, len: 4, bSigned: false, min: 0, max: Math.pow(2, 32) - 1},\n 'l': {en: m._EnInt, de: m._DeInt, len: 4, bSigned: true, min: -Math.pow(2, 31), max: Math.pow(2, 31) - 1},\n 'L': {en: m._EnInt, de: m._DeInt, len: 4, bSigned: false, min: 0, max: Math.pow(2, 32) - 1},\n 'f': {en: m._En754, de: m._De754, len: 4, mLen: 23, rt: Math.pow(2, -24) - Math.pow(2, -77)},\n 'd': {en: m._En754, de: m._De754, len: 8, mLen: 52, rt: 0}};\n\n // Unpack a series of n elements of size s from array a at offset p with fxn\n m._UnpackSeries = function (n, s, a, p) {\n for (var fxn = el.de, rv = [], i = 0; i < n; rv.push(fxn(a, p+i*s)), i++);\n return rv;\n };\n\n // Pack a series of n elements of size s from array v at offset i to array a at offset p with fxn\n m._PackSeries = function (n, s, a, p, v, i) {\n for (var fxn = el.en, o = 0; o < n; fxn(a, p+o*s, v[i+o]), o++);\n };\n\n m._zip = function (keys, values) {\n var result = {};\n\n for (var i = 0; i < keys.length; i++) {\n result[keys[i]] = values[i];\n }\n\n return result;\n }\n\n // Unpack the octet array a, beginning at offset p, according to the fmt string\n m.unpack = function (fmt, a, p) {\n // Set the private bBE flag based on the format string - assume big-endianness\n bBE = (fmt.charAt(0) != '<');\n\n p = p?p:0;\n var re = new RegExp(this._sPattern, 'g');\n var m;\n var n;\n var s;\n var rk = [];\n var rv = [];\n \n while (m = re.exec(fmt)) {\n n = ((m[1]==undefined)||(m[1]==''))?1:parseInt(m[1]);\n\n if(m[2] === 'S') { // Null term string support\n n = 0; // Need to deal with empty null term strings\n while(a[p + n] !== 0) {\n n++;\n }\n n++; // Add one for null byte\n }\n\n s = this._lenLut[m[2]];\n\n if ((p + n*s) > a.length) {\n return undefined;\n }\n\n switch (m[2]) {\n case 'A': case 's': case 'S':\n rv.push(this._elLut[m[2]].de(a, p, n));\n break;\n case 'c': case 'b': case 'B': case 'h': case 'H':\n case 'i': case 'I': case 'l': case 'L': case 'f': case 'd':\n el = this._elLut[m[2]];\n rv.push(this._UnpackSeries(n, s, a, p));\n break;\n }\n\n rk.push(m[4]); // Push key on to array\n\n p += n*s;\n } \n\n rv = Array.prototype.concat.apply([], rv)\n\n if(rk.indexOf(undefined) !== -1) {\n return rv;\n } else {\n return this._zip(rk, rv);\n }\n };\n\n // Pack the supplied values into the octet array a, beginning at offset p, according to the fmt string\n m.packTo = function (fmt, a, p, values) {\n // Set the private bBE flag based on the format string - assume big-endianness\n bBE = (fmt.charAt(0) != '<');\n\n var re = new RegExp(this._sPattern, 'g');\n var m;\n var n;\n var s;\n var i = 0;\n var j;\n\n while (m = re.exec(fmt)) {\n n = ((m[1]==undefined)||(m[1]==''))?1:parseInt(m[1]);\n\n // Null term string support\n if(m[2] === 'S') {\n n = values[i].length + 1; // Add one for null byte\n }\n\n s = this._lenLut[m[2]];\n\n if ((p + n*s) > a.length) {\n return false;\n }\n\n switch (m[2]) {\n case 'A': case 's': case 'S':\n if ((i + 1) > values.length) { return false; }\n this._elLut[m[2]].en(a, p, n, values[i]);\n i += 1;\n break;\n case 'c': case 'b': case 'B': case 'h': case 'H':\n case 'i': case 'I': case 'l': case 'L': case 'f': case 'd':\n el = this._elLut[m[2]];\n if ((i + n) > values.length) { return false; }\n this._PackSeries(n, s, a, p, values, i);\n i += n;\n break;\n case 'x':\n for (j = 0; j < n; j++) { a[p+j] = 0; }\n break;\n }\n p += n*s;\n }\n\n return a;\n };\n\n // Pack the supplied values into a new octet array, according to the fmt string\n m.pack = function (fmt, values) {\n return this.packTo(fmt, new Buffer(this.calcLength(fmt, values)), 0, values);\n };\n\n // Determine the number of bytes represented by the format string\n m.calcLength = function (format, values) {\n var re = new RegExp(this._sPattern, 'g'), m, sum = 0, i = 0;\n while (m = re.exec(format)) {\n var n = (((m[1]==undefined)||(m[1]==''))?1:parseInt(m[1])) * this._lenLut[m[2]];\n\n if(m[2] === 'S') {\n n = values[i].length + 1; // Add one for null byte\n }\n\n sum += n;\n i++;\n }\n return sum;\n };\n}", "title": "" }, { "docid": "cc0330c4dd1d9409b67379fc6400c8a9", "score": "0.5274486", "text": "function check_get_mver(blob) {\n if (blob[blob.l] == 0x50 && blob[blob.l + 1] == 0x4b) return [0, 0]; // header signature 8\n\n blob.chk(HEADER_SIGNATURE, 'Header Signature: '); // clsid 16\n //blob.chk(HEADER_CLSID, 'CLSID: ');\n\n blob.l += 16; // minor version 2\n\n var mver = blob.read_shift(2, 'u');\n return [blob.read_shift(2, 'u'), mver];\n }", "title": "" }, { "docid": "700b5658bf6e78b5d75967903fde824c", "score": "0.52580625", "text": "function check_get_mver(blob) {\n if (blob[blob.l] == 0x50 && blob[blob.l + 1] == 0x4b) return [0, 0]; // header signature 8\n\n blob.chk(HEADER_SIGNATURE, 'Header Signature: '); // clsid 16\n //blob.chk(HEADER_CLSID, 'CLSID: ');\n\n blob.l += 16; // minor version 2\n\n var mver = blob.read_shift(2, 'u');\n return [blob.read_shift(2, 'u'), mver];\n }", "title": "" }, { "docid": "700b5658bf6e78b5d75967903fde824c", "score": "0.52580625", "text": "function check_get_mver(blob) {\n if (blob[blob.l] == 0x50 && blob[blob.l + 1] == 0x4b) return [0, 0]; // header signature 8\n\n blob.chk(HEADER_SIGNATURE, 'Header Signature: '); // clsid 16\n //blob.chk(HEADER_CLSID, 'CLSID: ');\n\n blob.l += 16; // minor version 2\n\n var mver = blob.read_shift(2, 'u');\n return [blob.read_shift(2, 'u'), mver];\n }", "title": "" }, { "docid": "fcc2950401a9fe5a3db8f6d90b364395", "score": "0.5246591", "text": "function extractPubkeyV3(buf) {\n var decoded = extractPubkey(buf)\n var decodedTrials = var_int.decode(buf.slice(132))\n decoded.nonceTrialsPerByte = decodedTrials.value\n decoded.length += decodedTrials.length\n\n var decodedExtraBytes = var_int.decode(decodedTrials.rest)\n decoded.payloadLengthExtraBytes = decodedExtraBytes.value\n decoded.length += decodedExtraBytes.length\n\n var decodedSigLength = var_int.decode(decodedExtraBytes.rest)\n var siglen = decodedSigLength.value\n var rest = decodedSigLength.rest\n assert(rest.length >= siglen, \"Bad pubkey object payload length\")\n decoded.signature = rest.slice(0, siglen)\n siglen += decodedSigLength.length\n decoded._siglen = siglen // Internal value\n decoded.length += siglen\n\n return decoded\n}", "title": "" }, { "docid": "97e34607ad51775e30259afbf799eb84", "score": "0.52228516", "text": "function keysizeFromObject(obj) {\n var p = new BigInteger(obj.p, 16);\n var q = new BigInteger(obj.q, 16);\n var g = new BigInteger(obj.g, 16);\n\n var keysize = _getKeySizeFromYBitlength(p.bitLength());\n var params = getParams(keysize);\n\n // check!\n if (!p.equals(params.p))\n throw \"bad p\";\n\n if (!q.equals(params.q))\n throw \"bad q\";\n\n if (!g.equals(params.g))\n throw \"bad g\";\n\n return keysize;\n}", "title": "" }, { "docid": "816216e566c441141e97ca9b5042eb7a", "score": "0.5210868", "text": "serializeData(onlyHeader = false){\n\n if (!Buffer.isBuffer(this.hashData) || this.hashData.length !== 32)\n this.computeHashBlockData();\n\n return Buffer.concat( [\n __WEBPACK_IMPORTED_MODULE_3_common_utils_Serialization__[\"a\" /* default */].serializeToFixedBuffer( 32, this.hashData ),\n this._computeBlockDataHeaderPrefix(onlyHeader),\n ] )\n\n }", "title": "" }, { "docid": "3bbc5f8e2be68b4f022459a630750a4c", "score": "0.51924425", "text": "function RSAPrivateKeySerializeASN1() {\n function concatBigInteger(bytes, bigInt) {\n var bigIntBytes = bigInt.toByteArray();\n bytes.push(0x02); // INTEGER\n bytes.push(bigIntBytes.length); // #BYTES\n // bytes.push(00); // this appears in some encodings, and I don't understand why. leading zeros?\n return bytes.concat(bigIntBytes);\n }\n var bytes=[];\n // sequence\n bytes.push(0x30);\n bytes.push(0x82);//XX breaks on 1024 bit keys?\n bytes.push(0x01);\n bytes.push(0x00);// replace with actual length (-256)...\n // version (integer 0)\n bytes.push(0x02); // INTEGER\n bytes.push(0x01); // #BYTES\n bytes.push(0x00); // value\n // modulus (n)\n bytes = concatBigInteger(bytes, this.n);\n \n // publicExponent (e)\n bytes = concatBigInteger(bytes, new BigInteger(\"\"+this.e, 10));\n \n // privateExponent (d)\n bytes = concatBigInteger(bytes, this.d);\n\n // prime1 (p)\n bytes = concatBigInteger(bytes, this.p);\n\n // prime2 (q)\n bytes = concatBigInteger(bytes, this.q);\n\n // exponent1 (d mod p-1 -> dmp1)\n bytes = concatBigInteger(bytes, this.dmp1);\n\n // exponent2 (q mod p-1 -> dmq1)\n bytes = concatBigInteger(bytes, this.dmq1);\n\n // coefficient ((inverse of q) mod p -> coeff)\n bytes = concatBigInteger(bytes, this.coeff);\n\n var actualLength = bytes.length - 4;\n var lenBytes = new BigInteger(\"\" + actualLength, 10).toByteArray();\n bytes[2] = lenBytes[0];\n bytes[3] = lenBytes[1];\n \n var buffer = \"\";\n for (var i=0;i<bytes.length;i++) { \n buffer += int2char((bytes[i] & 0xf0) >> 4);\n buffer += int2char(bytes[i] & 0x0f);\n }\n buffer = hex2b64(buffer);\n var newlineBuffer = \"\";\n for (var i=0;i<buffer.length;i++) { \n if (i>0 && (i % 64) == 0) newlineBuffer += \"\\n\";\n newlineBuffer += buffer[i];\n }\n return \"-----BEGIN RSA PRIVATE KEY-----\\n\" + newlineBuffer + \"\\n-----END RSA PRIVATE KEY-----\\n\";\n}", "title": "" }, { "docid": "3bbc5f8e2be68b4f022459a630750a4c", "score": "0.51924425", "text": "function RSAPrivateKeySerializeASN1() {\n function concatBigInteger(bytes, bigInt) {\n var bigIntBytes = bigInt.toByteArray();\n bytes.push(0x02); // INTEGER\n bytes.push(bigIntBytes.length); // #BYTES\n // bytes.push(00); // this appears in some encodings, and I don't understand why. leading zeros?\n return bytes.concat(bigIntBytes);\n }\n var bytes=[];\n // sequence\n bytes.push(0x30);\n bytes.push(0x82);//XX breaks on 1024 bit keys?\n bytes.push(0x01);\n bytes.push(0x00);// replace with actual length (-256)...\n // version (integer 0)\n bytes.push(0x02); // INTEGER\n bytes.push(0x01); // #BYTES\n bytes.push(0x00); // value\n // modulus (n)\n bytes = concatBigInteger(bytes, this.n);\n \n // publicExponent (e)\n bytes = concatBigInteger(bytes, new BigInteger(\"\"+this.e, 10));\n \n // privateExponent (d)\n bytes = concatBigInteger(bytes, this.d);\n\n // prime1 (p)\n bytes = concatBigInteger(bytes, this.p);\n\n // prime2 (q)\n bytes = concatBigInteger(bytes, this.q);\n\n // exponent1 (d mod p-1 -> dmp1)\n bytes = concatBigInteger(bytes, this.dmp1);\n\n // exponent2 (q mod p-1 -> dmq1)\n bytes = concatBigInteger(bytes, this.dmq1);\n\n // coefficient ((inverse of q) mod p -> coeff)\n bytes = concatBigInteger(bytes, this.coeff);\n\n var actualLength = bytes.length - 4;\n var lenBytes = new BigInteger(\"\" + actualLength, 10).toByteArray();\n bytes[2] = lenBytes[0];\n bytes[3] = lenBytes[1];\n \n var buffer = \"\";\n for (var i=0;i<bytes.length;i++) { \n buffer += int2char((bytes[i] & 0xf0) >> 4);\n buffer += int2char(bytes[i] & 0x0f);\n }\n buffer = hex2b64(buffer);\n var newlineBuffer = \"\";\n for (var i=0;i<buffer.length;i++) { \n if (i>0 && (i % 64) == 0) newlineBuffer += \"\\n\";\n newlineBuffer += buffer[i];\n }\n return \"-----BEGIN RSA PRIVATE KEY-----\\n\" + newlineBuffer + \"\\n-----END RSA PRIVATE KEY-----\\n\";\n}", "title": "" }, { "docid": "26c30dbc09874a2d3cec1cfad80d0a3c", "score": "0.512284", "text": "function check_get_mver(blob) {\n\tif(blob[blob.l] == 0x50 && blob[blob.l + 1] == 0x4b) return [0, 0];\n\t// header signature 8\n\tblob.chk(HEADER_SIGNATURE, 'Header Signature: ');\n\n\t// clsid 16\n\t//blob.chk(HEADER_CLSID, 'CLSID: ');\n\tblob.l += 16;\n\n\t// minor version 2\n\tvar mver = blob.read_shift(2, 'u');\n\n\treturn [blob.read_shift(2,'u'), mver];\n}", "title": "" }, { "docid": "26c30dbc09874a2d3cec1cfad80d0a3c", "score": "0.512284", "text": "function check_get_mver(blob) {\n\tif(blob[blob.l] == 0x50 && blob[blob.l + 1] == 0x4b) return [0, 0];\n\t// header signature 8\n\tblob.chk(HEADER_SIGNATURE, 'Header Signature: ');\n\n\t// clsid 16\n\t//blob.chk(HEADER_CLSID, 'CLSID: ');\n\tblob.l += 16;\n\n\t// minor version 2\n\tvar mver = blob.read_shift(2, 'u');\n\n\treturn [blob.read_shift(2,'u'), mver];\n}", "title": "" }, { "docid": "26c30dbc09874a2d3cec1cfad80d0a3c", "score": "0.512284", "text": "function check_get_mver(blob) {\n\tif(blob[blob.l] == 0x50 && blob[blob.l + 1] == 0x4b) return [0, 0];\n\t// header signature 8\n\tblob.chk(HEADER_SIGNATURE, 'Header Signature: ');\n\n\t// clsid 16\n\t//blob.chk(HEADER_CLSID, 'CLSID: ');\n\tblob.l += 16;\n\n\t// minor version 2\n\tvar mver = blob.read_shift(2, 'u');\n\n\treturn [blob.read_shift(2,'u'), mver];\n}", "title": "" }, { "docid": "26c30dbc09874a2d3cec1cfad80d0a3c", "score": "0.512284", "text": "function check_get_mver(blob) {\n\tif(blob[blob.l] == 0x50 && blob[blob.l + 1] == 0x4b) return [0, 0];\n\t// header signature 8\n\tblob.chk(HEADER_SIGNATURE, 'Header Signature: ');\n\n\t// clsid 16\n\t//blob.chk(HEADER_CLSID, 'CLSID: ');\n\tblob.l += 16;\n\n\t// minor version 2\n\tvar mver = blob.read_shift(2, 'u');\n\n\treturn [blob.read_shift(2,'u'), mver];\n}", "title": "" }, { "docid": "a647b510a3da90ee52ec84cf1e37ca53", "score": "0.51058096", "text": "getPackedLength(nBytes:Number):Number {\n }", "title": "" }, { "docid": "69d037afdbd2ab28cd6ad53ba76f3abb", "score": "0.5096547", "text": "serializeData(onlyHeader = false){\n\n if (!Buffer.isBuffer(this.hashData) || this.hashData.length !== 32)\n this.computeHashBlockData();\n\n return Buffer.concat( [\n Serialization.serializeToFixedBuffer( 32, this.hashData ),\n this._computeBlockDataHeaderPrefix(onlyHeader),\n ] )\n\n }", "title": "" }, { "docid": "dc23d9714250a15e711b72ce1ec14d25", "score": "0.50782144", "text": "_packBinaryChunk() {\n // Already packed\n if (this.arrayBuffer) {\n return;\n }\n\n // Allocate total array\n const totalByteLength = this.byteLength;\n const arrayBuffer = new ArrayBuffer(totalByteLength);\n const targetArray = new Uint8Array(arrayBuffer);\n\n // Copy each array into\n let dstByteOffset = 0;\n for (let i = 0; i < this.sourceBuffers.length; i++) {\n const sourceBuffer = this.sourceBuffers[i];\n dstByteOffset = Object(_loaders_gl_loader_utils__WEBPACK_IMPORTED_MODULE_0__[\"copyToArray\"])(sourceBuffer, targetArray, dstByteOffset);\n }\n\n // Update the glTF BIN CHUNK byte length\n this.json.buffers[0].byteLength = totalByteLength;\n\n // Save generated arrayBuffer\n this.arrayBuffer = arrayBuffer;\n\n // Clear out sourceBuffers\n this.sourceBuffers = [];\n }", "title": "" }, { "docid": "bdbbad24d2767a8b010bf63bc9b1a3dd", "score": "0.5069575", "text": "v4() {\n /*\n 4.4. Algorithms for Creating a UUID from Truly Random or Pseudo-Random Numbers\n\n The version 4 UUID is meant for generating UUIDs from truly-random or\n pseudo-random numbers.\n\n The algorithm is as follows:\n\n o Set the two most significant bits (bits 6 and 7) of the\n clock_seq_hi_and_reserved to zero and one, respectively.\n\n o Set the four most significant bits (bits 12 through 15) of the\n time_hi_and_version field to the 4-bit version number from\n Section 4.1.3.\n\n o Set all the other bits to randomly (or pseudo-randomly) chosen\n values.\n */\n let uuid = new Uint8Array(16)\n /*\n time-low\n in v4 its just 32 bits of random numbers.\n */\n uuid[0] = this.randomBitArray(8).join('').toString(10)\n uuid[1] = this.randomBitArray(8).join('').toString(10)\n uuid[2] = this.randomBitArray(8).join('').toString(10)\n uuid[3] = this.randomBitArray(8).join('').toString(10)\n\n /*\n time_mid\n in v4 its just 16 bits of random numbers.\n */\n uuid[4] = this.randomBitArray(8).join('').toString(10)\n uuid[5] = this.randomBitArray(8).join('').toString(10)\n\n /*\n time_hi_and_version\n this is a ticky part, becuase the documentation seems to disagree\n with itself about where to to place the 4 bit version information.\n in the section about versioning it say to use bits 4-7 (https://tools.ietf.org/html/rfc4122#section-4.1.3).\n in the v4 algorithm section it say to use bit 12-15 (https://tools.ietf.org/html/rfc4122#section-4.4).\n im going to follow the v4 algorithm instructions and make the last 4 bits '0100'\n */\n uuid[6] = this.randomBitArray(8).join('').toString(10)\n uuid[7] = this.randomBitArray(4).concat([0, 1, 0, 0]).join('').toString(10)\n\n /*\n clock-seq-and-reserved\n bits 6-7 need to be '01'. (https://tools.ietf.org/html/rfc4122#section-4.4)\n this is only 8 bits long.\n */\n uuid[8] = this.randomBitArray(6).concat([0, 1]).join('').toString(10)\n\n /*\n clock-seq-low\n random 8 bits\n */\n uuid[9] = this.randomBitArray(8).join('').toString(10)\n\n /*\n node\n in v4 this is random 48 bits\n */\n uuid[10] = this.randomBitArray(8).join('').toString(10)\n uuid[11] = this.randomBitArray(8).join('').toString(10)\n uuid[12] = this.randomBitArray(8).join('').toString(10)\n uuid[13] = this.randomBitArray(8).join('').toString(10)\n uuid[14] = this.randomBitArray(8).join('').toString(10)\n uuid[15] = this.randomBitArray(8).join('').toString(10)\n\n return uuid\n }", "title": "" }, { "docid": "a6b307c4a9d72291ebddd78000a4e5bb", "score": "0.5065417", "text": "serialize() {\n let featuresBuffer = this.features.toBuffer('be');\n let featuresLen = this.features.gtn(0) ? featuresBuffer.length : 0;\n let result = Buffer.alloc(\n 2 + // type\n 64 + // node_signature_1\n 64 + // node_signature_2\n 64 + // bitcoin_signature_1\n 64 + // bitcoin_signature_2\n 2 + // len\n featuresLen +\n 32 + // chain_hash\n 8 + // short_channel_id\n 33 + // node_id_1\n 33 + // node_id_2\n 33 + // bitcoin_key_1\n 33 // bitcion_key_2\n ); // prettier-ignore\n let writer = BufferCursor.from(result);\n writer.writeUInt16BE(this.type);\n writer.writeBytes(this.nodeSignature1);\n writer.writeBytes(this.nodeSignature2);\n writer.writeBytes(this.bitcoinSignature1);\n writer.writeBytes(this.bitcoinSignature2);\n writer.writeUInt16BE(featuresLen);\n if (featuresLen > 0) writer.writeBytes(featuresBuffer);\n writer.writeBytes(this.chainHash);\n writer.writeBytes(this.shortChannelId);\n writer.writeBytes(this.nodeId1);\n writer.writeBytes(this.nodeId2);\n writer.writeBytes(this.bitcoinKey1);\n writer.writeBytes(this.bitcoinKey2);\n return result;\n }", "title": "" }, { "docid": "e269fb38884473028c804373d1c3642b", "score": "0.5065306", "text": "function packID(id) {\n var newID = id\n if (solidLookup[id]) newID |= SOLID_BIT\n if (opaqueLookup[id]) newID |= OPAQUE_BIT\n if (objectMeshLookup[id]) newID |= OBJECT_BIT\n return newID\n}", "title": "" }, { "docid": "ff29a5d419dad16a5ae4ffdfd53226eb", "score": "0.5064572", "text": "function v132(v133,v134) {\n const v138 = [13.37,Int32Array,v126];\n // v138 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"pop\", \"forEach\", \"find\", \"shift\", \"every\", \"join\", \"flatMap\", \"copyWithin\", \"splice\", \"keys\", \"unshift\", \"reverse\", \"fill\", \"reduce\", \"values\", \"lastIndexOf\", \"flat\", \"concat\", \"findIndex\", \"push\", \"entries\", \"sort\", \"slice\", \"toString\", \"includes\", \"filter\", \"reduceRight\", \"some\", \"toLocaleString\", \"map\", \"indexOf\"])\n const v139 = [ArrayBuffer];\n // v139 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"pop\", \"forEach\", \"find\", \"shift\", \"every\", \"join\", \"flatMap\", \"copyWithin\", \"splice\", \"keys\", \"unshift\", \"reverse\", \"fill\", \"reduce\", \"values\", \"lastIndexOf\", \"flat\", \"concat\", \"findIndex\", \"push\", \"entries\", \"sort\", \"slice\", \"toString\", \"includes\", \"filter\", \"reduceRight\", \"some\", \"toLocaleString\", \"map\", \"indexOf\"])\n const v140 = {b:ArrayBuffer,e:ArrayBuffer};\n // v140 = .object(ofGroup: Object, withProperties: [\"e\", \"__proto__\", \"b\"])\n const v141 = \"8ijn7w/ZKA\";\n // v141 = .string + .object(ofGroup: String, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"substring\", \"padEnd\", \"indexOf\", \"lastIndexOf\", \"endsWith\", \"matchAll\", \"startsWith\", \"search\", \"concat\", \"codePointAt\", \"slice\", \"includes\", \"match\", \"repeat\", \"split\", \"charCodeAt\", \"trim\", \"charAt\", \"padStart\", \"replace\"])\n const v142 = ArrayBuffer;\n // v142 = .object(ofGroup: ArrayBufferConstructor, withProperties: [\"prototype\"], withMethods: [\"isView\"]) + .constructor([.integer] => .object(ofGroup: ArrayBuffer, withProperties: [\"__proto__\", \"byteLength\"], withMethods: [\"slice\"]))\n ArrayBuffer.d = 0;\n const v146 = \"9\" / Symbol;\n // v146 = .integer | .float | .bigint\n v121.toString = Symbol;\n const v147 = 13.37;\n // v147 = .float\n const v148 = {__proto__:v146,a:v146,c:0,length:v140,toString:v120,...\"CJ1sCcCHyG\",...v131,...-3131930798,...v118};\n // v148 = .object(ofGroup: Object, withProperties: [\"__proto__\", \"c\", \"toString\", \"constructor\", \"a\", \"length\"], withMethods: [\"matchAll\", \"codePointAt\", \"keys\", \"reverse\", \"splice\", \"forEach\", \"slice\", \"trim\", \"find\", \"entries\", \"map\", \"shift\", \"values\", \"startsWith\", \"join\", \"reduceRight\", \"padEnd\", \"lastIndexOf\", \"match\", \"concat\", \"padStart\", \"flat\", \"toString\", \"includes\", \"some\", \"substring\", \"pop\", \"findIndex\", \"sort\", \"toLocaleString\", \"split\", \"filter\", \"charCodeAt\", \"copyWithin\", \"endsWith\", \"indexOf\", \"replace\", \"charAt\", \"repeat\", \"flatMap\", \"reduce\", \"search\", \"fill\", \"every\", \"push\", \"unshift\"])\n const v150 = [13.37,13.37,13.37];\n // v150 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"pop\", \"forEach\", \"find\", \"shift\", \"every\", \"join\", \"flatMap\", \"copyWithin\", \"splice\", \"keys\", \"unshift\", \"reverse\", \"fill\", \"reduce\", \"values\", \"lastIndexOf\", \"flat\", \"concat\", \"findIndex\", \"push\", \"entries\", \"sort\", \"slice\", \"toString\", \"includes\", \"filter\", \"reduceRight\", \"some\", \"toLocaleString\", \"map\", \"indexOf\"])\n const v153 = -65535;\n // v153 = .integer\n const v154 = [\"9\",ArrayBuffer];\n // v154 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"pop\", \"forEach\", \"find\", \"shift\", \"every\", \"join\", \"flatMap\", \"copyWithin\", \"splice\", \"keys\", \"unshift\", \"reverse\", \"fill\", \"reduce\", \"values\", \"lastIndexOf\", \"flat\", \"concat\", \"findIndex\", \"push\", \"entries\", \"sort\", \"slice\", \"toString\", \"includes\", \"filter\", \"reduceRight\", \"some\", \"toLocaleString\", \"map\", \"indexOf\"])\n const v155 = {b:v154,e:ArrayBuffer};\n // v155 = .object(ofGroup: Object, withProperties: [\"b\", \"e\", \"__proto__\"])\n let v158 = 0;\n while (v158 < 9) {\n const v159 = v158 + 1;\n // v159 = .primitive\n v158 = v159;\n const v163 = [13.37,13.37,13.37];\n // v163 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"pop\", \"forEach\", \"find\", \"shift\", \"every\", \"join\", \"flatMap\", \"copyWithin\", \"splice\", \"keys\", \"unshift\", \"reverse\", \"fill\", \"reduce\", \"values\", \"lastIndexOf\", \"flat\", \"concat\", \"findIndex\", \"push\", \"entries\", \"sort\", \"slice\", \"toString\", \"includes\", \"filter\", \"reduceRight\", \"some\", \"toLocaleString\", \"map\", \"indexOf\"])\n const v164 = {b:ArrayBuffer,e:ArrayBuffer};\n // v164 = .object(ofGroup: Object, withProperties: [\"__proto__\", \"b\", \"e\"])\n const v165 = {a:ArrayBuffer,b:v163,c:ArrayBuffer,d:-3131930798,length:v164};\n // v165 = .object(ofGroup: Object, withProperties: [\"c\", \"b\", \"__proto__\", \"d\", \"a\", \"length\"])\n const v167 = [ArrayBuffer];\n // v167 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"pop\", \"forEach\", \"find\", \"shift\", \"every\", \"join\", \"flatMap\", \"copyWithin\", \"splice\", \"keys\", \"unshift\", \"reverse\", \"fill\", \"reduce\", \"values\", \"lastIndexOf\", \"flat\", \"concat\", \"findIndex\", \"push\", \"entries\", \"sort\", \"slice\", \"toString\", \"includes\", \"filter\", \"reduceRight\", \"some\", \"toLocaleString\", \"map\", \"indexOf\"])\n const v169 = v167.filter(Object,ArrayBuffer);\n // v169 = .object(ofGroup: Array, withProperties: [\"length\", \"__proto__\", \"constructor\"], withMethods: [\"pop\", \"forEach\", \"find\", \"shift\", \"every\", \"join\", \"flatMap\", \"copyWithin\", \"splice\", \"keys\", \"unshift\", \"reverse\", \"fill\", \"reduce\", \"values\", \"lastIndexOf\", \"flat\", \"concat\", \"findIndex\", \"push\", \"entries\", \"sort\", \"slice\", \"toString\", \"includes\", \"filter\", \"reduceRight\", \"some\", \"toLocaleString\", \"map\", \"indexOf\"])\n }\n return v79;\n }", "title": "" }, { "docid": "0d1cdfcd6e2631e5d43770e245c44439", "score": "0.5051348", "text": "function _pack(num, len) {\n var o = [], len = ((typeof len == 'undefined') ? 4 : len);\n for (var i=0; i<len; ++i) {\n o.push(String.fromCharCode((num >> (i * 8)) & 0xff));\n }\n return o.join(\"\");\n}", "title": "" }, { "docid": "4b8281266b3319dc5106f9d112360d21", "score": "0.5048794", "text": "toFastBuffer () {\n if (!this.versionBytesNum) {\n return new Buffer(0)\n }\n let isPrivate = this.versionBytesNum === Constants.privKey\n let isPublic = this.versionBytesNum === Constants.pubKey\n if (isPrivate) {\n return new Bw()\n .writeUInt32BE(this.versionBytesNum)\n .writeUInt8(this.depth)\n .write(this.parentFingerPrint)\n .writeUInt32BE(this.childIndex)\n .write(this.chainCode)\n .writeUInt8(0)\n .write(this.privKey.bn.toBuffer({size: 32}))\n .toBuffer()\n } else if (isPublic) {\n return new Bw()\n .writeUInt32BE(this.versionBytesNum)\n .writeUInt8(this.depth)\n .write(this.parentFingerPrint)\n .writeUInt32BE(this.childIndex)\n .write(this.chainCode)\n .write(this.pubKey.toFastBuffer())\n .toBuffer()\n } else {\n throw new Error('bip32: invalid versionBytesNum byte')\n }\n }", "title": "" }, { "docid": "3464ce11bf9fd7173b20548c0dc4fa4e", "score": "0.50349206", "text": "function $body(byte, i, chunk) {\n if (inf.write(byte)) return $body;\n var buf = inf.flush();\n inf.recycle();\n if (buf.length) {\n parts.push(buf);\n }\n emitObject();\n // If this was all the objects, start calculating the sha1sum\n if (--num) return $header;\n sha1sum.update(bops.subarray(chunk, 0, i + 1));\n return $checksum;\n }", "title": "" }, { "docid": "845f16d2979dc6c246a30ff2cecc0940", "score": "0.5025375", "text": "serialize(keyType) {\n // Write fields to buffer in order\n let keyBytes;\n\n if (keyType === PriKeyType) {\n keyBytes = new Uint8Array(PriKeySerializeSize);\n let offset = 0;\n keyBytes.set([keyType], offset);\n offset += 1;\n\n keyBytes.set([this.Depth], offset);\n offset += 1;\n\n keyBytes.set(this.ChildNumber, offset);\n offset += ChildNumberSize;\n\n keyBytes.set(this.ChainCode, offset);\n offset += ChainCodeSize;\n\n keyBytes.set([this.KeySet.PrivateKey.length], offset);\n offset += 1;\n keyBytes.set(this.KeySet.PrivateKey, offset);\n\n } else if (keyType === PaymentAddressType) {\n keyBytes = new Uint8Array(PaymentAddrSerializeSize);\n let offset = 0;\n keyBytes.set([keyType], offset);\n offset += 1;\n\n keyBytes.set([this.KeySet.PaymentAddress.Pk.length], offset);\n offset += 1;\n keyBytes.set(this.KeySet.PaymentAddress.Pk, offset);\n offset += ED25519_KEY_SIZE;\n\n keyBytes.set([this.KeySet.PaymentAddress.Tk.length], offset);\n offset += 1;\n keyBytes.set(this.KeySet.PaymentAddress.Tk, offset);\n\n } else if (keyType === ReadonlyKeyType) {\n keyBytes = new Uint8Array(ReadonlyKeySerializeSize);\n let offset = 0;\n keyBytes.set([keyType], offset);\n offset += 1;\n\n keyBytes.set([this.KeySet.ReadonlyKey.Pk.length], offset);\n offset += 1;\n keyBytes.set(this.KeySet.ReadonlyKey.Pk, offset);\n offset += ED25519_KEY_SIZE;\n\n keyBytes.set([this.KeySet.ReadonlyKey.Rk.length], offset);\n offset += 1;\n keyBytes.set(this.KeySet.ReadonlyKey.Rk, offset);\n } else if (keyType === PublicKeyType) {\n keyBytes = new Uint8Array(PublicKeySerializeSize);\n let offset = 0;\n keyBytes.set([keyType], offset);\n offset += 1;\n\n keyBytes.set([this.KeySet.PaymentAddress.Pk.length], offset);\n offset += 1;\n keyBytes.set(this.KeySet.PaymentAddress.Pk, offset);\n }\n\n // Append key bytes to the standard sha3 checksum\n return addChecksumToBytes(keyBytes);\n }", "title": "" }, { "docid": "8c71cc08a1206fcc602d88b13d97a966", "score": "0.5024035", "text": "function packedStore() {\n let a = Object.seal([\"\"]);\n a[0] = 0;\n assertEquals(a[0], 0);\n}", "title": "" }, { "docid": "e1dcbb76b8762b51b738b9c948fd9d2a", "score": "0.5023967", "text": "function createTestSolenoidBytes() { return { 1: 0, 2: 0 }; }", "title": "" }, { "docid": "88e283c062c3f1b97aa068b898a18d14", "score": "0.5022051", "text": "deserializeNumber4Bytes_Positive(buffer, offset = 0){\n\n let value = 0;\n\n for ( let i = offset; i<=offset + 3 ; i++)\n value = (value *256 ) + buffer[i];\n\n return value;\n }", "title": "" }, { "docid": "c538a32583a8c3b6cea1dfb5f5da248a", "score": "0.50212723", "text": "encodeAsBinary(obj) {\n const deconstruction = binary_1.deconstructPacket(obj);\n const pack = this.encodeAsString(deconstruction.packet);\n const buffers = deconstruction.buffers;\n buffers.unshift(pack); // add packet info to beginning of data list\n return buffers; // write all the buffers\n }", "title": "" }, { "docid": "c538a32583a8c3b6cea1dfb5f5da248a", "score": "0.50212723", "text": "encodeAsBinary(obj) {\n const deconstruction = binary_1.deconstructPacket(obj);\n const pack = this.encodeAsString(deconstruction.packet);\n const buffers = deconstruction.buffers;\n buffers.unshift(pack); // add packet info to beginning of data list\n return buffers; // write all the buffers\n }", "title": "" }, { "docid": "c538a32583a8c3b6cea1dfb5f5da248a", "score": "0.50212723", "text": "encodeAsBinary(obj) {\n const deconstruction = binary_1.deconstructPacket(obj);\n const pack = this.encodeAsString(deconstruction.packet);\n const buffers = deconstruction.buffers;\n buffers.unshift(pack); // add packet info to beginning of data list\n return buffers; // write all the buffers\n }", "title": "" }, { "docid": "c538a32583a8c3b6cea1dfb5f5da248a", "score": "0.50212723", "text": "encodeAsBinary(obj) {\n const deconstruction = binary_1.deconstructPacket(obj);\n const pack = this.encodeAsString(deconstruction.packet);\n const buffers = deconstruction.buffers;\n buffers.unshift(pack); // add packet info to beginning of data list\n return buffers; // write all the buffers\n }", "title": "" }, { "docid": "787b3b3db28112bfee3fcbdd146facd4", "score": "0.50209063", "text": "function marshalPublicKey (jwk) {\n const byteLen = curveLengths[jwk.crv]\n\n return Buffer.concat([\n Buffer.from([4]), // uncompressed point\n toBn(jwk.x).toArrayLike(Buffer, 'be', byteLen),\n toBn(jwk.y).toArrayLike(Buffer, 'be', byteLen)\n ], 1 + byteLen * 2)\n}", "title": "" }, { "docid": "787b3b3db28112bfee3fcbdd146facd4", "score": "0.50209063", "text": "function marshalPublicKey (jwk) {\n const byteLen = curveLengths[jwk.crv]\n\n return Buffer.concat([\n Buffer.from([4]), // uncompressed point\n toBn(jwk.x).toArrayLike(Buffer, 'be', byteLen),\n toBn(jwk.y).toArrayLike(Buffer, 'be', byteLen)\n ], 1 + byteLen * 2)\n}", "title": "" }, { "docid": "d7877aec5cd10c95516a030a61e9d4e3", "score": "0.49833182", "text": "_parseFromObj(obj) {\n Object.assign(this, _.pick(obj, this.constructor.compactObjectFields));\n\n this._verifyEndRunningHash();\n\n // add the transaction to the map\n const recordStreamObject = new RecordStreamObject(this.recordStreamObject);\n this._addTransaction(recordStreamObject.record);\n\n // calculate metadata hash\n this._metadataHash = this._calculateMetadataHash();\n }", "title": "" }, { "docid": "628804c7b99c3349746a7e6b21f4038a", "score": "0.4954002", "text": "function v4(): string {\n function s4(): string {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n return s4() + s4() + '-' + s4() + '-' + s4() + '-' +\n s4() + '-' + s4() + s4() + s4();\n}", "title": "" }, { "docid": "c2d36b8f5d1a3752e8f4b7775f394adb", "score": "0.4943601", "text": "constructor(key) {\n this.key = key\n this.byteLength = 4\n }", "title": "" }, { "docid": "0627b40f2989287eb08e0d53a1e922fa", "score": "0.49385902", "text": "getByteArray() {\n let size = this.nextCborSize(); //this is the reason the tag byte is left in place so can do this with it\n return this.nextBytes(size);\n }", "title": "" }, { "docid": "4acd97d6f28fbb8dc157b19cdd17b0a6", "score": "0.49364853", "text": "toFastBuffer () {\n if (!this.versionBytesNum) {\n return Buffer.alloc(0)\n }\n const isPrivate = this.versionBytesNum === this.Constants.privKey\n const isPublic = this.versionBytesNum === this.Constants.pubKey\n if (isPrivate) {\n return new Bw()\n .writeUInt32BE(this.versionBytesNum)\n .writeUInt8(this.depth)\n .write(this.parentFingerPrint)\n .writeUInt32BE(this.childIndex)\n .write(this.chainCode)\n .writeUInt8(0)\n .write(this.privKey.bn.toBuffer({ size: 32 }))\n .toBuffer()\n } else if (isPublic) {\n return new Bw()\n .writeUInt32BE(this.versionBytesNum)\n .writeUInt8(this.depth)\n .write(this.parentFingerPrint)\n .writeUInt32BE(this.childIndex)\n .write(this.chainCode)\n .write(this.pubKey.toFastBuffer())\n .toBuffer()\n } else {\n throw new Error('bip32: invalid versionBytesNum byte')\n }\n }", "title": "" }, { "docid": "51fdbaf5bfb18c8c241cfb92621b2599", "score": "0.49230593", "text": "function vec4(x, y, z, w)\n{\n var vector = new Object(); //create Object\n vector.array = [x, y, z, w];//array has 4 values\n vector.size = 4; //size is 4\n vector.format = \"vector\"; //type is vector\n return vector; //return vec4 object\n}", "title": "" }, { "docid": "aef167367214bb8143852fcc0f24c21e", "score": "0.49193817", "text": "static WirteObject(obj) {\n var offSet = 0;\n var cacheBuffer = new ArrayBuffer(128);\n var dataView = new DataView(cacheBuffer);\n var byteInfoArray = Buffer.ClassInfoMap.get(obj.constructor.prototype[\"objkey\"]);\n for (let i = 0; i < byteInfoArray.length; i++) {\n let byteInfo = byteInfoArray[i];\n let byteLength = this.writeProperty(dataView, offSet, byteInfo.Type, obj[byteInfo.PropertyKey]);\n offSet += byteLength;\n }\n var buffer = cacheBuffer.slice(0, offSet);\n return buffer;\n }", "title": "" }, { "docid": "8ab6971b60b16f6d143f2c274150ca34", "score": "0.49167526", "text": "getSize() {\n return FIXED_HEADER_SIZE + this.identifier.length;\n }", "title": "" }, { "docid": "866f3748340dc4b59c917ea47b86e3c1", "score": "0.49144813", "text": "verifiableEntity(ignoreSize=false) {\n // Model:\n // struct VerifiableEntity {\n // uint32_t size;\n // uint32_t reserved;\n // Signature Signature;\n // Key key;\n // uint32_t reserved;\n // uint8_t version;\n // NetworkIdentifier network;\n // EntityType type;\n // }\n this.sizePrefix(ignoreSize)\n let {signature} = this.entityVerification()\n let {key, version, network, type} = this.entityBody()\n\n return {\n signature,\n key,\n version,\n network,\n type\n }\n }", "title": "" }, { "docid": "55f6266e7d4e7e98cdf13317c4fcc0b9", "score": "0.48984945", "text": "packMessageInfo() {\n precondition.ensureNotNull('this.ctxPtr', this.ctxPtr);\n\n const messageInfoCapacity = this.messageInfoLen();\n const messageInfoCtxPtr = Module._vsc_buffer_new_with_capacity(messageInfoCapacity);\n\n try {\n Module._vscf_recipient_cipher_pack_message_info(this.ctxPtr, messageInfoCtxPtr);\n\n const messageInfoPtr = Module._vsc_buffer_bytes(messageInfoCtxPtr);\n const messageInfoPtrLen = Module._vsc_buffer_len(messageInfoCtxPtr);\n const messageInfo = Module.HEAPU8.slice(messageInfoPtr, messageInfoPtr + messageInfoPtrLen);\n return messageInfo;\n } finally {\n Module._vsc_buffer_delete(messageInfoCtxPtr);\n }\n }", "title": "" }, { "docid": "697240864feed691922c01e9194d13b0", "score": "0.48982358", "text": "static initialize(obj, signature, pubKey) { \n obj['signature'] = signature;\n obj['pubKey'] = pubKey;\n }", "title": "" }, { "docid": "1238b2e015673abfe6919fa986e9c62e", "score": "0.4890417", "text": "toByteArray() {\r\n // if (this.index > 65535) {\r\n // throw new Error(\"Class file too large!\");\r\n // }\r\n // let size: number = 24 + 2 * this.interfaceCount;\r\n // let nbFields: number = 0;\r\n // let fb: FieldWriter = this.firstField;\r\n // while ((fb != null)) {\r\n // ++nbFields;\r\n // size += fb.getSize();\r\n // fb = <FieldWriter>fb.fv;\r\n // };\r\n // let nbMethods: number = 0;\r\n // let mb: MethodWriter = this.firstMethod;\r\n // while ((mb != null)) {\r\n // ++nbMethods;\r\n // size += mb.getSize();\r\n // mb = <MethodWriter>mb.mv;\r\n // };\r\n // let attributeCount: number = 0;\r\n // if (this.bootstrapMethods != null) {\r\n // ++attributeCount;\r\n // size += 8 + this.bootstrapMethods.length;\r\n // this.newUTF8(\"BootstrapMethods\");\r\n // }\r\n // if (ClassReader.SIGNATURES && this.signature !== 0) {\r\n // ++attributeCount;\r\n // size += 8;\r\n // this.newUTF8(\"Signature\");\r\n // }\r\n // if (this.sourceFile !== 0) {\r\n // ++attributeCount;\r\n // size += 8;\r\n // this.newUTF8(\"SourceFile\");\r\n // }\r\n // if (this.sourceDebug != null) {\r\n // ++attributeCount;\r\n // size += this.sourceDebug.length + 6;\r\n // this.newUTF8(\"SourceDebugExtension\");\r\n // }\r\n // if (this.enclosingMethodOwner !== 0) {\r\n // ++attributeCount;\r\n // size += 10;\r\n // this.newUTF8(\"EnclosingMethod\");\r\n // }\r\n // if ((this.access & Opcodes.ACC_DEPRECATED) !== 0) {\r\n // ++attributeCount;\r\n // size += 6;\r\n // this.newUTF8(\"Deprecated\");\r\n // }\r\n // if ((this.access & Opcodes.ACC_SYNTHETIC) !== 0) {\r\n // if ((this.version & 65535) < Opcodes.V1_5 || (this.access & ClassWriter.ACC_SYNTHETIC_ATTRIBUTE) !== 0) {\r\n // ++attributeCount;\r\n // size += 6;\r\n // this.newUTF8(\"Synthetic\");\r\n // }\r\n // }\r\n // if (this.innerClasses != null) {\r\n // ++attributeCount;\r\n // size += 8 + this.innerClasses.length;\r\n // this.newUTF8(\"InnerClasses\");\r\n // }\r\n // if (ClassReader.ANNOTATIONS && this.anns != null) {\r\n // ++attributeCount;\r\n // size += 8 + this.anns.getSize();\r\n // this.newUTF8(\"RuntimeVisibleAnnotations\");\r\n // }\r\n // if (ClassReader.ANNOTATIONS && this.ianns != null) {\r\n // ++attributeCount;\r\n // size += 8 + this.ianns.getSize();\r\n // this.newUTF8(\"RuntimeInvisibleAnnotations\");\r\n // }\r\n // if (ClassReader.ANNOTATIONS && this.tanns != null) {\r\n // ++attributeCount;\r\n // size += 8 + this.tanns.getSize();\r\n // this.newUTF8(\"RuntimeVisibleTypeAnnotations\");\r\n // }\r\n // if (ClassReader.ANNOTATIONS && this.itanns != null) {\r\n // ++attributeCount;\r\n // size += 8 + this.itanns.getSize();\r\n // this.newUTF8(\"RuntimeInvisibleTypeAnnotations\");\r\n // }\r\n // if (this.attrs != null) {\r\n // attributeCount += this.attrs.getCount();\r\n // size += this.attrs.getSize(this, null, 0, -1, -1);\r\n // }\r\n // size += this.pool.length;\r\n // let out: ByteVector = new ByteVector(size);\r\n // out.putInt(-889275714).putInt(this.version);\r\n // out.putShort(this.index).putByteArray(this.pool.data, 0, this.pool.length);\r\n // let mask: number = Opcodes.ACC_DEPRECATED | ClassWriter.ACC_SYNTHETIC_ATTRIBUTE | (((this.access & ClassWriter.ACC_SYNTHETIC_ATTRIBUTE) / ClassWriter.TO_ACC_SYNTHETIC_$LI$() | 0));\r\n // out.putShort(this.access & ~mask).putShort(this.name).putShort(this.superName);\r\n // out.putShort(this.interfaceCount);\r\n // for (let i: number = 0; i < this.interfaceCount; ++i) {\r\n // out.putShort(this.interfaces[i]);\r\n // }\r\n // out.putShort(nbFields);\r\n // fb = this.firstField;\r\n // while ((fb != null)) {\r\n // fb.put(out);\r\n // fb = <FieldWriter>fb.fv;\r\n // };\r\n // out.putShort(nbMethods);\r\n // mb = this.firstMethod;\r\n // while ((mb != null)) {\r\n // mb.put(out);\r\n // mb = <MethodWriter>mb.mv;\r\n // };\r\n // out.putShort(attributeCount);\r\n // if (this.bootstrapMethods != null) {\r\n // out.putShort(this.newUTF8(\"BootstrapMethods\"));\r\n // out.putInt(this.bootstrapMethods.length + 2).putShort(this.bootstrapMethodsCount);\r\n // out.putByteArray(this.bootstrapMethods.data, 0, this.bootstrapMethods.length);\r\n // }\r\n // if (ClassReader.SIGNATURES && this.signature !== 0) {\r\n // out.putShort(this.newUTF8(\"Signature\")).putInt(2).putShort(this.signature);\r\n // }\r\n // if (this.sourceFile !== 0) {\r\n // out.putShort(this.newUTF8(\"SourceFile\")).putInt(2).putShort(this.sourceFile);\r\n // }\r\n // if (this.sourceDebug != null) {\r\n // let len: number = this.sourceDebug.length;\r\n // out.putShort(this.newUTF8(\"SourceDebugExtension\")).putInt(len);\r\n // out.putByteArray(this.sourceDebug.data, 0, len);\r\n // }\r\n // if (this.enclosingMethodOwner !== 0) {\r\n // out.putShort(this.newUTF8(\"EnclosingMethod\")).putInt(4);\r\n // out.putShort(this.enclosingMethodOwner).putShort(this.enclosingMethod);\r\n // }\r\n // if ((this.access & Opcodes.ACC_DEPRECATED) !== 0) {\r\n // out.putShort(this.newUTF8(\"Deprecated\")).putInt(0);\r\n // }\r\n // if ((this.access & Opcodes.ACC_SYNTHETIC) !== 0) {\r\n // if ((this.version & 65535) < Opcodes.V1_5 || (this.access & ClassWriter.ACC_SYNTHETIC_ATTRIBUTE) !== 0) {\r\n // out.putShort(this.newUTF8(\"Synthetic\")).putInt(0);\r\n // }\r\n // }\r\n // if (this.innerClasses != null) {\r\n // out.putShort(this.newUTF8(\"InnerClasses\"));\r\n // out.putInt(this.innerClasses.length + 2).putShort(this.innerClassesCount);\r\n // out.putByteArray(this.innerClasses.data, 0, this.innerClasses.length);\r\n // }\r\n // if (ClassReader.ANNOTATIONS && this.anns != null) {\r\n // out.putShort(this.newUTF8(\"RuntimeVisibleAnnotations\"));\r\n // this.anns.put(out);\r\n // }\r\n // if (ClassReader.ANNOTATIONS && this.ianns != null) {\r\n // out.putShort(this.newUTF8(\"RuntimeInvisibleAnnotations\"));\r\n // this.ianns.put(out);\r\n // }\r\n // if (ClassReader.ANNOTATIONS && this.tanns != null) {\r\n // out.putShort(this.newUTF8(\"RuntimeVisibleTypeAnnotations\"));\r\n // this.tanns.put(out);\r\n // }\r\n // if (ClassReader.ANNOTATIONS && this.itanns != null) {\r\n // out.putShort(this.newUTF8(\"RuntimeInvisibleTypeAnnotations\"));\r\n // this.itanns.put(out);\r\n // }\r\n // if (this.attrs != null) {\r\n // this.attrs.put(this, null, 0, -1, -1, out);\r\n // }\r\n // if (this.hasAsmInsns) {\r\n // this.anns = null;\r\n // this.ianns = null;\r\n // this.attrs = null;\r\n // this.innerClassesCount = 0;\r\n // this.innerClasses = null;\r\n // this.firstField = null;\r\n // this.lastField = null;\r\n // this.firstMethod = null;\r\n // this.lastMethod = null;\r\n // this.compute = MethodWriter.INSERTED_FRAMES;\r\n // this.hasAsmInsns = false;\r\n // new ClassReader(out.data).accept(this, ClassReader.EXPAND_FRAMES | ClassReader.EXPAND_ASM_INSNS);\r\n // return this.toByteArray();\r\n // }\r\n // return out.data;\r\n throw new Error(\"not supported\");\r\n }", "title": "" }, { "docid": "78188c4d4a14f7c3714985ae787f8ad7", "score": "0.48897028", "text": "function d2b4(integer){\n\t\tif (typeof integer !== \"string\" && integer.toString().length > 15){throw \"integer should be entered as a string for precision\";}\n\t\tvar padding = \"\";\n\t\tfor (i = 0; i < 31; i++){\n\t\t\tpadding += \"0\";\n\t\t}\n\t\tvar a = new JSBigInt(integer);\n\t\tif (a.toString(2).length > 64){throw \"amount overflows uint64!\";}\n\t\treturn swapEndianC((padding + a.toString(4)).slice(-32));\n\t}", "title": "" }, { "docid": "1ca3a5f03a0b080e1c28d42d301bdb62", "score": "0.48853484", "text": "function packMessage(oneOrMorePackets) {\n oneOrMorePackets = _.isArray(oneOrMorePackets) ? oneOrMorePackets : [oneOrMorePackets];\n\n let packets = PB.Packets.create({ packet: oneOrMorePackets });\n let messageBuffer = PB.Packets.encode(packets).finish();\n let lengthSuffix = Buffer.alloc(4);\n lengthSuffix.writeUIntBE(messageBuffer.length, 0, 4);\n\n let messageComponents = [magic, lengthSuffix, messageBuffer];\n\n let fullMessage = Buffer.concat(messageComponents);\n\n return {\n unpacked: packets,\n packed: fullMessage,\n components: messageToBuffers(fullMessage)\n };\n}", "title": "" }, { "docid": "c2e7acedf2d83d19244b946ba76d8c40", "score": "0.48691258", "text": "function ProtoSerialize()\n{\n storePV.setName(PVSimulator.name);\n storePV.setVal(PVSimulator.val); \n storePV.setChannel(PVSimulator.channelId);\n storePV.setNano(PVSimulator.nanosecs);\n storePV.setSeverity(PVSimulator.severity);\n storePV.setStatus(PVSimulator.status);\n\n PVInformation=storePV.serializeBinary();\n return PVInformation;\n// console.log(PVInformation);\n}", "title": "" } ]
5c2d2d6f27f382e30ca403a3d72580da
Function to render all our app.
[ { "docid": "2b514140ef4d1b44be7bc49829e9bae5", "score": "0.0", "text": "render() {\n const dataToPassToModal = {\n modalType: this.state.modalType,\n show: this.state.isShowingModal,\n name: this.state.name.value,\n age: this.state.age,\n close: this.closeModalHandler,\n onClick: () => this.saveDataOnState(this.state.modalType),\n };\n \n return (\n <div className=\"App\">\n <div className=\"frame\">\n <div>\n {this.state.isShowingWelcome ? (\n <Welcome dataFromParent={this.state.name.value} />\n ) : null}\n <br />\n <div className=\"rowC\">\n <TextInput\n //providing obj name (includes value + valid)\n dataFromParent={this.state.name}\n //providing the function changeStateName which will change the name property\n toChangeName={this.changeStateName}\n />\n {!this.state.name.valid ? <FaRegTimesCircle /> : <FaCheck />}\n </div>\n <br />\n <Dropdown\n dataFromParent={this.state.age}\n toChangeAge={this.changeStateAge}\n />\n <div className=\"rowButton\">\n <Button\n buttonType=\"cancelButton\"\n modalType=\"cancel\"\n onClick={this.dependingOnModalType}\n />\n <Button\n disabled={!this.state.name.valid}\n buttonType=\"saveButton\"\n modalType=\"save\"\n onClick={this.dependingOnModalType}\n />\n </div>\n <div className=\"columnT\">\n <Modal\n dataToPassToModal = {dataToPassToModal}\n onClick={() => this.saveDataOnState(this.state.modalType)}\n />\n <div>\n {this.state.isShowingTable ? (\n <TableNameAge\n key=\"table-name\"\n dataFromParent={this.state.db}\n />\n ) : null}\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n }", "title": "" } ]
[ { "docid": "165b4fe73f4974658100af1ba6ca2c4c", "score": "0.73751706", "text": "function renderApp() {\n\tconst id = 'app-template';\n\tconst app = Framework.templateToElement(id);\n\n\tconst header = renderHeader();\n\taddHeaderListeners(header);\n\tapp.appendChild(header);\n\n\tconst list = renderList();\n\tapp.appendChild(list);\n\n\tconst footer = renderFooter();\n\taddFooterListeners(footer);\n\tapp.appendChild(footer);\n\n\treturn app;\n}", "title": "" }, { "docid": "1d34ce9ceebb3f35b987c798d28df5bb", "score": "0.69720817", "text": "function renderApp(state, elements) {\n // default to hiding all routes, then show the current route\n Object.keys(elements).forEach(function(route) {\n elements[route].hide();\n });\n elements[state.route].show();\n\n if (state.route === 'start') {\n console.log('render Start Page');\n //renderStartPage(state, elements[state.route]);\n }\n else if (state.route === 'question') {\n console.log('render Question Page');\n renderQuestionPage(state, elements[state.route]);\n }\n else if (state.route === 'answer-feedback') {\n console.log('render Feedback Page');\n renderAnswerFeedbackPage(state, elements[state.route]);\n }\n else if (state.route === 'final-feedback') {\n console.log('render Final Page');\n renderFinalFeedbackPage(state, elements[state.route]);\n }\n}", "title": "" }, { "docid": "366dd68ac59a183be005f09653b9524a", "score": "0.6830121", "text": "render() {\n\t\t// Hoist for fun.\n\t\tlet \n\t\t\t//\tSet up style aggregator.\n\t\t\t[resolveStyles, addStyle] = this.createStyleAggregator(),\n\t\t\t//\tUnpack and process essence.\n\t\t\t{ route, query, templated, component, data, metadata, user, vid } = this.essence,\n\t\t\t// Alias some essence features for sanity.\n\t\t\tPageComponent = component, appProps = { route, query, templated, user };\n\n\t\t//\tRender.\n\t\treturn render(<html lang={ config.document.lang }>\n\t\t\t<head>\n\t\t\t\t{ renderMetadata(metadata) }\n\t\t\t\t<TMInclude/>\n\t\t\t\t<UAInclude vid={ vid }/>\n\t\t\t\t<link rel=\"icon\" {...config.document.favIcon}/>\n\t\t\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>\n\t\t\t\t<script id=\"-data-preload\" dangerouslySetInnerHTML={{__html: `\n\t\t\t\t\twindow.data = ${ this.jsonify(data) };\n\t\t\t\t\twindow.user = ${ this.jsonify(user) };\n\t\t\t\t\twindow.vid = '${ vid }';\n\t\t\t\t`}}/>\n\t\t\t</head>\n\t\t\t<body>\n\t\t\t\t<TMNSInclude/>\n\t\t\t\t<div id=\"app-root\">\n\t\t\t\t\t<StyleContext.Provider value={ addStyle }>\n\t\t\t\t\t\t<App {...appProps}>\n\t\t\t\t\t\t\t<PageComponent data={ data }/>\n\t\t\t\t\t\t</App>\n\t\t\t\t\t</StyleContext.Provider>\n\t\t\t\t</div>\n\t\t\t\t<script id=\"-app-load\" charset=\"utf-8\" src=\"/assets/client.js\" defer/>\n\t\t\t</body>\n\t\t</html>).replace(\n\t\t\t'</head>', \n\t\t\t'<style id=\"-ssr-styles\">' + resolveStyles() + '</style></head>'\n\t\t);\n\t}", "title": "" }, { "docid": "5fbbc79cfbd2db71a7572ae4cbf1e606", "score": "0.6786478", "text": "render() {\n\t\tconst { classes } = this.props;\n\t\treturn (\n\t\t\t<div className={classes.app}>\n\t\t\t\t<Header\n\t\t\t\t\thistory={this.props.history}\n\t\t\t\t\tcurrentTheme={this.props.currentTheme}\n\t\t\t\t\tswitchTheme={this.switchTheme}\n\t\t\t\t/>\n\t\t\t\t<div className={classes.mainPage} ref={this.scrollWrapperRef}>\n\t\t\t\t\t<div className={classes.toolbar} />\n\t\t\t\t\t{this.switchRoutes({\n\t\t\t\t\t\thistory: this.props.history,\n\t\t\t\t\t\tcurrentTheme: this.props.currentTheme,\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}", "title": "" }, { "docid": "db5c2ddac53d75925d2ff7cee06a2ed1", "score": "0.6771372", "text": "render(){\n this.renderMainRoutes();\n this.renderChat();\n this.renderProfile();\n this.renderChatPanel();\n this.renderAdminPanel();\n this.renderRegister();\n this.renderLogin();\n this.renderPanel();\n this.renderLogout();\n }", "title": "" }, { "docid": "87bdaf56920f758d44494d28174f0990", "score": "0.6738038", "text": "function renderApp(state, elements) {\n\tObject.keys(elements).forEach(function(route) {\n\t\telements[route].hide();\n\t});\n\telements[state.route].show();\n\n\tif(state.route === \"start\") {\n\t\trenderStartPage(state, elements[state.route]);\n\t}\n\telse if (state.route === \"question\") {\n\t\trenderQuestionsPage(state, elements[state.route]);\n\t}\n\telse if (state.route === \"answer_feedback\") {\n\t\trenderAnswerFeedbackPage(state, elements[state.route]);\n\t}\n\telse if (state.route === \"feedbackComplete\") {\n\t\trenderFinalFeedbackPage(state, elements[state.route]);\n\t}\n}", "title": "" }, { "docid": "1be73858df0edd165ac266f76462d7b6", "score": "0.66500294", "text": "function createApp () { // eslint-disable-line no-inner-declarations\n const InitialHTML = (\n <RouterContext {...renderProps} />\n )\n const component = renderToString(InitialHTML)\n return renderFullPage(component)\n }", "title": "" }, { "docid": "7c23b2d70bd061a20005a22c5f0805ff", "score": "0.6648009", "text": "function render() {\n\t return app(store.getState());\n\t }", "title": "" }, { "docid": "94e6df19ae0127ebeae0b1f517e715b5", "score": "0.6623541", "text": "appBody(){\n return (<div className=\"App-body\">\n { this.renderLeaderboardIfSelected() }\n { this.renderAboutIfSelected() }\n { this.renderMatchesIfSelected() }\n </div>)\n }", "title": "" }, { "docid": "922b91e7b8fb2d0e3e394039dc034f08", "score": "0.6517338", "text": "function startApp(state) {\n root.innerHTML = `\n ${Navigation(state)}\n ${Header(state)}\n ${Content(state)}\n ${Footer(state)}\n `;\n router.updatePageLinks()\n \n }", "title": "" }, { "docid": "e997878dced1897d35c2f11f98f55c9e", "score": "0.6495081", "text": "function render() {\n ReactDOM.render(<App />, document.getElementById('appEntrypt'));\n}", "title": "" }, { "docid": "fa1cc4a13e5ede77bd723df4e480872f", "score": "0.64685297", "text": "function renderLandingPage() {\n rHelpers.renderHeading();\n // rHelpers.renderAuthBtns();\n forms.renderLoginForm();\n forms.renderRegisterLink();\n}", "title": "" }, { "docid": "16f2ca7857c3fd599cc177029102e82f", "score": "0.64474213", "text": "async function displayApp(req, res) {\n\ttry {\n\t\tLogger.log(`displayApp req url ${req.originalUrl}, isAuthenticated: ${req.isAuthenticated()}`);\n\t\t// give the client an initial rendering to display while the app is starting up\n\t\tconst { initialAppHtml, initialState } = await ServerRenderApp(req);\n\t\tres.render('index', {\t// render with views/index.ejs\n\t\t\tcontent: initialAppHtml,\n\t\t\tinitialState\n\t\t});\n\t}\n\tcatch (error) {\n\t\tLogger.error(`Failed to render initial content: ${error}`);\n\t}\n}", "title": "" }, { "docid": "45ece164edbf97b5d2f5304104eb44c2", "score": "0.6438438", "text": "function renderApp () {\n\n const history = syncHistoryWithStore(hashHistory, store)\n const routes = getRoutes(history, checkAuth)\n\n return store.dispatch(configure(\n [\n {\n default: {\n apiUrl: \"http://devise-token-auth-demo.dev\"\n }\n }\n ], {isServer: false, serverSideRendering: true, cleanSession: true, clientOnly: true}\n )).then(({redirectPath, blank} = {}) => {\n if (blank) {\n // if `blank` is true, this is an OAuth redirect and should not\n // be rendered\n return <noscript />;\n } else {\n return ({\n blank,\n store,\n history,\n routes,\n redirectPath,\n provider: (\n <Provider store={store} key=\"provider\" children={routes} />\n )\n });\n }\n });\n}", "title": "" }, { "docid": "98396907beddb0941b724e3643b2cd32", "score": "0.643231", "text": "function renderHome() {\n \n // Render the page\n Dom.div(function () {\n \n // display current time\n Obs.observe(function () {\n // get the game time from the db (using ref for the observer)\n var time = Db.shared.ref('time', 'gameTime').get();\n \n renderInfoBar(time);\n \n // show the recent events\n EventViews.recent(time);\n \n // show the lynching voting section\n VotingViews.lynching(time);\n \n // button to go to the overview of the citizens\n Ui.bigButton(function () {\n Dom.text('List of citizens');\n Dom.on('click', function () {\n // go to citizen overview\n Page.nav(['citizens']);\n });\n });\n \n // display the role\n RoleViews.description(Db.personal.get('role'), time);\n });\n \n \n });\n }", "title": "" }, { "docid": "1e09c9036269f98c02244d85eec58d3a", "score": "0.6431289", "text": "function renderApp() {\n const mealsDiv = document.getElementById(\"meals\");\n emptyElement(mealsDiv);\n for(let meal of meals) {\n mealsDiv.appendChild( renderMeal(meal) );\n }\n}", "title": "" }, { "docid": "710e68b187aecd75b752a2648c95c3e2", "score": "0.64187384", "text": "function renderEverything() {\n renderPepperonni()\n renderMushrooms()\n renderGreenPeppers()\n renderWhiteSauce()\n renderGlutenFreeCrust()\n\n renderButtons()\n renderPrice()\n}", "title": "" }, { "docid": "710e68b187aecd75b752a2648c95c3e2", "score": "0.64187384", "text": "function renderEverything() {\n renderPepperonni()\n renderMushrooms()\n renderGreenPeppers()\n renderWhiteSauce()\n renderGlutenFreeCrust()\n\n renderButtons()\n renderPrice()\n}", "title": "" }, { "docid": "5b34175dc69e9505e575413174534e90", "score": "0.64088196", "text": "async getRenderedApp() {\n try {\n let reduxStore = createMainStore({}, boundApi, thunkMiddleware);\n let html = renderApp(reduxStore, renderProps);\n while (asyncActions.length > 0) {\n await asyncActions.shift();\n html = renderApp(reduxStore, renderProps);\n }\n return { html, state: reduxStore.getState() };\n } catch (err) {\n app.emit('error', err);\n }\n }", "title": "" }, { "docid": "8bae85c038beb71a9e432273807ec9bf", "score": "0.64056623", "text": "function _render() {\n\n // View und Content rendern\n _$view.setMod(_B, _M_WEBAPP, _isWebapp);\n _$view.setMod(_B, _M_FULLSCREEN, _isFullscreen);\n _$content.setMod(_B, _E_CONTENT, _M_VISIBLE, _isVisible);\n\n // View-Panels (de-)aktivieren\n if (!_isVisible) {\n setTimeout(function() {\n _renderPanels();\n }, CFG.TIME.ANIMATION);\n } else {\n _renderPanels();\n }\n }", "title": "" }, { "docid": "c574fc8c489045c55554df0bce33d9ee", "score": "0.63972074", "text": "function renderEverything() {\n renderPepperoni();\n renderMushrooms();\n renderGreenPeppers();\n renderWhiteSauce();\n renderGlutenFreeCrust();\n\n renderButtons();\n renderPrice();\n}", "title": "" }, { "docid": "c574fc8c489045c55554df0bce33d9ee", "score": "0.63972074", "text": "function renderEverything() {\n renderPepperoni();\n renderMushrooms();\n renderGreenPeppers();\n renderWhiteSauce();\n renderGlutenFreeCrust();\n\n renderButtons();\n renderPrice();\n}", "title": "" }, { "docid": "c574fc8c489045c55554df0bce33d9ee", "score": "0.63972074", "text": "function renderEverything() {\n renderPepperoni();\n renderMushrooms();\n renderGreenPeppers();\n renderWhiteSauce();\n renderGlutenFreeCrust();\n\n renderButtons();\n renderPrice();\n}", "title": "" }, { "docid": "9020f0fc8879273b6ccb352ea697c5aa", "score": "0.6394727", "text": "function renderEverything() {\n renderPepperonni()\n renderMushrooms()\n renderGreenPeppers()\n renderWhiteSauce()\n renderGlutenFreeCrust()\n renderButtons()\n renderPrice()\n}", "title": "" }, { "docid": "c271c6d7c52f4792d1489c71e72d9eaf", "score": "0.6360377", "text": "render() {\n this.renderNames();\n this.renderAutobots();\n this.renderVehicleForms();\n this.renderBeetleVehicle();\n this.renderPhotoProperty();\n return (\n <div className=\"App\">\n <h1>All transformers:</h1>\n {this.renderNames()}\n <h2>All Autobots:</h2>\n {this.renderAutobots()}\n </div>\n );\n }", "title": "" }, { "docid": "69ec31276525f6e9453a00336e79a76d", "score": "0.6351228", "text": "render() {\n if (isMobile)\n return this.mobileView();\n\n return this.desktopView();\n }", "title": "" }, { "docid": "5df7d1896158e559dcf93051e1ad951d", "score": "0.6330663", "text": "function Next(){\r\n mainapp.Render();\r\n}", "title": "" }, { "docid": "d5a8b1615f8c948731663f0aadc5b668", "score": "0.6321468", "text": "function renderEverything() {\n \n renderPepperoni();\n renderMushrooms();\n renderGreenPeppers();\n renderWhiteSauce();\n renderGlutenFreeCrust();\n\n renderButtons();\n renderPrice();\n}", "title": "" }, { "docid": "df23563d958a9fe40a3e00dc99f5efb7", "score": "0.6309313", "text": "function App () {\n\n\n\t// ===============================\n\t// RETURN\n\t// ===============================\t\n \treturn (\n \t\t<div id=\"App\">\n \t\t<MainPanel />\n \t</div>\n \t);\n}", "title": "" }, { "docid": "0a64da016e3f87ca7d718695382c4a9c", "score": "0.625003", "text": "function main() {\n\t\t// Get the container element\n\t\tvar container = document.querySelector('#wpbody');\n\t\t// Render it with ReactDOM.render / wp.element.render\n\t\trender( el( MainComponent ), container);\n\t}", "title": "" }, { "docid": "8524063d088c6e83cbf38507f34d9cec", "score": "0.62466365", "text": "render() {\r\n return(AppJSX.call(this));\r\n }", "title": "" }, { "docid": "0907a774a5bc1dc6b9be1e3362d024c2", "score": "0.6243131", "text": "function render({ appContent, loading }) {\n const container = document.getElementById('container');\n ReactDOM.render(<Framework loading={loading} content={appContent} mode={mode} />, container);\n}", "title": "" }, { "docid": "9652846b4b4336675277531e124dd2c8", "score": "0.6236825", "text": "function initializeApp() {\n renderFrontPage();\n watchSubmit();\n}", "title": "" }, { "docid": "d67b9cdbe5d441e5f4e620ae2c11df57", "score": "0.623351", "text": "function MyApp() {\n\treturn (\n\t<div>\n\t<Header text=\"Welcome to Kathleen's react site! \" />\n\t<Time />\n\t<Header text =\"Jokes!\" />\n\t<Jokes />\n\t<Header text =\"ToDo List\" />\n\t<App />\n\t<Footer />\n\t</div>\n\t)\n}", "title": "" }, { "docid": "be47fc4875eed2907afcd702525dbb1b", "score": "0.6215423", "text": "render() {\n\t\treturn (\n\t\t\t<Provider store={store}>\n\t\t\t\t<BrowseCarsApp />\n\t\t\t</Provider>\n\t\t);\n\t}", "title": "" }, { "docid": "91a94f863685f09da2a4f85f6681b70b", "score": "0.6203069", "text": "function App() {\n\n // app.use(express.static(path.join(__dirname, 'build')));\n // app.get('/*', function (req, res) {\n // res.sendFile(path.join(__dirname, 'build', 'index.html'));\n // });\n\n return (\n <>\n <Main />\n </>\n );\n}", "title": "" }, { "docid": "dd8c71d93eb731efffc54d79a207a19a", "score": "0.6187148", "text": "function mainView(state, prev, send) {\n return html`\n <main\n class=\"absolute app w-100 h-100\"\n onload=${onload}\n >\n ${Views(state, prev, send)}\n </main>\n `\n}", "title": "" }, { "docid": "fdfab155f98e0bdd3ce3eb55a7400458", "score": "0.6179125", "text": "render() {\n return (\n // Display\n\t <StyleProvider style={getTheme(apbiTheme)}>\n\t <Container>\n\n\t <AppHeader />\n\n\t <Router>\n\t <Scene key=\"home_page\" component={AppBodyData} title=\"Home Page\" hideNavBar={true} renderBackButton={() => {}} usernameLogin={this.props.usernameLogin} />\n\t <Scene key=\"about_page\" component={AboutPage} title=\"About Page\" hideNavBar={true} renderBackButton={() => {}} />\n\t <Scene key=\"forum_page\" component={ForumPage} title=\"Forum Page\" hideNavBar={true} renderBackButton={() => {}} />\n\t <Scene key=\"product_page\" component={ProductPage} title=\"Product Page\" hideNavBar={true} renderBackButton={() => {}} />\n\t <Scene key=\"login_page\" component={LoginPage} title=\"Login Page\" hideNavBar={true} renderBackButton={() => {}} />\n\t </Router>\n\n\t <AppFooter /> \n\t \n\t </Container>\n\t </StyleProvider>\n );\n }", "title": "" }, { "docid": "ab961f816099eb7e006d2143315c846a", "score": "0.61720073", "text": "function render() {\n ReactDOM.render(\n <div className=\"container\">\n <App store={store} />\n <hr />\n <Result store={store}/>\n </div>,\n document.getElementById('root')\n );\n}", "title": "" }, { "docid": "57555495e087b82111206d6267e7768c", "score": "0.6132232", "text": "function App() {\n\treturn (\n\t\t<div>\n\t\t\t<NavbarPilot />\n\n\t\t\t<div>\n\t\t\t\t<Router>\n\t\t\t\t\t{/* <NavbarSys /> */}\n\t\t\t\t\t<Switch>\n\t\t\t\t\t\t<Route exact path='/'>\n\t\t\t\t\t\t\t<Home />\n\t\t\t\t\t\t</Route>\n\n\t\t\t\t\t\t<Route path='/About'>\n\t\t\t\t\t\t\t<About />\n\t\t\t\t\t\t</Route>\n\t\t\t\t\t\t<Route path='/Services'>\n\t\t\t\t\t\t\t<Services />\n\t\t\t\t\t\t</Route>\n\t\t\t\t\t\t<Route path='/Contact'>\n\t\t\t\t\t\t\t<Contact />\n\t\t\t\t\t\t</Route>\n\t\t\t\t\t\t<Route path='/Careers'>\n\t\t\t\t\t\t\t<Careers />\n\t\t\t\t\t\t</Route>\n\t\t\t\t\t</Switch>\n\t\t\t\t</Router>\n\t\t\t</div>\n\n\t\t\t{/* <Footer /> */}\n\t\t</div>\n\t);\n}", "title": "" }, { "docid": "28f161c4a34a943eb3c7de5208a2b94b", "score": "0.6126876", "text": "render() {\n if (!this.gameStarted) {\n this.UIhomePage.render();\n }\n }", "title": "" }, { "docid": "32e37566c832eab2fc214f8f922fa9bb", "score": "0.6123186", "text": "function renderAppData () {\n // load the current app data from localStorage\n let pageData = loadData();\n\n // get the menu html\n let menuHtml = menuForDemoHtml.replace(\"View app data\", \"Switch back to app\").replace(\"js-toggle-view\", \"js-toggle-view active\");\n let headingHtml = `<h1>App Data</h1>`;\n\n // get the app data\n let dataAsString = JSON.stringify(pageData, null, 2);\n\n // syntax highlight json\n let iteration = 0;\n let highlightedString = dataAsString.replace(/[^\\\\]\"/g, function (match) {\n if (iteration % 2 === 0) {\n iteration++;\n return match.replace('\"', '<span class=\"green-code\">\"')\n } else {\n iteration++;\n return match.replace('\"', '\"</span>')\n }\n });\n\n document.body.innerHTML = '<div class=\"app-data\">' + menuHtml + headingHtml + '<div class=\"remake-json\">' + highlightedString + '</div></div>';\n document.body.classList.add(\"dark\");\n }", "title": "" }, { "docid": "6cbc1dcfc24fd5bc624fa7a64cd65551", "score": "0.6119536", "text": "function App(props) {\n\treturn (\n\t\t<>\n\t\t\t<CssBaseline>\n\t\t\t\t <Header /> \n\t\t\t\t<Game />\n\t\t\t\t{/* <Footer /> */}\n\t\t\t</CssBaseline>\n\t\t</>\n\t)\n}", "title": "" }, { "docid": "ed018b8f3c4d12a98617fd684683666d", "score": "0.6117228", "text": "function main() {\n\t\t\ttry{\n\t\t\t\trender();\n\t\t\t} catch(e) {\n\t\t\t\tconsole.log(e);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(rendering == true) {\n\t\t\t\traf(main.bind(this));\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "9ade27849fbb9021885d33c7392a4dda", "score": "0.61166906", "text": "static homePage(req, res) {\n // Fetch all applications\n Application.find({userId: req.user._id})\n .then(applications => {\n res.render(\"pages/developer\", {\n title: \"Developer Dashboard\",\n user: req.user,\n applications,\n getRealUrl,\n success: req.flash('success'),\n error: req.flash('errors')\n })\n });\n }", "title": "" }, { "docid": "664d71c91591962c862c822631ae5d0f", "score": "0.6114671", "text": "function App() {\n\tconst theme = createMuiTheme({\n\t\tpage: {\n\t\t\t//50px navbar, 15 top and bottom paddings\n\t\t\theight: 'calc(100vh - 51px)',\n\t\t\tpadding: 15,\n\t\t\tmargin: 15\n\t\t},\n\t\tblock: {\n\t\t\tpadding: 15,\n\t\t\tmargin: 15,\n\t\t},\n\t\toverrides: {\n\t\t\t\n\t\t}\n\t});\n\n\treturn (\n\t\t<ThemeProvider theme={theme}>\n\t\t\t<HashRouter basename={'/'} >\n\t\t\t\t<Routes />\n\t\t\t</HashRouter>\n\t\t</ThemeProvider>\n \t);\n}", "title": "" }, { "docid": "779b0630bce5d9c4096f257a110136c3", "score": "0.6100458", "text": "function renderEverything() {\n renderPepperoni();\n renderMushrooms();\n renderGreenPeppers();\n renderWhiteSauce();\n renderGlutenFreeCrust();\n\n renderButtons();\n renderPrice(event);\n}", "title": "" }, { "docid": "4f03f27a7e39c27ef9bb7c8276d46684", "score": "0.61000824", "text": "function render(){\n ReactDOM.render(<div className=\"container\"><App store={store} /> <hr /> <Results store={store} /></div>, document.getElementById('root'));\n}", "title": "" }, { "docid": "fa12b852abf8f435a19192f41a4ca860", "score": "0.6094587", "text": "render () {\n\t\treturn (\n\t\t\t<html>\n\t\t\t\t<Head>\n\t\t\t\t\t{/* <title>My page</title> */}\n\t\t\t\t\t{/* Injects all styles into HEAD */}\n\t\t\t\t\t{this.props.styleTags} \n\t\t\t\t</Head>\n\t\t\t\t<body>\n\t\t\t\t\t<Main />\n\t\t\t\t\t<NextScript />\n\t\t\t\t</body>\n\t\t\t</html>\n\t\t)\n\t}", "title": "" }, { "docid": "13b23920cce288ce0645d1203f9d48d4", "score": "0.6086852", "text": "function render() {\n if (theGame.state != \"inGame\") {\n theGame.splash();\n } else {\n /* Render the map. This comes first because the map is permanently\n * \"under\" everything else.\n */\n theMap.render();\n\n /* Render the goodies. This comes next because the moving entities can\n * walk \"over\" the goodies. \n */\n // TODO: build out Goodies class, Collection, and functionality.\n //theGoodies.render();\n\n /* Render the bugs. This comes next because the bugs appear \"under\" the \n * player sprite.\n */\n enemies.render();\n\n // Render the player.\n thePlayer.render();\n \n theGame.render();\n //theDash.render();\n }\n }", "title": "" }, { "docid": "e569de7bdfd4843434dc3725682c5a37", "score": "0.6085212", "text": "function render () {\n\t\t\tdraw(canvas, ctx, electrons);\n\t\t}", "title": "" }, { "docid": "11db0e714bd38774cd1f561bbef2cb54", "score": "0.60816616", "text": "function render() {\n\n\tswitch (scene.scene_state) {\n\t\tcase \"splash\":\n\t\t\trenderer.render(splash_stage);\n\t\t\tbreak;\n\t\tcase \"gameplay\":\n\t\t\tbox.render();\n\t\t\theart.render();\n\t\t\trenderer.render(gameplay_stage);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\n\n}", "title": "" }, { "docid": "d75d5ce8595f9beafd88fd681b1608b2", "score": "0.60796094", "text": "function App() {\n\treturn (\n\t\t<>\n\t\t\t<NavBar />\n\t\t\t<ItemListContainer />\n\t\t</>\n\t);\n}", "title": "" }, { "docid": "24d5cb504b574f0e6e3a40d8c1c4c1e7", "score": "0.60501295", "text": "function render() {\n renderBackgroundObjects();\n renderForegroundObjects();\n }", "title": "" }, { "docid": "b63b44cd831d1bbaccd51c18867330f1", "score": "0.6049747", "text": "function _renderAppShell(res, appConfig, appData) {\n appConfig = appConfig || {};\n appData = appData || {};\n\n res.render('index', {\n layout : false\n , appTitle : appConfig.appTitle\n , appConfig : JSON.stringify(appConfig)\n , appData : JSON.stringify(appData)\n });\n}", "title": "" }, { "docid": "2dc8a3b659428332bbb071283d3c7f07", "score": "0.6032648", "text": "render() {\n\t\t\treturn(\n\t\t\t\t<div class={ homeStyle.phoneContainer }>\n\t\t\t\t\t<div class={ homeStyle.topBar }>\n\t\t\t\t\t\t<SettingsIcon />\n\t\t\t\t\t\t<SaveIcon />\n\t\t\t\t\t</div>\n\t\t\t\t\t<SearchBox />\n\t\t\t\t</div>\n\t\t\t)\n\t}", "title": "" }, { "docid": "39fae3c92d483c9e14da55ef368b74fc", "score": "0.60167533", "text": "function renderHome (req, res) {\n // this function render home page\n res.render('index');\n}", "title": "" }, { "docid": "5fca272cf1b286c3052c1b3fa4d1f5b6", "score": "0.6010161", "text": "function startApp () {\n if (window.StatusBar) {\n window.StatusBar.styleDefault();\n }\n\n ReactDOM.render(<Main dataProp={{renderCards:null}}/>, document.getElementById('dalbhaat-app'));\n}", "title": "" }, { "docid": "94ec76d3bb61f9e7b3524b8e588fa2a9", "score": "0.60025257", "text": "render(){\n /**\n * `render` must return a lit-html `TemplateResult`.\n *\n * To create a `TemplateResult`, tag a JavaScript template literal\n * with the `html` helper function:\n */\n return html`\n <custom-style>\n <style include=\"lumo-typography lumo-color\"></style>\n </custom-style>\n <vaadin-app-layout primary-section=\"drawer\">\n <vaadin-drawer-toggle slot=\"navbar\"></vaadin-drawer-toggle>\n <img slot=\"navbar\" src=\"https://i.imgur.com/GPpnszs.png\" alt=\"Vaadin Logo\" width=\"100\" height=\"31\" referrerpolicy=\"no-referrer\">\n <h3 slot=\"branding\">Application Name</h3>\n <vaadin-tabs slot=\"drawer\" orientation=\"vertical\" theme=\"minimal\" style=\"margin: 0 auto; flex: 1;\">\n <vaadin-tab>\n <iron-icon icon=\"vaadin:home\"></iron-icon>\n Page 1\n </vaadin-tab>\n <vaadin-tab>\n <iron-icon icon=\"vaadin:list\"></iron-icon>\n Page 2\n </vaadin-tab>\n <vaadin-tab>\n <iron-icon icon=\"vaadin:options\"></iron-icon>\n Page 3\n </vaadin-tab>\n <vaadin-tab>\n <iron-icon icon=\"vaadin:question\"></iron-icon>\n Page 4\n </vaadin-tab>\n </vaadin-tabs>\n <div class=\"content\">\n <h3>Page title</h3>\n <p>Page content</p>\n </div>\n </vaadin-app-layout>\n `;\n }", "title": "" }, { "docid": "27b682152effe4e1912ebee174682f5e", "score": "0.6001342", "text": "function RootApp() {\n ReactDOM.render(<App appTitle=\"Github Profile\" />, document.getElementById('root'));\n}", "title": "" }, { "docid": "d8fe173e9de9af5609dd4e98f3c5a3ed", "score": "0.5998379", "text": "function doRender() {\n __WEBPACK_IMPORTED_MODULE_3_react_dom___default.a.hydrate(__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(Root, null), document.getElementById('main'));\n}", "title": "" }, { "docid": "896567dbde1d42de5f0434f0ca79d3b3", "score": "0.59955055", "text": "_renderAll() {\n const options = this.options;\n // set id of the container id given\n if (options.id)\n this.$el.id = options.id;\n // set classes of the container if given\n if (options.className) {\n const className = options.className;\n const classes = typeof className === 'string' ? [className] : className;\n this.$el.classList.add(...classes);\n }\n\n // render template and insert it in the main element\n const html = this._tmpl(this.model);\n this.$el.innerHTML = html;\n this.onRender();\n }", "title": "" }, { "docid": "a7fe579594550a4a9eebda1398017bb6", "score": "0.599338", "text": "function Root () {\n return (\n <RouteProvider routes={routes}>\n <div className='main-app-container'>\n {/* ___CHANGEME___ */}\n <Helmet\n title='Welcome'\n titleTemplate='PWA Starter | %s'\n defaultTitle='Welcome'\n />\n\n <AllModals />\n <GlobalHeader />\n <Notification />\n <Router routes={routes} />\n <NotFound />\n </div>\n </RouteProvider>\n )\n}", "title": "" }, { "docid": "03227d7b35c0992daaa171b5e7e6f1fa", "score": "0.59895605", "text": "function render() {\n //accessing html dom\n let html = '';\n //if quiz has not started yet\n if (store.quizStarted === false) {\n //if quiz is on last question\n if(store.questionNumber === store.questions.length) {\n //render the end game page\n html = generateEndOfGamePage();\n //if quiz is not on the last question\n } else {\n //render main page\n html = generateMainPage();\n }\n //if quiz has been started and quiz is on last question\n } else if (store.questionNumber === store.questions.length){\n //render end game page\n html = generateEndOfGamePage();\n //if quiz has been started and your not on lasr question\n } else {\n //render question\n html= generateQuestionPage();\n }\n //assign to html\n $('main').html(html);\n}", "title": "" }, { "docid": "bb40eea72dcdb2c245dd819d440f82f4", "score": "0.5982196", "text": "function App() {\r\n\t\tcontext = getCanvas();\r\n\r\n\t}", "title": "" }, { "docid": "f657b1779b345901b87beb45f1a60a25", "score": "0.5980943", "text": "function render() {\r\n // Get the width of the window before rendering chart elements.\r\n updateWidth();\r\n\r\n // Store the window width/size - use the value in computing\r\n // the required bin size base on the given screen width available\r\n // for visualization.\r\n storeScreenWidth(width);\r\n\r\n // Render heatmap.\r\n renderHeatmap();\r\n\r\n // Render barchart.\r\n // If barchart is present\r\n\t\t if ($('#container-barchart').length > 0) {\r\n\t\t renderBarChart();\r\n\t\t }\r\n\r\n // Remove all markers.\r\n delMarker('');\r\n // Close all windows.\r\n infoWindow('off');\r\n // Remove the bar chart.\r\n d3.selectAll('#container-barchart').remove();\r\n }", "title": "" }, { "docid": "dad2860d28e6fbb7c0b3befb26a7fb53", "score": "0.59716445", "text": "render() {\n\t\t// return special JSX code with a very specific structure.\n\t\t// Default structure:\n\t\t// return (\n\t\t// \t<Html>\n\t\t// \t\t<Head />\n\t\t// \t\t\t<body>\n\t\t// \t\t\t\t<Main />\n\t\t// \t\t\t\t<NextScript />\n\t\t// \t\t\t</body>\n\t\t// \t</Html>\n\t\t// );\n\t\treturn (\n\t\t\t<Html lang='en'>\n\t\t\t\t<Head />\n\t\t\t\t<body>\n\t\t\t\t\t<div id='overlays' />\n\t\t\t\t\t<Main />\n\t\t\t\t\t<NextScript />\n\t\t\t\t</body>\n\t\t\t</Html>\n\t\t);\n\t}", "title": "" }, { "docid": "606db3b4617107dc2990eee31d1d01ab", "score": "0.5966811", "text": "function renderGlobal() {\n // Render our header first\n const navbar = document.getElementById('navbar');\n if (navbar) {\n ReactDOM.render(<Navbar />, navbar);\n }\n\n // Render modals we need on each page\n ReactDOM.render(\n <Login socialLogin={(JanesWalk.stacks || { 'Social Logins': '' })['Social Logins']} />,\n document.getElementById('modals')\n );\n}", "title": "" }, { "docid": "655f570a143b2080271cadf138656af9", "score": "0.5952493", "text": "render() {\n if (this.state.appIsReady) {\n const route = this.state.authNeeded === true ? 'login' : 'rootNavigation';\n return <StackNavigation id=\"root\" navigatorUID=\"root\" initialRoute={Router.getRoute(route)} />;\n }\n return (<Exponent.Components.AppLoading />);\n }", "title": "" }, { "docid": "0d725d58e2c95f99a1f8aec76cf5c31f", "score": "0.59503955", "text": "function render(state) {\n // console.log('state came in as:' , state);\n // We use funtion invocation that actually runs the function ans then 'returns' the markup so that it is properly rendered in the browser.\n\n // innerHTMl property root element\n document.querySelector('#root').innerHTML = `\n${Navigation(state)}\n ${Header(state)}\n ${Main(state)}\n ${Footer(state)}\n `;\n /*\n Developers note: the 'Navigation functional components renders 'new' links each aand every time. Therefore, on each-render , we must grab those links and re-attach the event listeners to respond to 'clicks'.\n\n\n */\n\n router.updatePageLinks();\n // replaces our custom click event listeners with the recursive render.\n}", "title": "" }, { "docid": "ada49273ad3661a95b9a0c98197741ef", "score": "0.5936645", "text": "function App() {\n\treturn (\n\t\t<Router>\n\t\t\t<div style={{minHeight: '100vh', position: 'relative'}}>\n\t\t\t\t<ThemeProvider theme={theme}>\n\t\t\t\t\t<CssBaseline />\n\t\t\t\t\t<Switch>\n\t\t\t\t\t\t<Route path='/cms'>\n\t\t\t\t\t\t\t<CMS />\n\t\t\t\t\t\t</Route>\n\t\t\t\t\t\t<Route path='/post/:url'>\n\t\t\t\t\t\t\t<Article />\n\t\t\t\t\t\t</Route>\n\t\t\t\t\t\t<Route exact path='/'>\n\t\t\t\t\t\t\t<Blog />\n\t\t\t\t\t\t</Route>\n\t\t\t\t\t</Switch>\n\t\t\t\t</ThemeProvider>\n\t\t\t</div>\n\t\t</Router>\n\t);\n}", "title": "" }, { "docid": "fb5d0827a71aac398368e90edcafebec", "score": "0.5934708", "text": "function FastApp() {\n this.numRenderWindows = 4;\n this.renderWindows = [];\n}", "title": "" }, { "docid": "b01872e1542f4c4b23327e898a4f8d87", "score": "0.5930787", "text": "render() {\n // Get a handle on the main div\n const main_div = document.getElementById('notebook-builder');\n\n // Clear\n main_div.innerHTML = '';\n\n // Draw widgets\n this.widgets.forEach(widget => {\n main_div.appendChild(widget.render());\n });\n\n main_div.appendChild(this.selector.render());\n main_div.appendChild(this.form_options.render());\n }", "title": "" }, { "docid": "f452d117da9433030c2b3ae6a1a2817b", "score": "0.5929656", "text": "function App() {\n //renders the basic stuff to the dom for each page of this app\n return (\n <div className='App'>\n <header className='App-header'>\n <h1 className='App-title'>Feedback!</h1>\n <h4>Don't forget it!</h4>\n </header>\n {/* These are all the various routers that match the components that were imported */}\n {/* The user starts at the home screen and then is directed to each component before being looped back to the home screen */}\n <Router>\n <Route exact path=\"/\" component={Home} />\n <Route exact path=\"/feeling\" component={Feeling} />\n <Route exact path=\"/understanding\" component={Understanding} />\n <Route exact path=\"/support\" component={Support} />\n <Route exact path=\"/comments\" component={Comments} />\n <Route exact path=\"/review\" component={Review} />\n <Route exact path=\"/success\" component={Success} />\n </Router>\n </div>\n );\n}", "title": "" }, { "docid": "a34bcf63ff667e4f4fb4e9cc4d67b159", "score": "0.59243196", "text": "function App() {\r\n const who = \"World\";\r\n return function render() {\r\n return [\"div\", \"Hello, \", who, \"!\"];\r\n };\r\n }", "title": "" }, { "docid": "c4b7e2bc3ac059c93457bf908a713f9d", "score": "0.59159726", "text": "function main(){\n const dataForApplication = getData();\n drawMainPage(dataForApplication);\n}", "title": "" }, { "docid": "6d85d2285d5c7496773948fa74a11fb2", "score": "0.5911699", "text": "function render() {\r\n\tvar route = win.location.hash.substr(1); //Get the route by taking a piece of the url.\r\n\tReact.render(<App route={route} />, document.getElementById('app'));\r\n\t//Pass App, route as a property \r\n}", "title": "" }, { "docid": "1954fcb91caae03cba70b36efb7decaf", "score": "0.5904455", "text": "function renderTodoListApp() {\n ReactDOM.render(\n <TodoList dispatcher={createTodoDispatcher()} />,\n window.document.getElementById('todo-list')\n );\n}", "title": "" }, { "docid": "aa9fcf629e6d1521a94114516db0ac6a", "score": "0.5903453", "text": "function initializeApplication() {\n\n app.utils.getPageResources(chkErr(function(templates, content, config) {\n\n app.utils.renderPage(templates.page_modal, content); \n \n }));\n\n }", "title": "" }, { "docid": "b50b8dd74b312fb6933cd4e495abb0e7", "score": "0.58994055", "text": "function render() {\n const winRate = victoryCount / (lossCount + victoryCount);\n document.title = renderTitle(winRate);\n document.body.innerHTML = renderContent(winRate, showDisconnectedHint);\n document.querySelector('#favicon').href = renderFavicon(winRate);\n}", "title": "" }, { "docid": "df481f85cebd033ab5d9e60c7119f817", "score": "0.5897484", "text": "function renderApp(status, user, cart){\n ReactDOM.render(\n <Router>\n <App loggedIn={status} user={user} cart= {cart}/>\n </Router>\n ,\n document.getElementById('root'));\n\n // If you want your app to work offline and load faster, you can change\n // unregister() to register() below. Note this comes with some pitfalls.\n // Learn more about service workers: https://bit.ly/CRA-PWA\n serviceWorker.unregister();\n}", "title": "" }, { "docid": "5eec60e96340c6f804f331e5f9927d78", "score": "0.5891528", "text": "render() {\n }", "title": "" }, { "docid": "6523569cb71890ac75d7304b39e959af", "score": "0.5891134", "text": "function doRender() {\n console.log('rendered')\n res.render(\"index\", { studentRecords: studentRecords, courseNames: courseNames });\n\n }", "title": "" }, { "docid": "2ef1726fd721f7fb02bce73d6928c8d4", "score": "0.5887527", "text": "function App() {\n return (\n <ThemeProvider theme={theme}>\n {/* separation of concerns\n separate file for routes.\n create a const file and put paths there.\n Put base url also in the const file\n Single responsibility \n Create different file for fetch. \n Wrapper components.\n Create different component for headings\n Different component for headings\n containers inside containers use reusable components\n */}\n <Routes />\n </ThemeProvider>\n );\n}", "title": "" }, { "docid": "c788aae9eedda23e47ac8dedd36db61b", "score": "0.5880041", "text": "function update() {\n React.render(React.createElement(Main, {app: app}),\n appContainer);\n }", "title": "" }, { "docid": "628fe445cfd146063f5825f31638d4fa", "score": "0.587568", "text": "function App(props) {\n\t return _react2.default.createElement(\n\t \"div\",\n\t { className: \"app\" },\n\t _react2.default.createElement(_.Navigation, null),\n\t props.children\n\t );\n\t}", "title": "" }, { "docid": "3c0909bd41ce5e210153f049b32e515b", "score": "0.58733016", "text": "render() { //takes care of rendering the content written inside this \n //on the html page\n return(\n <div className=\"App-component\">\n <p>This is my first react component, bless me!</p>\n </div>\n )\n }", "title": "" }, { "docid": "7e27dfec2a0ca09856588d3b7c89943f", "score": "0.5873041", "text": "function render() {\n\n ctx.fillStyle = 'black';\n ctx.fillRect(0, 0, canvas.width, 60);\n\n if (state === 'scroll') {\n ctx.translate(0, scrollProgress - 5 * 83);\n renderTerrain(newTerrain);\n\n newItems.forEach(item => item.render());\n newBugs.forEach(bug => bug.render());\n newRocks.forEach(rock => rock.render());\n\n ctx.translate(0, -scrollProgress + 5 * 83);\n }\n\n ctx.translate(0, scrollProgress);\n renderTerrain(terrain);\n\n [...items, ...bugs, ...rocks].forEach(entity => entity.render());\n\n doppelganger.render();\n\n if (state !== 'choose character') {\n player.render();\n }\n ctx.translate(0, -scrollProgress);\n\n renderScorePanel();\n renderBottomPanel();\n if (state === 'game over') {\n renderMessage('Game over');\n }\n if (state === 'win') {\n renderMessage('You win!');\n }\n if (state === 'choose character') {\n renderCharacterSelection();\n }\n }", "title": "" }, { "docid": "51a796c5c89467fe99bfe3f0f562db73", "score": "0.5869643", "text": "render() {\n\t this.renderer.render();\n\t }", "title": "" }, { "docid": "0d5f9d63ff0401094d27899afa5d1ef6", "score": "0.58680016", "text": "render() {\n console.log(\"main/App.js: render() called.\");\n\n return (\n <div className=\"app\">\n <Switch>{/* app, view */}\n\n {/* view - home */}\n <Route path=\"/home\" component={Home}></Route>\n\n {/* view - default */}\n {/* note: the 'App' class needs to extend 'Component' instead */}\n {/* of extending 'PureComponent' for router Redirect to work */}\n <Redirect from=\"/\" to=\"home\"></Redirect>\n\n </Switch>{/* view end */}\n {/* app end */}\n </div>\n );\n }", "title": "" }, { "docid": "db4f6191ba05adebc5ba9daec2a37052", "score": "0.5857728", "text": "render() {\n\t\tif (this.state.loading) {\n\t\t\treturn (\n\t\t\t\t<Root>\n\t\t\t\t\t<AppLoading />\n\t\t\t\t</Root>\n\t\t\t);\n\t\t} else {\n\t\t\t// navigation is initiated with sign in page\n\t\t\treturn (\n\t\t\t\t<Root>\n\t\t\t\t\t<View style={{ flex: 1 }}>\n\t\t\t\t\t\t<NavigationContainer>\n\t\t\t\t\t\t\t<StackNavigator />\n\t\t\t\t\t\t</NavigationContainer>\n\t\t\t\t\t</View>\n\t\t\t\t</Root>\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "03954df67b78b5d1de7967be02e6577d", "score": "0.5851145", "text": "function MainContent() {\n render(\n // <div>\n // <h1>My name is Selina</h1>\n // <p>\n // I'm a current radiographer, seeking to improve my programming skills.\n // </p>\n // </div>\n );\n}", "title": "" }, { "docid": "e476ba0f4ae21aec7c67b870f7abb3d7", "score": "0.58480746", "text": "function render() {\n for (const [root, component] of roots) {\n let dataDom = component();\n root.innerHTML = dataDom; // render\n }\n }", "title": "" }, { "docid": "59f653bce13ea9d54dabd7a9634651ce", "score": "0.5842893", "text": "render() {\n const jsxRender = <UiApp />;\n return jsxRender;\n }", "title": "" }, { "docid": "dd33dfe5c1e5d5eeca438200e358c057", "score": "0.58393306", "text": "render() {\n\t\treturn (\n\t\t\t// Main div block with gray background\t\t\t\t\n\t\t\t<div>\n\t\t\t\t <LeftPanel/>\n\t\t\t \t<Body />\n\t\t\t \t<Footer />\n\t\t\t</div>\n\t\t\t);\n\t}", "title": "" }, { "docid": "0db8ac664de10e4fcb16bb4b7e774c5b", "score": "0.5837675", "text": "function App() {\n\treturn (\n\t\t<div className=\"App\">\n\t\t\t{/* 组件 */}\n\t\t\t{/* <ClassComponent /> */}\n\t\t\t{/* <FunctionComponent /> */}\n\n\t\t\t{/* setState */}\n\t\t\t{/* <SetStatePage /> */}\n\n\t\t\t{/* 生命周期 */}\n\t\t\t{/* <LifeCyclePage /> */}\n\n\t\t\t{/* 组件复合 */}\n\t\t\t{/* <HomePage /> */}\n\t\t\t{/* <UserPage /> */}\n\n\t\t\t{/* Redux */}\n\t\t\t{/* <ReduxPage /> */}\n\n\t\t\t{/* ReactRedux */}\n\t\t\t{/* <ReactReduxPage /> */}\n\n\t\t\t{/* ReactRouter */}\n\t\t\t{/* <RouterPage /> */}\n\n\t\t\t{/* PureComponent */}\n\t\t\t{/* <PureComponentPage /> */}\n\n\t\t\t{/* Hook */}\n\t\t\t{/* <HookPage /> */}\n\t\t\t{/* <CustomHookPage /> */}\n\n\t\t\t{/* HookApi (优化)*/}\n\t\t\t{/* 函数组件内 */}\n\t\t\t{/* <UseMemoPage /> */}\n\t\t\t{/* 父子组件间 */}\n\t\t\t{/* <UseCallbackPage /> */}\n\t\t</div>\n\t);\n}", "title": "" }, { "docid": "9a817e3adb10655bd3cce6f0974dcaf0", "score": "0.5834947", "text": "function Application(){\n\tvar name = \"Shane\";\n\tconsole.log(React)\n\treturn(\n// ************RETURN WILL ONLY RETURN ONE TAG AT A TIME*******\n// ALL TAGS MUST HAVE A COMMON ANCESTOR(1 PARENT/1 DIV MUST WRAP AROUND EVERYTHING) TO RUN MORE THAN ONE TAG\t\t\n\t\t<div>\n\t\t\t<div>\n\t\t\t\t<h1>Hello, World!</h1>\n\t\t {/* ****runs the return of the component 'Message'. can be used wherever and however \n\t\t many times */} \n\t\t{/* calling component name/gender as an attribute */}\n\t\t\t\t<Message name=\"Shane\" gender =\"M\"/>\n\t\t\t\t<Message name=\"Carla\"/>\n\t\t\t\t<Message name=\"Nick\"/>\n\t\t\t\t<Message name=\"Hayes\"/>\t\t\t\t\n\t\t\t</div>\n\t\t\t<div>\n\t\t\t\t<h2>From {name}. {2+2} </h2>\n\t\t\t</div>\n\t\t\t{ /* \"if commenting inside of a 'return' the comment has to be surrounded\n\t\t\tby {} and then place '/*' and close with * followed / inside of the\n\t\t\t {}\" */}\n\t\t</div>\n\t\t)\n}", "title": "" }, { "docid": "aa5e0c63035055a5b765228e988b3007", "score": "0.5833775", "text": "function render() {\n let html = '';\n\n if (STORE.quizStarted === false) {\n $('main').html(generateStartScreenHtml());\n return;\n }\n else if (STORE.currentQuestion >= 0 && STORE.currentQuestion < STORE.questions.length) {\n html = generateQuestionNumberAndScoreHtml();\n html += generateQuestionHtml();\n $('main').html(html);\n }\n else {\n $('main').html(generateResultsScreen());\n }\n}", "title": "" }, { "docid": "7a4794d2159828aa792582ac075fda42", "score": "0.5832254", "text": "render() {\n const isFile = this.state.isFileLoaded;\n if (isFile) {\n return (\n <FileLoadedApp {...this.state} />\n );\n } else {\n return (\n <StartApp {...this} />\n );\n }\n }", "title": "" }, { "docid": "55faed502516f1e3db4b4c2e2eb58cc2", "score": "0.5826175", "text": "function renderFullPage(meta, html, css) {\n return \"\\n <!DOCTYPE html>\\n <html>\\n <head>\\n\\t\\t\\t\\t<meta charSet=\\\"utf-8\\\" />\\n\\t\\t\\t\\t<meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1\\\" />\\n\\t\\t\\t\\t<meta name=\\\"theme-color\\\" content=\\\"#000000\\\" />\\n\\t\\t\\t\\t<link rel=\\\"icon\\\" href=\\\"/favicon.ico\\\" />\\n\\t\\t\\t\\t<link rel=\\\"manifest\\\" href=\\\"/manifest.json\\\" />\\n\\t\\t\\t\\t\".concat(meta, \"\\n <style id=\\\"jss-server-side\\\">\\n\\t\\t\\t\\t\\t\").concat(css, \"\\n\\t\\t\\t\\t\\tbody {\\n\\t\\t\\t\\t\\t\\tmargin: 0;\\n\\t\\t\\t\\t\\t\\t-webkit-font-smoothing: antialiased;\\n\\t\\t\\t\\t\\t\\t-moz-osx-font-smoothing: grayscale;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t</style>\\n </head>\\n <body>\\n <div id=\\\"root\\\">\").concat(html, \"</div>\\n\\t\\t\\t\\t<script src=\\\"/bundle.js\\\"></script>\\n </body>\\n </html>\\n \");\n} // Initialize app", "title": "" }, { "docid": "1a9a279c92e2fe66760b4a5a62497255", "score": "0.5825033", "text": "function App() {\n return (\n <ApplicationViews />\n );\n}", "title": "" } ]
3c786d52da8371ec457205dbcd92d043
Gets the Y position of the cell within the content.
[ { "docid": "eb24bf2bb51799a6af406611bb76154e", "score": "0.0", "text": "get y() {\n return this.i.cd;\n }", "title": "" } ]
[ { "docid": "e9389616fcab522cfe20a619667b2f93", "score": "0.7240178", "text": "function posY(elem) {\n // Get the computed style and get the number out of the value\n return parseInt(getStyle(elem, \"top\"));\n}", "title": "" }, { "docid": "8610bf60a9356b9970e84fb1e561315b", "score": "0.7131941", "text": "getPositionY() {\n let posY = 0;\n if (!this.isFirstLine()) {\n let previousLineSibling = this.config.images[this.getPreviousLineSibling()];\n posY = previousLineSibling.height + previousLineSibling.top;\n }\n return posY;\n }", "title": "" }, { "docid": "48405869669a97a30d40df1d7536058b", "score": "0.71161693", "text": "function getCellOffsetTop (yCoord) {\n var topScreenOffset = getScrollYCell();\n if (topScreenOffset > yCoord) return -100;\n var offset = labelCellHeight;\n for (var i = topScreenOffset; i < yCoord; i++) {\n offset += getCellHeight(i);\n }\n return offset;\n}", "title": "" }, { "docid": "8fbd81ba6aba75355563ca9805641e34", "score": "0.7078902", "text": "function getScrollYCell () {\n var scrollY = document.getElementById(\"scrollbar\").scrollTop;\n return ~~(scrollY / defaultCellHeight)+1; \n}", "title": "" }, { "docid": "60f37254b8bcc29f46635c7afdc726dc", "score": "0.69791216", "text": "centerY() {\n return this.cellSize / 2 + this.cellSize * (this.rowCount - 1 - this.row);\n }", "title": "" }, { "docid": "292ef7cd33ba415bdd8a4ecdbf9c905f", "score": "0.6781695", "text": "GetYPosition()\n {\n return this.position.y;\n }", "title": "" }, { "docid": "29892169bb226f4e3b9c68ad0961edcd", "score": "0.6759583", "text": "getCursorY() {\n return this._cur[1]\n }", "title": "" }, { "docid": "2a07208b50989052974bcddd21b37089", "score": "0.6743319", "text": "function getYPosition(){\n\t\treturn this.start_y;\n\t}", "title": "" }, { "docid": "8485eab3ffbca27074e797dd02130ae9", "score": "0.67086995", "text": "getY() {\n return this.position[1];\n }", "title": "" }, { "docid": "00bc0c4e788c02bd646ddf29840ff609", "score": "0.66541445", "text": "function currentYPosition() {\n // Firefox, Chrome, Opera, Safari\n if (self.pageYOffset) return self.pageYOffset;\n // Internet Explorer 6 - standards mode\n if (document.documentElement && document.documentElement.scrollTop)\n return document.documentElement.scrollTop;\n // Internet Explorer 6, 7 and 8\n if (document.body.scrollTop) return document.body.scrollTop;\n return 0;\n }", "title": "" }, { "docid": "7dba7464ba3ad2395cfd23be30c8527f", "score": "0.6644585", "text": "function getPointY(d) {\n\t\treturn padding.top + 2 * pointR + d.row * 3 * pointR;\n\t}", "title": "" }, { "docid": "9d88168625928f7ca161bc130dc38f7f", "score": "0.6620637", "text": "_getCellPosition($cell){\n\t\treturn $cell.data('_gridstack_node');\n\t}", "title": "" }, { "docid": "3c8f59e026c34334a3c1660230f6accb", "score": "0.66149175", "text": "function findCellFromY (pixelY) {\n var offset = labelCellHeight;\n var cellCount = getScrollYCell();\n if (offset > pixelY) return -1;\n while (offset < pixelY) {\n offset+= getCellHeight(cellCount);\n if (offset >= pixelY) break;\n cellCount += 1;\n }\n return cellCount;\n}", "title": "" }, { "docid": "9e3335b4bb626e60c4baf7404f33b8cb", "score": "0.6607625", "text": "pageY() {\n return ELEM._getVisibleTopPosition(this.elemId);\n }", "title": "" }, { "docid": "61d64842d086de4d35416cea4e69eb7c", "score": "0.65672123", "text": "get yPosition() { return this._yPosition; }", "title": "" }, { "docid": "3e502b81c70f6281efc405ee78b31957", "score": "0.6543746", "text": "function getElementYOffset() {\n var vertical_position = 0;\n if (pageYOffset)//usual\n vertical_position = pageYOffset;\n else if (document.documentElement.clientHeight)//ie\n vertical_position = document.documentElement.scrollTop;\n else if (document.body)//ie quirks\n vertical_position = document.body.scrollTop;\n return vertical_position;\n}", "title": "" }, { "docid": "26ffd5d6b8b314707931def5aebfed15", "score": "0.65110147", "text": "getPosition(cell) {\n return {\n // Rest of division of current cell's index by the total amount of cells in width (x direction)\n x: cell.index % this.width,\n // Natural result of division of current cell's index by the total amount of cells in width (x direction)\n y: Math.trunc(cell.index / this.width)\n }\n }", "title": "" }, { "docid": "6e3eda63418a8496a32ba1392816314e", "score": "0.6491211", "text": "function elmYPosition(elm) {\n var y = elm.offsetTop;\n var node = elm;\n while (node.offsetParent && node.offsetParent != document.body) {\n node = node.offsetParent;\n y += node.offsetTop;\n }\n return y;\n}", "title": "" }, { "docid": "8b6e47585833ef24d797e08a85366de7", "score": "0.64434034", "text": "function getY(y) {\n return Math.ceil((y + 42) / CELL_HEIGHT);\n}", "title": "" }, { "docid": "37b738819f956e67badc61d5e549ff4b", "score": "0.6434476", "text": "get relativePositionY() {\n\t\t\tif( this.element.bottom <= this.reference.top ) {\n\t\t\t\treturn -2;\n\t\t\t} else if( this.element.bottom < this.reference.bottom && this.element.top < this.reference.top ) {\n\t\t\t\treturn -1;\n\t\t\t} else if( this.element.top >= this.reference.bottom ) {\n\t\t\t\treturn +2;\n\t\t\t} else if( this.element.top > this.reference.top && this.element.bottom > this.reference.bottom ) {\n\t\t\t\treturn +1;\n\t\t\t} else {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "eb164eba57a33b9d5e35fd5e5de69645", "score": "0.6433951", "text": "function getCellHeight(yCoord) {\n //return (yCoord%10)+15;\n if (yCoord == 10) return 2*defaultCellHeight;\n return defaultCellHeight;\n}", "title": "" }, { "docid": "738b82e9a33e6c3de6c091adfcafa413", "score": "0.6397426", "text": "getY()\n\t{\n\t\treturn this.y;\n\t}", "title": "" }, { "docid": "1ba24a6e9a12d719c8192f7075e026e3", "score": "0.6392453", "text": "function posY(elm) {\n var test = elm,\n top = 0;\n\n while (!!test && test.tagName.toLowerCase() !== \"body\") {\n top += test.offsetTop;\n test = test.offsetParent;\n }\n\n return top;\n}", "title": "" }, { "docid": "3c6126a82dab6bfb41cf3be20a742d0c", "score": "0.63671124", "text": "getRow () {\n return ( this.y - 72 ) / 83;\n }", "title": "" }, { "docid": "a1ddc6981bae0cac23234340efa29280", "score": "0.6310484", "text": "function row_to_y(row) {\n // allow unlimited row growth\n return -1 * (row - 1) * ROW_HEIGHT;\n}", "title": "" }, { "docid": "b4639f24c1f9a319ae92f5848880f195", "score": "0.62706155", "text": "get gridY() {\n\t\treturn Math.floor(this.worldY / this.world.blockSize);\t\n\t}", "title": "" }, { "docid": "62c0d2deecb0f28c9e0fa5ba5fbe7dc3", "score": "0.6269192", "text": "function mpageY(element){\n var y = 0;\n do{\n if (element.style.position == 'absolute'){\n return y + element.offsetTop;\n }else{\n y += element.offsetTop;\n if (element.offsetParent)\n if (element.offsetParent.tagName == 'TABLE')\n if (parseInt(element.offsetParent.border) > 0){\n y += 1;\n }\n }\n }\n while ((element = element.offsetParent));\n return y;\n}", "title": "" }, { "docid": "7c0b73e0d5247f9b31eecb33cd8245b6", "score": "0.62075156", "text": "function getY(ele)\n{\n // Definér elementets Y-koordinat; vi starter med dets relative y-offset i forhold til dens nærmeste parent\n // (... kendte ikke til getBoundingClientRect() på tidspunktet)\n y = ele.offsetTop;\n\n // Find elementets \"offset parent\"\n next = ele.offsetParent;\n\n // Loop gennem alle parents for at finde den absolutte Y-position\n while (ele != next && next != null)\n {\n // Læg parentens offset til elementets Y-værdi\n y += next.offsetTop;\n // Find næste parent, hvis der er en\n next = next.offsetParent;\n }\n\n return y;\n}", "title": "" }, { "docid": "1b32148b6c474963a56c935c86e3d5b7", "score": "0.62046456", "text": "static getYPosition() {\n return Y_POSITIONS[Math.floor(Math.random() * Y_POSITIONS.length)];\n }", "title": "" }, { "docid": "b5299613a5f8696f513e281fd30a080a", "score": "0.6202081", "text": "getYPosition() {\n // offset the tuplet for any nested tuplets between\n // it and the notes:\n const nested_tuplet_y_offset =\n this.getNestedTupletCount() *\n Tuplet.NESTING_OFFSET *\n -this.location;\n\n // offset the tuplet for any manual y_offset:\n const y_offset = this.options.y_offset || 0;\n\n // now iterate through the notes and find our highest\n // or lowest locations, to form a base y_pos\n const first_note = this.notes[0];\n let y_pos;\n if (this.location === Tuplet.LOCATION_TOP) {\n y_pos = first_note.getStave().getYForLine(0) - 15;\n // y_pos = first_note.getStemExtents().topY - 10;\n\n for (let i = 0; i < this.notes.length; ++i) {\n const top_y = this.notes[i].getStemDirection() === _stem__WEBPACK_IMPORTED_MODULE_4__[\"Stem\"].UP\n ? this.notes[i].getStemExtents().topY - 10\n : this.notes[i].getStemExtents().baseY - 20;\n\n if (top_y < y_pos) {\n y_pos = top_y;\n }\n }\n } else {\n y_pos = first_note.getStave().getYForLine(4) + 20;\n\n for (let i = 0; i < this.notes.length; ++i) {\n const bottom_y = this.notes[i].getStemDirection() === _stem__WEBPACK_IMPORTED_MODULE_4__[\"Stem\"].UP\n ? this.notes[i].getStemExtents().baseY + 20\n : this.notes[i].getStemExtents().topY + 10;\n if (bottom_y > y_pos) {\n y_pos = bottom_y;\n }\n }\n }\n\n return y_pos + nested_tuplet_y_offset + y_offset;\n }", "title": "" }, { "docid": "493883a3df97573310840dcc641b5d06", "score": "0.6191447", "text": "getY() {\n return this.y;\n }", "title": "" }, { "docid": "493883a3df97573310840dcc641b5d06", "score": "0.6191447", "text": "getY() {\n return this.y;\n }", "title": "" }, { "docid": "2ba8ca54c1f8a7ac5d2b5438c90bfdc8", "score": "0.61758226", "text": "static getCellLocation(cell) {\n let posA = cell.parent().index();\n let posB = cell.index();\n\n return [posA, posB]\n }", "title": "" }, { "docid": "9f26e9b0652b71bdc221984abc488188", "score": "0.617091", "text": "getY() { return this.node.layout.y * this.opts.ratio }", "title": "" }, { "docid": "db6aa35f22d059beea23f6e53f581efb", "score": "0.6144039", "text": "get FreezePositionY() {}", "title": "" }, { "docid": "db6aa35f22d059beea23f6e53f581efb", "score": "0.6144039", "text": "get FreezePositionY() {}", "title": "" }, { "docid": "cb3282067ce885658222057813e28775", "score": "0.61387473", "text": "function getY(cls){\n\t\t\n\t\tif(!((cls.properties.name.substring(0,10)) === \"background\")){\n\t\t\tif(rowCount == 0){\n\t\t\t\ty = yCls ;\n\t\t\t}else{\n\t\t\t\ty = rowCount * (rowHeight + vGap) + yCls;\n\t\t\t}\n\t\t\treturn y;\n\t\t}\n\t}", "title": "" }, { "docid": "1dc438f9f37ae2ee94276cb900d587d3", "score": "0.61309373", "text": "function pres_findPosY(obj) {\n\tvar curtop = 0;\n\tif (obj.offsetParent)\n\t\twhile (1) {\n\t\t\tcurtop += obj.offsetTop;\n\t\t\tif (!obj.offsetParent)\n\t\t\t\tbreak;\n\t\t\tobj = obj.offsetParent;\n\t\t}\n\telse if (obj.y)\n\t\tcurtop += obj.y;\n\treturn curtop;\n}", "title": "" }, { "docid": "81a2cf5772404f89fc0ba1818a331386", "score": "0.61308587", "text": "function _getY(annotation) {\n\t\n\t if (annotation.rectangles) {\n\t return annotation.rectangles[0].y;\n\t } else if (annotation.y1) {\n\t return annotation.y1;\n\t } else {\n\t return annotation.y;\n\t }\n\t}", "title": "" }, { "docid": "f95ddad64ef9080c110b5665f8579a6f", "score": "0.6096211", "text": "function findPosY(obj)\r\n {\r\n var curtop = 0;\r\n if(obj.offsetParent)\r\n while(1)\r\n {\r\n curtop += obj.offsetTop;\r\n if(!obj.offsetParent)\r\n break;\r\n obj = obj.offsetParent;\r\n }\r\n else if(obj.y)\r\n curtop += obj.y;\r\n return curtop;\r\n }", "title": "" }, { "docid": "e6459c6105105344f821601bb3de6a3a", "score": "0.6087509", "text": "getY() {\n return this.point.getY();\n }", "title": "" }, { "docid": "81c8d37ea8791961af63bc2179fd24e1", "score": "0.6083582", "text": "function scrollbarYPos() {\n var position;\n\n if (typeof scrollbar.scrollTop !== 'undefined') {\n position = scrollbar.scrollTop;\n } else if (typeof scrollbar.pageYOffset !== 'undefined') {\n position = scrollbar.pageYOffset;\n } else {\n position = document.documentElement.scrollTop;\n }\n\n return position;\n }", "title": "" }, { "docid": "81c8d37ea8791961af63bc2179fd24e1", "score": "0.6083582", "text": "function scrollbarYPos() {\n var position;\n\n if (typeof scrollbar.scrollTop !== 'undefined') {\n position = scrollbar.scrollTop;\n } else if (typeof scrollbar.pageYOffset !== 'undefined') {\n position = scrollbar.pageYOffset;\n } else {\n position = document.documentElement.scrollTop;\n }\n\n return position;\n }", "title": "" }, { "docid": "3c4787ca7a7642f66f93afa45a7e311f", "score": "0.60831517", "text": "function yPos(order) {\n return order * mainsvg.boxheight*1.5 + mainsvg.boxheight*0.5\n }", "title": "" }, { "docid": "9c401b5b20e2e65f23b5cb915d5c3c5b", "score": "0.60814524", "text": "function actualPosition(cell) {\n return [cell.x * step, cell.y * step];\n }", "title": "" }, { "docid": "1c90a930b3e2b80ed42d5ab509e93ace", "score": "0.60718715", "text": "function rectY(d) {\n\t return d.y;\n\t}", "title": "" }, { "docid": "a6df00a58d333ad47ea120ee753af306", "score": "0.6067412", "text": "getYPosition(value) {\n // a = height\n // b = 0\n const min = this.params.min;\n const max = this.params.max;\n const height = this.params.height;\n\n return (((0 - height) * (value - min)) / (max - min)) + height;\n }", "title": "" }, { "docid": "8d57717200bd06e24d39c5ef79a13bf1", "score": "0.60517514", "text": "getRow () {\n return ( this.y - 60 ) / 83;\n }", "title": "" }, { "docid": "6c01f66a4fac51c3932da71ed04f78d6", "score": "0.6045432", "text": "function imageY(d) {\n\t return d.y || 0;\n\t}", "title": "" }, { "docid": "681febd24075b32c2eddd36eb6bcbdfd", "score": "0.6027577", "text": "getY() { return this.y; }", "title": "" }, { "docid": "b4c150ac7ca3186d14bc89320875e495", "score": "0.6023118", "text": "getNextYPosition(obj, y, yScale, height) {\n var latestDataPoint = Util.last(obj.values);\n\n // most recent y - height of chart\n return yScale(latestDataPoint[y]) - height;\n }", "title": "" }, { "docid": "b36b836ea9041e390dbbc0a3175e7c6c", "score": "0.6011114", "text": "getY()\n {\n return this.y;\n }", "title": "" }, { "docid": "f7d786f0b429f83781bd7f28b3ed040d", "score": "0.5998473", "text": "function getPositionY(e)\r\n{\r\n\r\n\t\tvar IE = document.all?true:false\r\n\t\tvar tempX = 0\r\n\t\tvar tempY = 0\r\n\t\tvar e = new Object();\r\n\r\n\t\tif (IE) { // grab x-y pos.s if browser is IE\r\n\t\ttempX = event.clientX + document.body.scrollLeft\r\n\t\ttempY = event.clientY + document.body.scrollTop\r\n\t\t\tvar y_postion=tempY;\r\n\r\n\t\treturn(y_postion);\r\n\t\t} else { // grab x-y pos.s if browser is NS\r\n\t\ttempX = e.pageX\r\n\t\ttempY = e.pageY\r\n\t\t}\r\n\t\t// catch possible negative values in NS4\r\n\t\tif (tempX < 0){tempX = 0}\r\n\t\tif (tempY < 0){tempY = 0}\r\n\r\n\t\tvar y_postion=tempY ;\r\n\t\treturn(y_postion);\r\n\r\n}", "title": "" }, { "docid": "98867e86276223dc8537e149dd647af7", "score": "0.5993893", "text": "function findPosY(obj)\n {\n var curtop = 0;\n if(obj.offsetParent)\n while(1)\n {\n curtop += obj.style.top;\n if(!obj.offsetParent)\n break;\n obj = obj.offsetParent;\n }\n else if(obj.y)\n curtop += obj.y;\n return curtop;\n }", "title": "" }, { "docid": "06d5c15732c8e69ce866e04004f2600a", "score": "0.5991266", "text": "function getY(originalY) {\r\n let obj = headercontainer.getBoundingClientRect();\r\n let obj2 = featuredoption.getBoundingClientRect();\r\n let height = obj.height + obj2.height;\r\n return originalY - height;\r\n}", "title": "" }, { "docid": "04bb231ae567a9aea0dc4441e4f6354f", "score": "0.5981746", "text": "function getRandomYPosition() {\n var validPositions = getValidYPositionsForEnemy();\n var randomIndex = global.Random.getInteger(0, validPositions.length - 1);\n return validPositions[randomIndex];\n }", "title": "" }, { "docid": "605e1823061dcbdf9550009a10c29c00", "score": "0.59685946", "text": "static get _nestedYPos() { return '-0.2em'; }", "title": "" }, { "docid": "d30b86922bc0ce9f38403ddb39bbb550", "score": "0.5962826", "text": "function findPosY(obj)\n{\n\tvar curtop = 0;\n\tif (obj.offsetParent)\n\t{\n\t\twhile (obj.offsetParent)\n\t\t{\n\t\t\tcurtop += obj.offsetTop\n\t\t\tobj = obj.offsetParent;\n\t\t}\n\t}\n\telse if (obj.y)\n\t\tcurtop += obj.y;\n\treturn curtop;\n}", "title": "" }, { "docid": "19e158a7b55e78186521269732961ab7", "score": "0.59607774", "text": "function getPosY(matrix,val){\n let posY=0,j;\n for(let i=0;i<matrix.length;i++){\n j=0;\n while(j<matrix[i].length){\n if(matrix[i][j]==val){\n posY=i;\n }\n j++;\n }\n }\n return posY;\n }", "title": "" }, { "docid": "c64e8a2456c7b1dc01880a903dec91b0", "score": "0.59581137", "text": "function getPos(element) \n {\n for (var xPos=0, yPos=0;\n element != null;\n xPos += element.offsetLeft, yPos += element.offsetTop, element = element.offsetParent);\n return yPos;\n }", "title": "" }, { "docid": "6037e56566613e7ce7c1846aab790a63", "score": "0.5948048", "text": "function getY( e ) {\n var touch = e.touches && e.touches.length ? e.touches[ 0 ] : e.changedTouches[ 0 ];\n return touch.clientY;\n }", "title": "" }, { "docid": "313be93de8e908b32c285d4d0348a55c", "score": "0.5947388", "text": "function getCoordinates(y) {\n\n let bounds = canvas.getBoundingClientRect();\n return y - bounds.y\n}", "title": "" }, { "docid": "83a3deefe465c5d030dad461ff643496", "score": "0.5944168", "text": "function getY(e) {\n var touch = e.touches && e.touches.length ? e.touches[0] : e.changedTouches[0];\n return touch.clientY;\n }", "title": "" }, { "docid": "04d1681aeff7d5d67f1c454594178169", "score": "0.5916025", "text": "getTop() {\n return this.y;\n }", "title": "" }, { "docid": "1a93cc6345cd8384d63a8bf045c4734b", "score": "0.5910226", "text": "function getY(elem){\n\treturn elem.y;\n}", "title": "" }, { "docid": "cb6e0b6692a283c0458828cbc2dcbc1c", "score": "0.5909256", "text": "function getCoords(cell){\n var $el = $(cell);\n var x = parseInt($el.attr('cell-x'), 10)-1;\n var y = parseInt($el.attr('cell-y'), 10)-1;\n\n return {x:x,y:y};\n }", "title": "" }, { "docid": "19238bc22cee8212ebfbee1dd2552a02", "score": "0.590587", "text": "yLocation(){\n return this.y;\n }", "title": "" }, { "docid": "030ebd70c81e6370c1d6f81b89bf6403", "score": "0.58873594", "text": "function getY(obj){\n\tvar y = 0;\n\tif (obj.offsetParent){\n\t\twhile (obj.offsetParent){\n\t\t\ty += obj.offsetTop\n\t\t\tobj = obj.offsetParent;\n\t\t}\n\t\treturn y;\n\t} else {\n\t\treturn obj.y;\n\t}\n}", "title": "" }, { "docid": "08da1ebeae4473da4926cb294c56a9e8", "score": "0.5882518", "text": "function getYPos(index, gWidth = gridWidth, tHeight = totalHeight) {\n return Math.floor(index / gWidth) * tHeight + navbarHeight;\n}", "title": "" }, { "docid": "698fd232fa2bde77358082e2cb522c4c", "score": "0.5868816", "text": "function cellPos($cell, rescan) {\n\t\t\tvar data = $cell.data(\"cellPos\");\n\n\t\t\tif(!data || rescan) {\n\t\t\t\tvar $table = $cell.closest(\"table, thead, tbody, tfoot\");\n\t\t\t\tscanTable($table);\n\t\t\t\tdata = $cell.data(\"cellPos\");\n\t\t\t}\n\t\t\treturn data;\n\t\t}", "title": "" }, { "docid": "4739dbf2ab3ecc6f5485e24754422e01", "score": "0.58465725", "text": "function positionY(center, parentHeight, elementHeight) {\n return center === 'horizontal' ? 0 \n : (parentHeight - elementHeight) >> 1;\n }", "title": "" }, { "docid": "c2277e9d417c3bf4fae2bce856f5574f", "score": "0.5831978", "text": "function verticalPlacement() {\n\treturn v_ycoordinate + v_yoffset;\n}", "title": "" }, { "docid": "385ec71a432e5637dbf7f7d5066a2146", "score": "0.5828858", "text": "get y() {\r\n return this.originPoint.y;\r\n }", "title": "" }, { "docid": "cc0e6f77855b02a7d7385a7ed80f74da", "score": "0.58271813", "text": "function getValidYPositionsForEnemy() {\n var validPositions = [];\n for (var i = 0; i < map.dimension.rowCount; i++) {\n var blockImage = map.getBlockByColumnRow(0, i).image;\n if (blockImage === stoneImage) {\n validPositions.push(i);\n }\n }\n return validPositions;\n }", "title": "" }, { "docid": "727a784cca54fb874aad3877afd9490f", "score": "0.58255905", "text": "function getCellCoord(elCell) {\n return elCell.id.replace('td ', '').split('-');\n}", "title": "" }, { "docid": "59c76d8126e2acffe0f4ad3751548a07", "score": "0.5824767", "text": "function getCell(x, y) {\n tr = document.getElementsByTagName(\"tr\");\n yaxis = tr[y-1]\n first = yaxis.firstElementChild;\n for (i = 1 ; i < x ; i++) {\n first = first.nextElementSibling;\n }\n return first;\n}", "title": "" }, { "docid": "c85451773ec66857fe401a664739cb41", "score": "0.58214486", "text": "getYValue(yIndex) {\n const offset = this.yStep * yIndex;\n return this.yStart + offset;\n }", "title": "" }, { "docid": "80a92926ce6defaf6ecece56dc6f1a45", "score": "0.5816676", "text": "_getStartYPos () {\n return Math.floor( Math.random() * this.height );\n }", "title": "" }, { "docid": "3b210f7c7c6d151e0963cc87181de704", "score": "0.581578", "text": "function yIndex(squareDiv) {\n\tvar x = squareDiv.split(\"_\");\n\tvar i = parseInt(x[2]);\n\treturn i;\n}", "title": "" }, { "docid": "3d77cd8c021840408e0ce3f9c2edc091", "score": "0.57745653", "text": "function getY(element, parent) {\n window[\"__checkBudget__\"]();\n const { top, bottom, height } = element.props;\n if (typeof top === \"string\") {\n // Not constrained to top or bottom.\n // In this case, top is distance to centre of element as a percentage of parent height.\n return Math.round((parseFloat(top) / 100) * parent.props.height - height / 2);\n }\n else if (top != undefined) {\n // Constrained to top\n return top;\n }\n else {\n // Constrained to bottom\n return parent.props.height - bottom - height;\n }\n}", "title": "" }, { "docid": "80ba4eb4202a87605ec05db358b71377", "score": "0.577316", "text": "function getCellAt(x,y){\n\t\t if( Position.isValidPosition(x, y)){\n\t\t\t if($.isNumeric(x))\n\t\t\t\t return cells[x][y];\n\t\t\t else{\n\t\t\t\t var cellPosition = Position.getNumericX(x);\t\t\t\t\n\t\t\t\t return cells[cellPosition][y-1];\n\t\t\t }\n\t\t }\n\t\t else throw \"Invalid position exception at the call of getCellAt(x,y) x : \" + x + \"y : \" + y;\n \t\t}", "title": "" }, { "docid": "fc4141c7725ef91d1c9423370213fdf0", "score": "0.5748347", "text": "function offsety(y) {\n return y + 150;\n}", "title": "" }, { "docid": "cf6250f02f1f87c4457691e3d548fc75", "score": "0.57363534", "text": "function getArrayY() {\n return int(mouseY / rectHeight);\n}", "title": "" }, { "docid": "90afbbb4e326f21ba88ebba9966937fd", "score": "0.57262903", "text": "function ypos(e) {\n // touch event\n if (e.targetTouches && e.targetTouches.length >= 1) {\n return e.targetTouches[0].clientY;\n }\n\n // mouse event\n return e.clientY;\n}", "title": "" }, { "docid": "942a2a23db241fd293f44e4f56f68da3", "score": "0.5707423", "text": "getTabY(line) {\n return this._firstLineY + this.getTabHeight(line);\n }", "title": "" }, { "docid": "7e3ad1e7ee52e2197aff8fe0841d8941", "score": "0.56992584", "text": "getCoordinateForPosition(position) {\n const pos = this._toCodeMirrorPosition(position);\n const rect = this.editor.charCoords(pos, 'page');\n return rect;\n }", "title": "" }, { "docid": "7e3ad1e7ee52e2197aff8fe0841d8941", "score": "0.56992584", "text": "getCoordinateForPosition(position) {\n const pos = this._toCodeMirrorPosition(position);\n const rect = this.editor.charCoords(pos, 'page');\n return rect;\n }", "title": "" }, { "docid": "0fe0538554346e4acd0c711846161845", "score": "0.56837726", "text": "get yTranslation() { return Renderer.stackTop.y; }", "title": "" }, { "docid": "6d814f9f9173abcd7560fc84da45f141", "score": "0.56791365", "text": "get CurrentY() { return this._currentY; }", "title": "" }, { "docid": "ffe56937a1853de39489dc017e9f7bee", "score": "0.56780744", "text": "function findPosY(obj) \n{\n\tvar curtop = 0;\n\tif (obj.offsetParent) \n\t{\n\t\twhile (1) \n\t\t{\n\t\t\tcurtop+=obj.offsetTop;\n\t\t\tif (!obj.offsetParent) \n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tobj=obj.offsetParent;\n\t\t}\n\t} \n\telse if (obj.y) \n\t{\n\t\tcurtop+=obj.y;\n\t}\n\t\t\n\treturn curtop;\n}", "title": "" }, { "docid": "c9569e95442b015e128c5f56ad26ab67", "score": "0.5675189", "text": "get( x, y ){ return this.cells[ y * this.#x_cnt + x ]; }", "title": "" }, { "docid": "bfe1ed380761910e2d79ea87a1173b10", "score": "0.56717604", "text": "function findPosY(obj) { // used by focusForm() to find y position of form element\n\tvar curtop = 0;\n\tif (obj.offsetParent){\n\t\twhile (obj.offsetParent) {\n\t\t\tcurtop += obj.offsetTop\n\t\t\tobj = obj.offsetParent;\n\t\t}\n\t}\n\treturn curtop;\n}", "title": "" }, { "docid": "b0952ae84a733798fad4fb16f85e8b92", "score": "0.56648326", "text": "getCursorPosition() {\n const cursor = this.doc.getCursor();\n return this._toPosition(cursor);\n }", "title": "" }, { "docid": "b0952ae84a733798fad4fb16f85e8b92", "score": "0.56648326", "text": "getCursorPosition() {\n const cursor = this.doc.getCursor();\n return this._toPosition(cursor);\n }", "title": "" }, { "docid": "33d463f4367588b390295a3191d18641", "score": "0.5662431", "text": "height(x, y) {\n return this.n[y][x];\n }", "title": "" }, { "docid": "859eee57375322fc512e803cb5c6cb03", "score": "0.5661108", "text": "function getPosition() {\n return window.pageYOffset || document.documentElement.scrollTop;\n}", "title": "" }, { "docid": "a28c24cc064a6cd7c9b514a42bc738a2", "score": "0.56516814", "text": "get cells() {\n return Array.apply(getTop(), Array(1 + (getBottom() - getTop()))).map(\n (x, y) => y + getTop()\n );\n }", "title": "" }, { "docid": "089e43b46d0c002d3ac81d035fe75f9c", "score": "0.56487453", "text": "function getScrollTop() {\n\tif (self.pageYOffset) // all except Explorer\n\t{\n\t\treturn self.pageYOffset;\n\t}\n\n\treturn getTrueBody().scrollTop;\n}", "title": "" }, { "docid": "c46bb8e9da3971c72e9e7937c44b8e86", "score": "0.56376815", "text": "getAt(x, y) {\n return this.content[y * this.w + x];\n }", "title": "" }, { "docid": "a7ca4482b845ff2a6b53f63146b97563", "score": "0.5634068", "text": "function eventY( event ){\n\tvar dot, eventDoc, doc, body, pageX, pageY;\n\n event = event || window.event; // IE-ism\n\n // IE.\n if (event.pageX == null && event.clientX != null) {\n eventDoc = (event.target && event.target.ownerDocument) || document;\n doc = eventDoc.documentElement;\n body = eventDoc.body;\n\n event.pageY = event.clientY +\n (doc && doc.scrollTop || body && body.scrollTop || 0) -\n (doc && doc.clientTop || body && body.clientTop || 0 );\n }\n\n // Use event.pageX / event.pageY here\n\n var rekt = canvas.getBoundingClientRect();\n return event.pageY - rekt.top;\n}", "title": "" }, { "docid": "d171ecef195cde35ae1d4cf9cc82bd69", "score": "0.5625428", "text": "function elmYPosition(eID) {\n var elm = document.querySelector(eID);\n var y = elm.offsetTop-100;\n var node = elm;\n while (node.offsetParent && node.offsetParent != document.body) {\n node = node.offsetParent;\n y += node.offsetTop;\n \n if ( window.innerWidth < 768) {\n y-=50; \n }\n }\n return y;\n }", "title": "" } ]
1094ce1d6bea8940d3a8958d476931dd
Active Threads Over Time
[ { "docid": "af8247978c26437a35c2e2f0cc42cf62", "score": "0.0", "text": "function refreshActiveThreadsOverTime(fixTimestamps) {\r\n var infos = activeThreadsOverTimeInfos;\r\n prepareSeries(infos.data);\r\n if(fixTimestamps) {\r\n fixTimeStamps(infos.data.result.series, -10800000);\r\n }\r\n if(isGraph($(\"#flotActiveThreadsOverTime\"))) {\r\n infos.createGraph();\r\n }else{\r\n var choiceContainer = $(\"#choicesActiveThreadsOverTime\");\r\n createLegend(choiceContainer, infos);\r\n infos.createGraph();\r\n setGraphZoomable(\"#flotActiveThreadsOverTime\", \"#overviewActiveThreadsOverTime\");\r\n $('#footerActiveThreadsOverTime .legendColorBox > div').each(function(i){\r\n $(this).clone().prependTo(choiceContainer.find(\"li\").eq(i));\r\n });\r\n }\r\n}", "title": "" } ]
[ { "docid": "59e7e5276ca978fa9c260f9ab88f1a58", "score": "0.6380148", "text": "function upThreadCount () {\n\t\tctConcurrentThreads++;\n\t\twatchLog.stats.ctCurrentThreads = ctConcurrentThreads;\n\t\tviewStats ();\n\t\t}", "title": "" }, { "docid": "ca8570f6b3e00e62871e85a9af141327", "score": "0.5802784", "text": "function isRunning() {\n return clock;\n }", "title": "" }, { "docid": "c215b0853912ef52f1ac6ab02939cf12", "score": "0.5769787", "text": "registerThreadCounter() {\n this.internalPool.on('connection', (connection) => console.log(`New connection stablished with server on thread #${connection.threadId}`))\n }", "title": "" }, { "docid": "e252416bd3a3ce1a3fd8b9908f2fa130", "score": "0.5723192", "text": "registerThreadCounter() {\n this.internalPool.on('connection', (connection) =>\n console.log(`New connection stablished with server on thread #${connection.threadId}`)\n );\n }", "title": "" }, { "docid": "236344e07960a7612924d4dce7e9b532", "score": "0.57225764", "text": "_busyTime() {\r\n if (this._state !== task_1.TaskState.Active) {\r\n return Infinity;\r\n }\r\n let time = 0;\r\n for (const group of this._groups) {\r\n const busyTime = group._busyTime();\r\n if (busyTime > time) {\r\n time = busyTime;\r\n }\r\n }\r\n return time;\r\n }", "title": "" }, { "docid": "bf4d535f7e6cf6fb56e2b2fb896ced7f", "score": "0.5718862", "text": "scheduler() {\n const {busyApps, appPriorities, ticks} = this;\n this.__apps.map((app, appId) => {\n return {\n appId, app,\n busy: busyApps[appId],\n priority: appPriorities[appId]\n };\n }).filter(({app, appId, busy, priority}) => {\n return app && !busy && priority >= 0 && ticks % priority === 0;\n }).forEach(({app, priority}) => {\n // Set the app busy, the app itself should \"unbusy\" itself,\n // when the idle call is done.\n // That happens in <HApplication._startIdle>\n // If the app is not busy, then make a idle call:\n app._startIdle();\n });\n if (this._updateZIndexOfChildrenBuffer.length !== 0) {\n this._flushUpdateZIndexOfChilden();\n }\n }", "title": "" }, { "docid": "c54701da8010aa21ad3aaee1a6203b9a", "score": "0.5637803", "text": "whileActive(){}", "title": "" }, { "docid": "3562466424594008e7fbf05a542bca0b", "score": "0.56303525", "text": "tick () {\n for (let t of this.threads) {\n const thread = t[1]\n const timeDiff = Date.now() - thread.last_delivery\n\n if (timeDiff < this.config.max_thread_age && thread.queue.length > 0) {\n if (this.send && timeDiff > this.config.tick_interval) {\n this.send(thread.queue.shift())\n thread.last_delivery = Date.now()\n }\n } else if (timeDiff > this.config.max_thread_age) {\n // emit 'thread_expired' hook\n this.emit('thread_expired', thread)\n this.removeThread(t)\n }\n }\n\n return this\n }", "title": "" }, { "docid": "62d10a43936cc5885bb2032032efb902", "score": "0.56247646", "text": "function activeMatchUpdateLoop() {\n console.log(new Date() + ' There are ' + Object.keys(active_matches).length + ' active matches');\n for (var match in active_matches) {\n active_matches[match].updateActive();\n }\n\n setTimeout(activeMatchUpdateLoop, idleUpdateInterval);\n}", "title": "" }, { "docid": "47a01189a66c1cffbdfa8bd796c7f939", "score": "0.56165427", "text": "async function getTopActiveUsersCli(){\n let start = new Date().getTime();\n let r=await main1.getTopActiveUsers(user_input_count)\n console.log(r)\n let end = new Date().getTime();\n let time = end - start;\n console.log(('Execution time: ' + time+' ms'))\n}", "title": "" }, { "docid": "b6d18b3e6908664d24f72d2a33f1b7fc", "score": "0.5603351", "text": "get Running() {}", "title": "" }, { "docid": "9d2980fabe86557bb8ed2a5dc85ce1c1", "score": "0.5570523", "text": "get activeTaskCount() {\r\n return this._globalGroup.activeTaskCount;\r\n }", "title": "" }, { "docid": "ffa92b64b90d8b6d1435794ffa1bcd56", "score": "0.5566212", "text": "function cpuTicksAcrossCores() \n{\n //Initialise sum of idle and time of cores and fetch CPU info\n var totalIdle = 0, totalTick = 0;\n var cpus = os.cpus();\n \n //Loop through CPU cores\n for(var i = 0, len = cpus.length; i < len; i++) \n {\n //Select CPU core\n var cpu = cpus[i];\n //Total up the time in the cores tick\n for(type in cpu.times) \n {\n totalTick += cpu.times[type];\n } \n //Total up the idle time of the core\n totalIdle += cpu.times.idle;\n }\n \n //Return the average Idle and Tick times\n return {idle: totalIdle / cpus.length, total: totalTick / cpus.length};\n}", "title": "" }, { "docid": "efe29376a754779eed326da3d5e4249a", "score": "0.5559079", "text": "getRunning() {\n return Array.from(this.running);\n }", "title": "" }, { "docid": "ac5fe36403a8f62f48fed65743926a86", "score": "0.5554833", "text": "realTask() {\n setInterval(this.listTask, 1000);\n }", "title": "" }, { "docid": "170f5b0a0a5a2ad5860304c49b7736e1", "score": "0.5533702", "text": "function WorkerPool() {\n this.active = {};\n}", "title": "" }, { "docid": "51bb5742980d33f19a5304845ed1a571", "score": "0.55286556", "text": "jobStarted() {\n ++this.running;\n this.log.trace('RateLimiter:jobStarted => running: ', this.running || '0');\n ++this.processedJobs;\n }", "title": "" }, { "docid": "73ebc8615d7f5d2d58a62d3cca3777d9", "score": "0.55280834", "text": "get numIdleWorkers() {\n return this.m_availableWorkers.length;\n }", "title": "" }, { "docid": "7ea1c3a580279395c98790d82510d89e", "score": "0.54948336", "text": "isActive(timeout) {\n\t\t\t\t\t\treturn new Promise(done => {\n\t\t\t\t\t\t\tpublic.active.then(done);\n\n\t\t\t\t\t\t\tsetTimeout(done, timeout || 1000, false);\n\t\t\t\t\t\t});\n\t\t\t\t\t}", "title": "" }, { "docid": "3274cf8bbfab4d5c7e8e369fab1fa3df", "score": "0.54882914", "text": "isAlive() {}", "title": "" }, { "docid": "2c97bc114f5e9ff4c1ce7ac3933a7dd6", "score": "0.5476499", "text": "get active() {}", "title": "" }, { "docid": "462d354ccf6d35f0cbb7c5f23cb0df2a", "score": "0.54585713", "text": "function startOnlineOperation() {\n countOnlineOperations += 1;\n logger(\"silly\", `Current online operations: ${countOnlineOperations}.`);\n return countOnlineOperations;\n}", "title": "" }, { "docid": "269c964801552e485ae9178223e1543f", "score": "0.5408542", "text": "function status() {\n var state = node.scheduler.state();\n var disabled = node.scheduler.disabled();\n var paused = node.scheduler.paused();\n var manual = node.scheduler.manual();\n var count = node.scheduler.count();\n var current = count > 0 ? node.scheduler.current() : false;\n var next = count > 0 ? node.scheduler.next() : false;\n var now = new Date();\n\n var color = state === 'on' ? 'green' : (state === 'off' ? 'red' : 'grey');\n\n /* build the status text */\n var text = state ? state : '';\n\n if (manual) text += ' manual';\n\n if (disabled) {\n text += ' (disabled)';\n } else if (paused) {\n text += ' (paused)'\n }\n\n if (!disabled && !paused && count > 0) {\n var untiltime;\n\n if (manual && state=='on' && current.active) untiltime = current.off;\n if (manual && state=='off' && current.active) untiltime = next.on;\n if (manual && state=='on' && !current.active) untiltime = current.off;\n if (manual && state=='off' && !current.active) untiltime = current.on;\n\n untiltime = manual ? untiltime : (current.active ? current.off : current.on);\n\n text += ' until ' + statusTime(untiltime);\n\n /* if it's tomorrow, add a visual cue */\n if (node.scheduler.earlier(untiltime, now)) text += '+1';\n }\n\n node.status({\n fill: color,\n shape: \"dot\",\n text: text\n });\n }", "title": "" }, { "docid": "5b7951b1d3e77d679b845e4363e4266f", "score": "0.5389249", "text": "refreshTrainStatus() {\n \tthis.interval = setInterval( \n \t\t() => this.props.fetchService(this.props.params.serviceId, this.props.params.date, true)\n \t, 10000);\n }", "title": "" }, { "docid": "36d1f6fa4f7f48e2e04c24a5a8d3198f", "score": "0.53776306", "text": "function isWorkActive() {\n logi(\"Checking if work is active\")\n return workers.ani.isWorking() || workers.nyaa.isWorking()\n}", "title": "" }, { "docid": "a8bd20fec1d86465fe1995671d3a5884", "score": "0.53729385", "text": "initThreadWatcher() {\n if (this.threadWatcher) {\n this.stopThreadWatcher();\n }\n\n const freezeeTime = process.env.FreezeTime || 10000;\n\n this.threadWatcher = setInterval(() => {\n Object.values(this.moduleLib).forEach((module) => {\n switch (module.status) {\n case threadStatus.active:\n if ((Date.now() - module.lastStart ) > freezeeTime) {\n module.thread && module.thread.kill('SIGHUP');\n module.thread = null;\n module.status = threadStatus.freeze;\n\n console.warn(`Module ${module.name} was killed after freeze`);\n }\n break;\n\n case threadStatus.inactive:\n this.crawl(module.name);\n break;\n\n case threadStatus.freeze:\n case threadStatus.broken:\n this.crawl(module.name);\n break;\n\n case threadStatus.done:\n if ((Date.now() - module.lastParse ) > module.expire) {\n this.crawl(module.name);\n }\n break;\n }\n })\n }, process.env.ThreadWatcherTime || 5000);\n }", "title": "" }, { "docid": "ee0c56622eb09c8fda64224bd4767ade", "score": "0.5372745", "text": "wakeUp () {\n if (this.idle && this.requestQueue.length > 0) {\n this.idle = false\n setTimeout(() => {\n this.run()\n }, Math.max(0, this.intervalMilliseconds - (Date.now() - this.lastExecutionTime)))\n }\n }", "title": "" }, { "docid": "d6fd63cea85de9852834c117cf1d1114", "score": "0.53662527", "text": "tick() {\n for (let instance of ticker.pool) {\n instance.tick();\n }\n }", "title": "" }, { "docid": "1a515fc3cf303da75aa8bbfca32f6796", "score": "0.532247", "text": "static get concurrency() {\n return 1\n }", "title": "" }, { "docid": "589a881419a9d7139d40bb7681e7e45b", "score": "0.5300537", "text": "static startTimeAgoLoops() {\n const startTimeLoops = () => {\n this.timeLoopInterval = setInterval(() => {\n this.$children[0].$children.reduce((acc, component) => {\n const timeAgoComponent = component.$children.filter(el => el.$options._componentTag === 'time-ago')[0];\n acc.push(timeAgoComponent);\n return acc;\n }, []).forEach(e => e.changeTime());\n }, 10000);\n };\n\n startTimeLoops();\n\n const removeIntervals = () => clearInterval(this.timeLoopInterval);\n const startIntervals = () => startTimeLoops();\n\n gl.VueRealtimeListener(removeIntervals, startIntervals);\n }", "title": "" }, { "docid": "12357500e22444e182c860ab6e509c5a", "score": "0.52995354", "text": "setInterval() {\n this.idleTimer = setInterval(() => this.check(), (this.heartbeat));\n }", "title": "" }, { "docid": "f06d1128dbcbd0cab349334bd0a3a54f", "score": "0.5262734", "text": "showActiveUsersTimer() {\n this.showActiveUsers();\n this.userTimerId = setTimeout(this.showActiveUsersTimer.bind(this), 180000);\n }", "title": "" }, { "docid": "8f9ff67600d1b0c1c80d755085ea0e27", "score": "0.52501106", "text": "setAlive() {\n this.currentlyAlive = true;\n this.aliveNext = true;\n }", "title": "" }, { "docid": "07458f4447e3fc56dcfd6f9f13aa4dab", "score": "0.52488816", "text": "activeCheck () {\n const debounce = () => {\n var pT = this.$w.offset().top\n var pL = this.$w.offset().left\n var scroll = $(window).scrollTop()\n var wH = $(window).height()\n var wW = $(window).width()\n\n if (scroll + wH > pT && scroll < pT + wH && pL < wW) {\n this.$w.addClass('active')\n } else {\n this.$w.removeClass('active')\n }\n }\n\n var diff = new Date().getTime() - this.activeChecked\n\n if (this.activeChecked == null || diff >= 500) {\n this.activeChecked = new Date().getTime()\n debounce()\n } else {\n clearTimeout(this.activeTimer)\n this.activeTimer = setTimeout(debounce, 500)\n }\n }", "title": "" }, { "docid": "3372b3212c337ae5c4fd3b04cb181825", "score": "0.5245484", "text": "async _startWatchIntervals () {\n syncInterval(this._fastWatchCheck.bind(this), 1000)\n syncInterval(this._slowWatchCheck.bind(this), 10000)\n }", "title": "" }, { "docid": "0ff3476a0867fa12ee3f3df87ab23d4e", "score": "0.5243559", "text": "function getCurrentOnlineOperations() {\n return countOnlineOperations;\n}", "title": "" }, { "docid": "6e2c8082fffa6ad1b712a81d7418b5d3", "score": "0.5231088", "text": "function count() {\n // move the scheduling at the beginning\n if (i < 1e9 - 1e6) {\n // remember, there’s the in-browser minimal delay of 4ms for many nested setTimeout calls. Even if we set 0, it’s 4ms (or a bit more). So the earlier we schedule it – the faster it runs.\n setTimeout(count) // schedule the new call\n }\n\n do {\n i++\n } while (i % 1e6 != 0)\n\n if (i == 1e9) {\n console.log('Done in ' + (Date.now() - start) + 'ms')\n }\n}", "title": "" }, { "docid": "714f5ed10ba55eeaeb7d83d3913ac174", "score": "0.5227206", "text": "static get concurrency () {\r\n return 1\r\n }", "title": "" }, { "docid": "de96094328aa96b5831734bc1558781b", "score": "0.52232003", "text": "function startChecker() {\n var interval = window.setInterval(function() {\n try {\n var now = new Date();\n pending = pending.filter(function(action) {\n if(now - action.__last_invocation < action.__expire)\n return true;\n else {\n action.call();\n return false;\n }\n });\n\n if(pending.length == 0)\n window.clearInterval(interval);\n } catch(e) {\n window.clearInterval(interval);\n throw e;\n }\n }, 250);\n }", "title": "" }, { "docid": "a1d63f33f733494b09de7f81784e35be", "score": "0.52220684", "text": "function onTic() {\n\t\ttic += 1;\n\t}", "title": "" }, { "docid": "f3c4792815ab1c0e2d095c652087bd85", "score": "0.5212257", "text": "doPeriodicTasks(){\n var fps = this.framesThisCycle / ((Date.now() - this.secondStart)/1000);\n this.framesThisCycle = 0;\n this.secondStart = Date.now();\n\n this.socket.emit(\"Ping\", {timeStamp: this.secondStart});\n\n document.getElementById(\"stats\").innerText = \"FPS: \" + Math.round(fps,0) + \" Ping: \" + this.ping;\n\n this.refreshScoreBoard();\n\n if ((! this.done) && Date.now() > this.endTime) {\n this.done = true;\n this.showWinner();\n }\n }", "title": "" }, { "docid": "4da79ba39bde8eb2c60eaa09f9b8d2f3", "score": "0.5210797", "text": "function eachActiveConnection(fn) {\n var actives = $('.active');\n var checkedIds = {};\n actives.each(function () {\n var peerId = $(this).attr('id');\n\n if (!checkedIds[peerId]) {\n var conns = peer.connections[peerId];\n for (var i = 0, ii = conns.length; i < ii; i += 1) {\n var conn = conns[i];\n fn(conn, $(this));\n }\n }\n\n checkedIds[peerId] = 1;\n });\n }", "title": "" }, { "docid": "761e251aada38eb229df13041d96d885", "score": "0.51979613", "text": "get idle() {\r\n return !this._props.promise && Object.values(this._springs).every(s => s.idle);\r\n }", "title": "" }, { "docid": "9285ca875e0d161512e9c1550a8e087a", "score": "0.51951015", "text": "function Waiter() {}", "title": "" }, { "docid": "8a68ebdf0df3492b2a6f7f02e138cafc", "score": "0.5193309", "text": "get idleTime () {\n return Date.now() - this._lastOperation;\n }", "title": "" }, { "docid": "31527b73999963b0d71d09877754e39c", "score": "0.5189393", "text": "function startCount () {\n\t\tinterval = setInterval(timer, 1000);\n\t}", "title": "" }, { "docid": "083e4add6ed038c1be3fce29b78cef2b", "score": "0.5182851", "text": "activate() {\n this.stats.metadata.roundStartTime = Date.now();\n this.active = true;\n }", "title": "" }, { "docid": "a811f62cc7fb0635b4c7fe817d05bfa6", "score": "0.5174581", "text": "static get concurrency () {\n return 1\n }", "title": "" }, { "docid": "a811f62cc7fb0635b4c7fe817d05bfa6", "score": "0.5174581", "text": "static get concurrency () {\n return 1\n }", "title": "" }, { "docid": "a811f62cc7fb0635b4c7fe817d05bfa6", "score": "0.5174581", "text": "static get concurrency () {\n return 1\n }", "title": "" }, { "docid": "a811f62cc7fb0635b4c7fe817d05bfa6", "score": "0.5174581", "text": "static get concurrency () {\n return 1\n }", "title": "" }, { "docid": "d4a8b4d5ccd922ad1982154a6ae42bb3", "score": "0.51706105", "text": "started() {}", "title": "" }, { "docid": "d4a8b4d5ccd922ad1982154a6ae42bb3", "score": "0.51706105", "text": "started() {}", "title": "" }, { "docid": "d4a8b4d5ccd922ad1982154a6ae42bb3", "score": "0.51706105", "text": "started() {}", "title": "" }, { "docid": "d4a8b4d5ccd922ad1982154a6ae42bb3", "score": "0.51706105", "text": "started() {}", "title": "" }, { "docid": "d4a8b4d5ccd922ad1982154a6ae42bb3", "score": "0.51706105", "text": "started() {}", "title": "" }, { "docid": "d4a8b4d5ccd922ad1982154a6ae42bb3", "score": "0.51706105", "text": "started() {}", "title": "" }, { "docid": "fe32a73671a207d38fec28c4d736e7cb", "score": "0.5167418", "text": "function get_cpu_count() {\n\treturn OS.cpus().length;\n}", "title": "" }, { "docid": "34911842e66a0e8a3783f38ba58ed06c", "score": "0.516373", "text": "tick() {\n\t\tif (this.paused) return\n\t\tthis.systems.forEach(s => {\n\t\t\ttry {\n\t\t\t\ts(this)\n\t\t\t} catch (err) {\n\t\t\t\tif (process.env.NODE_ENV === \"development\") {\n\t\t\t\t\tthis.paused = true\n\t\t\t\t}\n\t\t\t\tconsole.error(err)\n\t\t\t}\n\t\t})\n\t\tthis.time++\n\t}", "title": "" }, { "docid": "b1ebf592355dd24b848e2b7c873eac14", "score": "0.51405215", "text": "function numWorkers() { return Object.keys(cluster.workers).length; }", "title": "" }, { "docid": "b1ebf592355dd24b848e2b7c873eac14", "score": "0.51405215", "text": "function numWorkers() { return Object.keys(cluster.workers).length; }", "title": "" }, { "docid": "d5698ea55bc4dca3b0cb1f45e1c420d2", "score": "0.5135488", "text": "get elapsedTime() {\n if(this.status === Action.RUNNING){\n now() - this.startedTime\n } else {\n return 0\n }\n }", "title": "" }, { "docid": "368c9ab30ab1b77f7fae703d8ec87f05", "score": "0.51351345", "text": "get hasActiveCallTask() {\n if (!this.workerTasks) return false;\n\n return [...this.workerTasks.values()]\n .some(task => {\n return TaskHelper.isCallTask(task)\n && (TaskHelper.isPending(task) || TaskHelper.isLiveCall(task))\n });\n }", "title": "" }, { "docid": "f5bd74ea84bbd6cd2d27a0f6efd95e96", "score": "0.51260513", "text": "get_slow_active() {\n return this.slow;\n }", "title": "" }, { "docid": "2152dd2ae707daa52f8a874a9e389032", "score": "0.5123205", "text": "function getRecentThreads() {\n User.getRecentThreads(vm.username)\n .then(function(data) {\n for (var i = 0; i < data.length; i++) {\n vm.recentThreadNames.push(data[i].thread);\n vm.recentThreads[data[i].thread] = data[i].id;\n }\n });\n }", "title": "" }, { "docid": "5989f4211609d61875d523efadd0d54a", "score": "0.51189923", "text": "keepSessionAlive () {\n this._lastActiveMoment = +(new Date());\n if (this.waitForUserTimeout) {\n clearTimeout(this.waitForUserTimeout);\n }\n }", "title": "" }, { "docid": "016a561f56e9c59b45ca1185fde1331a", "score": "0.51173544", "text": "function check_service() {\n let throttleJobs = [];\n let resumeJobs = [];\n let newNode = false;\n\n return Promise.map(clients, function(client) {\n return client.__esModule.nodeStats()\n .then(function(results) {\n let client_name = client.__esConnection;\n let isHealthy = _.every(results.nodes, function(stats, node_name) {\n //check if node exists on state obj\n if (_.get(state, `[${client_name}][${node_name}]`)) {\n //make sure all monitored thread pool are ok\n return _.every(stats.thread_pool, function(val, key) {\n //only check specific threads that we are interested in\n if (_.get(state, `[${client_name}][${node_name}][${key}]`)) {\n let threshold = state[client_name][node_name][key].threshold;\n let queue = val.queue;\n let queueDepth = queue / threshold;\n logger.trace(`connection: ${client_name} , node: ${node_name} , thread_pool: ${key} , queue: ${queue}, threshold: ${threshold}, queueDepth: ${queueDepth}`);\n\n if (queueDepth < limit) {\n //if its already throttled, return false if its not under the resume threshold\n if (state[client_name].throttle && state[client_name].beenCheckedAfterInit && queueDepth > resume) {\n return false\n }\n\n return true;\n }\n\n return false;\n }\n //key is not being monitored, return true to not conflict\n return true;\n });\n }\n else {\n //since it's not found in state, it must be a new node, return false to stop the iteration\n newNode = true;\n return false;\n }\n });\n\n //a new node has appeared, need to reinitialize and then checkService again\n if (newNode) {\n logger.warn(`new nodes have been found in the cluster, re-initializing`);\n return Promise.reject({initialize: true})\n }\n\n if (isHealthy && state[client_name].throttle) {\n //node is now healthy \n state[client_name].throttle = false;\n resumeJobs.push({\n type: 'elasticsearch',\n connection: client_name\n });\n //after its been cleared, set flag to true\n if (state[client_name].beenCheckedAfterInit === false) {\n state[client_name].beenCheckedAfterInit = true\n }\n }\n\n //only throttle if it isnt healthy and has not already been throttled\n if (isHealthy === false && state[client_name].throttle === false) {\n state[client_name].throttle = true;\n throttleJobs.push({\n type: 'elasticsearch',\n connection: client_name\n });\n \n if (state[client_name].beenCheckedAfterInit === false) {\n state[client_name].beenCheckedAfterInit = true\n }\n }\n\n //check was successfully completed\n return true;\n })\n .catch(function(err) {\n //new node came online, need to re-initialize\n if (err.initialize) {\n return Promise.reject(err)\n }\n else {\n //real error, pass it along\n var errMsg = parseError(err);\n logger.error(`error with client ${client.__esConnection}`, errMsg);\n return Promise.reject(errMsg);\n }\n })\n })\n .then(function() {\n let results = {pause: null, resume: null};\n\n if (throttleJobs.length > 0) {\n results.pause = _.uniqBy(throttleJobs, 'connection');\n }\n if (resumeJobs.length > 0) {\n results.resume = _.uniqBy(resumeJobs, 'connection');\n }\n return results\n })\n .catch(function(err) {\n if (err.initialize) {\n //new node came online, need to re-initialize\n return Promise.reject(err)\n }\n else {\n //real error, pass it along\n var errMsg = parseError(err);\n logger.error('check service error', errMsg);\n return Promise.reject(err)\n }\n })\n }", "title": "" }, { "docid": "4429b6c97d1f6171d0517a90d20e3433", "score": "0.51160514", "text": "sendQueuedRequests() {\n this._startTimer();\n }", "title": "" }, { "docid": "92f992d53dc265e96d169f8f639a0231", "score": "0.51138777", "text": "function initializeIntervalJobs() {\n var _this = this;\n hourly_interval = setInterval(function () {\n return __awaiter(_this, void 0, void 0, function () {\n var isonline;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, HttpClient_1.serverIsAvailable()];\n case 1:\n isonline = _a.sent();\n DataController_1.sendHeartbeat('HOURLY', isonline);\n return [2 /*return*/];\n }\n });\n });\n }, one_hour_millis);\n thirty_minute_interval = setInterval(function () {\n return __awaiter(_this, void 0, void 0, function () {\n var isonline;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, HttpClient_1.serverIsAvailable()];\n case 1:\n isonline = _a.sent();\n return [\n 4 /*yield*/,\n KpmRepoManager_1.getHistoricalCommits(isonline),\n ];\n case 2:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n }, thirty_min_millis);\n twenty_minute_interval = setInterval(function () {\n return __awaiter(_this, void 0, void 0, function () {\n var name_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n return [4 /*yield*/, FileManager_1.sendOfflineEvents()];\n case 1:\n _a.sent();\n // this will get the login status if the window is focused\n // and they're currently not a logged in\n if (vscode_1.window.state.focused) {\n name_1 = Util_1.getItem('name');\n // but only if checkStatus is true\n if (!name_1) {\n DataController_1.isLoggedIn();\n }\n }\n return [2 /*return*/];\n }\n });\n });\n }, one_min_millis * 20);\n // every 15 minute tasks\n fifteen_minute_interval = setInterval(function () {\n return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n vscode_1.commands.executeCommand('codetime.sendOfflineData');\n return [2 /*return*/];\n });\n });\n }, one_min_millis * 15);\n // update liveshare in the offline kpm data if it has been initiated\n liveshare_update_interval = setInterval(function () {\n return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (vscode_1.window.state.focused) {\n updateLiveshareTime();\n }\n return [2 /*return*/];\n });\n });\n }, one_min_millis);\n}", "title": "" }, { "docid": "b40d2ccad21d29f85a3ff61383a8ad2c", "score": "0.5109384", "text": "get activePromiseCount() {\r\n return this._globalGroup.activePromiseCount;\r\n }", "title": "" }, { "docid": "ca75c6876cbe14f9a6b1bbe1fcaab1ba", "score": "0.51066035", "text": "whileInactive(){}", "title": "" }, { "docid": "4ccbad83cc9b0492cdcb0c765d12c74b", "score": "0.51061684", "text": "function _tick() {\n\t\t\tvar promises = _tasks.map(function (task) {\n\t\t\t\ttask.run();\n\t\t\t\tif (task.skipped) { //This will happen for parallel tasks also.\n\t\t\t\t\treturn Promise.resolve(false)\n\t\t\t\t} else {\n\n\t\t\t\t\treturn task.promise;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t//console.log(\"Running %s tasks.\", promises.length);\n\t\t\tPromise.all(promises)\n\t\t\t\t.then(function (results) {\n\t\t\t\t\t//console.log(\"Completed %s tasks.\", results.length);\n\t\t\t\t\t//console.log(results);\n\t\t\t\t\tresults.forEach(function (r) {\n\t\t\t\t\t\tif (!!r) console.log(r);\n\t\t\t\t\t});\n\n\t\t\t\t\t_timeout = setTimeout(_tick, 1000);\n\t\t\t\t});\n\t\t}", "title": "" }, { "docid": "07d2726b2bd7f26a63d8d46e3c346b1e", "score": "0.5103289", "text": "function idleMatchUpdateLoop() {\n console.log(new Date() + ' There are ' + Object.keys(idle_matches).length + ' idle matches');\n for (var match in idle_matches) {\n idle_matches[match].updateIdle();\n }\n\n setTimeout(idleMatchUpdateLoop, idleUpdateInterval);\n}", "title": "" }, { "docid": "9106b629d5d6db2c2ca0018ba7065870", "score": "0.51001805", "text": "function tick(fromQueue) {\n //console.log(`TICK${fromQueue?\" from queue\":\"\"}`);\n actOnEveryResource(function(r) {\n //console.log(`[TICK] ${r.id.name} ${r.visible ? \"is vis\":\"not vis\"}`);\n if (r.visible) {\n r.lastTickValue = r.level;\n for (var i = 0; i < r.allActions.length; i++) {\n if (r.allActions[i] === undefined) console.log(`ERROR on tick() 000`);\n r.allActions[i].canAfford = canAffordAction(r, r.allActions[i], activationAmount);\n }\n for (var i = 0; i < r.autoActions.length; i++) {\n if(r.autoActions[i].visible === undefined){\n console.log(`${r.autoactions[i].groupid} undefined ACTIONs visibility`);\n }\n else if(!r.autoActions[i].visible){\n //console.log(`${r.autoActions[i].groupID} is visible = ${r.autoActions[i].visibile}`);\n continue;\n }\n if (r.autoActions[i].partial || !r.autoActions[i].canAfford) continue;\n\n processResourceDeltas(r, r.autoActions[i].resDeltas, {}, fromQueue);\n }\n }\n });\n if (fromQueue) {\n tickQueue--;\n } else {\n ticks++;\n refreshView();\n }\n\n //console.log(`TICK complete`);\n}", "title": "" }, { "docid": "531c3aed4f75a6455e49c83b415ef443", "score": "0.50995207", "text": "function stillAlive(tab) {\n\t return now - tab.lastUpdated < TAB_TIMEOUT;\n\t }", "title": "" }, { "docid": "dbdb62e15748100af868ccb461270242", "score": "0.5095568", "text": "live(){\n setInterval(()=>{this.generateHeartbeat()},1000)\n }", "title": "" }, { "docid": "a713438d204f2a894f991dbaca03b709", "score": "0.5093463", "text": "function eachActiveConnection(fn) {\n var actives = $('.active');\n var checkedIds = {};\n actives.each(function () {\n var peerId = $(this).attr('id');\n\n if (!checkedIds[peerId]) {\n var conns = peer.connections[peerId];\n for (var i = 0, ii = conns.length; i < ii; i += 1) {\n var conn = conns[i];\n fn(conn, $(this));\n }\n }\n\n checkedIds[peerId] = 1;\n });\n }", "title": "" }, { "docid": "30cb1c21909b5b0c0ccd27e495df0134", "score": "0.50879294", "text": "isActive() {\n const currentTime = DateUtils.getTime();\n\n return this.beginTime_ <= currentTime && this.endTime_ > currentTime;\n }", "title": "" }, { "docid": "a77f7bc9bd53c41d00448aa2cff61cb7", "score": "0.5086667", "text": "function SignalActiveList(restart=false) {\n clearTimeout(SL.active_timer);\n if (CheckPriority()) {\n SL.active_background_work = {};\n if (restart) {\n SL.active_timer = setTimeout(CalculateActiveList, 1);\n }\n }\n}", "title": "" }, { "docid": "df0bda759f57396780a520a263324af9", "score": "0.508596", "text": "function programAliveSignal(){\n\tvar intervalAlive= setInterval(() => {\n\t\tnotifyAlive();\n\t}, timeOfCheckAlive);\n\tprogrammedIntervalFunctions.push(intervalAlive);\n}", "title": "" }, { "docid": "fb6b2463a241f3df7e4c415bdc6fe7b7", "score": "0.5083018", "text": "function toBeNotifiedWhenIdle_(){this.toBeNotifiedWhenIdle$B7LG=(/* new <QueuedRemoteBean>*/[]);}", "title": "" }, { "docid": "a04a4e708e499921a68aeb27ddc8a152", "score": "0.50823927", "text": "initializeActiveInterval() {\n if (!PostView.activeInterval) {\n PostView.activeInterval = setInterval(PostView.checkActive, 100);\n PostView.posts = [];\n }\n }", "title": "" }, { "docid": "b9b99d7bb09020f4ce8ca0462b17f2cc", "score": "0.50821704", "text": "startCounter() {\n \n this.schedule = setInterval(() => this.counterObjects(), 1000);\n }", "title": "" }, { "docid": "58a3ec6cf2e48a5de97b9258bb5c8d1b", "score": "0.50706536", "text": "function cpuLoadPerCore() {\n const cpus = os.cpus()\n\n return cpus.map(cpu => {\n const times = cpu.times\n return {\n tick: Object.keys(times).filter(time => time !== 'idle').reduce((tick, time) => { tick+=times[time]; return tick }, 0),\n idle: times.idle,\n }\n })\n}", "title": "" }, { "docid": "e0c471b2f1cc7a03a2cd1fe798d697e1", "score": "0.50617313", "text": "if (!this.running) {\n return;\n }", "title": "" }, { "docid": "26ba2da29387db775d6157cf5ce2be49", "score": "0.50559753", "text": "loop() {\n setInterval(() => {\n this.gatherAllChecks();\n }, 1000 * 60);\n }", "title": "" }, { "docid": "e577dabfa91e4bdde96ee8a8fba1a26f", "score": "0.5052417", "text": "checknodes(){\r\n // Get list of dead nodes\r\n console.log(\"Checking nodes ...\")\r\n console.log(this.alivelist);\r\n\tvar deadnodes = [];\r\n for(let node in this.alivelist){ \r\n if(!this.alivelist[node]){\r\n console.log(`${node} is dead`);\r\n deadnodes.push(node);\r\n }\r\n }\r\n\r\n // do something to deadnodes' lost information\r\n this.reduplicate(deadnodes);\r\n\r\n // Reset state of alive list and send heartbeat request to all nodes\r\n Object.keys(this.alivelist).forEach(v => this.alivelist[v] = false);\r\n this.pubsub.publish('heartbeat', {sender: \"master\", message: \"Check status\"});\r\n\r\n // Validate in 4 seconds\r\n setTimeout(() => {this.checknodes()}, 4000);\r\n }", "title": "" }, { "docid": "716c7dd2f9526feb1317ce5d5da0663c", "score": "0.50508267", "text": "syncActiveInstances () {\n let timer = this.state.instancesTypesTimer\n clearTimeout(timer)\n\n instanceStore\n .getAllInstances()\n\n /* Combine all Instances by a common type */\n .then(this.convertToInstancesTypes)\n\n .then((currentInstancesTypes) => {\n if (toString(currentInstancesTypes) === toString(this.state.lastInstancesTypes)) {\n return\n }\n\n /* Recreate the main Graph using the latest number of instances */\n this.destroyGraph()\n this.createGraph(currentInstancesTypes)\n this.setState({\n lastInstancesTypes: currentInstancesTypes\n })\n })\n\n .catch((error) => log(`Unable to sync with the Backend about latest active instance: ${toString(error)}`))\n\n .then(() => {\n /*\n Check for updates no more often then we get their stats\n because stats are important for each node presentation\n */\n timer = setTimeout(this.syncActiveInstances, statsStore.emitter.getTickerTimeout())\n this.setState({\n instancesTypesTimer: timer\n })\n })\n }", "title": "" }, { "docid": "ef7aa2c7b6f0122b12bb8075cd2bff43", "score": "0.5049533", "text": "function periodicTask() {\n crawlSomeFeeds(periodicRunIndex);\n ++periodicRunIndex;\n}", "title": "" }, { "docid": "6cf0e9f4186db5b7fd1293dc5f2f873b", "score": "0.5048109", "text": "timer() {\n if (this.state.ticking) {\n window.i = Meteor.setInterval(function() {\n if (!this.state.ticking) {\n Meteor.call('userActivities.switchActivity', this.props.userActivities[0]._id, this.state.ticking);\n Meteor.call('userActivity.trackTime', this.props.userActivities[0]._id, this.state.ms);\n\n Meteor.clearInterval(window.i);\n return;\n }\n\n const ms = this.state.ms + 1000;\n this.setState({ ms });\n\n Meteor.call('userActivities.switchActivity', this.props.userActivities[0]._id, this.state.ticking);\n Meteor.call('userActivity.trackTime', this.props.userActivities[0]._id, this.state.ms);\n }.bind(this), 1000);\n } else {\n Meteor.call('userActivities.switchActivity', this.props.userActivities[0]._id, this.state.ticking);\n Meteor.call('userActivity.trackTime', this.props.userActivities[0]._id, this.state.ms);\n\n Meteor.clearInterval(window.i);\n }\n }", "title": "" }, { "docid": "bbd5170a4db7b81119b81275e503c942", "score": "0.50478405", "text": "run() {\n\t\tthis.reset();\n\t\twhile(this.active.length > 0) {\n\t\t\tthis.step(1);\n\t\t}\n\t}", "title": "" }, { "docid": "85ab328e62c8857f0da6531d5ec6c69e", "score": "0.50464934", "text": "__enter__() {\n this._start = this.performance.now()\n }", "title": "" }, { "docid": "4a661d387ea3243b5bc27060e7d09f1d", "score": "0.504337", "text": "function Scheduler() {\n this.queueCount = 0;\n this.holdCount = 0;\n this.blocks = new Array(NUMBER_OF_IDS);\n this.list = null;\n this.currentTcb = null;\n this.currentId = null;\n}", "title": "" }, { "docid": "47ac598bbd378ce80bf14ac0ebe24eb5", "score": "0.50406444", "text": "function startTime() {\n timerInterval = setInterval(count, 1000);\n}", "title": "" }, { "docid": "757bdd040c74bdcdb3fb06ace6ebd302", "score": "0.5038745", "text": "remaining () {\n return this.getActiveTasks().length //activeTask가 몇개 있는지 보여줌 1\n }", "title": "" }, { "docid": "63cf819fb58baa7a91f40b58139a8530", "score": "0.5036245", "text": "function doTimer()\n{\nTitanium.API.info(\"function doTimer launched.\");\nif (!running)\n {\n running=true;\n timedCount();\n }\n}", "title": "" }, { "docid": "2ab78f8c01f800eb019fadc4fa2ad038", "score": "0.5035442", "text": "get STATE_AWAIT() { return 5; }", "title": "" }, { "docid": "9200813b84b0f849d1317b45fd8a9435", "score": "0.50317633", "text": "async started() {}", "title": "" }, { "docid": "9200813b84b0f849d1317b45fd8a9435", "score": "0.50317633", "text": "async started() {}", "title": "" }, { "docid": "bc1c691634833a0d06ae206ac9b9a783", "score": "0.5030093", "text": "function gc() {\n if ((++requestsSinceGC) == 10) {\n for (let i in sessionsWaitingForSelection) {\n let session = sessionsWaitingForSelection[i];\n if (session.started && Date.now() >= session.started + SELECT_TIMEOUT * 1000) {\n delete sessionsWaitingForSelection[i];\n }\n }\n requestsSinceGC = 0;\n }\n}", "title": "" }, { "docid": "0477c9392648b4ef9855803fb2472afe", "score": "0.5024582", "text": "function Scheduler() { }", "title": "" } ]
d998b57785e454c92c56197302646731
Get details about video like title, upload date, etc.
[ { "docid": "f8f33cc822cd2a93980bc678f0be915f", "score": "0.7216099", "text": "async function getVideoInfo(videoId) {\n console.log('`getVideoInfo` ran');\n\n // Create parameters for API query\n const queryParameters = {\n key: apiInfo.youtube.key,\n part: 'snippet',\n id: videoId,\n };\n \n try {\n // Get video info from YouTube API\n const response = await getApiData(queryParameters, apiInfo.youtube.url.videoInfo);\n const videoInfo = await response.json();\n\n // Get relevant info about video\n const videoTitle = videoInfo.items[0].snippet.title;\n const videoDesc = videoInfo.items[0].snippet.description;\n const videoThumbUrl = videoInfo.items[0].snippet.thumbnails.high.url;\n\n return {\n title: videoTitle,\n desc: videoDesc,\n thumbUrl: videoThumbUrl,\n };\n }\n catch {\n return {\n title: 'Video Unavailable',\n }\n }\n}", "title": "" } ]
[ { "docid": "90f50cecd43d9de18e193feeef77aa2f", "score": "0.7227954", "text": "onCreateVideoDetailsRequest() {\n const request = gapi.client.youtube.videos.list({\n id: this.id,\n part: \"snippet,contentDetails,statistics\"\n });\n request.execute(response => {\n const results = response.result;\n console.log(results);\n this.onPopulateVideoInfo(results);\n });\n }", "title": "" }, { "docid": "8189dabe0f4dfa7611a3766838db8444", "score": "0.712442", "text": "function getVideoMetaData(opts, callback) {\n debug('fn: getVideoMetaData');\n var videoId;\n if (typeof opts === 'string') {\n videoId = opts;\n }\n if (typeof opts === 'object') {\n videoId = opts.videoId;\n }\n var uri = 'https://www.youtube.com/watch?hl=en&gl=US&v=' + videoId;\n var params = _url.parse(uri);\n params.headers = {\n 'user-agent': _userAgent,\n 'accept': 'text/html',\n 'accept-encoding': 'gzip',\n 'accept-language': 'en-US'\n };\n params.headers['user-agent'] = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15';\n _dasu.req(params, function (err, res, body) {\n if (err) {\n callback(err);\n }\n else {\n if (res.status !== 200) {\n return callback('http status: ' + res.status);\n }\n if (_debugging) {\n var fs = require('fs');\n var path = require('path');\n fs.writeFileSync('dasu.response', res.responseText, 'utf8');\n }\n try {\n _parseVideoInitialData(body, callback);\n }\n catch (err) {\n callback(err);\n }\n }\n });\n}", "title": "" }, { "docid": "dd24e8750c68aeb72fc6aa168b927263", "score": "0.70965266", "text": "function get_video_data(id) {\n\t\tvar details = {\n\t\t\turl: 'http://gdata.youtube.com/feeds/api/videos/' + id + '?v=2&alt=jsonc',\n\t\t\tdataType: 'jsonp'\n\t\t};\n\n\t\treturn details;\n\t}", "title": "" }, { "docid": "f98712ba1816c91d451a9af974fb84f9", "score": "0.67671895", "text": "function getVideoId() {\n return videoId;\n }", "title": "" }, { "docid": "acfdd8a2eb04defc4e351706789577b9", "score": "0.6722311", "text": "function extractVideoInfo(field) {\n try {\n const infoItems = field.split('Video:')[1].replace(/\\(.*?\\)/gi, '').split(',');\n const resolution = infoItems[2].split('x');\n return {\n compression: infoItems[0].trim(),\n colorSpace: infoItems[1].trim(),\n resolution: {\n width: parseInt(resolution[0].trim()),\n height: parseInt(resolution[1].trim())\n },\n fps: parseInt(infoItems[4].replace('fps', '').trim())\n };\n } catch {\n return {};\n }\n}", "title": "" }, { "docid": "d8fab869ca35df0da5fd64cf68e144c5", "score": "0.669518", "text": "function jsonforVideo(videoElement){\n let target = $(videoElement);\n return {\n _id: target.find('.video-title').attr('objectID'),\n title: target.find('.video-title').text(),\n url: target.find('.thumbnail').attr('src'),\n videoID: target.find('.thumbnail').attr('videoID')\n };\n}", "title": "" }, { "docid": "34bfa1b5c655d760d6a7b5638d6254de", "score": "0.66777503", "text": "async function fetchVideo() {\n\t\t\tif (fetchURL.match('movie')) {\n\t\t\t\tconst request = await axios.get(reqType('movie', movie.id));\n\t\t\t\tsetTrailerID(request.data.results[0].key);\n\t\t\t} else if (fetchURL.match('tv')) {\n\t\t\t\tconst request = await axios.get(reqType('tv', movie.id));\n\t\t\t\tsetTrailerID(request.data.results[0]?.key);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "4196f4f6b887b564bf9a5d5153e8153f", "score": "0.66441023", "text": "function getMovieInfo() {\n // http://www.omdbapi.com/?t=wall-e&apikey=3a2fe8bf\n}", "title": "" }, { "docid": "7f1c90e42fa134505b69303dea60db35", "score": "0.664179", "text": "async function print_video_info() {\n await last_url_processed;\n fs.writeFileSync('video_info.json', JSON.stringify(videos),'utf-8');\n}", "title": "" }, { "docid": "70be87422e0760d518927c0cc74831c6", "score": "0.6519116", "text": "function getVideo(req, res){\n \n var videoId = req.params.id;\n \n Video.findById(videoId).populate({path: 'playlist'}).exec((err, video)=>{\n \n if(err){\n res.status(500).send({message: 'Error en la peticion'});\n \n }else{\n if(!video){\n res.status(404).send({message: 'El video no existe'});\n \n \n }else{\n res.status(200).send({video});\n \n }\n \n }\n });\n }", "title": "" }, { "docid": "be6bd2d5d7acceb518bab09ebefabb20", "score": "0.65073365", "text": "get(req, res){\n Video.findById(req.params.id)\n .exec(function(err, video){\n if(err){\n console.log(\"error retrieving video\");\n }else{\n res.json(video);\n }\n });\n }", "title": "" }, { "docid": "f7d89e00c3af9dfd0285cd54a86013a6", "score": "0.64946777", "text": "onPopulateVideoInfo(res) {\n this.videoTitleTab.innerHTML = `${\n res.items[0].snippet.title\n } | Videotainment`;\n this.videoDescription.innerHTML = res.items[0].snippet.description;\n this.titleDiv.innerHTML = res.items[0].snippet.title;\n this.channelTitle.innerHTML = res.items[0].snippet.channelTitle;\n\n this.viewCount =\n res.items[0].statistics.viewCount == undefined\n ? (this.viewCount.innerHTML = \"\")\n : (this.viewCount.innerHTML =\n res.items[0].statistics.viewCount\n .toString()\n .replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\") + \" views\");\n\n this.onChannelInfo(res);\n this.onFormatLinks(res);\n this.onFormatVideoTags(res);\n }", "title": "" }, { "docid": "0e5b1aeeb48ce130c013914a5185075a", "score": "0.64764625", "text": "function Video(title) {\n this.title = title;\n console.log(this);\n }", "title": "" }, { "docid": "4e741d180288e59e27617dbb52af3a7f", "score": "0.6456272", "text": "function movieDetails(baseURL, id) {\n const params = {\n 'language': 'pt-BR',\n 'append_to_response': 'videos',\n }\n const movieDetailsURL = generateValidURL(baseURL, `movie/${id}`, params);\n return fetch(movieDetailsURL); \n}", "title": "" }, { "docid": "57e3e2f108e34b6ab816e19222b11ec1", "score": "0.6452994", "text": "function getAllVideoData(){\n return videoData;\n}", "title": "" }, { "docid": "9371bf35a9c9208bc8229a96c07ea1df", "score": "0.6451977", "text": "function loadVideoData() {\n return fs.readFileSync('./data/video-details.json', 'utf8');\n}", "title": "" }, { "docid": "24fbc83c0809d907206f30ef61694644", "score": "0.6444542", "text": "function show(req, res) {\n db.Video.findById(req.params.videoId, function(err, foundVideo) {\n if(err) { console.log('videosController.show error', err); }\n console.log('videosController.show responding with', foundVideo);\n res.json(foundVideo);\n });\n}", "title": "" }, { "docid": "aa0ff981eeeef7559cf4f497bfe8a12f", "score": "0.64267313", "text": "function Video(_videoId, _videoLink, _videoTitle, _videoUploadDate, _videoLength, _views, _likes, _disLikes, _comments, _uploadedBy, _displayAdv, _recommended) {\n this.videoId = _videoId;\n this.videoLink = _videoLink;\n this.videoTitle = _videoTitle;\n this.videoUploadDate = _videoUploadDate;\n this.videoLength = _videoLength;\n this.views = _views;\n this.likes = _likes;\n this.disLikes = _disLikes;\n this.comments = _comments;\n this.uploadedBy = _uploadedBy;\n this.displayAdv = _displayAdv;\n this.recommended = _recommended;\n }", "title": "" }, { "docid": "24c6643070f4336b37ed2945fd058832", "score": "0.6417246", "text": "videoById(req, res)\n {\n var _id = req.params.id;\n if (_id) {\n this.model.findById(_id, function (err, results) {\n if(err)\n {\n console.error(err);\n res.status(500).json(err);\n }\n else {\n if (results)\n res.send(results);\n else\n res.status(404).send(\"Video \" + _id + \" not found\");\n }\n });\n }\n else {\n res.send(\"A valid video ID must be given\");\n }\n }", "title": "" }, { "docid": "422bd3aed77d8172498cceaebd43c0d3", "score": "0.64032227", "text": "function showVideoInfo(event) {\n var itemId = $(this).data('id');\n console.log(itemId)\n $.ajax({\n type: \"get\",\n url: \"/videos/\" + itemId,\n datatype: 'json'\n }).done(function(data){\n console.log(data)\n })\n }", "title": "" }, { "docid": "7b07bda950ed2d15be072746753cbe66", "score": "0.63965505", "text": "function videoStatus(video) {\n\t \t//console.log(video);\n\t \tlet videoId = video.videoId;\n\t \tlet iframe = video.assets.iframe;\n\t \tlet playable = false;\n\t \tlet status = client.videos.getStatus(videoId);\n\t status.then(function(videoStats){\n\t \t//console.log('status', status);\n\t\t\t//we have the video uploaded, now we need to wait for encoding to occur\n\t \t\tplayable = videoStats.encoding.playable;\n\t \t\tconsole.log('video playable?',videoStats.encoding.playable, playable);\n\t \t\tif (playable){\n\t \t\t\t//video is ready to be played\n\t\t\t\t//and we can get the mp4 url now as well\n\t \t\t\tconsole.log(\"ready to play the video\");\n\t \t\t\tplayReadyTimer = Date.now();\n\t\t\t\tlet uploadSeconds = (uploadCompleteTimer-startUploadTimer)/1000;\n\t\t\t\tlet processSeconds = (playReadyTimer - uploadCompleteTimer)/1000;\n\t\t\t\tconsole.log(\"video uploaded in: \", uploadSeconds);\n\t\t\t\tconsole.log(\"video processed in: \", processSeconds);\n\t \t\t\tconsole.log(iframe);\n\t\t //now we can get the MP4 url, and send the email and post the response\n\t\t\t\tlet videoMp4 = client.videos.get(videoId);\n\t\t\t\tvideoMp4.then(function(mp4Stats) {\n\t\t \t \t\tconsole.log(\"videomp4status\",mp4Stats);\n\t\t \t\t\tmp4 = mp4Stats.assets.mp4;\n\t\t \t\t\tconsole.log(\"mp4 url\", mp4);\n\t\t\t\t\tif(useProduction){\n\t\t\t\t\t\t//if user submitted an email - we are in prod - and can email the link to the videos.\n\t\t\t\t\t\tintercomIntegration(fields.email,player, mp4,mp4Support,uploadSeconds,processSeconds);\n\t\t\t\t\t}\n\t \t\t\t\treturn res.render('video', {iframe, player, uploadSeconds,processSeconds});\n\t\t \t \t}); \t\n\t \t\t}else{\n\t \t\t\t//not ready so check again in 2 seconds.\n\t \t\t\tconsole.log(\"not ready yet\" );\n\t \t\t\tsetTimeout(videoStatus(video),2000);\n\t \t\t}\n\n\t\t\t\n\t\t\t\n\t \t}).catch(function(error) {\n\t \t console.error(error);\n\t \t});;\t\n\t }", "title": "" }, { "docid": "936a829165b0f02b4f5f4f0cfc6a1cf8", "score": "0.63884664", "text": "function getVideoUrl() {\n var videoUrl = ytswf.getVideoUrl();\n updateHTML('videoUrl', videoUrl);\n }", "title": "" }, { "docid": "c01e7dc7e58afd015bd7fc83577d0ae0", "score": "0.6385739", "text": "function setVideoInformation() {\n var videoData = vChat.player.getVideoData();\n var durationText = _getFormattedTime(vChat.player.getDuration());\n var url = vChat.player.getVideoUrl();\n var $videoName = $('#current-video-name');\n $videoName.text(videoData['title']);\n $videoName.attr('title', videoData['title']);\n $('#current-video-duration').text(durationText);\n $('#current-video-youtube-link').html('<a href=\"' + url + '\" target=\"_blank\">Watch at YouTube</a>');\n var currentTime = vChat.player.getCurrentTime();\n $currentPlayTime.attr('data-seconds', currentTime);\n _setTimer();\n timer = setInterval(_setTimer, 1000);\n}", "title": "" }, { "docid": "b13c4ac2eaa836cf5d692be60d3c618c", "score": "0.6364563", "text": "async function getVideo(req, res) {\n try {\n console.log(\"req.params\", req.params);\n const videoId = req.params.id;\n const video = await videoService.getById(videoId);\n res.send(video);\n } catch (err) {\n logger.error(\"Cannot get video\", err);\n res.status(500).send({ err: \"Failed to get video\" });\n }\n // const videoId = req.params.videoId\n // videoService.getById(videoId)\n // .then(video => {\n // res.json(video)\n // })\n}", "title": "" }, { "docid": "c2d705c4bf5b15b85abd116b8b3c1a18", "score": "0.6326794", "text": "function getVideo (subscription, infos) {\n\t\tif (infos.vid === undefined) throw \"Video without id\";\n\t\t\n\t\tif (allVideos[infos.vid]) {\n\t\t\tvar video = allVideos[infos.vid];\n\t\t\tvideo.addInfos(infos);\n\t\t\tvideo.addSubscription(subscription);\n\t\t\treturn video;\n\t\t} else {\n\t\t\treturn new Video(subscription, infos);\n\t\t}\n\t}", "title": "" }, { "docid": "16e0bb2634e6066a936e43fef39b5b93", "score": "0.6292068", "text": "static extractVideos(data: any) : Array<Video> {\n\n return data.items\n .filter(v => v.id.kind === \"youtube#video\")\n .map(v => ({\n id: v.id.videoId,\n title: v.snippet.title,\n image: v.snippet.thumbnails.medium}))\n }", "title": "" }, { "docid": "8ab26c0eaeec713882fa01537c1983f6", "score": "0.62645555", "text": "loadMovie({name, description, vidsource}) {\n console.log('show movie details');\n \n \n this.videotitle = name;\n this.videodescription = description;\n this.videosource = vidsource;\n \n this.showDetails = true;\n }", "title": "" }, { "docid": "6afc2e4606c38d5a15c5720cdc9bef25", "score": "0.62605095", "text": "function getVideos(){\n}", "title": "" }, { "docid": "7bb15bd9eba8433cc16f42d15c27419c", "score": "0.62227124", "text": "function parseVideoItem(item) {\n var videoMatcher = matchers.deprecated_video.test(item)\n ? matchers.deprecated_video\n : matchers.video;\n var _a = item.match(videoMatcher) || [], mediaId = _a[1], filename = _a[2], posterId = _a[3], width = _a[4], height = _a[5];\n var title = convertFilenameToTitle(filename);\n if (mediaId && posterId) {\n return {\n type: _common__WEBPACK_IMPORTED_MODULE_0__[/* types */ \"b\"].VIDEO,\n mediaId: mediaId,\n posterId: posterId,\n width: parseInt(width, 10),\n height: parseInt(height, 10),\n title: title,\n };\n }\n return { error: _common__WEBPACK_IMPORTED_MODULE_0__[/* errors */ \"a\"].bad_media_id };\n}", "title": "" }, { "docid": "04b17b6a2e862b1b73f5078dd13ea567", "score": "0.62099296", "text": "function videoPage(page, id) {\n var ytdl = require('./ytdl-core/lib/info');\n page.loading = true;\n page.type = 'video';\n\n ytdl('https://www.youtube.com/watch?v=' + id, function(err, info) {\n page.loading = false;\n if(err) {\n page.error(err);\n return;\n }\n\n var url = info.formats[0].url;\n var mimetype = (info.formats[0].mimeType ? info.formats[0].mimeType.split(';')[0] : '');\n if (!mimetype)\n url = 'hls:' + url;\n\t\n\tthumbs = info.player_response.videoDetails.thumbnail.thumbnails;\n \n var videoParams = {\n title: unescape(info.player_response.videoDetails.title),\n icon: thumbs[thumbs.length-1].url,\n canonicalUrl: PREFIX + ':video:' + info.player_response.videoDetails.videoId,\n sources: [{\n url: url,\n mimetype: mimetype,\n }],\n no_subtitle_scan: true,\n subtitles: []\n }\n\n page.source = 'videoparams:' + JSON.stringify(videoParams);\n });\n}", "title": "" }, { "docid": "6ac83d368131919d8e54f8a78d8ba952", "score": "0.6209371", "text": "get video() {\n if (this.isVideo) {\n return this.message.video;\n }\n\n return null;\n }", "title": "" }, { "docid": "39f2d477ead5524ffc4b21cac6dfbf99", "score": "0.6207252", "text": "function displayResult(videoSnippet) {\n var title = videoSnippet.title;\n var videoId = videoSnippet.resourceId.videoId;\n $('#video-container').append('<p>' + title + ' - ' + videoId + '</p>');\n}", "title": "" }, { "docid": "d5df3325d1df5f423a8cc8be7d5b3a2d", "score": "0.61707085", "text": "get videoStream() {\n return this._videoStream;\n }", "title": "" }, { "docid": "35d12a3f553485f7dd1db865e605be35", "score": "0.6162168", "text": "function getVideoDescriptions()\n{\n\tvar vDescList = [];\n\tlet videoDescriptions = document.querySelectorAll(\"#video-info > div\");\n\tif(videoDescriptions.length > 0){\n\t\tfor (var i = 0; i < videoDescriptions.length; i++) {\n\t\t\tvDescList.push(videoDescriptions[i].innerText);\n\t\t\t//console.log(videoDescriptions[i].innerText);\n\t\t}\t\n\t}\n\treturn vDescList;\n}", "title": "" }, { "docid": "a4d0c5f834a1a5f05aded57f6333ab91", "score": "0.6155099", "text": "function getStream() {\n return videoStream;\n}", "title": "" }, { "docid": "eb20ac9ca8739d32696fdf039f09b62d", "score": "0.61454177", "text": "function getVideo(req, res) {\n const code = req.query.code;\n console.log('Getting video with code:', code);\n\n db.Video.findOne({\n where: { code },\n }).then((video) => {\n res.send(video);\n });\n}", "title": "" }, { "docid": "2582bfe9cfecd28accaa5a497f66eea4", "score": "0.61299264", "text": "function internetVideoArchive() {\n // var ivaUrl = 'https://ee.iva-api.com/Movies/1';\n var ivaUrl = 'https://ee.iva-api.com/Videos/GetVideo/1';\n var dt = new Date();\n dt.setMonth(11);\n var stamp = dt.toISOString();\n ;\n // var ivaUrl = 'https://ee.iva-api.com/ExternalIds/ImdbMovie';\n var query = {\n // Skip: 0,\n // Take: 30,\n Format: 'mp4',\n Expires: stamp,\n format: 'json',\n 'subscription-key': '66319ae0cd76409cb63e30a70eaad1c2'\n };\n $.getJSON(ivaUrl, query, function (resp) {\n // console.log('IVA', resp)\n });\n}", "title": "" }, { "docid": "bdcf9fe84ff37e9b3659e07c0fa7f458", "score": "0.61296386", "text": "function getYouTubeVideoSearchData() {\n var searchTerm = $('#InputYouTubeLink').val();\n\n var request = gapi.client.youtube.search.list({\n type: 'video',\n // videoSyndicated: 'true',\n maxResults: 11,\n q: searchTerm,\n part: 'snippet',\n });\n request.execute(function(response) {\n var str = JSON.stringify(response.result);\n $('#search-raw-data').html('<pre>' + str + '</pre>');\n\n });\n turnYouTubeDataIntoPresentableInformation();\n}", "title": "" }, { "docid": "f12db0c882dcc2b2d7f699bcf199a89d", "score": "0.6125398", "text": "function videoTitle(id){\n $.get(\"https://www.googleapis.com/youtube/v3/videos\", {\n part: 'snippet',\n id: id,\n key: 'AIzaSyD3wRE0k6Q-zGj8-j-yP0tn5KG2kFF0Vok'},\n function(data){\n var vTitle = data.items[0].snippet.title;\n console.log(vTitle);\n // Remove (Official Video) - This could be a little bit better condition :)\n vTitle = vTitle.split('(').shift().split('[').shift().split('official').shift().split('Official').shift();\n document.title = 'Muzikly | ' + vTitle;\n $('.description').text(vTitle);\n }\n );\n}", "title": "" }, { "docid": "3a90ec329dc48620d58f6409ee011703", "score": "0.6123813", "text": "load(data) {\n var _a, _b, _c, _d;\n const videoInfo = BaseVideo.parseRawData(data);\n // Basic information\n this.id = videoInfo.videoDetails.videoId;\n this.title = videoInfo.videoDetails.title;\n this.uploadDate = videoInfo.dateText.simpleText;\n this.viewCount = +videoInfo.videoDetails.viewCount || null;\n this.isLiveContent = videoInfo.videoDetails.isLiveContent;\n this.thumbnails = new _1.Thumbnails().load(videoInfo.videoDetails.thumbnail.thumbnails);\n // Channel\n const { title, thumbnail } = videoInfo.owner.videoOwnerRenderer;\n this.channel = new _1.ChannelCompact({\n client: this.client,\n id: title.runs[0].navigationEndpoint.browseEndpoint.browseId,\n name: title.runs[0].text,\n thumbnails: new _1.Thumbnails().load(thumbnail.thumbnails),\n });\n // Like Count and Dislike Count\n const topLevelButtons = videoInfo.videoActions.menuRenderer.topLevelButtons;\n this.likeCount = common_1.stripToInt(BaseVideo.parseButtonRenderer(topLevelButtons[0]));\n this.dislikeCount = common_1.stripToInt(BaseVideo.parseButtonRenderer(topLevelButtons[1]));\n // Tags and description\n this.tags =\n ((_b = (_a = videoInfo.superTitleLink) === null || _a === void 0 ? void 0 : _a.runs) === null || _b === void 0 ? void 0 : _b.map((r) => r.text.trim()).filter((t) => t)) || [];\n this.description =\n ((_c = videoInfo.description) === null || _c === void 0 ? void 0 : _c.runs.map((d) => d.text).join(\"\")) || \"\";\n // Up Next and related videos\n this.related = [];\n const secondaryContents = data[3].response.contents.twoColumnWatchNextResults.secondaryResults.secondaryResults\n .results;\n if (secondaryContents) {\n const upNext = ((_d = secondaryContents.find((s) => \"compactAutoplayRenderer\" in s)) === null || _d === void 0 ? void 0 : _d.compactAutoplayRenderer.contents[0]) || null;\n this.upNext = upNext ? BaseVideo.parseCompactRenderer(upNext, this.client) : upNext;\n this.related.push(...BaseVideo.parseRelated(secondaryContents, this.client));\n // Related continuation\n this.relatedContinuation = common_1.getContinuationFromItems(secondaryContents);\n }\n else {\n this.upNext = null;\n this.related = [];\n }\n return this;\n }", "title": "" }, { "docid": "49d25e075040a9d801442d2155c4e545", "score": "0.6120306", "text": "function getVideoTitle( video, targetVideoId, callback ) {\n\n var vTitle = '';\n var h1El = document.querySelector('h1');\n var h2El = document.querySelector('h2');\n var h1Text = h1El.textContent.trim();\n var h2Text = h2El.textContent.trim();\n if (h1Text.length > 0) {\n vTitle = h1Text;\n } else if (h2Text.length > 0) {\n vTitle = h2Text;\n } else {\n vTitle = document.location.pathname;\n }\n callback(vTitle);\n }", "title": "" }, { "docid": "fdf6eeb66bbb9eb6a2ae49b7cdf62dfc", "score": "0.6112046", "text": "generateVideoEntry(albumId, name, description, cover_file, file, type) {\n const self = this;\n\n return this.getVideoAlbumInfo(albumId).then(function (response) {\n const albumInfo = response.data;\n const videos = albumInfo.videos;\n const hasNoVideos = !videos || videos.length == 0;\n const id = hasNoVideos ? 1 : videos.length + 1;\n\n return {\n id: id,\n name: name,\n description: description,\n cover_file: self.prefix + \"videoalbum/\" + albumId + \"/\" + cover_file,\n file: self.prefix + \"videoalbum/\" + albumId + \"/\" + file,\n type: type\n };\n });\n }", "title": "" }, { "docid": "3d56fec6f68017e025988b6366aabd82", "score": "0.61093163", "text": "function videoInfo(seriesCallback) {\n seriesCallback(null, {\n videoData: [\"vid1\", \"vid2\", \"vid3\"]\n });\n}", "title": "" }, { "docid": "2e5d7dec87657358fb9747994c709ed1", "score": "0.6109087", "text": "getInitialVideo(id) {\r\n var headers = {\r\n \"Content-Type\": \"application/x-www-form-urlencoded\"\r\n }\r\n var data = `client_id=${extensionField.config.client_id}&client_secret=${extensionField.config.client_secret}&grant_type=client_credentials`;\r\n var url = extensionField.config.oauthUrl\r\n return new Promise((resolve, reject) => {\r\n getData({ url: url, headers: headers, method: 'POST', data: data })\r\n .then(function (data) {\r\n return data;\r\n })\r\n .then(function (data) {\r\n var headers = {\r\n \"Authorization\": `Bearer ${data.access_token}`\r\n }\r\n var url = `${extensionField.config.brightcoveUrl}/${id}`;\r\n getData({ url: url, headers: headers, method: 'GET' })\r\n .then(function (data) {\r\n resolve(data);\r\n\r\n }).catch(function (error) {\r\n loader.hide();\r\n msg.show();\r\n })\r\n })\r\n .catch((err) => {\r\n reject(err);\r\n });\r\n });\r\n }", "title": "" }, { "docid": "e9b03b4c35e487295a4471c6f6990214", "score": "0.6104479", "text": "function getVideos(url, playlist, callback){\n\t\t$.getJSON(url, function(data){\n\t\t\t$.each(data.feed.entry, function(i, item){\n\t\t\t\tvar entry = {};\n\t\t\t\t\n\t\t\t\t//containing playlist\n\t\t\t\tentry.playlist = playlist;\n\t\t\t\t\n\t\t\t\t//id\n\t\t\t\tentry.id = item.media$group.yt$videoid.$t;\n\t\t\t\t\n\t\t\t\t//title\n\t\t\t\tentry.title = item.title.$t;\n\t\t\t\t\n\t\t\t\t//thumbnail\n\t\t\t\tif (item.media$group && item.media$group.media$thumbnail){\n\t\t\t\t\tentry.thumb = item.media$group.media$thumbnail[0].url;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tentry.thumb = \"images/fallback_thumb.jpg\";\n\t\t\t\t}\n\n\t\t\t\t//category of video\n\t\t\t\tif (item.category[1] && item.category[1].term){\n\t\t\t\t\tentry.category = item.category[1].term;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tentry.category = \"-\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//duration in minutes\n\t\t\t\tif (item.media$group && item.media$group.yt$duration){\n\t\t\t\t\tvar seconds = item.media$group.yt$duration.seconds;\n\t\t\t\t\tvar min = Math.floor(seconds / 60); \n\t\t\t\t\tvar remSec = (seconds % 60);\n\t\t\t\t\tif (remSec===0){ \n\t\t\t\t\t\tentry.duration = min + \":00\";\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tentry.duration = min + \":\" + remSec;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tentry.duration = \"-\";\n\t\t\t\t}\n\n\t\t\t\t//number of views\n\t\t\t\tif (item.yt$statistics && item.yt$statistics.viewCount){\n\t\t\t\t\tentry.views = item.yt$statistics.viewCount;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tentry.views = \"-\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//ratings and likes\n\t\t\t\tif (item.yt$rating && item.yt$rating.numLikes){\n\t\t\t\t\tentry.likes = item.yt$rating.numLikes;\n\t\t\t\t\tentry.dislikes = item.yt$rating.numDislikes;\n\t\t\t\t\tentry.average = Math.floor(entry.likes / entry.dislikes);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tentry.likes = \"-\";\n\t\t\t\t\tentry.dislikes = \"-\";\n\t\t\t\t\tentry.average = \"-\";\n\t\t\t\t}\n\n\t\t\t\tcallback(entry);\n\t\t\t});\n\t\t});\n\t}", "title": "" }, { "docid": "13b406ce040505a54f3ca7cbe44d5bbe", "score": "0.6100181", "text": "getCurrentVideoTime()\n {\n return this.videoElement.currentTime;\n }", "title": "" }, { "docid": "5bf5a6b1d6e57cd9caa7f8da90bb1101", "score": "0.6092689", "text": "async function getVideos() {\n const response = await axios.get(`${server}:${port}/list`);\n return response.data;\n}", "title": "" }, { "docid": "21426e676463e5a95050c1356166c8f9", "score": "0.6091703", "text": "function HDYV_ExtractVideoLink(strVideoURL)\r\n{\r\n\tvar strVideoLink = \"\";\r\n\tvar VIDEO_URL_PARAM_NAME=\"v=\";\r\n\tvar nLeftPos = strVideoURL.indexOf(VIDEO_URL_PARAM_NAME);\r\n\tif (nLeftPos >= 0)\r\n\t{\r\n\t\tvar nRightPos = strVideoURL.indexOf('&', nLeftPos+1+VIDEO_URL_PARAM_NAME.length);\r\n\t\tif (nRightPos < 0)\r\n\t\t\tnRightPos = strVideoURL.length;\r\n\t\t\r\n\t\tstrVideoLink = strVideoURL.substring(0, nRightPos);\r\n\t}\r\n\r\n\treturn strVideoLink;\r\n}", "title": "" }, { "docid": "1743722e97e0436206475a371e9082b8", "score": "0.60837406", "text": "function getCurrentVideoStartAndEndTime(videoURL) {\n const videoSplitArr = videoURL && videoURL.split('?');\n const videoStartTime = (videoSplitArr && videoSplitArr.length >= 2) ? videoSplitArr[1].split('=')[1] : '';\n const videoEndTime = (videoSplitArr && videoSplitArr.length >= 3) ? videoSplitArr[2].split('=')[1] : '';\n const videoId = (videoURL && videoURL.length) && videoURL.split('?')[0];\n return {\n videoId: videoId,\n startSeconds: videoStartTime,\n endSeconds: videoEndTime\n };\n}", "title": "" }, { "docid": "68ad1346f38a6a6adb7fa49e2315b9ad", "score": "0.60737437", "text": "function buildVideoResource(video, title) {\n return {\n videoCore: video,\n metadata: {\n path: video.currentSrc,\n title: title\n }\n }\n}", "title": "" }, { "docid": "a60294c317cd65d677cadb04cf2b609e", "score": "0.6059816", "text": "function getVideo(callback, req, res) {\n var service = google.youtube('v3');\n video = req.query.search;\n update_widget(req.query.id_bdd, video);\n service.videos.list({\n key: key.youtube.token,\n part: 'snippet,contentDetails,statistics,status',\n id: video,\n }, function (err, response) {\n if (err) {\n console.log('The API returned an error:widget ' + err);\n return;\n }\n var channels = response.data.items;\n if (channels.length == 0) {\n console.log('No channel found.');\n } else {\n callback(channels[0], req, res)\n }\n });\n}", "title": "" }, { "docid": "7b89a158f8d51ba6dccb434c4bf81cac", "score": "0.6048131", "text": "function searchVideoById(video_ID, callback) {\n if (arguments.length == 1) {\n callback = printToConsole;\n }\n var VIDEOS_URL = YOUTUBE_BASE_URL + 'videos';\n var query = {\n key: 'AIzaSyCtbQ7eOypMc7OKBSGFs46aIL6Ozmmeygw',\n part: 'snippet,contentDetails',\n id: video_ID\n };\n $.getJSON(VIDEOS_URL, query, callback);\n}", "title": "" }, { "docid": "c51aaeceecdbcd8c950b9c87c6e10e62", "score": "0.6045904", "text": "function getYouTubeVideoId(movieTitle, movieID) {\n const searchURL = \"https://www.googleapis.com/youtube/v3/search\";\n const apiKey = \"AIzaSyDew9bnIv-VFtNqJhIj8FGjc2FVx3JK864\";\n const params = {\n key: apiKey,\n q: `${movieTitle} movie trailer`,\n part: \"snippet\",\n maxResults: 1,\n type: \"video\"\n };\n const queryString = formatQueryParams(params);\n const url = searchURL + \"?\" + queryString;\n\n fetch(url)\n .then(response => {\n if (response.ok) {\n return response.json();\n }\n throw new Error(response.statusText);\n })\n .then(responseJson => createYouTubeVidString(responseJson.items, movieID))\n .catch(err => {\n $(\"#js-error-message\").text(`Something went wrong: ${err.message}`);\n });\n}", "title": "" }, { "docid": "c267ee4d8b14945f07dab91fb3a94536", "score": "0.6032596", "text": "function HDYV_ExtractVideoID(strVideoLink)\r\n{\r\n\tvar strGoogleSearchMode = GM_config.read().google_search_mode || \"Youtube Video URL based (more precision)\";\r\n\tif (strGoogleSearchMode == \"Youtube Video URL based (more precision)\")\r\n\t\treturn strVideoLink;\r\n\r\n\tvar strVideoID = \"\";\r\n\tvar VIDEO_URL_PARAM_NAME=\"v=\";\r\n\tvar nLeftPos = strVideoLink.indexOf(VIDEO_URL_PARAM_NAME);\r\n\tif (nLeftPos >= 0)\r\n\t\tstrVideoID = strVideoLink.substring(nLeftPos+VIDEO_URL_PARAM_NAME.length);\r\n\r\n\treturn strVideoID;\r\n}", "title": "" }, { "docid": "42389500bc4073602ddf1d116e21454f", "score": "0.6031862", "text": "get currentVideoData() {\n return this._mapData.get(\"raw\")[this.currentVideoId]\n }", "title": "" }, { "docid": "afc30d11d715389ef18d1e6287cc1e27", "score": "0.6020496", "text": "function renderVideoComponent(video) {\r\n if (!video || !video.assets || !video.assets.thumb_mp4 || !video.assets.thumb_mp4.url) return;\r\n\r\n var wrapper = $('<div class=\"col-xs-12 col-sm-12 col-md-6 col-lg-4\">');\r\n var preview = $('<video width=\"100%\">');\r\n var description = $('<p>');\r\n\r\n $(preview)\r\n .click(fetchDetails)\r\n .attr('id', video.id)\r\n .attr('src', video.assets.thumb_mp4.url)\r\n .attr('controls', true)\r\n .attr('autoplay', true)\r\n .attr('title', video.description);\r\n\r\n $(wrapper)\r\n .addClass('video-wrapper video')\r\n .append(preview)\r\n\r\n return wrapper;\r\n}", "title": "" }, { "docid": "15fd0abd3d7269a6f0809a1dd413211a", "score": "0.6013125", "text": "renderVideo(videoData) {\n const title = videoData.snippet.title;\n const channel = videoData.snippet.channelTitle;\n const description = videoData.snippet.description.length > 50 ? videoData.snippet.description.substring(0, 50) + \"...\" : videoData.snippet.description;\n const imageUrl = videoData.snippet.thumbnails.default.url;\n const tag = videoData.etag;\n\n return (\n <VideoListItem \n onQueueVideo={this.props.onQueueVideo} \n videoData={videoData}\n key={tag}\n title={title} \n channel={channel}\n description={description}\n imageUrl={imageUrl} />\n );\n }", "title": "" }, { "docid": "adce0066a0014771ddb27fe6414ae938", "score": "0.60074157", "text": "function showVideo(id) {\n\n if(media == null || media[id] == null) {\n console.log(\"Variable media was not loaded upon calling showVideos()\");\n return;\n }\n\n // Find the video data box and fill it\n $('#' + descriptionId)\n // Add title\n .html(`<h3 class=\"custom-media-title\">${media[id].title}</h3>\n <a href=\"${media[id].drive}\" class=\"custom-media-link\" target=\"_blank\">\n <span class=\"fa fa-link\" aria-hidden=\"true\"></span>\n </a>`)\n // And the description\n .append(media[id].description);\n\n // Find the thumbnails at the bottom, and on each of them...\n $('#' + thumbnailsId).children().each(function(i) {\n // ... if they're the clicked one, add selected class\n if(i == id){\n $(this).addClass(selectedClass);\n // ... otherwise, remove it\n } else {\n $(this).removeClass(selectedClass);\n }\n });\n\n // Finally, change the source of the shown media to the clicked one\n $('#' + playerId).attr('src', media[id].url);\n\n} // showVideo(id)", "title": "" }, { "docid": "7b6c1ce4d269f3df60347caa2fe95ab1", "score": "0.60037357", "text": "function findVideo() {\n return document.getElementsByTagName('video')[0];\n}", "title": "" }, { "docid": "4a543fe75e8af79c22098fe42387a65d", "score": "0.60013926", "text": "get Video() { return Video }", "title": "" }, { "docid": "09dfd06b28a6465e3d49d8d06f3a2fa1", "score": "0.59883755", "text": "function testChannel() {\n var videos = getVideos ('TefalCZSK')\n Logger.log(videos[0]);\n}", "title": "" }, { "docid": "84f99dc7e052fb9a4bcbc1fa31f48b6e", "score": "0.59842676", "text": "function getLikedVideos() {\n $('#video-container').empty()\n var searchRequest = gapi.client.youtube.videos.list({\n \"part\": \"snippet\",\n \"myRating\": \"like\",\n\n });\n\n searchRequest.execute(function(response) {\n $('#video-container').empty()\n var srchItems = response.result.items; \n var $videoContainer = $('#video-container')\n $.each(srchItems, function(index, item) {\n var vidChannelTitle = item.snippet.channelTitle;\n var vidTitle = item.snippet.title; \n var videoId = item.id;\n var videoImg = item.snippet.thumbnails.default.url; \n\n // make API Video request in order to get duration\n var detailsRequest = gapi.client.youtube.videos.list({\n id: videoId,\n part: 'contentDetails', \n type: 'video',\n maxResults: 5\n })\n\n detailsRequest.execute(function(details) {\n console.log(details);\n var videoDuration = ISO8601toDuration(details.items[0].contentDetails.duration);\n\n // Check index of returned YT ISO8601 time format and trim\n function formatTimeUnit(input, unit){\n var index = input.indexOf(unit);\n var output = \"00\"\n if (index < 0) {\n return output; // unit isn't in the input\n }\n if (isNaN(input.charAt(index-2))) {\n return '0' + input.charAt(index - 1);\n } else {\n return input.charAt(index - 2) + input.charAt(index - 1);\n }\n }\n\n // Convert ISO8601 format to time HH:MM:SS\n function ISO8601toDuration(input){\n var H = formatTimeUnit(input, 'H');\n var M = formatTimeUnit(input, 'M');\n var S = formatTimeUnit(input, 'S');\n if (H == \"00\") {\n H = \"\";\n } else {\n H += \":\"\n }\n \n return H + M + ':' + S ;\n }\n // HTML render for Liked videos\n $videoContainer.append(`\n <tr class=\"vidTable\" value=\"#trackuri\" id=\"${videoId}\">\n <td class=\"album\" value=\"#\">\n <i class=\"fa fa-play-circle fa-3x hidden\" aria-hidden=\"true\"></i>\n <div class=album-holder><img src=\"${videoImg}\"></div>\n </td>\n <td>\n <p class=\"artist-name\">${vidChannelTitle}</p>\n <h5 class=\"song-name\">${vidTitle}</h5>\n </td>\n <td>\n <div class=\"time-holder\">${videoDuration}</div> \n <button class=\"add-button btn btn-primary yt-add-song\">Add</button>\n \n </td>\n </tr>`); \n })\n })\n //$($videoContainer).wrap('<div class=\"scrollable\"></div>')\n })\n}", "title": "" }, { "docid": "01ad2a864fa95312a389cc06d42090f2", "score": "0.5979592", "text": "get baseVideoUrl() {\n return getBaseVideoUrl(this.baseUrl.data);\n }", "title": "" }, { "docid": "f5e453ef789fe00159b867867d961869", "score": "0.5951202", "text": "function getVideoFile(filename, callback) {\n // We get videos directly through the video device storage\n var req = videostorage.get(filename);\n req.onsuccess = function() {\n callback(req.result);\n };\n req.onerror = function() {\n console.error('Failed to get video file', filename);\n };\n}", "title": "" }, { "docid": "38fe15ba4505b4b337f8cc07a1c4c30e", "score": "0.59341353", "text": "function Video(node) {\n this.DHSDK_instance = node\n this.nStreamType = '1' //码流 1:主码流 2:辅码流\n this.CUR_VIDICON_LIST = ['1000016$1$0$10', '1000016$1$0$2', '1000016$1$0$3', '1000016$1$0$4',\n '1000016$1$0$1', '1000016$1$0$5', '1000016$1$0$6', '1000016$1$0$7', '1000016$1$0$8']\n }", "title": "" }, { "docid": "9e211e4791ab4abca2a267f31e353096", "score": "0.59340906", "text": "getVideo(videoResolvable) {\n return __awaiter(this, void 0, void 0, function* () {\n const id = yield services_1.GenericService.getId(this, videoResolvable, entities_1.Video);\n return services_1.GenericService.getItem(this, entities_1.Video, false, id);\n });\n }", "title": "" }, { "docid": "1582791e9ccfa0b77188ea91ff24d98c", "score": "0.59322584", "text": "async getMovieDetails() {\n try {\n const res = await axios(`${process.env.MOVIE_PROXY}https://api.themoviedb.org/3/movie/${this.id}?api_key=${process.env.MOVIE_KEY}&append_to_response=similar`);\n this.backdrop = res.data.backdrop_path;\n this.genres = res.data.genres;\n this.overview = res.data.overview;\n this.rating = res.data.vote_average;\n this.title = res.data.title;\n this.date = res.data.release_date;\n this.similar = res.data.similar;\n } catch (error) {\n alert(error);\n }\n }", "title": "" }, { "docid": "130526ba69a0dd5e2d7f97e40cbf719b", "score": "0.5921323", "text": "function parseYoutubeVideoInfo(response) {\n // Splits parameters in a query string.\n function extractParameters(q) {\n var params = q.split('&');\n var result = {};\n for (var i = 0, n = params.length; i < n; i++) {\n var param = params[i];\n var pos = param.indexOf('=');\n if (pos === -1)\n continue;\n var name = param.substring(0, pos);\n var value = param.substring(pos + 1);\n result[name] = decodeURIComponent(value);\n }\n return result;\n }\n\n var params = extractParameters(response);\n\n // If the request failed, return an object with an error code\n // and an error message\n if (params.status === 'fail') {\n //\n // Hopefully this error message will be properly localized.\n // Do we need to add any parameters to the XMLHttpRequest to\n // specify the language we want?\n //\n // Note that we include fake type and url properties in the returned\n // object. This is because we still need to trigger the video app's\n // view activity handler to display the error message from youtube,\n // and those parameters are required.\n //\n return {\n status: params.status,\n errorcode: params.errorcode,\n reason: (params.reason || '').replace(/\\+/g, ' ')\n };\n }\n\n // Otherwise, the query was successful\n var result = {\n status: params.status\n };\n\n // Now parse the available streams\n var streamsText = params.url_encoded_fmt_stream_map;\n if (!streamsText)\n throw Error('No url_encoded_fmt_stream_map parameter');\n var streams = streamsText.split(',');\n for (var i = 0, n = streams.length; i < n; i++) {\n streams[i] = extractParameters(streams[i]);\n }\n\n // This is the list of youtube video formats, ordered from worst\n // (but playable) to best. These numbers are values used as the\n // itag parameter of each stream description. See\n // https://en.wikipedia.org/wiki/YouTube#Quality_and_codecs\n //\n // XXX\n // Format 18 is H.264, which we can play on the phone, but probably\n // not on desktop. When this code was all in chrome, we used an #ifdef\n // for to enable H.264 for Gonk only. If we still need to do that, then\n // we can modify YoutubeProtocolHandler.js to send an allow_h264 flag\n // along with the url and type and then honor that flag here.\n // The inclusion of H264 might not break b2g desktop anyway; on that\n // platform, viewing youtube seems to launch an external Quicktime\n // viewer or something.\n //\n var formats = [\n '17', // 144p 3GP\n '36', // 240p 3GP\n '43', // 360p WebM\n '18' // 360p H.264\n ];\n\n // Sort the array of stream descriptions in order of format\n // preference, so that the first item is the most preferred one\n streams.sort(function(a, b) {\n var x = a.itag ? formats.indexOf(a.itag) : -1;\n var y = b.itag ? formats.indexOf(b.itag) : -1;\n return y - x;\n });\n\n var bestStream = streams[0];\n\n // If the best stream is a format we don't support give up.\n if (formats.indexOf(bestStream.itag) === -1)\n throw Error('No supported video formats');\n\n result.url = bestStream.url + '&signature=' + (bestStream.sig || '');\n result.type = bestStream.type;\n // Strip codec information off of the mime type\n if (result.type && result.type.indexOf(';') !== -1) {\n result.type = result.type.split(';', 1)[0];\n }\n\n if (params.title) {\n result.title = params.title.replace(/\\+/g, ' ');\n }\n if (params.length_seconds) {\n result.duration = params.length_seconds;\n }\n if (params.thumbnail_url) {\n result.poster = params.thumbnail_url;\n }\n\n return result;\n }", "title": "" }, { "docid": "e52702e4a2be6be3f728ed8d6cdfd347", "score": "0.5914171", "text": "function getVideoData(dataResponse) {\n\n\tvar videoTitleArray = dataResponse.response.titles.title;\n\tvar videoArrayHasPreview = videoTitleArray.filter(function (obj) {\n\t\treturn obj.hasOwnProperty('preview');\n\t});\n\n\tvar TitleWithLongestDuration = _.maxBy(videoArrayHasPreview, function (o) {\n\t\treturn parseFloat(o.preview.duration);\n\t});\n\n\t// Extraneous method to find the longest duration of a preview video. Used to check TitleWithLongestDuration.\n\tvar longestDurationValue = Math.max.apply(Math, videoArrayHasPreview.map(function (o) {\n\t\treturn parseFloat(o.preview.duration);\n\t}));\n\tvar longestDurationNid = TitleWithLongestDuration.preview.nid;\n\tvar longestDuraionFound = parseFloat(TitleWithLongestDuration.preview.duration);\n\tvar durationCorrect = longestDuraionFound === longestDuraionFound ? true : false;\n\n\tconsole.log(\"Duration found with two methods is correct: \", durationCorrect);\n\n\treturn {\n\t\tpreviewNid: longestDurationNid,\n\t\tpreviewDuration: longestDuraionFound\n\t};\n}", "title": "" }, { "docid": "4e626cd22994fd8fe62a8b039ec4d6fe", "score": "0.591292", "text": "function getVideoInfo(html, code) {\r\n let videoObj = {}\r\n let $ = cheerio.load(html);\r\n\r\n let genres = []; // genres\r\n $('.genre').each((index, element) => {\r\n genres.push($(element).text().trim());\r\n });\r\n\r\n let previewthumbs = [];\r\n $('.previewthumbs').children().each((index, element) => {\r\n previewthumbs.push($(element).attr('src').replace('-','jp-'));\r\n });\r\n\r\n let cast = [];\r\n $('.cast').each((index,item) => {\r\n cast.push($(item).text().trim());\r\n })\r\n\r\n let cast_id = [];\r\n $('.cast').each((index,item) => {\r\n cast_id.push($(item).attr('id'));\r\n })\r\n\r\n videoObj = {\r\n title: $('.post-title').children().text().trim() || '',\r\n video_id: $('#video_id').children().children().children().last().text() || '',\r\n video_date: $('#video_date').children().children().children().last().text() || '',\r\n length: $('#video_length').children().children().children().last().text() || '',\r\n director: $('.director').children().text() || '',\r\n director_id: $('.director').attr('id') || '',\r\n maker: $('.maker').children().text() || '',\r\n label: $('.label').children().text() || '',\r\n cast: cast,\r\n cast_id: cast_id,\r\n score: $('.score').text() && $('.score').text().replace('(', '').replace(')', ''),\r\n jacket_img: $('#video_jacket_img').attr('src') || '',\r\n genres: genres,\r\n previewthumbs: previewthumbs,\r\n code: code\r\n }\r\n return videoObj;\r\n}", "title": "" }, { "docid": "a3bdeecde3afd3a0ab92b9b3dcaa9ac5", "score": "0.59053683", "text": "function fetchMovieDetails(title) {\n const detailsUri = OMDB_API_URL + '/?apikey=' + OMDB_API_KEY + '&t=' + title + '&type=movie&plot=full&r=json'\n\n return window.fetch(detailsUri)\n .then(res => {\n return res.json()\n })\n}", "title": "" }, { "docid": "63835dd86248447d8fd390193202b587", "score": "0.58998847", "text": "async function downloadVideoForUser(channelUrl, youtubeLink){\n console.log(channelUrl, youtubeLink)\n\n try {\n\n let isBrighteonDownload = false;\n\n let options;\n if (isBrighteonDownload) {\n options = ['-f bestvideo'];\n } else {\n options = ['-j', '--flat-playlist', '--dump-single-json'];\n }\n\n let info = await youtubeDlInfoAsync(youtubeLink, options);\n\n info = info[0];\n\n delete info.formats;\n\n console.log(info);\n //\n // console.log(info.thumbnails);\n\n const videoData = info;\n\n const height = videoData.height;\n\n const width = videoData.width;\n\n const aspectRatio = height / width;\n\n const title = videoData.title;\n\n const durationInSeconds = videoData._duration_raw;\n\n const fileSize = videoData.size;\n\n // var result = yourstr.replace(/^(?:00:)?0?/, '');\n\n let formattedDuration = videoData._duration_hms;\n\n if(formattedDuration) formattedDuration = formattedDuration.replace(/^(?:00:)?0?/, '');\n\n\n\n // console.log(info);\n\n var lastThumbnail = last(info.thumbnails);\n\n\n const user = 'anthony';\n const downloadLocation = `/uploads/${user}`;\n\n const uploadingUser = await User.findOne({\n channelUrl\n });\n\n console.log(uploadingUser._id + ' here');\n\n const uniqueTag = randomstring.generate(7);\n\n const lastThumbnailUrl = lastThumbnail.url;\n\n var re = /(?:\\.([^.]+))?$/;\n\n var extension = re.exec(lastThumbnailUrl)[1];\n\n\n console.log(aspectRatio, title, durationInSeconds, fileSize, formattedDuration)\n\n // instantiate upload\n // give it status and uploader and it will work\n let upload = new Upload({\n uploader: uploadingUser._id,\n title,\n description : info.description,\n fileType: 'video',\n fileExtension : '.mp4',\n uniqueTag,\n youTubeDLData: info,\n status: 'completed',\n rating: 'allAges',\n category: 'uncategorized',\n dimensions: {\n height,\n width,\n aspectRatio\n },\n formattedDuration,\n fileSize,\n durationInSeconds,\n\n\n // TODO: this is for dev purposes\n uploadServer: 'http://localhost:3000/uploads'\n });\n\n await upload.save();\n\n // // TODO: download thumbnail\n // // this comes back as an extension\n // const downloadResponse = await downloadAndSaveThumbnails(lastThumbnailUrl, uniqueTag, channelUrl, extension);\n //\n // console.log(downloadResponse + ' DOWNLOAD RESPONSE')\n //\n // upload.thumbnails.custom = `${uniqueTag}-custom.${downloadResponse}`;\n //\n // upload.processingCompletedAt = new Date();\n //\n // await upload.save();\n\n\n\n // \"thumbnails\" : {\n // \"custom\" : \"EnQPn7t-custom.jpg\"\n // }\n\n\n const directory = `uploads/${uploadingUser.channelUrl}/${uniqueTag}.mp4`;\n\n let arguments = [];\n\n // set the url for ytdl\n arguments.push(youtubeLink);\n\n // verbose output\n arguments.push('-v');\n\n // arguments.push('-f', 'bestvideo+bestaudio/best');\n\n arguments.push('--add-metadata');\n\n arguments.push('--ffmpeg-location');\n\n arguments.push(ffmpegPath);\n\n arguments.push('--no-mtime');\n\n arguments.push('--ignore-errors');\n\n // select download as audio or video\n\n // download as mp4 if it's youtube (tired of reconverting .flv files)\n const isYouTubeDownload = youtubeLink.match('youtube');\n if(1 == 1){\n console.log('downloading from youtube');\n\n arguments.push('-f');\n\n arguments.push('bestvideo[height<730][ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4][height<730]/best[ext=mp4]');\n }\n\n // arguments.push('best');\n\n const fileExtension = `%(ext)s`;\n\n const filePath = '.';\n\n // let saveToFolder = `${filePath}/%(title)s.${fileExtension}`;\n\n // save to videos directory\n arguments.push('-o', directory);\n\n console.log(arguments);\n\n // deleted for now since it requires ffmpeg\n // download as audio if needed\n // if(downloadAsAudio){\n // console.log('Download as audio');\n // arguments.push('-x');\n // }\n\n console.log(arguments);\n\n const ls = spawn(youtubeBinaryFilePath, arguments);\n\n ls.stdout.on('data', data => {\n\n console.log(`stdout: ${data}`);\n });\n\n ls.stderr.on('data', data => {\n\n console.log(`stderr: ${data}`);\n });\n\n ls.on('close', code => {\n\n console.log(`child process exited with code ${code}`);\n });\n\n\n // console.log(info.formats);\n // console.log('Download started')\n // console.log('filename: ' + info._filename)\n // console.log('size: ' + info.size)\n\n // duration\n // height\n\n // video.pipe(fs.createWriteStream('myvideo.mp4'))\n\n } catch (err){\n console.log(err);\n // console.log(err);\n //\n // console.log(err.stderr + ' stderr')\n }\n\n\n\n\n}", "title": "" }, { "docid": "6a8dfa2a4048d4618bb7f73011d753b2", "score": "0.5897294", "text": "function getCurrentVideo() { \n var current_time = getCurrentTime();\n \n if (database.videos.length > 0 && current_time < database.videos[0].start_time) {\n // hasnt started yet today\n return [-2, null];\n }\n\n for (var i = 0; i < database.videos.length; i++) {\n var video_obj = database.videos[i];\n if (current_time < video_obj.start_time + video_obj.duration) {\n return [i, video_obj];\n }\n }\n\n // has already ended for today\n return [-1, null]\n}", "title": "" }, { "docid": "49cc5ff57b2bc0689328bcea85374c69", "score": "0.5896571", "text": "function getVideoByid(idVideo) {\n //Récupération des donnés Json\n $.getJSON('video.json', function (data) {\n $.each(data.videos, function (i) {\n if (i === idVideo) {\n p = this.path;\n console.log(\"le path que l'on vient de récupérer avec classe : \" + p);\n // Récupération des noms et description des acteurs\n $.each(this.actors, function (j) {\n description[j] = this.description;\n names[j] = this.name;\n });\n console.log(\"contenu de [0] de description : \" + description[0]);\n console.log(\"contenu de [1] de description : \" + description[1]);\n }\n });\n nbActors = names.length;\n return true;\n });\n\n}", "title": "" }, { "docid": "401511810c0e1b5941cefbd621d1d863", "score": "0.5894222", "text": "async function getVideoLinkFromUrl(req, res) {\n try {\n const url = req.body.url;\n // Optional arguments passed to youtube-dl.\n const options = [\"--skip-download\"];\n youtubedl.getInfo(url, options, function(err, info) {\n // info.protocol\n // protocol: https or http == video/mp4\n // protocol: http_dash_segments == application/dash+xml\n // protocol: m3u8 == application/x-mpegURL\n let videoFileFormat, videoUrlLink;\n if (info !== undefined) {\n if (info.protocol == \"https\" || info.protocol == \"http\") {\n videoUrlLink = info.url;\n videoFileFormat = \"video/mp4\";\n } else if (info.protocol == \"m3u8\") {\n videoUrlLink = info.url;\n videoFileFormat = \"application/x-mpegURL\";\n } else if (info.protocol == \"http_dash_segments\") {\n videoUrlLink = info.url;\n videoFileFormat = \"application/dash+xml\";\n } else {\n videoUrlLink = \"not-supported\";\n videoFileFormat = \"not-supported\";\n }\n } else {\n videoUrlLink = \"not-supported\";\n videoFileFormat = \"not-supported\";\n }\n const videoDataFromUrl = {\n input_url_link: url,\n video_url: videoUrlLink,\n video_file_format: videoFileFormat\n };\n if (videoUrlLink !== \"not-supported\" || videoFileFormat !== \"not-supported\") {\n res.json(videoDataFromUrl);\n } else {\n res.json(\"failed-get-video-url-from-provided-url\");\n }\n });\n } catch (e) {\n res.json(\"failed-get-video-url-from-provided-url\");\n }\n}", "title": "" }, { "docid": "2adcc0526af8678362d3379ca9279e68", "score": "0.58846354", "text": "function parseVideo (url) {\n url.match(/(http:|https:|)\\/\\/(player.|www.)?(vimeo\\.com|youtu(be\\.com|\\.be|be\\.googleapis\\.com))\\/(video\\/|embed\\/|watch\\?v=|v\\/)?([A-Za-z0-9._%-]*)(\\&\\S+)?/);\n var type;\n if (RegExp.$3.indexOf('youtu') > -1) {\n type = 'youtube';\n } else if (RegExp.$3.indexOf('vimeo') > -1) {\n type = 'vimeo';\n }\n return {\n type: type,\n id: RegExp.$6\n };\n }", "title": "" }, { "docid": "aece2f2ad72886eec496500834585a0e", "score": "0.5871332", "text": "function Info()\n{\n \tvar vDescription = \"Description: \" + myplayer.getDescription();\n \t\tdocument.getElementById(\"vDescription\").innerHTML = vDescription;\n\tvar vEmbed = \"Asset ID: \" + myplayer.getEmbedCode();\n\t\tdocument.getElementById(\"vEmbed\").innerHTML = vEmbed;\n\tvar vTitle = \"Title: \" + myplayer.getTitle();\n\t\tdocument.getElementById(\"vTitle\").innerHTML = vTitle;\n\tvar vDuration = \"Duration: \" + myplayer.getDuration();\n\t\tdocument.getElementById(\"vDuration\").innerHTML = vDuration;\n}", "title": "" }, { "docid": "4b4a965658da101cf9185e1c588f5025", "score": "0.5865121", "text": "function getDownloadVideoMIMEString(vFormat) {\r\n\tvar vFormatObj = getVideoFormatObj(vFormat);\r\n\treturn (vFormatObj === null) ? \"\" : vFormatObj.MIMEString;\r\n}", "title": "" }, { "docid": "3fe8a4a791efd34d7c53f3e3aba5c7c2", "score": "0.5856233", "text": "function getVideos(movieId, videoContainer, showCloseBtn) {\r\n //generate movie url\r\n const path = `/api/movie/${movieId}/videos`\r\n const url = generateUrl(path);\r\n // fetch movie videos\r\n fetch(url)\r\n .then((res) => res.json())\r\n .then((data) => { createVideoTemplate(data, videoContainer, showCloseBtn) })\r\n .catch((err) => {\r\n console.log(err)\r\n });\r\n}", "title": "" }, { "docid": "49f047927ec8be5c89e7fc736d51be6c", "score": "0.5841544", "text": "function parseVideo(url) {\n url.match(/(http:|https:|)\\/\\/(player.|www.)?(vimeo\\.com|youtu(be\\.com|\\.be|be\\.googleapis\\.com))\\/(video\\/|embed\\/|watch\\?v=|v\\/)?([A-Za-z0-9._%-]*)(\\&\\S+)?/);\n let type;\n if (RegExp.$3.indexOf('youtu') > -1) {\n type = 'youtube';\n } else if (RegExp.$3.indexOf('vimeo') > -1) {\n type = 'vimeo';\n }\n return {\n type: type,\n id: RegExp.$6\n };\n }", "title": "" }, { "docid": "63988e1760f73829feafe61a730157c9", "score": "0.58394897", "text": "function Video(element) {\n // add prototype functions\n for (var name in Video.prototype)\n element[name] = Video.prototype[name];\n\n // find or create main metadata track\n var metadataTracks = filter(element.textTracks, function (t) { return t.kind === 'metadata'; }),\n metadataTrack = metadataTracks[0] || element.addTextTrack('metadata'),\n storedTrack = WebVttDocument.loadFromStorage(element, metadataTrack.label);\n // try to load an edited version of the track from storage\n storedTrack && element.addEventListener('loadedmetadata', function () {\n while (metadataTrack.cues.length !== 0)\n metadataTrack.removeCue(metadataTrack.cues[0]);\n storedTrack.cues.forEach(function (cue) { metadataTrack.addCue(cue); });\n });\n // listen to cue changes\n metadataTrack.mode = 'hidden';\n metadataTrack.addEventListener('cuechange', function () { element.activateCues(this.activeCues); });\n element.metadataTrack = metadataTrack;\n\n return element;\n }", "title": "" }, { "docid": "5998bdfaa3b59c1d80cc577ed7988258", "score": "0.5834989", "text": "function getVideo(videoId, callback) {\n pool.connect().then((pool) => {\n pool.request()\n .input('videoId', sql.VarChar, videoId)\n .query('SELECT * FROM [dbo].[videos] AS video INNER JOIN [dbo].[channels] AS channel ON video.author=channel.channelId WHERE videoId=@videoId')\n .then(res => {\n if (res.recordset.length > 0) {\n return callback(res.recordset[0])\n } else {\n return callback(false)\n }\n })\n .catch(err => {\n console.error(err)\n return callback(err)\n })\n })\n}", "title": "" }, { "docid": "3964a221e5d523a6bc78cbb7a8d799b4", "score": "0.58335406", "text": "function loadVideo( target, couid, id ) {\n\n\tvar mimetype = '';\n\tvar url = '';\n\tvar preview = '';\n\tfor (i in seriesRecBuf[couid]) {\n\t\tif (seriesRecBuf[couid][i].id == id) {\n\t\t\tformat = seriesRecBuf[couid][i].format.replace( /[\\W_]/g, '' );\n\t\t\turl = seriesRecBuf[couid][i].url;\n\t\t\tpreview = seriesRecBuf[couid][i].preview;\n\t\t}\n\t}\n\n\tif (!url)\n\t\treturn;\n\n\t$( target ).html( playerPlugin[ format ]( 'seriesDetails', url, preview ) );\n\n}", "title": "" }, { "docid": "23da33716fc8acd5a3d24871dff6767a", "score": "0.5830871", "text": "getResultVideoGet(queryParams, headerParams, pathParams) {\n const queryParamsMapped = {};\n const headerParamsMapped = {};\n const pathParamsMapped = {};\n Object.assign(queryParamsMapped, convertParamsToRealParams(queryParams, GetResultVideoGetQueryParametersNameMap));\n Object.assign(headerParamsMapped, convertParamsToRealParams(headerParams, GetResultVideoGetHeaderParametersNameMap));\n Object.assign(pathParamsMapped, convertParamsToRealParams(pathParams, GetResultVideoGetPathParametersNameMap));\n return this.makeRequest('/operations/{oid}/content', 'get', queryParamsMapped, headerParamsMapped, pathParamsMapped);\n }", "title": "" }, { "docid": "1d0acb015384c1d247234108c24f2a6d", "score": "0.58293253", "text": "function getVideos() {\n\n\tif (listVideos('list')) {\n\t\tvar ids = listVideos('list');\n\t\tconsole.log('videos skipped: ' + ids);\n\n\n\t\tgapi.client.load('youtube', 'v3', function () {\n\t\t\tvar request = gapi.client.youtube.videos.list({\n\t\t\t\tpart: 'snippet',\n\t\t\t\tid: ids,\n\t\t\t\tkey: 'AIzaSyDeAikv_mXaHKvVWc6JG-hqKHZnSMiGfpo'\n\t\t\t});\n\t\t\trequest.execute(function (response) {\n\n\t\t\t\tvar template = $('#listTemplate').html();\n\t\t\t\tvar html = Mustache.to_html(template, response);\n\t\t\t\t$('.videoList').html(html);\n\n\t\t\t\t// console.log(response.result);\n\t\t\t});\n\t\t});\n\n\n\n\t} else {\n\t\t$('.endMessage').html('Thank you for Watching!');\n\t}\n\n\n\n}", "title": "" }, { "docid": "abb8f4a1762d85fc1c2f7aa120a5b80f", "score": "0.5826704", "text": "function getVideos(item) {\n const videoId = item.id.videoId;\n const videoTitle = item.snippet.title;\n const videoDescription = item.snippet.description;\n return (videos = `<div class='container'><li class='video'>\n <iframe class='vid' src='http://www.youtube.com/embed/${videoId}'></iframe></<iframe>\n <h3 class='videoTitle'>${videoTitle}</h3>\n <p class='description'>${videoDescription}</p>\n </li></div>`);\n }", "title": "" }, { "docid": "519dab3e43202ef1a5d0882a536413f5", "score": "0.5808106", "text": "function getVideo(url) {\n\t\t\t$.getScript(oEmbedEndpoint + '?url=' + url + '&maxwidth&maxheight&callback=' + oEmbedCallback);\n\t\t}", "title": "" }, { "docid": "300ab2e860e6449b823d48edcf0cbd74", "score": "0.5806422", "text": "_getVideo(req, res, next){\n if (!req.params.id) {\n var err = new Error();\n err.status = 422;\n err.message = 'video Id is empty!';\n return next(err);\n }\n\n Video.findById(req.params.id, function (err, video) {\n if (err) return next(err);\n\n if (!video) {\n let error = new Error();\n error.message = 'not found';\n error.status = 401;\n return next(error);\n }\n\n res.send(video);\n });\n }", "title": "" }, { "docid": "5e135bfef89f0b859bb78e8bf7199510", "score": "0.5802341", "text": "function getReleaseInformation(id, callback) {\n fetcher.db.getRelease(id, function (err, data) {\n try {\n current = {\n \"id\": data.id,\n \"artist\": data.artists[0].name,\n \"title\": data.title,\n \"year\": data.year,\n \"format\": data.formats[0].name,\n \"imgurl\": data.images[0].resource_url\n };\n util.trackListTohhmmss(data.tracklist, function (duration) {\n current.duration = duration;\n loadImage(callback);\n });\n } catch (err) {\n console.log(\"An error occurred: \");\n console.log(\"data: \" + data);\n console.log(\"err: \" + err);\n }\n });\n}", "title": "" }, { "docid": "a7d42cdb7e000ab6b0d2047f63ab8f30", "score": "0.5798276", "text": "function getVideoTitle(){\n\tvar videoTitle = $(\"#watch-headline-title h1.watch-title-container span.watch-title\").text();\n\treturn videoTitle.toLowerCase();\n}", "title": "" }, { "docid": "bb463eda25a88aec16a7dc6a5493ee31", "score": "0.5786145", "text": "function getVideos(req, res){\n \n Video.find(function(err,videos){\n \n if(err){\n res.status(500).send({message: 'Error en la peticion'});\n \n \n }else{\n res.status(200);\n res.json(videos);\n }\n });\n \n }", "title": "" }, { "docid": "b9e69ad6829c7d5623f1d3e2a98946b0", "score": "0.577087", "text": "function _videoName() {\r\n var inlineVideoId = '',\r\n inlineVideoArray = [],\r\n $inlineVideo = $('.video__background-video'),\r\n videoCount = $inlineVideo.length;\r\n if (videoCount) {\r\n $inlineVideo.each(function(index, item) {\r\n var videoName = $(item).find('source').attr('src').replace(/^.*[/\\/]/, '');\r\n if (videoCount === 1) {\r\n inlineVideoId = videoName;\r\n return false;\r\n } else {\r\n inlineVideoArray.push(videoName);\r\n inlineVideoId = inlineVideoArray.join('|');\r\n }\r\n });\r\n\r\n }\r\n _video({'videoId': inlineVideoId });\r\n }", "title": "" }, { "docid": "ded8abf3b272e5745511ca824854919a", "score": "0.57706785", "text": "async _getVideos(roomId) {\n // get videos of room\n const responseVideos = await videoFunctionByRoomId(\n \"/selectVideosByRoomId\",\n roomId\n );\n return responseVideos;\n }", "title": "" }, { "docid": "bb193cbd1204b5207fac8cbde07402fe", "score": "0.57646435", "text": "getVideos_id(){\n return this.videos_id;\n }", "title": "" }, { "docid": "6ad10191b66e47a79a2dac61f0962651", "score": "0.5763527", "text": "function getLatestVideo(callback, req, res) {\n var service = google.youtube('v3');\n\n channel = req.query.search;\n update_widget(req.query.id_bdd, channel);\n service.search.list({\n key: key.youtube.token,\n part: 'snippet',\n channelId: channel,\n maxResults : \"10\",\n order: \"date\",\n type: \"video\"\n }, function (err, response) {\n if (err) {\n console.log('The API returned an error:widget ' + err);\n return;\n }\n var videos = response.data.items;\n if (videos.length == 0) {\n console.log('No channel found.');\n } else {\n callback(videos, req, res)\n }\n });\n}", "title": "" }, { "docid": "22508a9fb8a0aa47e741c6eb854cefdf", "score": "0.57593733", "text": "async componentDidMount() {\n try {\n const response = await fetch(\"http://localhost:4000/videos\");\n const data = await response.json();\n this.setState({ videos: [...data] });\n } catch (error) {\n console.log(\"error\");\n }\n // makes a request to an endpoint (http://localhost:4000/videos), which will return an array of video metadata. This metadata will be represented as array of objects, where each object looks like:\n // {\n // id: 0,\n // poster: '/video/0/poster',\n // duration: '3 mins',\n // name: 'Sample 1'\n // }\n }", "title": "" }, { "docid": "184865c3f2297466c55f358178f40fbd", "score": "0.5758488", "text": "function getMediaData(callback) {\n var httpRequest = new XMLHttpRequest(),\n responseData,\n parsedData,\n requestURL =\n \"https://edge.api.brightcove.com/playback/v1/accounts/\" +\n account_id +\n \"/playlists/\" +\n playlist_id +\n \"?limit=100\";\n // response handler\n getResponse = function() {\n try {\n if (httpRequest.readyState === 4) {\n if (httpRequest.status >= 200 && httpRequest.status < 300) {\n responseData = httpRequest.responseText;\n parsedData = JSON.parse(responseData);\n videoData = parsedData.videos;\n feedname = parsedData.name;\n if (mrssOutput) {\n callback();\n } else {\n callback();\n }\n } else {\n alert(\n \"There was a problem with the request. Request returned \" +\n httpRequest.status\n );\n }\n }\n } catch (e) {\n alert(\"Caught Exception: \" + e);\n }\n };\n // set response handler\n httpRequest.onreadystatechange = getResponse;\n // open the request\n httpRequest.open(\"GET\", requestURL);\n // set headers\n httpRequest.setRequestHeader(\"Accept\", \"application/json;pk=\" + policyKey);\n // open and send request\n httpRequest.send();\n }", "title": "" }, { "docid": "751d9447b21b41903afd32d3dea2161c", "score": "0.5756136", "text": "onVideoTitleClick(video) {\n console.log(video);\n // event.target.textContent gives title\n this.setState({\n currentVideo: video\n });\n }", "title": "" }, { "docid": "f0936a69d0cd7f91da448b077ac8e8e0", "score": "0.5753214", "text": "function extractVideoID(url) {\n\t\t\tvar youtube_id;\n\t\t\tyoutube_id = url.replace(/^[^v]+v.(.{11}).*/, \"$1\");\n\t\t\treturn youtube_id;\n\t\t}", "title": "" }, { "docid": "e4f6884ce6b27cdda02845c9a0c19c9f", "score": "0.5747197", "text": "function search_youtube (query, callback) {\n var searchParams = {\n part: 'snippet',\n type: 'video',\n q: query,\n maxResults: 50,\n order: 'date',\n safeSearch: 'moderate',\n videoEmbeddable: true\n };\n\n youtube.search.list (searchParams, function (err, res) {\n if (err) {\n callback (err);\n return;\n }\n\n res.items.forEach (function (result) {\n var video = {\n id: result.id.videoId,\n urlShort: 'https://youtu.be/' + result.id.videoId,\n urlLong: 'https://www.youtube.com/watch?v=' + result.id.videoId,\n published: result.snippet.publishedAt,\n title: result.snippet.title || '',\n description: result.snippet.description || '',\n images: result.snippet.thumbnails,\n channelTitle: result.snippet.channelTitle,\n channelId: result.snippet.channelId,\n live: result.snippet.liveBroadcastContent || ''\n };\n\n // When you don't need `duration` and `definition` you can skip the section\n // below to save API credits, but don't forget the `callback (null, video);`\n var listParams = {\n part: 'contentDetails',\n id: video.id\n };\n\n youtube.videos.list (listParams, function (err2, data) {\n if (err2) {\n callback (err2);\n return;\n }\n\n if (data.items.length) {\n data.items[0].contentDetails.duration.replace (/PT(\\d+)M(\\d+)S/, function (t, m, s) {\n video.duration = (parseInt (m, 10) * 60) + parseInt (s, 10);\n });\n\n video.definition = data.items[0].contentDetails.definition;\n callback (null, video);\n }\n });\n });\n });\n}", "title": "" } ]
5c38eccdadd9eb152468e3343e89c9b1
Function for retrieving data
[ { "docid": "55b82de3e63e9c214417a52125ae899f", "score": "0.0", "text": "function showMovieData() {\n getAjaxData(\n \"https://gist.githubusercontent.com/pankaj28843/08f397fcea7c760a99206bcb0ae8d0a4/raw/02d8bc9ec9a73e463b13c44df77a87255def5ab9/movies.json\"\n )\n .then(data => {\n handleData(data);\n })\n .catch(error => {\n message.innerHTML = error;\n });\n }", "title": "" } ]
[ { "docid": "8856f12656a76fed3ecb65aeeac54eca", "score": "0.73744476", "text": "getData(){}", "title": "" }, { "docid": "febd0b84794db16f3a4cd0d1d248e0b0", "score": "0.71096563", "text": "function getAllData() {\n return db.get('data').value();\n}", "title": "" }, { "docid": "c375d4708e6468149074b3ad52c2ba75", "score": "0.70329976", "text": "function retriveData() {\n jqueryNoConflict.getJSON(dataSource, createArrayFrom);\n }", "title": "" }, { "docid": "55c7f28b08471b20a08f620336c9adeb", "score": "0.699676", "text": "getData() {}", "title": "" }, { "docid": "90ff0a1f42857bb20b06a9cc4bb45e3e", "score": "0.6916133", "text": "function retrieveData(data){\n\tvar objects = data.val();\n\tif (objects !== 'undefined' && objects !== null) {\n\t\tvar keys = Object.keys(objects);\n\t\t//clear the list, for not getting repeated values\n\t\tol.innerHTML = \"\";\t\n\t\tfor(var i = 0; i < keys.length; i++) {\n\t\tvar aux = keys[i];\n\t\tvar rData1 = objects[aux].data1;\n\t\tvar rData3 = objects[aux].data3;\n\t\tvar rData2 = objects[aux].data2;\n\t\tvar rId = objects[aux].id;\n\t\tgenerateList(rData1, rData3, rData2, rId);\t\t\t\n\t}\n\t}else{\n\t\tol.innerHTML = \"\";\t\n\t\tconsole.log(\"Vazio\");\n\t}\n}", "title": "" }, { "docid": "e49d246be8e2cd15bdacfd78b8977794", "score": "0.6898885", "text": "function getData(){\r\n var loadedData=loadData();\r\n return loadedData;}", "title": "" }, { "docid": "1f61fca2e8f32e6cb9cde002cc0d544d", "score": "0.67733747", "text": "function showData(){\n console.log('result') \n\n var transaction = db.transaction([StoreName],'readwrite')\n var objectStore = transaction.objectStore(StoreName)\n var request = objectStore.getAll()\n //var result = request.result[0].data\n request.onsuccess=function(){\n var result = request.result[0].data\n console.log('Read data has been successfully')\n renderData(result)\n //\n console.log(request.result[0].data)\n //\n // window.location.reload();\n }\n request.onerror=function(error){\n console.log('some error occur during Read data! '+error)\n }\n \n \n\n }", "title": "" }, { "docid": "7a32e59b9648836315dae98bf6abf4d6", "score": "0.6741062", "text": "function getData(){\r\n var loadedData = loadData();\r\n return loadedData;\r\n}", "title": "" }, { "docid": "d502a30f3ba7134ef0a3593c4bc213f6", "score": "0.6738572", "text": "function get() {\n return data;\n}", "title": "" }, { "docid": "e01176e349e1e87acbf99fc45a3fa81e", "score": "0.6695218", "text": "async retrieve_info() { }", "title": "" }, { "docid": "c919abaa1b97ba2cb96a3be691b071ef", "score": "0.66417146", "text": "function getAll(){\n return data;\n }", "title": "" }, { "docid": "44e9e967ae9b5a7da577816fedf84567", "score": "0.66406137", "text": "function getDataFunc() {\r\n\r\n\t\tgetData(searchurl, media);\r\n\r\n\t}", "title": "" }, { "docid": "66fe60e0a1f675f24eb100b2156801c2", "score": "0.6592147", "text": "function accessesingData1() {\n\n}", "title": "" }, { "docid": "165490e7a43da95931af76038ace618c", "score": "0.65787894", "text": "function loadData() {\n \n Channel = new RemObjects.SDK.HTTPClientChannel(\"http://192.168.1.8:8095/JSON\");\n Message = new RemObjects.SDK.JSONMessage();\n Database = new DatabaseService(Channel, Message);\n Scales = new ScaleService(Channel, Message);\n Printer = new PrintService(Channel, Message);\n\t\n \n Database.GetData(\"MillerFarms.sdf\", \"SELECT * FROM [Ticket] WHERE [Completed] = 0\",\n\t\tfunction(result) \n\t\t{\t\n $scope.OpenTickets = JSON.parse(result);\n\t\t},\n\t\tfunction(msg) { alert(msg.getErrorMessage()); }\n\t\t)\n \n Database.GetData(\"MillerFarms.sdf\", \"SELECT * FROM [Commodity]\",\n\t\tfunction(result) \n\t\t{\t\n $scope.Commodities = JSON.parse(result);\n\t\t},\n\t\tfunction(msg) { alert(msg.getErrorMessage()); }\n\t\t);\n \n Database.GetData(\"MillerFarms.sdf\", \"SELECT * FROM [Farm]\",\n\t\tfunction(result) \n\t\t{\t\n $scope.Farms = JSON.parse(result);\n\t\t},\n\t\tfunction(msg) { alert(msg.getErrorMessage()); }\n\t\t);\n\n Database.GetData(\"MillerFarms.sdf\", \"SELECT * FROM [Field]\",\n\t\tfunction(result) \n\t\t{\t\n $scope.Fields = JSON.parse(result);\n\t\t},\n\t\tfunction(msg) { alert(msg.getErrorMessage()); }\n\t\t);\n\n Database.GetData(\"MillerFarms.sdf\", \"SELECT * FROM [Truck]\",\n\t\tfunction(result) \n\t\t{\t\n $scope.Trucks = JSON.parse(result);\n\t\t},\n\t\tfunction(msg) { alert(msg.getErrorMessage()); }\n\t\t); \n \n }", "title": "" }, { "docid": "c63fa7c272b1f32e85845707e296676f", "score": "0.65769106", "text": "function gettingRecordsData() {\n\treturn gettingRecordsDataForCheckin();\n}", "title": "" }, { "docid": "c63fa7c272b1f32e85845707e296676f", "score": "0.65769106", "text": "function gettingRecordsData() {\n\treturn gettingRecordsDataForCheckin();\n}", "title": "" }, { "docid": "6244afe876e6cae8c0d5a8229cdc552c", "score": "0.65711915", "text": "function retrieveData(alias)\n {\n // console.log(\"Retrieve data, MYTIMER: \", mytimer ); \n if(alias === undefined)\n {\n alias = StorageFactory.getCurrentKey();\n }\n // console.log(\"alias\", alias);\n\n if(StorageFactory.getGetter(alias.title)() === undefined)\n {\n $timeout(function() \n {\n // console.log(\"waiting for StorageFactory to settle...\", Date.now());\n var thekey = StorageFactory.getGetter(alias.title)();\n // console.log(\"retrieving data , setting the document value...\", StorageFactory.getGetter(thekey)());\n thedocument.setValue(StorageFactory.getGetter(thekey)());\n }, 50);\n }\n else\n {\n var thekey = StorageFactory.getGetter(alias.title)();\n //console.log(\"retrieving data and setting the document value...\", StorageFactory.getGetter(thekey)());\n thedocument.setValue(StorageFactory.getGetter(thekey)());\n }\n if(mytimer === 0 )\n {\n // console.log(\"restarting timer...\");\n saveInSlot();\n }\n }", "title": "" }, { "docid": "7c5d0d8904129e944395cdd486ce0c55", "score": "0.65484846", "text": "function getData() {\n getJSON(url, param, function(json, status) {\n localStorage[key] = JSON.stringify(json);\n localStorage[key + \":date\"] = new Date;\n\n // If this is a follow-up request, create an object\n // containing both the original time of the cached\n // data and the time that the data was originally\n // retrieved from the cache. With this information,\n // users of jQuery Offline can provide the user\n // with improved feedback if the lag is large\n var data = text && { cachedAt: date, retrievedAt: retrieveDate };\n fn(json, status, data);\n });\n }", "title": "" }, { "docid": "d1f4df1562dbb1dd50295cc6862393b5", "score": "0.6532924", "text": "getAll() {\n\t\treturn _data;\n\t}", "title": "" }, { "docid": "5ffee8b015f3a013f9c382f25e48024d", "score": "0.6530189", "text": "async getData() {\n const get_response = await API.get('dynamoAPI', '/items/' + this.user_id);\n return get_response;\n }", "title": "" }, { "docid": "9a08f937a2d12e9dd260c35817e7b0c5", "score": "0.65253246", "text": "function getdbData() { \n var HttpClient = function() {\n this.get = function(aUrl, aCallback) {\n var anHttpRequest = new XMLHttpRequest();\n anHttpRequest.onreadystatechange = function() { \n if (anHttpRequest.readyState == 4 && anHttpRequest.status == 200)\n aCallback(anHttpRequest.responseText);\n } \n anHttpRequest.open( \"GET\", aUrl, true ); \n anHttpRequest.send( null );\n }\n }\n \n //using HttpClient to get data\n var client = new HttpClient();\n client.get('https://mattfraserlong.glitch.me/api/space-invader', function(response) {\n scores.innerHTML = (response);\n });\n }", "title": "" }, { "docid": "746e9323eac2e11e2ada8ba6a1bec913", "score": "0.6498148", "text": "function getData() {\n const apiName = 'daily-journal';\n const path = `/entries/${entryId}`;\n return API.get(apiName, path);\n }", "title": "" }, { "docid": "3f22585088cab8840d2f3129f792fa4c", "score": "0.64973766", "text": "function getDataFromServer() {\n console.log(\"getData()\"); // display a debug message\n\n // request the data from the database\n const requestMsg = new XMLHttpRequest();\n requestMsg.addEventListener(\"load\", displayData); // attach a listener\n requestMsg.open('get', '/getData'); // open a HTTP GET request\n requestMsg.send();\n}", "title": "" }, { "docid": "4c5feec402dfa4459aeefa3200abcb12", "score": "0.6491803", "text": "function getData(dataType, dataID){\r\n var data = {};\r\n var location = \"/\" + dataType + \"/\" + dataID;\r\n var dataRef = database.ref(location);\r\n dataRef.on('value', function(snapshot) {\r\n snapshot.forEach(function(childSnapshot) {\r\n data[childSnapshot.key] = childSnapshot.val();\r\n });\r\n });\r\n return data;\r\n}", "title": "" }, { "docid": "a92e7a566c0693bfee0f0aa764c85102", "score": "0.64909494", "text": "function accessesingData2() {\n\n}", "title": "" }, { "docid": "249ceb0795031eba7f8e8d040e5f8c03", "score": "0.6486941", "text": "getData() {\r\n try {\r\n return dxp.api(this.apiUrl);\r\n }\r\n catch (e) {\r\n dxp.log.error(this.element.tagName, 'getData()', `fetch failed for`, e);\r\n }\r\n }", "title": "" }, { "docid": "e2f8999c859f12532b69bba320dc2578", "score": "0.6481139", "text": "function getItemData(){\n\t\treturn $.ajax({\n\t\t\tdatatype:'JSON',\n\t\t\ttype:'GET',\n\t\t\turl: document.URL\n\t\t});\n\t}", "title": "" }, { "docid": "ddfdd900d12f64c28917e6f7561abaed", "score": "0.6470391", "text": "function retrieveObservation() {\n var observCode = d3.select(\"#observationNumber\").node().value;\n var serviceCall = \"service/retrieve_observation/\"+observCode\n d3.json(serviceCall, function (error, table) {\n console.log('query:',serviceCall)\n console.log('retrieved:',table,\"\\n\");\n updateTextDescription(table['metadata'])\n loadObservationTableDisplay(table['observations']);\n initializeBehaviorSource();\n initializeBehaviorTarget();\n initializeInteractionBehaviors();\n // save current obs data globally for use when writing interactions\n CurrrentObservationMetadata = table['metadata']\n // put in the date from the API instead of the text date from the webpage\n CurrrentObservationMetadata['date'] = table['observations'][0]['obsDate']\n\n });\n // there may be some interactions already loaded for this observation number\n retrieveInteractions();\n}", "title": "" }, { "docid": "2a954cc1a9f60dc9cbcb4d788221f2c0", "score": "0.64647835", "text": "function fetchData() {\n\n API.getJournal(userId)\n .then(res => {\n setEntries(res.data)\n }\n )\n .catch(err => console.log(err))\n }", "title": "" }, { "docid": "a7e10963499096857d82c8c584067f04", "score": "0.6440733", "text": "function GetAPIData()\n{\n\n}", "title": "" }, { "docid": "3c15fa62b897614876276727a93e10ae", "score": "0.64379627", "text": "function fetchStudentDetailsFromDB() {\n \n }", "title": "" }, { "docid": "abec70a72e77dad56f5709e53839152d", "score": "0.64204115", "text": "function getRecords() {\n\t\tvar email = $(\"#mySidebar > div.w3-container.w3-padding-24 > div > b\").html();\n\t\tconsole.log(email);\n\t\t\n\t\t$.get(\"/restEJB/numbers/email/\" + email, function(data){\n\t\t\tloadTable(data);\n\t\t});\n\t}", "title": "" }, { "docid": "949c653017bbdceb4f0eaaa9a2c4f7db", "score": "0.64193475", "text": "function readFromDatabase() {}", "title": "" }, { "docid": "66892436f609d865d76624827f2fdb87", "score": "0.6394808", "text": "getRetrieveDataContentByGet() {\n\t \treturn this.retrieveDataContentByGet;\n\t }", "title": "" }, { "docid": "c53f9d45c00fd41e107e24d9afca36bb", "score": "0.6387321", "text": "function queryData(dataType){\n if(dataType === \"listings\")\n return listings;\n}", "title": "" }, { "docid": "f77d07796ad1cf6ce6804e31b290792c", "score": "0.6371455", "text": "getData() {\n this.criteria.skip = this.page * this.limit - this.limit;\n this.criteria.limit = this.limit;\n\n this.resource.find(this.criteria, true).then(result => {\n this.data = result;\n }).catch(error => {\n logger.error('Something went wrong.', error);\n });\n }", "title": "" }, { "docid": "b4e81d199bacde29546c66dbd10d676d", "score": "0.6371305", "text": "function readData() {\n\t\t\t\tconsole.log(\"Procesando SELECT...\");\n\t\t\t\t$http.get($queryRuta.urlProfile)\n\t\t\t\t\t.success(function(data){\n\t\t\t\t\t\tconsole.log(\"N° registros de Profile:\", data.profiles.length);\n\t\t\t\t\t\t$scope.profileGeneral = data.profiles;\n\t\t\t\t\t})\n\t\t\t\t\t.error(function(data, status) {\n\t\t\t\t\t\tconsole.log(status);\n\t\t\t\t\t\tresponseData(data);\n\t\t\t\t\t});\n\t\t\t}", "title": "" }, { "docid": "71e917bd630ec93870ee433b1f39b827", "score": "0.63692605", "text": "function getData() {\n return _getData.apply(this, arguments);\n}", "title": "" }, { "docid": "48ea05078dfb3355262468ed9c2a15f2", "score": "0.63690966", "text": "function getData(callback) {\n\n $http({\n method: 'GET',\n url: '/books/',\n cache: true\n }).success(callback);\n }", "title": "" }, { "docid": "46f7cc3575c7695fc99c1fe184cadcff", "score": "0.6262552", "text": "function GetAllItems() {\n try {\n \n var data = {};\n var ds = {};\n ds = GetDataFromServer(\"Item/GetAllItems/\", data);\n \n if (ds != '') {\n ds = JSON.parse(ds);\n }\n if (ds.Result == \"OK\") {\n \n return ds.Records;\n }\n if (ds.Result == \"ERROR\") {\n alert(ds.Message);\n }\n }\n catch (e) {\n notyAlert('error', e.message);\n }\n}", "title": "" }, { "docid": "78faa4fbc9b1e34daecaeadd39be8087", "score": "0.6262428", "text": "async getData () {\n console.log(`Getting data at ${this.getTimeStamp()}`);\n // NOT the data directly, get current snapshot of all data to process locally\n //const snapshot = await this.dataRef.once('value');\n const snapshot = await (await DB.ref(`data/users`).get()).toJSON();\n console.log(snapshot);\n // return actual data held within snapshot (also has convenience functions like forEach to process the data)\n return snapshot; //.val();\n // note could catch possible errors here, but should be caught be \"general\" error middleware\n }", "title": "" }, { "docid": "92fc9b785e0c8f96b34587b82f7ec748", "score": "0.6252823", "text": "async function retrieveData() {\r\n return Services.getEvents(date)\r\n .then((response) => {\r\n const events = response.data\r\n return {notices: events[\"notices\"], lessons: events[\"lessons\"][\"value\"], officehours: events[\"officehours\"][\"value\"]}\r\n })\r\n .catch((error) => {\r\n console.log(error)\r\n return {notices: [], lessons: [], officehours: []}\r\n })\r\n }", "title": "" }, { "docid": "1b9616326564c7d32ed4010c94293007", "score": "0.6200763", "text": "function retrieveInteractions() {\n var observCode = d3.select(\"#observationNumber\").node().value;\n var serviceCall = \"service/retrieve_interactions/\"+observCode\n d3.json(serviceCall, function (error, table) {\n console.log('interact query:',serviceCall)\n console.log('interact retrieved:',table,\"\\n\");\n loadInteractionTableDisplay(table.data);\n });\n\n}", "title": "" }, { "docid": "a130e64d9000420b73e5d96265191e5b", "score": "0.61985034", "text": "retrieveMetadata () {}", "title": "" }, { "docid": "f0723e5a0b59800b313eb6531bdd030a", "score": "0.6196761", "text": "function retrieve(url){\n var storage = document.getElementById(\"storage\");\n var xhr = createXHR();\n xhr.onreadystatechange=function()\n {\n if(xhr.readyState == 4)\n {\n if(xhr.status == 200)\n {\n var content = xhr.responseXML;\n var lesFlux=dataFromXML(content);\n DATAS=lesFlux;\n //descriptionConsole(lesFlux);\n //display(lesFlux, storage);\n }\n }\n };\n\n if(AjaxCaching == false)\n url = url + \"?nocache=\" + Math.random();\n xhr.open(\"GET\", url , false);\n xhr.send(null);\n}", "title": "" }, { "docid": "78899946f37cbd6690b6b32c95defa5f", "score": "0.6195376", "text": "function retrieve () {\n if ($scope.grouping === 'testData') {\n $meteor.call('getTestParameters', [$scope.code]).then(\n (data) => {\n $scope.gridOptions.data = data;\n }\n );\n } else if ($scope.grouping === 'sensitivityCharts') {\n $meteor.call('getSensitivityData', $scope.code).then(\n (data) => {\n initSensitivityCharts(data);\n }\n );\n } else {\n findTransceiver($scope.code);\n }\n $scope.tr = '';\n }", "title": "" }, { "docid": "9943fba6af301e8e8487230e53cfa518", "score": "0.61923146", "text": "function getData() {\n return this.data;\n }", "title": "" }, { "docid": "2c5431fc31a49041c1c48efcb8665b1e", "score": "0.61880887", "text": "function getDetail() {\n\t\t\tvar getReq = Titanium.Network.createHTTPClient();\n\t\t\tif(Ti.App.localonline === \"local\") {\n\t\t\t\tgetReq.open(\"GET\", \"http://localhost/SmartScan/get_accountDetail.php\");\n\t\t\t} else {\n\t\t\t\tgetReq.open(\"GET\", \"http://sofiehendrickx.eu/SmartScan/get_accountDetail.php\");\n\t\t\t}\n\t\t\tvar params = {\n\t\t\t\tid : Titanium.App.userId\n\t\t\t};\n\n\t\t\tgetReq.timeout = 5000;\n\t\t\tgetReq.onload = function() {\n\t\t\t\ttry {\n\t\t\t\t\tvar detail = JSON.parse(this.responseText);\n\t\t\t\t\tTi.API.info(this.responseText);\n\t\t\t\t\tif(detail.getItem === false) {\n\t\t\t\t\t\tvar lblNoDetail = Titanium.UI.createLabel(Smart.combine(style.textError, {\n\t\t\t\t\t\t\ttext : 'Kan user niet ophalen.',\n\t\t\t\t\t\t\ttop : 30\n\t\t\t\t\t\t}));\n\t\t\t\t\t\taccountWin.add(lblNoDetail);\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tvar email = detail.email;\n\t\t\t\t\t\tvar name = detail.username;\n\t\t\t\t\t\tuserEmail.value = email;\n\t\t\t\t\t\tusername.value = name;\n\n\t\t\t\t\t}\n\n\t\t\t\t} catch(e) {\n\t\t\t\t\talert(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\tgetReq.onerror = function(e) {\n\t\t\t\tTi.API.info(\"TEXT onerror: \" + this.responseText);\n\t\t\t\talert('Er is iets mis met de databank.');\n\t\t\t}\n\n\t\t\tgetReq.send(params);\n\t\t}", "title": "" }, { "docid": "86d4177537e4b6aafb6c5f4e56766c14", "score": "0.6182749", "text": "function retrieveData() {\n todos = JSON.parse(localStorage.getItem('todos')) || fetchDefaultTodos();\n prefs = JSON.parse(localStorage.getItem('prefs')) || fetchDefaultPrefs();\n}", "title": "" }, { "docid": "283aaf439e5fbc48f72b52559fa4fc60", "score": "0.61822677", "text": "function FetchData() {\n return client\n .items()\n .type(\"skill\")\n .elementsParameter([\"name\", \"category\", \"level\"])\n .toPromise()\n .then((response) => {\n return response.items;\n });\n }", "title": "" }, { "docid": "8567422ecdd4045c26e3bd4f042ce32f", "score": "0.61677253", "text": "function provideUniversalData() {\n data = {};\n mysql.pool.query(\"SELECT name FROM station\", function (err, results) {\n if (err) {\n res.write(JSON.stringify(err));\n res.end();\n }\n data.stations = results;\n });\n mysql.pool.query(\"SELECT name, id FROM subject\", function (err, results) {\n if (err) {\n res.write(JSON.stringify(err));\n res.end();\n }\n data.subjects = results;\n });\n return data;\n}", "title": "" }, { "docid": "286d044ba42f019595c8f5763c9e6932", "score": "0.61662346", "text": "function getData() {\n var query = '?fromTimestamp=' + Math.round(currentTimestamp) + \n '&offset=' + offset;\n\n $.getJSON('https://sensordata-api-dot-' + gae_app_id +\n '.appspot.com/' + sessionId + query, \n function(messages) {\n if (messages && messages.length) {\n offset += messages.length;\n }\n\n processData(messages);\n });\n }", "title": "" }, { "docid": "91d2ce89cb7a7eb9566dc84f7f562339", "score": "0.61558664", "text": "function readstock(data){\nfoods=data.val();\n}", "title": "" }, { "docid": "aaf2fb858c70a21aff372f7129ab6b4d", "score": "0.61545557", "text": "function getData(query, callback){\n\t\tquery = query ? $.param(query) : \"\";\n\t\t$.ajax({\n\t\t\t// just put 'ajax' if on the web\n\t\t \turl: \"http://loldata-spateoffire.rhcloud.com/ajax?\" + query,\n\t\t \tcontext: document.body\n\t\t}).done(function(jsonStr) {\n\t\t \tvar data = JSON.parse(jsonStr)\n\t\t \tcallback(data);\n\t\t});\n\t}", "title": "" }, { "docid": "49b5c06fa9fb4a19adcd0dda965d71e3", "score": "0.61533886", "text": "function retrieveData() {\r\n\r\n if (localStorage.length > 0) {\r\n for (var i = 0; i < localStorage.length; i++) {\r\n if (localStorage.key(i) === \"customers\") {\r\n customerArray = JSON.parse(localStorage.getItem(\"customers\"));\r\n }\r\n else if (localStorage.key(i) === \"Quantity-ordered\") {\r\n quanititiesArray = JSON.parse(localStorage.getItem(\"Quantity-ordered\"));\r\n }\r\n else if (localStorage.key(i) === \"Total-Sales\") {\r\n combinedTotal = JSON.parse(localStorage.getItem(\"Total-Sales\"));\r\n }\r\n }\r\n }\r\n\r\n}", "title": "" }, { "docid": "8ae7b10a45bf97474c88207f553a2834", "score": "0.61532825", "text": "async _getData() {\n if (this.dataLocation == null) return;\n\n const response = await fetch(this.dataLocation);\n return await response.text();\n }", "title": "" }, { "docid": "de8bd8ebfa43b41aed261b27f3ef6820", "score": "0.6150538", "text": "function fetchAndDisplayData() {\n // get the URL for the request\n const URL = requestsURL[document.querySelector(\"#title-page\").textContent];\n // request data from opendata\n $.getJSON(URL, function(result) {\n let nbElements = result['d'].length;\n for (i = 0; i < nbElements; i++) {\n addElement(result['d'][i]);\n }\n });\n}", "title": "" }, { "docid": "6af58591d1aa20e2d14364d529932442", "score": "0.6147347", "text": "function getData() {\n\t$$(\"dataFromBackend\").clearAll();\n\t$$(\"dataFromBackend\").load(\"http://localhost:3000/data\");\n\n\t// old backend on Apache/PHP:\n\t//$$(\"dataFromBackend\").load(\"http://localhost/data_master/data/data.php\");\n \n}", "title": "" }, { "docid": "88c4373efde783d7747e57e1ff0a3550", "score": "0.6144689", "text": "function get() {\n if ( !roleParser.isDocOpAllowed( userInfo.role, userInfo.username, data.store, data.get, 'get' ) ) {\n return Promise.reject( 'user unauthorized' );\n }\n\n if ( data.get === 'role' ) {\n return Promise.resolve( { name: userInfo.role } );\n }\n\n // perform read operation\n return getDataset( collection, data.get ).then( results => {\n // call resolve on read resolve\n return Promise.resolve( results );\n });\n }", "title": "" }, { "docid": "72282b3d35d60343ab719ed6eac816cc", "score": "0.61401147", "text": "function getDataList(){\n\n //var data = {datasetID1: \"NOTHING HERE YET\", datasetID2: \"NOTHING HERE EITHER\"};\n var packed = {\"wo_name\": wo_name, \n \"wo_url\": server_url, \n \"datasets\": lookupDatasetList(),\n \"visualisations\": lookupVisList()\n };\n return packed;\n\n\n}", "title": "" }, { "docid": "17ccebe6476950c05497341f1f0b4cd9", "score": "0.6138007", "text": "loadData () {}", "title": "" }, { "docid": "93caba6926039b44c10add83a4778970", "score": "0.61364216", "text": "getAllData() { return new Promise(((resolve, reject) => resolve({}))); }", "title": "" }, { "docid": "2f6f510e0a68888c0a1966387d40a889", "score": "0.61305755", "text": "function findData(p){\n\tdb.transaction(\n \t\tfunction (transaction) {\n\t\t\t\t\ttransaction.executeSql('SELECT * from objectdata where idPos=\"'+pos+'\" and email=\"'+email+'\";',\n\t\t\t\t\t\t\t[], pushObjDataHandler, errorHandler);\n\t});\n}", "title": "" }, { "docid": "f50651beebd5de7f8c8a26988049eb21", "score": "0.6123847", "text": "function DATAget(name) {\t\t// load [name]\r\n\t\tvar datagot = JSON.parse(localStorage.getItem(name));\r\n\t\tDbug(1,\"data loaded - \"+name+\": \"+datagot);\r\n\t\treturn datagot;\r\n\t}", "title": "" }, { "docid": "c6ebdf1188d6d90dce71bad50659e3c0", "score": "0.61233443", "text": "function getData() {\n //Settings config to GET data\n var settings = {\n \"async\": true,\n \"crossDomain\": true,\n \"url\": \"https://\" + myDB + \".restdb.io/rest/\" + myCollection + \"\",\n \"method\": \"GET\",\n \"headers\": {\n \"content-type\": \"application/json\",\n \"x-apikey\": apiKey,\n \"cache-control\": \"no-cache\"\n }\n }\n\n $.ajax(settings).done(function (data) {\n console.log(\"Data successfully retrieved.\");\n console.log(data);\n\n accountsArray = data[0].accountsArray;\n });\n}", "title": "" }, { "docid": "4b3797e4784c4d7903142aa2501d7ae0", "score": "0.6121594", "text": "function read_data(){\n\t\t\n\t\t\tfetch(\"./data/live_india.json\")\n\t\t\t//fetch(\"http://localhost:8080/data/live_india.json\")\n\t\t\t.then(function(response) {\n\t\t\t\treturn response.json();\n\t\t\t})\n\t\t\t.then(function(tweet_json) {\n\t\t\t\ttweetInfo = tweet_json\n\t\t\t\ttime_keys = getTimes(tweetInfo)\n\t\t\t\t\n\t\t\t\tprocessData(tweetInfo, processedTweetInfo, polygonData, statsData, B, time_keys.slice(-default_max, -default_min), grid_sizes); \n\t\t\t\t\n\t\t\t\tresetLayers(false);\t\n\t\t\t\ttinfo.update_header();\n\t\t\t\tinitSlider();\n\t\t\t}).catch(function() {\n\t\t\t\tconsole.log(\"live.json not found\");\n\t\t\t});\n\t\t\t\t\n\t}", "title": "" }, { "docid": "8063a14005658567a22c964658870691", "score": "0.6120784", "text": "async function getInformation() {\n\tvar sql = \"select distinct TenTheLoai from tailieu;\"\n\tthis.results = await queryPromise(sql); \n\tfor (var i = 0; i < this.results.length; i++) {\n\t\tobject_documents = new Object();\n\t\tobject_documents.TenTheLoai = this.results[i].TenTheLoai; \n\t\tsql1 = \"select * from tailieu where TenTheLoai = ?\";\n\t\tsql1 = mysql.format(sql1, results[i].TenTheLoai); \n\t\tthis.documents = await queryPromise(sql1);\n\t\t// Them mang tai lieu vao object\n\t\tobject_documents.documents = documents ; \n\t\t// Them object vao mang object\n\t\tthis.array_object_documents[i] = object_documents;\n\t} \n}", "title": "" }, { "docid": "0367b1ba300200ec5d488243bcb320c9", "score": "0.61192", "text": "async getList() {\n const data = await this.getData();\n return data;\n }", "title": "" }, { "docid": "ded55e40b2e8567ecd0179e54d962341", "score": "0.6119058", "text": "function getData(client, index, run, request)\n{\n\tvar queryToExecute = queries[index].query;\n\n\tclient.query(queryToExecute, function(err, result) {\n\t\tif (err)\n\t\t{\n\t\t\tvar e = new DatabaseConnectionError();\n\t\t\te.message = err.message;\n\t\t\terrorHandler(e);\n\t\t}\n\n\t\tqueries[index].resultset = result;\n\t\t\n\t\tif (run == 2)\n\t\t{\n\t\t\tclient.end();\n\t\t\textractData(request);\n\t\t}\t\n\t});\t\n}", "title": "" }, { "docid": "61c0579aad8b21138262da12abb775d7", "score": "0.6113789", "text": "function getData(){\n\t// 6.5 we define our URL here\n\t// NOTE: we must prepend the corsEverywhere because of cross-origin blocking\n\tvar corsEverywhere = \"https://cors-anywhere.herokuapp.com/\";\n\tvar apiUrl = \"http://api.population.io:80/1.0/life-expectancy/total/female/France/1952-03-11/\";\n\n\t// 6.6 loadJSON allows us to grab our JSON data from the API at the specified URL\n\t// we define a makeVisualization function below to take care of our visual\n\tloadJSON(corsEverywhere + apiUrl, makeVisualization)\n}", "title": "" }, { "docid": "6c9abeddc39b6e4f4b7869e82a047112", "score": "0.61077875", "text": "function getData() {\n BookService.getData().then(function(response) {\n $scope.books = response;\n }).catch(function(err) {\n console.log(err);\n });\n }", "title": "" }, { "docid": "1adb1123bccb17fb30f393f9a54ff19b", "score": "0.6087788", "text": "function getData(){\n return api.getTweets()\n}", "title": "" }, { "docid": "92c6c0c34bda50a6cd992a784351ea09", "score": "0.60872996", "text": "function getDataFromDataBase() {\n return new Promise((resolve, reject) => {\n sql.query(\"SELECT * FROM sensor\", (err, res) => {\n if (err) {\n reject(err);\n }\n resolve(res);\n });\n });\n}", "title": "" }, { "docid": "9d6b2a6760e3050bddedfcf264b80f91", "score": "0.60843503", "text": "async function getAllData() {\n return Storage.get({ key: \"AllData\" }).then((data) => { return data })\n }", "title": "" }, { "docid": "c23f4ff1fab5e378dade3e1dedf6dfe0", "score": "0.6069442", "text": "async function fetchData() {\n\n const secret = Keychain.get('starling_key')\n\n //Retrieve list of accounts and identify the accountUID for Primary Account\n const account_url = \"https://api.starlingbank.com/api/v2/accounts\"\n\n let req = new Request(account_url)\n req.headers = {'Authorization': 'Bearer ' + secret}\n let starling_account_results = await req.loadJSON()\n let accounts = starling_account_results.accounts\n let primary_account_id\n\n for (account of accounts)\n {\n if (account.accountType == 'PRIMARY'){\n primary_account_id = account.accountUid\n }\n }\n\n //Assuming successful download of accounts call the balance enquiry and store/return the effective_balance\n const balance_url = \"https://api.starlingbank.com/api/v2/accounts/\" + primary_account_id + \"/balance\"\n req = new Request(balance_url)\n req.headers = {'Authorization': 'Bearer ' + secret}\n let starling_balance_results = await req.loadJSON()\n let effective_balance = starling_balance_results.effectiveBalance\n return effective_balance.minorUnits;\n}", "title": "" }, { "docid": "40f4728988c2cc95b499c146882388b4", "score": "0.60675615", "text": "function getData() {\n let filter = setFilter();\n if (filter !== \"\"){\n personList = [];\n o('allobjects').filter(filter).expand('likes').expand('likes/publisher').get(function(data) {\n for (let i = 0; i < data.d.results.length; i++){\n personList.push(new Person(data.d.results[i]));\n }\n\n displayData();\n }, function (code) {\n if (code === 404)\n alert(\"Error! Page not found(404)\");\n if (code === 500)\n alert(\"Error! Internal server error(500)\");\n });\n }else {\n personList = [];\n o('allobjects').expand('likes').expand('likes/publisher').get(function(data) {\n for (let i = 0; i < data.d.results.length; i++){\n personList.push(new Person(data.d.results[i]));\n }\n\n displayData();\n }, function (code) {\n if (code === 404)\n alert(\"Error! Page not found(404)\");\n if (code === 500)\n alert(\"Error! Internal server error(500)\");\n });\n }\n}", "title": "" }, { "docid": "4958d7af02f91218a1c368f4beb4c722", "score": "0.6067523", "text": "function displayData() {}", "title": "" }, { "docid": "b2426b315ed41c0e07acddaf9510acf3", "score": "0.60668254", "text": "function get_all_question(){\n return get_data(\"Question\");\n}", "title": "" }, { "docid": "27319aa4e6094299015e0d18087ebfc9", "score": "0.6065516", "text": "getSingleData(key) {\n\t return new Promise((resolve, reject) => {\n\t db.get(key, function(err, value) {\n\t if (err) reject(err);\n\t resolve(value);\n\t });\n\t });\n\t}", "title": "" }, { "docid": "958cc7d852f12282eb4751b77abaeaba", "score": "0.60611373", "text": "getData() {\n\t \treturn this.data;\n\t }", "title": "" }, { "docid": "a8b4080fc97bf4e34021433e3663b10e", "score": "0.6057761", "text": "function getUserData() {\n $http.get(\"http://34.216.149.88:5001/SemanticApi/getUserDetails?userId=\" + $scope.userId).success(function(res) {\n console.log(res.resultList);\n $scope.booksList = res.resultList[0].books;\n console.log($scope.booksList);\n\n }).error(function(error) {\n console.error(error);\n })\n }", "title": "" }, { "docid": "360922e9d963a1082d5782865afdb0c1", "score": "0.60533035", "text": "function getData() {\n // Take a snapshot of the datetime and convert it to ISO so it can be passed in to properly \n // datetime filter our REST call\n config.currentDateTimeISO = new Date().toISOString();\n\n //var queryFilter = '$filter=ImportantMessageStartDate le \\'' + config.currentDateTimeISO + '\\' and (ImportantMessageEndDate ge \\'' + config.currentDateTimeISO + '\\' or ImportantMessageEndDate ne null)';\n var queryFilter = '$filter=ImportantMessageStartDate le \\'' + config.currentDateTimeISO + '\\' and ImportantMessageEndDate ge \\'' + config.currentDateTimeISO + '\\'';\n\n $.ajax({\n headers: {\n 'ACCEPT': 'application/json;odata=verbose'\n },\n timeout: config.xhrTimeout,\n url: config.messagesListUrl + '/items?$select=' + config.querySelectFields + '&$expand=' + config.categoryFieldName + '&' + queryFilter + '&$top=' + config.maxMessageCount + '&$orderBy=ImportantMessageSortOrder asc, ImportantMessageStartDate desc',\n type: 'GET',\n contentType: 'application/json; charset=utf-8',\n dataType: 'json',\n success: function (data) {\n fetchDataSuccess(data);\n },\n error: function () {\n fetchDataFail();\n }\n });\n }", "title": "" }, { "docid": "85d72d7213d3f7db2753d9b8b6d89504", "score": "0.6051306", "text": "function getData(){\r\n\tvar params = new HashMap();\r\n params.put(\"devCode\", assignId);\r\n params.put(\"reqId\", 1);\r\n ENGDAO.execute(\"getDevInfo\", params, \r\n \t {success : function(resultVal) {\r\n \t\t if(resultVal){\r\n \t\t\t //alert(\"process:\"+resultVal);\r\n \t\t\t var colomObj = eval(\"(\" + resultVal + \")\");\r\n \t\t\t //alert(colomObj);\r\n \t\t\t\t assignObj = colomObj;\r\n \t\t\t\t process = assignObj.process;\r\n \t\t\t\t //alert(process);\r\n \t\t\t\taddress = assignObj.address;\r\n \t\t\t\tport = assignObj.port;\r\n \t\t\t\tsetStatu();\r\n \t\t\t}\r\n \t },\r\n \t wsMode:\"WEBSERVICE\"\r\n \t }\r\n );\r\n}", "title": "" }, { "docid": "78c2afe9ad5b93854620bfee06f895f9", "score": "0.6048252", "text": "async function getData(key) {\r\n try {\r\n console.log('the key in get data is :'+key);\r\n const data = await $db.get(key);\r\n\r\n return data[key];\r\n } catch (error) {\r\n console.log('failed to get stored contact information');\r\n console.log(error);\r\n //throw error;\r\n return null;\r\n }\r\n}", "title": "" }, { "docid": "9cca0c2a44a90a3c0bf4a92417336fc2", "score": "0.6048122", "text": "function fetch_product_data()\n{\n\t//Call server api to get all products data - TBD\n\n\t//run a loop and \n\tfor (ctr=0;ctr<row.length;ctr++)\n\t\t//insert into products_list array \n\t\t//find out all pricing data for the product and place in the pricing data or the products list;\n}", "title": "" }, { "docid": "39633d673c4bd7590a8bb4667fc065ee", "score": "0.6045412", "text": "function fetch_data() {\n\n function on_data_received(data) {\n\t load_data_into_table(data);\n\n if (refresh_rate != 0) {\n\t setTimeout(fetch_data, refresh_rate * 1000);\n\t }\n }\n \n $.ajax({\n url: dataurl,\n method: 'GET',\n dataType: 'json',\n success: on_data_received\n });\n }", "title": "" }, { "docid": "fb8e44eb8e6a1b6fd0416e2be6ceffe5", "score": "0.60436356", "text": "function getPolenData(){\n\tif(navigator.onLine){\n\t\tshowOverlay();\n\t\tvar request = new Http.Get(Url, true);\n\t\trequest.start().then(function(response) {\n\t\t\t//FRAGMENT 3.1 ////////////////////////\n\t\t\t\thideOverlay();\n\t\t\t\tvar itemsPolen=populateItems(response);\n\t\t\t\t//FRAGMENT 4.1 ////////////////////////\n\t\t\t\tviewSelectCity(itemsPolen);\n\t\t\t\t//END-FRAGMENT 4.1 ////////////////////\n\t\t\t//END-FRAGMENT 3.1 ////////////////////\n\t\t}).fail(function(error, errorCode) {\n\t\t\thideOverlay();\n\t\t});\n\t}else{\n\t\talert('Activa la conexión a internet!!');\n\t}\n}", "title": "" }, { "docid": "64dacbf0a2188e99894d96493bef5416", "score": "0.60435647", "text": "function _getData() {\n return true;\n }", "title": "" }, { "docid": "98c5b47eaa6dd2ff707d0be2ff1d0543", "score": "0.6042426", "text": "function fetchRecordDefinitionData() {\n\n var queryParams = {\n propertySelection: groupByFieldID,\n queryExpression: expression //\"'Description' = \\\"first\\\" \"\n };\n\n var foo = rxRecordInstanceDataPageResource.withName(recordDefinitionName);\n foo.get(100, 0, queryParams).then(\n function (recordData) {\n requestData = recordData.data;\n prepareDataForChart();\n }\n );\n }", "title": "" }, { "docid": "c7a85a25a3cdb76910cfc6c94f321f7d", "score": "0.6034138", "text": "function get_data(){\n // todo dentro de esta funcion sera remplazado por la peticion ajax\n console.log(\"nada\");\n}", "title": "" }, { "docid": "c479ed219a34626ddf574c21f73599f8", "score": "0.60340756", "text": "function getAnnouncementData() {\n gso.getCrudService().execute(constants.get,Url , null,\n function (response) {\n $scope.anouncementData = response;\n },function (data) {\n $scope.anouncementData = {};\n $scope.errorAlert = data;\n });\n }", "title": "" }, { "docid": "2bd43e88b9b56868d72752296b873890", "score": "0.60312164", "text": "function getDashboardInfo() {\n // Obtener datos desde un servidor\n fetch(\"https://cdn.rawgit.com/jesusmartinoza/Fuse-Workshop/9731ceb3/raw_api.json\")\n .then(function(response) {\n // Devuelve la respuesta con Headers\n return response.json(); // Parsear el body a JSON\n })\n .then(function(response) {\n books.clear();\n if(response.success) {\n books.addAll(response.data.popular);\n activities.addAll(response.data.activities);\n special.addAll(response.data.special);\n }\n })\n}", "title": "" }, { "docid": "7dcbfb9c94e92afe8f47c28e281f45b1", "score": "0.6025654", "text": "function caribedev_read(entity, uuid, callback) {\n var url = server + entity + uuid;\n $.ajax({\n method: \"GET\",\n url: url,\n dataType: \"json\", \n async: false\n })\n .success(function (data) {\n callback(data);\n })\n .error(function (data) {\n alert(\"Unexpected Error\");\n });\n}", "title": "" }, { "docid": "852178a9c326733c5300d5922d695c16", "score": "0.6022154", "text": "function getDAQData(DAQ, sensorType, response){\n r.db('HDMI').table(DAQ).orderBy({index:r.desc('Timestamp')}).filter({'Sensor Type':sensorType}).limit(50).run(connection, function(err, cursor) {\n if (err) throw err;\n sensorData = \"\";\n console.log(\"Queried\");\n cursor.toArray(function(err, result) {\n if (err) throw err;\n console.log(\"The result for sensor\" + sensorType + \" DAQ \" + DAQ +\" is \" + result);\n response.send(result);\n sensorData=result;\n console.log(\"returning result\")\n return result\n });\n});\n\n}", "title": "" }, { "docid": "dde56d07606751c6c530e78d6f7253b5", "score": "0.60201323", "text": "function getRecordsFromStorageAPI(){\n \t$(\"#recordTable > tbody\").html(\"\");\n\t chrome.storage.sync.get('records', function(items){\n\t\t\tfor(var i = 0; i < items.records.length; i++){\n\t\t\t\tappendInUl(items.records[i].username, items.records[i].password, items.records[i].orgType, i);\n\t\t\t} \t\n\t });\t\n }", "title": "" }, { "docid": "fc74ab94df48eb77913b745da3b40503", "score": "0.6017175", "text": "async function data_getter(){\n \n //\n // Loop and pull all event data\n // out of the tadpoles servers\n //\n for (const [idx, _date] of dates.entries()) {\n\n //\n // This is what was returned (assuming no errors)\n //\n const data = await get_data(dates[idx][0],dates[idx][1])();\n \n //\n // Let the user know where we are...\n // and how many results were returned...\n //\n var para = document.createElement(\"p\");\n para.innerText = new Date(_date[0]).toDateString() + \" : \" + data.events.length + \" records\";\n document.querySelector(\"#status\").prepend(para);\n \n //\n // Store the data\n //\n document.all_events = document.all_events.concat(data.events);\n\n }\n\n return new Promise((res, rej) => {res(true)})\n\n }", "title": "" }, { "docid": "40e9d954ac9fdb98a280f9ffc900493a", "score": "0.6013396", "text": "function getData(){\r\n\t\t// 1 - main entry point to web service\r\n\t\tconst SERVICE_URL = \"https://api.jikan.moe/v3/search/anime?\";\r\n\t\t\r\n\t\t// No API Key required!\r\n\t\t\r\n\t\t// 2 - build up our URL string\r\n\t\tlet url = SERVICE_URL;\r\n\t\t\r\n\t\t// 3 - parse the user entered term we wish to search\r\n\t\tterm = document.querySelector(\"#searchterm\").value;\r\n\t\t\r\n\t\t// get rid of any leading and trailing spaces\r\n\t\tterm = term.trim();\r\n\t\t// encode spaces and special characters\r\n\t\tterm = encodeURIComponent(term);\r\n\t\t\r\n\t\t// if there's no term to search then bail out of the function (return does this)\r\n\t\tif(term.length < 1){\r\n\t\t\tdocument.querySelector(\"#debug\").innerHTML = \"<b>Enter a search term first!</b>\";\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t//add the search term to the url (based on user input)\r\n\t\turl += \"&q=\" + term;\r\n\t\t\r\n\t\tlet limit = document.querySelector(\"#limit\").value;\r\n\t\turl += \"&limit=\" + limit;\r\n\t\t// 4 - update the UI\r\n\t\tdocument.querySelector(\"#debug\").innerHTML = `<b>Querying web service with:</b> <a href=\"${url}\" target=\"_blank\">${url}</a>`;\r\n\t\t\r\n\t\t// 5 - create a new XHR object\r\n\t\tlet xhr = new XMLHttpRequest();\r\n\r\n\t\t// 6 - set the onload handler\r\n\t\txhr.onload = dataLoaded;\r\n\t\r\n\t\t// 7 - set the onerror handler\r\n\t\txhr.onerror = dataError;\r\n\r\n\t\t// 8 - open connection and send the request\r\n\t\txhr.open(\"GET\",url);\r\n\t\txhr.send();\r\n\t}", "title": "" }, { "docid": "dc3ba982f57ae9a487d0988673d45313", "score": "0.60132045", "text": "function readStock(data){\n foodS=data.va();\n}", "title": "" }, { "docid": "bda61adc10a5fb071437d1b1caf98e70", "score": "0.6007006", "text": "function readItems() {\n\tvar query = \"select id, product, price from products2\"\n\tconnection.query(query, (err, res) =>\n\t{\n\t\tif (err) throw err;\n\t\tconsole.log(res);\n\t\tconsole.log(\"-----------------------\");\n\t});\n\taskQ();\n}", "title": "" }, { "docid": "5106de32bdc9f1c517d7bb00b29d54ab", "score": "0.60068065", "text": "@action getData(url,callback) {\r\n\t\taxios.get(url)\r\n\t\t.then((response) => {\r\n\t\t\tcallback(response.data);\r\n\t\t})\r\n\t\t.catch((error) => {\r\n\t\t\tconsole.log(error);\r\n\t\t})\r\n\t}", "title": "" }, { "docid": "95d411c6f8fa7c0a9753c14d94976f2e", "score": "0.6005866", "text": "function getDetails(callback){\n\n}", "title": "" } ]
0bcb50c97fb25badd0d4ec429950d220
returns the number of open sites
[ { "docid": "ba82f5cc630f00f3341661f55ee202ed", "score": "0.7709405", "text": "numberOfOpenSites() {\n return this.grid.openNodes;\n }", "title": "" } ]
[ { "docid": "a434251f3052f4cd92a8b69ed30f8bbb", "score": "0.6692471", "text": "function count_sites() {\n\t$.post('check.php', {\n\t\t\tname: \"none\",\n\t\t\taction: \"count\",\n\t\t\ttype: \"site\"\n\t\t})\n\t\t.done(\n\t\t\tfunction (data, status) {\n\t\t\t\tcount = JSON.parse(data);\n\t\t\t\t$('#site_online').html(\"Active \" + count[\"0\"][\"COUNT(site_id)\"]);\n\t\t\t})\n\t\t.fail(function () {\n\t\t\twindow.location.replace(\"/index.php\");\n\t\t});\n}", "title": "" }, { "docid": "8f0360701804eb98ede67ac7a96420fa", "score": "0.6565628", "text": "function count_viewers(){\n // reset counter\n for (let i = 0; i < news_sites.length; i++) {\n let source = news_sites[i];\n viewers_counter[source] = 0;\n }\n for (let i = 0; i < viewers.length; i++) {\n // see from which site it is\n for (let j = 0; j < news_sites.length; j++) {\n let site = news_sites[j];\n if(viewers[i].startsWith(site)){\n viewers_counter[site]++;\n }\n }\n }\n}", "title": "" }, { "docid": "488464b08a6c047910c676f10dd9dd8b", "score": "0.6403339", "text": "function countViews(crunchedURL) {\n let views = 0;\n for (let entry in urlDatabase) {\n if (entry === crunchedURL) {\n views = urlDatabase[entry].visits;\n }\n }\n return views;\n}", "title": "" }, { "docid": "0415be688588bae50e1d5461f0b8b7d9", "score": "0.6099933", "text": "function getActivitiesNumber(oldestDate) {\r\n\tvar activitiesNumber = 0, mode = args.mode, site = args.site, userFilter = args.userFilter, result = {\r\n\t\tstatus : 0\r\n\t};\r\n\tvar connector = remote.connect(\"alfresco\");\r\n\t//TODO May be create a faster java backed webscript to get the number of activities\r\n\tresult = connector.get(\"/api/activities/feed/user?format=json\");\r\n\r\n\tif (result.status == 200) {\r\n\t\t// Create javascript objects from the server response\r\n\t\tvar activityList = eval(\"(\" + result + \")\");\r\n\r\n\t\tfor ( var i = 0, ii = activityList.length; i < ii; i++) {\r\n\t\t\tvar activity = activityList[i];\r\n\r\n\t\t\tvar date = fromISO8601(activity.postDate);\r\n\r\n\t\t\t// Outside oldest date?\r\n\t\t\tif (date >= oldestDate) {\r\n\t\t\t\tactivitiesNumber++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn activitiesNumber\r\n\t}\r\n\r\n\tstatus.setCode(result.status, result.response);\r\n\treturn null;\r\n}", "title": "" }, { "docid": "59aab38b267de2dde3ea094072de6b7c", "score": "0.60732424", "text": "function numberOfPages() {\n\t\treturn $('#pagesPresent').find('li').length;\n\t}", "title": "" }, { "docid": "6a1b84bd0e073d8cd8b8e6dd99c81726", "score": "0.60642993", "text": "async function getClicksCount(surl) {\n try {\n const foundobj = await Shorturl.findOne({\n shorturl: surl\n });\n if (foundobj == null) return 0;\n return foundobj.clicks;\n } catch (e) {\n throw new Error('URL is Unavailable');\n }\n}", "title": "" }, { "docid": "9ca9f9e946137629077c3e53e80c24f8", "score": "0.6056606", "text": "getOpenIssueCount() {\n return this._openIssueCount;\n }", "title": "" }, { "docid": "9ca9f9e946137629077c3e53e80c24f8", "score": "0.6056606", "text": "getOpenIssueCount() {\n return this._openIssueCount;\n }", "title": "" }, { "docid": "4467adca6c434a2abe73b107b710ff61", "score": "0.60236555", "text": "function getUrlVisitsCount() {\n const urlToBeRetrieved = inputShortenedUrlVisitCount.value;\n\n if(!validateInputedShortenedUrl(urlToBeRetrieved)) {\n return displayError('Fill a valid value before continue (no full links are allowed).');\n }\n \n buttonGetVisits.setAttribute('disabled', 'disabled');\n \n let request = fetch(`/v/${urlToBeRetrieved}`).then((response) => response.json()).then((response) => {\n if(!response.success) {\n return displayError('No shortened urls was found.');\n }\n \n visitsResult.innerHTML = response.data.visitsCount;\n visitsResultHolder.classList.remove('hidden');\n buttonGetVisits.removeAttribute('disabled');\n });\n }", "title": "" }, { "docid": "3123c099f64bf30c7ec0df057bcfba81", "score": "0.59982127", "text": "function computeRefererCounts () {\n // sample data in referrerCounts object:\n // { \"http://twitter.com/\": 3, \"http://stackoverflow.com/\": 6 }\n var referrerCounts = {}\n for (var key in visitorsData) {\n var referringSite = visitorsData[key].referringSite || '(direct)'\n if (referringSite in referrerCounts) {\n referrerCounts[referringSite]++\n } else {\n referrerCounts[referringSite] = 1\n }\n }\n return referrerCounts\n}", "title": "" }, { "docid": "9a69ee1a87dfc24e5d26db6d9411451a", "score": "0.59909374", "text": "findNumberOfLinks() {\n let linkCount = 0;\n this.sensorNodes.map(sensorNode => {\n linkCount += sensorNode.links.length;\n });\n return linkCount / 2;\n }", "title": "" }, { "docid": "444c169ea940ab353904c0b49cbb482b", "score": "0.59834373", "text": "function length(websites) {\n console.log('Website name and the content length (in bytes):'.cyan);\n for (var name in websites) {\n if (validUrl.isUri(websites[name])) {\n const path = '/tmp/' + name + '.html';\n var res = request('GET', websites[name]);\n var body = res.getBody();\n fs.writeFileSync(path, body, 'utf8');\n console.log(name + \",\", fs.statSync(path).size);\n }\n else {\n console.log(name + \",\", fs.statSync(websites[name]).size);\n }\n }\n}", "title": "" }, { "docid": "49ce4fddb89022eaf747dc2b2ffced5c", "score": "0.5982332", "text": "function countTotalLists() {\r\n var numLists = $(\".catalog-lists #content .listings li\").length * 1;\r\n return numLists;\r\n }", "title": "" }, { "docid": "0d3bf90e067c188dca012899762b6991", "score": "0.59079623", "text": "get connectionCount() {\n return Object.keys(this._connections).length;\n }", "title": "" }, { "docid": "8f51e86d891a9c7e0d6ce41bd2f674a3", "score": "0.5877557", "text": "function count() {\n return count;\n }", "title": "" }, { "docid": "bf99c36b3f01a55f32aff69bef9d014a", "score": "0.5874103", "text": "size () {\n\t\tlet count = 0;\n\t\tlet node = this.head;\n\n\t\twhile (node) {\n\t\t\tcount++;\n\t\t\tnode = node.next;\n\t\t}\n\n\t\treturn count;\n\t}", "title": "" }, { "docid": "bf99c36b3f01a55f32aff69bef9d014a", "score": "0.5874103", "text": "size () {\n\t\tlet count = 0;\n\t\tlet node = this.head;\n\n\t\twhile (node) {\n\t\t\tcount++;\n\t\t\tnode = node.next;\n\t\t}\n\n\t\treturn count;\n\t}", "title": "" }, { "docid": "a3eb8845f4e98f2c80001e76b5837e9d", "score": "0.5840847", "text": "function getNumOfRedirections() {\n return model.numOfRedirections;\n}", "title": "" }, { "docid": "a6660711017e14146c31e3dd75da9c08", "score": "0.5804057", "text": "function clientCount(){\n\t\tvar len = clients_arr.length;\n\t\treturn len;\n}", "title": "" }, { "docid": "32afd3c2878aa366e4d4bc86ddf121bf", "score": "0.5803647", "text": "async function getNetworkRequestCount() {\n return await (await fetch(url + '&get-fetch-count')).text();\n }", "title": "" }, { "docid": "794f932dec06a6b044d5b41b6678d9cb", "score": "0.57867885", "text": "get currReqs() {\r\n\t\t\t\treturn $g(\"count(.//iframe)\", {\r\n\t\t\t\t\t\tnode : $(\"silent_req_holder\"),\r\n\t\t\t\t\t\ttype : 1\r\n\t\t\t\t\t});\r\n\t\t\t}", "title": "" }, { "docid": "7b82e727478decfe5ebe5812dbbbb214", "score": "0.57649046", "text": "get currReqs() {\r\n\t\t\treturn $g(\"count(.//iframe)\",{node:$(\"silent_req_holder\"),type:1});\r\n\t\t}", "title": "" }, { "docid": "53fa4b2216d32291332d670d8d433b06", "score": "0.57636184", "text": "function get_page_count(_site,url,callback)\n{\n var site = _site;\n crawler_log(\"get_page_count: \" + site);\n //Lets do an ajax call of the first page\n $.get(url,function(data){\n //site_list[site].get_product_count(data);\n store_get_product_count(data,store_target_page_count,store_count_type);\n\n\n if(!load_full_catalog)\n max_page_count = store_end_page;\n else max_page_count = page_count;\n\n set_page_count(store_id,page_count);\n\n crawler_log(\"get_page_count: \" + max_page_count + \" products_per_page: \" + products_per_page);\n\n if(typeof callback == \"function\") callback();\n });\n}", "title": "" }, { "docid": "cba843b60bdcb34030b6ad78df9ca6da", "score": "0.57587963", "text": "get numThreads() {\n var n = 0;\n for (var p in this.threads) {\n n++;\n }\n return n;\n }", "title": "" }, { "docid": "da1f7509b1b6ffcbe1ffd6081c688022", "score": "0.57487285", "text": "function countBookmarks () {\n // get all bookmarks\n var bookmarks = getFromLocalStorage();\n \n return bookmarks.length;\n }", "title": "" }, { "docid": "33a0d7f5ab1c286fa231d7e2164b2321", "score": "0.57272565", "text": "testNeighborCount(){\n\t\tconsole.log('testing ' + this.sites.length);\n\t\tfor (var i = 0; i < this.sites.length; ++i){\n\t\t\tlet neighbors = this.getNeighbors(this.sites[i], this.diagram);\n\t\t\tconsole.log(neighbors.length);\n\t\t\tif (neighbors.length == 0)\n\t\t\t\tconsole.log(i);\n\t\t}\n\t}", "title": "" }, { "docid": "4b14fc058d075b13cc366ed9da9f2984", "score": "0.56878227", "text": "countActiveNeighbours() {\n // returns number of active neighbours\n this.activecount=0;\n for (let i = 0; i < 3; i++) {\n if (this.neighbours[i] && this.neighbours[i].active) {\n this.activecount++;\n }\n }\n return this.activecount;\n }", "title": "" }, { "docid": "3c98defbfe3426495835d9a65c7a5dda", "score": "0.56816006", "text": "function _numOfAffiliates (firm) {\n if(arguments.length === 0){\n return workforceLen;\n } else {\n _lookupFirm(firm);\n return _(firms[firm].workers).size();\n }\n }", "title": "" }, { "docid": "a9086fb63dcc3cc6894150367436ffe3", "score": "0.5672092", "text": "function getRegistryCount() {\n return registries.length;\n}", "title": "" }, { "docid": "30bbc952cdac4a9490b432a07d057180", "score": "0.56694686", "text": "static get MAX_NUM_LINKS() {\n return 10;\n }", "title": "" }, { "docid": "f1dffb3f96a7ba275329a09ec2592c0a", "score": "0.56565434", "text": "function count()\r\n\t{\r\n\t\treturn probList.length;\r\n\t}", "title": "" }, { "docid": "7fdebfa99ba84d984fa2f1c26936680e", "score": "0.56479913", "text": "function frequency(websites) {\n var ocurrences = {};\n for (var name in websites) {\n try {\n if (validUrl.isUri(websites[name])) {\n const path = '/tmp/' + name + '.html';\n var res = request('GET', websites[name]);\n var body = res.getBody();\n fs.writeFileSync(path, body, 'utf8');\n const data = fs.readFileSync(path, 'utf8');\n var deps = detect(data.toString()).filter(check_js);\n }\n else {\n const data = fs.readFileSync(websites[name], 'utf8');\n var deps = detect(data.toString()).filter(check_js);\n }\n deps.forEach(dependency => {\n if (ocurrences[dependency]) {\n ocurrences[dependency] += 1;\n }\n else {\n ocurrences[dependency] = 1;\n }\n });\n } catch (err) {\n console.error(err)\n }\n }\n console.log('Dependencies and the frequency occurrences:'.cyan);\n for (var dependency in ocurrences) {\n const slug = dependency.split('/').pop();\n console.log(slug + ',', ocurrences[dependency]);\n }\n}", "title": "" }, { "docid": "e82b4293dca5a50ae25ffd50003702ec", "score": "0.56121296", "text": "length() {\n\t\tlet current = this.head;\n\t\tlet counter = 0;\n\t\twhile( current.next !== null ) {\n\t\t\tcounter++;\n\t\t\tcurrent = current.next\n\t\t}\n\t\treturn counter;\n\t}", "title": "" }, { "docid": "d94127b2e87c3a71cfb669221c35bd9a", "score": "0.56092775", "text": "getNumberOfProcesses() {\n return tslib.__awaiter(this, void 0, void 0, function* () {\n const result = yield this.query('select count(*) as cnt from process;');\n return result.firstRow({ cnt: query_result.NUM }).cnt;\n });\n }", "title": "" }, { "docid": "7810fdca4a12ac750accf42ee7d49ee9", "score": "0.56091154", "text": "size() {\n let count = 0\n let node = this.head\n while (node) {\n count++\n node = node.next\n }\n return count\n }", "title": "" }, { "docid": "cb004c1d38f96ff8f7d8508c0ab09ab6", "score": "0.56057894", "text": "size() {\n if (this.head === null) { // Nothing to point to at start\n return 0;\n }\n var numNodes = 1;\n var curNode = this.head; // Start with first node\n while (curNode.next !== null) { // Loop while there are nodes to point to\n curNode = curNode.next; // Go to next node (if possible)\n numNodes++;\n }\n return numNodes;\n }", "title": "" }, { "docid": "4598ea08c4937d2d65eac3e633c7282e", "score": "0.5597765", "text": "size() {\n\t\tvar length = 0;\n\n\t\tthis.traverse(function(node){\n\t\t\tlength++;\n\t\t});\n\t\treturn length;\n\t}", "title": "" }, { "docid": "531484d483fe7a7ac3d74b0d81837e79", "score": "0.5591475", "text": "size() {\n let count = 0;\n let node = this.head;\n while (node) {\n count++;\n node = node.next;\n }\n return count;\n }", "title": "" }, { "docid": "0f560b689695a8b22424d5e15b45e904", "score": "0.55853325", "text": "function countModules() {\n return availableModules.length;\n}", "title": "" }, { "docid": "a07c3481535fc0884f4dc82957adb69f", "score": "0.5583851", "text": "get size() {\n return fs.readdirSync(this.location).length;\n }", "title": "" }, { "docid": "ddb225ae4634b9482cc51e3c1be70f4c", "score": "0.55703014", "text": "length() {\n var runner = this.top; // Start at the top of the stack\n var numNodes = 0;\n // Loop to move down stack\n while (runner != null) {\n numNodes++; // Increment number of nodes found\n runner = runner.next; // Move to next node (if there is one)\n }\n return numNodes;\n }", "title": "" }, { "docid": "6332a892a7120aaafb213ded11d57dd2", "score": "0.5565395", "text": "length(){\n\t\tlet count = 0;\n\t\tif(this.head){\n\t\t\tcount++;\n\t\t\tfor(let pointer = this.head; pointer.next; pointer = pointer.next){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "title": "" }, { "docid": "b022e9723f5d1f453dcce8f30c6a8691", "score": "0.55643094", "text": "size(){\n let count = 1;\n if(this.head !== null){\n let currentNode = this.head;\n while(this.hasNext(currentNode)){\n count = count + 1;\n currentNode = this.getNextNode(currentNode);\n }\n return count;\n }\n return 0;\n }", "title": "" }, { "docid": "bf7e4c52650a52ad29ea262f9217ecca", "score": "0.55547285", "text": "size() {\n let count = 0;\n let node = this.head;\n while (node) {\n count++;\n node = node.next\n }\n return count;\n }", "title": "" }, { "docid": "f5a4ffa2f0e066e69ec21c89f817dbb9", "score": "0.5542616", "text": "function getNumberOfUnvisited(neighbours){\n var unvisited = 0;\n for (var i = 0; i < neighbours.length; i++) {\n if (!neighbours[i].visited) {\n unvisited++;\n }\n }\n return unvisited;\n}", "title": "" }, { "docid": "482f2a88b1e0d7c1366ee0647e8185a6", "score": "0.5532599", "text": "function count(){\n\tvar n = 0;\n\tfor each(var key in Object.keys(this.dataStore)){\n\t\t++n;\n\t}\n\treturn n;\n}", "title": "" }, { "docid": "c4a9b61514d95f0097060fd8535dc971", "score": "0.55280143", "text": "function countPages() {\n var number = Modules.Cookie.get(\"num_pages\");\n if (!number) number = 1;\n else number = parseInt(number, 10) + 1;\n Modules.Cookie.set(\"num_pages\", number, \"7d\");\n}", "title": "" }, { "docid": "67c0b965fc31c8df5640e73e535852b2", "score": "0.5523376", "text": "function size() {\n\t\t\treturn $(\".mdl.open\").length;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "f1a2925e93e4901cbe21e6c9a3c28362", "score": "0.55209124", "text": "get indexCount() {}", "title": "" }, { "docid": "e31b0e9d4d200866ac46c7ee5bd97957", "score": "0.5517788", "text": "function count(){\n\tvar n = 0;\n\tfor(key in this.dataStore){\n\t\t++n\n\t}\n\n\treturn n;\n}", "title": "" }, { "docid": "db50fb661f60390c71c8ee91f3835632", "score": "0.551604", "text": "function getVisits(hash){\n for(var i = 0; i < USER_TACO_INFO.length; i++){\n var cur = USER_TACO_INFO[i];\n if(cur.taco_hash == hash){\n return cur.num_visits;\n }\n }\n return 0;\n }", "title": "" }, { "docid": "1641a03f5313ffc01af9b4b6afb13454", "score": "0.5494354", "text": "function computePageCounts () {\n // sample data in pageCounts object:\n // { \"/\": 13, \"/about\": 5 }\n var pageCounts = {}\n for (var key in visitorsData) {\n var page = visitorsData[key].page\n if (page in pageCounts) {\n pageCounts[page]++\n } else {\n pageCounts[page] = 1\n }\n }\n return pageCounts\n}", "title": "" }, { "docid": "752b8844b82ebe525d20a4d6b10505ab", "score": "0.5493484", "text": "function lineCounter(link) {\r\n var fs = require('fs');\r\n var contents = fs.readFileSync(link);\r\n var counter = contents.toString().split('\\n').length - 1;\r\n return counter;\r\n}", "title": "" }, { "docid": "fa0111645ceacee1d8f109ed14104d9c", "score": "0.54926234", "text": "get_total_num_trackers() {\n var total_num = (Object.keys(data['snitch_map']).length);\n return total_num;\n }", "title": "" }, { "docid": "3eace7bd9f87a43223ff103fb81912f9", "score": "0.5481571", "text": "function getCount(){\n\tif (window.XMLHttpRequest){ // code for IE7+, Firefox, Chrome, Opera, Safari\n\t\txmlcount=new XMLHttpRequest();\n\t} else { // code for IE6, IE5\n\t\txmlcount=new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t}\n\t\n\txmlcount.open(\"GET\",\"pages/list_pages.xml\",false);\n\txmlcount.send();\n\tpageCountXML=xmlcount.responseXML;\n\t\n\t// Get the pages count from the XML.\n\ttPages = (pageCountXML.getElementsByTagName(\"pages\")[0].getAttribute(\"count\"));\n\t// tPages = 90;\n}", "title": "" }, { "docid": "bdc6052d5f085dca1b2431e2d0f5ce47", "score": "0.5478268", "text": "function websiteVisitCounter() {\n var cookie = document.cookie;\n if(!cookie) {\n cookie = 1;\n } else {\n cookie++;\n }\n document.cookie = cookie;\n $(\".visitCounter\").html(\"Visit Count: \" + cookie);\n}", "title": "" }, { "docid": "c399e564a9f1b5911aed02837471348b", "score": "0.5464848", "text": "get viewsCount() {\r\n var _a;\r\n return (_a = this.payload.views) === null || _a === void 0 ? void 0 : _a.count;\r\n }", "title": "" }, { "docid": "3932c1b68522234ddd255f0015ea52e3", "score": "0.5462533", "text": "size() {\n let count = 0\n let node = this.head\n while(node) {\n count++\n node = node.next\n }\n return count\n }", "title": "" }, { "docid": "0f5ab2c82f1fad28c99d5bdcbad03a1a", "score": "0.5462024", "text": "serverCount() {\n return Promise.resolve(1);\n }", "title": "" }, { "docid": "c9fc993b2afc3a50bacf7ee953b099da", "score": "0.54474336", "text": "function currentNumberOfPaths(){\r\n var items = project.getItems({\r\n class: Path\r\n });\r\n\r\n return items.length;\r\n }", "title": "" }, { "docid": "c78b0c7c323627b1f0f96e58f2c705dc", "score": "0.544305", "text": "function countGames(){\n\treturn JSONAllGamesData.length;\n}", "title": "" }, { "docid": "219799accaa3b5d463f79d64608595a9", "score": "0.54378426", "text": "function countRequests(req, res, next) {\n reqcnt++;\n if (req.session) {\n req.session.reqcnt = (req.session.reqcnt || 0) + 1;\n }\n next();\n}", "title": "" }, { "docid": "763b617ffc6c98cd1ae28fb6d33fdc7e", "score": "0.5434444", "text": "function count() {\n return this._listItems.length;\n}", "title": "" }, { "docid": "711d04ed0764feb38432236dafd80ae5", "score": "0.54278296", "text": "size() {\n let counter = 0; //# of nodes\n let node = this.head;\n\n while (node) { //if no head then no code is run\n counter++; //if it does the counter will increment\n node = node.next; //assign node to the current node's next property\n }\n\n return counter;\n }", "title": "" }, { "docid": "1e289299699d51fa915660d6694d3d38", "score": "0.5417584", "text": "size() {\n let count = 0\n this.traverse(node => count += 1)\n return count\n }", "title": "" }, { "docid": "9d92aeaaad3d1c9be36398071e71182e", "score": "0.541546", "text": "function countLists() {\n browser.waitForExist('.list-todo');\n const elements = browser.elements('.list-todo');\n return elements.value.length;\n}", "title": "" }, { "docid": "8ca4a1db70bd902c17bbb9e23898c863", "score": "0.5413403", "text": "function hitsCount(hit) {\n var testes = urls.map(url => url.hits)\n\n for (const teste of testes) {\n\n if (teste === hit) {\n\n hit ++\n\n var link = document.getElementById(testes.indexOf(teste)) \n link.innerText = hit;\n\n return\n } else{\n console.log('Erro na atualização de click');\n }\n }\n}", "title": "" }, { "docid": "4470ae27b0117606abd00fd07e06c066", "score": "0.5405934", "text": "function check_count_url(itemNum, request_reset)\n{\n var item = indexOfEntries[itemNum];\n var op_name = \"SCOREBOARD_EXTERN\";\n if ( typeof item.count == \"string\" &&\n item.count == \"?\" &&\n item.count_url.match(/^(.*)%cb(.*)$/) ) {\n var url_pre_cb = RegExp.$1;\n var url_post_cb = RegExp.$2;\n var tgt_domain = url_pre_cb;\n if ( tgt_domain.match(/URL=%([A-Z]+)\\?/) ) {\n if ( RegExp.$1 == \"CI\" && typeof cfgCIurl == \"string\" )\n tgt_domain = cfgCIurl;\n else if ( RegExp.$1 == \"HT\" && typeof cfgHTurl == \"string\" )\n tgt_domain = cfgHTurl;\n }\n if ( tgt_domain.match(/https?:\\/\\/([^\\/]*)\\// ) ) {\n var cb = \"\";\n tgt_domain = RegExp.$1;\n var my_domain = document.domain;\n if ( tgt_domain == my_domain ) {\n // Domains match! We can update directly.\n cb = \"parent.scoreboard.reset_bin(\" + itemNum + \",_count,'\" + op_name + \"')\";\n }\n else {\n // Domains do not match. We have to stand on our heads\n var protocol = \"http\";\n var win_url = window.location.href;\n if (win_url.indexOf(\"https\") != -1)\n protocol = \"https\";\n cb = 'document.location.href=\"' + protocol + '://' + document.domain +\n cfgCgi + \"?SID=\" + cfgSID + \"+FID=\" + fid_generator() +\n \"+OP=RESET_BIN+OP_NAME=\" + op_name + \"+BIN=\" + \n itemNum + '+CT=_count\"';\n }\n var old_cb = cb;\n cb = nx_escape(cb).replace(/\\+/g,\"%252b\");\n cb = nx_escape(cb);\n var url = \"\";\n if ( ! url_pre_cb.match(/https?:/) )\n url = cfgCgi + \"?SID=\" + cfgSID + \"+FID=\" + fid_generator() + \"+\" + url; \n if ( url_pre_cb.match(/(.*URL=)(.*)$/) )\n url_pre_cb = RegExp.$1 + nx_escape(RegExp.$2);\n if ( url_post_cb.match(/([^\\+]+)(\\+.*)$/) )\n url_post_cb = nx_escape(RegExp.$1) + RegExp.$2;\n url += url_pre_cb + cb + url_post_cb;\n if ((typeof request_reset != \"undefined\") &&\n request_reset)\n load_workframe(url, \"request_reset\", op_name);\n else \n load_workframe(url, 0, op_name);\n }\n }\n}", "title": "" }, { "docid": "af48298cfb64527207bee5c7014c6729", "score": "0.5403187", "text": "listLength() {\r\n let currentNode = this.head\r\n let length = 0\r\n while (currentNode != null) {\r\n length++\r\n currentNode = currentNode.next\r\n }\r\n return length\r\n }", "title": "" }, { "docid": "86d41bbe7a2e48b55730e2f2eb113f4d", "score": "0.5391", "text": "function solve() {\n let websites = document.querySelectorAll('.link-1');\n Array.from(websites).forEach(website => {\n website.addEventListener(`click`, (ev) => {\n let paragraph = website.querySelector('p');\n let counter = paragraph.textContent.split(` `)[1];\n counter++;\n paragraph.innerText = `visited ${counter} times`;\n });\n });\n}", "title": "" }, { "docid": "af1b5d2e00cd36db27cbf84d0b1f44fc", "score": "0.5377825", "text": "function activeCount() {\n\t// declare a counter variable and initialize it to start at 0\n\tvar count = 0;\n\t// loop through petLib\n\tfor (var i=0;i<11;i++) {\n\t\t// if pet is active then increment counter\n\t\tif (petLib[i].activeFlag == 1) {\n\t\t\tcount++;\n\t\t}\n\t}\n\t// return counter variable\n\treturn count;\n} // end activeCount()", "title": "" }, { "docid": "5cf968a48036190d80e03cbdd8a029c8", "score": "0.5377217", "text": "function getNumItems() {\n if (!db) {\n console.log('Database not connected; cannot count tweets');\n } else {\n // Get # of documents in collection\n // Note that .count() returns a 'promise', which contains the count of items when resolved\n // (so it represents the eventual completion of an asynchronous operation)\n subscribers.count()\n .then(function(numItems) {\n console.log('Refreshing stream. There are', numItems, 'subscriber(s)');\n getUsersToFollow(numItems);\n })\n\n }\n\n}", "title": "" }, { "docid": "6e4e6f6691086cfffbfece225c84f9ff", "score": "0.5376268", "text": "function getPagesSize() {\n return pages.length;\n }", "title": "" }, { "docid": "35b54d2c6a32179de3554f4b1c6e5215", "score": "0.5367128", "text": "function countEdges() {\n var numOfEdges = this.count() - 1;\n return numOfEdges;\n }", "title": "" }, { "docid": "10bbd97f634274c28c3924ffb3edf06d", "score": "0.53663695", "text": "function visits_in_database(aURI)\n{\n let url = aURI instanceof Ci.nsIURI ? aURI.spec : aURI;\n let stmt = DBConn().createStatement(\n `SELECT count(*) FROM moz_historyvisits v\n JOIN moz_places h ON h.id = v.place_id\n WHERE url = :url`\n );\n stmt.params.url = url;\n try {\n if (!stmt.executeStep())\n return 0;\n return stmt.getInt64(0);\n }\n finally {\n stmt.finalize();\n }\n}", "title": "" }, { "docid": "5d9a0be9cb1eb34627134488587f40e1", "score": "0.5361862", "text": "function size() {\n var size = 0;\n this.each(function() { ++size; });\n return size;\n}", "title": "" }, { "docid": "b517e95a2d707b993d32cb8217e51f1b", "score": "0.535076", "text": "function getRepoCount(number) {\n const repoCount = document.querySelector('.repo-count');\n repoCount.textContent = number;\n}", "title": "" }, { "docid": "e728f5e00af9979d137a61188f1e4ff8", "score": "0.53501534", "text": "size() {\n let counter = 0;\n let current = this.head;\n while (current) {\n counter++;\n current = current.next;\n }\n return counter;\n }", "title": "" }, { "docid": "53ca3a0c5a99cb5888292e3c38c72b5e", "score": "0.53499883", "text": "function execItemsCountRequest() {\r\n\r\n var getWorkItemsCountUrl = \"/_api/web/lists(guid'<REMOVED TO COMPLY WITH NDA>')/itemCount\";\r\n\r\n\r\n $('#debugPane').append('</br>Running execItemsCountRequest...');\r\n\r\n var url = getUrlPath() + getWorkItemsCountUrl.toString();\r\n\r\n $('#debugPane').append('</br>getWorkItemsCountUrl.toString():' + getWorkItemsCountUrl.toString());\r\n\r\n $('#debugPane').append('</br>URL: ' + url);\r\n\r\n $.ajax({\r\n url: url,\r\n method: \"GET\",\r\n headers: { \"Accept\": \"application/json; odata=verbose\" },\r\n success: successCountHandler,\r\n error: errorCountHandler\r\n });\r\n}", "title": "" }, { "docid": "4f104e851468fc9983cccc25300a1634", "score": "0.53402984", "text": "function getNumberOfSteps(jContext) {\n return jContext.find(\".step-open\").length;\n }", "title": "" }, { "docid": "d9b8ccc8c42b224dbb3d4659174f0952", "score": "0.53380525", "text": "function count() {\n\t\treturn objects.length;\n\t}", "title": "" }, { "docid": "83fca49ef76512ae074b62bcef98bc0e", "score": "0.5328942", "text": "function getNumberOfLunchItems(lunchItems) {\n var numItems = lunchItems.length;\n return numItems;\n }", "title": "" }, { "docid": "82ab079c9802390e0860a5ecefa7a3e5", "score": "0.53274834", "text": "size() {\n let size = 0;\n let node = this.head;\n\n while (node) {\n size++;\n node = node.next;\n }\n\n return size;\n }", "title": "" }, { "docid": "1be692c93ac805ea77ad49b84fa79b73", "score": "0.53170604", "text": "function getStarCount(repos) {\n\treturn repos.data.reduce(function(count, repo) {\n\t\treturn count + repo.stargazers_count;\n\t}, 0)\n}", "title": "" }, { "docid": "b86edc9d594fa703145d89e3667f281c", "score": "0.531116", "text": "length() {\n const stackLen = this.stack.length;\n debug(`\\nLOG: There are total ${stackLen} data in the stack`);\n return stackLen;\n }", "title": "" }, { "docid": "595f7e6ce3e0d836799b713b93bf24f5", "score": "0.5307986", "text": "function getExtensionCount() {\r\n\tif (user.includeApps) {\r\n\t\t$('#activeCount').text($('#activeExtensions').children('.extBlock').length);\r\n\t\t$('#inactiveCount').text($('#inactiveExtensions').children('.extBlock').length);\r\n\t} else if (!user.includeApps) {\r\n\t\t$('#activeCount').text($('#activeExtensions').children('.extBlock:not(.app)').length);\r\n\t\t$('#inactiveCount').text($('#inactiveExtensions').children('.extBlock:not(.app)').length);\r\n\t}\r\n}", "title": "" }, { "docid": "ae3dc203ef1b5e948da4f568adcb5ae3", "score": "0.5301358", "text": "function number_of_active_channels() {\n\tlet count = 0;\n\tfor (let [name, channel] of Object.entries(thingy_data.channels)) {\n\t\tif (channel.active) {\n\t\t\tcount += 1;\n\t\t}\n\t}\n\treturn count;\n}", "title": "" }, { "docid": "9875f8cb0e75823e654b726ef9592aa3", "score": "0.5296549", "text": "function getFSImageCount() {\n\t\tvar countImages = fs.readdirSync(PATH_IMAGES).length;\n\t\treturn countImages;\n\t}", "title": "" }, { "docid": "a4a44ac36dd67069fa6aefc78ee34f12", "score": "0.52885073", "text": "status(){\n var count = 0;\n for(var i=0;i<this.handlers.length;i++){\n count += this.handlers[i].status;\n }\n return count;\n }", "title": "" }, { "docid": "081cace598065089527258308945a703", "score": "0.5271154", "text": "size() {\n let score = 0;\n let node = head; \n while (node !== null) {\n score++; \n node = node.next; \n }\n return score; \n }", "title": "" }, { "docid": "5493c5a04128d1554287cfffdf35cd0b", "score": "0.52648944", "text": "function favoritesCount(e) {\r\n var repoData = getrepoData(),\r\n totalItems = 0,\r\n countElement = document.getElementById('favoritesCounter');\r\n\r\n if (repoData !== null) {\r\n for (var items in repoData) {\r\n for (var i = 0; i < repoData[items].length; i++) {\r\n if (i == 1) {\r\n totalItems = totalItems + 1;\r\n }\r\n }\r\n }\r\n }\r\n\r\n updateBtnRemove();\r\n return countElement.innerHTML = totalItems;\r\n }", "title": "" }, { "docid": "e89abb7f5720f8f088799ad8cdcb7a13", "score": "0.52645713", "text": "function showHowMany(){\n let number = countItems()\n let navCount = document.querySelector('#item-count')\n navCount.innerHTML = number\n}", "title": "" }, { "docid": "f9d8bacc4868e6d9e9beb2e78d6336b7", "score": "0.5255104", "text": "function requestGlobalCount(req, res, next) {\n requests++;\n console.log(`Requests: ${requests}`);\n next();\n}", "title": "" }, { "docid": "987942e8dd3a77b3d40c7442552868ba", "score": "0.5252599", "text": "function countOpenSpaces(board) {\n\tvar numOpenSpaces = 0;\n\tboard.forEach(\n\t function(space) {\n if (space == '')\n numOpenSpaces = numOpenSpaces+1;\n })\n return numOpenSpaces;\n}", "title": "" }, { "docid": "83701f6747b7cfdab02888dc79a28e2d", "score": "0.52376413", "text": "function selectOpenCount(course_id) {\n return db.count('*')\n .from('questions AS q')\n .where(questionOpen())\n .andWhere(questionNotAnswering())\n .andWhere('course_id', course_id)\n .first()\n .then(function(questions) {\n return Promise.resolve(parseInt(questions.count));\n });\n}", "title": "" }, { "docid": "8d8d897ad7530266c000496d652f3db0", "score": "0.5230373", "text": "function updateTotalTime() {\n var currDomain = getActiveWebsite(); \n if(isUserActiveNow() && isWatchedWebsite(currDomain)){\n totalTimeOnWebsites += 1; \n }\n}", "title": "" }, { "docid": "a684f0cd6c54694b666e9a98622eb2f1", "score": "0.5218755", "text": "function size(linkedList){\n let counter = 0;\n let currNode = linkedList.head;\n while (currNode) {\n counter = counter + 1;\n currNode = currNode.next; \n }\n return counter;\n}", "title": "" }, { "docid": "3b19d4a3b087398b6b8267ac96ac08e8", "score": "0.5218597", "text": "numRemoteOp() {\n var sum = 0;\n for (i = 0; i < this.operatorSettings.teams.length; i++) {\n if (this.operatorSettings.teams[i].size) {\n sum += this.operatorSettings.teams[i].size;\n }\n }\n return sum;\n }", "title": "" }, { "docid": "9f5cb773726a98758530ed5b9fd80acd", "score": "0.5212758", "text": "numberOfRemoteStreams(client, peerConnectionLog) {\n const remoteStreams = {};\n\n for (let i = 0; i < peerConnectionLog.length; i++) {\n if (peerConnectionLog[i].type === 'ontrack') {\n const { value } = peerConnectionLog[i];\n const streamId = value.split(' ')[1];\n\n remoteStreams[streamId] = true;\n }\n }\n\n return Object.keys(remoteStreams).length;\n }", "title": "" }, { "docid": "5fe908e55cfe76a2d01375924f655e0c", "score": "0.52118635", "text": "function getSitemapUrlLineLength() {\n var sitemapURLSLineReader = new LineByLineReader('./sitemapURLS.txt');\n sitemapURLSLineReader.on('error', function(error) {\n if (error) {\n console.log(error);\n }\n })\n sitemapURLSLineReader.on('line', function(line) {\n fileLineLength++;\n\n //console.log(\"this is the line: \" + line);\n })\n sitemapURLSLineReader.on('end', function() {\n console.log(\"URLS in Sitemap: \" + fileLineLength);\n });\n}", "title": "" } ]
d9dde76cb3c64215ece1e5dec804049a
Handles responses to an ajax request: sets all responseXXX fields accordingly finds the right dataType (mediates between contenttype and expected dataType) returns the corresponding response
[ { "docid": "933f8069c866657bdd75ef5c6d1a6a28", "score": "0.7809227", "text": "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct, type, finalDataType, firstDataType, contents = s.contents, dataTypes = s.dataTypes, responseFields = s.responseFields;\n // Fill responseXXX fields\n for (type in responseFields) {\n if (type in responses) {\n jqXHR[responseFields[type]] = responses[type];\n }\n }\n // Remove auto dataType and get content-type in the process\n while (dataTypes[0] === '*') {\n dataTypes.shift();\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader('content-type');\n }\n }\n // Check if we're dealing with a known content-type\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n }\n // Check to see if we have a response for the expected dataType\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + ' ' + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n if (!firstDataType) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n return responses[finalDataType];\n }\n }", "title": "" } ]
[ { "docid": "b4c9e7c928a73858567d20b933cb9f89", "score": "0.8113504", "text": "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process\nwhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}}// Check if we're dealing with a known content-type\nif(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}// Check to see if we have a response for the expected dataType\nif(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{// Try convertible dataTypes\nfor(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}}// Or just use first one\nfinalDataType=finalDataType||firstDataType;}// If we found a dataType\n// We add the dataType to the list if needed\n// and return the corresponding response\nif(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "title": "" }, { "docid": "b4c9e7c928a73858567d20b933cb9f89", "score": "0.8113504", "text": "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process\nwhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}}// Check if we're dealing with a known content-type\nif(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}// Check to see if we have a response for the expected dataType\nif(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{// Try convertible dataTypes\nfor(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}}// Or just use first one\nfinalDataType=finalDataType||firstDataType;}// If we found a dataType\n// We add the dataType to the list if needed\n// and return the corresponding response\nif(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "title": "" }, { "docid": "b4c9e7c928a73858567d20b933cb9f89", "score": "0.8113504", "text": "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process\nwhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}}// Check if we're dealing with a known content-type\nif(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}// Check to see if we have a response for the expected dataType\nif(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{// Try convertible dataTypes\nfor(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}}// Or just use first one\nfinalDataType=finalDataType||firstDataType;}// If we found a dataType\n// We add the dataType to the list if needed\n// and return the corresponding response\nif(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "title": "" }, { "docid": "eeecd1e33dedc4253bdd37d8d7ca19e2", "score": "0.80692047", "text": "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes; // Remove auto dataType and get content-type in the process\nwhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}} // Check if we're dealing with a known content-type\nif(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}} // Check to see if we have a response for the expected dataType\nif(dataTypes[0] in responses){finalDataType=dataTypes[0];}else { // Try convertible dataTypes\nfor(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}} // Or just use first one\nfinalDataType=finalDataType||firstDataType;} // If we found a dataType\n// We add the dataType to the list if needed\n// and return the corresponding response\nif(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "title": "" }, { "docid": "57eaa07ccb8280ef6f5da97418227c61", "score": "0.80662924", "text": "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes; // Remove auto dataType and get content-type in the process\nwhile(dataTypes[0] === \"*\") {dataTypes.shift();if(ct === undefined){ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");}} // Check if we're dealing with a known content-type\nif(ct){for(type in contents) {if(contents[type] && contents[type].test(ct)){dataTypes.unshift(type);break;}}} // Check to see if we have a response for the expected dataType\nif(dataTypes[0] in responses){finalDataType = dataTypes[0];}else { // Try convertible dataTypes\nfor(type in responses) {if(!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]){finalDataType = type;break;}if(!firstDataType){firstDataType = type;}} // Or just use first one\nfinalDataType = finalDataType || firstDataType;} // If we found a dataType\n// We add the dataType to the list if needed\n// and return the corresponding response\nif(finalDataType){if(finalDataType !== dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "title": "" }, { "docid": "b4ef4ea16296c8f38e8637c3b3dc1082", "score": "0.80548936", "text": "function ajaxHandleResponses(s,jqXHR,responses){var firstDataType,ct,finalDataType,type,contents=s.contents,dataTypes=s.dataTypes; // Remove auto dataType and get content-type in the process\nwhile(dataTypes[0] === \"*\") {dataTypes.shift();if(ct === undefined){ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");}} // Check if we're dealing with a known content-type\nif(ct){for(type in contents) {if(contents[type] && contents[type].test(ct)){dataTypes.unshift(type);break;}}} // Check to see if we have a response for the expected dataType\nif(dataTypes[0] in responses){finalDataType = dataTypes[0];}else { // Try convertible dataTypes\nfor(type in responses) {if(!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]){finalDataType = type;break;}if(!firstDataType){firstDataType = type;}} // Or just use first one\nfinalDataType = finalDataType || firstDataType;} // If we found a dataType\n// We add the dataType to the list if needed\n// and return the corresponding response\nif(finalDataType){if(finalDataType !== dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "title": "" }, { "docid": "692adff5adcf212d98bc0c6415e8df72", "score": "0.7996888", "text": "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes,responseFields=s.responseFields;// Fill responseXXX fields\n\tfor(type in responseFields){if(type in responses){jqXHR[responseFields[type]]=responses[type];}}// Remove auto dataType and get content-type in the process\n\twhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"content-type\");}}// Check if we're dealing with a known content-type\n\tif(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}// Check to see if we have a response for the expected dataType\n\tif(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{// Try convertible dataTypes\n\tfor(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}}// Or just use first one\n\tfinalDataType=finalDataType||firstDataType;}// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}// Chain conversions given the request and the original response", "title": "" }, { "docid": "222801db63d552a509f38e64adc77e03", "score": "0.79932857", "text": "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process\n\twhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}}// Check if we're dealing with a known content-type\n\tif(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}// Check to see if we have a response for the expected dataType\n\tif(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{// Try convertible dataTypes\n\tfor(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}}// Or just use first one\n\tfinalDataType=finalDataType||firstDataType;}// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "title": "" }, { "docid": "222801db63d552a509f38e64adc77e03", "score": "0.79932857", "text": "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process\n\twhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}}// Check if we're dealing with a known content-type\n\tif(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}// Check to see if we have a response for the expected dataType\n\tif(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{// Try convertible dataTypes\n\tfor(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}}// Or just use first one\n\tfinalDataType=finalDataType||firstDataType;}// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "title": "" }, { "docid": "222801db63d552a509f38e64adc77e03", "score": "0.79932857", "text": "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process\n\twhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}}// Check if we're dealing with a known content-type\n\tif(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}// Check to see if we have a response for the expected dataType\n\tif(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{// Try convertible dataTypes\n\tfor(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}}// Or just use first one\n\tfinalDataType=finalDataType||firstDataType;}// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "title": "" }, { "docid": "222801db63d552a509f38e64adc77e03", "score": "0.79932857", "text": "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process\n\twhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}}// Check if we're dealing with a known content-type\n\tif(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}// Check to see if we have a response for the expected dataType\n\tif(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{// Try convertible dataTypes\n\tfor(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}}// Or just use first one\n\tfinalDataType=finalDataType||firstDataType;}// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "title": "" }, { "docid": "3da0f3c7c809785d365c5065a0cb0f26", "score": "0.7955797", "text": "function ajaxHandleResponses(s,jqXHR,responses){var firstDataType,ct,finalDataType,type,contents=s.contents,dataTypes=s.dataTypes; // Remove auto dataType and get content-type in the process\n\twhile(dataTypes[0] === \"*\") {dataTypes.shift();if(ct === undefined){ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");}} // Check if we're dealing with a known content-type\n\tif(ct){for(type in contents) {if(contents[type] && contents[type].test(ct)){dataTypes.unshift(type);break;}}} // Check to see if we have a response for the expected dataType\n\tif(dataTypes[0] in responses){finalDataType = dataTypes[0];}else { // Try convertible dataTypes\n\tfor(type in responses) {if(!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]){finalDataType = type;break;}if(!firstDataType){firstDataType = type;}} // Or just use first one\n\tfinalDataType = finalDataType || firstDataType;} // If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif(finalDataType){if(finalDataType !== dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "title": "" }, { "docid": "d0e61c138f23fe33967b678629c24119", "score": "0.7949884", "text": "function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process\n\t\twhile(dataTypes[0]===\"*\"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader(\"Content-Type\");}}// Check if we're dealing with a known content-type\n\t\tif(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}// Check to see if we have a response for the expected dataType\n\t\tif(dataTypes[0]in responses){finalDataType=dataTypes[0];}else{// Try convertible dataTypes\n\t\tfor(type in responses){if(!dataTypes[0]||s.converters[type+\" \"+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}}// Or just use first one\n\t\tfinalDataType=finalDataType||firstDataType;}// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}", "title": "" }, { "docid": "3f057569ecccf45815ca6bf92aa8fb39", "score": "0.7849322", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n var ct, type, finalDataType, firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes,\n responseFields = s.responseFields;\n\n // Fill responseXXX fields\n for ( type in responseFields ) {\n if ( type in responses ) {\n jqXHR[ responseFields[type] ] = responses[ type ];\n }\n }\n\n // Remove auto dataType and get content-type in the process\n while( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n }\n }\n\n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n}", "title": "" }, { "docid": "9352a832251a88bc7e7cbb4baa606497", "score": "0.78345317", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t \n\t \tvar contents = s.contents,\n\t \t\tdataTypes = s.dataTypes,\n\t \t\tresponseFields = s.responseFields,\n\t \t\tct,\n\t \t\ttype,\n\t \t\tfinalDataType,\n\t \t\tfirstDataType;\n\t \n\t \t// Fill responseXXX fields\n\t \tfor ( type in responseFields ) {\n\t \t\tif ( type in responses ) {\n\t \t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t \t\t}\n\t \t}\n\t \n\t \t// Remove auto dataType and get content-type in the process\n\t \twhile( dataTypes[ 0 ] === \"*\" ) {\n\t \t\tdataTypes.shift();\n\t \t\tif ( ct === undefined ) {\n\t \t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t \t\t}\n\t \t}\n\t \n\t \t// Check if we're dealing with a known content-type\n\t \tif ( ct ) {\n\t \t\tfor ( type in contents ) {\n\t \t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t \t\t\t\tdataTypes.unshift( type );\n\t \t\t\t\tbreak;\n\t \t\t\t}\n\t \t\t}\n\t \t}\n\t \n\t \t// Check to see if we have a response for the expected dataType\n\t \tif ( dataTypes[ 0 ] in responses ) {\n\t \t\tfinalDataType = dataTypes[ 0 ];\n\t \t} else {\n\t \t\t// Try convertible dataTypes\n\t \t\tfor ( type in responses ) {\n\t \t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t \t\t\t\tfinalDataType = type;\n\t \t\t\t\tbreak;\n\t \t\t\t}\n\t \t\t\tif ( !firstDataType ) {\n\t \t\t\t\tfirstDataType = type;\n\t \t\t\t}\n\t \t\t}\n\t \t\t// Or just use first one\n\t \t\tfinalDataType = finalDataType || firstDataType;\n\t \t}\n\t \n\t \t// If we found a dataType\n\t \t// We add the dataType to the list if needed\n\t \t// and return the corresponding response\n\t \tif ( finalDataType ) {\n\t \t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t \t\t\tdataTypes.unshift( finalDataType );\n\t \t\t}\n\t \t\treturn responses[ finalDataType ];\n\t \t}\n\t }", "title": "" }, { "docid": "f9dd6b3806edce10db935e6b80d1590b", "score": "0.77820903", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n \n var ct, type, finalDataType, firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes;\n \n // Remove auto dataType and get content-type in the process\n while ( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n }\n }\n \n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n \n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n \n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n \n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n \n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n }", "title": "" }, { "docid": "5be571987f39a9a6589b8ac20cbae6f6", "score": "0.7766533", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\r\n\tvar firstDataType, ct, finalDataType, type,\r\n\t\tcontents = s.contents,\r\n\t\tdataTypes = s.dataTypes;\r\n\r\n\t// Remove auto dataType and get content-type in the process\r\n\twhile( dataTypes[ 0 ] === \"*\" ) {\r\n\t\tdataTypes.shift();\r\n\t\tif ( ct === undefined ) {\r\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\r\n\t\t}\r\n\t}\r\n\r\n\t// Check if we're dealing with a known content-type\r\n\tif ( ct ) {\r\n\t\tfor ( type in contents ) {\r\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\r\n\t\t\t\tdataTypes.unshift( type );\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Check to see if we have a response for the expected dataType\r\n\tif ( dataTypes[ 0 ] in responses ) {\r\n\t\tfinalDataType = dataTypes[ 0 ];\r\n\t} else {\r\n\t\t// Try convertible dataTypes\r\n\t\tfor ( type in responses ) {\r\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\r\n\t\t\t\tfinalDataType = type;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif ( !firstDataType ) {\r\n\t\t\t\tfirstDataType = type;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Or just use first one\r\n\t\tfinalDataType = finalDataType || firstDataType;\r\n\t}\r\n\r\n\t// If we found a dataType\r\n\t// We add the dataType to the list if needed\r\n\t// and return the corresponding response\r\n\tif ( finalDataType ) {\r\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\r\n\t\t\tdataTypes.unshift( finalDataType );\r\n\t\t}\r\n\t\treturn responses[ finalDataType ];\r\n\t}\r\n}", "title": "" }, { "docid": "e40f0d4d6be86d0974c2fd00561d3f34", "score": "0.7765225", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\r\n\tvar firstDataType, ct, finalDataType, type,\r\n\t\tcontents = s.contents,\r\n\t\tdataTypes = s.dataTypes;\r\n\r\n\t// Remove auto dataType and get content-type in the process\r\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\r\n\t\tdataTypes.shift();\r\n\t\tif ( ct === undefined ) {\r\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\r\n\t\t}\r\n\t}\r\n\r\n\t// Check if we're dealing with a known content-type\r\n\tif ( ct ) {\r\n\t\tfor ( type in contents ) {\r\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\r\n\t\t\t\tdataTypes.unshift( type );\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Check to see if we have a response for the expected dataType\r\n\tif ( dataTypes[ 0 ] in responses ) {\r\n\t\tfinalDataType = dataTypes[ 0 ];\r\n\t} else {\r\n\t\t// Try convertible dataTypes\r\n\t\tfor ( type in responses ) {\r\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\r\n\t\t\t\tfinalDataType = type;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif ( !firstDataType ) {\r\n\t\t\t\tfirstDataType = type;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Or just use first one\r\n\t\tfinalDataType = finalDataType || firstDataType;\r\n\t}\r\n\r\n\t// If we found a dataType\r\n\t// We add the dataType to the list if needed\r\n\t// and return the corresponding response\r\n\tif ( finalDataType ) {\r\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\r\n\t\t\tdataTypes.unshift( finalDataType );\r\n\t\t}\r\n\t\treturn responses[ finalDataType ];\r\n\t}\r\n}", "title": "" }, { "docid": "6985ee8fc137faf77db1fb8b182a09a1", "score": "0.7762426", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\t\tcontents = s.contents,\n\t\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t\t// Remove auto dataType and get content-type in the process\n\t\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\t\tdataTypes.shift();\n\t\t\t\tif ( ct === undefined ) {\n\t\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Check if we're dealing with a known content-type\n\t\t\tif ( ct ) {\n\t\t\t\tfor ( type in contents ) {\n\t\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Check to see if we have a response for the expected dataType\n\t\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t\t} else {\n\t\n\t\t\t\t// Try convertible dataTypes\n\t\t\t\tfor ( type in responses ) {\n\t\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\t\tfirstDataType = type;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\t// Or just use first one\n\t\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t\t}\n\t\n\t\t\t// If we found a dataType\n\t\t\t// We add the dataType to the list if needed\n\t\t\t// and return the corresponding response\n\t\t\tif ( finalDataType ) {\n\t\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t\t}\n\t\t\t\treturn responses[ finalDataType ];\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5b650fb4f57a1a3287051ab93c8c44c6", "score": "0.7760677", "text": "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct, type, finalDataType, firstDataType, contents = s.contents, dataTypes = s.dataTypes;\n // Remove auto dataType and get content-type in the process\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n // Check if we're dealing with a known content-type\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n }\n // Check to see if we have a response for the expected dataType\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n }\n else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n if (!firstDataType) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n return responses[finalDataType];\n }\n }", "title": "" }, { "docid": "4a3b138fda2581cfb5583971ab7d4dd6", "score": "0.7758577", "text": "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct,\n type,\n finalDataType,\n firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n } // Check if we're dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }", "title": "" }, { "docid": "a205333b6b042e4f8f7d1e269c3ba493", "score": "0.77573156", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "a205333b6b042e4f8f7d1e269c3ba493", "score": "0.77573156", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "a205333b6b042e4f8f7d1e269c3ba493", "score": "0.77573156", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "a205333b6b042e4f8f7d1e269c3ba493", "score": "0.77573156", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "a205333b6b042e4f8f7d1e269c3ba493", "score": "0.77573156", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "a205333b6b042e4f8f7d1e269c3ba493", "score": "0.77573156", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\tvar firstDataType, ct, finalDataType, type,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "d60e058c4829147f9cc75a0338c8cbfe", "score": "0.77520674", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar contents = s.contents,\n\t\t\tdataTypes = s.dataTypes,\n\t\t\tresponseFields = s.responseFields,\n\t\t\tct,\n\t\t\ttype,\n\t\t\tfinalDataType,\n\t\t\tfirstDataType;\n\t\n\t\t// Fill responseXXX fields\n\t\tfor ( type in responseFields ) {\n\t\t\tif ( type in responses ) {\n\t\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t\t}\n\t\t}\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "title": "" }, { "docid": "7508135ac5b4ff843ff14eb665b9ecdc", "score": "0.77388144", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\r\n\r\n\tvar ct, type, finalDataType, firstDataType,\r\n\t\tcontents = s.contents,\r\n\t\tdataTypes = s.dataTypes;\r\n\r\n\t// Remove auto dataType and get content-type in the process\r\n\twhile( dataTypes[ 0 ] === \"*\" ) {\r\n\t\tdataTypes.shift();\r\n\t\tif ( ct === undefined ) {\r\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\r\n\t\t}\r\n\t}\r\n\r\n\t// Check if we're dealing with a known content-type\r\n\tif ( ct ) {\r\n\t\tfor ( type in contents ) {\r\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\r\n\t\t\t\tdataTypes.unshift( type );\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Check to see if we have a response for the expected dataType\r\n\tif ( dataTypes[ 0 ] in responses ) {\r\n\t\tfinalDataType = dataTypes[ 0 ];\r\n\t} else {\r\n\t\t// Try convertible dataTypes\r\n\t\tfor ( type in responses ) {\r\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\r\n\t\t\t\tfinalDataType = type;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif ( !firstDataType ) {\r\n\t\t\t\tfirstDataType = type;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Or just use first one\r\n\t\tfinalDataType = finalDataType || firstDataType;\r\n\t}\r\n\r\n\t// If we found a dataType\r\n\t// We add the dataType to the list if needed\r\n\t// and return the corresponding response\r\n\tif ( finalDataType ) {\r\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\r\n\t\t\tdataTypes.unshift( finalDataType );\r\n\t\t}\r\n\t\treturn responses[ finalDataType ];\r\n\t}\r\n}", "title": "" }, { "docid": "a6631f238864cf379e2e9742384d346d", "score": "0.7736218", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes,\n\t\t\tresponseFields = s.responseFields;\n\n\t\t// Fill responseXXX fields\n\t\tfor ( type in responseFields ) {\n\t\t\tif ( type in responses ) {\n\t\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t\t}\n\t\t}\n\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "title": "" }, { "docid": "0f19610fce4c6781917f69ca071bd19e", "score": "0.77360874", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "0f19610fce4c6781917f69ca071bd19e", "score": "0.77360874", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "0f19610fce4c6781917f69ca071bd19e", "score": "0.77360874", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "0f19610fce4c6781917f69ca071bd19e", "score": "0.77360874", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "0f19610fce4c6781917f69ca071bd19e", "score": "0.77360874", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "0f19610fce4c6781917f69ca071bd19e", "score": "0.77360874", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "0f19610fce4c6781917f69ca071bd19e", "score": "0.77360874", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "0f19610fce4c6781917f69ca071bd19e", "score": "0.77360874", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "0f19610fce4c6781917f69ca071bd19e", "score": "0.77360874", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "0f19610fce4c6781917f69ca071bd19e", "score": "0.77360874", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "0f19610fce4c6781917f69ca071bd19e", "score": "0.77360874", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "0f19610fce4c6781917f69ca071bd19e", "score": "0.77360874", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "0f19610fce4c6781917f69ca071bd19e", "score": "0.77360874", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "0f19610fce4c6781917f69ca071bd19e", "score": "0.77360874", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "2db189fcbd87aaa07d5a82cccff74696", "score": "0.7734746", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "a9d6f0f5b1b5a259b443f4fed1d23d81", "score": "0.77340204", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\r\n\r\n\tvar ct, type, finalDataType, firstDataType,\r\n\t\tcontents = s.contents,\r\n\t\tdataTypes = s.dataTypes;\r\n\r\n\t// Remove auto dataType and get content-type in the process\r\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\r\n\t\tdataTypes.shift();\r\n\t\tif ( ct === undefined ) {\r\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\r\n\t\t}\r\n\t}\r\n\r\n\t// Check if we're dealing with a known content-type\r\n\tif ( ct ) {\r\n\t\tfor ( type in contents ) {\r\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\r\n\t\t\t\tdataTypes.unshift( type );\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Check to see if we have a response for the expected dataType\r\n\tif ( dataTypes[ 0 ] in responses ) {\r\n\t\tfinalDataType = dataTypes[ 0 ];\r\n\t} else {\r\n\r\n\t\t// Try convertible dataTypes\r\n\t\tfor ( type in responses ) {\r\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\r\n\t\t\t\tfinalDataType = type;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif ( !firstDataType ) {\r\n\t\t\t\tfirstDataType = type;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Or just use first one\r\n\t\tfinalDataType = finalDataType || firstDataType;\r\n\t}\r\n\r\n\t// If we found a dataType\r\n\t// We add the dataType to the list if needed\r\n\t// and return the corresponding response\r\n\tif ( finalDataType ) {\r\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\r\n\t\t\tdataTypes.unshift( finalDataType );\r\n\t\t}\r\n\t\treturn responses[ finalDataType ];\r\n\t}\r\n}", "title": "" }, { "docid": "a9d6f0f5b1b5a259b443f4fed1d23d81", "score": "0.77340204", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\r\n\r\n\tvar ct, type, finalDataType, firstDataType,\r\n\t\tcontents = s.contents,\r\n\t\tdataTypes = s.dataTypes;\r\n\r\n\t// Remove auto dataType and get content-type in the process\r\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\r\n\t\tdataTypes.shift();\r\n\t\tif ( ct === undefined ) {\r\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\r\n\t\t}\r\n\t}\r\n\r\n\t// Check if we're dealing with a known content-type\r\n\tif ( ct ) {\r\n\t\tfor ( type in contents ) {\r\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\r\n\t\t\t\tdataTypes.unshift( type );\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Check to see if we have a response for the expected dataType\r\n\tif ( dataTypes[ 0 ] in responses ) {\r\n\t\tfinalDataType = dataTypes[ 0 ];\r\n\t} else {\r\n\r\n\t\t// Try convertible dataTypes\r\n\t\tfor ( type in responses ) {\r\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\r\n\t\t\t\tfinalDataType = type;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif ( !firstDataType ) {\r\n\t\t\t\tfirstDataType = type;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Or just use first one\r\n\t\tfinalDataType = finalDataType || firstDataType;\r\n\t}\r\n\r\n\t// If we found a dataType\r\n\t// We add the dataType to the list if needed\r\n\t// and return the corresponding response\r\n\tif ( finalDataType ) {\r\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\r\n\t\t\tdataTypes.unshift( finalDataType );\r\n\t\t}\r\n\t\treturn responses[ finalDataType ];\r\n\t}\r\n}", "title": "" }, { "docid": "5d6eb80b4a272f0c14bf535a757509d8", "score": "0.7731152", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar contents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields,\n\t\tct,\n\t\ttype,\n\t\tfinalDataType,\n\t\tfirstDataType;\n\n\t// Fill responseXXX fields\n\tfor( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "5d6eb80b4a272f0c14bf535a757509d8", "score": "0.7731152", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar contents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields,\n\t\tct,\n\t\ttype,\n\t\tfinalDataType,\n\t\tfirstDataType;\n\n\t// Fill responseXXX fields\n\tfor( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "5d6eb80b4a272f0c14bf535a757509d8", "score": "0.7731152", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar contents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields,\n\t\tct,\n\t\ttype,\n\t\tfinalDataType,\n\t\tfirstDataType;\n\n\t// Fill responseXXX fields\n\tfor( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "76679e7092294e7e95f978bd5b5e0bc4", "score": "0.7728864", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\t\tvar contents = s.contents,\n\t\t\tdataTypes = s.dataTypes,\n\t\t\tresponseFields = s.responseFields,\n\t\t\tct,\n\t\t\ttype,\n\t\t\tfinalDataType,\n\t\t\tfirstDataType;\n\n\t\t// Fill responseXXX fields\n\t\tfor ( type in responseFields ) {\n\t\t\tif ( type in responses ) {\n\t\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t\t}\n\t\t}\n\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "title": "" }, { "docid": "fadbc3d050ff648416652ed5ecf815a1", "score": "0.77280253", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n var ct, type, finalDataType, firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while ( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n }\n }\n\n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n\n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n}", "title": "" }, { "docid": "e4ee11fb96f9343f3f7225e006fddf81", "score": "0.7727131", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar contents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields,\n\t\tct,\n\t\ttype,\n\t\tfinalDataType,\n\t\tfirstDataType;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "e4ee11fb96f9343f3f7225e006fddf81", "score": "0.7727131", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar contents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields,\n\t\tct,\n\t\ttype,\n\t\tfinalDataType,\n\t\tfirstDataType;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "e4ee11fb96f9343f3f7225e006fddf81", "score": "0.7727131", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar contents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields,\n\t\tct,\n\t\ttype,\n\t\tfinalDataType,\n\t\tfirstDataType;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "e4ee11fb96f9343f3f7225e006fddf81", "score": "0.7727131", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar contents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields,\n\t\tct,\n\t\ttype,\n\t\tfinalDataType,\n\t\tfirstDataType;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "e4ee11fb96f9343f3f7225e006fddf81", "score": "0.7727131", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar contents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields,\n\t\tct,\n\t\ttype,\n\t\tfinalDataType,\n\t\tfirstDataType;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "e4ee11fb96f9343f3f7225e006fddf81", "score": "0.7727131", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar contents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields,\n\t\tct,\n\t\ttype,\n\t\tfinalDataType,\n\t\tfirstDataType;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "e4ee11fb96f9343f3f7225e006fddf81", "score": "0.7727131", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar contents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields,\n\t\tct,\n\t\ttype,\n\t\tfinalDataType,\n\t\tfirstDataType;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "e4ee11fb96f9343f3f7225e006fddf81", "score": "0.7727131", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar contents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields,\n\t\tct,\n\t\ttype,\n\t\tfinalDataType,\n\t\tfirstDataType;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "e4ee11fb96f9343f3f7225e006fddf81", "score": "0.7727131", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar contents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields,\n\t\tct,\n\t\ttype,\n\t\tfinalDataType,\n\t\tfirstDataType;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "e4ee11fb96f9343f3f7225e006fddf81", "score": "0.7727131", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar contents = s.contents,\n\t\tdataTypes = s.dataTypes,\n\t\tresponseFields = s.responseFields,\n\t\tct,\n\t\ttype,\n\t\tfinalDataType,\n\t\tfirstDataType;\n\n\t// Fill responseXXX fields\n\tfor ( type in responseFields ) {\n\t\tif ( type in responses ) {\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\n\t\t}\n\t}\n\n\t// Remove auto dataType and get content-type in the process\n\twhile( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"content-type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}", "title": "" }, { "docid": "f4800bc740193a951d752e8218e93341", "score": "0.7726118", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n \n \tvar ct, type, finalDataType, firstDataType,\n \t\tcontents = s.contents,\n \t\tdataTypes = s.dataTypes;\n \n \t// Remove auto dataType and get content-type in the process\n \twhile ( dataTypes[ 0 ] === \"*\" ) {\n \t\tdataTypes.shift();\n \t\tif ( ct === undefined ) {\n \t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n \t\t}\n \t}\n \n \t// Check if we're dealing with a known content-type\n \tif ( ct ) {\n \t\tfor ( type in contents ) {\n \t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n \t\t\t\tdataTypes.unshift( type );\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n \n \t// Check to see if we have a response for the expected dataType\n \tif ( dataTypes[ 0 ] in responses ) {\n \t\tfinalDataType = dataTypes[ 0 ];\n \t} else {\n \t\t// Try convertible dataTypes\n \t\tfor ( type in responses ) {\n \t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n \t\t\t\tfinalDataType = type;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t\tif ( !firstDataType ) {\n \t\t\t\tfirstDataType = type;\n \t\t\t}\n \t\t}\n \t\t// Or just use first one\n \t\tfinalDataType = finalDataType || firstDataType;\n \t}\n \n \t// If we found a dataType\n \t// We add the dataType to the list if needed\n \t// and return the corresponding response\n \tif ( finalDataType ) {\n \t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n \t\t\tdataTypes.unshift( finalDataType );\n \t\t}\n \t\treturn responses[ finalDataType ];\n \t}\n }", "title": "" }, { "docid": "7772062ef567d3c1325bbbed71228c04", "score": "0.77220154", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n var firstDataType, ct, finalDataType, type,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while ( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n }", "title": "" }, { "docid": "edd67acfaf5db7dea1f624792e664524", "score": "0.77072865", "text": "function ajaxHandleResponses(s, jqXHR, responses) {\n\n var ct, type, finalDataType, firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n if (!firstDataType) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n return responses[finalDataType];\n }\n }", "title": "" }, { "docid": "9b008157e21ae0c0575ac6d7d835248f", "score": "0.77072257", "text": "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct, type, finalDataType, firstDataType, contents = s.contents, dataTypes = s.dataTypes;\n // Remove auto dataType and get content-type in the process\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n // Check if we're dealing with a known content-type\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n }\n // Check to see if we have a response for the expected dataType\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n }\n else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n if (!firstDataType) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n return responses[finalDataType];\n }\n }", "title": "" }, { "docid": "1885bd37af0a2335bca2d7d2a8c75956", "score": "0.77035236", "text": "function ajaxHandleResponses(s, jqXHR, responses) {\n var firstDataType, ct, finalDataType, type,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n if (!firstDataType) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n return responses[finalDataType];\n }\n }", "title": "" }, { "docid": "dc282e0334840ec4ac58ae7dd42b11d9", "score": "0.7699605", "text": "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct,\n type,\n finalDataType,\n firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n } // Check if we're dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }", "title": "" }, { "docid": "dc282e0334840ec4ac58ae7dd42b11d9", "score": "0.7699605", "text": "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct,\n type,\n finalDataType,\n firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n } // Check if we're dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }", "title": "" }, { "docid": "dc282e0334840ec4ac58ae7dd42b11d9", "score": "0.7699605", "text": "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct,\n type,\n finalDataType,\n firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n } // Check if we're dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }", "title": "" }, { "docid": "dc282e0334840ec4ac58ae7dd42b11d9", "score": "0.7699605", "text": "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct,\n type,\n finalDataType,\n firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n } // Check if we're dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }", "title": "" }, { "docid": "dc282e0334840ec4ac58ae7dd42b11d9", "score": "0.7699605", "text": "function ajaxHandleResponses(s, jqXHR, responses) {\n var ct,\n type,\n finalDataType,\n firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process\n\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n } // Check if we're dealing with a known content-type\n\n\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n } // Check to see if we have a response for the expected dataType\n\n\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n\n if (!firstDataType) {\n firstDataType = type;\n }\n } // Or just use first one\n\n\n finalDataType = finalDataType || firstDataType;\n } // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n\n\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n\n return responses[finalDataType];\n }\n }", "title": "" }, { "docid": "a5d63cfd32387c4df77b4214ba635ef9", "score": "0.7698672", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n var ct, type, finalDataType, firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while ( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n }\n }\n\n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n\n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n }", "title": "" }, { "docid": "a5d63cfd32387c4df77b4214ba635ef9", "score": "0.7698672", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n var ct, type, finalDataType, firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while ( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n }\n }\n\n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n\n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n }", "title": "" }, { "docid": "ef3cedd4af5e9bc97e5fc7b0c47b49bb", "score": "0.7691926", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n var ct, type, finalDataType, firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while ( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n}", "title": "" }, { "docid": "056012c47e5f2aa913f22b1225a35b38", "score": "0.76867914", "text": "function ajaxHandleResponses(s, jqXHR, responses) {\r\n\r\n var ct, type, finalDataType, firstDataType,\r\n contents = s.contents,\r\n dataTypes = s.dataTypes;\r\n\r\n // Remove auto dataType and get content-type in the process\r\n while(dataTypes[0] === \"*\") {\r\n dataTypes.shift();\r\n if(ct === undefined) {\r\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\r\n }\r\n }\r\n\r\n // Check if we're dealing with a known content-type\r\n if(ct) {\r\n for(type in contents) {\r\n if(contents[type] && contents[type].test(ct)) {\r\n dataTypes.unshift(type);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // Check to see if we have a response for the expected dataType\r\n if(dataTypes[0] in responses) {\r\n finalDataType = dataTypes[0];\r\n } else {\r\n // Try convertible dataTypes\r\n for(type in responses) {\r\n if(!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\r\n finalDataType = type;\r\n break;\r\n }\r\n if(!firstDataType) {\r\n firstDataType = type;\r\n }\r\n }\r\n // Or just use first one\r\n finalDataType = finalDataType || firstDataType;\r\n }\r\n\r\n // If we found a dataType\r\n // We add the dataType to the list if needed\r\n // and return the corresponding response\r\n if(finalDataType) {\r\n if(finalDataType !== dataTypes[0]) {\r\n dataTypes.unshift(finalDataType);\r\n }\r\n return responses[finalDataType];\r\n }\r\n }", "title": "" }, { "docid": "2f10474f96cd52c8354eeff7872a4e5a", "score": "0.7685509", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n var firstDataType, ct, finalDataType, type,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while ( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n}", "title": "" }, { "docid": "2f10474f96cd52c8354eeff7872a4e5a", "score": "0.7685509", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n var firstDataType, ct, finalDataType, type,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while ( dataTypes[ 0 ] === \"*\" ) {\n dataTypes.shift();\n if ( ct === undefined ) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if ( ct ) {\n for ( type in contents ) {\n if ( contents[ type ] && contents[ type ].test( ct ) ) {\n dataTypes.unshift( type );\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if ( dataTypes[ 0 ] in responses ) {\n finalDataType = dataTypes[ 0 ];\n } else {\n // Try convertible dataTypes\n for ( type in responses ) {\n if ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n finalDataType = type;\n break;\n }\n if ( !firstDataType ) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if ( finalDataType ) {\n if ( finalDataType !== dataTypes[ 0 ] ) {\n dataTypes.unshift( finalDataType );\n }\n return responses[ finalDataType ];\n }\n}", "title": "" }, { "docid": "dbbcdf46ad473aa6bdb5fd81ea0b63da", "score": "0.7680954", "text": "function ajaxHandleResponses(s, jqXHR, responses) {\n\n var ct, type, finalDataType, firstDataType, contents = s.contents, dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if (dataTypes[0]in responses) {\n finalDataType = dataTypes[0];\n } else {\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n if (!firstDataType) {\n firstDataType = type;\n }\n }\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n return responses[finalDataType];\n }\n }", "title": "" }, { "docid": "e21ed7aac22fd3d52346087ef147fe52", "score": "0.7680545", "text": "function ajaxHandleResponses(s, jqXHR, responses) {\n\n var ct, type, finalDataType, firstDataType,\n contents = s.contents,\n dataTypes = s.dataTypes;\n\n // Remove auto dataType and get content-type in the process\n while (dataTypes[0] === \"*\") {\n dataTypes.shift();\n if (ct === undefined) {\n ct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n }\n }\n\n // Check if we're dealing with a known content-type\n if (ct) {\n for (type in contents) {\n if (contents[type] && contents[type].test(ct)) {\n dataTypes.unshift(type);\n break;\n }\n }\n }\n\n // Check to see if we have a response for the expected dataType\n if (dataTypes[0] in responses) {\n finalDataType = dataTypes[0];\n } else {\n\n // Try convertible dataTypes\n for (type in responses) {\n if (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n finalDataType = type;\n break;\n }\n if (!firstDataType) {\n firstDataType = type;\n }\n }\n\n // Or just use first one\n finalDataType = finalDataType || firstDataType;\n }\n\n // If we found a dataType\n // We add the dataType to the list if needed\n // and return the corresponding response\n if (finalDataType) {\n if (finalDataType !== dataTypes[0]) {\n dataTypes.unshift(finalDataType);\n }\n return responses[finalDataType];\n }\n }", "title": "" }, { "docid": "e80e0f84cef097975df4fe8349c8dc43", "score": "0.7680265", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\n \tvar ct, type, finalDataType, firstDataType,\n \t\tcontents = s.contents,\n \t\tdataTypes = s.dataTypes;\n\n \t// Remove auto dataType and get content-type in the process\n \twhile ( dataTypes[ 0 ] === \"*\" ) {\n \t\tdataTypes.shift();\n \t\tif ( ct === undefined ) {\n \t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n \t\t}\n \t}\n\n \t// Check if we're dealing with a known content-type\n \tif ( ct ) {\n \t\tfor ( type in contents ) {\n \t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n \t\t\t\tdataTypes.unshift( type );\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n\n \t// Check to see if we have a response for the expected dataType\n \tif ( dataTypes[ 0 ] in responses ) {\n \t\tfinalDataType = dataTypes[ 0 ];\n \t} else {\n\n \t\t// Try convertible dataTypes\n \t\tfor ( type in responses ) {\n \t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n \t\t\t\tfinalDataType = type;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t\tif ( !firstDataType ) {\n \t\t\t\tfirstDataType = type;\n \t\t\t}\n \t\t}\n\n \t\t// Or just use first one\n \t\tfinalDataType = finalDataType || firstDataType;\n \t}\n\n \t// If we found a dataType\n \t// We add the dataType to the list if needed\n \t// and return the corresponding response\n \tif ( finalDataType ) {\n \t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n \t\t\tdataTypes.unshift( finalDataType );\n \t\t}\n \t\treturn responses[ finalDataType ];\n \t}\n }", "title": "" }, { "docid": "c657280a7204366ae84f938094d08b5a", "score": "0.76802504", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "title": "" }, { "docid": "8cace3e0d32bb3f23a4ecf7a51e19e8d", "score": "0.76787263", "text": "function ajaxHandleResponses(s, jqXHR, responses) {\n\n\t\t\t\tvar ct,\n\t\t\t\t type,\n\t\t\t\t finalDataType,\n\t\t\t\t firstDataType,\n\t\t\t\t contents = s.contents,\n\t\t\t\t dataTypes = s.dataTypes;\n\n\t\t\t\t// Remove auto dataType and get content-type in the process\n\t\t\t\twhile (dataTypes[0] === \"*\") {\n\t\t\t\t\tdataTypes.shift();\n\t\t\t\t\tif (ct === undefined) {\n\t\t\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Check if we're dealing with a known content-type\n\t\t\t\tif (ct) {\n\t\t\t\t\tfor (type in contents) {\n\t\t\t\t\t\tif (contents[type] && contents[type].test(ct)) {\n\t\t\t\t\t\t\tdataTypes.unshift(type);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Check to see if we have a response for the expected dataType\n\t\t\t\tif (dataTypes[0] in responses) {\n\t\t\t\t\tfinalDataType = dataTypes[0];\n\t\t\t\t} else {\n\n\t\t\t\t\t// Try convertible dataTypes\n\t\t\t\t\tfor (type in responses) {\n\t\t\t\t\t\tif (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n\t\t\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!firstDataType) {\n\t\t\t\t\t\t\tfirstDataType = type;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Or just use first one\n\t\t\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t\t\t}\n\n\t\t\t\t// If we found a dataType\n\t\t\t\t// We add the dataType to the list if needed\n\t\t\t\t// and return the corresponding response\n\t\t\t\tif (finalDataType) {\n\t\t\t\t\tif (finalDataType !== dataTypes[0]) {\n\t\t\t\t\t\tdataTypes.unshift(finalDataType);\n\t\t\t\t\t}\n\t\t\t\t\treturn responses[finalDataType];\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "23107952670f1dfe3a111ceb6b6155c5", "score": "0.7675338", "text": "function ajaxHandleResponses(s, jqXHR, responses) {\n\n\t\t\tvar ct,\n\t\t\t type,\n\t\t\t finalDataType,\n\t\t\t firstDataType,\n\t\t\t contents = s.contents,\n\t\t\t dataTypes = s.dataTypes;\n\n\t\t\t// Remove auto dataType and get content-type in the process\n\t\t\twhile (dataTypes[0] === \"*\") {\n\t\t\t\tdataTypes.shift();\n\t\t\t\tif (ct === undefined) {\n\t\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check if we're dealing with a known content-type\n\t\t\tif (ct) {\n\t\t\t\tfor (type in contents) {\n\t\t\t\t\tif (contents[type] && contents[type].test(ct)) {\n\t\t\t\t\t\tdataTypes.unshift(type);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check to see if we have a response for the expected dataType\n\t\t\tif (dataTypes[0] in responses) {\n\t\t\t\tfinalDataType = dataTypes[0];\n\t\t\t} else {\n\t\t\t\t// Try convertible dataTypes\n\t\t\t\tfor (type in responses) {\n\t\t\t\t\tif (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n\t\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (!firstDataType) {\n\t\t\t\t\t\tfirstDataType = type;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Or just use first one\n\t\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t\t}\n\n\t\t\t// If we found a dataType\n\t\t\t// We add the dataType to the list if needed\n\t\t\t// and return the corresponding response\n\t\t\tif (finalDataType) {\n\t\t\t\tif (finalDataType !== dataTypes[0]) {\n\t\t\t\t\tdataTypes.unshift(finalDataType);\n\t\t\t\t}\n\t\t\t\treturn responses[finalDataType];\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "87b6ee412d1c6e0295485f82f555928e", "score": "0.7675156", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\tvar firstDataType, ct, finalDataType, type,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "title": "" }, { "docid": "e7e11af6b8ddda2e53041fb3a474dbfc", "score": "0.7674009", "text": "function ajaxHandleResponses(s, jqXHR, responses) {\n\n\t\t\tvar ct,\n\t\t\t type,\n\t\t\t finalDataType,\n\t\t\t firstDataType,\n\t\t\t contents = s.contents,\n\t\t\t dataTypes = s.dataTypes;\n\n\t\t\t// Remove auto dataType and get content-type in the process\n\t\t\twhile (dataTypes[0] === \"*\") {\n\t\t\t\tdataTypes.shift();\n\t\t\t\tif (ct === undefined) {\n\t\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check if we're dealing with a known content-type\n\t\t\tif (ct) {\n\t\t\t\tfor (type in contents) {\n\t\t\t\t\tif (contents[type] && contents[type].test(ct)) {\n\t\t\t\t\t\tdataTypes.unshift(type);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check to see if we have a response for the expected dataType\n\t\t\tif (dataTypes[0] in responses) {\n\t\t\t\tfinalDataType = dataTypes[0];\n\t\t\t} else {\n\n\t\t\t\t// Try convertible dataTypes\n\t\t\t\tfor (type in responses) {\n\t\t\t\t\tif (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n\t\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (!firstDataType) {\n\t\t\t\t\t\tfirstDataType = type;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Or just use first one\n\t\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t\t}\n\n\t\t\t// If we found a dataType\n\t\t\t// We add the dataType to the list if needed\n\t\t\t// and return the corresponding response\n\t\t\tif (finalDataType) {\n\t\t\t\tif (finalDataType !== dataTypes[0]) {\n\t\t\t\t\tdataTypes.unshift(finalDataType);\n\t\t\t\t}\n\t\t\t\treturn responses[finalDataType];\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e7e11af6b8ddda2e53041fb3a474dbfc", "score": "0.7674009", "text": "function ajaxHandleResponses(s, jqXHR, responses) {\n\n\t\t\tvar ct,\n\t\t\t type,\n\t\t\t finalDataType,\n\t\t\t firstDataType,\n\t\t\t contents = s.contents,\n\t\t\t dataTypes = s.dataTypes;\n\n\t\t\t// Remove auto dataType and get content-type in the process\n\t\t\twhile (dataTypes[0] === \"*\") {\n\t\t\t\tdataTypes.shift();\n\t\t\t\tif (ct === undefined) {\n\t\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check if we're dealing with a known content-type\n\t\t\tif (ct) {\n\t\t\t\tfor (type in contents) {\n\t\t\t\t\tif (contents[type] && contents[type].test(ct)) {\n\t\t\t\t\t\tdataTypes.unshift(type);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check to see if we have a response for the expected dataType\n\t\t\tif (dataTypes[0] in responses) {\n\t\t\t\tfinalDataType = dataTypes[0];\n\t\t\t} else {\n\n\t\t\t\t// Try convertible dataTypes\n\t\t\t\tfor (type in responses) {\n\t\t\t\t\tif (!dataTypes[0] || s.converters[type + \" \" + dataTypes[0]]) {\n\t\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (!firstDataType) {\n\t\t\t\t\t\tfirstDataType = type;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Or just use first one\n\t\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t\t}\n\n\t\t\t// If we found a dataType\n\t\t\t// We add the dataType to the list if needed\n\t\t\t// and return the corresponding response\n\t\t\tif (finalDataType) {\n\t\t\t\tif (finalDataType !== dataTypes[0]) {\n\t\t\t\t\tdataTypes.unshift(finalDataType);\n\t\t\t\t}\n\t\t\t\treturn responses[finalDataType];\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "72471823a93ae1d457b424cc42ccfa11", "score": "0.7668118", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "title": "" }, { "docid": "72471823a93ae1d457b424cc42ccfa11", "score": "0.7668118", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "title": "" }, { "docid": "72471823a93ae1d457b424cc42ccfa11", "score": "0.7668118", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "title": "" }, { "docid": "72471823a93ae1d457b424cc42ccfa11", "score": "0.7668118", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "title": "" }, { "docid": "72471823a93ae1d457b424cc42ccfa11", "score": "0.7668118", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "title": "" }, { "docid": "72471823a93ae1d457b424cc42ccfa11", "score": "0.7668118", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "title": "" }, { "docid": "72471823a93ae1d457b424cc42ccfa11", "score": "0.7668118", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "title": "" }, { "docid": "72471823a93ae1d457b424cc42ccfa11", "score": "0.7668118", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "title": "" }, { "docid": "72471823a93ae1d457b424cc42ccfa11", "score": "0.7668118", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "title": "" }, { "docid": "72471823a93ae1d457b424cc42ccfa11", "score": "0.7668118", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "title": "" }, { "docid": "72471823a93ae1d457b424cc42ccfa11", "score": "0.7668118", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "title": "" }, { "docid": "72471823a93ae1d457b424cc42ccfa11", "score": "0.7668118", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "title": "" }, { "docid": "72471823a93ae1d457b424cc42ccfa11", "score": "0.7668118", "text": "function ajaxHandleResponses( s, jqXHR, responses ) {\n\t\n\t\tvar ct, type, finalDataType, firstDataType,\n\t\t\tcontents = s.contents,\n\t\t\tdataTypes = s.dataTypes;\n\t\n\t\t// Remove auto dataType and get content-type in the process\n\t\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\t\tdataTypes.shift();\n\t\t\tif ( ct === undefined ) {\n\t\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t\t}\n\t\t}\n\t\n\t\t// Check if we're dealing with a known content-type\n\t\tif ( ct ) {\n\t\t\tfor ( type in contents ) {\n\t\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\t\tdataTypes.unshift( type );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t// Check to see if we have a response for the expected dataType\n\t\tif ( dataTypes[ 0 ] in responses ) {\n\t\t\tfinalDataType = dataTypes[ 0 ];\n\t\t} else {\n\t\n\t\t\t// Try convertible dataTypes\n\t\t\tfor ( type in responses ) {\n\t\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\t\tfinalDataType = type;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !firstDataType ) {\n\t\t\t\t\tfirstDataType = type;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Or just use first one\n\t\t\tfinalDataType = finalDataType || firstDataType;\n\t\t}\n\t\n\t\t// If we found a dataType\n\t\t// We add the dataType to the list if needed\n\t\t// and return the corresponding response\n\t\tif ( finalDataType ) {\n\t\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\t\tdataTypes.unshift( finalDataType );\n\t\t\t}\n\t\t\treturn responses[ finalDataType ];\n\t\t}\n\t}", "title": "" } ]
42bd30235cbc1f376acebf2658ff714c
displays player's final score on the page
[ { "docid": "32eef52ed672564760eb3a4f430b5c3a", "score": "0.0", "text": "function showScore(){\n $('.question-content').empty();\n var newSection = $('div');\n $(\".score-button\").append($('<h2>Correct Answers: ' + correctAnswers + '</h2>'));\n $(\".score-button\").append($('<h2>Wrong Answers: ' + wrongAnswers + '</h2>'));\n $(\".score-button\").append($('<h2>Unanswered Questions: ' + unAnsweredQuestions + '</h2>'));\n $(\".score-button\").append($('<button class=\"btn btn-primary btn-lg restart-game\">Restart Game</button>'));\n $('.restart-game').on(\"click\", restartGame);\n }", "title": "" } ]
[ { "docid": "b7d8fd2472f2d93f21e480fb63498582", "score": "0.7994788", "text": "function finishPageScr() {\n let _userScore = document.getElementById(\"finalScore\");\n _userScore.innerHTML = `${userScore} pts`;\n}", "title": "" }, { "docid": "85693bf852fad8590bdccc545f36f419", "score": "0.76836866", "text": "function finalScore() {\n $(\"span#finalScore\").text(\"Your Final Score is \" + score);\n }", "title": "" }, { "docid": "5839fca7e07861fa473122489e028843", "score": "0.7589896", "text": "function showFinalScore(){\n STORE.setAppState('end-view');\n renderView(STORE.getAppState());\n replayQuiz();\n console.log('`showFinalScore` ran');\n}", "title": "" }, { "docid": "487b63dfadf5ca1bf232c9ec260bab7e", "score": "0.75430334", "text": "function renderHighestScore() {\n var player = pastPlayers[pastPlayers.length - 1];\n\n $(\"#highest-score-message\").html(`Nickname: ${player.nickname} <br> Topic: ${player.category} <br> Highest Score: ${player.score}`);\n}", "title": "" }, { "docid": "4cf955c6e097cbd5bbfcd1e53bf71314", "score": "0.75273997", "text": "function updateScore()\n {\n $('#playerScore').html(playerScore);\n $('#compScore').html(compScore);\n }", "title": "" }, { "docid": "34b5fc4e4cb37ab18d72f1db675ba9f2", "score": "0.7500438", "text": "function updateScore() {\n $('#score').html(\"Score: \" + score);\n }", "title": "" }, { "docid": "6684c7fbebe4cf39f901f9a1b6dac606", "score": "0.74154025", "text": "function updateScore() {\n scoreboard.innerHTML = player.score();\n }", "title": "" }, { "docid": "43c6f4c99965991fb96191348cb49b6c", "score": "0.74083006", "text": "function totalScore() {\n $(\"#total-score\").text(total);\n }", "title": "" }, { "docid": "2cda08ddc3cd6869afeeeaba2385e6f4", "score": "0.7390076", "text": "function updateScore() {\n player.incrementScore();\n document.getElementById(\"score\").innerHTML = \"<strong>Score:</strong> \" + player.getScore();\n }", "title": "" }, { "docid": "b2cfbfa1cbba803c886008c1f89cb742", "score": "0.7354252", "text": "function displayScore() {\n userScore.textContent = win;\n computerScore.textContent = loss; \n draftScore.textContent = draft;\n}", "title": "" }, { "docid": "d0c9a58bcf104d13d6239576c9d4dd9b", "score": "0.7341658", "text": "function displayScore () {\n lastScore = JSON.parse(localStorage.getItem(\"Score\"))\n finalScore.textContent = lastScore\n}", "title": "" }, { "docid": "875e3d644719dbaca95673f4f35b4d62", "score": "0.7334103", "text": "function updateScoreDisplay()\n\t{\n\t\t$(\"#score-display\").html(score);\n\t}", "title": "" }, { "docid": "6a3f84621effaec48a3a3345635ef7d5", "score": "0.7325621", "text": "function showFinalScore(){\n renderView(appState);\n replayQuiz();\n console.log('`showFinalScore` ran');\n}", "title": "" }, { "docid": "9628a4e1f242a568b1947aca692caa68", "score": "0.73209447", "text": "function displayScore() {\n //Tallied score display construction\n $(\"#display_score_text\").text(\"Your score is \");\n $(\"#display_score_number\").text(tally);\n\n $quizPanel.hide();\n $endingPanel.show();\n }", "title": "" }, { "docid": "e6ddaee094980839763fb9cdc120be23", "score": "0.72780305", "text": "function updateUserScore() {\n $('.score').html(`<i>Your score</i>: ${userScore}`)\n }", "title": "" }, { "docid": "8d3f843ba6672dfec051737f5cabfb9a", "score": "0.72639495", "text": "function showScore(){\n \n $(\"#GameEnd\").show();\n $(\"#correct\").text(correct);\n $(\"#wrong\").text(wrong);\n $(\"#no\").text(no);\n\n }", "title": "" }, { "docid": "421e8f37c1b8f1dfa7bc1cdb1012b817", "score": "0.7263651", "text": "function UpdateScoreDisplay(){\n players.forEach(function(player){\n player.display.innerHTML = `${player.score}pts`\n })\n}", "title": "" }, { "docid": "02a4d61bf5335b59dfbb1522b371667e", "score": "0.7253037", "text": "function scoreDisplay(player) {\n if(player.name == 'Player 1') {\n $('#player-one').text(player.score);\n } else {\n $('#player-two').text(player.score);\n }\n}", "title": "" }, { "docid": "a1f88dd8117465e89556e6f09a1ba637", "score": "0.7246471", "text": "displayScore() {\n const scoreHtml = document.querySelector('.app-score');\n scoreHtml.innerHTML = score.toString();\n }", "title": "" }, { "docid": "a0be54abc11ae0f2e7544e82fc14ec89", "score": "0.72462493", "text": "function updateScoreDisplay() {\n $('#currentScore').text(currentScore);\n $('#highScore').text(highScore);\n }", "title": "" }, { "docid": "68fe3ea3c3816749ccdb7f0020ff4bed", "score": "0.724013", "text": "function result(){\r\n document.getElementById('p-score').textContent = player;\r\n document.getElementById('c-score').textContent = com;\r\n}", "title": "" }, { "docid": "5450ff754fe56f9b3b9c647a56629abd", "score": "0.72359854", "text": "function updateScore(){\r\n\tgame_score.innerHTML = \"Score:\" + player_score.toString();\r\n}", "title": "" }, { "docid": "8000c58a7f53253e969ced794ec7c793", "score": "0.72276765", "text": "function printScore() {\n var score = scores[thisPlayer.id];\n var scoreStr = \"Largest Size: \" + score;\n document.getElementById(\"score\").innerHTML = scoreStr;\n}", "title": "" }, { "docid": "8c2fc994867b5d0ab99d5cf7abeae67c", "score": "0.72126335", "text": "function updateScore(){\n\t$(\"#player-one-score\").html(players[0].pileValue());\n\t$(\"#player-two-score\").html(players[1].pileValue());\n}", "title": "" }, { "docid": "68ee9f5c10b19f3dab34c8208f28b23b", "score": "0.720992", "text": "function updateScore() {\n\t$(\"div#score\").empty();\n\tif(game.you%2==0) {\n\t\t$(\"div#score\").html(\"Your team: \"+game.team1P+\"<br>\"+\"Opponent team: \"+game.team2P);\n\t}\n\telse {\n\t\t$(\"div#score\").html(\"Your team: \"+game.team2P+\"<br>\"+\"Opponent team: \"+game.team1P);\n\t}\n}", "title": "" }, { "docid": "cd5e71da250f727d47c79f4fb4711d3b", "score": "0.72016245", "text": "function updateScore(){\n\n $('#scoreSpan').text(playerScore);\n updateRemainingTiles();\n\n}", "title": "" }, { "docid": "0e0d6fc473dfab7440a6351300547d21", "score": "0.7199877", "text": "function updateScore() {\n correctDisplay.text(\"Correct: \" + correctAnswers);\n incorrectDisplay.text(\"Incorrect: \" + incorrectAnswers);\n timedOutDisplay.text(\"Unanswered: \" + timedOutAnswers);\n}", "title": "" }, { "docid": "0fe4ce6a58fccb6a631a51662e9aae19", "score": "0.71955097", "text": "function updateScore() {\n\t\tdocument.querySelector(\"#scoreboard\").innerHTML = \"Score: \" + score;\n}", "title": "" }, { "docid": "b27bf18f8afe22278fcab6ab45e2d820", "score": "0.7195473", "text": "function userScore() {\n console.log(\"Total score: \" + userNumber);\n $(\".total-score\").text(userNumber);\n }", "title": "" }, { "docid": "cc9af03075795b392f01968992b113d5", "score": "0.71953", "text": "function displayScore() {\n\t\tif(score == -1)\n\t\t\t$('#score').text('--');\n\t\telse\n\t\t\t$('#score').text(toDoubleDigits(score));\n\t}", "title": "" }, { "docid": "6dba7c12617c08fe04c337690974b5c5", "score": "0.71892685", "text": "function showScore()\r\n{\r\n getCurrentScoreFromServer();\r\n}", "title": "" }, { "docid": "fe563d8893191293aa94f2f97cad458c", "score": "0.7188423", "text": "function showResults(){\n console.log('Final Score: ', score);\n console.log('Thanks for Playing!');\n\n calculateRank();\n}", "title": "" }, { "docid": "e60c94559e1f7dfe0fc67613a6e82d57", "score": "0.7177827", "text": "function getFinalScore(score, counter) { return \"Your final score is \" + score + \" out of \" + counter + \". \"; }", "title": "" }, { "docid": "e60c94559e1f7dfe0fc67613a6e82d57", "score": "0.7177827", "text": "function getFinalScore(score, counter) { return \"Your final score is \" + score + \" out of \" + counter + \". \"; }", "title": "" }, { "docid": "45a52fd4d38025e28a4645ce32a5d65c", "score": "0.71699446", "text": "function displayFinalQuizResults() {\n showPageNumber(4);\n $(\".final-score\").text(`You got ${state.correctScore}/10 Correct`);\n if (state.correctScore >= 8) {\n $(\".final-message\").text(\"You're a hair ROCKSTAR!!\");\n } else if\n (state.correctScore >= 4) {\n $(\".final-message\").text(\"You need some help, start talking to your stylist about your hair needs during your appointment\");\n } else {\n $(\".final-message\").text(\"You're in need of some serious hair 101. Fire your stylist, they should be educating you on some of these things\");\n }\n }", "title": "" }, { "docid": "7c8f066d9c626b8cd756880c943b390f", "score": "0.7165606", "text": "function loadScoreView() {\n const finalScore = gameSession.getScore() < 0 ? 0 : gameSession.getScore();\n $(\"#score-container\").text(finalScore);\n hideLoader();\n centerScore();\n}", "title": "" }, { "docid": "c35cffcb848e503bb9c23ed6eba8d2d9", "score": "0.71544623", "text": "function updateScore() {\n document.querySelector(\"#user-wins\").innerHTML = \"Score: \" + score;\n}", "title": "" }, { "docid": "db99c49d053eea6cc3881cebe36b0d4e", "score": "0.7148397", "text": "function showResult() {\n\n if (playerScore > computerScore) {\n\n console.log(`Good Job! You Won! \\nPlayer: ${playerScore} | Computer: ${computerScore}`);\n\n } else if (playerScore < computerScore) {\n\n console.log(`You Suck! You Lost! \\nPlayer: ${playerScore} | Computer: ${computerScore}`);\n\n }\n }", "title": "" }, { "docid": "632379f4845f9fb728c605a83cf9f772", "score": "0.714236", "text": "function updatePlayersScoreFunction () {\n displayInnerHTML(\"player_one_score\", ` <span class=\"big_font_2\"> ${playerOneName.value}'s (${playerOneText}) Score </span> : <span class=\"big_font_1\"> ${playerOneScore} </span> `) //\n displayInnerHTML(\"player_two_score\", ` <span class=\"big_font_2\"> ${playerTwoName.value}'s (${playerTwoText}) Score </span> : <span class=\"big_font_1\"> ${playerTwoScore} </span> `)\n}", "title": "" }, { "docid": "5adc7da5bd97ea6b0ea04ccec97d8081", "score": "0.71325034", "text": "function score() {\n\n totalScore = 0;\n $(\"#totalScore\").html(\"Your Score : \" + totalScore);\n\n}", "title": "" }, { "docid": "11bcb1c388ee148acb189f73d657ba92", "score": "0.713212", "text": "function updateScore() {\n userScore.textContent = `${playerScore}`;\n botScore.textContent = `${computerScore}`;\n}", "title": "" }, { "docid": "492850e66f4f85cc7071c270c0725f93", "score": "0.71288866", "text": "function finalResult() {\n console.log('`finalResult` ran');\n $('.final').removeClass('hidden');\n if (score<5) {\n $('.final h2').text('You need a lot of improvement!!');\n } else if ((score>=5)&&(score<8)) {\n $('.final h2').text('You need to watch more episodes of Cosmos!');\n } else {\n $('.final h2').text('You are ready for space exploration!');\n }\n $('.final span').text(score);\n}", "title": "" }, { "docid": "8d20a29e3b983771d4e79bfe9e4e6430", "score": "0.7128303", "text": "function showScore(){\n $(\"#score\").text(gamepoints);\n}", "title": "" }, { "docid": "ea3d2d888f24df5d6b264c6a012aa6f4", "score": "0.7124649", "text": "function displayTotalScore(score) {\r\n const totalScoreboard = document.getElementById(\"score\")\r\n totalScoreboard.innerHTML = `${score}`\r\n}", "title": "" }, { "docid": "b0f891f048882952c748172f4c143167", "score": "0.7104803", "text": "function renderScore () {\n\t \tvar score = +player.score;\n\n\t \tctx.fillText(score, 375, 493);\n\n\t }", "title": "" }, { "docid": "bc309cc6fb574b90a9be88ed43c534b6", "score": "0.70922416", "text": "function updateScoreboard() {\n $(\"#displayComputerScore\").text(computerScore);\n $(\"#displayUserScore\").text(userScore);\n $(\"#displayWinCount\").text(winCount);\n $(\"#displayLossCount\").text(lossCount);\n }", "title": "" }, { "docid": "868175bad2491cb84e8ae535a73f9570", "score": "0.70710915", "text": "function updateScore() {\n\tplayerScore++;\n\ttally.innerHTML = playerScore;\n}", "title": "" }, { "docid": "b3614c80fa84dcd3dc8052c1c9334019", "score": "0.7054885", "text": "function updateScore () {\n changeScore();\n $('.score').text(score);\n}", "title": "" }, { "docid": "5617e88866798b6e4796d9a5760c4e64", "score": "0.7048979", "text": "function displayScore() {\n\tvar score = $('<p>', {\n\t\tid : 'question'\n\t});\n\n\tvar numCorrect = 0;\n\tfor (var i = 0; i < selections.length; i++) {\n\t\tif (selections[i] === questions[i].correctAnswer) {\n\t\t\tnumCorrect++;\n\t\t}\n\t}\n\n\tscore.append('You got ' + numCorrect + ' questions out of '\n\t\t\t+ questions.length + ' right!!!');\n\tvar finalScore = numCorrect/questions.length*100;\n\t\n\tscore.append('<p> That is '+ finalScore.toFixed()+'%');\n\t\n\treturn score;\n}", "title": "" }, { "docid": "b9f7d121ebfbeca821d9597acac51b7a", "score": "0.7029607", "text": "function printScore() {\n str = \"__**Current Leaderboard**__\\n\";\n players[msg.guild.id].sort(function (a, b) {\n return b.score - a.score;\n });\n for (i = 0; i < players[msg.guild.id].length; i++) {\n str += `${players[msg.guild.id][i].name}: ${\n players[msg.guild.id][i].score\n } points \\n`;\n }\n msg.channel.send({\n embed: {\n color: 3447003,\n description: `${str}`,\n },\n });\n }", "title": "" }, { "docid": "490e4f968aed5b07b23113fb188f5f01", "score": "0.702867", "text": "function updateScore() {\n score++;\n $('.score').text(score);\n }", "title": "" }, { "docid": "bb4d33f2861e7e10f59f7a8ff4bde2f7", "score": "0.7028554", "text": "function displayNext(){\n\tupdateScore();\n}", "title": "" }, { "docid": "43a30ef7d00c17a83e5e41fbdbca8366", "score": "0.7020034", "text": "function getFinalScore (score, counter) {\n return ' Your final score is ' + score + ' out of ' + counter + '. '\n}", "title": "" }, { "docid": "f5cb2d4f5695059e294be503124e2881", "score": "0.7018454", "text": "function GameOver(){\n var x = document.getElementById(\"final_score\")\n score = Level - 1\n // displays the user's score that they got //\n x.innerHTML = \"Final score: \" + score;\n ShowDiv(\"gameOver\")\n}", "title": "" }, { "docid": "efe1b97529a9f2e36713d93025e922b7", "score": "0.7010868", "text": "function updateScores() {\n playerCreditLabel.text = credit.toString();\n playerBetLabel.text = betAmount.toString();\n winsLabel.text = wins.toString();\n lossLabel.text = losses.toString();\n turnsLabel.text = turns.toString();\n}", "title": "" }, { "docid": "f2e6f75e49f43d99c6999cd7b7381f3e", "score": "0.7006751", "text": "function printScore() {\n document.getElementById(\"score\").textContent = score;\n}", "title": "" }, { "docid": "db7e5c1649a3b76dbefba0161950f564", "score": "0.70035005", "text": "function weScored(){\r\n gameScore ++ ;\r\n score.innerHTML = gameScore;\r\n console.log('wescore: ' + gameScore)\r\n}", "title": "" }, { "docid": "ca5e6c91d4c725ff445c596da68b610c", "score": "0.7002104", "text": "function showFinalScore() {\n \tdocument.getElementsByClassName('stats-stars')[0].textContent = starCounter + \" of 5\";\n \tdocument.getElementsByClassName('stats-moves')[0].textContent = numberOfMoves;\n \tdocument.getElementsByClassName('stats-time')[0].textContent = m +' m '+ s +' s';\n \tif (matchList.length == 16) {\n \t\topenModal();\n \t}\n}", "title": "" }, { "docid": "b39e755b44de194b44bc64de9e000fd0", "score": "0.6993241", "text": "function updateScoreText(){\n pScoreUI.textContent = (`Your score: ${playerScore}`);\n cScoreUI.textContent = (`Computer score: ${computerScore}`);\n\n\n}", "title": "" }, { "docid": "10d93d966195bd05ab9111ab95ce3471", "score": "0.699177", "text": "function updateTotalScore() {\n document.getElementById(\"totalScore\").innerHTML = \" \" + totalScore;\n}", "title": "" }, { "docid": "e70859498af35f2934ad8d6de7f8253c", "score": "0.6986899", "text": "function updatescore() {\np1score.text(player1wins)\np2score.text(player2wins)\n}", "title": "" }, { "docid": "ce1465b48a4aea50640289537be90eba", "score": "0.6986456", "text": "function updateScore() {\n $('.scoreboard').text('O: ' + winO + ' X: ' + winX + ' Draws: ' + drawCount);\n}", "title": "" }, { "docid": "6ca037c492bee1ce2d281c6385bd285f", "score": "0.69824064", "text": "function updateScore() {\n score++\n $('.score').text(score);\n }", "title": "" }, { "docid": "bbd08f10d70327bd1aff87a3def79721", "score": "0.6975874", "text": "function showFinalScore(){\n finalContainer.classList.add('hide')\n gameContainer.classList.add('hide')\n document.querySelector('.final-score').innerHTML = score\n finalContainer.classList.remove('hide')\n typeWriter()\n}", "title": "" }, { "docid": "eae41a15889aa3f325c73733cc12216b", "score": "0.697347", "text": "function updateScore(){\n const scoreAndCount = \n `<p class=\"question-count\">Question number: ${curIndex+1}/${STORE.length}</p>\n <p class=\"score\">Current Score: ${score}/${STORE.length}</p>`;\n $('.scoreUpdate').html(scoreAndCount);\n}", "title": "" }, { "docid": "d57294b563da96136b36c3ec0743d0fa", "score": "0.697181", "text": "function updateScore(score) {\n\t\tdocument.getElementById('score').innerHTML = score;\n\t}", "title": "" }, { "docid": "c976684304bc6b9031684b84c416b23e", "score": "0.69711924", "text": "function updateScore () { // btw typing only 'updateScore' in the console returns everything in here e.g. echos it. must add ();\n\n\tdocument.getElementById('user-score').innerHTML = userWins;\n\tdocument.getElementById('computer-score').innerHTML = compWins; \n\n\t// test: see if it adds up\n\t// console.log(userWins, compWins);\n} // need to pass this back into click function", "title": "" }, { "docid": "d69fd673f06b7bd694395456c9d0110e", "score": "0.69702893", "text": "function calculateFinalScore() {\n\t\n\t// Player score = rescue score (10 points for each rescued packet) + download bonus (1 point for each second)\n\tendScore = score + (toInt(downloaded));\n}", "title": "" }, { "docid": "960fc546aaca2b23719a3c4499243f9d", "score": "0.6969457", "text": "function displayScore() {\n text(\"Score: \" + wall.Count, width - width/7, height/8);\n}", "title": "" }, { "docid": "9bca6c7c8e96e22cc1cad992f688ea29", "score": "0.6969247", "text": "function display () {\n $(\"#computerScore\").html(\"The computer's score is \" + computerScore);\n $(\"#userScore\").html(\"Your score is \" + userScore);\n}", "title": "" }, { "docid": "56a902cf4843bdf6d252ad332fc85c18", "score": "0.69528526", "text": "function finalScore(){\n playAgainClearTime();\n totalScore.textContent = \"Your Score: \" + score;\n questionSection.style.display = \"none\";\n scoreInfo.style.display = \"block\";\n}", "title": "" }, { "docid": "d106c76d942e7092bd556e922fee3d9e", "score": "0.69469273", "text": "function scoring() {\n\n if (turns % 2 === 1 && playerpick === ans) {\n p1Points++;\n $(\"#p1Score\").text(p1Points);\n\n } else if (turns % 2 === 0 && playerpick === ans) {\n p2Points++;\n $(\"#p2Score\").text(p2Points);\n }\n }", "title": "" }, { "docid": "b31838e80f1c321c58c9c074a1883d5b", "score": "0.69455206", "text": "function displayScore() {\n $('#title.card-header').html(\"Resultados obtenidos\");\n var score = $('<p>', {id: 'question'});\n score.append('De click en \"Guardar\" para ver el resultado de su pre-test.'); \n \n return score;\n }", "title": "" }, { "docid": "35055a94debfebe64c759fc2057ffb4b", "score": "0.6945043", "text": "function score() {\n correct++;\n $(\"#correct\").empty().append(correct + \" out of 10\");\n wrong = 10 - correct;\n $(\"#wrong\").empty().append(wrong + \" out of 10\");\n let score = (correct / 10) * 100;\n $(\"#score\").empty().append(score + \"%\");\n }", "title": "" }, { "docid": "fc4dc5753558a47f58507c37a552f0bd", "score": "0.69381106", "text": "function donePage() {\n if (timer === 0) {\n score = 0;\n }\n else {\n score = timer;\n }\n\n var verbiage = (\"Your score is: \" + score);\n totalScore.innerHTML = verbiage;\n\n /*Hiding the result from last question, timer countdown, and questions and showing the form to type\n the users initials */\n player.setAttribute(\"class\", \"high-score\");\n finalResult.setAttribute(\"class\", \"remove\");\n countDown.setAttribute(\"class\", \"remove\");\n question.setAttribute(\"class\", \"remove\");\n \n //Adding verbiage to tell the user to enter their initials. This is also overwritting the answer buttons//\n setScore.innerHTML = \"Enter your initials\"; \n}", "title": "" }, { "docid": "efa96b4ad96d7e15cecdcd66d45c2bdb", "score": "0.69227874", "text": "function updateScore() {\n $(\"#score\").text(score);\n}", "title": "" }, { "docid": "f2abdaa61b92e70ae4dbefca43eaec2a", "score": "0.69172066", "text": "function finalScore() {\n return ((score/questions.length) * 100);\n}", "title": "" }, { "docid": "c97326b3f80401faeb40483145edff5b", "score": "0.6909023", "text": "function S_Total_Score(){\n\tSESSION.total_score = finalGameInfo.gamescore;\n}", "title": "" }, { "docid": "7881b562e090ff0d951a518dd2d2bf85", "score": "0.69053066", "text": "function updateScore(){\n if(playerTurn === 1){\n playerOneScore++;\n $(\".p1Score\").text(playerOneScore);\n } else {\n playerTwoScore++;\n $(\".p2Score\").text(playerTwoScore);\n }\n }", "title": "" }, { "docid": "d3615308a1364e00ceda0dd4438ade25", "score": "0.69044286", "text": "updateVictoryScore() {\n document.getElementById(\"victory-score\").innerHTML = Number(g_game._player._kill_nb * 10 + g_game._player._coins * 10);\n }", "title": "" }, { "docid": "432f8fb5f7a7be38a78713d764ed2c3c", "score": "0.6903201", "text": "function sendFinalScore() {\n\tlet sumTotalTime = questionTotalTimeArr;\n\tlet sum = sumTotalTime.reduce(function(a, b) { return a + b; }, 0);\n\tlet nickname = document.getElementById('nickname').innerHTML;\n\tlet gameMode = 'binair';\n\n\tlet finalScore = sum + ' ' + questionScoreArr + ' ' + nickname + ' ' + gameMode;\n\n\twindow.location.href = '../php/send.php?score=' + finalScore;\n}", "title": "" }, { "docid": "9cc87020baa232cfa972cf36b6325350", "score": "0.68910426", "text": "function displayScore() {\n // create a score table.\n var Answers = $(\"<h4>Correct Answers: \" + correctCount + \"</h4><br><h4>Incorrect Answers: \" + incorrectCount + \"</h4><br>\")\n //display some score correct and not notCorrect shits.\n $(\"#triviaHTML\").append(Answers);\n }", "title": "" }, { "docid": "64c3ab2571019dbd5aad10f1d5a402c9", "score": "0.6882719", "text": "function fetchResult() {\n var fetchEmotion = playerEmotion;\n var fetchplayerScore = playerScore;\n document.getElementById(\"myScore\").innerText = `Your score is ${fetchplayerScore}`;\n document.getElementById(\"myEmotion\").innerText = `You are now feeling ${fetchEmotion}`;\n }", "title": "" }, { "docid": "ab41f24a3c2793e6ddcbeab95730bcfa", "score": "0.68779", "text": "function finalScore () {\n fScore.textContent = \"The final score was \" + timeRemaining;\n\n}", "title": "" }, { "docid": "b2c54d66d880eda01a4bbcc322cb8645", "score": "0.68765104", "text": "function updateScoreboard() {\n playerScore.textContent = playerCount;\n compScore.textContent = computerCount;\n}", "title": "" }, { "docid": "5c337e62d95a1a88dd755a309abca6f5", "score": "0.6873806", "text": "function finalMessage() {\n if (score === 12) {\n $result.html(`<p>Absolute perfection! You are a weed and D&D connoisseur. There is no greater calling.</p>`)\n } else if (score >= 7 && score < 12) {\n $result.html(`<p>Amazing! you must play a lot of D&D and smoke a lot of weed. Or you're just good at guessing.</p>`)\n } else if (score >= 4 && score < 7) {\n $result.html(`<p>Hmm. That's really not very good, is it? You can do better. Try again!</p>`)\n } else {\n $result.html(`<p>Yikes. You should probably try this again when you aren't stoned.</p>`)\n }\n }", "title": "" }, { "docid": "1f950550c21de6eec9f4d7011d1bd2e9", "score": "0.68730104", "text": "function updateWinningScore() {\n document.getElementById(\"winningScore\").innerHTML = \"Score to Match: \" + winningScore;\n}", "title": "" }, { "docid": "e0ee8e857fcc7ccc40689e5e067867a8", "score": "0.68690217", "text": "function playerScoring() {\n playerScore = 0;\n for (let i = 0; i < player.length; i++) {\n playerScore += player[i].score;\n }\n for (let i = 0; i < player.length; i++) {\n if (player[i].value === \"A\" && playerScore >= 11) {\n playerScore += 1;\n } else if (player[i].value === \"A\" && playerScore < 11) {\n playerScore += 11;\n }\n }\n\n $(\"#player-score\").html(`<h1>${playerScore}</h1>`).css(\"font-size\", \"12px\");\n return playerScore;\n}", "title": "" }, { "docid": "749a860fbaf549de33366d99c7e4a362", "score": "0.68600214", "text": "function displayResults(playerScore, computerScore) {\n\t\t\tpScore.textContent = `Your score: ${playerScore}`;\n\t\t\tcScore.textContent = `Computer's score: ${computerScore}`;\n\t\t\tresultsContainer.appendChild(pScore);\n\t\t\tresultsContainer.appendChild(cScore);\t\n\t\t\t}", "title": "" }, { "docid": "f6035eb31d56b2a30a6a4b878a0f415e", "score": "0.685302", "text": "function finalScreen() {\n\t\tgameHTML = \"<p class='text-center timer-p'>Time Remaining: <span class='timer'>\" + counter + \"</span></p>\" + \"<p class='text-center'>No more questions, here's your final score:\" + \"</p>\" + \"<p class='summary-correct'>Correct Answers: \" + correctTally + \"</p>\" + \"<p>Wrong Answers: \" + incorrectTally + \"</p>\" + \"<p>Unanswered: \" + unansweredTally + \"</p>\" + \"<p class='text-center reset-button-container'><a class='btn btn-primary btn-lg btn-block reset-button' href='#' role='button'>Reset The Quiz!</a></p>\";\n\t\t$(\".mainArea\").html(gameHTML);\n\t}", "title": "" }, { "docid": "0acdec042b4b7b76f9386d6a33d6ef9d", "score": "0.68473214", "text": "scoreUpdate(){\r\n score = player.yChange\r\n scoreText.setText('Score: ' + Math.floor(score))\r\n \r\n }", "title": "" }, { "docid": "c1b3af3d061efc73bb71e7726eabea48", "score": "0.68433535", "text": "function displayWinner() {\r\n const scoreText = document.querySelector(\".Score\");\r\n\r\n if (lastPlayer === \"X\") {\r\n player.addPoint();\r\n lastPlayer = player.getName();\r\n } else {\r\n computer.addPoint();\r\n lastPlayer = computer.getName();\r\n }\r\n\r\n scoreText.innerHTML = `${player.getName()} Score: ${player.getScore()} \r\n ${computer.getName()} Score: ${computer.getScore()}`;\r\n }", "title": "" }, { "docid": "2ce0b8269a98ebbf41f5b2cadc45f228", "score": "0.6836436", "text": "function updateScore() {\n score += 1;\n scoreEl.innerText = score;\n}", "title": "" }, { "docid": "edccbcdee1e4db288f7fe8ecc9823cdb", "score": "0.6835002", "text": "function updateScore() {\n player.setScore(getScore()); // Assigns a new score to player.score\n\n /**\n * If the players new score is greater than the players highscore,\n * the players highscore becomes the players new score.\n */\n if (player.getScore() > player.getHighScore()) {\n player.setHighScore(player.getScore());\n }\n\n /**\n * If an account is logged in, the accounts highscore and ranks HTML content is updated.\n */\n if (getItem(2, 'loggedIn') !== null) {\n updateAccount();\n getElementById('rank').innerHTML = \"\" + JSON.parse(getItem(1, getLoggedIn()))['rank'];\n }\n\n /**\n * The HTML content for score and highscore is updated.\n */\n getElementById('score').innerHTML = \"\" + player.getScore();\n getElementById('highscore').innerHTML = \"\" + player.getHighScore();\n}", "title": "" }, { "docid": "1cb07a70305a41e890888f070273b243", "score": "0.68314254", "text": "function update() {\n\t$(\".total-score\").html(totalScore);\n\t$(\".random-number\").html(randomNumber);\n\t$(\".wins\").html(\"Wins: \" + winCount);\n\t$(\".losses\").html(\"Losses: \" + loseCount);\n}", "title": "" }, { "docid": "9ac55bb9d35f05b1adff72d0ab154b0d", "score": "0.68261355", "text": "function updateScore(){\n if (playerTurn === 0){\n playerTurn = 1\n playerOne++;\n document.getElementById('player-one-score').innerText = playerOne;\n } else {\n playerTurn = 0\n playerTwo++;\n document.getElementById('player-two-score').innerText = playerTwo;\n }\n }", "title": "" }, { "docid": "c4f249eab7c1a8acfd783f2cc1f89469", "score": "0.6825837", "text": "function printedInitialsAndScore() {\n printedScorePage.setAttribute(\"style\", \"display: block\");\n\n var lastUserInitials = JSON.parse(localStorage.getItem(\"userName\"));\n var finalSc = (finalScore.textContent = secondsLeft);\n scorePrinted.innerHTML = \"1.\" + \" \" + lastUserInitials + \" : \" + finalSc;\n}", "title": "" }, { "docid": "746e03c7d814228e4d576a68757f1a9b", "score": "0.681664", "text": "function updateScores() {\n\tif (ingame == true){\n\t\t$('#dealerScoreText').html(\"Dealer's Hand: ??\");\n\t} else \t\t$('#dealerScoreText').html(\"Dealer's Hand: \" + handValue(dealercards));\n\t$('#playerScoreText').html(\"Player's Hand: \" + handValue(playercards));\n}", "title": "" }, { "docid": "057073b61a402c81e53492b52005f5dd", "score": "0.68135685", "text": "function updateScore() {\n score++;\n $('.score').text(score);\n}", "title": "" }, { "docid": "057073b61a402c81e53492b52005f5dd", "score": "0.68135685", "text": "function updateScore() {\n score++;\n $('.score').text(score);\n}", "title": "" }, { "docid": "057073b61a402c81e53492b52005f5dd", "score": "0.68135685", "text": "function updateScore() {\n score++;\n $('.score').text(score);\n}", "title": "" } ]
2233990c8296c8589e9a66054ebf9779
Startup function called from html code to start program.
[ { "docid": "377979d78fa35cc28a3baa3fc15fbc82", "score": "0.0", "text": "function startup() {\n document.getElementById(\"phong-phong\").onclick = setPhongShader;\n //document.getElementById(\"gouraud-phong\").onclick = setGouraudShader;\n canvas = document.getElementById(\"myGLCanvas\");\n gl = createGLContext(canvas);\n setupShaders(\"shader-vs\",\"shader-fs\");\n setupBuffers();\n starting_balls();\n gl.clearColor(0.0, 0.0, 0.0, 1.0);\n gl.enable(gl.DEPTH_TEST);\n document.onkeydown = handleKeyDown;\n document.onkeyup = handleKeyUp;\n tick();\n}", "title": "" } ]
[ { "docid": "bfb3680b426aaa01ff128faa655fd50c", "score": "0.7358331", "text": "function main() {\n createStartPage();\n }", "title": "" }, { "docid": "2045f1c4bb22c2c65c51cdbf6e6a2392", "score": "0.6941749", "text": "function mainAppStartup(){\n //#1 - Create App Skeleton\n const windowOptions = {\n width: 1900,\n height : 1080,\n title: app.getName()\n }\n\n //#2 - Set app icon\n windowOptions.icon = path.join(__dirname, '/assets/app-icon/icon.png');\n\n //#3 - Create Main Window\n mainWindow = new BrowserWindow(windowOptions);\n\n //#4 - Load index html\n mainWindow.loadURL(url.format({\n pathname : path.join(__dirname, 'index.html'),\n protocol : 'file',\n slashes : true\n }));\n\n //#5 - Build Main Menu from Template\n const mainMenu = Menu.buildFromTemplate(mainMenuTemplate);\n //#5.1 - Load Main Menu\n Menu.setApplicationMenu(mainMenu);\n}", "title": "" }, { "docid": "63f3a30e93aff5d0453df2faeacba0f5", "score": "0.67090505", "text": "function Main() {\n //console.log(`%c App Started...`, \"font-weight: bold; font-size: 20px;\");\n\n insertHTML(\"/Views/partials/header.html\", \"header\");\n\n setPageContent(\"/Views/content/home.html\");\n\n insertHTML(\"/Views/partials/footer.html\", \"footer\");\n }", "title": "" }, { "docid": "d2427d51d96b25206dc26aa2d10fe388", "score": "0.6665334", "text": "function main()\n{\n\n\t//\tDebug confirmation - show that the script is installed\n\tconsole.log(\"Students First is running. I'm so sorry we have to do this...\");\n\n\t//\tBreak out of those frames!\n\tif (top.location!= self.location) {\n\t\ttop.location = self.location.href\n\t}\n\n\t//\tDetect the current page and take action! Action, I say!\n\tvar currentPage = getCurrentPage();\n\n\t//\tLog out the current page key\n\tconsole.log(\"[SF] Page Key: \" + currentPage);\n\n\tif(currentPage == pages[1])\n\t{\n\t\t//\tdefault - go to self service\n\t\tconsole.log('Default, redirecting....');\n\t\tgoToSelfService();\n\n\t}\n\telse if(currentPage == pages[2])\n\t{\n\t\t//\tself service\n\t\tmainMenu();\n\t\tdocument.getElementsByTagName(\"table\")[0].setAttribute(\"width\", \"960px\");\n\t\tdocument.getElementsByTagName(\"table\")[0].style.margin = \"auto\";\n\t}\n\telse if(currentPage == pages[3])\n\t{\n\t\t//\tLogin\n\t\tmainMenuLoginPage();\n\t}\n\telse if(currentPage == pages[4])\n\t{\n\t\t//\tClaim your ID page\n\t}\n\telse\n\t{\n\t\tmainMenu();\n\t}\n\n\t//\tInstall a fresh stylesheet\n\tinstallCSS();\n\n\t//\tClean up breadcrumbs and titles...\n\tcleanPage();\t\n\t\n\tretina();\n\n}", "title": "" }, { "docid": "70afee0e17d61ea2dadefc0d3af486bc", "score": "0.64832056", "text": "function Start() {\n // console.log(\n // `%c App Initializing...`,\n // \"font-weight: bold; font-size: 20px;\"\n // );\n\n Main();\n }", "title": "" }, { "docid": "f4a5e5c6868b8bb7c2ba52b8d4d1f007", "score": "0.6473021", "text": "function launchClientPage() {\n // Warn user if necessary about port mismatch.\n // This might happen if, for instance you run multiple self hosting applications with the same base port.\n // In that case, when launching apps where that port is already in use, exoskeleton will use next available port as actual.\n if (locations.WebServerListenPort != locations.WebServerActualPort) {\n console.Warn(\"Webserver actually started on port \" + locations.WebServerActualPort);\n console.log(\"Since the webserver started on a different port than 8080 \");\n console.log(\"The client page's ajax requests will not reach our service process function.\");\n console.log(\"Consider setting the 'WebServerListenPort' to an unused port in your settings file.\");\n console.log(\"You might also pass the actual port as a url parameter to client pages\");\n }\n\n window.open(\"client-testpage.htm\");\n}", "title": "" }, { "docid": "56793058be6874c57e80162d531d237a", "score": "0.6448433", "text": "function start(){\n mainpage();\n}", "title": "" }, { "docid": "92221683815a6c3cac98a6f7ea988168", "score": "0.63511425", "text": "function startApp() {\n const description =\n \"This application architects and builds a solution for managing a company's employees using node, inquirer, and MySQL.\";\n console.log(\n logo({\n name: config.name,\n font: \"Big\",\n logoColor: \"cyan\",\n borderColor: \"magenta\",\n })\n .emptyLine()\n .right(\"version 1.0.0\")\n .emptyLine()\n .center(description)\n .render()\n );\n startSearch();\n}", "title": "" }, { "docid": "f5f58250e79c2497be68fc694d88d911", "score": "0.6324611", "text": "function main() {\n\t\t\thtmlModule = new htmlUtil(); // View creation / HTML logic\n\t\t\tarrModule = new arrMethods(); // Array Method shortcuts\n\t\t\tmsg = htmlModule.msg; // Logging\n\t\t\tmsg.set(\"Starting Module\");\n\n\t\t\t// Setup Form.\n\t\t\tdigitForm();\n\t\t}", "title": "" }, { "docid": "b8cb75568ae41ef19649cec016b6077f", "score": "0.62804425", "text": "function start() {\n // Process squirrel update/install command line.\n if (process.platform === 'win32') {\n var SquirrelUpdate = require('./squirrel-update');\n var squirrelCommand = process.argv[1];\n if (SquirrelUpdate.handleStartupEvent(app, squirrelCommand)) {\n // If we processed one, quit right after.\n return false;\n }\n }\n\n settingsInit();\n windowInit();\n}", "title": "" }, { "docid": "eaf661ffeadca43153a465173331642c", "score": "0.62586266", "text": "function startup(){\n\n //Add a tray icon\n tray = new gui.Tray({ title: 'Simone', icon: 'green.png' });\n tray.on('click', function(){\n win.show();\n });\n win.tray = tray;\n\n\n //Hide the window\n function hide(){\n win.close();\n }\n\n // bind close event to propose to minimize\n win.on('close', function(){\n var r = confirm(\"Press Ok to really quit, Cancel to minimize (use systray icon to show the main window)\");\n if (r) {\n this.close(true);\n } else {\n this.hide();\n }\n });\n }", "title": "" }, { "docid": "172b432bcf4e55321bae4ea1506a743a", "score": "0.6201365", "text": "function main()\n{\t\n\n\tbasicSetup();\n\tcreateLight();\n\tcreateSun();\n\tcreatePlanets();\n\tstylizePlanets();\n\tcreateMoons();\n\tcreateBackground();\n\tsetupGui();\n\tsetupPlanetText();\n\tsetupRaycasting();\n\tcreateGitHubGui();\n\trender();\n\n\tintro = true\n\n}", "title": "" }, { "docid": "1acc1d176b99dd5c5796dfb4f93180f4", "score": "0.61958075", "text": "function startup() {\n\n var runtimeIframe = document.getElementById('runtime');\n try {\n\n configuration.init();\n if (configuration.debug) {\n Services.prefs.setBoolPref('browser.dom.window.dump.enabled', true);\n dump('baseline = ' + configuration.baseline.path + '\\n');\n dump('testroot = ' + configuration.testroot.path + '\\n');\n dump('diffdir = ' + configuration.diffdir.path + '\\n');\n dump('hostnames = ' + JSON.stringify(configuration.hostnames) + '\\n');\n }\n if (configuration.notests) {\n specter.exit(0);\n }\n\n var argv = configuration.args,\n argc = argv.length;\n\n if (argc === 0) {\n configuration.args.push(configuration.testroot.path);\n argv = configuration.args;\n argc = 1;\n }\n\n for (let i=0; i<argc; i++) {\n try {\n TestRunner.handleArg(argv[i]);\n } catch(ex) {\n specter.log(ex);\n }\n }\n TestRunner.run();\n }\n catch(ex) {\n specter.log(ex);\n //dumpStack(ex.stack);\n //Services.startup.quit(Components.interfaces.nsIAppStartup.eForceQuit);\n }\n}", "title": "" }, { "docid": "f9bda0109948136d160d72ef98781fbd", "score": "0.615759", "text": "function startup() {\n\tsaveSlot(111);\n\twrapper.scrollTop = 0;\n\tupdateMenu();\n\thideStuff();\n\tpreloadImages();\n\tif(localStorage.getItem('data110')) {\n\t\tloadSlot(110);\n\t}\n\telse{\n\t\tloadEvent('system', 'start');\n\t}\n\tbasicDefinitions();\n\tindexCheck();\n\tcheckForAchievements();\n}", "title": "" }, { "docid": "723cddb1862e07b1340dd94591985ea9", "score": "0.6144415", "text": "function main() {\n\t\t\thtmlModule = new htmlUtil(); // View creation / HTML logic\n\t\t\tarrModule = new arrMethods(); // Array Method shortcuts\n\t\t\tmsg = htmlModule.msg; // Logging\n\t\t\tmsg.set(\"Starting Module\");\n\n\t\t\t// Setup Form.\n\t\t\tsquareForm();\n\t\t}", "title": "" }, { "docid": "40086189e4bd8c1b64ab6dce61a8298a", "score": "0.61362183", "text": "function index() {\n\t\tcreateMainWin().open();\n\t}", "title": "" }, { "docid": "3b8f06d1e5d4b6ea23f0293ae196ed44", "score": "0.6097669", "text": "function questionStartup(){\r\n\tdocument.addEventListener('DOMContentLoaded', function(){\r\n\t\tgetPort();\r\n\t\tloadW3HTML();\t\r\n\t\tpopupClickLocation();\r\n\t\t//get user port number, show as user name\r\n\t\tgetUserName();\r\n\t}, false);\r\n}", "title": "" }, { "docid": "c14ceda228be037fd6f0cc9b5d8b685e", "score": "0.6091526", "text": "function startBrowser(){\n\tif(init){\n\t\taddress=init_address\n\t\tinit=false\n\t}\n\telse\n\t\taddress=''\n\tret = exec(startCommand + address,function(error, stdout, stderr){\n\t\tconsole.log('Errors: \\n'+error+'\\n Stdout: \\n'+stdout+'\\n Stderr: \\n'+stderr)\n\t});\n}", "title": "" }, { "docid": "a5d4deaab4e7982e43c8acf36072564a", "score": "0.6081759", "text": "async function start() {\n let templates;\n try {\n templates = await owl.utils.loadFile('app.xml');\n } catch (e) {\n console.error(`This app requires a static server. If you have python installed, try 'python app.py'`);\n return;\n }\n const env = { qweb: new owl.QWeb({ templates }) };\n owl.Component.env = env;\n await owl.utils.whenReady();\n app();\n}", "title": "" }, { "docid": "2021558c4bad8d0dbb6cab1fd809f201", "score": "0.60738194", "text": "function homeSetup() {}", "title": "" }, { "docid": "469a8d2488982183256ea22f0d593a41", "score": "0.60518956", "text": "function index() {\n createMainWin().open();\n }", "title": "" }, { "docid": "c700f38bb04a350aba6b210c12980b71", "score": "0.6028722", "text": "async function start() {\n let templates;\n try {\n templates = await owl.utils.loadFile('app.xml');\n } catch(e) {\n console.error(`This app requires a static server. If you have python installed, try 'python app.py'`);\n return;\n }\n const env = { qweb: new owl.QWeb({templates})};\n owl.Component.env = env;\n await owl.utils.whenReady();//start when all the utilities are ready\n app();\n}", "title": "" }, { "docid": "d0af6f4f723f4dc30ba003dcd72d4c08", "score": "0.6017753", "text": "function main() {\n SL.init();\n getUsername();\n setSocketListeners();\n // setButtons();\n }", "title": "" }, { "docid": "db6b7c8883b41624de2c71b005f44c9a", "score": "0.6008647", "text": "function initApplication() {\n Main();\n}", "title": "" }, { "docid": "98168783b84849f14420b9578e651eb6", "score": "0.5988973", "text": "function startup() {\n ui = new AppUI({\n buttonName: BUTTON_NAME,\n home: APP_UI_URL,\n // Robot by Oksana Latysheva from the Noun Project\n graphicsDirectory: Script.resolvePath(\"./tabletApp/images/icons/\"),\n onMessage: onMessage\n });\n Messages.messageReceived.connect(onTabletChannelMessageReceived);\n Messages.subscribe(ASSIGNMENT_CLIENT_MESSANGER_CHANNEL);\n Window.domainChanged.connect(onDomainChanged);\n Script.scriptEnding.connect(scriptEnding);\n\n getManagerStatus();\n }", "title": "" }, { "docid": "cba431d54c650f02af058bf177e9aca9", "score": "0.5933379", "text": "function initApp() {\n console.log(hello);\n home();\n}", "title": "" }, { "docid": "0d62ccfca224bdfe5df62f89be5b16a8", "score": "0.5920672", "text": "function runLsThenInput() {\n return runHtmlThenInput('\\n <b>index.html</b>\\n');\n }", "title": "" }, { "docid": "4d85551ae24437d65eee2d5611c3a785", "score": "0.5918007", "text": "function appStart() {\r\n\t$status.innerHTML = \"App ready!\";\r\n}", "title": "" }, { "docid": "a98ccf6695ebc0cccf38b350bceadaab", "score": "0.5906225", "text": "function startApp(){\n\t\t// getAllCountries();\n\t\tconst region = 'africa';\n\t\tconst countryCode = 'IS';\n\t\tinitAllCountries();\n\t\taddRegionButtons();\n\t\t// drawChart('Asia');\n\t// \tgetCountryByRegion(WORLD_WIDE);\n\t// try{\n\t// }catch(err){\n\t// \tconsole.log(err);\n\t// }\n}", "title": "" }, { "docid": "f3da2691757384d16c8e4630c193f41d", "score": "0.5878945", "text": "function startWebServer(){\n app.get('/', function(req, res){\n res.render('index', scrapeObj);\n });\n app.listen(8000);\n}", "title": "" }, { "docid": "4f0093701654d221266f4555fd78c104", "score": "0.5836591", "text": "function main(argv) // need to set the format of argv later\n{\n\n Run_Server();\n\n}", "title": "" }, { "docid": "def10f42de34e0e7b1f55a29870d4321", "score": "0.5833328", "text": "function startIDE() {\n\tlog(\"start.js: bootwifi callback arrived ... starting ide\");\n\tvar ide_webserver = require(\"ide_webserver.js\");\n\tlog(\"About to start ide_webserver()\");\n\tide_webserver();\n}", "title": "" }, { "docid": "5c52ef640c3bf6095e73fbcadc0042f4", "score": "0.5832516", "text": "function launcher(){//le lanceur du programme\n$.getJSON('ContentScreen/conf.json', function(json) {\n\t\tlogin = json[0].login;\n\t\tpassword = json[0].password;\n\t\tbaseUrl = json[0].baseUrl;\n\t}).done(function() {\n\t\tsetIdentification(login, password, baseUrl);\n\t\t$(document).ready(function() {\n\t\t\tinitDocument();\n\t\t});\n\t});\n}", "title": "" }, { "docid": "1128c60b2891a84f62606e3d6fe10e95", "score": "0.5762204", "text": "function initAppliDesktop() {\n return;\n}", "title": "" }, { "docid": "6564b395ef4d82c3bd9918fd82f5e5cd", "score": "0.57564044", "text": "function serve_home(request, response)\n{\n\tinfo(\"serving home\");\n\tserve_file(200, 'index.html', response);\n}", "title": "" }, { "docid": "08c96028f20f2dc2beeaaf23b8bc5622", "score": "0.575547", "text": "start () {}", "title": "" }, { "docid": "5310ba12cc2f21ddd47a59b0b9558bf7", "score": "0.5754606", "text": "function start()\n{\n\tsetup()\n}", "title": "" }, { "docid": "9ae98ab2a36895d8d5289d2f61166ec6", "score": "0.5748927", "text": "function init() {\n renderStartpage();\n }", "title": "" }, { "docid": "d26cdd40cb3b3ef6b38d12cb2dec7b69", "score": "0.5743838", "text": "function init(){\n\n if(opts.version){\n return info.version();\n }\n if(opts.help){\n return info.help();\n }\n\n /*\n * start the process\n */\n app.process(args, opts);\n}", "title": "" }, { "docid": "b84c83ea76cb99ac13beef83550310ea", "score": "0.5741652", "text": "function about() {\r\n\topen_console('about.php', 400, 440, 'aboutwebpad');\r\n}", "title": "" }, { "docid": "83114b1200cf0e849a44e402ec8e77dd", "score": "0.5733522", "text": "Start() {\n }", "title": "" }, { "docid": "04c9d3477513f2b162519914eba3d573", "score": "0.5727792", "text": "function startApp () {\n // start app\n const container = document.querySelector('#app-content')\n render(\n h(Root),\n container)\n}", "title": "" }, { "docid": "90aac6d6ff243bb20ad8a585bd03e9a3", "score": "0.5714633", "text": "start() { }", "title": "" }, { "docid": "90aac6d6ff243bb20ad8a585bd03e9a3", "score": "0.5714633", "text": "start() { }", "title": "" }, { "docid": "37af8c74f90b05fea7de004a438cf20a", "score": "0.5709954", "text": "function example(path,initfile) {\n // build and execute command line to run this executable\n var pathsep, fullpath, msg, program, args;\n\n pathsep = ( SLFSRV.OS===\"windows\" ) ? \"\\\\\" : \"/\";\n path = \"examples\" + pathsep + path.replace(/\\//g,pathsep);\n\n msg = 'Press \"OK\" to launch the following command on this computer:\\n\\n ' +\n (( SLFSRV.OS===\"windows\" ) ? \">\" : \"#\") +\n \" slfsrv -verbose \" + path;\n if ( initfile ) {\n msg += ( \" \" + initfile );\n }\n SLFSRV.alert(msg,function() {\n\n var alertBox = SLFSRV.alert(\"Waiting for you to close the new example \"+\n \"window (which causes the example to exit).\");\n\n program = SLFSRV.SELF;\n args = [ program, \"-verbose\", SLFSRV.ROOTPATH + pathsep + path ];\n if ( initfile ) {\n args.push(initfile);\n }\n\n function onError(msg) {\n SLFSRV.alertClose(alertBox);\n SLFSRV.alert(\"ERROR LAUNCHING APPLICATION:\\n\\n\"+msg);\n }\n\n function onSuccess(ret) {\n if ( ret.stderr.length !== 0 ) {\n onError(ret.stderr);\n } else {\n SLFSRV.alertClose(alertBox);\n // don't show too many lines\n var results = ret.stdout.split(\"\\n\");\n if ( 45 < results.length ) {\n results = results.slice(0,20).join(\"\\n\") +\n \"\\n\\n...too much data to show it all...\\n\\n\" +\n results.slice(results.length-25,results.length).join(\"\\n\");\n } else {\n results = results.join(\"\\n\");\n }\n SLFSRV.alert(\"PROGRAM RESULTS:\\n\\n\"+results);\n }\n }\n\n SLFSRV.exec({program:program,args:args},onSuccess,onError);\n });\n}", "title": "" }, { "docid": "8f97a39d92d10552265b13f383e74f0a", "score": "0.568381", "text": "function initApp() {\n makeTeam();\n createHtml();\n}", "title": "" }, { "docid": "d67f25084c9d11d631bc03ee2e26c368", "score": "0.56804955", "text": "start() {\n \n }", "title": "" }, { "docid": "59da25f7f6a779cb2e54a98636b1d141", "score": "0.56568843", "text": "function startApp (fn) {\n var v = bootstrap(fn)\n emitter.emit('return-val', v)\n }", "title": "" }, { "docid": "3e75653866feeb602975541c57a66e9a", "score": "0.5656612", "text": "startPage(page) {\n switch (page) {\n default:\n break;\n case 'projects':\n if(window.app.projects) {\n window.app.projects.start();\n } else {\n new projectJs(this.$app, window);\n // dynamicLoading('projects');\n }\n break;\n case 'aboutme':\n if(window.app.aboutme) {\n window.location.hash = \"#who-i-am\";\n window.app.aboutme.method.run();\n window.app.aboutme.bind.onhashchange();\n } else {\n new aboutmeJs(this.$app, window);\n // dynamicLoading('aboutme');\n }\n break;\n }\n }", "title": "" }, { "docid": "f86d58d480c90fe4b51128268bc54d1d", "score": "0.56556684", "text": "runInit() {\n return new server(this.opts, this.args, this.cwd).serve();\n }", "title": "" }, { "docid": "ce68b4c3c34fccc90a2c7b8f0d19b741", "score": "0.56553835", "text": "function start() {\n\n hentJson();\n addEventListenersToButtons();\n sidenVises();\n hentFooter();\n setTimeout(showPage, 2000)\n}", "title": "" }, { "docid": "f203323c1ea58046c52d6114e3f38bf0", "score": "0.56428343", "text": "function startUp() {\n connectAPI();\n isIBotRunning = true;\n MattB.ligar = true; \n var admins = $.getScript(\"https://rawgit.com/V1RTU4LL1F3/fatgasda/master/adminlist.js\");\n $(\"#chat-txt-message\").attr(\"maxlength\", \"99999999999999999999\");\n API.sendChat(\":white_check_mark: \" + IBot.iBot + \" Ativado! :white_check_mark:\");\n }", "title": "" }, { "docid": "eaa1136485be423ba481fbfd9977aec8", "score": "0.5640171", "text": "function start() {\n createWindow();\n}", "title": "" }, { "docid": "72968076758ab95a230c56e8a9c778fd", "score": "0.56381726", "text": "run() {\n console.log(\"Running browser routeguide client...\");\n }", "title": "" }, { "docid": "7dc3ab111c95081d79c5c8b8740c8633", "score": "0.5636195", "text": "function main(){\n\t\n\t\n\t\n}", "title": "" }, { "docid": "68c04c0b329086fdac4bed177ded757e", "score": "0.5636111", "text": "function startup() { // viene chiamata al caricamento del body\n logoCanale(); // inserisce il logo canale in alto a sinistra\n programmi(); // crea le card con i programmi del giorno\n createListaCanali(); // crea il menu dropdown con i canali successivi\n}", "title": "" }, { "docid": "75d38f8b296cdf21ca71c01806ef714e", "score": "0.5632242", "text": "function main() {\n\n\t// Set variables\n\t// =========================================================================\n\turl = new URL(window.location.href);\n\tparams = url.searchParams;\n\n\t// Show the signup screen if specified in the URL\n\t// =========================================================================\n\tif(params.get(\"signup\") > 0) {\n\t\tbtnSignup();\n\t} else {\n\t\tbtnLogin();\n\t} //fi\n\n} //function", "title": "" }, { "docid": "847850237382c988603e6a219ed85083", "score": "0.56271553", "text": "function main() {\n\tvar server = webserver.create();\n\tserver.listen(9527, function (req, res) {\n\t\tres.statusCode = 200;\n\t\tvar url = req.url;\n\t\tvar query = url.split('/');\n\t\tswitch (query[1]) {\n\t\t\tcase \"jquery\":\n\t\t\t\tres.write(fs.read(jqueryFile));\n\t\t\t\tbreak;\n\t\t\tcase \"sie\":\n\t\t\t\tres.write(fs.read(sieFile));\n\t\t\t\tbreak;\n\t\t\tcase \"svg\":\n\t\t\t\tvar urlSvg = url.replace('/svg/', '/');\n\t\t\t\tres.write(\n\t\t\t\t\tfs.read(path + \"\\\\\" + urlSvg.substring(urlSvg.indexOf('/') + 1))\n\t\t\t\t\t\t.replace(/<\\?xml[^>]*>/g, \"\")\n\t\t\t\t\t\t.replace(/<!--[^>]*-->/g, \"\")\n\t\t\t\t\t\t.replace(/<!DOCTYPE[^>]*>/g, \"\")\n\t\t\t\t\t\t.replace(/id=\\S*/g, \"\")\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase \"vml\":\n\t\t\t\tres.write(fs.read(vmlTempl));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tres.write(fs.read(vmlTempl));\n\t\t\t\tbreak;\n\t\t}\n\t\tres.close();\n\t});\n\n\tlist = list.filter(function(filePath){\n\t\treturn filePath.indexOf(\".svg\") > -1\n\t});\n\n\tparseSvg(list[fileIndex]);\n\n}", "title": "" }, { "docid": "2652c8c3b34350610d74a5e3724930ba", "score": "0.5625756", "text": "start() {\n this.get('cli').start();\n }", "title": "" }, { "docid": "b4d8612425131542407df85a0576822f", "score": "0.56225395", "text": "function startup(aData, aReason) {\n\twindowListener.register();\n}", "title": "" }, { "docid": "9cd861681d4568ee14ae4c32cd3aceaa", "score": "0.56220996", "text": "function initiateApp() {\n $(handleSubmitButtons);\n $(registerNewUser);\n $(signInUser);\n $(addNewBox);\n}", "title": "" }, { "docid": "132279ac716b0b772c246cd42b8d251c", "score": "0.5613775", "text": "function run() {\n main();\n }", "title": "" }, { "docid": "88f847fb09b5aab07cedd4729e9c51af", "score": "0.56135964", "text": "function startup()\r\n{\r\n\tconsole.log(\"#include<stdio.h> \\n void main()\");\r\n\tmessage = message+\"please include stdio.h positively<br>\";\r\n\tmessage = message+\"#include<stdio.h><br>void main()\";\r\n}", "title": "" }, { "docid": "1a2712f384dfc1ba01d558a6181cfc37", "score": "0.5608366", "text": "function startup() {\n //var websocket = Cc[\"@mozilla.org/network/protocol;1?name=wss\"]\n //.createInstance(Ci.nsIWebSocketChannel);\n //websocket.asyncOpen(\"http://localhost:54014\", \"mekeso.avinash.me\", {}, null);\n var timer = Components.classes[\"@mozilla.org/timer;1\"]\n .createInstance(Components.interfaces.nsITimer);\n timer.initWithCallback(bootstrapWindow, 1000, Components.interfaces.nsITimer.TYPE_ONE_SHOT);\n //watchWindows(spotKeys);\n //play pause element action\n // -> document.getElementById('app-player').contentDocument.getElementById('play-pause').click();\n}", "title": "" }, { "docid": "86b895b800aa3696c6cc5bc344d82f7b", "score": "0.56044745", "text": "function index() {\n mainWin.open();\n }", "title": "" }, { "docid": "86b895b800aa3696c6cc5bc344d82f7b", "score": "0.56044745", "text": "function index() {\n mainWin.open();\n }", "title": "" }, { "docid": "1f60211801f5405ed6bd679cd06b2e4c", "score": "0.5602282", "text": "function startQuizApp(){\n $('#questions-wrapper').html(`<p>Ready to take U.S. Presidents Quiz? Click Start to get started.<p><button id=\"start\" type=\"submit\">Start</button>`);\n $('#start').on('click', function(event){\n //prevent default behavior\n event.preventDefault();\n quizApp();\n\n });\n }", "title": "" }, { "docid": "90ba8d71037290d5587f728a2a8afef5", "score": "0.5600087", "text": "appExecute(){\n\n\t\tthis.appConfig();\n\t\tthis.includeRoutes();\n\n\t\tthis.app.listen(this.port, this.host, () => {\n\t\t\tconsole.log(`Listening on http://${this.host}:${this.port}`);\n\t\t});\n\t}", "title": "" }, { "docid": "7629d2ee7f1e49079c90ecf65d1bfb5a", "score": "0.559796", "text": "function init()\n{\n resetCanvas();\n\n var server = http.createServer( serverFn );\n\n var port;\n if( process.argv.length < 3 )\n {\n port = 8080;\n }\n else\n {\n port = parseInt( process.argv[2] );\n }\n\n server.listen( port );\n}", "title": "" }, { "docid": "766a47bfc4f566364d03dd38780a0154", "score": "0.55948937", "text": "startWebserver() {\n this.app.listen(this.port, () => {\n console.log(`Mannschaftsverwaltung: Server startet unter: http://localhost:${this.port}`);\n });\n }", "title": "" }, { "docid": "2a0354e6f37de2e515492b741c79361d", "score": "0.5583189", "text": "function main() {\n\t\thtmlModule = new htmlUtil(); // View creation / HTML logic\n\t\tarrModule = new arrMethods(); // Array Method shortcuts\n\t\tmsg = htmlModule.msg; // Logging\n\t\tmsg.set(\"Starting Module\");\n\n\t\t// Prompt for data.\n\t\tvar data = dummyData;\n\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\td.write(\"Employee[\" + i + \"] gross pay:\" + payModule(data[i].hours, data[i].rate));\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "c814d447fba656ebbb4a837c092027a3", "score": "0.558046", "text": "function start(){\n\t$d = document;\n\t$b = $d.getElementsByTagName('body')[0];\n\t$pbox = $d.getElementById('predictionBox');\n\tif (getParameterByName('dev') != null) { \n\t\tif (getParameterByName('dev') == 'yes') { $dev = true; }\n\t}\n\tvar stops = getParameterByName('stops');\n\tif (getParameterByName('stops') == null) { \n\t\tstartStopLookupApp(); \n\t}else{\n\t\tvalidateStops();\n\t} \n\n}", "title": "" }, { "docid": "70110712ef5761aa9c1ecd3274b660e2", "score": "0.55713785", "text": "function createStartPage() {\n createAsideElements();\n createStartMainEls();\n}", "title": "" }, { "docid": "123f698a014b8f575efbc32fb486085c", "score": "0.5570983", "text": "_start(){\n\t}", "title": "" }, { "docid": "021c00a5dabc80de2f8c8c4ffd1e9c15", "score": "0.5569953", "text": "function startup() {\n console.log(\"starting up...\");\n // set event-handlers:\n let button = document.getElementById(\"search\");\n button.onclick = search;\n console.log(\"start-up complete\");\n }", "title": "" }, { "docid": "9913da577bea1eb2597e552a667c4c5c", "score": "0.55686086", "text": "function CLI() {\n }", "title": "" }, { "docid": "41362a2b7113a4d34162bed724fb3f46", "score": "0.5565312", "text": "start() {\n // Add your logic here to be invoked when the application is started\n }", "title": "" }, { "docid": "d36538c9ecacd70d6619bd71e219caf5", "score": "0.5557382", "text": "start() {\n //guardo el numero del puerto en una variable interna\n let port = this.app.get(\"port\");\n //Se obtiene la url y el puerto del servidor\n this.app.listen(port, () => {\n console.log(\"The serve is on port \" + port);\n });\n }", "title": "" }, { "docid": "a0f76b37eab8e2d4ac56bafc98bd45ac", "score": "0.55512255", "text": "function main() {\n if (DEBUG) console.time( \"main_execution\" );\n\n // require scripts\n var Vector = require( \"util/vector.js\" );\n //require( \"engine/world.js\" );\n\n document.title = \"Hello world!\";\n}", "title": "" }, { "docid": "3296cddd022f87e97b29bf23d761486f", "score": "0.554523", "text": "function createWindow () {\n // This function creates custom-generated php.ini\n iniCompileFunction(function() {\n console.log('Make php.ini');\n }); \n \n \n // Place for Express functions, if you need them...\n var appser = express();\n \n // add routes to be handled by express here\n // ...\n\n\n // Settings for PHP Local Server\n appser.use (php({\n execPath: __dirname + '/php/php.exe', // Path to php.exe\n // If none of \"iniFile\" selected, PHP Local Server will use default settings\n iniFile: __dirname + '/php/php.ini', // Select php.ini from /php Folder\n //iniFile: 'D:/Electron/Space-Desktop/phpini/php.ini', // Select custom-generated php.ini from /phpini Folder\n root: __dirname + '/desktop', // Folder to your php application and index.php\n address: '127.0.0.1', // Address interface for PHP Local Server\n port: '8000', // Port for PHP Local Server ---------------------------------------- will auto-detect a free port otherwise\n //ini: { max_execution_time: 60, error_log: '...' } // Show logs in Command line \n }));\n \n\n // Select index.html from a theme\n var StartThemeHTML = IndexHTML();\n // Select index.php from /desktop Folder\n var StartIndexPHP = IndexPHP();\n\n // Application window settings\n // Uses Electron BrowserWindow options from https://electronjs.org/docs/api/browser-window\n mainWindow = new BrowserWindow({\n\ttitleBarStyle: 'hidden',\n\ttitle: \"Space Desktop\",\n\ticon: 'icon.ico',\n //useContentSize: true,\n\twidth: 1000, \n\theight: 650,\n\tminWidth: 575,\n minHeight: 450,\n\tframe: false,\n show: false\n });\n\n // Opens index.html from the selected theme\n mainWindow.loadFile(StartThemeHTML);\n \n // Opens index.php from /desktop Folder\n //mainWindow.loadURL(StartIndexPHP);\n \n //This shows the application window after page loading\n //If your application is too heavy, it can take some time \n mainWindow.once('ready-to-show', () => {\n \tmainWindow.show()\n });\n}", "title": "" }, { "docid": "ca19facd48a649bb7bb67f4a02b96c14", "score": "0.55425996", "text": "function startUp() {\n console.log(\"Questions API successfully loaded.\");\n console.log(\"Location: \" + window.location.pathname)\n\n if (window.location.pathname == \"/profile\") {\n getPlayerProfile();\n }\n if (window.location.pathname == \"/games\") {\n getUserGames();\n }\n if (window.location.pathname == \"/matches\") {\n getUserMatches();\n }\n if (window.location.pathname == \"/scores\") {\n getHighScores();\n }\n\n bindEvents();\n }", "title": "" }, { "docid": "e93a305c383a3ec528138b475a755a5d", "score": "0.55401087", "text": "function main() {\n\t\thtmlModule = new htmlUtil(); // View creation / HTML logic\n\t\tarrModule = new arrMethods(); // Array Method shortcuts\n\t\tmsg = htmlModule.msg; // Logging\n\t\tmsg.set(\"Starting Module\");\n\n\t\t// \n\t\tvar interestCalc = new savingsAccountInterestCalculator();\n\t\tvar result = interestCalc.runCalculator(10, 1000.00, 5);\n\t\tif (result) {\n\t\t\t//Print results\n\t\t\td.write(\"<table>\");\n\t\t\tfor (var i = 0; i < interestCalc.allAnnualInterests.length; i++) {\n\t\t\t\td.write(\"<tr><td>\");\n\t\t\t\td.write(\"Year: \" + (i + 1));\n\t\t\t\td.write(\"</td><td>\");\n\t\t\t\td.write(\"Interest: $\" + interestCalc.allAnnualInterests[i].toFixed(2));\n\t\t\t\td.write(\"</td><td>\");\n\t\t\t\td.write(\"Yearend Amount: $\" + interestCalc.allAnnualAmounts[i].toFixed(2));\n\t\t\t\td.write(\"</td><td>\");\n\t\t\t\t//d.write(\"Form. Amount: $\" + interestCalc.allFormulaAmounts[i].toFixed(2));\n\t\t\t\td.write(\"</td></tr>\");\n\t\t\t}\n\t\t\td.write(\"</table>\");\n\t\t} else {\n\t\t\td.write(\"error: \" + interestCalc.errorMsg);\n\t\t}\n\t}", "title": "" }, { "docid": "49115ecb8d8d845f4d4611f30f1339b6", "score": "0.5532129", "text": "function main() {\n const app = new App();\n\n /* @TODO: handle these in the build process */\n \n // if (window.cordova || window.electron) {\n // window.handleOpenURL = app.resumeAuth;\n // }\n\n /* Quick and dirty access check for chrome */\n if(window.chrome && Chrome.getContext() === 'background') {\n chrome.runtime.onMessage.addListener(function (event) {\n if(event.type === 'authenticate'){\n app.login(event).then(() => {\n chrome.notifications.create({\n type: 'basic',\n iconUrl: 'icons/icon128.png',\n title: 'Login Successful',\n message: 'You can use the app now'\n });\n }, (err) => {\n chrome.notifications.create({\n type: 'basic',\n title: 'Login Failed',\n message: err.message,\n iconUrl: 'icons/icon128.png'\n });\n });\n }\n });\n }else{\n app.run('#app');\n }\n\n /* Nothing special needed for Chrome \\o/ */\n}", "title": "" }, { "docid": "8c330381dfda4dbadc45b9c354092df5", "score": "0.55259585", "text": "function launchWebServer( port ) {\r\n if ( http.Server ) {\r\n // Listen for HTTP connections.\r\n var server = tdc.server = new http.Server();\r\n server.listen( port );\r\n server.addEventListener( 'request', function( req ) {\r\n var url = req.headers.url;\r\n if ( url == '/' )\r\n url = '/www/' + tdc.http.webviewHTMLFile;\r\n // Serve the pages of this chrome application.\r\n req.serveUrl( url );\r\n return true;\r\n } );\r\n\r\n }\r\n\r\n}", "title": "" }, { "docid": "4db2dd6734495b6a27100f60813d4b12", "score": "0.55217546", "text": "function main() {\n\n\t// Locate parents on HTML page\n\tvar parents = Page.locateParents();\n\n\t// Add Canned Analyses\n\tvar cannedAnalysisInterfaces = Interfaces.add(parents);\n\n\t// Add event listeners for interactivity\n\teventListener.main();\n\t\n}", "title": "" }, { "docid": "d2346b2af0cdba9847a78ac6f3ef1ba3", "score": "0.5508885", "text": "function init() {\n var content = $('greeting');\n chrome.firstRunPrivate.getLocalizedStrings(function(strings) {\n loadTimeData.data = strings;\n i18nTemplate.process(document, loadTimeData);\n // Resizing and centering app's window.\n var bounds = {};\n bounds.width = content.offsetWidth;\n bounds.height = content.offsetHeight;\n bounds.left = Math.round(0.5 * (window.screen.availWidth - bounds.width));\n bounds.top = Math.round(0.5 * (window.screen.availHeight - bounds.height));\n appWindow.setBounds(bounds);\n appWindow.show();\n });\n var closeButton = content.getElementsByClassName('close-button')[0];\n // Make close unfocusable by mouse.\n closeButton.addEventListener('mousedown', function(e) {\n e.preventDefault();\n });\n closeButton.addEventListener('click', function(e) {\n appWindow.close();\n e.stopPropagation();\n });\n var tutorialButton = content.getElementsByClassName('next-button')[0];\n tutorialButton.addEventListener('click', function(e) {\n chrome.firstRunPrivate.launchTutorial();\n appWindow.close();\n e.stopPropagation();\n });\n\n // If spoken feedback is enabled, also show its tutorial.\n chrome.accessibilityFeatures.spokenFeedback.get({}, function(details) {\n if (details.value) {\n var chromeVoxId = 'mndnfokpggljbaajbnioimlmbfngpief';\n chrome.runtime.sendMessage(chromeVoxId, {openTutorial: true});\n }\n });\n}", "title": "" }, { "docid": "9f4b96b68b57c148bc22ffea7dba92da", "score": "0.5504129", "text": "_start() {}", "title": "" }, { "docid": "9763cc9323b571358cee81ab2a2222b8", "score": "0.5499231", "text": "function main() {\n\n loadDocumentInputs(); // load the data from html page\n loadLights(); // load in the lights\n setupWebGL(); // set up the webGL environment\n initCamera(Eye, LookAt, ViewUp); // Initialize camera\n loadTriangleSets(); // load in the triangles from tri file\n loadEllipsoids(); // load in the ellipsoids from ellipsoids file\n setupShaders(); // setup the webGL shaders\n renderTriangles(); // draw the triangles using webGL\n setupKeyEvent();\n \n} // end main", "title": "" }, { "docid": "6ba099016e5e68c2cc1239b769dab909", "score": "0.5490777", "text": "function startProcess() {\n\n // We need to inject our scripts at different times based on the music player\n // SYNCHRONOUS function, domain specific.\n //inject_scripts_after_page_load(domain);\n\n // Injects relevant html, css, javascript into the page. Domain specific.\n inject_header_scripts();\n\n // Place the download button in the right place, depending on the domain.\n inject_spotify_button();\n\n // Initiates the 'if download button clicked, do this action' listener.\n initiate_download_callbacks();\n\n}", "title": "" }, { "docid": "745a00d4ea83de7ef4fbf6eb841548e4", "score": "0.54776895", "text": "startInstall(){\n this.installer.run();\n }", "title": "" }, { "docid": "a468b4f0996ba1b4b55e7542c6b475b2", "score": "0.54765856", "text": "function startUp() {\n // Updating the ActiveTabUrl during initialization\n updateActiveTabUrl();\n\n // Register Events\n registerEvents();\n\n // Setting it to the initialization date by default\n // TODO: user chrome.storage api here\n lastRefreshTimeStamp = new Date();\n\n // Setting isUserActive as true while starting up\n isUserActive = true;\n}", "title": "" }, { "docid": "41b7997109255ddb0e9a48aa64b7d6bf", "score": "0.54759234", "text": "function main(){\n menuConsole()\n tirage6fois()\n}", "title": "" }, { "docid": "8cb7029137e1f0eadf9472ae61f29818", "score": "0.5473874", "text": "function start() {\n console.log(\"These are our wares\")\n menu();\n}", "title": "" }, { "docid": "50ff5d692fb85671372e29a45bf74f44", "score": "0.546676", "text": "function start() {\n\n // Start interactive mode\n if ( process.argv.length <= 2 ) {\n startInteractive();\n }\n\n // Parse the process arguments\n else {\n program.parse(process.argv);\n }\n\n\n}", "title": "" }, { "docid": "f24dd6cb892ee1cb30547d7b5ebdd451", "score": "0.54641324", "text": "function main( argv ) {\n\n\t// At script startup, collect arguments\n\tvar ht = new _lib.Class.HandlerTag( this );\n\tvar args = minimist( argv.slice( 2 ) );\t\t// cut out 'node' & 'server' tokens\n\n\t// Parse arguments\n\tif( args.h || args.help ) {\n\t\t\n\t\t// Show help prompt\n\t\thelp();\n\t\treturn;\n\t} else {\n\n\t\t_lib.Util.printEmblem();\n\t}\n\n\t// Initialize logger\n\tif( !args.v && !args.verbose ) {\n\t\tconsole.log( 'Running in non-verbose logging mode...' );\n\t\t_lib.Logger.logToConsole = false;\n\t}\n\t_lib.Logger.log( 'Initializing...', ht.getTag() );\n\n\t// Create server instance\n\tconst express = require( 'express' );\n\tconst app = express();\n\tapp.locals.title = _lib.settings.meta.serverName;\n\tapp.locals.email = _lib.settings.meta.serverEmail;\n\n\t// Set static asset locations\n\t_lib.Logger.log( 'Preparing static assets...', ht.getTag() );\n\tapp.use( bp.json( {\n\t\tstrict: true\n\t} ) );\n\tapp.use( bp.urlencoded( {\n\t\textended: true\n\t} ) );\n\t// app.use( express.static( _lib.settings.root ) );\n\n\t// Add cookie parser\n\tapp.use( cookieParser() );\n\n\t// BEGIN DEPRECATED 2020-02-01: Replaced with new API creation scheme\n\t// Load and mount APIs under \"/api\" using the old API Autoloader\n\t// app.use( '/api', require( './api/app/app.js' ) );\t\t// RESTful APIs\n\t// END DEPRECATED 2020-02-01: Replaced with new API creation scheme\n\t\n\t// Load and mount static content in the server root using the new Autoloader\n\t( new _lib.AutoLoader( {\n\t\tejs: ejs,\n\t\tfs: fs,\n\t\tpath: path,\n\t\tHandlerTag: _lib.Class.HandlerTag,\n\t\tLogger: _lib.Logger,\n\t\tServerError: _lib.Class.ServerError,\n\t\tServerResponse: _lib.Class.ServerResponse,\n\t\tTemplateManager: _lib.TemplateManager,\n\t\tUtil: _lib.Util,\n\t} ) ).loadRootFrom( app, _lib.settings.root );\n\n\t// Check if server should run in secure mode\n\tvar secureMode = true;\n\tif( args.i || args.http ) {\n\t\tsecureMode = false;\n\t}\n\n\t// Run server\n\tvar port = _lib.settings.port;\n\tvar server = false;\n\tif( args.p || args.port ) {\n\t\tport = args.p ? args.p : args.port;\n\t}\n\tif( secureMode ) {\n\t\t// Check for security configurations\n\t\tif( !fs.existsSync( _lib.settings.ssl ) ) {\n\t\t\tthrow new Error( new _lib.Class.ServerError(\n\t\t\t\t`SSL settings not found! Have you configured security settings?`\n\t\t\t) );\n\t\t} else {\n\t\t\tserver = https.createServer( _lib.SslManager.serverContext, app );\n\t\t}\n\t} else {\n\t\tserver = http.createServer( {}, app );\n\t}\n\tserver.listen( secureMode ? port : { port: port }, function() {\n\t\tvar msg = `Now listening on port ${port}`;\n\t\tif( !secureMode ) {\n\t\t\tmsg += ' (insecure mode)';\n\t\t}\n\t\t_lib.Logger.log( msg, ht.getTag() );\n\t} );\n\n\t// // DEBUG\n\t// console.log( 'handlerTag:', ht.getTag() );\n\t// console.log( 'args:', args );\n\t// console.log( 'settings:', _lib.settings );\n\n\treturn;\n}", "title": "" }, { "docid": "9cefefbc9fe9749645516c6f097d6083", "score": "0.54583657", "text": "function start_app() {\n draw();\n}", "title": "" }, { "docid": "9cc9eb5fe4676991f231e514c0a26c92", "score": "0.54546726", "text": "function init() {\r\n // page load init function - call startup events here\r\n}", "title": "" }, { "docid": "fc5aee491b1019ddf30d7ea306b2485c", "score": "0.54468256", "text": "function init() {\n // Access command line parameters from start command (see package.json)\n let appDirectory = process.argv[2], // folder with client files\n appPort = process.argv[3]; // port to use for serving static files\n server = new AppServer(appDirectory);\n server.start(appPort);\n}", "title": "" }, { "docid": "e5b6e0d2aa28efacd6ee543d91246ce9", "score": "0.5443848", "text": "start() {}", "title": "" }, { "docid": "e5b6e0d2aa28efacd6ee543d91246ce9", "score": "0.5443848", "text": "start() {}", "title": "" }, { "docid": "e5b6e0d2aa28efacd6ee543d91246ce9", "score": "0.5443848", "text": "start() {}", "title": "" } ]
c30b6cd494a23f29de692afc8d30d7ff
Sets the icon for the new Alert.
[ { "docid": "7c40149492ff572b741b4a3307fa9e43", "score": "0.68429476", "text": "icon(icon) {\n this.__data['icon'] = icon;\n\n return this;\n }", "title": "" } ]
[ { "docid": "423a32beca2d5b7b8eaa1e19242b2e08", "score": "0.7928046", "text": "iconAlert() {\n var icon = latte.IconItem.standard(4, 8);\n icon.size = 32;\n this.icon = icon;\n return this;\n }", "title": "" }, { "docid": "bb614693a4342d3fb32111593a14767e", "score": "0.709426", "text": "setIcon(i){this.icon=i}", "title": "" }, { "docid": "95ce53040963b7cb700d97441584dc5b", "score": "0.7012203", "text": "set icon(value) {\n this._icon = value;\n for (var i = 0; i < this._buttons.length; i++)\n this._buttons[i].icon = value.clone();\n }", "title": "" }, { "docid": "5fc3dbdc9d5ea244b8f86f0ca79f9cd6", "score": "0.69222564", "text": "set icon(value) {\n // Empty element\n this.iconElement.empty();\n if (value instanceof latte.IconItem)\n this.iconElement.append(value.element).clear();\n this._icon = value;\n this.onLayout();\n }", "title": "" }, { "docid": "76755ca847fe1c54c6710e56912b8fc3", "score": "0.6893606", "text": "set icon(value) {\n this._icon = value;\n this.iconElement.empty();\n if (value instanceof latte.IconItem)\n this.iconElement.append(value.element);\n }", "title": "" }, { "docid": "769527266e34ae0d2d39b0ff480d410b", "score": "0.68885034", "text": "set icon(value) {\n if (!(value instanceof latte.IconItem))\n throw new latte.InvalidArgumentEx('value');\n this._icon = value;\n // Append icon\n value.appendTo(this.iconElement.empty());\n }", "title": "" }, { "docid": "22c64b4473d3a46266df0670ca0a9242", "score": "0.6843376", "text": "_applyIcon(value, old) {\n var atom = this.getChildControl(\"atom\");\n value == null ? atom.resetIcon() : atom.setIcon(value);\n }", "title": "" }, { "docid": "d436c9309a223d0ad793d202db0a0807", "score": "0.68335843", "text": "setIcon(icon){\r\n\t\tvar c = this.vc()\r\n\t\tthis.icon = icon\r\n\t\tc.innerHTML = this.innerHtml()\r\n\t}", "title": "" }, { "docid": "7395bdb52b249297a360d5083957aa01", "score": "0.6824095", "text": "set icon(value) {\n this.label.icon = value;\n }", "title": "" }, { "docid": "7395bdb52b249297a360d5083957aa01", "score": "0.6824095", "text": "set icon(value) {\n this.label.icon = value;\n }", "title": "" }, { "docid": "b568014e2a65736cb7651d7e8291c551", "score": "0.6797047", "text": "function setIcon (isActive) {\n var file = 'icon38' + (isActive ? '-active' : '') + '.png';\n chrome.browserAction.setIcon({path: chrome.extension.getURL(file)});\n }", "title": "" }, { "docid": "fd8cfcd91dec74f011c1f5d3d64291d3", "score": "0.6705235", "text": "iconError() {\n var icon = latte.IconItem.standard(5, 8);\n icon.size = 32;\n this.icon = icon;\n return this;\n }", "title": "" }, { "docid": "acec0092361f6332283ce357a26f28b0", "score": "0.66998243", "text": "function changeIcon() {\n state = getState();\n iconPath = \"./icon_32.png\";\n if (state == 0 && !interruptDownloads) {\n iconPath = \"./icon_disabled_32.png\";\n } else if (state == 1) {\n // Warning\n iconPath = \"./icon_warning_32.png\";\n } else if (state == 2) {\n // Error\n iconPath = \"./icon_error_32.png\";\n }\n current_browser.browserAction.setIcon({\n path: iconPath\n });\n}", "title": "" }, { "docid": "e66d854926b600049d2fc6dbfd9f51eb", "score": "0.6687575", "text": "set icon(icon) {\n if (icon) {\n this._icon = `bhi-${icon}`;\n }\n }", "title": "" }, { "docid": "d530d74757452ad13b5a29510c58ff96", "score": "0.6639748", "text": "set icon(value) {\n if (value != null && !(value instanceof latte.IconItem))\n throw new latte.InvalidArgumentEx('value', value);\n this._icon = value;\n this.iconElement.empty();\n if (value) {\n this.iconElement.append(value.element);\n }\n this.updateIconAndTextFlag();\n this.onIconChanged();\n }", "title": "" }, { "docid": "f2eda0b82e9454dbac9bb4f72b7bb1b6", "score": "0.6610351", "text": "function setDefaultIcon() {\n chrome.browserAction.setIcon({\n path: {\n 16: 'assets/images/clipinc-16.png',\n 32: 'assets/images/clipinc-32.png',\n 48: 'assets/images/clipinc-48.png',\n 128: 'assets/images/clipinc-128.png',\n },\n });\n}", "title": "" }, { "docid": "57a44b0ee323158c101a0f682fd4d2e8", "score": "0.6596323", "text": "set cxIcon(type) {\n this.setIcon(type);\n }", "title": "" }, { "docid": "4469f4f55ff79579963cf351fbfe6630", "score": "0.6592273", "text": "set type(type) {\n this.setIcon(type);\n }", "title": "" }, { "docid": "91d26ca8bd55141678bf8f78e3d6dbe7", "score": "0.6591565", "text": "function setIcon(grade) {\r\n grade_path = \"./icons/\".concat(grade).concat('.svg');\r\n\r\n browser.browserAction.setIcon({\r\n path: grade_path,\r\n tabId: currentTab.id\r\n });\r\n return {};\r\n}", "title": "" }, { "docid": "93b8aea73f463868b8d3f579aed48215", "score": "0.6575986", "text": "set icon(value) {\n this.iconSideElement.empty();\n if (value instanceof latte.IconItem)\n this.iconSideElement.append(value.element);\n this._icon = value;\n }", "title": "" }, { "docid": "66da1f9e8b111c8f2f0ab3e9dd6ed3fb", "score": "0.6569103", "text": "set icon(v) {\n this._icon = v && v.indexOf('bhi') !== -1 ? v : `bhi-${v}`;\n }", "title": "" }, { "docid": "66da1f9e8b111c8f2f0ab3e9dd6ed3fb", "score": "0.6569103", "text": "set icon(v) {\n this._icon = v && v.indexOf('bhi') !== -1 ? v : `bhi-${v}`;\n }", "title": "" }, { "docid": "5453f896a697651d2cef862ac40ae998", "score": "0.6527656", "text": "iconInfo() {\n var icon = latte.IconItem.standard(5, 7);\n icon.size = 32;\n this.icon = icon;\n return this;\n }", "title": "" }, { "docid": "78fcc2f1559706d512feaa0bbb4b8fd7", "score": "0.64996153", "text": "initIcon () {\n if (this.hasAttribute('icon')) {\n let iconValue = this.getAttribute('icon');\n if (iconValue in this.icons) {\n let path = this.icons[iconValue];\n this.path = path;\n this.buttonBody.style.setProperty('--url-icon', `url('${this.path}')`);\n // want to set this for icon but not if button is loading\n if (!this.loading) {\n this.buttonBody.querySelector('span').className = 'icon';\n this.iconHolder.setAttribute('style', 'display: inline');\n }\n }\n }\n }", "title": "" }, { "docid": "0e009c1f64aae97f8d79024966b5d1ac", "score": "0.64272135", "text": "function setIcon() {\n goog.array.forEach(arguments, function(i) { i.setIcon('cast-ready'); });\n}", "title": "" }, { "docid": "181270f7c2eaec343c24792d587c0e83", "score": "0.64089245", "text": "function changeicon() {\n var icone = document.querySelector(\".access-button\")\n icone.setAttribute(\"src\", \"assets/img/libras_verde.png\")\n var popup = document.querySelector(\".pop-up\")\n popup.setAttribute(\"src\", \"assets/img/popup_verde.png\")\n}", "title": "" }, { "docid": "f18eb53df9b52d9aa0c3e9b3b6e07a90", "score": "0.6397196", "text": "function setJqueryButtonIcon(jquerybutton, newIcon) {\n\tjquerybutton.data(\"icon\", newIcon);\n\tjquerybutton.find(\"span .ui-icon\").prop(\"class\",\n\t\t\t\"ui-icon ui-icon-shadow ui-icon-\" + newIcon);\n}", "title": "" }, { "docid": "0a1119d85183f314c77483a731a80828", "score": "0.6384929", "text": "get icon() {\n\t\treturn this._icon;\n\t}", "title": "" }, { "docid": "8acebe4a32dfc83bd1ff0a656715d969", "score": "0.63787115", "text": "get icon() {\n return this._icon;\n }", "title": "" }, { "docid": "8acebe4a32dfc83bd1ff0a656715d969", "score": "0.63787115", "text": "get icon() {\n return this._icon;\n }", "title": "" }, { "docid": "8acebe4a32dfc83bd1ff0a656715d969", "score": "0.63787115", "text": "get icon() {\n return this._icon;\n }", "title": "" }, { "docid": "8acebe4a32dfc83bd1ff0a656715d969", "score": "0.63787115", "text": "get icon() {\n return this._icon;\n }", "title": "" }, { "docid": "8acebe4a32dfc83bd1ff0a656715d969", "score": "0.63787115", "text": "get icon() {\n return this._icon;\n }", "title": "" }, { "docid": "8acebe4a32dfc83bd1ff0a656715d969", "score": "0.63787115", "text": "get icon() {\n return this._icon;\n }", "title": "" }, { "docid": "daf8dd8f72c2c127e0de5ec1834088e4", "score": "0.63447344", "text": "function resetIcon() {\n chrome.browserAction.setIcon({path: 'images/rose-0.png'});\n}", "title": "" }, { "docid": "5048cc37d13e638463b2a5093a8000e2", "score": "0.63167214", "text": "function SetIcon(name)\r\n{\r\n chrome.pageAction.setIcon({ tabId: CurrentTab.id, path: name });\r\n}", "title": "" }, { "docid": "2123e105fdc541a9b38a7653f5e8176a", "score": "0.6306617", "text": "get icon() {\n return this._icon;\n }", "title": "" }, { "docid": "aaa3e75714a94a865078bd3b18405cba", "score": "0.6298525", "text": "function setRecordingIcon() {\n chrome.browserAction.setIcon({\n path: {\n 16: 'assets/images/clipinc-16-record.png',\n 32: 'assets/images/clipinc-32-record.png',\n 48: 'assets/images/clipinc-48-record.png',\n 128: 'assets/images/clipinc-128-record.png',\n },\n });\n}", "title": "" }, { "docid": "7ff56b32eb3ecfc4dfad480f54ed5bb5", "score": "0.62868756", "text": "onIconChanged() {\n this.iconChanged.raise();\n }", "title": "" }, { "docid": "b8c2029c10f61d2ced6b53c845cda80e", "score": "0.6277447", "text": "iconQuestion() {\n var icon = latte.IconItem.standard(4, 9);\n icon.size = 32;\n this.icon = icon;\n return this;\n }", "title": "" }, { "docid": "df7fb9c006ff10af06b9989140c6e4e3", "score": "0.62735945", "text": "function image(oIcon) {\n\t\t\tvar oImage = new c.Image({\n\t\t\t\t\tid : sDialogId + \"--icon\",\n\t\t\t\t\ttooltip : rb && rb.getText(\"MSGBOX_ICON_\" + oIcon),\n\t\t\t\t\tdecorative : true});\n\t\t\toImage.addStyleClass(\"sapUiMboxIcon\");\n\t\t\toImage.addStyleClass(mIconClass[oIcon]);\n\t\t\treturn oImage;\n\t\t}", "title": "" }, { "docid": "0354edacc4bed5b18da6d7e7da3b724a", "score": "0.62492406", "text": "function THUMBNAIL_ELEMENT_ICON$static_(){ThumbDataViewBase.THUMBNAIL_ELEMENT_ICON=( ThumbDataViewBase.THUMBNAIL_BLOCK.createElement(\"icon\"));}", "title": "" }, { "docid": "10f63b8935105b6f1df83fa7973ceb0b", "score": "0.62342334", "text": "function image(oIcon) {\n\t\t\tvar oImage = new c.Image({\n\t\t\t\t\tid : sDialogId + \"--icon\",\n\t\t\t\t\tsrc : sap.ui.resource('sap.ui.commons', 'img/1x1.gif'),\n\t\t\t\t\ttooltip : rb && rb.getText(\"MSGBOX_ICON_\" + oIcon),\n\t\t\t\t\tdecorative : true});\n\t\t\toImage.addStyleClass(\"sapUiMboxIcon\");\n\t\t\toImage.addStyleClass(mIconClass[oIcon]);\n\t\t\treturn oImage;\n\t\t}", "title": "" }, { "docid": "17af48fe850f6002e021af7b40dea17c", "score": "0.6222686", "text": "setIcon(iconName) {\n this.iconElement.innerText = '';\n this.iconName = iconName;\n if (typeof iconName !== 'string' || iconName.length === 0) {\n this.iconElement.classList.remove(`icon-${iconName}`);\n this.outerElement.classList.remove('has-icon');\n }\n else {\n this.iconName = iconName;\n this.iconElement.classList.add(`icon-${iconName}`);\n this.outerElement.classList.add('has-icon');\n }\n }", "title": "" }, { "docid": "c6ae35df15b86030af63769f3ae26f3f", "score": "0.62200284", "text": "function setIconShow(iconEl) {\n iconEl.removeClass('fa-plus').addClass('fa-minus');\n }", "title": "" }, { "docid": "3dd19bc283ebfdc7df57f299618d0f2b", "score": "0.6188258", "text": "function setIcon(tabId, deviceClass = 'unknown') {\n\tchrome.pageAction.setIcon({tabId: tabId, path: `app-icon-${deviceClass}.png`})\n}", "title": "" }, { "docid": "f9282f1c2b22917f16a740d98184f6ed", "score": "0.6175054", "text": "set selectedIcon(value) {\n if (!(value instanceof latte.IconItem))\n throw new latte.InvalidArgumentEx('value');\n this._selectedIcon = value;\n // Append icon\n if (this.selected) {\n value.appendTo(this.iconElement.empty());\n }\n }", "title": "" }, { "docid": "d9e03186531eb7a940f34e89c3d56567", "score": "0.6160178", "text": "function setIcon () {\n if (stop) return\n\n var i = Math.floor(Math.random() * iconPool.length)\n var icon = iconPool[i]\n iconPool.splice(i, 1)\n\n fs.readFile(path.join(__dirname, '..', 'icons', icon), null, (err, icon) => {\n if (!err) {\n client.Guilds.get(process.env['BOT_GUILDID']).edit(null, icon, null, undefined, null, null).catch(err => logger.error('Failed to set main guild icon: ' + err))\n }\n setTimeout(setIcon, 3 * 60 * 1000)\n })\n }", "title": "" }, { "docid": "fb2ae8586f8f23553e16b0e4c6759206", "score": "0.61551714", "text": "function setApplicationIconForAttachment(attachment, listitem)\n{\n // generate a moz-icon url for the attachment so we'll show a nice icon next to it.\n listitem.setAttribute('image', \"moz-icon:\" + \"//\" + attachment.displayName + \"?size=16&contentType=\" + attachment.contentType);\n}", "title": "" }, { "docid": "ee7948dc7b2aa7a9fc4af1f100561685", "score": "0.6079777", "text": "function updateIcon(){\n\tif (state == \"active\"){\n\t\tchrome.browserAction.setIcon({path: 'icons/checked-symbol.png'});\n\t} if (state == \"idle\"){\n\t\tchrome.browserAction.setIcon({path: 'icons/unavailable-place.png'});\n\t} if (state == \"locked\"){\n\t\tchrome.browserAction.setIcon({path: 'icons/locked.png'});\n\t}\n}", "title": "" }, { "docid": "dcace653f9880624c2143b2ccecaa829", "score": "0.5962791", "text": "function changeThemeIcon() {\n const div = this.parentElement\n\n switch (this.value) {\n case 'system':\n div.style.setProperty('--image', 'url(/images/pc.svg)')\n break\n case 'light':\n div.style.setProperty('--image', 'url(/images/sun.svg)')\n break\n case 'dark':\n div.style.setProperty('--image', 'url(/images/moon.svg)')\n break\n }\n}", "title": "" }, { "docid": "c8da5b1351fc58abbbd5420539d19f47", "score": "0.5959717", "text": "constructor() { \n \n Icon.initialize(this);\n }", "title": "" }, { "docid": "524d8a385892eacd0026efcaa0678bee", "score": "0.5956206", "text": "function setIcon(grey) {\r\n var iconName = '/images/icon_19';\r\n if (grey) {\r\n iconName += '.png'\r\n // iconName += '_grey.png'\r\n } else {\r\n iconName += '.png'\r\n }\r\n var iconDef = { path: { '19': iconName } };\r\n chrome.browserAction.setIcon(iconDef, function() {\r\n if (chrome.runtime.lastError) {\r\n console.error('setIcon', chrome.runtime.lastError.message);\r\n console.error(chrome.runtime.lastError);\r\n }\r\n });\r\n}", "title": "" }, { "docid": "66ca121dd18eecff0ca3b6f33b6d974b", "score": "0.5953813", "text": "function updateBrowserIcon() {\n if (browserIconCtx) chrome.browserAction.setIcon({imageData: browserIconCtx.getImageData(0, 0, 19, 19)});\n}", "title": "" }, { "docid": "c1cdf339152f607364e0e28a51260fc6", "score": "0.59351337", "text": "function setIconOptions(options) {\n _icons.__options = tslib_1.__assign({}, _icons.__options, options);\n}", "title": "" }, { "docid": "726f189c0c5ba9b606a2d09fba031d99", "score": "0.5920465", "text": "function setIcon(icon, iconId){\n var skycons = new Skycons({\"color\": 'white'});\n skycons.set(\"icon1\", Skycons[icon.replace(/-/g, \"_\").toUpperCase()]);\n skycons.play();\n }", "title": "" }, { "docid": "d79dab55d286ef0c7cef3cc749840835", "score": "0.59161526", "text": "static SetIconSize() {}", "title": "" }, { "docid": "c8f8a250a09f44685d825d80113dd5d1", "score": "0.5904124", "text": "setIconAsText(icon) {\n this.setIcon(undefined);\n if (typeof icon !== 'string' || icon.length === 0) {\n this.iconElement.innerText = '';\n this.outerElement.classList.remove('has-text-icon');\n }\n else {\n this.iconElement.innerText = icon;\n this.outerElement.classList.add('has-text-icon');\n }\n }", "title": "" }, { "docid": "1ce390aaf947c0cc055569f642c314cb", "score": "0.58409727", "text": "newIcon() {\n return `${this.iconPrefix}${this.getEquivalentIconOf(this.icon)}`;\n }", "title": "" }, { "docid": "3c10524dea87aae799fcf2e90892c7ef", "score": "0.58261275", "text": "changeIcon(iconIdentifier) {\n this.removeClass(\"ph-\" + this.iconIdentifier);\n this.iconIdentifier = iconIdentifier;\n this.addClass(\"ph-\" + iconIdentifier);\n }", "title": "" }, { "docid": "48ba5acd445d87a90839b3cf0505971a", "score": "0.578877", "text": "function setIconOptions(options) {\r\n _iconSettings.__options = tslib_1.__assign({}, _iconSettings.__options, options);\r\n}", "title": "" }, { "docid": "48ba5acd445d87a90839b3cf0505971a", "score": "0.578877", "text": "function setIconOptions(options) {\r\n _iconSettings.__options = tslib_1.__assign({}, _iconSettings.__options, options);\r\n}", "title": "" }, { "docid": "af01c7a47acada82d213970cf667bf4c", "score": "0.5787785", "text": "function setIcon(icon, iconID)\n {\n // const for skyicons \n const skycons = new Skycons({color: \"white\"});\n const currentIcon = icon.replace(/-/g, \"_\").toUpperCase(); // replace with underscore instead of -\n skycons.play();\n return skycons.set(iconID, Skycons[currentIcon]);\n \n }", "title": "" }, { "docid": "e61871e472db660fab50da2809cc1a2c", "score": "0.57762986", "text": "get icon() {\n var icon = this.accurateIcon;\n\n if (!icon) {\n icon = this.accurateIcon = this._icon();\n }\n\n return icon;\n }", "title": "" }, { "docid": "342bffb7ff73a103a689cfd9f3233f51", "score": "0.5774947", "text": "async applyIconToElement(el, icon, _size, label) {\n await this.updateComplete;\n const iconSymbol = this.iconMap.get(icon);\n if (!iconSymbol) {\n throw new Error(`Unable to find icon ${icon}`);\n }\n // we cannot share a single SVG globally across shadowroot boundaries\n // so copy the template node so we can inject it where we need it\n const clonedNode = this.prepareSvgClone(iconSymbol);\n clonedNode.setAttribute('role', 'img');\n if (label) {\n clonedNode.setAttribute('aria-label', label);\n }\n else {\n clonedNode.setAttribute('aria-hidden', 'true');\n }\n // append the svg to the node either in its shadowroot or directly into its dom\n if (el.shadowRoot) {\n el.shadowRoot.appendChild(clonedNode);\n }\n else {\n el.appendChild(clonedNode);\n }\n }", "title": "" }, { "docid": "342bffb7ff73a103a689cfd9f3233f51", "score": "0.5774947", "text": "async applyIconToElement(el, icon, _size, label) {\n await this.updateComplete;\n const iconSymbol = this.iconMap.get(icon);\n if (!iconSymbol) {\n throw new Error(`Unable to find icon ${icon}`);\n }\n // we cannot share a single SVG globally across shadowroot boundaries\n // so copy the template node so we can inject it where we need it\n const clonedNode = this.prepareSvgClone(iconSymbol);\n clonedNode.setAttribute('role', 'img');\n if (label) {\n clonedNode.setAttribute('aria-label', label);\n }\n else {\n clonedNode.setAttribute('aria-hidden', 'true');\n }\n // append the svg to the node either in its shadowroot or directly into its dom\n if (el.shadowRoot) {\n el.shadowRoot.appendChild(clonedNode);\n }\n else {\n el.appendChild(clonedNode);\n }\n }", "title": "" }, { "docid": "a7f5e0c4241775a7dbfc62379d952ec0", "score": "0.5761452", "text": "function setIconOptions(options) {\n _iconSettings.__options = tslib_1.__assign({}, _iconSettings.__options, options);\n}", "title": "" }, { "docid": "6397794b73aad9b5e670d4bc650f6dc5", "score": "0.57239556", "text": "async applyIconToElement(el, icon, _size, label) {\n await this.updateComplete;\n const iconSymbol = this.iconMap.get(icon);\n if (!iconSymbol) {\n throw new Error(`Unable to find icon ${icon}`);\n }\n // we cannot share a single SVG globally across shadowroot boundaries\n // so copy the template node so we can inject it where we need it\n const clonedNode = this.prepareSvgClone(iconSymbol);\n clonedNode.setAttribute('role', 'img');\n if (label) {\n clonedNode.setAttribute('aria-label', label);\n }\n else {\n clonedNode.setAttribute('aria-hidden', 'true');\n }\n // append the svg to the node either in its shadowroot or directly into its dom\n if (el.shadowRoot) {\n el.shadowRoot.appendChild(clonedNode);\n }\n else {\n el.appendChild(clonedNode);\n }\n }", "title": "" }, { "docid": "8a2e7b4f5b403ff9a68e0f835de1f60a", "score": "0.5705367", "text": "function setIcon(type) {\n const iconClasses = `${classes.icon} ${classes.iconVariant}`;\n switch (type) {\n case 'success':\n return <CheckCircleIcon className={iconClasses} />\n case 'error':\n return <ErrorIcon className={iconClasses} />\n case 'info':\n return <InfoIcon className={iconClasses} />\n case 'warning':\n return <WarningIcon className={iconClasses} />\n default:\n return null;\n }\n }", "title": "" }, { "docid": "4af94be5d4e42dc833c02db1e7b990d9", "score": "0.5684264", "text": "function statusIcon(icon) {\n var i = $(\"#cloud-status i\");\n i.attr(\"class\", \"fa fa-\" + icon);\n switch (icon) {\n case \"cloud-upload\":\n i.attr(\"title\", \"Saved to cloud\");\n break;\n case \"floppy-o\":\n i.attr(\"title\", \"Saved locally\");\n break;\n case \"exclamation-triangle\":\n i.attr(\"title\", \"Error while saving -- see ⓘ for more information\");\n break;\n case \"pencil\":\n i.attr(\"title\", \"Local changes\");\n break;\n default:\n i.attr(\"title\", \"\");\n }\n }", "title": "" }, { "docid": "8898c5d008d61f73ab74ad28fc240d48", "score": "0.56822443", "text": "get icon() {\n return this.label.icon;\n }", "title": "" }, { "docid": "8898c5d008d61f73ab74ad28fc240d48", "score": "0.56822443", "text": "get icon() {\n return this.label.icon;\n }", "title": "" }, { "docid": "f9373149f747d2c609cea4fe2722eff5", "score": "0.56676745", "text": "function updateIcon() {\n\tvar rand = Math.floor((Math.random()*max) + 1); // random number\n \tchrome.browserAction.setIcon({path:\"icons/icon\" + rand + \".png\"});\n\tif (rand > max) // just in case ;)\n\t\trand = min;\n}", "title": "" }, { "docid": "9695c922b86dad39236936ba735db37a", "score": "0.5663888", "text": "function MatIconLocation() { }", "title": "" }, { "docid": "174c25797d165badf43044b23faf7af0", "score": "0.5657531", "text": "function tdoa_set_icon(name, field_idx, icon, size, color, cb, cb_param)\n{\n field_idx = (field_idx >= 0)? field_idx : '';\n w3_innerHTML('id-tdoa-'+ name +'-icon-c'+ field_idx,\n (icon == '')? '' :\n w3_icon('id-tdoa-'+ name +'-icon'+ field_idx, icon, size, color, cb, cb_param)\n );\n}", "title": "" }, { "docid": "e25c093bcc944ab43eb3584b8048bc41", "score": "0.56511", "text": "function setIcon(image){\n let shadowUrl = './images/shadow.png';\n let marker = L.icon({\n iconUrl: image,\n shadowUrl: shadowUrl,\n iconSize: [25, 41],\n iconAnchor: [12, 41]\n });\n return marker;\n }", "title": "" }, { "docid": "535c869d4b5efaca746f50d80161fb48", "score": "0.5624819", "text": "function resetDefaultIcon(btn) {\n btn.icon_url_custom = null;\n delete btn.icon_url_custom;\n updateProject(btn.name + ' button icon resetted');\n }", "title": "" }, { "docid": "6b1f577fa596cd4c27bccee648c815fa", "score": "0.5620341", "text": "updateIconColor(newVal) {\n // hide icon if we have entity picture\n if (newVal.attributes.entity_picture) {\n this.style.backgroundImage = `url(${newVal.attributes.entity_picture})`;\n this.$.icon.style.display = 'none';\n return;\n }\n\n this.style.backgroundImage = '';\n this.$.icon.style.display = 'inline';\n\n // for domain light, set color of icon to light color if available and it is\n // not very white (sum rgb colors < 730)\n if (newVal.domain === 'light' && newVal.state === 'on' &&\n newVal.attributes.rgb_color &&\n newVal.attributes.rgb_color.reduce((cur, tot) => cur + tot, 0) < 730) {\n this.$.icon.style.color = `rgb(${newVal.attributes.rgb_color.join(',')})`;\n } else {\n this.$.icon.style.color = null;\n }\n }", "title": "" }, { "docid": "06326092f3e88277b44723ca293a5a28", "score": "0.56172836", "text": "function updateIcon(marker)\n{\n if(routino.point[marker].home)\n {\n if(routino.point[marker].active)\n document.getElementById(\"icon\" + marker).src=\"icons/marker-home-red.png\";\n else\n document.getElementById(\"icon\" + marker).src=\"icons/marker-home-grey.png\";\n\n markers[marker].setIcon(icons.home);\n }\n else\n {\n if(routino.point[marker].active)\n document.getElementById(\"icon\" + marker).src=\"icons/marker-\" + marker + \"-red.png\";\n else\n document.getElementById(\"icon\" + marker).src=\"icons/marker-\" + marker + \"-grey.png\";\n\n markers[marker].setIcon(icons[marker]);\n }\n\n markers[marker].update();\n}", "title": "" }, { "docid": "fc41675fc870b699d6deea56a878dbfe", "score": "0.5603664", "text": "function open_icon(el) {\n if (opt.closeIcon != 'rotate') {\n el.html(opt.openIcon);\n }\n }", "title": "" }, { "docid": "09f61103d93de8cdc8a02cc6adf0248e", "score": "0.5567051", "text": "function setIcon(iconmode) {\n\n $(\".akow-msgbox-infoicon\").css(\"display\", \"none\");\n $(\".akow-msgbox-questionicon\").css(\"display\", \"none\");\n $(\".akow-msgbox-warningicon\").css(\"display\", \"none\");\n $(\".akow-msgbox-erroricon\").css(\"display\", \"none\");\n\n if (!iconmode) {\n $(\".akow-msgbox-infoicon\").css(\"display\", \"block\");\n return\n }\n\n if (iconmode == \"info\") {\n $(\".akow-msgbox-infoicon\").css(\"display\", \"block\");\n return\n }\n\n if (iconmode == \"question\") {\n $(\".akow-msgbox-questionicon\").css(\"display\", \"block\");\n return\n }\n\n if (iconmode == \"warning\") {\n $(\".akow-msgbox-warningicon\").css(\"display\", \"block\");\n return\n }\n\n if (iconmode == \"error\") {\n $(\".akow-msgbox-erroricon\").css(\"display\", \"block\");\n return\n }\n\n $(\".akow-msgbox-infoicon\").css(\"display\", \"block\");\n\n}", "title": "" }, { "docid": "5cf2a1b70a1bbaa7da9df41e879988cc", "score": "0.5556114", "text": "updateIcons() {\n this.cropIcon(this.envMask, getEnvironment());\n this.cropIcon(this.socMask, getSociety());\n this.cropIcon(this.ecoMask, getEconomy());\n this.cropIcon(this.resMask, getResources());\n }", "title": "" }, { "docid": "7e837952da639fbff4c4f5b60b19ca4b", "score": "0.55536366", "text": "function reloadIconNormal() {\n document.getElementById(\"reloadIcon\").src = \"../images/reload.png\";\n}", "title": "" }, { "docid": "da165b29043fe3fafcaa6b5373c964c7", "score": "0.5549991", "text": "function updateIcon() {\n return true;\n}", "title": "" }, { "docid": "e7eff3c790ced6bcb389658faa90211a", "score": "0.5540657", "text": "function initIcons() {\n for (let color of self.iconColorNames) {\n self.icons[color] = new L.Icon({\n iconUrl: 'https://cdn.rawgit.com/pointhi/leaflet-color-markers/master/img/marker-icon-' + color + '.png',\n shadowUrl: 'https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png',\n iconSize: [25, 41],\n iconAnchor: [12, 41],\n popupAnchor: [1, -34],\n shadowSize: [41, 41]\n });\n }\n\n }", "title": "" }, { "docid": "b434563c72a5d86ad1e70be590079f70", "score": "0.553416", "text": "function assignIcon(iconCode, iconName) {\n $('#iconAssignmentBTN').html(\"<span class='input-group-text'><i class='\" + iconCode + \"'></i></span>\");\n $('#categoryName').val(iconName);\n $('#iconModel').modal('hide');\n $('#iconCode').val(iconCode);\n}", "title": "" }, { "docid": "07db0ccd1d88e3976608051140e548b2", "score": "0.55143774", "text": "function changeIcon() {\n // find the button\n const button = this.querySelector('button');\n // find the icon\n const icon = button.querySelector('svg');\n // toggle minus class\n if (button.getAttribute('aria-expanded') === 'true') {\n icon.classList.toggle('fa-minus-square');\n } else {\n icon.classList.toggle('fa-plus-square');\n }\n}", "title": "" }, { "docid": "d3b31dd48246b7492998615639811ac1", "score": "0.549005", "text": "setIconset() {\n const slot = this.shadowRoot.querySelector('slot');\n slot.addEventListener('slotchange', () => {\n const [ svg ] = slot.assignedNodes().filter(node => node.nodeType !== Node.TEXT_NODE);\n const icons = svg.querySelectorAll('g');\n if (!icons.length) return false;\n document.iconMap[this._iconset] = icons;\n const event = new CustomEvent('ionset-loaded');\n return window.dispatchEvent(event);\n });\n const [ svg ] = slot.assignedNodes().filter(node => node.nodeType !== Node.TEXT_NODE);\n // In some case, the slot content is not yet rendered\n if (svg) {\n const icons = svg.querySelectorAll('g');\n if (!icons.length) return false;\n document.iconMap[this._iconset] = icons;\n const event = new CustomEvent('ionset-loaded');\n return window.dispatchEvent(event);\n }\n }", "title": "" }, { "docid": "1fb11b946975ddae675630737e5fdae7", "score": "0.5488575", "text": "function resetIconNormal() {\n document.getElementById(\"resetFormIcon\").src = \"../images/remove3.png\";\n}", "title": "" }, { "docid": "a3e57d7cb648fbbb45d5701572bb221f", "score": "0.5476508", "text": "updateIcons_() {\n if (this.scope_ && this.element_) {\n var spanEl = this.element_.find('.js-node-icons');\n var iconHtml = /** @type {string} */ (this.scope_['item']['getIcons']()) || defaultContent;\n spanEl.html(iconHtml);\n this.compile_(spanEl.contents())(this.scope_);\n }\n }", "title": "" }, { "docid": "f9d3afb53161e6813c43333f7eea9fce", "score": "0.54725105", "text": "function createSelectedIcon() {\n let myURL = $('script[src$=\"leaflet.js\"]').attr('src').replace('leaflet.js', '');\n let selectedIcon = window.L.icon({\n iconUrl: myURL + '../css/images/airplane2x.png',\n iconRetinaUrl: myURL + '../css/images/airplane2x.png',\n iconSize: [32, 32],\n iconAnchor: [9, 21],\n });\n\n return selectedIcon;\n}", "title": "" }, { "docid": "1bebbadead4dbfb6080c59bef808009b", "score": "0.54713815", "text": "updateIcons() {\n for (const schema of this.schemas) {\n if (!schema.$meta) {\n schema.$meta = {};\n }\n schema.$meta.icon = getIcon(schema);\n }\n }", "title": "" }, { "docid": "a3687c4e5f45f086786a38e9219a32b4", "score": "0.5469998", "text": "set leadingIcon(value){Helper$2.UpdateInputAttribute(this,\"leading-icon\",value)}", "title": "" }, { "docid": "a3687c4e5f45f086786a38e9219a32b4", "score": "0.5469998", "text": "set leadingIcon(value){Helper$2.UpdateInputAttribute(this,\"leading-icon\",value)}", "title": "" }, { "docid": "a3687c4e5f45f086786a38e9219a32b4", "score": "0.5469998", "text": "set leadingIcon(value){Helper$2.UpdateInputAttribute(this,\"leading-icon\",value)}", "title": "" }, { "docid": "a3687c4e5f45f086786a38e9219a32b4", "score": "0.5469998", "text": "set leadingIcon(value){Helper$2.UpdateInputAttribute(this,\"leading-icon\",value)}", "title": "" }, { "docid": "a3687c4e5f45f086786a38e9219a32b4", "score": "0.5469998", "text": "set leadingIcon(value){Helper$2.UpdateInputAttribute(this,\"leading-icon\",value)}", "title": "" }, { "docid": "a3687c4e5f45f086786a38e9219a32b4", "score": "0.5469998", "text": "set leadingIcon(value){Helper$2.UpdateInputAttribute(this,\"leading-icon\",value)}", "title": "" }, { "docid": "a3687c4e5f45f086786a38e9219a32b4", "score": "0.5469998", "text": "set leadingIcon(value){Helper$2.UpdateInputAttribute(this,\"leading-icon\",value)}", "title": "" }, { "docid": "a3687c4e5f45f086786a38e9219a32b4", "score": "0.5469998", "text": "set leadingIcon(value){Helper$2.UpdateInputAttribute(this,\"leading-icon\",value)}", "title": "" } ]
a9243a8fda6da790b4a18472df7c1114
returns the sign of PE cross PF
[ { "docid": "cebb98207cc784ec9fba3b94b08e7eac", "score": "0.64865726", "text": "function cross(p, e, f) {\n\t\tvar c = (e.x-p.x)*(f.y-p.y)-(e.y-p.y)*(f.x-p.x);\n\t\treturn c > 0 ? 1 : c < 0 ? -1 : 0;\n\t}", "title": "" } ]
[ { "docid": "6a3bf3f64d8e18845f33b4df68574a59", "score": "0.6668499", "text": "csign () {\n return this.cneg() * -2 + 1 - this.czero();\n }", "title": "" }, { "docid": "61479a0715aaf417e134935112a1b3e7", "score": "0.58504975", "text": "function signPoly(value){if(value<0)return-1;return value>0?1:0;}", "title": "" }, { "docid": "37ce76447d001330212ccd6a58a4476c", "score": "0.57784265", "text": "function signPoint(key, P) {\n return _scalarMult(key, P);\n}", "title": "" }, { "docid": "4729e363ffd8470b072a45a96341e003", "score": "0.5740523", "text": "function invErfc(p) {\n if (p < 0.0 || p > 2.0) {\n throw RangeError('Argument must be betweeen 0 and 2');\n }\n\n else if (p === 0.0) {\n return Infinity;\n }\n \n else if (p === 2.0) {\n return -Infinity;\n }\n \n else {\n var pp = p < 1.0 ? p : 2.0 - p;\n var t = Math.sqrt(-2.0 * Math.log(pp / 2.0));\n var x = -0.70711 * ((2.30753 + t * 0.27061) / (1.0 + t * (0.99229 + t * 0.04481)) - t);\n\n var err1 = erfc(x) - pp;\n x += err1 / (M_2_SQRTPI * Math.exp(-x * x) - x * err1);\n var err2 = erfc(x) - pp;\n x += err2 / (M_2_SQRTPI * Math.exp(-x * x) - x * err2);\n\n return p < 1.0 ? x : -x;\n }\n}", "title": "" }, { "docid": "cb9404e6befa473ae8e03764263ef2bb", "score": "0.57402414", "text": "function sign(x)\r\n{\r\n return (x > 0) - (x < 0);\r\n}", "title": "" }, { "docid": "fa31e85df477d805428acedd11b4b005", "score": "0.5694945", "text": "function sign(x) { return x ? x < 0 ? -1 : 1 : 0; }", "title": "" }, { "docid": "fa31e85df477d805428acedd11b4b005", "score": "0.5694945", "text": "function sign(x) { return x ? x < 0 ? -1 : 1 : 0; }", "title": "" }, { "docid": "b9d5b473ff42018779cac8189636e4d6", "score": "0.56942517", "text": "function invertSign(point){\n\treturn point.map(function(item){ return -item });\n}", "title": "" }, { "docid": "7e5ffaf8814cf30526345a9cdef36b11", "score": "0.5691101", "text": "function sign(hx) { \nreturn hx ? hx < 0 ? -1 : 1 : 0;\n}", "title": "" }, { "docid": "72b976490a589cd47079ec9ca40194fe", "score": "0.5680643", "text": "function signChanges(p) {\n var d = p.length - 1;\n var result = 0;\n var prevSign = Math.sign(p[0]);\n for (var i = 1; i < d + 1; i++) {\n var sign = Math.sign(p[i]);\n if (sign !== prevSign && sign !== 0) {\n result++;\n prevSign = sign;\n }\n }\n return result;\n}", "title": "" }, { "docid": "51c8122b01777e729619735445b82412", "score": "0.56540793", "text": "function sign(x) {\n\t return x < 0 ? -1 : 1;\n\t}", "title": "" }, { "docid": "99f930c3049a1e0eb2ffbdaf625ab5e7", "score": "0.5636417", "text": "function sign(val){return val>=0?1:-1;}", "title": "" }, { "docid": "c41071c6ea3d36a3cdda7635f2416b54", "score": "0.56088257", "text": "function ecp_sign(r, s, p, a, G, n, d, z, l) {\n\tvar R = ecp_new(l), S = ecp_new(l), k = mpn_new(l);\n\tfor (;;) {\n\t\tfor (var i = 0; i < l; ++i) {\n\t\t\tk[i] = Math.random() * 0x80000000 | 0;\n\t\t}\n\t\tvar r0 = ecp_proj(R, ecp_mul(S, k, G, a, p, l), p, l)[0];\n\t\tif (mpn_cmp(r0, n, l) >= 0) {\n\t\t\tmpn_sub(r0, r0, n, l);\n\t\t}\n\t\tif (!mpn_zero_p(r0, l)) {\n\t\t\tvar t0 = _ecp_t0, t1 = _ecp_t1;\n\t\t\tfp_mul(s, fp_inv(t0, k, n, l), fp_add(t1, z, fp_mul(t1, r0, d, n, l), n, l), n, l);\n\t\t\tif (!mpn_zero_p(s, l)) {\n\t\t\t\tmpn_copyi(r, r0, l);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "802fbbcac19e384363d7899f93e4ee66", "score": "0.55771834", "text": "function sign(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; }", "title": "" }, { "docid": "c9f38229acc361f85028308642a64547", "score": "0.5527296", "text": "seconDerivateVector(){\n\t\t// F''(t) = 2(p1-2pc+p2)\n\t\t//{x: 2*(p1.x - 2*pc.x + p2.x) ,y: 2*(p1.y - 2*pc.y + p2.y)}\n\t\treturn (p1.sub(pc.mul(2)).add(p2)).mul(2);\n\t}", "title": "" }, { "docid": "6e4bebd348e54512c0327b645eb135c2", "score": "0.5498756", "text": "function negative(x) {\r\n return ((x[x.length-1]>>(bpe-1))&1);\r\n }", "title": "" }, { "docid": "c21b30d633f799421db835a54bf379ee", "score": "0.5492218", "text": "function negative(x) {\n return ((x[x.length-1]>>(bpe-1))&1);\n }", "title": "" }, { "docid": "94469c732982a573de77dfa5ef41a2aa", "score": "0.54894805", "text": "function sign(val) {\n\t return val >= 0 ? 1 : -1;\n\t}", "title": "" }, { "docid": "30890f10bcacd6af9f437f27f92095e8", "score": "0.5481489", "text": "perp() {\n return new Vector(-1 * this.y, this.x);\n }", "title": "" }, { "docid": "cef085249ee5991d2fb6108976de6181", "score": "0.5469842", "text": "function sign(x) {\n return x < 0 ? -1 : 1;\n}", "title": "" }, { "docid": "8cb567d415868fbf2cf55c68ff88d0da", "score": "0.54645705", "text": "function sign(x) {\n return x < 0 ? -1 : 1;\n}", "title": "" }, { "docid": "8cb567d415868fbf2cf55c68ff88d0da", "score": "0.54645705", "text": "function sign(x) {\n return x < 0 ? -1 : 1;\n}", "title": "" }, { "docid": "8cb567d415868fbf2cf55c68ff88d0da", "score": "0.54645705", "text": "function sign(x) {\n return x < 0 ? -1 : 1;\n}", "title": "" }, { "docid": "8cb567d415868fbf2cf55c68ff88d0da", "score": "0.54645705", "text": "function sign(x) {\n return x < 0 ? -1 : 1;\n}", "title": "" }, { "docid": "8cb567d415868fbf2cf55c68ff88d0da", "score": "0.54645705", "text": "function sign(x) {\n return x < 0 ? -1 : 1;\n}", "title": "" }, { "docid": "8cb567d415868fbf2cf55c68ff88d0da", "score": "0.54645705", "text": "function sign(x) {\n return x < 0 ? -1 : 1;\n}", "title": "" }, { "docid": "d3b1024253b79f8eb233944294016c87", "score": "0.54522187", "text": "function signPoly(value) {\n if (value < 0) return -1;\n return value > 0 ? 1 : 0;\n}", "title": "" }, { "docid": "d3b1024253b79f8eb233944294016c87", "score": "0.54522187", "text": "function signPoly(value) {\n if (value < 0) return -1;\n return value > 0 ? 1 : 0;\n}", "title": "" }, { "docid": "0f023abe8cbeb5d7f560d6c00b8de1d8", "score": "0.5449217", "text": "function sign(val) {\n\t return val >= 0 ? 1 : -1;\n\t }", "title": "" }, { "docid": "0f023abe8cbeb5d7f560d6c00b8de1d8", "score": "0.5449217", "text": "function sign(val) {\n\t return val >= 0 ? 1 : -1;\n\t }", "title": "" }, { "docid": "292bcec5827876cfb644de35fa6f0c2e", "score": "0.543877", "text": "ec(){\n return this.NP/2 - this.Pr/(2*this.qmax())\n }", "title": "" }, { "docid": "160fd0307cdfab95eb1b403bd5f4d290", "score": "0.5422643", "text": "function negate(p) {\n return multiplyByConst(-1, p);\n}", "title": "" }, { "docid": "1caac0c37124cc778dcee3f2e60c6176", "score": "0.5413544", "text": "function sign() {\n var value = arguments[0];\n if (value > 0) {\n return 1;\n } else if (value < 0) {\n return -1;\n } else {\n return 0;\n }\n}", "title": "" }, { "docid": "856fbd9ad4111c8a6f5aa8b54dfc2eeb", "score": "0.53851694", "text": "function sign(x) {\r\n // sign: R -> {-1,+1} | specifically 1 if x > 0 and -1 otherwise.\r\n return x >= 0 ? 1 : -1; \r\n}", "title": "" }, { "docid": "9bc8e6cfc15b53bd9e0004da93dbbe2f", "score": "0.53768075", "text": "static dPnP(Pn,P) {\n return Physics.pE(Pn.nx,Pn.ny,P.x-Pn.x,P.y-Pn.y);\n }", "title": "" }, { "docid": "1ca1f62624acf139683c56402885111c", "score": "0.53521633", "text": "is_inverted() {\n let v1 = [\n points[this.p_2d_idx[1]] - points[this.p_2d_idx[0]],\n points[this.p_2d_idx[1] + 1] - points[this.p_2d_idx[0] + 1]\n ];\n let v2 = [\n points[this.p_2d_idx[2]] - points[this.p_2d_idx[1]],\n points[this.p_2d_idx[2] + 1] - points[this.p_2d_idx[1] + 1]\n ];\n return v1[0] * v2[1] - v1[1] * v2[0] < 0;\n }", "title": "" }, { "docid": "a32835df6ffa2d9fa21b730a15343610", "score": "0.5350332", "text": "function invErf(p) {\n if (p < -1.0 || p > 1.0) {\n throw RangeError('Argument must be betweeen -1 and 1');\n }\n\n return -invErfc(p + 1);\n}", "title": "" }, { "docid": "8b25aeb7cd81591d3d5e435e98ae1e22", "score": "0.5344554", "text": "function puissance(par2, par3){\n return (Math.pow(par2, par3));\n}", "title": "" }, { "docid": "b8ef6b92252a8db246a492868fefbd0c", "score": "0.5338264", "text": "function pe(ge,be){return ge<<be|ge>>>32-be}", "title": "" }, { "docid": "a9964fe62424be37b5ae8d16ea9a9a86", "score": "0.5308559", "text": "function PrincipalCFs(array) {\n var principalCFs = []\n for (var i = 0; i < array.length; i++) {\n principalCFs.push(-array[i][1])\n }\nreturn principalCFs\n}", "title": "" }, { "docid": "374b9abe4177a4c4a17b24929bec54c9", "score": "0.5308494", "text": "static dPnC(Pn,C) {\n return (Physics.dPnP(Pn,C)-C.r);\n }", "title": "" }, { "docid": "ea51fe3cd6933d049bf467d4a4a79070", "score": "0.5305442", "text": "Y(){\n if(this.ec() == 0){\n return this.NP\n }\n else{\n if(this.e() < this.ec()){\n return this.NP - 2*this.e()\n }\n else{\n let f = this.NP/2 - this.de\n let k1 = f + this.NP/2\n let k2 = Math.pow(k1,2)\n let k3 = 2*this.Pr*(this.e() + f)/this.qmax()\n if(k2 > k3){\n let x1 = k1 + Math.pow(k2-k3,0.5)\n let x2 = k1 - Math.pow(k2-k3,0.5)\n return Math.min(x1,x2)\n }\n else{\n return 0\n }\n }\n }\n }", "title": "" }, { "docid": "e7c9ecc7f115d4735a644d004deb7575", "score": "0.52690774", "text": "function sign(val) {\n return val >= 0 ? 1 : -1;\n }", "title": "" }, { "docid": "c4cf39d139284c539407be38d9dcf451", "score": "0.5269007", "text": "function negative(x) {\n return x[x.length - 1] >> bpe - 1 & 1;\n}", "title": "" }, { "docid": "cd061eafae8f9fd4cebf0e275f52402c", "score": "0.5267428", "text": "function sign(val) {\n return val >= 0 ? 1 : -1;\n}", "title": "" }, { "docid": "167c6d8075ac9e775015fee2f846c4ae", "score": "0.52657896", "text": "function cross(p0, p1, p2) {\n\treturn (p1.x - p0.x) * (p2.y - p0.y) - (p1.y - p0.y) * (p2.x - p0.x);\n}", "title": "" }, { "docid": "72e94cc329444335114bf23f759a3fb3", "score": "0.52624345", "text": "function sign(val) {\n return val >= 0 ? 1 : -1;\n}", "title": "" }, { "docid": "60f8d59bf6317b43b0896026d6a64ea7", "score": "0.525121", "text": "function isminusoneovertwo(p) {\n return equalq(p, -1, 2);\n}", "title": "" }, { "docid": "0976fff52f1516275862f6c6a2c3b3c8", "score": "0.52009773", "text": "Sign( v2 ) {\n\n let clockwise = 1;\n let anticlockwise = -1;\n\n if ( this.y * v2.x > this.x * v2.y ) {\n return anticlockwise;\n } else {\n return clockwise;\n };\n }", "title": "" }, { "docid": "492f503351c05a04bf3967087be2e9ff", "score": "0.51963437", "text": "function sign(a, b) {\n return b >= 0 ? a >= 0 ? a : -a : a >= 0 ? -a : a;\n}", "title": "" }, { "docid": "da91f23852d6460b52aa8f9d2bfda6c6", "score": "0.5195226", "text": "function inv(p) {\n\t return { x: p.y, y: p.x };\n\t }", "title": "" }, { "docid": "4ee923fc729b7f3b48fb76f2b8cba6b1", "score": "0.51779735", "text": "function inverse(p) {\n p.x -= this.x0;\n p.y -= this.y0;\n var lon, lat, ts, ce, Chi;\n var rh = Math.sqrt(p.x * p.x + p.y * p.y);\n if (this.sphere) {\n var c = 2 * Math.atan(rh / (2 * this.a * this.k0));\n lon = this.long0;\n lat = this.lat0;\n if (rh <= _values.EPSLN) {\n p.x = lon;\n p.y = lat;\n return p;\n }\n lat = Math.asin(Math.cos(c) * this.sinlat0 + p.y * Math.sin(c) * this.coslat0 / rh);\n if (Math.abs(this.coslat0) < _values.EPSLN) {\n if (this.lat0 > 0) {\n lon = (0, _adjust_lon.default)(this.long0 + Math.atan2(p.x, -1 * p.y));\n } else\n {\n lon = (0, _adjust_lon.default)(this.long0 + Math.atan2(p.x, p.y));\n }\n } else\n {\n lon = (0, _adjust_lon.default)(this.long0 + Math.atan2(p.x * Math.sin(c), rh * this.coslat0 * Math.cos(c) - p.y * this.sinlat0 * Math.sin(c)));\n }\n p.x = lon;\n p.y = lat;\n return p;\n } else\n {\n if (Math.abs(this.coslat0) <= _values.EPSLN) {\n if (rh <= _values.EPSLN) {\n lat = this.lat0;\n lon = this.long0;\n p.x = lon;\n p.y = lat;\n //trace(p.toString());\n return p;\n }\n p.x *= this.con;\n p.y *= this.con;\n ts = rh * this.cons / (2 * this.a * this.k0);\n lat = this.con * (0, _phi2z.default)(this.e, ts);\n lon = this.con * (0, _adjust_lon.default)(this.con * this.long0 + Math.atan2(p.x, -1 * p.y));\n } else\n {\n ce = 2 * Math.atan(rh * this.cosX0 / (2 * this.a * this.k0 * this.ms1));\n lon = this.long0;\n if (rh <= _values.EPSLN) {\n Chi = this.X0;\n } else\n {\n Chi = Math.asin(Math.cos(ce) * this.sinX0 + p.y * Math.sin(ce) * this.cosX0 / rh);\n lon = (0, _adjust_lon.default)(this.long0 + Math.atan2(p.x * Math.sin(ce), rh * this.cosX0 * Math.cos(ce) - p.y * this.sinX0 * Math.sin(ce)));\n }\n lat = -1 * (0, _phi2z.default)(this.e, Math.tan(0.5 * (_values.HALF_PI + Chi)));\n }\n }\n p.x = lon;\n p.y = lat;\n\n //trace(p.toString());\n return p;\n\n}", "title": "" }, { "docid": "aea5e8b4dd2515b10366eda2e940442d", "score": "0.5175617", "text": "function inv(p) {\n return { x: p.y, y: p.x };\n }", "title": "" }, { "docid": "aea5e8b4dd2515b10366eda2e940442d", "score": "0.5175617", "text": "function inv(p) {\n return { x: p.y, y: p.x };\n }", "title": "" }, { "docid": "dc0f6a304aad51bb763019c1b7d02092", "score": "0.5156484", "text": "function isMinusSqrtThreeOverTwo(p) {\n return (defs_1.ismultiply(p) &&\n isminusoneovertwo(defs_1.cadr(p)) &&\n isSqrtThree(defs_1.caddr(p)) &&\n misc_1.length(p) === 3);\n}", "title": "" }, { "docid": "c412a0a51b4ea8d28868b864810bab1d", "score": "0.5150839", "text": "function inverse(p) {\n\n var rh1, con, ts;\n var lat, lon;\n var x = (p.x - this.x0) / this.k0;\n var y = (this.rh - (p.y - this.y0) / this.k0);\n if (this.ns > 0) {\n rh1 = Math.sqrt(x * x + y * y);\n con = 1;\n }\n else {\n rh1 = -Math.sqrt(x * x + y * y);\n con = -1;\n }\n var theta = 0;\n if (rh1 !== 0) {\n theta = Math.atan2((con * x), (con * y));\n }\n if ((rh1 !== 0) || (this.ns > 0)) {\n con = 1 / this.ns;\n ts = Math.pow((rh1 / (this.a * this.f0)), con);\n lat = (0,_common_phi2z__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this.e, ts);\n if (lat === -9999) {\n return null;\n }\n }\n else {\n lat = -_constants_values__WEBPACK_IMPORTED_MODULE_5__.HALF_PI;\n }\n lon = (0,_common_adjust_lon__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(theta / this.ns + this.long0);\n\n p.x = lon;\n p.y = lat;\n return p;\n}", "title": "" }, { "docid": "f17249b87ef3324478347f6d468f0406", "score": "0.51502144", "text": "function cross(p1, p2, o){\r\n var po1 = pSub(p1, o);\r\n var po2 = pSub(p2, o);\r\n return po1[0] * po2[1] - po1[1] * po2[0];\r\n}", "title": "" }, { "docid": "43c37053e897b622bf0364c87e7d543d", "score": "0.5144187", "text": "function sign(value) {\n return value == 0 ? 0 : value > 0 ? 1 : -1;\n }", "title": "" }, { "docid": "c5749a5287ed31b3e611e2b23e920042", "score": "0.5138281", "text": "function notRight(p1, p2, p3){\n return (p2.x - p1.x)*(p3.y - p1.y) - (p2.y - p1.y)*(p3.x - p1.x);\n}", "title": "" }, { "docid": "8f3e77f12064e41148819d4c9e7ccc42", "score": "0.513404", "text": "function inverse(p) {\n\n var rh1, con, ts;\n var lat, lon;\n var x = (p.x - this.x0) / this.k0;\n var y = (this.rh - (p.y - this.y0) / this.k0);\n if (this.ns > 0) {\n rh1 = Math.sqrt(x * x + y * y);\n con = 1;\n }\n else {\n rh1 = -Math.sqrt(x * x + y * y);\n con = -1;\n }\n var theta = 0;\n if (rh1 !== 0) {\n theta = Math.atan2((con * x), (con * y));\n }\n if ((rh1 !== 0) || (this.ns > 0)) {\n con = 1 / this.ns;\n ts = Math.pow((rh1 / (this.a * this.f0)), con);\n lat = Object(_common_phi2z__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this.e, ts);\n if (lat === -9999) {\n return null;\n }\n }\n else {\n lat = -_constants_values__WEBPACK_IMPORTED_MODULE_5__[\"HALF_PI\"];\n }\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(theta / this.ns + this.long0);\n\n p.x = lon;\n p.y = lat;\n return p;\n}", "title": "" }, { "docid": "8f3e77f12064e41148819d4c9e7ccc42", "score": "0.513404", "text": "function inverse(p) {\n\n var rh1, con, ts;\n var lat, lon;\n var x = (p.x - this.x0) / this.k0;\n var y = (this.rh - (p.y - this.y0) / this.k0);\n if (this.ns > 0) {\n rh1 = Math.sqrt(x * x + y * y);\n con = 1;\n }\n else {\n rh1 = -Math.sqrt(x * x + y * y);\n con = -1;\n }\n var theta = 0;\n if (rh1 !== 0) {\n theta = Math.atan2((con * x), (con * y));\n }\n if ((rh1 !== 0) || (this.ns > 0)) {\n con = 1 / this.ns;\n ts = Math.pow((rh1 / (this.a * this.f0)), con);\n lat = Object(_common_phi2z__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this.e, ts);\n if (lat === -9999) {\n return null;\n }\n }\n else {\n lat = -_constants_values__WEBPACK_IMPORTED_MODULE_5__[\"HALF_PI\"];\n }\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(theta / this.ns + this.long0);\n\n p.x = lon;\n p.y = lat;\n return p;\n}", "title": "" }, { "docid": "8f3e77f12064e41148819d4c9e7ccc42", "score": "0.513404", "text": "function inverse(p) {\n\n var rh1, con, ts;\n var lat, lon;\n var x = (p.x - this.x0) / this.k0;\n var y = (this.rh - (p.y - this.y0) / this.k0);\n if (this.ns > 0) {\n rh1 = Math.sqrt(x * x + y * y);\n con = 1;\n }\n else {\n rh1 = -Math.sqrt(x * x + y * y);\n con = -1;\n }\n var theta = 0;\n if (rh1 !== 0) {\n theta = Math.atan2((con * x), (con * y));\n }\n if ((rh1 !== 0) || (this.ns > 0)) {\n con = 1 / this.ns;\n ts = Math.pow((rh1 / (this.a * this.f0)), con);\n lat = Object(_common_phi2z__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this.e, ts);\n if (lat === -9999) {\n return null;\n }\n }\n else {\n lat = -_constants_values__WEBPACK_IMPORTED_MODULE_5__[\"HALF_PI\"];\n }\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(theta / this.ns + this.long0);\n\n p.x = lon;\n p.y = lat;\n return p;\n}", "title": "" }, { "docid": "6e3a3aa527c7b20ed4ef30a6a0aeac7f", "score": "0.51335466", "text": "function Negativa(x) {\n for (i = 0; i < x.length; i++) {\n x[i] = x[i] * -1;\n if (x[i] > 0) {\n x[i] = x[i] * -1;\n }\n }\n return (x);\n\n}", "title": "" }, { "docid": "d1f246b61b639501288f900406d8cc49", "score": "0.51248276", "text": "function xpr( a , b , c , d , e , f )\n {\n\n return( [ ((b * f) - (c * e)) , ((c * d) - (a * f)) , ((a * e) - (b * d)) ] ) ;\n\n }", "title": "" }, { "docid": "b8615ce69bc12be09ef7b285b9df497a", "score": "0.5118124", "text": "static dPC(P,C) {\n return (Physics.dPP(P,C)-C.r);\n }", "title": "" }, { "docid": "329778bab41fb002d8412ab5883e915f", "score": "0.5098279", "text": "function sign(x) {\n x = new this(x);\n return x.d ? (x.d[0] ? x.s : 0 * x.s) : x.s || NaN;\n }", "title": "" }, { "docid": "329778bab41fb002d8412ab5883e915f", "score": "0.5098279", "text": "function sign(x) {\n x = new this(x);\n return x.d ? (x.d[0] ? x.s : 0 * x.s) : x.s || NaN;\n }", "title": "" }, { "docid": "329778bab41fb002d8412ab5883e915f", "score": "0.5098279", "text": "function sign(x) {\n x = new this(x);\n return x.d ? (x.d[0] ? x.s : 0 * x.s) : x.s || NaN;\n }", "title": "" }, { "docid": "329778bab41fb002d8412ab5883e915f", "score": "0.5098279", "text": "function sign(x) {\n x = new this(x);\n return x.d ? (x.d[0] ? x.s : 0 * x.s) : x.s || NaN;\n }", "title": "" }, { "docid": "329778bab41fb002d8412ab5883e915f", "score": "0.5098279", "text": "function sign(x) {\n x = new this(x);\n return x.d ? (x.d[0] ? x.s : 0 * x.s) : x.s || NaN;\n }", "title": "" }, { "docid": "fac1bc8926b0319c9a480129480935fb", "score": "0.5085601", "text": "function get_pos_neg(x, y) {\n nx = x / Math.abs(x)\n ny = y / Math.abs(y)\n return [nx, ny]\n}", "title": "" }, { "docid": "227d81ea0ec55c177e9eb5a6eadd8f0d", "score": "0.50835", "text": "function sign(x) {\r\n x = new this(x);\r\n return x.d ? (x.d[0] ? x.s : 0 * x.s) : x.s || NaN;\r\n }", "title": "" }, { "docid": "227d81ea0ec55c177e9eb5a6eadd8f0d", "score": "0.50835", "text": "function sign(x) {\r\n x = new this(x);\r\n return x.d ? (x.d[0] ? x.s : 0 * x.s) : x.s || NaN;\r\n }", "title": "" }, { "docid": "227d81ea0ec55c177e9eb5a6eadd8f0d", "score": "0.50835", "text": "function sign(x) {\r\n x = new this(x);\r\n return x.d ? (x.d[0] ? x.s : 0 * x.s) : x.s || NaN;\r\n }", "title": "" }, { "docid": "227d81ea0ec55c177e9eb5a6eadd8f0d", "score": "0.50835", "text": "function sign(x) {\r\n x = new this(x);\r\n return x.d ? (x.d[0] ? x.s : 0 * x.s) : x.s || NaN;\r\n }", "title": "" }, { "docid": "b8ca32de17414cd20e0636f5964d4e35", "score": "0.50824845", "text": "crossOver(parent1, parent2){\n let xOverPt = Math.floor(random(0, this.chromLength - 1)); //randomly select a crossover point from 0 to one less than the chomosome length\n \n let p1Mask = ((xOverPt + 1)** 2) - 1; //Use the crossover point squared to create a mask to apply to the first parent\n let p1Cont = parent1&p1Mask; //AND the first parent and the mask\n \n let p2Bits = (parent2 >>> xOverPt) << xOverPt; //shift the second parent to the right by the crozzover point, then shift the second parent left also by the crossover point\n \n console.log(p1Mask, p1Cont, p2Bits); //console log to check variable numbers\n \n return parent1|parent2; //return the value of the OR of the two parents \n }", "title": "" }, { "docid": "6399a6a3448f842ecf46ebe3118ba44e", "score": "0.50820506", "text": "function\nats2jspre_neg_int0(x) { return ( -x ); }", "title": "" }, { "docid": "6399a6a3448f842ecf46ebe3118ba44e", "score": "0.50820506", "text": "function\nats2jspre_neg_int0(x) { return ( -x ); }", "title": "" }, { "docid": "6399a6a3448f842ecf46ebe3118ba44e", "score": "0.50820506", "text": "function\nats2jspre_neg_int0(x) { return ( -x ); }", "title": "" }, { "docid": "babd708c3125c55b37864c1d6a364440", "score": "0.50718695", "text": "function getSign(n) { // n = number (numeric) ; returns signed integer\n\treturn n > 0 ? 1 : -1;\n}", "title": "" }, { "docid": "f4355073597b652ac4c8e5a370900343", "score": "0.50673145", "text": "signum() {\n if(this.s < 0) return -1;\n else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0;\n else return 1;\n }", "title": "" }, { "docid": "35d773a69e4a4ca446d267fbb5a0117e", "score": "0.50657654", "text": "function perp(p0, p1) {\n var u01x = p0[1] - p1[1], u01y = p1[0] - p0[0],\n u01d = Math.sqrt(u01x * u01x + u01y * u01y);\n return [u01x / u01d, u01y / u01d];\n }", "title": "" }, { "docid": "bb66418504cbcd96c692ad58a265583e", "score": "0.50563765", "text": "function inverse(p) {\n var u, deltav, s, d, eps, ro, fi1;\n var ok;\n\n /* Transformation */\n /* revert y, x*/\n var tmp = p.x;\n p.x = p.y;\n p.y = tmp;\n if (!this.czech) {\n p.y *= -1;\n p.x *= -1;\n }\n ro = Math.sqrt(p.x * p.x + p.y * p.y);\n eps = Math.atan2(p.y, p.x);\n d = eps / Math.sin(this.s0);\n s = 2 * (Math.atan(Math.pow(this.ro0 / ro, 1 / this.n) * Math.tan(this.s0 / 2 + this.s45)) - this.s45);\n u = Math.asin(Math.cos(this.ad) * Math.sin(s) - Math.sin(this.ad) * Math.cos(s) * Math.cos(d));\n deltav = Math.asin(Math.cos(s) * Math.sin(d) / Math.cos(u));\n p.x = this.long0 - deltav / this.alfa;\n fi1 = u;\n ok = 0;\n var iter = 0;\n do {\n p.y = 2 * (Math.atan(Math.pow(this.k, - 1 / this.alfa) * Math.pow(Math.tan(u / 2 + this.s45), 1 / this.alfa) * Math.pow((1 + this.e * Math.sin(fi1)) / (1 - this.e * Math.sin(fi1)), this.e / 2)) - this.s45);\n if (Math.abs(fi1 - p.y) < 0.0000000001) {\n ok = 1;\n }\n fi1 = p.y;\n iter += 1;\n } while (ok === 0 && iter < 15);\n if (iter >= 15) {\n return null;\n }\n\n return (p);\n}", "title": "" }, { "docid": "bb66418504cbcd96c692ad58a265583e", "score": "0.50563765", "text": "function inverse(p) {\n var u, deltav, s, d, eps, ro, fi1;\n var ok;\n\n /* Transformation */\n /* revert y, x*/\n var tmp = p.x;\n p.x = p.y;\n p.y = tmp;\n if (!this.czech) {\n p.y *= -1;\n p.x *= -1;\n }\n ro = Math.sqrt(p.x * p.x + p.y * p.y);\n eps = Math.atan2(p.y, p.x);\n d = eps / Math.sin(this.s0);\n s = 2 * (Math.atan(Math.pow(this.ro0 / ro, 1 / this.n) * Math.tan(this.s0 / 2 + this.s45)) - this.s45);\n u = Math.asin(Math.cos(this.ad) * Math.sin(s) - Math.sin(this.ad) * Math.cos(s) * Math.cos(d));\n deltav = Math.asin(Math.cos(s) * Math.sin(d) / Math.cos(u));\n p.x = this.long0 - deltav / this.alfa;\n fi1 = u;\n ok = 0;\n var iter = 0;\n do {\n p.y = 2 * (Math.atan(Math.pow(this.k, - 1 / this.alfa) * Math.pow(Math.tan(u / 2 + this.s45), 1 / this.alfa) * Math.pow((1 + this.e * Math.sin(fi1)) / (1 - this.e * Math.sin(fi1)), this.e / 2)) - this.s45);\n if (Math.abs(fi1 - p.y) < 0.0000000001) {\n ok = 1;\n }\n fi1 = p.y;\n iter += 1;\n } while (ok === 0 && iter < 15);\n if (iter >= 15) {\n return null;\n }\n\n return (p);\n}", "title": "" }, { "docid": "bb66418504cbcd96c692ad58a265583e", "score": "0.50563765", "text": "function inverse(p) {\n var u, deltav, s, d, eps, ro, fi1;\n var ok;\n\n /* Transformation */\n /* revert y, x*/\n var tmp = p.x;\n p.x = p.y;\n p.y = tmp;\n if (!this.czech) {\n p.y *= -1;\n p.x *= -1;\n }\n ro = Math.sqrt(p.x * p.x + p.y * p.y);\n eps = Math.atan2(p.y, p.x);\n d = eps / Math.sin(this.s0);\n s = 2 * (Math.atan(Math.pow(this.ro0 / ro, 1 / this.n) * Math.tan(this.s0 / 2 + this.s45)) - this.s45);\n u = Math.asin(Math.cos(this.ad) * Math.sin(s) - Math.sin(this.ad) * Math.cos(s) * Math.cos(d));\n deltav = Math.asin(Math.cos(s) * Math.sin(d) / Math.cos(u));\n p.x = this.long0 - deltav / this.alfa;\n fi1 = u;\n ok = 0;\n var iter = 0;\n do {\n p.y = 2 * (Math.atan(Math.pow(this.k, - 1 / this.alfa) * Math.pow(Math.tan(u / 2 + this.s45), 1 / this.alfa) * Math.pow((1 + this.e * Math.sin(fi1)) / (1 - this.e * Math.sin(fi1)), this.e / 2)) - this.s45);\n if (Math.abs(fi1 - p.y) < 0.0000000001) {\n ok = 1;\n }\n fi1 = p.y;\n iter += 1;\n } while (ok === 0 && iter < 15);\n if (iter >= 15) {\n return null;\n }\n\n return (p);\n}", "title": "" }, { "docid": "bb66418504cbcd96c692ad58a265583e", "score": "0.50563765", "text": "function inverse(p) {\n var u, deltav, s, d, eps, ro, fi1;\n var ok;\n\n /* Transformation */\n /* revert y, x*/\n var tmp = p.x;\n p.x = p.y;\n p.y = tmp;\n if (!this.czech) {\n p.y *= -1;\n p.x *= -1;\n }\n ro = Math.sqrt(p.x * p.x + p.y * p.y);\n eps = Math.atan2(p.y, p.x);\n d = eps / Math.sin(this.s0);\n s = 2 * (Math.atan(Math.pow(this.ro0 / ro, 1 / this.n) * Math.tan(this.s0 / 2 + this.s45)) - this.s45);\n u = Math.asin(Math.cos(this.ad) * Math.sin(s) - Math.sin(this.ad) * Math.cos(s) * Math.cos(d));\n deltav = Math.asin(Math.cos(s) * Math.sin(d) / Math.cos(u));\n p.x = this.long0 - deltav / this.alfa;\n fi1 = u;\n ok = 0;\n var iter = 0;\n do {\n p.y = 2 * (Math.atan(Math.pow(this.k, - 1 / this.alfa) * Math.pow(Math.tan(u / 2 + this.s45), 1 / this.alfa) * Math.pow((1 + this.e * Math.sin(fi1)) / (1 - this.e * Math.sin(fi1)), this.e / 2)) - this.s45);\n if (Math.abs(fi1 - p.y) < 0.0000000001) {\n ok = 1;\n }\n fi1 = p.y;\n iter += 1;\n } while (ok === 0 && iter < 15);\n if (iter >= 15) {\n return null;\n }\n\n return (p);\n}", "title": "" }, { "docid": "ac33f9142a58a7ae3617860b28504147", "score": "0.50457823", "text": "_calcPPersp() {\r\n return [(2 * this.projection.near) / (this.projection.right - this.projection.left), 0.0, 0.0, 0.0,\r\n 0.0, (2 * this.projection.near) / (this.projection.top - this.projection.bottom), 0.0, 0.0,\r\n (this.projection.right + this.projection.left) / (this.projection.right - this.projection.left), (this.projection.top + this.projection.bottom) / (this.projection.top - this.projection.bottom), -((this.projection.far + this.projection.near) / (this.projection.far - this.projection.near)), -1.0,\r\n 0.0, 0.0, -((2 * this.projection.far * this.projection.near) / (this.projection.far - this.projection.near)), 0.0];\r\n }", "title": "" }, { "docid": "5fa90467b4cadd3ad139d1cfd89494ac", "score": "0.50234836", "text": "negate(){\n return mult(-1);\n }", "title": "" }, { "docid": "385e26257a9e9524e9026a0b811ddc74", "score": "0.50073045", "text": "unsign(int) {\n\t\treturn (int >>> 1) * 2 + (int & 1);\n\t}", "title": "" }, { "docid": "70c93cd7d51ac9a96ab23ed14b928af2", "score": "0.5007146", "text": "function inverse(p) {\n var u, deltav, s, d, eps, ro, fi1;\n var ok;\n\n /* Transformation */\n /* revert y, x*/\n var tmp = p.x;\n p.x = p.y;\n p.y = tmp;\n if (!this.czech) {\n p.y *= -1;\n p.x *= -1;\n }\n ro = Math.sqrt(p.x * p.x + p.y * p.y);\n eps = Math.atan2(p.y, p.x);\n d = eps / Math.sin(this.s0);\n s = 2 * (Math.atan(Math.pow(this.ro0 / ro, 1 / this.n) * Math.tan(this.s0 / 2 + this.s45)) - this.s45);\n u = Math.asin(Math.cos(this.ad) * Math.sin(s) - Math.sin(this.ad) * Math.cos(s) * Math.cos(d));\n deltav = Math.asin(Math.cos(s) * Math.sin(d) / Math.cos(u));\n p.x = this.long0 - deltav / this.alfa;\n fi1 = u;\n ok = 0;\n var iter = 0;\n do {\n p.y = 2 * (Math.atan(Math.pow(this.k, -1 / this.alfa) * Math.pow(Math.tan(u / 2 + this.s45), 1 / this.alfa) * Math.pow((1 + this.e * Math.sin(fi1)) / (1 - this.e * Math.sin(fi1)), this.e / 2)) - this.s45);\n if (Math.abs(fi1 - p.y) < 0.0000000001) {\n ok = 1;\n }\n fi1 = p.y;\n iter += 1;\n } while (ok === 0 && iter < 15);\n if (iter >= 15) {\n return null;\n }\n\n return p;\n}", "title": "" }, { "docid": "aeb0e49c9798986499414292e51b1042", "score": "0.50039583", "text": "function isminusoneoversqrttwo(p) {\n return (defs_1.ismultiply(p) &&\n equaln(defs_1.cadr(p), -1) &&\n isoneoversqrttwo(defs_1.caddr(p)) &&\n misc_1.length(p) === 3);\n}", "title": "" }, { "docid": "6f98eb32d75ca60e22b13496c7c3dd35", "score": "0.49968955", "text": "function coefSign(objective, coef){\n\tif(objective === \"minimize\"){\n\t\tcoef = _.map(coef, function(value){ return value*(-1);});\n\t}\n\treturn coef;\n}", "title": "" }, { "docid": "e364c432baf57bf8470668ca8d05f7c2", "score": "0.49946535", "text": "function negativePerspective(numArr){\n var newArr=[];\n for(var i=0; i<numArr.length; i++){\n if(numArr[i]>0) newArr.push(numArr[i]*-1);\n else newArr.push(numArr[i]);\n }\n return newArr;\n}", "title": "" }, { "docid": "d966b2132dbfffd858357615300efa1d", "score": "0.49922585", "text": "function pointOnNegativeSideOfPlane(point, plane)\n{\n return (dotProduct(point, plane.normal) - plane.dot < 0 ? true : false);\n}", "title": "" }, { "docid": "c79246d30b18ed03eb1bb696009922d2", "score": "0.498472", "text": "function sign(n) {\n\tif (n < 0){\n\tconsole.log(\"negative\");\n\t} else if (n > 0) {\n\t\tconsole.log(\"postive\");\n\t}\telse if (n === 0) {\n\t\tconsole.log(\"zero\");\n\t}\n}", "title": "" }, { "docid": "89232d2b0807e8b0e2c0ffb3bc27bd4b", "score": "0.49825364", "text": "function pointFpMultiply(k) {\n\t if(this.isInfinity()) return this;\n\t if(k.signum() == 0) return this.curve.getInfinity();\n\t\n\t var e = k;\n\t var h = e.multiply(new BigInteger(\"3\"));\n\t\n\t var neg = this.negate();\n\t var R = this;\n\t\n\t var i;\n\t for(i = h.bitLength() - 2; i > 0; --i) {\n\t\tR = R.twice();\n\t\n\t\tvar hBit = h.testBit(i);\n\t\tvar eBit = e.testBit(i);\n\t\n\t\tif (hBit != eBit) {\n\t\t R = R.add(hBit ? this : neg);\n\t\t}\n\t }\n\t\n\t return R;\n\t}", "title": "" }, { "docid": "f843f152bbe76d0ec35af264b68513f9", "score": "0.4979972", "text": "static uPP(P1,P2) {\n let x = P2.x-P1.x;\n let y = P2.y-P1.y;\n let mod = Physics.vMod(x,y);\n return [x/mod,y/mod];\n }", "title": "" }, { "docid": "59d6b40df39d33a1316b2d9cf9e316be", "score": "0.49795002", "text": "function inverse(p) {\n var con, phi;\n var lat, lon;\n var x = (p.x - this.x0) * (1 / this.a);\n var y = (p.y - this.y0) * (1 / this.a);\n\n if (!this.es) {\n var f = Math.exp(x / this.k0);\n var g = 0.5 * (f - 1 / f);\n var temp = this.lat0 + y / this.k0;\n var h = Math.cos(temp);\n con = Math.sqrt((1 - Math.pow(h, 2)) / (1 + Math.pow(g, 2)));\n lat = Math.asin(con);\n\n if (y < 0) {\n lat = -lat;\n }\n\n if ((g === 0) && (h === 0)) {\n lon = 0;\n }\n else {\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Math.atan2(g, h) + this.long0);\n }\n }\n else { // ellipsoidal form\n con = this.ml0 + y / this.k0;\n phi = Object(_common_pj_inv_mlfn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(con, this.es, this.en);\n\n if (Math.abs(phi) < _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"HALF_PI\"]) {\n var sin_phi = Math.sin(phi);\n var cos_phi = Math.cos(phi);\n var tan_phi = Math.abs(cos_phi) > _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"EPSLN\"] ? Math.tan(phi) : 0;\n var c = this.ep2 * Math.pow(cos_phi, 2);\n var cs = Math.pow(c, 2);\n var t = Math.pow(tan_phi, 2);\n var ts = Math.pow(t, 2);\n con = 1 - this.es * Math.pow(sin_phi, 2);\n var d = x * Math.sqrt(con) / this.k0;\n var ds = Math.pow(d, 2);\n con = con * tan_phi;\n\n lat = phi - (con * ds / (1 - this.es)) * 0.5 * (1 -\n ds / 12 * (5 + 3 * t - 9 * c * t + c - 4 * cs -\n ds / 30 * (61 + 90 * t - 252 * c * t + 45 * ts + 46 * c -\n ds / 56 * (1385 + 3633 * t + 4095 * ts + 1574 * ts * t))));\n\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this.long0 + (d * (1 -\n ds / 6 * (1 + 2 * t + c -\n ds / 20 * (5 + 28 * t + 24 * ts + 8 * c * t + 6 * c -\n ds / 42 * (61 + 662 * t + 1320 * ts + 720 * ts * t)))) / cos_phi));\n }\n else {\n lat = _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"HALF_PI\"] * Object(_common_sign__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(y);\n lon = 0;\n }\n }\n\n p.x = lon;\n p.y = lat;\n\n return p;\n}", "title": "" }, { "docid": "59d6b40df39d33a1316b2d9cf9e316be", "score": "0.49795002", "text": "function inverse(p) {\n var con, phi;\n var lat, lon;\n var x = (p.x - this.x0) * (1 / this.a);\n var y = (p.y - this.y0) * (1 / this.a);\n\n if (!this.es) {\n var f = Math.exp(x / this.k0);\n var g = 0.5 * (f - 1 / f);\n var temp = this.lat0 + y / this.k0;\n var h = Math.cos(temp);\n con = Math.sqrt((1 - Math.pow(h, 2)) / (1 + Math.pow(g, 2)));\n lat = Math.asin(con);\n\n if (y < 0) {\n lat = -lat;\n }\n\n if ((g === 0) && (h === 0)) {\n lon = 0;\n }\n else {\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Math.atan2(g, h) + this.long0);\n }\n }\n else { // ellipsoidal form\n con = this.ml0 + y / this.k0;\n phi = Object(_common_pj_inv_mlfn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(con, this.es, this.en);\n\n if (Math.abs(phi) < _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"HALF_PI\"]) {\n var sin_phi = Math.sin(phi);\n var cos_phi = Math.cos(phi);\n var tan_phi = Math.abs(cos_phi) > _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"EPSLN\"] ? Math.tan(phi) : 0;\n var c = this.ep2 * Math.pow(cos_phi, 2);\n var cs = Math.pow(c, 2);\n var t = Math.pow(tan_phi, 2);\n var ts = Math.pow(t, 2);\n con = 1 - this.es * Math.pow(sin_phi, 2);\n var d = x * Math.sqrt(con) / this.k0;\n var ds = Math.pow(d, 2);\n con = con * tan_phi;\n\n lat = phi - (con * ds / (1 - this.es)) * 0.5 * (1 -\n ds / 12 * (5 + 3 * t - 9 * c * t + c - 4 * cs -\n ds / 30 * (61 + 90 * t - 252 * c * t + 45 * ts + 46 * c -\n ds / 56 * (1385 + 3633 * t + 4095 * ts + 1574 * ts * t))));\n\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this.long0 + (d * (1 -\n ds / 6 * (1 + 2 * t + c -\n ds / 20 * (5 + 28 * t + 24 * ts + 8 * c * t + 6 * c -\n ds / 42 * (61 + 662 * t + 1320 * ts + 720 * ts * t)))) / cos_phi));\n }\n else {\n lat = _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"HALF_PI\"] * Object(_common_sign__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(y);\n lon = 0;\n }\n }\n\n p.x = lon;\n p.y = lat;\n\n return p;\n}", "title": "" }, { "docid": "59d6b40df39d33a1316b2d9cf9e316be", "score": "0.49795002", "text": "function inverse(p) {\n var con, phi;\n var lat, lon;\n var x = (p.x - this.x0) * (1 / this.a);\n var y = (p.y - this.y0) * (1 / this.a);\n\n if (!this.es) {\n var f = Math.exp(x / this.k0);\n var g = 0.5 * (f - 1 / f);\n var temp = this.lat0 + y / this.k0;\n var h = Math.cos(temp);\n con = Math.sqrt((1 - Math.pow(h, 2)) / (1 + Math.pow(g, 2)));\n lat = Math.asin(con);\n\n if (y < 0) {\n lat = -lat;\n }\n\n if ((g === 0) && (h === 0)) {\n lon = 0;\n }\n else {\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(Math.atan2(g, h) + this.long0);\n }\n }\n else { // ellipsoidal form\n con = this.ml0 + y / this.k0;\n phi = Object(_common_pj_inv_mlfn__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(con, this.es, this.en);\n\n if (Math.abs(phi) < _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"HALF_PI\"]) {\n var sin_phi = Math.sin(phi);\n var cos_phi = Math.cos(phi);\n var tan_phi = Math.abs(cos_phi) > _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"EPSLN\"] ? Math.tan(phi) : 0;\n var c = this.ep2 * Math.pow(cos_phi, 2);\n var cs = Math.pow(c, 2);\n var t = Math.pow(tan_phi, 2);\n var ts = Math.pow(t, 2);\n con = 1 - this.es * Math.pow(sin_phi, 2);\n var d = x * Math.sqrt(con) / this.k0;\n var ds = Math.pow(d, 2);\n con = con * tan_phi;\n\n lat = phi - (con * ds / (1 - this.es)) * 0.5 * (1 -\n ds / 12 * (5 + 3 * t - 9 * c * t + c - 4 * cs -\n ds / 30 * (61 + 90 * t - 252 * c * t + 45 * ts + 46 * c -\n ds / 56 * (1385 + 3633 * t + 4095 * ts + 1574 * ts * t))));\n\n lon = Object(_common_adjust_lon__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this.long0 + (d * (1 -\n ds / 6 * (1 + 2 * t + c -\n ds / 20 * (5 + 28 * t + 24 * ts + 8 * c * t + 6 * c -\n ds / 42 * (61 + 662 * t + 1320 * ts + 720 * ts * t)))) / cos_phi));\n }\n else {\n lat = _constants_values__WEBPACK_IMPORTED_MODULE_4__[\"HALF_PI\"] * Object(_common_sign__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(y);\n lon = 0;\n }\n }\n\n p.x = lon;\n p.y = lat;\n\n return p;\n}", "title": "" } ]
9c53f046f5b7eaa9e350d17c423c025b
low (inclusive) and high (inclusive) ([low, high])
[ { "docid": "8ef15c32e8c6168967ae0427ce25e061", "score": "0.0", "text": "function randomInteger (low, high) {\n return Math.floor(Math.random() * (high - low + 1) + low);\n}", "title": "" } ]
[ { "docid": "a86fabc8f79dd7aeb518c23aab6bd73d", "score": "0.7497791", "text": "function bounds(low, val, high) {\n\t\tif (val === Infinity) return high;\n\t\telse if (val === -Infinity) return low;\n\t\telse return Math.max(low, Math.min(val, high));\n\t}", "title": "" }, { "docid": "6fbb253a01ede2ad11205678fffc9129", "score": "0.7367553", "text": "function _range(low, high){\n const range = [], isReversed = low > high;\n\n if(isReversed) [low, high] = [high, low];\n\n while(low <= high) range.push(low++);\n\n return isReversed ? range.reverse() : range;\n}", "title": "" }, { "docid": "ca9c8e485946fd1735009bdc41893336", "score": "0.7288547", "text": "function LowToHigh(a, b){return a - b;}", "title": "" }, { "docid": "80b97e558180576034322767f01254fc", "score": "0.7176786", "text": "between(a, b) {\n var min = a - 1,\n max = a + 1;\n\n return b > min && b < max;\n }", "title": "" }, { "docid": "743664fe4bf26150ea822ddfc7b6aee4", "score": "0.7106486", "text": "function between (data, x, y) {\n if (x < y) {\n return greater(data, x) && less(data, y);\n }\n\n return less(data, x) && greater(data, y);\n }", "title": "" }, { "docid": "bcb31ff8ec18f3e5e0e1f02c252e976d", "score": "0.709953", "text": "function between(x, min, max) {\r\n return x >= min && x <= max;\r\n}", "title": "" }, { "docid": "bcb31ff8ec18f3e5e0e1f02c252e976d", "score": "0.709953", "text": "function between(x, min, max) {\r\n return x >= min && x <= max;\r\n}", "title": "" }, { "docid": "8b0a111a8f47d104762a9fdc10ba7db9", "score": "0.70957583", "text": "function limitRange(X, lowend, highend) {\r\n\tif(lowend > highend) { return X; }\r\n\telse if(X < lowend) { return lowend; }\r\n\telse if(X > highend) { return highend; }\r\n\telse { return X; }\r\n}", "title": "" }, { "docid": "02a54225b4b61d6e2a617475885d9691", "score": "0.7084367", "text": "function between(x, min, max) {\r\n return x >= min && x <= max;\r\n}", "title": "" }, { "docid": "5e7e51e1b33076d952c7e0c33fb6705c", "score": "0.70791125", "text": "function between(min,max) {\n return function(){\n return min<list && list<max;\n } \n}", "title": "" }, { "docid": "c835e4d1072d84e99a27c41613006602", "score": "0.7077242", "text": "function map_range(value, low1, high1, low2, high2) {\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\n}", "title": "" }, { "docid": "c835e4d1072d84e99a27c41613006602", "score": "0.7077242", "text": "function map_range(value, low1, high1, low2, high2) {\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\n}", "title": "" }, { "docid": "52fb18305861ad04a684b3cc6f1ea062", "score": "0.705494", "text": "function map_range(value, low1, high1, low2, high2) {\n return low2 + ((high2 - low2) * (value - low1)) / (high1 - low1);\n}", "title": "" }, { "docid": "52fb18305861ad04a684b3cc6f1ea062", "score": "0.705494", "text": "function map_range(value, low1, high1, low2, high2) {\n return low2 + ((high2 - low2) * (value - low1)) / (high1 - low1);\n}", "title": "" }, { "docid": "617f7847da840b3e1ea0f37958e81d62", "score": "0.70004135", "text": "function between(data, x, y) {\n if (x < y) {\n return greater(data, x) && data < y;\n }\n\n return less(data, x) && data > y;\n }", "title": "" }, { "docid": "24b55972c36d7cc9014cff3ab5511366", "score": "0.69910806", "text": "function between(x, min, max) {\n return x >= min && x <= max;\n}", "title": "" }, { "docid": "6dd26a99652695ea883da779ed065839", "score": "0.6986004", "text": "function inRange (data, x, y) {\n if (x < y) {\n return greaterOrEqual(data, x) && lessOrEqual(data, y);\n }\n\n return lessOrEqual(data, x) && greaterOrEqual(data, y);\n }", "title": "" }, { "docid": "21459d1144ba8612366ddfc84b2424fd", "score": "0.6968497", "text": "function isBetween(low, x, high) { // True iff low <= x <= high.\n\treturn (low <= x) && (x <= high);\n}", "title": "" }, { "docid": "01307b69288748ddb8556ae15462670d", "score": "0.6955142", "text": "function getRangeBetween(x, y) {}", "title": "" }, { "docid": "585e7fa76b45f5bc7a222b66319869d1", "score": "0.6921859", "text": "function getRangeBetween(x, y) {\n \n }", "title": "" }, { "docid": "654dbd856c42cba4f672ce3566755c23", "score": "0.6909936", "text": "function mapRange(value, low1, high1, low2, high2) {\n return low2 + (high2 - low2) * (value - low1) / (high1 - low1);\n}", "title": "" }, { "docid": "f939bd82836be8442e82658e771dabf9", "score": "0.68640554", "text": "function between(x, min, max) {\n\t\treturn x >= min && x <= max;\n\t}", "title": "" }, { "docid": "8db668487430ed38941cb691b9b57b9c", "score": "0.6851465", "text": "function range(v, a, b) {\n\tif (v < a)\n\t\treturn a\n\tif (v > b)\n\t\treturn b\n\treturn v\n}", "title": "" }, { "docid": "ea141066fd211d6447095fe72098278c", "score": "0.6800948", "text": "function p2(){\n var arr = [-1, 2, -3, 4, -5, 6, -7, 8]\n var low = arr[1]\n var high = arr[1]\n for(var i = 0; i < arr.length; i++){\n if(arr[i] < low){\n low = arr[i]\n }\n if(arr[i] > high){\n high = arr[i]\n }\n }\n console.log(low)\n return(high)\n}", "title": "" }, { "docid": "53c9aaaf4cdcf6819c1ed5b7bb59b622", "score": "0.6799657", "text": "function mapValueInRange(value, fromLow, fromHigh, toLow, toHigh) {\n var fromRangeSize = fromHigh - fromLow;\n var toRangeSize = toHigh - toLow;\n var valueScale = (value - fromLow) / fromRangeSize;\n return toLow + valueScale * toRangeSize;\n }", "title": "" }, { "docid": "1c5fa7fc397aeac9ceb43e422730d419", "score": "0.67968327", "text": "function inRange(data, x, y) {\n if (x < y) {\n return greaterOrEqual(data, x) && data <= y;\n }\n\n return lessOrEqual(data, x) && data >= y;\n }", "title": "" }, { "docid": "35b419a56b50d3ebe7ec73519b1379f2", "score": "0.67580235", "text": "function checkRange(low, high, list) {\n list.forEach((v) => {\n if (v < low || v > high) {\n throw new Error(`Value should be in range ${low} to ${high}`)\n }\n })\n}", "title": "" }, { "docid": "f25a022ffa5e33cba26f326b3396ac3d", "score": "0.6740584", "text": "function between (val, min, max) {\n val = Math.min(val, max);\n val = Math.max(val, min);\n return val;\n }", "title": "" }, { "docid": "c4f116b2a0b78c6e90e88a2db2c3f4cb", "score": "0.6736083", "text": "function range(start, end){\n return\n}", "title": "" }, { "docid": "688d25c1d6b36fbe835b225c8cf5152b", "score": "0.6735032", "text": "function inRange(value, range) {\n let [min, max] = range; max < min ? [min, max] = [max, min] : [min, max]\n return value >= min && value <= max\n}", "title": "" }, { "docid": "0d7260ffe12b5f29b8e3611217eabd27", "score": "0.67076486", "text": "function between(val, min, max) {\n\treturn Math.min(Math.max(min, val), max);\n}", "title": "" }, { "docid": "5f0e938b7978f23bc38fabe3a4d0beb1", "score": "0.6692895", "text": "function isInRange(lower=0, upper=0, number=0) {\n if ((lower<number) && (number<upper))\n return true;\n else\n return false;\n \n // Your code\n}", "title": "" }, { "docid": "fb8626547a58086ef9cc8284a7ff2ce6", "score": "0.6675222", "text": "function between( low, high ) {\n\t\treturn Math.round( low + Math.random( ) * (high-low) );\n\t}", "title": "" }, { "docid": "1953462a664f0b0f788978ff40bebaaf", "score": "0.66727215", "text": "function rangeBetween(base,top)\n{\n var result = []\n for(let i = base; i<=top; i++)\n {\n result.push(i)\n }\n return result\n}", "title": "" }, { "docid": "81d3aa7d89128c680f877727d8d212d5", "score": "0.6610569", "text": "function overlap(a, b) {\n return a.lower < b.upper && a.upper > b.lower;\n}", "title": "" }, { "docid": "7d14c4f176ba703aca9beab3a472bab8", "score": "0.66074234", "text": "includeRange(range) {\n return this.setMinMax(Math.min(this.min, range.min), Math.max(this.max, range.max));\n }", "title": "" }, { "docid": "b42c09638d7f7c1ed00dcf1e4e0cca8e", "score": "0.6598555", "text": "function range(start, end){\n // your code here...\n}", "title": "" }, { "docid": "9b2295191ab90034edbfe73f197d78e8", "score": "0.6590451", "text": "function arrayLowToHigh(low, high) {\n const array = [];\n for (let i = low; i <= high; i++) {\n array.push(i);\n }\n return array;\n}", "title": "" }, { "docid": "31211d1472f74655a7c2fa676316f125", "score": "0.6570934", "text": "function myFunction(value, index, nums) {\n return (value >= start && value <=end);\n }", "title": "" }, { "docid": "cb8fd4c22f71f6f19cf29155a3e75774", "score": "0.6566944", "text": "function between (x, min, max) {\r\n if (x > min && x <max /*&& x.isInteger()*/)\r\n return true;\r\n else\r\n return false;\r\n\r\n}", "title": "" }, { "docid": "5f781fcc2f174e7dd200c09790536e7f", "score": "0.6559325", "text": "function arrayFromLowToHigh (low, high) {\n var array = []\n for (let i = low; i <= high; i++) {\n array.push(i)\n }\n return array\n}", "title": "" }, { "docid": "c007799d5ef3a850bd025e31e8ce07d8", "score": "0.6554565", "text": "function range(list){\n min=Math.min(list[0],list[1]);\n max=Math.max(list[0],list[1]);\n var r=[];\n for(i=min;i<=max;i++){\n r.push(i);\n }\nreturn r;\n}", "title": "" }, { "docid": "fbc10e09db8f6409c337433e84ac717d", "score": "0.65523833", "text": "function rangeBetween(x, y) \r\n {\r\n const sumNums = x + y;\r\n if (sumNums >= 50 && sumNums <= 80) {\r\n return 65;\r\n }\r\n return 80;\r\n}", "title": "" }, { "docid": "f61d9961bac48636e283e4acf3c2ea22", "score": "0.65385765", "text": "function randomBetween(low, high) {\r\n var range = high - low + 1;\r\n var value = Math.floor(Math.random() * range);\r\n return low + value;\r\n}", "title": "" }, { "docid": "9cc75b25a177363331c156b074dffeb2", "score": "0.6535357", "text": "function constrain(n, low, high) {\n var modulo = high - low;\n while (n < low) {\n n = n + modulo;\n }\n while (n > high) {\n n = n - modulo;\n }\n return n;\n}", "title": "" }, { "docid": "6da378a7cadd2afcab8acd137dd96363", "score": "0.6519905", "text": "function rangeIn(a,b) {\n let sum = a + b;\n if (sum >= 50 && sum <= 80){\n return 65\n } else {\n return 80\n }\n // sum >= 50 && sum <=80 ? 65 : 80;\n}", "title": "" }, { "docid": "5a6da8b2971b3cfd9904485177b700fa", "score": "0.6509931", "text": "function checkIfInRange(number, range1, range2) {\n var min = Math.min.apply(Math, [range1, range2]);\n var max = Math.max.apply(Math, [range1, range2]);\n console.log((number > min) && (number < max));\n return (number > min) && (number < max);\n }", "title": "" }, { "docid": "e84213fc0074d2a755bdbcda8b5da501", "score": "0.65043473", "text": "function arrayFromLowToHigh(low, high) {\n const array = []\n for (let i = low; i <= high; i++) {\n array.push(i)\n }\n return array\n}", "title": "" }, { "docid": "d36792e5a7068b0efb3d14508548fc90", "score": "0.6496424", "text": "function inRange (a, r1, r2) {\n return a >= r1 && a <= r2;\n }", "title": "" }, { "docid": "a97ad5c415f896df99f684ebc9f59698", "score": "0.64959866", "text": "binary_search(range) {\n var left = 0;\n var right = this.ranges.length - 1;\n var mid = Math.floor((left + right) / 2);\n while (right - left > 1) {\n mid = Math.floor((left + right) / 2);\n // console.log(left, right, mid)\n if (range[0] < this.ranges[mid][0]) {\n left = mid + 1;\n continue;\n }\n if (range[0] > this.ranges[mid][1]) {\n right = mid - 1;\n continue;\n }\n break;\n }\n return mid;\n }", "title": "" }, { "docid": "120b15b7d1a18a8247357fd852713404", "score": "0.64930606", "text": "function arrFromLowToHigh(low, high) {\n const arr = [];\n for(let i = low; i <= high; i++) {\n arr.push(i)\n }\n return arr\n}", "title": "" }, { "docid": "907844b056adc5f78fdd937d6f7e9602", "score": "0.64929193", "text": "function limit(n, low, high) {return Math.max(Math.min(n, high), low);}", "title": "" }, { "docid": "3856688cf2e6bbaa574a7e6c957375fd", "score": "0.64895284", "text": "function valInRange(val, min, max){\n\t\treturn (val >= min) && (val <= max);\n\t}", "title": "" }, { "docid": "2bbb680e55a5b1fb44b3c20afc4f45ec", "score": "0.64878345", "text": "function inInterval(lower, upper, num) {\n return ((num >= lower) && (num <= upper));\n}", "title": "" }, { "docid": "1e24853b5f1ca26f4e66d627496ae7e7", "score": "0.6485316", "text": "function numbers_ranges(x, y){\r\n if(( x >= 40 && x <= 60 && y >= 40 && y <= 60 ) \r\n || \r\n (x >= 70 && x <= 100 && y >= 70 && y <= 100))\r\n{\r\n return true;\r\n}else{\r\n return false;\r\n}\r\n}", "title": "" }, { "docid": "1147bd39b8cd4cf2e9cb4fbc03b7856d", "score": "0.6466008", "text": "function randRange(low, high) {\n return Math.floor(low + Math.random()*(high-low+1));\n }", "title": "" }, { "docid": "1e07fd314f28ed3bae663393a4bfd4ba", "score": "0.64564633", "text": "inRange(number, start, end) {\n //if end is undefined it's set to start and start\n //is set to be 0\n if (end === undefined) {\n end = start\n start = 0\n }\n //if start is greater than end, these values swap\n if (start > end) {\n let tempEnd = end\n end = start\n start = tempEnd\n }\n //check if the number fits in the range\n let isInRange = start <= number && number < end\n return isInRange \n }", "title": "" }, { "docid": "5b7647d26e3692af867ff290b5f8874f", "score": "0.6456254", "text": "function inRange(a, b) {\n if ((a >= 40 && a <= 60 || b >= 40 && b <= 60) && (a >= 70 && a <= 100 || b >= 70 && b <= 100)) {\n return true\n } else {\n return false\n }\n}", "title": "" }, { "docid": "53b0247945f1998e0d12829c95e9e452", "score": "0.6434318", "text": "function lowHigh(arr) {\r\n let low = arr[0];\r\n let high = arr[0];\r\n for (let mas = 1; mas < arr.length; mas++) {\r\n if (arr[mas] < low) {\r\n low = arr[mas];\r\n }\r\n else if (arr[mas] > high) {\r\n high = arr[mas];\r\n }\r\n }\r\n}", "title": "" }, { "docid": "bd8ce8b2f334e45b5d449ae58f675a92", "score": "0.6429601", "text": "function makeBetweenFunc(min, max) {\r\n return function(num) {\r\n return num >= min && num <= max;\r\n }\r\n}", "title": "" }, { "docid": "d1b3ef237ccf6dbd81b388ccd0aab0a2", "score": "0.64246446", "text": "function printlow_returnhigh(arr){\n var min = arr[0];\n var max = arr[0];\n \n for(var i = 1; i < arr.length; i++){\n if(arr[i] < min){\n min = arr[i];\n }\n if(arr[i] > max){\n max = arr[i];\n }\n }\n console.log(min);\n\nreturn max, min;\n}", "title": "" }, { "docid": "6c0b67cf8230940797803e578dc588c2", "score": "0.6420011", "text": "function highAndLow(numbers){\n numbers = numbers.split(' ');\n let high = Math.max(...numbers);\n let low = Math.min(...numbers);\n return `${high} ${low}`\n}", "title": "" }, { "docid": "6551e9120a22c098ebdff3c92cbc1d39", "score": "0.64167714", "text": "static isInRangeNumbers(argA, argB) { return argA.every(function (value) { return operate.isGreaterthanOrEqual(value, argB.min) && operate.isSmallerthanOrEqual(value, argB.max); }); }", "title": "" }, { "docid": "44c82cb0739f19859285cf9343af122a", "score": "0.6415022", "text": "function _Field_isRange(low, high){\n\tvar low = _param(arguments[0], 0, \"number\");\n\tvar high = _param(arguments[1], 9999999, \"number\");\n\tvar iValue = parseInt(this.value, 10);\n\tif( isNaN(iValue) ) iValue = 0;\n\n\t// check to make sure the number is within the valid range\n\tif( ( low > iValue ) || ( high < iValue ) ){\n\t\tthis.error = \"The \" + this.description + \" field does not contain a\\nvalue between \" + low + \" and \" + high + \".\";\n\t}\n}", "title": "" }, { "docid": "1cd248bd2e82b5286a05b98e939b3bba", "score": "0.64110607", "text": "function generate_list(low, high) {\n var list = [];\n while (low <= high) {\n list.push(low++);\n }\n return list;\n}", "title": "" }, { "docid": "d32e4414ddf0df38065b93d643878bb2", "score": "0.6405153", "text": "function lowHight(arr){\n var high = arr[0];\n var low = arr[0];\n for(var i = 1 ; i < arr.length ; i++){\n if(high < arr[i]){\n high = arr[i];\n }\n if(low > arr[i]){\n low = arr[i];\n }\n }\n console.log(\"Low value\\t\"+low);\n return high;\n}", "title": "" }, { "docid": "5bcd0156524dad6095e7936982eaa3fa", "score": "0.6397607", "text": "function isBetween(num, min, max) {\n return num >= min && (num <= max || max === 0)\n }", "title": "" }, { "docid": "4dc2e6256f30da781094aa1b94fdec01", "score": "0.63879836", "text": "function makeBetweenFunc(min, max) {\n return function (num) {\n return num >= min && num <= max;\n }\n}", "title": "" }, { "docid": "fd8a7e5f2f699aa5d786da8cc16f860b", "score": "0.6383603", "text": "function lowhigh(arr){\n\tvar low = arr[0];\n\tvar high = arr[0];\n\tfor(var i = 0; i<arr.length; i++){\n\t\tif(arr[i] >= high){\n\t\t\thigh = arr[i]\n\t\t}\n\t\tif(arr[i] <= low){\n\t\t\tlow = arr[i]\n\t\t}\n\t}\n\tconsole.log(low);\n\treturn high;\n}", "title": "" }, { "docid": "f3175756437d5b7a7b1dc0b8ca79ba31", "score": "0.63825387", "text": "function restrictToRange(val,min,max) {\n if (val < min) return min;\n if (val > max) return max;\n return val;\n }", "title": "" }, { "docid": "e990b1eafb8a760a32d12a555ac0ceb0", "score": "0.6372047", "text": "function assertWithinRange(low, high, actual, testName) {\n var inRange = low <= actual && actual <= high;\n if (inRange) {\n console.log('passed [' + testName + ']');\n } else {\n console.log('FAILED [' + testName + '] \"' + actual + '\" not within range ' + low + ' to ' + high);\n }\n}", "title": "" }, { "docid": "fd440d3dbba607656dba8077359114dd", "score": "0.63718915", "text": "function range(a, b) {\n return a === null || b === null\n ? []\n : a < b ? ascR(a, b - a + 1) : descR(a, a - b + 1);\n}", "title": "" }, { "docid": "53622b5452ec736e0629e4a60bc59385", "score": "0.63682246", "text": "inRange(number,start,end) {\n if (!end) {\n end = start;\n start = 0;\n };\n \tif (start > end) {\n let temp = end;\n end = start;\n start = temp;\n };\n let isInRange = false;\n if (number >= start && number < end) {\n return isInRange = true;\n }\n else {isInRange = false}\n return isInRange; \n }", "title": "" }, { "docid": "afe7792534790599a5680c113752200d", "score": "0.6366528", "text": "function isBetween(lower, middle, higher){\n if(middle < lower){\n return false;\n }\n if(middle > higher){\n return false;\n }\n if(middle === higher){\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "48a4cbe1412d09249dd06e4a99036f10", "score": "0.6360802", "text": "constructor(values, closedLower, closedUpper) {\n var min = values[0] instanceof Array ? values[0][0] : values[0];\n var max = min;\n super();\n this.closedLower = closedLower;\n this.closedUpper = closedUpper;\n for (var i = 1; i < values.length; i++) {\n if (values[i] instanceof Array) {\n var vi = values[i];\n for (var j = 0; j < vi.length; j++) {\n if (min > vi[j]) {\n min = vi[j];\n }\n if (max < vi[j]) {\n max = vi[j];\n }\n }\n }\n else {\n if (min > values[i]) {\n min = values[i];\n }\n if (max < values[i]) {\n max = values[i];\n }\n }\n }\n this.min = min;\n this.max = max;\n }", "title": "" }, { "docid": "4fa0cb2ec620db80c1776d6626c5f3af", "score": "0.6360719", "text": "function range(a, b){\n\tvar arr = [];\n\tfor(i = a; i <= b; i++)\n\t\tarr.push(i);\n\treturn arr;\n}", "title": "" }, { "docid": "45eca99612a68c5aee1f148760decd43", "score": "0.6345399", "text": "function range(x1,x2) {\t\n\tif (x1>x2) {\n\t\treturn -1;\n\t} else {\n\t\tfor (i=x1 + 1; i<x2; i++){\n\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "ee669a917fffac04764210c3131a217e", "score": "0.6343753", "text": "isInRange(min, max, value){\n return min <= value && value < max;\n }", "title": "" }, { "docid": "e9449107167d85daa40cd9bc01c250d4", "score": "0.6340601", "text": "inRange(number, start, end) {\n if (end === undefined) {\n end = start;\n start = 0;\n };\n if (start > end) {\n const newEnd = start;\n start = end;\n end = newEnd;\n };\n if (start <= number && number < end) {\n return true;\n } else {\n return false;\n };\n\n }", "title": "" }, { "docid": "b86f38d484dd4436209214e4140fcb13", "score": "0.6340423", "text": "function makeBetweenFun(min, max) {\n return function (num) {\n return num >= min && num <= max\n }\n}", "title": "" }, { "docid": "cd69c356d4306b919e79ea34fdf71d36", "score": "0.6339112", "text": "function isBetween(x, min, max) {\n\treturn x >= min && x <= max;\n}", "title": "" }, { "docid": "5261bdd761b9bfeea5dc1127f218a6bf", "score": "0.6330964", "text": "overlapsSingleLong(target, start, end) {\n let min ,max;\n if(start < end){\n min = start;\n max = end;\n }else {\n min = end;\n max = start;\n }\n return min <= target && target <= max;\n }", "title": "" }, { "docid": "56707e11db132032fc334fa52ad16ab6", "score": "0.6327702", "text": "function test8() {\n console.log(Math.min(0, 150, 30, 20, -8, -200));\n console.log(Math.max(0, 150, 30, 20, -8, -200));\n}", "title": "" }, { "docid": "b2ad23d4375e615d291bb570a8e4f07f", "score": "0.63243395", "text": "inRange(values) {\r\n if (values[0] == values[1]) {\r\n return true; \r\n }\r\n if (Math.max(...values) >= 10 && (values[0] + values[1] >= 20)) {\r\n return true; \r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "b7600fd357b42d87d0db63944938c9bc", "score": "0.6319382", "text": "function makeBetweenFunc(min, max) {\n return function(num) {\n return (num >= min && num <= max)\n }\n}", "title": "" }, { "docid": "7ed47e0432871e90d73c82e190af18bc", "score": "0.63142157", "text": "function isBetween(num, bound1, bound2){\n if(num > bound1 && num > bound2){\n return false\n }\n else if(num < bound1 && num < bound2){\n return false\n }\n else{\n return true\n }\n}", "title": "" }, { "docid": "3002dc08b8687574fe3f7521fc826a74", "score": "0.63118756", "text": "containsRange(range) {\n return this._min <= range.min && this._max >= range.max;\n }", "title": "" }, { "docid": "40d45d2863d82669d519753a6d13a37b", "score": "0.6301982", "text": "function compareStartEnd(min0, max0, min1, max1) {\n return max0 > min1 && min0 < max1;\n}", "title": "" }, { "docid": "b0a86231217c41c5112dc493f87af6b9", "score": "0.63017976", "text": "function range(a, b) {\r\n var r = [];\r\n for (var i = a; i < b; i++) {\r\n r.push(i);\r\n }\r\n return r;\r\n}", "title": "" }, { "docid": "c8376a7afb5062c7a061a0ee9d7c2381", "score": "0.62894964", "text": "function logBetween(lowNum, highNum) {\n for ( var i = lowNum; i <= highNum; i++) {\n console.log(i);\n }\n}", "title": "" }, { "docid": "2bb651686bd490d2e1129fe4f7804c5d", "score": "0.6288749", "text": "function range(a, b){\n\n\tif (a >= b) { throw \"Fuck\"; }\n\n\tvar ar = [];\n\n\tfor (var i = a; i <= b; i++){ ar.push(i); }\n\n\treturn ar;\n}", "title": "" }, { "docid": "bb48308c7a15ce2527dd42c9d4ec1c69", "score": "0.6288508", "text": "function between(a, b) {\n const firstInt = a\n const secondInt = b\n const thisArray = []\n if (a < b) {\n for (let i = firstInt; i <= secondInt; i++) {\n thisArray.push(a)\n a++\n }\n }\n return thisArray\n}", "title": "" }, { "docid": "f24f76d043101aa7f59ad274fefbf930", "score": "0.6287203", "text": "function range(a, b) {\n\tlet r = [];\n\tfor (let i = a; i <= b; i++) {\n\t\tr.push(i);\n\t}\n\treturn r;\n}", "title": "" }, { "docid": "5c6f2fddfb5f82c0a5519ee2dac89302", "score": "0.6284533", "text": "function range(lo, hi) {\n return new Array(hi - lo + 1).fill(null).map((_, i) => lo + i);\n}", "title": "" }, { "docid": "8a6b9341b68b70a4a7f797a4c85e0edf", "score": "0.62830657", "text": "add(range) {\n return new SubRange(\n Math.min(this.low, range.low),\n Math.max(this.high, range.high)\n );\n }", "title": "" }, { "docid": "e446408857153184c92f9625d10f984a", "score": "0.6279491", "text": "function isBetween(number, range1, range2){\r\n if(number >= range1 && number <= range2)\r\n return true;\r\n return false;\r\n}", "title": "" }, { "docid": "c2692badd9649dbbb75cd0fcfb845c58", "score": "0.6272433", "text": "function lowHigh(arr){\r\n var min=arr[0];\r\n var max=arr[0];\r\n for(var i=1; i<arr.length; i++){\r\n if(arr[i]<min){\r\n min=arr[i];\r\n }\r\n if(arr[i]>max){\r\n max=arr[i];\r\n }\r\n }\r\n console.log(min);\r\n return max;\r\n}", "title": "" }, { "docid": "3fe7b7197a930f615a825819b61c8651", "score": "0.6268744", "text": "function filterRange(arr, a, b){\n\treturn arr.filter(item => (item >= a && item <= b));\n}", "title": "" }, { "docid": "a256540fd5c3a55807879d52f6041e19", "score": "0.62606865", "text": "function range(start, end, step=1) {\n step=step||1;\n var a=[];\n \n if(start<end&&step>0){\n for(var i=start; i<=end;i=i+step)\n {a.push(i);\n }\n }\n \n else if(end<start&&step<0){\n for(var i=start; i>=end;i=i+step)\n {a.push(i);\n }}\n \n return a; // Your code here\n}", "title": "" }, { "docid": "87066cf9c11a985c4ebda748ab22f410", "score": "0.6248421", "text": "function between(a, b) {\n const arr = []\n for(let i = a; i <= b; i++) {\n arr.push(i)\n }\n return arr\n}", "title": "" }, { "docid": "ba18e73edfb8e5ac8ca5db0beda7afaa", "score": "0.6242703", "text": "function range(arr){\nlet finalerange= Math.max(...arr)-Math.min(...arr)\n return finalerange\n}", "title": "" } ]
c1e51dda119bbdafe5b7260b6e8253fd
Window Char, display character image and current stats
[ { "docid": "35ed688abeec440adc761c38624dbce5", "score": "0.6679483", "text": "function Window_Char() {\n this.initialize.apply(this, arguments);\n}", "title": "" } ]
[ { "docid": "c10d811032fdb7334a822e3a19238dc1", "score": "0.6827147", "text": "function displayMyChar () { \n $(\"#myCharImage\").html(`\n <img src=\"${characters[myCharName].source}\" class=\"img-responsive\" id=\"myChar\">\n `)\n}", "title": "" }, { "docid": "b3285af220bc3a6b3e3ce7773950b2b0", "score": "0.6590326", "text": "function DisplayCharacterStatus() {\r\n try {\r\n ClearWindow(_characterStatusOutputWindow);\r\n if (_currentPlayer === null) {\r\n WriteToWindow(_characterStatusOutputWindow, \"No character has been registered.\", \"red\", true, false);\r\n return;\r\n }\r\n\r\n var characterLine = AnsiColors.ForegroundBrightBlue + _currentPlayer.Name + AnsiColors.Default + \" the level \" + AnsiColors.ForegroundBrightBlue + _currentPlayer.Level + AnsiColors.Default + \" \" + _currentPlayer.Race + \".\";\r\n WriteToWindow(_characterStatusOutputWindow, characterLine, \"normal\", false, false);\r\n\r\n characterLine = \"Logon Time: \" + _currentPlayer.LogonTime.toTimeString().substring(0, 8);\r\n WriteToWindow(_characterStatusOutputWindow, characterLine, \"normal\", true, false);\r\n\r\n var totalPreparations = _currentPlayer.SuccessfulPreparations + _currentPlayer.FailedPreparations;\r\n var successfulColor = CalculateColor(_currentPlayer.SuccessfulPreparations, totalPreparations);\r\n\r\n // characterLine = \"Preparations: \" + totalPreparations;\r\n // characterLine = characterLine + \", Successful: \" + _currentPlayer.SuccessfulPreparations;\r\n // characterLine = characterLine + \", Failed: \" + _currentPlayer.FailedPreparations;\r\n // characterLine = characterLine + \", Ratio: \" + successfulColor + _currentPlayer.SuccessfulPreparationRatio() + AnsiColors.Default + \".\";\r\n // WriteToWindow(_characterStatusOutputWindow, characterLine, \"normal\", true, false);\r\n\r\n characterLine = \"Warrior: \" + AnsiColors.ForegroundBrightBlue + _currentPlayer.WarriorLevel + AnsiColors.Default;\r\n characterLine = characterLine + \", Ranger: \" + AnsiColors.ForegroundBrightBlue + _currentPlayer.RangerLevel + AnsiColors.Default;\r\n characterLine = characterLine + \", Mystic: \" + AnsiColors.ForegroundBrightBlue + _currentPlayer.MysticLevel + AnsiColors.Default;\r\n characterLine = characterLine + \", Mage: \" + AnsiColors.ForegroundBrightBlue + _currentPlayer.MageLevel + AnsiColors.Default;\r\n WriteToWindow(_characterStatusOutputWindow, characterLine, \"normal\", false, false);\r\n\r\n var statColor = CalculateColor(_currentPlayer.CurrentStrength, _currentPlayer.MaxStrength);\r\n characterLine = \"Str: \" + statColor + _currentPlayer.CurrentStrength + \"/\" + _currentPlayer.MaxStrength + AnsiColors.Default;\r\n\r\n statColor = CalculateColor(_currentPlayer.CurrentIntelligence, _currentPlayer.MaxIntelligence);\r\n characterLine = characterLine + \", Int: \" + statColor + _currentPlayer.CurrentIntelligence + \"/\" + _currentPlayer.MaxIntelligence + AnsiColors.Default;\r\n\r\n statColor = CalculateColor(_currentPlayer.CurrentWill, _currentPlayer.MaxWill);\r\n characterLine = characterLine + \", Wil: \" + statColor + _currentPlayer.CurrentWill + \"/\" + _currentPlayer.MaxWill + AnsiColors.Default;\r\n\r\n statColor = CalculateColor(_currentPlayer.CurrentDexterity, _currentPlayer.MaxDexterity);\r\n characterLine = characterLine + \", Dex: \" + statColor + _currentPlayer.CurrentDexterity + \"/\" + _currentPlayer.MaxDexterity + AnsiColors.Default;\r\n\r\n statColor = CalculateColor(_currentPlayer.CurrentConstitution, _currentPlayer.MaxConstitution);\r\n characterLine = characterLine + \", Con: \" + statColor + _currentPlayer.CurrentConstitution + \"/\" + _currentPlayer.MaxConstitution + AnsiColors.Default;\r\n\r\n statColor = CalculateColor(_currentPlayer.CurrentLearningAbility, _currentPlayer.MaxLearningAbility);\r\n characterLine = characterLine + \", Lea: \" + statColor + _currentPlayer.CurrentLearningAbility + \"/\" + _currentPlayer.MaxLearningAbility + AnsiColors.Default + \".\";\r\n\r\n WriteToWindow(_characterStatusOutputWindow, characterLine, \"normal\", false, false);\r\n\r\n characterLine = \"Stat Sum: \" + AnsiColors.ForegroundBrightBlue + _currentPlayer.StatSum() + \".\";\r\n WriteToWindow(_characterStatusOutputWindow, characterLine, \"normal\", true, false);\r\n\r\n var ansiColor = CalculateColor(_currentPlayer.CurrentHitPoints, _currentPlayer.MaxHitPoints);\r\n characterLine = \"Hit Points: \" + ansiColor + _currentPlayer.CurrentHitPoints + \"/\" + _currentPlayer.MaxHitPoints;\r\n WriteToWindow(_characterStatusOutputWindow, characterLine, \"normal\", false, false);\r\n\r\n ansiColor = CalculateColor(_currentPlayer.CurrentStamina, _currentPlayer.MaxStamina);\r\n characterLine = \"Magic Points: \" + ansiColor + _currentPlayer.CurrentStamina + \"/\" + _currentPlayer.MaxStamina;\r\n WriteToWindow(_characterStatusOutputWindow, characterLine, \"normal\", false, false);\r\n\r\n ansiColor = CalculateColor(_currentPlayer.CurrentMoves, _currentPlayer.MaxMoves);\r\n characterLine = \"Move Points: \" + ansiColor + _currentPlayer.CurrentMoves + \"/\" + _currentPlayer.MaxMoves;\r\n WriteToWindow(_characterStatusOutputWindow, characterLine, \"normal\", false, false);\r\n\r\n ansiColor = CalculateColor(_currentPlayer.Spirit, 5000); //It is assumed 5k is a nice round number for spirit.\r\n characterLine = \"Spirit: \" + ansiColor + _currentPlayer.Spirit;\r\n WriteToWindow(_characterStatusOutputWindow, characterLine, \"normal\", true, false);\r\n\r\n characterLine = \"OB: \" + AnsiColors.ForegroundBrightBlue + _currentPlayer.OffensiveBonus + AnsiColors.Default;\r\n characterLine = characterLine + \", DB: \" + AnsiColors.ForegroundBrightBlue + _currentPlayer.DodgeBonus + AnsiColors.Default;\r\n characterLine = characterLine + \", PB: \" + AnsiColors.ForegroundBrightBlue + _currentPlayer.ParryBonus + AnsiColors.Default;\r\n characterLine = characterLine + \", Speed: \" + AnsiColors.ForegroundBrightBlue + _currentPlayer.AttackSpeed + AnsiColors.Default;\r\n characterLine = characterLine + \".\";\r\n WriteToWindow(_characterStatusOutputWindow, characterLine, \"normal\", false, false);\r\n\r\n characterLine = \"Defense Sum: \" + AnsiColors.ForegroundBrightBlue + _currentPlayer.DefenseSum() + \".\";\r\n WriteToWindow(_characterStatusOutputWindow, characterLine, \"normal\", true, false);\r\n\r\n characterLine = \"XP Gained: \" + AnsiColors.ForegroundBrightBlue + _currentPlayer.XPGained + AnsiColors.Default + \".\";\r\n WriteToWindow(_characterStatusOutputWindow, characterLine, \"normal\", false, false);\r\n\r\n var currentLevelPlusOne = parseInt(_currentPlayer.Level) + 1;\r\n var xpForLevel = (currentLevelPlusOne * currentLevelPlusOne * 1500) - (_currentPlayer.Level * _currentPlayer.Level * 1500)\r\n var xpColor = CalculateColor(xpForLevel - _currentPlayer.XPNeeded, xpForLevel);\r\n characterLine = \"XP Needed To Level: \" + xpColor + _currentPlayer.XPNeeded + AnsiColors.Default + \".\";\r\n WriteToWindow(_characterStatusOutputWindow, characterLine, \"normal\", true, false);\r\n\r\n\r\n } catch (caught) {\r\n var message = \"Failure Displaying Status: \" + caught.message;\r\n WriteExceptionToStream(message);\r\n WriteToWindow(_mapOutputWindow, message, \"red\", true, true);\r\n }\r\n}", "title": "" }, { "docid": "edbac50c8eaab150c79c7a8a58073ad9", "score": "0.65700465", "text": "function renderCharacterChooser() {\n render(); \n chooser.render();\n ctx.drawImage(Resources.get('../static/images/char-boy.png'), 300, 220);\n ctx.drawImage(Resources.get('../static/images/char-cat-girl.png'), 401, 220);\n ctx.drawImage(Resources.get('../static/images/char-horn-girl.png'), 502, 220);\n ctx.drawImage(Resources.get('../static/images/char-pink-girl.png'), 603, 220);\n ctx.drawImage(Resources.get('../static/images/char-princess-girl.png'), 704, 220);\n ctx.fillStyle = \"#000000\";\n ctx.font = \"30px Courier New\";\n var text = \"Choose a character with the arrow keys and press enter!\";\n ctx.fillText(text, 540, 250); \n }", "title": "" }, { "docid": "69c7ef0cb30a7aea162c21fd4fef6b24", "score": "0.6530182", "text": "function advancedCharacter() {\n header.innerHTML = \"Advanced Character Creation\";\n doc.innerHTML = statString();\n stats.style.visibility= \"visible\";\n}", "title": "" }, { "docid": "daae11d032891ce33bdb735db5c4932b", "score": "0.6432924", "text": "function drawCharacter() {\n\tlet xPosition = 32 * xLocation;\n\tlet yPosition = 32 * yLocation;\n\tgContext.drawImage(character, xPosition, yPosition);\n}", "title": "" }, { "docid": "8af2b716a1aec603ac277ace45d6d260", "score": "0.63900214", "text": "function charLoad() {\n\tdocument.getElementById(\"charInfo\").innerHTML = \"<p>Name: \" + window.charname + \"<br />\" + \"Weapon: \" + window.weapon + \"<br />\" + \"Hitpoints: \" + currentHP + \"/\" + HP + \"<br />\" + \"Level: \" + lvl + \"<br />\" + \"XP: \" + XP + \"<br />\" + \"Gold: \" + gold + \"</p>\";\n}", "title": "" }, { "docid": "3e44fa5cfd99bba2b2bf2649e1d2bdc3", "score": "0.6372835", "text": "function displayCharacterDescription(character){\n var picprompt = document.getElementById(\"objectPicture\");\n picprompt.innerHTML= \"\";\n var pic = 'assets/characters/'+character + '.png';\n var picElt = '<img src=\"' + pic + '\" style=\"width:60%;height:100%\">';\n picprompt.innerHTML=picElt;\n let textprompt = document.getElementById(\"objectInfo\");\n let text;\n switch (character) {\n case \"Ally\":\n text = \": Has a spoiled cat, Bambi, who ocassionally helps Ally if she's so inclined.\";\n break;\n case \"Erika\":\n text= \": The only girl on her wrestling team. Strong, but not the brightest.\";\n break;\n case \"Joan\":\n text =\": Very bright. Currently studying to be an engineer.\";\n break;\n case \"Krysta\":\n text= \": Great observational skills. Aspiring to be the next Sherlock Holmes.\";\n break;\n default:\n break;\n }\n console.log(text);\n textprompt.innerHTML = character+ text;\n\n \n}", "title": "" }, { "docid": "77f7761a4f5dd70747d747113ee8f3af", "score": "0.62426955", "text": "function charpic() {\n \n\n if (stats.lvl < 6) {\n image(player.avatar1, width * 0.27, height * 0.88, width * 0.065, height * 0.1);\n }\n else {\n image(player.avatar2, width * 0.27, height * 0.88, width * 0.065, height * 0.1);\n }\n\n}", "title": "" }, { "docid": "1450a0a8237a5a4f90fab989b14eaad7", "score": "0.622675", "text": "function drawCharacter(c,backlit=false){\n\tctx.font = size+\"px \" + game_font;\n\tctx.fillStyle = modeColors[c.mode];\n\tctx.textAlign = \"center\";\n\tif(!backlit)\n\t\tctx.fillText(c.char, c.x*size,c.y*size);\n\telse{\n\t\tctx.fillRect(c.x*size-size/2,c.y*size-size*(3.0/4.0),size,size);\n\t\tctx.fillStyle = \"#000\";\n\t\tctx.fillText(c.char, c.x*size,c.y*size);\n\t}\n}", "title": "" }, { "docid": "2f8bd398710e5361644063cb0f220a6e", "score": "0.61942756", "text": "function previewCharacter(characterName) {\n\t$(\"#character-portrait\").attr(\"src\", \"img/\" + characterName.replace(\" \", \"\") + \"/portrait.png\");\n\t$(\"#character-name\").text(characterName);\n\tif(characterName == \"Yamon\"){\n\t\t$(\"#character-bios\").text(biosYamon);\n\t}else if(characterName == \"Big Daddy\"){\n\t\t$(\"#character-bios\").text(biosDaddy);\n\t}\n}", "title": "" }, { "docid": "e44256885482880a6bebbaef52074589", "score": "0.6139184", "text": "function drawCharacter() {\n let img;\n img = checkForStanding(img);\n img = checkForMoving(img);\n img = checkForJump(img);\n img = checkForHurt(img);\n\n //When moving left, mirrors the images to the left side, and it's not the end screen\n //if(isMovingLeft || !lastMoveForward) {\n if ((isMovingLeft || !lastMoveForward) && !isMovingRight && !endScreenOn) {\n ctx.save();\n ctx.translate(img.width + 120, 0);\n ctx.scale(-1, 1);\n }\n ctx.drawImage(img, character_x, character_y, img.width * CHARACTER_SCALE, img.height * CHARACTER_SCALE);\n ctx.restore();\n}", "title": "" }, { "docid": "c96cd622f941a4f703fb74b153cd1a3d", "score": "0.61321837", "text": "function displayStats() {\n ctx.save();\n ctx.fillStyle = 'rgba(255, 255, 255, 0.5)';\n ctx.fillText(\"Life: \" + monster.life, 20, 415);\n ctx.restore();\n\n\t ctx.save();\n ctx.fillStyle = 'rgba(255, 255, 255, 0.5)';\n ctx.fillText(\"Health: \" + monster.health, 20, 440);\n ctx.restore();\n\n\t ctx.save();\n ctx.fillStyle = 'rgba(255, 255, 255, 0.5)';\n ctx.fillText(\"Level: \" + currentLevel, 220, 415);\n ctx.restore();\n\n\t ctx.save();\n ctx.fillStyle = 'rgba(255, 255, 255, 0.5)';\n ctx.fillText(\"Score: \" + currentScore, 220, 440);\n ctx.restore();\n }", "title": "" }, { "docid": "52d1ab9695285ca836b91b42050b8748", "score": "0.6128033", "text": "function at_charpane() {\r\n\t// var centerThing = document.getElementsByTagName('center');\r\n\tvar imgs = document.images;\r\n\tif (imgs.length == 0 || imgs == null) return;\r\n\tvar compactMode = imgs[0].getAttribute('height') < 60 || imgs[0].getAttribute('src').indexOf(\"clancy\") > -1;\r\n//if clancy is the first image, we're in compact mode, but he's 100 pixels tall, the little bastard.\r\n\tvar bText = document.getElementsByTagName('b');\r\n\tvar curHP, maxHP, curMP, maxMP, level, str, advcount, effLink;\r\n\tvar oldcount = integer(GetCharData('advcount'));\r\n\tvar effectsDB = {\r\n\t'd33505':3,\t\t// confused\r\n\t'cb5404':58,\t// teleportitis\r\n\t'454d46':139,\t// purple tongue\r\n\t'94e112':140,\t// green tongue\r\n\t'61c56f':141,\t// orange tongue\r\n\t'a4a570':142,\t// red tongue\r\n\t'ec5873':143,\t// blue tongue\r\n\t'cf4844':144,\t// black tongue\r\n\t'173a9c':165,\t// smooth\r\n\t'5e788a':166,\t// musk\r\n\t'087638':189,\t// hotform\r\n\t'a3c871':190,\t// coldform\r\n\t'9574fa':191,\t// spookyform\r\n\t'9a6852':192,\t// stenchform\r\n\t'801f28':193,\t// sleazeform\r\n\t'3e2eed':221,\t// chalky hand\r\n\t'ec7f2f':275,\t// ultrahydrated\r\n\t'79289e':292,\t// Tetanus\r\n\t'15f811':295,\t// socialismydia\r\n\t'c69907':297,\t// temporary amnesia\r\n\t'9a12b9':301,\t// Cunctatitis\r\n\t'ebaff6':357,\t// Absinthe-minded\r\n\t'91635b':331,\t// On The Trail\r\n\t'aa5dbf':510, // Shape Of...Mole!\r\n\t'8c2bea':846, // Transpondent\r\n\t'17c22c':549,\t// Fishy\r\n\t'907cb5':725\t// Down the Rabbithole\r\n\t};\r\n\r\n//\tSetData(\"charname\",bText[0].textContent);\r\n var compressfam = GetPref(\"compressfam\");\r\n if (compressfam > 0) {\r\n CompressThrallAndFamiliar(compressfam);\r\n }\r\n\r\n\t// Compact Mode\r\n\tif (compactMode) {\r\n\t\tvar mp=0;\r\n\t\tfor (var i=4, len=bText.length; i<len; i++) {\r\n\t\t\tstr = bText[i].textContent;\r\n\t\t\tvar spl = str.split('/');\r\n\t\t\tif (spl.length > 1) {\r\n\t\t\t\tif (mp == 0) {\r\n\t\t\t\t\tcurHP = integer(spl[0]);\r\n\t\t\t\t\tmaxHP = integer(spl[1]); mp++;\r\n\t\t\t\t\tbText[i].parentNode.previousSibling\r\n\t\t\t\t\t\t.addEventListener('contextmenu', RightClickHP,true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcurMP = integer(spl[0]);\r\n\t\t\t\t\tmaxMP = integer(spl[1]);\r\n\t\t\t\t\tbText[i].parentNode.previousSibling\r\n\t\t\t\t\t\t.addEventListener('contextmenu',RightClickMP,true);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tadvcount = integer($('a:contains(\"Adv\"):first').parent().next().text());\r\n\r\n\t\tvar lvlblock = $(\"center:contains('Lvl.'):first\").text();\t// this text is always present in compact mode\r\n\t\t//kolproxy fix: icon is suppressed. look for level the other way if needed.\r\n\t\tif (lvlblock === undefined) lvlblock = $('td:contains(\"Level\"):first').text();\r\n\t\tlevel = 13;\r\n\t\tif (lvlblock) level = lvlblock.match(/Lvl. (\\d+)/)[1];\r\n\t\tSetCharData(\"level\", level);\r\n\r\n\t\tSetCharData(\"currentHP\", curHP); SetCharData(\"maxHP\", maxHP);\r\n\t\tSetCharData(\"currentMP\", curMP); SetCharData(\"maxMP\", maxMP);\r\n\t} else { // Full Mode\r\n\t\tfunction parse_cur_and_max(names, data) {\r\n\t\t\tfor each (var name in names) {\r\n\t\t\t\tvar cur_max = data.shift().split('/').map(integer);\r\n \t\tSetCharData(\"current\"+ name, cur_max[0]);\r\n\t\t\t\tSetCharData(\"max\" + name, cur_max[1]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar lvlblock = $(\"td:contains('Level'):first\").text();\r\n\t\tif (lvlblock) {\r\n\t\t\tlevel = lvlblock.match(/Level (\\d+)/)[1];\r\n\t\t\tSetCharData(\"level\", level);\r\n\t\t} else {\r\n\t\t\tSetCharData(\"level\",13);\t\t// failsafe setting if we couldn't find the level block, generally due to a custom title.\r\n\t\t\tlevel = 13;\r\n\t\t}\r\n var $statusblock = $('img[alt*=\"Hit Points\"]').parent().parent().parent().parent();\r\n $statusblock.wrap('<div id=\"statusblock></div>');\r\n var $statusitems = $statusblock.find('span.black, span.red');\r\n\t\tvar data = $.makeArray($statusitems.slice(0, 4)).map(text);\r\n if (data.length == 2) { //I forget what this was guarding against already.\r\n data = $.makeArray($('td[valign=\"center\"]').slice(1, 5)).map(text);\r\n }\r\n // parse regular hp/mp display\r\n \t\tparse_cur_and_max([\"HP\", \"MP\"], data);\r\n\t //data.shift(); // meat, if MP are present\r\n \tadvcount = integer(data[1]); // data[1] will be adv if HP/MP are present\r\n if (isNaN(advcount)) advcount = integer(data[0]); // data[0] is adv if no MP is on display (e.g. ZombieMaster)\r\n\r\n\t\t// Change image link for costumes\r\n\t\tvar img = imgs[0];\r\n\t\tif (GetPref('backup')) {\r\n\t\t\timg.parentNode.parentNode.nextSibling\r\n\t\t\t\t.setAttribute('id','outfitbkup');\r\n\t\t\timg.addEventListener('contextmenu',function(event)\r\n\t\t\t{\tGM_get(server + 'inv_equip.php?action=customoutfit&which=2&outfitname=' +\r\n\t\t\t\tGetPref('backup'),function(response)\r\n\t\t\t\t{\tvar msg; if (response.indexOf(\"custom outfits\") == -1) msg = \"Outfit Backed Up\";\r\n\t\t\t\t\telse msg = \"Too Many Outfits\";\r\n\t\t\t\t\tdocument.getElementById('outfitbkup').innerHTML +=\r\n\t\t\t\t\t\"<span class='tiny'><center>\"+msg+\"</center></span>\";\r\n\t\t\t\t}); event.stopPropagation(); event.preventDefault();\r\n\t\t\t}, true);\r\n\t\t}\r\n\r\n\t\t// Add SGEEA to Effects right-click\r\n\t\tvar bEff = $('b:gt(4):contains(Effects)');\r\n\t\tif (bEff.length>0) bEff.get(0).setAttribute(\"oncontextmenu\",\r\n\t\t\t\"top.mainpane.location.href='http://\" + server +\r\n\t\t\t\"uneffect.php'; return false;\");\r\n\t}\t// end full mode processing\r\n\r\n\tif ($('#nudgeblock div:contains(\"a work in progress\")').length > 0) $('#nudgeblock').hide();\r\n if ($('#nudgeblock div:contains(\"none\")').length > 0) $('#nudgeblock').hide();\r\n //make this configurable:\r\n if (GetPref(\"questbottom\") == 1) {\r\n $('#nudgeblock').appendTo($('center:eq(1)'));\r\n }\r\n\r\n\t// Re-hydrate (0)\r\n\tvar temphydr = integer(GetCharData('hydrate'));\r\n\r\n\tif (temphydr) {\r\n\t\tif (advcount > oldcount) {\r\n\t\t\ttemphydr+=(advcount-oldcount);\r\n\t\t\tSetCharData('hydrate', temphydr);\r\n\t\t}\r\n\t\tif (advcount < temphydr) SetCharData('hydrate', false);\r\n\t\telse if (advcount == temphydr) {\r\n\t\t\tif (compactMode) $('a[href=\"adventure.php?snarfblat=364\"]')\r\n\t\t\t\t.after(':<br /><a href=\"adventure.php?snarfblat=122' +\r\n\t\t\t\t'\" style=\"color:red;\" target=\"mainpane\">Oasis</a>');\r\n\t\t\telse $('a[href=\"adventure.php?snarfblat=364\"]')\r\n\t\t\t\t.after('<br /><br /><a href=\"adventure.php?snarfblat=122\" '+\r\n\t\t\t'target=\"mainpane\" style=\"color:red;\">Re-Ultrahydrate</a><br />')\r\n\t\t\t\t.parent().parent().attr('align','center');\r\n\t\t}\r\n\t}\r\n\tSetCharData('advcount', advcount);\r\n\r\n\t// Poison and other un-effecty things\r\n\tSetCharData(\"phial\",0);\r\n\tfor (i=0,len=imgs.length; i<len; i++) {\r\n\t\tvar img = imgs[i], imgClick = img.getAttribute('onclick');\r\n\t\tvar imgSrc = img.src.substr(img.src.lastIndexOf('/')+1);\r\n\t\tif (imgSrc == 'mp.gif')\r\n\t\t\timg.addEventListener('contextmenu', RightClickMP, false);\r\n\t\telse if (imgSrc == 'hp.gif')\r\n\t\t\timg.addEventListener('contextmenu', RightClickHP, false);\r\n\t\tif (imgClick == null || imgClick.substr(0,4) != \"eff(\") continue;\r\n\t\tvar effName = (compactMode ? img.getAttribute('title') : img.parentNode.nextSibling.firstChild.innerHTML);\r\n\r\n\t\tif (imgSrc == 'poison.gif')\t{\r\n\t\t\timg.parentNode.parentNode.setAttribute('name','poison');\r\n\t\t\timg.addEventListener('contextmenu', function(event)\t{\r\n\t\t\t\tdocument.getElementsByName('poison')[0].childNodes[1].innerHTML = \"<i><span style='font-size:10px;'>Un-un-unpoisoning...</span></i>\";\r\n\t\t\t\tGM_get(server+'api.php?what=inventory&for=MrScript',function(response) {\t\t\t// see if we have some anti-anti-antidote onhand\r\n\t\t\t\t\tvar invcache = $.parseJSON(response);\r\n\t\t\t\t\tvar antianti = invcache[829];\r\n\t\t\t\t\tif (antianti === undefined) antianti = 0;\r\n\t\t\t\t\tif (antianti > 0) {\r\n\t\t\t\t\t\tGM_get(server + inv_use(829),function(event)\t// yes: use it.\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\ttop.frames[1].location.reload();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\telse {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// no: buy it\r\n\t\t\t\t\t\tGM_get(server+'galaktik.php?howmany=1&action=buyitem&whichitem=829&pwd='+pwd,\r\n\t\t\t\t\t\tfunction(result)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (result.indexOf('acquire') != -1)\t\t\t\t\t\t\t\t\t// buy success: use it.\r\n\t\t\t\t\t\t\t\tGM_get(server + inv_use(829),function(event)\r\n\t\t\t\t\t\t\t\t{\ttop.frames[1].location.reload(); });\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}); event.stopPropagation(); event.preventDefault();\r\n\t\t\t}, false);\r\n\t\t}\r\n\t\telse // if (img.getAttribute('oncontextmenu') == null)\r\n\t\t{\r\n\t\t\tvar hydr = false;\r\n\r\n\t\t\t// Effect descIDs are 32 characters?? Bah, I'm not using strings that long. Six characters will do.\r\n\t\t\tvar effNum = effectsDB[imgClick.substr(5,6)];\r\n\t\t\tif (effNum == undefined) continue;\r\n\t\t\tswitch (effNum) {\r\n\t\t\t\tcase 275: // hydrated\r\n\t\t\t\t\tvar hydtxt = img.parentNode.nextSibling.textContent;\r\n\t\t\t\t\tif (/\\(1\\)/.test(hydtxt)) {\t\t\t// 1 turn left? set marker to add rehydrate link next adventure.\r\n\t\t\t\t\t\tSetCharData('hydrate', advcount-1);\r\n }\r\n\t\t\t\t\telse if (/\\(5\\)/.test(hydtxt) || /\\(20\\)/.test(hydtxt))\t\t// got 5 turns (or 20 from clover) now? add Desert link.\r\n\t\t\t\t\t{\tif (compactMode) $('a[href=\"adventure.php?snarfblat=122\"]')\r\n\t\t\t\t\t\t.after(':<br /><a href=\"adventure.php?' +\r\n\t\t\t\t\t\t'snarfblat=364\" target=\"mainpane\">' +\r\n\t\t\t\t\t\t'Desert</a>');\r\n\t\t\t\t\t\telse $('a[href=\"adventure.php?snarfblat=122\"]')\r\n\t\t\t\t\t\t.after('<br /><br /><a href=\"adventure.php?' +\r\n\t\t\t\t\t\t'snarfblat=364\" target=\"mainpane\">' +\r\n\t\t\t\t\t\t'The Arid, Extra-Dry Desert</a><br />')\r\n\t\t\t\t\t\t.parent().parent().attr('align','center');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 221: // chalk: right-click to use more\r\n\t\t\t\t\tvar func = \"top.mainpane.location.href = 'http://\";\r\n\t\t\t\t\tfunc += server + inv_use(1794) + '; return false; ';\r\n\t\t\t\t\tif (img.getAttribute('oncontextmenu') == null) img.setAttribute('oncontextmenu', func);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 357:\t// absinthe-minded: link to wormwood; light up on 9/5/1 turns left.\r\n\t\t\t\t\tvar abstxt = img.parentNode.nextSibling.textContent;\r\n\t\t\t\t\tvar fontA, fontB;\r\n\t\t\t\t\tif (/\\(9/.test(abstxt) || /\\(5/.test(abstxt) || /\\(1\\)/.test(abstxt)) { fontA = '<font color=\"red\">'; fontB = '</font>'; }\r\n\t\t\t\t\telse { fontA = ''; fontB = ''; }\r\n\t\t\t\t\timg.parentNode.nextSibling.innerHTML = '<a target=mainpane href=\"' +\r\n\t\t\t\t\t\tto_place(\"wormwood\") + '\">' + fontA + '<b>' +\r\n\t\t\t\t\t\timg.parentNode.nextSibling.innerHTML + '</b>' + fontB + '</a>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 510:\r\n\t\t\t\t\t$(img).parent().next().children('font').wrap('<a target=mainpane href=\"mountains.php\" />');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 725:\r\n\t\t\t\t\t$(img).parent().next().children('font').wrap('<a target=mainpane href=\"'+to_place('rabbithole') + '\"/>');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 549:\r\n\t\t\t\t\tvar fishyturns = img.parentNode.nextSibling.textContent;\r\n\t\t\t\t\tif (/\\(1\\)/.test(fishyturns)) { // last turn of fishy?\r\n\t\t\t\t\t\t$(img).parent().next().wrap('<font color=\"red\" />');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 189: case 190: case 191: case 192: case 193:\r\n\t\t\t\t\tSetCharData(\"phial\", effNum);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 846:\r\n\t\t\t\t\tvar transtext = img.parentNode.nextSibling.textContent;\r\n\t\t\t\t\timg.parentNode.nextSibling.innerHTML = '<a target=mainpane href=\"' + to_place('spaaace&arrive=1') +\r\n\t\t\t\t\t\t'\">' + img.parentNode.nextSibling.innerHTML + '</a>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tif (effName == undefined) effName = \"\";\r\n\t\t\t\t\tfunc = \"if (confirm('Uneffect \"+effName+\"?')) top.mainpane.location.href = 'http://\";\r\n\t\t\t\t\tfunc += server + \"uneffect.php?using=Yep.&whicheffect=\"+effNum+\"&pwd=\"+pwd+\"';return false;\";\r\n\t\t\t\t\tif (img.getAttribute('oncontextmenu') == null) img.setAttribute('oncontextmenu', func);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "984df0c7944bb124f4c1edf4b6bc4d38", "score": "0.6122428", "text": "function displaySelectCharacter(image){\r\n const selectImage = document.createElement(\"img\")\r\n selectImage.src = image.image\r\n searchDisplay.style.backgroundColor = \"rgba(226, 226, 226, 0.5)\"\r\n userInputDiv.style.backgroundColor = \"rgba(226, 226, 226, 0.5)\"\r\n if(characterImg.hasChildNodes() === true){\r\n characterImg.textContent =\"\"}\r\n characterImg.append(selectImage)\r\n const selectImageDetails = [\"name\",\"status\",\"species\",\"gender\",\"origin\"]\r\n selectImageDetails.forEach(element => {\r\n const divTagInfo = document.createElement(\"div\")\r\n const labelTagInfo = document.createElement(\"label\")\r\n const spanTagInfo = document.createElement(\"span\")\r\n labelTagInfo.textContent = element.toUpperCase()+\" : \"\r\n spanTagInfo.id = `PT${element}${image.id}`\r\n spanTagInfo.contentEditable = \"true\"\r\n element === \"origin\"? spanTagInfo.textContent = Object.values(image[`${element}`])[0] : spanTagInfo.textContent = image[`${element}`]\r\n divTagInfo.append(labelTagInfo)\r\n divTagInfo.append(spanTagInfo)\r\n characterInfo.append(divTagInfo)\r\n })\r\n browseDiv.textContent = \"\"\r\n saveChanges(image)\r\n likeDislike(image)\r\n}", "title": "" }, { "docid": "339ec5497f4070279bb06f8801a51e2a", "score": "0.6096082", "text": "function loadCharacter() {\r\n\tlet imgChar = document.createElement('img');\r\n\timgChar.src = router.ROOT + categorie.imageURI;\r\n\timgChar.id = 'character_image';\r\n\tpersoBox.appendChild(imgChar);\r\n}", "title": "" }, { "docid": "b12c80b36f8fc271bacd4ca1a8b1ef82", "score": "0.6056596", "text": "function chooseChar(char){\n R2D2.play()\n chosenPlayer = true; \n character = char;\n console.log(character);\n $('#player-area').append(char.image);\n $('#player-name').append(char.name);\n $('#player-health').append(parseInt(char.health));\n console.log(parseInt(char.health));\n $('#player-attack').append(parseInt(char.attack));\n console.log(parseInt(char.attack));\n $('#player-attack-back').append(parseInt(char.AttackBack));\n console.log(parseInt(char.AttackBack));\n\n}", "title": "" }, { "docid": "fbaddc1aa6dcd986e1a03d689c49e6a1", "score": "0.6016218", "text": "function DrawCharacter (screen, box){\r\n var ctxt = screen.context\r\n var head_image = new Image()\r\n head_image.src = box.colour.a\r\n var body_image = new Image()\r\n body_image.src = box.colour.b\r\n var leg_image = new Image()\r\n leg_image.src = box.colour.c\r\n ctxt.save()\r\n ctxt.drawImage(leg_image, box.posx - box.sizex, box.posy + 20,box.sizex*1.7, box.sizey)\r\n if(box.colour.d == 1)\r\n ctxt.drawImage(body_image, box.posx - box.sizex-5 , box.posy-40 ,box.sizex*2.2, box.sizey*1.7)\r\n else\r\n ctxt.drawImage(body_image, box.posx - box.sizex-3 , box.posy-40 ,box.sizex*2.2, box.sizey)\r\n ctxt.drawImage(head_image, box.posx - box.sizex, box.posy - box.sizey,box.sizex*1.7, box.sizey)\r\n ctxt.restore()\r\n}", "title": "" }, { "docid": "761b6ba3b8047c2f83d08ef460616a05", "score": "0.6008194", "text": "function winScreen() {\n push();\n textSize(30);\n fill(235, 216, 52);\n stroke(0);\n strokeWeight(5);\n textAlign(CENTER, CENTER);\n text(`You found the dog`, width / 2, height / 2);\n pop();\n}", "title": "" }, { "docid": "5260bfe28daa8fce340530902a3c6d1f", "score": "0.60028034", "text": "displayStats() {\n if (this.monsterHealth > 0) {\n rectMode(CORNER);\n fill(\"black\");\n rect(this.xPosition - monsterImageX/2 + 20, this.yPosition + monsterImageY/2 + 20, monsterImageX - 40, 40);\n fill(\"red\");\n rect(this.xPosition - monsterImageX/2 + 20, this.yPosition + monsterImageY/2 + 20, (monsterImageX - 40)/this.monsterMaxHealth * this.monsterHealth, 40);\n fill(\"white\");\n textSize(40);\n text(this.monsterHealth + \"/\" + this.monsterMaxHealth, this.xPosition, this.yPosition + 162);\n }\n else if (this.monsterHealth <= 0) {\n this.isAlive = false;\n gold += this.monsterGold;\n }\n\n if (this.monsterArmor > 0) {\n fill(\"black\");\n rect(this.xPosition - monsterImageX/2 + 20, this.yPosition + monsterImageY/2 + 75, monsterImageX - 40, 40);\n fill(\"dodgerblue\");\n rect(this.xPosition - monsterImageX/2 + 20, this.yPosition + monsterImageY/2 + 75, (monsterImageX - 40)/this.monsterMaxArmor * this.monsterArmor, 40);\n fill(\"white\");\n textSize(40);\n text(this.monsterArmor + \"/\" + this.monsterMaxArmor, this.xPosition, this.yPosition + 218);\n }\n }", "title": "" }, { "docid": "2f0262950ea7aa3836b57acc860c1b68", "score": "0.60011137", "text": "function showGameStats(text, textX, textY, img, imgX, imgY) {\n // draw text \n ctx.fillStyle = \"#FFF\";\n ctx.font = \"25px Germania One\";\n ctx.fillText(text, textX, textY);\n\n // draw image\n ctx.drawImage(img, imgX, imgY, width = 25, height = 25);\n}", "title": "" }, { "docid": "3b21194d3b705ca9c3ba2a2ce554e54b", "score": "0.60005", "text": "function displayCharacters(array) {\n array.forEach(element => {\n // Character Image\n var image = $('<img>');\n image.attr('class', 'character');\n image.attr('id', element.alt);\n image.attr('src', element.src);\n image.attr('alt', element.alt);\n image.attr('name', element.name);\n\n // adding popover to image\n var span = $('<span>');\n span.attr('data-container', 'body');\n span.attr('id', 'span_' + element.alt);\n span.attr('class', 'span_wrap')\n span.attr('data-trigger', 'hover');\n span.attr('data-toggle', 'popover');\n span.attr('data-placement', 'bottom');\n span.attr('data-content', element.name);\n span.addClass('displayCharacters_IMG_SPAN');\n $('.characters').append(span.append(image));\n });\n }", "title": "" }, { "docid": "3fe52f6588fd4297a0fc469d92ae02cc", "score": "0.5985838", "text": "function populateChar(container,character){\n // which img\n var facing = 'front';\n if(character === 'hero'){\n // we see the back of our hero\n // a real hero faces danger\n facing = 'back';\n }\n\n // build the character\n container.append('<section class=\"char\"><img src=\"'+gameData[character].img[facing]+'\" alt=\"'+gameData[character].name+'\"><aside class=\"data\"><h2>'+gameData[character].name+'</h2><div><progress max=\"'+gameData[character].hp.total+'\"></progress><p><span>'+gameData[character].hp.current+'</span>/'+gameData[character].hp.total+'</p></div></aside></section>');\n}", "title": "" }, { "docid": "9f6054a02ecdc2c749d9b824811b0aad", "score": "0.5967794", "text": "function renderCharacters (characters) {\r\n if (characters === null) {\r\n let charactersDiv = document.getElementById(\"vngine-characters-div\");\r\n characterImgs = [];\r\n charactersDiv.innerHTML = \"\";\r\n return;\r\n }\r\n\r\n characterImgs.forEach(img => {\r\n img.setAttribute(\"src\", \"\");\r\n img.setAttribute(\"data-character\", \"\");\r\n img.style.left = \"\";\r\n img.style.right = \"\";\r\n });\r\n\r\n let charactersDiv = document.getElementById(\"vngine-characters-div\");\r\n if (characters.length > characterImgs.length) {\r\n let imgAmount = characters.length - characterImgs.length;\r\n for (let i = 0; i < imgAmount; i++) {\r\n let character = document.createElement(\"img\");\r\n character.classList.add(\"vngine-character\");\r\n charactersDiv.append(character);\r\n characterImgs.push(character);\r\n }\r\n }\r\n\r\n characters.forEach((character, i) => {\r\n let pictureIndex = character.picture == undefined ? 0 : character.picture;\r\n let picURL = `${gameResDir}/img/characters/${game.characters[character.index].pictures[pictureIndex]}`;\r\n \r\n characterImgs[i].style.transition = \"\";\r\n if (character.left !== undefined) {\r\n characterImgs[i].style.left = `${character.left}%`;\r\n }\r\n else if (character.right !== undefined) {\r\n characterImgs[i].style.right = `${character.right}%`;\r\n }\r\n\r\n characterImgs[i].setAttribute(\"data-character\", character.index);\r\n characterImgs[i].setAttribute(\"src\", picURL);\r\n });\r\n }", "title": "" }, { "docid": "6ee24e54d498e73f0cf83406cd3d061c", "score": "0.5966571", "text": "function levelDisplay() {\n\n noStroke();\n fill(0);\n ellipse(width * 0.3215, height * 0.975, width * 0.0165, height * 0.0275);\n stroke(255);\n fill(50, 231, 255);\n text(stats.lvl, width * 0.32125, height * 0.975);\n image(player.statsicon, width * 0.275, height * 0.96, width * 0.0168, height * 0.028);\n\n}", "title": "" }, { "docid": "b3f1ce61331796f2d09730e7bf2030b1", "score": "0.59614474", "text": "function renderChar() {\n database.ref(\"characters\").once('value', function(snapshot) {\n snapshot.forEach(function(childSnapshot) {\n var childData = childSnapshot.val();\n var img = $(\"<img>\");\n img.attr(\"src\", childData.charThumbnail);\n img.attr(\"data-name\", childData.charName);\n img.attr(\"data-health\", childData.health);\n img.attr(\"data-power\", childData.power);\n img.attr(\"data-src\", childData.charImage);\n img.addClass(\"character-thumbnail\");\n $(\"#char-selection\").append(img);\n });\n });\n}", "title": "" }, { "docid": "197646601ac03d79ad671b7bd381b9a0", "score": "0.5957951", "text": "function titleScreen () {\n //sets background and text size for character selection message\n background(0);\n textSize(30);\n textAlign(CENTER);\n fill (\"#ffffff\");\n text(\"Right-side Player, choose your character!\",width/2,70);\n\n // TP and special ability info/controls\n push();\n textSize(20);\n text(\"Each character has a SPECIAL ABILITY that you can use when your TP is at 10! Press 'd' or '<--' to use it!\",width/2-width/4-10,height/5,350);\n pop();\n\n //display character sprites\n imageMode(CENTER);\n image(juanitaHappy,width/3,height/2-40);\n image(fyveHappy,width/3*2,height/2-40);\n\n //display box around icon and special ability info if player chooses juanita\n if (rightCharacter === \"juanita\") {\n push();\n rectMode(CENTER);\n strokeWeight(5);\n noFill();\n stroke(\"#ead2f7\");\n rect(width/3,height/2-40,juanitaHappy.width+5,juanitaHappy.height+5);\n pop();\n text(\"JUANITA\", width/2,height/3*2-10);\n textSize(20);\n text(\"Juanita's special ability is ROBOARMS, which gives her two extra paddles! The ROBOARMS are immune to Fyve's special ability!\",width/2-width/4-10,height/2+150,350);\n //instructions for starting the game\n textSize(30);\n text(\"Now hit enter to play!\",width/2,height-50);\n }\n //display box around icon and special ability info if player chooses fyve\n if (rightCharacter === \"fyve\") {\n push();\n rectMode(CENTER);\n strokeWeight(5);\n noFill();\n stroke(\"#ead2f7\");\n rect(width/3*2,height/2-40,fyveHappy.width+5,fyveHappy.height+5);\n pop();\n text(\"FYVE\", width/2,height/3*2-10);\n textSize(20);\n text(\"Fyve's special ability is STARFALL, which sends stars shooting at the other player! If their paddle is hit by a star, they LOSE POINTS!\",width/2-width/4-10,height/2+150,350);\n //instructions for starting the game\n textSize(30);\n text(\"Now hit enter to play!\",width/2,height-50);\n }\n}", "title": "" }, { "docid": "0d6bf48a00848c9293a2b879a04b8a9d", "score": "0.5945542", "text": "function initChar(init_hp, init_exp, LV_EXP) {\n let char = {\n hp: init_hp,\n exp: init_exp,\n lv: 0,\n loc: [],\n dmg: 5\n };\n statUpdate(char, LV_EXP);\n return char;\n}", "title": "" }, { "docid": "01cad89ec9251acd56e7ccf21a1f33e2", "score": "0.5941218", "text": "function changeChar(charNum) {\n\n //look at the database to see whats up\n currentChar = db.chars[charNum];\n //create a new character with this info\n charCanvas = new Character(currentChar.name, currentChar.parts);\n\n //set a new placeholder text and a new limit\n codeInput.placeholder = currentChar.placeholder;\n maxLength = currentChar.placeholder.length;\n //then clear the current color code\n codeInput.value = \"\";\n codeControl(); //to reset the warning message if any\n\n //change the character icon\n charIcon.setAttribute(\"src\", \"Characters/\"+currentChar.name+\"/1.png\");\n\n //adjust the code input width\n resizeInput();\n\n //make the recolor button unclickable and show some feedback\n recolorButton.style.filter = \"brightness(.8)\";\n recolorButton.style.pointerEvents = \"none\";\n\n //update the dowloaded image name\n downLink.setAttribute(\"download\", currentChar.name + \" Recolor.png\");\n\n}", "title": "" }, { "docid": "3c13885b24e316b41d36c62e8b5e2ffc", "score": "0.59400976", "text": "function displayPlayerStats() {\n textSize(25);\n image(manaStar, manaStarPosition.x, manaStarPosition.y, manaStarSize, manaStarSize);\n text(mana, manaStarPosition.x, manaStarPosition.y + 12);\n fill(0);\n image(armorShield, armorShieldPosition.x, armorShieldPosition.y, armorShieldSize - 10, armorShieldSize);\n text(armor, armorShieldPosition.x, armorShieldPosition.y + 5);\n fill(0);\n image(goldBag, goldBagPosition.x, goldBagPosition.y, goldBagSize, goldBagSize);\n text(gold, goldBagPosition.x - 5, goldBagPosition.y + 10);\n if (burn > 0) {\n image(playerBurn, healthHeartPosition.x, healthHeartPosition.y - 100, playerBurnSize, playerBurnSize);\n text(burn, healthHeartPosition.x, healthHeartPosition.y - 85);\n }\n fill(255);\n image(healthHeart, healthHeartPosition.x, healthHeartPosition.y, healthHeartSize, healthHeartSize);\n text(health, healthHeartPosition.x, healthHeartPosition.y);\n}", "title": "" }, { "docid": "bb85ac6557e9f550f9eeb51eba13b880", "score": "0.59313446", "text": "display() {\n push();\n // Set the fontSize\n textSize(this.fontSize);\n // Translate to the position of the letter, but add half width and height\n // so that we account for kerning\n translate(this.x + this.width / 2, this.y + this.height / 2);\n // Rotate\n rotate(this.angle);\n // Set a stroke based on Perlin noise to create a nice visual effect as\n // letters move around\n stroke(map(noise(this.t), 0, 1, 100, 255));\n // Set a stroke weight to make the letters more visible\n strokeWeight(3);\n // White fill, why not\n fill(255);\n // Update the time parameters for the noise\n this.t += 0.01;\n // Draw the text\n text(this.letter, 0, 0);\n pop();\n }", "title": "" }, { "docid": "7dc1da82f138058533557f864cbd6998", "score": "0.5912031", "text": "function init() {\n\t\t\t// For each character in characters object..\n\t\t\tfor (var key in characters) {\n\t\t\t\t// Create character div\n\t\t\t\tvar $characterDiv = $('<div>');\n\t\t\t\t// Add white background color class and choice class\n\t\t\t\t$characterDiv.addClass(\"img-white-wrapper choice\");\n\t\t\t\t// Add a value attribute containing the name of the object\n\t\t\t\t$characterDiv.attr(\"value\", key);\n\t\t\t\t// Create image tag\n\t\t\t\tvar $characterImg = $('<img>');\n\t\t\t\t// Add img class\n\t\t\t\t$characterImg.addClass(\"img\");\n\t\t\t\t// Add source code of character image\n\t\t\t\t$characterImg.attr(\"src\", characters[key].photo);\n\t\t\t\t// Get name from character object\n\t\t\t\tvar $characterName = characters[key].name;\n\t\t\t\t// Get HP from character object\n\t\t\t\tvar $characterHP = $('<div>');\n\t\t\t\t$characterHP.attr(\"id\", key+\"_hp\");\n\t\t\t\t$characterHP.text(characters[key].hp);\n\t\t\t\t// Append name, image, and HP to character div\n\t\t\t\t$characterDiv.append($characterName);\n\t\t\t\t$characterDiv.append($characterImg);\n\t\t\t\t$characterDiv.append($characterHP);\n\t\t\t\t// Append character div to top row of screen\n\t\t\t\t$('#characterChoice').append($characterDiv);\n\t\t\t};\n\t\t}", "title": "" }, { "docid": "4f9abe818494a6c242de1ab852fb020d", "score": "0.59092957", "text": "function drawCDScreen(cd){\n draw(true);\n drawContext.font = \"bold 190px 'Helvetica Neue', Helvetica\";\n drawContext.fillText(currentCD, CANVAS_WIDTH/2 , CANVAS_HEIGHT/2 - 20);\n drawContext.font = \"bold 36px 'Helvetica Neue', Helvetica\";\n drawContext.fillText('Use ' + String.fromCharCode(9664) + ' and ' + String.fromCharCode(9654) + ' keys', CANVAS_WIDTH/2 , CANVAS_HEIGHT/2 + 140);\n }", "title": "" }, { "docid": "f13ad4ac5282943b811f0ca84230812e", "score": "0.59038246", "text": "function render_char(ch, pos, scale, drawparms) {\n // locate character in ocrb_data\n var chix = -1;\n chars = ocrb.chars;\n for (var i=0; i < chars.length; i++) {\n if (chars[i].ch == ch) {\n chix = i;\n break;\n }\n }\n if (chix == -1) {\n return []; // empty array\n }\n \n var cmds = chars[i].cmds; // array of arrays cmds = [ [ \"M\", ... ], [ \"L\", ... ], [ \"C\", ... ], ... ];\n var gcode = [];\n \n var zupcmd = \"G1 Z\" + drawparms.zup.toFixed(2) + \" F\" + drawparms.vertical.toFixed(0);\n var zdncmd = \"G1 Z\" + drawparms.zdn.toFixed(2) + \" F\" + drawparms.vertical.toFixed(0);\n \n for (var i=0; i < cmds.length; i++) {\n if (cmds[i][0] == \"M\") {\n var x = cmds[i][1] * scale[0] + pos[0];\n var y = cmds[i][2] * scale[1] + pos[1];\n gcode.push(zupcmd);\n gcode.push(\"G1 X\" + n2s(x, 6) + \" Y\" + n2s(y, 6) + \" F\" + drawparms.rapid.toFixed(0));\n gcode.push(zdncmd);\n }\n else if (cmds[i][0] == \"L\") {\n var x = cmds[i][1] * scale[0] + pos[0];\n var y = cmds[i][2] * scale[1] + pos[1];\n gcode.push(\"G1 X\" + n2s(x, 6) + \" Y\" + n2s(y, 6) + \" F\" + drawparms.drawspeed.toFixed(0));\n }\n else if (cmds[i][0] == \"C\") {\n var p1x = cmds[i][1] * scale[0];\n var p1y = cmds[i][2] * scale[1];\n var p2x = cmds[i][3] * scale[0];\n var p2y = cmds[i][4] * scale[1];\n var x = cmds[i][5] * scale[0] + pos[0];\n var y = cmds[i][6] * scale[1] + pos[1];\n gcode.push(\"G5 I\" + n2s(p1x, 6) + \" J\" + n2s(p1y, 6) + \" P\" + n2s(p2x, 6) + \" Q\" + n2s(p2y, 6) + \" X\" + n2s(x, 6) + \" Y\" + n2s(y, 6) + \" F\" + drawparms.drawspeed.toFixed(0));\n }\n else {\n alert(\"unrecognized command \" + cmds[i][0]);\n }\n }\n \n return gcode;\n}", "title": "" }, { "docid": "d7bd5c1b3633e7501692e7ec6b36fcba", "score": "0.5872987", "text": "function Character(name, imgSRC, healthPoints, attackPower) {\n this.name = name;\n this.imgSRC = imgSRC;\n this.healthPoints = healthPoints;\n this.attackPower = attackPower;\n}", "title": "" }, { "docid": "3bd13c2396b26304816f19536bbc0c20", "score": "0.5859235", "text": "function winScreen() {\n // setting the font of the text\n context.font = \"16px Monospace\";\n // fillStyle is used to set property color\n context.fillStyle = \"#fff\";\n // check which player has won and display the text\n playerScore === winScore ? context.fillText(\"You won\", 280, 200) : context.fillText(\"Computer won\", 280, 200);\n /*\n fill text is used to draw filled text on the canvas, 150, 500 are X and Y\n coordinates on the canvas\n */\n context.fillText(\"Click anywhere in the canvas to restart\", 150, 500);\n}", "title": "" }, { "docid": "37cb30477fc57ab018ac1e10f6b57c69", "score": "0.58543307", "text": "function drawCharacter() {\n characterHeight = character_image.height * 0.35;\n characterWidth = character_image.width * 0.35;\n if (isMovingLeft) {\n flipCharacterImage();\n };\n ctx.drawImage(character_image, character_x, character_y, characterWidth, characterHeight);\n ctx.restore(); \n requestAnimationFrame(drawCharacter);\n }", "title": "" }, { "docid": "b19d79d72adcda424571ad30b6754ecd", "score": "0.58395046", "text": "function displayInfo(inPlayerInfo, inHealthAmount)\n{\n ctx.font = \"20px Comic Sans MS\";\n ctx.fillStyle = \"#00FF00\";\n\n if (inHealthAmount > 0)\n {\n ctx.fillText(\"Health Amount: \" + inPlayerInfo[0], window.innerWidth / 2 - 75, window.innerHeight * 0.95);\n }\n else\n {\n ctx.fillText(\"Dead\", window.innerWidth / 2 - 75, window.innerHeight - 50);\n }\n\n // Draw info for a particular type of player.\n if (inPlayerInfo[1] == 'C')\n {\n ctx.fillText(\"Invisible Mode: \" + inPlayerInfo[2], window.innerWidth * 0.8, window.innerHeight * 0.95);\n }\n else if (inPlayerInfo[1] == 'L')\n {\n ctx.fillText(\"Ammo: \" + inPlayerInfo[2], window.innerWidth * 0.8, window.innerHeight * 0.95);\n if (inPlayerInfo[3])\n {\n ctx.fillText(\"Ammo Mode \", window.innerWidth * 0.1, window.innerHeight * 0.95);\n }\n else\n {\n ctx.fillText(\"Health Mode \", window.innerWidth * 0.1, window.innerHeight * 0.95);\n }\n }\n else if (inPlayerInfo[1] == 'R')\n {\n ctx.fillText(\"Brick: Haven't done\", window.innerWidth * 0.1, window.innerHeight * 0.95);\n }\n}", "title": "" }, { "docid": "3e7fd3e55739d06f04303b12e333541d", "score": "0.58302855", "text": "function winGameScreen() {\n ctx.fillStyle = \"rgba(24, 147, 223, 0.708)\";\n ctx.fillRect(0, 0, w, h);\n winText();\n }", "title": "" }, { "docid": "b8bcb1827d1b718854e5aa6161a0de26", "score": "0.58284205", "text": "function drawMiniaturizedCharacter() {\n // Create a new div and store it in a variable\n let $characterContainer = document.createElement(\"DIV\");\n // Clone the final body parts, append them to the new div and store the clones in variables\n let $miniLeg = $(finalLeg).clone(false).appendTo($characterContainer);\n let $miniBody = $(finalBody).clone(false).appendTo($characterContainer);\n let $miniHead = $(finalHead).clone(false).appendTo($characterContainer);\n // Remove the classes from the clones\n $($miniLeg).removeClass();\n $($miniBody).removeClass();\n $($miniHead).removeClass();\n // And insert the new div at the beginning of the one with the id \"results\"\n $($characterContainer).prependTo('#results');\n}", "title": "" }, { "docid": "cf5c533f60a82035dee4e91911ad71d9", "score": "0.58140403", "text": "render() {\n this.x = gameProperties.covertColToX(this.currentMapCol);\n ctx.drawImage(Resources.get(this.sprite), this.characterDetails[this.character].imageSubsetX, this.characterDetails[this.character].imageSubsetY, this.characterDetails[this.character].width, this.characterDetails[this.character].height, this.x, this.y, this.characterDetails[this.character].width, this.characterDetails[this.character].height);\n }", "title": "" }, { "docid": "bfaa73b733849785794892eb10eb0673", "score": "0.5813035", "text": "function showImageAndWordGuesses() {\n\tdocument.getElementById('weapon').innerHTML = '<img class=\"weapon-img\" src=\"assets/images/items/' + chosenWord.replace(/'| /g,'').toLowerCase() + '.png\">';\n\tdocument.getElementById('word-guesses').innerHTML = displayWordGuesses;\n\tconsole.log(chosenWord + \": \" + displayWordGuesses);\n}", "title": "" }, { "docid": "c56b7fa71cf9af32e8365c02aa6779eb", "score": "0.5767605", "text": "function drawGameStats(text, value, valueX, valueY, img, imgX, imgY, imgWidth, imgHeight){\n ctx.fillStyle = \"#ffffff\";\n ctx.font = \"25px Germania One\";\n ctx.fillText(text + value, valueX, valueY);\n //ctx.drawImage(img, imgX, imgY, imgWidth, imgHeight);\n}", "title": "" }, { "docid": "ac033897e9dd002cf15ca4007dc17466", "score": "0.57657135", "text": "function show(){\n\t\tvar index = elements.counter.text();\n\t\telements.image.attr(\"src\", quotes[index].image);\n\t\telements.message.text(quotes[index].quote + \"\\\" - \" + quotes[index].character);\n\t}", "title": "" }, { "docid": "34d0caa1305728cd951d5ed2bbc25fb2", "score": "0.5759953", "text": "function domAddChar(char) {\n let divParent = document.createElement(\"div\");\n divParent.classList.add(\"character-info\");\n\n let divChild = document.createElement(\"div\");\n divChild.classList.add(\"name\");\n divChild.textContent = \"Character Name: \" + char.name;\n divParent.appendChild(divChild);\n\n divChild = document.createElement(\"div\");\n divChild.classList.add(\"occupation\");\n divChild.textContent = \"Character Occupation: \" + char.occupation;\n divParent.appendChild(divChild);\n\n divChild = document.createElement(\"div\");\n divChild.classList.add(\"cartoon\");\n divChild.textContent = \"Is a Cartoon? \" + char.cartoon;\n divParent.appendChild(divChild);\n\n divChild = document.createElement(\"div\");\n divChild.classList.add(\"weapon\");\n divChild.textContent = \"Character Weapon: \" + char.weapon;\n divParent.appendChild(divChild);\n\n container.appendChild(divParent);\n}", "title": "" }, { "docid": "17033a2037a283360c4ba600c2605fe4", "score": "0.57502717", "text": "function showWin() {\n addWin();\n wordPlayDOM(showWord());\n statusIsDOM('<h3>You won!</h3>');\n showWinsDOM();\n winningWordDOM('<p>The femme fatale is <em>' + word + '</em>. Press \\'n\\' for the next word.</p>');\n captionsDOM('<p>Roar.</p>');\n changeImg();\n \n}", "title": "" }, { "docid": "10bc110b3d6d2c0a6425e6995d6b4f69", "score": "0.5750263", "text": "drawInfo() {\n\n\t\t\t\tctx.save();\n\n\t\t\t\t// Image for player lives\n\n\t\t\t\tconst img = document.createElement( 'img' );\n\t\t\t\timg.src = gameObject.media.gameImages[4];\n\n\t\t\t\tctx.font = `${ canvasWidth * .06 }px Sedgwick Ave Display`;\n\t\t\t\tctx.fillStyle = '#fff';\n\t\t\t\tctx.textAlign = 'left';\n\t\t\t\tctx.fillText( 'Lives:', canvasWidth * .1, canvasHeight * .1 );\n\t\t\t\tctx.textAlign = 'right';\n\t\t\t\tctx.fillText( 'Score:', canvasWidth * .9, canvasHeight * .1 );\n\n\t\t\t\t// Score\n\n\t\t\t\tctx.fillText(\n\t\t\t\t\tgameObject.components.player.score,\n\t\t\t\t\tcanvasWidth * .9,\n\t\t\t\t\tcanvasHeight * .2\n\t\t\t\t);\n\n\t\t\t\t// Lives\n\n\t\t\t\tfor ( let i = 0; i < gameObject.components.player.lives; i++ ) {\n\t\t\t\t\tctx.drawImage(\n\t\t\t\t\t\timg,\n\t\t\t\t\t\tcanvasWidth * .1 + i * canvasWidth * .08,\n\t\t\t\t\t\tcanvasHeight * .15,\n\t\t\t\t\t\t30, 30\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tctx.restore();\n\n\t\t\t}", "title": "" }, { "docid": "0033a1e5d463ba9f4b666479e3687e6b", "score": "0.5737274", "text": "function RenderCharacters(div, characters){\n\tvar data = [];\n\n\tfor (var i = 0; i < characters.length; i++) {\n\t\tdata.push(characters[i].getDisplayInfo())\n\t}\n\n\tdiv.html(data.map(characterTemplate).join(''));\n}", "title": "" }, { "docid": "46901a13fa9458cd70d515716ab87dc0", "score": "0.57347804", "text": "function CLIDisplay () {}", "title": "" }, { "docid": "d7b7d9c004019cf091e99ad4210b6186", "score": "0.572352", "text": "display() {\n if (!this.isFailed) { // display when game is actvie\n push();\n noStroke();\n imageMode(CENTER);\n this.radius = this.power;\n image(this.playerImg, this.x, this.y, 2 * this.radius, 2 * this.radius);\n pop();\n }\n }", "title": "" }, { "docid": "b24b7e2530a84a677e8a4784021b92d5", "score": "0.57198083", "text": "function drawGameInfo() {\n context.font = '48px sans-serif';\n context.fillStyle = \"#fff\";\n context.fillText(score, width - 150, 80);\n context.font = '24px sans-serif';\n context.fillText(`Gen: ${currGeneration}`, width - 150, 30);\n context.fillText(`${activeBirds.length} birds`, width - 150, 110);\n context.fillText(`Top: ${highScore}`, width - 150, 140);\n}", "title": "" }, { "docid": "c9c1fe392e1371e0713e33c6f2dab719", "score": "0.5716246", "text": "function Character (image, heroName, alterEgo, bio, powers) {\r\n this.image = image;\r\n this.heroName = heroName;\r\n this.alterEgo = alterEgo;\r\n this.bio = bio;\r\n this.powers = powers;\r\n}", "title": "" }, { "docid": "7bf82a2f584edcfbb95d6ac0daf8d8d9", "score": "0.571486", "text": "function Character (obj_name, touchable) {\n this.name = obj_name;\n this.visible = false;\n this.touchable = touchable;\n this.current_seq = 0; \n this.sequence_order = [\"main\"];\n this.main = {\n xdistance : 0,\n ydistance : 0,\n xinc : 0,\n yinc : 0,\n starting_frame : 0,\n cache : [],\n iterations : 1,\n current_iteration : 0,\n current_cel : 0,\n cels : []\n };\n this.constructor = Character;\n }", "title": "" }, { "docid": "d7467fa3d9fd78985ddfb0c428c7c671", "score": "0.5709189", "text": "addGameStats(){\n\n this.add.text(100, 720, 'use arrow keys to control characters');\n this.add.text(100, 750, 'press \\'space\\' key to shoot scissor to kill ghost');\n\n this.level = this.add.text(1000, 700, 'level 3', titleConfig);\n initialTime = 30;\n\n this.add.image(830, 30, 'book').setOrigin(0.5, 0.5);\n \n this.bookCollected = this.add.text(910, 30, numberOfBooks + '/' + 6).setOrigin(0.5, 0.5);\n this.bookCollected.setStyle(scoreConfig);\n\n this.add.image(670, 30, 'ghost').setOrigin(0.5, 0.5);\n this.ghostKilled = this.add.text(750, 30, numberOfGhost + '/' + 2).setOrigin(0.5, 0.5);\n this.ghostKilled.setStyle(scoreConfig);\n\n }", "title": "" }, { "docid": "edc87c84a982b4a23a4016a1bd8f0d8e", "score": "0.5708386", "text": "render() {\n ctx.drawImage(Resources.get(this.sprite), this.x, this.y);\n if (this.won === true) {\n ctx.font = '72px Arial';\n ctx.fillText('You won!', 100, 300);\n ctx.font = '36px Arial';\n ctx.fillText('Press ENTER for new game.',30, 400);\n }\n }", "title": "" }, { "docid": "1373107a83c83a2b72dbb95c260c4e49", "score": "0.5702547", "text": "function win(){\n background(backgroundColor);\n textSize(100);\n textFont(pacFont);\n fill(20, 100, 100)\n rect(342, 95, 520, 120, 20);\n stroke(0);\n strokeWeight(5);\n fill(38,100,100)\n rect(352, 105, 500, 100, 20);\n fill(46,0,100);\n text(\"pacman\", 365, 195);\n fill(259,100,40);\n text(\"pacman\", 375, 205);\n fill(56,100,100);\n text(\"pacman\", 370, 200);\n \n image(pacGif, 360, 265);\n // gif_createImg.position(50, 350);\n \n textFont(pacSmallFont);\n textSize(50);\n text(\"YOU WIN!\", 460, 300);\n \n textSize(20);\n text(`Score: ${score}`,100,100);\n text(\"Press x to go to the next level\", 400, 550);\n \n //stage = 0;\n //new Game();\n // lives === 3;\n // stage==0;\n // setup();\n // game();\n \n// charLocations();\n// stage = 4;\n// levelCounter++;\n \n charDelete();\n emptyobstacles();\n deleteFood();\n \n\n \n}", "title": "" }, { "docid": "e4ed6f602502de8cd25eb4c459ac1b8a", "score": "0.570016", "text": "function displayWin() {\n\tvar b_count = 0;\n\tvar w_count = 0;\n\tfor(var y = 0; y < 8; y++){\n\t\tfor(var x = 0; x < 8; x++) {\n\t\t\tif(state.board[y][x]){\n\t\t\t\tif(state.board[y][x] === 'b') {\n\t\t\t\t\tb_count++;\n\t\t\t\t}\n\t\t\t\telse if(state.board[y][x] === 'w'){\n\t\t\t\t\tw_count++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\tvar victor = null;\n\tif(b_count > w_count) {\n\t\tvictor = 'b';\n\t}\n\telse if(w_count > b_count) {\n\t\tvictor = 'w';\n\t}\n\t\n\tfor(var y = 0; y < 8; y++){\n\t\tfor(var x = 0; x < 8; x++) {\n\t\t\tstate.board[y][x] = victor;\n\t\t}\n\t}\n\t\n\trenderBoard();\n}", "title": "" }, { "docid": "a0f98c84821539359817ecdb7bfac7bc", "score": "0.56942475", "text": "function CharacterStats(info) {\n GameObject.call(this, info)\n this.hp = info.hp\n this.name = info.name\n}", "title": "" }, { "docid": "5234faeeb42828d36da735f18e5d0a51", "score": "0.56930804", "text": "show() {\r\n fill(this.color);\r\n rectMode(CENTER);\r\n rect(this.x, this.y, this.w, this.h);\r\n fill(255);\r\n textSize(wid/50);\r\n text(this.keyOne, this.x - this.w/2, this.y - this.h/2);\r\n text(this.keyTwo, this.x + this.w/2, this.y + this.h/2);\r\n }", "title": "" }, { "docid": "1cd81f6354bfd0315646d0b3eefc447b", "score": "0.5691592", "text": "function draw() {\n var i = 0;\n \t\n \t// set number of columns based on window width\n \tcolumns = floor(width / 50);\n \t \n // draw animal rows\n\tfor(i = 0; i < columns; i++) {\n drawEmoji(dog, 50*i, 0, 50, 50);\n drawEmoji(cat, 50*i, 50, 50, 50);\n drawEmoji(mouse, 50*i, 100, 50, 50);\n drawEmoji(rabbit, 50*i, 150, 50, 50);\n drawEmoji(panda, 50*i, 200, 50, 50);\n drawEmoji(monkey, 50*i, 250, 50, 50);\n\t drawEmoji(whale, 50*i, 300, 50, 50);\n drawEmoji(blowfish, 50*i, 350, 50, 50);\n drawEmoji(turtle, 50*i, 400, 50, 50);\n\t}\n}", "title": "" }, { "docid": "86951c00fd39d3cef179fb6847d8997b", "score": "0.56907195", "text": "display() {\n push();\n imageMode(CENTER);\n this.x = mouseX;\n this.y = mouseY;\n image(this.avatar, this.x, this.y, this.width, this.height);\n pop();\n }", "title": "" }, { "docid": "e8e7960216e89e40ff7c07a900913967", "score": "0.568936", "text": "function characterStatus() {\n\n if (state === \"game\") { \n\n //natural regeneration of stats\n if (!shopSubstate && frameCount % 60 === 0) {\n stats.mana += stats.manaregen;\n stats.health += stats.hpregen;\n }\n\n levelUp();\n\n //failsafe of stats\n if (stats.mana <= 0) {\n stats.mana = 0;\n }\n else if (stats.mana >= stats.maxmana) {\n stats.mana = stats.maxmana;\n }\n\n if (stats.health >= stats.maxhp) {\n stats.health = stats.maxhp;\n }\n\n if (stats.armor >= 50) {\n stats.armor = 50;\n }\n if (stats.cdr >= 70) {\n stats.cdr = 70;\n }\n if (stats.mr >= 50) {\n stats.mr = 50;\n }\n if (stats.magicpen >= 80) {\n stats.magicpen = 80;\n }\n if (stats.armorpen >= 80) {\n stats.armorpen = 80;\n }\n if (stats.speed >= 60) {\n stats.speed = 60;\n }\n if (! itemabilities.lichbane) {\n if (stats.lifesteal >= 30) {\n excessls += stats.lifesteal - 30;\n stats.lifesteal = 30;\n }\n }\n else {\n stats.hpregen = 0;\n }\n if (itemabilities.nocrit) {\n stats.crit = 0;\n }\n\n //components of the UI\n blankbars();\n\n healthbar();\n\n manabar();\n\n expbar();\n\n charpic();\n\n gold();\n\n itemDisplay();\n\n statsMenu();\n\n abilityicons();\n \n summonericons();\n\n cooldowns();\n\n displaybuffs();\n\n image(player.overlay, width * 0.2, height * 0.8, width * 0.6, height * 0.2);\n \n levelDisplay();\n\n iteminfodisplay();\n\n abilityInfoDisplay();\n\n }\n\n}", "title": "" }, { "docid": "e73f7fcb7ce0017c7d13abda720f2168", "score": "0.5685742", "text": "function drawStats() {\n\tctx_stats.fillStyle = \"#ddccaa\";\n\tctx_stats.fillRect(0, 0, 260, 340);\n\tctx_stats.fillStyle = \"#000000\";\n\tctx_stats.font = \"30px Small Fonts\"\n\tctx_stats.textAlign = \"center\";\n\tctx_stats.fillText(\"Stats\", 130, 30);\n\tctx_stats.font = \"20px Small Fonts\"\n\tctx_stats.textAlign = \"left\";\n\tctx_stats.fillText(\"Health: \" + player.gethp() + \"/100\", 10, 80);\n\tctx_stats.fillText(\"Damage: \" + inventoryDamage[0], 10, 130);\n\tctx_stats.fillText(\"Range: \" + inventoryRange[0], 10, 180);\n\tctx_stats.fillText(\"Level: \", 10, 230);\n}", "title": "" }, { "docid": "ea221d3548b2c7f44aa2c1de8b4abfbf", "score": "0.56782335", "text": "function display() {\n\t\t$(\"#guess-number\").text(guess)\n\t\t$(\"#current-word\").text(answer.join(\" \"))\n\t\t$(\"#letters-guessed\").text(lettersGuessed.join())\n\t\t$(\"#wins\").text(win)\n\t\t$(\"#img\").attr(\"src\", img)\n\t\tif (guess == 0) {\n\t\t\tdisplayCorrectWord()\n\t\t}\n\t\telse if (lettersRemaining == 0) {\n\t\t\tdisplayWin()\n\t\t}\n\t}", "title": "" }, { "docid": "f64a1d23694bb828b2146f2b9bc179f0", "score": "0.5676985", "text": "function drawTitle() {\n ctx.fillStyle = \"#010008\";\n ctx.clearRect(0,0, 800, 600);\n ctx.fillRect(0,0, 800, 600);\n ctx.drawImage(image, 0, 0, 552, 175, 120, 100, 552, 175);\n ctx.fillStyle = \"white\";\n ctx.font = \"normal 64px monospace\";\n ctx.fillText(\"START\", 275, 400);\n ctx.fillText(\"CONTROLS\", 275, 500);\n drawCursor();\n ctx.fillStyle = \"black\";\n}", "title": "" }, { "docid": "94de39050d72b11d3bffedf05f8c1b9c", "score": "0.5672078", "text": "function displayTraits(myCharacter) {\n $('#allAboutMe').text(\"\");\n $('#allAboutMe').append(`<li>My temperament: ${myCharacter.temperament}</li>`);\n $('#allAboutMe').append(`<li>My personality: ${myCharacter.personality}</li>`);\n $('#allAboutMe').append(`<li>My greatest strength: ${myCharacter.greatestStrength}</li>`);\n $('#allAboutMe').append(`<li>My greatest weakness: ${myCharacter.greatestWeakness}</li>`);\n}", "title": "" }, { "docid": "f5d0c993a5fac3d9d5fcdeb5ad3061d9", "score": "0.567157", "text": "function drawGamewin() {\n\t\t\t\tpause();\n\t\t\t\tc.beginPath();\n\t\t\t\tc.textAlign = 'center';\n\t\t\t\tc.textBaseline = 'middle';\n\t\t\t\tc.font = 'bold 28px sans-serif';\n\t\t\t\t// text\n\t\t\t\tc.fillStyle = '#0d0';\n\t\t\t\tc.fillText('YOU WIN!', canvas.width / 2, canvas.height / 2);\n\t\t\t}", "title": "" }, { "docid": "df3cd2e4b4fd8a40413373b8aa71f7df", "score": "0.5669564", "text": "function characterInfo() {\n\tconsole.log('Character Info');\n\tinquirer.prompt(Prompts.characterInfo).then(function(response) {\n\t\tswitch (response.characterInfo) {\n\t\t\tcase 'Stats':\n\t\t\t\tconsole.log(character);\n\t\t\t\tbreak;\n\t\t\tcase 'Currency':\n\t\t\t\tconsole.log(character);\n\t\t\t\tbreak;\n\t\t\tcase 'Inventory':\n\t\t\t\tconsole.log(character);\n\t\t\t\tbreak;\n\t\t}\n\t});\n}", "title": "" }, { "docid": "63ad1edd9f1723e9974a44bc9a0de355", "score": "0.5667224", "text": "display() {\n push();\n rectMode(CORNER);\n imageMode(CENTER);\n noStroke();\n // display if the player is not dead\n if (!this.dead) {\n if (this.faceLeft) {\n image(this.texture, this.x, this.y, this.radius * 2, this.radius * 2);\n } else {\n image(this.texture_flipped, this.x, this.y, this.radius * 2, this.radius * 2);\n }\n // health bar\n fill(100);\n rect(this.x - this.radius, this.y - 40, this.radius * 2, 5);\n fill(255); // white\n rect(this.x - this.radius, this.y - 40, this.health * 2, 5);\n }\n pop();\n }", "title": "" }, { "docid": "439a6b413df16112164ea13c09e6f38f", "score": "0.5645347", "text": "function AsciiScreen () {\n\tthis._screenData = new Array();\n\tthis._fontSize = 10;\n\tthis._width = 0;\n}", "title": "" }, { "docid": "b178bffbc8f4c9e9721f036fb15575d6", "score": "0.5637676", "text": "function drawWin() {\n textAlign(CENTER);\n textSize(wt * 0.10);\n strokeWeight(6);\n fill(0, 200, 0);\n text(\"YOU WIN!\", wt / 2, ht / 2);\n strokeWeight(1);\n}", "title": "" }, { "docid": "f53521fec38876ecee82fc6b1f32e947", "score": "0.5633967", "text": "function newGame() {\r\n playerPos = 0;\r\n gc.clearRect(0, 0, 768, 768); //clear the screen\r\n gc.drawImage(img, Space[0].xPos, Space[0].yPos);\r\n let toptext = document.getElementById(\"top_text\");\r\n toptext.style.color = \"black\";\r\n toptext.innerHTML = \"Snakes and Ladders Single Player\";\r\n}", "title": "" }, { "docid": "615353d90171606ded969094d430b9ac", "score": "0.563131", "text": "debugScreen() {\n push();\n var rowHeight = scl / 2;\n background(0, 0, 20);\n textSize(standardTextSize / 2);\n fill(0, 255, 255);\n strokeWeight(1);\n var debugText =\n \"o - Debug and Keys\\n\" +\n \"m - KeyMode (different play)\\n\" +\n \"i - Fullscreen\\n\" +\n \"awsd - Player 1 possible controls\\n\" +\n \"arrow keys - Player 2 possible controls\";\n textLeading(20);\n textAlign(LEFT);\n text(debugText, windowWidth / 2, rowHeight, windowWidth, rowHeight * 10);\n pop();\n }", "title": "" }, { "docid": "7051de0399fe770cc1a3eb042224d8d6", "score": "0.56246597", "text": "function statString() {\n var statString = \"\";\n if(window.location.href.indexOf(\"index.html\") > -1) {\n\t doc.innerHTML = \"Welcome to Character Creation!\" + htmlString + htmlString;\n\t statString = doc.innerHTML + \"Your Strength is now: \" + myChar.str + htmlString + \"Your Dexterity is now: \" + myChar.dex + htmlString \n\t + \"Your Constitution is now: \" + myChar.con + htmlString + \"Your Wisdom is now: \" + myChar.wis + htmlString + \n\t \"Your Intelligence is now: \" + myChar.int + htmlString + \"Your Charisma is now: \" + myChar.cha;\n }\n else {\n\t \n\tvar weaponLow = myChar.equip.weaponBonusLow;\n\tvar weaponHigh = myChar.equip.weaponBonusHigh;\n\tvar weapon = myChar.equip.weapon;\n\tif (weaponLow == undefined || weaponHigh == undefined || weapon == \"\") {\n\t\tweapon = \"You have no weapon equipped\";\n\t\tweaponLow = 0;\n\t\tweaponHigh = 0;\n\t}\n\t\n\tstatString = \"Name: \" + myChar.name + htmlString + \"Strength : \" + myChar.str + htmlString + \"Dexterity : \" + myChar.dex + \n\thtmlString + \"Constitution : \" + myChar.con + htmlString + \"Wisdom : \" + myChar.wis + htmlString + \"Intelligence : \" + myChar.int \n\t+ htmlString + \"Charisma : \" + myChar.cha + htmlString + \"Fortitude: \" + myChar.fort + htmlString + \"Reflex: \" + myChar.refl + \n\thtmlString + \"Will: \" + myChar.will + htmlString + \"Attack: \" + myChar.atk + htmlString + \"Health: \" + myChar.hp + htmlString + \n\t\"Gold: \" + myChar.gold + htmlString + \"Weapon: \" + weapon + \" (\" + weaponLow + \" - \" + weaponHigh + \")\"; \n }\n \n return statString;\n}", "title": "" }, { "docid": "047ddf8801c117d6cd2a2b5b160061ea", "score": "0.56164306", "text": "function animateWoundedCharacter() {\n if (isWounded) {\n let index = characterGraphicIndex % characterGraphicsWounded.length;\n currentCharacterImg = './img/2.Secuencias_Personaje-Pepe-corrección/4.Herido/' + characterGraphicsWounded[index];\n } \n }", "title": "" }, { "docid": "c19fce92c279b694379dc5685dd34934", "score": "0.56110585", "text": "function drawCharacter(tileX, tileY) {\n pbc.fillStyle = char.bgColor;\n var x = tileSize * tileX + tileSize / 2;\n var y = tileSize * tileY + tileSize / 2;\n pbc.beginPath();\n pbc.arc(x, y, char.size / 2, 0, 2 * Math.PI);\n pbc.fill();\n pbc.strokeStyle = char.borderColor;\n pbc.stroke();\n if (finished === true) {\n var img = document.getElementById('smile');\n x -= char.size / 2;\n y -= char.size / 2;\n if (img.complete) {\n pbc.drawImage(img, x, y, char.size, char.size);\n } else {\n img.onload = function() {\n pbc.drawImage(img, x, y, char.size, char.size);\n }\n }\n }\n}", "title": "" }, { "docid": "3860df1d0176f45a0f0a3d2225441b6e", "score": "0.5610564", "text": "function getCharacterElement(charObj, type) {\n var character = charObj;\n\n var $imgDiv = $(\"<div>\");\n if (type == \"D\") {\n $imgDiv.addClass(\"flex-item my-def-div\");\n } else if (type == \"E\") {\n $imgDiv.addClass(\"flex-item my-enemy-div\");\n isEnemies = true;\n } else {\n $imgDiv.addClass(\"flex-item my-char-div\");\n }\n\n var $headerDiv = $(\"<div>\");\n $headerDiv.addClass(\"flex-item\");\n $headerDiv.text(charObj.name);\n\n var $footerDiv = $(\"<div>\");\n $footerDiv.addClass(\"flex-item\");\n $footerDiv.attr(\"id\", 'hp');\n $footerDiv.text(charObj.hp);\n\n var $imgCharacter = $(\"<img>\");\n $imgCharacter.addClass(\"img img-thumnail my-image\");\n $imgCharacter.attr(\"src\", charObj.imgSrc);\n $imgCharacter.attr(\"id\", charObj.id);\n //$imgCharacter.attr(\"hp\",charObj.hp);\n //$imgCharacter.attr(\"attackPower\",charObj.attackPower);\n //$imgCharacter.attr(\"counterAttackPower\",charObj.counterAttackPower);\n\n $imgDiv.append($headerDiv);\n $imgDiv.append($imgCharacter);\n $imgDiv.append($footerDiv);\n\n return $imgDiv;\n}", "title": "" }, { "docid": "f881b3c882313c7f5177e155e664f5e9", "score": "0.5604653", "text": "function Gomibako(){\n Chara.call(this,60,55,G_WIDTH-70,G_HEIGHT-80);\n this.image = game.assets[\"img/gomi.png\"];\n}", "title": "" }, { "docid": "e098212ce197d00990e33945cd6a799a", "score": "0.5604192", "text": "showGameComplete() {\n player.resetCharacter();\n gameProperties.soundAchievement.play();\n endPanel.style.display = 'block';\n document.removeEventListener('keyup', handleKeys);\n characterImage.setAttribute('src', `images/char-${chosenCharacter}.png`);\n }", "title": "" }, { "docid": "b8aadaf2def3ce49875549d0b512cb87", "score": "0.560242", "text": "function showImage() {\n\n var str0 = \"<strong>battle #\" + numQuestion + \"</strong><br>\" + Math.floor(finishSize * 100 / totalSize) + \"% sorted.\";\n\n var str1 = \"\" + toNameFace(lstMember[cmp1][head1]);\n\n var str2 = \"\" + toNameFace(lstMember[cmp2][head2]);\n\n\n\n document.getElementById(\"battleNumber\").innerHTML = str0;\n\n document.getElementById(\"leftField\").innerHTML = str1;\n\n document.getElementById(\"rightField\").innerHTML = str2;\n\n\n\n numQuestion++;\n\n }", "title": "" }, { "docid": "c09993406f79e6215bf7f2ea598e5b73", "score": "0.56007487", "text": "winMsg() {\r\n //noLoop();\r\n push();\r\n stroke(0);\r\n strokeWeight(5);\r\n fill(240);\r\n rect(0, height/2 - 70, width, 130);\r\n textAlign(CENTER);\r\n fill('#BE33D6');\r\n textSize(60);\r\n text(this.winGame, width/2, height/2);\r\n textSize(20);\r\n fill('#53145E');\r\n text(this.howReset, width/2, height/2 + 30);\r\n pop();\r\n }", "title": "" }, { "docid": "4ab72020503f60b319b0aed469e23ba6", "score": "0.5598804", "text": "function mouseClicked() {\n var size = random(20, 300);\n drawMyChar(mouseX, mouseY, size);\n}", "title": "" }, { "docid": "4b259ec093b3dc166b862cf6cacce5b4", "score": "0.559741", "text": "function displayFightArena () {\n //testing and debugging\n // console.log(\"defender is\", defenderName);\n // console.log(\"defender object is\",characters[defenderName])\n // console.log(\"defender source\", characters[defenderName].source)\n $(\".fightSection\").html(`\n <button id=\"attackDefender\">Attack</button>\n <img src=\"${characters[defenderName].source}\" class=\"img-responsive\" id=\"myEnemy\" data-name=\"${defenderName}\">\n `);\n}", "title": "" }, { "docid": "cbbac9e45716bcb5a2147db2c8976295", "score": "0.5589208", "text": "function genWin() {\n // ======================\n // This portion is meant to change the exp bar image and counter\n\n console.log(document.querySelector(\".expBar\"));\n expChange();\n console.log(imgUrlChooser);\n console.log(expTracker);\n document.querySelector(\".expBar\").setAttribute(\"src\", imgUrlChooser);\n console.log(document.querySelector(\".expBar\"));\n // ======================\n\n\n // ======================\n // Found in apiFetch.js and it basically is calling to see if the img being sent to the api to be analyzed\n // Then it will be spat back out into the function found in game.js called levelChecker()\n colorDetect();\n // ======================\n}", "title": "" }, { "docid": "07902063a83a036448a30d9644bc64ef", "score": "0.55817354", "text": "behavior() {\n if (this.isAlive) {\n this.displayStats();\n this.displayMonster();\n this.displayIntent();\n }\n }", "title": "" }, { "docid": "2009ce01309da70838a362d3f663159b", "score": "0.5581344", "text": "drawChr(ctx, img, chr,pos){\n // I assume that each char is a 16x16px square in a big 4096x4096px Image\n // Than I crop this image and draw in the canvas.\n var xchar = parseInt(16 * (chr % 256));\n var ychar = parseInt(16 * parseInt(chr/256));\n var charWidth = this.getCharwidthFromCharcode(chr)\n\n ctx.drawImage(img,\n xchar, ychar,\n 16, 16,\n pos[0], pos[1],\n 16, 16);\n return charWidth\n }", "title": "" }, { "docid": "c785455be4a2c595b68a8c467e6bf90b", "score": "0.5577188", "text": "redrawStatus() {\n const x = 5;\n const y = 5;\n\n this.statusCanvas.width = this.statusCanvas.width;\n\n this.statusContext.font = '30px Arial';\n this.statusContext.fillStyle = 'red';\n this.statusContext.fillText(this.name, x + 10, y + 25);\n this.statusContext.drawImage(this.healthImage, x + 10, y + 40);\n }", "title": "" }, { "docid": "4924bb09859948ede9d3f4ae59499300", "score": "0.5575146", "text": "function getCharacters(characters) {\n characters.forEach((character) => {\n showCharacter(character);\n });\n}", "title": "" }, { "docid": "99a30a1ea6919fb382ac56539dcce904", "score": "0.5549848", "text": "function updateCharacter(){\n checkImageCache(); // check if character images are preloaded in cache \n let timePassedSinceJump = new Date().getTime() - lastJumpStarted;\n calculateJumpingSequence(timePassedSinceJump);\n \n if (character_image.complete) {\n drawCharacter();\n }\n}", "title": "" }, { "docid": "64b60b4e5e8004b51d84cd218da460c7", "score": "0.55460334", "text": "function drawCharacter() {\n var centerXPixels = calculateX(state.character.location.xPos);\n var centerYPixels = calculateY(state.character.location.yPos);\n var headXPixels = centerXPixels;\n var headYPixels = centerYPixels;\n if (state.character.direction === \"right\") {\n headXPixels += 15;\n } else if (state.character.direction === \"left\") {\n headXPixels -= 15;\n } else if (state.character.direction === \"up\") {\n headYPixels -= 15;\n } else if (state.character.direction === \"down\") {\n headYPixels += 15;\n }\n ctx.beginPath();\n ctx.moveTo(centerXPixels, centerYPixels);\n ctx.lineTo(headXPixels, headYPixels);\n ctx.closePath();\n ctx.strokeStyle = ctx.fillStyle = \"red\";\n ctx.fill();\n ctx.stroke();\n }", "title": "" }, { "docid": "4fde8b160eebd445f65f72dba79e001d", "score": "0.553365", "text": "display() {\n image(treetrunkImage, this.x, this.y, this.width, this.height);\n }", "title": "" }, { "docid": "210a3bbb7826d8be0567ac21a0d53f31", "score": "0.55287087", "text": "function characterInfo() {\n\t$.get(\"../php/GMpage/characterInfo.php\", {}, insertCharacterInfo);\n}", "title": "" }, { "docid": "c9e832347989b4671ea44cc2dd4bddec", "score": "0.5528076", "text": "function statUpdate(char, LV_EXP) {\n $(\"#health\").text(\" \" + char.hp);\n if((LV_EXP[char.lv + 1] - char.exp) == 0){\n char.lv += 1;\n }\n $(\"#level\").text(\" \" + char.lv);\n $(\"#to-level\").text(\" \" + (LV_EXP[char.lv + 1] - char.exp));\n}", "title": "" }, { "docid": "10cb7b2c4e4715dba217e28920e4aa7e", "score": "0.5523051", "text": "function initCharacters () {\n var warrior1 = new Charater (\"Warrior 1\", 200, 75, 25, \"./assets/images/warrior1.jpg\");\n var warrior2 = new Charater (\"Warrior 2\", 100, 10, 5, \"./assets/images/warrior2.jpg\");\n var warrior3 = new Charater (\"Warrior 3\", 150, 30, 12, \"./assests/images/warrior3.jpg\");\n}", "title": "" }, { "docid": "992d13d2aa21694f1580c9205cb14cfe", "score": "0.55226", "text": "function render() {\n document.getElementById(\"wins\").innerHTML = \"Wins: \" + wins;\n document.getElementById(\"losses\").innerHTML = \"Losses: \" + losses;\n document.getElementById(\"youGuessed\").innerHTML = \"You Guessed: \" + letterGuessed;\n\n }", "title": "" }, { "docid": "22e7f645bda9ae92ee01c61bd35ab3e4", "score": "0.5516284", "text": "function displayGameState () {\n $(\"#battleground\").text(\"You have caused \" + userChar.appliedDamage + \" damage to your opponent, and they have caused \" + defender.baseDamage + \" to you.\")\n $(userChar.elementName).children(\".health-points\").text(userChar.health);\n $(defender.elementName).children(\".health-points\").text(defender.health);\n $(\"#wins\").text(wins);\n $(\"#losses\").text(losses);\n}", "title": "" }, { "docid": "cbb730bf3a6f877d9d94e68d0dcec8f8", "score": "0.55100054", "text": "drawDebug() {\n this.ctx.clearRect(0, 0, this.canv.width, this.canv.height);\n\n this.ctx.fillStyle = 'red';\n var w = 1;\n for (var x=0; x<this.canv.width; x += w) {\n for (var y=0; y<this.canv.height; y += w) {\n var target = getWordForPos(x, y, this.options.size, this.options.font, this.lines, this.pos);\n if (!target) {\n this.ctx.fillRect(x, y, w, w);\n }\n }\n }\n this.ctx.globalAlpha = 1;\n this.ctx.drawImage(this.img, 0, 0);\n }", "title": "" }, { "docid": "6c71ed1b2c2025829b16c1cab3edc252", "score": "0.5502761", "text": "show () {\n image(this.image, this.x, this.y, this.w, this.w)\n }", "title": "" }, { "docid": "18ae11f8175e05352b30d1ce9170cb02", "score": "0.5500142", "text": "function write_char(c) {\n // collect active classes depending on attributes\n var classes = [];\n if (cursor.reverse) {\n var tmp = cursor.foreground || 9;\n cursor.foreground = cursor.background || 0;\n cursor.background = tmp;\n classes.push('tty_foreground_' + cursor.foreground);\n classes.push('tty_background_' + cursor.background);\n } else {\n if (cursor.foreground != null) { classes.push('tty_foreground_' + cursor.foreground); }\n if (cursor.background != null) { classes.push('tty_background_' + cursor.background); }\n }\n if (cursor.bold) { classes.push('tty_bold'); }\n if (cursor.dim) { classes.push('tty_dim'); }\n if (cursor.underline) { classes.push('tty_underscore'); }\n if (cursor.blinking) { classes.push('tty_blinking'); }\n if (cursor.invisible) { classes.push('tty_invisible'); }\n\n // ensure the grid cell exists\n while (cursor.row >= screen.length) {\n screen.push([]);\n }\n var current_line = screen[cursor.row];\n while (cursor.col >= current_line.length) {\n current_line.push(empty_char);\n }\n\n // add character\n current_line[cursor.col] = {\n char: c,\n classes: classes,\n };\n cursor.col++;\n}", "title": "" }, { "docid": "17d63a9e4a68c7612e5fb47bfdd5e976", "score": "0.54974633", "text": "function displayCurrentPlayer() {\n if (win.winStatus) {\n contenitoreTris.innerHTML = `Player <strong>${win.PlayerWinnerName}</strong> with <strong>${win.whoWon}</strong> has won`\n } else if(win.tie) {\n contenitoreTris.innerHTML = 'Tie' \n } else {\n contenitoreTris.innerHTML = `It's the turn of <strong>${currentPlayer.name}</strong> with <strong>${currentPlayer.mark}</strong>`\n }\n \n }", "title": "" }, { "docid": "839e8552f0155127e316681f2b83b7a3", "score": "0.54966193", "text": "display() {\n push()\n imageMode(CENTER);\n image(this.img, this.x, this.y, this.w, this.h);\n pop()\n }", "title": "" } ]
eaa544456ac0e910352191b580e3c8ab
Generate string of CSS variables for colors
[ { "docid": "498b4069083db17e34177724073a02d6", "score": "0.0", "text": "function getThemeColors(theme) {\n\tconst varNames = [ 'main', 'h1', 'footer', 'link' ];\n\tlet colors = '';\n\tfor (let i = 0; i < varNames.length; i++) {\n\t\tconst key = varNames[i];\n\t\tconst value = theme.colors[i];\n\t\tcolors += `--${key}:${value};`;\n\t};\n\treturn colors;\n}", "title": "" } ]
[ { "docid": "2198fba439a8ddc27c470f5e30ec3417", "score": "0.73425764", "text": "get rgbString() {\n\t\tvar self = this,\n\t\t\torder = [\"red\", \"green\", \"blue\"];\n\n\t\t// BEAUTIFUL barfscript\n\t\tvar innards = order\n\t\t\t.map(key => {\n\t\t\t\treturn self[key];\n\t\t\t})\n\t\t\t.join(\", \");\n\n\t\treturn `rgb(${innards})`;\n\t}", "title": "" }, { "docid": "c38e3a81fddb1d7e36ee2076d2a65cb8", "score": "0.72448516", "text": "function cssVarsOfColorMap(mapname){\n const mapval = color[mapname];\n return Object.keys(mapval).reduce((acc, key) => {\n return acc + \"--\" + mapname + key + \": \" + mapval[key] + \";\\n\";\n }, \"\");\n}", "title": "" }, { "docid": "92d986b06b68a8eb7fdcb46b369cc4e9", "score": "0.68828756", "text": "colorString(){\n let rgbText = \"rgb(\" + this.r + \",\" + this.g + \",\" + this.b + \")\";\n return rgbText;\n }", "title": "" }, { "docid": "06c8131fb9f4bebad0349ecf12a81b96", "score": "0.6645063", "text": "get rgbaString() {\n\t\tvar self = this,\n\t\t\torder = [\"red\", \"green\", \"blue\", \"alpha\"];\n\n\t\t// BEAUTIFUL barfscript\n\t\tvar innards = order\n\t\t\t.map(key => {\n\t\t\t\treturn self[key];\n\t\t\t})\n\t\t\t.join(\", \");\n\n\t\treturn `rgba(${innards})`;\n\t}", "title": "" }, { "docid": "762dd40071df75b1e45b6d4b93363b00", "score": "0.6598846", "text": "function createCssString(){\n\n var css = '';\n\n for (var id in cssRules){\n\n css += cssRules[id];\n }\n\n return css;\n }", "title": "" }, { "docid": "c58f317f3a36d8323c3e2f77ecfbe44b", "score": "0.65836054", "text": "function rgbToCssString(r, g, b) {\n return `rgb(${r},${g},${b})`;\n}", "title": "" }, { "docid": "55d4f6cbd99806284f84362f61372839", "score": "0.6569483", "text": "colorHex_RE(){\n var color = \"\";\n for(var index=0;index<6;index++){\n color= color + this.generar_RE();\n }\n return \"#\"+color;\n }", "title": "" }, { "docid": "97200abd38ff33f6ac3cd7002d398925", "score": "0.6526086", "text": "function e(){var a=arguments,b=this.useColors;if(a[0]=(b?\"%c\":\"\")+this.namespace+(b?\" %c\":\" \")+a[0]+(b?\"%c \":\" \")+\"+\"+c.humanize(this.diff),!b)return a;var d=\"color: \"+this.color;a=[a[0],d,\"color: inherit\"].concat(Array.prototype.slice.call(a,1));\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\nvar e=0,f=0;return a[0].replace(/%[a-z%]/g,function(a){\"%%\"!==a&&(e++,\"%c\"===a&&(\n// we only are interested in the *last* %c\n// (the user may have provided their own)\nf=e))}),a.splice(f,0,d),a}", "title": "" }, { "docid": "97200abd38ff33f6ac3cd7002d398925", "score": "0.6526086", "text": "function e(){var a=arguments,b=this.useColors;if(a[0]=(b?\"%c\":\"\")+this.namespace+(b?\" %c\":\" \")+a[0]+(b?\"%c \":\" \")+\"+\"+c.humanize(this.diff),!b)return a;var d=\"color: \"+this.color;a=[a[0],d,\"color: inherit\"].concat(Array.prototype.slice.call(a,1));\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\nvar e=0,f=0;return a[0].replace(/%[a-z%]/g,function(a){\"%%\"!==a&&(e++,\"%c\"===a&&(\n// we only are interested in the *last* %c\n// (the user may have provided their own)\nf=e))}),a.splice(f,0,d),a}", "title": "" }, { "docid": "21ffa4c7e6c65942f341d800e54aff09", "score": "0.6436603", "text": "colorHex(){\r\n var color = \"\";\r\n for(var i=0; i<6; i++){\r\n color = color + this.generateCaracter();\r\n }\r\n return \"#\" + color;\r\n }", "title": "" }, { "docid": "1e27065ef3726c6c9b94174b9e418e5a", "score": "0.6392098", "text": "function css(def) {\n var pieces = [];\n for (var key in def) {\n var value = def[key];\n if (typeof value == 'string') {\n pieces.push(key + ':' + value + ';');\n } else {\n pieces.push(key + '{' + css(value) + '}');\n }\n }\n return pieces.join('');\n }", "title": "" }, { "docid": "ae5fe22078658e7d4f0dde96208d3ca9", "score": "0.63799214", "text": "function rgb() {\n return `rgb(${randomValue()}, ${randomValue()}, ${randomValue()})`;\n}", "title": "" }, { "docid": "69d3dfd0ca555a3afad82bdc8863e31d", "score": "0.63695824", "text": "function createColor () {\n function colorComponent() {\n return Math.floor(Math.random()*255 + 1);\n }\n // example: green is rgb(51,170,51)\n let color = \"rgb(\" + colorComponent()+ \",\"+ colorComponent()+ \",\"+ colorComponent()+ \")\";\n return color;\n }", "title": "" }, { "docid": "f10b064815caa0d43cde2cc1cd739b9d", "score": "0.6353943", "text": "function get_string_colors(colors)\n{\n s_colors = \"[ \";\n $.each(colors, function( index, value ) {\n s_colors += \"\\\"\"+value+\"\\\"\";\n if (index < colors.length -1)\n s_colors += \", \";\n });\n s_colors += \"]\";\n return s_colors;\n}", "title": "" }, { "docid": "afc095dca30e198d336679249aba5c7b", "score": "0.6345927", "text": "function createColorString(r,g,b) \n{\n\tvar color = \"rgb(\"+r+\", \"+g+\", \"+b+\")\";\n\treturn color;\n}", "title": "" }, { "docid": "ff67a27ba28c98e810c768b63dd50f83", "score": "0.63354063", "text": "function scssIze(name, colors, fallback) {\n\tscss =\n\t\t'<span class=\"variable\">$' +\n\t\tname +\n\t\t'-fallback</span> : <span class=\"color\">' +\n\t\tfallback +\n\t\t\"</span>; \";\n\n\t$.each(colors, function (i, color) {\n\t\tscss +=\n\t\t\t'\\n<span class=\"variable\">$' +\n\t\t\tname +\n\t\t\t\"-\" +\n\t\t\ti +\n\t\t\t'</span> : <span class=\"color\">' +\n\t\t\tcolor +\n\t\t\t\"</span>; \";\n\t});\n\n\tcss =\n\t\t'<span class=\"prop\">background</span>: <span class=\"variable\">$' +\n\t\tname +\n\t\t\"-fallback</span>;\\n\";\n\tcss +=\n\t\t'<span class=\"prop\">background-image</span>: <span class=\"function\">linear-gradient</span>(<span class=\"deg\">90deg</span>, ';\n\t$.each(colors, function (i, color) {\n\t\tcss += '<span class=\"variable\">$' + name + \"-\" + i + \"</span>, \";\n\n\t\tif (i == 9) {\n\t\t\tcss +=\n\t\t\t\t'<span class=\"variable\">$' + name + \"-\" + i + \"</span>\" + \");\";\n\t\t}\n\t});\n\n\treturn scss + \"\\n\\n\" + css;\n}", "title": "" }, { "docid": "62cf29375b6eecf6ca104c197b31fc48", "score": "0.6332437", "text": "getRandomColor(){\n return `rgb(${this.randomNumber(10, 170)}, ${this.randomNumber(10, 170)}, ${this.randomNumber(10, 170)})`\n }", "title": "" }, { "docid": "153f95057fc732cf632676d0385c18ea", "score": "0.630915", "text": "function crearCss() {\r\n h3.textContent = `linear-gradient(to right, ${color1.value}, ${color2.value});`;\r\n}", "title": "" }, { "docid": "6eccc05cc1e7aebe040ab5308696d9d2", "score": "0.62943554", "text": "function colors(specifier) {\n var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;\n while (i < n) colors[i] = \"#\" + specifier.slice(i * 6, ++i * 6);\n return colors;\n}", "title": "" }, { "docid": "97d99b6873cf58ff427c4f961ac157cc", "score": "0.62897944", "text": "function randomColor(value1, value2, value3) {\n let result = `rgb(${value1}, ${value2}, ${value3})`\n return result\n}", "title": "" }, { "docid": "62d40e100eba7125028b58bd1478bd66", "score": "0.6274868", "text": "getColour(){\n\t\tlet mult = 0.6 + Math.random()*0.4;\n\t\tlet colour = \"rgb(\"+baseColour.red*mult+\",\"+baseColour.green*mult+\",\"+baseColour.blue*mult+\")\";\n\t\treturn colour;\n\t}", "title": "" }, { "docid": "47971085adfc7fa3022ba71f712124ad", "score": "0.62525755", "text": "function rgbColorGenerator(){\r\n return `rgb(${~~(Math.random() * 256)},${~~(Math.random() * 256)},${~~(Math.random() * 256)})`\r\n}", "title": "" }, { "docid": "402914e8c8719f503f9d48f152c374a5", "score": "0.6241418", "text": "function getColor_double_variables(value,varipale_type) {\n\t\t\t\nvar style_object={\n\"pu\":function(input){\n\t return input > 100 ? '#cc0000' : \n input > 75 ? '#ff0000' :\n input > 50 ? '#ff3333' :\n input > 25 ? '#ff6666' :\n input > 0 ? '#ff9999' :\n '#FF99FF';\n\t\t},\t\t\t \n\"pe\":function(input){\t\t\t\t\t \n\t return input > 90 ? '#F203FF' : \n input > 80 ? '#C323FF' :\n input > 70 ? '#8051FF' :\n input > 60 ? '#4778FF' :\n input > 0 ? '#0D9FFF ' :\n '#FF99FF';\n\t },\n};\n\n\nreturn style_object[varipale_type](value);\n\n}", "title": "" }, { "docid": "d3cbbee8b8780c78b83101bc9c30ba57", "score": "0.62396187", "text": "static getColor(properties) {\n var color = \"\";\n \n switch(properties & ES_COLOR) {\n case EC_WHITE:\n return \"#CCDDFF\";\n case EC_L_BLUE:\n return \"#5599FF\";\n case EC_M_BLUE:\n return \"#3366FF\";\n case EC_BLUE:\n return \"#0011EE\";\n case EC_D_BLUE:\n return \"#000088\";\n case EC_YELLOW:\n return \"#CCA300\";\n case EC_ORANGE:\n return \"#CC6600\";\n case EC_RED:\n return \"#A30000\";\n default:\n break;\n }\n \n return color;\n }", "title": "" }, { "docid": "d31693d89983555dae1a5f324d6ab8d2", "score": "0.6237828", "text": "hexCssColor(r, g, b) {\n return `#${(0x1000000 | (b | (g << 8) | (r << 16)))\n .toString(16)\n .slice(-6)}`\n }", "title": "" }, { "docid": "fa4efb26ac4270ce3c26ff76af00c12b", "score": "0.6225304", "text": "function getColor()\n{ // reduce letter choices for a different palate\n let letters = '0123456789ABCDEF'.split('');\n let color = '#';\n for( let i=0; i<3; i++ )\n {\n color += letters[Math.floor(Math.random() * letters.length)];\n }\n return color;\n}", "title": "" }, { "docid": "db8be3e4d026d3d4ca95d933f9f0f8c4", "score": "0.6205131", "text": "function color(){\n let r = Math.floor(Math.random() * 256);\n redCol = r;\n let g = Math.floor(Math.random() * 256)\n greenCol= g;\n let b = Math.floor(Math.random() * 256)\n blueCol = b;\n let col = \"RGB(\" + r + \", \" + g + \", \" + b + \")\"\n return col; \n}", "title": "" }, { "docid": "e2a40e6693cbc49e018d9c23c91abd2b", "score": "0.6204048", "text": "generateColor() {\n var letters = '0123456789ABCDEF';\n var color = '#';\n for (var i = 0; i < 6; i++) {\n color += letters[Math.floor(Math.random() * 16)];\n }\n return color;\n }", "title": "" }, { "docid": "62293823c649497e208d1d85c6c2e84f", "score": "0.61991626", "text": "function randomcolor(){\n var sign = \"0123456789ABCDEF\";\n var component = \"#\";\n var i;\n for (var i=0; i<6 ; i++) {\n component += sign[Math.floor(Math.random()*15)];\n }\n return component;\n }", "title": "" }, { "docid": "fc930fada94415e662700368d77edae5", "score": "0.61894554", "text": "function _named(str) {\n var c = _colorValues__WEBPACK_IMPORTED_MODULE_1__[\"COLOR_VALUES\"][str.toLowerCase()];\n\n if (c) {\n return {\n r: c[0],\n g: c[1],\n b: c[2],\n a: MAX_COLOR_ALPHA\n };\n }\n}", "title": "" }, { "docid": "d1bb82cacbfc1413dede45c350b75c15", "score": "0.61765736", "text": "function SetColor() {\n let color = 'rgb( ' + RandomColor() +', ' + RandomColor() + ', ' + RandomColor() + ' )';\n return color;\n}", "title": "" }, { "docid": "2d9310fa779f8e416702b78ef892439e", "score": "0.61578697", "text": "function colourise (str, colour) {\n return colour + str + colours.default;\n}", "title": "" }, { "docid": "2c12c7a9e9041dba227baf731e85b0af", "score": "0.6129189", "text": "function getColor() {\n var rgb = [];\n for (var i = 0; i < 3; i++) {\n rgb[i] = Math.round(100 * Math.random() + 155) ; // [155-255] = lighter colors\n }\n return 'rgb(' + rgb.join(',') + ')';\n }", "title": "" }, { "docid": "bd2a77bb39498bcdb3c9f808565f8695", "score": "0.6128887", "text": "function RGBColor(t){this.ok=!1,\"#\"==t.charAt(0)&&(t=t.substr(1,6)),t=t.replace(/ /g,\"\"),t=t.toLowerCase();var e={aliceblue:\"f0f8ff\",antiquewhite:\"faebd7\",aqua:\"00ffff\",aquamarine:\"7fffd4\",azure:\"f0ffff\",beige:\"f5f5dc\",bisque:\"ffe4c4\",black:\"000000\",blanchedalmond:\"ffebcd\",blue:\"0000ff\",blueviolet:\"8a2be2\",brown:\"a52a2a\",burlywood:\"deb887\",cadetblue:\"5f9ea0\",chartreuse:\"7fff00\",chocolate:\"d2691e\",coral:\"ff7f50\",cornflowerblue:\"6495ed\",cornsilk:\"fff8dc\",crimson:\"dc143c\",cyan:\"00ffff\",darkblue:\"00008b\",darkcyan:\"008b8b\",darkgoldenrod:\"b8860b\",darkgray:\"a9a9a9\",darkgreen:\"006400\",darkkhaki:\"bdb76b\",darkmagenta:\"8b008b\",darkolivegreen:\"556b2f\",darkorange:\"ff8c00\",darkorchid:\"9932cc\",darkred:\"8b0000\",darksalmon:\"e9967a\",darkseagreen:\"8fbc8f\",darkslateblue:\"483d8b\",darkslategray:\"2f4f4f\",darkturquoise:\"00ced1\",darkviolet:\"9400d3\",deeppink:\"ff1493\",deepskyblue:\"00bfff\",dimgray:\"696969\",dodgerblue:\"1e90ff\",feldspar:\"d19275\",firebrick:\"b22222\",floralwhite:\"fffaf0\",forestgreen:\"228b22\",fuchsia:\"ff00ff\",gainsboro:\"dcdcdc\",ghostwhite:\"f8f8ff\",gold:\"ffd700\",goldenrod:\"daa520\",gray:\"808080\",green:\"008000\",greenyellow:\"adff2f\",honeydew:\"f0fff0\",hotpink:\"ff69b4\",indianred:\"cd5c5c\",indigo:\"4b0082\",ivory:\"fffff0\",khaki:\"f0e68c\",lavender:\"e6e6fa\",lavenderblush:\"fff0f5\",lawngreen:\"7cfc00\",lemonchiffon:\"fffacd\",lightblue:\"add8e6\",lightcoral:\"f08080\",lightcyan:\"e0ffff\",lightgoldenrodyellow:\"fafad2\",lightgrey:\"d3d3d3\",lightgreen:\"90ee90\",lightpink:\"ffb6c1\",lightsalmon:\"ffa07a\",lightseagreen:\"20b2aa\",lightskyblue:\"87cefa\",lightslateblue:\"8470ff\",lightslategray:\"778899\",lightsteelblue:\"b0c4de\",lightyellow:\"ffffe0\",lime:\"00ff00\",limegreen:\"32cd32\",linen:\"faf0e6\",magenta:\"ff00ff\",maroon:\"800000\",mediumaquamarine:\"66cdaa\",mediumblue:\"0000cd\",mediumorchid:\"ba55d3\",mediumpurple:\"9370d8\",mediumseagreen:\"3cb371\",mediumslateblue:\"7b68ee\",mediumspringgreen:\"00fa9a\",mediumturquoise:\"48d1cc\",mediumvioletred:\"c71585\",midnightblue:\"191970\",mintcream:\"f5fffa\",mistyrose:\"ffe4e1\",moccasin:\"ffe4b5\",navajowhite:\"ffdead\",navy:\"000080\",oldlace:\"fdf5e6\",olive:\"808000\",olivedrab:\"6b8e23\",orange:\"ffa500\",orangered:\"ff4500\",orchid:\"da70d6\",palegoldenrod:\"eee8aa\",palegreen:\"98fb98\",paleturquoise:\"afeeee\",palevioletred:\"d87093\",papayawhip:\"ffefd5\",peachpuff:\"ffdab9\",peru:\"cd853f\",pink:\"ffc0cb\",plum:\"dda0dd\",powderblue:\"b0e0e6\",purple:\"800080\",red:\"ff0000\",rosybrown:\"bc8f8f\",royalblue:\"4169e1\",saddlebrown:\"8b4513\",salmon:\"fa8072\",sandybrown:\"f4a460\",seagreen:\"2e8b57\",seashell:\"fff5ee\",sienna:\"a0522d\",silver:\"c0c0c0\",skyblue:\"87ceeb\",slateblue:\"6a5acd\",slategray:\"708090\",snow:\"fffafa\",springgreen:\"00ff7f\",steelblue:\"4682b4\",tan:\"d2b48c\",teal:\"008080\",thistle:\"d8bfd8\",tomato:\"ff6347\",turquoise:\"40e0d0\",violet:\"ee82ee\",violetred:\"d02090\",wheat:\"f5deb3\",white:\"ffffff\",whitesmoke:\"f5f5f5\",yellow:\"ffff00\",yellowgreen:\"9acd32\"};for(var A in e)t==A&&(t=e[A]);for(var n=[{re:/^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,example:[\"rgb(123, 234, 45)\",\"rgb(255,234,245)\"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^(\\w{2})(\\w{2})(\\w{2})$/,example:[\"#00ff00\",\"336699\"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\\w{1})(\\w{1})(\\w{1})$/,example:[\"#fb0\",\"f0f\"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],i=0;i<n.length;i++){var r=n[i].re,s=n[i].process,o=r.exec(t);o&&(channels=s(o),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return\"rgb(\"+this.r+\", \"+this.g+\", \"+this.b+\")\"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),A=this.b.toString(16);return 1==t.length&&(t=\"0\"+t),1==e.length&&(e=\"0\"+e),1==A.length&&(A=\"0\"+A),\"#\"+t+e+A},this.getHelpXML=function(){for(var t=new Array,A=0;A<n.length;A++)for(var i=n[A].example,r=0;r<i.length;r++)t[t.length]=i[r];for(var s in e)t[t.length]=s;var o=document.createElement(\"ul\");o.setAttribute(\"id\",\"rgbcolor-examples\");for(var A=0;A<t.length;A++)try{var a=document.createElement(\"li\"),c=new RGBColor(t[A]),l=document.createElement(\"div\");l.style.cssText=\"margin: 3px; border: 1px solid black; background:\"+c.toHex()+\"; color:\"+c.toHex(),l.appendChild(document.createTextNode(\"test\"));var u=document.createTextNode(\" \"+t[A]+\" -> \"+c.toRGB()+\" -> \"+c.toHex());a.appendChild(l),a.appendChild(u),o.appendChild(a)}catch(h){}return o}}", "title": "" }, { "docid": "bd2a77bb39498bcdb3c9f808565f8695", "score": "0.6128887", "text": "function RGBColor(t){this.ok=!1,\"#\"==t.charAt(0)&&(t=t.substr(1,6)),t=t.replace(/ /g,\"\"),t=t.toLowerCase();var e={aliceblue:\"f0f8ff\",antiquewhite:\"faebd7\",aqua:\"00ffff\",aquamarine:\"7fffd4\",azure:\"f0ffff\",beige:\"f5f5dc\",bisque:\"ffe4c4\",black:\"000000\",blanchedalmond:\"ffebcd\",blue:\"0000ff\",blueviolet:\"8a2be2\",brown:\"a52a2a\",burlywood:\"deb887\",cadetblue:\"5f9ea0\",chartreuse:\"7fff00\",chocolate:\"d2691e\",coral:\"ff7f50\",cornflowerblue:\"6495ed\",cornsilk:\"fff8dc\",crimson:\"dc143c\",cyan:\"00ffff\",darkblue:\"00008b\",darkcyan:\"008b8b\",darkgoldenrod:\"b8860b\",darkgray:\"a9a9a9\",darkgreen:\"006400\",darkkhaki:\"bdb76b\",darkmagenta:\"8b008b\",darkolivegreen:\"556b2f\",darkorange:\"ff8c00\",darkorchid:\"9932cc\",darkred:\"8b0000\",darksalmon:\"e9967a\",darkseagreen:\"8fbc8f\",darkslateblue:\"483d8b\",darkslategray:\"2f4f4f\",darkturquoise:\"00ced1\",darkviolet:\"9400d3\",deeppink:\"ff1493\",deepskyblue:\"00bfff\",dimgray:\"696969\",dodgerblue:\"1e90ff\",feldspar:\"d19275\",firebrick:\"b22222\",floralwhite:\"fffaf0\",forestgreen:\"228b22\",fuchsia:\"ff00ff\",gainsboro:\"dcdcdc\",ghostwhite:\"f8f8ff\",gold:\"ffd700\",goldenrod:\"daa520\",gray:\"808080\",green:\"008000\",greenyellow:\"adff2f\",honeydew:\"f0fff0\",hotpink:\"ff69b4\",indianred:\"cd5c5c\",indigo:\"4b0082\",ivory:\"fffff0\",khaki:\"f0e68c\",lavender:\"e6e6fa\",lavenderblush:\"fff0f5\",lawngreen:\"7cfc00\",lemonchiffon:\"fffacd\",lightblue:\"add8e6\",lightcoral:\"f08080\",lightcyan:\"e0ffff\",lightgoldenrodyellow:\"fafad2\",lightgrey:\"d3d3d3\",lightgreen:\"90ee90\",lightpink:\"ffb6c1\",lightsalmon:\"ffa07a\",lightseagreen:\"20b2aa\",lightskyblue:\"87cefa\",lightslateblue:\"8470ff\",lightslategray:\"778899\",lightsteelblue:\"b0c4de\",lightyellow:\"ffffe0\",lime:\"00ff00\",limegreen:\"32cd32\",linen:\"faf0e6\",magenta:\"ff00ff\",maroon:\"800000\",mediumaquamarine:\"66cdaa\",mediumblue:\"0000cd\",mediumorchid:\"ba55d3\",mediumpurple:\"9370d8\",mediumseagreen:\"3cb371\",mediumslateblue:\"7b68ee\",mediumspringgreen:\"00fa9a\",mediumturquoise:\"48d1cc\",mediumvioletred:\"c71585\",midnightblue:\"191970\",mintcream:\"f5fffa\",mistyrose:\"ffe4e1\",moccasin:\"ffe4b5\",navajowhite:\"ffdead\",navy:\"000080\",oldlace:\"fdf5e6\",olive:\"808000\",olivedrab:\"6b8e23\",orange:\"ffa500\",orangered:\"ff4500\",orchid:\"da70d6\",palegoldenrod:\"eee8aa\",palegreen:\"98fb98\",paleturquoise:\"afeeee\",palevioletred:\"d87093\",papayawhip:\"ffefd5\",peachpuff:\"ffdab9\",peru:\"cd853f\",pink:\"ffc0cb\",plum:\"dda0dd\",powderblue:\"b0e0e6\",purple:\"800080\",red:\"ff0000\",rosybrown:\"bc8f8f\",royalblue:\"4169e1\",saddlebrown:\"8b4513\",salmon:\"fa8072\",sandybrown:\"f4a460\",seagreen:\"2e8b57\",seashell:\"fff5ee\",sienna:\"a0522d\",silver:\"c0c0c0\",skyblue:\"87ceeb\",slateblue:\"6a5acd\",slategray:\"708090\",snow:\"fffafa\",springgreen:\"00ff7f\",steelblue:\"4682b4\",tan:\"d2b48c\",teal:\"008080\",thistle:\"d8bfd8\",tomato:\"ff6347\",turquoise:\"40e0d0\",violet:\"ee82ee\",violetred:\"d02090\",wheat:\"f5deb3\",white:\"ffffff\",whitesmoke:\"f5f5f5\",yellow:\"ffff00\",yellowgreen:\"9acd32\"};for(var A in e)t==A&&(t=e[A]);for(var n=[{re:/^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,example:[\"rgb(123, 234, 45)\",\"rgb(255,234,245)\"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^(\\w{2})(\\w{2})(\\w{2})$/,example:[\"#00ff00\",\"336699\"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\\w{1})(\\w{1})(\\w{1})$/,example:[\"#fb0\",\"f0f\"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],i=0;i<n.length;i++){var r=n[i].re,s=n[i].process,o=r.exec(t);o&&(channels=s(o),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return\"rgb(\"+this.r+\", \"+this.g+\", \"+this.b+\")\"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),A=this.b.toString(16);return 1==t.length&&(t=\"0\"+t),1==e.length&&(e=\"0\"+e),1==A.length&&(A=\"0\"+A),\"#\"+t+e+A},this.getHelpXML=function(){for(var t=new Array,A=0;A<n.length;A++)for(var i=n[A].example,r=0;r<i.length;r++)t[t.length]=i[r];for(var s in e)t[t.length]=s;var o=document.createElement(\"ul\");o.setAttribute(\"id\",\"rgbcolor-examples\");for(var A=0;A<t.length;A++)try{var a=document.createElement(\"li\"),c=new RGBColor(t[A]),l=document.createElement(\"div\");l.style.cssText=\"margin: 3px; border: 1px solid black; background:\"+c.toHex()+\"; color:\"+c.toHex(),l.appendChild(document.createTextNode(\"test\"));var u=document.createTextNode(\" \"+t[A]+\" -> \"+c.toRGB()+\" -> \"+c.toHex());a.appendChild(l),a.appendChild(u),o.appendChild(a)}catch(h){}return o}}", "title": "" }, { "docid": "08ede8210f314b2c6be3d010678bb763", "score": "0.6127342", "text": "function rgb() {\n return `rgb(${guess()}, ${guess()}, ${guess()})`\n}", "title": "" }, { "docid": "b5498ef4e742f0056e5db4e7e0188b1b", "score": "0.6117912", "text": "function e$3(t){return `rgb(${t.slice(0,3).toString()})`}", "title": "" }, { "docid": "ac1a7f54211efc4ccf340a59519c3ccb", "score": "0.61149555", "text": "function get_color(cookies){\n let color;\n if(cookies){\n let i = cookies.search('color=');\n if(i > 0){\n color = cookies.slice(i+6);\n i = color.search(';');\n if(i > 0)\n color = color.substring(0, i);\n }\n }\n if(!color || !is_valid_color(color))\n color = 'ffffff';\n \n return color;\n }", "title": "" }, { "docid": "b9074c55ac049db97297df5f744a680c", "score": "0.6107602", "text": "function getBgColors() {\n\tconst spans = document.getElementsByName(\"spanBGColor\");\n\tvar result = \"\";\n\tif (spans) {\n\t\tfor (let i = 0; i < spans.length; i++) {\n\t\t\tresult += `,${escape(spans[i].getElementsByTagName('input')[0].value.trim())}`;\n\t\t}\n\t\tresult = `&${ConfigurationModel.FillBackgroundColor}=${result.substr(1)}`;\n\t}\n\treturn result;\n}", "title": "" }, { "docid": "3ee0180a54e8a5803d7abdd35658da36", "score": "0.610528", "text": "toStringHexRGB() {\n return \"#\" + [this.r, this.g, this.b].map(this.formatHexValue).join(\"\");\n }", "title": "" }, { "docid": "97a30357fd0f52e14727301acacebf26", "score": "0.61012846", "text": "toString()\n {\n const r = this._pad(this.color[0].toString(16), \"0\", 2);\n const g = this._pad(this.color[1].toString(16), \"0\", 2);\n const b = this._pad(this.color[2].toString(16), \"0\", 2);\n\n return \"#\" + r + g + b;\n }", "title": "" }, { "docid": "07092f1117507aeff81920a6a7f5e784", "score": "0.6100672", "text": "get colorHex() {\n return `#${this.color.toString(16).padStart(6, '0')}`;\n }", "title": "" }, { "docid": "2ad643294d7e05ee7e692989659d7bf8", "score": "0.60999405", "text": "function getColour() {\n\tvar digit;\n\tvar colour = \"\";\n\tvar tempNow = now;\n\n\t// Finds the modulus of the last 2 digits and 16 to get a hex value\n\t// then adds the hex digit to the colour string,\n\t// and divides by 10 to get the next digit\n\tfor (var i = 0; i < 6; i++) {\n\t\tdigit = getHex(tempNow % 16)\n\t\tcolour = digit + colour;\n\t\ttempNow = Math.floor(tempNow/10);\n\n\t}\n\n\treturn \"#\" + colour\n}", "title": "" }, { "docid": "ad240dc16c6f88cd7c7554c0623814b5", "score": "0.6088548", "text": "function cssStringGenerator(selector, value) {}", "title": "" }, { "docid": "2d571ea4d21bed9b2e3c5ede65ca4dd4", "score": "0.60767275", "text": "function cssToStr(cssProps){var statements=[];$.each(cssProps,function(name,val){if(val!=null){statements.push(name+':'+val);}});return statements.join(';');}", "title": "" }, { "docid": "9585bec3d1c0529440df79d1001fc725", "score": "0.60737556", "text": "static randomColor() {\n return [\n \"#\",\n MockFactory.randomColorSegment(),\n MockFactory.randomColorSegment(),\n MockFactory.randomColorSegment(),\n ].join(\"\");\n }", "title": "" }, { "docid": "7d52fe391bc09d1df33286c45f35a7f3", "score": "0.6062286", "text": "function cssToStr(cssProps){var statements=[];$.each(cssProps,function(name,val){if(val != null){statements.push(name + ':' + val);}});return statements.join(';');} // Given an object hash of HTML attribute names to values,", "title": "" }, { "docid": "18fd2c57a27965117d96111ee78aa2a6", "score": "0.6053028", "text": "generateColor() {\n return (\n \"#\" +\n Math.random()\n .toString(16)\n .substr(-6)\n );\n }", "title": "" }, { "docid": "cc7eb86ebc2bfb380ce24560a98d6c00", "score": "0.6048229", "text": "formatColor(ary) {\n return 'rgb(' + ary.join(', ') + ')';\n }", "title": "" }, { "docid": "f5c2f7a8d255336f0456e58c42672922", "score": "0.6044928", "text": "function cssRule(literals) {\r\n var placeholders = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n placeholders[_i - 1] = arguments[_i];\r\n }\r\n var result = '';\r\n for (var i = 0; i < placeholders.length; i++) {\r\n result += literals[i];\r\n var placeholder = placeholders[i];\r\n if (placeholder === null) {\r\n result += 'transparent';\r\n }\r\n else {\r\n result += placeholder.toString();\r\n }\r\n }\r\n result += literals[literals.length - 1];\r\n return result;\r\n }", "title": "" }, { "docid": "0d09c1bcc398c1c61fdb88be4dc76c62", "score": "0.6032459", "text": "function colorString_(val){\n if (val==\"FAIL\"){\n var temp=' style=\"color:red\" '\n }else{\n temp=' style=\"color:green\" ';\n }\n return temp;\n }", "title": "" }, { "docid": "f5dcbf8641e72fcd0ef985225b52e705", "score": "0.6027197", "text": "function getColor(colors) {\n let strcolor='';\n if (colors.colorOne!=null) {\n strcolor+= `<button class=\"${colors.colorOne}\"></button>`;\n }\n if (colors.colorTwo!=null) {\n strcolor+= `<button class=\"${colors.colorTwo}\"></button>`;\n }\n if (colors.colorThree!=null) {\n strcolor+= `<button class=\"${colors.colorThree}\"></button>`;\n }\n return strcolor;\n}", "title": "" }, { "docid": "80a94c931ce89e7a91295a051f061e39", "score": "0.60207486", "text": "static getRandomColor() {\r\n const letters = \"0123456789ABCDEF\";\r\n let color = \"#\";\r\n for (let i = 0; i < 6; i++) {\r\n color += letters[Math.floor(Math.random() * 16)];\r\n }\r\n return color;\r\n }", "title": "" }, { "docid": "a6827dfad71db7f28fe68578a5e0f580", "score": "0.600626", "text": "function randomColorString() {\n\treturn \"#\"+((1<<24)*Math.random()|0).toString(16);\n}", "title": "" }, { "docid": "f75310e79c7a5c21190fe8394e9fcb89", "score": "0.600024", "text": "function cssToStr(cssProps) {\r\n var statements = [];\r\n $.each(cssProps, function (name, val) {\r\n if (val != null) {\r\n statements.push(name + ':' + val);\r\n }\r\n });\r\n return statements.join(';');\r\n}", "title": "" }, { "docid": "c835b6b122aaa0c753c69f0f1730c7f1", "score": "0.5988769", "text": "get color() {\n return 0x444444;\n }", "title": "" }, { "docid": "141724959a2aba9dd741a38ac149659a", "score": "0.5979302", "text": "function getColor() {\n\tvar r = rand255();\n\tvar g = rand255();\n\tvar b = rand255();\n\treturn 'rgb(' + [r,g,b].join(',') +')';\n}", "title": "" }, { "docid": "b0304419622ea31ec820619beaa61877", "score": "0.5979198", "text": "function randomColor() {\n var color = 'rgb(';\n color += randomRGB() = ',';\n color += randomRGB() = ',';\n color += randomRGB() = ')';\n return color;\n}", "title": "" }, { "docid": "93a45a44b9611812f093fa2537c1afcf", "score": "0.59625477", "text": "function getColor() {\n return '#' + Math.random().toString(16).substr(-6);\n }", "title": "" }, { "docid": "72ebcf1a28f1747df475161a4fd83967", "score": "0.5957929", "text": "function cssToStr(cssProps) {\n var statements = [];\n $.each(cssProps, function (name, val) {\n if (val != null) {\n statements.push(name + ':' + val);\n }\n });\n return statements.join(';');\n}", "title": "" }, { "docid": "72ebcf1a28f1747df475161a4fd83967", "score": "0.5957929", "text": "function cssToStr(cssProps) {\n var statements = [];\n $.each(cssProps, function (name, val) {\n if (val != null) {\n statements.push(name + ':' + val);\n }\n });\n return statements.join(';');\n}", "title": "" }, { "docid": "6a33aba650ec2d274788c6ad6f664f7f", "score": "0.5950177", "text": "neatenColor (colorArray) {\r\n return \"RGB: \" + colorArray.join(\", \"); \r\n }", "title": "" }, { "docid": "afcbca8e1f1fbce502f111326eddc1cc", "score": "0.5946246", "text": "get cssText(){\n\t\tvar properties = [];\n\t\tfor (var i=0, length=this.length; i < length; ++i) {\n\t\t\tvar name = this[i];\n\t\t\tvar value = this.getPropertyValue(name);\n\t\t\tvar priority = this.getPropertyPriority(name);\n\t\t\tif (priority) {\n\t\t\t\tpriority = \" !\" + priority;\n\t\t\t}\n\t\t\tproperties[i] = name + \": \" + value + priority + \";\";\n\t\t}\n\t\treturn properties.join(\" \");\n\t}", "title": "" }, { "docid": "afcbca8e1f1fbce502f111326eddc1cc", "score": "0.5946246", "text": "get cssText(){\n\t\tvar properties = [];\n\t\tfor (var i=0, length=this.length; i < length; ++i) {\n\t\t\tvar name = this[i];\n\t\t\tvar value = this.getPropertyValue(name);\n\t\t\tvar priority = this.getPropertyPriority(name);\n\t\t\tif (priority) {\n\t\t\t\tpriority = \" !\" + priority;\n\t\t\t}\n\t\t\tproperties[i] = name + \": \" + value + priority + \";\";\n\t\t}\n\t\treturn properties.join(\" \");\n\t}", "title": "" }, { "docid": "afcbca8e1f1fbce502f111326eddc1cc", "score": "0.5946246", "text": "get cssText(){\n\t\tvar properties = [];\n\t\tfor (var i=0, length=this.length; i < length; ++i) {\n\t\t\tvar name = this[i];\n\t\t\tvar value = this.getPropertyValue(name);\n\t\t\tvar priority = this.getPropertyPriority(name);\n\t\t\tif (priority) {\n\t\t\t\tpriority = \" !\" + priority;\n\t\t\t}\n\t\t\tproperties[i] = name + \": \" + value + priority + \";\";\n\t\t}\n\t\treturn properties.join(\" \");\n\t}", "title": "" }, { "docid": "b69afa55d0dce866296b71d21082ff89", "score": "0.594426", "text": "function colorRandomizer() {\n \n// Here i generate random values for each RGB parameter between 0 & 256\n \nlet R = Math.round(Math.random()*256);\nlet G= Math.round(Math.random()*256);\nlet B= Math.round(Math.random()*256) ;\n \n//Here i convert the RGB values to HEX, Base 16\n \nR= R.toString(16);\nG= G.toString(16);\nB= B.toString(16); \nlet newColor =\"#\" + R + G +B;\n \n return newColor;\n \n}", "title": "" }, { "docid": "36e292027865f93d6cf4d8c5f9da3e09", "score": "0.5943406", "text": "innerRGB() {\n const { r, g, b } = this;\n return `${r}, ${g}, ${b}`;\n }", "title": "" }, { "docid": "77a6152d906d0cc8be43cc533a6e827c", "score": "0.5929025", "text": "static getRandomColor() {\n let letters = '0123456789ABCDEF';\n let color = '#';\n for (let i = 0; i < 6; i++) {\n color += letters[Math.floor(Math.random() * 16)];\n }\n return color;\n }", "title": "" }, { "docid": "9d2bbb2234ac4025c6c491c301ebe25a", "score": "0.5926616", "text": "function RGBColor(a) {\r\n this.ok = !1;\r\n \"#\" == a.charAt(0) && (a = a.substr(1, 6));\r\n a = a.replace(/ /g, \"\");\r\n a = a.toLowerCase();\r\n var b = {\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 c;\r\n for (c in b) a == c && (a = b[c]);\r\n b = [{ re: /^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/, example: [\"rgb(123, 234, 45)\", \"rgb(255,234,245)\"], process: function(a) {\r\n return [parseInt(a[1], 10), parseInt(a[2], 10), parseInt(a[3], 10)] } }, {\r\n re: /^(\\w{2})(\\w{2})(\\w{2})$/,\r\n example: [\"#00ff00\", \"336699\"],\r\n process: function(a) {\r\n return [parseInt(a[1], 16), parseInt(a[2], 16), parseInt(a[3], 16)] }\r\n }, { re: /^(\\w{1})(\\w{1})(\\w{1})$/, example: [\"#fb0\", \"f0f\"], process: function(a) {\r\n return [parseInt(a[1] + a[1], 16), parseInt(a[2] + a[2], 16), parseInt(a[3] + a[3], 16)] } }];\r\n for (c = 0; c < b.length; c++) {\r\n var d = b[c].process,\r\n e = b[c].re.exec(a);\r\n e && (channels = d(e), this.r = channels[0], this.g = channels[1], this.b = channels[2], this.ok = !0) }\r\n this.cleanupRGB = function() {\r\n this.r = 0 > this.r || isNaN(this.r) ? 0 : 255 < this.r ? 255 : this.r;\r\n this.g =\r\n 0 > this.g || isNaN(this.g) ? 0 : 255 < this.g ? 255 : this.g;\r\n this.b = 0 > this.b || isNaN(this.b) ? 0 : 255 < this.b ? 255 : this.b\r\n };\r\n this.cleanupRGB();\r\n this.toRGB = function() {\r\n return \"rgb(\" + this.r + \", \" + this.g + \", \" + this.b + \")\" };\r\n this.toHex = function() {\r\n var a = this.r.toString(16),\r\n b = this.g.toString(16),\r\n c = this.b.toString(16);\r\n 1 == a.length && (a = \"0\" + a);\r\n 1 == b.length && (b = \"0\" + b);\r\n 1 == c.length && (c = \"0\" + c);\r\n return \"#\" + a + b + c };\r\n this.grayChannel = function() {\r\n var a = [0.199, 0.687, 0.114];\r\n return a[0] * this.r + a[1] * this.g + a[2] * this.b };\r\n this.blackWhiteContrast = function() {\r\n return 150 >\r\n this.grayChannel() ? \"white\" : \"black\"\r\n };\r\n this.darken = function(a) {\r\n var b = TradingView.rgbToHsl(this.r, this.g, this.b);\r\n a = TradingView.hslToRgb(b[0], b[1], b[2] - a / 100);\r\n this.r = a[0];\r\n this.g = a[1];\r\n this.b = a[2];\r\n this.cleanupRGB();\r\n return this }\r\n}", "title": "" }, { "docid": "c9db5a74eaa43f455a6e9e6a528cdbbf", "score": "0.59058446", "text": "prefixed (prop, prefix) {\n return prefix + 'print-color-adjust'\n }", "title": "" }, { "docid": "da8e9c838932fc52643def30a55368cf", "score": "0.58978844", "text": "function RGBColor(c){this.ok=!1;\"#\"==c.charAt(0)&&(c=c.substr(1,6));c=c.replace(/0x/,\"\");c=c.replace(/ /g,\"\");c=c.toLowerCase();var g={aliceblue:\"f0f8ff\",antiquewhite:\"faebd7\",aqua:\"00ffff\",aquamarine:\"7fffd4\",azure:\"f0ffff\",beige:\"f5f5dc\",bisque:\"ffe4c4\",black:\"000000\",blanchedalmond:\"ffebcd\",blue:\"0000ff\",blueviolet:\"8a2be2\",brown:\"a52a2a\",burlywood:\"deb887\",cadetblue:\"5f9ea0\",chartreuse:\"7fff00\",chocolate:\"d2691e\",coral:\"ff7f50\",cornflowerblue:\"6495ed\",cornsilk:\"fff8dc\",crimson:\"dc143c\",cyan:\"00ffff\",\ndarkblue:\"00008b\",darkcyan:\"008b8b\",darkgoldenrod:\"b8860b\",darkgray:\"a9a9a9\",darkgreen:\"006400\",darkkhaki:\"bdb76b\",darkmagenta:\"8b008b\",darkolivegreen:\"556b2f\",darkorange:\"ff8c00\",darkorchid:\"9932cc\",darkred:\"8b0000\",darksalmon:\"e9967a\",darkseagreen:\"8fbc8f\",darkslateblue:\"483d8b\",darkslategray:\"2f4f4f\",darkturquoise:\"00ced1\",darkviolet:\"9400d3\",deeppink:\"ff1493\",deepskyblue:\"00bfff\",dimgray:\"696969\",dodgerblue:\"1e90ff\",feldspar:\"d19275\",firebrick:\"b22222\",floralwhite:\"fffaf0\",forestgreen:\"228b22\",\nfuchsia:\"ff00ff\",gainsboro:\"dcdcdc\",ghostwhite:\"f8f8ff\",gold:\"ffd700\",goldenrod:\"daa520\",gray:\"808080\",green:\"008000\",greenyellow:\"adff2f\",honeydew:\"f0fff0\",hotpink:\"ff69b4\",indianred:\"cd5c5c\",indigo:\"4b0082\",ivory:\"fffff0\",khaki:\"f0e68c\",lavender:\"e6e6fa\",lavenderblush:\"fff0f5\",lawngreen:\"7cfc00\",lemonchiffon:\"fffacd\",lightblue:\"add8e6\",lightcoral:\"f08080\",lightcyan:\"e0ffff\",lightgoldenrodyellow:\"fafad2\",lightgrey:\"d3d3d3\",lightgreen:\"90ee90\",lightpink:\"ffb6c1\",lightsalmon:\"ffa07a\",lightseagreen:\"20b2aa\",\nlightskyblue:\"87cefa\",lightslateblue:\"8470ff\",lightslategray:\"778899\",lightsteelblue:\"b0c4de\",lightyellow:\"ffffe0\",lime:\"00ff00\",limegreen:\"32cd32\",linen:\"faf0e6\",magenta:\"ff00ff\",maroon:\"800000\",mediumaquamarine:\"66cdaa\",mediumblue:\"0000cd\",mediumorchid:\"ba55d3\",mediumpurple:\"9370d8\",mediumseagreen:\"3cb371\",mediumslateblue:\"7b68ee\",mediumspringgreen:\"00fa9a\",mediumturquoise:\"48d1cc\",mediumvioletred:\"c71585\",midnightblue:\"191970\",mintcream:\"f5fffa\",mistyrose:\"ffe4e1\",moccasin:\"ffe4b5\",navajowhite:\"ffdead\",\nnavy:\"000080\",oldlace:\"fdf5e6\",olive:\"808000\",olivedrab:\"6b8e23\",orange:\"ffa500\",orangered:\"ff4500\",orchid:\"da70d6\",palegoldenrod:\"eee8aa\",palegreen:\"98fb98\",paleturquoise:\"afeeee\",palevioletred:\"d87093\",papayawhip:\"ffefd5\",peachpuff:\"ffdab9\",peru:\"cd853f\",pink:\"ffc0cb\",plum:\"dda0dd\",powderblue:\"b0e0e6\",purple:\"800080\",red:\"ff0000\",rosybrown:\"bc8f8f\",royalblue:\"4169e1\",saddlebrown:\"8b4513\",salmon:\"fa8072\",sandybrown:\"f4a460\",seagreen:\"2e8b57\",seashell:\"fff5ee\",sienna:\"a0522d\",silver:\"c0c0c0\",skyblue:\"87ceeb\",\nslateblue:\"6a5acd\",slategray:\"708090\",snow:\"fffafa\",springgreen:\"00ff7f\",steelblue:\"4682b4\",tan:\"d2b48c\",teal:\"008080\",thistle:\"d8bfd8\",tomato:\"ff6347\",turquoise:\"40e0d0\",violet:\"ee82ee\",violetred:\"d02090\",wheat:\"f5deb3\",white:\"ffffff\",whitesmoke:\"f5f5f5\",yellow:\"ffff00\",yellowgreen:\"9acd32\"},f;for(f in g)c==f&&(c=g[f]);var l=[{re:/^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,example:[\"rgb(123, 234, 45)\",\"rgb(255,234,245)\"],process:function(c){return[parseInt(c[1]),parseInt(c[2]),parseInt(c[3])]}},\n{re:/^(\\w{2})(\\w{2})(\\w{2})$/,example:[\"#00ff00\",\"336699\"],process:function(c){return[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)]}},{re:/^(\\w{1})(\\w{1})(\\w{1})$/,example:[\"#fb0\",\"f0f\"],process:function(c){return[parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)]}}];for(f=0;f<l.length;f++){var m=l[f].process,p=l[f].re.exec(c);p&&(channels=m(p),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0)}this.r=0>this.r||isNaN(this.r)?0:255<this.r?255:this.r;this.g=\n0>this.g||isNaN(this.g)?0:255<this.g?255:this.g;this.b=0>this.b||isNaN(this.b)?0:255<this.b?255:this.b;this.toRGB=function(){return\"rgb(\"+this.r+\", \"+this.g+\", \"+this.b+\")\"};this.toHex=function(){var c=this.r.toString(16),f=this.g.toString(16),g=this.b.toString(16);1==c.length&&(c=\"0\"+c);1==f.length&&(f=\"0\"+f);1==g.length&&(g=\"0\"+g);return\"#\"+c+f+g};this.getHelpXML=function(){for(var c=[],f=0;f<l.length;f++)for(var m=l[f].example,p=0;p<m.length;p++)c[c.length]=m[p];for(var x in g)c[c.length]=x;m=\ndocument.createElement(\"ul\");m.setAttribute(\"id\",\"rgbcolor-examples\");for(f=0;f<c.length;f++)try{var y=document.createElement(\"li\"),C=new RGBColor(c[f]),M=document.createElement(\"div\");M.style.cssText=\"margin: 3px; border: 1px solid black; background:\"+C.toHex()+\"; color:\"+C.toHex();M.appendChild(document.createTextNode(\"test\"));var K=document.createTextNode(\" \"+c[f]+\" -> \"+C.toRGB()+\" -> \"+C.toHex());y.appendChild(M);y.appendChild(K);m.appendChild(y)}catch(F){}return m}}", "title": "" }, { "docid": "e2a917dee74cba22af2d26167db9407b", "score": "0.5895616", "text": "function getRandomColor() {\n\t//create a variable with a random letter or number\n var letters = \"0123456789ABCDEF\".split('');\n //create a variable starting with #\n var color = \"#\";\n //run a loop 6 times to add 6 random numbers and letters to the #\n for (var i = 0; i < 6; i++ ) {\n color += letters[Math.floor(Math.random() * 16)];\n }\n return color;\n}", "title": "" }, { "docid": "197815cd5b27c65ed1602532c95159e2", "score": "0.5892391", "text": "function ranColor(){\n const letters = \"0123456789ABCDEF\"\n let color = \"#\";\n for (let i = 0; i < 6; i++) {\n color += letters[(Math.floor(Math.random() * 16))];\n }\n return color;\n}", "title": "" }, { "docid": "e844e39a19ba335db840c59ec660223b", "score": "0.5887947", "text": "function randomColors(){\n var letters='0123456789ABCDEF'\n var colors='#'\n for (var i = 0; i < 6; i++) {\n var random=Math.floor(Math.random()*16)\n colors=colors+letters[random]\n }\n return colors\n}", "title": "" }, { "docid": "c8b3e55bc193934cf1d616a9c456d1c1", "score": "0.58866894", "text": "getCssColor() {\n return colorObj[this.value].color;\n }", "title": "" }, { "docid": "d3a04195d0bf46827692b6b2d356c936", "score": "0.5883431", "text": "function getConsoleColor($type) {\n var color = 'color:';\n switch ($type) {\n case 'red':\n case 'directive':\n return color + Data.red;\n case 'purple':\n case 'fn':\n return color + Data.purple;\n case 'orange':\n case 'time':\n return color + Data.orange;\n case 'green':\n return color + Data.green;\n default:\n return color + Data.black;\n }\n}", "title": "" }, { "docid": "4fe5a99c9800d6ba30a6e96e662f525c", "score": "0.58787185", "text": "gradientString(colors, splits) {\n // add the 100%\n splits.push(1);\n const pairs = [];\n colors.reverse().forEach((c, i) => {\n pairs.push(`${c} ${Math.round(splits[i] * 100)}%`);\n });\n return pairs.join(', ');\n }", "title": "" }, { "docid": "1dd0054539ce480d8defc228cc7f1fc2", "score": "0.5877422", "text": "subtle () {\n console.log(this.COLORS.subtle(this.joinArguments(arguments)))\n }", "title": "" }, { "docid": "2bc69bb79ae381fd12fd569f3968ec4d", "score": "0.5876687", "text": "getRandomColor() {\n var letters = '0123456789ABCDEF';\n var color = '#';\n for (var i = 0; i < 6; i++) {\n color += letters[Math.floor(Math.random() * 16)];\n }\n return color;\n }", "title": "" }, { "docid": "0cbef17f5738984d35084dca61cea4c7", "score": "0.58708084", "text": "function get_random_color() {\r\n\t\t \t\t\tvar letters = '0123456789ABCDEF'.split('');\r\n\t\t \t\t\tvar color = '#';\r\n\t\t \t\t\tfor (var i = 0; i < 6; i++ ) {\r\n\t\t \t\t\t\tcolor += letters[Math.round(Math.random() * 15)];\r\n\t\t \t\t\t}\r\n\t\t \t\t\treturn color;\r\n\t\t \t }", "title": "" }, { "docid": "b22227accc94721a532c7ba9f9083728", "score": "0.58662623", "text": "function colorCar(color) {\n return 'a ' + color + ' car'\n}", "title": "" }, { "docid": "ce279fea8f042130464c8d34cbf2ef46", "score": "0.5862961", "text": "function joinStyles(obj) {\n var key, str = '';\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n str += '#SW_' + key.substring(1) + \".swatcher-color\" + obj[key];\n }\n }\n return str;\n }", "title": "" }, { "docid": "d6bf9473e84b7219311bf5b26bda1cea", "score": "0.58624786", "text": "function getFullColorString(color) {\n return \"#\" + Object(_hsv2hex__WEBPACK_IMPORTED_MODULE_1__[\"hsv2hex\"])(color.h, _consts__WEBPACK_IMPORTED_MODULE_0__[\"MAX_COLOR_SATURATION\"], _consts__WEBPACK_IMPORTED_MODULE_0__[\"MAX_COLOR_VALUE\"]);\n}", "title": "" }, { "docid": "d6bf9473e84b7219311bf5b26bda1cea", "score": "0.58624786", "text": "function getFullColorString(color) {\n return \"#\" + Object(_hsv2hex__WEBPACK_IMPORTED_MODULE_1__[\"hsv2hex\"])(color.h, _consts__WEBPACK_IMPORTED_MODULE_0__[\"MAX_COLOR_SATURATION\"], _consts__WEBPACK_IMPORTED_MODULE_0__[\"MAX_COLOR_VALUE\"]);\n}", "title": "" }, { "docid": "8e1719beff5bf2f008b883e7842fcef7", "score": "0.58610827", "text": "function tcd_getColorNames() {\r var colors = [];\r \r // Locate valid label preferences key\r var prefKeyBase = \"Label Preference Text Section \";\r var prefKey = null;\r for (var i=1; i<=10; i++) {\r var newPrefKey = prefKeyBase + i;\r if (parseFloat(app.version) >= 12) {\r // After Effects CC splits up preference files into different groups\r // Adding the third parameter specifies which preference file to look in\r if (app.preferences.havePref(newPrefKey, \"Label Text ID 2 # 1\", PREFType.PREF_Type_MACHINE_INDEPENDENT)) {\r prefKey = newPrefKey;\r break;\r }\r } else {\r if (app.preferences.havePref(newPrefKey, \"Label Text ID 2 # 1\")) {\r prefKey = newPrefKey;\r break;\r } \r }\r }\r \r if (prefKey) {\r if (parseFloat(app.version) >= 12) {\r for (var i=1; i<=16; i++) {\r if (app.preferences.havePref(newPrefKey, \"Label Text ID 2 # \" + i, PREFType.PREF_Type_MACHINE_INDEPENDENT)) {\r try {\r var col = app.preferences.getPrefAsString(prefKey , \"Label Text ID 2 # \" + i, PREFType.PREF_Type_MACHINE_INDEPENDENT);\r colors.push(col);\r } catch(e) {};\r }\r }\r } else {\r for (var i=1; i<=16; i++) {\r if (app.preferences.havePref(newPrefKey, \"Label Text ID 2 # \" + i)) {\r try {\r var col = app.preferences.getPrefAsString(prefKey , \"Label Text ID 2 # \" + i);\r colors.push(col);\r } catch(e) {};\r }\r }\r }\r } else {\r //$.writeln(\"prefkey not found\");\r }\r return colors;\r}", "title": "" }, { "docid": "d86ba4f918aa512db3f3e88234faa89e", "score": "0.58584565", "text": "function cssToStr(cssProps) {\r\n\tvar statements = [];\r\n\r\n\t$.each(cssProps, function(name, val) {\r\n\t\tif (val != null) {\r\n\t\t\tstatements.push(name + ':' + val);\r\n\t\t}\r\n\t});\r\n\r\n\treturn statements.join(';');\r\n}", "title": "" }, { "docid": "eead378900cb853bfccf55fd7bba96a4", "score": "0.5854216", "text": "function genColor() {\r\n let colorCode = 'rgba(';\r\n for(let i = 0; i < 3; i++) { // generates RGB code\r\n let num = Math.floor(Math.random() * 255) + 1;\r\n colorCode += num;\r\n colorCode += ',';\r\n }\r\n let aVal = (Math.random() * (1 - 0.3) + 0.3).toFixed(2); // Random float between 0.3 - 1\r\n colorCode += aVal; \r\n colorCode += ')';\r\n return colorCode;\r\n}", "title": "" }, { "docid": "d17428250e5988abf069ef08fab16c66", "score": "0.5853463", "text": "to_str() {\n return (\n \"rgb(\" +\n String(Math.round(this.r * 255)) +\n \", \" +\n String(Math.round(this.g * 255)) +\n \", \" +\n String(Math.round(this.b * 255)) +\n \")\"\n );\n }", "title": "" }, { "docid": "0f29030e25454a5b651f92bb528a5f03", "score": "0.5850724", "text": "function getColor(varName, mappings) {\r\n const color = mappings[varName];\r\n if (color in mappings) {\r\n return getColor(color, mappings);\r\n } else {\r\n return color;\r\n }\r\n}", "title": "" }, { "docid": "1c20724b222b5e742db3bcb3c8df8b4f", "score": "0.5843793", "text": "function randomizeColor() {\n var str, \n colors = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'a', 'b', 'c', 'd', 'e', 'f'];\n str = colors[(Math.floor(Math.random() * 15) + 1)];\n str += colors[(Math.floor(Math.random() * 15) + 1)];\n str += colors[(Math.floor(Math.random() * 15) + 1)];\n str += colors[(Math.floor(Math.random() * 15) + 1)];\n str += colors[(Math.floor(Math.random() * 15) + 1)];\n str += colors[(Math.floor(Math.random() * 15) + 1)];\n return '#' + str;\n }", "title": "" }, { "docid": "2e7d112cd44f1b34daf14837fba2ccff", "score": "0.5843689", "text": "function createCssText(cssObj) {\n var cssText = \"\";\n\n Object.keys(cssObj).forEach(function forEachKey(key) {\n cssText+= key + \":\" + cssObj[key] + \";\";\n });\n\n return cssText;\n }", "title": "" }, { "docid": "9689181198183ac4771751181e44d3fd", "score": "0.58418703", "text": "function getRandomColorString() {\n\tvar randomColor = xocolors[Math.floor(Math.random()*xocolors.length)];\n\trandomColor = JSON.stringify(randomColor);\n\treturn randomColor;\n}", "title": "" }, { "docid": "80797527c131388ec74214d8ff7d361d", "score": "0.5837557", "text": "function getColor() {\n\t//Define the string variable colorValue to store the value that can form a hexadecimal color value\n\tvar colorValue = \"0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f\";\n\t//Split the colorValue string into a character array [\"0\",\"1\",...,\"f\"] with \",\" as the separator\n\tvar colorArray = colorValue.split(\",\");\n\tvar color = \"#\"; //Define a string variable that holds the hexadecimal color value, first store #\n\t//Use the for loop statement to generate the remaining six hexadecimal values\n\tfor (var i = 0; i < 6; i++) {\n\t\t//colorArray[Math.floor(Math.random()*16)]Randomly removed\n\t\t// a value of a colorArray consisting of 16 elements, and then adding it to the color,\n\t\t//after the string is added, the result is still a string.\n\t\tcolor += colorArray[Math.floor(Math.random() * 16)];\n\t}\n\treturn color;\n}", "title": "" }, { "docid": "318a9a06c6569a1a635fffac1bd8f969", "score": "0.583285", "text": "function rgbToCss(rgbObject) {\n return `rgb(${rgbObject.r}, ${rgbObject.g}, ${rgbObject.b})`;\n}", "title": "" }, { "docid": "d1477f2be9d528a81535f26ee3eeceae", "score": "0.5829981", "text": "function styleString(styleInfo) {\n const o = [];\n for (const name in styleInfo) {\n const v = styleInfo[name];\n if (v || v === 0) {\n o.push(`${Object(__WEBPACK_IMPORTED_MODULE_1__polymer_polymer_lib_utils_case_map_js__[\"a\" /* camelToDashCase */])(name)}: ${v}`);\n }\n }\n return o.join('; ');\n}", "title": "" }, { "docid": "2320c64b8ebc3722c19e37d5800eea0c", "score": "0.58240026", "text": "function green(str) { return '\\033[32m' + str + '\\033[0m'; }", "title": "" }, { "docid": "61c5def9ee1921dac8906503af9dad33", "score": "0.58177716", "text": "function toCssText(styles) {\r\n return Object.keys(styles)\r\n .reduce(function (acc, key) {\r\n if (styles[key]) {\r\n acc.push(key + \":\" + styles[key]);\r\n }\r\n return acc;\r\n }, [])\r\n .join(\";\");\r\n}", "title": "" }, { "docid": "a6fd4a774fbd5f9efcb0aea6c5933ed3", "score": "0.58109194", "text": "function cssToStr(cssProps) {\n var statements = [];\n\n for (var name_1 in cssProps) {\n var val = cssProps[name_1];\n\n if (val != null && val !== '') {\n statements.push(name_1 + ':' + val);\n }\n }\n\n return statements.join(';');\n } // Given an object hash of HTML attribute names to values,", "title": "" }, { "docid": "c3265b501b4d5463926dccdd41e78896", "score": "0.58093095", "text": "function getRandomColour() {\n var letters = '0123456789ABCDEF'.split('');\n var colour = '#';\n for (var i = 0; i < 6; i++ ) {\n colour += letters[Math.floor(Math.random() * 16)];\n }\n return colour+\"66\";\n}", "title": "" }, { "docid": "008e9ed445ba0d83dc8c3da5ea22dfb5", "score": "0.5808461", "text": "verysubtle () {\n console.log(this.COLORS.verysubtle(this.joinArguments(arguments)))\n }", "title": "" }, { "docid": "4c00d58d8d42789b5d9aa864e4d71504", "score": "0.58018893", "text": "function getFullColorString(color) {\n return \"#\" + hsv2hex(color.h, MAX_COLOR_SATURATION, MAX_COLOR_VALUE);\n}", "title": "" } ]
402907a335c9b3c2929e5f372f471909
Helper function for moving the player icon and updating the player position
[ { "docid": "7f2a5c71083d980a4c0fce81896817d8", "score": "0.66588646", "text": "function movePlayerIcon(newRow, newCol) {\r\n Excel.run(function (ctx) {\r\n var sheet = ctx.workbook.worksheets.getActiveWorksheet();\r\n var cellRange = sheet.getRange(\"b2:j10\");\r\n\r\n return ctx.sync().then(function () {\r\n cellRange.getCell(playerPos[0], playerPos[1]).values = '';\r\n playerPos[0] = newRow;\r\n playerPos[1] = newCol;\r\n cellRange.getCell(playerPos[0], playerPos[1]).values = '☺';\r\n }).then(ctx.sync);\r\n }).catch(errorHandler);\r\n }", "title": "" } ]
[ { "docid": "b6ca9dc0751ae45da7325fad77b19ee9", "score": "0.7179755", "text": "function moveIcon()\n{\n\tif( hPlace != preferences.hPlacePref.value || vPlace != preferences.vPlacePref.value )\n\t{\t\n\t\tprint(\"hOffset = \" + preferences.hPlacePref.value);\n\t\tprint(\"vOffset = \" + preferences.vPlacePref.value);\n\t\thPlace = Number(preferences.hPlacePref.value);\n\t\tvPlace = Number(preferences.vPlacePref.value);\n\t\tdisplayIcons(weatherConditions);\n\t}\n}", "title": "" }, { "docid": "3d4d8dc78156aa9719d48c5adabffa24", "score": "0.6968579", "text": "function positionIcon(){\n\t\t\t\tvar y = currentLocation.areaY;\n\t\t\t\tvar x = currentLocation.areaX;\n\t\t\t\tvar mCanvas = document.getElementById(\"mapCanvas\");\n\t\t\t\tvar ctx = mCanvas.getContext(\"2d\");\n\t\t\t\tvar img = document.getElementById(\"mapImg\");\n\t\t\t\tctx.drawImage(img, 0, 0, 270, 240);\n\t\t\t\tvar img = document.getElementById(\"playerIcon\");\n\t\t\t\tctx.drawImage(img, x, y, (12), (15));\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "e6ed33266f759434f398be001abe59fa", "score": "0.68272763", "text": "set_player_position (x, y) {\n\t\tplayer_img.style.cssText = \"--x:\"+(x%this.board_size).toString()+\";--y:\"+(y%this.board_size).toString()+\";\";\n\t}", "title": "" }, { "docid": "5d48a87ff93e3e6774c5a8c4bd923d6d", "score": "0.6710567", "text": "function movePlayer() {\n\n\t// Save previous location\n\tprevLoc[0] = player.sprite.x, prevLoc[1] = player.sprite.y;\n\n\t// Figure out where to move player\n\tvect = getMovement();\n\tplayer.sprite.x += vect[0]-vect[2];\n\tplayer.sprite.y += vect[3]-vect[1];\n\n\tplayer.sprite.animationSpeed = player.speed/MAX_PLAYER_SPEED;\n\tif (getMagnitude(direction) > 0) player.sprite.play();\n\telse if (player.sprite.currentFrame === 0) player.sprite.stop();\n\n}", "title": "" }, { "docid": "67b4c0d4102d9f7f250effd72e8aec96", "score": "0.6649067", "text": "function movePlayer() {\n // Update position\n playerX = ship.x;\n playerY = ship.y;\n}", "title": "" }, { "docid": "82ec7b4646b23e7341bbaf1bb3ed9273", "score": "0.66331685", "text": "updatePosition(player) {\n if(player.dir == 0) {\n // UP\n if(this.playerCanBe(player.x, player.y - 1, player.color)) player.y -= 1;\n } else if(player.dir == 1) {\n // RIGHT\n if(this.playerCanBe(player.x + 1, player.y, player.color)) player.x += 1;\n } else if(player.dir == 2) {\n // DOWN\n if(this.playerCanBe(player.x, player.y + 1, player.color)) player.y += 1;\n } else {\n // LEFT\n if(this.playerCanBe(player.x - 1, player.y, player.color)) player.x -= 1;\n }\n }", "title": "" }, { "docid": "828cab7a9a4a31b4af68d4253817b2cc", "score": "0.6623005", "text": "update_player()\n {\n if (keyIsDown(87))\n game.move_player(0, -3);\n if (keyIsDown(65))\n game.move_player(-3, 0);\n if (keyIsDown(83))\n game.move_player(0, 3);\n if (keyIsDown(68))\n game.move_player(3, 0);\n }", "title": "" }, { "docid": "fd8c6831571ff717c4e16175b4999cf6", "score": "0.65521604", "text": "function updatePosition(playerPosition) {\r\n\t\tplayerContainer.x = playerPosition.xPlayer;\r\n\t\tplayerContainer.y = playerPosition.yPlayer;\r\n\t}", "title": "" }, { "docid": "c418f771e7e7e76adcd8399cb56c4891", "score": "0.65020865", "text": "function move() {\n player = squares.find(square => square.classList.contains('player'))\n\n player.classList.remove('player')\n\n squares[userIndex].classList.add('player')\n squares[userIndex].setAttribute('data-direction', direction)\n }", "title": "" }, { "docid": "86b72677afa0b3b34f1dca60eb0c151c", "score": "0.6479255", "text": "function movePlayer( new_x, new_y ) {\n\tcreatejs.Tween.get( player.position ).to({ x: new_x, y: new_y }, 500, createjs.Ease.backOut );\n}", "title": "" }, { "docid": "52e272490b13c4d877c9ead9366b508c", "score": "0.6459262", "text": "function move()\n{\n\tif (player.direction == MOVE_NONE)\n\t{\n\t\tplayer.moving = false;\n\t\t//console.log(\"y: \" + ((player.y-20)/40));\n\t\t//console.log(\"x: \" + ((player.x-20)/40));\n \treturn;\n \t}\n \tplayer.moving = true;\n \t//console.log(\"move\");\n \n\tif (player.direction == MOVE_LEFT)\n\t{\n \tif(player.angle != -90)\n\t\t{\n\t\t\tplayer.angle = -90;\n\t\t}\n\t\tif(map[playerPos.x][playerPos.y-1].walkable)\n\t\t{\n\t\t\tplayer.moving = true;\n\t\t\tplayerPos.y -=1;\n\t\t\tcheckCharms(playerPos.x, playerPos.y);\n\t\t\tvar newX = player.position.x - 40;\n\t\t\tcreatejs.Tween.get(player).to({x: newX, y: player.position.y}, 250);\n\t\t\tvar newbadgeX = badge_ui.position.x -40;\n\t\t\tcreatejs.Tween.get(badge_ui).to({x: newbadgeX, y: badge_ui.position.y}, 250).call(move);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tPIXI.sound.play('wrongWay');\n\t\t\tplayer.direction = MOVE_NONE;\n\t\t\tmove();\n\t\t}\n \t}\n\tif (player.direction == MOVE_RIGHT)\n\t{\n \tif(player.angle != 90)\n\t\t{\n\t\t\tplayer.angle = 90;\n\t\t}\n\t\tif(map[playerPos.x][playerPos.y+1].walkable)\n\t\t{\n\t\t\tplayer.moving = true;\n\t\t\tplayerPos.y+=1;\n\t\t\tcheckCharms(playerPos.x, playerPos.y);\n\t\t\tvar newX = player.position.x + 40;\n\t\t\tcreatejs.Tween.get(player).to({x: newX, y: player.position.y}, 250);\n\t\t\tvar newbadgeX = badge_ui.position.x + 40;\n\t\t\tcreatejs.Tween.get(badge_ui).to({x: newbadgeX, y: badge_ui.position.y}, 250).call(move);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tPIXI.sound.play('wrongWay');\n\t\t\tplayer.direction = MOVE_NONE;\n\t\t\tmove();\n\t\t}\n\t}\n \tif (player.direction == MOVE_UP)\n\t{\n\t if(player.angle != 0)\n\t\t{\n\t\t\tplayer.angle = 0;\n\t\t}\n\t\tif(map[playerPos.x-1][playerPos.y].walkable)\n\t\t{\n\t\t\tplayer.moving = true;\n\t\t\tplayerPos.x-=1;\n\t\t\tcheckCharms(playerPos.x, playerPos.y);\n\t\t\tvar newy = player.position.y - 40;\n\t\t\tcreatejs.Tween.get(player).to({y: newy}, 250);\n\t\t\tvar newbadgeY = badge_ui.position.y - 40;\n\t\t\tcreatejs.Tween.get(badge_ui).to({x: badge_ui.position.x, y: newbadgeY}, 250).call(move);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tPIXI.sound.play('wrongWay');\n\t\t\tplayer.direction = MOVE_NONE;\n\t\t\tmove();\n\t\t}\n\t}\n \tif (player.direction == MOVE_DOWN)\n\t{\n\t if(player.angle != 180)\n\t\t{\n\t\t\tplayer.angle = 180;\n\t\t}\n\t\tif(map[playerPos.x+1][playerPos.y].walkable)\n\t\t{\n\t\t\tplayer.moving = true;\n\t\t\tplayerPos.x+=1;\n\t\t\tcheckCharms(playerPos.x, playerPos.y);\n\t\t\tvar newY = player.position.y + 40;\n\t\t\tcreatejs.Tween.get(player).to({x: player.position.x, y: newY}, 250).call(move);\n\t\t\tvar newbadgeY = badge_ui.position.y + 40;\n\t\t\tcreatejs.Tween.get(badge_ui).to({x: badge_ui.position.x, y: newbadgeY}, 250).call(move);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tPIXI.sound.play('wrongWay');\n\t\t\tplayer.direction = MOVE_NONE;\n\t\t\tmove();\n\t\t}\n\t}\n}", "title": "" }, { "docid": "b28570ef824c9075acddc0160bc96437", "score": "0.6439525", "text": "getPlayer(player){\n\t\tvar newX = player.x;\n\t\tvar newY = player.y;\n\t\tthis.stage.switchImage(this.x, this.y, this.img, newX, newY, this.stage.blankImageSrc);\n \tthis.x = newX;\n \tthis.y = newY;\n\t}", "title": "" }, { "docid": "8c6839513e062462453754ebbfa6f0ca", "score": "0.6424642", "text": "movePlayer(move) {\n let pos = this.playerPosition;\n let oldPos = pos.map(x => x);\n switch (move) {\n case \"w\":\n pos[0]--;\n break;\n case \"a\":\n pos[1]--;\n break;\n case \"s\":\n pos[0]++;\n break;\n case \"d\":\n pos[1]++;\n break;\n default:\n return\n }\n this.paintPlayer(oldPos);\n }", "title": "" }, { "docid": "5ec2b255bee61b33799e88b95132732e", "score": "0.6405563", "text": "updatePlayerPosition(player, tile) {\n player.currentTile = tile;\n game.sendMessageToAll('updatePosition', player, tile);\n }", "title": "" }, { "docid": "c471fffe7d377d977c0ee7aa2d69e97e", "score": "0.6396332", "text": "start(){\n player.sprite.position.x = 270;\n friend.sprite.position.x = 320;\n player.sprite.position.y = 1326;\n friend.sprite.position.y = 1326;\n }", "title": "" }, { "docid": "9a4a16cb24a80c0a0fb2b97bb4266fec", "score": "0.6323952", "text": "function movePlayer()\n{\n // Change to game over if player is dead.\n if (player.isDead) {\n playGameOverClip();\n changeState(6);\n\t\treturn;\n\t}\n\n if(ItemWindow==0)\n {\n\t\tif (leftPressed == true && player.colL == false) // Here is where we use the collision flags.\n\t\t\tplayer.x -= player.speed; \n\t\tif ( rightPressed == true && player.colR == false)\n\t\t\tplayer.x += player.speed;\n\t\tif ( upPressed == true && player.colT == false)\n\t\t\tplayer.y -= player.speed;\n\t\tif ( downPressed == true && player.colB == false)\n\t\t\tplayer.y += player.speed;\n\t}\n\n\titemTiles.forEach(function(el)\n {\n el.playerAt = false; // Reset playerAt property.\n\n\t\tif (!(player.x > el.x + el.w || player.x + player.w < el.x || player.y > el.y + el.h || player.y + player.h < el.y)){\n\t\t el.playerAt = true;\n\t\t\tcurrItemTile = el;\n\t\t}\n\t})\n\n // Update inventory UI element.\n equipItemP(player.inventory[0]);\n equipItemS(player.inventory[1]);\n}", "title": "" }, { "docid": "865b373af6be6d61032700cc22e1c2ee", "score": "0.6311552", "text": "updatePosition() {\r\n this.updateFloatingName(this.sprite.x, this.sprite.y - this.sprite.height/1.5, this.name);\r\n\r\n if (!this.controllable) {\r\n return;\r\n }\r\n \r\n var keysPressed = this.movementKeys.getKeys();\r\n var action = this.determineAction(keysPressed);\r\n\r\n var newAnim;\r\n switch(action) {\r\n case 'left':\r\n newAnim = 'left';\r\n this.runDirection('left');\r\n break;\r\n case 'right':\r\n newAnim = 'right';\r\n this.runDirection('right');\r\n break;\r\n case 'down':\r\n break;\r\n\r\n default: \r\n newAnim = 'turn';\r\n this.runDirection('stop');\r\n }\r\n\r\n this.changeAnim(newAnim);\r\n \r\n if (this.previousPosition) {\r\n if (this.previousPosition.x !== this.sprite.x || this.previousPosition.y !== this.sprite.y) {\r\n \r\n this.previousPosition.x = this.sprite.x;\r\n this.previousPosition.y = this.sprite.y; \r\n \r\n //inform the server of the latest position when it changes\r\n broadcastPosition({\r\n x: Number(this.sprite.x.toFixed(2)),\r\n y: Number(this.sprite.y.toFixed(2)),\r\n anim: newAnim\r\n });\r\n }\r\n } else {\r\n this.previousPosition = {\r\n x: this.sprite.x,\r\n y: this.sprite.y\r\n };\r\n }\r\n\r\n }", "title": "" }, { "docid": "9d0a6766d1010aa05ef066a7e4ca7162", "score": "0.6301602", "text": "updatePosition() {\n if(!this.isPlayer) {\n this.y += this.speed;\n }\n }", "title": "" }, { "docid": "bd06d2b6243e70c87bc6abb347ff9a1c", "score": "0.62889165", "text": "function updateIcon(){\n if(video.paused){\n play.innerHTML='<i class=\"fas fa-play fa-2x\"></i>';\n } else {\n play.innerHTML='<i class=\"fas fa-pause fa-2x\"></i>';\n }\n}", "title": "" }, { "docid": "7cbbdda36e0e6985132ab6d739f74365", "score": "0.6286839", "text": "function player1Move(){\n //Player1 move\n console.log($('.player1').css('left', \"+=20px\") );\n }", "title": "" }, { "docid": "367e2572cd1def183526048a1b185ff7", "score": "0.6276951", "text": "function updatePlayIcon() {\n if (wavesurfer.isPlaying()) {\n addClass(globalPlayBtn, 'playing');\n } else {\n delClass(globalPlayBtn, 'playing');\n }\n}", "title": "" }, { "docid": "8d96f9ce04169af1a2b3d6d36d308428", "score": "0.6268284", "text": "function repositionGameItem(){\n gameItem.x += gameItem.speedX; // update the position of the circle along the x-axis\n gameItem.y += gameItem.speedY; // update the position of the circle along the x-axis\n\n }", "title": "" }, { "docid": "794a94daa2142f175a1ecfc9be3e074d", "score": "0.6256451", "text": "function updatePlayIcon() {\n if(video.paused) {\n play.innerHTML = '<i class=\"fa fa-play fa-2x\"></i>'\n } else {\n play.innerHTML = '<i class=\"fa fa-pause fa-2x\"></i>'\n }\n}", "title": "" }, { "docid": "794a94daa2142f175a1ecfc9be3e074d", "score": "0.6256451", "text": "function updatePlayIcon() {\n if(video.paused) {\n play.innerHTML = '<i class=\"fa fa-play fa-2x\"></i>'\n } else {\n play.innerHTML = '<i class=\"fa fa-pause fa-2x\"></i>'\n }\n}", "title": "" }, { "docid": "1826f23cef70db75215183a55b4c1e73", "score": "0.62550074", "text": "start() {\n player.sprite.position.y = 1326;\n friend.sprite.position.y = 1326;\n }", "title": "" }, { "docid": "5f8c04ca14885379185d61f0d6b90c0c", "score": "0.62397057", "text": "function updateIconPos(currPos)\n{\n $(\".dw_iconPositionBorderSelected.dw_iconPositionNoText\").removeClass(\"dw_iconPositionBorderSelected\");\n $(\".dw_iconPositionBorderSelected\").removeClass(\"dw_iconPositionBorderSelected\").addClass(\"dw_iconPositionBorder\");\n \n\tif(currPos && currPos!=\"\")\n\t{\n $(\"div[posType='\"+currPos+\"']\").removeClass(\"dw_iconPositionBorder\").addClass(\"dw_iconPositionBorderSelected\");\n\t\tvar iconPosStr = document.loadString(\"jQSwatch/Floater/Label/IconPosition\");\n\t\t$(\".dw_iconPositionLabel\").html(iconPosStr + currPos);\n\t}\n\telse\n\t{\n $(\".dw_iconPositionDefault\").removeClass(\"dw_iconPositionBorder\").addClass(\"dw_iconPositionBorderSelected\");\n\t\tvar iconPosStr = document.loadString(\"jQSwatch/Floater/Label/IconPosition/Default\");\n\t\t$(\".dw_iconPositionLabel\").html(iconPosStr);\n\t}\n}", "title": "" }, { "docid": "7874f0a591bde0e63a01715eb4c46194", "score": "0.62353545", "text": "function move() {\n if (player.direction == MOVE_NONE) {\n player.moving = false;\n return;\n }\n player.moving = true;\n\n var new_x = player.x;\n var new_y = player.y;\n\n if (player.direction == MOVE_LEFT) new_x -= 64;\n else if (player.direction == MOVE_RIGHT) new_x += 64;\n else if (player.direction == MOVE_UP) new_y -= 64;\n else if (player.direction == MOVE_DOWN) new_y += 64;\n\n var collisionsDetected = detectCollisions(new_x, new_y, obstacles);\n if (collisionsDetected == false && new_x < 2048 && new_y < 2048) {\n createjs.Tween.get(player).to({x: new_x, y: new_y}, 200).call(move);\n }\n else {\n player.moving = false;\n }\n}", "title": "" }, { "docid": "595d560c4a746ed2ab17f275bd716d82", "score": "0.6235179", "text": "function updateButtons(move, player) {\n $(\"#\" + move).text(player);\n $(\"#\" + move).css(\"opacity\", \"1\");\n if (player === \"X\") {\n $(\"#\" + move).addClass(\"btn-info\");\n } else {\n $(\"#\" + move).addClass(\"btn-danger\");\n }\n }", "title": "" }, { "docid": "844364ff558530d67bddb0d9373f49f0", "score": "0.6216652", "text": "tick () {\n\t\tif (player !== undefined) {\n\t\t\tthis.x = screenCenterX + this.posX - player.posX\n\t\t\tthis.y = screenCenterY + player.posY - this.posY\n\t\t}\n\t}", "title": "" }, { "docid": "4979dfecc02fcbfe6764783b254ec91d", "score": "0.6211707", "text": "function updateIcon(){\n // if video is paused or playing \n if(video.paused) {\n play.innerHTML = '<i class=\"fa fa-play fa-2x\"></i>' ; \n } else { \n play.innerHTML = '<i class=\"fa fa-pause fa-2x\"></i>' ; \n } \n \n}", "title": "" }, { "docid": "83c8ef48fa29a8821a10e1e212f96284", "score": "0.6205789", "text": "function move() {\r\n if (player.direction == MOVE_NONE) {\r\n player.moving = false;\r\n console.log(player.y);\r\n return;\r\n }\r\n player.moving = true;\r\n console.log(\"move\");\r\n \r\n if (player.direction == MOVE_LEFT) {\r\n createjs.Tween.get(player).to({x: player.x - 32}, 250).call(move);\r\n }\r\n if (player.direction == MOVE_RIGHT)\r\n createjs.Tween.get(player).to({x: player.x + 32}, 250).call(move);\r\n\r\n if (player.direction == MOVE_UP)\r\n createjs.Tween.get(player).to({y: player.y - 32}, 250).call(move);\r\n \r\n if (player.direction == MOVE_DOWN)\r\n createjs.Tween.get(player).to({y: player.y + 32}, 250).call(move);\r\n}", "title": "" }, { "docid": "c2da565d4e89ad66a0f8b667970b48af", "score": "0.6180312", "text": "move_player (ox, oy, x, y) {\n\t\t// the decimal place being modified\n\t\tconst inc = 100;\n\t\t// start x\n\t\tsx = (ox%this.board_size)*inc;\n\t\t// start y\n\t\tsy = (oy%this.board_size)*inc;\n\t\t// end x\n\t\tex = (x%this.board_size)*inc;\n\t\t// end y\n\t\tey = (y%this.board_size)*inc;\n\t\t// delta x\n\t\tdx = (sx !== ex ? (sx < ex ? 1 : -1) : 0);\n\t\t// delta y\n\t\tdy = (sy !== ey ? (sy < ey ? 1 : -1) : 0);\n\t\t// console.log(sx, sy, ex, ey, dx, dy);\n\t\t// start move\n\t\tppos_helper();\n\t}", "title": "" }, { "docid": "feb5bd0a30f2498b4908aae3beb33e52", "score": "0.61706704", "text": "function updatePlayerOnBoard(){\r\n soundJ.play();\r\n console.log(\"i am called\")\r\n //If we can still move this turn\r\n if (movesThisTurn===0){\r\n inTransition=true;\r\n console.log(player.y)\r\n placementY=(player.y)*oneJumpDistance+visualCorrection;\r\n placementYmiddle= (placementY-playerYtranslate)/2+playerYtranslate;\r\n\r\n oldPlayerYtranslate=playerYtranslate;\r\n playerYtranslate=placementY;\r\n \r\n placementX=player.x*oneJumpDistance+visualCorrection;\r\n placementXmiddle= (placementX-playerXtranslate)/2+playerXtranslate;\r\n oldPlayerXtranslate=playerXtranslate;\r\n playerXtranslate=placementX;\r\n\r\n globalPlacementX=placementX;\r\n globalPlacementY=placementY;\r\n //If this is our first stop after the initialization of the avatar in the board\r\n //Implementation of the requestAnimationFrame so that the jumpinf animation is smooth\r\n if(isFirstPLaced===true){\r\n playerAvatar.style.transition=`transform 0.05s linear`;\r\n start= Date.now();\r\n window.requestAnimationFrame(moveFigureUp);\r\n setTimeout(function(){\r\n start= Date.now();\r\n window.requestAnimationFrame(moveFiguredown);\r\n playerAvatar.style.visibility=\"visible\";},jumphalFTime);\r\n\r\n }\r\n //If this it the initialization of the avatar on the board\r\n else{\r\n playerAvatar.style.transition=\"none\";\r\n playerAvatar.style.transform=`translate3d(${placementX}vh,${placementY}vh,30px)`;\r\n isFirstPLaced=true;\r\n }\r\n } \r\n \r\n}", "title": "" }, { "docid": "f438e93edc369c617ffb55e534332a34", "score": "0.61700946", "text": "function movePlayer() {\n // Update position\n playerX = playerX + playerVX;\n playerY = playerY + playerVY;\n\n // Wrap when player goes off the canvas\n if (playerX < 0) {\n // Off the left side, so add the width to reset to the right\n playerX = playerX + width;\n } else if (playerX > width) {\n // Off the right side, so subtract the width to reset to the left\n playerX = playerX - width;\n }\n\n if (playerY < 0) {\n // Off the top, so add the height to reset to the bottom\n playerY = playerY + height;\n } else if (playerY > height) {\n // Off the bottom, so subtract the height to reset to the top\n playerY = playerY - height;\n }\n}", "title": "" }, { "docid": "f438e93edc369c617ffb55e534332a34", "score": "0.61700946", "text": "function movePlayer() {\n // Update position\n playerX = playerX + playerVX;\n playerY = playerY + playerVY;\n\n // Wrap when player goes off the canvas\n if (playerX < 0) {\n // Off the left side, so add the width to reset to the right\n playerX = playerX + width;\n } else if (playerX > width) {\n // Off the right side, so subtract the width to reset to the left\n playerX = playerX - width;\n }\n\n if (playerY < 0) {\n // Off the top, so add the height to reset to the bottom\n playerY = playerY + height;\n } else if (playerY > height) {\n // Off the bottom, so subtract the height to reset to the top\n playerY = playerY - height;\n }\n}", "title": "" }, { "docid": "1db7b02d3fa90620afeb5366e88ee928", "score": "0.6159049", "text": "function updatePosition () {\n var $settingsIcon = $(getSettingsIcon())\n if (!$settingsIcon) {\n debug('updatePosition: [noop] no settings icon')\n return\n }\n\n var left = $settingsIcon.offset().left + 200\n var top = $settingsIcon.offset().top + (\n $lists.height() * 1.5\n )\n $root.css('top', top.toString() + 'px')\n $root.css('left', left.toString() + 'px')\n $lists.css(getListsCss())\n }", "title": "" }, { "docid": "c545c3c95e193d4e8004557a18a3602a", "score": "0.6158584", "text": "movePlayer() {\n this.startingIndex = Math.floor(width * width - width)\n squares.forEach(square => square.classList.remove('player'))\n squares[this.playerIndex].classList.add('player')\n }", "title": "" }, { "docid": "afdb3e8696b6e83d8a9c0558de16fdf3", "score": "0.61439216", "text": "movePlayer(player, amount) {\n amount > 0 ? this.movePlayerForward(amount) : this.movePlayerBack(amount);\n player.currentTile.tileUpdate();\n }", "title": "" }, { "docid": "95ae736e895b0d0718be5823c4b74484", "score": "0.61337376", "text": "function movePlayer() {\n // Update position\n playerX += playerVX;\n playerY += playerVY;\n\n // Wrap when player goes off the canvas\n if (playerX < 0) {\n playerX += width;\n } else if (playerX > width) {\n playerX -= width;\n }\n\n if (playerY < 0) {\n playerY += height;\n } else if (playerY > height) {\n playerY -= height;\n }\n}", "title": "" }, { "docid": "be1404c416bacd411af665c93ed55d1c", "score": "0.61336946", "text": "movePlayer(){ \n if(this.cursors.left.isDown){\n this.player.setVelocity(-350,0);\n this.player.flipX=true; //makes him go left\n this.player.anims.play(\"right\", true);\n\n } else if(this.cursors.right.isDown){\n this.player.setVelocity(350,0);\n this.player.flipX=false; //makes him go right\n this.player.anims.play(\"right\", true);\n\n } else if(this.cursors.down.isDown){\n this.player.setVelocity(0,350);\n\n } else if(this.cursors.up.isDown && this.player.body.onFloor()){ //jump\n this.player.setVelocityY(-5000);\n this.player.anims.play(\"jump\", true);\n this.jumpSound.play();\n\n } else {\n this.player.anims.play(\"idle\", true);\n this.player.setVelocity(0,0);\n }\n }", "title": "" }, { "docid": "43686842f632e143abdc4364744a21be", "score": "0.6131393", "text": "resetPosition () {\n player.x = 202;\n player.y = 404;\n }", "title": "" }, { "docid": "933c4fbdacb090605fa5ca27056492ea", "score": "0.6127463", "text": "function movePlayer() {\n // Update position\n playerX += playerVX;\n playerY += playerVY;\n\n // Wrap when player goes off the canvas\n if (playerX < 0) {\n playerX += width;\n }\n else if (playerX > width) {\n playerX -= width;\n }\n\n if (playerY < 0) {\n playerY += height;\n }\n else if (playerY > height) {\n playerY -= height;\n }\n}", "title": "" }, { "docid": "933c4fbdacb090605fa5ca27056492ea", "score": "0.6127463", "text": "function movePlayer() {\n // Update position\n playerX += playerVX;\n playerY += playerVY;\n\n // Wrap when player goes off the canvas\n if (playerX < 0) {\n playerX += width;\n }\n else if (playerX > width) {\n playerX -= width;\n }\n\n if (playerY < 0) {\n playerY += height;\n }\n else if (playerY > height) {\n playerY -= height;\n }\n}", "title": "" }, { "docid": "c34dc7fc7598b8fc45164df1085afc4b", "score": "0.61247766", "text": "function updateEntity() {\n heroIcon.x += heroIcon.spdX;\n heroIcon.y += heroIcon.spdY;\n canvas.fillText(heroIcon.icon, heroIcon.x, heroIcon.y);\n\n\n if (heroIcon.x < 0 || heroIcon.x > width) {\n console.log(message);\n heroIcon.spdX = -heroIcon.spdX;\n }\n if (heroIcon.y < 0 || heroIcon.y > height) {\n console.log(message);\n heroIcon.spdY = -heroIcon.spdY;\n }\n}", "title": "" }, { "docid": "683a418e5e30f9d6dd6c5786ac062b07", "score": "0.6122627", "text": "function setNewPosition() {\t\n\t\n\t//soma ou subtrai 40px da posicao atual do jogador\n\t//somente altera se a nova posicao estiver dentro dos limites do jogo\n\tswitch (playerDirection){\n\t\tcase 0:\n\t\t\tif(player.position.x - 40 >= 0){\n\t\t\t\tplayerX = player.position.x - 40;\n\t\t\t}\n\t\tbreak;\n\t\tcase 90:\n\t\t\tif(player.position.y - 40 >= 0) {\n\t\t\t\tplayerY = player.position.y - 40;\n\t\t\t}\n\t\tbreak;\n\t\tcase 180:\n\t\t\tif(player.position.x + 40 <= 400){\n\t\t\t\tplayerX = player.position.x + 40;\n\t\t\t}\n\t\tbreak;\n\t\tcase 270:\n\t\t\tif(player.position.y + 40 <= 400){\n\t\t\t\tplayerY = player.position.y + 40;\n\t\t\t}\n\t\tbreak;\n\t}\t\n\n\tsetAnimation();\n\n\tcheckChallenge();\n}", "title": "" }, { "docid": "c8e197572c71768f8b42badfae4d5def", "score": "0.6112728", "text": "function move() {\n movingPlayer = true;\n}", "title": "" }, { "docid": "242be73e980ab03cf737b8bdb3bdc469", "score": "0.61123013", "text": "async function movePlayer(playr, spacesToMove, turn) {\n //Gets first two numbers in the id\n var left = parseInt(players[turn].position.substring(0, 2));\n //Gets the last two numbers in the id\n var right = parseInt(players[turn].position.substring(2, 4));\n var newPosition; //The position they finish on\n //Deciding how the player's icon should move based on their position on the board\n while(spacesToMove > 0) {\n if(left == 0 && right < 10) {\n right++;\n } else if(right == 10 && left < 10) {\n left++;\n } else if(left == 10 && right > 0) {\n right--;\n } else if(right == 0 && left > 0) {\n left--;\n }\n //Getting the player's new position back into the \"xxxx\" format\n newPosition = positionHack(left, right);\n if(newPosition == \"0000\") {\n console.log(\"Player has passed go; collect 200\");\n }\n spacesToMove--;\n //Placing the player's icon on the new tile\n document.getElementById(newPosition).appendChild(playr);\n //Waiting for half a second so it looks nicer\n await sleep(500);\n }\n\n //Updating player's position\n players[turn].position = newPosition;\n //Checking for what tile they land on, currently only says \"This tile is x, etc\", Sean\n //and Dave are working on that I believe\n checkTile(newPosition, playr);\n diceFadeOut();\n }", "title": "" }, { "docid": "8160e3b45d15b5e45b79cbdc875ed375", "score": "0.61100316", "text": "function _moveToPosition(e) { //gets the position from event\n if (_instance) {\n var parentpos = _getPosition(e.currentTarget);\n var posx = e.clientX - parentpos.x;\n var pbwidth = document.getElementById(\"playing\").clientWidth;\n _instance.setPosition((posx / pbwidth) * _instance.getDuration());\n _update();\n }\n }", "title": "" }, { "docid": "2d3047eed8175365fc18bbe00aa7aa3e", "score": "0.60880876", "text": "update(){\n\n // check if on screen\n this.onScreen = false;\n let pos = posOnScreen(this);\n if(inBox(pos.x,pos.y,-40,0,canvasW+40,canvasH+40)) this.onScreen = true;\n\n // run motion function\n this.updateMotion();\n // update x,y\n this.newPos();\n\n // display only if on screen\n if(this.onScreen||this.index===\"player\") this.display();\n }", "title": "" }, { "docid": "136afd3d2c1fe8a949680caf571d0c2b", "score": "0.6064782", "text": "updatePos() {\n //find the changes in x and y\n var yChange = this.speed * Math.sin(this.theta) ;\n var xChange = this.speed * Math.cos(this.theta) ;\n //update the positions\n this.posX = this.posX + xChange ;\n this.posY = this.posY + yChange ;\n //update css\n this.element.css(\"left\", this.posX) ;\n this.element.css(\"top\", this.posY) ;\n }", "title": "" }, { "docid": "0547994a79f9bad7f1d4d9ebb2b90fc2", "score": "0.6064462", "text": "function playerMove(offset) {\n // Move the player\n player.pos.x += offset;\n // If arena and player collide\n if (collide(arena, player)) {\n // Move the player in the opposite direction of the 'offset' value\n player.pos.x -= offset;\n }\n}", "title": "" }, { "docid": "9b848d8ac5b3e43ba7d9940ef483fdd1", "score": "0.6064334", "text": "function playerMove(dir) {\n player.pos.x += dir;\n if (collide(arena, player)) {\n player.pos.x -= dir;\n }\n}", "title": "" }, { "docid": "8bb91d60caf44920cefddb39e2b68eac", "score": "0.606054", "text": "function updatePosition(the_image) {\t\t\t\t\n\t\t// move the image by the x & y\n\t\tthe_image.x += the_image.xSpeed;\n\t\tthe_image.y += the_image.ySpeed;\n\t}", "title": "" }, { "docid": "b9373cd1f519b480f204aa0263ac7532", "score": "0.6057161", "text": "function changePos() {\r\n\t\tif (this.classList.contains(\"tileRed\")) {\r\n\t\t\tlet tempTop = this.offsetTop;\r\n\t\t\tlet tempLeft = this.offsetLeft;\r\n\t\t\tthis.style.top = blank[0] + \"px\";\r\n\t\t\tthis.style.left = blank[1] + \"px\";\r\n\t\t\tblank[0] = tempTop;\r\n\t\t\tblank[1] = tempLeft;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "5f20d5dbf6221074b78bfd8c331d4d3e", "score": "0.60472035", "text": "function minigamePlayer() {\n // move and display the player\n player.vx = 0;\n player.vy = 0;\n if (keyIsDown(87)) {\n player.vy = -player.speed;\n }\n if (keyIsDown(65)) {\n player.vx = -player.speed;\n }\n if (keyIsDown(83)) {\n player.vy = player.speed;\n }\n if (keyIsDown(68)) {\n player.vx = player.speed;\n }\n player.x += player.vx;\n player.y += player.vy;\n // Make sure the player does not go outside the borders\n if (player.x-player.size/2 <= 0) {\n player.x = player.size/2;\n }\n if (player.x+player.size/2 > width) {\n player.x = width-player.size/2;\n }\n if (player.y-player.size/2 < 0) {\n player.y = player.size/2;\n }\n if (player.y+player.size/2 > height) {\n player.y = height-player.size/2;\n }\n // Draw the player\n push();\n imageMode(CENTER);\n image(imagePlayer, player.x, player.y, player.size, player.size);\n pop();\n}", "title": "" }, { "docid": "d8be01d1669d12ed40ab306cdf305c9a", "score": "0.6038713", "text": "function playerMove(dir){\n\tplayer.pos.x += dir;\n\tif(collide(arena, player)){\n\t\tplayer.pos.x -= dir;\n\t}\n}", "title": "" }, { "docid": "2c4815c23fef1e576bfedcfbbd3af807", "score": "0.60342926", "text": "function setupPlayer() {\n playerX = 4 * width / 5;\n playerY = height / 2;\n}", "title": "" }, { "docid": "600a6b1b5a6d2c642964b383bc107976", "score": "0.6013729", "text": "function playerMove() {\n let cells = document.getElementsByTagName('td');\n\n // Remove listener to prevent accidental clicks\n for (let cell of cells) {\n cell.removeEventListener('click', playerMove);\n }\n let settingsState = getSettingsState();\n\n // Add the player mark to the clicked location\n this.textContent = settingsState ? \"X\":\"O\";\n this.removeAttribute('location');\n\n // end the human turn\n endTurn('human');\n}", "title": "" }, { "docid": "a05f2d54674ad2bcff19d226948300fe", "score": "0.6004823", "text": "updatePos(){\n\t\tthis.pos.x += this.vel.x;\n\t\tthis.pos.y += this.vel.y;\n\n\t\t//Following is to have \"screen wrap\". The player appears on the opposite side, when out of bounds.\n\t\tif(this.pos.x>this.maxX){\n\t\t\tthis.pos.x = 0;\n\t\t}\n\t\tif(this.pos.x<0){\n\t\t\tthis.pos.x = this.maxX;\n\t\t}\n\t\tif(this.pos.y>this.maxY){\n\t\t\tthis.pos.y = 0;\n\t\t}\n\t\tif(this.pos.y<0){\n\t\t\tthis.pos.y = this.maxY;\n\t\t}\n\t}", "title": "" }, { "docid": "9853afe09c4f84693797546f2d8f9e8f", "score": "0.599907", "text": "function drawPlayer() {\n const playerPic = new Image();\n playerPic.src = \"./img/Laser_Cannon.png\";\n ctx.clearRect(40 + playerOffset.deltaX, 600, background.width, 60);\n ctx.beginPath();\n playerOffset.deltaX = keepElementInRange(playerOffset.deltaX, -270, 270);\n ctx.drawImage(playerPic, 310 + playerOffset.deltaX, 600, 80, 60);\n // ctx.moveTo(310 + playerOffest.deltaX, 600);\n // ctx.lineTo(390 + playerOffest.deltaX, 600);\n // ctx.lineTo(390 + playerOffest.deltaX, 540);\n // ctx.lineTo(310 + playerOffest.deltaX, 540);\n // ctx.fillStyle = \"green\";\n // ctx.fill();\n}", "title": "" }, { "docid": "77f9528cf2f604a02f837e6dc095869e", "score": "0.5998393", "text": "updatePositions() {\n for (const sprite of this.sprites) {\n const { x, y } = this.state.position;\n sprite.setPosition(x, y);\n }\n }", "title": "" }, { "docid": "fd6b63e6b7da9eff502b41c675d25128", "score": "0.5994963", "text": "moveAI(){\n const nextMove = this.player.move(this.board);\n this.move(false, nextMove.row, nextMove.column);\n }", "title": "" }, { "docid": "e924f6ebb386a7f7900b6f04b519ff1f", "score": "0.59916824", "text": "function playerMoveTop() {\n playerY -= 10;\n}", "title": "" }, { "docid": "1c20b5b8e727d7b6ba918d2119858c77", "score": "0.59852904", "text": "function updatePlayerPos(player){\n if(player != null) {\n let deltaX = player.speed * Math.cos(player.angle);\n let deltaY = player.speed * Math.sin(player.angle);\n\n let collidingObjs = getObjCollisions(player);\n let availDirections = getAvailDirections(collidingObjs, player);\n\n\n if ((deltaX >= 0 && player.x <= (CANVAS_WIDTH - 40) && availDirections.right) || (deltaX <= 0 && player.x >= 0 && availDirections.left)) {\n player.x += deltaX;\n }\n if ((deltaY >= 0 && player.y <= (CANVAS_HEIGHT - 40) && availDirections.down) || (deltaY <= 0 && player.y >= 5) && availDirections.up) {\n player.y += deltaY;\n }\n }\n}", "title": "" }, { "docid": "f657c85814e96388fb12360ea6f74353", "score": "0.5979941", "text": "function move(player)\n{\n //console.debug(player);\n if (cursors.left.isDown)\n {\n \tplayer.setVelocityX(-32*multi);\n player.setVelocityY(0);\n player.anims.play('turnLeftPlayer', true);\n playerRight = 0;\n playerUp = -1;\n }\n else if (cursors.right.isDown)\n {\n player.setVelocityX(32*multi);\n player.setVelocityY(0);\n player.anims.play('turnRightPlayer', true);\n playerRight = 1;\n playerUp = -1;\n }\n else if (cursors.up.isDown)\n {\n\n player.setVelocityY(-32*multi);\n player.setVelocityX(0);\n player.anims.play('turnUpPlayer', true);\n playerRight = -1;\n playerUp = 0;\n }\n else if (cursors.down.isDown)\n {\n player.setVelocityY(32*multi);\n player.setVelocityX(0);\n player.anims.play('turnDownPlayer', true);\n playerRight = -1;\n playerRight = -1;\n playerUp = 1;\n }\n else\n {\n player.setVelocityX(0);\n player.setVelocityY(0);\n player.anims.play('idlePlayer');\n }\n}", "title": "" }, { "docid": "ecfeb7cc2b4ecc7781be600c9fb1ebdb", "score": "0.5977742", "text": "function Update () {\n\n/**\tif(Input.GetKeyUp(\"left ctrl\")) {\n\t\tvar oldx = player.position.x;\n\t\tvar oldz = player.position.z;\n\t\tvar relativex;\n\t\tvar relativez;\n\t\t\n\t\tif(currentDimension == 0) {\n\t\t\trelativex = oldx + 16;\n\t\t\trelativez = oldz - 16;\n\t\t} else if(currentDimension == 1) {\n\t\t\trelativex = oldx - 16;\n\t\t\trelativez = oldz - 16;\n\t\t} else if(currentDimension == 2) {\n\t\t\trelativex = oldx + 16;\n\t\t\trelativez = oldz + 16;\n\t\t} else {\n\t\t\trelativex = oldx - 16;\n\t\t\trelativez = oldz + 16;\n\t\t}\n\t\n\t\tif(currentDimension == 3) {\n\t\t\tcurrentDimension = 0;\n\t\t} else {\n\t\t\tcurrentDimension++;\n\t\t}\n\t\t\n\t\tif(currentDimension == 0) {\n\t\t\tplayer.position = new Vector3((relativex - 16), 0, (relativez + 16));\n\t\t} else if(currentDimension == 1) {\n\t\t\tplayer.position = new Vector3((relativex + 16), 0, (relativez + 16));\n\t\t} else if(currentDimension == 2) {\n\t\t\tplayer.position = new Vector3((relativex - 16), 0, (relativez - 16));\n\t\t} else {\n\t\t\tplayer.position = new Vector3((relativex + 16), 0, (relativez - 16));\n\t\t}\n\t}**/\n\t\n\tif(Input.GetKeyUp(KeyCode.LeftControl)) {\n\t\n/**\t\tvar oldx = player.position.x;\n\t\tvar oldz = player.position.z;\n\t\tvar relativex;\n\t\tvar relativez;\n\t\t\n\t\tif(currentDimension == 0) {\n\t\t\trelativex = oldx + 50;\n\t\t\trelativez = oldz - 50;\n\t\t} else if(currentDimension == 1) {\n\t\t\trelativex = oldx - 50;\n\t\t\trelativez = oldz - 50;\n\t\t} else if(currentDimension == 2) {\n\t\t\trelativex = oldx + 50;\n\t\t\trelativez = oldz + 50;\n\t\t} else {\n\t\t\trelativex = oldx - 50;\n\t\t\trelativez = oldz + 50;\n\t\t}\n\t\n\t\tif(currentDimension == 3) {\n\t\t\tcurrentDimension = 0;\n\t\t} else {\n\t\t\tcurrentDimension++;\n\t\t}\n\t\t\n\t\tif(currentDimension == 0) {\n\t\t\tplayer.position = new Vector3((relativex - 50), 2, (relativez + 50));\n\t\t} else if(currentDimension == 1) {\n\t\t\tplayer.position = new Vector3((relativex + 50), 2, (relativez + 50));\n\t\t} else if(currentDimension == 2) {\n\t\t\tplayer.position = new Vector3((relativex - 50), 2, (relativez - 50));\n\t\t} else {\n\t\t\tplayer.position = new Vector3((relativex + 50), 2, (relativez - 50));\n\t\t}\n\t\t\n*/\n\t\tvar nextUniverse = currentDimension + 1;\n\t\t\n\t}\n}", "title": "" }, { "docid": "e2b2f70510f6208a66f315d50ab5ce94", "score": "0.59745914", "text": "function movePlayer (direction) {\n var top = getCssPxValue($(\"#player\").css(\"top\"));\n var left = getCssPxValue($(\"#player\").css(\"left\"));\n switch (direction) {\n case 1:\n top = top - move;\n break;\n case 2:\n left = left + move;\n break;\n case 3:\n top = top + move;\n break;\n case 4:\n left = left - move;\n break;\n }\n if (top >= topBorder\n && top <= (bottomBorder - move)\n && left >= leftBorder\n && left <= (rightBorder - move)\n && !positionIsUsed(top, left)) {\n $(\"#player\").css(\"top\", top + \"px\");\n $(\"#player\").css(\"left\", left + \"px\");\n }\n\n if (playerInFinish()) {\n won = true;\n alert(\"You got it!!!\");\n }\n}", "title": "" }, { "docid": "420fe527c29a314a8350e19e5a0ceb9c", "score": "0.59708625", "text": "movePlayerToStart() {\n const INITIAL_PLAYER_X = 202;\n const INITIAL_PLAYER_Y = 390;\n this.x = INITIAL_PLAYER_X;\n this.y = INITIAL_PLAYER_Y;\n }", "title": "" }, { "docid": "9284263df9928768940f95ee0e4bf7dd", "score": "0.59343135", "text": "function updatePlayerInfo(){\n // Conditions: player should have been initialized, player should be playing, and duration should be available\n if (player && YT.PlayerState.PLAYING && duration > 0){\n moveLine(player.getCurrentTime());\n }\n}", "title": "" }, { "docid": "38df36596f98c00b6a027cd739ea770b", "score": "0.5932125", "text": "moved() {\n this.x = this.x + (this.sx / 300) * this.speed;\n this.y = this.y + (this.sy / 300) * this.speed;\n }", "title": "" }, { "docid": "a0ad50a5aeb1350e8d27163a66c68cd8", "score": "0.59306633", "text": "function playerPlaceShip() {\n\tcellHasPlayerShip(current.playerCell);\n\taddShipNumberClass(current.playerCell);\n\tvar shipSize = current.shipSize;\n\tfor (var i = 1; i < shipSize; i++) {\n\t\tmarkAdjacentCell('player');\n\t}\n}", "title": "" }, { "docid": "86ee9fae78f3bba4af7dab4e5988f29f", "score": "0.59288716", "text": "function fixPos(player) {\n const [y, x] = player.position;\n player.position = [x, y];\n return player;\n}", "title": "" }, { "docid": "f6c12204ed32912c8c0daf22a7f9252d", "score": "0.5920061", "text": "update() {\n if (this.y > 380) {\n this.y = 380;\n }\n if (this.x > 400) {\n this.x = 400;\n }\n //When game is won, reset player position\n if (this.y <= 0) {\n this.x = 200;\n this.y = 380;\n }\n if (this.x < 0) {\n this.x = 0;\n }\n }", "title": "" }, { "docid": "0a027366b27a5893442b14a31c16cf2d", "score": "0.59140795", "text": "jumpToStart(player) {\n this.updatePlayerPosition(player, this.tiles[0]);\n }", "title": "" }, { "docid": "cdab44e4d7c8e5b389989a3ace0be5af", "score": "0.5909358", "text": "update () {\n if (this.yCoordinate < topOfTheMap) {\n scoreBoard.innerHTML = Number(scoreBoard.innerHTML) + 100;\n this.resetPlayer();\n }\n if (this.yCoordinate > bottomOfTheMap) {\n this.yCoordinate -= playerMoveAmount;\n }\n if (this.xCoordinate < rightOfTheMap) {\n this.xCoordinate += playerMoveAmount;\n }\n if (this.xCoordinate > leftOfTheMap) {\n this.xCoordinate -= playerMoveAmount;\n }\n }", "title": "" }, { "docid": "8416e5ce52cc0e0e7e2f924af254c26c", "score": "0.5904932", "text": "function move() {\n\tif (LEFT) {\n\t\tplayer.x -= player.speed;\n\t}\n\tif (RIGHT) {\n\t\tplayer.x += player.speed;\n\t}\n\tif (UP) {\n\t\tplayer.y -= player.speed;\n\t}\n\tif (DOWN) {\n\t\tplayer.y += player.speed;\n\t}\n}", "title": "" }, { "docid": "448bd1077c1ebbdcd6c7e1528299e666", "score": "0.59024453", "text": "function playerLeft() {\n if (player.offsetLeft <= 50){\n return;\n }\n\n player.style.left = player.offsetLeft - motionStepPlayer + \"px\";\n\n}", "title": "" }, { "docid": "33b781529a175e82c9fb43bc0f7e49d3", "score": "0.5900472", "text": "function move() {\n if (player.direction == MOVE_NONE) {\n player.moving = false;\n console.log(player.y);\n return;\n }\n player.moving = true;\n console.log(\"move\");\n \n if (player.direction == 1) //go left\n createjs.Tween.get(player).to({x: player.x - 32}, 500).call(move);\n \n if (player.direction == 2) //go right\n createjs.Tween.get(player).to({x: player.x + 32}, 500).call(move);\n\n if (player.direction == 3) //go up\n createjs.Tween.get(player).to({y: player.y - 32}, 500).call(move);\n \n if (player.direction == 4) // go down\n createjs.Tween.get(player).to({y: player.y + 32}, 500).call(move);\n}", "title": "" }, { "docid": "c890bf7a5b03febb136f10581070ba2f", "score": "0.5897029", "text": "updatePos() {\n // Move logo along its vector\n this.x += this.vector.moveX * this.vel;\n this.y += this.vector.moveY * this.vel;\n }", "title": "" }, { "docid": "2dfb4bd09f17a6ba1614996902b84778", "score": "0.5887447", "text": "function correctPlayerPosition(){\n for(let id in players){\n let player = players[id];\n if(player.x >= (CANVAS_WIDTH-40)){\n player.x = CANVAS_WIDTH-40;\n }\n if(player.y >= (CANVAS_HEIGHT-40)){\n player.y = CANVAS_HEIGHT-40;\n }\n }\n}", "title": "" }, { "docid": "daf100b2e4cf3ec906760dd2cd4d9c42", "score": "0.5885842", "text": "function update(){\n // Case: difference smaller than frame speed\n if (Math.abs(pointer.old_pos - pointer.current_pos) < pointer.velocity){\n pointer.wrapper.style.left = pointer.current_pos+'px';\n pointer.old_pos = pointer.current_pos;\n // Case: moving to next image (in process)\n } else if (pointer.old_pos > pointer.current_pos) {\n pointer.old_pos -= pointer.velocity;\n // Case: moving to previous image (in process)\n } else {\n pointer.old_pos += pointer.velocity;\n }\n // set appropriate position for container\n pointer.wrapper.style.left = pointer.old_pos+'px';\n \n // redraw on change\n if (pointer.old_pos != pointer.current_pos)\n window.requestAnimationFrame(update);\n \n }", "title": "" }, { "docid": "94017934c8cd3a3b792edceaa04ff6f0", "score": "0.5882097", "text": "move(){\n //Attract towards players X position - Keeping Y level\n this.sprite.attractionPoint(0.2, GameManager.player.ship.sprite.position.x, this.sprite.position.y)\n\n //Move Each Lazer\n this.lazersL.forEach(lazer => lazer.position.x = this.sprite.position.x - 150);\n this.lazersR.forEach(lazer => lazer.position.x = this.sprite.position.x + 150);\n }", "title": "" }, { "docid": "e6891e67120d789b68d50272ceba036f", "score": "0.58820444", "text": "function playerMove(){ //basic movement stuff, just like in the platformer\n\tif (leftMove == true && sdcPlayer.x > 0){\n\t\tsdcPlayer.x -= sdcPlayer.hspeed + Math.floor(stats[0]);\n\t}if (rightMove == true && sdcPlayer.x + sdcPlayer.w < canvas.width){\n\t\tsdcPlayer.x += sdcPlayer.hspeed + Math.floor(stats[0]);;\n\t}if (backMove == true && sdcPlayer.floorY > stageHeight){\n\t\tsdcPlayer.floorY -= sdcPlayer.vspeed + Math.floor(stats[0]);;\n\t\tsdcPlayer.y -= sdcPlayer.vspeed + Math.floor(stats[0]);;\n\t}if (forMove == true && sdcPlayer.y + sdcPlayer.h < canvas.height){\n\t\tsdcPlayer.floorY += sdcPlayer.vspeed + Math.floor(stats[0]);;\n\t\tsdcPlayer.y += sdcPlayer.vspeed + Math.floor(stats[0]);;\n\t}\n}", "title": "" }, { "docid": "8e33ac121d58ff7de104b297f593efac", "score": "0.58769304", "text": "function movePlayer() {\n // Update position\n let nextplayerX = playerX + playerVX;\n let nextplayerY = playerY + playerVY;\n\n // Wrap when player goes off the canvas\n if (nextplayerX - playerRadius/2 < 0) {\n // Off the left side, so it bounces back\n nextplayerX = playerX;\n }\n else if (nextplayerX + playerRadius/2 > width) {\n // Off the right side, so it bounces back\n nextplayerX = playerX;\n }\n\n if (nextplayerY - playerRadius/2 < 0) {\n // Off the top, so it bounces back\n nextplayerY = playerY;\n }\n else if (nextplayerY - playerRadius/2 > height) {\n // Off the bottom, so it bounces back\n nextplayerY = playerY;\n }\n playerX = nextplayerX;\n playerY = nextplayerY;\n}", "title": "" }, { "docid": "6fa0aa27164105e7c07fa73a3316c86e", "score": "0.5873395", "text": "function alterPlayer () {\n if(lastMove === 'X') {\n lastMove = 'O';\n $('.name').text('O');\n }\n else {\n lastMove = 'X';\n $('.name').text('X');\n }\n }", "title": "" }, { "docid": "46f1963c23f3ea512705106a3a132f95", "score": "0.58724487", "text": "updatePosition () {\n this.x += this._xOffset;\n this.y += this._yOffset;\n }", "title": "" }, { "docid": "72e99c445126fc6c72d212a315ad6995", "score": "0.5865769", "text": "moveAnimate(){\n\n\t\t\tif(!this.props.menu.menuDisplay) {\n\t\t \tconst { sy, s } = this.props.player\n\t\t switch(sy){\n\t\t case 0: //down\n\t\t this.isMessage(0, s)\n\t\t break\n\t\t case 48: //left\n\t\t this.isMessage(-s, 0)\n\t\t break\n\t\t case 96: //right\n\t\t this.isMessage(s, 0)\n\t\t break\n\t\t case 144: //up\n\t\t this.isMessage(0, -s)\n\t\t break\n\t\t }\n\t\t\t}\n\t }", "title": "" }, { "docid": "0c3a58c9df8d5545d9d46e7d3a69ebe0", "score": "0.5863302", "text": "function updateAvatar(width, height, position) {\n //resize and relocate the avatar each 15 mils with animate()\n $avatar.animate({\n width: '-='+width,\n height: '-='+height,\n left: '-='+position+'px',\n top: '-='+position+'px'\n },15);\n}", "title": "" }, { "docid": "21d5e2cd1021dbcb8cc60fc438215fc3", "score": "0.5863116", "text": "function positionManager(){\n if(keyIsDown(RIGHT_ARROW)){\n if(playerX < width - 120){playerX += (0 + velocity * 0.6)}\n if(!playerMoved){\n playerMoved = true;\n }\n }\n if(keyIsDown(LEFT_ARROW)){\n if(playerX > 120){playerX -= (0 + velocity * 0.6)}\n if(!playerMoved){\n playerMoved = true;\n }\n }\n if(keyIsDown(UP_ARROW)){\n if(velocity < 8){velocity += 0.1;}\n }\n if(keyIsDown(DOWN_ARROW)){\n if(velocity > 0 ){velocity -= 0.1;}\n }\n// print(\"velocity = \" + velocity);\n}", "title": "" }, { "docid": "e67c29b2e36886183333a5fabe478ef2", "score": "0.5856374", "text": "move() {\n\t\tthis.x -= 16;\n\t}", "title": "" }, { "docid": "597ab005a663cb739d43093c00c64c47", "score": "0.5851388", "text": "function barMovement(){\n if(player.getCurrentTime && player.getDuration){\n \n // the percentage of the bar that the dot should move\n let fraction = (player.getCurrentTime()/player.getDuration())*100;\n \n // moves the dot across the bar \n progressDot.style.left = fraction.toString() + '%';\n }\n}", "title": "" }, { "docid": "957ab0325f6df258d4575a56cd7183f3", "score": "0.58467674", "text": "function move(x, y) {\n if (!Game){ //if for some reason game paused, resume game. \n Game = true;\n GameCycle();\n }\n \n // ('000' + pos_y).substr(-3)\n x = Number(x)\n\n player_one.pos_x = (('000' + (Number(player_one.pos_x) + x)).substr(-3)); //increment coordinates\n player_one.pos_y = (('000' + (Number(player_one.pos_y) + y)).substr(-3));\n\n document.querySelector('#row-' + player_one.pos_x + '_col-' + player_one.pos_y).appendChild(pPos); //append player to new tile\n playerPosition = '#row-' + player_one.pos_x + '_col-' + player_one.pos_y;\n\n clearEncounters(); //clear encounters so new can come!\n check(); // do position check everytime we move\n}", "title": "" }, { "docid": "42e27d26094000f6de6df8406c09caff", "score": "0.58445704", "text": "function update_position() {\n var nickel = document.getElementById(\"nickel\"); \n SPEED *= ACCELERATION;\n var y = parseInt(nickel.style.top);\n var x = parseInt(nickel.style.left);\n nickel.style.top = (y - SPEED) + \"px\";\n //nickel.style.left = (x + SPEED) + \"px\";\n console.log(SPEED, x, y);\n // If the piece has stopped moving then disable the timer.\n if (SPEED < 1) {\n clearInterval(timer);\n }\n}", "title": "" }, { "docid": "5c90afaf200b028be8cf8cb5f1882bb8", "score": "0.5835465", "text": "function AIMove(){\n\tvar move = miniMax(board, player, 0, -2, 2)[0];\n\tif(checkValid(board, columnToIndex(move, board))){\n\t\tboard = makeMove(board, columnToIndex(move, board),player);\n\t\tplayer = changeTurn(player);\n\t\tredraw();\n\t}\t\n}", "title": "" }, { "docid": "66150d89902bf77dc13aa2bffa0eedc3", "score": "0.5835034", "text": "function movePlayerChar() {\n\t\t\tclearTimeout(timePassed);\n\t\t\t\n\t\t\tvar character = $('#userCharacter');\n\t\t\t\n\t\t\tvar speedCoeficient = $('#speedPicker').val();\n\t\t\tvar speed = speedCoeficient < 50 ? (speedCoeficient/5) + 5 : (speedCoeficient/9) + 10;\n\t\t\t\n\t\t\tvar rightPos = parseInt(document.getElementById('userCharacter').style.right, 10);\n\t\t\tdocument.getElementById('userCharacter').style.right = (rightPos - speed) + \"px\";\n\t\t\t\n\t\t\t\n\t\t\tif(character.position().left >= $('#line').position().left){\n\t\t\t\tcharacter.position().left = $('#line').position().left\n\t\t\t\traceOccuring = false;\n\t\t\t\tcharacter.clearQueue();\n\t\t\t\tcharacter.stop();\n\t\t\t}\n\t\t\t\n\t\t\tvar path = document.getElementById('userCharacter').src.split('/');\n\t\t\tvar image = path[path.length - 2] + '/' + path[path.length-1];\n\t\t\t\n\t\t\tif(image != document.getElementById('userCharacter').dataset.running){\n\t\t\t\tdocument.getElementById('userCharacter').src = document.getElementById('userCharacter').dataset.running;\n\t\t\t}\n\t\t\ttimePassed = setTimeout(function() {document.getElementById('userCharacter').src = document.getElementById('userCharacter').dataset.idle;}, 250);\n\t\t}//end movePlayerChar()", "title": "" }, { "docid": "145c7bf20b51cbcc9307c711107ddb60", "score": "0.583462", "text": "changePos(newPos)\n {\n // Empty the \"square of departure\".\n Tile.set(this.pos, \"\");\n // Change the pos variable.\n this.pos = newPos;\n // Place the piece on the \"square of arrival\".\n Tile.set(newPos, this.char);\n // Increment timesMoved.\n this.timesMoved++;\n }", "title": "" }, { "docid": "590f252cffdf2911ab0be13dc6cad0db", "score": "0.5832158", "text": "function playerMoveBottom() {\n playerY += 10;\n}", "title": "" }, { "docid": "6af9dee475e0759c76252723cfe565dc", "score": "0.5829156", "text": "function moveMyAvatar(){\n myAvatar.position.x+= avatarVX;\n myAvatar.position.y+= avatarVY;\n if (myAvatar.position.x < 0){\n myAvatar.position.x= 0;\n }\n if (myAvatar.position.x > width){\n myAvatar.position.x = width;\n }\n if (myAvatar.position.y < 0){\n myAvatar.position.y = 0;\n }\n if (myAvatar.position.y > height){\n myAvatar.position.y = height;\n }\n}", "title": "" }, { "docid": "e38567873af79e7fffd4ce259930f265", "score": "0.582371", "text": "getUpActionUpdate() {\n var movingPicKey = this.state.currentUser.getTransitionGif(\"up\") \n this.setState({ moving: true });\n this.state.currentUser.changeLocation(\"up\");\n this.updateLocationStates(this.state.currentUser.getLocationInfo());\n this.setState({ movingPic: movingPicKey });\n this.setUserActive();\n this.turnOffLeftBar();\n this.turnOffRightBar();\n }", "title": "" }, { "docid": "4125500c5e486a40e856da96068800ea", "score": "0.58226556", "text": "move(direction, modifier){\n this.sprite.updateAnimation();\n super.move(direction, modifier);\n }", "title": "" } ]
a7292243ebe3254212b9d9216d881af8
Compiles, minifies, file injection, asset revisioning.
[ { "docid": "43cf14aceb51d7ab0600a77cfae75c41", "score": "0.533329", "text": "function compile(callback) {\n var htmlFilter = filter('*.html');\n var jsFilter = filter('**/*.js');\n var cssFilter = filter('**/*.css');\n var assets;\n\n return gulp.src(path.join(config.paths.dev, '*.html'))\n .pipe(assets = useref.assets())\n .pipe(jsFilter)\n .pipe(gulpif(config.angular.enabled, ngAnnotate()))\n .pipe(uglify())\n .pipe(jsFilter.restore())\n .pipe(cssFilter)\n .pipe(cleanCSS())\n .pipe(cssFilter.restore())\n .pipe(assets.restore())\n .pipe(useref())\n .pipe(htmlFilter)\n .pipe(preprocess({ context: { NODE_ENV: 'production' } }))\n .pipe(gulpif(config.html.minify, minifyHtml(config.html)))\n .pipe(htmlFilter.restore())\n .pipe(gulp.dest(path.join(config.paths.build, '/')))\n .pipe(gulpif(config.build.gzip, gzip()))\n .pipe(gulp.dest(path.join(config.paths.build, '/')))\n .pipe(gulpif(config.build.archive, zip('build.zip')))\n .pipe(gulp.dest(path.join(config.paths.build, '/')))\n // .pipe(gulpif(config.build.folder, folder(callback)))\n}", "title": "" } ]
[ { "docid": "729aea5d5fa6972ce31be311cd92458c", "score": "0.63687766", "text": "make () {\n this.clean()\n this.copyAssets()\n this.buildHTML()\n this.buildJavaScript()\n this.buildCSS()\n }", "title": "" }, { "docid": "5a0c95cab269cae640a57529d534075e", "score": "0.605114", "text": "exec () {\n switch (this.task) {\n case 'assets': {\n AssetsBuilder.build(this.ckanJson.extensions, this.extDir);\n break;\n }\n default:\n break;\n }\n }", "title": "" }, { "docid": "2d4b07a2535d8d6ba43ed55ee38e4c60", "score": "0.5966131", "text": "function finalizeCompile () {\n if (fs.existsSync(path.join(__dirname, './lib'))) {\n // Build package.json version to lib/version/index.js\n // prevent json-loader needing in user-side\n const versionFilePath = path.join(process.cwd(), 'lib', 'version', 'index.js');\n const versionFileContent = fs.readFileSync(versionFilePath).toString();\n fs.writeFileSync(\n versionFilePath,\n versionFileContent.replace(\n /require\\(('|\")\\.\\.\\/\\.\\.\\/package\\.json('|\")\\)/,\n `{ version: '${packageInfo.version}' }`,\n ),\n );\n // eslint-disable-next-line\n console.log('Wrote version into lib/version/index.js');\n\n // Build package.json version to lib/version/index.d.ts\n // prevent https://github.com/ant-design/ant-design/issues/4935\n const versionDefPath = path.join(process.cwd(), 'lib', 'version', 'index.d.ts');\n fs.writeFileSync(\n versionDefPath,\n `declare var _default: \"${packageInfo.version}\";\\nexport default _default;\\n`,\n );\n // eslint-disable-next-line\n console.log('Wrote version into lib/version/index.d.ts');\n\n // Build a entry less file to dist/antd.less\n const componentsPath = path.join(process.cwd(), 'src');\n let componentsLessContent = '';\n // Build components in one file: lib/style/components.less\n fs.readdir(componentsPath, (err, files) => {\n files.forEach(file => {\n if (fs.existsSync(path.join(componentsPath, file, 'style', 'index.less'))) {\n componentsLessContent += `@import \"../${path.join(file, 'style', 'index.less')}\";\\n`.replace(/\\\\/g, '/');\n }\n });\n fs.writeFileSync(\n path.join(process.cwd(), 'lib', 'style', 'components.less'),\n componentsLessContent,\n );\n });\n }\n}", "title": "" }, { "docid": "d39d9be787b7f764dd094476749c0d1c", "score": "0.58958656", "text": "function compileAssets (opts) {\n // Reset the count each run.\n compileAssets.files_emitted = []\n\n const {\n project_directory,\n build_directory,\n callback,\n hash_files,\n project_config,\n build_cache,\n } = opts\n\n const { allow_asset_errors } = opts.command_options\n\n if (build_cache && build_cache.get('assets/*')) {\n callback(build_cache.get('assets/*'))\n return\n }\n\n const asset_source_dir = path.join(project_directory, 'assets')\n const asset_cache_dir = path.join(project_directory, '.asset-cache')\n let asset_dest_dir;\n if (project_config.ROOT_PREFIX) {\n asset_dest_dir = path.join(build_directory, project_config.ROOT_PREFIX, 'assets')\n } else {\n asset_dest_dir = path.join(build_directory, 'assets')\n }\n\n // Asset folder is not strictly required, so only warn if it doesn't exist.\n if (!fs.existsSync(asset_source_dir)) {\n SDKError.warn('assets', 'No project ./assets/ folder found.')\n callback && callback(null)\n return\n }\n\n let asset_hash = null\n if (hash_files) {\n // Hash all the compiled assets, not just the auto ones.\n const compiled_assets = walkSync(asset_source_dir)\n const hash = crypto.createHash('md5')\n compiled_assets.sort()\n compiled_assets.forEach( (asset_path) => {\n const _source_content = fs.readFileSync(asset_path)\n hash.update(_source_content, 'binary')\n })\n asset_hash = hash.digest('hex')\n asset_dest_dir = path.join(asset_dest_dir, asset_hash)\n }\n\n build_cache && build_cache.set('assets/*', asset_hash)\n\n fs.ensureDirSync(asset_cache_dir)\n fs.ensureDirSync(asset_dest_dir)\n\n // Ignore _ prefixed files to prevent trying to compile imported sass files\n // on their own.\n const assets = walkSync(asset_source_dir, ['_','.'])\n let to_process = assets.length\n\n assets.forEach((asset) => {\n processAsset({\n asset_source_dir : asset_source_dir,\n asset_cache_dir : asset_cache_dir,\n asset_dest_dir : asset_dest_dir,\n asset : asset,\n project_directory : project_directory,\n callback: (compilation_error) => {\n if (null != compilation_error) {\n console.log('\\n')\n console.error(compilation_error.formatted || compilation_error)\n console.log('\\n')\n if (!allow_asset_errors) {\n process.exit(1)\n }\n }\n to_process -= 1\n if (0 === to_process) {\n copyAssetsToBuild(project_directory, asset_cache_dir, asset_dest_dir)\n callback && callback(asset_hash)\n }\n },\n })\n })\n}", "title": "" }, { "docid": "6eafa6514492b8a8b3194acb5fb338dc", "score": "0.5851745", "text": "generateBundle(options, bundle, isWrite) {\n const entries = Object.keys(bundle).filter(name => bundle[name].isEntry)\n this.warn(`entries: ${entries.join(\" \")}`)\n const entry = bundle[entries[0]] // we assume there's only one\n const css = Object.keys(bundle).filter(name =>\n bundle[name].name && bundle[name].name.match(/^(vuetify|index)\\.css/)\n )\n this.warn(`css: ${css.join(\" \")}`)\n //this.warn(`options: ${JSON.stringify(options)}`)\n\n /*\n Object.entries(bundle).forEach(([name, info]) => {\n this.warn(name)\n Object.keys(info).forEach(k => {\n if (k == 'source' || k == 'code' || k == 'modules') return\n this.warn(` ${k}: ${JSON.stringify(info[k])}`)\n })\n })\n */\n\n this.emitFile({type: 'asset', fileName: 'start.js', source: `\nconst css = ${JSON.stringify(css.map(f => './'+f))}\nconst pre = ${JSON.stringify(entry.imports.map(f => './'+f))}\n\nconst head = document.getElementsByTagName('head')[0]\ncss.forEach(f => {\n const html = '<link rel=\"stylesheet\" href=\"' + f + '\">'\n head.insertAdjacentHTML('beforeend', html)\n})\npre.forEach(f => {\n const html = '<link rel=\"modulepreload\" href=\"' + f + '\">'\n head.insertAdjacentHTML('beforeend', html)\n})\nimport \"./${entry.fileName}\"\n `})\n }", "title": "" }, { "docid": "d087f5bbbd59286f83f8eab9f0f36494", "score": "0.58212316", "text": "function assets(){\n const assetsJs = src([\n target.src + 'script/plugin/modernizr/modernizr.js',\n target.src + 'script/plugin/detectizr/detectizr.js',\n target.src + 'script/plugin/jquery/jquery-3.3.1.min.js',\n target.src + 'script/plugin/prism/prism.js'\n ])\n .pipe(dest(target.buildSite + 'script'))\n .pipe(dest(target.buildStyleguide + 'script'))\n .pipe(dest(target.devFolder + 'script'));\n\n const assetsFont = src(target.src + 'font/**/*.*')\n .pipe(dest(target.buildSite + 'font'))\n .pipe(dest(target.buildStyleguide + 'font'))\n .pipe(dest(target.devFolder + 'font'));\n\n const assetsImg = src(target.src + 'img/**/*')\n .pipe(dest(target.buildSite + 'img'))\n .pipe(dest(target.buildStyleguide + 'img'));\n\n return merge(assetsJs, assetsFont, assetsImg);\n}", "title": "" }, { "docid": "893ff688a2bbb835f9196b36fa6bfeae", "score": "0.57815784", "text": "function compileAssigment(){\n \n}", "title": "" }, { "docid": "7ba5bbd73a9d843b7de813913e284a36", "score": "0.5585827", "text": "function compiler_build(input)\n{\n var state = DataCompiler.startBuild(input);\n var rinfo = DataCompiler.parseResourcePath(input.sourcePath);\n var mpath = DataCompiler.changeExtension(input.targetPath, 'texture');\n var apath = input.sourcePath; // attributes path\n var ppath = input.targetPath; // pixels path\n try\n {\n var ta = load_texture_attributes(state, apath, ppath);\n var md = TextureCompiler.compile(ta);\n save_texture_definition(mpath, md);\n state.addOutput(mpath);\n state.addOutput(ppath);\n }\n catch (error)\n {\n // add the error; build will be unsuccessful.\n state.addError(error);\n // when running stand-alone, output the error so the user knows\n // that something went wrong. in persistent mode, the error is\n // output for us by the build system.\n if (!application.args.persistent)\n {\n console.error('An error has occurred:');\n console.error(' '+error);\n console.error();\n process.exit(exit_code.ERROR);\n }\n }\n DataCompiler.finishBuild(state);\n}", "title": "" }, { "docid": "64c370f2ae786e2c1a7e65d61cbc2350", "score": "0.55731505", "text": "function compile() {\n\t\tif (!compiling) {\n\t\t\tcompiling = true;\n\t\t\t// Is this needed?\n\t\t\teditor.setOption(\"readOnly\", true);\n\t\t\tf = function(savedata) {\n\t\t\t\t// console.log(\"compiling \" + COMPILE_URL);\n\t\t\t\t$('#compilestatus').html(\"Compiling...\");\n\t\t\t\t$('#statusbar').addClass('compiling');\n\t\t\t\t$('#statusbar').removeClass('error');\n\t\t\t\t$.post(COMPILE_URL, {}, function(data) {\n\t\t\t\t\tconsole.log(data);\n\t\t\t\t\tcompiling = false;\n\t\t\t\t\teditor.setOption(\"readOnly\", false);\n\t\t\t\t\t$('#statusbar').removeClass('compiling');\n\t\t\t\t\tif (data.success) {\n\t\t\t\t\t\t$('#compilestatus').html(\"Compiled Successfully\");\n\t\t\t\t\t\t$('#statusbar').addClass('compiled');\n\t\t\t\t\t\t$('#statusbar').removeClass('error');\n\t\t\t\t\t\t$(\"#errordisplay\").html(\"\");\n\t\t\t\t\t\t$(\"#errordisplay\").slideUp(SLIDE_SPEED, function() {\n\t\t\t\t\t\t\tresetHeight();\n\t\t\t\t\t\t});\n\t\t\t\t\t\tclearErrors();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// console.log(\"Compile Error: \" + data);\n\t\t\t\t\t\t$(\"#errordisplay\").html(data.error);\n\t\t\t\t\t\t$(\"#errordisplay\").slideDown(SLIDE_SPEED, function() {\n\t\t\t\t\t\t\tresetHeight();\n\t\t\t\t\t\t});\n\t\t\t\t\t\t$('#compilestatus').html(\"Compilation Error\");\n\t\t\t\t\t\t$('#statusbar').addClass('error');\n\t\t\t\t\t\tprocessCompilerOutput(data.errors);\n\t\t\t\t\t}\n\t\t\t\t}, 'json');\n\t\t\t}\n\t\t\t// save if needed, else compile\n\t\t\tif (saved)\n\t\t\t\tf(null);\n\t\t\telse\n\t\t\t\tsave(f);\n\t\t}\n\t}", "title": "" }, { "docid": "899df31bd04147effb2777e178e16ece", "score": "0.55667764", "text": "apply(compiler) {\n compiler.plugin(\"done\", function() {\n fs.rename(\n path.join(__dirname, \"src\", \"staticresources\", \"astroStyles.css\"),\n path.join(__dirname, \"src\", \"staticresources\", \"astroStyles.resource\")\n );\n fs.rename(\n path.join(__dirname, \"src\", \"staticresources\", \"a48c5c6d31119800605ef0de228e4631.png\"),\n path.join(__dirname, \"src\", \"staticresources\", \"astroPNG.resource\")\n );\n });\n }", "title": "" }, { "docid": "452e96de5e1c81a53b05220a57894af8", "score": "0.5538624", "text": "function compile() {\n execSync(\"elm-make --yes \" + this.filename + \" --output \" + this.outputPath);\n}", "title": "" }, { "docid": "8f1f13cdb24016b803ce127e1704642f", "score": "0.5463016", "text": "apply (compiler) {\n\n /**\n * In the run hook,\n * Run spritesmith with the provided files.\n */\n compiler.plugin('watch-run', this.compile.bind(this))\n compiler.plugin('run', this.compile.bind(this))\n\n /**\n * In the emit hook,\n * Output the buffer returned by spritesmith.\n */\n compiler.plugin('emit', (compilation, callback) => {\n compilation.assets[this.options.result] = {\n source: () => this.buffer,\n size: () => this.buffer.length\n }\n callback()\n })\n\n /**\n * In the nmf after-resolve,\n * If we encounter a require to a file in the defined sprite files\n * Update to use our custom loader passing along context\n */\n compiler.plugin('normal-module-factory', nmf => {\n nmf.plugin('after-resolve', (data, cb) => {\n if (!data) { return cb() }\n\n const resolved = path.resolve(data.context, data.request)\n if (this.files.indexOf(resolved) > -1) {\n const coords = JSON.stringify(this.coords[resolved])\n data.loaders = [`${this.loaderPath}?${coords}`]\n }\n\n cb(null, data)\n })\n })\n\n /**\n * Add the generated file to the html webpack plugin so it can be rendered\n */\n compiler.plugin('compilation', compilation => {\n compilation.plugin('html-webpack-plugin-before-html-generation', (data, callback) => {\n data.assets.sprite = this.options.result\n callback()\n })\n })\n\n }", "title": "" }, { "docid": "331a52a8cef5d4e7201c0884423a8b8b", "score": "0.5453291", "text": "function developVendorsAssets() {\n return gulp\n .src(paths.vendors.assets)\n .pipe(\n imageMinification([\n imageMinification.jpegtran({progressive: true}),\n imageMinification.optipng({optimizationLevel: 5}),\n imageMinification.svgo({\n plugins: [{removeViewBox: true}, {cleanupIDs: true}],\n }),\n ]),\n )\n .pipe(gulp.dest(paths.vendors.targetDevelop));\n}", "title": "" }, { "docid": "219a350f0ec2739fd7acfe1c0b8d1bcf", "score": "0.54470545", "text": "function compileFile(filein, globals, cb){\n\n async.waterfall([\n function fileExists(next){\n fs.stat(filein, function(err){\n next(err);\n });\n },\n function renderTwigOnce(next){\n twig.renderFile(filein, globals, function(err) {\n next(err);\n });\n }, function loadRequests(next){\n extend.loadRequests(function(err, data){\n next(err, data);\n });\n }, function renderFileTwice(data, next){\n globals.__ = data;\n twig.renderFile(filein, globals, function(err, res){\n extend.clearRequests();\n next(err, res);\n });\n }\n ], cb);\n}", "title": "" }, { "docid": "77e13997900c2f5083516e8ae7c7868c", "score": "0.54451144", "text": "compileJavaScript() {\n var files = this.applyFilter(this.tasks.scripts);\n files.forEach(this.applyMixOnFiles, this);\n }", "title": "" }, { "docid": "f5cc87e23edd4c09f441b085270c4bf1", "score": "0.54230434", "text": "apply(compiler) {\n compiler.hooks.done.tap('Copy Images', function(){\n fse.copySync('./app/assets/images', './docs/assets/images')\n })\n }", "title": "" }, { "docid": "1e3dc6f7f21a409e54009035692179ec", "score": "0.5410786", "text": "compile() {\n const CREATE_UUID = () => {\n let dt = new Date().getTime();\n const uuid = 'xxxxxxxx'.replace(/[xy]/g, function (c) {\n const r = (dt + Math.random() * 16) % 16 | 0;\n dt = Math.floor(dt / 16);\n return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16);\n });\n return uuid;\n };\n let { alias, name, type, lib, content, componentName, globalprop } = this.config;\n let componentConfig = \"\";\n let bindingVariabel = \"\";\n let componentscript = \"\";\n let allPath = \"\";\n if (alias) {\n allPath = alias + this.path;\n }\n else {\n allPath = this.path;\n }\n if (!(name?.length > 0) || name === void 0) {\n name = path.basename(this.path).replace(/\\.\\w*/igm, \"\");\n }\n // Reciprocal.js (include library by daber)\n const sort_int = (args = []) => {\n let restore;\n // bublle short\n for (let i = 0; i < args.length; i++) {\n for (let j = i; j < args.length; j++) {\n if (args[i] > args[j]) {\n restore = args[i];\n args[i] = args[j];\n args[j] = restore;\n }\n }\n }\n // check if has the same value that will delete\n // and push the different value into the result\n let result = [];\n for (let x = 0; x < args.length; x++) {\n if (args[x] === args[x + 1]) {\n delete args[x];\n }\n else {\n result = [...result, args[x]];\n }\n }\n // redeclarate and make it empty\n args = [];\n return result;\n };\n // sort function for all type and custom flow\n const clear_paste = (args = [], type = '') => {\n let result = [];\n if (type === 'string') {\n for (let i = 0; i < args.length; i++) {\n for (let j = i; j < args.length; j++) {\n if (args[i] === args[j] && i !== j) {\n delete args[i];\n }\n }\n }\n for (const x of args) {\n if (x) {\n result = [...result, x];\n }\n }\n return result;\n }\n if (type === 'number') {\n return sort_int(args);\n }\n if (type === 'object' && args[0] instanceof Object) {\n const property_of_args = [];\n for (const x of args) {\n for (const y in x) {\n property_of_args.push(y);\n break;\n }\n }\n for (let x = 0; x < args.length; x++) {\n for (let y = x; y < args.length; y++) {\n for (const z of property_of_args) {\n if (args[x].hasOwnProperty(z)) {\n if (args[x][z] === args[y][z] && x !== y) {\n args[x] = {};\n }\n }\n }\n }\n }\n for (const x of args) {\n if (Object.keys(x).length > 0) {\n result.push(x);\n }\n }\n return result;\n }\n };\n function convertToText(obj) {\n // create an array that will later be joined into a string.\n const string = [];\n // is object\n // Both arrays and objects seem to return \"object\"\n // when typeof(obj) is applied to them. So instead\n // I am checking to see if they have the property\n // join, which normal objects don't have but\n // arrays do.\n if (typeof (obj) == 'object' && (obj.join == undefined)) {\n string.push('{');\n for (const prop in obj) {\n string.push(prop, ': ', convertToText(obj[prop]), ',');\n }\n string.push('}');\n // is array\n }\n else if (typeof (obj) == 'object' && !(obj.join == undefined)) {\n string.push('[');\n for (const prop in obj) {\n string.push(convertToText(obj[prop]), ',');\n }\n string.push(']');\n // is function\n }\n else if (typeof (obj) == 'function') {\n string.push(obj.toString());\n // all other values can be done with JSON.stringify\n }\n else {\n string.push(JSON.stringify(obj));\n }\n return string.join('');\n }\n // =============================================================\n // ==================== compiler component =====================\n // =============================================================\n // kita membuat parser untuk html\n // untuk parser yang di gunakan adalah htmlparser2\n // parser ini di ambil dari https://www.npmjs.com/package/htmlparser2\n const fs = require('fs');\n const HTMLParser = require('node-html-parser');\n const htmlparser2 = require('htmlparser2');\n const beautify = require('js-beautify').js;\n const error = require('./Error');\n const Include = require('./libseleku');\n let StyleHandle = require(\"./StyleComponent.js\");\n // variabel yang menyimpan hasil compile (2:11)\n let result_compile = [];\n // membuat array yang berisi kumpulan components (2:1)\n const components = [];\n // memparse tag yang ada di file .seleku (2:2)\n // (getFileText)\n const all_components = [...HTMLParser.parse((content) ? content : fs.readFileSync(allPath).toString()).childNodes];\n // membuat fungsi yang menghandle hasil parse (2:3)\n function getObjectFromParser(parser_tokens) {\n if (all_components.length === 0)\n console.log('the file is empty');\n // variabel yang menyimpan attribute dari element (2:5)\n let attribute = [];\n // membuat perulangan untuk mengisi array attribute (2:4)\n for (const $query of parser_tokens) {\n if ($query && $query.rawTagName !== null) {\n // mengambil attributes dan membuat menjadi object\n const array_of_attr = $query.rawAttrs?.match(/\\w*=\".*?\\\"/igm) || [];\n let object_attribute = {};\n for (const data of array_of_attr) {\n const split_of_attr = data.split('=');\n // console.log(split_of_attr)\n object_attribute = { ...object_attribute, [split_of_attr[0]]: {\n value: split_of_attr[1].replace(/\\'/igm, '').replace(/\\\"/igm, ''),\n },\n };\n }\n attribute.push(object_attribute);\n }\n }\n // memfilter attribute agar tidak berisi attribute kosong (2:6)\n attribute = attribute.filter((attr_) => {\n for (const x in attr_) {\n if (x) {\n return attr_;\n }\n }\n });\n // variabel ini akan berisi komponent anak (2:8)\n let child = [];\n // mengisi variabel anak (2:7)\n for (const $query of parser_tokens) {\n if ($query && $query.rawTagName !== null && $query.childNodes?.length > 0) {\n for (let _anony = 0; _anony < $query.childNodes.length; _anony++) {\n child.push(getObjectFromParser([$query.childNodes[_anony]]));\n }\n }\n }\n // memfilter variabel anak agar tidak ada undefined (2:9)\n child = child.filter((obj, index) => obj);\n for (const $query of parser_tokens) {\n if ($query && $query.rawTagName !== null && $query.childNodes?.length > 0) {\n return {\n element: $query.rawTagName,\n inner: ($query.rawTagName === 'config') ? '' : $query.rawText.replace(/(\\n|\\r|\\t)*/igm, ''),\n attribute,\n child,\n };\n }\n }\n }\n // mengisi hasil parser ke variabel result dan di filter\n // agar style dan script tidak di include (2:10)\n for (const $query of all_components) {\n if ($query.rawTagName !== 'style' && $query.rawTagName !== 'script' && $query)\n result_compile.push(getObjectFromParser([$query]));\n }\n // memfilter agar tidak ada yang undefined di array result (2:11)\n result_compile = result_compile.filter((data) => data);\n // variabel yang akan menyimpan alias dari preprocessing (2:23)\n let Alias = [];\n // variabel ini di gunakan untuk membuat configurasi ketika mengcompile\n // (2:25)\n const config = [];\n // variabel ini akan menyimpan nilai index dari error handling preprocess\n // (2:27)\n let same = '';\n // mengset agar config di set satu kali (2:31)\n let setConfig = 0, setJS = 0, CSS_FROM_COMPONENTS = [];\n // fungsi ini berfungsi untuk membuat inner yang benar\n // dan memindahkan ke variabel result (2:12)\n function getValue(object_, $stringToError) {\n let Name = '';\n let css = \"\";\n const fix = {};\n const parser = new htmlparser2.Parser({\n onopentag(name, attributes) {\n // di sini untuk mencari tau apakah tag pertama nya\n if (name !== 'style' && name !== 'script') {\n Name = name;\n // console.log(name)\n }\n else {\n if (name === 'script' && attributes['seleku:ecosystem']?.replace(/\\{/igm, '').replace(/\\}/igm, '') === 'true') {\n config.push({ name, 'seleku:ecosystem': attributes['seleku:ecosystem']?.replace(/\\{/igm, '').replace(/\\}/igm, '') });\n }\n // javascript include (JSinclude)\n if (name === \"script\" && !(attributes['seleku:ecosystem']) && !(attributes['seleku:ignore'])) {\n config.push({ name, 'JS': \"true\" });\n }\n if (name === \"style\" && !(attributes['seleku:ecosystem'] || attributes['seleku:ignore'])) {\n css = \"style\";\n }\n }\n },\n ontext(text) {\n // di sini untuk inner dari tag\n // console.log({text,Name});\n // console.log(fix)\n if (css === \"style\") {\n CSS_FROM_COMPONENTS.push(text);\n css = \"\";\n }\n // membuat preprocessing (2:22)\n if (/\\#define.*/igm.test(text)) {\n let typed = text.split('\\n');\n typed = typed.filter((el, index) => /\\#define.*/igm.test(el));\n typed = typed.map((el, index) => {\n return el.split(' ');\n });\n for (const x_ of typed) {\n if (x_.length === 3) {\n Alias.push({ alias: x_[1], value: x_[2].replace(/(\\r|\\t|\\n)/igm, '') });\n }\n else {\n // membuat error handling untuk preprocess (2:28)\n const indexOfError = () => {\n const position = [];\n const all_ = $stringToError.split('\\n');\n const text = [];\n // console.log(all_)\n for (let x = 0; x < all_.length; x++) {\n if (eval(`(all_[x].match(/\\\\#define.*/igm) && all_[x].match(/\\\\${x_[1].trim()}.*/igm))`)) {\n position.push(x);\n text.push(all_[x]);\n }\n }\n ;\n return { position, text };\n };\n for (const loc in indexOfError().position) {\n if (same.indexOf((indexOfError().position[loc] + 1).toString()) === -1) {\n error({ config: { name: 'syntax', type: 'preprocess' }, message: indexOfError().text[loc].trim(), info: '\\ttidak dapat mendifinisikan preProcess variabel', line: indexOfError().position[loc] + 1 });\n same += ` ${indexOfError().position[loc] + 1}`;\n break;\n }\n }\n }\n }\n // Alias.push({alias: typed[1],value: typed[2].replace(/(\\r|\\t|\\n)/igm,\"\")})\n }\n for (const $config_ of config) {\n if (setConfig !== 1 && $config_.name === 'script' && $config_['seleku:ecosystem'] === 'true') {\n let Text = { text };\n componentConfig += Text.text.replace(/return/igm, \"\");\n $config_['seleku:ecosystem'] = \"false\";\n setConfig = 1;\n }\n if (setJS !== 1 && $config_.name === \"script\" && $config_[\"JS\"] === \"true\") {\n componentscript = text.replace(/\\export/igm, \"\");\n let props = text.match(/export.*/igm);\n let prop = props?.map((text, index) => {\n if (text.indexOf(\"export\") !== -1 && (text.indexOf(\"let\") !== -1 || text.indexOf(\"var\") !== -1) && text.split(\" \").length >= 3) {\n return text.split(\" \");\n }\n });\n let objectBinding = \"\";\n for (let $x of prop) {\n objectBinding += $x[2] + \",\";\n }\n bindingVariabel = `{${objectBinding}}`;\n $config_[\"JS\"] = \"false\";\n setJS = 1;\n }\n }\n if (object_.inner.match(text.replace(/(\\n|\\t|\\r)/igm, '')) && text.length > 0 && object_.element === Name && !(/\\@css*/igm.test(text)) && !(/\\@js*/igm.test(text)) && text.replace(/(\\n|\\t|\\r)/igm, '').length > 0) {\n object_.inner = text.replace(/(\\n|\\t|\\r)/igm, '');\n if (object_.child.length > 0) {\n for (const $x of object_.child) {\n // (getFileText)\n getValue($x, (content) ? content : fs.readFileSync(allPath).toString());\n }\n }\n // console.log(object_);\n }\n },\n onclosetag(tagname) {\n },\n });\n // (getFileText)\n parser.write((content) ? content : fs.readFileSync(allPath).toString());\n parser.end();\n // console.log(config)\n }\n // console.log(result_compile);\n // mengset setiap nilai (2:13)\n for (const $components_ of result_compile) {\n // (getFileText)\n getValue($components_, (content) ? content : fs.readFileSync(allPath).toString());\n }\n // melakukan filter ke css dari komponents (2:32)\n CSS_FROM_COMPONENTS = clear_paste(CSS_FROM_COMPONENTS, \"string\");\n // melakukan filter terhadap array hasil aliases (2:24)\n // define property (DefineItem)\n clear_paste(Alias, typeof Alias);\n Alias = Alias.filter((el, index) => {\n for (const $x in el) {\n return el.hasOwnProperty($x);\n }\n });\n // console.log(Alias)\n // membuat fungsi untuk me-replace pre variabel (2:26)\n function preProcess(object_, alias) {\n for (const $text of alias) {\n if (object_.inner.match($text.alias)) {\n object_.inner = eval(`object_.inner.replace(/\\\\${$text.alias}/igm,\"${$text.value}\")`);\n }\n if (object_.child.length > 0) {\n for (const $child of object_.child) {\n preProcess($child, alias);\n }\n }\n }\n }\n // melakukan pe replace an (2:27)\n for (const $components_ of result_compile) {\n preProcess($components_, Alias);\n }\n // ini hasil compile element (writeFile)\n // (getFileText)\n // fs.writeFileSync(__dirname+'/../src/result.js', beautify(convertToText(result_compile), {indent_size: 2, space_in_empty_paren: true}));\n // fungsi ini merupakan fungsi yang akan menghandle untuk\n // mengimport components (2:14)\n function getImport(object) {\n // variabel ini akan menyimpan string dari file .seleku (2:15)\n const all_token = object.split(' ');\n // variabel ini akan berisi lokasi dan string yang akan di import (2:16)\n const location = [];\n // melakukan pengisian (2:17)\n all_token.forEach(($x, index_) => {\n if (/\\@import/igm.test($x)) {\n location.push({ index: index_, token: $x.match(/\\@import/igm)[0] });\n }\n if (/\\{/igm.test($x) && location.length > 0 && /\\@import/igm.test(all_token[index_ - 1])) {\n location.push({ index: index_, token: $x.match(/\\{/igm)[0] });\n }\n if (/\\}/igm.test($x) && /\\{/igm.test(location[location.length - 1]?.token)) {\n location.push({ index: index_, token: $x.match(/\\}/igm)[0] });\n }\n });\n // variabel ini akan berisi token yang sudah di olah (2:18)\n let result = all_token.slice(location[0]?.index, location[location?.length - 1]?.index + 1)?.join(' ').replace(/\\<.*/igm, '').replace(/\\#.*/igm, '');\n // membuat token menjadi array (2:19)\n result = result.replace(/\\}/igm, '').replace(/(\\n|\\t|\\r)/igm, '').replace(/\\,/igm, '{').split('{');\n // variabel ini akan menyimpan hasil akhir (2:20)\n const final_import = [];\n // forEach di bawah ini berfungsi untuk membuat\n // agar bisa mendapatkan error dari sintax (2:21)\n result.forEach((el, index) => {\n if (/\\@import/igm.test(el.trim())) {\n final_import.push(el.match(/\\@import.*/)[0]);\n }\n const token = el.split(' ');\n if (token.length === 3 && token[1] === 'as') {\n final_import.push({\n alias: token[0],\n path: token[token.length - 1],\n });\n }\n else if (!(/\\@import/igm.test(el))) {\n const indexOfError = () => {\n let position = 0;\n const all_ = object.split('\\n');\n // console.log(all_)\n for (let x = 0; x < all_.length; x++) {\n if (all_[x].match(el)?.length > 0) {\n position = x;\n break;\n }\n }\n ;\n return position;\n };\n error({ config: { name: 'syntax', type: 'import' }, message: el, line: indexOfError() + 1, info: `\\ttidak dapat mengimport module` });\n }\n });\n return final_import;\n }\n // ini hasil import file (importFile)\n // (getFileText)\n const data = getImport((content) ? content : fs.readFileSync(allPath).toString().replace(/\\@import*\\{/igm, '@import {'));\n // (2:33)\n let ChildComponent = \"\";\n // proses pengambilan import component\n for (let $child of data.slice(1, data.length)) {\n if (data[0]?.trim() === \"@import\") {\n try {\n const GetImport = new Include({\n name: $child.alias,\n path: alias + $child.path.replace(/\\\"/igm, \"\"),\n });\n let child = new Compiler({ path: \"\", config: {\n type: \"component\",\n content: GetImport.getSyntax,\n componentName: $child.alias,\n lib: [\n \"all\",\n ],\n // ini ari di ubah (NOTE)\n globalprop: true\n } }).compile();\n ChildComponent += child.js;\n if (child.globalProps)\n componentscript += child.globalProps;\n }\n catch (err) {\n console.log(err.message);\n }\n }\n }\n // membuat lib include (2:29)\n function includeLib() {\n let library = \"\";\n if (lib instanceof Array) {\n for (let $syntax of lib) {\n if ($syntax === \"all\") {\n for (let $data of [\"css.js\", \"render.js\", \"react.js\", \"ecosystem.js\"]) {\n library += fs.readFileSync(__dirname + \"/lib/\" + $data).toString().replace(/\\@binding/igm, (bindingVariabel?.length > 0) ? bindingVariabel : \"{}\");\n }\n }\n else {\n library += fs.readFileSync(__dirname + \"/lib/\" + $syntax).toString();\n }\n }\n }\n library = library.replace(/\\@fileName/igm, name).replace(/\\@componentName/igm, `seleku_components_${name}`);\n return library;\n }\n // membuat importer untuk komponent yang di import (2:30)\n if (type === \"component\")\n return {\n js: beautify(fs.readFileSync(__dirname + \"/lib/components_importer.js\").toString().\n replace(/\\@prop/igm, (!(globalprop)) ? componentscript : \"\").\n replace(/\\@aliasImportName/igm, componentName).\n replace(/\\@components/igm, `let seleku_components_${name} = ${convertToText(result_compile)}`).\n replace(/\\@componentName/igm, `seleku_components_${name}`).\n replace(/\\@system/igm, (componentConfig?.length > 0) ? componentConfig : \"{target}\").\n replace(/\\@binding/igm, (bindingVariabel?.length > 0) ? bindingVariabel : \"{}\"), { indent_size: 2, space_in_empty_paren: true }),\n globalProps: (globalprop) ? componentscript : \"\"\n };\n // (2:23)\n let css = StyleHandle(CSS_FROM_COMPONENTS.join(\"\\n\"));\n return {\n js: beautify(`let $_context__ = [];$_component__ = [];${ChildComponent} let seleku_components_${name} = ${convertToText(result_compile)}\n let seleku_components_style_${name} = ${JSON.stringify(css)}\n ${includeLib().replace(/\\@css_cmpnts/igm, `seleku_components_style_${name}`)}\n\n let __$_position__ = 0;\n let __$_fromParentsComponents__ = [];\n\n ${componentscript}\n\n for(let $components_final of ${name}){\n\n $components_final.create = ${componentConfig}\n $components_final.$element = $components_final.component.parents;\n $components_final.position = __$_position__;\n if($components_final.$element.nodeName !== \"CONFIG\") __$_fromParentsComponents__.push($components_final);\n if($components_final.$element.nodeName !== \"CONFIG\") $_context__.push($components_final.bindingContext = ${bindingVariabel});\n \n if($components_final.$element.nodeName !== \"CONFIG\") __$_position__++;\n }\n\n $_component__ = [...$_component__,...__$_fromParentsComponents__];\n ${fs.readFileSync(__dirname + \"/lib/context.js\").toString().replace(/\\@binding/igm, (bindingVariabel?.length > 0) ? bindingVariabel : \"{}\")}\n `, { indent_size: 2, space_in_empty_paren: true }),\n css: CSS_FROM_COMPONENTS.join(\" \")\n };\n // =============================================================\n // ==================== compiler component =====================\n // =============================================================\n }", "title": "" }, { "docid": "1adebc52e7fea57b2cb7e95281452b4d", "score": "0.5401095", "text": "function addAssets(pkg, compileStep) {\n var minify = shouldMinify();\n\n var options = {\n name: pkg.name\n };\n\n var assets = pkg.getSingleSlice('main', 'browser').getResources('browser');\n\n _.each(assets, function(asset) {\n var uri = asset.servePath.substring(1);\n var data = asset.data;\n\n /*** SOURCE MAPS ***/\n if (asset.sourceMap && ! minify) {\n var src = data.toString('utf8');\n var smu = sourceMappingUrl(uri, asset.sourceMap);\n\n if (asset.type === 'js')\n src += '\\n\\n//# sourceMappingURL=' + path.basename(smu) + '\\n';\n else if (asset.type === 'css')\n src += '\\n\\n/*# sourceMappingURL=' + path.basename(smu) + ' */\\n';\n\n compileStep.addAsset({\n data: new Buffer(asset.sourceMap, 'utf8'),\n path: smu\n });\n\n data = new Buffer(src, 'utf8');\n }\n\n /*** MINIFICATION ***/\n if (minify) {\n var src = data.toString('utf8');\n\n if (asset.type === 'js') {\n src = minifiers.UglifyJSMinify(src, {\n fromString: true,\n compress: { drop_debugger: false }\n }).code;\n } else if (asset.type === 'css') {\n src = minifers.CssTools.minifyCss(src);\n }\n\n data = new Buffer(src, 'utf8');\n }\n\n /*** RECORD FILE SERVE PATH ***/\n options[asset.type] = options[asset.type] || [];\n options[asset.type].push(addCacheBuster(uri, data.toString('utf8')));\n\n compileStep.addAsset({\n data: data,\n path: uri\n });\n });\n\n /*** SERVE REGISTRATION ***/\n compileStep.addJavaScript({\n data: 'Package[\"layers\"].Layers._registerPackage(' + JSON.stringify(options) + ');',\n sourcePath: 'packages/' + pkg.name,\n path: 'layers/__register_package__' + pkg.name + '.js'\n });\n}", "title": "" }, { "docid": "f8838c143b629321ad192637eafa87fc", "score": "0.5396464", "text": "apply(compiler) {\n\t\t// Specify the event hook to attach to\n\t\tcompiler.hooks.done.tap('MyPluginCompiledFunction', (compilation) => {\n\n\t\t\tconst coreJSsFile = globs.pathCore + '/_app-load.js';\n\t\t\tif ( fs.existsSync( coreJSsFile ) ) {\n\t\t\t\tfs.readFile( coreJSsFile, 'utf8', function( err, content ) {\n\t\t\t\t\tif ( err ) throw err;\n\t\t\t\n\t\t\t\t\t//---\n\t\t\t\t\tconsole.log(colors.fg.Yellow, `----------------------------------------------`, colors.Reset);\n\t\t\t\n\t\t\t\t\tconst targetJSFile = './'+globs.dist+'/js/uix-kit.js';\n\t\t\n\t\t\t\t\t//\n\t\t\t\t\tconst tocBuildedFiles = [\n\t\t\t\t\t\t'./'+globs.dist+'/css/uix-kit.css', \n\t\t\t\t\t\t'./'+globs.dist+'/css/uix-kit-rtl.css', \n\t\t\t\t\t\ttargetJSFile \n\t\t\t\t\t];\n\n\t\t\t\t\tconst tocBuildedTotal = tocBuildedFiles.length;\n\t\t\t\t\tlet tocBuildedIndex = 1;\n\t\t\t\t\t\n\t\t\t\t\t// Read all core css and js files and build a table of contents\n\t\t\t\t\t//---------------------------------------------------------------------\n\t\t\t\t\t// Build a table of contents (TOC)\n\t\t\t\t\ttocBuildedFiles.forEach( ( filepath ) => {\n\t\t\n\t\t\t\t\t\tif ( fs.existsSync( filepath ) ) {\n\t\t\n\t\t\t\t\t\t\tfs.readFile( filepath, 'utf8', function( err, content ) {\n\t\t\n\t\t\t\t\t\t\t\tif ( err ) throw err;\n\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tconst curCon = content.toString(),\n\t\t\t\t\t\t\t\t\t\tnewtext = curCon.match(/<\\!\\-\\-.*?(?:>|\\-\\-\\/>)/gi );\n\t\t\n\t\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\t//is the matched group if found\n\t\t\t\t\t\t\t\tif ( newtext && newtext.length > 0 ) { \n\t\t\n\t\t\t\t\t\t\t\t\tlet curToc = '';\n\t\t\n\t\t\t\t\t\t\t\t\tfor ( let p = 0; p < newtext.length; p++ ) {\n\t\t\n\t\t\t\t\t\t\t\t\t\tlet curIndex = p + 1,\n\t\t\t\t\t\t\t\t\t\t\tnewStr = newtext[ p ].replace( '<!--', '' ).replace( '-->', '' ).replace(/^\\s+|\\s+$/g, '' );\n\t\t\n\t\t\t\t\t\t\t\t\t\tif ( p > 0 ) {\n\t\t\t\t\t\t\t\t\t\t\tcurToc += ' ' + curIndex + '.' + newStr + '\\n';\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tcurToc += curIndex + '.' + newStr + '\\n';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\t\t\t//Replace a string in a file with nodejs\n\t\t\t\t\t\t\t\t\tconst resultData = curCon.replace(/\\$\\{\\{TOC\\}\\}/gi, curToc );\n\t\t\n\t\t\t\t\t\t\t\t\tfs.writeFile( filepath, resultData, 'utf8', function (err) {\n\t\t\n\t\t\t\t\t\t\t\t\t\tif ( err ) {\n\t\t\t\t\t\t\t\t\t\t\tconsole.log(colors.fg.Red, err, colors.Reset);\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//file written successfully\t\n\t\t\t\t\t\t\t\t\t\tconsole.log(colors.fg.Green, `${filepath}'s table of contents generated successfully! (${tocBuildedIndex}/${tocBuildedTotal})`, colors.Reset);\n\t\t\n\t\t\t\t\t\t\t\t\t\ttocBuildedIndex++;\n\t\t\n\t\t\n\t\t\t\t\t\t\t\t\t});\n\t\t\n\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\n\t\t\n\t\t\t\t\t\t\t});// fs.readFile( filepath ...\n\t\t\n\t\t\n\t\t\t\t\t\t}//endif fs.existsSync( filepath ) \n\t\t\n\t\t\n\t\t\t\t\t});\t//.map( ( filepath )...\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t});\n\t\t\t\n\t\t\t}\n\n\t\t\t\n\t\t});\n\t}", "title": "" }, { "docid": "93788600a822ed86dad00ac29d5791d7", "score": "0.5390334", "text": "function compile(self) {\n\t\n\t // Load & clone RE patterns.\n\t var re = self.re = __webpack_require__(815)(self.__opts__);\n\t\n\t // Define dynamic patterns\n\t var tlds = self.__tlds__.slice();\n\t\n\t self.onCompile();\n\t\n\t if (!self.__tlds_replaced__) {\n\t tlds.push(tlds_2ch_src_re);\n\t }\n\t tlds.push(re.src_xn);\n\t\n\t re.src_tlds = tlds.join('|');\n\t\n\t function untpl(tpl) { return tpl.replace('%TLDS%', re.src_tlds); }\n\t\n\t re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i');\n\t re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i');\n\t re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i');\n\t re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i');\n\t\n\t //\n\t // Compile each schema\n\t //\n\t\n\t var aliases = [];\n\t\n\t self.__compiled__ = {}; // Reset compiled data\n\t\n\t function schemaError(name, val) {\n\t throw new Error('(LinkifyIt) Invalid schema \"' + name + '\": ' + val);\n\t }\n\t\n\t Object.keys(self.__schemas__).forEach(function (name) {\n\t var val = self.__schemas__[name];\n\t\n\t // skip disabled methods\n\t if (val === null) { return; }\n\t\n\t var compiled = { validate: null, link: null };\n\t\n\t self.__compiled__[name] = compiled;\n\t\n\t if (isObject(val)) {\n\t if (isRegExp(val.validate)) {\n\t compiled.validate = createValidator(val.validate);\n\t } else if (isFunction(val.validate)) {\n\t compiled.validate = val.validate;\n\t } else {\n\t schemaError(name, val);\n\t }\n\t\n\t if (isFunction(val.normalize)) {\n\t compiled.normalize = val.normalize;\n\t } else if (!val.normalize) {\n\t compiled.normalize = createNormalizer();\n\t } else {\n\t schemaError(name, val);\n\t }\n\t\n\t return;\n\t }\n\t\n\t if (isString(val)) {\n\t aliases.push(name);\n\t return;\n\t }\n\t\n\t schemaError(name, val);\n\t });\n\t\n\t //\n\t // Compile postponed aliases\n\t //\n\t\n\t aliases.forEach(function (alias) {\n\t if (!self.__compiled__[self.__schemas__[alias]]) {\n\t // Silently fail on missed schemas to avoid errons on disable.\n\t // schemaError(alias, self.__schemas__[alias]);\n\t return;\n\t }\n\t\n\t self.__compiled__[alias].validate =\n\t self.__compiled__[self.__schemas__[alias]].validate;\n\t self.__compiled__[alias].normalize =\n\t self.__compiled__[self.__schemas__[alias]].normalize;\n\t });\n\t\n\t //\n\t // Fake record for guessed links\n\t //\n\t self.__compiled__[''] = { validate: null, normalize: createNormalizer() };\n\t\n\t //\n\t // Build schema condition\n\t //\n\t var slist = Object.keys(self.__compiled__)\n\t .filter(function (name) {\n\t // Filter disabled & fake schemas\n\t return name.length > 0 && self.__compiled__[name];\n\t })\n\t .map(escapeRE)\n\t .join('|');\n\t // (?!_) cause 1.5x slowdown\n\t self.re.schema_test = RegExp('(^|(?!_)(?:[><]|' + re.src_ZPCc + '))(' + slist + ')', 'i');\n\t self.re.schema_search = RegExp('(^|(?!_)(?:[><]|' + re.src_ZPCc + '))(' + slist + ')', 'ig');\n\t\n\t self.re.pretest = RegExp(\n\t '(' + self.re.schema_test.source + ')|' +\n\t '(' + self.re.host_fuzzy_test.source + ')|' +\n\t '@',\n\t 'i');\n\t\n\t //\n\t // Cleanup\n\t //\n\t\n\t resetScanCache(self);\n\t}", "title": "" }, { "docid": "3270b02eea7da36d5a327107c97181ce", "score": "0.5384781", "text": "function Migrate(p){\r\n\r\n var ext = path.extname(p),\r\n type = mime.lookup(p);\r\n\r\n if (ext) ext = ext.substring(1);\r\n\r\n config.builds.forEach(distribution=>{\r\n \r\n if (fs.existsSync(p) && fs.lstatSync(p).isDirectory()) {\r\n console.group(`(${ext}) ${p}`);\r\n fs.readdirSync(p).forEach(f=> \r\n Migrate(path.resolve(p, f))\r\n );\r\n console.groupEnd();\r\n } else {\r\n console.log(`(${ext}) ${p}`);\r\n var contents = fs.readFileSync(p);\r\n var s = Date.now();\r\n var shouldRender = false,\r\n shouldDist = true;\r\n \r\n if(distribution.extensions) distribution.extensions.forEach(x=>{\r\n if (ext.toLowerCase() == x.toLowerCase()) shouldRender = true;\r\n });\r\n\r\n var raw = p.replace(srcdir, '').substring(1).replace(/\\\\/gi, '/');\r\n if (config.ignore) config.ignore.forEach(function(path){\r\n if (compare(raw, path.replace(/\\\\/gi, '/'))) shouldDist = false;\r\n });\r\n if (distribution.ignore) distribution.ignore.forEach(function(path){\r\n if (compare(raw, path.replace(/\\\\/gi, '/'))) shouldDist = false;\r\n });\r\n \r\n var variables = {distribution:{}};\r\n \r\n if (config.variables) for (let attr in config.variables){\r\n \r\n for (let v in config.variables) \r\n variables[v] = config.variables[v];\r\n \r\n }\r\n \r\n for(let attr in distribution){\r\n if (attr == 'variables') {\r\n for (let v in distribution.variables) \r\n variables[v] = distribution.variables[v];\r\n } else variables.distribution[attr] = distribution[attr];\r\n }\r\n \r\n variables.dir = srcdir; \r\n\r\n if (shouldRender) try {\r\n ejs.delimiter = config.delimiter || '*';\r\n variables.dir = srcdir; \r\n console.log(variables);\r\n variables.product = config.product;\r\n variables.fn = fn;\r\n contents = ejs.render(contents.toString(), variables);\r\n console.log('Rendered', p, 'in', `${Date.now()-s}ms.`);\r\n } catch (e) {\r\n console.error(`[!] Could not render ${p}`, e.message);\r\n }\r\n\r\n var distpath = p.replace(srcdir, path.resolve(distdir, distribution.name));\r\n\r\n if (shouldDist) mkdirp(path.dirname(distpath), ()=>{\r\n fs.writeFileSync(distpath, contents);\r\n });\r\n\r\n }\r\n })\r\n \r\n }", "title": "" }, { "docid": "2c19011e557b109bac7294939a61facd", "score": "0.53838813", "text": "function addFile(compilation, filename, content, target = WECHAT_MINIPROGRAM) {\n compilation.assets[`${target}/${filename}`] = {\n source: () => content,\n size: () => Buffer.from(content).length,\n };\n}", "title": "" }, { "docid": "189e765c981cfddc7721a918d4153109", "score": "0.5383683", "text": "function compile(self) {\n\t\n\t // Load & clone RE patterns.\n\t var re = self.re = __webpack_require__(1013)(self.__opts__);\n\t\n\t // Define dynamic patterns\n\t var tlds = self.__tlds__.slice();\n\t\n\t self.onCompile();\n\t\n\t if (!self.__tlds_replaced__) {\n\t tlds.push(tlds_2ch_src_re);\n\t }\n\t tlds.push(re.src_xn);\n\t\n\t re.src_tlds = tlds.join('|');\n\t\n\t function untpl(tpl) { return tpl.replace('%TLDS%', re.src_tlds); }\n\t\n\t re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i');\n\t re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i');\n\t re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i');\n\t re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i');\n\t\n\t //\n\t // Compile each schema\n\t //\n\t\n\t var aliases = [];\n\t\n\t self.__compiled__ = {}; // Reset compiled data\n\t\n\t function schemaError(name, val) {\n\t throw new Error('(LinkifyIt) Invalid schema \"' + name + '\": ' + val);\n\t }\n\t\n\t Object.keys(self.__schemas__).forEach(function (name) {\n\t var val = self.__schemas__[name];\n\t\n\t // skip disabled methods\n\t if (val === null) { return; }\n\t\n\t var compiled = { validate: null, link: null };\n\t\n\t self.__compiled__[name] = compiled;\n\t\n\t if (isObject(val)) {\n\t if (isRegExp(val.validate)) {\n\t compiled.validate = createValidator(val.validate);\n\t } else if (isFunction(val.validate)) {\n\t compiled.validate = val.validate;\n\t } else {\n\t schemaError(name, val);\n\t }\n\t\n\t if (isFunction(val.normalize)) {\n\t compiled.normalize = val.normalize;\n\t } else if (!val.normalize) {\n\t compiled.normalize = createNormalizer();\n\t } else {\n\t schemaError(name, val);\n\t }\n\t\n\t return;\n\t }\n\t\n\t if (isString(val)) {\n\t aliases.push(name);\n\t return;\n\t }\n\t\n\t schemaError(name, val);\n\t });\n\t\n\t //\n\t // Compile postponed aliases\n\t //\n\t\n\t aliases.forEach(function (alias) {\n\t if (!self.__compiled__[self.__schemas__[alias]]) {\n\t // Silently fail on missed schemas to avoid errons on disable.\n\t // schemaError(alias, self.__schemas__[alias]);\n\t return;\n\t }\n\t\n\t self.__compiled__[alias].validate =\n\t self.__compiled__[self.__schemas__[alias]].validate;\n\t self.__compiled__[alias].normalize =\n\t self.__compiled__[self.__schemas__[alias]].normalize;\n\t });\n\t\n\t //\n\t // Fake record for guessed links\n\t //\n\t self.__compiled__[''] = { validate: null, normalize: createNormalizer() };\n\t\n\t //\n\t // Build schema condition\n\t //\n\t var slist = Object.keys(self.__compiled__)\n\t .filter(function (name) {\n\t // Filter disabled & fake schemas\n\t return name.length > 0 && self.__compiled__[name];\n\t })\n\t .map(escapeRE)\n\t .join('|');\n\t // (?!_) cause 1.5x slowdown\n\t self.re.schema_test = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i');\n\t self.re.schema_search = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig');\n\t\n\t self.re.pretest = RegExp(\n\t '(' + self.re.schema_test.source + ')|' +\n\t '(' + self.re.host_fuzzy_test.source + ')|' +\n\t '@',\n\t 'i');\n\t\n\t //\n\t // Cleanup\n\t //\n\t\n\t resetScanCache(self);\n\t}", "title": "" }, { "docid": "e790c9fe6046453c90aeed2c328d4b8d", "score": "0.53753006", "text": "function cssFileProcessor(src, dst, clean, project, projectConfig, ajsWebAppProject, ajsWebAppProjectConfig) {\n \"use strict\";\n copyIfNewer(src, dst);\n clean.push(dst);\n}", "title": "" }, { "docid": "5619576e14cdee8a6be948fbec0a0f7f", "score": "0.53716564", "text": "function bundle() {\r\n\r\n var scripts = [\r\n 'jquery.min',\r\n 'json2',\r\n 'underscore-min',\r\n 'handlebars.min',\r\n 'backbone-min',\r\n 'jquery.masonry.min',\r\n 'jquery.tagsinput.min',\r\n 'bootstrap-modal',\r\n 'jquery-ui.min',\r\n 'models/Bookmark',\r\n 'models/BookmarksCollection',\r\n 'models/Tag',\r\n 'models/TagsCollection',\r\n 'views/PublicView',\r\n 'views/AccountView',\r\n 'views/EditView',\r\n 'views/BookmarkView',\r\n 'views/BookmarksView',\r\n 'views/TagView',\r\n 'views/TagsView',\r\n 'views/AppView',\r\n 'routers/BookmarklyRouter',\r\n 'App'\r\n ];\r\n \r\n var templates = ['account', 'bookmark', 'edit', 'footer', 'header', 'index', 'pub', 'tag', 'bookmarks'];\r\n \r\n var bundle = '';\r\n scripts.forEach(function(file) { \r\n bundle += \"\\n/**\\n* \" + file + \".js\\n*/\\n\\n\" + fs.readFileSync(__dirname + '/public/js/' + file + '.js') + \"\\n\\n\";\r\n });\r\n \r\n var ast = parser.parse(bundle);\r\n ast = uglifyer.ast_mangle(ast);\r\n ast = uglifyer.ast_squeeze(ast);\r\n bundle = uglifyer.gen_code(ast)\r\n \r\n fs.writeFileSync(__dirname + '/public/js/bundle.js', bundle, 'utf8');\r\n \r\n bundle = \"Templates = {};\\n\";\r\n templates.forEach(function(file) {\r\n var html = fs.readFileSync(__dirname + '/public/templates/' + file + '.html', 'utf8');\r\n html = html.replace(/(\\r\\n|\\n|\\r)/gm, ' ').replace(/\\s+/gm, ' ').replace(/'/gm, \"\\\\'\");\r\n bundle += \"Templates.\" + file + \" = '\" + html + \"';\\n\";\r\n });\r\n \r\n fs.writeFileSync(__dirname + '/public/js/templates.js', bundle, 'utf8');\r\n\r\n}", "title": "" }, { "docid": "d38e95a4074953d3d33ec1408b86d9d0", "score": "0.53531224", "text": "transpile() {\n this.logDebug('transpile');\n //eventually we want to support sourcemaps and a full xml parser. However, for now just do some string transformations\n let chunks = [];\n for (let i = 0; i < this.lines.length; i++) {\n let line = this.lines[i];\n let lowerLine = line.toLowerCase();\n let componentLocationIndex = lowerLine.indexOf('</component>');\n //include any bs import statements\n if (componentLocationIndex > -1) {\n let missingImports = this.getMissingImportsForTranspile()\n //change the file extension to .brs since they will be transpiled\n .map(x => x.replace('.bs', '.brs'));\n //always include the bslib file\n missingImports.push('source/bslib.brs');\n for (let missingImport of missingImports) {\n let scriptTag = `<script type=\"text/brightscript\" uri=\"${util_1.default.getRokuPkgPath(missingImport)}\" />`;\n //indent the script tag\n let indent = ''.padStart(componentLocationIndex + 4, ' ');\n chunks.push('\\n', new source_map_1.SourceNode(1, 0, this.pathAbsolute, indent + scriptTag));\n }\n }\n else {\n //we couldn't find the closing component tag....so maybe there's something wrong? or this isn't actually a component?\n }\n //convert .bs extensions to .brs\n let idx = line.indexOf('.bs\"');\n if (idx > -1) {\n line = line.substring(0, idx) + '.brs' + line.substring(idx + 3);\n }\n //convert \"text/brighterscript\" to \"text/brightscript\"\n line = line.replace(`\"text/brighterscript\"`, `\"text/brightscript\"`);\n chunks.push(chunks.length > 0 ? '\\n' : '', line);\n }\n return new source_map_1.SourceNode(null, null, this.pathAbsolute, chunks).toStringWithSourceMap();\n }", "title": "" }, { "docid": "451e0fa16e5ecd1838ec61c02186e4e3", "score": "0.53491414", "text": "function build(type,filename){\r\n\tif(filename == 'mditor.js'){\r\n\t\treturn\r\n\t}\r\n\tvar newContent = checkMainFiles('index.js');\r\n\twrite('mditor.js',newContent);\r\n\tconsole.log('successful!\\n');\r\n}", "title": "" }, { "docid": "41b0f661cb6973c080ae8d4c608dc60b", "score": "0.5346534", "text": "function prod() {\n console.time('prod task');\n\n const rootDir = path.resolve(__dirname, '..');\n const buildDir = rootDir + '/build';\n const libsDir = rootDir + '/libs';\n const srcDir = rootDir + '/src';\n\n const inputPage = srcDir + '/pages/index.html';\n const inputTagDirs = [srcDir + '/components', srcDir + '/containers'];\n const inputAppPaths = [\n srcDir + '/env/prod.js',\n srcDir + '/flux',\n srcDir + '/mixins',\n srcDir + '/index.js',\n ];\n\n const outputPage = buildDir + '/index.html';\n const outputJsDir = buildDir + '/assets/js';\n\n const serverPort = 9000;\n const filenames = {}; // for storing filenames with hashes in them\n\n fse.removeSync(buildDir);\n\n concatLibraries(libsDir, outputJsDir)\n .then(libsFile => {\n filenames.LIBS_FILE = libsFile;\n return compileAppFile(inputTagDirs, inputAppPaths, outputJsDir);\n })\n .then(appFile => {\n filenames.APP_FILE = appFile;\n return compileHtml(inputPage, filenames, outputPage);\n })\n .then(() => util.startServer(buildDir, serverPort, true))\n .then(() => {\n console.timeEnd('prod task');\n })\n .catch(err => {\n console.error('Something went wrong!', err.toString(), '\\n', err.stack);\n })\n}", "title": "" }, { "docid": "48ff5a2d920565f0cd583ba60ce404f2", "score": "0.53424966", "text": "async function bundle() {\n await run(build);\n // await run(copy);\n}", "title": "" }, { "docid": "16c759422e21cdab3fb12922222a8732", "score": "0.5340138", "text": "function commit() {\n\t\tconsole.log( \"Adding files to dist...\" );\n\t\tRelease.exec( \"git add -A\", \"Error adding files.\" );\n\t\tRelease.exec(\n\t\t\t`git commit -m \"Release ${ Release.newVersion }\"`,\n\t\t\t\"Error committing files.\"\n\t\t);\n\t\tconsole.log();\n\n\t\tconsole.log( \"Tagging release on dist...\" );\n\t\tRelease.exec( `git tag ${ Release.newVersion }`,\n\t\t\t`Error tagging ${ Release.newVersion } on dist repo.` );\n\t\tRelease.tagTime = Release.exec( \"git log -1 --format=\\\"%ad\\\"\",\n\t\t\t\"Error getting tag timestamp.\" ).trim();\n\t}", "title": "" }, { "docid": "491097762d66cf038adb5d1238b66bdb", "score": "0.53359216", "text": "function generateConcatedOutput( $script, dependencies, complete ){\n //record full details of source\n var srcObj = dependencies[dependencies.length-1];\n \n //copy and process source files\n generateDevOutput( $script, dependencies );\n \n var dest = pathUtil.resolve( pwd + pathUtil.sep + $script[0].attribs.src );\n \n //point to minified output\n $script[0].attribs.src.substr( 0, $script[0].attribs.src.length-2 )+'min.js';\n \n //compiler vars\n var src = srcObj.toString();\n var outputPath = dest.toString().substr( 0, dest.toString().length-2 )+'min.js';\n var outputMap = dest.toString().substr( 0, dest.toString().length-2 )+'min.map';\n \n //compile\n var args = ['-jar', gccPath, '--compilation_level', 'WHITESPACE_ONLY', '--formatting', 'pretty_print', '--warning_level', 'QUIET', '--js_output_file', outputPath, '--create_source_map', outputMap, '--source_map_format=V3', '--language_in=ECMASCRIPT5'];\n \n for( var i = 0; i < dependencies.length; i++ ){\n //for( var i = dependencies.length-1; i > -1; --i ){\n args.push( '--js' );\n args.push( dependencies[i].destPath.toString() );\n }\n \n args.push( '--js' );\n args.push( dest );\n \n console.log( 'java '+ args.join( ' ' ) );\n \n //Test args\n //var args = ['-jar', gccPath, '--help'];\n \n execFile( 'java', args, {}, function (error, stdout, stderr){\n if( error ){\n console.log( 'Compiler error: '+error );\n //console.log( stderr );\n } else {\n console.log( 'GCC Complete' );\n //console.log( 'GCC Output: '+stdout );\n }\n \n complete();\n } );\n \n //console.log(dependencies)\n }", "title": "" }, { "docid": "455678303f407b941ab1d8bf89fa7597", "score": "0.53117704", "text": "function buildJS() {\n\n //Get our transformed browserify bundle\n config.bundler = applyTransforms(getBundler());\n\n console.log(config.watch);\n\n if (config.watch) {\n config.bundler.on('update', bundle);\n }\n\n bundle();\n\n}", "title": "" }, { "docid": "5335c12e3d6457a763ddc4f63d7aeed3", "score": "0.5309091", "text": "function commit() {\n\t\tconsole.log( \"Adding files to dist...\" );\n\t\tRelease.exec( \"git add -A\", \"Error adding files.\" );\n\t\tRelease.exec(\n\t\t\t\"git commit -m \\\"Release \" + Release.newVersion + \"\\\"\",\n\t\t\t\"Error committing files.\"\n\t\t);\n\t\tconsole.log();\n\n\t\tconsole.log( \"Tagging release on dist...\" );\n\t\tRelease.exec( \"git tag \" + Release.newVersion,\n\t\t\t\"Error tagging \" + Release.newVersion + \" on dist repo.\" );\n\t\tRelease.tagTime = Release.exec( \"git log -1 --format=\\\"%ad\\\"\",\n\t\t\t\"Error getting tag timestamp.\" ).trim();\n\t}", "title": "" }, { "docid": "c164c4ed40e1769f792d27a4747d654b", "score": "0.5302475", "text": "function concat() {\n\n init();\n \n var js = cat(\"bower_components/riotjs/riot.js\");\n\n js += header;\n js += cat(\"src/models/*.js\");\n js += cat(\"src/presenters/*.js\");\n js += cat(\"src/*.js\");\n js += footer;\n\n js.to(\"dist/spike.js\");\n\n templates();\n}", "title": "" }, { "docid": "58ec7f5e5124bef00284e728a4280878", "score": "0.52961314", "text": "function compile(self) {\n\n // Load & clone RE patterns.\n var re = self.re = __webpack_require__(225)(self.__opts__);\n\n // Define dynamic patterns\n var tlds = self.__tlds__.slice();\n\n self.onCompile();\n\n if (!self.__tlds_replaced__) {\n tlds.push(tlds_2ch_src_re);\n }\n tlds.push(re.src_xn);\n\n re.src_tlds = tlds.join('|');\n\n function untpl(tpl) { return tpl.replace('%TLDS%', re.src_tlds); }\n\n re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i');\n re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i');\n re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i');\n re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i');\n\n //\n // Compile each schema\n //\n\n var aliases = [];\n\n self.__compiled__ = {}; // Reset compiled data\n\n function schemaError(name, val) {\n throw new Error('(LinkifyIt) Invalid schema \"' + name + '\": ' + val);\n }\n\n Object.keys(self.__schemas__).forEach(function (name) {\n var val = self.__schemas__[name];\n\n // skip disabled methods\n if (val === null) { return; }\n\n var compiled = { validate: null, link: null };\n\n self.__compiled__[name] = compiled;\n\n if (isObject(val)) {\n if (isRegExp(val.validate)) {\n compiled.validate = createValidator(val.validate);\n } else if (isFunction(val.validate)) {\n compiled.validate = val.validate;\n } else {\n schemaError(name, val);\n }\n\n if (isFunction(val.normalize)) {\n compiled.normalize = val.normalize;\n } else if (!val.normalize) {\n compiled.normalize = createNormalizer();\n } else {\n schemaError(name, val);\n }\n\n return;\n }\n\n if (isString(val)) {\n aliases.push(name);\n return;\n }\n\n schemaError(name, val);\n });\n\n //\n // Compile postponed aliases\n //\n\n aliases.forEach(function (alias) {\n if (!self.__compiled__[self.__schemas__[alias]]) {\n // Silently fail on missed schemas to avoid errons on disable.\n // schemaError(alias, self.__schemas__[alias]);\n return;\n }\n\n self.__compiled__[alias].validate =\n self.__compiled__[self.__schemas__[alias]].validate;\n self.__compiled__[alias].normalize =\n self.__compiled__[self.__schemas__[alias]].normalize;\n });\n\n //\n // Fake record for guessed links\n //\n self.__compiled__[''] = { validate: null, normalize: createNormalizer() };\n\n //\n // Build schema condition\n //\n var slist = Object.keys(self.__compiled__)\n .filter(function (name) {\n // Filter disabled & fake schemas\n return name.length > 0 && self.__compiled__[name];\n })\n .map(escapeRE)\n .join('|');\n // (?!_) cause 1.5x slowdown\n self.re.schema_test = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i');\n self.re.schema_search = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig');\n\n self.re.pretest = RegExp(\n '(' + self.re.schema_test.source + ')|' +\n '(' + self.re.host_fuzzy_test.source + ')|' +\n '@',\n 'i');\n\n //\n // Cleanup\n //\n\n resetScanCache(self);\n}", "title": "" }, { "docid": "624e65e1cec763d58d374891f2814538", "score": "0.52916455", "text": "function compile(self) {\n\n // Load & clone RE patterns.\n var re = self.re = __webpack_require__(217)(self.__opts__);\n\n // Define dynamic patterns\n var tlds = self.__tlds__.slice();\n\n self.onCompile();\n\n if (!self.__tlds_replaced__) {\n tlds.push(tlds_2ch_src_re);\n }\n tlds.push(re.src_xn);\n\n re.src_tlds = tlds.join('|');\n\n function untpl(tpl) { return tpl.replace('%TLDS%', re.src_tlds); }\n\n re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i');\n re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i');\n re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i');\n re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i');\n\n //\n // Compile each schema\n //\n\n var aliases = [];\n\n self.__compiled__ = {}; // Reset compiled data\n\n function schemaError(name, val) {\n throw new Error('(LinkifyIt) Invalid schema \"' + name + '\": ' + val);\n }\n\n Object.keys(self.__schemas__).forEach(function (name) {\n var val = self.__schemas__[name];\n\n // skip disabled methods\n if (val === null) { return; }\n\n var compiled = { validate: null, link: null };\n\n self.__compiled__[name] = compiled;\n\n if (isObject(val)) {\n if (isRegExp(val.validate)) {\n compiled.validate = createValidator(val.validate);\n } else if (isFunction(val.validate)) {\n compiled.validate = val.validate;\n } else {\n schemaError(name, val);\n }\n\n if (isFunction(val.normalize)) {\n compiled.normalize = val.normalize;\n } else if (!val.normalize) {\n compiled.normalize = createNormalizer();\n } else {\n schemaError(name, val);\n }\n\n return;\n }\n\n if (isString(val)) {\n aliases.push(name);\n return;\n }\n\n schemaError(name, val);\n });\n\n //\n // Compile postponed aliases\n //\n\n aliases.forEach(function (alias) {\n if (!self.__compiled__[self.__schemas__[alias]]) {\n // Silently fail on missed schemas to avoid errons on disable.\n // schemaError(alias, self.__schemas__[alias]);\n return;\n }\n\n self.__compiled__[alias].validate =\n self.__compiled__[self.__schemas__[alias]].validate;\n self.__compiled__[alias].normalize =\n self.__compiled__[self.__schemas__[alias]].normalize;\n });\n\n //\n // Fake record for guessed links\n //\n self.__compiled__[''] = { validate: null, normalize: createNormalizer() };\n\n //\n // Build schema condition\n //\n var slist = Object.keys(self.__compiled__)\n .filter(function (name) {\n // Filter disabled & fake schemas\n return name.length > 0 && self.__compiled__[name];\n })\n .map(escapeRE)\n .join('|');\n // (?!_) cause 1.5x slowdown\n self.re.schema_test = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i');\n self.re.schema_search = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig');\n\n self.re.pretest = RegExp(\n '(' + self.re.schema_test.source + ')|' +\n '(' + self.re.host_fuzzy_test.source + ')|' +\n '@',\n 'i');\n\n //\n // Cleanup\n //\n\n resetScanCache(self);\n}", "title": "" }, { "docid": "d217e3b0f2d4434a79fbf8f6ee7435f9", "score": "0.52879", "text": "function ecJSPreBuild() {\n if (pauseProcessing) return;\n\n return gulp.src([\"./dev/build_temp/Version.js\", \"./dev/js/Includes/beforeBabel/*.js\", \"./dev/js/*.js\"])\n .pipe(concat(\"ExtendedControls.js\"))\n .pipe(minify())\n .pipe(gulp.dest(\"./dev/build_temp\"));\n}", "title": "" }, { "docid": "0d223840d5a8e12481835577eeb30d6a", "score": "0.5280504", "text": "function buildResources () {\n buildPlaylists();\n buildLibrary();\n }", "title": "" }, { "docid": "07e9714aa405609fc5020ae566d5e344", "score": "0.52689326", "text": "function compile(self) {\n\n // Load & clone RE patterns.\n var re = self.re = __webpack_require__(1105)(self.__opts__);\n\n // Define dynamic patterns\n var tlds = self.__tlds__.slice();\n\n self.onCompile();\n\n if (!self.__tlds_replaced__) {\n tlds.push(tlds_2ch_src_re);\n }\n tlds.push(re.src_xn);\n\n re.src_tlds = tlds.join('|');\n\n function untpl(tpl) { return tpl.replace('%TLDS%', re.src_tlds); }\n\n re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i');\n re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i');\n re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i');\n re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i');\n\n //\n // Compile each schema\n //\n\n var aliases = [];\n\n self.__compiled__ = {}; // Reset compiled data\n\n function schemaError(name, val) {\n throw new Error('(LinkifyIt) Invalid schema \"' + name + '\": ' + val);\n }\n\n Object.keys(self.__schemas__).forEach(function (name) {\n var val = self.__schemas__[name];\n\n // skip disabled methods\n if (val === null) { return; }\n\n var compiled = { validate: null, link: null };\n\n self.__compiled__[name] = compiled;\n\n if (isObject(val)) {\n if (isRegExp(val.validate)) {\n compiled.validate = createValidator(val.validate);\n } else if (isFunction(val.validate)) {\n compiled.validate = val.validate;\n } else {\n schemaError(name, val);\n }\n\n if (isFunction(val.normalize)) {\n compiled.normalize = val.normalize;\n } else if (!val.normalize) {\n compiled.normalize = createNormalizer();\n } else {\n schemaError(name, val);\n }\n\n return;\n }\n\n if (isString(val)) {\n aliases.push(name);\n return;\n }\n\n schemaError(name, val);\n });\n\n //\n // Compile postponed aliases\n //\n\n aliases.forEach(function (alias) {\n if (!self.__compiled__[self.__schemas__[alias]]) {\n // Silently fail on missed schemas to avoid errons on disable.\n // schemaError(alias, self.__schemas__[alias]);\n return;\n }\n\n self.__compiled__[alias].validate =\n self.__compiled__[self.__schemas__[alias]].validate;\n self.__compiled__[alias].normalize =\n self.__compiled__[self.__schemas__[alias]].normalize;\n });\n\n //\n // Fake record for guessed links\n //\n self.__compiled__[''] = { validate: null, normalize: createNormalizer() };\n\n //\n // Build schema condition\n //\n var slist = Object.keys(self.__compiled__)\n .filter(function (name) {\n // Filter disabled & fake schemas\n return name.length > 0 && self.__compiled__[name];\n })\n .map(escapeRE)\n .join('|');\n // (?!_) cause 1.5x slowdown\n self.re.schema_test = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i');\n self.re.schema_search = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig');\n\n self.re.pretest = RegExp(\n '(' + self.re.schema_test.source + ')|' +\n '(' + self.re.host_fuzzy_test.source + ')|' +\n '@',\n 'i');\n\n //\n // Cleanup\n //\n\n resetScanCache(self);\n}", "title": "" }, { "docid": "9f7fe9b9328dc00007041ed3e04f8350", "score": "0.5225772", "text": "function productionScripts() {\n return gulp\n .src(paths.jsSrcProduction)\n .pipe(concat(config.jsConcat))\n .pipe(rename((path) => {\n path.basename += \".min\";\n }))\n .pipe(uglify())\n .pipe(gulp.dest(paths.jsDist))\n .pipe(rev())\n .pipe(gulp.dest(paths.revDist))\n .pipe(rev.manifest({\n base: paths.revDist,\n path: 'web/build/manifest.json',\n merge: true\n }))\n .pipe(gulp.dest(paths.revDist));\n}", "title": "" }, { "docid": "4692eae69478d1c7c39eb4e70800efce", "score": "0.5222369", "text": "function prodCompileScripts(cb) {\n const options = {};\n\n pump(\n [\n src(files.src.scripts),\n babel(babelConfig),\n minify(options),\n dest(files.dist.scripts)\n ],\n cb\n );\n}", "title": "" }, { "docid": "70929ef45c29da6276ec1bdab31cdc7a", "score": "0.52035993", "text": "function lessFileProcessor(src, dst, clean, project, projectConfig, ajsWebAppProject, ajsWebAppProjectConfig) {\n \"use strict\";\n copyIfNewer(src, dst);\n clean.push(dst);\n}", "title": "" }, { "docid": "cfd6f0809b6d58b6e0f5a45a525bc8a8", "score": "0.5191594", "text": "apply(compiler) {\n if (!this._options) return null;\n const options = this._options;\n\n // Specify the event hook to attach to\n compiler.hooks.emit.tap(PLUGIN_NAME, (compilation) => {\n const { assets } = compilation;\n const runtime = assets[this._options.runtime];\n const remoteEntry = assets[this._options.fileName];\n const mergedSource = new ConcatSource(runtime, remoteEntry);\n assets[this._options.fileName] = mergedSource;\n });\n }", "title": "" }, { "docid": "00404691058c588448e69ec50ad967d7", "score": "0.5184239", "text": "function compile(self) {\n\n // Load & clone RE patterns.\n var re = self.re = __webpack_require__(/*! ./lib/re */ \"../node_modules/linkify-it/lib/re.js\")(self.__opts__);\n\n // Define dynamic patterns\n var tlds = self.__tlds__.slice();\n\n self.onCompile();\n\n if (!self.__tlds_replaced__) {\n tlds.push(tlds_2ch_src_re);\n }\n tlds.push(re.src_xn);\n\n re.src_tlds = tlds.join('|');\n\n function untpl(tpl) { return tpl.replace('%TLDS%', re.src_tlds); }\n\n re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i');\n re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i');\n re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i');\n re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i');\n\n //\n // Compile each schema\n //\n\n var aliases = [];\n\n self.__compiled__ = {}; // Reset compiled data\n\n function schemaError(name, val) {\n throw new Error('(LinkifyIt) Invalid schema \"' + name + '\": ' + val);\n }\n\n Object.keys(self.__schemas__).forEach(function (name) {\n var val = self.__schemas__[name];\n\n // skip disabled methods\n if (val === null) { return; }\n\n var compiled = { validate: null, link: null };\n\n self.__compiled__[name] = compiled;\n\n if (isObject(val)) {\n if (isRegExp(val.validate)) {\n compiled.validate = createValidator(val.validate);\n } else if (isFunction(val.validate)) {\n compiled.validate = val.validate;\n } else {\n schemaError(name, val);\n }\n\n if (isFunction(val.normalize)) {\n compiled.normalize = val.normalize;\n } else if (!val.normalize) {\n compiled.normalize = createNormalizer();\n } else {\n schemaError(name, val);\n }\n\n return;\n }\n\n if (isString(val)) {\n aliases.push(name);\n return;\n }\n\n schemaError(name, val);\n });\n\n //\n // Compile postponed aliases\n //\n\n aliases.forEach(function (alias) {\n if (!self.__compiled__[self.__schemas__[alias]]) {\n // Silently fail on missed schemas to avoid errons on disable.\n // schemaError(alias, self.__schemas__[alias]);\n return;\n }\n\n self.__compiled__[alias].validate =\n self.__compiled__[self.__schemas__[alias]].validate;\n self.__compiled__[alias].normalize =\n self.__compiled__[self.__schemas__[alias]].normalize;\n });\n\n //\n // Fake record for guessed links\n //\n self.__compiled__[''] = { validate: null, normalize: createNormalizer() };\n\n //\n // Build schema condition\n //\n var slist = Object.keys(self.__compiled__)\n .filter(function (name) {\n // Filter disabled & fake schemas\n return name.length > 0 && self.__compiled__[name];\n })\n .map(escapeRE)\n .join('|');\n // (?!_) cause 1.5x slowdown\n self.re.schema_test = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i');\n self.re.schema_search = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig');\n\n self.re.pretest = RegExp(\n '(' + self.re.schema_test.source + ')|(' + self.re.host_fuzzy_test.source + ')|@',\n 'i'\n );\n\n //\n // Cleanup\n //\n\n resetScanCache(self);\n}", "title": "" }, { "docid": "051d84804a4ed994f5c0ed7f301a52f0", "score": "0.51783645", "text": "function compile(self) {\n\n // Load & clone RE patterns.\n var re = self.re = __webpack_require__(/*! ./lib/re */ \"../../node_modules/linkify-it/lib/re.js\")(self.__opts__);\n\n // Define dynamic patterns\n var tlds = self.__tlds__.slice();\n\n self.onCompile();\n\n if (!self.__tlds_replaced__) {\n tlds.push(tlds_2ch_src_re);\n }\n tlds.push(re.src_xn);\n\n re.src_tlds = tlds.join('|');\n\n function untpl(tpl) { return tpl.replace('%TLDS%', re.src_tlds); }\n\n re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i');\n re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i');\n re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i');\n re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i');\n\n //\n // Compile each schema\n //\n\n var aliases = [];\n\n self.__compiled__ = {}; // Reset compiled data\n\n function schemaError(name, val) {\n throw new Error('(LinkifyIt) Invalid schema \"' + name + '\": ' + val);\n }\n\n Object.keys(self.__schemas__).forEach(function (name) {\n var val = self.__schemas__[name];\n\n // skip disabled methods\n if (val === null) { return; }\n\n var compiled = { validate: null, link: null };\n\n self.__compiled__[name] = compiled;\n\n if (isObject(val)) {\n if (isRegExp(val.validate)) {\n compiled.validate = createValidator(val.validate);\n } else if (isFunction(val.validate)) {\n compiled.validate = val.validate;\n } else {\n schemaError(name, val);\n }\n\n if (isFunction(val.normalize)) {\n compiled.normalize = val.normalize;\n } else if (!val.normalize) {\n compiled.normalize = createNormalizer();\n } else {\n schemaError(name, val);\n }\n\n return;\n }\n\n if (isString(val)) {\n aliases.push(name);\n return;\n }\n\n schemaError(name, val);\n });\n\n //\n // Compile postponed aliases\n //\n\n aliases.forEach(function (alias) {\n if (!self.__compiled__[self.__schemas__[alias]]) {\n // Silently fail on missed schemas to avoid errons on disable.\n // schemaError(alias, self.__schemas__[alias]);\n return;\n }\n\n self.__compiled__[alias].validate =\n self.__compiled__[self.__schemas__[alias]].validate;\n self.__compiled__[alias].normalize =\n self.__compiled__[self.__schemas__[alias]].normalize;\n });\n\n //\n // Fake record for guessed links\n //\n self.__compiled__[''] = { validate: null, normalize: createNormalizer() };\n\n //\n // Build schema condition\n //\n var slist = Object.keys(self.__compiled__)\n .filter(function (name) {\n // Filter disabled & fake schemas\n return name.length > 0 && self.__compiled__[name];\n })\n .map(escapeRE)\n .join('|');\n // (?!_) cause 1.5x slowdown\n self.re.schema_test = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i');\n self.re.schema_search = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig');\n\n self.re.pretest = RegExp(\n '(' + self.re.schema_test.source + ')|(' + self.re.host_fuzzy_test.source + ')|@',\n 'i'\n );\n\n //\n // Cleanup\n //\n\n resetScanCache(self);\n}", "title": "" }, { "docid": "faa591929ba2932a53b3d19ff77f0778", "score": "0.5176733", "text": "function bundle() {\n _buildCounter++;\n builder\n .bundle(function (err, buff) {})\n .pipe(fs.createWriteStream(outputPath).on('close', function() {\n console.log([_buildCounter, \"BUILD COMPLETE\", outputPath.split(\"/\").reverse()[0]]);\n }));\n }", "title": "" }, { "docid": "e2ce026cbf0df0b70a0f83de298fff49", "score": "0.51763934", "text": "function htmlFileProcessor(src, dst, clean, project, projectConfig, ajsWebAppProject, ajsWebAppProjectConfig) {\n \"use strict\";\n copyIfNewer(src, dst);\n clean.push(dst);\n}", "title": "" }, { "docid": "3dd49e831c29dfd04c697c5a2ad8ec51", "score": "0.5170728", "text": "analyzeAssets() {\n\t\tfor ( var [ filename, data ] of this.knownAssets ) {\n\t\t\tvar filenameParts = filename.split( '.' ),\n\t\t\t\tfileExtension = filenameParts.pop(),\n\t\t\t\tpatchedExtension = null;\n\n\t\t\tif ( fileExtension === 'patch' ) {\n\t\t\t\t// We don't have full vanilla assets here, so we can't apply patches completely,\n\t\t\t\t// but some parts of them may still be analyzed below.\n\t\t\t\tpatchedExtension = filenameParts.pop();\n\t\t\t}\n\n\t\t\t// Add \"sourceFilename\" to all assets (for use in error messages).\n\t\t\tObject.defineProperty( data, 'sourceFilename', { value: filename } );\n\n\t\t\t// Ensure that description/shortdescription don't have non-closed color codes (e.g. ^yellow;).\n\t\t\tfor ( var fieldName of [ 'description', 'shortdescription' ] ) {\n\t\t\t\tvar fieldValue = data[fieldName];\n\t\t\t\tif ( fieldValue ) {\n\t\t\t\t\tvar hasColor = false;\n\t\t\t\t\tfor ( var match of fieldValue.matchAll( /\\^([^;^]+);/g ) ) {\n\t\t\t\t\t\tvar color = match[1].toLowerCase();\n\t\t\t\t\t\thasColor = ( color !== 'reset' );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( hasColor ) {\n\t\t\t\t\t\tthis.fail( '\\n', filename, 'Missing ^reset; in ' + fieldName + ': ' + fieldValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remember if this is an item.\n\t\t\tvar itemCode;\n\t\t\tif ( fileExtension === 'codex' && data.id ) {\n\t\t\t\titemCode = data.id + '-codex';\n\t\t\t} else {\n\t\t\t\titemCode = data.itemName || data.objectName;\n\t\t\t}\n\n\t\t\tif ( itemCode ) {\n\t\t\t\tif ( this.knownItemCodes.has( itemCode ) && itemCode !== 'weaponupgradeanvil2' ) {\n\t\t\t\t\tthis.fail( '\\n', filename, 'Duplicate item ID: ' + itemCode );\n\t\t\t\t}\n\n\t\t\t\tthis.knownItemCodes.add( itemCode );\n\n\t\t\t\tif ( filename.startsWith( 'items/generic/produce' ) ) {\n\t\t\t\t\t// Produce items (e.g. Aquapod) shouldn't cause a warning if used in unlocks of Agriculture nodes.\n\t\t\t\t\tthis.craftableItemCodes.add( itemCode );\n\t\t\t\t}\n\n\t\t\t\tif ( data.materialId ) {\n\t\t\t\t\tthis.placeableMaterials.add( data.materialId );\n\t\t\t\t}\n\n\t\t\t\t// Check if any of the racial scan descriptions are exactly the same as default scan text.\n\t\t\t\tfor ( let [ key, value ] of Object.entries( data ) ) {\n\t\t\t\t\tif ( key.endsWith( 'Description' ) && value === data.description ) {\n\t\t\t\t\t\tthis.fail( '\\n', filename, 'Unnecessary key: ' + key + ': value is exactly the same as default scan text.' );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// No more checks for items.\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Remember if this is a liquid or material.\n\t\t\tif ( fileExtension === 'liquid' ) {\n\t\t\t\tthis.knownLiquids.set( data.liquidId, data );\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( fileExtension === 'material' ) {\n\t\t\t\tthis.knownMaterials.set( data.materialId, data );\n\t\t\t\tthis.knownMaterialsByName.set( data.materialName, data );\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Partially apply some patches.\n\t\t\tif ( !patchedExtension || ![ 'liquid', 'material' ].includes( patchedExtension ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tvar dataToPatch = this.knownAssets.get( filename.replace( /\\.patch$/, '' ) );\n\t\t\tif ( !dataToPatch ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tfor ( let instruction of data ) {\n\t\t\t\tif ( instruction.op !== 'add' && instruction.op !== 'replace' ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( instruction.path === '/interactions/-' ) {\n\t\t\t\t\tif ( !dataToPatch.interactions ) {\n\t\t\t\t\t\tdataToPatch.interactions = [];\n\t\t\t\t\t}\n\t\t\t\t\tdataToPatch.interactions.push( instruction.value );\n\t\t\t\t} else if ( instruction.path === '/liquidInteractions' ) {\n\t\t\t\t\tdataToPatch.liquidInteractions = instruction.value;\n\t\t\t\t} else if ( instruction.path === '/itemDrop' ) {\n\t\t\t\t\tdataToPatch.itemDrop = instruction.value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "4ef3d0259e905306ad695ad5a4b4e303", "score": "0.51703703", "text": "buildCode() {\n\t\tthis._codeSource.generated.generate();\n\t}", "title": "" }, { "docid": "72760725bba51ad556a7a77ad4469624", "score": "0.5165301", "text": "function compile(self) {\n\n // Load & clone RE patterns.\n var re = self.re = __webpack_require__(/*! ./lib/re */ \"./node_modules/linkify-it/lib/re.js\")(self.__opts__);\n\n // Define dynamic patterns\n var tlds = self.__tlds__.slice();\n\n self.onCompile();\n\n if (!self.__tlds_replaced__) {\n tlds.push(tlds_2ch_src_re);\n }\n tlds.push(re.src_xn);\n\n re.src_tlds = tlds.join('|');\n\n function untpl(tpl) { return tpl.replace('%TLDS%', re.src_tlds); }\n\n re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i');\n re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i');\n re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i');\n re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i');\n\n //\n // Compile each schema\n //\n\n var aliases = [];\n\n self.__compiled__ = {}; // Reset compiled data\n\n function schemaError(name, val) {\n throw new Error('(LinkifyIt) Invalid schema \"' + name + '\": ' + val);\n }\n\n Object.keys(self.__schemas__).forEach(function (name) {\n var val = self.__schemas__[name];\n\n // skip disabled methods\n if (val === null) { return; }\n\n var compiled = { validate: null, link: null };\n\n self.__compiled__[name] = compiled;\n\n if (isObject(val)) {\n if (isRegExp(val.validate)) {\n compiled.validate = createValidator(val.validate);\n } else if (isFunction(val.validate)) {\n compiled.validate = val.validate;\n } else {\n schemaError(name, val);\n }\n\n if (isFunction(val.normalize)) {\n compiled.normalize = val.normalize;\n } else if (!val.normalize) {\n compiled.normalize = createNormalizer();\n } else {\n schemaError(name, val);\n }\n\n return;\n }\n\n if (isString(val)) {\n aliases.push(name);\n return;\n }\n\n schemaError(name, val);\n });\n\n //\n // Compile postponed aliases\n //\n\n aliases.forEach(function (alias) {\n if (!self.__compiled__[self.__schemas__[alias]]) {\n // Silently fail on missed schemas to avoid errons on disable.\n // schemaError(alias, self.__schemas__[alias]);\n return;\n }\n\n self.__compiled__[alias].validate =\n self.__compiled__[self.__schemas__[alias]].validate;\n self.__compiled__[alias].normalize =\n self.__compiled__[self.__schemas__[alias]].normalize;\n });\n\n //\n // Fake record for guessed links\n //\n self.__compiled__[''] = { validate: null, normalize: createNormalizer() };\n\n //\n // Build schema condition\n //\n var slist = Object.keys(self.__compiled__)\n .filter(function (name) {\n // Filter disabled & fake schemas\n return name.length > 0 && self.__compiled__[name];\n })\n .map(escapeRE)\n .join('|');\n // (?!_) cause 1.5x slowdown\n self.re.schema_test = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i');\n self.re.schema_search = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig');\n\n self.re.pretest = RegExp(\n '(' + self.re.schema_test.source + ')|(' + self.re.host_fuzzy_test.source + ')|@',\n 'i'\n );\n\n //\n // Cleanup\n //\n\n resetScanCache(self);\n}", "title": "" }, { "docid": "d8b1bcb1f3e2500b64f7024d4f03d8c9", "score": "0.5162923", "text": "async function main() {\n debug('Beginning release...');\n const packageJson = require(PACKAGE_JSON);\n\n //\n // Update our version file so the build can know what version it is\n //\n debug(`Nuke the output folder: ${OUT_FOLDER}...`);\n await rmrfP(OUT_FOLDER);\n\n //\n // Update our version file so the build can know what version it is\n //\n debug('Updating release.json...');\n const releaseJson = require(RELEASE_JSON);\n releaseJson.version = packageJson.version;\n await writeFileP(RELEASE_JSON, jsonToString(releaseJson));\n\n //\n // Build the application\n //\n console.log('Building application...');\n debug('Creating output folder: ', OUT_FOLDER);\n // Make the build folder\n await mkdirpP(OUT_FOLDER);\n // Make web pack do the build\n debug('Running webpack...');\n const webpackResults = await webpackP(require(resolve('webpack.config.js')));\n const jsonResults = webpackResults.toJson();\n console.log(webpackResults.toString({ colors: true }));\n if (jsonResults.errors.length) {\n console.log(jsonResults.errors.join('\\n\\n'));\n process.exit(1);\n }\n await exec('git', ['add', OUT_FOLDER]);\n\n //\n // Update dist/package.json\n //\n debug('Creating dist/package.json');\n const distJson = {\n author: packageJson.author,\n name: packageJson.name,\n version: packageJson.version,\n main: packageJson.main.replace(/^dist\\//, ''),\n types: packageJson.types.replace(/^dist\\//, ''),\n license: packageJson.license,\n dependencies: packageJson.dependencies,\n };\n await writeFileP(DIST_JSON, jsonToString(distJson));\n\n // Stage the files for commit\n debug('Staging files for commit');\n await exec('git', ['add', DIST_JSON]);\n}", "title": "" }, { "docid": "16d00aec3770b5d4a53858669034eed2", "score": "0.5149849", "text": "script({ content: scriptContent, attributes }) {\n const ext = getScriptExtensionByAttrs(attributes);\n if (![ '.ts', '.tsx', '.coffee', '.jsx' ].includes(ext)) return null;\n // TODO: check if sourcemaps can be usefull for inline scripts\n const index = ++scriptIndex;\n return compileJS({\n ...ctx,\n dpath: `${ctx.dpath}-${index}${ext}`,\n moduleURL: ctx.moduleURL,\n path: `${ctx.path}-${index}${ext}`,\n stats: {\n ...ctx.stats,\n ext,\n },\n }, scriptContent, false, { skipHQTrans: true, skipSM: true });\n }", "title": "" }, { "docid": "ac9075672ad213ab4dc1dab7a44963f5", "score": "0.5137885", "text": "function watchFiles() {\n watch(\"src/js/*.js\", buildJavascriptDev);\n watch(\"src/scss/*.scss\", buildScssDev);\n watch(\"src/css/*.css\", buildCssDev);\n watch(\"src/pages/*.html\", series(copyHTML, injection));\n watch(\"src/images/*\", copyImages);\n watch(\"src/fonts/*\", copyFonts);\n}", "title": "" }, { "docid": "8ba5d20579bf3a06fc005c4934c72e94", "score": "0.51370955", "text": "async make() {\n this.logger.verbose(\"In:\", this.basePath);\n\n const {\n compiledRegexes,\n compiledGlobs,\n } = this.compilePatterns(this.patternsToPackage);\n this.compiledRegexes = compiledRegexes;\n this.compiledGlobs = compiledGlobs;\n\n try {\n await this.getPackageInfo();\n await this.makeTemporaryDirectory();\n await this.generateFiles();\n await this.collectFiles();\n await this.copyFiles();\n await this.makeTarFile();\n await this.deleteTemporaryDirectory();\n } catch (e) {\n this.logger.error(e);\n }\n }", "title": "" }, { "docid": "602bd2269880d7cc77fecd65d05653e0", "score": "0.5135079", "text": "abjure() {\n this.contents = fs.readFileSync(this.source).toString()\n let data = this.process(this.contents)\n return this.save(data)\n }", "title": "" }, { "docid": "d07f1300f124935c0d77200ac2f571f6", "score": "0.5134925", "text": "function build(environment){\n\tlogging.trace('beginning build for ' + environment);\n\tbuildJS[environment](paths['src']+'javaScript/', paths[environment]+'javaScript/');\n}", "title": "" }, { "docid": "65dea90fa42f6010a898a2db826d7ccd", "score": "0.51340145", "text": "function typescript_intergration() {\n return src('dev/components.ts')\n .pipe(gfi({\n '/* file 1 */' : 'dev/temp.ts'\n }))\n .pipe(ts({\n noImplicitAny: true\n }))\n .pipe(dest('dist/js'));\n}", "title": "" }, { "docid": "c2c1b35f5c2e0c7d7231d4f5c58a4826", "score": "0.5126001", "text": "async optimize() {\n const renderFiles = this.files.map(file => file.render(true))\n await Promise.all(renderFiles).catch(err => {\n // Fail silently\n })\n }", "title": "" }, { "docid": "3a6babd45ee69e077bf80c6d0e90db44", "score": "0.51252043", "text": "function defaultFileProcessor(src, dst, clean, project, projectConfig, ajsWebAppProject, ajsWebAppProjectConfig) {\n \"use strict\";\n copyIfNewer(src, dst);\n clean.push(dst);\n}", "title": "" }, { "docid": "016784ed931d87d35847408d9a0b8f9d", "score": "0.51223946", "text": "enterModularCompilation(ctx) {\n }", "title": "" }, { "docid": "ac4b811c1067829ef56a9a282610e2c1", "score": "0.5115079", "text": "function vulcanizeImports(compileStep, imports) {\n var tags = _.map(imports, function(path) {\n return linkTag(path);\n });\n\n fs.writeFileSync(tmpPath, tags.join(\"\\n\"));\n\n vulcan.setOptions({ abspath: tmpDir });\n\n vulcan.process(tmpFile, function(err, html) {\n fs.unlinkSync(tmpPath);\n var filenameHash = crypto.createHash('md5').update(html).digest('hex');\n var filePath = '/vulcanized-' + filenameHash + '.html';\n\n compileStep.addAsset({\n path: filePath,\n data: html\n });\n\n if (_.isString(process.env.CDN_PREFIX)) {\n filePath = url.resolve(process.env.CDN_PREFIX, filePath);\n }\n\n addImportTag(compileStep, filePath);\n });\n}", "title": "" }, { "docid": "35c591ac032a8f7a1b7de2e235ebe67f", "score": "0.5112876", "text": "function compile(self) {\n\n // Load & clone RE patterns.\n var re = self.re = assign({}, __webpack_require__(/*! ./lib/re */ \"./node_modules/linkify-it/lib/re.js\"));\n\n // Define dynamic patterns\n var tlds = self.__tlds__.slice();\n\n if (!self.__tlds_replaced__) {\n tlds.push(tlds_2ch_src_re);\n }\n tlds.push(re.src_xn);\n\n re.src_tlds = tlds.join('|');\n\n function untpl(tpl) { return tpl.replace('%TLDS%', re.src_tlds); }\n\n re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i');\n re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i');\n re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i');\n re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i');\n\n //\n // Compile each schema\n //\n\n var aliases = [];\n\n self.__compiled__ = {}; // Reset compiled data\n\n function schemaError(name, val) {\n throw new Error('(LinkifyIt) Invalid schema \"' + name + '\": ' + val);\n }\n\n Object.keys(self.__schemas__).forEach(function (name) {\n var val = self.__schemas__[name];\n\n // skip disabled methods\n if (val === null) { return; }\n\n var compiled = { validate: null, link: null };\n\n self.__compiled__[name] = compiled;\n\n if (isObject(val)) {\n if (isRegExp(val.validate)) {\n compiled.validate = createValidator(val.validate);\n } else if (isFunction(val.validate)) {\n compiled.validate = val.validate;\n } else {\n schemaError(name, val);\n }\n\n if (isFunction(val.normalize)) {\n compiled.normalize = val.normalize;\n } else if (!val.normalize) {\n compiled.normalize = createNormalizer();\n } else {\n schemaError(name, val);\n }\n\n return;\n }\n\n if (isString(val)) {\n aliases.push(name);\n return;\n }\n\n schemaError(name, val);\n });\n\n //\n // Compile postponed aliases\n //\n\n aliases.forEach(function (alias) {\n if (!self.__compiled__[self.__schemas__[alias]]) {\n // Silently fail on missed schemas to avoid errons on disable.\n // schemaError(alias, self.__schemas__[alias]);\n return;\n }\n\n self.__compiled__[alias].validate =\n self.__compiled__[self.__schemas__[alias]].validate;\n self.__compiled__[alias].normalize =\n self.__compiled__[self.__schemas__[alias]].normalize;\n });\n\n //\n // Fake record for guessed links\n //\n self.__compiled__[''] = { validate: null, normalize: createNormalizer() };\n\n //\n // Build schema condition\n //\n var slist = Object.keys(self.__compiled__)\n .filter(function (name) {\n // Filter disabled & fake schemas\n return name.length > 0 && self.__compiled__[name];\n })\n .map(escapeRE)\n .join('|');\n // (?!_) cause 1.5x slowdown\n self.re.schema_test = RegExp('(^|(?!_)(?:[><]|' + re.src_ZPCc + '))(' + slist + ')', 'i');\n self.re.schema_search = RegExp('(^|(?!_)(?:[><]|' + re.src_ZPCc + '))(' + slist + ')', 'ig');\n\n self.re.pretest = RegExp(\n '(' + self.re.schema_test.source + ')|' +\n '(' + self.re.host_fuzzy_test.source + ')|' +\n '@',\n 'i');\n\n //\n // Cleanup\n //\n\n resetScanCache(self);\n}", "title": "" }, { "docid": "f0d8bc5b4016827a5408598a5f6c6df7", "score": "0.5105312", "text": "compile() {\r\n let templateString = `template: \\`${this.template}\\`, `;\r\n let match = this.script.match(\r\n /(name(.*):|data(.*){|methods(.*):|computed(.*):)/im\r\n );\r\n this.compiled =\r\n this.script.substr(0, match.index) +\r\n templateString +\r\n this.script.substr(match.index);\r\n\r\n// console.log(this.style);\r\n this.appendCSSStyle(this.style);\r\n\r\n return this.compiled;\r\n }", "title": "" }, { "docid": "a1ca2544897d692d5c0d565fb5a73d26", "score": "0.5102022", "text": "compile(file) {\r\n return new Promise(resolve => {\r\n process.chdir(this.agentProjectDir);\r\n lock.acquire('compile', async () => {\r\n this.compileOptions.entrypoint = file;\r\n const bundle = compiler.build(this.compileOptions);\r\n fs.writeFileSync(this.outFile, bundle);\r\n resolve();\r\n }, null, null);\r\n process.chdir(this.baseDir);\r\n });\r\n }", "title": "" }, { "docid": "4725ac3dcab9977cbe8b2f41a160b125", "score": "0.5095526", "text": "function setCore() {\n fs.writeFileSync(srcactfn, fs.readFileSync(srcactfn).toString().replace(/import .*\\.R;/, 'import ' + core.packageName + '.R;'));\n console.log('[activity src] Finished writing file');\n\n parse(fs.readFileSync(projectfn), function checkProject(err, result) {\n if (err) throw err;\n result.projectDescription.name = core.name;\n fs.writeFileSync(projectfn, (new xml2js.Builder()).buildObject(result));\n console.log('[project file] Finished writing file');\n });\n\n parse(fs.readFileSync(manifestfn), function checkManifest(err, result) {\n if (err) throw err;\n result.manifest.$.package = core.packageName;\n fs.writeFileSync(manifestfn, (new xml2js.Builder()).buildObject(result));\n console.log('[the manifest] Finished writing file');\n });\n\n parse(fs.readFileSync(basefn), function checkBase(err, result) {\n if (err) throw err;\n for (var i in result.resources.string) {\n switch (result.resources.string[i].$.name) {\n case 'theme_title':\n result.resources.string[i]._ = core.name;\n break;\n case 'theme_description':\n case 'theme_info':\n result.resources.string[i]._ = core.description;\n break;\n case 'authorName':\n case 'developerName':\n case 'developer_name':\n result.resources.string[i]._ = core.authorDeveloper;\n break;\n case 'authorLink':\n case 'developer_link':\n result.resources.string[i]._ = core.link;\n break;\n }\n }\n result.resources.string = result.resources.string.filter(function(element) { return element.$.name.indexOf('theme_preview') !== 0; });\n for (var y in previews) result.resources.string.push({ _: previews[y], $: { name: 'theme_preview' + (parseInt(y, 10) + 1) } });\n fs.writeFileSync(basefn, (new xml2js.Builder()).buildObject(result));\n console.log('[base cfg res] Finished writing file');\n });\n\n parse(fs.readFileSync(cfgfn), function checkCfg(err, result) {\n if (err) throw err;\n result.theme.themeName = core.name;\n result.theme.themeInfo = core.description;\n result.theme.preview = { $: {} };\n for (var y in previews) result.theme.preview.$['img' + (parseInt(y) + 1)] = previews[y];\n fs.writeFileSync(cfgfn, (new xml2js.Builder()).buildObject(result));\n console.log('[themecfg ast] Finished writing file');\n });\n\n process.stdin.pause();\n}", "title": "" }, { "docid": "5ab975cf8268b10fc4f460c076c8cd3b", "score": "0.5095043", "text": "function sassFileProcessor(src, dst, clean, project, projectConfig, ajsWebAppProject, ajsWebAppProjectConfig) {\n \"use strict\";\n copyIfNewer(src, dst);\n clean.push(dst);\n}", "title": "" }, { "docid": "2321ea6a3aff9082e2ed192daccbe655", "score": "0.50728905", "text": "async generateFiles() {\n this.injectBabelRuntimeDependency();\n await this.compileBabelFiles();\n await this.generatePackageJson();\n }", "title": "" }, { "docid": "8e4f34be624049460271797ea7fd55a0", "score": "0.5062278", "text": "function typescript_compile() {\n return src('dev/pages/**/*.ts')\n .pipe(ts({\n noImplicitAny: true\n }))\n .pipe(rename({dirname: ''}))\n .pipe(dest('dist/js'))\n .pipe(connect.reload());\n}", "title": "" }, { "docid": "2a2247753ca63b9a40f63e7857022524", "score": "0.503842", "text": "function preCopyResource(evt, callback) {\n\t\tvar copyArgs = evt.args,\n\t\t\tfrom = copyArgs[0],\n\t\t\tto = copyArgs[1];\n\n\t\tif (to.slice(-3) !== '.js') {\n\t\t\treturn callback();\n\t\t}\n\n\t\t// TODO: Is there a quicker way to detect changed files?\n\t\tfs.stat(from, function(err, stat) {\n\t\t\tvar modifiedTime = stat.mtime.getTime();\n\t\t\tif (!minifyJS && cache[from] && cache[from] === modifiedTime) {\n\t\t\t\t// Already up to date.\n\t\t\t\tlogger.trace('Already transformed, not updated: ' + from);\n\t\t\t\treturn copyFinished();\n\t\t\t}\n\t\t\t// Translate and write out the results.\n\t\t\tbabel.transformFile(from, function(err, transformed) {\n\t\t\t\tif (err) {\n\t\t\t\t\treturn callback(err);\n\t\t\t\t}\n\t\t\t\tfs.writeFileSync(to, transformed.code);\n\t\t\t\tcache[from] = stat.mtime.getTime();\n\t\t\t\tlogger.trace('Transformed: ' + from);\n\t\t\t\treturn copyFinished();\n\t\t\t});\n\t\t});\n\n\t\tfunction copyFinished() {\n\t\t\tevt.minifyJS = minifyJS;\n\t\t\tcopyArgs[0] = copyArgs[1];\n\t\t\tcallback();\n\t\t}\n\t}", "title": "" }, { "docid": "35e22b590cae596f89b0f5b7d6edb3bc", "score": "0.5029037", "text": "_copyBuildScript() {\n if (this.props.pkg.build === 'gulp') {\n this.fs.copyTpl(\n this.templatePath('_gulpfile.js'),\n this.destinationPath('gulpfile.js'),\n this.props);\n }\n\n if (this.props.pkg.build === 'grunt') {\n this.fs.copyTpl(\n this.templatePath('_Gruntfile.js'),\n this.destinationPath('Gruntfile.js'),\n this.props);\n }\n }", "title": "" }, { "docid": "46bde5aeaa25a615b7f0125a68a00161", "score": "0.50281656", "text": "function bundle() {\n \t\treturn b.bundle()\n \t\t.on('error', gutil.log.bind(gutil, 'Browserify Error')) // log errors if they happen\n \t\t.pipe(source(JS_BUILD))\n \t\t.pipe(plugins.sourcemaps.write('./')) // write .map file\n \t\t.pipe(gulp.dest(JS_DEST))\n .pipe(plugins.connect.reload());\n }", "title": "" }, { "docid": "ffc34481b907f5ba59c60e3b56c05f4f", "score": "0.5027267", "text": "function onComplete() {\n var compiled = accumulator.compiled,\n uglified = accumulator.uglified;\n\n // save the Closure Compiled version to disk\n fs.writeFileSync(path.join(distPath, 'lodash.compiler.js'), compiled.source);\n // explicit 'binary' is necessary to ensure the stream is written correctly\n fs.writeFileSync(path.join(distPath, 'lodash.compiler.js.gz'), compiled.gzip, 'binary');\n\n // save the Uglified version to disk\n fs.writeFileSync(path.join(distPath, 'lodash.uglify.js'), uglified.source);\n fs.writeFileSync(path.join(distPath, 'lodash.uglify.js.gz'), uglified.gzip, 'binary');\n\n // select the smallest gzipped file and use its minified form as the\n // official minified release (ties go to Closure Compiler)\n fs.writeFileSync(path.join(__dirname, 'lodash.min.js'),\n uglified.gzip.length < compiled.gzip.length\n ? uglified.source\n : compiled.source\n );\n }", "title": "" }, { "docid": "ae95cb05a17bdc58091648b7b84a7848", "score": "0.5026967", "text": "function build() {\n util.log('building app');\n\n var htmlFilter = $.filter('*.html');\n var jsFilter = $.filter('**/*.js');\n var cssFilter = $.filter('**/*.css');\n var assets;\n\n return gulp.src(path.join(config.paths.tmp, '/serve/*.html'))\n .pipe(assets = $.useref.assets())\n .pipe(jsFilter)\n .pipe($.ngAnnotate())\n .pipe($.uglify()).on('error', util.errorHandler('uglify'))\n .pipe(jsFilter.restore())\n .pipe(cssFilter)\n .pipe($.minifyCss())\n .pipe(cssFilter.restore())\n .pipe(assets.restore())\n .pipe($.useref())\n .pipe(htmlFilter)\n .pipe($.preprocess({ context: { NODE_ENV: 'production' } }))\n .pipe($.minifyHtml(config.settings.minifyHtml))\n .pipe(htmlFilter.restore())\n .pipe(gulp.dest(path.join(config.paths.dest, '/')))\n .pipe($.gzip())\n .pipe(gulp.dest(path.join(config.paths.dest, '/')))\n .pipe($.size({ title: path.join(config.paths.dest, '/'), showFiles: true }));\n}", "title": "" }, { "docid": "02e90d980d6b507b9556c58c771b2882", "score": "0.5017835", "text": "function update() {\n if (compileAbortController !== null) {\n // A previous compile was in flight. Cancel it to avoid resource starvation.\n compileAbortController.abort();\n }\n let abortController = new AbortController();\n compileAbortController = abortController;\n let terminal = document.querySelector('#terminal');\n terminal.textContent = '';\n terminal.placeholder = 'Compiling...';\n\n updateResetButton();\n\n // Compile the script.\n fetch(API_URL + '/compile?target=' + project.target, {\n method: 'POST',\n body: document.querySelector('#input').value,\n signal: abortController.signal,\n }).then((response) => {\n // Good response, but the compile was not necessarily successful.\n compileAbortController = null;\n terminal.textContent = '';\n terminal.placeholder = '';\n if (response.headers.get('Content-Type') == 'application/wasm') {\n terminal.classList.remove('error');\n if (runner !== null) {\n runner.stop();\n }\n project.refreshBoard();\n runner = new Runner(response);\n } else {\n terminal.classList.add('error');\n response.text().then((text) => {\n terminal.textContent = text;\n });\n }\n }).catch((reason) => {\n if (abortController.signal.aborted) {\n // Expected error.\n return;\n }\n // Probably a network error.\n console.error('could not compile', reason);\n terminal.textContent = reason;\n terminal.classList.add('error');\n });\n}", "title": "" }, { "docid": "623b5541dc1981a1bf34dbb40d36a144", "score": "0.50146645", "text": "async function onFrontendBuild(stats) {\n const builtFiles = Object.keys(stats.compilation.assets);\n await deleteOldFrontEndFilesSimilarTo(builtFiles);\n}", "title": "" }, { "docid": "0de72c5017f7a842b5bd83634e201c34", "score": "0.50110465", "text": "function compile_code() {\n //link for compiler\n var compilerURI = \"http://127.0.0.1:5000/post_code\";\n\n //get code from blocks\n if(!file_upload){\n //build code from text\n var finished_code = get_code();\n\n //user wrote code (blocks were created)\n if(finished_code != \"-1\") {\n var clean_string = finished_code.replace(/[^a-zA-Z ]/g, \"\");\n if( clean_string.replace(/\\s/g,'') == \"\"){\n create_bootstrap_alert(\"Write code to compile! \",\"You can add a block or upload a file.\");\n }\n\n else{\n //build json from code\n var data_js = JSON.stringify({\"code\":finished_code});\n\n //send ajax post request\n post_request_ajax(compilerURI,data_js);\n }\n }\n }\n \n //get code from file\n else {\n if(file_text != \"-1\"){\n //build json from code\n var data_js = JSON.stringify({\"code\":file_text});\n\n //send ajax post request\n post_request_ajax(compilerURI,data_js);\n }\n\n else {\n create_bootstrap_alert(\"Write code to compile! \",\"You can add a block or upload a file.\");\n }\n }\n}", "title": "" }, { "docid": "f323e10ecbd707285f4e0a02907f37d1", "score": "0.5009642", "text": "function onbundle (bundle, name) {\n if (state.env === 'development') {\n emit('asset', name, bundle, {\n mime: 'application/javascript'\n })\n } else {\n const src = bundle.toString()\n const map = sourcemap.fromSource(src)\n const buff = Buffer.from(sourcemap.removeComments(src))\n emit('asset', name, buff, {\n mime: 'application/javascript',\n map: Buffer.from(map.toJSON())\n })\n }\n }", "title": "" }, { "docid": "c73a6e133400a4984e0fa3af00682cb1", "score": "0.50084144", "text": "async compile(options) {\n\t\tthis.compileWorld();\n this.compileHitboxes();\n if (options && options.export) {\n await this.createCompiledGameFile();\n this.Actions.actionPopup(\n \"COMPILE AND EXPORT COMPLETE\",\n \"primary\",\n `World: ${this.logs.worldCompile.before} objects compiled to ${this.logs.worldCompile.after} (${this.logs.worldCompile.ratio}%) <br/> Hitboxes: ${this.logs.hitboxCompile} <br/> Export: ${this.logs.export}`,\n [\n {\n text: \"OK\",\n style: \"primary\",\n action: () => {\n this.Actions.destroyPopup();\n },\n },\n ]\n );\n } else {\n this.game.compiledGameExists = true;\n this.Actions.actionPopup(\n \"COMPILE COMPLETE\",\n \"primary\",\n `World: ${this.logs.worldCompile.before} objects compiled to ${this.logs.worldCompile.after} (${this.logs.worldCompile.ratio}%) <br/> Hitboxes: ${this.logs.hitboxCompile}`,\n [\n {\n text: \"OK\",\n style: \"primary\",\n action: () => {\n this.Actions.destroyPopup();\n },\n },\n ]\n );\n } \n\t}", "title": "" }, { "docid": "4f81bc5afe7bc3dc553b511106cab292", "score": "0.5003938", "text": "function typescript_components_compile() {\n return src('dev/components/**/*.ts')\n .pipe(concat('temp.ts'))\n .pipe(dest('dev/'));\n}", "title": "" }, { "docid": "7e5a506ec8a2b8470cecf94ab64453f9", "score": "0.5001022", "text": "buildStart() {\n generatedBundles = [];\n externalTransformFns = [];\n\n if (pluginOptions.inputPath) {\n this.addWatchFile(pluginOptions.inputPath);\n }\n }", "title": "" }, { "docid": "1d3a03a4446f6af0794d363f12ac7905", "score": "0.4999558", "text": "function buildScript(file) {\n\n let bundler = browserify({\n entries: config.browserify.entries,\n debug: true,\n cache: {},\n packageCache: {},\n fullPaths: !global.isProd\n });\n\n if ( !global.isProd ) {\n bundler = watchify(bundler);\n bundler.on('update', function() {\n rebundle();\n });\n }\n\n let transforms = [\n { 'name':babelify, 'options': {}},\n { 'name':debowerify, 'options': {}},\n { 'name':ngAnnotate, 'options': {}}\n ];\n\n transforms.forEach(function(transform) {\n bundler.transform(transform.name, transform.options);\n });\n\n function rebundle() {\n let stream = bundler.bundle();\n let createSourcemap = config.browserify.prodSourcemap;\n\n $.util.log('Rebundle...');\n\n return stream.on('error', handleErrors)\n .pipe(source(file))\n .pipe($.if(createSourcemap, buffer()))\n .pipe($.if(createSourcemap, $.sourcemaps.init()))\n .pipe($.if(global.isProd, $.streamify($.uglify({\n compress: { drop_console: true }\n }))))\n .pipe($.if(createSourcemap, $.sourcemaps.write('./')))\n .pipe(gulp.dest(config.scripts.dest))\n .pipe(browserSync.stream({ once: true }));\n }\n\n return rebundle();\n\n}", "title": "" }, { "docid": "85a898a66f931c76f11eeebf3484e6cd", "score": "0.49990213", "text": "function compress(filePath, stats, httpCode, req, res) {\n\t\timpress.fs.readFile(filePath, function(error, data) {\n\t\t\tif (error) {\n\t\t\t\tif (res) {\n\t\t\t\t\tres.end();\n\t\t\t\t\timpress.stat.responseCount++;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar ext = (req) ? req.impress.ext : fileExt(filePath);\n\t\t\t\tif (ext == 'js' && impress.config.uglify && impress.config.uglify.minify) {\n\t\t\t\t\tdata = impress.minify(data);\n\t\t\t\t\tstats.size = data.length;\n\t\t\t\t}\n\t\t\t\tif (!inArray(impress.compressedExt, ext) && stats.size>impress.compressAbove) {\n\t\t\t\t\timpress.zlib.gzip(data, function(err, data) {\n\t\t\t\t\t\tstats.size = data.length;\n\t\t\t\t\t\tif (res) {\n\t\t\t\t\t\t\tres.writeHead(httpCode, baseHeader(ext, stats, true));\n\t\t\t\t\t\t\tres.end(data);\n\t\t\t\t\t\t\timpress.stat.responseCount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\timpress.cache.static[filePath] = { data:data, stats:stats, compressed: true };\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tif (res) {\n\t\t\t\t\t\tres.writeHead(httpCode, baseHeader(ext, stats));\n\t\t\t\t\t\tres.end(data);\n\t\t\t\t\t\timpress.stat.responseCount++;\n\t\t\t\t\t}\n\t\t\t\t\timpress.cache.static[filePath] = { data:data, stats:stats, compressed: false };\n\t\t\t\t}\n\t\t\t\twatchCache(filePath);\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "a0dc82cc2bf1fc0ec09b87dcce362412", "score": "0.49979243", "text": "function buildManifest(compiler,compilation){let context=compiler.options.context;let manifest={};compilation.chunkGroups.forEach(chunkGroup=>{if(chunkGroup.isInitial()){return;}chunkGroup.origins.forEach(chunkGroupOrigin=>{const{request}=chunkGroupOrigin;chunkGroup.chunks.forEach(chunk=>{chunk.files.forEach(file=>{if(!file.match(/\\.js$/)||!file.match(/^static\\/chunks\\//)){return;}let publicPath=_url.default.resolve(compilation.outputOptions.publicPath||'',file);for(const module of chunk.modulesIterable){let id=module.id;let name=typeof module.libIdent==='function'?module.libIdent({context}):null;if(!manifest[request]){manifest[request]=[];}// Avoid duplicate files\nif(manifest[request].some(item=>item.id===id&&item.file===file)){continue;}manifest[request].push({id,name,file,publicPath});}});});});});manifest=Object.keys(manifest).sort().reduce((a,c)=>(a[c]=manifest[c],a),{});return manifest;}", "title": "" }, { "docid": "0dad19da8f2301115f82b3ef54a8e596", "score": "0.49933046", "text": "_enqueueOracleJRE(dataDir){\n return new Promise((resolve, reject) => {\n AssetGuard._latestJREOracle().then(verData => {\n if(verData != null){\n\n const combined = verData.uri + PLATFORM_MAP[process.platform]\n \n const opts = {\n url: combined,\n headers: {\n 'Cookie': 'oraclelicense=accept-securebackup-cookie'\n }\n }\n \n request.head(opts, (err, resp, body) => {\n if(err){\n resolve(false)\n } else {\n dataDir = path.join(dataDir, 'runtime', 'x64')\n const name = combined.substring(combined.lastIndexOf('/')+1)\n const fDir = path.join(dataDir, name)\n const jre = new Asset(name, null, resp.headers['content-length'], opts, fDir)\n this.java = new DLTracker([jre], jre.size, (a, self) => {\n let h = null\n fs.createReadStream(a.to)\n .on('error', err => console.log(err))\n .pipe(zlib.createGunzip())\n .on('error', err => console.log(err))\n .pipe(tar.extract(dataDir, {\n map: (header) => {\n if(h == null){\n h = header.name\n }\n }\n }))\n .on('error', err => console.log(err))\n .on('finish', () => {\n fs.unlink(a.to, err => {\n if(err){\n console.log(err)\n }\n if(h.indexOf('/') > -1){\n h = h.substring(0, h.indexOf('/'))\n }\n const pos = path.join(dataDir, h)\n self.emit('jExtracted', AssetGuard.javaExecFromRoot(pos))\n })\n })\n \n })\n resolve(true)\n }\n })\n\n } else {\n resolve(false)\n }\n })\n })\n\n }", "title": "" }, { "docid": "35783760312afcd11ccaaee9fd0a26cb", "score": "0.4985836", "text": "function copyAssets (done) {\n var assets = {\n js: [\n \"./node_modules/jquery/dist/jquery.js\",\n \"./node_modules/bootstrap/dist/js/bootstrap.bundle.js\",\n \"./node_modules/moment/moment.js\",\n \"./node_modules/metismenu/dist/metisMenu.js\",\n \"./node_modules/jquery-slimscroll/jquery.slimscroll.js\",\n \"./node_modules/daterangepicker/daterangepicker.js\",\n \"./node_modules/jquery-toast-plugin/dist/jquery.toast.min.js\",\n \"./node_modules/select2/dist/js/select2.min.js\",\n \"./node_modules/jquery-mask-plugin/dist/jquery.mask.min.js\",\n \"./node_modules/twitter-bootstrap-wizard/jquery.bootstrap.wizard.min.js\",\n \"./node_modules/bootstrap-timepicker/js/bootstrap-timepicker.min.js\",\n \"./node_modules/bootstrap-touchspin/dist/jquery.bootstrap-touchspin.min.js\",\n \"./node_modules/bootstrap-maxlength/bootstrap-maxlength.min.js\",\n \"./node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js\"\n ],\n scss: [\n \"./node_modules/daterangepicker/daterangepicker.css\",\n \"./node_modules/jquery-toast-plugin/dist/jquery.toast.min.css\",\n \"./node_modules/select2/dist/css/select2.min.css\",\n \"./node_modules/bootstrap-timepicker/css/bootstrap-timepicker.min.css\",\n \"./node_modules/bootstrap-touchspin/dist/jquery.bootstrap-touchspin.min.css\",\n \"./node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css\"\n ],\n };\n\n var third_party_assets = {\n js: [\n \"./node_modules/chart.js/dist/Chart.bundle.min.js\",\n \"./node_modules/d3/dist/d3.min.js\",\n \"./node_modules/britecharts/dist/bundled/britecharts.min.js\",\n \"./node_modules/datatables.net/js/jquery.dataTables.min.js\",\n \"./node_modules/datatables.net-bs4/js/dataTables.bootstrap4.js\",\n \"./node_modules/datatables.net-responsive/js/dataTables.responsive.min.js\",\n \"./node_modules/datatables.net-responsive-bs4/js/responsive.bootstrap4.min.js\",\n \"./node_modules/datatables.net-buttons/js/dataTables.buttons.min.js\",\n \"./node_modules/datatables.net-buttons-bs4/js/buttons.bootstrap4.min.js\",\n \"./node_modules/datatables.net-buttons/js/buttons.html5.min.js\",\n \"./node_modules/datatables.net-buttons/js/buttons.flash.min.js\",\n \"./node_modules/datatables.net-buttons/js/buttons.print.min.js\",\n \"./node_modules/datatables.net-keytable/js/dataTables.keyTable.min.js\",\n \"./node_modules/datatables.net-select/js/dataTables.select.min.js\",\n \"./node_modules/jquery-datatables-checkboxes/js/dataTables.checkboxes.min.js\",\n \"./node_modules/jquery-ui/jquery-ui.min.js\",\n \"./node_modules/fullcalendar/dist/fullcalendar.min.js\",\n \"./node_modules/gmaps/gmaps.min.js\",\n \"./node_modules/admin-resources/jquery.vectormap/jquery-jvectormap-1.2.2.min.js\",\n \"./node_modules/admin-resources/jquery.vectormap/maps/jquery-jvectormap-world-mill-en.js\",\n \"./node_modules/admin-resources/jquery.vectormap/maps/jquery-jvectormap-us-merc-en.js\",\n \"./node_modules/admin-resources/jquery.vectormap/maps/jquery-jvectormap-au-mill-en.js\",\n \"./node_modules/admin-resources/jquery.vectormap/maps/jquery-jvectormap-us-il-chicago-mill-en.js\",\n \"./node_modules/admin-resources/jquery.vectormap/maps/jquery-jvectormap-in-mill-en.js\",\n \"./node_modules/dragula/dist/dragula.min.js\",\n \"./node_modules/dropzone/dist/min/dropzone.min.js\",\n \"./node_modules/apexcharts/dist/apexcharts.min.js\",\n \"./node_modules/summernote/dist/summernote-bs4.min.js\",\n \"./node_modules/simplemde/dist/simplemde.min.js\",\n \"./node_modules/typeahead.js/dist/typeahead.bundle.min.js\",\n \"./node_modules/handlebars/dist/handlebars.min.js\",\n \"./node_modules/jquery-sparkline/jquery.sparkline.min.js\"\n ],\n css: [\n \"./node_modules/admin-resources/jquery.vectormap/jquery-jvectormap-1.2.2.css\",\n \"./node_modules/britecharts/dist/css/britecharts.min.css\",\n \"./node_modules/datatables.net-bs4/css/dataTables.bootstrap4.css\",\n \"./node_modules/datatables.net-responsive-bs4/css/responsive.bootstrap4.css\",\n \"./node_modules/datatables.net-buttons-bs4/css/buttons.bootstrap4.css\",\n \"./node_modules/datatables.net-select-bs4/css/select.bootstrap4.css\",\n \"./node_modules/fullcalendar/dist/fullcalendar.min.css\",\n \"./node_modules/@mdi/font/css/materialdesignicons.min.css\",\n \"./node_modules/summernote/dist/summernote-bs4.css\",\n \"./node_modules/simplemde/dist/simplemde.min.css\"\n ],\n font: [\n \"./node_modules/@mdi/font/css/materialdesignicons.min.css\"\n ]\n };\n\n //copying third party assets\n lodash(third_party_assets).forEach(function (assets, type) {\n if (type == \"css\") {\n // gulp.src(assets).pipe(gulp.dest(folder.src + \"css/vendor\"));\n gulp.src(assets).pipe(gulp.dest(folder.dist_assets + \"css/vendor\"));\n }\n else {\n // gulp.src(assets).pipe(gulp.dest(folder.src + \"js/vendor\"));\n gulp.src(assets).pipe(gulp.dest(folder.dist_assets + \"js/vendor\"));\n }\n });\n\n //copying required assets\n lodash(assets).forEach(function (assets, type) {\n if (type == \"scss\") {\n gulp\n .src(assets)\n .pipe(\n rename({\n // rename aaa.css to _aaa.scss\n prefix: \"_\",\n extname: \".scss\"\n })\n )\n .pipe(gulp.dest(folder.src + \"scss/vendor\"));\n } else {\n gulp.src(assets).pipe(gulp.dest(folder.src + \"js/vendor\"));\n }\n });\n\n done();\n}", "title": "" }, { "docid": "a92197e06ef027a3c316c0d81992044f", "score": "0.4982234", "text": "function Int_assets(ns, exports) {\n\nvar m_assert = Object(__WEBPACK_IMPORTED_MODULE_1__util_assert_js__[\"a\" /* default */])(ns);\nvar m_cfg = Object(__WEBPACK_IMPORTED_MODULE_2__config_js__[\"a\" /* default */])(ns);\nvar m_compat = Object(__WEBPACK_IMPORTED_MODULE_3__compat_js__[\"a\" /* default */])(ns);\nvar m_print = Object(__WEBPACK_IMPORTED_MODULE_5__print_js__[\"a\" /* default */])(ns);\nvar m_sfg = Object(__WEBPACK_IMPORTED_MODULE_6__sfx_js__[\"a\" /* default */])(ns);\n\nvar cfg_def = m_cfg.defaults;\nvar cfg_ldr = m_cfg.assets;\n\n// asset types\nexports.AT_ARRAYBUFFER = 10;\nexports.AT_ARRAYBUFFER_ZIP = 20;\nexports.AT_JSON = 30;\nexports.AT_JSON_ZIP = 40;\nexports.AT_TEXT = 50;\nexports.AT_AUDIOBUFFER = 60;\nexports.AT_IMAGE_ELEMENT = 70;\nexports.AT_AUDIO_ELEMENT = 80;\nexports.AT_VIDEO_ELEMENT = 90;\nexports.AT_SEQ_VIDEO_ELEMENT = 100;\n\n// asset states: enqueued -> requested -> received\nvar ASTATE_ENQUEUED = 10;\nvar ASTATE_REQUESTED = 20;\nvar ASTATE_RECEIVED = 30;\nvar ASTATE_HALTED = 40;\n\nvar _assets_queue = [];\nvar _assets_pack_index = 0;\n\n// deprecated\nvar _loaded_assets = {};\n\nvar _arraybuffer_cache = {};\nvar _img_cache = {};\nvar _sound_cache = {};\nvar _arraybuffer_sound_cache = {};\n\nfunction get_built_in_data() {\n if (m_cfg.is_built_in_data())\n return b4w.require(m_cfg.paths.built_in_data_module)[\"data\"];\n else\n return null;\n}\n\nfunction FakeHttpRequest() {\n var req = {\n _source_url: null,\n _parse_response: function(source) {\n switch(req.responseType) {\n case \"json\":\n case \"text\":\n return source;\n case \"arraybuffer\":\n var bin_str = atob(source);\n var len = bin_str.length;\n\n var arr_buffer = new Int8Array(len);\n for (var i = 0; i < len; i++)\n arr_buffer[i] = bin_str.charCodeAt(i);\n return arr_buffer.buffer;\n default:\n return source;\n }\n },\n\n status: 0,\n readyState: 0,\n response: \"\",\n responseType: \"\",\n onreadystatechange: null,\n\n overrideMimeType: function() {},\n addEventListener: function() {},\n open: function(method, url, async) {\n req._source_url = url;\n req.readyState = 1;\n },\n send: function() {\n req.status = 404;\n req.readyState = 4;\n var bd = get_built_in_data();\n if (bd && req._source_url in bd) {\n req.status = 200;\n if (bd[req._source_url])\n req.response = req._parse_response(bd[req._source_url]);\n }\n var get_type = {};\n if (get_type.toString.call(req.onreadystatechange)\n === '[object Function]')\n req.onreadystatechange();\n }\n }\n return req;\n}\n\n/**\n * Split path to head and extension: \"123.txt\" -> [\"123\", \"txt\"]\n */\nexports.split_extension = function(path) {\n var dot_split = path.split(\".\");\n\n var head_ext = Array(2);\n\n head_ext[0] = dot_split.slice(0, -1).join(\".\");\n head_ext[1] = String(dot_split.slice(-1));\n\n return head_ext;\n}\n\n/**\n * Get text by sync request.\n * @deprecated Any usage is strongly discouraged\n */\nexports.get_text_sync = function(asset_uri) {\n // check in cache\n if (_loaded_assets[asset_uri])\n return _loaded_assets[asset_uri];\n\n if (cfg_ldr.prevent_caching)\n var filepath = asset_uri + \"?v=\" + Object(__WEBPACK_IMPORTED_MODULE_9__version_js__[\"c\" /* get_build_version */])();\n else\n var filepath = asset_uri;\n\n var req = new XMLHttpRequest();\n req.overrideMimeType(\"text/plain\"); // to prevent \"not well formed\" error\n req.open(\"GET\", filepath, false);\n req.send(null);\n\n if (req.status == 200 || req.status == 0) {\n var resp_text = req.responseText;\n if (resp_text.length) {\n // save in cache\n _loaded_assets[asset_uri] = resp_text;\n return resp_text;\n } else\n m_assert.panic(\"Error XHR: responce is empty, GET \" + asset_uri);\n } else {\n m_assert.panic(\"Error XHR: \" + req.status + \", GET \" + asset_uri);\n }\n}\n\nexports.cleanup = function() {\n for (var i = 0; i < _assets_queue.length; i++)\n _assets_queue[i].state = ASTATE_HALTED;\n _assets_queue = [];\n _assets_pack_index = 0;\n\n // deprecated\n _loaded_assets = {};\n}\n\nexports.enqueue = function(assets_pack, asset_cb, pack_cb, progress_cb, json_reviver) {\n for (var i = 0; i < assets_pack.length; i++) {\n var elem = assets_pack[i];\n\n var asset = {\n id: elem.id,\n type: elem.type,\n url: elem.url,\n is_fetch: elem.is_fetch,\n request_method: elem.request_method ? elem.request_method : \"GET\",\n overwrite_header: elem.overwrite_header ? elem.overwrite_header : null,\n post_data: elem.post_data ? elem.post_data : null,\n param: elem.param ? elem.param : null,\n\n state: ASTATE_ENQUEUED,\n\n asset_cb: asset_cb || (function() {}),\n pack_cb: pack_cb || (function() {}),\n progress_cb: progress_cb || (function() {}),\n json_reviver: json_reviver || null,\n\n pack_index: _assets_pack_index\n }\n\n if (cfg_ldr.prevent_caching) {\n var bd = get_built_in_data();\n if (!(bd && asset.url in bd))\n asset.url += \"?v=\" + Object(__WEBPACK_IMPORTED_MODULE_9__version_js__[\"c\" /* get_build_version */])();\n }\n\n _assets_queue.push(asset);\n }\n\n request_assets(_assets_queue);\n _assets_pack_index++;\n}\n\n/**\n * Executed every frame\n */\nexports.update = function() {\n request_assets(_assets_queue);\n handle_packs(_assets_queue);\n}\n\nfunction request_assets(queue) {\n\n var req_cnt = 0;\n\n for (var i = 0; i < queue.length; i++) {\n var asset = queue[i];\n\n if (asset.state === ASTATE_REQUESTED)\n req_cnt++;\n\n // check requests limit\n if (req_cnt >= cfg_ldr.max_requests)\n break;\n\n // pass recently enqueued\n if (asset.state !== ASTATE_ENQUEUED)\n continue;\n\n asset.state = ASTATE_REQUESTED;\n req_cnt++;\n\n switch (asset.type) {\n case exports.AT_JSON_ZIP:\n case exports.AT_ARRAYBUFFER:\n case exports.AT_ARRAYBUFFER_ZIP:\n request_arraybuffer(asset, \"arraybuffer\");\n break;\n case exports.AT_JSON:\n request_arraybuffer(asset, \"json\");\n break;\n case exports.AT_TEXT:\n request_arraybuffer(asset, \"text\");\n break;\n case exports.AT_AUDIOBUFFER:\n request_audiobuffer(asset);\n break;\n case exports.AT_IMAGE_ELEMENT:\n request_image(asset);\n break;\n case exports.AT_AUDIO_ELEMENT:\n request_audio(asset);\n break;\n case exports.AT_VIDEO_ELEMENT:\n request_video(asset);\n break;\n case exports.AT_SEQ_VIDEO_ELEMENT:\n request_seq_video(asset);\n break;\n default:\n m_assert.panic(\"Wrong asset type: \" + asset.type);\n break;\n }\n }\n}\n\nfunction request_arraybuffer(asset, response_type) {\n var filepath = asset.url.split(\"?v=\")[0];\n if (filepath in _arraybuffer_cache) {\n if (response_type == \"json\")\n asset.asset_cb(__WEBPACK_IMPORTED_MODULE_7__util_js__[\"O\" /* clone_object_r */](_arraybuffer_cache[filepath]), asset.id, asset.type,\n asset.url, asset.param);\n else\n asset.asset_cb(_arraybuffer_cache[filepath], asset.id, asset.type,\n asset.url, asset.param);\n return;\n }\n var bd = get_built_in_data();\n if (bd && asset.url in bd)\n var req = new FakeHttpRequest();\n else\n var req = new XMLHttpRequest();\n\n var content_type = null;\n if (asset.request_method == \"GET\") {\n req.open(\"GET\", asset.url, true);\n } else if (asset.request_method == \"POST\") {\n req.open(\"POST\", asset.url, true);\n switch (asset.type) {\n case exports.AT_TEXT:\n content_type = 'text/plain';\n break;\n case exports.AT_JSON:\n content_type = 'application/json';\n break;\n }\n }\n\n if (asset.overwrite_header) {\n for (var key in asset.overwrite_header) {\n if (key == \"Content-Type\")\n content_type = asset.overwrite_header[key];\n else\n req.setRequestHeader(key, asset.overwrite_header[key]);\n }\n }\n\n if (content_type)\n req.setRequestHeader(\"Content-Type\", content_type);\n\n if (response_type == \"text\") {\n // to prevent \"not well formed\" error (GLSL)\n req.overrideMimeType(\"text/plain\");\n req.responseType = \"text\";\n } else if (response_type == \"json\") {\n // NOTE: workaround, json response type not implemented in some browsers\n //m_print.log(\"Apply json load workaround\");\n req.overrideMimeType(\"application/json\");\n req.responseType = \"text\";\n } else\n req.responseType = response_type;\n\n req.onreadystatechange = function() {\n if (asset.state != ASTATE_HALTED)\n if (req.readyState == 4) {\n if (req.status == 200 || req.status == 0) {\n var response = req.response;\n var empty_response = !response\n || (response_type == \"arraybuffer\" && response[\"byteLength\"] == 0)\n if (!empty_response) {\n\n switch (asset.type) {\n case exports.AT_JSON_ZIP:\n try {\n response = __WEBPACK_IMPORTED_MODULE_4__libs_pako_inflate_js__[\"a\" /* inflate */](response, { to: \"string\" });\n } catch(e) {\n m_print.error(e + \" (parsing gzipped file \" + asset.url + \")\");\n asset.asset_cb(null, asset.id, asset.type, asset.url, asset.param);\n return;\n }\n case exports.AT_JSON:\n try {\n response = JSON.parse(response, asset.json_reviver);\n } catch(e) {\n m_print.error(e + \" (parsing JSON \" + asset.url + \")\");\n asset.asset_cb(null, asset.id, asset.type, asset.url, asset.param);\n return;\n }\n break;\n case exports.AT_ARRAYBUFFER_ZIP:\n try {\n response = __WEBPACK_IMPORTED_MODULE_4__libs_pako_inflate_js__[\"a\" /* inflate */](response).buffer;\n } catch(e) {\n m_print.error(e + \" (parsing gzipped file \" + asset.url + \")\");\n asset.asset_cb(null, asset.id, asset.type, asset.url, asset.param);\n return;\n }\n break;\n }\n\n if (asset.is_fetch)\n if (asset.type == exports.AT_JSON || asset.type == exports.AT_JSON_ZIP)\n _arraybuffer_cache[filepath] = __WEBPACK_IMPORTED_MODULE_7__util_js__[\"O\" /* clone_object_r */](response);\n else\n _arraybuffer_cache[filepath] = response;\n\n asset.asset_cb(response, asset.id, asset.type, asset.url, asset.param);\n } else {\n m_print.error(\"empty responce when trying to get \" + asset.url);\n asset.asset_cb(null, asset.id, asset.type, asset.url, asset.param);\n }\n } else {\n m_print.error(req.status + \" when trying to get \" + asset.url);\n asset.asset_cb(null, asset.id, asset.type, asset.url, asset.param);\n }\n asset.state = ASTATE_RECEIVED;\n }\n };\n\n req.addEventListener(\"progress\", function(e) {\n // compute progress information if total size is known\n if (e.lengthComputable)\n asset.progress_cb(e.loaded / e.total);\n }, false);\n\n req.send(asset.post_data);\n}\n\nfunction request_audiobuffer(asset) {\n var filepath = asset.url.split(\"?v=\")[0];\n if (filepath in _arraybuffer_sound_cache) {\n asset.asset_cb(_arraybuffer_sound_cache[filepath], asset.id, asset.type,\n asset.url, asset.param);\n asset.state = ASTATE_RECEIVED;\n return;\n }\n if (asset.request_method != \"GET\") {\n m_assert.panic(\"Unsupported request type for audio buffer\");\n }\n var bd = get_built_in_data();\n if (bd && asset.url in bd)\n var req = new FakeHttpRequest();\n else\n var req = new XMLHttpRequest();\n\n req.open(\"GET\", asset.url, true);\n\n req.responseType = \"arraybuffer\";\n\n req.onreadystatechange = function() {\n if (asset.state != ASTATE_HALTED)\n if (req.readyState == 4) {\n if (req.status == 200 || req.status == 0) {\n var response = req.response;\n if (response) {\n var decode_cb = function(audio_buffer) {\n asset.asset_cb(audio_buffer, asset.id, asset.type, asset.url, asset.param);\n asset.state = ASTATE_RECEIVED;\n if (asset.is_fetch) {\n var filepath = asset.url.split(\"?v=\")[0];\n _arraybuffer_sound_cache[filepath] = audio_buffer;\n }\n }\n var fail_cb = function() {\n m_print.error(\"failed to decode \" + asset.url);\n asset.asset_cb(null, asset.id, asset.type, asset.url, asset.param);\n asset.state = ASTATE_RECEIVED;\n }\n\n m_sfg.decode_audio_data(response, decode_cb, fail_cb);\n\n } else {\n m_print.error(\"empty responce when trying to get \" + asset.url);\n asset.asset_cb(null, asset.id, asset.type, asset.url, asset.param);\n asset.state = ASTATE_RECEIVED;\n }\n } else {\n m_print.error(req.status + \" when trying to get \" + asset.url);\n asset.asset_cb(null, asset.id, asset.type, asset.url, asset.param);\n asset.state = ASTATE_RECEIVED;\n }\n }\n };\n\n req.send();\n}\n\nfunction request_image(asset) {\n var filepath = asset.url.split(\"?v=\")[0];\n if (filepath in _img_cache) {\n asset.asset_cb(_img_cache[filepath], asset.id, asset.type, asset.url, asset.param);\n asset.state = ASTATE_RECEIVED;\n return;\n }\n if (asset.request_method != \"GET\") {\n m_assert.panic(\"Unsupported request type for image element\");\n }\n var image = document.createElement(\"img\");\n if (cfg_def.allow_cors)\n image.crossOrigin = \"Anonymous\";\n image.onload = function() {\n if (asset.state != ASTATE_HALTED) {\n asset.asset_cb(image, asset.id, asset.type, asset.url, asset.param);\n asset.state = ASTATE_RECEIVED;\n if (asset.is_fetch) {\n var filepath = asset.url.split(\"?v=\")[0];\n _img_cache[filepath] = image;\n }\n }\n };\n image.addEventListener(\"error\", function() {\n if (asset.state != ASTATE_HALTED) {\n m_print.error(\"could not load image: \" + asset.url);\n asset.asset_cb(null, asset.id, asset.type, asset.url, asset.param);\n asset.state = ASTATE_RECEIVED;\n }\n }, false);\n\n var bd = get_built_in_data();\n if (bd && asset.url in bd) {\n if (bd[asset.url]) {\n var img_mime_type = get_image_mime_type(asset.url);\n image.src = \"data:\" + img_mime_type + \";base64,\" + bd[asset.url];\n } else {\n if (m_compat.is_ie11()) {\n var e = document.createEvent(\"CustomEvent\");\n e.initCustomEvent(\"error\", false, false, null);\n } else\n var e = new CustomEvent(\"error\");\n image.dispatchEvent(e);\n }\n } else\n image.src = asset.url;\n}\n\nfunction request_audio(asset) {\n var filepath = asset.url.split(\"?v=\")[0];\n if (filepath in _sound_cache) {\n asset.asset_cb(_sound_cache[filepath], asset.id, asset.type,\n asset.url, asset.param);\n asset.state = ASTATE_RECEIVED;\n return;\n }\n if (asset.request_method != \"GET\") {\n m_assert.panic(\"Unsupported request type for audio element\");\n }\n var audio = document.createElement(\"audio\");\n if (cfg_def.allow_cors)\n audio.crossOrigin = \"Anonymous\";\n\n audio.addEventListener(\"loadeddata\", function() {\n if (asset.state != ASTATE_HALTED) {\n asset.asset_cb(audio, asset.id, asset.type, asset.url, asset.param);\n asset.state = ASTATE_RECEIVED;\n if (asset.is_fetch) {\n var filepath = asset.url.split(\"?v=\")[0];\n _sound_cache[filepath] = audio;\n }\n }\n }, false);\n\n audio.addEventListener(\"error\", function() {\n if (asset.state != ASTATE_HALTED) {\n m_print.error(\"could not load sound: \" + asset.url);\n asset.asset_cb(null, asset.id, asset.type, asset.url, asset.param);\n asset.state = ASTATE_RECEIVED;\n }\n }, false);\n\n audio.addEventListener(\"stalled\", function() {\n if (asset.state != ASTATE_HALTED) {\n m_print.error(\"could not load sound: \" + asset.url);\n asset.asset_cb(null, asset.id, asset.type, asset.url, asset.param);\n asset.state = ASTATE_RECEIVED;\n }\n }, false);\n\n var bd = get_built_in_data();\n if (bd && asset.url in bd) {\n if (bd[asset.url]) {\n var snd_mime_type = get_sound_mime_type(asset.url);\n audio.src = \"data:\" + snd_mime_type + \";base64,\" + bd[asset.url];\n if (asset.state != ASTATE_HALTED) {\n asset.asset_cb(audio, asset.id, asset.type, asset.url, asset.param);\n asset.state = ASTATE_RECEIVED;\n }\n\n } else {\n if (m_compat.is_ie11()) {\n var e = document.createEvent(\"CustomEvent\");\n e.initCustomEvent(\"error\", false, false, null);\n } else\n var e = new CustomEvent(\"error\");\n audio.dispatchEvent(e);\n }\n } else {\n audio.src = asset.url;\n if (cfg_def.is_mobile_device)\n audio.load();\n }\n\n if (cfg_def.mobile_firefox_media_hack) {\n audio.autoplay = true;\n audio.pause();\n }\n\n // HACK: workaround for some garbage collector bug\n setTimeout(function() {audio.some_prop_to_prevent_gc = 1}, 5000);\n}\n\nfunction request_video(asset) {\n var filepath = asset.url.split(\"?v=\")[0];\n if (filepath in _img_cache) {\n asset.asset_cb(_img_cache[filepath], asset.id, asset.type, asset.url, asset.param);\n asset.state = ASTATE_RECEIVED;\n return;\n }\n if (asset.request_method != \"GET\") {\n m_assert.panic(\"Unsupported request type for video element\");\n }\n var video = document.createElement(\"video\");\n video.muted = true;\n // HACK: allow crossOrigin for mobile devices (Android Chrome bug)\n if (cfg_def.allow_cors)\n video.crossOrigin = \"Anonymous\";\n video.addEventListener(\"loadeddata\", function() {\n video.removeEventListener(\"error\", video_error_event, false);\n if (asset.state != ASTATE_HALTED) {\n asset.asset_cb(video, asset.id, asset.type, asset.url, asset.param);\n asset.state = ASTATE_RECEIVED;\n if (asset.is_fetch) {\n var filepath = asset.url.split(\"?v=\")[0];\n _img_cache[filepath] = video;\n }\n }\n }, false);\n\n function video_error_event(e) {\n if (asset.state != ASTATE_HALTED) {\n m_print.error(\"could not load video: \" + asset.url, asset.param);\n asset.asset_cb(null, asset.id, asset.type, asset.url);\n asset.state = ASTATE_RECEIVED;\n }\n }\n video.addEventListener(\"error\", video_error_event, false);\n\n var bd = get_built_in_data();\n if (bd && asset.url in bd) {\n if (bd[asset.url]) {\n var vid_mime_type = get_video_mime_type(asset.url);\n video.src = \"data:\" + vid_mime_type + \";base64,\" + bd[asset.url];\n if (asset.state != ASTATE_HALTED)\n video.addEventListener(\"loadeddata\", function() {\n asset.asset_cb(video, asset.id, asset.type, asset.url, asset.param);\n asset.state = ASTATE_RECEIVED;\n }, false);\n } else {\n if (m_compat.is_ie11()) {\n var e = document.createEvent(\"CustomEvent\");\n e.initCustomEvent(\"error\", false, false, null);\n } else\n var e = new CustomEvent(\"error\");\n video.dispatchEvent(e);\n }\n } else {\n video.src = asset.url;\n if (cfg_def.is_mobile_device)\n video.load();\n }\n\n if (cfg_def.mobile_firefox_media_hack || cfg_def.ipad_video_hack) {\n video.autoplay = true;\n video.pause();\n }\n\n // HACK: workaround for some garbage collector bug\n setTimeout(function() {video.some_prop_to_prevent_gc = 1}, 10000);\n}\n\nfunction request_seq_video(asset) {\n var filepath = asset.url.split(\"?v=\")[0];\n if (filepath in _img_cache) {\n asset.asset_cb(_img_cache[filepath], asset.id, asset.type, asset.url, asset.param);\n asset.state = ASTATE_RECEIVED;\n return;\n }\n if (asset.request_method != \"GET\") {\n m_assert.panic(\"Unsupported request type for seq video element\");\n }\n var bd = get_built_in_data();\n if (bd && asset.url in bd)\n var req = new FakeHttpRequest();\n else\n var req = new XMLHttpRequest();\n\n req.open(\"GET\", asset.url, true);\n req.responseType = \"arraybuffer\";\n\n function load_cb(images) {\n asset.asset_cb(images, asset.id, asset.type, asset.url, asset.param);\n asset.state = ASTATE_RECEIVED;\n if (asset.is_fetch) {\n var filepath = asset.url.split(\"?v=\")[0];\n _img_cache[filepath] = images;\n }\n }\n\n req.onreadystatechange = function() {\n if (asset.state != ASTATE_HALTED)\n if (req.readyState == 4) {\n if (req.status == 200 || req.status == 0) {\n var response = req.response;\n if (response)\n parse_seq_video_file(response, load_cb);\n else {\n m_print.error(\"empty responce when trying to get \" + asset.url);\n asset.asset_cb(null, asset.id, asset.type, asset.url, asset.param);\n asset.state = ASTATE_RECEIVED;\n }\n } else {\n m_print.error(req.status + \" when trying to get \" + asset.url);\n asset.asset_cb(null, asset.id, asset.type, asset.url, asset.param);\n asset.state = ASTATE_RECEIVED;\n }\n }\n };\n req.addEventListener(\"progress\", function(e) {\n // compute progress information if total size is known\n if (e.lengthComputable)\n asset.progress_cb(e.loaded / e.total);\n }, false);\n\n req.send();\n}\n\nfunction parse_seq_video_file(response, callback) {\n var buffer = new Int32Array(response);\n var seq_image_data = new Int8Array(response);\n var number = buffer[3];\n var data = {\n images: [],\n blobs: [],\n fps: buffer[4]\n };\n var offset = 20;\n for (var j = 0; j < number; j++) {\n var size = buffer[offset/4];\n var frame = seq_image_data.subarray(offset + 4, offset + 4 + size);\n var blob = new Blob([frame], {type: \"image/jpg\"});\n var image = document.createElement(\"img\");\n image.src = window.URL.createObjectURL(blob);\n data.images.push(image);\n // NOTE: IE HTML7007 message hack\n data.blobs.push(blob);\n offset +=size + 8 - size % 4;\n }\n // NOTE: wait for loading last image\n image.onload = function() {\n for (var i = 0; i < data.images.length; i++)\n window.URL.revokeObjectURL(data.images[i].src);\n delete data.blobs;\n callback(data);\n }\n}\n\nfunction get_image_mime_type(file_path) {\n var ext = __WEBPACK_IMPORTED_MODULE_8__util_path_js__[\"a\" /* get_file_extension */](file_path);\n var mime_type = \"image\";\n switch(ext.toLowerCase()) {\n case \"jpeg\":\n case \"jpg\":\n mime_type += \"/jpeg\";\n break;\n case \"png\":\n mime_type += \"/png\";\n break;\n }\n\n return mime_type;\n}\n\nfunction get_sound_mime_type(file_path) {\n var ext = __WEBPACK_IMPORTED_MODULE_8__util_path_js__[\"a\" /* get_file_extension */](file_path);\n var mime_type = \"audio\";\n switch(ext.toLowerCase()) {\n case \"ogv\":\n case \"ogg\":\n mime_type += \"/ogg\";\n break;\n case \"mp3\":\n mime_type += \"/mpeg\";\n break;\n case \"m4v\":\n case \"mp4\":\n mime_type += \"/mp4\";\n break;\n case \"webm\":\n mime_type += \"/webm\";\n break;\n }\n\n return mime_type;\n}\n\nfunction get_video_mime_type(file_path) {\n var ext = __WEBPACK_IMPORTED_MODULE_8__util_path_js__[\"a\" /* get_file_extension */](file_path);\n var mime_type = \"video\";\n switch(ext.toLowerCase()) {\n case \"ogv\":\n mime_type += \"/ogg\";\n break;\n case \"webm\":\n mime_type += \"/webm\";\n break;\n case \"m4v\":\n case \"mp4\":\n mime_type += \"/mp4\";\n break;\n }\n\n return mime_type;\n}\n\nexports.check_image_extension = function(ext) {\n if (ext == \"png\"\n || ext == \"jpg\"\n || ext == \"jpeg\"\n || ext == \"gif\"\n || ext == \"bmp\"\n || ext == \"dds\"\n || ext == \"pvr\")\n return true;\n\n return false;\n}\n\n/**\n * Find loaded packs, exec callback and remove from queue\n */\nfunction handle_packs(queue) {\n\n var pack_first_index = 0;\n var pack_cb_exec = true;\n\n for (var i = 0; i < queue.length; i++) {\n var asset = queue[i];\n var asset_pack_first = queue[pack_first_index];\n\n if (asset.pack_index === asset_pack_first.pack_index) {\n if (asset.state !== ASTATE_RECEIVED)\n pack_cb_exec = false;\n } else {\n if (pack_cb_exec) {\n queue[i-1].pack_cb();\n var spliced_count = i-pack_first_index;\n queue.splice(pack_first_index, spliced_count);\n i-=spliced_count;\n }\n\n pack_first_index = i;\n pack_cb_exec = (queue[i].state === ASTATE_RECEIVED) ? true : false;\n }\n\n if ((i === (queue.length-1)) && pack_cb_exec) {\n var last_asset = queue[i];\n queue.splice(pack_first_index);\n // Should be executed after splice. Possible enqueue in pack_cb\n last_asset.pack_cb();\n }\n }\n}\n\nfunction debug_queue(queue, opt_log_prefix) {\n var state_str = \"[\";\n\n for (var i = 0; i < queue.length; i++)\n state_str += String(queue[i].state / 10);\n\n state_str += \"]\";\n\n if (opt_log_prefix || opt_log_prefix === 0)\n m_print.log(opt_log_prefix, state_str);\n else\n m_print.log(state_str);\n}\n\nexports.clear_cache = function() {\n _arraybuffer_cache = {};\n _img_cache = {};\n _sound_cache = {};\n _arraybuffer_sound_cache = {};\n}\n\n}", "title": "" }, { "docid": "1287551f309813a5959e868da5ce3e5f", "score": "0.49727836", "text": "function init() {\n const config = getConfig();\n\n fse\n .readJson(config.bundleConfig)\n .then(function(bundles) {\n // if the destination dir exists\n if (fse.pathExistsSync(config.baseDir)) {\n // clean it out before writing files\n fse.emptyDirSync(config.baseDir);\n } else {\n // ensure the destination dir exists\n fse.ensureDirSync(config.baseDir);\n }\n\n console.info('Copying static assets....');\n utils.copyStaticAssets();\n\n // builds the CSS and JS bundles\n bundler.buildBundles(bundles.bundles);\n\n // generated pages using glob.\n const metaJSONArray = glob.sync(config.metaGlob, {});\n for (const metaJson of metaJSONArray) {\n const file = fse.readJsonSync(metaJson);\n pageBuilder.buildPages(file.pages);\n }\n\n // clean up\n utils.removeJSBundles();\n // done\n console.log('Pages built successfully'); // eslint-disable-line no-console\n })\n .catch(function(err) {\n console.error('Error thrown while loading JSON', err);\n });\n}", "title": "" }, { "docid": "3df9b24b64da085f6752ecb5517b6a35", "score": "0.4972035", "text": "recompiled() {\r\n this.emit('recompiled', this);\r\n // TODO: Re-implement recompile logic\r\n //async.forEach(this.instances, (item, callback) => {\r\n // var instanceId = item.instanceId;\r\n // if (instanceId > 0) {\r\n // logger.log('Updating instance...');\r\n // this.createInstance(instanceId, true, []);\r\n // }\r\n // callback();\r\n //}, err => {\r\n // if (err) {\r\n // logger.log('There was an error during re-compile: ' + err);\r\n // }\r\n // else {\r\n // logger.log('All instances updated, recompiling children...');\r\n // async.forEach(this.children, (childName, innerCallback) => {\r\n // try {\r\n // logger.log('Re-compiling ' + childName.filename);\r\n // driver.compiler.compileObject({ file: childName.filename, reload: true });\r\n // }\r\n // catch (e) {\r\n // driver.errorHandler(e, false);\r\n // }\r\n // innerCallback();\r\n // }, err => {\r\n // logger.log('All children of ' + this.filename + ' have been updated');\r\n // });\r\n // }\r\n //});\r\n }", "title": "" }, { "docid": "f210a4825ae7d8c43ad3012d5ccd1980", "score": "0.49711144", "text": "function updateIndexFiles() {\n var jsFiles = readDirs(distBasePath+'/', distBasePath + '/js', '.js')\n jsFiles.unshift('<!-- auto generated by build -->')\n fs.writeFileSync(distBasePath+'/js.txt', jsFiles.join('\\n'))\n\n var cssFiles = readDirs(distBasePath+'/', distBasePath + '/css', '.css')\n cssFiles.unshift('<!-- auto generated by build -->')\n fs.writeFileSync(distBasePath+'/css.txt', cssFiles.join('\\n'))\n}", "title": "" }, { "docid": "a8bb0784674b256c5ad36f3557a2b52c", "score": "0.49702176", "text": "async function transform() {\n\tconst\n\t\trawData = await readFile(`${rootPath}/${fileName}`),\n\t\tjson = JSON.parse(rawData);\n\n\tdelete json.devDependencies;\n\tdelete json.nyc;\n\tdelete json.scripts;\n\n\tawait writeFile(`${distPath}/${fileName}`, JSON.stringify(json, null, 4));\n\tawait writeFile(`${distESMPath}/${fileName}`, JSON.stringify({ type: 'module' }, null, 4));\n}", "title": "" }, { "docid": "3befd235ba3d9b53080e8207809e3243", "score": "0.4959423", "text": "async transform(code, id, ssr = false) {\n\t\t\tif (!isVite()) {\n\t\t\t\tlog = this;\n\t\t\t}\n\n\t\t\tif (!filter(id)) return null;\n\n\t\t\tif (isVite()) {\n\t\t\t\tconst cacheKey = resolveViteUrl(id);\n\t\t\t\tconst cached = transformCache.get(cacheKey);\n\t\t\t\tif (cached) {\n\t\t\t\t\treturn cached;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst extension = path.extname(id);\n\t\t\tif (!~extensions.indexOf(extension)) return null;\n\n\t\t\tconst dependencies = [];\n\t\t\tconst filename = path.relative(process.cwd(), id);\n\t\t\tconst svelte_options = { ...compilerOptions, filename };\n\n\t\t\tif (ssr) {\n\t\t\t\tsvelte_options.generate = 'ssr';\n\t\t\t}\n\n\t\t\tif (rest.preprocess) {\n\t\t\t\tconst processed = await preprocess(code, rest.preprocess, { filename });\n\t\t\t\tif (processed.dependencies) dependencies.push(...processed.dependencies);\n\t\t\t\tif (processed.map) svelte_options.sourcemap = processed.map;\n\t\t\t\tcode = processed.code;\n\t\t\t}\n\n\t\t\tconst compiled = compile(code, svelte_options);\n\n\t\t\t(compiled.warnings || []).forEach(warning => {\n\t\t\t\tif (!emitCss && warning.code === 'css-unused-selector') return;\n\t\t\t\tif (onwarn) onwarn(warning, log.warn);\n\t\t\t\telse log.warn(warning);\n\t\t\t});\n\n\t\t\tif (emitCss) {\n\t\t\t\tconst fname = isVite()\n\t\t\t\t\t? resolveViteUrl(id) + '.css'\n\t\t\t\t\t: id.replace(new RegExp(`\\\\${extension}$`), '.css');\n\t\t\t\tif (compiled.css.code) {\n\t\t\t\t\tcompiled.js.code += `\\nimport ${JSON.stringify(fname)};\\n`;\n\t\t\t\t\tcache_emit.set(fname, compiled.css);\n\t\t\t\t} else {\n\t\t\t\t\tcache_emit.set(fname, {code: ''});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (makeHot && !ssr) {\n\t\t\t\tcompiled.js.code = makeHot({\n\t\t\t\t\tid,\n\t\t\t\t\tcompiledCode: compiled.js.code,\n\t\t\t\t\thotOptions: {\n\t\t\t\t\t\tinjectCss: !emitCss,\n\t\t\t\t\t\t...rest.hot,\n\t\t\t\t\t},\n\t\t\t\t\tcompiled,\n\t\t\t\t\toriginalCode: code,\n\t\t\t\t\tcompileOptions: compilerOptions,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (this.addWatchFile) {\n\t\t\t\tdependencies.forEach(this.addWatchFile);\n\t\t\t} else {\n\t\t\t\tcompiled.js.dependencies = dependencies;\n\t\t\t}\n\n\t\t\tif (isVite()) {\n\t\t\t\tconst cacheKey = resolveViteUrl(id);\n\t\t\t\ttransformCache.set(cacheKey, compiled.js);\n\t\t\t}\n\n\t\t\treturn compiled.js;\n\t\t}", "title": "" }, { "docid": "e7aa1168170598022bf8cea1aba61373", "score": "0.49568582", "text": "function assets () {\n gulp.src([\n __SRC__ + '/assets/**/*.*',\n '!' + __SRC__ + '/assets/images/**/*.*'\n ], { base: __SRC__ + '/assets' })\n .pipe(gulp.dest(__DIST__ + '/public'));\n}", "title": "" }, { "docid": "2ff35c43717b7448e2b87dc153fd5e54", "score": "0.49504554", "text": "function productionVendorsAssets() {\n return gulp\n .src(paths.vendors.assets)\n .pipe(\n imageMinification([\n imageMinification.jpegtran({progressive: true}),\n imageMinification.optipng({optimizationLevel: 5}),\n imageMinification.svgo({\n plugins: [{removeViewBox: true}, {cleanupIDs: true}],\n }),\n ]),\n )\n .pipe(gulp.dest(paths.vendors.targetProduction));\n}", "title": "" }, { "docid": "caea408d08945f80abfcf3b5f63250aa", "score": "0.4945944", "text": "apply(compiler) {\n\n // Handle each entry\n compiler.hooks.entryOption.tap('ShebangPlugin', (context, entries) => {\n this.entries = {};\n for (const name in entries) {\n const entry = entries[name];\n const first = entry.import[0];\n const file = resolve(context, first);\n if (existsSync(file)) {\n const content = readFileSync(file).toString();\n const matches = new RegExp(/[\\s\\n\\r]*(#!.*)[\\s\\n\\r]*/gm).exec(content);\n if (matches && matches[1]) this.entries[name] = { shebang: matches[1] };\n }\n }\n });\n\n // Handle the plugin compilation hooks\n compiler.hooks.thisCompilation.tap('ShebangPlugin', compilation => {\n\n // Handle the chunk asset hook\n compilation.hooks.chunkAsset.tap('ShebangPlugin', (mod, filename) => {\n if (mod.name in this.entries) this.entries[filename] = this.entries[mod.name];\n });\n\n // Handle the build module hook\n compilation.hooks.buildModule.tap('ShebangPlugin', mod => {\n if (mod.loaders instanceof Array) mod.loaders.push({ loader: __filename });\n });\n });\n\n // Check if the target is node\n if (compiler.options.target == 'node') {\n \n // Append the shebang using the make hook\n compiler.hooks.make.tap('ShebangPlugin', compilation => {\n compilation.hooks.afterProcessAssets.tap('ShebangPlugin', assets => {\n for (const name in assets) {\n const source = assets[name];\n if (name in this.entries) {\n const { shebang } = this.entries[name];\n const rep = new ReplaceSource(source, 'shebang');\n rep.insert(0, `${shebang}\\n\\n`, 'shebang');\n compilation.updateAsset(name, rep);\n }\n }\n });\n });\n\n // Handle the execution permissions for the final executable module\n compiler.hooks.assetEmitted.tap('ShebangPlugin', (file, { targetPath }) => chmodSync(targetPath, 0o755));\n }\n }", "title": "" }, { "docid": "4fa57cd6c8bd094b904654633952227f", "score": "0.49413618", "text": "function assets() {\n try {\n return paths.assets.src.length === 0\n ? Promise.resolve()\n : gulp\n .src(\n paths.assets.src,\n // filter out unchanged files between runs\n {\n base: SRC,\n since: gulp.lastRun(assets)\n }\n )\n // don't exit the running watcher task on errors\n .pipe(plumber())\n // do not optimize size and quality of images in dev mode\n\n // transpile JS: babel will run with the settings defined in `.babelrc` file\n .pipe(gulpif(/.*\\.js$/, sourcemaps.init()))\n .pipe(gulpif(/.*\\.js$/, babel()))\n .pipe(gulpif(/.*\\.js$/, sourcemaps.write('../.maps')))\n .pipe(gulp.dest(DEV))\n } catch (error) {\n spinner.fail(error)\n }\n}", "title": "" }, { "docid": "4e870e0c54d27368cac965e1097ab9e4", "score": "0.493288", "text": "function copy() {\n\n\t\t// Copy dist files\n\t\tvar distFolder = Release.dir.dist + \"/dist\",\n\t\t\texternalFolder = Release.dir.dist + \"/external\",\n\t\t\treadme = fs.readFileSync( Release.dir.dist + \"/README.md\", \"utf8\" ),\n\t\t\trmIgnore = files\n\t\t\t\t.concat( [\n\t\t\t\t\t\"README.md\",\n\t\t\t\t\t\"node_modules\"\n\t\t\t\t] )\n\t\t\t\t.map( function( file ) {\n\t\t\t\t\treturn Release.dir.dist + \"/\" + file;\n\t\t\t\t} );\n\n\t\tshell.config.globOptions = {\n\t\t\tignore: rmIgnore\n\t\t};\n\n\t\t// Remove extraneous files before copy\n\t\tshell.rm( \"-rf\", Release.dir.dist + \"/**/*\" );\n\n\t\tshell.mkdir( \"-p\", distFolder );\n\t\tfiles.forEach( function( file ) {\n\t\t\tshell.cp( \"-f\", Release.dir.repo + \"/\" + file, distFolder );\n\t\t} );\n\n\t\t// Copy Sizzle\n\t\tshell.mkdir( \"-p\", externalFolder );\n\t\tshell.cp( \"-rf\", Release.dir.repo + \"/external/sizzle\", externalFolder );\n\n\t\t// Copy other files\n\t\textras.forEach( function( file ) {\n\t\t\tshell.cp( \"-rf\", Release.dir.repo + \"/\" + file, Release.dir.dist );\n\t\t} );\n\n\t\t// Remove the wrapper from the dist repo\n\t\tshell.rm( \"-f\", Release.dir.dist + \"/src/wrapper.js\" );\n\n\t\t// Write generated bower file\n\t\tfs.writeFileSync( Release.dir.dist + \"/bower.json\", generateBower() );\n\n\t\tfs.writeFileSync( Release.dir.dist + \"/README.md\", editReadme( readme ) );\n\n\t\tconsole.log( \"Files ready to add.\" );\n\t\tconsole.log( \"Edit the dist README.md to include the latest blog post link.\" );\n\t}", "title": "" }, { "docid": "e0aaef0f2fc7491878b74a6e3079e046", "score": "0.49250764", "text": "function prepareRevision(revision) {\n console.log(`🍳 Preparing ${revision}...`);\n const hash = hashForRevision(revision);\n const dir = dirForHash(hash);\n if (hash === LOCAL) {\n execSync(`(cd \"${dir}\" && yarn run ${BUILD_CMD})`);\n } else {\n execSync(`\n if [ ! -d \"${dir}\" ]; then\n mkdir -p \"${dir}\" &&\n git archive \"${hash}\" | tar -xC \"${dir}\" &&\n (cd \"${dir}\" && yarn install);\n fi &&\n # Copy in local tests so the same logic applies to each revision.\n for file in $(cd \"${LOCAL_DIR}src\"; find . -path '*/__tests__/*');\n do cp \"${LOCAL_DIR}src/$file\" \"${dir}/src/$file\";\n done &&\n (cd \"${dir}\" && yarn run ${BUILD_CMD})\n `);\n }\n}", "title": "" }, { "docid": "b593c994f5abc77e26e2603aee0fe39e", "score": "0.49221903", "text": "function injectCode() {\n\n\t\tvar fullpath = path.join( rootpath, \"app.js\" );\n\t\tvar source = fs.readFileSync( fullpath, 'utf8' );\n\t\tvar test = /\\/\\/ALLOY-RESOLVER/.test( source );\n\t\tlogger.trace( \"CODE INJECTED ALREADY: \" + test );\n\t\tif( !test ) {\n\t\t\tsource = source.replace( /(var\\s+Alloy[^;]+;)/g, \"$1\\n//ALLOY-RESOLVER\\nvar process=require('process');\\nAlloy.resolve=new (require('nativeloop/resolver'))().resolve;\\n\" );\n\t\t\tfs.writeFileSync( fullpath, source );\n\t\t}\n\t}", "title": "" }, { "docid": "500c7fd1c0651cb993c98f1507b191ec", "score": "0.49207708", "text": "function injection() {\n return src(\"build/*.html\")\n .pipe(inject(src(\"build/css/*.css\", { read: false }), { relative: true }))\n .pipe(inject(src(\"build/js/*.js\", { read: false }), { relative: true }))\n .pipe(dest(\"build\"));\n}", "title": "" }, { "docid": "460517a9762fd5e25ce59a21901e3589", "score": "0.4919277", "text": "apply(compiler) {\n if (compiler.hooks) {\n compiler.hooks\n .thisCompilation\n .tap(NAMESPACE, (compilation) => {\n compilation.hooks\n .normalModuleLoader\n .tap(NAMESPACE, loaderContext => loaderContext[NAMESPACE] = this);\n\n compilation.hooks\n .afterOptimizeChunks\n .tap(NAMESPACE, () => this.afterOptimizeChunks(compilation));\n\n compilation.hooks\n .optimizeExtractedChunks\n .tap(NAMESPACE, chunks => this.optimizeExtractedChunks(chunks));\n\n compilation.hooks\n .additionalAssets\n .tapPromise(NAMESPACE, () => {\n return this.additionalAssets(compilation);\n });\n });\n\n compiler.hooks\n .compilation\n .tap(NAMESPACE, (compilation) => {\n if (compilation.hooks.htmlWebpackPluginBeforeHtmlGeneration) {\n compilation.hooks\n .htmlWebpackPluginBeforeHtmlGeneration\n .tapAsync(NAMESPACE, (htmlPluginData, callback) => {\n htmlPluginData.assets.sprites = this.beforeHtmlGeneration(compilation);\n\n callback(null, htmlPluginData);\n });\n }\n\n if (compilation.hooks.htmlWebpackPluginBeforeHtmlProcessing) {\n compilation.hooks\n .htmlWebpackPluginBeforeHtmlProcessing\n .tapAsync(NAMESPACE, (htmlPluginData, callback) => {\n htmlPluginData.html = this.beforeHtmlProcessing(htmlPluginData);\n\n callback(null, htmlPluginData);\n });\n }\n });\n } else {\n // Handle only main compilation\n compiler.plugin('this-compilation', (compilation) => {\n // Share svgCompiler with loader\n compilation.plugin('normal-module-loader', (loaderContext) => {\n loaderContext[NAMESPACE] = this;\n });\n\n // Replace placeholders with real URL to symbol (in modules processed by svg-sprite-loader)\n compilation.plugin('after-optimize-chunks', () => this.afterOptimizeChunks(compilation));\n\n // Hook into extract-text-webpack-plugin to replace placeholders with real URL to symbol\n compilation.plugin('optimize-extracted-chunks', chunks => this.optimizeExtractedChunks(chunks));\n\n // Hook into html-webpack-plugin to add `sprites` variable into template context\n compilation.plugin('html-webpack-plugin-before-html-generation', (htmlPluginData, done) => {\n htmlPluginData.assets.sprites = this.beforeHtmlGeneration(compilation);\n\n done(null, htmlPluginData);\n });\n\n // Hook into html-webpack-plugin to replace placeholders with real URL to symbol\n compilation.plugin('html-webpack-plugin-before-html-processing', (htmlPluginData, done) => {\n htmlPluginData.html = this.beforeHtmlProcessing(htmlPluginData);\n done(null, htmlPluginData);\n });\n\n // Create sprite chunk\n compilation.plugin('additional-assets', (done) => {\n return this.additionalAssets(compilation)\n .then(() => {\n done();\n return true;\n })\n .catch(e => done(e));\n });\n });\n }\n }", "title": "" } ]
3e7cf5e3b43c9859f3b81812c279497a
Asynchronous Function getDataAsync from a url and return
[ { "docid": "079bf778975292dcda71254713f606ba", "score": "0.7320616", "text": "async function getDataAsync(url) {\r\n\r\n const GET_INIT = { method: 'GET', credentials: 'include', headers: getHeaders(), mode: 'cors', cache: 'default' };\r\n\r\n // Try catch \r\n try {\r\n // Call fetch and await the respose\r\n // Initally returns a promise\r\n const response = await fetch(url, GET_INIT);\r\n\r\n // Resonse is dependant on fetch\r\n const json = await response.json();\r\n\r\n return json;\r\n\r\n // catch and log any errors\r\n } catch (err) {\r\n console.log(err);\r\n return err;\r\n }\r\n}", "title": "" } ]
[ { "docid": "ea9847412612194160af0fbdf49f176f", "score": "0.78846943", "text": "function getDataAsync(url, callback) {\n \n /*global XMLHttpRequest: false */\n var httpRequest = new XMLHttpRequest();\n \n httpRequest.onreadystatechange = function () {\n \n // inline function to check the status\n // of our request, this is called on every state change\n if (httpRequest.readyState === 4 && httpRequest.status === 200) {\n\n callback.call(httpRequest.responseXML);\n }\n };\n \n httpRequest.open('GET', url, false);\n httpRequest.send();\n }", "title": "" }, { "docid": "3e967d0f182d0794334d1cc9ad3a220c", "score": "0.77963567", "text": "async function getData(url){\n const response = await fetch(url)\n const data = await response.json();\n return data\n\n }", "title": "" }, { "docid": "99db334a376a5c008e2adc693fbf47ef", "score": "0.77299196", "text": "async function getData (url){ //aca getData nos esta devolviendo una promesa porque hace await \n const response = await fetch(url);\n const data = await response.json()\n return data;\n}", "title": "" }, { "docid": "cbbcb28b720859dbb25fea6799a504be", "score": "0.7619851", "text": "async function getData(url) {\n\t\tconst response = await fetch(url) // Pauso mi aplicación hasta que esto se termine de ejecutar y luego sigo con el código que sigue debajo.\n\t\tconst data = await response.json()\n\t\treturn data;\n\t}", "title": "" }, { "docid": "0d981aea16981b2b124faa9634c699b2", "score": "0.7570571", "text": "async function getData(url) {\n const response = await fetch(url)\n const data = await response.json()\n // console.log(data);\n return data;\n\n }", "title": "" }, { "docid": "0d981aea16981b2b124faa9634c699b2", "score": "0.7570571", "text": "async function getData(url) {\n const response = await fetch(url)\n const data = await response.json()\n // console.log(data);\n return data;\n\n }", "title": "" }, { "docid": "49c38c93be01728605bcea7dbb83331e", "score": "0.74706197", "text": "async function getData(url, qString) {\n \n let response = await fetch(url + qString);\n let data = await response.json();\n return data\n}", "title": "" }, { "docid": "eb7b78c9fe337511fd44fd496786902f", "score": "0.7459424", "text": "async function get_data(url) {\n try {\n const response = await fetch(url)\n const json = await response.json()\n return json\n } catch (error) {\n }\n}", "title": "" }, { "docid": "6ece3e0e9e5ab6683ea73b64f84e8ad5", "score": "0.7440892", "text": "async function retrieveData(url) {\n return await fetch(url)\n .then(res => res.text())\n .then(body => body)\n}", "title": "" }, { "docid": "bdc801f8a23b1357ec9349fb758ced5b", "score": "0.73896897", "text": "function getData(url) {\n return new Promise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n xhr.open('GET', url);\n xhr.onload = () => resolve(xhr.responseText);\n xhr.onerror = () => reject(xhr.statusText);\n xhr.send();\n });\n}", "title": "" }, { "docid": "915238ca68b6b2b2e85625e584bde18f", "score": "0.7368499", "text": "async function getData(url){\n const {data} = await axios.get(url)\n return data;\n}", "title": "" }, { "docid": "6cb06bb45c6552265918cd0cc03604ee", "score": "0.7328705", "text": "async function getData(url) {\n const response = await fetch(url, { });\n console.log(response);\n return response.json(); // parses JSON response into native JavaScript objects\n}", "title": "" }, { "docid": "25c1abed98c77bed80ebab3717f0616c", "score": "0.73175865", "text": "async get(url){\n const getData = await fetch(url);\n\n const data = await getData.json();\n return data;\n\n }", "title": "" }, { "docid": "7210940b9ff31376f19d9f19a429bdc1", "score": "0.7315823", "text": "async function getData (url='') {\n let response = await fetch(url);\n try {\n let newData = await response.json();\n return newData;\n } catch(error) {\n alert('Something went wrong!');\n console.log(`Error: ${error}`);\n }\n}", "title": "" }, { "docid": "c56a31b43f041a9e426359831ee76739", "score": "0.73117995", "text": "async loadData(url) {\r\n let promise = await fetch(url)\r\n return promise;\r\n }", "title": "" }, { "docid": "c9ad7dcca1ab70c0483a5fc49dd3c33a", "score": "0.72713894", "text": "function getData(url){\n return fetch(url);\n}", "title": "" }, { "docid": "b54beab6ebe41ed36d348b958fbd372b", "score": "0.71698004", "text": "async function getAPIData(url, callback) {\n $.getJSON(url).done(function(returndata) {\n callback(returndata);\n });\n}", "title": "" }, { "docid": "a3835648085c198166c980599710035d", "score": "0.71666", "text": "async function fetchData(url) {\n const response = await fetch(url);\n const data = await response.json();\n return data;\n}", "title": "" }, { "docid": "416ed678ee4124d21d88b027888c2404", "score": "0.7131692", "text": "async function fetchData(url) {\n\tconst response = await fetch(url);\n\tconst data = await response.json();\n\treturn data;\n}", "title": "" }, { "docid": "b3ee7cf8d5fe05da084ced6a422a55d3", "score": "0.7131541", "text": "static async get(url) {\n const response = await fetch(url);\n const data = response.json();\n // data below will be call within\n // .then(data => console.log(data))\n return data;\n }", "title": "" }, { "docid": "6fe270afeab9e35c499f5a3196b5b86d", "score": "0.7129435", "text": "async function getData(url) {\n const response = await fetch(url);\n if (!response.ok) {\n throw new Error(`Can\\'t read data from ${url}. Status code: ${response.status}`);\n }\n return await response.json();\n }", "title": "" }, { "docid": "c3f7cb020556a9492fc2085e10b4ed39", "score": "0.711511", "text": "async function fetchData(url) {\n let response = await fetch(url);\n let data = await response.json()\n return data;\n}", "title": "" }, { "docid": "406e6d03f3e26348e8e42d4cef72c1f0", "score": "0.71114504", "text": "async get(url){\n const response=await fetch(url);\n const resData=await response.json();\n return resData;\n }", "title": "" }, { "docid": "675a89858a34fd563f59364f45730bd3", "score": "0.7110945", "text": "async get (url) {\n const res = await window.fetch(url);\n const resData = await res.json();\n return resData;\n }", "title": "" }, { "docid": "ad26c748e2db8bfb0f4d4a446e53d98e", "score": "0.7098499", "text": "async function getData(url=''){\n const response = await fetch(url);\n try{\n const data = await response.json();\n console.log(data);\n }catch(error){\n console.log(\"error\",error);\n }\n}", "title": "" }, { "docid": "f0df8e3faf4e83c36d92a51d653261b4", "score": "0.7086928", "text": "async function getData(url) {\n\n let fetchConfig = {\n mode: 'no-cors',\n headers: {\n 'Content-Type': 'application/json'\n },\n };\n\n var fetchResponse = await fetch(url, fetchConfig)\n .catch(function(error) {\n });\n return fetchResponse.json();\n }", "title": "" }, { "docid": "657cb67a31864c360be59a9cb9916924", "score": "0.7082404", "text": "async function gettingData() {\n let response = await fetch(url);\n let data = await response.json();\n console.log(data);\n }", "title": "" }, { "docid": "d3e7091734524708798570180254ad6c", "score": "0.70742726", "text": "async get(url) {\n \n // Awaiting for fetch response\n const response = await fetch(url);\n \n // Awaiting for response.json()\n const resData = await response.json();\n \n // Returning result data\n return resData;\n }", "title": "" }, { "docid": "747f24e3cfd087412d13e7bfab86402f", "score": "0.70552397", "text": "async function getJsonDataAsync(url) {\n const response = await fetch(url);\n if (!response.ok) throw new Error('Error in fetching Details');\n const data = await response.json();\n return data;\n}", "title": "" }, { "docid": "dc2e8b5aaf74b8e8793087ed8fa118c5", "score": "0.705005", "text": "async get(url) {\n const response = await fetch(url);\n const resData = await response.json();\n return resData;\n }", "title": "" }, { "docid": "9d3f3739b2246895df4655222f1be4dc", "score": "0.70167935", "text": "async function getData(){\n\tlet full = baseURL+city.value+apiKey;\n\tconst request = await fetch(full);\n\ttry{\n\t\tconst gotData = await request.json();\t\t\n\t\treturn gotData;\n\t}\n\tcatch(error){\n\t\tconsole.log('error' + error)\n\t}\n}", "title": "" }, { "docid": "b8194baa598fc6c14a37d587734e0950", "score": "0.7000655", "text": "async function getAPIData(url) {\n try {\n const response = await fetch(url)\n const data = await response.json()\n return data\n } catch (error) {\n console.error(error)\n }\n }", "title": "" }, { "docid": "23a50cc25c9709943b9e94a7b8ffd763", "score": "0.6996352", "text": "function getData(url) {\r\n\t\t\t\t\tvar data;\r\n\t\t\t\t\t$.ajax({\r\n\t\t\t\t\t\tasync: false, //thats the trick\r\n\t\t\t\t\t\turl: url,\r\n\t\t\t\t\t\tdataType: 'json',\r\n\t\t\t\t\t\tsuccess: function(response){\r\n\t\t\t\t\t\t\tdata = response;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\treturn data;\r\n\t\t\t\t}", "title": "" }, { "docid": "2c86600c85eb8abbeedf61f80fef2b4b", "score": "0.69956857", "text": "async get(url) {\n const response = await fetch(url);\n\n const resData = await response.json();\n return resData;\n }", "title": "" }, { "docid": "00690f596ec178837658ff05957dade4", "score": "0.6994684", "text": "async function getData (url) {\n const data = await fetch(url);\n try{\n const fData = await data.json();\n // temp = fData.main.temp;\n return fData.main.temp;\n }catch(e){console.log(Error(`Error: ${e}`))}\n}", "title": "" }, { "docid": "17df03e452a9218f865dfe6a27d532fd", "score": "0.6986237", "text": "async function getData() {\n var data = await connectToDeviantArt();\n return data;\n }", "title": "" }, { "docid": "17df03e452a9218f865dfe6a27d532fd", "score": "0.6986237", "text": "async function getData() {\n var data = await connectToDeviantArt();\n return data;\n }", "title": "" }, { "docid": "fd13a21ec6e2e3fc15d791a6055299cc", "score": "0.69344914", "text": "async function getData(url = '') {\n // Default options are marked with *\n const response = await fetch(url, {\n method: 'GET',\n //headers: {\n // 'Accept': 'application/json',\n // 'Content-Type': 'application/json'\n //}\n })\n .then(res => res.json())\n .then(data => data);\n return response; // parses JSON response into native JavaScript objects\n }", "title": "" }, { "docid": "099b93f6aedc4f9ae2ec24ae878f5b73", "score": "0.69310147", "text": "function httpGetAsync(theUrl, callback) {\n let xmlHttp = new XMLHttpRequest();\n xmlHttp.onreadystatechange = function() { \n if (xmlHttp.readyState == 4 && xmlHttp.status == 200) \n callback(xmlHttp.responseText);\n }\n xmlHttp.open(\"GET\", theUrl, true); // true for asynchronous \n xmlHttp.send(null);\n}", "title": "" }, { "docid": "49d60a7a4113ad259eac38f51826a125", "score": "0.6913133", "text": "httpGetAsync(theUrl, callback){\n var xmlHttp = new XMLHttpRequest()\n xmlHttp.onreadystatechange = function() {\n if (xmlHttp.readyState == 4 && xmlHttp.status == 200)\n callback(xmlHttp.responseText)\n }\n xmlHttp.open(\"GET\", theUrl, true)\n xmlHttp.send(null)\n }", "title": "" }, { "docid": "86ea59a45fead51ffc7230672a581f42", "score": "0.6907153", "text": "async function getRemoteData (url) {\n return new Promise((resolve, reject) => {\n const client = url.startsWith('https') ? require('https') : require('http');\n const request = client.get(url, (response) => {\n if (response.statusCode < 200 || response.statusCode > 299) {\t//this says if there a problem with the request give out error \n reject(new Error('Failed with status code: ' + response.statusCode));\n }\n const body = [];\n response.on('data', (chunk) => body.push(chunk));\n response.on('end', () => resolve(body.join('')));\n });\n request.on('error', (err) => reject(err))\n })\n}", "title": "" }, { "docid": "e66b08e4cdd1ab0a08d97506986ef2c4", "score": "0.6877611", "text": "async function getData(url){\n let res = await fetch(url);\n let body = await res.json();\n console.log(body);\n displayHTML(body);\n}", "title": "" }, { "docid": "5218661c882386478ea5c362dfcba752", "score": "0.6877416", "text": "async get(url) {\n const res = await fetch(url);\n const data = await res.json();\n return data;\n }", "title": "" }, { "docid": "39cc263b0940a1d9b17346c433c9c496", "score": "0.6850539", "text": "function fetchData(url) {\n return new Promise((resolve, reject) => {\n $.ajax({\n url,\n success: function(result) {\n resolve(result);\n },\n error: function(err) {\n if(err) reject(err);\n }\n });\n });\n}", "title": "" }, { "docid": "0a3aa87438ddc06e04a47ff7c0fea5aa", "score": "0.68454665", "text": "async function getFunc(url) {\n res = await fetch( url);//,{mode:'no-cors'}); //cross origin by default\n console.log(res);\n try {\n dataEntryFetched = await res.json();\n console.log(dataEntryFetched.main.temp);\n return dataEntryFetched.main.temp;\n }\n catch\n {\n console.log('error while get');\n }\n}", "title": "" }, { "docid": "9357e9764096e115d85e8075363c75fd", "score": "0.68421954", "text": "function getData(url){\r\n let xhr = new XMLHttpRequest();\r\n xhr.onload = dataLoaded;\r\n xhr.onerror = dataError;\r\n xhr.open(\"GET\",url);\r\n xhr.send();\r\n}", "title": "" }, { "docid": "f656ede38eb51151f5e6cb8197d2f75e", "score": "0.6829746", "text": "function getAsync(data) {\n\tconsole.log('Request received: ' + data);\n\n\treturn new Promise(function(resolve, reject) {\n\t\tsetTimeout(function() {\n\t\t\tconsole.log('Resolved: ' + data);\n\t\t\tresolve(data + '');\n\t\t}, (Math.floor(Math.random() * 4) + 1) * 2000);\n\t})\n}", "title": "" }, { "docid": "a20fa6eef646a8aaef8c5824be3d7f44", "score": "0.6825092", "text": "async function getDataAsync() {\n try {\n let data = getSomeData();\n return data;\n } catch (e) {\n throw e;\n }\n}", "title": "" }, { "docid": "a1009607a40dd2bff050da60145aa822", "score": "0.680306", "text": "function httpGetAsync(url, callback) {\n var xmlHttp = new XMLHttpRequest();\n xmlHttp.onreadystatechange = function() {\n if (xmlHttp.readyState == 4 && xmlHttp.status == 200)\n callback(xmlHttp.responseText);\n };\n xmlHttp.open('GET', url, true);\n xmlHttp.send(null);\n}", "title": "" }, { "docid": "c88fe31bbd247c88f0f6762015f84899", "score": "0.67786133", "text": "function getData(url, data) {\r\n var result;\r\n $.ajax({\r\n url: url,\r\n type: \"GET\",\r\n data: data,\r\n async: false,\r\n beforeSend: function () {\r\n showLoader();\r\n },\r\n complete: function () {\r\n hideLoader();\r\n },\r\n error: function () {\r\n result = \"Invalid GET Request\";\r\n },\r\n success: function (res) {\r\n result = res;\r\n }\r\n });\r\n return result;\r\n}", "title": "" }, { "docid": "55ddac08fc81ded775320158222113c7", "score": "0.67757547", "text": "async function getdata() {\r\n let url = await fetch(postingIDURL);\r\n let data = await url.json();\r\n return data;\r\n }", "title": "" }, { "docid": "bc848205d1f8494e58072c2723d5c4d7", "score": "0.67702526", "text": "async function apiCall(url) {\n const promiseData = window.fetch(url)\n .then((response) => {\n if(response.ok) return response.json();\n })\n .then((data) => data)\n .catch(err => failIndex(err));\n return promiseData; \n}", "title": "" }, { "docid": "2e998caaeb894d9f46a3b6f7ec9ec4bb", "score": "0.676847", "text": "function httpGetAsync(theUrl, callback) {\n var xmlHttp = new XMLHttpRequest();\n\n xmlHttp.onreadystatechange = function() { \n if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {\n callback(xmlHttp.responseText);\n }\n }\n xmlHttp.open(\"GET\", theUrl, true); // true for asynchronous \n xmlHttp.send(null);\n}", "title": "" }, { "docid": "95d429967f3fb92e77d88b011f5d755b", "score": "0.6768308", "text": "async function getDataFetch(url) {\n const result = await fetch(url);\n\n if(!result.ok) {\n throw new Error(`Could not fetch ${url}, status: ${result.status}`);\n }\n\n return await result.json();\n }", "title": "" }, { "docid": "abb73711721a93830eddedd543916445", "score": "0.67625237", "text": "function httpGetAsync(theUrl, callback) {\n var xmlHttp = new XMLHttpRequest();\n xmlHttp.onreadystatechange = function() {\n if (xmlHttp.readyState == 4 && xmlHttp.status == 200)\n callback(xmlHttp.responseText);\n }\n xmlHttp.open(\"GET\", theUrl, true); // true for asynchronous\n xmlHttp.send(null);\n}", "title": "" }, { "docid": "7bc6a91fe1039c33b284ff545d2f9946", "score": "0.6747474", "text": "async function getData(apiURL) {\n const response = await fetch(apiURL);\n\n return response.json()\n }", "title": "" }, { "docid": "cb0af2f711e44d15b96efb62407424f0", "score": "0.67426664", "text": "function httpGetAsync(theUrl, callback) {\n\n\tvar xmlHttp = new XMLHttpRequest();\n\txmlHttp.onreadystatechange = function () {\n\t\tif (xmlHttp.readyState == 4 && xmlHttp.status == 200)\n\t\t\tcallback(xmlHttp.responseText);\n\t}\n\txmlHttp.open(\"GET\", theUrl, true); // true for asynchronous\n\txmlHttp.send(null);\n}", "title": "" }, { "docid": "e822870e58dd4335043f7b063a3fbc10", "score": "0.673441", "text": "function httpGetAsync(theUrl, callback) {\n\tvar xmlHttp = new XMLHttpRequest();\n xmlHttp.onreadystatechange = function() { \n if (xmlHttp.readyState == 4 && xmlHttp.status == 200)\n callback(xmlHttp.responseText);\n }\n xmlHttp.open(\"GET\", theUrl, true); // true for asynchronous \n xmlHttp.send(null);\n}", "title": "" }, { "docid": "cc6ae4e0eaee2dd1319a021f47bdbaaa", "score": "0.67233723", "text": "async getDatos(url) {\n let data = await (await(fetch(url)\n .then(respuesta => {\n return respuesta.json()\n })\n .catch(error => {\n console.log('Hubo un error: ' + error)\n })\n ))\n return data;\n }", "title": "" }, { "docid": "401c60dc50cf00886f640418b4071de1", "score": "0.6723338", "text": "async function getData(url) {\n const request = await fetch(url);\n const response = await request.json();\n const data = await response.results;\n\n //return a string\n return data[0].picture.large;\n}", "title": "" }, { "docid": "11e450ab7b0fe32b8a388bc915420da7", "score": "0.66922134", "text": "async function getData() {\n cardsDiv.innerHTML = `<h1>loading..</h1>`;\n const response = await fetch(endPoint);\n const data = await response.json();\n return data.data;\n}", "title": "" }, { "docid": "954a08bda57c5a16ac5c829784d3420e", "score": "0.66817456", "text": "async function getData(){\n const newRes = await fetch('/getData');\n const finalData = await newRes.json();\n return finalData;\n}", "title": "" }, { "docid": "78c5b655028967f72d73bdcb4480db65", "score": "0.6660354", "text": "async function getData(route) {\t\n\tconst response = await fetch(baseURL + route);\n\treturn await response.json();\n}", "title": "" }, { "docid": "b3c38da01a4f8314f0e3418abab3f6da", "score": "0.6659217", "text": "async function retreiveData() {\n data = await getPost();\n }", "title": "" }, { "docid": "2bcf4d9608602b140dd28cb60b264335", "score": "0.6655088", "text": "function httpGetAsync(theUrl, callback) {\n // create the request object\n var xmlHttp = new XMLHttpRequest();\n\n // set the state change callback to capture when the response comes in\n xmlHttp.onreadystatechange = function () {\n if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {\n callback(xmlHttp.responseText);\n }\n }\n\n // open as a GET call, pass in the url and set async = True\n xmlHttp.open(\"GET\", theUrl, true);\n\n // call send with no params as they were passed in on the url string\n xmlHttp.send(null);\n\n return;\n}", "title": "" }, { "docid": "33a3b1b3156b61431119a13d2975288f", "score": "0.6651131", "text": "async function apiLink(url) {\n data = await pageData(url);\n return data;\n}", "title": "" }, { "docid": "2204410c9431f1cf2d561690abed7af7", "score": "0.66442126", "text": "async function getData(source) {\n\ttry {\n\t\tlet res = await fetch(source);\n\t\treturn await res.json();\n\t} catch (error) {\n\t\tconsole.log(error);\n\t\tlet res = await fetch(sampleUrl);\n\t\treturn await res.json();\n\t}\n}", "title": "" }, { "docid": "95486678fdf8621a2d05e40abc6abc65", "score": "0.66414523", "text": "function getData(requestUrl) {\n \n\n}", "title": "" }, { "docid": "2e880cd6c350f409e12c137713d96e23", "score": "0.66397595", "text": "async function getData(endpoint = '') {\n\treturn await sendHTTPRequest(endpoint, 'GET');\n}", "title": "" }, { "docid": "94b486d57bf917be17602bb4378b8b51", "score": "0.66295826", "text": "async function getData(url){\n //esperamos a que se resuelva\n const response = await fetch(url)\n //llamamos al metodo json\n //todo devuelve una promesa\n const data = await response.json();\n if (data.data.movie_count > 0){\n return data;\n }else{\n throw new Error('No se encuentra ningun resultado');\n }\n }", "title": "" }, { "docid": "c238a97e99dbfc9d71abb7062cb460b0", "score": "0.6625916", "text": "async function fetchData(url) {\n const dataFetch = await fetch(url, {\n method: 'GET',\n headers: {\n Accept: 'application/json',\n Authorization: auth,\n },\n });\n return dataFetch.json();\n}", "title": "" }, { "docid": "5d42a75d91496061c30df0d21ea110d9", "score": "0.6611105", "text": "function getJSON(){\n console.log(\"GET\");\n\n var api_url = _api_url; \n httpGetAsync(api_url,function(resp){\n console.log(resp);\n console.log(\"data returned successfully\");\n })\n }", "title": "" }, { "docid": "a1bc5448a9ce5e66558fb4fcc9b03a10", "score": "0.66109145", "text": "function httpGetAsync(url, callback)\n{\n var xmlHttp = new XMLHttpRequest();\n xmlHttp.onreadystatechange = function() { \n if (xmlHttp.readyState == 4 && xmlHttp.status == 200)\n callback(xmlHttp.response);\n }\n xmlHttp.open(\"GET\", url, true); // true for asynchronous \n xmlHttp.send(null);\n}", "title": "" }, { "docid": "cd6d92926a740390a65a356d9cdd2c16", "score": "0.66084224", "text": "function httpGetAsync(theUrl, callback)\n{\n // create the request object\n var xmlHttp = new XMLHttpRequest();\n\n // set the state change callback to capture when the response comes in\n xmlHttp.onreadystatechange = function()\n {\n if (xmlHttp.readyState == 4 && xmlHttp.status == 200)\n {\n callback(xmlHttp.responseText);\n }\n }\n\n // open as a GET call, pass in the url and set async = True\n xmlHttp.open(\"GET\", theUrl, true);\n\n // call send with no params as they were passed in on the url string\n xmlHttp.send(null);\n\n return;\n}", "title": "" }, { "docid": "65371ca22a7358ff33660ae6388a2db5", "score": "0.6575204", "text": "function getData(url, callback) {\n http.onreadystatechange = function() {\n if (this.readyState == 4 && this.status == 200) {\n callback(this);\n }\n };\n http.open(\"GET\", url, true);\n http.send();\n}", "title": "" }, { "docid": "e5954f98ca09048dd8dbab739636bbaf", "score": "0.6572117", "text": "function httpGetAsync(theUrl, callback)\n{\n var xmlHttp = new XMLHttpRequest();\n xmlHttp.onreadystatechange = function() { \n if (xmlHttp.readyState == 4 && xmlHttp.status == 200)\n callback(xmlHttp.responseText);\n\t\tif(xmlHttp.status == 400)\n\t\t\terror();\n\t\tif(xmlHttp.status == 404)\n\t\t\terror();\n }\n xmlHttp.open(\"GET\", \"https://cors-anywhere.herokuapp.com/\" + theUrl, true); // true for asynchronous \n xmlHttp.send(null);\n}", "title": "" }, { "docid": "c1e1e26fb7ba72e7fd0f21f9d2016df4", "score": "0.6571241", "text": "function getData(url, callback) {\n\n fetch(url)\n .then(res => res.json())\n .then(data => {\n\n callback(data);\n\n })\n .catch(error => console.log(error));\n}", "title": "" }, { "docid": "49097aaf81cab37ab71c178c69b4c048", "score": "0.65602744", "text": "function getData(method, url) {\n return new Promise(function (resolve, reject) {\n var xhr = new XMLHttpRequest();\n xhr.open(method, url);\n xhr.onload = function(){\n if(this.status >= 200 && this.status < 300){\n resolve(xhr.response);\n }else{\n reject({\n status : this.status,\n statusText : xhr.statusText\n });\n }\n };\n xhr.onerror = function(){\n reject({\n status : this.status,\n statusText : xhr.statusText \n });\n };\n xhr.send();\n }); \n }", "title": "" }, { "docid": "f812de600321cc0a0a44d06ead04b892", "score": "0.6560255", "text": "async function httpGet(url){\n const res = await fetch(url);\n const response = await res.text();\n\n return response;\n}", "title": "" }, { "docid": "b1380745fb93f6509269293c4bb52d22", "score": "0.6556917", "text": "async function getapi(url) {\n const response = await fetch(url);\n let data = await response.json();\n return data;\n}", "title": "" }, { "docid": "d20d52c1b7b0caf0dea9a8969f9b7cc7", "score": "0.65421665", "text": "async function request_table_data(url)\n{\n const response = await fetch(url);\n const data = await response.json()\n return data; \n}", "title": "" }, { "docid": "6b0f58929b6482bb75c74eb085eb56a1", "score": "0.6531666", "text": "function fetchContent(url) {\n\n return new Promise((resolve, reject) => {\n https.get(url, (resp) => { \n var data = '';\n\n   // Data is received bit after bit\n  \n resp.on('data', (chunk) => {  \n data += chunk; \n });\n\n   // Data is ready\n  \n resp.on('end', () => {\n console.log(\"fetching \" + url);\n resolve(data); \n });\n\n resp.on(\"error\", (err) => { \n console.log(\"Error: \" + err.message);\n reject();\n });\n });\n });\n}", "title": "" }, { "docid": "521235376fc1428f803fcdb8dee34c14", "score": "0.6530388", "text": "function getData(url, callback) {\r\n var xhttp = new XMLHttpRequest();\r\n xhttp.onreadystatechange = function() {\r\n if (this.readyState == 4 && this.status == 200) {\r\n if (callback) {\r\n callback(JSON.parse(xhttp.response));\r\n }\r\n }\r\n };\r\n xhttp.open(\"GET\", url, true);\r\n xhttp.send();\r\n}", "title": "" }, { "docid": "304de438b332857f9ebb488ea5cbd368", "score": "0.65048826", "text": "async function fetchData(url) {\n // loader('show'); // Feedback to user while fetching data\n const dataResponse = await fetch(url);\n const jsonData = await dataResponse.json();\n // loader('hide'); // Feedback to user while fetching data\n return jsonData;\n}", "title": "" }, { "docid": "621ab604ad80b3868f304f137648ef60", "score": "0.6504777", "text": "function getData (cb) {\n let url = known_data_instances[Math.floor(Math.random() * known_data_instances.length)]\n\n console.log(url)\n // Do something with the requests\n // request(url, {json: true}, (err, res, data) => {\n // if (err) return cb(err)\n\n // cb(null, data)\n // })\n}", "title": "" }, { "docid": "bb2a492d05f34e451cb73c09a4ea7017", "score": "0.6499437", "text": "async function getData(url = '', _username) {\n const response = await fetch(url, {\n method: 'GET', // *GET, POST, PUT, DELETE, etc.\n mode: 'cors', // no-cors, *cors, same-origin\n cache: 'no-cache', // *default, no-cache, reload, force-cache, only-if-cached\n headers: {\n 'Content-Type': 'application/json',\n 'Accept': 'application/json',\n 'username': _username,\n },\n });\n return response.json(); \n }", "title": "" }, { "docid": "fc4a5837c918e0f8cd3973a798d1c2ce", "score": "0.6498891", "text": "function getData(method, url) {\n return new Promise((resolve, reject) => {\n\n let xhr = new XMLHttpRequest();\n xhr.open(method, url);\n\n xhr.onload = function() {\n if (this.status >= 200 && this.status < 300) {\n resolve(xhr.response);\n } else {\n reject({\n status: this.status,\n statusText: this.statusText\n });\n }\n };\n\n xhr.onerror = function() {\n reject({\n status: this.status,\n statusText: this.statusText\n })\n };\n\n xhr.send();\n })\n}", "title": "" }, { "docid": "0a64eed847e9d8d926835318ca1cd5b4", "score": "0.64866924", "text": "function getData(url, callback){\r\n\r\n $.get(url, function(data)\r\n {\r\n \tcallback(data);\r\n }); \r\n}", "title": "" }, { "docid": "cfcf4e97841af73895231a74cd1a7fae", "score": "0.6484036", "text": "async function getJSONdata(url) {\n // 👷‍♂️ need to add validation with ok response\n const response = await fetch(`${url}`);\n const data = await response.json();\n return data;\n}", "title": "" }, { "docid": "4e1a1e6dc4ef793079e8a1cb4e0ecd85", "score": "0.64833397", "text": "async function getData(){\n try{\n var post1 = await getResource('https://jsonplaceholder.typicode.com/posts/1');\n }\n catch (error){\n console.log(error);\n }\n console.log(post1);\n}", "title": "" }, { "docid": "4e88b8fac768c7baa7293ac3461c524d", "score": "0.6472946", "text": "async function getDataFromApiAsync() {\n let response = await fetch(urlSwapi);\n let data = await response.json();\n console.log(data.results);\n}", "title": "" }, { "docid": "63dd31a296fde6d5bb9c68ec295fdf26", "score": "0.64632815", "text": "async function fetch() {\n const tvl = await utils.fetchURL('https://api.wing.finance/wing/governance/tvl')\n return tvl.data;\n}", "title": "" }, { "docid": "5f28d03611056a109c1946b3885173ec", "score": "0.64624125", "text": "async call(url) {\n let response = await this.instance.get(url)\n return response\n }", "title": "" }, { "docid": "312f136c61177eb88d8b3e726d4f5215", "score": "0.64611226", "text": "function loadAPIConnectionDataAsync( ) {\n\n\t// create promise\n\tvar lacdaEmitter = new EventEmitter( 'loadAPIConnectionDataAsyncEnded' );\n\n\tStorage.read( at_file ).\n\t\tthen(\n\n\t\t\t// success\n\t\t\tfunction( data ) {\n\n\t\t\t\tdata = JSON.parse( data );\n\n\t\t\t\tif ( ( 'undefined' !== data.token ) && ( 'undefined' !== data.baseurl ) ) {\n\n\t\t\t\t\tAccessToken = data.token;\n\t\t\t\t\tBASE_URL = data.baseurl;\n\n\t\t\t\t\tlacdaEmitter.emit( 'loadAPIConnectionDataAsyncEnded', 'ok' );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tlacdaEmitter.emit( 'loadAPIConnectionDataAsyncEnded', 'API connection data not correctly read from storage.' );\n\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// error reading file data\n\t\t\tfunction( error ) {\n\t\t\t\tlacdaEmitter.emit( 'loadAPIConnectionDataAsyncEnded', 'error ' + JSON.stringify( error ) );\n\t\t\t}\n\n\t);\n\n\treturn lacdaEmitter.promiseOf( 'loadAPIConnectionDataAsyncEnded' );\n\n}", "title": "" }, { "docid": "f321a5c848903d6419f394e4ec84445f", "score": "0.6459026", "text": "function asyncRemoteGet(url) {\n return new Promise(resolve => {\n $http.get({\n url: url,\n handler: ({ data }) => resolve(data)\n });\n });\n}", "title": "" }, { "docid": "2297db50eb44915f8c970fa53bfabf34", "score": "0.64485765", "text": "function getData(url,callBack){\n\t\tvar xmlHttp = new XMLHttpRequest();\n\t\txmlHttp.onreadystatechange = function(){\n\t\t\t if (xmlHttp.readyState==4 && xmlHttp.status==200){\n\t\t\t \tif(callBack){\n\t\t\t\t \tcallBack(xmlHttp.responseText);\n\t\t\t \t}\n\t\t\t }\n\t\t};\n\t\txmlHttp.open(\"GET\",url + \"?dc=_\" + Math.random(),true);\n\t\t//xmlHttp.setRequestHeader(\"Access-Control-Allow-Origin\",\"*\");\n\t\txmlHttp.send();\n\t}", "title": "" }, { "docid": "988685391749a042fc0cbb20837b21f1", "score": "0.64474785", "text": "function fetchAsync (url, timeout, onData, onError) {\n …\n}", "title": "" }, { "docid": "47893c4981f288e5cc5fbaa93229ab89", "score": "0.6438712", "text": "async fetchData(){\n\t\tlet response = await fetch('https://rallycoding.herokuapp.com/api/music_albums');\n\t\treturn response.json(); //Wait for response to come then then return promise\n\t}", "title": "" }, { "docid": "062a99d2d3bc8cb28f99248889ed0546", "score": "0.6431292", "text": "function httpGetAsync(theUrl, keyword) {\n resetVariables();\n currentKeyword = keyword;\n $.getJSON(theUrl + keyword, function(result){\n processJsonResult(result, keyword);\n });\n}", "title": "" }, { "docid": "c805a5051918d7ef6c8bfb7a7f59a7b5", "score": "0.6424211", "text": "function getData() {\n return $.getJSON(apiUrl);\n}", "title": "" } ]
049975fc4adee5ecf93e3d8e88160deb
Task 4 Store Catalogue
[ { "docid": "5b512dd3b55eaa60126b1ef50d7d828d", "score": "0.0", "text": "function storeCatalogue (input) {\n let store = new Map();\n\n for (let line of input) {\n let tokens = line.split(' : ');\n let product = tokens[0];\n let letter = product[0];\n let price = Number(tokens[1]);\n\n if (!store.has(letter)) {\n store.set(letter, new Map());\n }\n\n store.get(letter).set(product, price);\n }\n\n let lettersSorted = Array.from(store.keys()).sort();\n\n for (let letter of lettersSorted) {\n console.log(letter);\n\n let productsSorted = Array.from(store.get(letter).keys()).sort();\n\n for (let product of productsSorted) {\n console.log(` ${product}: ${store.get(letter).get(product)}`);\n }\n }\n}", "title": "" } ]
[ { "docid": "3e468f46654da57984350140a8c5873d", "score": "0.5772162", "text": "function cargarArxiuStore(){\n var dataSource = new am4core.DataSource();\n dataSource.url = \"store.json\";\n dataSource.events.on(\"parseended\", function(ev) {\n var data = ev.target.data;\n //console.log(data);\n //info es pasa a una funcio\n informacioService(data);\n });\n dataSource.load();\n}", "title": "" }, { "docid": "db2a3e88ea67283e94153aecdc8d9f7e", "score": "0.5758688", "text": "function getCoursesFromStorage() {\n\n \n\n}", "title": "" }, { "docid": "43a07a73a3a09c3f4bf222b2601c8005", "score": "0.57474613", "text": "function getCatalog() { //returns Catalog\r\n return {items: AppStore.getCatalog()}\r\n}", "title": "" }, { "docid": "babf610e3c78d25b1be80e265ad1f55f", "score": "0.57204556", "text": "async function getCatalogue(agent) {\n //add-on from pinn's getCategory()\n //show All Menu\n var arr = [];\n const snapshot = await db.collection('product').get();\n snapshot.forEach((doc) => {\n nam = (doc.data()).name;\n price = (doc.data()).price;\n img = (doc.data()).image;\n var jsonP = {\n \"type\": \"bubble\",\n \"direction\": \"ltr\",\n \"header\": {\n \"type\": \"box\",\n \"layout\": \"vertical\",\n \"contents\": [\n {\n \"type\": \"text\",\n \"text\": nam,\n \"size\": \"xl\",\n \"align\": \"center\",\n \"gravity\": \"top\",\n \"weight\": \"bold\",\n \"color\": \"#000000\"\n }\n ]\n },\n \"hero\": {\n \"type\": \"image\",\n \"url\": img,\n \"size\": \"full\",\n \"aspectRatio\": \"1.51:1\"\n },\n \"body\": {\n \"type\": \"box\",\n \"layout\": \"vertical\",\n \"contents\": [\n {\n \"type\": \"text\",\n \"text\": price,\n \"align\": \"center\"\n }\n ]\n }\n };\n arr.push(jsonP)\n })\n sumPayload = {\n \"type\": \"flex\",\n \"altText\": \"Catalogue\",\n \"contents\": {\n \"type\": \"carousel\",\n \"contents\": arr\n }\n }\n \n let payload = new Payload('LINE', sumPayload, { sendAsMessage : true });\n agent.add(payload);\n //show All Promotion\n }", "title": "" }, { "docid": "8bf6b69b7937dd9c909d88ca8f318e61", "score": "0.5671442", "text": "function createStore(){}", "title": "" }, { "docid": "838124855d892e8301f1ae57d8afdf96", "score": "0.56161106", "text": "function Store() {\n\n }", "title": "" }, { "docid": "7d2c4accaab914b0d3aa2d6a1de8946b", "score": "0.5542436", "text": "function finishingSale() {\n var request = indexedDB.open(\"petshop\", 3);\n request.onsuccess = function(event) {\n var db = event.target.result;\n var transaction = db.transaction([\"Vendas\"], \"readwrite\");\n var store = transaction.objectStore(\"Vendas\");\n var itens = \"\";\n for (i=0;i<cart.length;i++) {\n itens += cart[i].name + \",\" + cart[i].quant + \". \";\n }\n //console.log(valorTotaldaCompra);\n var venda = {\n user: loggedUser,\n itens: itens,\n total: valorTotaldaCompra\n };\n var request = store.add(venda);\n\n db.close();\n };\n}", "title": "" }, { "docid": "604829e2817f63b25ecc628b3cc95fe8", "score": "0.5517609", "text": "function Store(){}", "title": "" }, { "docid": "604829e2817f63b25ecc628b3cc95fe8", "score": "0.5517609", "text": "function Store(){}", "title": "" }, { "docid": "604829e2817f63b25ecc628b3cc95fe8", "score": "0.5517609", "text": "function Store(){}", "title": "" }, { "docid": "af46b850b52ab5d6b388d0ffe48fc8c4", "score": "0.5473017", "text": "function viewSale() {\n connection.query(\"SELECT * FROM products\", function(err, res) {\n if (err) throw err;\n console.table(res);\n task();\n })\n}", "title": "" }, { "docid": "d04f026c9e0547e63259c075100ae22f", "score": "0.5468895", "text": "function clickHandler() {\r\n event.preventDefault();\r\n taskDesc = event.target.taskDesc.value;\r\n taskDate = event.target.taskDate.value;\r\n taskUrgency = event.target.taskUrgency.value;\r\n new Task(taskDesc, taskDate, taskUrgency);\r\n localStorage.setItem('tasks', JSON.stringify(Task.all));\r\n\r\n render();\r\n\r\n}", "title": "" }, { "docid": "33084ad0e26b2ea515b18342dc03e221", "score": "0.5453234", "text": "function renderTasks() {\n\n var retrieveTasks = localStorage.getItem('task');\n console.log(retrieveTasks);\n}", "title": "" }, { "docid": "2e970b3b63241f43fcd273fda0d8da8c", "score": "0.54386294", "text": "async function create() {\n product = await DB.create('shop_product')\n product.name = \"Running Shoes\"\n product.price = 1000\n product.stock = 50\n await DB.store(product)\n console.log(product.getID())\n}", "title": "" }, { "docid": "3bc28086ee3df2e9e0a94266155840f9", "score": "0.5425952", "text": "function runStore() {\n inquirer\n .prompt([\n {\n type: \"number\",\n name: \"choiceOfId\",\n message: chalk.red.bgCyan.bold(\n \"What is the ID of the product you would like to buy?\\n\"\n ),\n validate: validateChoice\n },\n {\n type: \"number\",\n name: \"amount\",\n message: chalk.red.bgCyan.bold(\n \"How many would you like to purchase?\\n\"\n ),\n validate: validateChoice\n }\n ])\n .then(function(response) {\n var id = response.choiceOfId;\n var requestedAmount = response.amount;\n checkStorageForPurchase(id, requestedAmount);\n });\n}", "title": "" }, { "docid": "987d50b9cfadeb41bef4c76b03596ce8", "score": "0.54166454", "text": "initializeStore({ commit }) {\n commit(\"isLoading\", true);\n setTimeout(() => {\n let i = localStorage.getItem(\"vue-2020-workshop\");\n let items = JSON.parse(i);\n\n commit(\"initializeStore\", items);\n\n commit(\"isLoading\", false);\n }, 2000);\n }", "title": "" }, { "docid": "22e2967427d98cc7ccca3a8c7d39370b", "score": "0.5397541", "text": "async setup() {\n //store shop primary domain with .myshopify doamin in db\n //storeShopDomain();\n fetch(`${api_name}/shop/domain`, {\n method: \"GET\"\n })\n .then(res => {\n res.json();\n })\n .then(resj => {});\n this.setState({ isLoading: true });\n postCollection(\n {\n smart_collection: {\n title: \"Get it Today\",\n rules: [\n {\n column: \"title\",\n relation: \"contains\",\n condition: \"Get it Today\"\n }\n ]\n }\n },\n this.callbackGit\n );\n\n postCollection(\n {\n smart_collection: {\n title: \"Original\",\n rules: [\n {\n column: \"title\",\n relation: \"not_contains\",\n condition: \"Get it Today\"\n }\n ]\n }\n },\n this.callbackOrig\n ); //stores id of collection and posts GIT products\n //Changes normal products to the correct values\n postFulfillmentService();\n }", "title": "" }, { "docid": "333009812e05c0a6096107bb93672679", "score": "0.53779876", "text": "function store() {\n checkList();\n window.localStorage.myitems = tasklist.innerHTML;\n }", "title": "" }, { "docid": "4b537ae7ce03cea5129faac32b2160db", "score": "0.53746396", "text": "store() {\n return this._run('store');\n }", "title": "" }, { "docid": "16a8c4b741413a01a619f009fbe07ddd", "score": "0.5351579", "text": "function getTask(){\n return db('task')\n}", "title": "" }, { "docid": "f7c85682a73fe653e37e52e48c8c87a8", "score": "0.5350298", "text": "function store() {\n this.products = [\n new product(\n 'APL',\n 'Apple',\n 'Eat one every day to keep the doctor away!',\n 12,\n 90,\n 0,\n 2,\n 0,\n 1,\n 2\n ),\n new product(\n 'BAN',\n 'Banana',\n 'These are rich in Potassium and easy to peel.',\n 4,\n 120,\n 0,\n 2,\n 1,\n 2,\n 2\n ),\n new product(\n 'CTP',\n 'Cantaloupe',\n 'Delicious and refreshing.',\n 3,\n 50,\n 4,\n 4,\n 1,\n 2,\n 0\n ),\n new product(\n 'GRF',\n 'Grapefruit',\n 'Pink or red, always healthy and delicious.',\n 11,\n 50,\n 4,\n 4,\n 1,\n 1,\n 1\n ),\n new product(\n 'GRP',\n 'Grape',\n 'Wine is great, but grapes are even better.',\n 8,\n 100,\n 0,\n 3,\n 0,\n 1,\n 1\n )\n ];\n this.dvaCaption = [\n 'Negligible',\n 'Low',\n 'Average',\n 'Good',\n 'Great'\n ];\n this.dvaRange = [\n 'below 5%',\n 'between 5 and 10%',\n 'between 10 and 20%',\n 'between 20 and 40%',\n 'above 40%'\n ];\n this.fpProducts = [\n new fpProduct(\n 'CWG1',\n 'CwG-Book1.jpg',\n 'Conversations with God: Book 1',\n 'Kindle',\n '*****',\n 'Auto-delivered wirelessly',\n 'offered by Penguin Group (USA) LLC.',\n 'description',\n '$17.99',\n '$10.99'\n ),\n new fpProduct(\n 'CWG2',\n 'CwG-Book2.jpg',\n 'Conversations with God: Book 2',\n 'Kindle',\n '*****',\n 'Auto-delivered wirelessly',\n 'offered by Penguin Group (USA) LLC.',\n 'description',\n '$17.99',\n '$9.99'\n ),\n new fpProduct(\n 'CWG3',\n 'CwG-Book3.jpg',\n 'Conversations with God: Book 3',\n 'Kindle',\n '*****',\n 'Auto-delivered wirelessly',\n 'offered by Penguin Group (USA) LLC.',\n 'description',\n '$17.99',\n '$9.99'\n ),\n // new fpProduct('sku', 'thumb', 'name', 'format', 'rating', 'status', 'publisher', 'description', 'price', 'memberPrice')\n ];\n this.fpCaption = [\n 'Thumbnail',\n 'Item Name',\n 'Price',\n 'Quantity'\n ];\n this.fpRange = [\n \n ];\n}", "title": "" }, { "docid": "4981767804fc732b01f7809856b641d4", "score": "0.5348334", "text": "populateStorage(catalog) {\n localStorage.setItem('catalog', JSON.stringify(catalog));\n return catalog;\n }", "title": "" }, { "docid": "37b84edf4be84a412223d6ab3b7e95be", "score": "0.5335788", "text": "async addInfoFromStorage() {\n let result = await Popup.storage.get(this.articleId);\n if (Object.keys(result).length === 1) {\n let storInfo = result[this.articleId];\n let converted = Article.convertKeys(storInfo);\n // add the info to the current article object\n Object.assign(this, storInfo);\n console.debug(\n \"Biet-O-Matic: addInfoFromStorage(%s) Found info for Article in storage (converted %d entries): %s\",\n this.articleId,\n converted,\n this.toString()\n );\n }\n }", "title": "" }, { "docid": "bd6341addef536f9912773fabd1e2f4a", "score": "0.5324529", "text": "function initializeStore() {\n \n // Let's set a pretty high verbosity level, so that we see a lot of stuff\n // in the console (reassuring us that something is happening).\n store.verbosity = store.INFO;\n \n // We register a dummy product. It's ok, it shouldn't\n // prevent the store \"ready\" event from firing.\n store.register({\n id: \"com.monkeyvpn.app.14daypass\",\n alias: \"14-Day Pass\",\n type: store.CONSUMABLE\n });\n \n store.register({\n id: \"com.monkeyvpn.app.1monthsubscription\",\n alias: \"1 Month Premium Subscription\",\n type: store.PAID_SUBSCRIPTION\n }); \n \n store.register({\n id: \"com.monkeyvpn.app.6monthsubscription \",\n alias: \"6 Month Premium Subscription\",\n type: store.PAID_SUBSCRIPTION\n }); \n \n store.register({\n id: \"com.monkeyvpn.app.12monthsubscription\",\n alias: \"12 Month Premium Subscription\",\n type: store.PAID_SUBSCRIPTION\n }); \n // When every goes as expected, it's time to celebrate!\n // The \"ready\" event should be welcomed with music and fireworks,\n // go ask your boss about it! (just in case)\n store.ready(function () {\n console.log(\"\\\\o/ STORE READY \\\\o/\");\n });\n \n // Log all errors\n store.error(function(error) {\n console.log('STORE ERROR ' + error.code + ': ' + error.message);\n });\n \n \n store.when(\"com.monkeyvpn.app.14daypass\").approved(function(p) {\n console.log(\"verify subscription\");\n p.verify();\n });\n store.when(\"com.monkeyvpn.app.14daypass\").verified(function(p) {\n console.log(\"subscription verified\");\n p.finish();\n });\n store.when(\"com.monkeyvpn.app.14daypass\").unverified(function(p) {\n console.log(\"subscription unverified\");\n });\n store.when(\"com.monkeyvpn.app.14daypass\").updated(function(p) {\n if (p.owned) {\n console.log(\"you are subscribed!\");\n }\n else {\n console.log(\"you are not subscribed!\");\n }\n });\n \n \n \n // After we've done our setup, we tell the store to do\n // it's first refresh. Nothing will happen if we do not call store.refresh()\n store.refresh();\n }", "title": "" }, { "docid": "fcb60206090d5c27d8b9a2465d0061aa", "score": "0.53190756", "text": "function getFromLocalStorage() {\r\n let goalsLS = getGoalFromLS()\r\n\r\n // Loop through courses and print into cart\r\n goalsLS.forEach(goal => {\r\n const li = document.createElement('li')\r\n const addTask = document.createElement('span')\r\n li.append(addTask)\r\n addTask.innerText = goal\r\n ulGoals.appendChild(addTask)\r\n });\r\n}", "title": "" }, { "docid": "b6e3ff751ffbc9f5899e381ee3424cd3", "score": "0.5299766", "text": "function displayItems() {\n console.log(\"\\nLoading the Bamazon Store...\".bgMagenta);\n connection.query(\n `SELECT * FROM customer_storefront`,\n (err, res) => {\n if (err) console.log(`\\nThere was an error loading the Bamazon Store. Try again.\\n`.bgRed);\n console.table(res);\n bamazonCustomer();\n }\n );\n}", "title": "" }, { "docid": "d597eeaf1ba6b1f6e41d18864773ba77", "score": "0.52973694", "text": "getTasksInfo() {\n firebaseDB.getInfo('/tasks', (items) => {\n this.model.setItems(items);\n this.model.sortItemsByPriority(this.view.priority, this.view.state);\n });\n }", "title": "" }, { "docid": "1cd24c698ec918bddb7e0cea57795dde", "score": "0.52943736", "text": "function showSupervisorFront() {\n\n console.log(\"-------------------------------------------------------------\");\n inquirer.prompt([{\n type: 'rawlist',\n message: 'Select Bamazon supervisor option: ',\n choices: [\n 'View Product Sales By Department',\n 'Create New Department'\n ],\n name: 'supervisorOption'\n }]).then(function (answers) {\n\n switch (answers.supervisorOption) {\n case 'View Product Sales By Department':\n showProductSales();\n break;\n case 'Create New Department':\n createNewDepartment();\n break;\n default:\n console.log(\"Something really bad occurred!\");\n connection.end();\n break;\n }\n\n }); // ************* end of select all callback\n} //***********End of function createStoreFront */", "title": "" }, { "docid": "602385343123456720e51e1ac12ac493", "score": "0.5293352", "text": "async submitCSFormData() {\n const newStore = {\n Name: this.view.getCSFormFields().name.value,\n Email: this.view.getCSFormFields().email.value,\n PhoneNumber: this.view.getCSFormFields().phoneNumber.value,\n Address: this.view.getCSFormFields().address.value,\n Established: this.view.getCSFormFields().established.value,\n FloorArea: this.view.getCSFormFields().floorArea.value,\n id: Math.floor(Math.random()*10000) + 10\n };\n this.view.preload(this.view.getStoresListCotainer());\n this.view.closeCSPopup();\n\n await this.model.addStore(newStore);\n\n this.addRoute(newStore);\n this.view.renderStoresList(this.model.getStores()); \n }", "title": "" }, { "docid": "899a640725cbe61134688c72d2c79376", "score": "0.52886564", "text": "async store(req,res,next){\n const { titulo, descricao, categoria: categoriaId, preco, promocao, sku } = req.body;\n const { loja } =req.query;\n try {\n const produto = new Produto({\n titulo, \n disponibilidade:true, \n descricao, categoria: \n categoriaId, \n preco, \n promocao, \n sku, \n loja\n });\n\n const categoria = await Categoria.findById(categoriaId);\n categoria.produtos.push(produto._id);\n\n await produto.save();\n await categoria.save();\n\n return res.send({ produto })\n } catch (e) {\n next(e)\n }\n }", "title": "" }, { "docid": "690d8f1f80e5c8e5f172eca957a67976", "score": "0.525566", "text": "function CatalogUpdater(){\n\n var enlight = {\n\t 'name': 'enlight',\n\t\t'description': 'Streetlight data',\n\t\t'url': 'https://geras.1248.io/cat/enlight',\n\t\t'key':'1bfc8d081f5b1eed8359a7517fdb054a',\n 'pattern':'enlight',\n\t\t'host':'geras.1248.io',\n 'cat':'enlight',\n 'RT':'mqtt'\t\t\n\t},\n\tarmhome = {\n\t 'name': 'armhome',\n\t\t'description': 'ARM homes data',\n\t\t'url': 'https://geras.1248.io/cat/armhome',\n\t\t'key':'924a7d4dbfab38c964f5545fd6186559',\n 'pattern':'armhome',\n\t\t'host':'geras.1248.io',\n 'cat':'armhome',\n 'RT':'mqtt'\t\t\t\n\t},\n\tarmmeeting = {\n\t 'name': 'armmeeting',\n\t\t'description': 'ARM meeting room data',\n\t\t'url': 'https://geras.1248.io/cat/armmeeting',\n\t\t'key':'924a7d4dbfab38c964f5545fd6186559',\n 'pattern':'armmeeting',\n\t\t'host':'geras.1248.io',\n 'cat':'armmeeting',\n 'RT':'mqtt'\t\t\t\n\t},\n\tarmbuilding = {\n\t 'name': 'armbuilding',\n\t\t'description': '',\n\t\t'url': 'https://protected-sands-2667.herokuapp.com/cat',\n\t\t'key': 'vFFwWk1pClGtHOaK0ZyK',//'0L8kgshd4Lso3P1UQX7q',\n\t\t'pattern':'',\n\t\t'host':'protected-sands-2667.herokuapp.com',\n\t\t'cat':''\n },\n\tintellisense = {\n\t 'name': 'intellisense',\n\t\t'description': '',\n\t\t'url': 'https://5.79.20.223:3000/cat/ARM6',\n\t\t'key':'d01fe91e8e249618d6c26d255f2a9d42',\n\t\t'pattern':'',\n\t\t'host':'protected-sands-2667.herokuapp.com',\n\t\t'cat':''\n };\n\n\t\n\tvar master_catalog = 'http://data.openiot.org/cat';\n\tvar master_key = 'rQw5eBKMOoNfeDg1h6vQ1fuJFlkMB9sY5WBVHojr5wb0Ndv99LpNeOvqv6UVsud6I4go7SHCYhi3FKsm5aFYxA';\n\tvar filter = new catalogFilter();\n\tvar crawler = new catalog_crawler(armbuilding);\n\t\n\tfunction crawlRoot(_callback){\n request.get({ \n url: master_catalog,\t\n headers: {\n\t\t 'Authorization': 'Basic ' + new Buffer(master_key+\":\").toString('base64')\n\t\t ,'content-type':'application/json'\t\t\n },\n\t rejectUnauthorized: false,\n requestCert: true,\n agent: false\n }, function(error, response, body) {\n\t if(error){ \n\t\t winston.error(\"error \".red, error);\n\t\t\t callback(error,null);\n\t\t }else{ \t\n var obj ;\t\t\t\t\n try{\t\n //console.log('getResourceList'+body);\t\t\t\t\t\n\t\t obj = JSON.parse(body);\n }catch(e){\n\t\t\t\t\t return callback(e,null);\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t _callback(null,obj);\n\t\t }\n });\n\t}\n\t\n\tfunction crawlSubCatalogs(catalogs,_callback){\n\t\t\t //console.log('success get catalogs '.green, catalogs);\n\t\t\t\tvar catalog_profiles = [];\n\t\t\t\tasync.eachSeries(catalogs,function(catalog, callback){\n\t\t\t\t //console.log('get one catalog '.green, catalog.url,catalog.key);\t\n\t\t\t\t\t// https://geras.1248.io/cat/armhome catalog.url=='https://geras.1248.io/cat/armmeeting' || || catalog.url == 'https://protected-sands-2667.herokuapp.com/cat-2'\n\t\t\t\t\tif( catalog.url == 'https://protected-sands-2667.herokuapp.com/cat-1' ){\n var crawler = new catalog_crawler(catalog);\t\t\t\t\t\n\t\t\t\t\t\tcrawler.startCrawl(catalog, function(facts){\n\t\t\t\t\t\t\tcatalogFactsModel.storeCatalogFacts( catalog.url,facts,function(err,data){\n\t\t\t\t\t\t\t\tif(err) console.log('catalog facts store error '.red,err);\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t console.log('catalog facts store data '.green,catalog.url, data);\n }\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t/////////////////////////////////////////////////////////\n\t\t\t\t\t\t\tfilter.filterStandard(facts,function(results,category){\n\t\t\t\t\t\t\t\tvar key_array = Object.keys(results);\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tconsole.log('complete filterStandard'.green, key_array.length, category);\n\t\t\t\t\t\t\t\tcatalog_profiles.push({url:catalog.url, profile:category.profile, types : category.types});\n\t\t\t\t\t\t\t\tcallback();\t\n\t\t\t\t\t\t\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}); \n }else {\n\t\t\t\t\t callback();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t},function(err,data){\n\t\t\t\t _callback(err,catalog_profiles); \n\t\t\t\t})\n\t}\n\n\tfunction crawlSingleCatalog(catalog,_callback){\n\t //console.log('success get catalogs '.green, catalogs);\n\t\tvar catalog_profiles = [];\t\t\t\t\t\n\t\tvar crawler = new catalog_crawler(catalog);\t\t\t\t\t\n\t\tcrawler.startCrawl(catalog, function(facts){\n\t\t\tcatalogFactsModel.storeCatalogFacts( catalog.url,facts,function(err,data){\n\t\t\t\tif(err) console.log('catalog facts store error '.red,err);\n\t\t\t\telse {\n\t\t\t\t\tconsole.log('catalog facts store data '.green,catalog.url, data);\n\t\t\t\t}\n\t\t\t\t/////////////////////////////////////////////////////////\n\t\t\t\tfilter.filterStandard(facts,function(results,category){\n\t\t\t\t\tvar key_array = Object.keys(results);\t\t\t\t\t\t\t\t\n\t\t\t\t\tconsole.log('complete filterStandard'.green, key_array.length, category);\n var list = [];\t\t\t\t\t\n\t\t\t\t\tasync.forEach(key_array, function(key,callback){\n\t\t\t\t\t\t//console.log('---------------------------',key , results[key]);\n\t\t\t\t\t\tif(!_.isEmpty(results[key])){\n\t\t\t\t\t\t results[key].url = key;\n\t\t\t\t\t\t list.push(results[key]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcallback();\n\t\t\t\t\t},function(err){\n\t\t\t\t\t catalogModel.updateCatalogResource(catalog.url,list,function(err,data){\n\t\t\t\t\t\t if(err) console.log('failed to update catalog resource '.red,err);\n\t\t\t\t\t\t\telse if(data && data==1) console.log('update the resource success'.green);\n\t\t\t\t\t\t\telse if(data && data==0) console.log('failed to update catalog resource'.red);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t catalog_profiles.push({url:catalog.url,key:catalog.key, profile:category.profile, types : category.types});\t\n\t\t\t\t\t _callback(err,catalog_profiles);\n\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\t\t\t\t\t\t\n\t\t\t\t}); \t\t\t\t\t\t\t\t\n\t\t\t});\t\n\t\t});\n\t}\n\n\t\n\tfunction updateMeetingRoomAndLocation( _callback){\n\t\tasync.series([\n\t\t\t// https://alertmeadaptor.appspot.com/traverse?traverseURI=https%3A%2F%2Fgeras.1248.io%2Fcat%2Farmhome&traverseKey=924a7d4dbfab38c964f5545fd6186559&Submit=Browse\t\t\t\t\t\t\n\t\t\tfunction(callback){\n\t\t\t\tcrawler.startCrawl(armbuilding, function(facts){\n\t\t\t\t catalogFactsModel.storeCatalogFacts( armbuilding.url,facts,function(err,data){\n\t\t\t\t\t if(err) console.log('catalog armbuilding facts store error '.red,err);\n\t\t\t\t\t\telse console.log('catalog armbuilding facts store data '.green, data);\n\t\t\t\t\t});\t\t\t\t\n\t\t\t\t \n\t\t\t\t\tfilter.filterRoom(facts,function(results){\n\t\t\t\t\t\tvar key_array = Object.keys(results);\n\t\t\t\t\t\tconsole.log('complete filterRoom'.green, key_array.length);\t\t\t\t\n\t\t\t\t\t\tasync.forEach(key_array, \n\t\t\t\t\t\t function(key,callback){\n\t\t\t\t\t\t\tconsole.log(key , results[key]);\t\t\t\t\t\t\n\t\t\t\t\t\t\tcatalogDB.saveResource('res:room:'+key, results[key],function(){});\n\t\t\t\t\t\t},function(err){\n\t\t\t\t\t\t\tconsole.log('');\n\t\t\t\t\t\t});\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tcallback(null, 'one'); \n\t\t\t\t}); \n\t\t\t},\n\n\t\t\tfunction(callback){\n\t\t\t\tcrawler = new catalog_crawler(armmeeting);\n\t\t\t\tcrawler.startCrawl(armmeeting, function(facts){\n\t\t\t\t catalogFactsModel.storeCatalogFacts( armmeeting.url,facts,function(err,data){\n\t\t\t\t\t if(err) console.log('catalog armmeeting facts store error '.red,err);\n\t\t\t\t\t\telse console.log('catalog armmeeting facts store data '.green, data);\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tfilter.filterSensors(facts,function(results, category){\n\t\t\t\t\t\tvar key_array = Object.keys(results);\n\t\t\t\t\t\tconsole.log('complete filterSensor'.green, key_array.length, category.sensors);\t\t\t\t\n\t\t\t\t\t\tasync.forEach(key_array, function(key,callback){\n\t\t\t\t\t\t\tconsole.log('key:',key , 'value:',results[key]);\n\t\t\t\t\t\t\tcatalogDB.saveResource('res:sensor:'+key, results[key],function(){});\n\t\t\t\t\t\t},function(err){\n\t\t\t\t\t\t\tconsole.log('');\n\t\t\t\t\t\t});\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tcallback(null, 'one'); \n\t\t\t\t});\t\t\n\t\t\t}\n\t\t],function(err, results){\n\t\t\tconsole.log('crawler finished ..... '.green, results);\n\t\t\tintegrateMeetingRoom();\n if(_callback) _callback();\t\t\t\n\t\t});\t\n\t}\n\t\n\tfunction updateHomeCatalog(){\n\t\t\tconsole.log('updateHomeCatalog .....'.red);\n\t\t\tvar filter = new catalogFilter();\n\t\t\tvar crawler = new catalog_crawler(armhome);\n\t\t\tasync.series([\t\t\n\t\t\t\tfunction(callback){\n\t\t\t\t\tconsole.log('start crawl before .....'.red);\n\t\t\t\t\tcrawler.startCrawl(armhome, function(facts){\t\t\t\t\t\n\t\t\t\t\t\tfilter.filterHome(facts,function(results){\n\t\t\t\t\t\t\tvar key_array = Object.keys(results);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tconsole.log('complete filterHome'.green, key_array.length);\t\t\t\t\n\t\t\t\t\t\t\tasync.forEach(key_array, function(key,callback){\n\t\t\t\t\t\t\t\tconsole.log(key , results[key]);\n\t\t\t\t\t\t\t\tcatalogDB.saveResource('res:home:'+key, results[key],function(){});\n\t\t\t\t\t\t\t},function(err){\n\t\t\t\t\t\t\t\tconsole.log('');\n\t\t\t\t\t\t\t});\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t\tcallback(null, 'one'); \n\t\t\t\t\t});\t\n\t\t\t\t}\t\t\n\t\t\t],function(err, results){\n\t\t\t\tconsole.log('updateHomeCatalog finished ..... '.green, results);\t\t\t\t\t\t\n\t\t\t});\t\n\t}\n\n\t/*\n\tfunction updateEnlightCatalog(){\n\t\tconsole.log('updateEnlightCatalog .....'.red);\n\t\t// https://alertmeadaptor.appspot.com/traverse?traverseURI=https%3A%2F%2Fgeras.1248.io%2Fcat%2Fenlight&traverseKey=1bfc8d081f5b1eed8359a7517fdb054a&Submit=Browse\n var filter = new catalogFilter();\n\t\tvar crawler = new catalog_crawler(enlight);\n\t\tcrawler.startCrawl(enlight, function(facts){\n\t\t\tfilter.filterEnlight(facts,function(results){\n\t\t\t\tvar key_array = Object.keys(results);\n\t\t\t\tconsole.log('complete filterEnlight'.green, key_array.length);\t\t\t\t\n\t\t\t\tasync.forEach(key_array, function(key,callback){\n\t\t\t\t\tconsole.log(key ); // , results[key]\n\t\t\t\t\t//catalogDB.saveResource('res:light:'+key, results[key],function(){});\n\t\t\t\t},function(err){\n\t\t\t\t\tconsole.log('');\n\t\t\t\t});\t\t\t\t\n\t\t\t});\n\t\t\tcallback(null, 'one'); \n\t\t});\t\t\t\t\t\t\n\t}\t\n\n\tfunction updateIntellsenseCatalog(){\t\t\t\n\t\t// https://alertmeadaptor.appspot.com/traverse?traverseURI=https%3A//5.79.20.223%3A3000/cat/ARM6&traverseKey=d01fe91e8e249618d6c26d255f2a9d42\t\t\t\n\t\tvar crawler = new catalog_crawler(intellisense);\n\t\tcrawler.startCrawl(intellisense, function(facts){\n\t\t\tfilter.filterIntellisense(facts,function(results){\n\t\t\t\tvar key_array = Object.keys(results);\n\t\t\t\tconsole.log('complete filterIntellisense'.green, key_array.length);\t\t\t\t\n\t\t\t\tasync.forEach(key_array, function(key,callback){\n\t\t\t\t\tconsole.log('hvac:'.green, key , results[key]);\n\t\t\t\t\t//catalogDB.saveResource('res:hvac:'+key, results[key],function(){});\n\t\t\t\t},function(err){\n\t\t\t\t\tconsole.log('');\n\t\t\t\t});\t\t\t\t\n\t\t\t});\n\t\t\tcallback(null, 'one'); \n\t\t});\t\t \n\t}\n\t*/\t\n\treturn {\n //updateIntellsenseCatalog:updateIntellsenseCatalog,\n //updateEnlightCatalog:updateEnlightCatalog,\n\t\t\n updateHomeCatalog:updateHomeCatalog,\n\t\tupdateMeetingRoomAndLocation:updateMeetingRoomAndLocation,\n\t\t\n\t\t\n\t\tcrawlRoot:crawlRoot,\n\t\tcrawlSubCatalogs:crawlSubCatalogs,\n\t\tcrawlSingleCatalog:crawlSingleCatalog\n\t}\t\n}", "title": "" }, { "docid": "435a47469df47813b0d9e8642f1eb2e1", "score": "0.5252267", "text": "static displayBooks(){\r\n const books=Store.getBooks();\r\nbooks.forEach((book) => UI.addbooktolist(book))\r\n}", "title": "" }, { "docid": "ec046b349c464fc2b13dd216968415dc", "score": "0.5241279", "text": "execute(categoryid){\n\n let store = this.get('store');\n let self = this;\n let categoryID = categoryid.toString();\n let response = this.get('documents').createBlankTemplate(categoryID);\n self.get('_routing').transitionTo('app.documents.editor', [response.document.id]);\n \n }", "title": "" }, { "docid": "a32eb18fc0aca31b28c088784120c30d", "score": "0.52405214", "text": "function store() {\r\n this.products = [\r\n new product(\"APL\", \"Apple\", \"Eat one every…\", 12, 90, 0, 2, 0, 1, 2),\r\n new product(\"AVC\", \"Avocado\", \"Guacamole…\", 16, 90, 0, 1, 1, 1, 2),\r\n new product(\"BAN\", \"Banana\", \"These are…\", 4, 120, 0, 2, 1, 2, 2),\r\n // more products…\r\n new product(\"WML\", \"Watermelon\", \"Nothing…\", 4, 90, 4, 4, 0, 1, 1)\r\n ];\r\n this.dvaCaption = [\"Negligible\", \"Low\", \"Average\", \"Good\", \"Great\" ];\r\n this.dvaRange = [\"below 5%\", \"between 5 and 10%\",… \"above 40%\"];\r\n}", "title": "" }, { "docid": "d9a54835e46aec5c55ac117f20e67c95", "score": "0.5231545", "text": "async function main() {\n //get steam inventory\n let res = await request.get({\n url: `https://steamcommunity.com/inventory/${steam_id}/730/2?l=english&count=1000`,\n json: true,\n gzip: true\n })\n // do dict {item_name: []}\n for (item_name in items_name) {\n items_info[items_name[item_name]] = []\n }\n // fill items_dict to {item_name:[assets...] and storage_list to [storage assets...]}\n for (item in res['descriptions']) {\n market_name = res['descriptions'][item]['market_hash_name']\n if (items_name.includes(market_name)) {\n instance_id = res['descriptions'][item]['instanceid']\n class_id = res['descriptions'][item]['classid']\n for (id_info in res['assets']) {\n if (res['assets'][id_info]['instanceid'] == instance_id && res['assets'][id_info]['classid'] == class_id) {\n items_info[market_name].push(parseInt(res['assets'][id_info]['assetid']))\n }\n }\n }\n else if (market_name == 'Storage Unit') {\n instance_id = res['descriptions'][item]['instanceid']\n class_id = res['descriptions'][item]['classid']\n for (id_info in res['assets']) {\n if (res['assets'][id_info]['instanceid'] == instance_id && res['assets'][id_info]['classid'] == class_id) {\n casket_assets.push(parseInt(res['assets'][id_info]['assetid']))\n }\n }\n } \n }\n // ask user for current storage asset id\n console.log('Your Storage ids:\\n' + casket_assets.join('\\n'));\n work_casket = parseInt(rp.question('Select Storage id: '));\n // put items into storage\n for (item_name in items_info) {\n for (asset_id in items_info[item_name]) {\n csgo.addToCasket(work_casket, items_info[item_name][asset_id])\n console.log(`Successfully add ${item_name} (${items_info[item_name][asset_id]}) to Storage (${work_casket})`) \n // delay to avoid ip ban \n sleep(500)\n }\n }\n \n}", "title": "" }, { "docid": "1420f0932591eb4252ac50ac9b52f93a", "score": "0.52289677", "text": "function addProduct() {\r\n // Get the itemBox div\r\n var itemBox = event.target.parentElement.parentElement.parentElement.parentElement;\r\n // Get the Image src\r\n var imageSrc = itemBox.getElementsByTagName('img')[0].src;\r\n // Get the Product title\r\n var title = itemBox.getElementsByTagName('h5')[0].innerText;\r\n // Get the Product price\r\n var price = itemBox.getElementsByTagName('h6')[0].innerText;\r\n var quantity = 1;\r\n\r\n var newItem = { ImageSrc: imageSrc, Title: title, Quantity: quantity, Price: price }\r\n\r\n var transaction = db.transaction(['products'], 'readwrite');\r\n var objectStore = transaction.objectStore('products');\r\n var request = objectStore.add(newItem);\r\n\r\n transaction.oncomplete = function() {\r\n displayData();\r\n }\r\n}", "title": "" }, { "docid": "76dcd42c2e3644d60b45dcbdf43037da", "score": "0.5227755", "text": "function Store() {\n}", "title": "" }, { "docid": "76dcd42c2e3644d60b45dcbdf43037da", "score": "0.5227755", "text": "function Store() {\n}", "title": "" }, { "docid": "76dcd42c2e3644d60b45dcbdf43037da", "score": "0.5227755", "text": "function Store() {\n}", "title": "" }, { "docid": "76dcd42c2e3644d60b45dcbdf43037da", "score": "0.5227755", "text": "function Store() {\n}", "title": "" }, { "docid": "76dcd42c2e3644d60b45dcbdf43037da", "score": "0.5227755", "text": "function Store() {\n}", "title": "" }, { "docid": "76dcd42c2e3644d60b45dcbdf43037da", "score": "0.5227755", "text": "function Store() {\n}", "title": "" }, { "docid": "76dcd42c2e3644d60b45dcbdf43037da", "score": "0.5227755", "text": "function Store() {\n}", "title": "" }, { "docid": "76dcd42c2e3644d60b45dcbdf43037da", "score": "0.5227755", "text": "function Store() {\n}", "title": "" }, { "docid": "76dcd42c2e3644d60b45dcbdf43037da", "score": "0.5227755", "text": "function Store() {\n}", "title": "" }, { "docid": "76dcd42c2e3644d60b45dcbdf43037da", "score": "0.5227755", "text": "function Store() {\n}", "title": "" }, { "docid": "76dcd42c2e3644d60b45dcbdf43037da", "score": "0.5227755", "text": "function Store() {\n}", "title": "" }, { "docid": "76dcd42c2e3644d60b45dcbdf43037da", "score": "0.5227755", "text": "function Store() {\n}", "title": "" }, { "docid": "76dcd42c2e3644d60b45dcbdf43037da", "score": "0.5227755", "text": "function Store() {\n}", "title": "" }, { "docid": "76dcd42c2e3644d60b45dcbdf43037da", "score": "0.5227755", "text": "function Store() {\n}", "title": "" }, { "docid": "0d28395e03258ce93aa7f233be5a1d98", "score": "0.52223474", "text": "function saveTask(e)//Funcion para usar\n{\n let Title = document.getElementById('Title').value;//Valores de los Inputs\n let Select = document.getElementById('Selector').value;\n let Description = document.getElementById('Description').value;\n\n const Task = //Objeto\n { \n Title,\n Select,\n Description\n };\n\n if(localStorage.getItem('Tareas') === null)// si el localstorage esta vacio, Crear uno nuevo\n {\n let tasks = [];// array vacio\n tasks.push(Task);//Entrar el objeto en el array vacio\n localStorage.setItem('Tareas', JSON.stringify(tasks));\n }\n else\n {\n let tasks = JSON.parse(localStorage.getItem('Tareas'));\n tasks.push(Task);\n localStorage.setItem('Tareas', JSON.stringify(tasks));\n }\n\n getTask();\n document.getElementById('Form').reset();\n e.preventDefault();\n}", "title": "" }, { "docid": "11454ba634434d8818752b3a9863e673", "score": "0.5214507", "text": "function getCatalog() {\n return { items: AppStore.getCatalog() };\n}", "title": "" }, { "docid": "3860a7fee8bf0a3bf109ce9f142e9af0", "score": "0.52095705", "text": "data() {\n\t\treturn {\n\t\t\ttasks: [ // an aray of tasks\n\t\t\t\t{task: 'Go to the store', complete: true},\n\t\t\t\t{task: 'Check email', complete: false},\n\t\t\t\t{task: 'Go to work', complete: true},\n\t\t\t\t{task: 'Go to the farm', complete: false}\n\t\t\t]\n\t\t}\n\t}", "title": "" }, { "docid": "477335006482ac9d2684dd453b8a7f43", "score": "0.52055913", "text": "static displayItem() {\n // const StoredItems = [\n // { //mimics localStorage\n // name: 'Wheat',\n // itemcode: 8796,\n // price: 45\n // },\n // {\n // name: 'Salt',\n // itemcode: 9796,\n // price: 10\n // }\n // ];\n const items = Store.getItems(); //displays utems on localStorage\n items.forEach((item => UI.addItemtoList(item))); //select each property from userinput and add them to table\n }", "title": "" }, { "docid": "b5a05a3289d005fe4a95950b0c2d72fc", "score": "0.5202069", "text": "function clientDB() {\n\n const request = getStore().put( priodata );\n request.onsuccess = event => event.target.result.toString() === priodata.key.toString() ? resolve( event.target.result ) : reject( event.target.result );\n request.onerror = event => reject( event.target.errorCode );\n\n }", "title": "" }, { "docid": "76024bf801d579660affbe4036130a06", "score": "0.5199976", "text": "async function store(req, res) {}", "title": "" }, { "docid": "9c746e40715fa372cc5b0256b825a133", "score": "0.5193546", "text": "function getTasks() {\n let tasks;\n if (localStorage.getItem('tasks') === null) {\n tasks = [];\n } else {\n tasks = JSON.parse(localStorage.getItem('tasks'));\n }\n // 3.0.1 Display them to UI\n tasks.forEach((task) => {\n const li = document.createElement('li');\n li.className = 'collection-item';\n li.appendChild(document.createTextNode(task));\n const link = document.createElement('a');\n link.className = 'delete-item secondary-content';\n link.innerHTML = '<i class=\"fas fa-eraser\"></li>';\n li.appendChild(link);\n taskList.appendChild(li);\n });\n}", "title": "" }, { "docid": "6ad1a6ae6b68800cb329bcf551fc0dc5", "score": "0.5187043", "text": "static topBookStore() {\n return 'Chapters';\n }", "title": "" }, { "docid": "c56b92d9a23a57c1af0b685f5a171f9b", "score": "0.51622045", "text": "async obtenerCatalogo({ commit, dispatch, state }) {\n return await apiServiceNimd.getCatalogos()\n .then(response => {\n // eslint-disable-next-line\n //console.log(response)\n commit('SET_CATALOGOS', response.resultados)\n })\n }", "title": "" }, { "docid": "914f3a43554198270e6ff1a8be71e085", "score": "0.51610667", "text": "function initStore() {\n //Querys the DB intially to populate inquirer array\n connection.query(\n \"SELECT * FROM products\", function(err, results) {\n if (err) throw err;\n console.log(figlet.textSync(\"Welcome to Bamazon!\",\n {\n font: \"Big\",\n horizontalLayout: \"default\",\n verticalLayout: \"default\"\n })); \n console.log(\"Here's a list of our current products in stock:\")\n data = [\n [\"item_id\", \"product_name\", \"price\"]\n ];\n for (let f = 0; f < results.length; f++) {\n let allProds = [results[f].item_id, results[f].product_name, results[f].price];\n data.push(allProds);\n //console.log(\"\\n\" + results[f].item_id + \" | \" + results[f].product_name + \" | $\" + results[f].price + \"\\n\");\n }\n config = {\n border: table.getBorderCharacters('honeywell')\n };\n output = table.table(data, config);\n console.log(output);\n //Asks the user which product they would like to order and how many\n inquirer\n .prompt([\n {\n name: \"itemID\",\n type: \"rawlist\",\n message: \"Select a product ID to begin.\",\n choices: function() { //populate choices with actual Database info\n let choicesArray = [];\n for (let i = 0; i < results.length; i++) {\n choicesArray.push(JSON.stringify(results[i].item_id));\n }\n return choicesArray;\n }\n },\n {\n name: \"itemQuantity\",\n type: \"input\",\n message: \"What quantity of that item would you like to order?\",\n validate: function(val) {\n if (!isNaN(val)) {\n return true;\n }\n return false;\n }\n }\n ]).then(function(answers) {\n //Check if IDs match to correspond to DB\n let chosenItem;\n for (let j = 0; j < results.length; j++) {\n if (results[j].item_id === parseInt(answers.itemID)) {\n chosenItem = results[j];\n }\n }\n //Check if quantity requested in order is available\n if (chosenItem.stock_quantity >= parseInt(answers.itemQuantity)) {\n console.log(\"Successfully ordered \" + answers.itemQuantity + \" of \" + chosenItem.product_name + \" for $\" + (chosenItem.price * answers.itemQuantity));\n let newQuantity = chosenItem.stock_quantity - parseInt(answers.itemQuantity);\n let productSale = chosenItem.price * answers.itemQuantity;\n connection.query(\n \"UPDATE products SET ? WHERE ?\",\n [\n {\n stock_quantity: newQuantity,\n product_sales: chosenItem.product_sales + productSale\n },\n {\n item_id: chosenItem.item_id\n }\n ],\n function(error) {\n if (error) throw err;\n anotherBuy();\n }\n )\n } else {\n console.log(\"ERR-Insufficient Quantity!\");\n anotherBuy();\n }\n })\n }\n )\n}", "title": "" }, { "docid": "5b5982aee9d4bbad9424de11eb286923", "score": "0.5157667", "text": "guardarProductosLocalStorage(producto){\r\n let productos;\r\n //Toma valor de un arreglo con datos del LS\r\n productos = this.obtenerProductosLocalStorage();\r\n //Agregar el producto al carrito\r\n productos.push(producto);\r\n //Agregamos al LS\r\n localStorage.setItem('productos', JSON.stringify(productos));\r\n\r\n}", "title": "" }, { "docid": "5fcf74dcadca69e471d34ca2ced59a3d", "score": "0.51569825", "text": "function getTasks() {\r\n let tasks;\r\n if(localStorage.getItem('tasks') === null){\r\n tasks = [];\r\n } else {\r\n tasks = JSON.parse(localStorage.getItem('tasks'));\r\n }\r\n tasks.forEach(function(task){\r\n const li = document.createElement('li');\r\n li.className = 'collection-item';\r\n li.appendChild(document.createTextNode(task));\r\n const link = document.createElement('a');\r\n link.className = 'delete-item secondary-content';\r\n link.innerHTML = '<i class=\"fa fa-remove\"></i>';\r\n li.appendChild(link);\r\n taskList.appendChild(li);\r\n })\r\n}", "title": "" }, { "docid": "dfd1d0e6d732852c9c898da9c0513ba7", "score": "0.5150803", "text": "async function store(ctx) {\n if (ctx.isAuthenticated()) {\n let store_data = [];\n let price_data = [];\n let items_for_sell = await Sales.findAll({where: {googleID: {$ne: ctx.state.user.id}}});\n for (let i in items_for_sell) {\n let selling_item = await Playlists.findOne({where: {youtubeID: items_for_sell[i].playlistID}});\n let bought_item = await Orders.findOne({\n where: {\n playlistID: items_for_sell[i].playlistID,\n ownerID: ctx.state.user.id\n }\n });\n let user = await Users.findOne({where: {googleID: items_for_sell[i].googleID}});\n let array_cell = [];\n array_cell.push(selling_item);\n array_cell.push(items_for_sell[i]);\n array_cell.push(bought_item);\n array_cell.push(user);\n store_data[i] = array_cell;\n smartPrinter(user.photos);\n // store_data = [[selling_item,items_for_sell[i],bought_item],[.....]...[.....]]\n\n\n }\n\n await ctx.render('store', {userInfo: ctx.state.user, store_info: store_data});\n }\n else {\n ctx.redirect('/login');\n\n }\n}", "title": "" }, { "docid": "3988192aa0d3b10af9885f03c36b9947", "score": "0.51506126", "text": "function Addtask()\n{\n\t\n\tvar time= adddate();\t\n\tvar task=document.getElementById(\"task\");\t\n\tvar app=task.value+\"(\"+time+\")\";\t\n\ttask.value=\"\";\t\n\tvalue.push(app);\t\t\t\n\t\n\ttry{\n\tlocalStorage.setItem(\"itemId\", value); //store the item in the database\n\t}\n\tcatch(e)\n\t{}\n\t\n\tcreatetask(app);\n\t\t\n}", "title": "" }, { "docid": "7bf236eb70b0a4a69a8734289317fbdf", "score": "0.5149015", "text": "storeTask(){\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_nullish_assignment for ??\n const allData=JSON.parse(localStorage.getItem(\"tasks\"))??[];\n allData.push({id:this.id,name:this.name,details:this.details,assignee:this.assignee,dueDate:this.dueDate,status:this.status});\n localStorage.setItem(\"tasks\",JSON.stringify(allData));\n }", "title": "" }, { "docid": "d9eeff1ac4435c1efa0235a850c7fe00", "score": "0.514556", "text": "getTasksInfo() {\n firebaseDB.getInfo('/tasks', (items) => {\n this.model.setItems(items);\n this.model.sortData(this.view.sortBy, this.view.filterByDate);\n });\n }", "title": "" }, { "docid": "5c690590bd55e5f0787d8ceeb83193a1", "score": "0.5134708", "text": "guardarProductosLocalStorage(producto){\n let productos;\n //Toma valor de un arreglo con datos del LS\n productos = this.obtenerProductosLocalStorage();\n //Agregar el producto al carrito\n productos.push(producto);\n //Agregamos al LS\n localStorage.setItem('productos', JSON.stringify(productos));\n }", "title": "" }, { "docid": "903d3cac3997239f77d44d9840948a20", "score": "0.51305866", "text": "function carregarProduto(){\n\t$(document).ready( function(){\n try{\n var id = $(\"#ID\").val();\n\n if(id !== \"\"){\n\n\t\t\t\tvar request = indexedDB.open(\"petshop\", 3);\n\n\t\t\t\trequest.onsuccess = function(event){\n\t\t\t\t\tvar db = event.target.result;\n\t\t\t\t\tvar transaction = db.transaction([\"Estoque\"], \"readwrite\");\n\t\t\t\t\tvar store = transaction.objectStore(\"Estoque\");\n\t\t\t\t\tvar request = store.get(Number(id));\n\n\t\t\t\t\trequest.onsuccess = function(e){\n\n\t\t\t\t\t\tvar result = e.target.result;\n\t\t\t\t\t\tif(typeof result !== \"undefined\"){\n\n\t\t\t\t\t\t\tdocument.getElementById(\"productName\").value = request.result.name;\n\t\t\t\t\t\t\tdocument.getElementById(\"photo\").src = request.result.photo;\n\t\t\t\t\t\t\tdocument.getElementById(\"descricao\").value = request.result.descricao;\n\t\t\t\t\t\t\tdocument.getElementById(\"price\").value = request.result.preco;\n\t\t\t\t\t\t\tdocument.getElementById(\"stock\").value = request.result.qtd_estoque;\n\t\t\t\t\t\t\tdocument.getElementById(\"sold\").value = request.result.qtd_vendida;\n\t\t\t\t\t\t\t// //console.log(request.result.name + \" \" + request.result.descricao + \" \" + request.result.preco);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\talert(\"O ID não existe\");\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\n\t\t\t\t\tdb.close();\n\t\t\t\t}\n }else{\n alert(\"É necessário preencher o ID!\");\n }\n }catch(err){\n\t\t\tconsole.log(err.message);\n }\n });\n}", "title": "" }, { "docid": "291005d8a3114e145481885c2360e5eb", "score": "0.5128898", "text": "async function main() {\n\n const datastore = await getDatastore();\n console.log(datastore);\n\n\n\n}", "title": "" }, { "docid": "1bd801045a51eac7529cf47119b6de03", "score": "0.51275045", "text": "static topBookStore() {\r\n return 'Chapters';\r\n }", "title": "" }, { "docid": "a42309bfcc375072636f705137a2805a", "score": "0.5125544", "text": "static storage(products){\r\n localStorage.setItem(\"food-products\",JSON.stringify(products));\r\n }", "title": "" }, { "docid": "abf613d8354d2159df14059ad98db0c4", "score": "0.5124346", "text": "function viewBestSeller() {\n return new Promise((resolve, reject) => {\n db.insert({\n \"_id\": \"_design/best-products\",\n \"views\": {\n \"best-seller\": {\n \"map\": \"function (doc) {\\n if (doc.type == 'cart' && doc.action == 'checkout'){\\n var products = doc.products\\n var items = []\\n for (var i = 0; i < products.length; i++){\\n p = products[i]\\n emit(p.id, {quantity: p.quantity})\\n }\\n }\\n}\",\n \"reduce\": \"function (keys, values, rereduce) {\\n var count = 0\\n values.forEach((value) => {\\n //console.log(value)\\n count = count + value.quantity\\n })\\n if (rereduce) \\n return count\\n else\\n return {quantity: count}\\n }\"\n }\n },\n \"language\": \"javascript\"\n }, (error, success) => {\n if (success) {\n resolve({})\n }\n else {\n log(`Failed to add view. Reason : ${error.reason}`)\n reject(new Error(`Failed to add view. Reason : ${error.reason}`))\n }\n })\n })\n}", "title": "" }, { "docid": "4ae58bdc2fa9c798ab32062bd0cb921e", "score": "0.51231027", "text": "function getTASK(){\n let tasks;\n if(localStorage.getItem('tasks') === null){\n tasks = [];\n }\n else{\n tasks = JSON.parse(localStorage.getItem('tasks'));\n }\n tasks.forEach(function(taskli){\n //create li\n const li = document.createElement('li');\n\n //add a class\n li.className =\"collection-item\";\n\n //create a textNode and Append\n\n li.appendChild(document.createTextNode(taskli));\n \n //create element a \n const link = document.createElement('a');\n\n //add a class\n link.className =\"delete-item secondary-content\";\n // add element to a tag\n link.innerHTML ='<i class=\" fa fa-remove\"></i>';\n\n //append link to li\n\n li.appendChild(link);\n\n //append li to ul collection\n\n taskList.appendChild(li);\n\n });\n\n}", "title": "" }, { "docid": "11a4c078f3f8c14df16cff09ba84e735", "score": "0.51162755", "text": "nuxtServerInit(vuexContext) {\n return fireDb\n .collection(\"pro\")\n .get()\n .then(snapshot => {\n let proArray = [];\n snapshot.forEach(doc => {\n let pro = doc.data();\n\n proArray.push({ ...pro, id: doc.id });\n\n vuexContext.commit(\"setPro\", proArray);\n\n vuexContext.commit(\"setFinlePro\", proArray);\n });\n });\n }", "title": "" }, { "docid": "b9e1b7db56d7c3adb492986dd24ce031", "score": "0.51157916", "text": "function submitData(){\n\t\tvar id=Math.floor(Math.random()*53211245);\n\t\tgetCheckedBox();\n\t\tvar task={};\n\t\ttask.weekday=[\"Day: \", dayValue];\n\t\ttask.subject=[\"Subject: \", getValue('sub').value];\n\t\ttask.period=[\"Period: \", getValue('period').value];\n\t\ttask.age=[\"Age: \", getValue('age').value];\n\t\ttask.tasks=[\"Tasks to be performed: \", getValue('tasks').value];\n\t\ttask.date=[\"Due date: \", getValue('duedate').value];\n\t\ttask.comments=[\"Your comments: \", getValue('comments').value];\n\t\talert(\"Task has been saved\");\n\t\tlocalStorage.setItem(id, JSON.stringify(task));\n\t}", "title": "" }, { "docid": "335ebae4e00ba0efe8705a51d6257eb0", "score": "0.51122135", "text": "function takeTasks() {\n let tasks;\n if (localStorage.getItem(\"tasks\") === null) {\n tasks = [];\n } else {\n tasks = JSON.parse(localStorage.getItem(\"tasks\"));\n }\n\n tasks.forEach(function (task) {\n const li = document.createElement(\"li\");\n\n // Add class\n li.className = \"items\";\n\n li.appendChild(document.createTextNode(task));\n\n const link = document.createElement(\"a\");\n\n link.className = \"delete-item secondary-content\";\n\n link.innerHTML = '<i class=\"far fa-trash-alt\"></i>';\n\n li.appendChild(link);\n\n taskList.appendChild(li);\n });\n}", "title": "" }, { "docid": "cb7de1c8b5a23a7b70c85be1487c747e", "score": "0.5110749", "text": "function setTask(e){\n \n let bagInput = document.getElementById(`i${e}`).value;\n \n let tasks = {\n\n timeSlot:`i${e}`,\n inputStored: bagInput,\n\n }\n window.localStorage.setItem(`${e}`,JSON.stringify(tasks));\n\n\n}", "title": "" }, { "docid": "ca1feb1bde2d40204abc8b157499a4eb", "score": "0.5110273", "text": "function storeCategory(data){\n STORE.CATEGORY = (data.trivia_categories); \n generateCategoryTemplate(data);\n render();\n}", "title": "" }, { "docid": "8e61f29f9324c2545cdecf4bcfb7ab4f", "score": "0.5108724", "text": "function addTransaction(e){\n e.preventDefault();\n\n // get new record from ui and put into object\n let newRecord = {};\n for(let i = 0; i < addForm.childElementCount; i++){\n newRecord[addForm.children[i].firstElementChild.id] = addForm.children[i].firstElementChild.value;\n }\n console.log(newRecord);\n \n \n\n // CHECK IF STUDENT IS IN THE DATABASE\n\n // create transaction and get object store based on what dept is requesting access\n let transaction;\n let objectStore;\n // find out which table to store record on\n switch (currentDept) {\n // library\n case 'lib':\n transaction = db.transaction(['libraryOS'], 'readwrite');\n objectStore = transaction.objectStore('libraryOS');\n break;\n\n // sports\n case 'sps':\n transaction = db.transaction(['sportsOS'], 'readwrite');\n objectStore = transaction.objectStore('sportsOS');\n break;\n\n // dorm\n case 'drm':\n transaction = db.transaction(['dormOS'], 'readwrite');\n objectStore = transaction.objectStore('dormOS');\n break;\n\n // dept\n case 'dep':\n transaction = db.transaction(['deptOS'], 'readwrite');\n objectStore = transaction.objectStore('deptOS');\n break;\n\n default:\n console.log('Wrong department value found!');\n return;\n break;\n }\n\n // add record to correct OS\n let request = objectStore.add(newRecord);\n request.onsuccess = () => {\n // clear form / close modal\n console.log('Add request successful.');\n }\n \n transaction.oncomplete = () => {\n console.log('Succesfully added new record.');\n // display data\n displayTransactions();\n }\n\n transaction.onerror = () => {\n console.log('Error! Cannot add new record!' + request.error);\n }\n\n}", "title": "" }, { "docid": "e770ca15af6ae08cddc58afe916e6c7b", "score": "0.5103971", "text": "function getTasks() {\n let tasks;\n if (localStorage.getItem('tasks') === null) {\n tasks = [];\n } else {\n tasks = JSON.parse(localStorage.getItem('tasks'));\n }\n tasks.forEach(task => {\n createTaskComponent(task);\n });\n}", "title": "" }, { "docid": "c5b7c542b5ea870dfc297c26cf927719", "score": "0.5102558", "text": "async getServiceDetails() {\n let { serviceBasicInfo, finalAmount, prevFinalAmount, clusterData, serviceTask, service, tasks, serviceTermAndCondition, attachments, servicePayment, taxStatus, facilitationCharge } = this.state;\n if (this.serviceId) {\n service = await fetchServiceActionHandler(this.serviceId);\n if (service) {\n tasks = [];\n let { state, city, community } = service;\n serviceBasicInfo = {\n duration: service.duration,\n profileId: service.profileId,\n name: service.name,\n displayName: service.displayName,\n noOfSession: service.noOfSession,\n sessionFrequency: service.sessionFrequency,\n isActive: service.isActive,\n validTill: service.validTill,\n cluster: service.cluster,\n isBeSpoke: service.isBeSpoke,\n isApproved: service.isApproved,\n isReview: service.isReview,\n isLive: service.isLive,\n city: service.city,\n state: service.state,\n serviceExpiry: service.serviceExpiry,\n community: service.community\n };\n finalAmount = service.finalAmount;\n prevFinalAmount = service.finalAmount;\n tasks = _.cloneDeep(service.tasks) || [];\n tasks.sessions = _.cloneDeep(service.tasks.sessions) || [];\n serviceTask.serviceOptionTasks = [];\n let attachmentDetails = [];\n serviceTask.tasks = service.tasks || [];\n if (serviceTask.serviceTaskDetails && serviceTask.serviceTaskDetails.length > 0) {\n serviceTask.tasks = _.intersectionBy(serviceTask.serviceTaskDetails, service.tasks, 'id');\n serviceTask.serviceTaskDetails.forEach((task, key) => {\n if (service.tasks.map((data) => data.id).indexOf(task.id) === -1) {\n serviceTask.serviceOptionTasks.push(task);\n }\n });\n serviceTask.tasks.forEach((task) => {\n if (task.attachments && task.attachments.length > 0) {\n task.attachments.forEach((attachment) => {\n attachmentDetails.push(attachment)\n });\n }\n });\n }\n if (service.termsAndCondition) {\n serviceTermAndCondition = _.omit(service.termsAndCondition, '__typename');\n }\n if (service.facilitationCharge) {\n facilitationCharge = _.cloneDeep(service.facilitationCharge);\n }\n if (service.payment) {\n servicePayment = _.cloneDeep(service.payment);\n servicePayment.isTaxInclusive = servicePayment.isTaxInclusive ? true : false;\n taxStatus = servicePayment.isTaxInclusive ? 'taxinclusive' : 'taxexclusive';\n }\n attachments = _.cloneDeep(attachmentDetails);\n if (state && state.length > 0) {\n let states = [];\n state.forEach((data) => {\n states.push(data.id);\n });\n clusterData.state = states;\n }\n if (city && city.length > 0) {\n let cities = [];\n city.forEach((data) => {\n cities.push(data.id);\n });\n clusterData.chapters = cities;\n }\n if (community && community.length > 0) {\n let communities = [];\n community.forEach((data) => {\n communities.push(data.id);\n });\n clusterData.community = communities;\n }\n }\n this.props.serviceId ? this.props.serviceInfo(service) : \"\";\n }\n var validTillDate = Date.parse(serviceBasicInfo.validTill);\n var currentDate = new Date();\n let remainingDate = Math.floor((validTillDate - currentDate) / (1000 * 60 * 60 * 24));\n remainingDate = isNaN(remainingDate) ? '' : remainingDate;\n this.setState({\n serviceBasicInfo: serviceBasicInfo,\n daysRemaining: remainingDate,\n clusterData: clusterData,\n serviceTask: serviceTask,\n serviceTermAndCondition: serviceTermAndCondition,\n attachments: attachments,\n service: service,\n tasks: tasks,\n facilitationCharge: facilitationCharge,\n servicePayment: servicePayment,\n taxStatus: taxStatus,\n finalAmount: finalAmount,\n prevFinalAmount: prevFinalAmount\n }, () => {\n this.getUserProfile()\n\n });\n }", "title": "" }, { "docid": "697de86f06c15b843cc37b532067282f", "score": "0.5102449", "text": "function getTasks(){\n let tasks;\n // check local storage for any tasks\n if (localStorage.getItem('tasks') === null){\n tasks = [];\n } else {\n tasks = JSON.parse(localStorage.getItem('tasks'));\n }\n \n // loop through each task in the array\n tasks.forEach(function (task){\n const li = document.createElement('li');\n li.className = 'collection-item';\n li.appendChild(document.createTextNode(task));\n const link = document.createElement('a');\n link.className = 'delete-item secondary-content';\n link.innerHTML = '<i class=\"fa fa-remove\"></i>';\n li.appendChild(link);\n taskList.appendChild(li);\n });\n}", "title": "" }, { "docid": "c5a7cd8b9f67b297b9b94530a0e6a75f", "score": "0.5093037", "text": "async getTasks({ commit, dispatch }, listId) { //listId will need to be a listId\n let res = await api.get('lists/' + listId + '/tasks')\n commit('setTasks', {\n listId: listId,\n tasks: res.data\n })\n }", "title": "" }, { "docid": "791d09608e2a299023caa1176e09145c", "score": "0.50912917", "text": "function getTasks(){\n let tasks;\n \n if(localStorage.getItem('tasks') === null) {\n tasks = []\n }else{\n tasks = JSON.parse(localStorage.getItem('tasks'))\n }\n tasks.forEach(function(item){\n let li = document.createElement('li')\n li.className = 'collection-item'\n li.appendChild(document.createTextNode(item))\n let a = document.createElement('a')\n a.className = 'delete-item secondary-content'\n let i = document.createElement('i')\n i.className = ' fa fa-remove'\n a.appendChild(i)\n li.appendChild(a)\n taskList.appendChild(li)\n })\n}", "title": "" }, { "docid": "33c2c8e45ef09ff9471ea99e89f7588c", "score": "0.5090481", "text": "function finishedIndexedDB(){\n getCollection('imageSaved', (result)=>{\n createImages(result, collection);\n searchImages();\n });\n\n tabs.addEventListener('click', e=>{\n let selectedCollection = document.querySelector('.selected')\n selectedCollection.classList.remove('selected');\n e.target.classList.add('selected');\n presetImages.style.display = \"none\";\n imageCollection.style.display = \"none\";\n asteroidCollection.style.display = \"none\";\n videoCollection.style.display = \"none\";\n switch(e.target.id){\n case \"imageCollectionTitle\":\n imageCollection.style.display = \"block\";\n search.style.display = \"block\";\n break;\n case \"asteroidCollectionTitle\":\n asteroidCollection.style.display = \"block\";\n search.style.display = \"none\";\n //loads object store if not loaded already\n if(!asteroidsLoaded){\n getCollection('asteroidsSaved', (result)=>{\n console.log('asteroids loaded');\n displayAsteroids(result);\n })\n asteroidsLoaded = true;\n }\n \n break;\n case \"presetCollectionTitle\":\n presetImages.style.display = \"block\";\n search.style.display = \"block\";\n if(!presetLoaded){\n getCollection('presetImages', (result)=>{\n createImages(result, presetCollection);\n searchImages();\n });\n presetLoaded = true;\n }\n break;\n case \"videoCollectionTitle\":\n videoCollection.style.display = \"block\";\n search.style.display = \"none\";\n if(!videosLoaded){\n getCollection('videoSaved', (result)=>{\n console.log('videos loaded');\n displayVideo(result);\n });\n videosLoaded = true;\n }\n \n }\n });\n\n}", "title": "" }, { "docid": "ddbc2885a99b39ec37dc21fd9f78d5ef", "score": "0.5087497", "text": "loadTasks(cat) {\n\t\t\n\t\t//\tGet the required array from the storage\n\t\tvar category = this.retrieveTasks(cat);\n\t\t\n\t\t//\tOverwrite the array\n\t\tthis[cat + 'Tasks'] = category;\n\t\t\n\t\t//\tCall the UI function to write in html elements\n\t\tUI.writeTaskCategory(category, cat);\n\t}", "title": "" }, { "docid": "d17d10fcdfdb7a8e5de9a688c962fce8", "score": "0.5086062", "text": "async addArticlesFromStorage() {\n let storedInfo = await Popup.storage.get(null);\n Object.keys(storedInfo).forEach((articleId) => {\n if (!/^[0-9]+$/.test(articleId)) {\n console.debug(\"Biet-O-Matic: Skipping invalid stored articleId=%s\", articleId);\n return;\n }\n let info = storedInfo[articleId];\n info.articleId = articleId;\n //console.debug(\"Biet-O-Matic: addArticlesFromStorage(%s) info=%s\", articleId, JSON.stringify(info));\n // add article if not already in table\n if (this.getRow(\"#\" + articleId).length < 1) {\n let article = new Article(info);\n // add article to table asynchronously to avoid UI blocking\n article\n .init()\n .then((a) => {\n if (Popup.disableGroups === false || article.articleGroup == null) this.addArticle(a);\n })\n .catch((e) => {\n console.log(\"Biet-O-Matic: addArticlesFromStorage() Failed to init article %s: %s\", article.articleId, e);\n });\n }\n });\n }", "title": "" }, { "docid": "5e95298fe0ba553186d32aed6a0a2b32", "score": "0.5085515", "text": "function getPurchaseRecords() {\n\n\n fetch('/purchaserecords')\n .then(function(response) {\n return response.json()\n })\n .then(purchaseData => {\n let count = 0;\n purchaseData.forEach(purchase => {\n localStorage.setItem(`purchase #${count}`, purchase);\n count++;\n })\n })\n}", "title": "" }, { "docid": "6a338295f160178bb0a9b42fd98a190d", "score": "0.50825673", "text": "createPageStores() {\n\t\tvar _this = this;\n\t\t/** create file stores */\n\t\t_this.FileStores['rssValidPages'] = new FS.Collection(\"rss_valid_files\", {\n\t\t\tstores: [new FS.Store.FileSystem(\"rss_valid_files\", {\n\t\t\t\t\tpath: \"../../../../../../crawled_data/rss/passed\",\n\t\t\t\t\tmaxSize: 536870912,\n\t\t\t\t\tfilter: {\n\t\t\t\t\t\tallow: {\n\t\t\t\t\t\t\tcontentTypes: ['text/html'],\n\t\t\t\t\t\t\textensions: ['js', 'html']\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})],\n\t\t});\n\n\t\t_this.FileStores['rssFailedPages'] = new FS.Collection(\"rss_failed_files\", {\n\t\t\tstores: [new FS.Store.FileSystem(\"rss_failed_files\", {\n\t\t\t\t\tpath: \"../../../../../../crawled_data/rss/failed\",\n\t\t\t\t\tmaxSize: 536870912,\n\t\t\t\t\tfilter: {\n\t\t\t\t\t\tallow: {\n\t\t\t\t\t\t\tcontentTypes: ['text/html'],\n\t\t\t\t\t\t\textensions: ['js', 'html']\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})],\n\t\t});\n\n\t\t_this.FileStores['wikiValidPages'] = new FS.Collection(\"wiki_valid_files\", {\n\t\t\tstores: [new FS.Store.FileSystem(\"wiki_valid_files\", {\n\t\t\t\t\tpath: \"../../../../../../crawled_data/wiki/passed\",\n\t\t\t\t\tmaxSize: 536870912,\n\t\t\t\t\tfilter: {\n\t\t\t\t\t\tallow: {\n\t\t\t\t\t\t\tcontentTypes: ['text/html'],\n\t\t\t\t\t\t\textensions: ['js', 'html']\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})],\n\t\t});\n\n\t\t_this.FileStores['wikiFailedPages'] = new FS.Collection(\"wiki_failed_files\", {\n\t\t\tstores: [new FS.Store.FileSystem(\"wiki_failed_files\", {\n\t\t\t\t\tpath: \"../../../../../../crawled_data/wiki/failed\",\n\t\t\t\t\tmaxSize: 536870912,\n\t\t\t\t\tfilter: {\n\t\t\t\t\t\tallow: {\n\t\t\t\t\t\t\tcontentTypes: ['text/html'],\n\t\t\t\t\t\t\textensions: ['js', 'html']\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})],\n\t\t});\n\n\t\t_this.FileStores['websiteValidPages'] = new FS.Collection(\"website_valid_files\", {\n\t\t\tstores: [new FS.Store.FileSystem(\"website_valid_files\", {\n\t\t\t\t\tpath: \"../../../../../../crawled_data/website/passed\",\n\t\t\t\t\tmaxSize: 536870912,\n\t\t\t\t\tfilter: {\n\t\t\t\t\t\tallow: {\n\t\t\t\t\t\t\tcontentTypes: ['text/html'],\n\t\t\t\t\t\t\textensions: ['js', 'html']\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})],\n\t\t});\n\n\t\t_this.FileStores['websiteFailedPages'] = new FS.Collection(\"website_failed_files\", {\n\t\t\tstores: [new FS.Store.FileSystem(\"website_failed_files\", {\n\t\t\t\t\tpath: \"../../../../../../crawled_data/website/failed\",\n\t\t\t\t\tmaxSize: 536870912,\n\t\t\t\t\tfilter: {\n\t\t\t\t\t\tallow: {\n\t\t\t\t\t\t\tcontentTypes: ['text/html'],\n\t\t\t\t\t\t\textensions: ['js', 'html']\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})],\n\t\t});\n\n\n\t\t/** create file store permissions */\n\t\t_this.FileStores['rssValidPages'].allow({\n\t\t\t'insert' : function() {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t});\n\n\t\t_this.FileStores['rssFailedPages'].allow({\n\t\t\t'insert' : function() {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t});\n\n\t\t_this.FileStores['wikiValidPages'].allow({\n\t\t\t'insert' : function() {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t});\n\n\t\t_this.FileStores['wikiFailedPages'].allow({\n\t\t\t'insert' : function() {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t});\n\n\t\t_this.FileStores['websiteValidPages'].allow({\n\t\t\t'insert' : function() {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t});\n\n\t\t_this.FileStores['websiteFailedPages'].allow({\n\t\t\t'insert' : function() {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t});\n\n\t}", "title": "" }, { "docid": "1954db930bceef4737bc2667fd0d99d7", "score": "0.5080226", "text": "function getTasks() {\n // var storedTaskNine = localStorage.getItem(\"nineAM\");\n // console.log(storedTaskNine);\n\n // if (storedTaskNine !== null) {\n $(\"#taskNine\").text(localStorage.getItem(\"taskNine\"));\n $(\"#taskTen\").text(localStorage.getItem(\"taskTen\"));\n $(\"#taskEleven\").text(localStorage.getItem(\"taskEleven\"));\n // }\n}", "title": "" }, { "docid": "7a644524e2ce8b86c1e4dc9814084f66", "score": "0.50770414", "text": "function getTask(){\n \n \n let tasks;\n\n if (localStorage.getItem('tasks') === null) {\n tasks = [];\n }\n\n else{\n \n tasks = JSON.parse(localStorage.getItem('tasks'));\n\n }\n\n tasks.forEach(task =>{\n\n let li = document.createElement('li');\n\n li.appendChild(document.createTextNode(task + \" \"));\n let aTag = document.createElement(\"a\");\n aTag.setAttribute(\"href\", \"#\");\n aTag.appendChild(document.createTextNode(\"x\"));\n li.appendChild(aTag);\n taskList.appendChild(li);\n \n });\n}", "title": "" }, { "docid": "3137e63d730eeef6d44dae4464214d0f", "score": "0.5075917", "text": "function loadAllTasksFromLS() {\r\n // Check if tasks are present in LS\r\n let tasks = localStorage.getItem(\"tasks\");\r\n if (!tasks) {\r\n return;\r\n }\r\n let tasksArr = JSON.parse(localStorage.getItem(\"tasks\"));\r\n\r\n tasksArr.forEach((item) => createItem(item));\r\n}", "title": "" }, { "docid": "a9bd395918871cf20a5842896aa31c28", "score": "0.50758725", "text": "function TodoStorage() {\n }", "title": "" }, { "docid": "d791c45920ac7d0d8f6d2ad14c0acf87", "score": "0.507124", "text": "function fetchTasks(){\n var urlParams = new URLSearchParams(window.location.search);\n let id = urlParams.get('id');\n $.post('query-producte-individual.php', {id: id}, function(response){\n producte = JSON.parse(response);\n producteInfo(producte);\n })\n }", "title": "" }, { "docid": "123661ea5e9c61d7a7a07f02b0a05b3e", "score": "0.50673956", "text": "function addTask() {\n\n for (let i = 0; i <= tasks.length; i++) {\n taskId = i;\n }\n\n newTask = {\n taskId: taskId,\n taskName: document.getElementById(\"taskName\").value,\n taskBody: document.getElementById(\"taskBody\").value,\n startDate: document.getElementById(\"startDate\").value,\n endDate: document.getElementById(\"endDate\").value,\n projectId: currentProject.projectId,\n userId: currentUser.id,\n listName:activeList.name\n };\n\n tasks.push(newTask);\n\n localStorage.setItem(\"tasks\", JSON.stringify(tasks));\n\n location.href = \"taskoverview.html\";\n}", "title": "" }, { "docid": "e14c35f3e4ddc3f18273228fb06353a6", "score": "0.50640184", "text": "async function main () {\n // get databaseConnection from db, not using the mongo instance.\n mongo = await db.getConnection()\n\n if (!mongo) {\n return\n }\n const sweCoursesScraper = new LNUCourses('https://lnu.se/utbildning/sok-program-eller-kurs/?educationtype=Kurs&level=Grund%C2%ADniv%C3%A5&s=alphabeticallyasc', true)\n const engCoursesScraper = new LNUCourses('https://lnu.se/en/education/exchange-studies/courses-and-programmes-for-exchange-students/', false)\n\n await saveSwedishCourses(await sweCoursesScraper.getCourses(fetchPercentage, 'Fetching Swedish courses'))\n\n await saveEnglishCourses(await engCoursesScraper.getCourses(fetchPercentage, 'Fetching English Courses'))\n\n console.log('DONE')\n\n process.exit(0)\n}", "title": "" }, { "docid": "1ef3c38f099e52a67a031dd52e8e7d63", "score": "0.50630534", "text": "function getTask() {\n\tlet tasks = JSON.parse(localStorage.getItem('tasks'));\n\tlet taskView = document.querySelector('#tasks');\n\n\ttaskView.innerHTML = '';\n\n\tfor (let i = 0; i < tasks.length; i++) {\n\n\t\tlet title = tasks[i].title;\n\t\tlet description = tasks[i].description;\n\n\t\tlistItem = `\n\t\t<div class=\"card my-3\">\n\t\t\t<div class=\"card-body\">\n\t\t\t\t<h4>${title}</h4>\n\t\t\t\t<p>${description}</p>\n\t\t\t\t<a class=\"btn btn-danger\" onClick=\"deleteTask('${title}')\">delete</a>\n\t\t\t</div>\n\t\t</div>`\n\t\ttaskView.insertAdjacentHTML('afterbegin', listItem);\n\t}\n}", "title": "" }, { "docid": "e8f587db18828ec9dcf15de8e4ad302a", "score": "0.50626314", "text": "function storeItems() {\n DB.fetchItems(function(cursor, number) {\n if (cursor) {\n localStoreItem({ ...cursor.value });\n } else if (number < 0) {\n // TODO: should store_cb_queue be cleared here first?\n setStoreItemsComplete();\n } else {\n const item_data = pageItems().map(item => item.data);\n DB.storeItems(item_data, setStoreItemsComplete);\n }\n });\n }", "title": "" }, { "docid": "22e6646319bf018cefbc1bf02f62c708", "score": "0.5061846", "text": "async store ({ request, response }) {\n\n }", "title": "" }, { "docid": "28ee0c6a3f61f671e10a81370919c753", "score": "0.5041841", "text": "addTask(id, task){\n let foundList = _store.State.lists.find(task=>task.id==id);\n foundList.tasks.push(task);\n _store.saveState();\n }", "title": "" }, { "docid": "7e2897bc8e95810268a3cfec343eea29", "score": "0.5038486", "text": "function retrieveProducts() {\n if (localStorage.length === 0) {\n console.log('there is no item with this name');\n return;\n }\n for (var i = 0; i < products.length; i++) {\n products[i].setItBack();\n }\n // call dispaly chart function to dispaly the stored data\n displayStatisticsChart();\n}", "title": "" } ]
c8868e225d3ceb5ef96ce16000753ee0
istanbul ignore next: optional argument is not a branch statement
[ { "docid": "0ffb679119b8c6cab4449b2f10bc319a", "score": "0.0", "text": "function MDCTopAppBarBaseFoundation(adapter){var _this=_super.call(this,__WEBPACK_IMPORTED_MODULE_0_tslib__[\"a\" /* __assign */]({},MDCTopAppBarBaseFoundation.defaultAdapter,adapter))||this;_this.navClickHandler_=function(){return _this.adapter_.notifyNavigationIconClicked();};return _this;}", "title": "" } ]
[ { "docid": "4e0cc5e8cffb6d70c162b9a12d7f51e7", "score": "0.56220806", "text": "enterFunctionArgOptional(ctx) {\n\t}", "title": "" }, { "docid": "1908f8d3fb95dba74226e4b32797420d", "score": "0.5552567", "text": "function bar(param) {\n if (param)\n throw 'bar';\n else\n return 'foo';\n}", "title": "" }, { "docid": "e414582afaf958e4e4fb8268b0c3f955", "score": "0.5519164", "text": "function BEQ() {\n // console.log('BEQ')\n branch(flagZ);\n }", "title": "" }, { "docid": "9cbac8f15f7eba939a41cc7cddeb8a36", "score": "0.54656047", "text": "function test(label, body) {\n if (!body()) console.log(`Failed: ${label}`);\n}", "title": "" }, { "docid": "28ccf931cc62144e3370555bc5ab6c3b", "score": "0.5421222", "text": "exitFunctionArgOptional(ctx) {\n\t}", "title": "" }, { "docid": "210862dbd8b37e0301cb7d72d5307aed", "score": "0.54180044", "text": "function test(label, body) {\n if (!body()) {\n console.log(`Failed: ${label}`);\n }\n}", "title": "" }, { "docid": "120261ec1531760fbab24b0eb829b6f5", "score": "0.53962666", "text": "function astboolop() {\n\t\tast.addNode(foundTokensCopy[counter][0], 'branch');\n\t\tcounter++;\n\n\n}", "title": "" }, { "docid": "7a7625bca219bf233dd407624eb8ec5b", "score": "0.53486073", "text": "function arg(a,b) {\n if (a !== undefined || null) {\n return a;\n } else {\n return b;\n }\n}", "title": "" }, { "docid": "351e00f1ed3fee89e1d07daa62eba8e4", "score": "0.5300308", "text": "check() {}", "title": "" }, { "docid": "351e00f1ed3fee89e1d07daa62eba8e4", "score": "0.5300308", "text": "check() {}", "title": "" }, { "docid": "250e227c1255ce77f5f6d0de1fd0607a", "score": "0.52802366", "text": "function BPL() {\n branch(!flagN);\n }", "title": "" }, { "docid": "33a646cbf74d8a5e7e0e7706abe6f8f6", "score": "0.5262259", "text": "function assert(cond) {\n\t}", "title": "" }, { "docid": "bdb9dba95f088d4d777af1ea746b5ec4", "score": "0.52573526", "text": "function BCS() {\n branch(flagC);\n }", "title": "" }, { "docid": "b5483b9d18c695e522b32c30ecf1ac07", "score": "0.52510315", "text": "function a(b) {\n if (b < 10) {\n return 2;\n }    \n else {\n return 4;\n }\n console.log(b);\n}", "title": "" }, { "docid": "4f561ec2ce2fdb0c3c07499061edcae0", "score": "0.5228818", "text": "exitExpressionOrDefault(ctx) {\n\t}", "title": "" }, { "docid": "110add5a8de423d7d7177ad7bdb0544a", "score": "0.5214939", "text": "function foo(bar){\n\tif (bar){\n\t\tlet baz = bar;\n\t\tif (baz){\n\t\t\tlet bam = baz;\n\t\t}\n\t\tconsole.log(bam); //Error\n\t}\n\tconsole.log(baz); //Error\n}", "title": "" }, { "docid": "a557c08fac4ef3a0bfc3980020d6c74a", "score": "0.5202157", "text": "function unknownFn(arg) {\n console.log(\"%s is not a valid option!\", arg);\n return;\n}", "title": "" }, { "docid": "558d446da0d96e26c3b8d3c8f5717f9f", "score": "0.51626205", "text": "function foo(a, b, c) {\n switch (a) {\n case 1: \n return b + c;\n break;\n default:\n return a * b + c;\n }\n\n throw new Error(\"This should never happen\");\n}", "title": "" }, { "docid": "47c22a9894aa7baf27dbb408e0be86a6", "score": "0.51620185", "text": "doSomething(params = {}) {\n if (!!params.id) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "a68eed76c2b4c631ac475d57b746d2ab", "score": "0.5157829", "text": "function a(b){\r\n if(b<10) {\r\n return 2;\r\n }\r\n    else {\r\n return 4;\r\n }\r\n console.log(b);\r\n}", "title": "" }, { "docid": "ed968ff1beb25cf98b6ee447842fae9f", "score": "0.5157087", "text": "visitTest_nocond(ctx) {\r\n console.log(\"visitTest_nocond\");\r\n return this.visitChildren(ctx);\r\n }", "title": "" }, { "docid": "98963da9211f6217677a4ce181600b05", "score": "0.51371413", "text": "function a(b){\n if(b<10) {\n return 2;\n }\n    else {\n return 4;\n }\n console.log(b);\n}", "title": "" }, { "docid": "98963da9211f6217677a4ce181600b05", "score": "0.51371413", "text": "function a(b){\n if(b<10) {\n return 2;\n }\n    else {\n return 4;\n }\n console.log(b);\n}", "title": "" }, { "docid": "0f56504cb13170c7e91450877cb8d5e6", "score": "0.5135509", "text": "function some_func(param1, param2=\"defaule_value\", ...rest) {\n if (param2 == null) \n return; // Same as return undefined\n return \"some_value\"; // Note: Return and the value must be on the same line, otherwise it returns undefined without computation value\n}", "title": "" }, { "docid": "ff557b3d44bc8a6d752abe6e272a9f19", "score": "0.5131572", "text": "visitIf_stmt(ctx) {\r\n console.log(\"visitIf_stmt\");\r\n return this.visitChildren(ctx);\r\n }", "title": "" }, { "docid": "9974dd95a8fa5e97d91718c99f65f83b", "score": "0.5094474", "text": "test () {\n throw new Error('Canary test not implemented')\n }", "title": "" }, { "docid": "bde7276d7e1df71762f51a64bf568082", "score": "0.5094266", "text": "function a(b){\n if(b<10) {\n return 2;\n }\n else {\n return 4;\n }\n console.log(b);\n}", "title": "" }, { "docid": "a541c11537c3c2e52848f836d681a15f", "score": "0.50916624", "text": "function bar(o) {if(!o)for(;;);}", "title": "" }, { "docid": "bf4d2880bdfa9eea406bb016e4455187", "score": "0.50771606", "text": "function exemplo02(a = 1, b = 1){\n return a + b\n}", "title": "" }, { "docid": "7fa09e4553eaede9dbd0dbb2e673394c", "score": "0.5065409", "text": "function Qa(a,b,c){if(!a){throw t(\"areq\",\"Argument '{0}' is {1}\",b||\"?\",c||\"required\")}return a}", "title": "" }, { "docid": "990966c55bdb2e128b684aed6d2a8892", "score": "0.5059049", "text": "function If(){}", "title": "" }, { "docid": "db9387c072c9030ff9250fa66a7594f4", "score": "0.5047068", "text": "conflicts() {\n }", "title": "" }, { "docid": "db9387c072c9030ff9250fa66a7594f4", "score": "0.5047068", "text": "conflicts() {\n }", "title": "" }, { "docid": "fd12e60984574e57d42f09f552942885", "score": "0.5042954", "text": "function argumentPractice(shouldIRun) {\n\n if (shouldIRun === 10) {\n console.log(\"This function ran.\");\n }\n\n}", "title": "" }, { "docid": "867b9282c96f119f8e4c892e286fa944", "score": "0.50413007", "text": "exitElseExpression(ctx) {\n\t}", "title": "" }, { "docid": "c364ce2ee1cce3a85715e3b343986a41", "score": "0.5039181", "text": "function func(codeId) {\n\tswitch (codeId) {\n\t\tdefault:\n\t\t\tconsole.log(\"error: No codeId defined\");\n\t\t\tbreak;\n\t}\n}", "title": "" }, { "docid": "5cb7152ea096892f9849c974c2f5032f", "score": "0.50374067", "text": "visitLambdef_nocond(ctx) {\r\n console.log(\"visitLambdef_nocond\");\r\n return this.visitChildren(ctx);\r\n }", "title": "" }, { "docid": "5b5a947867641beb70e00f9ceec79d05", "score": "0.5014717", "text": "function BNE() {\n // console.log('BNE')\n branch(!flagZ);\n }", "title": "" }, { "docid": "a4133046441125efb5e410d00694f90a", "score": "0.50128996", "text": "exitExpressionOptional(ctx) {\n\t}", "title": "" }, { "docid": "e6a8317c23003cf6482c187b8aa7de63", "score": "0.50103813", "text": "function test1(v) {\n if (v) {\n if (v) {\n assertEq(v, v);\n } else {\n assertEq(0, 1);\n }\n } else {\n if (v) {\n assertEq(0, 1);\n } else {\n assertEq(v, v);\n }\n }\n assertEq(v, v);\n}", "title": "" }, { "docid": "1e5e2061b900397a433c5a319486be24", "score": "0.5009896", "text": "function a(b){\n\tif(b<10) {\n\t\treturn 2;\n\t}\n\telse {\n\t\treturn 4;\n\t}\n\tconsole.log(b);\n}", "title": "" }, { "docid": "61b93ee94fcfadd6aa9d28fc472cc1e2", "score": "0.5008985", "text": "function g(a) {\r\n if (a) {\r\n return a;\r\n }\r\n else {\r\n return 99;\r\n }\r\n}", "title": "" }, { "docid": "ea077c0f8ce6be69d77074b206e831cc", "score": "0.49918813", "text": "function isPullRequest(v) {\n return v.targetBranches !== undefined;\n }", "title": "" }, { "docid": "d88b911e0eb01e89262419d0629d6522", "score": "0.4984636", "text": "function doStuff(arg)\r\n {\r\n }", "title": "" }, { "docid": "fdd42d0b9a7997a60c05ae9fb4b01dc0", "score": "0.49791968", "text": "function foo(param = \"no\") {\n return \"yes\";\n}", "title": "" }, { "docid": "aff7577538413fb72dde3379435e6bc7", "score": "0.49588692", "text": "function foo() {\n if (x) {\n return x;\n }\n\n return y;\n}", "title": "" }, { "docid": "2c29e2d9dd4e0d04f26396581ba1774f", "score": "0.4955621", "text": "function teste(a,b,c,d) {\n if (a!==1){\n console.log('Erro em a');\n return;\n }\n if (b!==1) {\n console.log('Erro em b');\n return;\n }\n if (c!==1) {\n console.log('Erro em c');\n return;\n }\n if (d!==1) {\n console.log('Erro em d');\n return;\n }\n console.log('Ok');\n}", "title": "" }, { "docid": "e87c463d91dd3d1209ce952ae6bcde19", "score": "0.4954645", "text": "visitBlank(ctx) {\r\n return undefined;\r\n }", "title": "" }, { "docid": "0b63bc6f0cc34b976cfce68651b41463", "score": "0.49522045", "text": "function switchSideEffectTest() {\n switch(true) {\n case console.log(\"first\"):\n break;\n case console.log(\"second\") == undefined:\n console.log(\"fourth\");\n break;\n case console.log(\"third\"):\n break;\n }\n}", "title": "" }, { "docid": "e622063554c0186c2a4691f0b1a268c1", "score": "0.49498114", "text": "enterElseExpression(ctx) {\n\t}", "title": "" }, { "docid": "b989bc9a6872787cef085225227b9dc2", "score": "0.49466714", "text": "function ya(a,b,c){return null!=a?a:null!=b?b:c}", "title": "" }, { "docid": "190749add65605007b8dbbb8bbe032b3", "score": "0.4945858", "text": "function f(a, b) {\n if (typeof a === \"undefined\") {\n return b;\n }\n return a;\n }", "title": "" }, { "docid": "78855f7d933e9c0853a37715de07e4d0", "score": "0.4945222", "text": "function mytest(){\r\n if(){}\r\n}", "title": "" }, { "docid": "5a11f216b7044fa9f5655cbd17b25337", "score": "0.49445954", "text": "function ok$1() {\n return true\n}", "title": "" }, { "docid": "6e4fdd46a9f34a0c8de2b39128019b28", "score": "0.4944239", "text": "enterExpressionOrDefault(ctx) {\n\t}", "title": "" }, { "docid": "3655a0da41666064af262b7e9181bedd", "score": "0.49420688", "text": "function doSomething(arg1){ //The logical OR could also be used to set a default value for function argument.\n arg1 = arg1 || 10; // arg1 will have 10 as a default value if it’s not already set\n}", "title": "" }, { "docid": "2fa2770c5aed2907f948ff7ed8a99191", "score": "0.49394625", "text": "function createArgumentGuard(param, types) {\n if (types.indexOf('any') > -1 || types.indexOf('mixed') > -1) {\n return null;\n }\n return t.ifStatement(createIfTest(param, types), t.throwStatement(t.newExpression(t.identifier('TypeError'), [t.binaryExpression('+', t.literal('Value of argument \\'' + param.name + '\\' violates contract, expected ' + createTypeNameList(types) + ' got '), createReadableTypeName(param))])));\n }", "title": "" }, { "docid": "cb6e4b445bff4f23bb16230f4d86a82c", "score": "0.49362805", "text": "function ea(a,b,c){if(!a)throw hd(\"areq\",\"Argument '{0}' is {1}\",b||\"?\",c||\"required\");return a}", "title": "" }, { "docid": "5d224c97090dd5cd9f8f4d0cd6541770", "score": "0.49331045", "text": "static m(a, b) { return true }", "title": "" }, { "docid": "dd80c74b80f9f027075548fa86b1a468", "score": "0.49301663", "text": "function checkAndSetOpt(){\n}", "title": "" }, { "docid": "842be056e09776376192c0e2a8bb2982", "score": "0.4929995", "text": "function doIF(ast, env){\n let\n a3 = ast[3],\n test = compute(ast[1], env);\n return !std.isFalsy(test) ? ast[2] : typeof(a3) != \"undefined\"? a3 : null }", "title": "" }, { "docid": "0b6aea78ea3c4e16de7f711bb1d2c793", "score": "0.49236095", "text": "function IF_ELSE_THEN(test, actionIfTrue, actionIfFalse, then) {\n test.apply();\n let arg1 = stack.pop();\n if (arg1 === -1) {\n actionIfTrue.apply();\n } else {\n actionIfFalse.apply();\n }\n then.apply();\n return stack;\n}", "title": "" }, { "docid": "0fd428032b7e47b189d6fc39b831a0a4", "score": "0.4914901", "text": "function BVS() {\n branch(flagV);\n }", "title": "" }, { "docid": "cdf3656e598f65eabd7da608713b90bf", "score": "0.49135178", "text": "function testStrictNotEqual(a, b) {\n // Only Change Code Below this Line\n if (undefined) {\n // Only Change Code Above this Line\n\n return \"Not Equal\";\n }\n return \"Equal\";\n}", "title": "" }, { "docid": "d92f608043ed63eea23ce2461b3041b3", "score": "0.49024647", "text": "exitElsePart(ctx) {\n\t}", "title": "" }, { "docid": "e0203d01aa6e651e53e5026d7b269304", "score": "0.48884413", "text": "exitBitOrExpression(ctx) {\n\t}", "title": "" }, { "docid": "43773414701070e3c940d99cba733ce7", "score": "0.48791635", "text": "function MyFunction3(a, b) {\n if(b == undefined) {\n b = 0;\n }\n return a + b;\n}", "title": "" }, { "docid": "2716809d94500ad3e4e80b9b7be5a5d2", "score": "0.48789102", "text": "inputWasNotAcceptedByBranch() {\n return this.getConfigurationStatus() === \"stuck\"\n }", "title": "" }, { "docid": "78fb167d4f5f170d1a835e0a99caae3f", "score": "0.48775527", "text": "exitWildFuncOptional(ctx) {\n\t}", "title": "" }, { "docid": "7a4f4c51b5b51ec9b0152d3b9013ed18", "score": "0.48741907", "text": "function _10_5_7_b_3_fun() {\n arguments[1] = 12;\n return arguments[0] === 30 && arguments[1] === 12;\n }", "title": "" }, { "docid": "9e09620dd0b1e593fc2d48f5d120911b", "score": "0.48701072", "text": "function processComplicatedArguments(args) {\n console.log(y(\"Nothing here for now\"));\n}", "title": "" }, { "docid": "9058114e2991cae12f44debbd444dc27", "score": "0.48626676", "text": "function assertArg(arg,name,reason){if(!arg){throw ngMinErr('areq',\"Argument '{0}' is {1}\",name||'?',reason||\"required\");}return arg;}", "title": "" }, { "docid": "8df7d7d50f2caf1b987b0b1ed8c48330", "score": "0.4861242", "text": "function is_else (line) {\n\tvar pre = line - 1;\n\t\n\tif(!$ebx[pre].cond) {\n\t\treturn true;\n\t}\n\t\n\treturn false;\n}", "title": "" }, { "docid": "d8bb6839f1c2ec9214d7dcefa6ad92ff", "score": "0.48607567", "text": "function assert(condition,message){/* istanbul ignore if */if(!condition){throw new Error('ASSERT: '+message);}}", "title": "" }, { "docid": "d8bb6839f1c2ec9214d7dcefa6ad92ff", "score": "0.48607567", "text": "function assert(condition,message){/* istanbul ignore if */if(!condition){throw new Error('ASSERT: '+message);}}", "title": "" }, { "docid": "d8bb6839f1c2ec9214d7dcefa6ad92ff", "score": "0.48607567", "text": "function assert(condition,message){/* istanbul ignore if */if(!condition){throw new Error('ASSERT: '+message);}}", "title": "" }, { "docid": "3031542c18729bcf220d12b74bb6eeee", "score": "0.48572794", "text": "function doWhen(cond, action) {\n if(truthy(cond))\n return action();\n else\n return undefined;\n}", "title": "" }, { "docid": "a8a243a701b6bd432096dba3c0e02ade", "score": "0.48469415", "text": "function test(arg) {\n// Check and make sure that arg is not undefined\n\tif (typeof(arg) !== \"undefined\") {\n $ERROR('#1: Function argument that isn\\'t provided has a value of undefined. Actual: ' + (typeof(arg)));\n }\n}", "title": "" }, { "docid": "24662755e0212883272400b87d646c2c", "score": "0.4842256", "text": "function assertArg(arg,name,reason){if(!arg){throw ngMinErr('areq',\"Argument '{0}' is {1}\",name || '?',reason || \"required\");}return arg;}", "title": "" }, { "docid": "cf33b67cffcb124161d7e06ced05356f", "score": "0.48377326", "text": "enterElsePart(ctx) {\n\t}", "title": "" }, { "docid": "dc23aa681098643766810bf3ebaceb43", "score": "0.48352244", "text": "function noop(_) { } // tslint:disable-line no-empty", "title": "" }, { "docid": "35d18b29fe8a69b2783d4ee4b7525d0e", "score": "0.48180375", "text": "exitOC_NotExpression(ctx) {}", "title": "" }, { "docid": "94ff19e3b5d65cfe3e0ab6a0a766952c", "score": "0.48146042", "text": "function foo(bar) {\n return bar + 1;\n}", "title": "" }, { "docid": "3537797834049cf2b075662369136a2e", "score": "0.4806337", "text": "function BVC() {\n branch(!flagV);\n }", "title": "" }, { "docid": "4ea90a517b57a3669739b847ee50e267", "score": "0.48035955", "text": "enterCodeArgument(ctx) {\n\t}", "title": "" }, { "docid": "4198be22b1f520780a5098bff16ff422", "score": "0.48030677", "text": "switchFrom(tostate = null){}", "title": "" }, { "docid": "f60198a2fcb8533e9c9038e77ae698d1", "score": "0.48025268", "text": "function Bo(t, e, n, r) {\n Ho(t, e, n + \" option\", r);\n}", "title": "" }, { "docid": "54a5ff4a8e147b964677a6c175a66341", "score": "0.4798148", "text": "function ELSE(state) {\n // This instruction has been reached by executing a then branch\n // so it just skips ahead until matching EIF.\n //\n // In case the IF was negative the IF[] instruction already\n // skipped forward over the ELSE[]\n\n if (exports.DEBUG) { console.log(state.step, 'ELSE[]'); }\n\n skip(state, false);\n}", "title": "" }, { "docid": "54a5ff4a8e147b964677a6c175a66341", "score": "0.4798148", "text": "function ELSE(state) {\n // This instruction has been reached by executing a then branch\n // so it just skips ahead until matching EIF.\n //\n // In case the IF was negative the IF[] instruction already\n // skipped forward over the ELSE[]\n\n if (exports.DEBUG) { console.log(state.step, 'ELSE[]'); }\n\n skip(state, false);\n}", "title": "" }, { "docid": "a1fe356eec99f23d0f8c0bce9975dfef", "score": "0.47946104", "text": "function test1_3() {\n function multiply(a, b) {\n b = (typeof b !== 'undefined') ? b : 1;\n return a * b;\n }\n\n console.log(multiply(5, 2));\n console.log(multiply(5));\n}", "title": "" }, { "docid": "f58648fc8afb6c682bcd87ba1e2f8fe5", "score": "0.47943172", "text": "function BMI() {\n branch(flagN);\n }", "title": "" }, { "docid": "5aeeebc306e3c488f165bf70941b2f6a", "score": "0.4793775", "text": "exitNullLiteral(ctx) {\n\t}", "title": "" }, { "docid": "5aeeebc306e3c488f165bf70941b2f6a", "score": "0.4793775", "text": "exitNullLiteral(ctx) {\n\t}", "title": "" }, { "docid": "2a08364f3ddd440b22a980fbc7aed1cf", "score": "0.47924238", "text": "function bar(soemthing) {\n return false;\n}", "title": "" }, { "docid": "cc8bc07e709ffd89bbccce364cca45eb", "score": "0.47912988", "text": "function calcOrDouble(a, b = 2){\n //b = b|| 2; - undefined \n console.log(a*b); \n}", "title": "" }, { "docid": "fea01e772d319f91b3b7547a9fa950b0", "score": "0.47906554", "text": "function assert_or_throw(passed, message) {\n\n// This function will throw <message> if <passed> is falsy.\n\n if (passed) {\n return passed;\n }\n throw new Error(\n `This was caused by a bug in JSLint.\nPlease open an issue with this stack-trace (and possible example-code) at\nhttps://github.com/jslint-org/jslint/issues.\nedition = \"${jslint_edition}\";\n${String(message).slice(0, 2000)}`\n );\n}", "title": "" }, { "docid": "d4265f2cac09cf7db2a99f1daca6b91b", "score": "0.4786302", "text": "function branchAndPR (localpath, ghowner, ghrepo, base, head) {\n /** I had the idea of extracting some logic for individual branching operations to make it\n easier to do one-off regrades/resubmits. But I'm not quite sure what the right granularity level is\n so for now this does nothing :-/\n */\n \n console.log(`creating branch `);\n}", "title": "" }, { "docid": "84ba4d1e636e20e0a8e844b9efcac8aa", "score": "0.47850797", "text": "visitOr_test(ctx) {\r\n console.log(\"visitOr_test\");\r\n return this.visitChildren(ctx);\r\n }", "title": "" }, { "docid": "0dc9702553a15e9ab91b3b82dc52fda0", "score": "0.47842866", "text": "function f(param) {\n console.log(\"Is undefined?\", param === undefined);\n}", "title": "" }, { "docid": "d0803bcfa204a82380a5e5edf7ebdf1f", "score": "0.47811967", "text": "function g(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"\";if(e=[\"Assertion failed\",e].join(\": \"),!t)throw new Error(e)}", "title": "" }, { "docid": "28f0fb76bb4248adc0f47d9a479fac0f", "score": "0.4780311", "text": "function b(param = 6) {\n console.log(param);\n return param;\n}", "title": "" } ]
42f8ccbfaaf26fa94e9d912faf517fea
Language: Processing Description: Processing is a flexible software sketchbook and a language for learning how to code within the context of the visual arts.
[ { "docid": "598e41557d1aa868ea3f7cb6c69f85f8", "score": "0.7512407", "text": "function processing(hljs) {\n return {\n name: 'Processing',\n keywords: {\n keyword: 'BufferedReader PVector PFont PImage PGraphics HashMap boolean byte char color ' +\n 'double float int long String Array FloatDict FloatList IntDict IntList JSONArray JSONObject ' +\n 'Object StringDict StringList Table TableRow XML ' +\n // Java keywords\n 'false synchronized int abstract float private char boolean static null if const ' +\n 'for true while long throw strictfp finally protected import native final return void ' +\n 'enum else break transient new catch instanceof byte super volatile case assert short ' +\n 'package default double public try this switch continue throws protected public private',\n literal: 'P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI',\n title: 'setup draw',\n built_in: 'displayHeight displayWidth mouseY mouseX mousePressed pmouseX pmouseY key ' +\n 'keyCode pixels focused frameCount frameRate height width ' +\n 'size createGraphics beginDraw createShape loadShape PShape arc ellipse line point ' +\n 'quad rect triangle bezier bezierDetail bezierPoint bezierTangent curve curveDetail curvePoint ' +\n 'curveTangent curveTightness shape shapeMode beginContour beginShape bezierVertex curveVertex ' +\n 'endContour endShape quadraticVertex vertex ellipseMode noSmooth rectMode smooth strokeCap ' +\n 'strokeJoin strokeWeight mouseClicked mouseDragged mouseMoved mousePressed mouseReleased ' +\n 'mouseWheel keyPressed keyPressedkeyReleased keyTyped print println save saveFrame day hour ' +\n 'millis minute month second year background clear colorMode fill noFill noStroke stroke alpha ' +\n 'blue brightness color green hue lerpColor red saturation modelX modelY modelZ screenX screenY ' +\n 'screenZ ambient emissive shininess specular add createImage beginCamera camera endCamera frustum ' +\n 'ortho perspective printCamera printProjection cursor frameRate noCursor exit loop noLoop popStyle ' +\n 'pushStyle redraw binary boolean byte char float hex int str unbinary unhex join match matchAll nf ' +\n 'nfc nfp nfs split splitTokens trim append arrayCopy concat expand reverse shorten sort splice subset ' +\n 'box sphere sphereDetail createInput createReader loadBytes loadJSONArray loadJSONObject loadStrings ' +\n 'loadTable loadXML open parseXML saveTable selectFolder selectInput beginRaw beginRecord createOutput ' +\n 'createWriter endRaw endRecord PrintWritersaveBytes saveJSONArray saveJSONObject saveStream saveStrings ' +\n 'saveXML selectOutput popMatrix printMatrix pushMatrix resetMatrix rotate rotateX rotateY rotateZ scale ' +\n 'shearX shearY translate ambientLight directionalLight lightFalloff lights lightSpecular noLights normal ' +\n 'pointLight spotLight image imageMode loadImage noTint requestImage tint texture textureMode textureWrap ' +\n 'blend copy filter get loadPixels set updatePixels blendMode loadShader PShaderresetShader shader createFont ' +\n 'loadFont text textFont textAlign textLeading textMode textSize textWidth textAscent textDescent abs ceil ' +\n 'constrain dist exp floor lerp log mag map max min norm pow round sq sqrt acos asin atan atan2 cos degrees ' +\n 'radians sin tan noise noiseDetail noiseSeed random randomGaussian randomSeed'\n },\n contains: [\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.C_NUMBER_MODE\n ]\n };\n}", "title": "" } ]
[ { "docid": "e6b5067fd6c2eb1ad479961c3f21ec74", "score": "0.7237037", "text": "function $5d45610882582725$var$processing(hljs) {\n return {\n name: \"Processing\",\n keywords: {\n keyword: \"BufferedReader PVector PFont PImage PGraphics HashMap boolean byte char color double float int long String Array FloatDict FloatList IntDict IntList JSONArray JSONObject Object StringDict StringList Table TableRow XML false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private\",\n literal: \"P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI\",\n title: \"setup draw\",\n built_in: \"displayHeight displayWidth mouseY mouseX mousePressed pmouseX pmouseY key keyCode pixels focused frameCount frameRate height width size createGraphics beginDraw createShape loadShape PShape arc ellipse line point quad rect triangle bezier bezierDetail bezierPoint bezierTangent curve curveDetail curvePoint curveTangent curveTightness shape shapeMode beginContour beginShape bezierVertex curveVertex endContour endShape quadraticVertex vertex ellipseMode noSmooth rectMode smooth strokeCap strokeJoin strokeWeight mouseClicked mouseDragged mouseMoved mousePressed mouseReleased mouseWheel keyPressed keyPressedkeyReleased keyTyped print println save saveFrame day hour millis minute month second year background clear colorMode fill noFill noStroke stroke alpha blue brightness color green hue lerpColor red saturation modelX modelY modelZ screenX screenY screenZ ambient emissive shininess specular add createImage beginCamera camera endCamera frustum ortho perspective printCamera printProjection cursor frameRate noCursor exit loop noLoop popStyle pushStyle redraw binary boolean byte char float hex int str unbinary unhex join match matchAll nf nfc nfp nfs split splitTokens trim append arrayCopy concat expand reverse shorten sort splice subset box sphere sphereDetail createInput createReader loadBytes loadJSONArray loadJSONObject loadStrings loadTable loadXML open parseXML saveTable selectFolder selectInput beginRaw beginRecord createOutput createWriter endRaw endRecord PrintWritersaveBytes saveJSONArray saveJSONObject saveStream saveStrings saveXML selectOutput popMatrix printMatrix pushMatrix resetMatrix rotate rotateX rotateY rotateZ scale shearX shearY translate ambientLight directionalLight lightFalloff lights lightSpecular noLights normal pointLight spotLight image imageMode loadImage noTint requestImage tint texture textureMode textureWrap blend copy filter get loadPixels set updatePixels blendMode loadShader PShaderresetShader shader createFont loadFont text textFont textAlign textLeading textMode textSize textWidth textAscent textDescent abs ceil constrain dist exp floor lerp log mag map max min norm pow round sq sqrt acos asin atan atan2 cos degrees radians sin tan noise noiseDetail noiseSeed random randomGaussian randomSeed\"\n },\n contains: [\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.C_NUMBER_MODE\n ]\n };\n}", "title": "" }, { "docid": "eac57cf0b31e417c499620d3264fa867", "score": "0.62389034", "text": "function setup() {\n noCanvas();\n\n // Make a paragraph element\n var text = createP(\"This is some stuff in a paragraph that pulls its style from CSS via an id set by p5.\");\n\n // Set its id (for which the styles are specified in style.css)\n text.id(\"apple\");\n}", "title": "" }, { "docid": "0f922abd5a7df11a31f3844242ec9c3a", "score": "0.6163468", "text": "function setup() {\n createCanvas(1008,1008);\n textFont(quicksand);\n tiger = new firstPredator(100, 100, 5, color(204, 159, 69), 40, tigerImage, UP_ARROW, DOWN_ARROW, LEFT_ARROW, RIGHT_ARROW, 16); // press Shift key to sprint\n leopard = new firstPredator(100, 100, 15, color(200, 175, 175), 35, leopardImage, 87, 83, 65, 68, 70); // press F to sprint\n bear = new firstPredator(100, 100, 25, color(120, 114, 97), 45, bearImage, 73, 75, 74, 76, 72); // press H key to sprint\n antelope = new Prey(100, 100, 10, color(255, 100, 10), 50, antelopeImage);\n zebra = new Prey(100, 100, 8, color(255, 255, 255), 60, zebraImage);\n bee = new Prey(100, 100, 20, color(255, 255, 0), 10, beeImage);\n}", "title": "" }, { "docid": "ffe3444e27c96f41b78b606483d43e9a", "score": "0.6087861", "text": "function setup() {\n createCanvas(625, 280);\n textFont(\"Source Code Pro\");\n fill(0);\n stroke(255);\n \n }", "title": "" }, { "docid": "2df42b58089ab76e3378be14317f237b", "score": "0.6083559", "text": "function setup() {\n\n // In addition to making a canvas we can make other DOM elements\n // Like here is a paragraph element: <p>This is a paragraph element.</p>\n // By default these elements are appended to the <body>\n // Try reversing these two lines of code and see the difference\n var text = createP(\"This is a paragraph element.\");\n var text = createP(\"This is a paragraph element.\");\n var canvas = createCanvas(300, 200);\n var text = createP(\"This is a paragraph element.\");\n\n}", "title": "" }, { "docid": "bab0c21b4d3ac6cb6ca61f0728a319e7", "score": "0.60654724", "text": "function setup() {\n createCanvas(500, 280);\n textFont(\"Source Code Pro\");\n textSize(38);\n \n }", "title": "" }, { "docid": "9e38958ebeef0e336c7580e85fc75de3", "score": "0.5996571", "text": "function setup()\n{\n textSize(8*scaleFactor);\n createCanvas(0.9*windowWidth, 0.9*windowHeight); //Sets the createCanvas of the app. You should modify this to your device's native createCanvas. Many phones today are 1080 wide by 1920 tall.\n noStroke(); //my code doesn't use any strokes.\n predictionary.addWords(topHundo);\n phrases=shuffle(phrases)\n}", "title": "" }, { "docid": "37d4263f6f4677771ae278744be25f24", "score": "0.59912956", "text": "function setup() {\n \n createCanvas(displayWidth, displayHeight);\n \n input = createInput();\n input.position(36, 124);\n enterButton = createButton('submit');\n enterButton.position(214, 124);\n enterButton.mousePressed(submit);\n clearButton = createButton('clear');\n clearButton.position(273, 124);\n clearButton.mousePressed(clear);\n textSize(30);\n heading = createElement('h1', 'surrealist (dadist) text rearranger');\n inputText = createElement('h2', 'enter some paragraphs of text and see the many poetic iterations that can be found');\n siteDescript = createElement('h3', 'sentences are chopped, rearranged, removed, repeated, with no punctuation.');\n aLink = createElement('h4', 'try it with: https://www.gutenberg.org/files/11/11-h/11-h.htm');\n heading.position(35,20);\n inputText.position(35, 55);\n siteDescript.position(37, 80)\n aLink.position(38, 100);\n textAlign(CENTER); // With the layout centered and endmarks removed, the new text looks like poetry\n\n}", "title": "" }, { "docid": "f88223f1ca0cab7503f5a7adbd4d5442", "score": "0.5907896", "text": "function setup() {\n\n //camelCase, UPPERCASE, lowercase\n\n //crear lienzo para dibujar \n //por defecto es blanco\n //createCanvas(dimHor, dimVer); \n //dimensiones en px\n createCanvas(windowWidth, windowHeight);\n\n //pintar el fondo\n //background(color);\n //1: grayscale, 0 es negro, 255 es blanco\n //2: grayscale + alpha\n //3: rgb, redgreenblue, 0 nada, 255 todo\n //4: rgb + alpha\n //alpha: 0 es transparente, 255 es solido\n background(70, 20, 220, 70)\n \n //framRate (tasa de cuadros por segundo)\n frameRate(8);\n\n //variable local x\n var x\n x = 10\n\n //variable local y\n //modo rapido de DECLARAR\n //y asignar valor inmediatamente \n var y = 10;\n //asignar otro valor\n y = 100;\n\n\n //No borrar las llaves \n}", "title": "" }, { "docid": "e072fd5d2d82c30c4cd6f683290df9cb", "score": "0.58629185", "text": "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}", "title": "" }, { "docid": "ad14ca18002df4911cb3490c1a186a56", "score": "0.58622944", "text": "function setup() {\n\n /* Tracer la zone de jeu utilisé dans le navigateur */\n createCanvas(400, 400);\n\n createButton('Je commence').mousePressed(jeCommence);\n createButton(\"L'IA commence\").mousePressed(iaCommence);\n\n resultatPartie = createP('');\n resultatPartie.style('font-size', '32pt');\n\n}", "title": "" }, { "docid": "5c5d25d33334740518d5f6c1e7bc46e2", "score": "0.5843524", "text": "function setup() {\n createCanvas(600,200);\n\n line1 = new RiGrammar();\n line2 = new RiGrammar();\n line3 = new RiGrammar();\n lexicon = new RiLexicon();\n line1.addRule('<start>', '<l1w1> <l1w2> <l1w3>', 1);\n line1.addRule('<l1w1>', lexicon.randomWord(\"nn\",2), 1);\n line1.addRule('<l1w2>', lexicon.randomWord(\"vbz\",1), 1);\n line1.addRule('<l1w3>', lexicon.randomWord(\"rb\",2), 1);\n\n line2.addRule('<start>', '<l2w1> <l2w2> <l2w3> <l2w4> <l2w5>', 1);\n line2.addRule('<l2w1>', lexicon.randomWord(\"dt\",1), 1);\n line2.addRule('<l2w2>', lexicon.randomWord(\"jj\",2), 1);\n line2.addRule('<l2w3>', lexicon.randomWord(\"nn\",1), 1);\n line2.addRule('<l2w4>', lexicon.randomWord(\"vbz\",1), 1);\n line2.addRule('<l2w5>', lexicon.randomWord(\"rb\",2), 1);\n\n line3.addRule('<start>', '<l3w1> <l3w2> <l3w3>', 1);\n line3.addRule('<l3w1>', lexicon.randomWord(\"rb\",1), 1);\n line3.addRule('<l3w2>', lexicon.randomWord(\"vbz\",2), 1);\n line3.addRule('<l3w3>', lexicon.randomWord(\"nn\",2), 1);\n}", "title": "" }, { "docid": "b1dbcfa08f9b52ab45725a5b06618acb", "score": "0.5785891", "text": "function draw(){\n\n //write hello world using p5 positioned at ( x: 20, y: 30 )\n text( \"Hello World!\", 300, 200);\n}", "title": "" }, { "docid": "6eb69eafa3b0940a2e47b538018054e0", "score": "0.57792675", "text": "function setup() {\n //1 = 100people\n\n createCanvas(400, 400);\n textSize(10);\n}", "title": "" }, { "docid": "5c916395e580261469a214dd82bd4302", "score": "0.5777038", "text": "function setup() {\n createCanvas(1000, 600);\n ellipseMode(CENTER);\n textSize(20);\n textAlign(LEFT); \n }", "title": "" }, { "docid": "cf39789d8d1167307b7689765e9397bf", "score": "0.5757537", "text": "function parrotFacts(){\n console.log('Some parrots can live for 8 years');\n console.log('Parrots can speak human language');\n}", "title": "" }, { "docid": "0e4b09fb63a65e9cc0d107a259021724", "score": "0.5754321", "text": "function creditails() {\r\ntextSize(42);\r\nstrokeWeight(1);\r\nfill(clr);\r\ndisclamer = '(C) This Graphic ART generated by computer algorithm using P5.JS library and programmed by Alex Shipulin';\r\ntext(disclamer, width/2, height-25);\r\n}", "title": "" }, { "docid": "af383b65fde6ec84a602263baa895d8a", "score": "0.5753871", "text": "function setup() {\ncreateCanvas(500,500);\nbackground(200,200,200);\n\npoint(50,50);\nrect(0,0,250,200)\nline(0,0,250,500)\n}", "title": "" }, { "docid": "e5b10d0f6482f1d3f01fbd0a036adca1", "score": "0.5745248", "text": "function main(){\r// setup some variables\rvar d = app.documents.add(); // active doc\rvar pg = d.pages.item(0); // first page\rvar tf = pg.textFrames.add(); // the one textframe that is there\r\r// the function buildBounds(app.documents.item());\r// calculates the size of the textframe\rtf.geometricBounds = buildBounds(d);\r\r\rtf.contents = \"Hello World\";\r\r// now we can loop thru the text\r\rfor(var i = 0;i < tf.characters.length; i++){\r\tvar c = tf.characters[i];\r\t// the next line loops thru all characters in the text\r\tc.pointSize = calcVal(23);\r\t}\r\r\r}", "title": "" }, { "docid": "3461176d3c21bf46ab56e4a4b2ee4963", "score": "0.57204247", "text": "function setup() {\n // Create a drawing surface\n createCanvas(800, 600);\n\n\t// Draw a black background using the RGB color model\n\tbackground(61, 20, 99);\n\n\t// // Set the style for drawing\n\t// fill(255, 255, 255);\n\t// stroke(255, 200, 0);\n\t// strokeWeight(10);\n\n\t// // Draw some shapes in that style\n\t// rect(250, 150, 100, 200); // x, y, w, h\n\t// ellipse(300, 100, 150); // x, y, diameter\n\n\t// // Change the drawing style\n\t// stroke(243, 145, 255);\n\t// strokeWeight(30);\n\t// noFill();\n\t// // You can also use noStroke() to turn off the stroke\n\n\t// // Draw some shapes in that new style\n\t// rect(450, 150, 100, 200); // x, y, w, h\n\t// ellipse(500, 100, 150); // x, y, diameter\n}", "title": "" }, { "docid": "977a30d91f1b0d1a64b48f06433f9f93", "score": "0.57059383", "text": "function setup() { //////FIXED\n createCanvas(windowWidth, windowHeight);\n tiger = new Predator(100, 100, 5, color(200, 200, 0), 40); /////FIXED\n antelope = new Prey(100, 100, 10, color(255, 100, 10), 50);\n zebra = new Prey(100, 8, 69, color(255, 255, 255), 60); /////FIXED\n bee = new Prey(100, 100, 20, color(255, 255, 0), 10);\n}", "title": "" }, { "docid": "3aae689414298939afa8c12312790a29", "score": "0.56270593", "text": "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}", "title": "" }, { "docid": "99be3129b8c85ee16eac5ea6965ef965", "score": "0.562307", "text": "function beginProcessing (data) {\n var len = data.length;\n if (data.length === 0) {\n alert(\"Nothing entered\");\n } else {\n \tdata = data.toLowerCase();\n //look for word delimiters\n var delimiters = '.:;?! !@#$%^&*()+';\n var words = splitTokens(data, delimiters); //http://p5js.org/reference/#/p5/splitTokens\n tokens = words;\n tokens \n for (var i = 0; i < words.length; i++) {\n var word = words[i];\n totalSyllables += countSyllables(word);\n totalWords++;\n }\n //look for sentence delimiters\n var sentenceDelim = '.:;?!';\n var sentences = splitTokens(data, sentenceDelim);\n phrases = sentences;\n totalSentences = sentences.length;\n calculateFlesch(totalSyllables, totalWords, totalSentences);\n // findWordFrequency();\n avgWordsPerSentence = totalWords / totalSentences;\n avgSyllablesPerSentence = totalSyllables / totalSentences;\n avgSyllablesPerWord = totalSyllables / totalWords;\n\t flesch = + flesch.toFixed(3);\n\t avgWordsPerSentence = +avgWordsPerSentence.toFixed(3);\n\t avgSyllablesPerSentence = +avgSyllablesPerSentence.toFixed(3);\n\t avgSyllablesPerWord = +avgSyllablesPerWord.toFixed(3);\n report += \"Total Syllables : \" + totalSyllables +\"\\n\";\n report += \"Total Words : \" + totalWords + \"\\n\";\n report += \"Total Sentences : \" + totalSentences + \"\\n\";\n report += \"Avg Words Per Sentence : \" + avgWordsPerSentence + \"\\n\";\n report += \"Avg Syllables Per Word : \" + avgSyllablesPerWord + \"\\n\";\n report += \"Avg Syllables Per Sentence : \" + avgSyllablesPerSentence + \"\\n\";\n report += \"Flesch Readability Index : \" + flesch + \"\\n\";\n // report += \"Word Frequency Counter (Ignore the 'undefined') : \" + \"<br>\";\n // report += wordCounterString;\n // var wordCounterString = keys[i] + \" : \" + concordance[keys[i];\n //\tReadability scales the Flesch index into a more managable number\n // var basicTextResults = createP(report);\n createNewDiv();\n }\n}", "title": "" }, { "docid": "58680e3c2457d6b8dc10a5c5dc9ba55b", "score": "0.562037", "text": "function $processing(args) //args width/height\n{\n\n\tvar thisPtr=this;\t\n\t\n\t//dont allow font changes\t\n\tthis.allowFont=false; \t\n\t\t\n\t//user supplied value- object sent to inlet is assigned here\n\tthis.ENV = {};\n\t\n\tvar proc = null;\n\t\n\t//the current script\n\tvar currScriptPath \t= \"\";\t\n\t\t\n\t//canvas viewport\n\t//this overwrites\n\tthis.width \t\t\t= 0;\n\tthis.height \t\t= 0;\n\t\n\tfunction size(w,h) {\n\t\tthisPtr.width=parseInt(w);\n\t\tthisPtr.height=parseInt(h);\n\t\t\n\t\tthisPtr.setWidth(w);\t\t\n\t\tthisPtr.setHeight(h);\n\t}\t\n\t\t\n\tthis.outlet1 = new this.outletClass(\"outlet1\",this,\"messages sent from the sketch.\");\n\tthis.inlet1=new this.inletClass(\"inlet1\",this,\"load, run, refresh and exec.\");\n\t\t\n\tthis.sendMess=function(msg) {\n\t\tthisPtr.outlet1.doOutlet(msg);\n\t}\n\t\n\tthis.set_obj_size=function(w,h) {\n\t\tsize(w,h);\n\t}\n\t\n\t//store an object\n\tthis.inlet1[\"obj\"]=function(obj) {\n\t\tthisPtr.ENV=obj;\n\t}\t\n\t\t\n\t//load a script\n\tthis.inlet1[\"load\"]=function(url) {\n\t\tcurrScriptPath=LilyUtils.getFilePath(url);\t\t\t\n\t}\n\t\n\t//run a script\n\tthis.inlet1[\"run\"]=function() {\n\t\tvar obj = LilyUtils.readFileFromPath(currScriptPath);\n\t\tproc = Processing(thisPtr.displayElement,obj.data,thisPtr);\t\n\t}\n\t\n\t//stop the loop & refresh the object\n\tthis.inlet1[\"refresh\"]=function() {\n\t\tLilyApp.toggleEdit();\n\t\tthisPtr.parent.replaceObject(thisPtr,\"processing\",(thisPtr.width+\" \"+thisPtr.height));\n\t\tLilyApp.toggleEdit();\t\n\t}\n\t\n\t//call the exec method- custom method for interacting with a sketch\n\tthis.inlet1[\"exec\"]=function(params) {\n\t\t//call exec if it exists\n\t\tif(typeof thisPtr.exec == \"function\") thisPtr.exec(params);\n\t}\t\n\t\n\tfunction kill() {\n\t\tif(proc) proc.kill_loop(); //added this method to the processing library so we can reload\n\t}\n\t\n\tthis.destructor=function destructor() {\n\t\tkill();\n\t}\t\n\t\t\t\n\tvar canvas = \"<div><canvas id=\\\"\"+ this.createElID(\"processingCanvas\") +\"\\\" width=\\\"200\\\" height=\\\"200\\\"></canvas></div>\";\n\n\tthis.controller.setNoBorders(true);\t\n\n\t//custom html\n\tthis.ui=new LilyObjectView(this,canvas);\n\tthis.ui.draw();\t\n\t\n\tthis.displayElement=thisPtr.ui.getElByID(thisPtr.createElID(\"processingCanvas\"));\n\t//this.resizeElement=thisPtr.ui.getElByID(thisPtr.createElID(\"processingCanvas\"));\n\t\n\t//set the width/height variables on resize.\n\tthis.controller.objResizeControl.cb=function(h,w) {\n\t\tthisPtr.height = parseInt(h);\n\t\tthisPtr.width = parseInt(w);\t\t\t\n\t}\n\t\n\tfunction loadFunc() {\n\t\tthisPtr.height = parseInt(thisPtr.height);\n\t\tthisPtr.width = parseInt(thisPtr.width);\n\t}\n\n\tthis.init=function() {\n\t\t//on initial object creation this sets the height & width to the default values defined in the canvas element.\n\t\tthisPtr.height = parseInt(thisPtr.displayElement.getAttribute(\"height\"));\n\t\tthisPtr.width = parseInt(thisPtr.displayElement.getAttribute(\"width\"));\n\t\t//when opening a patch this sets the size...\n\t\tthisPtr.controller.patchController.attachPatchObserver(thisPtr.objID,\"patchLoaded\",loadFunc,\"all\");\n\t\t\n\t\tLilyUtils.loadScript(\"chrome://lily/content/lib/processing.js\", this);\t\n\t}\n\n\t//object args width & height\n\tvar argsArr = args.split(\" \");\n\tif(argsArr.length==2) size.apply(thisPtr,argsArr);\t\n\t\t\n\treturn this;\n}", "title": "" }, { "docid": "d7a6c099c9a0e4ff84582bec37f127a6", "score": "0.5615351", "text": "function sketchProc(processing) {\n processing.setup = function() {\n processing.size(640, 360);\n circleColor = processing.color(processing.RGB, 255, 0, 0);\n circleHighlight = processing.color(51);\n circleColor2 = processing.color(255);\n circleHighlight2 = processing.color(200);\n rectColor = processing.color(20);\n rectHighlight = processing.color(51);\n currentColor = processing.color(0);\n a = processing.color(20);\n b = processing.color(150);\n };\n\n processing.draw = function() {\n if(loaded>=11){\n update(processing.mouseX, processing.mouseY);\n processing.background(currentColor);\n for(var i=0; i<5; i++) {\n if (circleOver[i]) {\n processing.fill(circleHighlight);\n } else {\n processing.fill(circleColor);\n }\n processing.smooth(2);\n processing.stroke(255);\n processing.strokeWeight(4);\n processing.ellipse(px[i], py[i], dm[i], dm[i]);\n }\n for(var j=0; j<3; j++) {\n if (circleOver2[j]) {\n processing.fill(circleHighlight2);\n } else {\n processing.fill(circleColor2);\n }\n processing.smooth(2);\n processing.stroke(255);\n processing.strokeWeight(1);\n processing.ellipse(ppx[j], ppy[j], ddm[j], ddm[j]);\n \n processing.fill(0);\n processing.smooth(2);\n processing.noStroke();\n processing.ellipse(ppx[j], ppy[j], 7, 7);\n }\n \n if (rectOver) {\n processing.fill(rectHighlight);\n } else {\n processing.fill(rectColor);\n }\n processing.stroke(150);\n processing.rect(30, 210, 20, 30, 3, 3, 12, 12);\n } else{\n processing.background(0);\n processing.text(\"Loading Samples...Please wait\"+loaded,50,50);\n if(progressBar>340){\n progressBar=50;\n }\n processing.rect(50,100,5*progressBar,50);\n progressBar=progressBar+1;\n }\n };\n\n function update(x, y) {\n for(var i=0; i<5; i++) {\n if ( overCircle(px[i], py[i], dm[i]) ) {\n circleOver[i] = true;\n } else {\n circleOver[i] = false;\n }\n }\n for(var j=0; j<3; j++) {\n if ( overCircle(ppx[j], ppy[j], ddm[j]) ) {\n circleOver2[j] = true;\n } else {\n circleOver2[j] = false;\n }\n }\n if(overRect(30, 210, 20, 30)) {\n rectOver = true;\n } else {\n rectOver = false;\n }\n }\n\n processing.mouseClicked = function() {\n if(rectOver) {\n if(rectColor == a) {\n rectColor = b;\n close = false;\n } else {\n rectColor = a;\n close = true;\n }\n }\n if(circleOver[0]) {\n dm[0] = dm[0] + 5;\n Sample.play(BUFFERS.kick, 0);\n setTimeout(function() { dm[0] = dm[0] -5; } ,100);\n } else if(circleOver[1]) {\n dm[1] = dm[1] + 5;\n Sample.play(BUFFERS.snare, 0);\n setTimeout(function() { dm[1] = dm[1] -5; } ,100);\n } else if(circleOver[2]) {\n dm[2] = dm[2] + 5;\n Sample.play(BUFFERS.tom1, 0);\n setTimeout(function() { dm[2] = dm[2] -5; } ,100);\n } else if(circleOver[3]) {\n dm[3] = dm[3] + 5;\n Sample.play(BUFFERS.tom2, 0);\n setTimeout(function() { dm[3] = dm[3] -5; } ,100);\n } else if(circleOver[4]) {\n dm[4] = dm[4] + 5;\n Sample.play(BUFFERS.tom3, 0);\n setTimeout(function() { dm[4] = dm[4] -5; } ,100);\n } else if(circleOver2[0]) {\n ddm[0] = ddm[0] + 5;\n ppx[0] = ppx[0] + 3;\n if(close) {\n Sample.play(BUFFERS.hihatclose, 0);\n } else {\n Sample.play(BUFFERS.hihatopen, 0);\n }\n setTimeout(function() { ddm[0] = ddm[0] -5; ppx[0] = ppx[0] -3;} ,100);\n } else if(circleOver2[1]) {\n ddm[1] = ddm[1] + 5;\n ppx[1] = ppx[1] + 2;\n Sample.play(BUFFERS.crash, 0);\n setTimeout(function() { ddm[1] = ddm[1] -5; ppx[1] = ppx[1] -2;} ,100);\n } else if(circleOver2[2]) {\n ddm[2] = ddm[2] + 5;\n ppx[2] = ppx[2] - 3;\n Sample.play(BUFFERS.ride, 0);\n setTimeout(function() { ddm[2] = ddm[2] -5; ppx[2] = ppx[2] +3; } ,100);\n }\n };\n \n function overRect(x, y, width, height) {\n if (processing.mouseX >= x && processing.mouseX <= x+width && \n processing.mouseY >= y && processing.mouseY <= y+height) {\n return true;\n } else {\n return false;\n }\n }\n \n function overCircle(x, y, diameter) {\n var disX = parseFloat(x - processing.mouseX);\n var disY = parseFloat(y - processing.mouseY);\n if (processing.sqrt(processing.sq(disX) + processing.sq(disY)) < diameter/2 ) {\n return true;\n } else {\n return false;\n }\n }\n}", "title": "" }, { "docid": "f4cb86364e065c2b1264630a0409503f", "score": "0.56135833", "text": "function draw() {\n // tell p5 to print the the text string \"Hello World!\"\n // Positioning this text string at (x:30, y:30).\n text(\"Hello World!\", 30, 30)\n}", "title": "" }, { "docid": "4e68d3650c751a6af6772757548a42b2", "score": "0.56111836", "text": "function draw() {\n\n // tell p5 to print the text string \"Hello World!\"\n // This is going to be positioned at ( x: 30, y: 40 ).\n text( \"Hello World!\", 30, 40 );\n}", "title": "" }, { "docid": "3d2b28aeccae42b64a77fb703664f7e4", "score": "0.5599952", "text": "function draw() {\n\n // tell p5 to print the text string \"Hello World!\"\n // This is going to be positioned at ( x: 20, y: 30 ).\n text( \"Hello World!\", 20, 30 );\n}", "title": "" }, { "docid": "a0167330d2c417a37a8cce6086f02def", "score": "0.5591272", "text": "function draw() {\n\n // tell p5 to print the text string \"Hello World!\"\n // This is going to be positioned at ( x: 200, y: 300 ).\n text( \"Hello World!\", 200, 300 );\n\n}", "title": "" }, { "docid": "5a2826413eb4e1c63a50f51e00e49810", "score": "0.55870396", "text": "function setup() {\n createCanvas(windowWidth, windowHeight);\n cactuar = new Prey(100, 100, 10, color(255, 100, 10), preyPic, 50);\n zebra = new Prey(100, 100, 8, color(255, 255, 255), preyPic, 60);\n bee = new Prey(100, 100, 20, color(255, 255, 0), preyPic, 10);\n\n dragon = new Predator(100, 100, 20, color(255, 0, 0), 100, playerOneInputs, 0, 10, \"Dragon\", dragonPic);\n lion = new Predator(100, 100, 20, color(0, 255, 0), 85, playerTwoInputs, 0, 5, \"Lion\", lionPic);\n tiger = new Predator(100, 100, 5, color(0, 0, 255), 40, playerThreeInputs, 0, 8, \"Tiger\", tigerPic);\n}", "title": "" }, { "docid": "4313843ac6324a17d1ef5cec44b658a4", "score": "0.5586598", "text": "function setup() { \n createCanvas(600, 600);\n\tfood_img = createImg('https://upload.wikimedia.org/wikipedia/commons/thumb/6/6d/Good_Food_Display_-_NCI_Visuals_Online.jpg/1200px-Good_Food_Display_-_NCI_Visuals_Online.jpg')\n\tfood_img.hide();\n\t\n\tmilitary_img = createImg('https://www.fastweb.com/uploads/article_photo/photo/2035983/crop635w_Military-Scholarships.jpg')\n\tmilitary_img.hide();\n\t\n\tbudget_img = createImg('http://www.sunsetaccounting.net/memberarea/images/uploaded/sabats/discretionary-desk2015.png')\n\tbudget_img.hide();\n\t\n\tbackground_img = createImg('https://blog.newegg.com/blog/wp-content/uploads/windows_xp_bliss-wide.jpg')\n\tbackground_img.hide()\n\t\n\t\n\n\t\n// Initialize background image\n\timage(background_img, 0,0)\n\t\n// Set Text size for the Title Text\n\ttextSize(25)\n// Initialize title text for the bottom\n\ttitle_text = text(\"National Spending is way out of proportion in 2017.\", 170, 400, 300, 100)\n\t\n// Set Text size for the rest of the program\n\ttextSize(15)\n\t\n\t\n\t\n\t\n\t\n}", "title": "" }, { "docid": "752284137c58156f6d926d31df71a095", "score": "0.5570237", "text": "function setup() {\n createCanvas(800, 800);\n userStartAudio();\n\n song = new p5.PolySynth();\n\n //Note B5\n let noteB5 = new NoteB5(400, 100);\n musicBlocks.push(noteB5);\n\n //Note A5\n let noteA5 = new NoteA5(200, 700);\n musicBlocks.push(noteA5);\n\n //Note F5\n let noteF5 = new NoteF5(700, 400);\n musicBlocks.push(noteF5);\n\n //Note E5\n let noteE5 = new NoteE5(600, 700);\n musicBlocks.push(noteE5);\n\n //Note D5\n let noteD5 = new NoteD5(100, 400);\n musicBlocks.push(noteD5);\n}", "title": "" }, { "docid": "bbb4ae0e2bc293c921fab446a5443163", "score": "0.55583966", "text": "function setup() {\n createCanvas(500,500);\n background(200,0,20);\n noStroke();\n //head\n fill(\"#FFE5B4\")\n ellipseMode(CENTER);\n ellipse(250,180,180,250);\n //neck\n rectMode(CENTER)\n rect(250,400,80,250);\n //eyelashes\n //white eyes\n fill(255);\n ellipse(220,140,35,15);\n ellipse(280,140,35,15);\n //color eyes\n stroke(0);\n strokeWeight(3);\n fill(0,200,40);\n ellipse(222,140,11,11);\n ellipse(282,140,11,11);\n //iris\n fill(0);\n noStroke();\n ellipse(222,140,5,5);\n ellipse(282,140,5,5);\n //mouth\n fill(\"#FFC0CB\");\n ellipse(250,230,45,15);\n\n}", "title": "" }, { "docid": "d7541785c6f28d1ffc3621be883490c7", "score": "0.5557286", "text": "function setup() {\n //p5Canvas = createCanvas(1300, 300);\n p5Canvas = createCanvas(500, 300);\n //frameRate(1);\\\n frameRate(40);\n //p5Canvas = createCanvas(300, 300,WEBGL);\n //normalMaterial();\n textSize(64);\n //textAlign(CENTER, CENTER);\n}", "title": "" }, { "docid": "9d10001271363dd834f68ed151d34dd9", "score": "0.5553504", "text": "function setup() {\n\n createCanvas(400, 400); // Création du cadre html (DOM)\n\n}", "title": "" }, { "docid": "ea3f71365b76173525e825f3811df028", "score": "0.5538565", "text": "function setup() {\r\n createCanvas(400,300);\r\n \r\n \r\n \r\n}", "title": "" }, { "docid": "7124f3fe052acd80a4e39d9b7a7689be", "score": "0.55308074", "text": "function setup() {\n createCanvas(400, 400);\n background(0);\n fill(0);\n stroke(255);\n ellipse(xPosition, yPosition, 400, 400); //use the variables as arguments\n ellipse(xPosition, yPosition, 300, 300);\n ellipse(xPosition, yPosition, 200, 200);\n ellipse(xPosition, yPosition, 100, 100);\n}", "title": "" }, { "docid": "2d5e0b735a8688619fab67a9474a2113", "score": "0.5529345", "text": "function TinyLisp(){ \n}", "title": "" }, { "docid": "bb8fa1fc2349613b165fa2a5c0426ab2", "score": "0.5521775", "text": "function setup() {\n createCanvas(600, 600);\n imageMode(CENTER);\n rectMode(CENTER);\n userStartAudio();\n mic = new p5.AudioIn();\n mic.start();\n\n // Set the current State to :\n currentState = new TitlePage(); // Can be TitlePage, InstructionPage, Lvl1, Lvl2, ..., Lvl4.\n let x = 50;\n\n // //Set life array :\n for (let i = 0; i < numLives; i++) {\n let y = (height / 15) * 14;\n let life = new Life(x, y);\n x += 70;\n lives.push(life);\n }\n}", "title": "" }, { "docid": "3cceb7feea2b608d604a50ed9c5b62ee", "score": "0.5517882", "text": "function setup() {\n createCanvas(1000, 1000);\n\n textSize(40);\n text(255);\n textFont('Courier New'); \n textAlign(CENTER);\n rectMode(CENTER);\n }", "title": "" }, { "docid": "4a0ac157e92a7745c5170398d1632465", "score": "0.55150247", "text": "function setup() {\n \n}", "title": "" }, { "docid": "38ce489f8b5e737650c507a7f71e6ea3", "score": "0.5508168", "text": "function setup() {\n createCanvas(windowWidth, windowHeight);\n noStroke();\n rectMode(CENTER);\n textSize(20);\n textAlign(CENTER, CENTER);\n\n let x = width/2;\n let y = 2*height/3;\n madeleine = new Madeleine(x, y);\n\n}", "title": "" }, { "docid": "2168e6dc7c034e94dc69378e44546e77", "score": "0.5503615", "text": "function generateDrawing (processing) {\r\n // Define Canvas Dimensions\r\n var canvasWidth = 1200;\r\n var canvasHeight = 700;\r\n\r\n // Geometric Parameters\r\n // Circle denotes the graph node\r\n var circleDiameter = 30;\r\n var circleRadius = circleDiameter / 2;\r\n\r\n // Gap between two circles from their closest points\r\n // This is used creating vertical gap between circles\r\n var nodeGap = circleDiameter;\r\n\r\n // Gap between circle and the text alongside it from the center\r\n var textGap = nodeGap/4;\r\n\r\n // The difference in Y co-ordinate between two circles stacked vertically\r\n var verticalSeparation = circleDiameter + nodeGap;\r\n\r\n // The difference in X co-ordinate between two circles stacked horizontally\r\n var horizontalSeparation = 12*circleDiameter;\r\n \r\n // Denotes how much should string length be multipled to be approximated by pixel based length\r\n // Used during text render\r\n var pixel_factor = 5;\r\n\r\n var defaultBackgroundRgb = [0, 0, 0];\r\n\r\n var defaultCircleRgb = [33, 148, 133];\r\n var mouseOverCircleHighlightedRgb = [255, 129, 210];\r\n var mouseClickedCircleHighlightedRgb = [125, 0, 255];\r\n var pastClickedCircleHighlightRgb = mouseClickedCircleHighlightedRgb;\r\n var futurePathCircleHighlightRgb = [0, 106, 181];\r\n var defaultCircleStrokeWeight = 2;\r\n\r\n var defaultLineRgb = [255, 255, 255];\r\n var defaultLineStrokeWeight = 1;\r\n\r\n var defaultTextSize = 13;\r\n var defaultTextRgb = [255, 64, 64];\r\n\r\n\r\n // Override the setup function of processing.js\r\n processing.setup = function() {\r\n processing.size(canvasWidth, canvasHeight);\r\n // Decalare inner scope functions which are being used outside\r\n innerScopeFunctionHolder['buildXandYOrdinates'] = buildXandYOrdinates;\r\n innerScopeFunctionHolder['assignOrdinatesToOrphanNodes'] = assignOrdinatesToOrphanNodes;\r\n innerScopeFunctionHolder['highlightPath'] = highlightPath;\r\n // Initialize graph data, indexes and traversals\r\n nodeTraversalAndPlacement();\r\n }\r\n\r\n // Override draw function, by default it will be called 60 times per second!\r\n processing.draw = function() {\r\n // Sets the background of the canvas\r\n // Note: This should be in the loop for the canvas drawings to appear crisp\r\n processing.background(defaultBackgroundRgb[0], defaultBackgroundRgb[1], defaultBackgroundRgb[2]);\r\n\r\n // Call the actual graph rendering function\r\n renderGraph();\r\n };\r\n\r\n processing.mouseMoved = function() {\r\n if (isEditMode(\"any\")) {\r\n // We have to transform the mouse co-ordinates first, because they are always\r\n // relative to the canvas window dimensions. Do note that this is required because we\r\n // are using a javascript based zoomable and pannable canvas, which emulates the effect\r\n // by scaling the rendered drawing\r\n var mousePointer = window.outerCtx.transformedPoint(processing.mouseX, processing.mouseY);\r\n nodeUnderMouse(mousePointer.x, mousePointer.y);\r\n }\r\n };\r\n\r\n processing.mouseClicked = function() {\r\n if (isEditMode(\"any\")) {\r\n // We have to transform the mouse co-ordinates first, because they are always\r\n // relative to the canvas window dimensions. Do note that this is required because we\r\n // are using a javascript based zoomable and pannable canvas, which emulates the effect\r\n // by scaling the rendered drawing\r\n var mousePointer = window.outerCtx.transformedPoint(processing.mouseX, processing.mouseY);\r\n nodeClickedByMouse(mousePointer.x, mousePointer.y);\r\n }\r\n };\r\n\r\n function renderGraph() {\r\n // Render edges first\r\n for (var edgeId in edgesIndexedById) {\r\n var edge = edgesIndexedById[edgeId];\r\n var fromX = nodePropertiesIndexedById[edge.fromNode] ? nodePropertiesIndexedById[edge.fromNode].X : null;\r\n var fromY = nodePropertiesIndexedById[edge.fromNode] ? nodePropertiesIndexedById[edge.fromNode].Y : null;\r\n var toX = nodePropertiesIndexedById[edge.toNode] ? nodePropertiesIndexedById[edge.toNode].X : null;\r\n var toY = nodePropertiesIndexedById[edge.toNode] ? nodePropertiesIndexedById[edge.toNode].Y : null;\r\n drawLine(fromX, fromY, toX, toY, defaultLineStrokeWeight, defaultLineRgb);\r\n }\r\n\r\n // Render nodes from the node index\r\n // All the node properties should be fetched from nodeProperties index\r\n for (var nodeId in nodesIndexedById) {\r\n var node = nodesIndexedById[nodeId];\r\n if (nodePropertiesIndexedById[nodeId]) {\r\n drawCircle(nodePropertiesIndexedById[nodeId].X,\r\n nodePropertiesIndexedById[nodeId].Y,\r\n circleRadius,\r\n defaultCircleStrokeWeight,\r\n nodePropertiesIndexedById[nodeId].rgb);\r\n // Text should be center aligned and on the top of the circle\r\n var textX = nodePropertiesIndexedById[nodeId].X - pixel_factor*node.name.length;\r\n var textY = nodePropertiesIndexedById[nodeId].Y - (circleRadius + textGap);\r\n drawText(node.name, textX, textY, defaultTextSize, defaultTextRgb);\r\n }\r\n }\r\n }\r\n \r\n function nodeUnderMouse(mouseX, mouseY) {\r\n // First, whatever the conditions, reset the rgb of the last node which was under mouse\r\n if (lastNodeUnderMouseProps.nodeId) {\r\n var nodeId = lastNodeUnderMouseProps.nodeId;\r\n var highlightedChildren = lastNodeUnderMouseProps.highlightedChildrenIds;\r\n // Check if nodeUnderMouse has UI control or not\r\n if (!nodePropertiesIndexedById[nodeId].blockNodeUnderMouse) {\r\n nodePropertiesIndexedById[nodeId].rgb = null;\r\n // Clear highlighted children also\r\n if (highlightedChildren) {\r\n for (var i=0; i<highlightedChildren.length; i++) {\r\n nodePropertiesIndexedById[highlightedChildren[i]].rgb = null;\r\n }\r\n }\r\n }\r\n }\r\n var targetNode = findNodeUnderMousePointer(mouseX, mouseY, circleRadius);\r\n // 2 possibilities\r\n\r\n // Mouse over a node\r\n // Change the rgb setting of the node (mouseOverCircleHighlightedRgb) renderGraph() will take care of the rest\r\n if (targetNode) {\r\n nodeId = targetNode.id;\r\n if (!nodePropertiesIndexedById[nodeId].blockNodeUnderMouse) {\r\n // Save the current node properties which is under the mouse\r\n lastNodeUnderMouseProps.nodeId = nodeId;\r\n nodePropertiesIndexedById[nodeId].rgb = mouseOverCircleHighlightedRgb;\r\n performCircleHoverOperation(nodeId);\r\n }\r\n }\r\n\r\n // Mouse is in empty space\r\n // Do nothing\r\n // renderGraph() will redraw the node since we have already reset the rgb of the lastNodeIdUnderMouse\r\n }\r\n\r\n function nodeClickedByMouse(mouseX, mouseY) {\r\n // findNodeUnderMousePointer()\r\n var targetNode = findNodeUnderMousePointer(mouseX, mouseY, circleRadius);\r\n // 2 possibilities\r\n\r\n // Mouse clicked on node\r\n // Change the rgb setting of the node (mouseClickedHighlightedRgb) renderGraph() will take care of the rest\r\n // Add this node to the node click sequence\r\n // Trigger node operations (they will check for the edit mode and perform their work)\r\n if (targetNode) {\r\n var nodeId = targetNode.id;\r\n // Block control to relevant UI handlers\r\n nodePropertiesIndexedById[nodeId].blockNodeUnderMouse = true;\r\n // Save this node to the node clicked sequence\r\n nodeIdsClickSequence.push(nodeId);\r\n nodePropertiesIndexedById[nodeId].rgb = mouseClickedCircleHighlightedRgb;\r\n\r\n // --------------------------------------------------- |||| --------------------------------------------------------\r\n // Perform node click mode operation\r\n performCircleClickOperation();\r\n }\r\n\r\n // Mouse clicked on emtpy space\r\n // Do nothing\r\n // Please do hard reset of click tracking via toggle switch change\r\n }\r\n\r\n // Geometric calculations\r\n \r\n // Build X, Y coordinates for all the nodes\r\n function buildXandYOrdinates() {\r\n // Traverses the traversalLevels array and generates X and Y ordinates for the nodes\r\n for (var i=0; i<traversalLevels.length; i++) {\r\n var currentLevel = i;\r\n var currentLevelNodes = traversalLevels[i];\r\n var numOfCirAtCurrLevel = currentLevelNodes.length;\r\n // Assign X coordinate for each node\r\n for (var j=0; j<numOfCirAtCurrLevel; j++) {\r\n var currentCircleId = currentLevelNodes[j];\r\n if (!nodePropertiesIndexedById[currentCircleId]) {\r\n nodePropertiesIndexedById[currentCircleId] = {};\r\n }\r\n nodePropertiesIndexedById[currentCircleId]['X'] = (currentLevel + 1)*horizontalSeparation;\r\n // Now assign Y ordinate\r\n // Note: Y is measured from top left\r\n // Check if this level contains even number of nodes or odd\r\n if (numOfCirAtCurrLevel % 2 == 0) {\r\n var lowestOrdinateOfCircles = canvasHeight/2 - \r\n ((numOfCirAtCurrLevel/2)*nodeGap + (numOfCirAtCurrLevel-1)*circleRadius);\r\n nodePropertiesIndexedById[currentCircleId]['Y'] = lowestOrdinateOfCircles + j*(nodeGap + circleDiameter);\r\n } else {\r\n var lowestOrdinateOfCircles = canvasHeight/2 - (((numOfCirAtCurrLevel-1)/2)*(nodeGap + circleDiameter));\r\n nodePropertiesIndexedById[currentCircleId]['Y'] = lowestOrdinateOfCircles + j*(nodeGap + circleDiameter);\r\n }\r\n // Also save the level of the current circle\r\n nodePropertiesIndexedById[currentCircleId]['level'] = currentLevel;\r\n }\r\n }\r\n }\r\n\r\n function assignOrdinatesToOrphanNodes() {\r\n // Find out the nodes which could not be reached from directed path by buildXandYOrdinates()\r\n // and assigns them X and Y based on lastOrphanX and minimumY\r\n \r\n // Traverse all the nodes and compute minimumY\r\n for (var key in nodePropertiesIndexedById) {\r\n if (nodePropertiesIndexedById[key].Y) {\r\n if (mimimumY == null) {\r\n minimumY = nodePropertiesIndexedById[key].Y;\r\n } else {\r\n minimumY = nodePropertiesIndexedById[key].Y > minimumY ? minimumY : nodePropertiesIndexedById[key].Y;\r\n }\r\n }\r\n }\r\n // This is the extreme case where all nodes are orphans\r\n if (minimumY == null) {\r\n minimumY = 0;\r\n }\r\n for (var nodeId in nodesIndexedById) {\r\n if (!nodePropertiesIndexedById[nodeId]) {\r\n nodePropertiesIndexedById[nodeId] = {};\r\n }\r\n if (!nodePropertiesIndexedById[nodeId].X) {\r\n lastOrphanX = lastOrphanX + horizontalSeparation;\r\n nodePropertiesIndexedById[nodeId]['X'] = lastOrphanX;\r\n nodePropertiesIndexedById[nodeId]['Y'] = minimumY + 2*verticalSeparation;\r\n nodePropertiesIndexedById[nodeId]['orphan'] = true;\r\n nodePropertiesIndexedById[nodeId]['rgb'] = defaultCircleRgb;\r\n }\r\n }\r\n }\r\n\r\n // UI Enhancement Functions\r\n function highlightPath(nodeId) {\r\n if (!lastNodeUnderMouseProps.highlightedChildrenIds) {\r\n lastNodeUnderMouseProps.highlightedChildrenIds = [];\r\n }\r\n var childNodes = fromNodePathToNodes[nodeId];\r\n if (childNodes) {\r\n for (var i=0; i<childNodes.length; i++) {\r\n // Save the highlighted nodes so that we can clear it in the next iteration\r\n lastNodeUnderMouseProps.highlightedChildrenIds.push(childNodes[i]);\r\n nodePropertiesIndexedById[childNodes[i]].rgb = futurePathCircleHighlightRgb;\r\n }\r\n }\r\n }\r\n\r\n // Drawing functions\r\n\r\n // Draw circle\r\n function drawCircle(X, Y, radius, strokeweight, customRgb) {\r\n if (!(customRgb && Array.isArray(customRgb) && customRgb.length == 3)) {\r\n customRgb = defaultCircleRgb;\r\n }\r\n if (!strokeweight) {\r\n strokeweight = defaultCircleStrokeWeight;\r\n }\r\n if (X && Y && radius) {\r\n processing.fill(customRgb[0], customRgb[1], customRgb[2]);\r\n processing.strokeWeight(strokeweight);\r\n processing.stroke(customRgb[0], customRgb[1], customRgb[2]);\r\n processing.ellipse(X, Y, radius*2, radius*2);\r\n }\r\n }\r\n\r\n // Draw line\r\n function drawLine(fromX, fromY, toX, toY, strokeweight, customRgb) {\r\n if (!(customRgb && Array.isArray(customRgb) && customRgb.length == 3)) {\r\n customRgb = defaultLineRgb;\r\n }\r\n if (!strokeweight) {\r\n strokeweight = defaultLineStrokeWeight;\r\n }\r\n if (fromX && fromY && toX && toY) {\r\n processing.strokeWeight(strokeweight);\r\n processing.stroke(customRgb[0], customRgb[1], customRgb[2]);\r\n processing.line(fromX, fromY, toX, toY);\r\n }\r\n }\r\n\r\n // Draw text\r\n function drawText(text, X, Y, size, customRgb) {\r\n if (!(customRgb && Array.isArray(customRgb) && customRgb.length == 3)) {\r\n customRgb = defaultTextRgb;\r\n }\r\n if (!size) {\r\n size = defaultTextSize;\r\n }\r\n if (X && Y && text) {\r\n processing.fill(customRgb[0], customRgb[1], customRgb[2]);\r\n processing.textSize(size);\r\n processing.text(text, X, Y);\r\n }\r\n }\r\n\r\n function toggleSwitchChangePreparation() {\r\n resetStateVariables(1);\r\n nodeTraversalAndPlacement();\r\n }\r\n\r\n function displayError(errorMsg) {\r\n $(messageBox).removeClass('green-background');\r\n $(messageBox).val(errorMsg);\r\n $(messageBox).addClass('red-background');\r\n }\r\n\r\n function displayRegularMessage(message) {\r\n $(messageBox).removeClass('red-background');\r\n $(messageBox).val(message);\r\n $(messageBox).addClass('green-background');\r\n }\r\n\r\n // Toggle Switch Event Listeners\r\n $(addChildToggleSwitch).change(\r\n function(ev) {\r\n toggleSwitchChangePreparation();\r\n });\r\n $(addLinkToggleSwitch).change(\r\n function(ev) {\r\n toggleSwitchChangePreparation();\r\n });\r\n $(removeLinkToggleSwitch).change(\r\n function(ev) {\r\n toggleSwitchChangePreparation();\r\n });\r\n $(highlightNextPathToggleSwitch).change(\r\n function(ev) {\r\n toggleSwitchChangePreparation();\r\n });\r\n $(removeNodeToggleSwitch).change(\r\n function(ev) {\r\n toggleSwitchChangePreparation();\r\n });\r\n $(editNodeToggleSwitch).change(\r\n function(ev) {\r\n toggleSwitchChangePreparation();\r\n });\r\n\r\n // Button Update Listeners\r\n // Update the node/edge atrributes from the given form\r\n $(updateNodeButton).click(\r\n function(ev) {\r\n if (isEditMode(\"editNode\")) {\r\n recoverDataFromSideBar();\r\n }\r\n });\r\n\r\n // GET GRAPH\r\n $(fetchGraphButton).click(\r\n function(ev) {\r\n if (isEditMode(\"editNode\")) {\r\n var graphName = $(graphNameDom).val();\r\n var graphVersion = $(graphVersionDom).val();\r\n var graphUrl = $(graphUrlDom).val();\r\n if (graphUrl && graphName && graphVersion) {\r\n $.ajax({\r\n method: \"GET\",\r\n url: graphUrl + graphName + \"/\" + graphVersion + \"?complete=true\",\r\n success: function(response) {\r\n if (response) {\r\n graphInfo = response;\r\n nodeTraversalAndPlacement(1);\r\n synced = true;\r\n }\r\n },\r\n error: function(error) {\r\n console.log(error);\r\n }\r\n });\r\n }\r\n }\r\n });\r\n\r\n // SAVE GRAPH\r\n $(saveGraphButton).click(\r\n function(ev) {\r\n var graphUrl = $(graphUrlDom).val();\r\n // We always update the graph only\r\n // Currently we do not support creating a new graph\r\n if (graphInfo.id && graphInfo.name && graphInfo.version && synced) {\r\n $.ajax({\r\n method: \"PUT\",\r\n url: graphUrl,\r\n dataType: \"json\",\r\n contentType: \"application/json; charset=utf-8\",\r\n data: JSON.stringify(graphInfo),\r\n success: function(response) {\r\n if (response) {\r\n //console.log(response);\r\n graphInfo = response;\r\n nodeTraversalAndPlacement(1);\r\n }\r\n },\r\n error: function(error) {\r\n console.log(error);\r\n }\r\n });\r\n }\r\n }\r\n );\r\n\r\n // Extra Tools\r\n // Capture canvas as a PNG at current screen resolution\r\n // In future, 5 times the current resolution snapshot support will be provided\r\n $(snapshotCanvas).click(\r\n function(ev) {\r\n var img = holderCanvas.toDataURL(\"image/png\");\r\n $('#capturedCanvasImage').html('<img src=\"' + img + '\"/>');\r\n });\r\n}", "title": "" }, { "docid": "733113874aa627fedbd0fc3edca3a575", "score": "0.5501281", "text": "function setup() { \n createCanvas (windowWidth, windowHeight);\n //textAlign (CENTER,CENTER); //translated\n}", "title": "" }, { "docid": "091c8b8c147255107f6016945a4c0438", "score": "0.54971045", "text": "function setup(p){\n\n}", "title": "" }, { "docid": "72869570f596f0cd77a4dbb632da30eb", "score": "0.5495699", "text": "function setup() {\n \n createCanvas(500, 500, WEBGL);\n message = createGraphics(500, 500);\n message.textAlign(CENTER);\n message.textSize(12);\n\n message.text(now.text.season, 25, 25); // <--- Layout of Messages going around the 3D Primitive\n message.text(now.text.time, 50, 50);\n message.text(now.text.time, 75, 75);\n message.text(now.text.time, 100, 100);\n message.text(now.text.time, 125, 125);\n message.text(now.text.time, 150, 150);\n message.text(now.text.month, 175, 175); \n message.text(now.text.weekday, 200, 200);\n message.text(now.text.date, 225, 225);\n message.fill(255,0,0);\n message.text(moment().format('MMMM Do YYYY, h:mm:ss a'), 250, 250);\n message.fill(0,0,0);\n message.text(now.text.time, 275, 275);\n message.text(now.text.time, 300, 300);\n message.text(now.text.time, 325, 325);\n message.text(now.text.time, 350, 350);\n message.text(now.text.time, 375, 375); \n message.text(now.text.time, 400, 400);\n message.text(now.text.time, 425, 425);\n message.text(now.text.time, 450, 450);\n}", "title": "" }, { "docid": "94148ddab6844950bbc231991dc195c3", "score": "0.5491677", "text": "function main() {\n addHeadings();\n styleTutorialsAndArticles();\n separateAllTutorials();\n}", "title": "" }, { "docid": "e66b6cca1e6f1eb9589dcb2aae19a68f", "score": "0.54876083", "text": "function setup () {\n createCanvas(screen.width, screen.height); // This is the interface on which the user of the weppage will see the result of whether the current year is a loop year or not.\n}", "title": "" }, { "docid": "7d47f313e7625afd249044fd34b4159a", "score": "0.54839814", "text": "function setup() { \r\n // -------------------------Sliders-------------------------//\r\n \r\n //widthWaves Slider\r\n let s = 'The quick brown fox jumped over the lazy dog.';\r\n fill(50);\r\n text(s, 10, 10, 70, 80); // Text wraps within text box\r\n widthWaves = createSlider(12, 120, 12);\r\n widthWaves.position(50, 50);\r\n widthWaves.style('width', '80px')\r\n\r\n //Angular Velocity Slider\r\n thetaSlider = createSlider(1, 30, 1);\r\n thetaSlider.position(50, 150);\r\n thetaSlider.style('width', '80px');\r\n\r\n //-------------------------Canvas-------------------------//\r\n \r\n let theCanvas = createCanvas(width, height, WEBGL);\r\n theCanvas.parent('container'); //Make sure canvas and container size are the same so canvas is centered on screen\r\n\r\n w = width + 16;\r\n dx = (TWO_PI * 2 / period) * xspacing;\r\n yvalues = new Array(floor(w / xspacing));\r\n}", "title": "" }, { "docid": "ea11f4995ec49b1227adbeee39ffc627", "score": "0.54835427", "text": "function setup() {\n\n\n}", "title": "" }, { "docid": "ea11f4995ec49b1227adbeee39ffc627", "score": "0.54835427", "text": "function setup() {\n\n\n}", "title": "" }, { "docid": "68d5630bf1498fd85588eb9478b72098", "score": "0.5482334", "text": "function setup() {\n createCanvas(640,480);\n\n background(0,0,0);\n\n noStroke();\n\n // body\n fill(70, 94, 68);\n ellipse(320,480,300,200);\n\n // head\n fill(225, 235, 28);\n ellipse(320,240,250,350);\n ellipse(320,60,40,35);\n\n //eyes\n fill(255,255,255);\n ellipse(260,240,70,25);\n ellipse(260,240,70,25);\n ellipse(390,240,70,25);\n fill(0);\n ellipse(260,240,5,5);\n ellipse(390,240,5,5);\n\n //nostrils\n fill(0);\n ellipse(290,300,15,15);\n ellipse(350,300,15,15);\n\n //mouth\n fill(117, 48, 68);\n stroke(0);\n ellipse(320,390,20,20);\n\n}", "title": "" }, { "docid": "78e7544480f82581fefb0ba9c5225a43", "score": "0.5480842", "text": "function setup(){\n // get started with a canvas & a line\n createCanvas(640, 480);\n line(15, 25, 70, 90);\n}", "title": "" }, { "docid": "24de5ac7c4c9ffacde4a981948e5e209", "score": "0.54803646", "text": "function writeInstructions() {\n noStroke();\n fill(252, 118, 172);\n textSize(54)\n text('my name is', width / 2, height / 3)\n text('i was born in', width / 2, height * 1 / 2);\n textSize(25);\n text('click on your sign to get your horoscope!', width / 2, height * 2 / 3)\n}", "title": "" }, { "docid": "3a08103a519247f817a2837d5c352bcf", "score": "0.5477192", "text": "function processingText() {\n\t\treturn 'Processing';\n\t}", "title": "" }, { "docid": "a07506c04316a4a18797f568d2050862", "score": "0.54669005", "text": "function runit() {\n var prog = simple_coding.getTextArea().value;\n console.log(\"************code\"+prog)\n var mypre = document.getElementById(\"output\");\n console.log(\"************mypre \"+mypre)\n\n mypre.innerHTML = '';\n Sk.pre = \"output\";\n // console.log(\"-----------------1\")\n Sk.configure({output:outf, read:builtinRead});\n // console.log(\"-----------------2\" +Sk.TurtleGraphics)\n // console.log(\"-----------------3\" +Sk.TurtleGraphics)\n\n (Sk.TurtleGraphics || (Sk.TurtleGraphics = {})).target = 'mycanvas';\n var myPromise = Sk.misceval.asyncToPromise(function() {\n return Sk.importMainWithBody(\"<stdin>\", false, prog, true);\n });\n myPromise.then(function(mod) {\n console.log('success');\n },\n function(err) {\n console.log(err.toString());\n });\n }", "title": "" }, { "docid": "e76606be7ef09c1736919ae7c5c9e2dd", "score": "0.5464888", "text": "function setup() {\r\n //Create a canvas of a particular size\r\n createCanvas(windowHeight,windowWidth);\r\n\r\n background(255,0,255);\r\n\r\n //Drawing shapes\r\n fill(255,255,255);\r\n stroke(255,255,0);\r\n strokeWeight(10);\r\n //(x,y,diameter)\r\n ellipse(200,100,100);\r\n rect(150,150,100,200);\r\n}", "title": "" }, { "docid": "eac7e828563a74c0d8fda02e827c3e68", "score": "0.54624534", "text": "function princeCharming() { /* ... */ }", "title": "" }, { "docid": "9655889c4567a1beb69bef0d64a258f5", "score": "0.54623866", "text": "function process(input) {\n if (input == \"triangle\") { shape = \"triangle\"; updateCanvas(input); return \"Your complex shape simplifies and you display proudly your three sides.\" + \"<br>\"; }\n\telse if (input == \"square\") { shape = \"square\"; updateCanvas(input);}\n\telse if (input == \"circle\") { shape = \"circle\"; updateCanvas(input);}\n\telse if (input == \"octagon\") { shape = \"octagon\"; updateCanvas(input);}\n\telse if (input == \"ngon\") { shape = \"ngon\"; return \"Your already numerous faces multiply at an alarming rate. Do something about it.\";}\n else if (input == \"pink\") { color = \"pink\"; $('body').css('background-color', 'pink');}\n\telse if (input == \"exit\") { return \"There is no exit, only more shapes\" + \"<br>\" + \"\"; }\n\telse if (input == \"help\") { return \"To help you, here is a list of usefull commands:\";}\n\telse { shape = \"none\"; return \"<strong>\" + input + \"</strong> is a pretty complex shape, so complex that your body slowly <strong>disintegrates</strong> into pure matter. Quick, pick another one.\"; }\n}", "title": "" }, { "docid": "205181548b1f6ba02a772493cf043cba", "score": "0.54617983", "text": "function setup() {\n createCanvas(500, 500); //Size of our sketch's window\n}", "title": "" }, { "docid": "7709507c04fb70818cddc17c1e7e5d5b", "score": "0.5456929", "text": "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}", "title": "" }, { "docid": "897f0dcbe4d8790f2b521c2ab824034c", "score": "0.54551554", "text": "function setup() {\n\n}", "title": "" }, { "docid": "897f0dcbe4d8790f2b521c2ab824034c", "score": "0.54551554", "text": "function setup() {\n\n}", "title": "" }, { "docid": "897f0dcbe4d8790f2b521c2ab824034c", "score": "0.54551554", "text": "function setup() {\n\n}", "title": "" }, { "docid": "897f0dcbe4d8790f2b521c2ab824034c", "score": "0.54551554", "text": "function setup() {\n\n}", "title": "" }, { "docid": "f3e4681e33433d62d5f42ad5a4528f54", "score": "0.5454656", "text": "function setup() {\n\t//Canvas Size\n\tcreateCanvas(500, 400);\n\t//background color\n\tbackground(200);\n\n\t//set colors\n\tfill(204, 101, 192);\n\tstroke(127, 63, 120);\n\n\t//Shapes\n\tellipse(x[0], y[0], 100, 100);\n\tellipse(x[1], y[1], 100, 100);\n\tellipse(x[2], y[2], 100, 100);\n\tellipse(x[3], y[3], 100, 100);\n\tellipse(x[4], y[4], 100, 100);\n}", "title": "" }, { "docid": "45785539ee934be12f6f8f134b2094c4", "score": "0.54515684", "text": "function about() {\n alert(\"Shellsort Algorithm Visualization\\nWritten by Nayef Copty, Mauricio De la Barra, Daniel Breakiron, and Cliff Shaffer\\nCreated as part of the OpenDSA hypertextbook project\\nFor more information, see http://opendsa.org.\\nSource and development history available at\\nhttps://github.com/cashaffer/OpenDSA\\nCompiled with JSAV library version \" + JSAV.version());\n }", "title": "" }, { "docid": "24f8360ba3be28fd9b526a8e86415d03", "score": "0.54503703", "text": "function setup() {\r\n\r\n //All divs are called\r\n //\r\n //Clear Screen\r\n $clearScreen = $(\"#cleared\");\r\n // Hide\r\n $clearScreen.hide();\r\n // Display sentence\r\n $sentenceDisplayed = $(\"#sentenceDisplay\");\r\n // Droppable Box Variable\r\n $droppableBox = $(\"#droppable\");\r\n // Title screen\r\n $titleScreen = $(\"#titleScreen\");\r\n // Clicking allows for project to start\r\n $titleScreen.click(start);\r\n\r\n //List of Words\r\n //\r\n // I\r\n wordObjects.push(new Word(100, 200, 1, 0, \"I\", 150, 0));\r\n // AM\r\n wordObjects.push(new Word(500, 85, -1, 0, \"AM\", 1050, 1));\r\n // SORRY\r\n wordObjects.push(new Word(990, 310, 1, 0, \"SORRY\", 800, 2));\r\n // WAS\r\n wordObjects.push(new Word(105, 325, -5, 0, \"WAS\", 1050, 3));\r\n // WRONG\r\n wordObjects.push(new Word(900, 85, 5, 0, \"WRONG\", 3000, 4));\r\n // LOVE\r\n wordObjects.push(new Word(0, 250, -1, 0, \"LOVE\", 800, 5));\r\n // YOU\r\n wordObjects.push(new Word(1000, 130, 4, 0, \"YOU\", 1050, 6));\r\n // NEED\r\n wordObjects.push(new Word(-8, 200, -3, 0, \"NEED\", 1050, 7));\r\n // HELP\r\n wordObjects.push(new Word(580, 270, 3, 0, \"HELP\", 3000, 8));\r\n // PLEASE\r\n wordObjects.push(new Word(700, 325, -3, 0, \"PLEASE\", 3000, 9));\r\n // STOP\r\n wordObjects.push(new Word(-8, 120, 2, 0, \"STOP\", 800, 10));\r\n // WANT\r\n wordObjects.push(new Word(500, 300, 5, 0, \"WANT\", 1050, 11));\r\n // THIS\r\n wordObjects.push(new Word(300, 345, 1, 0, \"THIS\", 1050, 12));\r\n // IN\r\n wordObjects.push(new Word(1380, 330, 5, 0, \"IN\", 1050, 13));\r\n // MY\r\n wordObjects.push(new Word(300, 160, 5, 0, \"MY\", 1050, 14));\r\n // OPINION\r\n wordObjects.push(new Word(800, 250,4, 0, \"OPINION\", 3000, 15));\r\n // DISAGREE\r\n wordObjects.push(new Word(700, 150, 3, 0, \"DISAGREE\", 3000, 16));\r\n //\r\n // // Decoy\r\n wordObjects.push(new Word(0, 290, 10, 0, \"DO\", 1050, 17));\r\n wordObjects.push(new Word(450, 130, -5, 0, \"NOT\", 1050, 18));\r\n wordObjects.push(new Word(990, 270, -10, 0, \"KNOW\", 800, 19));\r\n wordObjects.push(new Word(105, 250, -9, 0, \"HOW\", 1050, 20));\r\n wordObjects.push(new Word(900, 130, -10, 0, \"TO\", 3000, 21));\r\n wordObjects.push(new Word(0, 220, -5, 0, \"SURE\", 800, 22));\r\n wordObjects.push(new Word(1000, 260, -1, 0, \"IS\", 1050, 23));\r\n wordObjects.push(new Word(-8, 240, -10, 0, \"IT\", 1050, 24));\r\n wordObjects.push(new Word(580, 345, -5, 0, \"INCORRECT\", 3000, 25));\r\n wordObjects.push(new Word(700, 85, 1, 0, \"UNSURE\", 3000, 26));\r\n wordObjects.push(new Word(-8, 150, -10, 0, \"INSECURE\", 800, 27));\r\n wordObjects.push(new Word(500, 180, -2, 0, \"IMPOSTER\", 1050, 28));\r\n wordObjects.push(new Word(300, 290, 10, 0, \"FRAUD\", 1050, 29));\r\n wordObjects.push(new Word(1380, 230, 1, 0, \"UNFORGIVABLE\", 1050, 30));\r\n wordObjects.push(new Word(300, 245, 10, 0, \"CAN\", 1050, 31));\r\n wordObjects.push(new Word(800, 300, -3, 0, \"LIAR\", 3000, 32));\r\n wordObjects.push(new Word(700, 110, -5, 0, \"DISHONEST\", 3000, 33));\r\n\r\n}", "title": "" }, { "docid": "2221cb07a1096fbec5559b895edfc4bd", "score": "0.54415244", "text": "function setup() { \n createCanvas(600, 400);\n\n}", "title": "" }, { "docid": "027d4f66ebb9844141af5a404df1a827", "score": "0.54410636", "text": "function setup() {\n\t// graphics stuff:\n\tcreateCanvas(800, 400);\n\tbackground(255, 255, 255);\n\tfill(0, 0, 0, 255);\n\t// instructions:\n\ttextSize(32);\n\ttextAlign(CENTER);\n\ttext(\"say something\", width / 2, height / 2);\n\tmyRec.onResult = showResult;\n\tmyRec.start();\n \n myVoice.speak(\"say something\");\n\n}", "title": "" }, { "docid": "471e20a27658cdaf59f43cd8f94e0d51", "score": "0.54393506", "text": "function setup() {\n createCanvas( 400, 300 );\n}", "title": "" }, { "docid": "14d789b9339904d979739e7f66fdbe6f", "score": "0.5436805", "text": "function draw() { // curly brackets contain a series of statements aka \"lines of code\".\n background(255); // the background() function sets background color\n ellipse(200, 200, 50, 50); //the ellipse function is used to draw an ellipse. Arguments are passed into the function to determine\n // location and size\n\n}", "title": "" }, { "docid": "562f8bbad1bf21b91236140fae19687e", "score": "0.5436514", "text": "function setup(){\r\n createP('');\r\n\r\n label1 = createElement('label', 'Station name: ');\r\n label1.parent(document.body);\r\n\r\n textBox1 = createInput('');\r\n\r\n createP('');\r\n\r\n button1 = createButton('停');\r\n button1.size(140, 140);\r\n button1.style('font-size', '72px');\r\n button1.mousePressed(button1_Clicked);\r\n\r\n button2 = createButton('開');\r\n button2.size(140, 140);\r\n button2.style('font-size', '72px');\r\n button2.mousePressed(button2_Clicked);\r\n\r\n createP('');\r\n\r\n button3 = createButton('過');\r\n button3.size(140, 140);\r\n button3.style('font-size', '72px');\r\n button3.mousePressed(button3_Clicked);\r\n\r\n button4 = createButton('miss');\r\n button4.size(140, 140);\r\n button4.style('font-size', '40px');\r\n button4.mousePressed(button4_Clicked);\r\n\r\n createP('');\r\n\r\n label2 = createElement('label', '備註: ');\r\n label2.parent(document.body);\r\n\r\n textBox2 = createInput('');\r\n\r\n createP('');\r\n\r\n button5 = createButton('交會車次');\r\n button5.size(280, 23);\r\n button5.style('font-size', '14px');\r\n button5.mousePressed(button5_Clicked);\r\n\r\n createP('');\r\n\r\n button6 = createButton('結束行程');\r\n button6.size(280, 23);\r\n button6.style('font-size', '14px');\r\n button6.mousePressed(button6_Clicked);\r\n}", "title": "" }, { "docid": "6740e7c905667dc887c5ef13ad66e5cd", "score": "0.54345363", "text": "function LanguageUnderstandingModel() {\n }", "title": "" }, { "docid": "fb93a706f3294146734800220c1446d7", "score": "0.54201907", "text": "function setup() {\n //Print a message to the console - to view using Chrome:\n //View > Developer > Developer Tools > Console\n console.log(\"Initialisation:A OK\")\n createCanvas(1000,1000);\n\n frameRate(60);\n\n textSize(100)\n textAlign(CENTER)\n\n fill(255,0,0)\n rect(width/2, height/2, 20, 50);\n}", "title": "" }, { "docid": "110d451b23f3b1bc9666271debc88c68", "score": "0.5416762", "text": "function draw() {\n\n//make sandbox and turn of cursor\n\n push();\n\n noCursor();\n translate( mouseX, mouseY );\n fill( 0, 0, 255 );\n ellipse( posX, posY, 80 );\n\n\n//Write 'blue dot' text in ellipse and color ellipse and text\n\n fill( 255, 0, 0 );\n text( global_var, -25, 0 );\n\n pop();\n\n//create square in a new sandbox\n//add new text with local_variable\n\n push();\n\n translate( mouseX, mouseY );\n fill( 255, 0, 0 );\n rect(25, 25, 75, 75 );\n fill( 0, 0, 255 );\n let squareText = \"Red Square\";\n text( squareText, 30, 60 );\n\n pop();\n}", "title": "" }, { "docid": "32e54104035a0c0b6e22f13c2bf8b64f", "score": "0.54115236", "text": "function setup() {\n\tcreateCanvas(1000, 1000);\n\tbackground(255);\n\ttextAlign(CENTER, CENTER);\n}", "title": "" }, { "docid": "599dd6ba24ccb21d56bd8cc0b8adf3a8", "score": "0.5406727", "text": "function sketch(p) {\n let canvas;\n let program = {};\n let framesData;\n\n p5Program.start = function(){\n isGenerating = true;\n framesData = [];\n\n program.wordsListsArray = p5Program.configs.wordsListsArray;\n program.lineIndex = 0;\n program.wordIndex = -1; // before 1st word\n program.goingToNextLine = false;\n program.waitCountdown = END_LINE_WAIT*3; // initial wait\n program.horizontalScrollMark = 0;\n program.previousScrollMark = 0;\n program.scrollProgress = 999;\n\n // setup configs\n p.createCanvas(_WIDTH, _WIDTH * p5Program.configs.canvasHeightFactor); \n p.textFont(p5Program.configs.fFamily, 10);\n\n p.loop();\n }\n\n function stopAndPassFrames(){\n p.noLoop();\n\n generateVideo(\n framesData,\n p5Program.configs.id\n )\n }\n\n p.setup = () => {\n canvas = p.createCanvas(480, 480);\n p.frameRate(999);\n p.noStroke();\n\n p.noLoop();\n }\n function _(num, isHeight) { return num/100 * (isHeight? p.height : p.width); }\n p.draw = () => {\n if (!p5Program.configs) {\n p.noLoop();\n return;\n }\n\n p.textSize(_(p5Program.configs.fSize));\n p.textAlign(p.LEFT, p.TOP);\n\n p.background(p5Program.configs.bgColor);\n\n p.push();\n renderTextsPlaying();\n p.pop();\n\n renderFader();\n renderName();\n\n framesData.push(canvas.canvas.toDataURL(\"image/jpeg\"));\n };\n\n function renderFader(){\n p.strokeWeight(1);\n for (let i = p.height/2; i >= 0; i -= 0.5){\n const strokeColor = p.color(p5Program.configs.bgColor);\n strokeColor.setAlpha(255 - p.map(i, 0, p.height/2, 0, 255));\n p.stroke(strokeColor);\n p.line(0, i, p.width, i);\n }\n p.noStroke();\n }\n\n function renderTextsPlaying() {\n const masterArr = program.wordsListsArray;\n let currentLine = masterArr[program.lineIndex];\n p.textSize(_(p5Program.configs.fSize));\n\n // vertical scroll animation\n if (program.goingToNextLine){\n const animationProgress = p.map(\n program.waitCountdown, \n 0, GET_NEXT_LINE_DURATION(p5Program.configs.scrollSpeed),\n 0, Math.PI/2\n );\n p.translate(0, -_(p.cos(animationProgress) * p5Program.configs.verticalSpacing * program.scrollLinesAmount));\n }\n\n // horizontal scroll animation\n const nextHorizontalScrollDuration = GET_NEXT_LINE_DURATION(p5Program.configs.scrollSpeed, true);\n if (program.scrollProgress < nextHorizontalScrollDuration) program.scrollProgress++;\n const animationProgress = p.map(\n nextHorizontalScrollDuration - program.scrollProgress, \n 0, nextHorizontalScrollDuration,\n 0, Math.PI/2\n );\n const DISTANCE = program.horizontalScrollMark - program.previousScrollMark;\n p.translate(-p.cos(animationProgress) * DISTANCE, 0);\n\n // static horizontal & vertical scroll\n p.translate(-program.previousScrollMark, _(50, true));\n\n const lastLineWidth = p.textWidth(currentLine.slice(0, program.wordIndex + 1).join(\" \"));\n // popping text is out of screen? => update mark\n if (lastLineWidth > program.horizontalScrollMark + _(LIMIT_WIDTH + 5)) {\n program.previousScrollMark = program.horizontalScrollMark; // going next\n program.horizontalScrollMark = p.min(\n p.textWidth(currentLine) - _(LIMIT_WIDTH - 5), \n program.horizontalScrollMark + _(60)\n );\n program.scrollProgress = 0;\n }\n\n // render\n p.fill(p5Program.configs.textColor);\n for (let i=0; i <= program.lineIndex; i++){\n const wordsList = masterArr[program.lineIndex - i]; // inversed order\n let textLine;\n\n if (i === 0){ // current line?\n let blinkingLine = (p.frameCount % BLINK_DURATION < BLINK_DURATION/2) ? \"|\" : \"\";\n textLine = wordsList.slice(0, program.wordIndex + 1).join(\" \") + blinkingLine;\n }\n else textLine = wordsList.join(\" \");\n\n textLine = textLine.replace(/_/g, ''); // remove all _\n p.text(\n textLine,\n _(LEFT_PADDING),\n - _(p5Program.configs.verticalSpacing * i)\n );\n }\n\n // done waiting? => next action\n if (--program.waitCountdown <= 0){\n // just moved to a new line?\n if (program.goingToNextLine){\n program.goingToNextLine = false; // reset\n program.lineIndex += program.scrollLinesAmount;\n program.wordIndex = -1;\n program.horizontalScrollMark = 0;\n program.previousScrollMark = 0;\n }\n\n // still has more words?\n else if (program.wordIndex < currentLine.length - 1){\n program.wordIndex++; // next word\n const word = currentLine[program.wordIndex];\n const customeWaitAmount = word.split(\"_\").length-1;\n const lettersAmount = word.length;\n const enders = [\",\", \".\", \";\", \"?\", \"!\"];\n const periodWait = (enders.includes(word[word.length - 1])) ? END_LINE_WAIT : 0;\n const LDF = GET_LETTER_DURATION_FACTOR(p5Program.configs.textSpeed);\n program.waitCountdown = periodWait + (4 + lettersAmount) * LDF + (customeWaitAmount * LDF * 10);\n\n // extra wait if is last word in the line\n if (program.wordIndex === currentLine.length - 1){\n program.waitCountdown += END_LINE_WAIT;\n\n // another extra wait if is last line\n if (program.lineIndex === masterArr.length - 1) program.waitCountdown += END_LINE_WAIT*3;\n }\n }\n\n // still has more lines? => set up next line animation\n else if (program.lineIndex < masterArr.length - 1){\n program.waitCountdown = GET_NEXT_LINE_DURATION(p5Program.configs.scrollSpeed);\n program.goingToNextLine = true;\n \n // count empty lines to scroll past\n program.scrollLinesAmount = 1;\n let leadingToEmptiness = true;\n for (let i = program.lineIndex + 1; i < masterArr.length; i++){\n if (masterArr[i][0].length === 0) program.scrollLinesAmount++;\n else {\n leadingToEmptiness = false;\n break;\n }\n }\n // prevent crash\n if (leadingToEmptiness) program.scrollLinesAmount--;\n }\n\n // end of animation\n else stopAndPassFrames();\n }\n }\n\n function renderName(){\n let nameString = p5Program.configs.author;\n if (nameString.length !== 0) {\n p.textAlign(p.RIGHT, p.BOTTOM);\n p.textSize(_(5));\n p.fill(p5Program.configs.textColor);\n p.text(nameString, _(100 - _PADDING_), _(100 - _PADDING_, true));\n }\n }\n\n}", "title": "" }, { "docid": "a62468109bdd4e10212e14cdf9f691c5", "score": "0.5405452", "text": "function setup() {\n createCanvas(windowWidth, windowHeight);\n \n x = width/2; // width is a keyword that equals the width of the sketch in pixels\n y = height/2; // height is a keyword that equals the height of the sketch in pixels\n \n console.log('hi there!');\n console.log('i am ' + width + ' wide and ' + height + ' tall!');\n \n\n}", "title": "" }, { "docid": "a1766c813a016aa42c5a3e07cdac1b62", "score": "0.5404422", "text": "function prolog(hljs) {\n\n var ATOM = {\n\n begin: /[a-z][A-Za-z0-9_]*/,\n relevance: 0\n };\n\n var VAR = {\n\n className: 'symbol',\n variants: [\n {begin: /[A-Z][a-zA-Z0-9_]*/},\n {begin: /_[A-Za-z0-9_]*/},\n ],\n relevance: 0\n };\n\n var PARENTED = {\n\n begin: /\\(/,\n end: /\\)/,\n relevance: 0\n };\n\n var LIST = {\n\n begin: /\\[/,\n end: /\\]/\n };\n\n var LINE_COMMENT = {\n\n className: 'comment',\n begin: /%/, end: /$/,\n contains: [hljs.PHRASAL_WORDS_MODE]\n };\n\n var BACKTICK_STRING = {\n\n className: 'string',\n begin: /`/, end: /`/,\n contains: [hljs.BACKSLASH_ESCAPE]\n };\n\n var CHAR_CODE = {\n\n className: 'string', // 0'a etc.\n begin: /0\\'(\\\\\\'|.)/\n };\n\n var SPACE_CODE = {\n\n className: 'string',\n begin: /0\\'\\\\s/ // 0'\\s\n };\n\n var PRED_OP = { // relevance booster\n begin: /:-/\n };\n\n var inner = [\n\n ATOM,\n VAR,\n PARENTED,\n PRED_OP,\n LIST,\n LINE_COMMENT,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.APOS_STRING_MODE,\n BACKTICK_STRING,\n CHAR_CODE,\n SPACE_CODE,\n hljs.C_NUMBER_MODE\n ];\n\n PARENTED.contains = inner;\n LIST.contains = inner;\n\n return {\n name: 'Prolog',\n contains: inner.concat([\n {begin: /\\.$/} // relevance booster\n ])\n };\n}", "title": "" }, { "docid": "a1766c813a016aa42c5a3e07cdac1b62", "score": "0.5404422", "text": "function prolog(hljs) {\n\n var ATOM = {\n\n begin: /[a-z][A-Za-z0-9_]*/,\n relevance: 0\n };\n\n var VAR = {\n\n className: 'symbol',\n variants: [\n {begin: /[A-Z][a-zA-Z0-9_]*/},\n {begin: /_[A-Za-z0-9_]*/},\n ],\n relevance: 0\n };\n\n var PARENTED = {\n\n begin: /\\(/,\n end: /\\)/,\n relevance: 0\n };\n\n var LIST = {\n\n begin: /\\[/,\n end: /\\]/\n };\n\n var LINE_COMMENT = {\n\n className: 'comment',\n begin: /%/, end: /$/,\n contains: [hljs.PHRASAL_WORDS_MODE]\n };\n\n var BACKTICK_STRING = {\n\n className: 'string',\n begin: /`/, end: /`/,\n contains: [hljs.BACKSLASH_ESCAPE]\n };\n\n var CHAR_CODE = {\n\n className: 'string', // 0'a etc.\n begin: /0\\'(\\\\\\'|.)/\n };\n\n var SPACE_CODE = {\n\n className: 'string',\n begin: /0\\'\\\\s/ // 0'\\s\n };\n\n var PRED_OP = { // relevance booster\n begin: /:-/\n };\n\n var inner = [\n\n ATOM,\n VAR,\n PARENTED,\n PRED_OP,\n LIST,\n LINE_COMMENT,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.APOS_STRING_MODE,\n BACKTICK_STRING,\n CHAR_CODE,\n SPACE_CODE,\n hljs.C_NUMBER_MODE\n ];\n\n PARENTED.contains = inner;\n LIST.contains = inner;\n\n return {\n name: 'Prolog',\n contains: inner.concat([\n {begin: /\\.$/} // relevance booster\n ])\n };\n}", "title": "" }, { "docid": "43fa3c4492a0a16b3dc0cef5368ab876", "score": "0.5403957", "text": "function setup() {\n \n createCanvas(400, 400);\n}", "title": "" }, { "docid": "9e8e33cba84d0b406f55259de0f89f06", "score": "0.5398862", "text": "function draw() {\n\n /*setting up a background colour*/\n background(30,144,255);\n for (var i = 0; i < drops.length; i++) {\n /* functions that are defined in the Drop.js */\n drops[i].fall();\n drops[i].show();\n }\n \n\n /* defining the size of text thats to be displayed */\n textSize(80);\n textFont(\"Comic Sans MS\");\n fill(255);\n\n\n /* text thats to be displayed */\n text(\" Built with P5 JS\", 330, 325);\n \n\n \n \n}", "title": "" }, { "docid": "3831bfe12570875e65db9dc624199d42", "score": "0.53952897", "text": "function setup(){\n createCanvas(400, 400);\n}", "title": "" }, { "docid": "ed8460725cf6c67e0a6d33420f46f181", "score": "0.538915", "text": "function draw() {\n background(55); //Redraw the background, p5 does not automatically \"erase\" the screen automatically\n\n //All objects are drawn relative to the origin which is set to the top left of the screen by default\n //text(content, xPosition, yPosition)\n \n\n //Can draw shapes, images, lines, etc.\n\n\n}", "title": "" }, { "docid": "31f97bf797c48264631dfadf1ed1341b", "score": "0.538692", "text": "function setup() {\n\t// object containing P5 colors that are commonly reused\n\tcolors = {\n\t\tbg: color(40, 50, 60),\n\t\tbg_quad: color(220, 160, 80),\n\t\tbg_dark: color(20, 30, 40),\n\t\tr: color(200, 50, 50),\n\t\tbr: color(80, 50, 50),\n\t\tblk: color(0, 0, 0),\n\t\tpine: color(20, 50, 30),\n\t\tlt_bl: color(50, 100, 120),\n\t\tbl: color(80, 100, 120),\n\t\tg: color(45, 80, 50),\n\t\tpale_pink: color(180, 120, 120, 150),\n\t\tw: color(230, 230, 240)\n\t};\n\t// create canvas and assign to global variable cnv\n\t// canvas has width equal to half the window and height based on set aspect ratio\n\tcnv = createCanvas(window.innerWidth / 2, \n\t\twindow.innerWidth / 2 / 475 * 600);\n\t// position canvas so it occupies right half of screen\n\tcnv.position(window.innerWidth / 2, 0, \"absolute\");\n\t// initialize Shape obejcts to be drawn later\n\tinit_shapes();\n}", "title": "" }, { "docid": "32118051ffe0df5919c79fc28ead09c9", "score": "0.5386787", "text": "function setup() {\n createCanvas(710, 400);\n}", "title": "" }, { "docid": "54deec4cbd6bb77523b3b86fd591267e", "score": "0.53852665", "text": "function setup(){\n createCanvas(400, 400);\n}", "title": "" }, { "docid": "6a51ac8d1e80e3e423ec1ca696b85926", "score": "0.53778636", "text": "function about() {\n alert(\"Replacement Selection Proficiency Exercise\\nWritten by Josh Horn\\nCreated as part of the OpenDSA hypertextbook project\\nFor more information, see http://algoviz.org/OpenDSA\\nSource and development history available at\\nhttps://github.com/OpenDSA/OpenDSA\\nCompiled with JSAV library version \" + JSAV.version());\n }", "title": "" }, { "docid": "9694e9529115292afb73fbd5f5e0d510", "score": "0.5374211", "text": "function setup() {\n createCanvas(400, 400); //creates a canvas with 400x400 dimension\n\n}", "title": "" }, { "docid": "d9a69d37d54059b8ab44b9fbfd0387b7", "score": "0.5372088", "text": "function setup() {\n\n noCanvas();\n\n // Selecting the text field and button\n input = select('#textinput');\n button = select('#submit');\n // What to do when button pressed\n button.mousePressed(handleInput);\n\n loadStrings('files/rainbow.txt', fileLoaded);\n\n regexInput = select('#regex');\n globalCheck = select('#global');\n caseCheck = select('#case');\n}", "title": "" }, { "docid": "ac7d4b0fbefab5482e8171005ef5ac89", "score": "0.5370455", "text": "function sfProcessingClass() {\t// creates sfProcessing object\n\t//--- UNIT CONVERSION functions for various units that are referenced in Soundfonts (there's a lot!)\n\tvar uc = {\t\t// Unit Conversion: For combining SF parameters, or converting to WebAudio ones.\n\t\tcent_to_semitone: function(a) { return a/100; },\n\t\tsemitone_to_cent: function(a) { return a*100; },\n\t\tmidikey_to_hertz: function(a) { return Math.pow(2, (a - 69) / 12) * 440.0;},\n\t\thertz_to_midikey: function(a) { return (Math.log(a/440.0)/Math.log(2))*12+69; },\n\t\t\n\t};\n\t//--- FUNCTIONS assigned to various data types within sound fonts, so they can \"handle\" their own operations based on their type.\n\tvar combineParmsAdding = function(a,b,parmName) {\n\t\t//--- The combine parms routines are different ways of putting a parameter from b into a, where b can override a (e.g. b could be a preset and a could be an instrument, etc.). A and B are objects with multiple parameters in them.\n\t\tif (!b.hasOwnProperty(parmName)) return;\n\t\tif (b[parmName]===null) return;\n\t\tif (!a.hasOwnProperty(parmName)) a[parmName] = b[parmName];\n\t\telse a[parmName] += b[parmName];\n\t};\n\tvar combineParmsSubstituting = function(a,b,parmName) {\n\t\tif (!b.hasOwnProperty(parmName)) return;\n\t\tif (b[parmName]===null) return;\n\t\ta[parmName] = b[parmName];\n\t};\n\tvar combineParmsIgnoring = function(a,b,parmName) { };\n\t//--- DATA about SoundFont parameters! Mostly straight from the SoundFont public implementation document!\n\tvar typeInfo = { \t\t// Types of parameters have associated functions, etc., which if they exist, override those of units.\n\t\t'index': { combine: combineParmsIgnoring, },\n\t\t'range': { combine: combineParmsIgnoring, },\n\t\t'sample': { combine: combineParmsSubstituting, },\t\t// combine is done at the unit level\n\t\t'value': { },\t\t// combine is done at the unit level\n\t\t'substitution': { combine: combineParmsSubstituting, },\n\t};\n\tvar unitInfo = {\t\t// Units of measure have associated combining functions, etc.\n\t\t'smpls': { combine: combineParmsAdding, },\n\t\t'32k_smpls': { combine: combineParmsAdding, },\n\t\t'cent_fs': { parent_unit: 'cent', },\n\t\t'cent': { combine: combineParmsAdding, },\n\t\t'cB': { combine: combineParmsAdding, },\n\t\t'cB_fs': { parent_unit: 'cB', },\n\t\t'cB_attn': { parent_unit: 'cB', },\n\t\t'tenth_percent': { combine: combineParmsAdding, },\n\t\t'minus_tenth_percent': { combine: combineParmsAdding, },\n\t\t'timecent': { combine: combineParmsAdding, },\n\t\t'tcent_per_key': { parent_unit: 'timecent', },\n\t\t'index': { combine: combineParmsSubstituting, },\n\t\t'range': { combine: combineParmsIgnoring, },\n\t\t'midikey': { combine: combineParmsSubstituting, },\n\t\t'midivel': { combine: combineParmsSubstituting, },\n\t\t'bitflags': { combine: combineParmsIgnoring, },\n\t\t'semitone': { combine: combineParmsAdding, },\n\t\t'cent_per_key': { parent_unit: 'cent', },\n\t\t'number': { combine: combineParmsIgnoring, },\n\t};\n\tvar parmInfo = {\t\t// For every parameter that might be returned by the parser, we need to know what to do from the SF2 spec.\n 'startAddrsOffset': { unit: 'smpls',min:null,max:null,default:0,type:'sample',nonpreset:true,},\n 'endAddrsOffset': { unit: 'smpls',min:null,max:null,default:0,type:'sample',nonpreset:true,},\n 'startloopAddrsOffset': {unit: 'smpls',min:null,max:null,default:0,type:'sample',nonpreset:true,},\n 'endloopAddrsOffset': {unit: 'smpls',min:null,max:null,default:0,type:'sample',nonpreset:true,},\n 'startAddrsCoarseOffset': {unit: '32k_smpls',min:null,max:null,default:0,type:'sample',nonpreset:true,},\n 'modLfoToPitch': {unit:'cent_fs',min:-12000,max:12000,default:0,type:'value',nonpreset:false,},\n 'vibLfoToPitch': {unit:'cent_fs',min:-12000,max:12000,default:0,type:'value',nonpreset:false,},\n 'modEnvToPitch': {unit:'cent_fs',min:-12000,max:12000,default:0,type:'value',nonpreset:false,},\n 'initialFilterFc': {unit: 'cent',min:1500,max:13500,default:13500,type:'value',nonpreset:false,},\n 'initialFilterQ': {unit: 'cB',min:0,max:960,default:0,type:'value',nonpreset:false,},\n 'modLfoToFilterFc': {unit:'cent_fs',min:-12000,max:12000,default:0,type:'value',nonpreset:false,},\n 'modEnvToFilterFc': {unit:'cent_fs',min:-12000,max:12000,default:0,type:'value',nonpreset:false,},\n 'endAddrsCoarseOffset': {unit: '32k_smpls',min:null,max:null,default:0,type:'sample',nonpreset:true,},\n 'modLfoToVolume': {unit: 'cB_fs',min:-960,max:960,default:0,type:'value',nonpreset:false,},\n 'chorusEffectsSend': {unit: 'tenth_percent',min:0,max:1000,default:0,type:'value',nonpreset:false,},\n 'reverbEffectsSend': {unit: 'tenth_percent',min:0,max:1000,default:0,type:'value',nonpreset:false,},\n 'pan': {unit: 'tenth_percent',min:-500,max:500,default:0,type:'value',nonpreset:false,},\n 'delayModLFO': {unit:'timecent',min:-12000,max:5000,default:-12000,type:'value',nonpreset:false,},\n 'freqModLFO': {unit: 'cent',min:-16000,max:4500,default:0,type:'value',nonpreset:false,},\n 'delayVibLFO': {unit:'timecent',min:-12000,max:5000,default:-12000,type:'value',nonpreset:false,},\n 'freqVibLFO': {unit: 'cent',min:-16000,max:4500,default:0,type:'value',nonpreset:false,},\n 'delayModEnv': {unit:'timecent',min:-12000,max:5000,default:-12000,type:'value',nonpreset:false,},\n 'attackModEnv': {unit:'timecent',min:-12000,max:8000,default:-12000,type:'value',nonpreset:false,},\n 'holdModEnv': {unit:'timecent',min:-12000,max:5000,default:-12000,type:'value',nonpreset:false,},\n 'decayModEnv': {unit:'timecent',min:-12000,max:8000,default:-12000,type:'value',nonpreset:false,},\n 'sustainModEnv': {unit:'minus_tenth_percent',min:0,max:1000,default:0,type:'value',nonpreset:false,},\n 'releaseModEnv': {unit:'timecent',min:-12000,max:8000,default:-12000,type:'value',nonpreset:false,},\n 'keynumToModEnvHold': {unit:'tcent_per_key',min:-1200,max:1200,default:0,type:'value',nonpreset:false,},\n 'keynumToModEnvDecay': {unit:'tcent_per_key',min:-1200,max:1200,default:0,type:'value',nonpreset:false,},\n 'delayVolEnv': {unit:'timecent',min:-12000,max:5000,default:-12000,type:'value',nonpreset:false,},\n 'attackVolEnv': {unit:'timecent',min:-12000,max:8000,default:-12000,type:'value',nonpreset:false,},\n 'holdVolEnv': {unit:'timecent',min:-12000,max:5000,default:-12000,type:'value',nonpreset:false,},\n 'decayVolEnv': {unit:'timecent',min:-12000,max:8000,default:-12000,type:'value',nonpreset:false,},\n 'sustainVolEnv': {unit: 'cB_attn',min:0,max:1440,default:0,type:'value',nonpreset:false,},\n 'releaseVolEnv': {unit:'timecent',min:-12000,max:8000,default:-12000,type:'value',nonpreset:false,},\n 'keynumToVolEnvHold': {unit:'tcent_per_key',min:-1200,max:1200,default:0,type:'value',nonpreset:false,},\n 'keynumToVolEnvDecay': {unit:'tcent_per_key',min:-1200,max:1200,default:0,type:'value',nonpreset:false,},\n 'instrument': {unit: 'index',min:null,max:null,default:null,type:'index',nonpreset:false,},\n 'keyRange': {unit: 'range',min:null,max:null,default:null,type:'range',nonpreset:false,},\n 'velRange': {unit: 'range',min:null,max:null,default:null,type:'range',nonpreset:false,},\n 'startloopAddrsCoarseOffset': {unit: 'smpls',min:null,max:null,default:0,type:'sample',nonpreset:true,},\n 'keynum': {unit: 'midikey',min:null,max:null,default:null,type:'substitution',nonpreset:true,},\n 'velocity': {unit: 'midivel',min:null,max:null,default:null,type:'substitution',nonpreset:true,},\n 'initialAttenuation': {unit: 'cB',min:0,max:1440,default:0,type:'value',nonpreset:false,},\n 'endloopAddrsCoarseOffset': {unit: 'smpls',min:null,max:null,default:null,type:'sample',nonpreset:true,},\n 'coarseTune': {unit: 'semitone',min:-120,max:120,default:0,type:'value',nonpreset:false,},\n 'fineTune': {unit: 'cent',min:-99,max:99,default:0,type:'value',nonpreset:false,},\n 'sampleID': {unit: 'index',min:null,max:null,default:null,type:'index',nonpreset:false,},\n 'sampleModes': {unit: 'bitflags',min:null,max:null,default:null,type:'sample',nonpreset:true,},\n 'scaleTuning': {unit: 'cent_per_key',min:0,max:1200,default:100,type:'value',nonpreset:false,},\n 'exclusiveClass': {unit: 'number',min:0,max:127,default:0,type:'sample',nonpreset:true,},\n 'overridingRootKey': {unit: 'midikey',min:null,max:null,default:null,type:'sample',nonpreset:true,}\n\t};\n\tvar setDefaults = function() {\n\t\t// Returns a default parameter object.\n\t\tvar out = { };\n\t\tfor (var thisParm in parmInfo) {\n\t\t\tout[thisParm] = parmInfo[thisParm].default;\n\t\t}\n\t\treturn out;\n\t}\n\tvar getCombiner = function(thisParm) {\n\t\t// determines the combining method for a particular sound parameter. Check type first, then unit, then parent unit.\n\t\tvar thisParmInfo = parmInfo[thisParm];\n\t\tvar combiningFunction = combineParmsIgnoring;\t\t// default to ignoring parms that might be from a newer version, etc.\n\t\tif (!thisParmInfo) return combiningFunction;\n\t\tif (typeInfo[thisParmInfo.type] && typeInfo[thisParmInfo.type].combine)\n\t\t\tcombiningFunction = typeInfo[thisParmInfo.type].combine;\n\t\telse if (unitInfo[thisParmInfo.unit] && unitInfo[thisParmInfo.unit].combine)\n\t\t\tcombiningFunction = unitInfo[thisParmInfo.unit].combine;\n\t\telse if (unitInfo[thisParmInfo.unit] && unitInfo[thisParmInfo.unit].parent_unit) {\n\t\t\tvar unitInfo2 = unitInfo[unitInfo[thisParmInfo.unit].parent_unit];\n\t\t\tif (unitInfo2.combine) combiningFunction = unitInfo2.combine; // only one level of parents please!\n\t\t}\n\t\treturn combiningFunction;\n\t}\n\tvar combineParms = function(a,b,combineOverride,skipNonPreset) {\n\t\t// Combines parameters where b can override a, using the methods appropriate to each parameter's type or unit.\n\t\t// CombineOverride is optional for when you want to force a particular combining function in a situation.\n\t\t// SkipNonPreset is optional and defaults false. You set it true, when you want to skip all parameters that aren't supposed to be in the preset (presumably b comes from the preset).\n\t\tnonPresetFlag = false;\n\t\tif (skipNonPreset===true) nonPresetFlag = true;\n\t\tfor (var thisParm in b) {\n\t\t\tvar c = { }; // we actually put the parm in here so we can remove the darn \"amount\" object tag\n\t\t\tc[thisParm] = b[thisParm];\n\t\t\tif (c[thisParm].hasOwnProperty(\"amount\")) c[thisParm] = c[thisParm].amount;\n\t\t\tvar thisParmInfo = parmInfo[thisParm];\n\t\t\tif (!thisParmInfo) continue; // ignore unsupported or new parameters\n\t\t\tif (nonPresetFlag && parmInfo[thisParm].nonpreset) continue; \n\t\t\tvar f = getCombiner(thisParm);\n\t\t\tif (combineOverride) combineOverride = f;\n\t\t\tf(a,c,thisParm);\t// actually run the function (on C, so it is a number not an \"amount object\")-- it adds, substitutes, ignores, multiplies, etc.\n\t\t\t//-- oh! and enforce the range limits!\n\t\t\tif (thisParmInfo.min !== null && a[thisParm] < thisParmInfo.min) a[thisParm] = thisParmInfo.min;\n\t\t\tif (thisParmInfo.max !== null && a[thisParm] > thisParmInfo.max) a[thisParm] = thisParmInfo.max;\n\t\t}\n\t}\n\tvar matchRange = function(k,v,parms) {\n\t\t// Looks in the parameter or generator object and returns true if the given k>ey/v>elocity\n\t\t// range matches, false otherwise.\n\t\tif (parms.hasOwnProperty('keyRange')) {\n\t\t\tif (k < parms.keyRange.lo) return false;\n\t\t\tif ( k > parms.keyRange.hi) return false;\n\t\t}\n\t\tif (parms.hasOwnProperty('velRange')) {\n\t\t\tif (v < parms.velRange.lo) return false;\n\t\t\tif (v > parms.velRange.hi) return false;\n\t\t}\n\t\treturn true;\n\t}\n\tvar shallowClone = function(a) { return JSON.parse(JSON.stringify(a)); }\n\t//\n\t//\tAdds the MIDI Map part to the parser, which we need to quickly look up MIDI patches.\n\t//\n\tvar addMIDIMap = function (parser) {\n\t\t//-- save the results of these parser functions so we don't have to generate them again\n\t\tvar presets = parser.presets = parser.getPresets();\n\t\tvar instruments = parser.instruments = parser.getInstruments();\n\t\t//-- here's our new one\n\t\tvar MIDIMap = parser.MIDIMap = { };\n\t\t//-- now scan all the presets\n\t\tfor (var i = 0; i < presets.length; i++) {\n\t\t\tvar thisPreset = presets[i]; var thisBank = thisPreset.header.bank;\n\t\t\tvar thisMIDIProgram = thisPreset.header.preset;\n\t\t\tif (!MIDIMap.hasOwnProperty(thisBank)) MIDIMap[thisBank] = { };\n\t\t\tMIDIMap[thisBank][thisMIDIProgram] = i;\n }\n }\n \n var retypeSamples = function(parser) {\n //-- another thing to do at loading time: convert the Int16 array to a Float32Array.\n //-- TODO: check for OGG compressed samples and uncompress them\n for (var i = 0; i < parser.sample.length; i++) {\n var thisSample = parser.sample[i]; var thisSampleLength = thisSample.length | 0;\n var newSample = new Float32Array(thisSampleLength);\n for (var j = 0|0; j < thisSampleLength; j++) {\n newSample[j] = thisSample[j] / 32768.0;\n }\n parser.sample[i] = newSample;\n }\n }\n\n\t//\n\t//\tInstall the soundfont into this object. Depends of course on the sound font parsing module.\n\t//\n\tvar parser = null;\n\tthis.loadSF2File = function (arrayBufferValue) {\n\t\tvar byteBuffer = new Uint8Array(arrayBufferValue);\n\t\tparser = new sf2.Parser(byteBuffer);\n\t\tparser.parse();\n\t\twindow.parser = parser;\t\t// just for debugging purposes now-- what's in here exactly?\n addMIDIMap(parser); // make sure to add the midi map.\n retypeSamples(parser); // convert all samples to Float32.\n\t}\n\tthis.getParser = function() { return parser; }\n\t//\n\t//\tProcess a note's related parameters before playing it. Returns array of objects telling\n\t// \tthe player what to play, or false if note data is not available (then the player can fallback\n\t// \tto a lesser quality level?)\n\t//\n\tthis.processNoteSF2 = function (noteNumber, noteVelocity, programNumber, bankNumber) {\n\t\t//--- find the preset in the MIDI map\n\t\tif (!parser.MIDIMap) return false; // need the midi map generated after loading soundfont\n\t\tif (!parser.MIDIMap[bankNumber]) return false;\n\t\tif (!parser.MIDIMap[bankNumber][programNumber]) return false;\n\t\tvar presetIndex = parser.MIDIMap[bankNumber][programNumber];\n\t\tif (!parser.presets[presetIndex]) return false;\n\t\tvar preset = parser.presets[presetIndex];\n\t\t//--- set default parms and look for the global generator; at the preset level, the defaults are all zero because they are just added to instrument parameters.\n\t\tvar noteParms = { }; var globalIndex = -1;\n\t\tfor (var i = 0; i < preset.info.length; i++) {\n\t\t\tif (preset.info[i].generator && !preset.info[i].generator.instrument) {\n\t\t\t\tcombineParms(noteParms, preset.info[i].generator); // global overrides defaults\n\t\t\t\tglobalIndex = i; break;\n\t\t\t}\n\t\t}\n\t\t//--- now look for the presets matching our note and velocity. There may be more than one, so\n\t\t//--- we add to an array. Eventually at the sample level we have a tree of two levels of arrays,\n\t\t//--- which we can then compress back into a list of samples for the player to play.\n\t\tpresetMatches = [ ];\n\t\tfor (var i = 0; i < preset.info.length; i++) {\n\t\t\tif (i===globalIndex) continue;\n\t\t\tvar thisGenerator = preset.info[i].generator;\n\t\t\tif (matchRange(noteNumber, noteVelocity, thisGenerator)) {\n\t\t\t\tvar newPresetMatch = shallowClone(noteParms);\t// copy the parms from global level\n\t\t\t\tcombineParms(newPresetMatch, thisGenerator);\n\t\t\t\tnewPresetMatch.instrument = thisGenerator.instrument.amount; // this is an index (\"Ignore\") parameter, but we want it so we can link to the next level\n\t\t\t\tpresetMatches.push(newPresetMatch);\n\t\t\t}\n\t\t}\n\t\t//--- now, for each preset match, we have to locate and process the instrument.\n\t\tvar instrumentMatches = [ ];\n\t\tfor (var i = 0; i < presetMatches.length; i++) {\n\t\t\tif (presetMatches[i].instrument && parser.instruments && parser.instruments[presetMatches[i].instrument]) {\n\t\t\t\tvar instrument = parser.instruments[presetMatches[i].instrument];\n\t\t\t\tvar instParms = setDefaults(); // the instrument parms start out at standard defaults. They are absolute physical values, unlike the preset level which is offsets.\n\t\t\t\t//--- now locate the global instrument zone if it exsts.\n\t\t\t\tvar globalIndex = -1;\n\t\t\t\tfor (var j = 0; j < instrument.info.length; j++) {\n\t\t\t\t\tvar thisInfo = instrument.info[j];\n\t\t\t\t\tif (!thisInfo.generator.hasOwnProperty('sampleID')) {\n\t\t\t\t\t\t// found global: force-override defaults by always substituting\n\t\t\t\t\t\tcombineParms(instParms, thisInfo.generator, combineParmsSubstituting);\n\t\t\t\t\t\tglobalIndex = j; break;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//--- now that we have found the global instrument, locate and create nodes for\n\t\t\t\t//--- all the instrument samples/notes we must play (possibly multiple). For each,\n\t\t\t\t//--- we override the instrument globals with instrument locals, then find the sample\n\t\t\t\t//--- and override with sample values, then, combine (usu. add) from the preset values\n\t\t\t\t//--- we got above.\n\t\t\t\tfor (var j = 0; j < instrument.info.length; j++) {\n\t\t\t\t\tif (j===globalIndex) continue;\n\t\t\t\t\tvar thisInfo = instrument.info[j]; var thisGenerator = thisInfo.generator;\n\t\t\t\t\tif (matchRange(noteNumber, noteVelocity, thisGenerator)) {\n\t\t\t\t\t\tvar newInstrumentMatch = shallowClone(instParms);\n\t\t\t\t\t\tcombineParms(newInstrumentMatch, thisGenerator, combineParmsSubstituting); //local inst overwrites global inst\n\t\t\t\t\t\tif (thisGenerator.hasOwnProperty('sampleID')) {\n\t\t\t\t\t\t\tvar mySampleIndex = thisGenerator.sampleID.amount;\n\t\t\t\t\t\t\tif (parser.sampleHeader[mySampleIndex] && parser.sample[mySampleIndex]) {\n\t\t\t\t\t\t\t\tvar thisSampleHeader = parser.sampleHeader[mySampleIndex];\n var thisSample = parser.sample[mySampleIndex];\n for (var thisSampleProperty in thisSampleHeader) { // Samples are a straight overwrite with properties that may not be in parmInfo.\n newInstrumentMatch[thisSampleProperty] = thisSampleHeader[thisSampleProperty];\n }\n\t\t\t\t\t\t\t\tcombineParms(newInstrumentMatch, presetMatches[i], null, true);\t\t// and preset adds to inst, producing final result.\n\t\t\t\t\t\t\t\tnewInstrumentMatch.sample = thisSample;\n\t\t\t\t\t\t\t\tinstrumentMatches.push(newInstrumentMatch);\n\t\t\t\t\t\t\t} else continue;\n\t\t\t\t\t\t} else continue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else continue; // if instrument is not found, we just ignore that line\n\t\t}\n\t\t//--- yay, now we have a bunch of instrument matches with samples. We can play them!\n\t\t//--- TODO: convert the units first\n\t\tif (instrumentMatches.length===0) instrumentMatches = false;\n\t\treturn instrumentMatches;\n }\n \n //-- here's note ON for Soundfonts! It will expand to handle more and more parameters.\n //-- It will start with basic notes however, and will return false if no note could be made,\n //-- or, it will connect all its audio nodes to connectTo and start them. It will return false\n //-- if no note could be sounded, or an object that you can use to call note Off later.\n\tthis.noteOn = function (noteNumber, noteVelocity, programNumber, bankNumber, ctx, connectTo, t) {\n var percussion = (bankNumber===128); // Oh btw to get the standard drum kit you send bank = 128, patch = 0; and then we don't do pitch adjustments either.\n var sf2note = { noteNumber: noteNumber, noteVelocity: noteVelocity, programNumber: programNumber, bankNumber: bankNumber, connectTo: connectTo, t: t };\n var p = processNoteSF2(noteNumber, noteVelocity, programNumber, bankNumber);\n if (p===false) return false; // can't find note, so use another sound generation method.\n sf2.outputs = [ ];\n var stereoDone = [ ]; // keep a list of samples we already did because they were part of a stereo pair\n var stereoBackReference = [ ]; // and a corresponding list of back references to the index that we already did. ICK, STEREO!\n for (var i = 0; i < p.length; i++) {\n var tp = p[i]; var thisOutput = { bufferNodes: [ ], gainNodes: [ ] }; \n sf2.outputs.push(thisOutput);\n //--- determine loop status: 0 = no loop, 1 = loops continuously, 2 = no loop, 3 loops till release then plays to end\n var loopStatus = thisOutput.loopStatus = (tp.hasOwnProperty(\"sampleModes\") ? (tp.sampleModes & 3) : 0);\n //--- determine stereo status\n var stereoType = \"mono\";\n if (tp.hasOwnProperty(\"sampleType\")) {\n var sampleTypeBitflag = tp.sampleType & 0x0F;\n switch(sampleTypeBitflag) {\n case 1: stereoType = \"mono\"; break;\n case 2: stereoType = \"right\"; stereoLink = tp.sampleLink; break;\n case 4: stereoType = \"left\"; stereoLink = tp.sampleLink; break;\n default: stereoType = \"mono\"; break;\n }\n }\n //--- determine and store the actual note number and velocity to use\n var actualNote = noteNumber; var actualVelocity = noteVelocity;\n if (tp.keynum && tp.keynum > 0) actualNote = tp.keynum;\n if (tp.velocity !== undefined && tp.velocity !== null) actualVelocity = tp.velocity;\n thisOutput.actualVelocity = actualVelocity; thisOutput.actualNote =actualNote;\n //--- determine the sample rate based on pitch adjustments\n actualNote += tp.coarseTune; // add tonal adjustments\n actualNote += tp.fineTune / 100;\n var sampleNote = tp.originalPitch; // the note for the actual sample could be this\n if (tp.hasOwnProperty(\"overridingRootKey\")) sampleNote = tp.overridingRootKey; // but it's probably this\n var deltaSemitones = actualNote - sampleNote;\n var freqFactor = Math.pow(2,deltaSemitones/12);\n var newRate = tp.sampleRate * freqFactor;\n //--- now determine the positions for start, end and loop, and the subarray to actually play\n var startAtSample = 0 + 32768*tp.startAddrsCoarseOffset + tp.startAddrsOffset;\n var endAtSample = tp.sample.length + 32768*tp.endAddrsCoarseOffset + tp.endAddrsOffset - 1;\n var startLoopSample = tp.startLoop + 32768*tp.startloopAddrsCoarseOffset + tp.startloopAddrsOffset - startLoopSample;\n var endLoopSample = tp.endLoop + 32768*tp.endloopAddrsCoarseOffset + tp.endloopAddrsOffset - endLoopSample;\n var startLoopTime = startLoopSample / newRate;\n var endLoopTime = endLoopSample / newRate;\n var actualSample = tp.sample.subarray(startAtSample,endAtSample+1);\n //--- create buffer node\n var ab;\n if (stereoType===\"mono\") { // mono: just copy the sample to both channels, easy!\n ab = ctx.createBuffer(2,actualSample.length,newRate);\n ab.copyToChannel(actualSample,0);\n ab.copyToChannel(actualSample,1);\n } else if (stereoType===\"left\" || stereoType===\"right\") {\n var k = stereoDone.indexOf(tp.sampleLink); \n if (k > 0) { //-- stereo, and we need to copy to a buffer we alreaady encountered\n ab = p[stereoBackReference[k]].bufferNode;\n ab.copyToChannel(actualSample,1);\n } else { // stereo, and we haven't encountered the other channel yet\n ab = ctx.createBuffer(2,actualSample.length,newRate);\n ab.copyToChannel(actualSample,0);\n stereoDone.push(tp.sampleID);\n stereoBackReference.push(i);\n }\n }\n tp.bufferNode = ab;\n var abs = ctx.createBufferSource();\n abs.buffer = ab;\n //--- set up looping on the buffer node\n if (loopStatus===1 || loopStatus===3) { // 1 & 3 are different but only in noteoff\n abs.loop = true; abs.loopStart = startLoopTime; abs.loopEnd = endLoopTime;\n }\n //--- create gain node for volume envelope and lfo\n var g = ctx.createGain(); abs.connect(g);\n \n }\n return sf2note;\n }\n\n this.noteOff = function (sf2note) {\n\n }\n}", "title": "" }, { "docid": "74fe09da73a3f647c10e60dad4982ca9", "score": "0.536556", "text": "function setup() {\n createCanvas(windowWidth, windowHeight);\n tiger = new Predator(100, 100, 5, color(200, 200, 0), 40, UP_ARROW, DOWN_ARROW, LEFT_ARROW, RIGHT_ARROW, tigerImage, SHIFT);\n snake = new Predator(100, 100, 5, color(200, 100, 0), 40, 87, 83, 65, 63, snakeImage, 32);\n wolf = new Predator(100, 100, 5, color(100, 200, 0), 40, 85, 74, 72, 75, wolfImage, ENTER);\n bunny = new Prey(100, 100, 10, color(255, 100, 10), 50, bunnyImage);\n chicken = new Prey(100, 100, 8, color(255, 255, 255), 60, chickenImage);\n bee = new Prey(100, 100, 20, color(255, 255, 0), 10, beeImage);\n scoreBoard = new scoreboard(tiger.score, snake.score, wolf.score);\n}", "title": "" }, { "docid": "83f31d0ee5a097841e6466ed0d3d70ae", "score": "0.53649724", "text": "function setup() {\n const canvasSideLength = Math.min(windowWidth, windowHeight);\n createCanvas(canvasSideLength, canvasSideLength);\n frameRate(IDEAL_FRAME_RATE);\n unitLength = Math.min(width, height) / 640;\n unitSpeed = unitLength / IDEAL_FRAME_RATE;\n strokeWeight(Math.max(1, 1 * unitLength));\n textAlign(CENTER);\n textSize(20 * unitLength);\n visualizerSet.add(new StackVisualizer(0.25 * width, 0.25 * height));\n visualizerSet.add(new SetVisualizer(0.75 * width, 0.25 * height));\n visualizerSet.add(new TableVisualizer(0.25 * width, 0.75 * height));\n visualizerSet.add(new GraphVisualizer(0.75 * width, 0.75 * height));\n}", "title": "" }, { "docid": "c83b110d570bb767b3a604a6ccd591de", "score": "0.53603876", "text": "function setup() {\n createCanvas(400, 400);\n}", "title": "" }, { "docid": "c83b110d570bb767b3a604a6ccd591de", "score": "0.53603876", "text": "function setup() {\n createCanvas(400, 400);\n}", "title": "" }, { "docid": "c83b110d570bb767b3a604a6ccd591de", "score": "0.53603876", "text": "function setup() {\n createCanvas(400, 400);\n}", "title": "" } ]
a9fbbca6b8d6baa36a3bd10891c3948a
Construct a new mimetype widget factory.
[ { "docid": "db47496f06f13a3bef9a16b101577d68", "score": "0.47276723", "text": "constructor(options) {\n super(Private.createRegistryOptions(options));\n this._rendermime = options.rendermime;\n this._renderTimeout = options.renderTimeout || 1000;\n this._dataType = options.dataType || 'string';\n this._fileType = options.primaryFileType;\n }", "title": "" } ]
[ { "docid": "1580b24cec7ee164c9a4381936359659", "score": "0.75804824", "text": "createNewWidget(context) {\n const ft = this._fileType;\n const mimeType = ft.mimeTypes.length ? ft.mimeTypes[0] : 'text/plain';\n const rendermime = this._rendermime.clone({\n resolver: context.urlResolver\n });\n const renderer = rendermime.createRenderer(mimeType);\n const content = new MimeContent({\n context,\n renderer,\n mimeType,\n renderTimeout: this._renderTimeout,\n dataType: this._dataType\n });\n content.title.iconClass = ft.iconClass;\n content.title.iconLabel = ft.iconLabel;\n const widget = new MimeDocument({ content, context });\n return widget;\n }", "title": "" }, { "docid": "2b81ea46b9f7d607441f3e52f4f79b11", "score": "0.73901904", "text": "createNewWidget(context) {\n var _a, _b, _c, _d, _e, _f;\n const ft = this._fileType;\n const mimeType = ((_a = ft) === null || _a === void 0 ? void 0 : _a.mimeTypes.length) ? ft.mimeTypes[0] : 'text/plain';\n const rendermime = this._rendermime.clone({\n resolver: context.urlResolver\n });\n const renderer = rendermime.createRenderer(mimeType);\n const content = new MimeContent({\n context,\n renderer,\n mimeType,\n renderTimeout: this._renderTimeout,\n dataType: this._dataType\n });\n content.title.iconClass = (_c = (_b = ft) === null || _b === void 0 ? void 0 : _b.iconClass, (_c !== null && _c !== void 0 ? _c : ''));\n content.title.iconLabel = (_e = (_d = ft) === null || _d === void 0 ? void 0 : _d.iconLabel, (_e !== null && _e !== void 0 ? _e : ''));\n content.title.iconRenderer = (_f = ft) === null || _f === void 0 ? void 0 : _f.icon;\n const widget = new MimeDocument({ content, context });\n return widget;\n }", "title": "" }, { "docid": "7cc19d58ce299862a9812c215f62386a", "score": "0.6251792", "text": "createNewWidget(context) {\n let func = this._services.factoryService.newDocumentEditor;\n let factory = options => {\n return func(options);\n };\n const content = new FileEditor({\n factory,\n context,\n mimeTypeService: this._services.mimeTypeService\n });\n content.title.iconRenderer = _jupyterlab_ui_components__WEBPACK_IMPORTED_MODULE_2__[\"textEditorIcon\"];\n const widget = new _jupyterlab_docregistry__WEBPACK_IMPORTED_MODULE_1__[\"DocumentWidget\"]({ content, context });\n return widget;\n }", "title": "" }, { "docid": "8a7cb7facfd175f67decc7ccbced3fbb", "score": "0.61677164", "text": "createRenderer(mimeType) {\n // Throw an error if no factory exists for the mime type.\n if (!(mimeType in this._factories)) {\n throw new Error(`No factory for mime type: '${mimeType}'`);\n }\n // Invoke the best factory for the given mime type.\n return this._factories[mimeType].createRenderer({\n mimeType,\n resolver: this.resolver,\n sanitizer: this.sanitizer,\n linkHandler: this.linkHandler,\n latexTypesetter: this.latexTypesetter\n });\n }", "title": "" }, { "docid": "31af99280fed734c7b632a929f73645d", "score": "0.58939356", "text": "createWidget(factory, context) {\n let widget = factory.createNew(context);\n this._initializeWidget(widget, factory, context);\n return widget;\n }", "title": "" }, { "docid": "cdc2003ffe59c23a5e9a62e23b6c4e73", "score": "0.5860193", "text": "setDefaultWidgetFactory(fileType, factory) {\n fileType = fileType.toLowerCase();\n if (!this.getFileType(fileType)) {\n throw Error(`Cannot find file type ${fileType}`);\n }\n if (!factory) {\n if (this._defaultWidgetFactoryOverrides[fileType]) {\n delete this._defaultWidgetFactoryOverrides[fileType];\n }\n return;\n }\n if (!this.getWidgetFactory(factory)) {\n throw Error(`Cannot find widget factory ${factory}`);\n }\n factory = factory.toLowerCase();\n const factories = this._widgetFactoriesForFileType[fileType];\n if (factory !== this._defaultWidgetFactory &&\n !(factories && factories.includes(factory))) {\n throw Error(`Factory ${factory} cannot view file type ${fileType}`);\n }\n this._defaultWidgetFactoryOverrides[fileType] = factory;\n }", "title": "" }, { "docid": "845d86369ac6fb1940e88244bdb16990", "score": "0.5844367", "text": "_initializeWidget(widget, factory, context) {\n Private.factoryProperty.set(widget, factory);\n // Handle widget extensions.\n let disposables = new _lumino_disposable__WEBPACK_IMPORTED_MODULE_1__[\"DisposableSet\"]();\n Object(_lumino_algorithm__WEBPACK_IMPORTED_MODULE_0__[\"each\"])(this._registry.widgetExtensions(factory.name), extender => {\n disposables.add(extender.createNew(widget, context));\n });\n Private.disposablesProperty.set(widget, disposables);\n widget.disposed.connect(this._onWidgetDisposed, this);\n this.adoptWidget(context, widget);\n context.fileChanged.connect(this._onFileChanged, this);\n context.pathChanged.connect(this._onPathChanged, this);\n void context.ready.then(() => {\n void this.setCaption(widget);\n });\n }", "title": "" }, { "docid": "8465b06560e6595b05786cc8a586f709", "score": "0.57085127", "text": "defaultRenderedWidgetFactory(path) {\n // Get the matching file types.\n let fts = this.getFileTypesForPath(_jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_3__[\"PathExt\"].basename(path));\n let factory = undefined;\n // Find if a there is a default rendered factory for this type.\n for (let ft of fts) {\n if (ft.name in this._defaultRenderedWidgetFactories) {\n factory = this._widgetFactories[this._defaultRenderedWidgetFactories[ft.name]];\n break;\n }\n }\n return factory || this.defaultWidgetFactory(path);\n }", "title": "" }, { "docid": "b1449cad8347eb0c3a9f4edf12de8336", "score": "0.56204224", "text": "addWidgetFactory(factory) {\n let name = factory.name.toLowerCase();\n if (!name || name === 'default') {\n throw Error('Invalid factory name');\n }\n if (this._widgetFactories[name]) {\n console.warn(`Duplicate registered factory ${name}`);\n return new _lumino_disposable__WEBPACK_IMPORTED_MODULE_1__[\"DisposableDelegate\"](Private.noOp);\n }\n this._widgetFactories[name] = factory;\n for (let ft of factory.defaultFor || []) {\n if (factory.fileTypes.indexOf(ft) === -1) {\n continue;\n }\n if (ft === '*') {\n this._defaultWidgetFactory = name;\n }\n else {\n this._defaultWidgetFactories[ft] = name;\n }\n }\n for (let ft of factory.defaultRendered || []) {\n if (factory.fileTypes.indexOf(ft) === -1) {\n continue;\n }\n this._defaultRenderedWidgetFactories[ft] = name;\n }\n // For convenience, store a mapping of file type name -> name\n for (let ft of factory.fileTypes) {\n if (!this._widgetFactoriesForFileType[ft]) {\n this._widgetFactoriesForFileType[ft] = [];\n }\n this._widgetFactoriesForFileType[ft].push(name);\n }\n this._changed.emit({\n type: 'widgetFactory',\n name,\n change: 'added'\n });\n return new _lumino_disposable__WEBPACK_IMPORTED_MODULE_1__[\"DisposableDelegate\"](() => {\n delete this._widgetFactories[name];\n if (this._defaultWidgetFactory === name) {\n this._defaultWidgetFactory = '';\n }\n for (let ext of Object.keys(this._defaultWidgetFactories)) {\n if (this._defaultWidgetFactories[ext] === name) {\n delete this._defaultWidgetFactories[ext];\n }\n }\n for (let ext of Object.keys(this._defaultRenderedWidgetFactories)) {\n if (this._defaultRenderedWidgetFactories[ext] === name) {\n delete this._defaultRenderedWidgetFactories[ext];\n }\n }\n for (let ext of Object.keys(this._widgetFactoriesForFileType)) {\n _lumino_algorithm__WEBPACK_IMPORTED_MODULE_0__[\"ArrayExt\"].removeFirstOf(this._widgetFactoriesForFileType[ext], name);\n if (this._widgetFactoriesForFileType[ext].length === 0) {\n delete this._widgetFactoriesForFileType[ext];\n }\n }\n for (let ext of Object.keys(this._defaultWidgetFactoryOverrides)) {\n if (this._defaultWidgetFactoryOverrides[ext] === name) {\n delete this._defaultWidgetFactoryOverrides[ext];\n }\n }\n this._changed.emit({\n type: 'widgetFactory',\n name,\n change: 'removed'\n });\n });\n }", "title": "" }, { "docid": "7a73154df7807972185f6214385bae6b", "score": "0.5570845", "text": "function createFactory(type) {\n return React.createElement.bind(null, type);\n}", "title": "" }, { "docid": "f70dc09be3bc41f3c158b69ae01c6f15", "score": "0.5542955", "text": "_widgetFactoryFor(path, widgetName) {\n let { registry } = this;\n if (widgetName === 'default') {\n let factory = registry.defaultWidgetFactory(path);\n if (!factory) {\n return undefined;\n }\n widgetName = factory.name;\n }\n return registry.getWidgetFactory(widgetName);\n }", "title": "" }, { "docid": "08b7fcb89a4cbe52db924aab5d9bf228", "score": "0.5518115", "text": "constructor(options) {\n super();\n /**\n * A bound change callback.\n */\n this._changeCallback = (options) => {\n if (!options.data || !options.data[this.mimeType]) {\n return;\n }\n let data = options.data[this.mimeType];\n if (typeof data === 'string') {\n this._context.model.fromString(data);\n }\n else {\n this._context.model.fromJSON(data);\n }\n };\n this._ready = new coreutils_2.PromiseDelegate();\n this._isRendering = false;\n this._renderRequested = false;\n this.addClass('jp-MimeDocument');\n this.mimeType = options.mimeType;\n this._dataType = options.dataType || 'string';\n this._context = options.context;\n this.renderer = options.renderer;\n const layout = (this.layout = new widgets_1.StackedLayout());\n layout.addWidget(this.renderer);\n this._context.ready\n .then(() => {\n return this._render();\n })\n .then(() => {\n // After rendering for the first time, send an activation request if we\n // are currently focused.\n if (this.node === document.activeElement) {\n // We want to synchronously send (not post) the activate message, while\n // we know this node still has focus.\n messaging_1.MessageLoop.sendMessage(this.renderer, widgets_1.Widget.Msg.ActivateRequest);\n }\n // Throttle the rendering rate of the widget.\n this._monitor = new coreutils_1.ActivityMonitor({\n signal: this._context.model.contentChanged,\n timeout: options.renderTimeout\n });\n this._monitor.activityStopped.connect(this.update, this);\n this._ready.resolve(undefined);\n })\n .catch(reason => {\n // Dispose the document if rendering fails.\n requestAnimationFrame(() => {\n this.dispose();\n });\n apputils_1.showErrorMessage(`Renderer Failure: ${this._context.path}`, reason);\n });\n }", "title": "" }, { "docid": "82322eacdc46123b6730de55ce7c08be", "score": "0.54467124", "text": "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "title": "" }, { "docid": "82322eacdc46123b6730de55ce7c08be", "score": "0.54467124", "text": "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "title": "" }, { "docid": "82322eacdc46123b6730de55ce7c08be", "score": "0.54467124", "text": "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "title": "" }, { "docid": "82322eacdc46123b6730de55ce7c08be", "score": "0.54467124", "text": "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "title": "" }, { "docid": "82322eacdc46123b6730de55ce7c08be", "score": "0.54467124", "text": "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "title": "" }, { "docid": "82322eacdc46123b6730de55ce7c08be", "score": "0.54467124", "text": "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "title": "" }, { "docid": "82322eacdc46123b6730de55ce7c08be", "score": "0.54467124", "text": "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "title": "" }, { "docid": "82322eacdc46123b6730de55ce7c08be", "score": "0.54467124", "text": "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "title": "" }, { "docid": "82322eacdc46123b6730de55ce7c08be", "score": "0.54467124", "text": "function createDOMFactory(type) {\n var factory = React.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. `<Foo />.type === Foo`.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n factory.type = type;\n return factory;\n }", "title": "" }, { "docid": "17ff42c52d0fdec8b05baa03eabaa55c", "score": "0.5442635", "text": "constructor(options = {}) {\n this._modelFactories = Object.create(null);\n this._widgetFactories = Object.create(null);\n this._defaultWidgetFactory = '';\n this._defaultWidgetFactoryOverrides = Object.create(null);\n this._defaultWidgetFactories = Object.create(null);\n this._defaultRenderedWidgetFactories = Object.create(null);\n this._widgetFactoriesForFileType = Object.create(null);\n this._fileTypes = [];\n this._extenders = Object.create(null);\n this._changed = new _lumino_signaling__WEBPACK_IMPORTED_MODULE_2__[\"Signal\"](this);\n this._isDisposed = false;\n let factory = options.textModelFactory;\n if (factory && factory.name !== 'text') {\n throw new Error('Text model factory must have the name `text`');\n }\n this._modelFactories['text'] = factory || new _default__WEBPACK_IMPORTED_MODULE_5__[\"TextModelFactory\"]();\n let fts = options.initialFileTypes || DocumentRegistry.defaultFileTypes;\n fts.forEach(ft => {\n let value = Object.assign(Object.assign({}, DocumentRegistry.fileTypeDefaults), ft);\n this._fileTypes.push(value);\n });\n }", "title": "" }, { "docid": "afef9a51b01f6c29cb98ca505257da5b", "score": "0.5418995", "text": "preferredWidgetFactories(path) {\n let factories = new Set();\n // Get the ordered matching file types.\n let fts = this.getFileTypesForPath(_jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_3__[\"PathExt\"].basename(path));\n // Start with any user overrides for the defaults.\n fts.forEach(ft => {\n if (ft.name in this._defaultWidgetFactoryOverrides) {\n factories.add(this._defaultWidgetFactoryOverrides[ft.name]);\n }\n });\n // Next add the file type default factories.\n fts.forEach(ft => {\n if (ft.name in this._defaultWidgetFactories) {\n factories.add(this._defaultWidgetFactories[ft.name]);\n }\n });\n // Add the file type default rendered factories.\n fts.forEach(ft => {\n if (ft.name in this._defaultRenderedWidgetFactories) {\n factories.add(this._defaultRenderedWidgetFactories[ft.name]);\n }\n });\n // Add the global default factory.\n if (this._defaultWidgetFactory) {\n factories.add(this._defaultWidgetFactory);\n }\n // Add the file type factories in registration order.\n fts.forEach(ft => {\n if (ft.name in this._widgetFactoriesForFileType) {\n Object(_lumino_algorithm__WEBPACK_IMPORTED_MODULE_0__[\"each\"])(this._widgetFactoriesForFileType[ft.name], n => {\n factories.add(n);\n });\n }\n });\n // Add the rest of the global factories, in registration order.\n if ('*' in this._widgetFactoriesForFileType) {\n Object(_lumino_algorithm__WEBPACK_IMPORTED_MODULE_0__[\"each\"])(this._widgetFactoriesForFileType['*'], n => {\n factories.add(n);\n });\n }\n // Construct the return list, checking to make sure the corresponding\n // model factories are registered.\n let factoryList = [];\n factories.forEach(name => {\n let factory = this._widgetFactories[name];\n if (!factory) {\n return;\n }\n let modelName = factory.modelName || 'text';\n if (modelName in this._modelFactories) {\n factoryList.push(factory);\n }\n });\n return factoryList;\n }", "title": "" }, { "docid": "4cd707b135afe597dc8074cfe3e3692e", "score": "0.5346328", "text": "async function NewWidget(widgetFamily, moz) {\n let widget = new ListWidget()\n widget.apropos = function (small, medium, large) {\n if (widgetFamily == \"small\") {\n return small\n }\n if (widgetFamily == \"medium\") {\n return medium\n }\n if (widgetFamily == \"large\") {\n return large\n }\n }\n widget.present = function() {\n if (widgetFamily == \"small\") {\n widget.presentSmall()\n }\n if (widgetFamily == \"medium\") {\n widget.presentMedium()\n }\n if (widgetFamily == \"large\") {\n widget.presentLarge()\n }\n }\n let builder = widget.apropos(buildSmallWidget, buildMediumWidget, buildLargeWidget)\n await builder(widget, moz)\n return widget\n }", "title": "" }, { "docid": "bc7f3b17bdea2cb5e49688f078fd5858", "score": "0.53032947", "text": "function createOBJ(type, WidgetID) {\n window[WidgetID] = new createElementView(type, WidgetID);\n}", "title": "" }, { "docid": "2dae80706aa54829d069724886bd44d5", "score": "0.5237537", "text": "getFactory(mimeType) {\n return this._factories[mimeType];\n }", "title": "" }, { "docid": "f83f58de2d798ab568a497f8281c9719", "score": "0.5216142", "text": "function create_type(obj){\n return $B.get_class(obj).$factory()\n}", "title": "" }, { "docid": "3117b96173a5ee10912e155ff02deb23", "score": "0.52020043", "text": "createMedia() {\n\t\tswitch (this.typeMedia) {\n\t\tcase 'image':\n\t\t\treturn new Image(this.title, this.filename, this.likes, this.altTxt).createImage\n\t\tcase 'video':\n\t\t\treturn new Video(this.title, this.filename, this.likes, this.altTxt).createVideo\n\n\t\tdefault:\n\t\t\tbreak\n\t\t}\n\t}", "title": "" }, { "docid": "abe858bb31206b74c610d6a700cf2837", "score": "0.5186691", "text": "createNew(context, source) {\n // Create the new widget\n const widget = this.createNewWidget(context, source);\n // Add toolbar items\n let items;\n if (this._toolbarFactory) {\n items = this._toolbarFactory(widget);\n }\n else {\n items = this.defaultToolbarFactory(widget);\n }\n items.forEach(({ name, widget: item }) => {\n widget.toolbar.addItem(name, item);\n });\n // Emit widget created signal\n this._widgetCreated.emit(widget);\n return widget;\n }", "title": "" }, { "docid": "abe858bb31206b74c610d6a700cf2837", "score": "0.5186691", "text": "createNew(context, source) {\n // Create the new widget\n const widget = this.createNewWidget(context, source);\n // Add toolbar items\n let items;\n if (this._toolbarFactory) {\n items = this._toolbarFactory(widget);\n }\n else {\n items = this.defaultToolbarFactory(widget);\n }\n items.forEach(({ name, widget: item }) => {\n widget.toolbar.addItem(name, item);\n });\n // Emit widget created signal\n this._widgetCreated.emit(widget);\n return widget;\n }", "title": "" }, { "docid": "352a23376e998ed9dc558ae3b2d9d643", "score": "0.513228", "text": "function factory_factory(type) {\n return function factory(make, model, year) {\n this.type = type\n this.make = make\n this.model = model\n this.year = year\n }\n}", "title": "" }, { "docid": "3959a97f4812b52a51e82876043c2c21", "score": "0.5044537", "text": "createNewWidget(context, source) {\n let nbOptions = {\n rendermime: source\n ? source.content.rendermime\n : this.rendermime.clone({ resolver: context.urlResolver }),\n contentFactory: this.contentFactory,\n mimeTypeService: this.mimeTypeService,\n editorConfig: source ? source.content.editorConfig : this._editorConfig,\n notebookConfig: source\n ? source.content.notebookConfig\n : this._notebookConfig\n };\n let content = this.contentFactory.createNotebook(nbOptions);\n return new _panel__WEBPACK_IMPORTED_MODULE_2__[\"NotebookPanel\"]({ context, content });\n }", "title": "" }, { "docid": "941ae15523712cb63ac4419c730c9942", "score": "0.50329417", "text": "function registerWidget() {\n\n if (GObject.type_from_name('FlyPieImageChooserButton') == null) {\n // clang-format off\n GObject.registerClass({\n GTypeName: 'FlyPieImageChooserButton',\n Template: `resource:///ui/${utils.gtk4() ? \"gtk4\" : \"gtk3\"}/imageChooserButton.ui`,\n InternalChildren: ['button', 'label', 'resetButton'],\n Signals: {\n 'file-set': {}\n }\n },\n class FlyPieImageChooserButton extends Gtk.Box {\n // clang-format on\n _init(params = {}) {\n super._init(params);\n\n this._dialog = new Gtk.Dialog({use_header_bar: true, modal: true, title: ''});\n this._dialog.add_button(_('Select File'), Gtk.ResponseType.OK);\n this._dialog.add_button(_('Cancel'), Gtk.ResponseType.CANCEL);\n this._dialog.set_default_response(Gtk.ResponseType.OK);\n\n const fileFilter = new Gtk.FileFilter();\n fileFilter.add_mime_type('image/*');\n\n this._fileChooser = new Gtk.FileChooserWidget({\n action: Gtk.FileChooserAction.OPEN,\n hexpand: true,\n vexpand: true,\n height_request: 500,\n filter: fileFilter\n });\n\n utils.boxAppend(this._dialog.get_content_area(), this._fileChooser);\n\n this._dialog.connect('response', (dialog, id) => {\n if (id == Gtk.ResponseType.OK) {\n this.set_file(this._fileChooser.get_file());\n this.emit('file-set');\n }\n dialog.hide();\n });\n\n this._button.connect('clicked', (button) => {\n this._dialog.set_transient_for(utils.getRoot(button));\n\n if (utils.gtk4()) {\n this._dialog.show();\n } else {\n this._dialog.show_all();\n }\n\n if (this._file != null) {\n this._fileChooser.set_file(this._file);\n }\n });\n\n this._resetButton.connect('clicked', (button) => {\n this.set_file(null);\n this.emit('file-set');\n });\n }\n\n // Returns the currently selected file.\n get_file() {\n return this._file;\n }\n\n // This makes the file chooser dialog to preselect the given file.\n set_file(value) {\n if (value != null && value.query_exists(null)) {\n this._label.label = value.get_basename();\n } else {\n this._label.label = _('(None)');\n }\n\n this._file = value;\n }\n });\n }\n}", "title": "" }, { "docid": "27ade0dc3f480304409d4ecae0b53f03", "score": "0.49982885", "text": "function classFactory(type) {\n switch (type) {\n case 'Header': return new Header()\n case 'Category': return new Category()\n case 'Task': return new Task()\n case 'Resource': return new Resource()\n }\n}", "title": "" }, { "docid": "10e4ae3d09df3fdaa7fbcd15258e7a43", "score": "0.49920702", "text": "function createEle(kind, id, clazz, my_theme, father) {\n const ele = document.createElement(kind)\n if (id) {\n ele.setAttribute(\"id\", id)\n }\n if (clazz) {\n if (my_theme) {\n ele.setAttribute(\"class\", my_theme + \" \" + clazz)\n } else {\n ele.setAttribute(\"class\", clazz)\n }\n }\n if (father) {\n father.appendChild(ele)\n }\n return ele\n }", "title": "" }, { "docid": "ca5518cd1f3d4a3b85b626042d35a4c7", "score": "0.49848416", "text": "get widgetClass() {}", "title": "" }, { "docid": "ca5518cd1f3d4a3b85b626042d35a4c7", "score": "0.49848416", "text": "get widgetClass() {}", "title": "" }, { "docid": "ca5518cd1f3d4a3b85b626042d35a4c7", "score": "0.49848416", "text": "get widgetClass() {}", "title": "" }, { "docid": "ca5518cd1f3d4a3b85b626042d35a4c7", "score": "0.49848416", "text": "get widgetClass() {}", "title": "" }, { "docid": "ca5518cd1f3d4a3b85b626042d35a4c7", "score": "0.49848416", "text": "get widgetClass() {}", "title": "" }, { "docid": "ca5518cd1f3d4a3b85b626042d35a4c7", "score": "0.49848416", "text": "get widgetClass() {}", "title": "" }, { "docid": "ca5518cd1f3d4a3b85b626042d35a4c7", "score": "0.49848416", "text": "get widgetClass() {}", "title": "" }, { "docid": "0d568ef00dd9bb4e34bb48b598c75007", "score": "0.49645934", "text": "factory(name, depends, producer) {\n this._factories[name] = {\n producer: producer || depends,\n depends: this.annotate(depends),\n instance: null\n };\n\n return this;\n }", "title": "" }, { "docid": "25208274c6d17422a7300f3ebdfe51a9", "score": "0.4946626", "text": "constructor(options) {\n super();\n /**\n * A bound change callback.\n */\n this._changeCallback = (options) => {\n if (!options.data || !options.data[this.mimeType]) {\n return;\n }\n let data = options.data[this.mimeType];\n if (typeof data === 'string') {\n if (data !== this._context.model.toString()) {\n this._context.model.fromString(data);\n }\n }\n else if (data !== null &&\n data !== undefined &&\n !_lumino_coreutils__WEBPACK_IMPORTED_MODULE_3__[\"JSONExt\"].deepEqual(data, this._context.model.toJSON())) {\n this._context.model.fromJSON(data);\n }\n };\n this._fragment = '';\n this._ready = new _lumino_coreutils__WEBPACK_IMPORTED_MODULE_3__[\"PromiseDelegate\"]();\n this._isRendering = false;\n this._renderRequested = false;\n this.addClass('jp-MimeDocument');\n this.mimeType = options.mimeType;\n this._dataType = options.dataType || 'string';\n this._context = options.context;\n this.renderer = options.renderer;\n const layout = (this.layout = new _lumino_widgets__WEBPACK_IMPORTED_MODULE_5__[\"StackedLayout\"]());\n layout.addWidget(this.renderer);\n this._context.ready\n .then(() => {\n return this._render();\n })\n .then(() => {\n // After rendering for the first time, send an activation request if we\n // are currently focused.\n if (this.node === document.activeElement) {\n // We want to synchronously send (not post) the activate message, while\n // we know this node still has focus.\n _lumino_messaging__WEBPACK_IMPORTED_MODULE_4__[\"MessageLoop\"].sendMessage(this.renderer, _lumino_widgets__WEBPACK_IMPORTED_MODULE_5__[\"Widget\"].Msg.ActivateRequest);\n }\n // Throttle the rendering rate of the widget.\n this._monitor = new _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_1__[\"ActivityMonitor\"]({\n signal: this._context.model.contentChanged,\n timeout: options.renderTimeout\n });\n this._monitor.activityStopped.connect(this.update, this);\n this._ready.resolve(undefined);\n })\n .catch(reason => {\n // Dispose the document if rendering fails.\n requestAnimationFrame(() => {\n this.dispose();\n });\n void Object(_jupyterlab_apputils__WEBPACK_IMPORTED_MODULE_0__[\"showErrorMessage\"])(`Renderer Failure: ${this._context.path}`, reason);\n });\n }", "title": "" }, { "docid": "e455905a4113576e629a597bcb86514b", "score": "0.49359056", "text": "function constructWidget(element)\n\t{\n\t\tvar constructorName = element.get(IS_ATTRIBUTE)\n\n\t\tif (!constructorName)\n\t\t{\n\t\t\tthrow new Error(\"The \" + IS_ATTRIBUTE + \" attribute is not defined.\")\n\t\t}\n\n\t\tvar constructor = Brickrouge.Widget[constructorName]\n\n\t\tif (!constructor)\n\t\t{\n\t\t\tthrow new Error(\"Undefined constructor: \" + constructorName)\n\t\t}\n\n\t\telement.store('widget', true)\n\n\t\tvar widget = new constructor(element, element.get('dataset'))\n\n\t\telement.store('widget', widget)\n\n\t\ttry\n\t\t{\n\t\t\twindow.fireEvent('brickrouge.widget', [ widget, this ])\n\t\t}\n\t\tcatch (e)\n\t\t{\n\t\t\tconsole.error(e)\n\t\t}\n\n\t\treturn widget\n\t}", "title": "" }, { "docid": "c325f30223ca0f08ebfad0894d349365", "score": "0.4935671", "text": "static CreateEditor() {}", "title": "" }, { "docid": "2b075defa448539bfd73151ddaa1db69", "score": "0.49032074", "text": "static create(type, owner) {\n const comp = new ComponentFactory.componentCreators[type](owner);\n comp.__type = type;\n return comp;\n }", "title": "" }, { "docid": "bfbc2a7579673b7887bd7c5900a05a45", "score": "0.48989576", "text": "function Create(callback) {\n var widget = null;\n return {\n getWidget: function () { return widget; },\n setWidget: function (p) { widget = p; callback(widget); },\n };\n }", "title": "" }, { "docid": "565c322d74d5faaf3c7efc421177d796", "score": "0.48939872", "text": "createNew(path, widgetName = 'default', kernel) {\n return this._createOrOpenDocument('create', path, widgetName, kernel);\n }", "title": "" }, { "docid": "15911e6926e28bc5582b3e89c32a9bbc", "score": "0.4882993", "text": "constructor(widgetFactory) {\n if (!_plainDataWidgetFactory) {\n _plainDataWidgetFactory = this;\n _userEvents = new UserEvents();\n _widgetFactory = widgetFactory;\n }\n return _plainDataWidgetFactory;\n }", "title": "" }, { "docid": "8410c00a3c14b1bda8628677f9174124", "score": "0.48561937", "text": "constructor(options) {\n this._isDisposed = false;\n this._widgetCreated = new Signal(this);\n this._translator = options.translator || nullTranslator;\n this._name = options.name;\n this._readOnly = options.readOnly === undefined ? false : options.readOnly;\n this._defaultFor = options.defaultFor ? options.defaultFor.slice() : [];\n this._defaultRendered = (options.defaultRendered || []).slice();\n this._fileTypes = options.fileTypes.slice();\n this._modelName = options.modelName || 'text';\n this._preferKernel = !!options.preferKernel;\n this._canStartKernel = !!options.canStartKernel;\n this._shutdownOnClose = !!options.shutdownOnClose;\n this._toolbarFactory = options.toolbarFactory;\n }", "title": "" }, { "docid": "77fdead0a7e3ebf4d4fbb88b797c10c3", "score": "0.48561355", "text": "static factory(definition) {\n const extension = new Button();\n completeAssign(extension, definition);\n return extension;\n }", "title": "" }, { "docid": "c81d6abcc9475d2e1524ec40f1dde410", "score": "0.48523104", "text": "constructor(componentFamily) {\n\n var self = this;\n\n var validFamilies = ['slack', 'facebook'];\n\n if(componentFamily === null || componentFamily === undefined){\n throw new Error('Null or undefined componentFamily passed to UIComponentFactory constructor.');\n }\n\n if(validFamilies.indexOf(componentFamily) == -1){\n throw new Error('Valid component families are: ' + validFamilies);\n }\n\n /* TODO: avoid lengthy if/else statements by storing builder components in a table\n * keyed by component family name\n var builders = {};\n builders['slack'] = SlackComponentBuilder();\n builers['facebook'] = FacebookBuilder();\n */\n\n this.componentFamily = componentFamily; // either 'slack' or 'facebook' for now\n\n\n this.buildTextMessage = function(text){\n\n if(this.componentFamily == 'slack'){\n return new SlackCard(text);\n }\n }\n\n this._labelToValue = function(label){\n return label.toLowerCase().replaceAll(' ', '_');\n }\n\n this._labelToButtonName = function(label){\n\n return this._labelToValue(label) + '_btn';\n }\n\n this.buildButtonGroup = function(buttonGroupLabel, optionStrings, defaultOption){\n\n if(this.componentFamily == 'slack'){\n var component = new SlackAttachment(buttonGroupLabel, buttonGroupLabel, optionStrings.join('/'), '#3AA3E3', 'default');\n optionStrings.forEach(function(optionString){\n var b = new SlackButton(self._labelToButtonName(optionString),\n optionString,\n 'primary',\n 'button',\n self._labelToValue(optionString));\n component.addButton(b);\n });\n return component;\n }\n }\n\n return this;\n }", "title": "" }, { "docid": "42c39fcc0c6d5986eb33cc4f911d7a7b", "score": "0.48262343", "text": "function createPreview(type, src) {\n var el = document.createElement(type);\n el.style.margin = '2%';\n el.style.width = '25%';\n el.style.height = 'auto';\n el.style.boxShadow = '0 0 0 4px white, 0px 1px 7px 4px rgba(0, 0, 0, 0.15), 0px 0px';\n el.src = src;\n return el;\n }", "title": "" }, { "docid": "58e650d523a30cef6e2bcda9c4069275", "score": "0.4817947", "text": "constructor(type, attrs) {\n this.type = type;\n this.attrFactories = attrs;\n }", "title": "" }, { "docid": "9cd546710ffd8d0ebe970ea4d73d0e99", "score": "0.48015663", "text": "function createFactory(viewSpecifier, viewName) {\n\treturn function() {\n\t\tvar props = {}\n\t\tvar children = []\n\t\teach(arguments, function processArg(val) {\n\t\t\tif (val === undefined || val === null || val === true || val === false) {\n\t\t\t\treturn\n\t\t\t\t\n\t\t\t} else if (_isReactObj(val)) {\n\t\t\t\tchildren.push(val)\n\t\t\t\t\n\t\t\t} else if (val._isTagsStyleSheet) {\n\t\t\t\tif (!props.style) {\n\t\t\t\t\tprops.style = [val._tagsStyleSheetId]\n\t\t\t\t} else if (!isArray(props.style)) {\n\t\t\t\t\tthrow new Error('Cannot use both tags.Style and tags.StyleSheet on the same element')\n\t\t\t\t} else {\n\t\t\t\t\tprops.style.push(val._tagsStyleSheetId)\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if (val._isTagsStyleVal) {\n\t\t\t\tif (!props.style) {\n\t\t\t\t\tprops.style = val._tagsStyleVal\n\t\t\t\t} else if (!isObject(props.style)) {\n\t\t\t\t\tthrow new Error('Cannot use both tags.StyleSheet and tags.Style on the same element')\n\t\t\t\t} else {\n\t\t\t\t\tassign(props.style, val._tagsStyleVal)\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if (isFunction(val)) {\n\t\t\t\tprocessArg(val(props, children))\n\t\t\t\t\n\t\t\t} else if (isArray(val) || isArguments(val)) {\n\t\t\t\teach(val, processArg)\n\t\t\t\t\n\t\t\t} else if (isObject(val)) {\n\t\t\t\tif (val.style && props.style) {\n\t\t\t\t\tthrow new Error(\"Cannot use multiple style properties on the same element\")\n\t\t\t\t} else if (val.__value) {\n\t\t\t\t\t// TODO: expose canonical way for autoreact to play well with tags.js\n\t\t\t\t\tprocessArg(val.__value)\n\t\t\t\t} else {\n\t\t\t\t\tassign(props, val)\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tchildren.push(val)\n\t\t\t}\n\t\t})\n\t\tapplyStyleDefaults(viewName, props)\n\t\treturn React.createElement(viewSpecifier, props, ...children)\n\t}\n}", "title": "" }, { "docid": "6c349877bc253075fe6504f36b5cd0fc", "score": "0.48006287", "text": "function createTypeCombo() {\n let types = ['O', 'M', 'F'];\n let items = [];\n for (let i = 0; i < types.length; ++i) {\n items[i] = new ListItem(types[i], #('tal-type-' + types[i]));\n }\n\n return comboBox(items);\n}", "title": "" }, { "docid": "ba6739ac09a519283fcbe7eb17819bb2", "score": "0.47962388", "text": "function defineTypes() {\n let types = {\n html : \"application/xhtml+xml\",\n css : \"text/css\",\n js : \"application/javascript\",\n mjs : \"application/javascript\", // for ES6 modules\n png : \"image/png\",\n gif : \"image/gif\", // for images copied unchanged\n jpeg : \"image/jpeg\", // for images copied unchanged\n jpg : \"image/jpeg\", // for images copied unchanged\n svg : \"image/svg+xml\",\n json : \"application/json\",\n pdf : \"application/pdf\",\n txt : \"text/plain\",\n ttf : \"application/x-font-ttf\",\n woff : \"application/font-woff\",\n aac : \"audio/aac\",\n mp3 : \"audio/mpeg\",\n mp4 : \"video/mp4\",\n webm : \"video/webm\",\n ico : \"image/x-icon\", // just for favicon.ico\n xhtml: undefined, // non-standard, use .html\n htm : undefined, // non-standardhttps://localhost:3443/null, use .html\n rar : undefined, // non-standard, platform dependent, use .zip\n doc : undefined, // non-standard, platform dependent, use .pdf\n docx : undefined, // non-standard, platform dependent, use .pdf\n }\n return types;\n}", "title": "" }, { "docid": "b8b37028f0ea371378e973228e498232", "score": "0.47615257", "text": "function ImageShapeFactory(){\n return {\n /**\n * Create a shape class that consists only of an image\n * @param {String} name the name of the shape\n * @param {String} imageUrl the url to the image\n * @returns {Function} the constructor function of the new shape\n * @memberof module:Shapes.ImageShapeFactory\n */\n createImageShape: function(name,imageUrl){\n mxUtils.extend(GenericImageShape, mxShape);\n function GenericImageShape(){\n var str = '<shape name=\"'+ name + '\" w=\"128\" h=\"128\"><background><fillcolor color=\"none\"/><strokecolor color=\"none\"/><rect x=\"0\" y=\"0\" w=\"128\" h=\"128\"/><fillstroke/></background><foreground><image src=\"'+ imageUrl +'\" x=\"0\" y=\"0\" w=\"128\" h=\"128\"/></foreground></shape>';\n var xml = mxUtils.parseXml(str);\n var stencil = new mxStencil(xml.documentElement);\n mxShape.call(this, stencil);\n }\n return GenericImageShape;\n }\n }\n}", "title": "" }, { "docid": "34773fce9f430848b22e81baceefa435", "score": "0.47598928", "text": "function factory() {}", "title": "" }, { "docid": "34773fce9f430848b22e81baceefa435", "score": "0.47598928", "text": "function factory() {}", "title": "" }, { "docid": "7f0bcf44f52456c67affce999ed2f7a3", "score": "0.47521412", "text": "function ElementFactory () {\n this.create = function ( type, obj ) { // type of element + array of attributes and values.\n var obj = obj;\n var type = type;\n var element = document.createElement(type);\n for ( key in obj ) {\n element[key] = obj[key];\n console.log( key + \" = \" + obj[key] );\n }\n return element;\n },\n this.createText = function () {\n\n }, \n this.remove = function () {\n\n }\n}", "title": "" }, { "docid": "249b04ab32cc7c53a3574f9775ca64b7", "score": "0.4741288", "text": "function Type() {\n // Apply the constructor to the new object\n return constructor.apply(this, args);\n }", "title": "" }, { "docid": "35e4e1b809abc92761d058875965900a", "score": "0.4716576", "text": "create(factory, path) {\n return factory(this._root, path);\n }", "title": "" }, { "docid": "2c77793032b24cab016ab2b573a07eec", "score": "0.4710169", "text": "function dom_renderer_factory(props = []) {\n const wrapper = document.createElement('div')\n const renderer = util_assignArr(\n ['', document.createElement('div'), 500, 500, null, null, wrapper, 0, 0],\n props\n )\n\n // set style\n renderer[RENDERER_DOM].style.position = 'absolute'\n renderer[RENDERER_DOM].setAttribute('data-key', renderer[RENDERER_KEY])\n\n // append to container\n renderer[RENDERER_CONTAINER].appendChild(renderer[RENDERER_DOM])\n\n // init canvas size\n dom_renderer_setBounds(\n renderer,\n 0,\n 0,\n renderer[RENDERER_DOM_WIDTH],\n renderer[RENDERER_DOM_HEIGHT]\n )\n\n return renderer\n}", "title": "" }, { "docid": "12cbf3696b55a914f7c8f3911c261d17", "score": "0.47047752", "text": "function Factory() {}", "title": "" }, { "docid": "ce2bb0360b97100394d3e80496291a49", "score": "0.47031787", "text": "function MorphineCreator (bubbler) {\n \tvar f = function () {},\n \t\tproto = new M(bubbler);\n \n f.prototype = proto;\n f.prototype.constructor = Morphine;\n\n return new f;\n }", "title": "" }, { "docid": "a0aebe79bf3fc706bf5e13f4d89c3be5", "score": "0.46998817", "text": "static createFrom({mediaInfo})\n {\n let classType;\n\n if(mediaInfo.classType)\n {\n // This object was created by serialize(). It's already been postprocessed, and\n // classType tells us which subclass to use.\n let classes = {\n VviewMediaInfo,\n PixivMediaInfo,\n };\n\n classType = classes[mediaInfo.classType];\n mediaInfo = mediaInfo.info;\n }\n else\n {\n // This is API data. Figure out the correct subclass from the media ID.\n if(helpers.mediaId.isLocal(mediaInfo.mediaId))\n classType = VviewMediaInfo;\n else\n classType = PixivMediaInfo;\n\n // Run preprocessing if this subclass needs it.\n mediaInfo = classType.preprocessInfo({mediaInfo});\n }\n\n return new classType({mediaInfo});\n }", "title": "" }, { "docid": "4c60272e7ea387336782796ac7ef901b", "score": "0.4698704", "text": "defaultWidgetFactory(path) {\n if (!path) {\n return this._widgetFactories[this._defaultWidgetFactory];\n }\n return this.preferredWidgetFactories(path)[0];\n }", "title": "" }, { "docid": "80137d0bd472e94656577482d16d1269", "score": "0.46969774", "text": "function $c(type){\n return document.createElement(type);\n}", "title": "" }, { "docid": "0eabc073c249ec031879a75f284a15d0", "score": "0.46653336", "text": "function makeFacet(facetType, facetFactory, domNode, dimensions, updateAll) {\n\n if (facetFactory[facetType] === undefined) {\n console.warn('WARNING: Unknown facet type ' + facetType);\n return null;\n } else {\n console.log(\"LOADING: Facet type \" + facetType);\n return facetFactory[facetType](domNode, dimensions, updateAll);\n }\n }", "title": "" }, { "docid": "dc2089d37997a099b6b128ac22aaba55", "score": "0.46652517", "text": "constructor (generateState, render, destroy) {\n this.type = \"Widget\";\n this.generateState = generateState;\n this.render = render;\n this._destroy = destroy;\n this.state = null;\n }", "title": "" }, { "docid": "27b5f6d2517bb1af554201ab2a3d317c", "score": "0.4663976", "text": "function NSGetFactory (cid) {\r\n\tfor(var i in Lwm2mDevKitProtocol.CLASS_ID) {\r\n\t\tif (cid.equals(Lwm2mDevKitProtocol.CLASS_ID[0])) {\r\n\t\t\treturn new Lwm2mDevKitProtocol.HandlerFactory();\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "86dc72e3200e2e657f639b4f32e35171", "score": "0.46605656", "text": "_updateMimetype() {\n var _a;\n let info = (_a = this._model) === null || _a === void 0 ? void 0 : _a.metadata.get('language_info');\n if (!info) {\n return;\n }\n this._mimetype = this._mimetypeService.getMimeTypeByLanguage(info);\n Object(_lumino_algorithm__WEBPACK_IMPORTED_MODULE_0__[\"each\"])(this.widgets, widget => {\n if (widget.model.type === 'code') {\n widget.model.mimeType = this._mimetype;\n }\n });\n }", "title": "" }, { "docid": "cb1b811e5ea86a7687be919daf909aed", "score": "0.46586227", "text": "function createEditor(type, name) {\n var editor = domUtil.createElement('editor.' + type);\n editor.id = name;\n editor.appendChild(createTopLayer(type, name));\n editor.appendChild(createMainBody(type, name));\n return editor;\n }", "title": "" }, { "docid": "52d36bc2b0ee3e53019704bbad7686db", "score": "0.46486995", "text": "function Widget(options) {\n this.element = $(this.constructor.template);\n this.classes = $.extend({}, Widget.classes, this.constructor.classes);\n this.options = $.extend(\n {},\n Widget.options,\n this.constructor.options,\n options\n );\n this.extensionsInstalled = false;\n}", "title": "" }, { "docid": "52d36bc2b0ee3e53019704bbad7686db", "score": "0.46486995", "text": "function Widget(options) {\n this.element = $(this.constructor.template);\n this.classes = $.extend({}, Widget.classes, this.constructor.classes);\n this.options = $.extend(\n {},\n Widget.options,\n this.constructor.options,\n options\n );\n this.extensionsInstalled = false;\n}", "title": "" }, { "docid": "8689fc39f7f681f06448745d4a77c9c1", "score": "0.46463317", "text": "function createTextFactory(type) {\n\t\ttype += 'Node';\n\n\t\treturn createText\n\n\t\t// Construct a `Text` from a bound `type`\n\t\tfunction createText(value, eat, parent) {\n\t\t\tif (value === null || value === undefined) {\n\t\t\t\tvalue = '';\n\t\t\t}\n\n\t\t\treturn (eat || noopEat)(value)(\n\t\t\t\t{\n\t\t\t\t\ttype: type,\n\t\t\t\t\tvalue: String(value)\n\t\t\t\t},\n\t\t\t\tparent\n\t\t\t)\n\t\t}\n\t}", "title": "" }, { "docid": "115b2c2bc49bb0f1a265f4786aa17a9e", "score": "0.46404818", "text": "function createWidget(jsonData, id) {\n if (typeof jsonData === 'string' || jsonData instanceof String) console.error(\"You passed a string when A Json object was expected.\");\n if (!jsonData && !id) console.error(\"Either Json data OR ID must be defined\");\n\n var newWidget = new WidgetObject();\n if (id) {\n var div = document.createElement('div');\n div.id = id;\n // base creation\n div.className = 'widget hidden';\n div.draggable = false;\n // things can be dragged onto empy space\n div.ondragover = globalDragOver;\n div.ondrop = dashboardDrop;\n\n // blank title\n var text = document.createElement('p');\n text.textContent = \"\";\n text.className = CSS.UNTARGETABLECHILDREN;\n div.appendChild(text);\n\n // assign to new widget\n newWidget.dom.base = div;\n newWidget.dom.title = text;\n }\n\n\n return jsonData ? newWidget.fromJSON(jsonData) : newWidget; //return blank or generate based on json input;\n}", "title": "" }, { "docid": "0cffbef87f1f9a2320dfe15299a80dd2", "score": "0.46395272", "text": "function iibWidgetRegistry(){\n var widgetRegistry = {\n attributeType : {\n text : {\n isText:function(){ \n return true;\n }\n }\n },\n factories:[],\n /*\n Parms\n widgetFactory : function(canvas,data)\n Constructor function for widget \n Parms\n canvas\n {\n svg : a d3 selection containing the root SVG element for this widget\n height : the height, in pixels of the area allocated to draw this widget\n width : the width, in pixels of the area allocated to draw this widget\n }\n data : an object, or array containing the data to be rendered by this widget. \n The structure of this parameter is determined by the map field of the factory\n Returns : an instance widget object \n {\n init : function(canvas,data)\n Called once per widget object instance to initialise the D3 elements that will not vary\n draw : function(canvas,data)\n Called whenever the bound data changes.\n }\n Properties\n id : (string) non-normalized (snake case) name of the widget type, e.g. to be used in angular directives\n map : function(IntegrationBus,options)\n Convert the IntegrationBus object to the format of data required. This can be a function provided, specifically for use with this widget or can be one of the general map functions provided by d3Util factory\n TODO - probably need some way to indicate when to call draw - no point redrawing a chart for every publication if it is not rendering any data that was altered in that publication. \n This is purely a performance optimisation and would really only benefit charts that are static so maybe we just need to no-op the draw function if the chart is static\n */\n register:function(widgetFactory){\n this.factories[widgetFactory.descriptor.id]=widgetFactory;\n this.factories.push(widgetFactory);\n },\n createWidget:function(id,options){\n var factory = this.factories[id];\n if(factory){\n var widget=new factory.widget(options);\n if(widget.map==undefined){\n widget.map=function(integrationBus){return integrationBus;};\n }\n return widget;\n }else{\n return null;\n } \n },\n describeWidgets:function(){\n //TODO make this asyncronous?\n var widgetDescriptions=[];\n this.factories.forEach(function(factory){\n //TODO add nls support. Only id should be mandatory and we can optionally lookup and nls JSON file for the other fields\n widgetDescriptions.push(\n {\n id : factory.descriptor.id,\n name : factory.descriptor.name,\n description : factory.descriptor.description,\n preview : factory.descriptor.preview,//this is a URL ( relative or absolute) to an image file. \n //TODO: draw the widget using simulated data\n attributes : factory.descriptor.attributes\n \n }\n );\n \n });\n return widgetDescriptions;\n \n }\n };\n \n this.register=function(factory){\n widgetRegistry.register(factory);\n };\n this.attributeType=widgetRegistry.attributeType;\n this.$get=function(){\n return widgetRegistry; \n }\n }", "title": "" }, { "docid": "5614ab06378520dfbd2ec2d0eab35ad3", "score": "0.46393475", "text": "addFactory(factory, rank) {\n if (rank === undefined) {\n rank = factory.defaultRank;\n if (rank === undefined) {\n rank = 100;\n }\n }\n for (let mt of factory.mimeTypes) {\n this._factories[mt] = factory;\n this._ranks[mt] = { rank, id: this._id++ };\n }\n this._types = null;\n }", "title": "" }, { "docid": "d22369bee9c8e51cb5a798fd1b1dc59e", "score": "0.46359655", "text": "getWidgetFactory(widgetName) {\n return this._widgetFactories[widgetName.toLowerCase()];\n }", "title": "" }, { "docid": "dc96653c8447fb65ba9947072a7e9399", "score": "0.4627177", "text": "createNewWidget(context) {\n return new GeoJSDocWidget(context);\n }", "title": "" }, { "docid": "9f688bcbd156140c98f74c2d3cdbe73f", "score": "0.4626186", "text": "constructor() {\n let [\n flags,\n encoding,\n mode,\n autoClose,\n emitClose,\n start,\n end,\n highWaterMark,\n fs\n ] = _parse_opts(arguments, {\n flags: 'r',\n encoding: undefined,\n mode: undefined, // 0o666\n autoClose: undefined, // true\n emitClose: undefined, // false\n start: undefined, // 0\n end: undefined, // Infinity\n highWaterMark: undefined, // 64 * 1024\n fs: undefined\n })\n\n // when this class is called as a function, redirect it to .call() method of itself\n super('return arguments.callee.call.apply(arguments.callee, arguments)')\n\n Object.defineProperty(this, 'name', {\n get() {\n return sub('FileType(%r)', flags)\n }\n })\n this._flags = flags\n this._options = {}\n if (encoding !== undefined) this._options.encoding = encoding\n if (mode !== undefined) this._options.mode = mode\n if (autoClose !== undefined) this._options.autoClose = autoClose\n if (emitClose !== undefined) this._options.emitClose = emitClose\n if (start !== undefined) this._options.start = start\n if (end !== undefined) this._options.end = end\n if (highWaterMark !== undefined) this._options.highWaterMark = highWaterMark\n if (fs !== undefined) this._options.fs = fs\n }", "title": "" }, { "docid": "c2de797e721dee79cd50586625bdea93", "score": "0.4625137", "text": "_createOrOpenDocument(which, path, widgetName = 'default', kernel, options) {\n let widgetFactory = this._widgetFactoryFor(path, widgetName);\n if (!widgetFactory) {\n return undefined;\n }\n let modelName = widgetFactory.modelName || 'text';\n let factory = this.registry.getModelFactory(modelName);\n if (!factory) {\n return undefined;\n }\n // Handle the kernel pereference.\n let preference = this.registry.getKernelPreference(path, widgetFactory.name, kernel);\n let context;\n let ready = Promise.resolve(undefined);\n // Handle the load-from-disk case\n if (which === 'open') {\n // Use an existing context if available.\n context = this._findContext(path, factory.name) || null;\n if (!context) {\n context = this._createContext(path, factory, preference);\n // Populate the model, either from disk or a\n // model backend.\n ready = this._when.then(() => context.initialize(false));\n }\n }\n else if (which === 'create') {\n context = this._createContext(path, factory, preference);\n // Immediately save the contents to disk.\n ready = this._when.then(() => context.initialize(true));\n }\n else {\n throw new Error(`Invalid argument 'which': ${which}`);\n }\n let widget = this._widgetManager.createWidget(widgetFactory, context);\n this._opener.open(widget, options || {});\n // If the initial opening of the context fails, dispose of the widget.\n ready.catch(err => {\n widget.close();\n });\n return widget;\n }", "title": "" }, { "docid": "106799390eaf18dd93ced8c8ab5c479d", "score": "0.46221784", "text": "function createFromMetainfos(metainfos, self) {\n //check if mime is playable first: -dk\n if ( _.isUndefined(metainfos.type) || !soundManager.canPlayMIME(metainfos.type)) {\n console.log(\"MIME IS WRONG :(\")\n //check if url is playable\n if (soundManager.canPlayURL(metainfos.getSrc()) !== true) {\n console.log('invalid song url');\n return null;\n }\n }\n return soundManager.createSound({\n id: metainfos.id,\n url: metainfos.getSrc(),\n /* events cb */\n onload: _.bind(function (e) {\n if (_.isFunction(this.onload)) this.onload(e);\n }, self)\n });\n\n }", "title": "" }, { "docid": "0fbd6547e4062c8abd2e52f76faa2855", "score": "0.46133304", "text": "_createLauncher() {\n\t\tlet widget = document.getElementById(\"ch_widget\");\n\t\tlet launcher;\n\n\t\t// Create default launcher if not exist\n\t\tif(!document.getElementById(\"ch_launcher\")) {\n\t\t\tlet launcherAttributes = [{\"id\":\"ch_launcher\"},{\"class\":\"ch-launcher\"}];\n\t\t\tlauncher = this.utility.createElement(\"div\", launcherAttributes, null, widget);\n\n\t\t\t// Create launcher image\n\t\t\tlet launcherImageAttributes = [{\"id\":\"ch_launcher_image\"},{\"class\":\"ch-launcher-image\"},{\"src\":IMAGES.LAUNCHER_ICON}];\n\t\t\tthis.utility.createElement(\"img\", launcherImageAttributes, null, launcher);\n\t\t}\n\n\t\t// Create channelize frame\n\t\tlet frameAttributes = [{\"id\":\"ch_frame\"},{\"class\":\"ch-frame\"}];\n\t\tlet frame = this.utility.createElement(\"div\", frameAttributes, null, widget);\n\n\t\t// Channelize launcher listener\n\t\tlauncher.addEventListener(\"click\", (data) => {\n\t\t\t// If login window already exist\n\t\t\tif(document.getElementById(\"ch_login_window\"))\n\t\t\t\treturn;\n\n\t\t\t// Show recent conversation window if already exist\n\t\t\tif(document.getElementById(\"ch_recent_window\")) {\n\t\t\t\tdocument.getElementById(\"ch_recent_window\").style.display = \"block\";\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet user = this.chAdapter.getLoginUser();\n\t\t\tif(user) {\n\t\t\t\t// Invoke recent conversation window\n\t\t\t\tthis.recentConversations = new RecentConversations(this);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Invoke login screen\n\t\t\t\tnew Login(this);\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "f72bf63429c5d1a4e12ddb8784a7341d", "score": "0.46130174", "text": "__elemCreator(type, className= MagicVar.NOT_INIT, id= MagicVar.NOT_INIT)\r\n {\r\n const newElem = document.createElement(type);\r\n if (className !== MagicVar.NOT_INIT)\r\n { newElem.setAttribute(\"class\",className);}\r\n if (id !== MagicVar.NOT_INIT)\r\n {newElem.id = id;}\r\n return newElem;\r\n }", "title": "" }, { "docid": "4eb56bf665437f8d2f5f0e11a245a624", "score": "0.460409", "text": "createInstance(name) {\n var instance = WidgetService.getWidgetInstance(name);\n\n return instance;\n }", "title": "" }, { "docid": "9690807178be46c151089d1ac13893d5", "score": "0.45985588", "text": "function createWidget(name, options) {\n var fn = WidgetFactoryMapping[name];\n\n if (fn) {\n return fn(options);\n }\n return null;\n}", "title": "" }, { "docid": "a83c0328d4bc054a6a1d965e864831bb", "score": "0.45982203", "text": "function makeType(notifier, type) {\n var style = options.styles[type];\n\n notifier[type] = function (message) {\n appendNotification(style, message);\n };\n\n return notifier;\n }", "title": "" }, { "docid": "999cba16c0e4da07ad8a8c693c12f128", "score": "0.45941436", "text": "static newFromElementId(elementId, width = 500, height = 200) {\n return new Factory({ renderer: { elementId, width, height } });\n }", "title": "" }, { "docid": "2037d087cb59d1c3663e5eb70749bc08", "score": "0.45879132", "text": "createInstance(type, props, rootContainerInstance, hostContext) {\n return createElement(type, props, rootContainerInstance, hostContext);\n }", "title": "" }, { "docid": "9c478b6797eeefac8a5f1c6086ff797c", "score": "0.45846972", "text": "function createTextFactory(type) {\n type += 'Node'\n\n return createText\n\n // Construct a `Text` from a bound `type`\n function createText(value, eat, parent) {\n if (value === null || value === undefined) {\n value = ''\n }\n\n return (eat || noopEat)(value)({type, value: String(value)}, parent)\n }\n}", "title": "" }, { "docid": "fbd151a2497d4d157443e8c4a684e76e", "score": "0.4584517", "text": "function createLegacyDefinitionAdapter(defn) {\n var result = {\n name: defn.name,\n type: defn.type,\n initialize: function(el, width, height) {\n return defn.factory(el, width, height);\n },\n renderValue: function(el, x, instance) {\n return instance.renderValue(x);\n },\n resize: function(el, width, height, instance) {\n return instance.resize(width, height);\n }\n };\n\n if (defn.find)\n result.find = defn.find;\n if (defn.renderError)\n result.renderError = defn.renderError;\n if (defn.clearError)\n result.clearError = defn.clearError;\n\n return result;\n }", "title": "" }, { "docid": "9238ce02773c9bcfb55b1290e71796db", "score": "0.45809737", "text": "function constructInvisibleFileInputElement() {\n const fileSelector = document.createElement('input');\n fileSelector.setAttribute('type', 'file');\n fileSelector.setAttribute('accept', 'text/x-yaml');\n fileSelector.style.display = 'none';\n fileSelector.addEventListener('change', event => {\n handleFileList(event.target.files);\n });\n return fileSelector;\n}", "title": "" }, { "docid": "5439f256e30b12a88d2b58238000d991", "score": "0.45784724", "text": "function createCommandFactory() {\n function commandFactory(command) {\n return command;\n }\n return commandFactory;\n }", "title": "" }, { "docid": "5022704f88169deaa2e657a75b594d72", "score": "0.45717508", "text": "function createInputElement(type,name){\n if(YAHOO.env.ua.ie > 0){\n\treturn(document.createElement('<input type=\"' + type + '\" type=\"' + name + '\" name=\"' + name + '\">'));\n }\n\n var el = document.createElement('input');\n el.setAttribute('type',type);\n el.setAttribute('id',name);\n el.setAttribute('name',name);\n return(el);\n}", "title": "" }, { "docid": "7084a9c693a406dd4a3b6a4173871fd4", "score": "0.4571295", "text": "function createTag(filename, filetype, appendTo, elementname){\r\n if (filetype==\"js\"){\r\n var fileref=document.createElement('script');\r\n fileref.setAttribute(\"type\",\"text/javascript\");\r\n fileref.setAttribute(\"src\", filename);\r\n }\r\n else if (filetype==\"css\"){\r\n var fileref=document.createElement(\"link\");\r\n fileref.setAttribute(\"rel\", \"stylesheet\");\r\n fileref.setAttribute(\"type\", \"text/css\");\r\n fileref.setAttribute(\"href\", filename);\r\n }\r\n else if (filetype==\"ifrm\"){\r\n var fileref=document.createElement(\"iframe\");\r\n fileref.id=elementname;\r\n fileref.name=elementname;\r\n fileref.src=filename;\r\n fileref.style.display=\"inline\";\r\n fileref.style.height=\"90px\";\r\n fileref.style.width=\"728px\";\r\n fileref.frameBorder=\"0\";\r\n fileref.setAttribute(\"scrolling\",\"no\");\r\n\r\n if (typeof fileref!=\"undefined\"){\r\n \tappendTo.appendChild(fileref);\r\n \treturn;\r\n }\r\n }\r\n if (typeof fileref!=\"undefined\"){\r\n \tdocument.getElementsByTagName(appendTo)[0].appendChild(fileref);\r\n\t}\r\n}", "title": "" } ]
32f7043ca891405a9e81acb635c9072f
Fetches the value associated with the given key from the hash table Fetch the bucket associated with the given key using the getIndexBelowMax function Find the key, value pair inside the bucket and return the value
[ { "docid": "c8619623c07fa2e60711dca88878b8ad", "score": "0.6388254", "text": "retrieve(key) {\n const index = getIndexBelowMax(key.toString(), this.limit);\n const bucket = this.storage.get(index);\n let retrieved;\n if (bucket) {\n retrieved = bucket.filter(item => item[0] === key)[0];\n }\n }", "title": "" } ]
[ { "docid": "d23f124b9ab009d5d153be7ae4c6641e", "score": "0.68492585", "text": "get(key) {\n const keyString = this.checkKey(key);\n const targetBucket = this.hash(keyString);\n let currentBucket = this.buckets[targetBucket];\n\n while (currentBucket) {\n if (currentBucket.key === keyString) {\n return currentBucket.value;\n }\n currentBucket = currentBucket.next;\n }\n\n return null;\n }", "title": "" }, { "docid": "18ae77659f10bfb5676300008592572d", "score": "0.68163085", "text": "get(key) {\n\t\tconst index = this.hashFunction(key, this.capacity);\n if (this.buckets[index] === undefined) {\n return new Error('Element you are looking for doesn\\'t exist');\n }\n if (this.buckets[index].length === 1 && this.buckets[index][0][0] === key) {\n return this.buckets[index][0][1];\n } else {\n for (let i = 0; i < this.buckets[index].length; i++) {\n if (this.buckets[index][i] !== undefined && this.buckets[index][i][0] === key) {\n\t\t\t\t\treturn this.buckets[index][i][1];\n }\n }\n }\n }", "title": "" }, { "docid": "0aecb76d637fa6afcc2801a87e43b25f", "score": "0.67744327", "text": "retrieve(key) {\n const index = getIndexBelowMax(key.toString(), this.limit);\n const bucket = this.storage.get(index);\n let retrieved;\n if (bucket) {\n retrieved = bucket.filter(item => item === key);\n }\n return retrieved.head.value ? retrieved.head.value : undefined;\n }", "title": "" }, { "docid": "ab0b8a4cd9c2110edb229ab79c4e0991", "score": "0.66239536", "text": "retrieve(key) {\n // get index for the key\n const index = getIndexBelowMax(key.toString(), this.limit);\n const bucket = this.storage.get(index)\n\n if(!bucket) return;\n\n let found;\n bucket.forEach((item) => {\n if(item[0] === key){\n found = item[1];\n }\n });\n return found;\n }", "title": "" }, { "docid": "1e7ce1a1edd659b494db2290f068ae68", "score": "0.65852845", "text": "get(key){\n let address = this._hash(key)\n const holdingBucket= this.data[address]\n if (holdingBucket){\n for (let i=0; i<holdingBucket.length ; i++){\n if (holdingBucket[i][0] === key){\n return holdingBucket[i][1]\n }\n }\n }\n return undefined\n }", "title": "" }, { "docid": "9c69194b08882a65158afe02ef1f892a", "score": "0.64902157", "text": "get(key) {\n const address = this._hash(key);\n const currentBucket = this.data[address];\n if (currentBucket) {\n for (let i = 0; i < currentBucket.length; i++) {\n if (currentBucket[i][0] === key) {\n return currentBucket[i][1];\n }\n }\n }\n return undefined;\n }", "title": "" }, { "docid": "846ce508cafb07be6960b9469f1c4c2c", "score": "0.6264606", "text": "function findMaxByKey(list, key) {\r\n return list.reduce((res, obj) => {\r\n return obj[key] > res ? obj[key] : res\r\n }, 0)\r\n}", "title": "" }, { "docid": "2cf38d187720884c5f7492850c8a943e", "score": "0.62435585", "text": "lookup (key) {\n let index = HashTable.hash(key, this._storageLimit);\n\n if (this._storage[index] === undefined) {\n return undefined;\n } else {\n for (let i = 0; i < this._storage[index].length; i++) {\n if (this._storage[index][i][0] === key)\n return this._storage[index][i][1];\n }\n }\n }", "title": "" }, { "docid": "35cf9c4847722cc3c6442460e9d9e11c", "score": "0.61563426", "text": "get(key) {\n let address = this._hash(key);\n // Gets the key/value pairs array location\n const currentBucket = this.data[address];\n if (currentBucket) {\n for (let i = 0; i < currentBucket.length; i++) {\n // Goes to every single array position until the keys match up.S\n if (currentBucket[i][0] === key) {\n return currentBucket[i][1];\n }\n }\n return undefined;\n }\n }", "title": "" }, { "docid": "5769e915db11318c9b3d01b50c0725fc", "score": "0.6147752", "text": "function getHighestNumber(arr, key) {\n return Math.max.apply(Math, arr.map(function(obj){\n return obj[key];\n }));\n }", "title": "" }, { "docid": "bad2d1d495586639f025f3b651b43357", "score": "0.6061835", "text": "get(key) {\n const position = this.hashCode(key)\n const linkedList = this.table[position]\n if (linkedList != null && !linkedList.isEmpty()) {\n let current = linkedList.getHead()\n while (current != null) {\n if (current.element.key === key) {\n return current.element.value\n }\n current = current.next\n }\n }\n return undefined\n }", "title": "" }, { "docid": "337513d5615b63b3305a8ca0d2f260a6", "score": "0.59123135", "text": "get(key) {\n let index;\n index = this.hash(key);\n\n // if that index is not empty\n if (this.keyMap[index]) {\n for (let i = 0; i < this.keyMap[index].length; i++) {\n if (this.keyMap[index][i][0] === key) //[0] represents the key as its in the 0th index\n return this.keyMap[index][i][1]; //[1] represents the value of that key as its in the 1st index\n }\n }\n\n //if that index is empty\n if (!this.keyMap[index])\n return undefined;\n }", "title": "" }, { "docid": "61eaebbef7a0c7323b338fd92e532632", "score": "0.5903841", "text": "get(key)\r\n {\r\n return this.table[this.loseloseHashCode(key)];\r\n }", "title": "" }, { "docid": "750e7dc6e57a70267b63207839c62f8f", "score": "0.5881313", "text": "retrieve(key) {\n const bucket = this.storage.get(this.map(key));\n // ---------------------------------------------------------\n if (bucket === undefined || bucket === []) { return undefined; }\n // ---------------------------------------------------------\n for (let i = 0; i < bucket.length; i++) {\n if (bucket[i][0] === key) { return bucket[i][1]; }\n }\n // ---------------------------------------------------------\n }", "title": "" }, { "docid": "911a9fa5a9c014ef283783212f08f52b", "score": "0.5878697", "text": "maxKey() {\n return this.right.isEmpty() ? this.key : this.right.maxKey();\n }", "title": "" }, { "docid": "911a9fa5a9c014ef283783212f08f52b", "score": "0.5878697", "text": "maxKey() {\n return this.right.isEmpty() ? this.key : this.right.maxKey();\n }", "title": "" }, { "docid": "3a505e2ccec5540192a8c9d7c71bf040", "score": "0.5870948", "text": "function getProximateKey(valueHash, value) {\n const values = Object.keys(valueHash);\n\n let distance = Math.abs(values[0] - value);\n let idx = 0;\n for (let c = 1; c < values.length; c++) {\n const cdistance = Math.abs(values[c] - value);\n if (cdistance < distance) {\n idx = c;\n distance = cdistance;\n }\n }\n return values[idx];\n}", "title": "" }, { "docid": "59867aa536c93507deda1e11e9166a10", "score": "0.58239526", "text": "get(key) {\n const index = this._findSlot(key)\n\n // set variable for current item at the _hashTable index\n // this represents our 'Node' head \n let currItem = this._hashTable[index]\n\n if (this._hashTable[index] === undefined) {\n throw new Error('Key error')\n }\n \n // loop through until key is found\n while (currItem.key !== key) {\n currItem = currItem.next\n }\n\n // return the value of the requested key\n return currItem.value\n }", "title": "" }, { "docid": "e889462bb9c61f552c202ee236e28404", "score": "0.582251", "text": "get(key) {\n // hash the key, retrieve the index\n let index = this._hash(key);\n // if there is no data return undefined,\n if (this.keyMap[index]) {\n // get the data and return it\n for (let i = 0; i < this.keyMap[index].length; i++) {\n // checking the array and returning the value\n if (this.keyMap[index][i][0] === key) return this.keyMap[index][i][1];\n }\n }\n\n return undefined;\n }", "title": "" }, { "docid": "a7acb7107150e658b60423e602d8bdc2", "score": "0.57522637", "text": "retrieve(key) {\n const index = getIndexBelowMax(key.toString(), this.limit);\n return this.storage.retrieveNode(key);\n }", "title": "" }, { "docid": "c31d55fc16d89caad43861350a4421f8", "score": "0.57347727", "text": "getHashCode(key) {\n let numBuckets = this.bucketArray.length;\n let currentCoefficient = 1;\n let hashCode = 0;\n\n for(let i = 0; i < key.length; i++) {\n let char = key[i]\n hashCode += char.charCodeAt(0) * currentCoefficient;\n //we compress the hash code using the number of buckets to reduce the number of locations in the array\n hashCode = hashCode % numBuckets;\n currentCoefficient *= this.p;\n currentCoefficient = currentCoefficient % numBuckets;\n }\n return hashCode % numBuckets;\n }", "title": "" }, { "docid": "d833f6bec3c259854c2cb10b8facfb4c", "score": "0.57298094", "text": "ceiling(key) {}", "title": "" }, { "docid": "d1c78541229c4b617e38cc5f2999ef15", "score": "0.5711617", "text": "insert(key, value) {\n // if (this.capacityIsFull()) this.resize();\n const index = getIndexBelowMax(key.toString(), this.limit);\n let bucket = this.storage.get(index) || new LinkedList()\n bucket.push(key, value);\n this.storage.set(index, bucket);\n return bucket;\n }", "title": "" }, { "docid": "894de647c16f84602003a09112e0d6aa", "score": "0.5698606", "text": "function ios(root, key) {\n if (!root) return null;\n\n// find parent of key\n const parent = findParent(root, key);\n\n// if no parent of key, then try to find the smallest value greater than key\n\n if (!parent) {\n return findMinGreater(root, key);\n }\n\n// if there is a parent, check if the child is leaf\n\n let child;\n\n if (key > parent.val) {\n child = parent.right;\n } else {\n child = parent.left;\n }\n\n if (child === parent.left && !child.right) {\n return parent.val;\n }\n\n if (child.right) {\n return findMin(child.right);\n }\n\n if (child === parent.left && isLeaf(child)) {\n return parent.val;\n }\n\n if (isLeaf(child) && child === parent.right) {\n // need to recurse\n // find parent of the parent. check its value to see if it is less than or greater than key. if it is less than, the\n // parent was to the right most node and there is no bigger element. this means that the child is the max value\n const parentOfParent = findParent(root, parent.val);\n if (parentOfParent.val > key) {\n return parentOfParent.val;\n } else {\n return null;\n }\n }\n}", "title": "" }, { "docid": "0d2cd60722e6cde5eb8b6a085f6c7b5e", "score": "0.56899875", "text": "function upper_bound(arr, key) {\n let s = 0;\n let e = arr.length - 1;\n while (s <= e) {\n let mid = s + Math.floor((e - s) / 2);\n if (arr[mid] <= key) {\n s = mid + 1;\n } else {\n e = mid - 1;\n }\n }\n return s;\n}", "title": "" }, { "docid": "9152fa70069b18a2709b99668f102a8a", "score": "0.5655493", "text": "function get_key_value(key) {\n if (DATA.keys.includes(key)) {\n const key_index = DATA.keys.length - DATA.keys.findIndex((x) => key == x) - 1;\n\n return (1 << key_index);\n } else {\n return 0;\n }\n}", "title": "" }, { "docid": "953cfa0e5a268c7a7dfdeeaa0fb684ff", "score": "0.56504476", "text": "getGt(key) {\n\t\tlet bsr = Utils.binarySearch(this.keys, key, SortedIndex.sort);\n\t\tlet pos = bsr.index;\n\t\tif (bsr.found) pos++;\n\t\treturn this.getAll(key, pos, this.keys.length);\n\t}", "title": "" }, { "docid": "79113ca8a41ecffc07528052d14d4b8a", "score": "0.5632018", "text": "getMaxKey(contacts)\n {\n let max = -999999;\n for(let i=0; i<contacts.length; i++)\n {\n if(contacts[i].key > max)\n {\n max = contacts[i].key;\n }\n }\n return max;\n }", "title": "" }, { "docid": "682e7cc67e6a72383fdfb760fff0915a", "score": "0.5611121", "text": "function findMaxKeyValues (numberOfMaxKeyValues, dictionary)\n{\n var maxValuesArray = [];\n var minInArray;\n\n for (var key in dictionary)\n {\n if (maxValuesArray.length < numberOfMaxKeyValues)\n {\n maxValuesArray.push (key);\n }\n else\n {\n if (minInArray == undefined)\n {\n minInArray = findKeyInArrayWithMinValue (maxValuesArray, dictionary);\n }\n\n if (dictionary[key] > dictionary[minInArray])\n {\n maxValuesArray[maxValuesArray.findIndex (minInArray)] = key;\n minInArray = findKeyInArrayWithMinValue (maxValuesArray, dictionary);\n }\n }\n }\n\n return maxValuesArray;\n}", "title": "" }, { "docid": "d0a7da8ceb84450f0989469be1a0e953", "score": "0.5567794", "text": "remove(key) { // This goes into the hash table and removes the key-value pair. We are writing the key we want.\n const index = getIndexBelowMax(key.toString(), this.limit); // This takes the key and puts it through the hash function so it will give us the bucket's index.\n let bucket = this.storage.get(index); // Here we are using the index to find the bucket and assigning it to a let variable.\n\n if (bucket) { // If there is a value for our bucket\n bucket = bucket.filter(item => item[0] !== key); // This gives a new value to bucket which will be everything it has minus the key we don't want\n this.storage.set(index, bucket); // This will set our new bucket in the same index location as the old one.\n }\n }", "title": "" }, { "docid": "7e8a987dad46462e78ef342b96726096", "score": "0.55284864", "text": "function binaryBucketsSearch(array, value) {\n \tvar j = 0, length = array.length;\n while (j < length) {\n \tvar i = (length + j - 1) >> 1; // move the pointer to\n if (value > array[i][1]) \n j = i + 1;\n else if (value < array[i][0]) \n length = i;\n else if (value >= array[i][0] && value <= array[i][1])\n return i\n }\n return -1\n}", "title": "" }, { "docid": "1821e4541cda8e19f16e1d6551ade404", "score": "0.5469518", "text": "find(key) {\n let current = this.root;\n\n while (current) {\n if (current.key === key) {\n return current.value;\n } else if (current.key > key) {\n current = current.left;\n } else {\n current = current.right;\n }\n }\n return null;\n }", "title": "" }, { "docid": "3b381236645b4d9d96bcd43ddde86000", "score": "0.5469323", "text": "function highestValue(hand) {\n let biggestIndex = values.indexOf(hand[0].code[0]);\n if (values.indexOf(hand[1].code[0]) > biggestIndex) {\n biggestIndex = values.indexOf(hand[1].code[0]);\n }\n return biggestIndex;\n }", "title": "" }, { "docid": "acd7144e75114b83108867b3d1d9e515", "score": "0.5468829", "text": "function maxHelper(items, index) { // pair = [4,2] | [2,4]\n let key = JSON.stringify([items, index]);\n console.log(key);\n if (items.length > 2) {\n console.log(\"long\", key);\n }\n if (memoTable.hasOwnProperty(key)) {\n console.log(\"memo\");\n return memoTable[key];\n } else {\n let maxValue = [exponentRtl(items), items];\n if (index >= items.length) {\n } else {\n let exponentPairs = allExponentPairs(items[index]); // [[2, 2]] | []\n for (let pair of exponentPairs) { // split this value on some pair, or move to the next index\n let nextItems = items.slice(); // nextItems = [4,2]\n nextItems.splice(index, 1, ...pair); // nextItems = [2,2,2] \n let current = maxHelper(nextItems, index); // [16,[2,2,2]] (stay here and split)\n if (current[0] > maxValue[0] || (current[0] === maxValue[0] && arrLessThan(current[1], maxValue[1]))) {\n maxValue = current;\n }\n }\n // let current = maxHelper(items, index + 1);\n // if (current[0] > maxValue[0] || current[0] === maxValue[0] && arrLessThan(current[1], maxValue[1])) {\n // maxValue = current;\n // }\n }\n\n memoTable[key] = maxValue;\n return maxValue;\n }\n // only split the 1st element, since we're expanding ltr\n // want to progressively go thru and split each element \n} // return = undefined | undefined | undefined", "title": "" }, { "docid": "511b95dc2282aec74463025849a264ce", "score": "0.54603595", "text": "get(key) {\n let cmp;\n let node = this.root_;\n\n while (!node.isEmpty()) {\n cmp = this.comparator_(key, node.key);\n\n if (cmp === 0) {\n return node.value;\n } else if (cmp < 0) {\n node = node.left;\n } else if (cmp > 0) {\n node = node.right;\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "ef6914f549f000c976b3b3890d91e702", "score": "0.54567915", "text": "get(key){\n let index = this._hash(key)\n\n if(this.keyMap[index]){\n\n for(let i = 0; i < this.keyMap[index].length; i++){ //looping through the nested array\n if(this.keyMap[index][i][0] === key){ //is your key EQUAL to my key or the key i am looking for?\n return this.keyMap[index][i][1]\n }\n }\n }\n return undefined\n }", "title": "" }, { "docid": "2f593dcd0ee92c4b05b597b48138b071", "score": "0.5441772", "text": "extractMax()\n {\n if (this.heap_size == 0)\n {\n return Number.MAX_VALUE;\n }\n // Store the maximum value.\n var root = this.harr[0];\n // If there are more than 1 items, move the last item to root\n // and call heapify.\n if (this.heap_size > 1)\n {\n this.harr[0] = this.harr[this.heap_size - 1];\n this.maxHeapify(0);\n }\n this.heap_size--;\n return root;\n }", "title": "" }, { "docid": "2e460b733d86528b021a22429c0c4809", "score": "0.54321414", "text": "_findSlot(key) {\n const hash = HashMap._hashString(key);\n const start = hash % this._capacity;\n for (let i = start; i < start + this._capacity; i++) {\n const index = i % this._capacity;\n const slot = this._hashTable[index];\n if (slot === undefined || (slot.key === key && !slot.DELETED)) {\n return index;\n }\n } \n }", "title": "" }, { "docid": "c23ca000e74f6ee73a83c9a53a99b840", "score": "0.5428824", "text": "function max(node) { \n var keyToReturn = node.key;\n if (node != null && node.key != 'null'){\n if (node.right.key != 'null') {\n keyToReturn = max(node.right);\n } else {\n keyToReturn = node.key;\n }\n }\n return keyToReturn;\n }", "title": "" }, { "docid": "da1919504d9eacd774581be969200db2", "score": "0.5423671", "text": "function firstTry(Arr){\n let max = 0;\n let myCount = {}\n for( let num of Arr){\n myCount[num] = myCount[num] + 1 || 1\n }\n console.log(myCount);\n for( let key in myCount){\n if (myCount[key] > max){\n // here I know how many times the max key shows up\n max = myCount[key];\n console.log(max);\n }\n }\n // here i return that key\n let ans = Object.keys(myCount).find(bat => myCount[bat] === max)\n console.log(ans);\n return ans;\n}", "title": "" }, { "docid": "1ba00577db46216b102f4c0c1f9a02d9", "score": "0.5406115", "text": "findSecondHighest() {\n const vals = this.dfsInOrder();\n vals.pop();\n return vals.pop();\n }", "title": "" }, { "docid": "d9fee66713ff0aa5ff501aa52cb91aaf", "score": "0.5398262", "text": "maxKey() {\n return this.root.maxKey();\n }", "title": "" }, { "docid": "d9fee66713ff0aa5ff501aa52cb91aaf", "score": "0.5398262", "text": "maxKey() {\n return this.root.maxKey();\n }", "title": "" }, { "docid": "cd1d6d618560b02839ef0538aaca1754", "score": "0.53897786", "text": "get(key, timestamp) {\n if (!this.map.has(key)) {\n return ''\n }\n\n let arr = this.map.get(key)\n let low = 0\n let high = arr.length - 1\n\n while (low < high) {\n let mid = Math.floor((low + high) / 2)\n\n if (arr[mid].timestamp == timestamp) {\n return arr[mid].value\n } else if (arr[mid] < timestamp) {\n low = mid + 1\n } else {\n high = mid - 1\n }\n }\n\n while (low >= 0 && arr[low].timestamp > timestamp) {\n low--\n }\n\n return low >= 0 ? arr[low].value : ''\n }", "title": "" }, { "docid": "c7ee6906910c24fa7dab4d36a8e13e62", "score": "0.5375503", "text": "getAccountHighestBalance(token, time) {\n let account = \"\";\n let highestBalance = 0;\n \n Object.keys(this.addresses).forEach(key => {\n let address = this.addresses[key];\n let tokens = address.getTokens();\n if (tokens.includes(token)) {\n let tempBalance = address.getBalanceByTimestamp(token, time);\n if (tempBalance > highestBalance) {\n account = key;\n highestBalance = tempBalance;\n }\n }\n });\n return account;\n }", "title": "" }, { "docid": "9455e99c455cb224550584306b154757", "score": "0.5364673", "text": "get(key) {\n let index = this._hash(key);\n if (this.keyMap[index]) {\n for (let i = 0; i < this.keyMap[index].length; i++) {\n if (this.keyMap[index][i][0] === key) {\n return this.keyMap[index][i][1];\n }\n }\n }\n return;\n }", "title": "" }, { "docid": "1c6960d54f27df338e93bc62315ea4de", "score": "0.5351266", "text": "_findSlot(key) {\n //Using the key value, calculate the hash of the key using a private function _hashString()\n const hash = HashMap._hashString(key);\n //use the modulo to find a slot for the key within the current capacity.\n const start = hash % this._capacity;\n\n //loop through the array and stop when it finds the slot with a matching key or an empty slot.\n for (let i = start; i < start + this._capacity; i++) {\n const index = i % this._capacity;\n const slot = this._hashTable[index];\n if (slot === undefined || (slot.key === key && !slot.DELETED)) {\n return index;\n }\n }\n }", "title": "" }, { "docid": "3caf76594567dd98793b36417e56d3e7", "score": "0.5347078", "text": "search(key) {\r\n\t\tlet id = this.getHash(key, 0);\r\n\t\tlet crr = this.items[id];\r\n\t\tlet i = 1;\r\n\t\twhile(crr != null) {\r\n\t\t\tif(crr.key == key) return crr.value;\r\n\t\t\tid = this.getHash(it.key, i);\r\n\t\t\tcrr = this.items[id];\r\n\t\t\ti += 1;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "title": "" }, { "docid": "f34415d29861c289a2cfe42545c8fa40", "score": "0.53349715", "text": "function getMaxMap(k, map) {\n var maxMap = new Map();\n map.forEach(function (value, key) {\n if (maxMap.size < k) {\n maxMap.set(key, value);\n }\n else {\n checkIfEntryValueIsMatchToMaxMap(value, key, maxMap);\n }\n });\n return maxMap;\n}", "title": "" }, { "docid": "2507b3862704ca574ef1fdae75d4fcc8", "score": "0.5334148", "text": "function YHumidity_get_highestValue_async(func_callback, obj_context)\n { this._getAttr_async('highestValue',\n function(ctx, obj, json_val) {\n var res = (json_val == null ? Y_HIGHESTVALUE_INVALID : Math.round(json_val/6553.6) / 10);\n ctx.cb(ctx.userctx, obj, res); },\n { cb:func_callback, userctx:obj_context });\n }", "title": "" }, { "docid": "66b3f98f0c88831dd253b3fb0e1ee654", "score": "0.5333071", "text": "findSecondHighest() {\n if (this.root === null) {\n return undefined;\n }\n\n let max = null;\n let second = null;\n let node = this.root;\n\n const values = [];\n const _traverse = (node) => {\n\n if (values.length > 2) {\n return;\n }\n\n if (node === null) {\n return;\n }\n\n _traverse(node.right);\n values.push(node.val);\n _traverse(node.left);\n }\n\n _traverse(this.root);\n\n return values[1];\n }", "title": "" }, { "docid": "97c724319b9be66d0376c7d35667d4fc", "score": "0.53232366", "text": "get(key) {\n\t\tlet bsr = Utils.binarySearch(this.keys, key, SortedIndex.sort);\n\t\tif (bsr.found) {\n\t\t\treturn this.values[bsr.index];\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t}", "title": "" }, { "docid": "dbead1d3c1b681cb1ee036b435078df9", "score": "0.53214854", "text": "_findSlot(key) {\n const hash = HashMap._hashString(key);\n const start = hash % this._capacity;\n\n for (let i=start; i<start + this._capacity; i++) {\n const index = i % this._capacity;\n const slot = this._hashTable[index];\n if (slot === undefined || (slot.key === key && !slot.DELETED)) {\n return index;\n }\n }\n }", "title": "" }, { "docid": "a467da12f19949acbb768674bc6fd801", "score": "0.53165954", "text": "get(key) {\n let index = this._hash(key);\n if (this.keyMap[index]) {\n for (let i = 0; i < this.keyMap[index].length; i++) {\n if (this.keyMap[index][i][0] === key) {\n return this.keyMap[index][i][1]\n }\n }\n }\n return undefined\n }", "title": "" }, { "docid": "00c65a7cbee229c0d32fe9097b34f6db", "score": "0.5306527", "text": "get(x) {\n\t\tlet position = 0;\n\t\tlet result = null;\n\t\tif (x instanceof Hashable && !this.isEmpty()) {\n\t\t\tposition = x.hashVal % this.#size;\n\t\t\tresult = x.equals(this.#array[position]);\n\t\t}\n\t\tif (result !== null)\n\t\t\treturn result;\n\t\telse throw new Error(\"Could not get a value from the HashTable.\");\n\t}", "title": "" }, { "docid": "6f7e93a63b083bbafdb0d537cdb504fd", "score": "0.5305554", "text": "function getmax(id) {\r\n return sparpotential[\"item\" + id][\"max\"];\r\n }", "title": "" }, { "docid": "0457ce1ee43193302d3aba6fdee9e946", "score": "0.52960956", "text": "function getValue(key, value) {\n var checkVar = GM_getValue(key, value)\n if (checkVar == null || checkVar < 5000) {\n checkVar = value\n }\n var x = parseInt(checkVar)\n if (checkVar == x) {\n return checkVar\n } else {\n return value\n }\n}", "title": "" }, { "docid": "40f20074d2bc2c70c211828b52cf63ae", "score": "0.5293777", "text": "mostCommonValue(col) {\n const tm = new Map();\n for (let i = 0; i < this.rows(); i++) {\n const v = this.get(i, col);\n if (v !== undefined) {\n const count = tm.get(v);\n if (count === undefined) {\n tm.set(v, 1);\n }\n else {\n tm.set(v, count + 1);\n }\n }\n }\n let maxCount = 0;\n let val = undefined;\n tm.forEach((value, key) => {\n if (value > maxCount) {\n maxCount = value;\n val = key;\n }\n });\n return val;\n }", "title": "" }, { "docid": "152525488afbc731901485c13336c1ee", "score": "0.5285746", "text": "find(key) {\n let currentPos, newPos;\n let cNum = 0; //记录冲突次数\n newPos = currentPos = this.hash(key);\n\n // 解决冲突\n while(this.table[newPos].flag !== 0 && this.table[newPos].data !== key) {\n if(++cNum % 2) { //判断冲突的奇偶次\n newPos = currentPos + Math.round((cNum+1)/2*(cNum+1)/2);\n while(newPos > this.tableSize) {\n newPos -= this.tableSize;\n }\n } else {\n newPos = currentPos - Math.round(cNum/2*cNum/2);\n while(newPos < 0) {\n newPos += this.tableSize;\n }\n }\n }\n return newPos;\n }", "title": "" }, { "docid": "0dc0a27cd96ee816a2c0fd52a5a5e027", "score": "0.5265948", "text": "function find_max_pair(pairs,index){\n var max_pair = undefined;\n var max_value = undefined;\n for ( var i = 0; i < pairs.length; i++ ){\n var pair = pairs[i];\n if ( max_pair == undefined || pair[index] > max_value ){\n max_pair = pair;\n max_value = pair[index];\n }\n }\n return max_pair;\n}", "title": "" }, { "docid": "9c2532a3daf0271e30c8d411d18df1e0", "score": "0.5255536", "text": "getBlockHeight() {\n var recursiveFunc = function (key) {\n return db.get(key)\n .then(() => recursiveFunc(key + 1))\n .catch(() => key);\n };\n\n return recursiveFunc(0);\n }", "title": "" }, { "docid": "eb61a0409beb4c531da06b14ec6ffeaa", "score": "0.5252988", "text": "_findSlot(key) {\n const hash = HashMap._hashString(key);\n const start = hash % this._capacity;\n\n // loops through the array, stopping when it finds the slot with a matching key or an empty slot\n // function will always return a slot because of the max load factor in the _hashTable array\n for (let i = start; i < start + this._capacity; i++) {\n const index = i % this._capacity;\n const slot = this._hashTable[index];\n if (slot === undefined || (slot.key === key && !slot.DELETED)) {\n return index;\n }\n }\n }", "title": "" }, { "docid": "2355e04a63ce8b6e8ed3a7f687361d68", "score": "0.52438974", "text": "function get(key) {\r\n var result = null;\r\n var index = this.contains(key);\r\n if(index != -1) { \r\n result = this.values[index];\r\n }\r\n return result;\r\n}", "title": "" }, { "docid": "7b3e37d5cddb34d3e89340caf5441de6", "score": "0.52438456", "text": "function binarySearch(array, key) {\n debugger;\n var low = 0;\n var high = array.length - 1;\n var mid;\n var element;\n\n while(low <= high) {\n mid = Math.floor((low + high) / 2 , 10);\n element = array[mid];\n if (element < key) {\n low = mid + 1;\n } else if (element > key) {\n high = mid - 1;\n } else {\n return mid;\n }\n }\n return -1;\n}", "title": "" }, { "docid": "232f3bb37a77d93e86dd60b868a85e0d", "score": "0.52411616", "text": "extractMax() {\n if (this.values.length < 1) return 'heap is empty';\n\n // get max and last element\n const max = this.values[0];\n const end = this.values.pop();\n // reassign first element to the last element\n this.values[0] = end;\n // heapify down until element is back in its correct position\n this.heapifyDown(0);\n\n // return the max\n return max;\n }", "title": "" }, { "docid": "824fe01c9a35dfcee8d78ad4e1ea6b0a", "score": "0.52275443", "text": "maximumValueBST(){\n let current = this.root;\n while(current.right){\n current = current.right;\n }\n return current.value;\n }", "title": "" }, { "docid": "5f4a3471b251693dc87e218b13c413b6", "score": "0.5222036", "text": "remove(key) {\n const index = getIndexBelowMax(key.toString(), this.limit);\n }", "title": "" }, { "docid": "16cec793a3a3257bf413570f664e558e", "score": "0.5220599", "text": "getMax(){\n return this.max_value; //Runs in constant time (O(1) time complexity)\n\n }", "title": "" }, { "docid": "184d141d7016df1c3de8ca5a37b9a700", "score": "0.5214129", "text": "get(key){\n\t\tif (!key in this.map) return null;\n\t\tlet item = this.map[key];\n\t\tif(this.queue[0] != item)\n\t\t\tthis.queue.unshift(this.queue.splice(arr.indexOf(item),1));\n\t\treturn item.value;\n\t}", "title": "" }, { "docid": "c65d00a9b14740d1bf8d2ef51e0af890", "score": "0.52137417", "text": "function refSearch(arr, value) {\n let min = 0;\n let max = arr.length - 1;\n\n while (min <= max) {\n let middle = Math.floor((min + max) / 2);\n let currentElement = arr[middle];\n console.log('curr: ', currentElement);\n\n if (currentElement < value) {\n min = middle + 1;\n } else if (currentElement > value) {\n max = middle - 1;\n } else {\n return middle;\n }\n }\n return -1;\n}", "title": "" }, { "docid": "d0bf0d5b127d1aca07b3faa031ed985c", "score": "0.5200899", "text": "function findIdx(table,val){if(table[0]>val)return -1;var l=0,r=table.length;while(l<r-1){// always table[l] <= val < table[r]\nvar mid=l+Math.floor((r-l+1)/2);if(table[mid]<=val)l=mid;else r=mid;}return l;}", "title": "" }, { "docid": "3951a52cd83068178a27282edc14a43d", "score": "0.5193991", "text": "getMax() {\n if (this.right === null) {\n return this.value;\n }\n return this.right.getMax()\n // let max = this.value;\n // if (max < this.value) {\n // max = this.value;\n // this.right.getMax();\n // } else if (max > this.value) {\n // this.getMax();\n // }\n }", "title": "" }, { "docid": "123ac34b424c7b425d5a61f635f2094e", "score": "0.5192946", "text": "argmax(indexColumn, indexLineStart){\n let tmp = [];\n for(let i = 0; i < this.size; i++)\n {\n if(i >= indexLineStart)\n {\n tmp[i] = Math.abs(this.matrix[i][indexColumn]);\n }\n }\n //trouve la valeur maximum dans un objet javascript\n //code repris de https://stackoverflow.com/questions/11142884/fast-way-to-get-the-min-max-values-among-properties-of-object\n let max = Object.values(tmp).sort((prev, next) => next - prev)[0];\n return this._getKeyByValue(tmp, max);\n }", "title": "" }, { "docid": "fffd873a96e8698df160f40c61de66c7", "score": "0.51915747", "text": "function getValue() {\n let hashTable = new HashTable(8);\n let intItem1 = new IntHash(8);\n hashTable.add(intItem1);\n assert(hashTable.get(intItem1) === intItem1);\n}", "title": "" }, { "docid": "02d5ebcb97228181a2f3635c152f51b4", "score": "0.5184494", "text": "function max(keySelector, comparer) {\n let itComparer = typeof comparer === 'function' ? comparer : util.defaultComparer;\n let itKeySelector = typeof keySelector === 'function' ? keySelector : (i) => i;\n\n let maximum = this.firstOrDefault();\n\n for (let item of this) {\n maximum = itComparer(itKeySelector(item), itKeySelector(maximum)) > 0 ? item : maximum;\n }\n\n return maximum;\n}", "title": "" }, { "docid": "9d5e07231c32729b2d9d42ee9eb1e45d", "score": "0.51815003", "text": "get maximum() {}", "title": "" }, { "docid": "55769c3a824f067243c50c841b224e4d", "score": "0.5171156", "text": "function YPressure_get_highestValue_async(func_callback, obj_context)\n { this._getAttr_async('highestValue',\n function(ctx, obj, json_val) {\n var res = (json_val == null ? Y_HIGHESTVALUE_INVALID : Math.round(json_val/6553.6) / 10);\n ctx.cb(ctx.userctx, obj, res); },\n { cb:func_callback, userctx:obj_context });\n }", "title": "" }, { "docid": "aa1ef0a5c041f52977448599a4f0a7fb", "score": "0.517095", "text": "findMaximumValue(){\n if(!this.root){\n return null;\n }\n const findMax = (node) => {\n \n if(node === null){\n return Number.NEGATIVE_INFINITY;\n }\n let maxNode = node;\n // find the max in the left branch\n let maxLeft = findMax(node.left);\n // find the max in the right branch\n let maxRight = findMax(node.right);\n // check for the max value between all branches\n if(maxLeft.value > maxNode.value){\n maxNode = maxLeft\n }\n if(maxRight.value > maxNode.value){\n maxNode = maxRight\n }\n\n return maxNode\n }\n\n // find the max value in the tree starting from the root\n let maxNode = findMax(this.root);\n return maxNode.value;\n }", "title": "" }, { "docid": "866671546afc994a37c22b8c06b54782", "score": "0.5158268", "text": "function get(key) {\n for (var x = first; x !== null; x = x.next) {\n if (equals(key, x.key)) return x.val;\n }\n return null;\n }", "title": "" }, { "docid": "7280b02bc1c0b0dd8c5157bbb85616cc", "score": "0.5153547", "text": "function binarySearch(array, key) {\n\tvar low = 0;\n\tvar high = array.length - 1;\n\tvar mid;\n\tvar element;\n\n\twhile (low <= high) {\n\t\tmid = Math.floor((low + high) / 2, 10);\n\t\telement = array[mid];\n\t\tif (element < key) {\n\t\t\tlow = mid + 1;\n\t\t} else if (element > key) {\n\t\t\thigh = mid - 1;\n\t\t} else {\n\t\t\treturn mid;\n\t\t}\n\t}\n\treturn -1;\n}", "title": "" }, { "docid": "7affb639505ecb1d4cadecd19d578d3c", "score": "0.51522547", "text": "get max() {}", "title": "" }, { "docid": "9db51e4675b97d3292f43cf588e36619", "score": "0.5152149", "text": "put(key, value)\r\n {\r\n var getHashCode = this.loseloseHashCode(key);\r\n console.log(getHashCode + \" - \" + key);\r\n this.table[getHashCode] = value;\r\n }", "title": "" }, { "docid": "a328794fb93be7fa10851b2d2882d93d", "score": "0.5146961", "text": "findMax() {\n //start at root\n let current = this.root;\n //the nodes are only linked to those next to it in this data structure\n //traverse to the bottom right node to get the largest number\n while (current.right !== null) {\n current = current.right;\n }\n return current.data;\n }", "title": "" }, { "docid": "8cfc21ff3c4cda569e2cd9b031dc00b7", "score": "0.5144949", "text": "function maximumIndexValue(object){\n \tvar maxIndex = -1;\n \tfor(var _prop in object){\n \t\tif(String(ToUint32(_prop)) === _prop && ToUint32(_prop) !== max_Index_Value){ \n \t\t\tif(ToUint32(_prop) >= maxIndex){\n \t\t\t\tmaxIndex = parseInt(_prop);\n \t\t\t}\n\n \t\t}\n \t}\n \treturn maxIndex;\n }", "title": "" }, { "docid": "bd6fc05d3a7e1405e0ade12e499b07d3", "score": "0.51438284", "text": "getCorrespondingItem(hash) {\n const idx = this.indexMap.get(hash);\n if (idx === undefined) { return undefined; }\n // return idx + 1 if getting post from thread\n // return idx - 1 if getting thread from post\n return this.getAbsoluteIndex(idx + (1 - (2 * (idx % 2))));\n }", "title": "" }, { "docid": "7b3d958bbfb31a6dfd9525b3c6cc2902", "score": "0.51433444", "text": "search(value) { // log(n)\n var min = 0;\n var max = this.arr.length;\n var middle = -1;\n\n while(min < max) {\n middle = Math.floor((min+max)/2);\n\n if(this.arr[middle] === value) {\n return middle;\n } else if(this.arr[middle] < value) {\n min = middle+1;\n } else if(this.arr[middle] > value) {\n max = middle-1;\n }\n }\n\n return -1;\n\t}", "title": "" }, { "docid": "0c5d3d6579a46547c565421159d47253", "score": "0.51423657", "text": "get_highestValue()\n {\n return this.liveFunc._highestValue;\n }", "title": "" }, { "docid": "81ecf128abc580cc88edd39f544c6d17", "score": "0.5137414", "text": "findSecondHighest() {\n \n }", "title": "" }, { "docid": "1646b5a8ca885985d34792233fe5f42f", "score": "0.51209533", "text": "function getHighestValue(cardList)\r\n{\r\n if (!cardList)\r\n return null;\r\n //find the best highest valued card that matches\r\n var bestCard = cardList[0];\r\n for (var k = 1;k<cardList.length;k++)\r\n if (cardList[k].value > bestCard.value)\r\n bestCard = cardList[k];\r\n return bestCard;\r\n}", "title": "" }, { "docid": "a58188dbcaf5835ca4731f9a93209e97", "score": "0.51101613", "text": "function banarySearch(arr, val) {\n let min = 0;\n let max = arr.length - 1;\n\n while (min <= max) {\n let middle = Math.floor((min + max) / 2);\n\n if (arr[middle] < val) {\n min = middle + 1;\n } else if (arr[middle] > val) {\n max = middle - 1;\n } else {\n return middle;\n }\n }\n return -1;\n}", "title": "" }, { "docid": "5125c42baa80f09128d7c051536fce05", "score": "0.5107778", "text": "getMax() {\n if (!this.head) return null;\n let {\n head,\n head: { value },\n } = this;\n while (head) {\n if (value < head.value) value = head.value;\n head = head.next;\n }\n return value;\n }", "title": "" }, { "docid": "9b61bcca7bdb65b0a17cd600ee8fc410", "score": "0.5101014", "text": "function search (get, target, compare, low, high, cb) {\n var mid = low + (high - low >> 1)\n return get(mid, function (err, value) {\n if(low >= high)\n return cb(null, low, value)\n\n if(compare(value, target) <= 0)\n return search(get, target, compare, mid+1, high, cb)\n else\n //don't decrease high, because we always want the value above.\n return search(get, target, compare, low, mid, cb)\n\n })\n}", "title": "" }, { "docid": "17e4049d1a42c78237d5e6001fb507de", "score": "0.5097135", "text": "function YVoltage_get_highestValue_async(func_callback, obj_context)\n { this._getAttr_async('highestValue',\n function(ctx, obj, json_val) {\n var res = (json_val == null ? Y_HIGHESTVALUE_INVALID : Math.round(json_val/655.36) / 100);\n ctx.cb(ctx.userctx, obj, res); },\n { cb:func_callback, userctx:obj_context });\n }", "title": "" }, { "docid": "ee6011d281f345c056f3e00e2287454c", "score": "0.50970197", "text": "find(key) {\n if (this.key == key) {\n return this.value;\n } else if (key < this.key && this.left) {\n return this.left.find(key);\n } else if (key > this.key && this.right) {\n return this.right.find(key);\n } else {\n throw new Error('Key Error');\n }\n }", "title": "" }, { "docid": "df30cedb4d32ab4317e53cde5ea18da0", "score": "0.5095656", "text": "function getKeyMaximumIndices(input) {\n // The indices of the key maxima.\n var keyIndices = [];\n // Whether the last zero crossing found was positively sloped; equivalently,\n // whether we're looking for a key maximum.\n var lookingForMaximum = false;\n // The largest local maximum found so far.\n var max = void 0;\n // The index of the largest local maximum so far.\n var maxIndex = -1;\n\n for (var i = 1; i < input.length; i++) {\n if (input[i - 1] < 0 && input[i] > 0) {\n lookingForMaximum = true;\n maxIndex = i;\n max = input[i];\n } else if (input[i - 1] > 0 && input[i] < 0) {\n lookingForMaximum = false;\n if (maxIndex !== -1) {\n keyIndices.push(maxIndex);\n }\n } else if (lookingForMaximum && input[i] > max) {\n max = input[i];\n maxIndex = i;\n }\n }\n\n return keyIndices;\n}", "title": "" }, { "docid": "df30cedb4d32ab4317e53cde5ea18da0", "score": "0.5095656", "text": "function getKeyMaximumIndices(input) {\n // The indices of the key maxima.\n var keyIndices = [];\n // Whether the last zero crossing found was positively sloped; equivalently,\n // whether we're looking for a key maximum.\n var lookingForMaximum = false;\n // The largest local maximum found so far.\n var max = void 0;\n // The index of the largest local maximum so far.\n var maxIndex = -1;\n\n for (var i = 1; i < input.length; i++) {\n if (input[i - 1] < 0 && input[i] > 0) {\n lookingForMaximum = true;\n maxIndex = i;\n max = input[i];\n } else if (input[i - 1] > 0 && input[i] < 0) {\n lookingForMaximum = false;\n if (maxIndex !== -1) {\n keyIndices.push(maxIndex);\n }\n } else if (lookingForMaximum && input[i] > max) {\n max = input[i];\n maxIndex = i;\n }\n }\n\n return keyIndices;\n}", "title": "" }, { "docid": "787b6ff2876aa28d9750e01fcb85518a", "score": "0.50937366", "text": "function thirdBiggest(tree) {\n tree.remove(tree._findMax().key);\n tree.remove(tree._findMax().key);\n return (tree._findMax().key);\n}", "title": "" }, { "docid": "061243bff2f5ec922d07e1452ce5ceb1", "score": "0.5080973", "text": "maximumValueBT(){\n let result = [];\n let traverse = (node)=>{\n if(node.left){\n traverse(node.left);\n }\n if(node.right){\n traverse(node.right);\n }\n result.push(node.value);\n };\n traverse(this.root);\n result.sort((a,b)=>a-b);\n return result[result.length -2];\n }", "title": "" }, { "docid": "4d6b314786deab690b5884976b1d9581", "score": "0.50598603", "text": "remove(key) {\n // get storage index by using getIndexBelowMax(key, max-limit)\n const index = getIndexBelowMax(key.toString(), this.limit);\n // fetch bucket using index\n const bucket = this.storage.get(index);\n // if no bucket\n if(!bucket) return;\n\n // loop through the item inside bucket and remove item using the key\n bucket.forEach((item, i) =>{\n if (item[0] === key) {\n bucket.splice(i - 1, 1);\n // update bucket\n this.storage.set(index, bucket);\n }\n });\n }", "title": "" }, { "docid": "ce72ac22e5343d152e6baeb50ff4c627", "score": "0.50590056", "text": "extractMax(){\n // Remove the first element (root) from the values property and replace with the most recently added (the last element)\n const max = this.values[0];\n const end = this.values.pop();\n\n // EDGE CASE: if this.value only had 1 element, which already pop(), the job is done here, only need to return what was removed\n \n // Only run this if there are elements in this.values to work with\n if(this.values.length > 0){\n this.values[0] = end;\n // Down-heap to find the correct spot for the 'new' root\n this.downHeap();\n }\n // Return what was removed\n return max;\n }", "title": "" } ]
81ae7f07a0a5ca13dbb403d070c8a550
Function to control paddle with the mouse
[ { "docid": "0707f4f8232b9bf4d7db33f90b9b765d", "score": "0.0", "text": "function mouseEventHandler(event) {\r\n let relativeY = event.clientY - canvas.offsetTop;\r\n if (relativeY > 0 && relativeY < canvas.height) {\r\n player.y = relativeY - player.height/2;\r\n }\r\n}", "title": "" } ]
[ { "docid": "8f5b16f9b24a29429e9107d70f0d8d7c", "score": "0.7291781", "text": "function mouseMove(e)\n{\n var tempX = e.clientX - canvas.offsetLeft;\n if(tempX > 0 && tempX < canvas.width)\n paddleX = tempX - paddleWidth/2;\n}", "title": "" }, { "docid": "953329f35147848fced957783601f2c5", "score": "0.7283413", "text": "function movePaddle_mouse(evt){\r\n if (isPause == false){\r\n let rect = canvas.getBoundingClientRect();\r\n user.y = evt.clientY - rect.top;\r\n }\r\n}", "title": "" }, { "docid": "18f9f676ab9c4b55321d73c81530a030", "score": "0.7168061", "text": "function mouseMoveHandler(e){\n let relativeX = e.clientX - canvas.offsetLeft;\n if (relativeX > 0 && relativeX < canvas.width){\n paddleX = relativeX - paddleWidth / 2;\n }\n }", "title": "" }, { "docid": "bc2d4a09cd7358c933cfda8c8e7ed602", "score": "0.7147868", "text": "function mouseMoveHandler(e) {\n var relativeX = e.clientX - canvas.offsetLeft;\n if(relativeX > 0 && relativeX < canvas.width) {\n paddleX = relativeX - paddleWidth/2;\n }\n\n}", "title": "" }, { "docid": "889610678b4ec453e25184f8a2641b48", "score": "0.7117954", "text": "function mouseMoveHandler(e) {\n var relativeX = e.clientX - canvas.offsetLeft;\n if(relativeX > 0 && relativeX < canvas.width) {\n paddleX = relativeX - paddleWidth/2;\n }\n}", "title": "" }, { "docid": "2a6ba11f02c99378cbef4ab5ecdf47b7", "score": "0.70590675", "text": "function mouseMoveHandler(e) {\n var relativeX = e.clientX - canvas.offsetLeft;\n if(relativeX > 0 && relativeX < canvas.width) {\n paddleX = relativeX - paddleWidth/2;\n }\n}", "title": "" }, { "docid": "e3b02554366187fe05b19f178eeaa4ec", "score": "0.70468384", "text": "function mouseMoveHandler(e) {\n var mousePosition = e.clientX,\n distanceToCurrentWindow = canvas.offsetLeft,\n currentPosition = mousePosition - distanceToCurrentWindow;\n if (currentPosition > 0 && currentPosition < canvas.width) {\n paddleX = currentPosition - paddleWidth / 2;\n }\n}", "title": "" }, { "docid": "20736ee65df7892bca3cf960fdcbb603", "score": "0.7008591", "text": "function mouseMoveHandler(key) {\n var relativeX = key.clientX - canvas.offsetLeft;\n if(relativeX > 0 && relativeX < canvas.width) {\n paddleX = relativeX - paddleWidth/2;\n }\n}", "title": "" }, { "docid": "8fa77f62c17e9dcebca9d1bedc9f43a2", "score": "0.6969121", "text": "function sketchpad_mouseUp() {\n mouseDown = 0;\n}", "title": "" }, { "docid": "c300a7b0ef09fc2f8ccdfb3e1c30204f", "score": "0.6959317", "text": "function mouseMoveHandler(elem){\n var relativeX = elem.clientX - canvas.offsetLeft;\n if(relativeX > 0 && relativeX < canvas.width){\n paddleX = relativeX - paddleW/2;\n }\n}", "title": "" }, { "docid": "4501c83e03899d41e0c4551152e72d3c", "score": "0.68950784", "text": "update() {\n var paddleMouseLoc = createVector(mouseX, 700);\n this.loc = p5.Vector.lerp(this.loc, paddleMouseLoc, 0.09);\n }", "title": "" }, { "docid": "fcacea696c5322b0208564f7068d1f7e", "score": "0.6868974", "text": "function onMouseDown (event) {\n if (event.ctrlKey) {\n // The Trackballcontrol only works if Ctrl key is pressed\n scene.getCameraControls().enabled = true;\n } else { \n scene.getCameraControls().enabled = false;\n if (event.button === 0) { // Left button\n mouseDown = true;\n switch (applicationMode) {\n case TheScene.ADDING_BOXES :\n scene.addBarricade (event, TheScene.NEW_BOX);\n break;\n case TheScene.MOVING_BOXES :\n scene.moveBarricade (event, TheScene.SELECT_BOX);\n break;\n default :\n applicationMode = TheScene.NO_ACTION;\n break;\n }\n } else {\n // setMessage (\"\");\n applicationMode = TheScene.NO_ACTION;\n }\n }\n}", "title": "" }, { "docid": "de2f85ce16ec7c044f3a66db5b8b07e5", "score": "0.6861803", "text": "function onMouseDown (event) {\n if (event.ctrlKey) {\n // The Trackballcontrol only works if Ctrl key is pressed\n scene.getCameraControls().enabled = true;\n } else { \n scene.getCameraControls().enabled = false;\n if (event.button === 0) { // Left button\n mouseDown = true;\n switch (applicationMode) {\n case TheScene.ADDING_BOXES :\n scene.addBox (event, TheScene.NEW_BOX);\n break;\n case TheScene.MOVING_BOXES :\n scene.moveBox (event, TheScene.SELECT_BOX);\n break;\n default :\n applicationMode = TheScene.NO_ACTION;\n break;\n }\n } else {\n setMessage (\"\");\n applicationMode = TheScene.NO_ACTION;\n }\n }\n}", "title": "" }, { "docid": "ed74cb2b77c44fa20c80669691850ecd", "score": "0.6847464", "text": "movePaddle(){\n if (this.upPressed){\n this.moveUp();\n } if (this.downPressed){\n this.moveDown();\n }\n }", "title": "" }, { "docid": "304dadc1c9891945003a070bd68fa65b", "score": "0.6843625", "text": "drawPaddle(){\n fill(this.color);\n rect(this.x, this.y, this.w, this.h);\n }", "title": "" }, { "docid": "47c314b3c5cebe197ad43877c51adc78", "score": "0.6837571", "text": "function sketchpad_mouseUp() {\n mouseDown = 0;\n\n // Reset lastX and lastY to -1 to indicate that they are now invalid, since we have lifted the \"pen\"\n lastX = -1;\n lastY = -1;\n}", "title": "" }, { "docid": "91d2a555d8b2a772623ed6603c013afd", "score": "0.6835145", "text": "function moveP1()\n{\n //get the mouse position to move player 1 paddle\n //supports desktop and mobile device\n $(document).on('vmousemove', function(event){\n p1PaddleX = event.pageX - (PADDLE_WIDTH / 2);\n });\n\n $(document).on('taphold', function(e){\n p1PaddleX = e.pageX - (PADDLE_WIDTH / 2);\n });\n}", "title": "" }, { "docid": "2987b32809214a4f9792d5490a77a977", "score": "0.678757", "text": "function keyPressed(evt){ \n switch(evt.keyCode){\n\n case 38: /* Up arrow was pressed */\n if(paddle.y < 0){ //check to keep paddle in boundaries\n paddle.y=0;\n }else{\n paddle.y -= 15;\n }\n break;\n \n case 40: /* Down arrow was pressed */\n if(paddle.y > h-paddle.h ){\n paddle.y= h-paddle.h ;\n }else{ \n paddle.y += 15;}\n break;\n }//end of switch\n player_sound.play();\n} // end of keyPressed()", "title": "" }, { "docid": "dcaf55894d27310677b4f6039d206e6b", "score": "0.6776243", "text": "function sketchpad_mouseUp() {\n mouseDown=0;\n\n // Reset lastX and lastY to -1 to indicate that they are now invalid, since we have lifted the \"pen\"\n lastX=-1;\n lastY=-1;\n }", "title": "" }, { "docid": "dcaf55894d27310677b4f6039d206e6b", "score": "0.6776243", "text": "function sketchpad_mouseUp() {\n mouseDown=0;\n\n // Reset lastX and lastY to -1 to indicate that they are now invalid, since we have lifted the \"pen\"\n lastX=-1;\n lastY=-1;\n }", "title": "" }, { "docid": "ce90383bf124d15ed7754eb461509dd8", "score": "0.6761877", "text": "function MousePosControl() {\n}", "title": "" }, { "docid": "c99685830cac11d0848b00d1ebc50904", "score": "0.67297155", "text": "function setup() {\n createCanvas(640,480);\n // Create a ball\n ball = new Ball(width/2,height/2,5,5,10,5);\n // Create the right paddle with UP and DOWN as controls\n rightPaddle = new Paddle(width-10,height/2,10,70,10,DOWN_ARROW,UP_ARROW);\n // Create the left paddle with W and S as controls\n // Keycodes 83 and 87 are W and S respectively\n leftPaddle = new Paddle(0,height/2,10,70,10,83,87);\n\n}", "title": "" }, { "docid": "a1b1ffd6804509642c6a580f29bdbddd", "score": "0.67018193", "text": "function keyPressed() {\n if (keyCode === LEFT_ARROW) {\n xPaddle -= 50;\n } else if (keyCode === RIGHT_ARROW) {\n xPaddle += 50;\n }\n }", "title": "" }, { "docid": "0582b56c6ea5fe00cd952da4ea0397e3", "score": "0.6624547", "text": "function mousePressed() {\n\n if (!playing) {\n playing = true;\n } else if (gameOver) {\n resetGame();\n setupPaddles();\n }\n}", "title": "" }, { "docid": "20a58793ed0c828f5a069848d782524e", "score": "0.6615238", "text": "function MouseControls() {\n }", "title": "" }, { "docid": "f087eb9341900c2450018bb86e23cbe4", "score": "0.65985954", "text": "function sketchpad_mouseDown() {\n mouseDown=1;\n drawLine(ctx,mouseX,mouseY,12);\n }", "title": "" }, { "docid": "f087eb9341900c2450018bb86e23cbe4", "score": "0.65985954", "text": "function sketchpad_mouseDown() {\n mouseDown=1;\n drawLine(ctx,mouseX,mouseY,12);\n }", "title": "" }, { "docid": "3ac1cbb7e0f89e6446721179fab34e76", "score": "0.6592119", "text": "function sketchpad_mouseMove(e) { \n // Update the mouse co-ordinates when moved\n getMousePos(e);\n\n // Draw a dot if the mouse button is currently being pressed\n if (mouseDown==1) {\n drawLine(ctx,mouseX,mouseY,12);\n }\n }", "title": "" }, { "docid": "3ac1cbb7e0f89e6446721179fab34e76", "score": "0.6592119", "text": "function sketchpad_mouseMove(e) { \n // Update the mouse co-ordinates when moved\n getMousePos(e);\n\n // Draw a dot if the mouse button is currently being pressed\n if (mouseDown==1) {\n drawLine(ctx,mouseX,mouseY,12);\n }\n }", "title": "" }, { "docid": "40a74b7a9ca81bdb88a05ba2c86ad9e6", "score": "0.6574832", "text": "mouseUp(pt) {}", "title": "" }, { "docid": "40a74b7a9ca81bdb88a05ba2c86ad9e6", "score": "0.6574832", "text": "mouseUp(pt) {}", "title": "" }, { "docid": "de807004f2f120eca223ba872ca1aab2", "score": "0.6571687", "text": "function activatePaddle(controlType) {\n if (player == '0') {\n paddle.material = new THREE.MeshBasicMaterial({\n color: 0xff0000,\n transparent: true,\n opacity: 0.2,\n });\n } else {\n paddle.material = new THREE.MeshBasicMaterial({\n color: 0x0000ff,\n transparent: true,\n opacity: 0.2,\n });\n }\n activeController = controlType;\n}", "title": "" }, { "docid": "a7687e89e946b11fb482bb3879ec91b4", "score": "0.656604", "text": "function movePaddle() {\n this.advance();\n switch (true) {\n case (kontra.keys.pressed('left') || kontra.keys.pressed('a')):\n this.dx = -5;\n break;\n case (kontra.keys.pressed('right') || kontra.keys.pressed('d')):\n this.dx = 5;\n break;\n case (!this.moving):\n this.dx = 0;\n }\n}", "title": "" }, { "docid": "de7ed77df83c747efbdbb4bbb64e5579", "score": "0.65630615", "text": "drawPaddle() {\n stroke(\"black\");\n strokeWeight(10);\n line(this.px,this.py-60,this.px,this.py+60);\n }", "title": "" }, { "docid": "e779c23c972d7cfec3a2451f1ba9ffea", "score": "0.65592074", "text": "function movePaddle(e) {\r\n\t\tconst rightWall = paddleIndexs[2] % width !== width -1;\r\n\t\tconst leftWall = paddleIndexs[0] % width !== 0;\r\n\r\n\t\tswitch(e.keyCode) {\r\n\t\t\tcase 37:\r\n\t\t\t\tif(leftWall) {\r\n\t\t\t\t\tunDrawPaddle();\r\n\t\t\t\t\tpaddleIndexs = paddleIndexs.map(i => i-3);\r\n\t\t\t\t\tdrawPaddle();\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\t\t\tcase 39:\r\n\t\t\t\tif(rightWall) {\r\n\t\t\t\t\tunDrawPaddle();\r\n\t\t\t\t\tpaddleIndexs = paddleIndexs.map(i => i+3);\r\n\t\t\t\t\tdrawPaddle();\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "4a1bebcd47a45d0d720de758f589cd9c", "score": "0.6555065", "text": "function movePaddle(event) {\r\n\tlet rect = canvas.getBoundingClientRect();\r\n\r\n\tuser.y = event.clientY - rect.top - user.height / 2;\r\n}", "title": "" }, { "docid": "c634d5d068f201b09ec134e16c32e31a", "score": "0.6547286", "text": "mouseDown(pt) {}", "title": "" }, { "docid": "c634d5d068f201b09ec134e16c32e31a", "score": "0.6547286", "text": "mouseDown(pt) {}", "title": "" }, { "docid": "7ed31160292d57375b1ca02d2ced9618", "score": "0.65325475", "text": "function keyPressed() {\n if (keyCode === LEFT_ARROW) {\n paddlePosX -= 50;\n }\n else if (keyCode === RIGHT_ARROW) {\n paddlePosX += 50;\n }\n}", "title": "" }, { "docid": "27ff51bb2465015741b0cbad0e6f4a6d", "score": "0.652946", "text": "function keydown(e,paddle)\n{\n if(!e){e=window.event;}\n if(e.keyCode)\n {\n //Left arrow=37, Right arrow=39\n if(e.keyCode==37){paddle.vx=-1*paddle_speed;}\n if(e.keyCode==39){paddle.vx=paddle_speed;}\n }\n}", "title": "" }, { "docid": "6f350e3d1c9aef3f60d164449257b4bd", "score": "0.6520964", "text": "function setMove(e) \n{\n\t/*outputting the key pressed\n\tconsole.log(e.keyCode);\n\t*/\n\tgame.paddle1.Move(e, 2);\n\tgame.paddle2.Move(e, 1);\n\n}", "title": "" }, { "docid": "0054530f71a3ea47efcb1a1f49f9f2aa", "score": "0.6504469", "text": "function setup() {\n createCanvas(640, 480);\n // Create a ball\n // Ball (x,y,vx,vy,size,speed)\n ball = new Ball(width / 2, height / 2, 5, 5, 10, 5);\n // Create the right paddle with UP and DOWN as controls\n // paddle(x,y,w,h,speed,downKey,upKey,score,latestPoint)\n rightPaddle = new Paddle(width - 10, height / 2, 10, 60, 10, DOWN_ARROW, UP_ARROW, 0, false);\n // Create the left paddle with W and S as controls\n // Keycodes 83 and 87 are W and S respectively\n // paddle(x,y,w,h,speed,downKey,upKey,score,latestPoint)\n leftPaddle = new Paddle(0, height / 2, 10, 60, 10, 83, 87, 0, false);\n\n visuals = new Visuals();\n soundStatic.currentTime = 0;\n}", "title": "" }, { "docid": "a9d2e00dd67a7fd2eaaf90bf270660cb", "score": "0.65006113", "text": "function displayPaddle(paddle) {\n ///////// NEW /////////\n push();\n fill(paddle.color);\n rect(paddle.x, paddle.y, paddle.w, paddle.h);\n pop();\n ///////// END NEW /////////\n }", "title": "" }, { "docid": "ad3de3fc3c396ea52b0d8e3c461611f2", "score": "0.6497054", "text": "function updatePaddle(paddle) {\n // Update the paddle position based on its velocity\n paddle.y += paddle.vy;\n}", "title": "" }, { "docid": "ad3de3fc3c396ea52b0d8e3c461611f2", "score": "0.6497054", "text": "function updatePaddle(paddle) {\n // Update the paddle position based on its velocity\n paddle.y += paddle.vy;\n}", "title": "" }, { "docid": "30b55d2569a619c2d5e9ee8068dcc30d", "score": "0.6482225", "text": "function sketchpad_mouseMove(e) {\n // Update the mouse co-ordinates when moved\n getMousePos(e);\n\n // Draw a dot if the mouse button is currently being pressed\n if (mouseDown === 1) {\n drawLine(ctx, mouseX, mouseY, handwriting_size);\n }\n}", "title": "" }, { "docid": "12316dbeb0665cd57f815d0e9cf77fa3", "score": "0.6462937", "text": "function movePaddle(){\r\n paddle.x += paddle.dx;\r\n\r\n //Ball Detection\r\n if (paddle.x +paddle.w > canvas.width){\r\n paddle.x = canvas.width - paddle.w;\r\n }\r\n if (paddle.x <0){\r\n paddle.x = 0;\r\n }\r\n}", "title": "" }, { "docid": "4b31aa9b2b75c578d8d6b66bf530f2b2", "score": "0.64493597", "text": "function movePaddle() {\n paddle.x += paddle.dx;\n\n if (paddle.x < 0) paddle.x = 0;\n if (paddle.x + paddle.width > canvas.width)\n paddle.x = canvas.width - paddle.width;\n}", "title": "" }, { "docid": "f59b3c495946006bba213217e84abfd7", "score": "0.64454556", "text": "function displayPaddle(paddle) {\n fill(fgColor);\n rect(paddle.x, paddle.y, paddle.w, paddle.h);\n}", "title": "" }, { "docid": "25effcdbdef6f3a8c8cecef17bef9eb8", "score": "0.6440647", "text": "function onMouseUp()\n\t{\n\t}", "title": "" }, { "docid": "725d22e9da80579bbaa2cd709dc9bf0c", "score": "0.6432157", "text": "function movePaddle() {\n paddle.x += paddle.dx;\n\n // Wall detection\n if (paddle.x + paddle.w > canvas.width) {\n paddle.x = canvas.width - paddle.w;\n }\n\n if (paddle.x < 0) {\n paddle.x = 0;\n }\n}", "title": "" }, { "docid": "d72b2a9a77c3f1a7e89574bc3e453455", "score": "0.6428437", "text": "function sketchpad_mouseMove(e) {\n // Update the mouse co-ordinates when moved\n getMousePos(e);\n // Draw a dot if the mouse button is currently being pressed\n if (mouseDown === 1) {\n drawDot(ctx[e.path[0].dataset.id], mouseX, mouseY);\n }\n}", "title": "" }, { "docid": "0e98a3bc9f064805bed3938cd479ec2e", "score": "0.64185804", "text": "function mouseDown(x, y, button) {}", "title": "" }, { "docid": "8dfc5d3bf19080f8e8a80e107548daa1", "score": "0.6409385", "text": "function movePaddle(){\n paddle.x += paddle.dx; \n\n // Check if hit the right corner of the canvas\n if (paddle.x + paddle.w >= playGround.width){\n paddle.x = playGround.width - paddle.w - 1;\n }\n\n // Check if the paddle hit the left corner of the canvas\n if (paddle.x < 1){\n paddle.x = 1;\n }\n}", "title": "" }, { "docid": "90b6cafd0f7973e9fbc26aa88ffd0323", "score": "0.64073175", "text": "function setup() {\n var ctx = createCanvas(600, 600);//make canvas\n ctx.position((windowWidth-width)/2, 30);//put canvas in the middle\n background(5, 5, 5);//make black background\n fill(200, 30, 150);//make color\n paddle = new Paddle(300,500);//declare paddle\n easy = new button(100,450,\" easy\",2);//55 to y 25 to x\n medium = new button(250,450,\"medium\",3);//mode button\n hard = new button(400,450,\" hard\",1);//mode button\n direct = new button(400,50,\" directions\",0);//mode button\n restart = new button(245,300,\" restart\",1);//mode button\n}", "title": "" }, { "docid": "3382b591cabb14f64d9427da45630959", "score": "0.6404222", "text": "function draw() {\n background(0);\n\n leftPaddle.handleInput();\n rightPaddle.handleInput();\n\n ball.update();\n leftPaddle.update();\n rightPaddle.update();\n dialogue.update();\n\n\n if (ball.isOffScreen(true)){\n ball.reset();\n }\n\n ball.handleCollision(leftPaddle);\n ball.handleCollision(rightPaddle);\n\n dialogue.display();\n ball.display();\n leftPaddle.display();\n rightPaddle.display();\n\n}", "title": "" }, { "docid": "6fe9074069e07adaad4473c3fbd763f3", "score": "0.64038444", "text": "function keyup(e,paddle)\n{\n if(!e){e=window.event;}\n if(e.keyCode)\n {\n if(e.keyCode==37&&paddle.vx<0){paddle.vx=0;}\n if(e.keyCode==39&&paddle.vx>0){paddle.vx=0;}\n }\n}", "title": "" }, { "docid": "d4b3b6743164784b734fcaab5ff6c6d1", "score": "0.6395126", "text": "function keyDownHandler (event) //keycode.info\r\n{\r\n if(event.key === \"z\") //pour monter \r\n {\r\n paddle1.y -= 20\r\n }\r\n else if (event.key === \"s\") //pour descendre\r\n {\r\n paddle1.y += 20\r\n }\r\n else if (event.key === \"ArrowUp\") //pour monter\r\n {\r\n paddle2.y -= 20\r\n }\r\n else if (event.key === \"ArrowDown\") //pour descendre\r\n {\r\n paddle2.y += 20\r\n }\r\n}", "title": "" }, { "docid": "df7233efa78220176bcf5f73b8e33740", "score": "0.6391191", "text": "function mDOWN(){\n\tmouseC = true;\n}", "title": "" }, { "docid": "37aa0cf8f26e9bbcc57fd94155a1d67d", "score": "0.6386048", "text": "function sketchpad_mouseDown() {\n mouseDown = 1;\n drawLine(ctx, mouseX, mouseY, handwriting_size);\n}", "title": "" }, { "docid": "64827521cafcaea71e6d431324b37bc6", "score": "0.63830876", "text": "function displayPaddle(paddle) {\n // Draw the paddles\n push();\n fill(255, paddle.alpha);\n rect(paddle.x, paddle.y, paddle.w, paddle.h);\n pop();\n\n}", "title": "" }, { "docid": "0609c8a916fc872e75bbb581c83c63e5", "score": "0.63802856", "text": "function playground_mouseover(){\n if (btn_mode_1.getAttribute('class') == 'game-started')\n playground.style.cursor = 'none';\n else\n playground.style.cursor = 'auto'; \n }", "title": "" }, { "docid": "66a47f3678e7d7b90a5ad5f0c4eb2150", "score": "0.6371001", "text": "function mousePressed() {\n\n // if the position of the mouse in the x axis is greater or equal to the half of the width it activates the following actions\n if( mouseX >= width / 2) {\n //creates a map and change the speed and the direction of the ball\n ball.scale_x = map(mouseX, 0, width, 0.5, 10);\n ball.scale_y = map(mouseY, 0, height, 0.5, 10);\n\n //if not it activates the following actions\n} else {\n //creates a map and change the speed and the direction of the ball\n ball.scale_x = map(mouseX, 10, width, 2, 5);\n ball.scale_y = map(mouseY, 10, height, 2, 5);\n}\n\n//if a key (and the mouse) is pressed it activates the following action\nif(keyIsPressed === true){\n //it set a random color for the background\n background(random(256), random(256), random(256));\n}\n}", "title": "" }, { "docid": "3ac26901f04e0977708ceb33ae4d1407", "score": "0.63604903", "text": "function drawPaddle() {\n ctx.beginPath();\n ctx.rect(paddle.x, paddle.y, paddle.w, paddle.h);\n ctx.fillStyle = paddle.visible ? '#0095dd' : 'transparent';\n ctx.fill();\n ctx.closePath();\n}", "title": "" }, { "docid": "eaa4af0855a363eac8b57efcebcc6cbb", "score": "0.6355816", "text": "function paddleMove(evt) {\n var rect = breaker.getBoundingClientRect();\n var root = document.documentElement;\n var mouseX = evt.clientX - rect.left - root.scrollLeft;\n var mouseY = evt.clientY - rect.top - root.scrollTop;\n return {\n x: mouseX,\n y: mouseY\n };\n}", "title": "" }, { "docid": "407bde05e49abbee6a6e3c6fceacaa19", "score": "0.635017", "text": "function drawPaddle() {\n\tbreakball.fillStyle = 'rgb(0, 0, 0)';\n\tbreakball.fillRect(paddleX, paddleY, paddleWidth, paddleHeight);\n}", "title": "" }, { "docid": "4f7c3087a63fdec5650467f9a75538bc", "score": "0.6348619", "text": "function drawPaddle() {\n c.beginPath();\n c.rect(paddleX, canvas.height-paddleHeight,paddleWidth,paddleHeight);\n c.fillStyle = \"#0095DD\";\n c.fill();\n c.closePath();\n}", "title": "" }, { "docid": "b01dc39b7cc758f1ad0e9637ca2be10e", "score": "0.6346997", "text": "function Paddle(x,y,w,h,speed,downKey,upKey) {\n this.x = x;\n this.y = y;\n this.vx = 0;\n this.vy = 0;\n this.w = w;\n this.h = h;\n this.speed = speed;\n this.downKey = downKey;\n this.upKey = upKey;\n}", "title": "" }, { "docid": "df6ceda99f769994329e2bf2bef5f1c0", "score": "0.63458425", "text": "function movePaddle(){\n paddle.x += paddle.dx;\n\n //* wall detection \n if(paddle.x + paddle.w> canvas.width){\n paddle.x = canvas.width - paddle.w;\n }\n if(paddle.x<0){\n paddle.x =0;\n }\n}", "title": "" }, { "docid": "d81d3bdb23066fba21562879abce16d7", "score": "0.63414335", "text": "function setup() {\n createCanvas(640,480);\n\n // NEW //\n paddleColours = [\n color(246, 255, 237),\n color(233, 252, 214),\n color(220, 255, 186),\n color(209, 255, 165),\n color(194, 255, 137),\n color(179, 255, 109),\n color(171, 255, 94),\n color(164, 255, 81),\n color(158, 255, 71),\n color(146, 255, 50),\n color(138, 255, 35),\n color(130, 255, 20),\n color(120, 255, 2)\n ]\n\n food = new Food(random(width),random(height),random(1000),random(1000),20);\n // END NEW //\n\n // Create a ball\n ball = new Ball(width/2,height/2,5,5,10,5);\n // Create the right paddle with UP and DOWN as controls\n rightPaddle = new Paddle(width-10,height/2,10,60,10,DOWN_ARROW,UP_ARROW,paddleColours);\n // Create the left paddle with W and S as controls\n // Keycodes 83 and 87 are W and S respectively\n leftPaddle = new Paddle(0,height/2,10,60,10,83,87,paddleColours);\n}", "title": "" }, { "docid": "089bef0c06a0c9c74744bca823e03020", "score": "0.63274527", "text": "function ballHitPaddle(ball, paddle) {\n // Animate woble on ball\n ball.animations.play('wobble');\n ball.body.velocity.x = -1 * 5 * (paddle.x - ball.x);\n}", "title": "" }, { "docid": "9bc8b8788fd2733b04fe5468dd90e771", "score": "0.6321593", "text": "mouseMove(prev, pt) {}", "title": "" }, { "docid": "74dce20a61068dea287f9f5a23834017", "score": "0.6318956", "text": "function paddleUpdate() {\n this.top = this.y - this.height / 2 - 1;\n this.bottom = this.y + this.height / 2 + 1;\n this.left = this.x - this.width / 2 + 1;\n this.right = this.x + this.width / 2 - 1;\n\n this.move();\n\n}", "title": "" }, { "docid": "9fe8bae5af188691020f8ff64957dfd1", "score": "0.63183683", "text": "function drawPaddle() {\r\n ctx.beginPath();\r\n ctx.rect(paddle.x,paddle.y,paddle.w,paddle.h);\r\n ctx.fillStyle = '#0095dd';\r\n ctx.fill();\r\n ctx.closePath();\r\n }", "title": "" }, { "docid": "77f8949233ef653e782c1d4a862fb4c5", "score": "0.6314039", "text": "function displayPaddle(paddle) {\n // Draw the paddles\n rect(paddle.x, paddle.y, paddle.w, paddle.h);\n}", "title": "" }, { "docid": "e7a81ca4bc2734d8ef17bd766e1ee176", "score": "0.6304514", "text": "function control_game_mouse_down(e) {\n\tif (e.which == 1) {\n\t\tcontrol_mouse_position_update(e);\n\t\tmouse.start.x = mouse.end.x;\n\t\tmouse.start.y = mouse.end.y;\n\t\tmouse.down = true;\n\t}\n}", "title": "" }, { "docid": "83393cf010c622b9b00cdccb967d9b85", "score": "0.6298302", "text": "function stopPaddle (p) {\n return () => {\n p.moving = false;\n p.dx = 0;\n }\n}", "title": "" }, { "docid": "9094935d0a2bb03840295034709b7ca2", "score": "0.6297762", "text": "function handleInput(paddle) {\n // Move the paddle based on its up and down keys\n // If the up key is being pressed\n if (keyIsDown(paddle.upKey)) {\n // Move up\n paddle.vy = -paddle.speed;\n }\n // Otherwise if the down key is being pressed\n else if (keyIsDown(paddle.downKey)) {\n // Move down\n paddle.vy = paddle.speed;\n } else {\n // Otherwise stop moving\n paddle.vy = 0;\n }\n}", "title": "" }, { "docid": "5899addadbc7415de872a17ca267440e", "score": "0.6289539", "text": "function handleInput(paddle) {\n // Move the paddle based on its up and down keys\n // If the up key is being pressed\n if (keyIsDown(paddle.upKey)) {\n // Move up\n paddle.vy = -paddle.speed;\n }\n // Otherwise if the down key is being pressed\n else if (keyIsDown(paddle.downKey)) {\n // Move down\n paddle.vy = paddle.speed;\n }\n else {\n // Otherwise stop moving\n paddle.vy = 0;\n }\n}", "title": "" }, { "docid": "1e6c90ab64ca3ea4418909a7a5282cd4", "score": "0.62851614", "text": "mousePressed() {\n\n }", "title": "" }, { "docid": "9a45da69b1e80aaef884a486d2db9b26", "score": "0.62813956", "text": "function control_game_mouse_up(e) {\n\tif (e.which == 1) {\n\t\tmodel_defense_add(mouse.start.x, mouse.start.y, mouse.end.x, mouse.end.y);\n\t\tmouse.down = false;\n\t}\n}", "title": "" }, { "docid": "4b4c73f874eb188b89af727ada2c602a", "score": "0.62813365", "text": "function onMouseDown(e) {\n drawing = true;\n current.x = e.clientX;\n current.y = e.clientY;\n\n}", "title": "" }, { "docid": "deb7acae92851f44db1fcfa12d0b6b45", "score": "0.6274369", "text": "function playControl() {\n\n player.img.body.setZeroVelocity();\n\n if (cursors.up.isDown) {\n player.moveUp(bmd);\n }\n else if (cursors.down.isDown) {\n player.moveDown(bmd);\n }\n\n if (cursors.left.isDown) {\n player.moveLeft(bmd);\n }\n else if (cursors.right.isDown) {\n player.moveRight(bmd);\n }\n}", "title": "" }, { "docid": "73800a69234a670baa39d31493933722", "score": "0.6272425", "text": "onMove(event) {\n if (this.active) { //<!>\n curPosX = (event.clientX - clickPosX);\n curPosY = (event.clientY - clickPosY);\n reDraw();\n }\n }", "title": "" }, { "docid": "a93ac75259c9ac806e605004237e69a1", "score": "0.6271226", "text": "function startGame () {\n\n\t\t if (ballOnPaddle)\n\t\t {\n\t\t ballOnPaddle = false;\n\t\t ball.body.velocity.y = -300;\n\t\t ball.body.velocity.x = -75;\n\t\t }\n\n\t\t}", "title": "" }, { "docid": "b80837a8897fe888c854926bab006d31", "score": "0.62710744", "text": "function playground_mousemove(event) {\n if (btn_mode_1.getAttribute('class') == 'game-started'){\n lion_set_position(event.pageX, event.pageY);\n\n // stop the game when mouse moved over any wall\n // check if lion img overlapping any wall after it have moved\n for (var i = 0; i < walls.length; i++){\n // console.log(walls[i]);\n if (is_overlapping(lion_img, walls[i])){\n btn_mode_1.removeAttribute('class', 'game-started');\n btn_mode_1.setAttribute('class', 'game-not-started');\n stop_game();\n alert(\"Game Over! :(\\nPress Start button to try again.\\n\\nNotice: you are not supposed to touch walls of the labyrinth\");\n btn_mode_1.innerHTML = 'Start first mode';\n }\n }\n }\n }", "title": "" }, { "docid": "bac0baf9ebead2390bed3e6739633c02", "score": "0.6265025", "text": "function controlGame() {\n\n const actionControlMouseAndSpace = () => {\n if(countPress <= 1) {\n addCumulationSpeed(-2.0);\n countPress++;\n hitBottomTrue();\n hitTopTrue();\n const binded = styleJump.bind(jumperButton);\n binded(); \n // styleJump.call(jumperButton); \n lionFlyUp(); \n } \n }\n\n jumperButton.onclick = function () {\n actionControlMouseAndSpace(); \n };\n\n document.onkeyup = function (event) {\n jumperButton.onclick = null;\n let key_press = String.fromCharCode(event.keyCode);\n if (key_press == \" \") {\n actionControlMouseAndSpace();\n }\n };\n }", "title": "" }, { "docid": "3dd4b51c0417cb2e5a38a7c4e0507884", "score": "0.626296", "text": "updateButton(){\n \tif (this.mouse() && mouseIsPressed){\n \t\tthis.active = !(this.active) ;\n \t}\n }", "title": "" }, { "docid": "c8da52cda642972ba8ffb7490e196c16", "score": "0.6259377", "text": "activePointer(steps, onClick) {\n this.pointer.style.display = 'none';\n let xCord,yCord;\n //Sprawdzamy zy znajduje sie w bazie i podswietlamy pierwsze pole\n if (this.base) [xCord, yCord] = cords.points[cords[this.color].offset];\n else {\n //Jesli nie no to adekwatnie do miejsca\n let numCord = this.place + steps + cords[this.color].offset;\n if (numCord >= cords.points.length) numCord -= cords.points.length-1;\n\n [xCord, yCord] = cords.points[numCord];\n }\n\n //Zmiana koloru\n this.pointer.style.left = `${xCord}%`;\n this.pointer.style.top = `${yCord}%`;\n this.pointer.style.backgroundColor = this.color;\n\n //Dodanie clicku i mouseovera do naszego piona\n this.currentPawn.addEventListener('click', () => this.clicked(steps, onClick));\n this.currentPawn.onmouseover = () => {\n if (this.base) {\n //brak hovera jesli jestesmy w bazie i nie wylosowano 1 lub 6\n if (steps != 1 && steps != 6) {\n this.pointer.style.display = 'none';\n return;\n }\n }\n // Jesli nie to hover caly czas dziala\n this.pointer.style.display = 'block';\n };\n\n //Usuniecie hovera po zjechaniu mysza\n this.currentPawn.onmouseleave = () => {\n this.pointer.style.display = 'none';\n };\n }", "title": "" }, { "docid": "ad009357bd537f7e4552aaef5563a80d", "score": "0.62583584", "text": "function mouseClicked() {\n if (mouseButton == LEFT && mouseInBall()){\n console.log(\"mouse clicked\");\n levelUp();\n }\n}", "title": "" }, { "docid": "de342134202b7a60b69eddba70764940", "score": "0.6258027", "text": "function mousePressed() {\r\n if(gameover) {\r\n resetSnake();\r\n}}", "title": "" }, { "docid": "3fe2faddacffcbc2eaf1f3e373a29d72", "score": "0.62475574", "text": "function movePaddleLeft (p) {\n return () => {\n p.moving = true;\n p.dx = -5;\n }\n}", "title": "" }, { "docid": "0466c8cd826b8d3c43eca16e92ab328e", "score": "0.624296", "text": "mousePressed() {\n\n }", "title": "" }, { "docid": "d9c92d32d28efc0c06c01aabec2ae280", "score": "0.62413424", "text": "function drawPaddle() {\n\tcontext.beginPath();\n\t/*\n\tthe first 2 values specify the co-ordinates from top-left\n\tof the canvas and next width and height\n\t*/\n\tcontext.rect(paddleX, paddleY, paddleWidth, paddleHeight);\n\t// fillStyle is used to set property color\n\tcontext.fillStyle = \"#b20039\";\n\t// fill method is used to fill\n\tcontext.fill();\n\tcontext.closePath();\n}", "title": "" }, { "docid": "4222bb8e3a595ef3221acd5a7fa83cce", "score": "0.6240089", "text": "function mousePressed() {\n draw();\n}", "title": "" }, { "docid": "e271e078f0ed94f8151f83ad39079079", "score": "0.62290287", "text": "function handleInput(paddle) {\n\n // Set the velocity based on whether one or neither of the keys is pressed\n\n // NOTE how we can change properties in the object, like .vy and they will\n // actually CHANGE THE OBJECT PASSED IN, this allows us to change the velocity\n // of WHICHEVER paddle is passed as a parameter by changing it's .vy.\n\n // UNLIKE most variables passed into functions, which just pass their VALUE,\n // when we pass JAVASCRIPT OBJECTS into functions it's the object itself that\n // gets passed, so we can change its properties etc.\n\n // Check whether the upKeyCode is being pressed\n // NOTE how this relies on the paddle passed as a parameter having the\n // property .upKey\n if (keyIsDown(paddle.upKeyCode)) {\n // Move up\n paddle.vy = -paddle.speed;\n }\n // Otherwise if the .downKeyCode is being pressed\n else if (keyIsDown(paddle.downKeyCode)) {\n // Move down\n paddle.vy = paddle.speed;\n } else {\n // Otherwise stop moving\n paddle.vy = 0;\n }\n }", "title": "" }, { "docid": "2b79dc422b261139eedd04a541f16795", "score": "0.62246597", "text": "function setupPaddles() {\n // Initialise the left paddle position\n leftPaddle.x = 0 ;\n leftPaddle.y = height / 2;\n\n // Initialise the right paddle position\n rightPaddle.x = width - rightPaddle.w;\n rightPaddle.y = height / 2;\n}", "title": "" }, { "docid": "8387d91574820b5155d09debbf4746c7", "score": "0.6219333", "text": "function setup() {\n createCanvas(640,480);\n noStroke();\n // Create a ball\n ball = new Ball(width/2,height/2,5,5,10,10);\n // Create the right paddle with UP and DOWN as controls\n // Paddle(x,y,w,h,speed,downKey,upKey,score)\n rightPaddle = new Paddle(width-10,height/2,10,60,1,DOWN_ARROW,UP_ARROW,0);\n // Create the left paddle with W and S as controls\n // Keycodes 83 and 87 are W and S respectively\n // Paddle(x,y,w,h,speed,downKey,upKey,score)\n leftPaddle = new Paddle(0,height/2,10,60,1,83,87,0);\n // Create the dialogue box\n // function Dialogue (x,y,size,talking)\n dialogue = new Dialogue(0,250,width,false, strings);\n}", "title": "" }, { "docid": "762bd329c5ea4a7545fffd94a2996fbd", "score": "0.6218107", "text": "function BBHitPaddleFace(paddleSide, previousXSpeed, previousYSpeed, yPosition) {\n //ballColor = [0, 200, 200]\n}", "title": "" }, { "docid": "e135884cdf0a22c5011446a4d51c2509", "score": "0.6209705", "text": "function handleInput(paddle) {\n\n // Set the velocity based on whether one or neither of the keys is pressed\n\n // NOTE how we can change properties in the object, like .vy and they will\n // actually CHANGE THE OBJECT PASSED IN, this allows us to change the velocity\n // of WHICHEVER paddle is passed as a parameter by changing it's .vy.\n\n // UNLIKE most variables passed into functions, which just pass their VALUE,\n // when we pass JAVASCRIPT OBJECTS into functions it's the object itself that\n // gets passed, so we can change its properties etc.\n\n // Check whether the upKeyCode is being pressed\n // NOTE how this relies on the paddle passed as a parameter having the\n // property .upKey\n if (keyIsDown(paddle.upKeyCode)) {\n // Move up\n paddle.vy = -paddle.speed;\n }\n // Otherwise if the .downKeyCode is being pressed\n else if (keyIsDown(paddle.downKeyCode)) {\n // Move down\n paddle.vy = paddle.speed;\n } else {\n // Otherwise stop moving\n paddle.vy = 0;\n }\n}", "title": "" }, { "docid": "9348ba841c962bfc3ee5fbfa3e85a5df", "score": "0.6206178", "text": "function handleInput(paddle) {\n\n // Set the velocity based on whether one or neither of the keys is pressed\n\n // NOTE how we can change properties in the object, like .vy and they will\n // actually CHANGE THE OBJECT PASSED IN, this allows us to change the velocity\n // of WHICHEVER paddle is passed as a parameter by changing it's .vy.\n\n // UNLIKE most variables passed into functions, which just pass their VALUE,\n // when we pass JAVASCRIPT OBJECTS into functions it's the object itself that\n // gets passed, so we can change its properties etc.\n\n // Check whether the upKeyCode is being pressed\n // NOTE how this relies on the paddle passed as a parameter having the\n // property .upKey\n if (keyIsDown(paddle.upKeyCode)) {\n // Move up\n paddle.vy = -paddle.speed;\n }\n // Otherwise if the .downKeyCode is being pressed\n else if (keyIsDown(paddle.downKeyCode)) {\n // Move down\n paddle.vy = paddle.speed;\n }\n else {\n // Otherwise stop moving\n paddle.vy = 0;\n }\n}", "title": "" } ]
b306ba0fea514130acca5d15713cd2b5
NOTE: See S3 Get Signed URL (and Create Presigned Post) accept callback but not promise.
[ { "docid": "1efc51dc557cbb30d65d46af002b9f59", "score": "0.7214194", "text": "async function _createPresignedPostPromise(params) {\n return await createPresignedPost(s3, params);\n}", "title": "" } ]
[ { "docid": "9afb8352b67572255ca1726417963638", "score": "0.70104885", "text": "function getSignedRequest(file) {\n const xhr = new XMLHttpRequest();\n xhr.open('GET', `/sign-s3?file-name=${file.name}&file-type=${file.type}`);\n xhr.onreadystatechange = () => {\n if (xhr.readyState === 4) {\n if (xhr.status === 200) {\n const response = JSON.parse(xhr.responseText);\n uploadFile(file, response.presigned_url);\n } else {\n alert('Could not get signed URL.');\n }\n }\n };\n xhr.send();\n}", "title": "" }, { "docid": "61ee982dd578624f0f1cb1097e04bffa", "score": "0.6893602", "text": "getSignedRequest(file){\n const xhr = new XMLHttpRequest()\n xhr.open('GET', `http://localhost:3000/sign-s3?file-name=${file.name}&file-type=${file.type}`)\n xhr.onreadystatechange = () => {\n if(xhr.readyState === 4) {\n if(xhr.status === 200) {\n console.log('IMG URL: ', xhr.responseText)\n const response = JSON.parse(xhr.responseText)\n this.uploadFile(file, response.signedRequest, response.url)\n } else {\n alert('Could not get signed URL.')\n }\n }\n };\n xhr.send();\n }", "title": "" }, { "docid": "2d4d6c08c0b35ef335d9a7b202adbdec", "score": "0.6792425", "text": "async function generatePresignedUrl() {\n\ttry {\n\t\tlet bucektParams = {\n\t\t\tBucket: 'hellofilesbucket', // your bucket name,\n\t\t\tKey: keyfile // path to the object you're looking for\n\t\t}\n\t\tvar s3 = new AWS.S3();\n\t\tpresignedGETURL = s3.getSignedUrl('getObject', bucektParams);\n\t\tconsole.log(\"presigned url obtained from s3: \", presignedGETURL);\n\n\t} catch (err) {\n\t\tconsole.log(\"error call during call s3 \".concat(err))\n\t\tthrow err;\n\t}\n\n}", "title": "" }, { "docid": "1a23c2c15ec0bb1a13a547c65e3a9ab5", "score": "0.67627585", "text": "function getSignedRequest(file){\n const xhr = new XMLHttpRequest();\n xhr.open('GET', `/aws/s3-sign?file-name=${file.name}&file-type=${file.type}`);\n xhr.onreadystatechange = () => {\n if (xhr.readyState === 4){\n if (xhr.status === 200){\n const response = JSON.parse(xhr.response);\n if (response.signedRequest === null){\n return alert(\"Did not get S3 signed request!\");\n }\n uploadFile(file, response.signedRequest, response.url);\n }\n else {\n return alert('Could not get signed URL.');\n }\n }\n };\n xhr.send();\n}", "title": "" }, { "docid": "b3821cb88866577adce812c8db4b15a9", "score": "0.65384245", "text": "presignedPostPolicy(postPolicy, cb) {\n this.getBucketRegion(postPolicy.formData.bucket, (e, region) => {\n if (e) return cb(e)\n var date = Moment.utc()\n var dateStr = date.format('YYYYMMDDTHHmmss') + 'Z'\n\n postPolicy.policy.conditions.push(['eq', '$x-amz-date', dateStr])\n postPolicy.formData['x-amz-date'] = dateStr\n\n postPolicy.policy.conditions.push(['eq', '$x-amz-algorithm', 'AWS4-HMAC-SHA256'])\n postPolicy.formData['x-amz-algorithm'] = 'AWS4-HMAC-SHA256'\n\n postPolicy.policy.conditions.push([\"eq\", \"$x-amz-credential\", this.params.accessKey + \"/\" + getScope(region, date)])\n postPolicy.formData['x-amz-credential'] = this.params.accessKey + \"/\" + getScope(region, date)\n\n var policyBase64 = new Buffer(JSON.stringify(postPolicy.policy)).toString('base64')\n\n postPolicy.formData.policy = policyBase64\n\n var signature = postPresignSignatureV4(region, date, this.params.secretKey, policyBase64)\n\n postPolicy.formData['x-amz-signature'] = signature\n cb(null, postPolicy.formData)\n })\n }", "title": "" }, { "docid": "e35e56ef11433abfc6b30eaf71e64dcc", "score": "0.6527853", "text": "function obtainS3PresignedGetUrl (params, cb) {\n writeStatus(`4. Obtain S3 presigned GET url for sample file: ${config.sample_file.s3_bucket}/${config.sample_file.s3_prefix}`)\n const options = {\n Bucket: config.sample_file.s3_bucket,\n Key: config.sample_file.s3_prefix\n }\n /* Ensure the object exists and is accessible\n as S3.getSignedUrl fails quietly */\n S3.headObject(options, (err) => {\n if (err) {\n return cb(new Error(`unable to access S3 object: ${err}`))\n }\n params.presignedGetUrl = S3.getSignedUrl('getObject', options)\n return cb(null, params)\n })\n}", "title": "" }, { "docid": "e49dc9b8f0f186025ed277ffa08e39ae", "score": "0.64945686", "text": "s3Upload(signedUrl, file, cb) {\n\n const xhr = new XMLHttpRequest();\n xhr.open('PUT', signedUrl);\n xhr.onreadystatechange = () => {\n if (xhr.readyState === 4) {\n if (xhr.status === 200) {\n cb(null, \"Upload success\");\n }\n else {\n cb(\"An error upload file\");\n }\n }\n };\n xhr.send(file);\n }", "title": "" }, { "docid": "9c1a6b541e53c1eab36f49d9bacc7691", "score": "0.64884657", "text": "function getSignedRequest(file, type, cb) {\n console.log(\">>> getSignedRequest\");\n console.log(\"file: \", file);\n\n let fileName = file.fileName;\n let fileType = file.fileName.split(\".\")[1];\n console.log(\"fileName: \", fileName);\n console.log(\"fileType: \", fileType);\n\n // Convert file data to blob from dataURI\n let fileBlob = dataURItoBlob(file.data);\n console.log(\"converted file: \", fileBlob);\n\n // Get signed request from server\n axios.post(\"/sign-s3\", { fileName, fileType, type })\n .then(response => {\n console.log(\"response: \", response);\n // Upload file to S3 using signed request\n if (response.status === 200) {\n uploadFile(fileBlob, response.data.signedRequest, response.data.url, type, cb);\n } else {\n console.log(\"Could not get signed URL.\");\n }\n })\n .catch(error => {\n console.log(\"error: \", error);\n });\n}", "title": "" }, { "docid": "5f3db32d9bef10de0de650dd41e61fe0", "score": "0.6488194", "text": "presignedGetObject(bucketName, objectName, expires, cb) {\n if (!isValidBucketName(bucketName)) {\n throw new errors.InvalidBucketNameException('Invalid bucket name: ' + bucketName)\n }\n if (!isValidObjectName(objectName)) {\n throw new errors.InvalidObjectNameException(`Invalid object name: ${objectName}`)\n }\n if (objectName.trim() === '') {\n throw new errors.InvalidObjectNameException('Object name cannot be empty')\n }\n if (!isNumber(expires)) {\n throw new TypeError('expires should be of type \"number\"')\n }\n var method = 'GET'\n var options = this.getRequestOptions({method, bucketName, objectName})\n options.expires = expires.toString()\n this.getBucketRegion(bucketName, (e, region) => {\n if (e) return cb(e)\n cb(null, presignSignatureV4(options, this.params.accessKey, this.params.secretKey, region))\n })\n }", "title": "" }, { "docid": "b4c12c127ce9ad02bacae3e51ff9411c", "score": "0.64263403", "text": "uploadImageCallBack(file) {\n getSignedUrlToPostFile(file)\n .then(function (result) {\n var signedUrl = result.data.signedUrl;\n return postFile(file, signedUrl);\n })\n .then(response => {\n return {\n data: {\n link: PREFIX+file.name\n }\n }\n })\n .catch(function (err) {\n console.log(err);\n throw err;\n });\n }", "title": "" }, { "docid": "e0156e17a58776dd0e04e453eea538b0", "score": "0.6277405", "text": "function obtainS3PresignedPutUrl (params, cb) {\n writeStatus(`6. Obtain S3 presigned PUT url for rendition: ${config.sample_file.s3_bucket}/${config.sample_file.s3_rendition_prefix}`)\n const options = {\n Bucket: config.sample_file.s3_bucket,\n Key: config.sample_file.s3_rendition_prefix\n }\n S3.getSignedUrl('putObject', options, (err, url) => {\n if (err) {\n return cb(err)\n }\n params.presignedPutUrl = url\n return cb(null, params)\n })\n}", "title": "" }, { "docid": "f566f00e6f66e1823ee84ac86afc0c52", "score": "0.6238499", "text": "function uploadFileToS3(signedRequest, file, url) {\n return new Promise((fulfill, reject) => {\n axios.put(signedRequest, file, { headers: { 'Content-Type': file.type } }).then((response) => {\n // console.log(response)\n // console.log(url)\n fulfill(url);\n }).catch((error) => {\n console.log(error)\n reject(error);\n });\n });\n}", "title": "" }, { "docid": "b8071bf797d3884a9a75f7f85f4503ae", "score": "0.62216485", "text": "function signS3URL(url, expireSecs) {\n var bucket, key; \n if (url.search(/\\/s3[.-](\\w{2}-\\w{4,9}-\\d\\.)?amazonaws\\.com/) != -1) {\n //bucket in path format\n bucket = url.split('/')[3];\n key = url.split('/').slice(4).join('/');\n }\n if (url.search(/\\.s3[.-](\\w{2}-\\w{4,9}-\\d\\.)?amazonaws\\.com/) != -1) {\n //bucket in hostname format\n let hostname = url.split(\"/\")[2];\n bucket = hostname.split(\".\")[0];\n key = url.split('/').slice(3).join('/');\n }\n if (bucket && key) {\n qnabot.log(\"Attempt to convert S3 url to a signed URL: \",url);\n qnabot.log(\"Bucket: \", bucket, \" Key: \", key) ;\n try {\n const s3 = new aws.S3() ;\n const signedurl = s3.getSignedUrl('getObject', {\n Bucket: bucket,\n Key: key,\n Expires: expireSecs\n });\n //qnabot.log(\"Signed URL: \", signedurl);\n url = signedurl;\n } catch (err) {\n qnabot.log(\"Error signing S3 URL (returning original URL): \", err) ;\n }\n } else {\n qnabot.log(\"URL is not an S3 url - return unchanged: \",url);\n } \n return url;\n}", "title": "" }, { "docid": "e321ac475fcb202e2d6f634adf9ebf79", "score": "0.620484", "text": "function sign(params) {\n return new Promise(function(resolve, reject) {\n var paramsToSign = _.omit(params, 'file');\n\n $.get('/signature', paramsToSign, function(signature) {\n console.log(signature);\n resolve(signature); \n });\n });\n}", "title": "" }, { "docid": "98c0808092b492635f0b5fa88504dadc", "score": "0.60857755", "text": "async getSignedUrlS3(file, folderPrefix = 'UNCATEGORIZED_FILES') {\n const data = {\n fileName: file.name,\n type: file.type,\n folderPrefix,\n }\n const response = await this.$axios.post(\n '/v1/medias/presigned-url',\n data,\n {\n headers: { authorization: 'Bearer ' + this.$cookies.get('token') },\n }\n )\n return response.data.data.url\n }", "title": "" }, { "docid": "c3283752056217ab03121fd3248e768d", "score": "0.6081632", "text": "async signFileUploadRequest() {\n // grab a current UNIX timestamp\n let timestamp = Math.round(new Date().getTime() / 1000);\n let signature = await this.cloudinary.v2.utils.api_sign_request({ timestamp }, api_secret);\n let payload = {\n signature,\n timestamp,\n };\n return payload;\n }", "title": "" }, { "docid": "ab3f49dc193bdf73bd48a28efbde5d65", "score": "0.60425085", "text": "function uploadMedia() {\n var signedURL;\n var file;\n file = problemVm.myFile;\n //get a signed S3 request for the file selected by user\n problemService.getSignedS3Request(file).then(function(response){\n if(response.status === 200){\n signedURL = response.data.signed_request;\n console.log(response.data);\n var xhr = new XMLHttpRequest();\n xhr.upload.addEventListener(\"progress\", uploadProgress, false);\n xhr.addEventListener(\"load\", uploadComplete, false);\n xhr.addEventListener(\"error\", uploadFailed, false);\n xhr.addEventListener(\"abort\", uploadCanceled, false);\n xhr.open(\"PUT\", signedURL);\n // make the file publically downloadable\n xhr.setRequestHeader('x-amz-acl', 'public-read');\n problemVm.submitdisabled = true;\n problemVm.progress = 0;\n\n xhr.onload = function() {\n if (xhr.status === 200) {\n console.log(\"File upload complete\");\n // clean up code\n problemVm.submitdisabled = false;\n problemVm.problem.problem_media.push(problemVm.mediabucketurl + file.name);\n }\n };\n xhr.onerror = function() {\n alert(\"Could not upload file.\");\n problemVm.submitdisabled = false;\n };\n\n problemVm.progressVisible = true;\n console.log(signedURL);\n xhr.send(file);\n }\n else {\n console.log(response);\n }\n });\n }", "title": "" }, { "docid": "be80ec5a035a69596a4dd95d22f51868", "score": "0.59882486", "text": "async function send_to_aws($file_data,$file_name) {\n\tconst AWS = require('aws-sdk');\n\tAWS.config.loadFromPath('./aws_config.json');\n\tconst s3 = new AWS.S3();\n\tbucketParams = {Bucket:Config.aws_bucket};\n\tvar s3Bucket = new AWS.S3( { params:bucketParams } )\n\tconst $data={Key:$file_name, Body:$file_data};\n\ts3Bucket.putObject($data, function(err, data){\n\n\t \tif (err) { console.log(err);return {\"status\":false,\"url\":\"\"};} \n\t\telse {\n\t\t\t\n\t\t\tconst $urlParams = {Bucket:Config.aws_bucket, Key:$file_name};\n\t\t\ts3Bucket.getSignedUrl('getObject',$urlParams, function(err, url){\n\t\t\t\tconsole.log(url);\n\t\t\t\treturn {\"status\":true,\"url\":url};\n\t\t\t})\n\t }\n\t});\n}", "title": "" }, { "docid": "74b8ef45bf2dc6d77c3f185d91449c76", "score": "0.5933767", "text": "signRequest(webResource) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!webResource.headers)\n webResource.headers = new HttpHeaders();\n const targetUri = encodeURIComponent(webResource.url.toLowerCase()).toLowerCase();\n const date = new Date();\n date.setMinutes(date.getMinutes() + 5);\n const expirationDate = Math.round(date.getTime() / 1000);\n const signature = yield this._generateSignature(targetUri, expirationDate);\n webResource.headers.set(\"authorization\", `SharedAccessSignature sig=${signature}&se=${expirationDate}&skn=${this.keyName}&sr=${targetUri}`);\n webResource.withCredentials = true;\n return webResource;\n });\n }", "title": "" }, { "docid": "320ea9a8df91a9c51a84bccaa0705cd0", "score": "0.59335", "text": "presignedPutObject(bucketName, objectName, expires, cb) {\n if (!isValidBucketName(bucketName)) {\n throw new errors.InvalidBucketNameException('Invalid bucket name: ' + bucketName)\n }\n if (!isValidObjectName(objectName)) {\n throw new errors.InvalidObjectNameException(`Invalid object name: ${objectName}`)\n }\n if (objectName.trim() === '') {\n throw new errors.InvalidObjectNameException('Object name cannot be empty')\n }\n if (!isNumber(expires)) {\n throw new TypeError('expires should be of type \"number\"')\n }\n var method = 'PUT'\n var options = this.getRequestOptions({method, bucketName, objectName})\n options.expires = expires.toString()\n this.getBucketRegion(bucketName, (e, region) => {\n if (e) return cb(e)\n cb(null, presignSignatureV4(options, this.params.accessKey, this.params.secretKey, region))\n })\n }", "title": "" }, { "docid": "23f54839fe626b7a0a3b970f0dbd92eb", "score": "0.5920074", "text": "async onMintRequestSigned(event) {}", "title": "" }, { "docid": "a4afb8d340d802c382da8d3239c21bb6", "score": "0.5914056", "text": "function getS3PreSignedUrl(s3ObjectKey) {\n\n const bucketName = process.env.S3_PERSISTENCE_BUCKET;\n \n const s3PreSignedUrl = s3SigV4Client.getSignedUrl('getObject', {\n Bucket: bucketName,\n Key: s3ObjectKey,\n Expires: 60*1 // the Expires is capped for 1 minute\n });\n\n console.log(`Util.s3PreSignedUrl: ${s3ObjectKey} URL ${s3PreSignedUrl}`); // you can see those on CloudWatch\n\n return s3PreSignedUrl;\n}", "title": "" }, { "docid": "266123ed7e058f1c996826a8ea31ddbb", "score": "0.58505046", "text": "function uploadFile(fileBlob, signedRequest, url, type, cb) {\n console.log(\">>> uploadFile\");\n console.log(\"file: \", fileBlob);\n console.log(\"signedRequest: \", signedRequest);\n console.log(\"url: \", url);\n\n let options = {\n headers: { \"Content-Type\": fileBlob.type }\n }\n\n // Make PUT request to S3 using our signed request\n axios.put(signedRequest, fileBlob, options)\n .then(response => {\n console.log(\"upload response: \", response);\n if (response.status === 200) {\n console.log(\"File uploaded successfully to: \", url);\n // alert (\"File uploaded successfully to: \" + url);\n if (cb) {\n cb(url);\n }\n } else {\n console.log(\"Could not upload file\");\n if (cb) {\n cb(undefined);\n }\n }\n })\n .catch(error => {\n console.log(\"error: \", error);\n });\n}", "title": "" }, { "docid": "0cc91290d4b087998086b602f9ca3f36", "score": "0.5841823", "text": "static signRequests(data) { }", "title": "" }, { "docid": "cd6380ee8e4951dabab7e186c7412fc7", "score": "0.58108157", "text": "function createPresignedURL(_a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.host, host = _c === void 0 ? process.env.AWS_IOT_HOST : _c, _d = _b.path, path = _d === void 0 ? '/mqtt' : _d, _e = _b.region, region = _e === void 0 ? process.env.AWS_REGION : _e, _f = _b.service, service = _f === void 0 ? 'iotdevicegateway' : _f, _g = _b.accessKeyId, accessKeyId = _g === void 0 ? process.env.AWS_ACCESS_KEY_ID : _g, _h = _b.secretAccessKey, secretAccessKey = _h === void 0 ? process.env.AWS_SECRET_ACCESS_KEY : _h, _j = _b.sessionToken, sessionToken = _j === void 0 ? process.env.AWS_SESSION_TOKEN : _j;\n var signed = aws4.sign({\n host: host,\n path: path,\n service: service,\n region: region,\n signQuery: true,\n }, {\n accessKeyId: accessKeyId,\n secretAccessKey: secretAccessKey,\n });\n return \"wss://\" + host + signed.path + \"&X-Amz-Security-Token=\" + encodeURIComponent(sessionToken);\n}", "title": "" }, { "docid": "ebbe62b5fb91dab31e52a5a2a0898b9e", "score": "0.5766215", "text": "function signPartUpload (req, res, next) {\n const client = getS3Client(req, res)\n if (!client) return\n\n const { uploadId, partNumber } = req.params\n const { key } = req.query\n\n if (typeof key !== 'string') {\n res.status(400).json({ error: 's3: the object key must be passed as a query parameter. For example: \"?key=abc.jpg\"' })\n return\n }\n if (!parseInt(partNumber, 10)) {\n res.status(400).json({ error: 's3: the part number must be a number between 1 and 10000.' })\n return\n }\n\n const bucket = getBucket(req)\n\n getSignedUrl(client, new UploadPartCommand({\n Bucket: bucket,\n Key: key,\n UploadId: uploadId,\n PartNumber: partNumber,\n Body: '',\n }), { expiresIn: config.expires }).then(url => {\n res.json({ url, expires: config.expires })\n }, next)\n }", "title": "" }, { "docid": "92f1547a2176ea1ab3db575964eb25b7", "score": "0.57212394", "text": "function uploadFileToS3(signedRequest, file, url, type) {\n // eslint-disable-next-line no-param-reassign\n // url += `?${(new Date()).getTime()}`;\n return new Promise((fulfill, reject) => {\n axios.put(signedRequest, file, { headers: { 'Content-Type': type } }).then((response) => {\n fulfill(url);\n }).catch((error) => {\n reject(error);\n });\n });\n}", "title": "" }, { "docid": "a91c1a13e0936b14bd194e960bba0c6e", "score": "0.56928146", "text": "function sendAWSRequest(para, headers, callback) {\n // Send the signed AWS request. Call the callback when done.\n const body = para.body;\n const req = {\n host: para.host, // e.g. kinesis.us-west-2.amazonaws.com\n path: para.uri + (\n para.queryString\n ? `?{para.queryString}`\n : ''\n ),\n port: 443,\n secure: true,\n method: para.method,\n headers,\n };\n console.log('*** send_to_aws_kinesis', { req, body });\n // httpRequest only sends JSON bodies, not string bodies.\n return httpRequest(req, body, (error, response) => {\n if (error) { // Suppress the error so caller won't retry.\n console.error('*** send_to_aws_kinesis error', error.message, error.stack);\n return callback(null, error.message);\n }\n const result = response.result;\n console.log(['*** send_to_aws_kinesis OK', new Date().toISOString(), JSON.stringify({ result }, null, 2)].join('-'.repeat(5)));\n // console.log('response=', response); console.log('result=', result);\n return callback(null, result);\n });\n}", "title": "" }, { "docid": "f3b47995f2d30df1ec42eb49ca3d00f9", "score": "0.5652789", "text": "async function uploadobject(params) {\n\n const result = await s3.upload(params).promise();//, function(err, data) {\n return result;\n}", "title": "" }, { "docid": "916b3e654068e74207b312f65e0b7380", "score": "0.5629075", "text": "function getSignature(StringToSign, AWSSecretAccessKey) {\n\tvar hmac = crypto.createHmac('sha1', AWSSecretAccessKey);\n\thmac.update(StringToSign, 'utf8');\n\tvar Signature = hmac.digest('base64');\n\treturn Signature;\n}", "title": "" }, { "docid": "48a09ff7514cd8577bb6e69f1dd7c9cb", "score": "0.55649674", "text": "uploadImage() {\n fetch(EndpointConfig.getS3)\n .then((response) => response.json())\n .then((responseJson) => {\n console.log(\"Results uploading image:\");\n console.log(responseJson);\n\n const file = {\n // `uri` can also be a file system path (i.e. file://)\n uri: this.state.imageuri,\n name: this.state.imagename + \".jpg\",\n type: this.state.imagetype + \"/jpg\",\n };\n\n const options = {\n keyPrefix: \"posts/\",\n bucket: \"proxyprizes\",\n region: \"eu-west-3\",\n accessKey: responseJson.accessKey,\n secretKey: responseJson.secretKey,\n successActionStatus: 201,\n };\n\n RNS3.put(file, options).then((response) => {\n if (response.status !== 201)\n throw new Error(\"Failed to upload image to S3\");\n console.log(response.body);\n console.log(\"File uploaded to the S3.\");\n\n this.setState({ picture: response.body.postResponse.location });\n\n this.addPost(this.state);\n /**\n * {\n * postResponse: {\n * bucket: \"your-bucket\",\n * etag : \"9f620878e06d28774406017480a59fd4\",\n * key: \"uploads/image.png\",\n * location: \"https://your-bucket.s3.amazonaws.com/uploads%2Fimage.png\"\n * }\n * }\n */\n });\n });\n }", "title": "" }, { "docid": "ceff889c14bdf79a792fb279061cd141", "score": "0.554273", "text": "async function generateUrl() {\n let date = new Date()\n let id = parseInt(Math.random() * 10000000000)\n\n const imageName = `${id}${date.getTime()}.jpg`\n\n const params = ({\n Bucket: bucketName,\n Key: imageName,\n Expires: 300, //ms\n ContentType: 'image/jpeg'\n })\n\n const uploadUrl = await s3.getSignedUrlPromise('putObject', params)\n\n return uploadUrl\n}", "title": "" }, { "docid": "b9c4ef89905e942b708aa1cbf2e39047", "score": "0.5538212", "text": "function makeSignedRequest (method, url, data, success, error) {\n\tvar oAuthHeader = createOAuthHeader(method, url, data);\n\n\tforge.request.ajax({\n\t\ttype: method,\n\t\turl: url,\n\t\theaders: {\n\t\t\t'Authorization': oAuthHeader\n\t\t},\n\t\tdata: data,\n\t\tsuccess: function (res) {\n\t\t\tforge.logging.info(res);\n\t\t\tsuccess && success(res);\n\t\t},\n\t\terror: function (err) {\n\t\t\tforge.logging.error(err);\n\t\t\terror && error(error);\n\t\t}\n\t});\n\t\n}", "title": "" }, { "docid": "503fae4d715655dc3f76cf10eeb32a6a", "score": "0.5526511", "text": "function uploadFile(file, key) {\n var fd = new FormData();\n fd.append('key', key);\n fd.append('acl', 'public-read'); \n fd.append('Content-Type', file.type); \n fd.append('AWSAccessKeyId', 'AKIAJJUYC4EAIF7D2XDQ');\n fd.append('policy', policyBase64)\n fd.append('signature',\"sGRBx76tlCjZ8xTTPZS7wT/q+oQ=\");\n fd.append(\"file\",file);\n\n var xhr = new XMLHttpRequest();\n xhr.open('POST', 'https://exploretasman.s3.amazonaws.com/', true); //MUST BE LAST LINE SO WE CAN SEND \n xhr.send(fd);\n }", "title": "" }, { "docid": "4717c46d6c16e4a1898cbbadb167b316", "score": "0.54538953", "text": "function signAndSendRequest(region, target, body) {\n\n const { amzdate, datestamp } = getDates();\n\n const service = 'dynamodb';\n const host = `${service}.${region}.amazonaws.com`;\n const endpoint = `https://${host}`;\n\n const method = 'POST';\n const canonicalUri = '/';\n const canonicalQuerystring = '';\n const canonicalHeaders = `host:${host}\\n` + `x-amz-date:${amzdate}\\n`;\n const signedHeaders = 'host;x-amz-date';\n const payloadHash = SHA256(body);\n const algorithm = 'AWS4-HMAC-SHA256';\n\n const canonicalRequest = method + '\\n' + canonicalUri + '\\n' + canonicalQuerystring + '\\n' + canonicalHeaders + '\\n' + signedHeaders + '\\n' + payloadHash;\n const credentialScope = datestamp + '/' + region + '/' + service + '/' + 'aws4_request';\n const stringToSign = algorithm + '\\n' + amzdate + '\\n' + credentialScope + '\\n' + SHA256(canonicalRequest);\n\n const signingKey = getSignatureKey(secretKey, datestamp, region, service);\n const signature = HmacSHA256(stringToSign, signingKey);\n\n const authorizationHeader = algorithm + ' ' + 'Credential=' + accessKey + '/' + credentialScope + ', ' + 'SignedHeaders=' + signedHeaders + ', ' + 'Signature=' + signature;\n\n const params = {\n method: method,\n headers: {\n 'Accept-Encoding': 'identity',\n \"Content-Type\": \"application/x-amz-json-1.0\",\n 'Authorization': authorizationHeader,\n 'X-Amz-Date': amzdate,\n 'X-Amz-Target': `DynamoDB_20120810.${target}`\n },\n body: body\n };\n\n return fetch(endpoint, params);\n}", "title": "" }, { "docid": "ff1dd1901bdd707743e82db4ecff50b7", "score": "0.5445962", "text": "async function signRequest(ssn, text, initcallback=undefined, statuscallback=undefined) {\n var initresp = await this.initSignRequest(ssn,text);\n return await followRequest(this,initresp,initcallback,statuscallback);\n}", "title": "" }, { "docid": "82a90872e6d54a36ea70a31e9219298e", "score": "0.54409736", "text": "function _sign(network, path, method, data, modifyQueryString, callback){\n\n\t\t// OAUTH SIGNING PROXY\n\t\tvar service = self.services[network],\n\t\t\ttoken = (session ? session.access_token : null);\n\n\t\t// Is self an OAuth1 endpoint\n\t\tvar proxy = ( service.oauth && parseInt(service.oauth.version,10) === 1 ? self.settings.oauth_proxy : null);\n\n\t\tif(proxy){\n\t\t\t// Use the proxy as a path\n\t\t\tcallback( qs(proxy, {\n\t\t\t\tpath : path,\n\t\t\t\taccess_token : token||'',\n\t\t\t\tthen : (method.toLowerCase() === 'get' ? 'redirect' : 'proxy'),\n\t\t\t\tmethod : method,\n\t\t\t\tsuppress_response_codes : true\n\t\t\t}));\n\t\t\treturn;\n\t\t}\n\n\t\tvar _qs = { 'access_token' : token||'' };\n\n\t\tif(modifyQueryString){\n\t\t\tmodifyQueryString(_qs);\n\t\t}\n\n\t\tcallback( qs( path, _qs) );\n\t}", "title": "" }, { "docid": "5d4687cf0a4c58d1403f2636911a23be", "score": "0.5427803", "text": "async function postImageS3(){\n console.log(\"currently selected picture is\")\n console.log(JSON.stringify(myPicture))\n console.log(\"my filename is\")\n console.log(JSON.stringify(myPicture.fileName))\n console.log(\"my data is\")\n console.log(JSON.stringify(myPicture.data))\n\n const result = await Storage.put(\n //react hook constants can be used directly without this.\n myPicture.fileName,\n myPicture.data,\n {\n customPrefix: { public: 'uploads/' },\n //attaching metadata which will be later used to bind this image\n //to our dynamodb\n //metadata: { albumid: this.props.albumId }\n metadata:{albumid:\"some custom meta data\"}\n }\n );\n //a key returned to use by AWS letting us know all went according to plan\n console.log('Uploaded file: ', result);\n }", "title": "" }, { "docid": "c7c8efce20648b6db3724f1695769215", "score": "0.5425675", "text": "async uploadFilesToS3(files, folderPrefix) {\n const urls = await this.getSignedUrlsS3(files, folderPrefix)\n const responseUrls = await Promise.all(\n urls.map(async (item, index) => {\n const response = await this.$axios.put(\n item.presignedUrl,\n files[index]\n )\n if (response.status === 200) {\n const questionIndex = response.config.url.indexOf('?')\n const responseUrl = response.config.url.substring(0, questionIndex)\n return responseUrl\n }\n this.$toast.error('Failed to upload image')\n })\n )\n return responseUrls\n }", "title": "" }, { "docid": "4f294877bfeebf150869559fc38846b3", "score": "0.5424053", "text": "sign(data) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.canSign()) {\n throw new Error('cannot sign: no secret key available');\n }\n\n return tweetnacl_1.default.sign.detached(data, this.privKey);\n });\n }", "title": "" }, { "docid": "a6c1d8c42b520f46740c39fbbf8563ca", "score": "0.539607", "text": "function createSignature(unsignedUrl, secret) {\n\t if (typeof unsignedUrl === \"string\") {\n\t unsignedUrl = new URL(unsignedUrl);\n\t } // Strip off the protocol, scheme, and host portions of the URL, leaving only the path and the query\n\n\n\t var pathAndQuery = \"\" + unsignedUrl.pathname + unsignedUrl.search;\n\t return createSignatureForPathAndQuery(pathAndQuery, secret);\n\t}", "title": "" }, { "docid": "3860899725fdb96057b17de563fc8128", "score": "0.5391501", "text": "async upload() {\n AWS.config.update({ region: process.env.AWS_REGION });\n return new Promise(async (resolve, reject) => {\n if (!this.destinationDir) {\n reject('No bucket provided');\n return;\n }\n\n if (!this.file && !this.fileBuffer) {\n reject('No file provided.');\n return;\n }\n\n try {\n const fileData = await this.getFileData();\n const s3bucket = new AWS.S3({\n params: { Bucket: this.bucket },\n });\n\n const fileInfo = this.getFinalFilePath();\n\n // Create s3 bucket\n s3bucket.createBucket(() => {\n const s3Params = {\n Key: fileInfo.fullPath,\n ContentType: this.getFileType(),\n Body: fileData,\n ACL: 'public-read',\n };\n\n // Upload file\n s3bucket.upload(s3Params, (uploadErr, uploadData) => {\n // Remove temp file\n if (this.file) {\n unlink(this.file.path);\n }\n\n if (uploadErr) {\n return reject(uploadErr);\n }\n\n return resolve({ ...uploadData, file: fileInfo.fileName });\n });\n });\n } catch (e) {\n reject(e);\n }\n });\n }", "title": "" }, { "docid": "50a2d7ebbab1c2724b105d14ab299edb", "score": "0.5380515", "text": "function createS3ObjectTags() {\n \n // addPhoto('featured-necklaces');\n \n var category = document.getElementById(\"id_category\").value;\n var fname = document.getElementById(\"id_fname\").value;\n var itemId = document.getElementById(\"id_itemid\").value;\n var itemPrice = document.getElementById(\"id_itemprice\").value;\n var itemTitle = document.getElementById(\"id_itemtitle\").value;\n var itemShortDesc = document.getElementById(\"id_itemshortdesc\").value;\n var itemLongDesc = document.getElementById(\"id_itemlongdesc\").value;\n var key = category +'/' + fname;\n \n // alert(itemId + itemPrice +key);\n \n var params = {\n Bucket: \"trukreations.com\", \n Key: key, \n Tagging: {\n TagSet: [\n {\n Key: \"itemId\", \n Value: itemId\n },\n {\n Key: \"price\", \n Value: itemPrice\n },\n {\n Key: \"title\", \n Value: itemTitle\n }, \n {\n Key: \"shortDesc\", \n Value: itemShortDesc\n }, \n {\n Key: \"longDesc\", \n Value: itemShortDesc\n }\n \n \n ]\n }\n };\n \n // alert('before object tagging:' +itemId + itemPrice +itemTitle +itemShortDesc +key);\n s3.putObjectTagging(params, function(err, data) {\n if (err) console.log(err, err.stack); // an error occurred\n else { \n console.log('tagging successful'); \n alert('tagging successful')\n \n }\n // successful response\n /*\n data = {\n VersionId: \"null\"\n }\n */\n });\n \n // alert('after object tagging');\n \n \n\n }", "title": "" }, { "docid": "70a21dba7ce7494d650297b7507b3620", "score": "0.5356761", "text": "function putObjectToS3(data) {\n return new Promise((resolve, reject) => {\n $.ajax({\n type: 'PUT',\n data: data.blob,\n url: data.preSignedUrl,\n processData: false,\n contentType: 'video/webm',\n success: (resp) => {\n // If successful, post video url to db\n resolve(data);\n },\n error: () => {\n reject('error uploading to s3');\n },\n });\n });\n}", "title": "" }, { "docid": "c36434ce73acc640f6899af2e1755af7", "score": "0.53427136", "text": "static sign (id) {\n const sub = { id }\n const expiresIn = '30 days'\n return signPromise({ sub }, secret, { expioresIn })\n }", "title": "" }, { "docid": "8c1d34931a53c2d39f1dcdf08b07786a", "score": "0.5337696", "text": "sign(data) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.canSign()) {\n throw new Error('cannot sign: no secret key available');\n }\n return tweetnacl_1.default.sign.detached(data, this.privKey);\n });\n }", "title": "" }, { "docid": "eb056b09170f3d20af931d4a8e1db9e7", "score": "0.5325516", "text": "function getSignedUrl(bucketLogicalName, key) {\n\tconsole.log(\"getSignedURL\", bucketLogicalName, key)\n\tif(bucketLogicalName === \"imageCache\" && !withinTimeFrame()){\n\t\tconsole.log(\"do not update Image Cache\")\n\t\treturn\n\t}\n\tconst params = {\n\t\tdeviceID : config.clientId,\n\t\tbucketLogicalName : bucketLogicalName,\n\t\tkey : key\n\t}\n\tdevice.publish(config.topicGetSignedURL, JSON.stringify(params))\n}", "title": "" }, { "docid": "653d0ef6b2a32f625d28a1e61915e08c", "score": "0.5300347", "text": "function sign() {\r\n\r\n\t\t// Call Web PKI passing the selected certificate, the document's \"toSignHash\" and the digest\r\n\t\t// algorithm to be used during the signature algorithm.\r\n\t\tpki.signHash({\r\n\r\n\t\t\tthumbprint: selectedCertThumbprint,\r\n\t\t\thash: formElements.toSignHashField.val(),\r\n\t\t\tdigestAlgorithm: formElements.digestAlgorithmField.val()\r\n\r\n\t\t}).success(function (signature) {\r\n\r\n\t\t\t// Fill the hidden field \"signatureField\" with the result of the signature algorithm.\r\n\t\t\tformElements.signatureField.val(signature);\r\n\r\n\t\t\t// Fire up the click event of the button \"SubmitSignatureButton\" on form's code-behind\r\n\t\t\t// (server-side).\r\n\t\t\tformElements.submitSignatureButton.click();\r\n\r\n\t\t});\r\n\t}", "title": "" }, { "docid": "905e51a6c431a19b598b419c2eff9f62", "score": "0.5291588", "text": "function _sign(network, path, method, data, modifyQueryString, callback) {\n\n // OAUTH SIGNING PROXY\n var service = self.services[network],\n token = (session ? session.access_token : null);\n\n // Is self an OAuth1 endpoint\n var proxy = (service.oauth && parseInt(service.oauth.version, 10) === 1 ? self.settings.oauth_proxy : null);\n\n if (proxy) {\n // Use the proxy as a path\n callback(utils.qs(proxy, {\n path: path,\n access_token: token || '',\n then: (method.toLowerCase() === 'get' ? 'redirect' : 'proxy'),\n method: method,\n suppress_response_codes: true\n }));\n return;\n }\n\n var qs = {\n 'access_token': token || ''\n };\n\n if (modifyQueryString) {\n modifyQueryString(qs);\n }\n\n callback(utils.qs(path, qs));\n }", "title": "" }, { "docid": "905e51a6c431a19b598b419c2eff9f62", "score": "0.5291588", "text": "function _sign(network, path, method, data, modifyQueryString, callback) {\n\n // OAUTH SIGNING PROXY\n var service = self.services[network],\n token = (session ? session.access_token : null);\n\n // Is self an OAuth1 endpoint\n var proxy = (service.oauth && parseInt(service.oauth.version, 10) === 1 ? self.settings.oauth_proxy : null);\n\n if (proxy) {\n // Use the proxy as a path\n callback(utils.qs(proxy, {\n path: path,\n access_token: token || '',\n then: (method.toLowerCase() === 'get' ? 'redirect' : 'proxy'),\n method: method,\n suppress_response_codes: true\n }));\n return;\n }\n\n var qs = {\n 'access_token': token || ''\n };\n\n if (modifyQueryString) {\n modifyQueryString(qs);\n }\n\n callback(utils.qs(path, qs));\n }", "title": "" }, { "docid": "d5686f94f43595c6447b65fea251c051", "score": "0.52814287", "text": "function storeToS3(env, data, callback){\n callback(new Error(\"Not implemented\"));\n}", "title": "" }, { "docid": "36a7950b215fd5355c84ad21aee604da", "score": "0.5274007", "text": "function getDataFromS3() {\n //const s3 = new AWS.S3();\n let s3Params = {Bucket: bucket, Key: key};\n return new Promise( (resolve, reject) => {\n (new AWS.S3()).getObject(s3Params, (err, data) => {\n if (err) return reject(err);\n resolve(JSON.parse(data.Body.toString('utf-8')));\n });\n });\n}", "title": "" }, { "docid": "6ba6bdc8286e04ced6c5bc94c090d2fc", "score": "0.5263148", "text": "function onRequest(request, response) {\n //GET handling\n // if (request.method == 'GET') { //THIS WILL BE EXECUTED WHEN YOU OPEN THE LOCAL HOST IN THE BROWSER\n // createEmbeddedWithTemplate(options).then(function(signatureId) {\n // geturl(signatureId).then(function(signUrl){\n // console.log(\"Sign url\", signUrl);\n // var prettResponse = JSON.stringify({ 'url': signUrl });\n // response.writeHead(200, {'Content-Type' : 'application/json', 'Access-Control-Allow-Origin' : '*'});\n // response.end(prettResponse);\n\n // }, function(error){\n // console.error(error);\n // });\n\n // }, function(error) {\n // console.error(\"Failed!\", error);\n // });\n // }\n\n if (request.method == \"POST\") {\n //TO MANAGE CALLBACKS (callbacks come as a POST requests)\n //Prepare and send response\n try {\n var responseBody = JSON.stringify({ body: \"\" });\n response.writeHead(200, {\n \"Content-Type\": \"application/json\",\n \"Access-Control-Allow-Origin\": \"*\",\n });\n response.end(responseBody);\n\n //End of prepare and send response\n\n var body = \"\";\n var { headers } = request;\n var signature = headers[\"user-agent\"]; //Extract the 'x-helloworks-signature' header from the request in order to print it for debugging (all headers are represented in lower-case, regardless of how the client sent them)\n console.log(\"User agent \", signature);\n request.on(\"data\", function (data) {\n body += data;\n\n // console.log(body)\n\n // var newBody = data.slice(88, 1604);\n\n // var newBody = JSON.parse(newBody)\n\n // console.log(newBody)\n\n // var test = body.indexOf(\"signature_request_sent\");\n\n // console.log(test)\n\n // if (body.indexOf(\"signature_request_sent\") === 115) {\n // var newBody = data.slice(88, 1604);\n // var newBody = JSON.parse(newBody)\n // const eventType = newBody.event.event_type;\n // const signatureRequestId = newBody.signature_request.signature_request_id;\n // console.log(`Signature request ${signatureRequestId} has been sent.`);\n // } else {\n // console.log(\"You got the worng index\")\n // }\n\n // const eventType = newBody.event.event_type;\n // const signatureRequestId = newBody.signature_request.signature_request_id;\n\n // console.log(\"event for \" + signatureRequestId , \" ----> \" + eventType);\n\n // const data = req.body.json;\n // const events = JSON.parse(data);\n // const eventType = events.event.event_type;\n // const signatureRequestId = events.signature_request.signature_request_id;\n\n // switch (eventType) {\n // case 'signature_request_sent':\n // console.log(`Signature request ${signatureRequestId} has been sent.`);\n // break;\n // case 'signature_request_viewed':\n // console.log(`Signature request ${signatureRequestId} has been viewed.`);\n // break;\n // case 'signature_request_downloadable':\n // console.log(`Signature request ${signatureRequestId} is downloadable.`);\n // break;\n // case 'signature_request_signed':\n // console.log(`Signature request ${signatureRequestId} has been signed.`);\n // break;\n // case 'signature_request_declined':\n // console.log(`Signature request ${signatureRequestId} has been declined.`);\n // break;\n // case 'signature_request_all_signed':\n // console.log(`Signature request ${signatureRequestId} has been fully compelted.`);\n // break;\n\n // default:\n // console.log('');\n // break;\n // }\n });\n return;\n } catch (err) {\n response.writeHead(500, { \"Content-Type\": \"text/plain\" });\n response.write(\"Bad Post Data. Is your data a proper JSON?\\n\");\n response.end();\n return;\n }\n } // End of POST handling\n} // end of OnRequest", "title": "" }, { "docid": "925a52e2f4e825321b7574e4c7de3adb", "score": "0.5237099", "text": "function obtainS3PresignedPutUrlForAddLayer (params, cb) {\n writeStatus(`8. Obtain S3 presigned PUT url for add layer: ${config.sample_file.s3_bucket}/${config.sample_file.s3_add_layer_prefix}`)\n const options = {\n Bucket: config.sample_file.s3_bucket,\n Key: config.sample_file.s3_add_layer_prefix\n }\n S3.getSignedUrl('putObject', options, (err, url) => {\n if (err) {\n return cb(err)\n }\n params.addLayerPutUrl = url\n return cb(null, params)\n })\n}", "title": "" }, { "docid": "2f46ea7ffec4f2afaacab335d890a424", "score": "0.5234012", "text": "async uploadFileToS3Bucket(filepath, debug = false) {\r\n try {\r\n // Create a filestream from a file\r\n console.log(\"upload filepath = \" + filepath);\r\n const fileStream = fs.createReadStream(filepath);\r\n\r\n // Set the uploadParams parameters\r\n const uploadParams = {\r\n Bucket: this.s3_bucket_name,\r\n Key: path.basename(filepath),\r\n Body: fileStream\r\n };\r\n\r\n if(debug) console.log(\"uploadParams = \" + uploadParams);\r\n const data = await this.s3_client.send(new PutObjectCommand(uploadParams));\r\n if (debug) console.log(\"Success\", data);\r\n return data;\r\n } catch(err) {\r\n console.log(\"Error\", err);\r\n }\r\n }", "title": "" }, { "docid": "9979c419b4fceeefbe2bc869372d0f2d", "score": "0.5208678", "text": "function callForgeProcess(s3FilePath,s3FileName,callback)\n{\n\t/**\n\t * Create an access token and run the API calls.\n\t */\n\toAuth2TwoLegged.authenticate().then(function(credentials){\n\t\t\n\t\t\tconsole.log(\"**** Got Credentials\",credentials);\n\t\t\n\t\t\tcreateBucketIfNotExist(BUCKET_KEY).then(\n\t\t\n\t\t\t\tfunction(createBucketRes){ \n\t\t\n\t\t\t\t\tuploadFile(BUCKET_KEY, s3FilePath, s3FileName).then(function(uploadRes){\n \t\t\t\t\t\t\n\t\t\t\t\t\tconsole.log(\"**** Upload file response:\", uploadRes.body); \n\t\t\t\t\t\t//delete the local file in Lambda space\n \t\t\tfs.unlink(s3FilePath); \n \n\t\t\t\t\t\tvar objectId = uploadRes.body.objectId; \n\t\t\t\t\t\t\n\t\t\t\t\t\ttranslateFile(objectId).then(function(transRes){\n \t\t\t\tconsole.log(\"**** Translate file response:\", transRes.body);\n \t\t\t\tcallback(null,transRes.body) ; \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}, defaultHandleError);\n\t\t\n\t\t\t\t\t}, defaultHandleError);\n\t\t\n\t\t\t\t}, defaultHandleError);\n\t\t\n\t\t}, defaultHandleError);\n }", "title": "" }, { "docid": "6420b04aaf1814e947faffadd40988c9", "score": "0.51840353", "text": "function addFile(fileToUpload) {\n\nconsole.log('Adding to S3');\n//should name the image using cognito user's username\n var fileName = myParam+'.jpg';\n \n var fileKey = fileName;\n \n\ts3.upload({\n Key: fileKey,\n Body: fileToUpload,\n\t\n }, function(err, data) {\n if (err) {\n\t\t\n return alert('There was an error uploading your image: ', err.message);\n }\n\tconsole.log('Successfully uploaded image');\n \n \n });\n \n \n \n}", "title": "" }, { "docid": "e0c820ed7237e5b121d6446e955f8f75", "score": "0.5180196", "text": "function Upload_Photos() {\n\tvar S3 = new AWS.S3();\n\tvar current_time = new Date();\n\tfile_key = \"photos/\" + current_time.getUTCFullYear() + \"/\" + (current_time.getUTCMonth() + 1) + \"/\" + current_time.getUTCDate() + \"/\" + randomString(16) + \".\" + file_type;\n\n\tvar params = {\n\t\tBucket: AWS_BUCKET_NAME,\n\t\tKey: file_key,\n\t\tBody: file\n\t};\n\n\tS3.upload(params, function(err, data) {\n\t\tif (err == null) {\n\t\t\tPost_To_ES();\n\t\t} else {\n\t\t\tconsole.log(err);\n\t\t\tvar modal = document.getElementsByClassName(\"modal\");\n\t\t\tmodal[0].style.display = \"none\";\n\t\t\talert(\"Something failure during photo uploading, please try it again later.\");\n\t\t}\n\t});\n}", "title": "" }, { "docid": "5ca09d18ed794d7c9c116f40eff3ec15", "score": "0.5179693", "text": "getImagePresignedurls(fileName) {\n //return this.http.get<any>(`${this.imgBase64File}/${fileName}`, { observe: 'response' });\n return this.http.get(`${this.imgBase64File}/${fileName}`).toPromise();\n }", "title": "" }, { "docid": "fd26ea749e5a86e67f5592cd424d6e58", "score": "0.51784223", "text": "get() {\n\t\tconsole.log(\"CALLING API!\");\n\n\t\tlet awsSignature = new AWSSignature();\n\t\tlet auth_date = new Date().toISOString();\n\n\t\t// DON'T LOOK IT'S PRIVATE!!\n\t\tlet credentials = {\n\t\t\tSecretKey: 'kdeUEfKKZc/yEP4hBd0wxOUugSDSJH0AtEg6Fy44',\n\t\t\tAccessKeyId: 'AKIAJP5ZZJSE2X76LRBQ'\n\t\t};\n\n\t\t// Params MUST be sorted in ASCII order\n\t\tvar params = {\n\t\t\t\"AWSAccessKeyId\": \"AKIAJP5ZZJSE2X76LRBQ\",\n\t\t\t\"AssociateTag\": \"bulkbuybuddie-20\",\n\t\t\t\"Keywords\": \"bottle\",\n\t\t\t\"Operation\": \"ItemSearch\",\n\t\t \"ResponseGroup\": \"Images,ItemAttributes\",\n\t\t \"SearchIndex\": \"All\",\n\t\t\t\"Service\": \"AWSECommerceService\",\n\t\t \"Timestamp\": auth_date\n\t\t}\n\n\t\tvar esc = encodeURIComponent;\n\t\tvar query = Object.keys(params)\n\t\t\t.map(k => esc(k) + '=' + esc(params[k]))\n\t\t\t.join('&')\n\n\t\tconsole.log(\"Sorted query: \", query)\n\n\t\tvar url = 'http://webservices.amazon.com/onca/xml?' + query\n\n\t\tlet auth_header = {\n\t\t\t'Accept': 'application/json',\n\t\t\t'Content-Type': 'application/json',\n\t\t\t'dataType': 'json',\n\t\t\t'X-Amz-Date': auth_date,\n\t\t\t'host': 'webservices.amazon.com'\n\t\t}\n\n\t\tvar auth_options = {\n\t\t\tpath: query,\n\t\t\tmethod: 'GET',\n\t\t\tservice: 'AWSECommerceService',\n\t\t\theaders: {\n\t\t\t\t'X-Amz-Date': auth_date,\n\t\t\t\t'host': 'webservices.amazon.com'\n\t\t\t},\n\t\t\tregion: 'us-east-1',\n\t\t\tbody: '',\n\t\t\tcredentials\n\t\t};\n\n\t\tawsSignature.setParams(auth_options);\n\n\t\tvar authorization = awsSignature.getAuthorizationHeader();\n\t\tvar signature = awsSignature.getSignature();\n\t\tauth_header['Authorization'] = authorization['Authorization']\n\n\t\tlet option = Object.assign({\n\t\t\tmethod: 'GET',\n\t\t\theaders: auth_header\n\t\t});\n\n\t\t// Add signature\n\t\turl = url + '&Signature=' + signature\n\t\t\n\n\t\t//console.log(\"Authorization:\", authorization)\n\t\t//console.log(\"Authorized headers: \", auth_header['Authorization'])\n\t\t//console.log(\"Signature \", auth_header['Signature'])\n\t\tconsole.log(\"My Signature \", signature)\n\n\t\t//Example URL: \"http://webservices.amazon.com/onca/xml?AWSAccessKeyId=AKIAJP5ZZJSE2X76LRBQ&AssociateTag=bulkbuybuddie-20&Keywords=bottle&Operation=ItemSearch&ResponseGroup=Images%2CItemAttributes&SearchIndex=All&Service=AWSECommerceService&Timestamp=2018-01-28T01%3A56%3A30.000Z&Signature=AACszmJo6zyQMGnDNLlOfNYokkFwZqeI5DqbLHrQzS8%3D\"\n\t\t// Confirm url here: http://associates-amazon.s3.amazonaws.com/signed-requests/helper/index.html\n\t\t//return fetch(\"http://webservices.amazon.com/onca/xml?AWSAccessKeyId=AKIAJP5ZZJSE2X76LRBQ&AssociateTag=bulkbuybuddie-20&Keywords=bottle&Operation=ItemSearch&ResponseGroup=Images%2CItemAttributes&SearchIndex=All&Service=AWSECommerceService&Timestamp=2018-01-28T04%3A57%3A08.001Z&Signature=D1gIGIaIIeIxonZFHHSR%2F70Ygt5CAQbuKSJ7wVDbzCw%3D\")\n\t\treturn fetch(url)\n\t\t\t.then(function(data) {\n\t\t\t\tconsole.log(data);\n\t\t\t})\n\t\t\t.catch(function(error) {\n\t\t\t\tconsole.log(error);\n\t\t\t});\t\n\t}", "title": "" }, { "docid": "d1c6a2b68c073516e263bc8785f4066b", "score": "0.5177671", "text": "function processRecord(record, callback) { \n\t console.log('yyy'+process.env.FORGE_CLIENT_SECRET);\n\t\n // The source bucket and source key are part of the event data\n\tconsole.log(record);\n\n\t//get bucket name\n\tvar srcBucket = record.s3.bucket.name;\n\t//get object name\n var srcKey = decodeURIComponent(record.s3.object.key.replace(/\\+/g, \" \"));\n \n var s3 = createS3();\n var getParams = {Bucket: srcBucket, Key: srcKey}; \n\t\n\t//writing the S3 object to Lambda local space\n var wstream = require('fs').createWriteStream('/tmp/'+srcKey);\n \n s3.getObject(getParams)\n .on('error', function (err) {\n console.log('s3.getObject error:' + err);\n callback(null,'s3.getObject error:' + err);\n })\n .on('httpData', function (chunk) {\n //console.log('s3.getObject httpData'); \n wstream.write(chunk);\n })\n .on('httpDone', function () {\n console.log('s3.getObject httpDone:'); \n console.log('sending to Forge translation'); \n \n\t\twstream.end(); \n\t\tcallForgeProcess('/tmp/'+srcKey,srcKey,callback); \n })\n .send(); \n}", "title": "" }, { "docid": "e275584f1f6cfb21c5f18c460fac7e87", "score": "0.5177314", "text": "uploadSnapshot(snapshotHash, callback) {\n s3.getObjectTagging({\n Bucket,\n Key: snapshotHash + '/dataset_description.json'\n }, (err, data) => {\n\n // check if snapshot is already complete on s3\n let snapshotExists = false;\n if (data && data.TagSet) {\n for (let tag of data.TagSet) {\n if (tag.Key === 'DatasetComplete' && tag.Value === 'true') snapshotExists = true;\n }\n }\n\n if (snapshotExists) {\n callback();\n } else {\n let dirPath = config.location + '/persistent/datasets/' + snapshotHash;\n files.getFiles(dirPath, (files) => {\n async.each(files, (filePath, cb) => {\n let remotePath = filePath.slice((config.location + '/persistent/datasets/').length);\n this.queue.push({\n function: this.uploadFile,\n arguments: [\n filePath,\n remotePath\n ],\n callback: cb\n });\n }, () => {\n // tag upload as complete\n s3.putObjectTagging({\n Bucket,\n Key: snapshotHash + '/dataset_description.json',\n Tagging: {\n TagSet: [\n {\n Key: 'DatasetComplete',\n Value: 'true'\n }\n ]\n }\n }, () => {\n callback();\n });\n });\n });\n }\n });\n }", "title": "" }, { "docid": "535054718d6a246fa68caeaadab0b2d3", "score": "0.5170769", "text": "sign() {\n const web3 = this.props.web3;\n const userAddress = this.props.account;\n\n // create next block\n const now = new Date();\n let newContent = {\n timestamp: now.toUTCString()\n };\n\n const previousBlock = this.state.data[this.state.data.length - 1];\n if (previousBlock) {\n newContent.item = previousBlock.content.item;\n newContent.previousSignature = previousBlock.signature;\n } else {\n newContent.item = this.state.seed.item;\n newContent.previousSignature = this.state.seed.previousSignature;\n }\n\n // prepare the data for signing\n const contentAsHex = ethUtil.bufferToHex(\n new Buffer(JSON.stringify(newContent), 'utf8')\n );\n\n // sign message\n web3.currentProvider.sendAsync(\n {\n method: 'personal_sign',\n params: [contentAsHex, userAddress],\n from: userAddress\n },\n (err, result) => {\n if (err) return console.error(err);\n if (result.error) {\n return this.setState({\n alert: true,\n error: 'User denied signature.'\n });\n }\n\n const element = {\n content: newContent,\n signature: result.result\n };\n\n return this.setState({\n data: [...this.state.data, element]\n });\n }\n );\n }", "title": "" }, { "docid": "ff6b1b2fa2bec1c4ce6d7dccaf329e78", "score": "0.5165381", "text": "sign(data) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!this.canSign()) {\n throw new Error('cannot sign: no secret key available');\n }\n\n return naclFast.sign.detached(data, this.privKey);\n });\n }", "title": "" }, { "docid": "fc32486fc5a1ef3efce8b96d821646f0", "score": "0.51622534", "text": "function uploadClientSignature(contractId, hash, signature) {\n\n $.post({\n url: \"/blockchain/contracts/\"+contractId+\"/sign/client\",\n data: JSON.stringify({\n hash,\n signature\n }),\n dataType: 'json',\n contentType: 'application/json',\n success(response) {\n console.log(response);\n },\n error(jqXHR, status, err) {\n console.log(jqXHR);\n console.log(status);\n console.log(err);\n }\n });\n}", "title": "" }, { "docid": "590cd473e9312c81f478c347eb8ea2f8", "score": "0.5158613", "text": "async function main() {\n\ttry {\n\t\tpresignedGETURL = await generatePresignedUrl();\n\t\tlet data = await downloadFile(presignedGETURL);\n\t\tlet file = await writeFile(data);\n\t\tconsole.log(\"file..>\", file)\n\t\treturn \"done\";\n\t} catch (err) {\n\n\t\tconsole.log(\"err caught due to...>\", err)\n\t}\n\n}", "title": "" }, { "docid": "08158c2af56066371b7401f9b44c2624", "score": "0.51533437", "text": "function uploadImage(file)\r\n{\r\n\t/*\r\n\t\tIncoming:\r\n\t\t{\r\n\t\t\tfile : file object\r\n\t\t}\r\n\r\n\t\tOutgoing:\r\n\t\t{\r\n\t\t\tsuccess : bool,\r\n\t\t\turi : string\r\n\t\t}\r\n\t*/\r\n\r\n\tconst BUCKET_URI = 'https://browniepointsbucket.s3.us-east-2.amazonaws.com/';\r\n\r\n\tvar returnPackage = {\r\n\t\tsuccess : false,\r\n\t\turi : ''\r\n\t};\r\n\r\n\tconst accessInfo = {\r\n\t\taccessKeyId : process.env.REACT_APP_AWS_ACCESS_ID,\r\n\t\tsecretAccessKey : process.env.REACT_APP_AWS_SECRET_KEY\r\n\t};\r\n\r\n\tconst bucketInfo = {\r\n\t\tparams: {\r\n\t\t\tBucket: 'browniepointsbucket'\r\n\t\t},\r\n\r\n\t\tregion: 'us-east-2'\r\n\t}\r\n\r\n\t// configure the access data for the bucket\r\n\tAWS.config.update(accessInfo);\r\n\tconst bucket = new AWS.S3(bucketInfo);\r\n\r\n\t// get file prefix type\r\n\tvar suffix = '';\r\n\tvar type = '';\r\n\r\n\t// check if jpeg\r\n\tif (file.type === 'image/jpeg')\r\n\t{\r\n\t\tsuffix = '.jpg';\r\n\t\ttype = 'image/jpeg';\r\n\t}\r\n\r\n\t// check if png\r\n\telse if (file.type === 'image/png')\r\n\t{\r\n\t\tsuffix = '.png';\r\n\t\ttype = 'image/png';\r\n\t}\r\n\r\n\telse\r\n\t{\r\n\t\treturnPackage.error = 'Invalid file';\r\n\t\treturn returnPackage;\r\n\t}\r\n\r\n\t// generate a unique filename\r\n\tvar date = new Date();\r\n\tvar filename = date.getFullYear() + '-' + date.getDay() + '-' + date.getMonth() + '_' + date.getTime() + suffix;\r\n\r\n\t// generate a new file with the new name\r\n\tvar blob = file.slice(0, file.size, type);\r\n\tfile = new File([blob], filename, {type : type});\r\n\t// var progress = 0;\r\n\r\n\tconst params = {\r\n\t\tACL: 'public-read',\r\n Key: file.name,\r\n ContentType: file.type,\r\n Body: file,\r\n\t};\r\n\r\n\tbucket.putObject(params)\r\n\t\t.on('httpUploadProgress', () => {\r\n\t\t\t// // that's how you can keep track of your upload progress\r\n\t\t\t// progress = Math.round((evt.loaded / evt.total) * 100)\r\n\t\t\t})\r\n\t\t.send((err) => {\r\n\t\t\t// Error handling (if any)\r\n\t\t});\r\n\r\n\treturnPackage.success = true;\r\n\treturnPackage.uri = (BUCKET_URI + filename);\r\n\r\n\treturn returnPackage;\r\n}", "title": "" }, { "docid": "111e8ba4c3f05c363edb7249f8a75c62", "score": "0.51453733", "text": "function getSignedSignature(secretAccessKey, encodedSignature) {\n let signed = CryptoJS.HmacSHA1(encodedSignature, secretAccessKey);\n return signed.toString(CryptoJS.enc.Base64);\n}", "title": "" }, { "docid": "990958c1fec03a12708494b5e00435ed", "score": "0.5132508", "text": "moveUploadedFile(file, destinationFilename) {\n return new Promise((resolve, reject) => {\n const localUploadDirectory = this.config.get('app.localUploadDirectory');\n const bucket = this.config.get('aws.uploadBucket');\n\n const s3 = new AWS.S3();\n const params = {\n Bucket: bucket,\n Body : _.get(file, 'data'),\n Key : destinationFilename,\n ACL: 'public-read'\n };\n console.log(\"Uploading to s3...\");\n s3.upload(params, function (err, data) {\n if (err) {\n console.log(\"Error uploading to s3\", err);\n return reject(err);\n }\n\n if (data) {\n console.log(\"Uploaded in:\", data.Location);\n resolve(data.Location);\n }\n else{\n console.log('aws upload - no data!');\n resolve(\"\")\n }\n });\n })\n }", "title": "" }, { "docid": "13e361920db5c3e6867e2d11b0ddd7fa", "score": "0.51216334", "text": "async function createRedirectURL() {\r\n return new Promise(async function (resolve, reject) {\r\n console.log('createRedirectURL()')\r\n //create scopes\r\n var scopes = [\r\n 'ugc-image-upload',\r\n 'user-read-playback-state',\r\n 'user-modify-playback-state',\r\n 'user-read-currently-playing',\r\n 'streaming',\r\n 'app-remote-control',\r\n 'user-read-email',\r\n 'user-read-private',\r\n 'playlist-read-collaborative',\r\n 'playlist-modify-public',\r\n 'playlist-read-private',\r\n 'playlist-modify-private',\r\n 'user-library-modify',\r\n 'user-library-read',\r\n 'user-top-read',\r\n 'user-read-playback-position',\r\n 'user-read-recently-played',\r\n 'user-follow-read',\r\n 'user-follow-modify'\r\n ];\r\n //get spotify app\r\n let spotifyApp = spotifyApps[`Popularify-app1`]\r\n //get url\r\n var state = 'some-state'\r\n var showDialog = true;\r\n var responseType = 'code';\r\n \r\n scopes=['user-read-private', 'user-read-email']\r\n\r\n let url = spotifyApp.createAuthorizeURL(\r\n scopes,\r\n state,\r\n showDialog,\r\n responseType\r\n\r\n //response_type: 'code',\r\n //client_id: client_id,\r\n //scope: scope,\r\n //redirect_uri: redirect_uri,\r\n //state: state\r\n );\r\n\r\n \r\n\r\n //return url\r\n resolve(url);\r\n })\r\n}", "title": "" }, { "docid": "c7fb4faef1a7a94799b17de3f68aaf9e", "score": "0.5107555", "text": "uploadImagefileAWSS3(fileuploadurl, base64Data) {\n let binaryBuf = this.base64ToArrayBuffer(base64Data);\n //return this.http.put<any>(fileuploadurl, binaryBuf, { observe: 'response' })\n return this.http.put(fileuploadurl, binaryBuf).toPromise();\n }", "title": "" }, { "docid": "92efe13a93ef32314e953426cdd3c344", "score": "0.5091542", "text": "function batchSignPartsUpload (req, res, next) {\n const client = getS3Client(req, res)\n if (!client) return\n\n const { uploadId } = req.params\n const { key, partNumbers } = req.query\n\n if (typeof key !== 'string') {\n res.status(400).json({ error: 's3: the object key must be passed as a query parameter. For example: \"?key=abc.jpg\"' })\n return\n }\n\n if (typeof partNumbers !== 'string') {\n res.status(400).json({ error: 's3: the part numbers must be passed as a comma separated query parameter. For example: \"?partNumbers=4,6,7,21\"' })\n return\n }\n\n const partNumbersArray = partNumbers.split(',')\n if (!partNumbersArray.every((partNumber) => parseInt(partNumber, 10))) {\n res.status(400).json({ error: 's3: the part numbers must be a number between 1 and 10000.' })\n return\n }\n\n const bucket = getBucket(req)\n\n Promise.all(\n partNumbersArray.map((partNumber) => {\n return getSignedUrl(client, new UploadPartCommand({\n Bucket: bucket,\n Key: key,\n UploadId: uploadId,\n PartNumber: Number(partNumber),\n Body: '',\n }), { expiresIn: config.expires })\n }),\n ).then((urls) => {\n const presignedUrls = Object.create(null)\n for (let index = 0; index < partNumbersArray.length; index++) {\n presignedUrls[partNumbersArray[index]] = urls[index]\n }\n res.json({ presignedUrls })\n }).catch(next)\n }", "title": "" }, { "docid": "40013bad1b1e509305ff948677e808ea", "score": "0.5087755", "text": "function putObjPromise(data, name, filetype) {\n const bucket = new AWS.S3();\n const params = {\n Body: data,\n Bucket: 'bucketofanimals',\n Key: name + '.' + filetype, \n };\n return new Promise((resolve, reject) => {\n console.log(\"Putting an image to S3\");\n bucket.putObject(params, (err, response) =>{\n if(err) reject(err);\n else resolve(response);\n });\n });\n}", "title": "" }, { "docid": "9e266aeb932992a33acf59dc9b018d64", "score": "0.5076462", "text": "function auth(){\n\tvar params1= {\n Bucket: \"daycarecenterchildren\"\n };\n s3.listObjects(params1, function(err, data) {\n if (err) console.log(err, err.stack); // an error occurred\n else {\n var t = JSON.stringify(data.Key); \n\tvar imgs = data.Contents.map(function(res){\n\t\t var fileKey = res.Key;\n\t\tvar lastchar = fileKey.charAt(fileKey.length-1)\n\t\t if(lastchar != '/' && fileKey.includes(myParam+'/')) {\n\t\t\timages+=fileKey +','\n\t\t\timageList.push(fileKey);\n\t\t }\n\t});\n\tvar newStr = images.slice(0, -1);\n\t\n authenticate(newStr);\n\t }\n });\n \n \n}", "title": "" }, { "docid": "51d311628c5b8327914f63c9eaacb3b4", "score": "0.50699025", "text": "signRequest(webResource) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.shouldSetToken()) {\n return new msrest.TokenCredentials(yield this.getToken()).signRequest(webResource);\n }\n return webResource;\n });\n }", "title": "" }, { "docid": "a5cd7d95d38fae277c6777301dbd0ada", "score": "0.5069005", "text": "sign(payload) {\n return JWS.sign(payload, this.signKey, {\n alg: 'RS256',\n kid: 's1',\n });\n }", "title": "" }, { "docid": "47e57de42ea00afceeca93bcb1dc8c1b", "score": "0.5067085", "text": "function saveDataToS3(todos) {\n return new Promise( (resolve, reject) => {\n let s3Params = {Bucket: bucket, Key: key, Body: JSON.stringify(todos), ContentType: 'application/json'}; // set ContentType to open file direclty in browser, when using S3 console (without it, file is saved to computer, then need to open it)\n (new AWS.S3()).putObject(s3Params, (err, data) => {\n if (err) return reject(err);\n resolve();\n });\n });\n}", "title": "" }, { "docid": "7bad0b06e932cd6d299f7bbcc2336546", "score": "0.5060822", "text": "async getFileFromS3ToInstance(key, debug = false) {\r\n try {\r\n\r\n const bucketParams = {\r\n Bucket: this.s3_bucket_name,\r\n Key: key,\r\n };\r\n\r\n // Create a helper function to convert a ReadableStream to a string.\r\n const streamToString = (stream) =>\r\n new Promise((resolve, reject) => {\r\n const chunks = [];\r\n stream.on(\"data\", (chunk) => chunks.push(chunk));\r\n stream.on(\"error\", reject);\r\n stream.on(\"end\", () => resolve(Buffer.concat(chunks).toString(\"utf8\")));\r\n });\r\n\r\n // Get the object} from the Amazon S3 bucket. It is returned as a ReadableStream.\r\n const data = await this.s3_client.send(new GetObjectCommand(bucketParams));\r\n console.log(data);\r\n\r\n // Convert the ReadableStream to a string.\r\n const bodyContents = await streamToString(data.Body);\r\n console.log(bodyContents);\r\n\r\n } catch(err) {\r\n console.log(\"Error\", err);\r\n }\r\n }", "title": "" }, { "docid": "8fced71554e7386bb4d9b98a98a71672", "score": "0.50602335", "text": "sign(data: any): Promise<string> {\n return RSA.signWithAlgorithm(JSON.stringify(data), this.key, \"SHA256withRSA\");\n }", "title": "" }, { "docid": "77ac1593e7073cc1509b81f71eac4714", "score": "0.5054793", "text": "function main(bucketName = 'my-bucket', fileName = 'test.txt') {\n // [START storage_generate_signed_post_policy_v4]\n /**\n * TODO(developer): Uncomment the following lines before running the sample.\n */\n // The ID of your GCS bucket\n // const bucketName = 'your-unique-bucket-name';\n\n // The ID of your GCS file\n // const fileName = 'your-file-name';\n\n // Imports the Google Cloud client library\n const {Storage} = require('@google-cloud/storage');\n\n // Creates a client\n const storage = new Storage();\n\n async function generateV4SignedPolicy() {\n const bucket = storage.bucket(bucketName);\n const file = bucket.file(fileName);\n\n // These options will allow temporary uploading of a file\n // through an HTML form.\n const expires = Date.now() + 10 * 60 * 1000; // 10 minutes\n const options = {\n expires,\n fields: {'x-goog-meta-test': 'data'},\n };\n\n // Get a v4 signed policy for uploading file\n const [response] = await file.generateSignedPostPolicyV4(options);\n\n // Create an HTML form with the provided policy\n let output = `<form action=\"${response.url}\" method=\"POST\" enctype=\"multipart/form-data\">\\n`;\n // Include all fields returned in the HTML form as they're required\n for (const name of Object.keys(response.fields)) {\n const value = response.fields[name];\n output += ` <input name=\"${name}\" value=\"${value}\" type=\"hidden\"/>\\n`;\n }\n output += ' <input type=\"file\" name=\"file\"/><br />\\n';\n output += ' <input type=\"submit\" value=\"Upload File\"/><br />\\n';\n output += '</form>';\n\n console.log(output);\n }\n\n generateV4SignedPolicy().catch(console.error);\n // [END storage_generate_signed_post_policy_v4]\n}", "title": "" }, { "docid": "a855484c1d1205eb4418e3b697aea629", "score": "0.50508773", "text": "makeSignedUrl(routeIdentifier, params, options) {\n const normalizedOptions = helpers_2.normalizeMakeSignedUrlOptions(params, options);\n const builder = normalizedOptions.domain\n ? this.builderForDomain(normalizedOptions.domain)\n : this.builder();\n normalizedOptions.params && builder.params(normalizedOptions.params);\n normalizedOptions.qs && builder.qs(normalizedOptions.qs);\n normalizedOptions.prefixUrl && builder.prefixUrl(normalizedOptions.prefixUrl);\n return builder.makeSigned(routeIdentifier, normalizedOptions);\n }", "title": "" }, { "docid": "94523dc8557326d12b991ddeafc05d25", "score": "0.504674", "text": "function sign() {\n\n\t\t// Call signHash() on the Web PKI component passing the \"to-sign-hash\", the digest\n\t\t// algorithm and the certificate selected by the user.\n\t\tpki.signHash({\n\t\t\tthumbprint: formElements.certThumbField.val(),\n\t\t\thash: formElements.toSignHashField.val(),\n\t\t\tdigestAlgorithm: formElements.digestAlgorithmField.val()\n\t\t}).success(function (signature) {\n\n\t\t\t// Submit form to complete the signature on server-side.\n\t\t\tformElements.signatureField.val(signature);\n\t\t\tformElements.form.submit();\n\n\t\t});\n\t}", "title": "" }, { "docid": "31f6cf174baf3370680151fb9e16fbb7", "score": "0.5043603", "text": "createPostPhotoFromUrl(user, postId, photoUrl) {\n let promise = new Promise((resolve, reject) => {\n // first save the file to google cloud storage\n uploadPostUrlToGCS(user.uid, postId, photoUrl).then(storageObject => {\n let publicURL = storageObject.publicURL;\n console.log(publicURL);\n let gcsObjectName = storageObject.gcsObjectName;\n //now save photo\n db.Photo.create({\n PostId: postId,\n url: publicURL,\n active: true,\n fileName: gcsObjectName\n }).then(photo => {\n resolve(photo);\n }).catch(err => {\n reject(err);\n });\n }).catch(err => {\n reject(err);\n });\n });\n\n return promise;\n }", "title": "" }, { "docid": "2fbca97049af84b40d0e45ceb91935b3", "score": "0.50383264", "text": "function getUploadParameters (req, res, next) {\n const client = getS3Client(req, res)\n if (!client) return\n\n const bucket = getBucket(req)\n\n const metadata = req.query.metadata || {}\n const key = config.getKey(req, req.query.filename, metadata)\n if (typeof key !== 'string') {\n res.status(500).json({ error: 'S3 uploads are misconfigured: filename returned from `getKey` must be a string' })\n return\n }\n\n const fields = {\n success_action_status: '201',\n 'content-type': req.query.type,\n }\n\n if (config.acl != null) fields.acl = config.acl\n\n Object.keys(metadata).forEach((metadataKey) => {\n fields[`x-amz-meta-${metadataKey}`] = metadata[metadataKey]\n })\n\n createPresignedPost(client, {\n Bucket: bucket,\n Expires: config.expires,\n Fields: fields,\n Conditions: config.conditions,\n Key: key,\n }).then(data => {\n res.json({\n method: 'post', // TODO: switch to the uppercase 'POST' in the next major\n url: data.url,\n fields: data.fields,\n expires: config.expires,\n })\n }, next)\n }", "title": "" }, { "docid": "fc54f03a72bb3066e9d7289d3b680fc7", "score": "0.50275016", "text": "async create_object_upload(params, object_sdk) {\n dbg.log0('NamespaceS3.create_object_upload:', this.bucket, inspect(params));\n await this._prepare_sts_client();\n\n const Tagging = params.tagging && params.tagging.map(tag => tag.key + '=' + tag.value).join('&');\n /** @type {AWS.S3.CreateMultipartUploadRequest} */\n const request = {\n Bucket: this.bucket,\n Key: params.key,\n ContentType: params.content_type,\n StorageClass: params.storage_class,\n Metadata: params.xattr,\n Tagging\n };\n this._assign_encryption_to_request(params, request);\n const res = await this.s3.createMultipartUpload(request).promise();\n\n dbg.log0('NamespaceS3.create_object_upload:', this.bucket, inspect(params), 'res', inspect(res));\n return { obj_id: res.UploadId };\n }", "title": "" }, { "docid": "f5fcb56dad03146a71ead636f463cad2", "score": "0.5027486", "text": "signItems ({ state, getters, commit }) {\n\t\tlet keypair = getters.currentKey\n\t\tif (!keypair)\n\t\t\treturn\n\n\t\tlet getSignature = (message, secretKey) => {\n\t\t\tlet keys = Object.keys(message).sort()\n\t\t\tlet serializeValue = (v) => {\n\t\t\t\tif (!v && v !== 0)\n\t\t\t\t\treturn '/'\n\t\t\t\tif (Array.isArray(v)) {\n\t\t\t\t\treturn v.join(' ')\n\t\t\t\t}\n\t\t\t\treturn v.toString().replace(/[\\n\\r]/g, '')\n\t\t\t}\n\t\t\tlet serialized = keys.map(k => k + ': ' + serializeValue(message[k])).join('\\n')\n\n\t\t\tlet messageHash = nacl.hash(stringToBytes(serialized))\n\t\t\treturn nacl.sign.detached(messageHash, secretKey)\n\t\t}\n \n\t\tlet now = new Date() // This can easily be faked\n\n\t\tlet promises = state.messages.map(message => {\n\t\t\tlet raw_message = {\n\t\t\t\t...message,\n\t\t\t\tkey: [message.name].concat(message.key),\n\t\t\t\tdatetime: now.toISOString()\n\t\t\t}\n \n\t\t\tlet params = {\n\t\t\t\tpublic_key: encodeBase64(keypair.publicKey),\n\t\t\t\tsignature: encodeBase64(getSignature(raw_message, keypair.secretKey)),\n\t\t\t\tmessage: raw_message\n\t\t\t}\n\t\t\treturn axios.post(PUBLIC_URL + '/messages', params)\n\t\t})\n\n\t\treturn new Promise((resolve, reject) => {\n\t\t\taxios.all(promises).then(() => {\n\t\t\t\tcommit('setItems', [])\n\t\t\t\tstate.signDialogVisible = false\n\t\t\t\tlet event = new CustomEvent('liquio-sign-done')\n\t\t\t\twindow.dispatchEvent(event)\n\t\t\t\tresolve()\n\t\t\t}).catch(error => {\n\t\t\t\tthrow error\n\t\t\t})\n\t\t})\n\t}", "title": "" }, { "docid": "2ac971a0e3341cca31d0eee35401c2df", "score": "0.5024336", "text": "function signUrl(unsignedUrl, secret) {\n\t if (typeof unsignedUrl === \"string\") {\n\t unsignedUrl = new URL(unsignedUrl);\n\t }\n\n\t return new URL(unsignedUrl.toString() + \"&signature=\" + createSignature(unsignedUrl, secret));\n\t}", "title": "" }, { "docid": "e784115b9aaa14a39a8483e082242b9d", "score": "0.50017583", "text": "sign(req, res, next) {\n next()\n }", "title": "" }, { "docid": "fda3e4b5e1586a41f2732fb52293a9eb", "score": "0.4997112", "text": "function uploadPic() {\r\n\t//TODO Toshi cleanup\r\n\tAddToPreferences(\"Moon\");\r\n\tAddToPreferences(\"Airplane\");\r\n\tAddToPreferences(\"Burger\");\r\n\tconsole.log(preferences_list);\r\n\r\n\tvar bucketName = 'snapsnus2';\r\n\tvar bucket = new AWS.S3({\r\n\t\tparams : {\r\n\t\t\tBucket : bucketName\r\n\t\t}\r\n\t});\r\n\r\n\tvar fileChooser = document.getElementById('file-chooser');\r\n\tvar button = document.getElementById('upload-button');\r\n\tvar file = fileChooser.files[0];\r\n\r\n\tif (file) {\r\n\r\n\t\tvar objKey = useremail + '/' + file.name;\r\n\t\tconsole.log(objKey);\r\n\t\tvar params = {\r\n\t\t\tKey : objKey,\r\n\t\t\tContentType : file.type,\r\n\t\t\tBody : file,\r\n\t\t\tACL : 'public-read'\r\n\t\t};\r\n\r\n\t\tbucket.putObject(params, function(err, data) {\r\n\t\t\tif (err) {\r\n\t\t\t\tconsole.log(err);\r\n\t\t\t} else {\r\n\t\t\t\talert(\"Image uploaded successfully!\");\r\n\t\t\t\tlocation.reload();\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\talert('Nothing to upload.');\r\n\t\tlocation.reload();\r\n\t}\r\n\r\n\t$('#modaldialog').hide();\r\n\r\n}", "title": "" }, { "docid": "9732777335e962b14f9cb646ca59e31f", "score": "0.4996669", "text": "function flickrapi_getsignedurl (endpoint, secret, args)\n{\n var url = endpoint;\n var extra = secret;\n\n args.sort();\n\n if (args.length > 0) {\n for (i = 0; i < args.length; ++i) {\n if (i == 0) { url = url + \"?\"; }\n else { url = url + \"&\"; }\n url = url + args[i][0] + \"=\" + args[i][1];\n extra = extra + args[i][0] + args[i][1];\n }\n\t\tAjxPackage.require(\"Crypt\");\n extra = AjxMD5.hex_md5(extra);\n url = url + \"&api_sig=\" + extra;\n }\n\n return url;\n}", "title": "" }, { "docid": "109a5f3696b887c6554a89c615715932", "score": "0.49725285", "text": "async function doIt(_privateKey, _rawTx) {\n var tx = new Tx(_rawTx);\n tx.sign(_privateKey) // Here we sign the transaction with the private key\n .then(result => { return result.serialize() }) // Clean things up a bit\n .then(result => { console.log('Serialized Tx: ' + result); web3.eth.sendSignedTransaction(result.toString('hex')) })\n .on('receipt',console.log(\"Transaction receipt: \", result))\n .catch(err => { console.error(err) });\n}", "title": "" }, { "docid": "c0f72e14e5e6221a044e2315b2ccb35c", "score": "0.49532038", "text": "async function startSignRequestHashed() {\n const result = await aergoConnectCall('SIGN', 'AERGO_SIGN_RESULT', {\n hash: document.getElementById('signMessage').value\n });\n document.getElementById('signature').value = result.signature;\n}", "title": "" }, { "docid": "16b36162c0840f6111a489f1eb5ee0ab", "score": "0.4949872", "text": "getpresignedurls(fileName) {\n return this.http.get(`${this.generateURL}/${fileName}`, { observe: 'response' });\n }", "title": "" }, { "docid": "3542faeb312976f0e09660a5af6a88e6", "score": "0.49403125", "text": "function getObject (data) {\n return new Promise((resolve, reject) => {\n S3.getObject({\n Bucket: data.Records[0].s3.bucket.name,\n Key: data.Records[0].s3.object.key\n }, (err, res) => {\n if (err) return reject(err);\n data.Body = new Buffer(res.Body);\n resolve(data);\n });\n });\n}", "title": "" }, { "docid": "e751e905cf49bd2cc0ef047df4d0069c", "score": "0.49331692", "text": "request (req, q) {\n return new Promise((resolve, reject) => {\n /* Generate the timestamp for the url encryption */\n const ts = new Date().getTime()\n\n /* The main request api */\n const api = req.api\n\n /* The credentials from the root of the client */\n const credentials = this.credentials\n\n /* Actual scope for the request object */\n const query = q\n\n /* Method for the request */\n const method = query.url.method\n\n // If Content type is presented, use it.\n if ('contentType' in query.url) {\n this.contentType = query.url.contentType\n }\n\n /*\n *| Merge all of the path propeties together into a valid url\n */\n let path = `${Object.values(query.url.path).join('/')}`\n\n /*\n *| Create the base URI for the request.\n *| Query parameters and other data for the request\n *| are added to the request later.\n */\n const uri = `https://${this.host}${api.version}${api.endpoint}${path}`\n\n /* Build complete URL for the request. Needs to be signed for the signature. */\n const urlForSigning = this.generateSignatureUrl(uri, query)\n\n /* Build the complete string for the signature */\n const dataToSign = `${credentials.consumerId}\\n${urlForSigning}\\n${method}\\n${ts}\\n`\n\n /* Generage the signature */\n console.log(dataToSign)\n const signature = this.sign(credentials.privateKey, dataToSign)\n\n /* Request Headers */\n const headers = {\n 'WM_SVC.NAME': this.appName,\n 'WM_CONSUMER.ID': credentials.consumerId,\n 'WM_SEC.TIMESTAMP': ts,\n 'WM_SEC.AUTH_SIGNATURE': signature,\n 'WM_QOS.CORRELATION_ID': credentials.correlationId,\n 'WM_CONSUMER.CHANNEL.TYPE': credentials.channelType,\n 'content-type': this.contentType\n }\n\n /* Create request options object */\n const options = {\n url: uri,\n host: this.host,\n headers,\n method\n }\n\n /* If a query is present, add it to the qs key on the request options */\n if ('query' in query.url) {\n options['qs'] = Object.entries(query.url.query).reduce((result, [key, val]) => {\n if (val.value !== null) {\n result[key] = val.value\n }\n return result\n }, {})\n }\n\n /* If a body is passed, add it to the request options */\n if ('body' in query.url) {\n options['body'] = query.url.body\n }\n\n /* Make the request */\n request(options, (error, response, body) => {\n if (error) reject(error)\n resolve(body)\n })\n })\n }", "title": "" }, { "docid": "331001aa0a00a58025d9d997e505a22a", "score": "0.4924249", "text": "function postGrantAccess(fileName, targetPublicKey, ownerPrivateKey) {\n const url = `${BASE_URL}/api/file`;\n return axios.post(url, {\n fileName: fileName,\n targetPublicKey: targetPublicKey,\n ownerPrivateKey: ownerPrivateKey\n }).then(response => {\n const data = response.data;\n return data;\n });\n }", "title": "" }, { "docid": "2ff24706d6be67a5e40cf8fad8a5248b", "score": "0.49182788", "text": "signRequest(webResource) {\n return __awaiter(this, void 0, void 0, function* () {\n const tokenResponse = yield this.getToken();\n webResource.headers.set(ms_rest_js_1.Constants.HeaderConstants.AUTHORIZATION, `${tokenResponse.tokenType} ${tokenResponse.accessToken}`);\n return Promise.resolve(webResource);\n });\n }", "title": "" }, { "docid": "2ff24706d6be67a5e40cf8fad8a5248b", "score": "0.49182788", "text": "signRequest(webResource) {\n return __awaiter(this, void 0, void 0, function* () {\n const tokenResponse = yield this.getToken();\n webResource.headers.set(ms_rest_js_1.Constants.HeaderConstants.AUTHORIZATION, `${tokenResponse.tokenType} ${tokenResponse.accessToken}`);\n return Promise.resolve(webResource);\n });\n }", "title": "" }, { "docid": "be68457f05e5182a9d18187328a7cf52", "score": "0.49091235", "text": "function getObject(params) {\n // currently, accept only one input.\n let s3Location = params.job.data.inputArtifacts[0].location.s3Location;\n let credentials = params.job.data.artifactCredentials;\n\n const s3 = new AWS.S3({\n credentials: new AWS.Credentials(credentials),\n signatureVersion: 'v4'\n });\n return new Promise((resolve, reject) => {\n let s3Params = {\n Bucket: s3Location.bucketName,\n Key: s3Location.objectKey\n }\n console.log(`fetching from S3: s3://${s3Params.Bucket}/${s3Params.Key}`);\n s3.getObject(s3Params, (err, data) => {\n if (err) {\n console.log('getObject failed', err);\n reject(new Error(err));\n } else {\n resolve(_.extend(params, {data: data.Body, s3: s3}));\n }\n });\n });\n}", "title": "" }, { "docid": "3c88ce8f29c72fff059c24e02d4c7d50", "score": "0.49033862", "text": "function _promisifySNS (functionName) {\n return function (...args) {\n return new Promise(function (resolve, reject) {\n if (!accessKeyId || !secretAccessKey) {\n reject(new Error('Missing SNS config'))\n }\n sns[functionName](...args, function (err, data) {\n if (err) {\n logger.debug(`Error sending to SNS: ${err}`)\n reject(err)\n } else resolve(data)\n })\n })\n }\n}", "title": "" } ]
e455f65ce2b74d9ca17e75e668625cca
Show History Cleaner Provider
[ { "docid": "4420dddaaf34d7b7730b0d6d83bfbdb3", "score": "0.5423292", "text": "function showHistoryProviders () {\n document.getElementById('ShowtHistoryProvider').style.display = 'block';\n}", "title": "" } ]
[ { "docid": "956c3eac1189179fabf55219b01a4c90", "score": "0.5965881", "text": "function showHistory() {\n\n\n\t// Populate the history list from localstorage.\n\tlet arrCities = getHistory();\n\n\tarrCities.forEach(function (city) {\n\n\t\t// Add a new li to the list.\n\t\t// First create the new li, add classes and text.\n\t\tlet newLI = $(\"<li>\")\n\t\tnewLI.addClass(\"list-group-item d-flex align-items-left history-item\");\n\t\tnewLI.text(city);\n\n\t\t// Add the search and remove buttons to the li.\n\t\tnewLI.append(`<button class=\"btn btn-sm btn-primary ml-auto hist-search\">Search</button>`);\n\t\tnewLI.append(`<button class=\"btn btn-sm btn-danger ml-2 hist-remove\">Remove</button>`);\n\n\t\t// Append the new history entry to the list.\n\t\t$(\"#historyList\").append(newLI);\n\n\t})\n\n\t// If there are entries to show, also show the remove all button.\n\tif (arrCities.length > 0) {\n\t\t$(\"#btnRemoveAll\").show();\n\t}\n\n\t// Show/hide the right screens.\n\t$(strCurrentDisplay).hide();\n\tstrPreviousDisplay = strCurrentDisplay;\n\t$(\"#historyDisplay\").show();\n\tstrCurrentDisplay = \"#historyDisplay\";\n\n\t// Change the button appearance.\n\t$(\"#historyBtn\").removeClass(\"btn-primary\");\n\t$(\"#historyBtn\").addClass(\"btn-warning\");\n\n\n}", "title": "" }, { "docid": "d1004b04c7abc2d484c7064e7b7552bb", "score": "0.5679653", "text": "function hideHistory() {\n\n\n\t$(strCurrentDisplay).hide();\n\t$(strPreviousDisplay).show();\n\tstrCurrentDisplay = strPreviousDisplay;\n\n\t// Change the button appearance.\n\t$(\"#historyBtn\").removeClass(\"btn-warning\");\n\t$(\"#historyBtn\").addClass(\"btn-primary\");\n\n\t// Remove items from the history ul.\n\t$(\".history-item\").remove();\n\n\n}", "title": "" }, { "docid": "ed30f613fcd58538a636a9b6f24ff6a0", "score": "0.5543733", "text": "function displayHistory() {\n $(\"#history\").empty();\n for (var i = 0; i < history.length; i++) {\n var a = $(\"<button>\");\n a.addClass(\"btn btn-outline-secondary historyBtn\");\n a.attr(\"data-city\", history[i]);\n a.text(history[i]);\n $(\"#history\").prepend(a);\n }\n }", "title": "" }, { "docid": "e1f6c8c4b4d0a8c6d270425a8067275f", "score": "0.5528211", "text": "function generateHistory() {\n // if there is not already one, create the cityHistory array\n const cityHistory = JSON.parse(localStorage.getItem('cityHistory')) || [];\n // targets the history div\n const historyList = document.getElementById('historyDiv');\n // Limits the history list to 8 items\n cityHistory.splice(8);\n // Print search history to page\n historyList.innerHTML = cityHistory\n // Create list elements for each history item\n .map(cityHistory => {\n return `<button class=\"cityLink\">${cityHistory}</button>`;\n })\n .join(\"\");\n}", "title": "" }, { "docid": "b9e024f0b6f48a4a1fd1c4bd82acaa09", "score": "0.54560035", "text": "function history(){\r\n var divHist = getId('divHist');\r\n try{\r\n if(divHist){\r\n killId(divHist);\r\n var hL = getId('historyLink');\r\n hL.innerHTML = 'History'; hL.className= 'gootransbutt gootranslink gtlPassive';\r\n hL.title = 'Translation history';\r\n GM_setValue('histShow',false);\r\n return;\r\n }\r\n if(!maxHT) return;\r\n GM_setValue('histShow',true);\r\n\tdivHist = buildEl('div', {id:'divHist'},['click', histLookup], null );\r\n//\t\r\n for(var i=0, l=ht.length; i<l; i++){\r\n var bkg = ht[i][0].indexOf(' ')>0 ? ' goohistlink' : '';\r\n addEl(divHist,'a', {href:HREF_NO, 'class': 'gootranslink'+bkg, 'titel': ht[i][1]+\r\n ((ht[i][3]>1) ? '\\u00A0'+ '['+ht[i][3]+']' : '')},\r\n null, ht[i][0]);\r\n if(i < l-1)\r\n divHist.appendChild(document.createTextNode(' '));\r\n }\r\n\t//addEl(divHist,'span',null,null,'<br>&nbsp;');\r\n if(getId('divSourceshow'))\r\n insAfter(divHist,getId('divSourceshow'));\r\n else\r\n insAfter(divHist,getId('divResult'));\r\n hL=getId('historyLink')\r\n// hl.textContent = 'X';\r\n hL.title= 'Hide history';\r\n hL.innerHTML = 'History'; hL.className = 'gootransbutt gootranslink gtlActive';\r\n }catch(e){console.log('hist problem\\n'+e)}\r\n}", "title": "" }, { "docid": "f3185561912e70e6d088568b28d896ee", "score": "0.5435434", "text": "wipeLog() {\n this.input = null;\n this.history = [];\n this.div.innerHTML = '';\n }", "title": "" }, { "docid": "e7d8a36fef0f97d24a383c85b1df1476", "score": "0.5392506", "text": "function fixHistoryView(){\n var length = $('#issue-changesets').nextUntil('#history').length;\n var i = 0;\n while (i < length) {\n $('#history').prev().insertAfter('#history');\n i++;\n }\n }", "title": "" }, { "docid": "c93ab035f0dc9d038be26601a8795c1c", "score": "0.5354892", "text": "function renderHistory(id) {\n\n}", "title": "" }, { "docid": "62bdf74fe0ed0df2e79cf066a0c640d0", "score": "0.5351393", "text": "function displayHistory() {\n historyNav.empty();\n cityTitle.empty();\n historyArray = JSON.parse(localStorage.getItem('cities'));\n // only runs for loop if there is a search to prevent console error\n if (historyArray != null) {\n for (i = 0; i < historyArray.length; i++) {\n const search = $('<button>').text(historyArray[i]);\n search.addClass(\"search rounded my-2 mx-3 text-primary border-primary bg-light shadow font-weight-bold\");\n historyNav.append(search);\n }\n }\n}", "title": "" }, { "docid": "cb563e0d6ddff8191f72d6e5274687b7", "score": "0.5345095", "text": "displayHistory() {\n const cookies = new Cookies();\n let user = cookies.get(\"user\");\n\n return user ? (\n <Nav.Link href=\"/orderhistory\">Purchase History</Nav.Link>\n ) : (\"\");\n }", "title": "" }, { "docid": "43fdb163f01c1dfcbc17986ca3e3d514", "score": "0.5340301", "text": "function renderTheHistory() {\n var searchingHistory = $(\"#previous-searches\");\n searchingHistory.empty();\n searchListHistory.forEach((city) => {\n var btn = $(\"<button>\").addClass(historyBtnBsClasses);\n btn.attr(historyDataCityAttr, city);\n btn.text(city);\n searchingHistory.append(btn);\n });\n}", "title": "" }, { "docid": "a1868a77f72aaf11682dc37779285f10", "score": "0.5326597", "text": "getHistoryAsServiceProvider() {\n const href = `${_environments_environment__WEBPACK_IMPORTED_MODULE_3__[\"environment\"].api.workOffers}/service-provider/history`;\n return this.http.get(href).pipe(\n // TODO\n );\n }", "title": "" }, { "docid": "a4a95dcc63deab5be8ede066df26ba6e", "score": "0.53237337", "text": "function historyDeleted() {\n}", "title": "" }, { "docid": "8579bd5713c2d75b146b3424530ae1ee", "score": "0.53115505", "text": "function showHistory() {\n if (checkForStorage()) {\n return JSON.parse(localStorage.getItem(CACHE_KEY)) || [];\n } else {\n return [];\n }\n}", "title": "" }, { "docid": "a4a962bc4b3b807f1a6d5b808743c81c", "score": "0.52998894", "text": "getHistory(){\n return this.history;\n }", "title": "" }, { "docid": "06b589b64457207dafe61162979078dc", "score": "0.52966124", "text": "resetHistory() {\n\t\tthis.history.splice(0,this.history.length);\n\t\tthis.history.push('History Cleared');\n\t}", "title": "" }, { "docid": "972b79f2dcf62fa4aa6a36eab1f62ff4", "score": "0.52909356", "text": "function History() {\n this.type = 'History';\n this.past = [];\n this.future = [];\n}", "title": "" }, { "docid": "005d6fcb4abf34db56e63732cf7161dc", "score": "0.52818334", "text": "cleanUpHistory() {\n this._historyExplorer.deleteHistory(1)\n }", "title": "" }, { "docid": "3ee937492a602171edac27982edaad91", "score": "0.5269383", "text": "function displaySearchHistory() {\n\t\t$('.collection').empty();\n\t\t//Get user input data\n\t\tlet city = $('#cityInput').val().trim();\n\t\t//Return early if no city input\n\t\tif (city === '') {\n\t\t\treturn;\n\t\t}\n\t\t//add city input to the start of the array\n\t\tsearchCity.unshift(city);\n\t\t// delete duplication and only keep 4 latest searches\n\t\tsearchCity = searchCity.slice(0, 5).filter(onlyUnique);\n\t\tstoreSearch();\n\t\tdisplayLocalStorage();\n\t}", "title": "" }, { "docid": "b2525ccf87f8f22d74452e639ae0bc3b", "score": "0.52627736", "text": "function showHistory() {\n if (checkForStorage()) {\n return JSON.parse(localStorage.getItem(CACHE_KEY)) || [];\n } else {\n return [];\n }\n}", "title": "" }, { "docid": "611c683d6e294427bc5585d4c219b3aa", "score": "0.5256285", "text": "function renderSearchHistory() {\n var history = JSON.parse(localStorage.getItem(historyStorageKeyName));\n\n if (history === null) {\n history = [];\n history.push('Atlanta');\n localStorage.setItem(historyStorageKeyName, JSON.stringify(history));\n }\n\n $('#city-history').empty();\n\n history.forEach(cityName => {\n var a = $(\"<li>\");\n a.addClass(\"list-group-item\");\n a.attr(\"data-name\", cityName);\n a.text(cityName);\n a.on(\"click\", function(event){\n var cityName = event.target.getAttribute(\"data-name\");\n displayCityWeather(cityName);\n });\n $(\"#city-history\").prepend(a);\n });\n}", "title": "" }, { "docid": "56fd29ffee9c5034e65efc677cbc1467", "score": "0.52560705", "text": "function clearHistory() {\n app.confirm('Are you sure you want to clear all call history?', 'Confirm', function () {\n firebase.database().ref('history/').remove();\n $$('#historylist').html('');\n app.addNotification({ message: \"Cleared History\" });\n });\n}", "title": "" }, { "docid": "99ab801503c35eda8c0139bb5e56df98", "score": "0.5250356", "text": "function getHistory() {\n var past = JSON.parse(localStorage.getItem(\"past\"));\n if (past) {\n pastArray = past;\n buildButton();\n }\n }", "title": "" }, { "docid": "8a38462077a84a70e5102ff1b24a3bc7", "score": "0.52447164", "text": "function buildHistoryList() {\n historyList.empty();\n var history = JSON.parse(localStorage.getItem(\"city\"));\n if (history !== null) {\n searchHistory = history;\n }\n for (i = 0; i < searchHistory.length; i++) {\n historyList.append(\n $(\"<li class='list-group-item'>\").text(searchHistory[i])\n );\n }\n }", "title": "" }, { "docid": "36c04d0a4785f897557fa33affecf999", "score": "0.5238492", "text": "function History(props) {\n return _base.base.react.createElement(_group.Group, {\n label: _language.strings.labelHistory,\n className: \"sanddance-history\"\n }, _base.base.react.createElement(\"ol\", null, props.historyItems.map(function (hi, i) {\n return _base.base.react.createElement(\"li\", {\n key: i,\n className: _sanddanceReact.util.classList(i === props.historyIndex && 'selected'),\n onKeyUp: function onKeyUp(e) {\n if (e.keyCode === _keycodes.KeyCodes.ENTER) {\n props.redo(i);\n }\n },\n onClick: function onClick() {\n return props.redo(i);\n },\n tabIndex: 0\n }, hi.label);\n })));\n}", "title": "" }, { "docid": "4a3cdc38d7d93b010000f71f790fa7ba", "score": "0.522148", "text": "function showHistory(){\r\n var hist = sessionStorage.guess;\r\n document.getElementById(\"sh\").innerHTML = hist + '</br><input type=\"button\" value=\"Hide History\" onclick=\"historyBtn()\" />';\r\n}", "title": "" }, { "docid": "5f61aa4a98ab7cbc77ad8310c83cd2b9", "score": "0.5180727", "text": "function showlog() {\n\tvar log=document.getElementById(\"history_log\")\n\tvar string=\"\"\n\tfor(var key in historydata){\n\t\tstring+=\"\"+historydata[key][\"expression\"]+\"=\"+historydata[key][\"result\"]+\"<br>\"\n\t}\n\tlog.innerHTML=string\n}", "title": "" }, { "docid": "3abfb72aaa1ac76d0c4ffe55c3c4ca72", "score": "0.5165293", "text": "function viewHistoryAll() {\n const $results = getById(\"results\");\n const history = JSON.parse(localStorage.getItem(\"history\")) || false;\n\n destroyHTML(\"results\");\n destroyHTML(\"button-container\");\n destroyHTML(\"results-count\");\n \n if (history) {\n $results.innerHTML = \"<div id='history'><h2 style='margin-bottom: 0.5em;'>Recent Searches</h2></div>\";\n return history.forEach(historyItem => getById(\"history\").insertAdjacentHTML(\"beforeend\", createHistoryMarkup(historyItem.query)));\n }\n\n return $results.insertAdjacentHTML(\"beforeend\", \"<li><p class='init-text text-large'>Looks like you haven't made any searches yet!</p></li>\");\n}", "title": "" }, { "docid": "34e632f648011a4d2eed2464b727e22d", "score": "0.51648647", "text": "clean() {\n this.details.html('');\n this.hovering = null;\n }", "title": "" }, { "docid": "10e1f97b1a1f23d77df5628ea7cf43eb", "score": "0.5157003", "text": "function History() {\n this.time = 0;\n this.done = []; this.undone = [];\n }", "title": "" }, { "docid": "63932269285a3a0280c201427423d143", "score": "0.5141932", "text": "getHistory() {\n return this.history;\n }", "title": "" }, { "docid": "29d151f67f054690b39e5b170bc0ef55", "score": "0.51312894", "text": "function iglooPast () {\n\t//Temporary- overwritten on a new diff load\n\tthis.pageTitle = '';\n\tthis.hist;\n\tthis.histDisplay;\n\tthis.histCont;\n\n\t//Receives info for new diff\n\tvar me = this;\n\tigloo.hookEvent('history', 'new-diff', function (data) {\n\t\tme.pageTitle = data.pageTitle;\n\t\tme.hist = new iglooHist(data.pageTitle);\n\t});\n}", "title": "" }, { "docid": "ecc62c2a4a17404c252fa363b232466f", "score": "0.50767046", "text": "constructor() {\n /**\n * @type {Array}\n */\n this._history = [];\n }", "title": "" }, { "docid": "3ff505ca0d4ec520054df15d6693bf27", "score": "0.5075286", "text": "set history(h) {\n historyInstance = h;\n }", "title": "" }, { "docid": "7903312a3184d9727e203dbfe56e0ae7", "score": "0.50739485", "text": "function displayHistory () {\n $(\"#history\").empty();\n\n for (var i = 0; i < searchHistory.length; i++) {\n $(\"#history\").prepend($(\"<button class='city-history'>\").text(searchHistory[i]));\n }\n}", "title": "" }, { "docid": "8d12f912e0925ad8fe1edab91ebe89a1", "score": "0.5072171", "text": "function displayHistory() {\n $(\".list-group-item\").remove();\n for (let i = 0; i < storedSearches.length; i++) {\n var search = storedSearches[i];\n var searchItem = $(\"<li>\").html(`${search}`);\n $(searchItem).addClass(\"list-group-item\");\n $(\"#searchList\").append(searchItem);\n }\n // ADDING CLICK LISTENER TO HISTORY\n $(\".list-group-item\").on(\"click\", function() {\n reSearch();\n citySearch = $(this).text();\n currentDisplay.hide();\n queryCurrentWeatherURL = `https://api.openweathermap.org/data/2.5/weather?q=${citySearch}&mode=json&units=imperial&appid=${APIKey}`;\n // console.log(citySearch);\n // console.log(queryCurrentWeatherURL);\n queryForecastWeatherURL = `https://api.openweathermap.org/data/2.5/forecast?q=${citySearch}&mode=json&units=imperial&appid=${APIKey}`;\n ajaxCall(queryForecastWeatherURL);\n ajaxCall(queryCurrentWeatherURL);\n });\n}", "title": "" }, { "docid": "8364538de38b5265e098dd808fbb8a72", "score": "0.5070424", "text": "showDetailPageAlternative() {\n /**\n * Event to trigger the view to go to a new hash. Gets handled by the MainApp.\n *\n * @event view:saveHistoryHash\n * @param [e.hash] {String} the hash where the view should go into\n */\n const inputNode = document.getElementById(\"ezh-signinname\");\n inputNode && inputNode.focus();\n this.emit(\"saveHistoryHash\", {hash: \"detail\"});\n return this;\n }", "title": "" }, { "docid": "64b1ca98d2bc61589ddd81a3d2bbbad3", "score": "0.5069991", "text": "function customer_history(user_uid, req, res) {\n pool.query(sql_query.query.display_customer_history, [user_uid], (err, data) => {\n if (err) {\n return res.redirect('/user/' + req.user.username);\n } else {\n\n return res.render('user/history', {\n history_reservations: data.rows,\n user: req.user,\n });\n }\n });\n}", "title": "" }, { "docid": "d2ed67b3fc7ee9b397a16149b0766767", "score": "0.5053227", "text": "function historyFunction() {\n var x = localStorage.getItem(\"circles\");\n console.log(x);\n $( \"#rstentry\" ).show();\n console.log(\"#rstentry\", rstentry);\n}", "title": "" }, { "docid": "1669e2e9eff7bfafa18b56f17153f80a", "score": "0.50435865", "text": "function onShowScheduleDetails() {\n SimileAjax.History.addLengthyAction(\n showScheduleDetails,\n showSchedulePreview,\n \"Show Schedule Details\"\n );\n}", "title": "" }, { "docid": "abbc97215e6648bb154804d9fa77ab61", "score": "0.50300854", "text": "function getHistoryHtml(data){\n // Determine the correct icon to display based on type\n var type = data.type,\n src = 'images/icons/btc.png';\n if(type=='bet'){\n src = 'images/icons/xcp.png';\n } else if(type=='broadcast'){\n src = 'images/icons/broadcast.png';\n } else if(type=='dividend'){\n src = 'images/icons/dividend.png';\n } else if(type=='cancel'){\n src = 'images/icons/cancel.png';\n } else if((type=='send'||type=='order'||type=='issuance') && data.asset!='BTC'){\n src = FW.XCHAIN_API + '/icon/' + String(data.icon).toUpperCase() + '.png';\n } else if(type=='sweep'){\n src = 'images/icons/sweep.png';\n }\n var icon = '<img src=\"' + src + '\"/>';\n // Determine the correct description string to show\n var str = '',\n amt = String(data.quantity).replace('-','');\n if(type=='send'){\n str = (/\\-/.test(data.quantity)) ? 'Sent ' : 'Received ';\n } else if(type=='bet'){\n str = 'Bet ';\n } else if(type=='broadcast'){\n str = 'Counterparty Broadcast';\n } else if(type=='burn'){\n str = 'Burned ';\n } else if(type=='dividend'){\n str = 'Paid Dividend on ';\n } else if(type=='issuance'){\n str = 'Counterparty Issuance';\n } else if(type=='order'){\n str = 'Order - Buy ';\n } else if(type=='cancel'){\n str = 'Cancel Order ';\n } else if(type=='sweep'){\n str = 'Sweep Address ';\n }\n if(type=='send'||type=='bet'||type=='burn'||type=='order')\n str += amt;\n var amount = str;\n // Determine correct class to use\n var cls = data.cls;\n if(type=='send')\n cls += (/\\-/.test(data.quantity)) ? ' history-list-sent' : ' history-list-received';\n if(type=='bet'||type=='burn')\n cls += ' history-list-sent';\n // Determine correct asset name to display (if any)\n var asset = (data.asset) ? data.asset : '';\n var html = '<li class=\"history-list-item ' + cls + '\" txhash=\"' + data.tx + '\" txtype=\"' + type + '\" + asset=\"' + asset + '\">' +\n ' <div class=\"history-list-icon\">' + icon + '</div>' +\n ' <div class=\"history-list-info\">' +\n ' <table width=\"100%\">' +\n ' <tr>' +\n ' <td>' +\n ' <div class=\"history-list-amount\">' + amount + '</div>' +\n ' <div class=\"history-list-asset\">' + asset + '</div>' +\n ' <div class=\"history-list-timestamp\"><span data-livestamp=' + data.timestamp + ' class=\"nowrap\"></span></div>' +\n ' </td>' +\n ' </tr>' +\n ' </table>' +\n ' </div>' +\n '</li>';\n return html;\n}", "title": "" }, { "docid": "cb89d96d11a0748ef6fafb0177e83626", "score": "0.5027571", "text": "render() {\n return (\n <div>\n <h2>History</h2>\n { this.renderReadSnus() }\n </div>\n );\n }", "title": "" }, { "docid": "3a9f06d98b4a6aa22d7295a508e39aee", "score": "0.50269663", "text": "function outputHistory() {\n $(\"#timesOut\").html(\"\");\n for (var i = 0; i < runTimes.times.length; i++) {\n var text = \"<div class=\\\"runtime\\\"><span class=\\\"x\\\" onclick=\\\"removeTime(\" + i + \",\"\n + runTimes.times[i] + \")\\\">x</span> \" + secondsToString(runTimes.times[i]) + \"</div>\";\n $(\"#timesOut\").append(text);\n }\n}", "title": "" }, { "docid": "61c374303a61510b8371e907198110cb", "score": "0.5022314", "text": "function displaySearchHistory() {\n $(\"#search-history\").html(\"\"); // Clear the search history display\n const size = searchHistory.size;\n // Display message if no search history\n if (size === 0) {\n $(\"#search-history\").html(\"No search history at this time...\");\n } else {\n // Display each city in search history\n const ul = $('<ul class=\"list-group\"></ul>')\n for (let i = searchHistory.size - 1; i >= 0; i--) {\n const city = [...searchHistory][i];\n const btn = $(`<button class=\"search btn btn-light\">${city}</button>`);\n btn.click(() => { fetchAndUpdateWeather(city) });\n ul.append(btn);\n }\n $(\"#search-history\").append(ul);\n }\n}", "title": "" }, { "docid": "aed249439c0171e10a71c6629ffef2c8", "score": "0.5016676", "text": "function clearHistory() {\n i=0;\n document.getElementById(\"history\").innerHTML = \"<pre>&nbsp;</pre>\";\n initMap();\n }", "title": "" }, { "docid": "806ce3a2c8dd34587790d3ca7bce5b70", "score": "0.50026846", "text": "function history(event) {\r\n currentTab(event);\r\n item.innerHTML = \"\";\r\n task.innerHTML = `<span class=\"trying\">History Of Deleted Tasks</span>`;\r\n setTimeout(function () {\r\n task.innerHTML = \"\";\r\n }, 2000);\r\n\r\n list2.forEach(function (element) {\r\n {\r\n var complete = \"\";\r\n complete = ` <li> ${element} </li>`;\r\n\r\n item.innerHTML += complete;\r\n }\r\n });\r\n}", "title": "" }, { "docid": "d5dde38c452d24c18089faf0c75b861d", "score": "0.5000067", "text": "function makeHistory(limit) {}", "title": "" }, { "docid": "094fea7e5e59a067d74ae183da6f3bc4", "score": "0.49907055", "text": "function clearHistory() {\n\t\tif (logger) {\n\t\t\tlogger.log(\"clearHistory\", \"History : \" + JSON.stringify(historyStk));\n\t\t}\n\t\thistoryStk = [];\n\t}", "title": "" }, { "docid": "5934277e7e42ebf23a955349ad60b281", "score": "0.49808174", "text": "function History(){\n 'use strict';\n this.history = [{\n passage: null,\n variables: {}\n }];\n}", "title": "" }, { "docid": "714eaaf02a8c31ac1aa4a3eab157a1d0", "score": "0.49779093", "text": "function clearHistory () {\n searchHistory.innerHTML = '';\n teamResultContainer.innerHTML = '';\n teamInfoHeader.classList.add('team-info-header');\n}", "title": "" }, { "docid": "23ff222eb3fc73262825dfc96c52bde8", "score": "0.49691197", "text": "function edit_history() {\n\n // history dialog needs a pointer to the query service\n dialogScope.pastQueries = cwQueryService.getPastQueries();\n dialogScope.select = function(index) {cwQueryService.setCurrentIndex(index);};\n dialogScope.isRowSelected = function(row) {return(row == cwQueryService.getCurrentIndexNumber());};\n dialogScope.isRowMatched = function(row) {return(_.indexOf(historySearchResults,row) > -1);};\n dialogScope.showRow = function(row) {return(historySearchResults.length == 0 || dialogScope.isRowMatched(row));};\n dialogScope.del = function() {cwQueryService.clearCurrentQuery(); updateSearchResults();};\n // disable delete button if search results don't include selected query\n dialogScope.disableDel = function() {return searchInfo.searchText.length > 0 && !dialogScope.isRowMatched(cwQueryService.getCurrentIndexNumber());};\n dialogScope.delAll = function(close) {\n var innerScope = $rootScope.$new(true);\n innerScope.error_title = \"Delete All History\";\n innerScope.error_detail = \"Warning, this will delete the entire query history.\";\n innerScope.showCancel = true;\n\n var promise = $uibModal.open({\n templateUrl: '../_p/ui/query/ui-current/password_dialog/qw_query_error_dialog.html',\n scope: innerScope\n }).result;\n\n promise.then(\n function success() {cwQueryService.clearHistory(); close('ok');});\n\n };\n dialogScope.searchInfo = searchInfo;\n dialogScope.updateSearchResults = updateSearchResults;\n dialogScope.selectNextMatch = selectNextMatch;\n dialogScope.selectPrevMatch = selectPrevMatch;\n\n var subdirectory = '/ui-current';\n\n var promise = $uibModal.open({\n templateUrl: '../_p/ui/query' + subdirectory +\n '/history_dialog/qw_history_dialog.html',\n scope: dialogScope\n }).result;\n\n promise.then(function (result) {\n if (result === 'run') {\n query(false);\n }\n });\n\n // scroll the dialog's table\n $timeout(scrollHistoryToSelected,100);\n\n }", "title": "" }, { "docid": "f9b4bc8eb9be6dcaf5c780306e085f2e", "score": "0.49683172", "text": "function history_undo(){\n\tif(history_past.length < 2)\n\t\treturn;\n\t\n\t//add the currently displayed result to the redo stack\n\tredo_stack.push(history_past.pop());\n\tvar previous = history_past[history_past.length - 1];\n\twriteEverything(previous);\n\t\n\t// enable redobtn\n\tdocument.getElementById(\"redobtn\").disabled = false;\n\tdocument.getElementsByTagName(\"header\")[0].style.gridTemplateColumns = \"50px auto 50px\";\n\t//history exists, enable undobtn\n\tif(history_past.length < 2) {\n\t\tdocument.getElementById(\"undobtn\").disabled = true;\n\t}\n\t\n\t//Hover to scroll long nameplate names\n\t$(function() {\n\t\t$('p#subtitle').each(function(i) {\n\t\t\tif (isEllipsisActive(this))\n\t\t\t\t$(this).addClass('slide');\n\t\t\telse\n\t\t\t\t$(this).removeClass('slide');\n\t\t});\n\t});\n\n\tfunction isEllipsisActive(e) {\n\t\treturn ($(e).innerWidth() < $(e)[0].scrollWidth);\n\t};\n}", "title": "" }, { "docid": "c58e4da60e2144a72a98e00e37522bc9", "score": "0.49658522", "text": "listenerBuildsHistory() {\n this._listenerMessage(this.slackMessageAnalyze.isHistoryMessage, (message) => {\n var repoName = this.slackMessageAnalyze.getRepositoriesNameInMessageFromText(message.text, 'history');\n var nameChannelOrUser = this._getSlackNameChannelOrUserById(message).name;\n\n if (repoName.indexOf('/') > -1) {\n repoName = repoName.replace((this.ciService.username + '/'), '');\n }\n if (repoName) {\n this.ciService.getAllBuildByRepositoryName(repoName).then((builds)=> {\n this.postSlackMessage(this._createMessageFromBuildsArray(builds, (this.ciService.username + '/' + repoName)), 'Build History',\n this.infoColor, null, 'Build History', '', nameChannelOrUser);\n }, ()=> {\n this.postSlackMessage('This repositories doesn\\'t exist', 'Build History',\n this.infoColor, null, 'Build History', '', nameChannelOrUser);\n });\n } else {\n this.postSlackMessage('Maybe you want use the command : \"history username/example-project\" but' +\n ' you forgot to add the repository slug', 'Build History', this.infoColor, null, 'Build History', '', nameChannelOrUser);\n\n }\n });\n }", "title": "" }, { "docid": "3085232506b4ebbb507b6ae515d81e03", "score": "0.4964625", "text": "function paintHistory() {\n var historyElement = document.getElementById(\"history\");\n var displayString = \"\";\n\n for (var i = 0; i < gameHistory.length; i++) {\n displayString +=\n \"<li>\" +\n gameHistory[i].playerMove +\n \" vs \" +\n gameHistory[i].computerMove +\n \"</li>\";\n }\n historyElement.innerHTML = displayString;\n }", "title": "" }, { "docid": "279018830006471b1ad4dd786479dd19", "score": "0.4957108", "text": "function clearHistory() {\n var historyData = $(`#city-history`);\n historyData.remove();\n }", "title": "" }, { "docid": "e627dcdcb90354fbb178df4600687969", "score": "0.49528837", "text": "toString() {\n\t\treturn this.history.join('\\n');\n\t}", "title": "" }, { "docid": "bc4721eb5176e6c6573de142ee1eff63", "score": "0.4943437", "text": "function renderSearchHistory() {\n SEARCH_HISTORY_DIV.empty()\n for (let i = 0; i < searchHistory.length; i++) {\n const searchHistoryItem = $('<p>').addClass(\"searchHistoryItem p-3 mb-2 bg-light text-dark border border-primary\");\n searchHistoryItem.text(searchHistory[i]);\n SEARCH_HISTORY_DIV.prepend(searchHistoryItem);\n }\n}", "title": "" }, { "docid": "8586e8a65642c29f95e2eb4c63d27058", "score": "0.49370807", "text": "function displayPastSearches() {}", "title": "" }, { "docid": "3cbea590a3051c1477cc712376b5da02", "score": "0.49363336", "text": "isHistory(value) {\n return (0,is_plain_object__WEBPACK_IMPORTED_MODULE_2__.default)(value) && Array.isArray(value.redos) && Array.isArray(value.undos) && (value.redos.length === 0 || slate__WEBPACK_IMPORTED_MODULE_6__.Operation.isOperationList(value.redos[0])) && (value.undos.length === 0 || slate__WEBPACK_IMPORTED_MODULE_6__.Operation.isOperationList(value.undos[0]));\n }", "title": "" }, { "docid": "1489a4573209789a093e7362c921faa4", "score": "0.49331504", "text": "function addHistory(text) {\r\n var li = $(\"<li>\").addClass(\"list-group-item\").text(text);\r\n $(\".history\").append(li)\r\n }", "title": "" }, { "docid": "738ab1fe49429ce00b493b621bbc7d90", "score": "0.4920496", "text": "function renderHistory() {\n var inputs = JSON.parse(localStorage.getItem(\"userInput\"));\n if(inputs != null){\n\n for (var i = 0; i < inputs.length; i++) {\n var input = inputs[i];\n var [city, state] = input.split(\", \");\n var b = $(\"<button>\");\n b.attr(\"data-city\", city);\n b.attr(\"data-state\", state);\n b.addClass(\"search-button\");\n b.text(input);\n // Appended <br> to create a new line between buttons\n $(\"#displaySearchHistory\").append(\"<br>\");\n $(\"#displaySearchHistory\").append(b);\n }\n }\n \n}", "title": "" }, { "docid": "58b05da8ada070b03f64977e6ceafbd2", "score": "0.49148187", "text": "function showChangeLog () {\n\n // Clear update highlights and remember that the user viewed this.\n if ($('#ctb-settings-link').data('updated')) {\n store('changesViewedFor', $('#ctb-settings-link').data('updated'));\n $('#ctb-settings-link').css({\n background: '',\n color: ''\n }).data('updated', null);\n }\n\n if ($('#ctb-changes-dialog').length === 0) {\n let title = (typeof GM_info === 'undefined' ? '' : ` (${GM_info.script.version})`);\n let devmsg = title.includes('dev') ? ' <b>You\\'re using a development version, you won\\'t receive release updates until you reinstall from the StackApps page again.</b>' : '';\n $('body').append(\n `<div id=\"ctb-changes-dialog\" title=\"Chat Top Bar Change Log${title}\"><div class=\"ctb-important\">For details see <a href=\"${URL_UPDATES}\">the StackApps page</a>!${devmsg}</div><ul id=\"ctb-changes-list\">` +\n '<li class=\"ctb-version-item\">1.11<li><ul>' +\n '<li>Chat room search contains selector for room tab (all, mine, favorites).' +\n '<li>Default search sort order is now by people, with option to use activity instead.' +\n '<li><span>ChatTopBar.setSearchByActivity</span> to change sort order option.</ul>' +\n '<li class=\"ctb-version-item\">1.10<li><ul>' +\n '<li>Search for chat rooms from the top bar! Click the chat icon near the left. Supports search-as-you-type (can be disabled), and optionally ' +\n 'lets you open rooms in the current tab. Try it! Check settings dialog for new options.' +\n '<li><span>ChatTopBar</span> new functions for search options.' +\n '<li>Cleaner list styling in the change log dialog.</ul>' +\n '<li class=\"ctb-version-item\">1.09<li><ul>' +\n '<li>Clicking site search box in SE dropdown no longer closes dropdown.' +\n '<li>Also, search box didn\\'t work, anyways. Now it does.' +\n '<li>Mousewheel over-scrolling on topbar dropdowns no longer scrolls chat.</ul>' +\n '<li class=\"ctb-version-item\">1.08<li><ul>' +\n '<li>Chat server links placed in SE dropdown (click name to open in new tab, \"switch\" to open in current tab).' +\n '<li>Clicking \"switch\" on chat server link automatically rejoins favorite rooms (can be disabled in settings).' +\n '<li>Brightness setting is now associated with the current room\\'s theme rather than the room itself (so it applies to all rooms with the same theme). ' +\n 'Apologies for any reset settings (it does make a good attempt to copy them, though).' +\n '<li>Change log now displayed after update (when flashing \"topbar\" link clicked).' +\n '<li><span>ChatTopBar.showChangeLog()</span> will always show the change log, too.' +\n '<li><span>ChatTopBar</span> functions for additional settings added.' +\n '<li>Don\\'t load jQuery UI if it\\'s already loaded.' +\n '<li>Don\\'t run in iframes (by default), for compatibility with some other scripts. <span>ChatTopBar.setRunInFrame()</span> can control this.' +\n '<li>Don\\'t run in mobile chat layout, for compatibility with some other scripts..</ul>' +\n '<li class=\"ctb-version-item\">1.07<li><ul>' +\n '<li>Settings dialog (accessible from \"topbar\" link in footer).' +\n '<li>Wide mode now matches right side padding instead of fixed at 95%.' +\n '<li>More descriptive search box placeholders.' +\n '<li><span>ChatTopBar.forgetEverything</span>, for testing.</ul>' +\n '<li class=\"ctb-version-item\">1.06<li><ul>' +\n '<li>Brightness now only applied if theme enabled.' +\n '<li>Sidebar resized so it doesn\\'t hide behind the bottom panel.' +\n '<li><span>ChatTopBar.fakeUnreadCounts(inbox,rep)</span> for debugging.' +\n '<li>Explicit <span>unsafeWindow</span> grant.' +\n '<li>Sort output of <span>dumpSettings()</span>.</ul>' +\n '<li class=\"ctb-version-item\">1.05<li><ul>' +\n '<li>Per-room icon/text brightness option.' +\n '<li>Option to suppress console output.' +\n '<li>Ability to dump settings to console for testing.' +\n '<li>Fixed a style bug where things were happening before CSS was loaded, was sometimes causing non-themed topbar to have a white background instead of black.</ul>' +\n '<li class=\"ctb-version-item\">1.03<li><ul>' +\n '<li><span>ChatTopBar</span> console interface for setting options.' +\n '<li>Widen / theme options now user-settable.' +\n '<li>Ability to forget cached account ID for testing.</ul>' +\n '<li class=\"ctb-version-item\">1.02<li><ul>' +\n '<li>WebSocket reconnect when connection lost.' +\n '<li>Beta code for themed topbar.' +\n '<li>Better console logging.</ul>' +\n '<li class=\"ctb-version-item\">1.01<li><ul>' +\n '<li>Realtime event handling via websocket.</ul>' +\n '<li class=\"ctb-version-item\">1.00<li><ul>' +\n '<li>Initial version.</ul>' +\n '</ul></div>');\n $('.ctb-version-item, .ctb-important').css({'margin-top': '1.5ex', 'font-size': '120%'});\n $('.ctb-version-item').css({'font-weight': 'bold'});\n $('#ctb-changes-list ul').css('margin-left', '2ex');\n $('#ctb-changes-list span').css({'font-family': 'monospace', 'color': '#666'});\n $('#ctb-changes-list ul li').each(function(_, li) {\n let item = $(li);\n let html = item.html();\n item\n .text('')\n .css('display', 'flex')\n .css('margin-top', '0.25ex')\n .append($('<div>•</div>').css('margin-right', '0.75ex'))\n .append($('<div/>').html(html));\n });\n }\n\n $('#ctb-changes-dialog').dialog({\n appendTo: '.topbar',\n show: 100,\n hide: 100,\n autoOpen: true,\n width: 500,\n height: 300,\n resizable: true,\n draggable: true,\n modal: true,\n classes: {\n 'ui-dialog': 'topbar-dialog',\n 'ui-dialog-content': '',\n 'ui-dialog-buttonpane': '',\n 'ui-dialog-titlebar': '',\n 'ui-dialog-titlebar-close': '',\n 'ui-dialog-title': ''\n }\n });\n\n }", "title": "" }, { "docid": "7463bcb20565f28d8d4e9341202a8dd2", "score": "0.4913927", "text": "isHistoryEditor(value) {\n return History.isHistory(value.history) && slate__WEBPACK_IMPORTED_MODULE_6__.Editor.isEditor(value);\n }", "title": "" }, { "docid": "b2bacea72e0b46039ff2dae0dad1ff12", "score": "0.4909267", "text": "function showHistoItem(id, author, quote) {\n\t\tlet languageActive = false\n\t\tenableDisableLanguage(languageActive)\n\t\tdisplayResult()\n\t\tdisableSave()\n\t\tclearCuoteForm()\n\t\thideWelcome()\n\n\t\t// if the quote section is hiden, close the history section\n\t\tif (document.querySelector(`#quote-stion`).classList.contains(`hide`)) {\n\t\t\tcloseHisto()\n\t\t}\n\n\t\tgenerateBtn.classList.remove(`btnActive`)\n\t\tgenerateBtn.classList.add(`btnInactive`)\n\t\tcreateyoursBtn.classList.remove(`btnActive`)\n\t\tcreateyoursBtn.classList.add(`btnInactive`)\n\n\t\t// display the content of the saved quote \n\t\tdocument.querySelector(`#quoteText`).classList.remove(`hide`)\n\t\tdocument.querySelector(`#insertQuote`).innerHTML = quote\n\t\tdocument.querySelector(`.q-open`).innerHTML = `\"`\n\t\tdocument.querySelector(`.q-close`).innerHTML = `\"`\n\t\tdocument.querySelector(`.cite`).innerHTML = author\n\n\t}", "title": "" }, { "docid": "717d65c16fadd93c91342f85aa443c2d", "score": "0.4900307", "text": "function backToTranslationHistoryWindow() {\n jQuery(commonConstants.TRANSLATION_COMPARE_HISTORY_GRID).hide();\n jQuery(commonConstants.TRANSLATION_HISTORY_GRID_DIV_ID).show();\n jQuery(commonConstants.BACK_TO_TRANSLATION_HISTORY_BUTTON_DIV_ID).hide();\n}", "title": "" }, { "docid": "d6ea2cdc6b92db4ebea816bf74018cef", "score": "0.48967674", "text": "function removeLastHistory() {\n\n var defer = $q.defer();\n\n sidebarHistory.pop();\n\n //resolve the options\n defer.resolve('removed state from history');\n\n return defer.promise;\n }", "title": "" }, { "docid": "a284671a89affd299336a52f23968015", "score": "0.4875823", "text": "function viewBackFromOther() {\n\tlogInfo('Back search debt');\n}", "title": "" }, { "docid": "c0c9e285f5142bfefd469b6353a38dfb", "score": "0.487522", "text": "function historyReplay(historyName){\n fillUserInput(historyName);\n album_list.innerHTML = \"\";\n callDeezerApi('artist', 'artistData', over());\n}", "title": "" }, { "docid": "260f3985c6dbab85eca59bc54df2889d", "score": "0.48746294", "text": "function clearHistory(){\n\thist = [];\n}", "title": "" }, { "docid": "74f0586682714118f0ee3488b3767b74", "score": "0.48647112", "text": "function loadHistory() {\n let searchHist = JSON.parse(localStorage.getItem('storedArr'));\n if(!searchHist) {\n return;\n } else {\n list.empty();\n for (i = 0; i < searchHist.length; i++) {\n let listItem = searchHist[i];\n let listDisplay = $('<li>');\n list.prepend(listDisplay.text(listItem));\n };\n };\n}", "title": "" }, { "docid": "c35933fc025339fa0647e07e4f923e6b", "score": "0.48606688", "text": "redoHistory() {\n if (!this.regions_info.ready) return;\n\n this.regions_info.history.redoHistory();\n }", "title": "" }, { "docid": "d01989561c9b179f384a79c3191ea8d3", "score": "0.4857238", "text": "function displayHistory(searchTerm) {\n var listItemEl = document.createElement(\"li\");\n\n listItemEl.className = \"list-group-item historyItem\";\n listItemEl.textContent = searchTerm;\n\n searchListEl.prepend(listItemEl);\n}", "title": "" }, { "docid": "cad2f5596d6bbf75ac75ebde67d15bf8", "score": "0.48501337", "text": "function writeCityHistory(cities){\n $('.history').html(\"\");\n for(city of cities){\n $('.history').append(`<li class=\"list-group-item\"> <a class=\"his\" id=\"cityHis\" href=\"#\">${city}</a></li>`);\n }\n }", "title": "" }, { "docid": "3a273e52e16c52d9b5c20aec660d40e7", "score": "0.48467147", "text": "function showChangeLog () {\n\n // Clear update highlights and remember that the user viewed this.\n if ($('#ctb-settings-link').data('updated')) {\n store('changesViewedFor', $('#ctb-settings-link').data('updated'));\n $('#ctb-settings-link').css({\n background: '',\n color: ''\n }).data('updated', null);\n }\n\n if ($('#ctb-changes-dialog').length === 0) {\n let title = (typeof tbData.scriptVersion === 'undefined' ? '' : ` (${tbData.scriptVersion})`);\n let devmsg = title.includes('dev') ? ' <b>You\\'re using a development version, you won\\'t receive release updates until you reinstall from the StackApps page again.</b>' : '';\n $('body').append(`<div id=\"ctb-changes-dialog\" title=\"Chat Top Bar Change Log${title}\">` +\n `<div class=\"ctb-important\">For details see <a href=\"${URL_UPDATES}\">the StackApps page</a>!${devmsg}</div>${CHANGE_LOG_HTML}</div>`);\n $('.ctb-version-item, .ctb-important').css({'margin-top': '1.5ex', 'font-size': '120%'});\n $('.ctb-version-item').css({'font-weight': 'bold'});\n $('#ctb-changes-list ul').css('margin-left', '2ex');\n $('#ctb-changes-list span').css({'font-family': 'monospace', 'color': '#666'});\n $('#ctb-changes-list ul li').each(function(_, li) {\n let item = $(li);\n let html = item.html();\n item\n .text('')\n .css('display', 'flex')\n .css('margin-top', '0.25ex')\n .append($('<div>•</div>').css('margin-right', '0.75ex'))\n .append($('<div/>').html(html));\n });\n blockOverscrollEvents($('#ctb-changes-dialog'), true);\n }\n\n $('#ctb-changes-dialog').dialog({\n appendTo: '.topbar',\n show: 100,\n hide: 100,\n autoOpen: true,\n width: 500,\n height: 300,\n resizable: true,\n draggable: true,\n modal: true,\n classes: {\n 'ui-dialog': 'topbar-dialog',\n 'ui-dialog-content': '',\n 'ui-dialog-buttonpane': '',\n 'ui-dialog-titlebar': '',\n 'ui-dialog-titlebar-close': '',\n 'ui-dialog-title': ''\n }\n });\n\n }", "title": "" }, { "docid": "9995bcb795bcd49e8da3f3a52472891e", "score": "0.48447976", "text": "showReportedSettings() {}", "title": "" }, { "docid": "64a59e96946e03a9ce2200239ac33052", "score": "0.4843854", "text": "function displayHistory(url_array) {\n console.log('event : displayHistory');\n for (var i = 0; i < url_array.length; i++) {\n $('<p/>', {\n text: url_array[i]\n }).appendTo('#results');\n }\n}", "title": "" }, { "docid": "c7e3c8eb6908b460f7459cf26d382d4d", "score": "0.48437512", "text": "onNotify(){\n\t\tif (this.history.current >= 0)\n\t\t\tthis.section.querySelector('.undo').classList.add('active');\n\t\telse\n\t\t\tthis.section.querySelector('.undo').classList.remove('active');\n\n\t\tif (this.history.current < this.app.canvas.history.strokesList.length-1)\n\t\t\tthis.section.querySelector('.redo').classList.add('active');\n\t\telse\n\t\t\tthis.section.querySelector('.redo').classList.remove('active');\n\t}", "title": "" }, { "docid": "db138ed677f32be9c20bc6578f55f102", "score": "0.48332727", "text": "function History() {\n this.time = 0;\n this.done = []; this.undone = [];\n this.compound = 0;\n this.closed = false;\n }", "title": "" }, { "docid": "db138ed677f32be9c20bc6578f55f102", "score": "0.48332727", "text": "function History() {\n this.time = 0;\n this.done = []; this.undone = [];\n this.compound = 0;\n this.closed = false;\n }", "title": "" }, { "docid": "db138ed677f32be9c20bc6578f55f102", "score": "0.48332727", "text": "function History() {\n this.time = 0;\n this.done = []; this.undone = [];\n this.compound = 0;\n this.closed = false;\n }", "title": "" }, { "docid": "ecb550a7ce7184dc8a142f3499d8bd37", "score": "0.48296002", "text": "getHistory() {\n return this.state.history.slice(0, this.state.stepNumber + 1);\n }", "title": "" }, { "docid": "93e9ed06bfcd8fbb3d970db3ceb0f89e", "score": "0.48271257", "text": "historyPush() {\n editor.data.history.push([...editor.data.shadesArray])\n editor.data.reverseHistory = []\n if (editor.data.history.length > 16) {\n editor.data.history = editor.data.history.slice(-16)\n }\n }", "title": "" }, { "docid": "67753f77fe9c0b1b99a974c76b4b2d02", "score": "0.48240876", "text": "function renderSearchHistory(cityList) {\n $(historyListEl).empty();\n // checks for objects in array and then adds to list\n for (var i = 0; i < cityList.length; i++) {\n var searchHistoryItem = $('<li>');\n searchHistoryItem.addClass(\"list-group-item list-group-item-action\");\n searchHistoryItem.text(cityList[i]);\n $(historyListEl).prepend(searchHistoryItem);\n };\n renderClearBtn(cityList)\n}", "title": "" }, { "docid": "f7a34a85fdd92c529f194ca53de23815", "score": "0.48194012", "text": "get relevantHistory() {\n\t\treturn this.__relevantHistory;\n\t}", "title": "" }, { "docid": "5cf247fec24348593106649f14699d67", "score": "0.48179668", "text": "function THistoryPoint() \n\t\t{\n\t\t\tthis.author = 'Milok Zbrozek (milokz [doggy] gmail.com)';\n\t\t\tthis.type = 'THistoryPoint';\n\t\t\tthis.history = [];\n\t\t\tthis.history_line = false;\n\t\t\tthis.history_name = 'HistoryPointTail_'+Math.random();\n\t\t\tthis.clear_next = false;\n\t\t}", "title": "" }, { "docid": "90d108caed9332e00d39975b87ce508d", "score": "0.48174858", "text": "function pullSearchHistory() {\n if (localStorage.getItem(\"searchHistory\")) {\n searchHistory = JSON.parse(localStorage.getItem(\"searchHistory\"))\n for (var i = 0; i < searchHistory.length; i++) {\n let pastSearchButton = $(\"<button type='button' class='btn mb-1 col-10 past-search'>\");\n pastSearchButton.text(searchHistory[i]);\n searchHitstoyEl.prepend(pastSearchButton);\n }\n // createClearButton();\n }\n }", "title": "" }, { "docid": "624199006c85253c70fe68ac72ad613e", "score": "0.48155534", "text": "function StatsHistory() {\n (0, _classCallCheck3.default)(this, StatsHistory);\n\n this.history = [];\n }", "title": "" }, { "docid": "cc9896566d4f77705adff5e2a76e16c9", "score": "0.48095727", "text": "function renderSearchHistory() {\n historyEl.innerHTML = \"\";\n for (let i=0; i<searchHistory.length; i++) {\n const historyItem = $(\"<input>\").attr(\"type\", \"text\").attr(\"readonly\", true);\n $(historyItem).attr(\"class\", \"form-control d-block bg-white\").attr(\"value\", searchHistory[i]);\n $(historyItem).on(\"click\", function() {\n currentForecast(historyItem.value);\n weeklyForecast(historyItem.value);\n });\n historyEl.append(historyItem);\n }\n }", "title": "" }, { "docid": "577ba277261f8c700f43b588a9c94877", "score": "0.48095113", "text": "getHistoryAsClient() {\n const href = `${_environments_environment__WEBPACK_IMPORTED_MODULE_3__[\"environment\"].api.workOffers}/client/history`;\n return this.http.get(href).pipe(\n // TODO\n );\n }", "title": "" }, { "docid": "10537d226f9561adc09fd6f22a12e17b", "score": "0.48024005", "text": "function buildClientHistoryModal() {\n\t\t$modal.find('#title').html(\"Relay Recorder / Fuse — Historikk\");\n\t\t$modal.find('.modal-dialog').removeClass('modal-lg').removeClass('modal-sm');\n\t\t$modal.find('#body').html(\"<p>Henter...</p>\");\n\t\t// If list of client history has not already been fetched\n\t\tif (!USER.accountClients()) {\n\t\t\tvar clients = [];\n\t\t\t// Call API to get all clients ever used by this user\n\t\t\t$.when(RELAY.userClients()).done(function (response) {\n\t\t\t\t// Store a copy for later use\n\t\t\t\tUSER.accountClientsStore(response);\n\t\t\t\t// console.log(USER.accountClients());\n\t\t\t\tbuildClientHistoryTable(response, $modal);\n\t\t\t});\n\t\t} else {\n\t\t\t// Local copy already available\n\t\t\tbuildClientHistoryTable(USER.accountClients(), $modal);\n\t\t}\n\t}", "title": "" }, { "docid": "efa5507c39d2162fef2fec065c928889", "score": "0.4802307", "text": "function showHistories() {\nlet histories = localStorage.getItem(\"histories\");\n\nif (histories == null) {\n historiesObj = [];\n} else {\n historiesObj = JSON.parse(histories);\n}\nlet html = \"\";\nhistoriesObj.forEach(function (element, index) {\n html += `\n <div class=\"historyList\">${element}</div>`;\n console.log(element)\n\n});\nlet historiesElm = document.getElementById(\"lists\");\nif(historiesElm.length !=0){\n historiesElm.innerHTML = html;\n}\n}", "title": "" }, { "docid": "5609200a7829266ed6d0906589af7a74", "score": "0.47969455", "text": "render() {\n //update search history\n let userHistory=this.props.history[this.props.history.length-1];\n console.log(this.props.history);\n\n return (\n <div className='signup-container dashboard' style={{marginBottom:20}}>\n <div className='signup-heading-container'>\n <h1 className='signup-heading-h1'>Search History</h1>\n <div className='search-history-container' style={{paddingBottom:40, width:'90%', textAlign:'center'}}>\n {!userHistory ? <p>No search history</p> : userHistory.map((item, i) => \n <p style={{marginLeft:0, lineHeight:'24px'}} key={item + i}>\n {item}\n </p>\n )}\n </div>\n </div>\n </div>\n )\n }", "title": "" }, { "docid": "862344a3efe3946342c992f7c4815ddb", "score": "0.47945008", "text": "createHistoryNodeTooltip(ownerUri, timeStamp) {\n const queryString = this.getQueryString(ownerUri);\n const connectionLabel = this.getConnectionLabel(ownerUri);\n return `${connectionLabel}${os.EOL}${os.EOL}${timeStamp}${os.EOL}${os.EOL}${queryString}`;\n }", "title": "" }, { "docid": "f67119b770113f41e0d8200052a4d0ef", "score": "0.4786233", "text": "function addUserHistoryLink() {\n var userhistory = '<a href=\"javascript:;\" class=\"user-history-button\" title=\"view user history\" target=\"_blank\">H</a>';\n\n $(this).append('[' + userhistory + ']');\n }", "title": "" }, { "docid": "033a91ec5b41a8b4d5ef113f6fcf3334", "score": "0.47822487", "text": "get relevantHistory () {\n\t\treturn this._relevantHistory;\n\t}", "title": "" }, { "docid": "a4f8e590163d112bbd897ee2dc679660", "score": "0.4780429", "text": "function recallHistory() {\n let localSearchHistory = JSON.parse(localStorage.getItem('localStoredHistory')) || [];\n let searchedMovie = searchBarInputElm.value;\n\n localSearchHistory.push(searchedMovie);\n\n searchHistoryElm.innerText = '';\n\n for (let i = localSearchHistory.length - 1; i >=0; i--) {\n let li = document.createElement('li');\n\n li.appendChild(document.createTextNode(localSearchHistory[i]));\n searchHistoryElm.appendChild(li);\n }\n\n localStorage.setItem('localStoredHistory', JSON.stringify(localSearchHistory));\n}", "title": "" }, { "docid": "30b8974bc1b97385e6f5f62eb43cc76b", "score": "0.47708333", "text": "function renderHistory() {\n const historyData = showHistory();\n let historyList = document.querySelector(\"#historyList\");\n\n // selalu hapus konten HTML pada element supaya tidak ada tampilan data ganda\n historyList.innerHTML = \"\";\n\n for (let history of historyData) {\n // membuat element tr\n let row = document.createElement(\"p\");\n row.innerHTML = history.nama;\n\n historyList.appendChild(row);\n }\n}", "title": "" }, { "docid": "5015c0c19a6800641418af471f62e60e", "score": "0.4761207", "text": "historyHandler() {\n $(window).on('popstate', (e)=> {\n let initialPop = !this.popped && location.href === this.initialURL;\n this.popped = true;\n\n if (initialPop) {\n this.widget.find('.careers-pagination').pagination('drawPage', this.currentPage());\n return;\n };\n\n this.scrollToWidget();\n\n // Grab the previous page number from the pushState\n var pageNumber = e.originalEvent.state === null ? 1 : e.originalEvent.state.page;\n\n this.buildMarkup(pageNumber);\n // Update current pagination link state\n this.widget.find('.careers-pagination').pagination('drawPage', pageNumber);\n });\n }", "title": "" }, { "docid": "dc51d09bc3d040ad5a8a4ab5863da30b", "score": "0.47575167", "text": "function getSearchHistory() {\n //Get search history from localStorage\n const history = JSON.parse(localStorage.getItem(\"cities\"));\n if (history) {\n //Show history in CardBodyHistory\n cardBodyHistory.innerHTML = \"\";\n for (let city of history) {\n cardBodyHistory.innerHTML += `<button class=\"btn btn-primary\" data-city=\"${city}\">\n ${city}\n </button>`;\n }\n }\n}", "title": "" }, { "docid": "f5d7198b8bcbc1df15758ca13bde55ec", "score": "0.47419086", "text": "function onStartHistory() {\r\n //Hide ui so that it doesn't stay behind while the map animates\r\n self.map.getAllAgentOverviews().forEach(function(overview) {\r\n overview.toggleVisibility(false);\r\n });\r\n self.countryControlIndicator.toggleControlIconVisibility(false);\r\n self.enableHistoryBackButtons(false);\r\n self.enableHistoryForwardButtons(false);\r\n\r\n self.mapAnimator.animateSlideRight(function() {\r\n self.goToStartInHistory();\r\n },function () {\r\n self.countryControlIndicator.repositionControlIcons(self.map);\r\n self.enableHistoryBackButtons(self.shouldEnableBackButtons);\r\n self.enableHistoryForwardButtons(self.shouldEnableForwardButtons);\r\n });\r\n }", "title": "" } ]
50bfcdcafa7face7c6e60c883e5a3576
this function converts json to suitable hex buffer
[ { "docid": "7c6c65761fa4b5f1e9d894e7f86463d9", "score": "0.68012315", "text": "function convert_to_buffer(message){\n\tvar buf=Buffer.from(JSON.stringify(message))\n\treturn buf.toString('hex')\n}", "title": "" } ]
[ { "docid": "4ced9b71da29f57fb78a61fc009c7334", "score": "0.66262996", "text": "buf2hex(buffer) { // buffer is an ArrayBuffer\n return Array.prototype.map.call(new Uint8Array(buffer), x => ('00' + x.toString(16)).slice(-2)).join('');\n }", "title": "" }, { "docid": "daecf9a867e2815484b48bbc45811ff1", "score": "0.64432645", "text": "getBufferJson(json) {\n return Buffer.from(JSON.stringify(json));\n }", "title": "" }, { "docid": "99b3cc5529499fac717b97d8c06a01f0", "score": "0.63591075", "text": "static obj2hexstring(obj) {\n return Utils.str2hexstring(JSON.stringify(obj));\n }", "title": "" }, { "docid": "f8a12e3183e6757e95fd353672e4877c", "score": "0.60890466", "text": "static jsonToBinary(json) {\n \n // serialize json to binary which is stored in c++ heap\n let binMemInfoStr = MoneroUtilsWasm.WASM_MODULE.malloc_binary_from_json(JSON.stringify(json));\n \n // sanitize binary memory address info\n let binMemInfo = JSON.parse(binMemInfoStr);\n binMemInfo.ptr = parseInt(binMemInfo.ptr);\n binMemInfo.length = parseInt(binMemInfo.length);\n \n // read binary data from heap to Uint8Array\n let view = new Uint8Array(binMemInfo.length);\n for (let i = 0; i < binMemInfo.length; i++) {\n view[i] = MoneroUtilsWasm.WASM_MODULE.HEAPU8[binMemInfo.ptr / Uint8Array.BYTES_PER_ELEMENT + i];\n }\n \n // free binary on heap\n MoneroUtilsWasm.WASM_MODULE._free(binMemInfo.ptr);\n \n // return json from binary data\n return view;\n }", "title": "" }, { "docid": "ec494ca2517ca975813474d1289f5df5", "score": "0.6039509", "text": "static hex2buf (hex) {\n var arr = []\n for (var i = 0; i < hex.length; i+=2) {\n arr.push (parseInt ('' + hex[i] + hex[i+1], 16))\n }\n return arr\n }", "title": "" }, { "docid": "b0d2ec7a7c00d56600b5f95d9a7d5fc0", "score": "0.58968383", "text": "function toHex(buffer) {\n return [...new Uint8Array(buffer)].map(x => x.toString(16).padStart(2, '0')).join('');\n}", "title": "" }, { "docid": "819ed8fc0d5643a1d9fd3177ab89fc19", "score": "0.5885825", "text": "function buffer2StringValue(buffer) {\r\n const length = buffer.length\r\n let output = '0x'\r\n for (let i = length; i > 0; i--) {\r\n output += buffer.slice(i - 1, i).toString('hex')\r\n }\r\n return output\r\n}", "title": "" }, { "docid": "9ae0501e89adb706373df6b02e87b76f", "score": "0.5712513", "text": "function bufString(buf) {\n return buf.toString(\"hex\");\n}", "title": "" }, { "docid": "d5be5c5df7a579fb9ccbf7fc0bd6ae2e", "score": "0.568518", "text": "function packBinaryJson(json, glbBuilder, options = {}) {\n const {flattenArrays = false} = options;\n let object = json;\n\n // Check if string has same syntax as our \"JSON pointers\", if so \"escape it\".\n if (typeof object === 'string' && object.indexOf('#/') === 0) {\n return `#${object}`;\n }\n\n if (Array.isArray(object)) {\n // TODO - handle numeric arrays, flatten them etc.\n const typedArray = flattenArrays && Object(_flatten_to_typed_array__WEBPACK_IMPORTED_MODULE_0__[\"flattenToTypedArray\"])(object);\n if (typedArray) {\n object = typedArray;\n } else {\n return object.map(element => packBinaryJson(element, glbBuilder, options));\n }\n }\n\n // Typed arrays, pack them as binary\n if (ArrayBuffer.isView(object) && glbBuilder) {\n if (glbBuilder.isImage(object)) {\n const imageIndex = glbBuilder.addImage(object);\n return `#/images/${imageIndex}`;\n }\n\n // if not an image, pack as accessor\n const bufferIndex = glbBuilder.addBuffer(object);\n return `#/accessors/${bufferIndex}`;\n }\n\n if (object !== null && typeof object === 'object') {\n const newObject = {};\n for (const key in object) {\n newObject[key] = packBinaryJson(object[key], glbBuilder, options);\n }\n return newObject;\n }\n\n return object;\n}", "title": "" }, { "docid": "ce5e809fb5f2b1dcacd224d7d8ff50e0", "score": "0.5672933", "text": "function convert(buffer) {\n return base32.encode(buffer);\n}", "title": "" }, { "docid": "6e79594363fa6ba56fde1c718d55bb57", "score": "0.56524515", "text": "function hex_to_string(hexBuffer)\r\n{\r\n\tvar str = '';\r\n\tvar byte_str = '';\r\n\r\n\tfor (var i = 0; i < hexBuffer.length(); i++)\r\n\t{\r\n\t\tif(i%2 == 0)\r\n\t\t{\r\n\t\t\tbyte_str = hexBuffer.substring(i, i+1);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tbyte_str += hexBuffer.substring(i, i+1);\r\n\t\t\tstr += String.fromCharCode(parseInt(byte_str, 16));\r\n\t\t}\r\n\t}\r\n\treturn str\r\n}", "title": "" }, { "docid": "f871ff2bc40e9b4b0501a7fec19e0d17", "score": "0.5644137", "text": "function make_special_json( obj ){\n let json = JSON.stringify( obj )\n json.replace(/\\\\\"/g,\"\\uFFFF\");\n json = json.replace(/\"([^\"]+)\":/g, '$1:').replace(/\\uFFFF/g, '\\\\\\\"');\n return json\n}", "title": "" }, { "docid": "72b57078c02ade07f8c8f69f38703899", "score": "0.5600891", "text": "function bufferToHex(buffer) {\n\treturn [...buffer]\n\t\t.map(b =>b.toString(16).padStart(2, \"0\")) // Convert the numbers to hex, padding them with a zero if they are 0A or below.\n\t\t.join(\" \") // join the 2-digit numbers together, with a space between them\n\t\t.match(/.{1,48}/g) // chunk the string into 48-character chunks\n\t\t.join(\"<br>\\n\"); // join the chunks together again, with a new linebreak between them\n}", "title": "" }, { "docid": "cfd2206570d81e9ff0ff0bcd892bf82d", "score": "0.55643594", "text": "function getBufferHexBE(buffer)\n{\n\treturn swapBufferEndian(buffer).toString('hex');\n}", "title": "" }, { "docid": "f3909f812cd993110ec7b4d969f2c048", "score": "0.5563455", "text": "function jsJson( json ) {\n return JSON.stringify( json ).\n replace( /\\u2028/g, \"\\\\u2028\" ).\n replace( /\\u2029/g, \"\\\\u2029\" );\n}", "title": "" }, { "docid": "146540e6ce27072844822c63569fdc5c", "score": "0.5552098", "text": "toString() {\n return '0x' + this.buf.toString('hex');\n }", "title": "" }, { "docid": "146540e6ce27072844822c63569fdc5c", "score": "0.5552098", "text": "toString() {\n return '0x' + this.buf.toString('hex');\n }", "title": "" }, { "docid": "8418ee00e2b93d5dc4e2d8d4b4e31fe5", "score": "0.55479145", "text": "constructor(json = null) {\n\t\tthis.hexes = [\n\t\t\tnew Hex(0, 0, 0),\n\t\t\tnew Hex(1, 1, -1),\n\t\t\tnew Hex(2, 2, 0),\n\t\t\tnew Hex(3, 1, 1),\n\t\t\tnew Hex(4, -1, 1),\n\t\t\tnew Hex(5, -2, 0),\n\t\t\tnew Hex(6, -1, -1),\n\t\t\tnew Hex(7, 0, -2),\n\t\t\tnew Hex(8, 2, -2),\n\t\t\tnew Hex(9, 3, -1),\n\t\t\tnew Hex(10, 4, 0),\n\t\t\tnew Hex(11, 3, 1),\n\t\t\tnew Hex(12, 2, 2),\n\t\t\tnew Hex(13, 0, 2),\n\t\t\tnew Hex(14, -2, 2),\n\t\t\tnew Hex(15, -3, 1),\n\t\t\tnew Hex(16, -4, 0),\n\t\t\tnew Hex(17, -3, -1),\n\t\t\tnew Hex(18, -2, -2),\n\t\t];\n\n\t\tthis.hexes[0].link(0, this.hexes[1]);\n\t\tthis.hexes[0].link(1, this.hexes[2]);\n\t\tthis.hexes[0].link(2, this.hexes[3]);\n\t\tthis.hexes[0].link(3, this.hexes[4]);\n\t\tthis.hexes[0].link(4, this.hexes[5]);\n\t\tthis.hexes[0].link(5, this.hexes[6]);\n\n\t\tthis.hexes[1].link(2, this.hexes[2]);\n\t\tthis.hexes[2].link(3, this.hexes[3]);\n\t\tthis.hexes[3].link(4, this.hexes[4]);\n\t\tthis.hexes[4].link(5, this.hexes[5]);\n\t\tthis.hexes[5].link(0, this.hexes[6]);\n\t\tthis.hexes[6].link(1, this.hexes[1]);\n\n\t\tthis.hexes[1].link(5, this.hexes[7]); this.hexes[1].link(0, this.hexes[8]); this.hexes[1].link(1, this.hexes[9]);\n\t\tthis.hexes[2].link(0, this.hexes[9]); this.hexes[2].link(1, this.hexes[10]); this.hexes[2].link(2, this.hexes[11]);\n\t\tthis.hexes[3].link(1, this.hexes[11]); this.hexes[3].link(2, this.hexes[12]); this.hexes[3].link(3, this.hexes[13]);\n\t\tthis.hexes[4].link(2, this.hexes[13]); this.hexes[4].link(3, this.hexes[14]); this.hexes[4].link(4, this.hexes[15]);\n\t\tthis.hexes[5].link(3, this.hexes[15]); this.hexes[5].link(4, this.hexes[16]); this.hexes[5].link(5, this.hexes[17]);\n\t\tthis.hexes[6].link(4, this.hexes[17]); this.hexes[6].link(5, this.hexes[18]); this.hexes[6].link(0, this.hexes[7]);\n\n\t\tthis.hexes[7].link(1, this.hexes[8]);\n\t\tthis.hexes[8].link(2, this.hexes[9]);\n\t\tthis.hexes[9].link(2, this.hexes[10]);\n\t\tthis.hexes[10].link(3, this.hexes[11]);\n\t\tthis.hexes[11].link(3, this.hexes[12]);\n\t\tthis.hexes[12].link(4, this.hexes[13]);\n\t\tthis.hexes[13].link(4, this.hexes[14]);\n\t\tthis.hexes[14].link(5, this.hexes[15]);\n\t\tthis.hexes[15].link(5, this.hexes[16]);\n\t\tthis.hexes[16].link(0, this.hexes[17]);\n\t\tthis.hexes[17].link(0, this.hexes[18]);\n\t\tthis.hexes[18].link(1, this.hexes[7]);\n\n\t\tif (json !== null) {\n\t\t\tfor (let i = 0; i < json.hexes.length; i++) {\n\t\t\t\tthis.hexes[i].load(json.hexes[i]);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "0043fdea86675124e367acc53831ee85", "score": "0.5502243", "text": "function id_to_hex(id) {\n return new Buffer(id).toString('hex');\n}", "title": "" }, { "docid": "bf4555b4b3fa96d5ae1030703e9a5d17", "score": "0.5499171", "text": "toHex() {\n let sb = new Array();\n for (var i = 0; i < this.len; i++) {\n let l = this.buffer[i].toString(16).toUpperCase();\n if (l.length < 2)\n l = \"0\" + l;\n sb.push(l);\n }\n return sb.join(\"_\");\n }", "title": "" }, { "docid": "0f05efde6c8515fd2999ecd0dbb74bfe", "score": "0.546097", "text": "function buildSerial(jsonData) {\n\t\t// https://stackoverflow.com/a/41180394\n\t\tlet ascii = Array.from(\n\t\t\tnew TextEncoder('utf-8').encode(jsonData)\n\t\t).map(e => 255 - e);\n\t\tlet header = [...FILE_SIGNATURE].map(e => e.charCodeAt(0));\n\t\theader.push(...getDWord(ascii.length));\n\t\tlet rawSize = Math.ceil((ascii.length + header.length) / 3);\n\t\tlet adjSize = getMinimalSquare(rawSize);\n\t\tlet padding = Array(adjSize.x * adjSize.y - rawSize);\n\t\tlet imgBuffer = header.concat(ascii, padding);\n\t\tsaveImage(imgBuffer, adjSize.x, adjSize.y);\n\t}", "title": "" }, { "docid": "84de0f669bd9fe22ba1bbdad6af521b7", "score": "0.54421204", "text": "function ab2hex(arrayBuffer) {\n var byteArray = new Uint8Array(arrayBuffer);\n var hex = \"\";\n for (var i=0; i<byteArray.byteLength; i++) {\n hex += byteArray[i].toString(16);\n }\n return hex;\n}", "title": "" }, { "docid": "5da40669dd7af2d167d673f6dec84de2", "score": "0.54416203", "text": "static extractHexString(data, index) {\n let string_start = Util.locateSequence(Util.HEX_STRING_START, data, index);\n let string_end = Util.locateSequence(Util.HEX_STRING_END, data, index);\n data = data.slice(string_start + 1, string_end);\n return { result: new Uint8Array(Util.convertHexStringToByteArray(data)), start_index: string_start, end_index: string_end };\n }", "title": "" }, { "docid": "15a512028e58445b318cd916266856a2", "score": "0.54330224", "text": "hexToBase64(data) {\n /**\n * @returns data after converting to base64 using btoa function\n */\n return this.btoa(String.fromCharCode.apply(null,\n data.replace(/\\r|\\n/g, \"\").replace(/([\\da-fA-F]{2}) ?/g, \"0x$1 \").replace(/ +$/, \"\").split(\" \"))\n ).toString(\"base64\");\n }", "title": "" }, { "docid": "387ee903fb956c3c22188d276d1c3ed9", "score": "0.5413182", "text": "function _htob (hex) {\n if (hex) {\n if (typeof hex !== 'string') {\n throw new TypeError('Expected input to be a string')\n }\n\n if ((hex.length % 2) !== 0) {\n throw new RangeError('Expected string to be an even number of characters')\n }\n\n var view = new Uint8Array(hex.length / 2)\n\n for (var i = 0; i < hex.length; i += 2) {\n view[i / 2] = parseInt(hex.substring(i, i + 2), 16)\n }\n\n return view\n } else {\n return null;\n }\n}", "title": "" }, { "docid": "40cb1f2496709b8de9192af2b401c3a1", "score": "0.54096866", "text": "static objectToTrytes(obj) {\n const json = JSON.stringify(obj);\n const encoded = TextHelper.encodeNonASCII(json);\n return encoded ? TrytesHelper.fromAscii(encoded) : \"\";\n }", "title": "" }, { "docid": "a5c43b92f8746fa337ab6be9cb7650b1", "score": "0.5407294", "text": "function fromJsonObject(that,object){var array;var length=0;if(object.type==='Buffer'&&isArray(object.data)){array=object.data;length=checked(array.length)|0;}that=allocate(that,length);for(var i=0;i<length;i+=1){that[i]=array[i]&255;}return that;}", "title": "" }, { "docid": "f5549902dda12a954e963f5feeeb1df6", "score": "0.5401443", "text": "function ensureHexBuffer(x) {\n if (x === null || x === 0) return Buffer.alloc(0);\n else if (Buffer.isBuffer(x)) x = x.toString('hex');\n if (typeof x === 'number') x = `${x.toString(16)}`;\n else if (typeof x === 'string' && x.slice(0, 2) === '0x') x = x.slice(2);\n if (x.length % 2 > 0) x = `0${x}`;\n return Buffer.from(x, 'hex');\n}", "title": "" }, { "docid": "d3b56d0d6cf3334abb1e49270c48935d", "score": "0.5398821", "text": "toHexString(byteArray) {\n return Array.from(byteArray, function(byte) {\n return ('0' + (byte & 0xFF).toString(16)).slice(-2);\n }).join('')\n }", "title": "" }, { "docid": "82f7e2e88cc5c07731a535b10c123bdb", "score": "0.5377854", "text": "function ba2hex(bytearray){\n\ttry{\n\t\tvar hexstring = '';\n\t\tfor(var i=0; i<bytearray.length; i++){\n\t\t\tvar hexchar = bytearray[i].toString(16);\n\t\t\tif (hexchar.length == 1){\n\t\t\t\thexchar = \"0\"+hexchar;\n\t\t\t}\n\t\t\thexstring += hexchar;\n\t\t}\n\t\treturn hexstring;\n\t}\n\tcatch(e){ \n\t\tvar place_for_breakpoint = 0;\n\t}\n}", "title": "" }, { "docid": "ac1ae810bfdd62392eca4acc44650643", "score": "0.5377788", "text": "function to_hex_bytes(text)\n {\n // A single uint8 is encoded by two hexadecimal characters, so we may need to pad our input\n // if its length is not divisible by two,\n if (text.length % 2 !== 0) { text = \"0\" + text; }\n\n const byte_count = text.length / 2;\n const byte_array = new Uint8Array(byte_count);\n for (let i = 0; i < byte_count; ++i)\n {\n byte_array[i] = parseInt(text[2 * i] + text[2 * i + 1], 16);\n }\n return byte_array;\n }", "title": "" }, { "docid": "ae27748ddfc2a18a43ede0f4e9568e93", "score": "0.5359288", "text": "function bufToEscStr( buf ) {\n\tlet retStr = \"\" ;\n\tfor ( let b of buf ) {\n\t\tif ( b < 0x20 || b > 0x7E ) {\n\t\t\tretStr += `\\\\x${b.toString( 16 )}` ;\n\t\t}\n\t\telse {\n\t\t\tretStr += String.fromCharCode( b ) ;\n\t\t}\n\t}\n\treturn retStr ;\n}", "title": "" }, { "docid": "01181e553fb30daf25ade999a20b5011", "score": "0.53546184", "text": "function bufToHex(buf) {\n {\n if (ArrayBuffer.isView(buf))\n buf = new Uint8Array(buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength));\n return Buffer.from(buf).toString('hex');\n }\n}", "title": "" }, { "docid": "c5c0ffd83c8675f33954bbf85da9271c", "score": "0.5318856", "text": "static parse(input) {\n const buffer = Buffer.allocUnsafe(16);\n let j = 0;\n\n for (let i = 0; i < 16; i++) {\n buffer[i] = hex2byte[input[j++] + input[j++]];\n\n if (i === 3 || i === 5 || i === 7 || i === 9) {\n j += 1;\n }\n }\n\n return buffer;\n }", "title": "" }, { "docid": "c5c0ffd83c8675f33954bbf85da9271c", "score": "0.5318856", "text": "static parse(input) {\n const buffer = Buffer.allocUnsafe(16);\n let j = 0;\n\n for (let i = 0; i < 16; i++) {\n buffer[i] = hex2byte[input[j++] + input[j++]];\n\n if (i === 3 || i === 5 || i === 7 || i === 9) {\n j += 1;\n }\n }\n\n return buffer;\n }", "title": "" }, { "docid": "b66d5202978eca946f82d3307ac6f023", "score": "0.5280676", "text": "function buffer_to_strings(x) {\n for(var i in x) {\n if (typeof x[i] === \"object\" || typeof x[i] === \"buffer\") {\n var temp = x[i].toString('utf8');\n x[i] = temp;\n }\n }\n return x;\n}", "title": "" }, { "docid": "ca1b791425ea4c51e3321193e102a981", "score": "0.5271626", "text": "function r(e){return o(btoa(e))}", "title": "" }, { "docid": "f590e3abc04e37da044d89507dbd5f67", "score": "0.52699465", "text": "function toBuffer(string, hex) {\n if(hex) {\n const buffer = new ArrayBuffer(string.length / 2);\n const data = new DataView(buffer);\n\n for(let i = 0; i < string.length; i += 2) {\n data.setUint8(i / 2, parseInt(string.substr(i, 2), 16));\n }\n return data;\n } else {\n const encoder = new TextEncoder();\n return encoder.encode(string);\n }\n}", "title": "" }, { "docid": "740289a9ca36a5b3d042782cbf95dfb5", "score": "0.5241724", "text": "function convert2hex(){\n\talert(\"Converting to hex\");\n\n\tvar string1=\"\";\n\n\t//copy original state of registers Hash to copyReg Hash\n\t\n\tcopyReg = copyRegisters();\n\tstack = copyStack;\n\tstring1=convertArray(stack,dec2hex);\n\n\n convertRegisters(dec2hex);\n document.getElementById(\"stack\").innerHTML =string1;\n\n \tkeepDataandInstr();\n \n\n}", "title": "" }, { "docid": "f5ab466f00cf2c29ea03817bf66c957e", "score": "0.52405006", "text": "static binaryToJson(uint8arr) {\n \n // allocate space in c++ heap for binary\n let ptr = MoneroUtilsWasm.WASM_MODULE._malloc(uint8arr.length * uint8arr.BYTES_PER_ELEMENT);\n let heap = new Uint8Array(MoneroUtilsWasm.WASM_MODULE.HEAPU8.buffer, ptr, uint8arr.length * uint8arr.BYTES_PER_ELEMENT);\n \n // write binary to heap\n heap.set(new Uint8Array(uint8arr.buffer));\n \n // create object with binary memory address info\n let binMemInfo = { ptr: ptr, length: uint8arr.length }\n\n // convert binary to json str\n const ret_string = MoneroUtilsWasm.WASM_MODULE.binary_to_json(JSON.stringify(binMemInfo));\n \n // free binary on heap\n MoneroUtilsWasm.WASM_MODULE._free(heap.byteOffset);\n MoneroUtilsWasm.WASM_MODULE._free(ptr);\n \n // parse and return json\n return JSON.parse(ret_string);\n }", "title": "" }, { "docid": "68550db639c9f76e44aa84fe347c814b", "score": "0.5210979", "text": "function bintohex(bin)\n{\n var buf = (Buffer.isBuffer(buf) ? buf : new Buffer(bin, 'binary'));\n var str = buf.toString('hex').toUpperCase();\n return zeroextend(str, 32);\n}", "title": "" }, { "docid": "fa759df82f8e6afc15e7f1de55833368", "score": "0.5200589", "text": "toJSON() {\n return {\n nonce: ethereumjs_util_1.bnToHex(this.nonce),\n gasPrice: ethereumjs_util_1.bnToHex(this.gasPrice),\n gasLimit: ethereumjs_util_1.bnToHex(this.gasLimit),\n to: this.to !== undefined ? this.to.toString() : undefined,\n value: ethereumjs_util_1.bnToHex(this.value),\n data: '0x' + this.data.toString('hex'),\n v: this.v !== undefined ? ethereumjs_util_1.bnToHex(this.v) : undefined,\n r: this.r !== undefined ? ethereumjs_util_1.bnToHex(this.r) : undefined,\n s: this.s !== undefined ? ethereumjs_util_1.bnToHex(this.s) : undefined,\n };\n }", "title": "" }, { "docid": "e536de326f0954ca7155be89177873e4", "score": "0.5190343", "text": "function convertHexToBytes ( hex ) {\n\n var bytes = [];\n\n for (\n var i = 0,\n j = hex.length;\n i < j;\n i += 2\n ) {\n bytes.push(parseInt(hex.substr(i, 2), 16));\n };\n\n return(bytes);\n\n}", "title": "" }, { "docid": "d46315138421a4b96c424e853168be46", "score": "0.518537", "text": "function hexToBytes(input) {\n return Buffer.from(input.substring(2), 'hex');\n}", "title": "" }, { "docid": "1736737161a25142790b9238582b03d7", "score": "0.5183751", "text": "function parsedtoByteString() {\n\t\t// this.offset points at the next thing to be parsed\n\t\toffset -= 1\n\n\t\tlet str = '['\n\t\tlet byte\n\t\tfor (let i = 0; i < offset-1; i++) {\n\t\t\tbyte = view.getUint8(i)\n\t\t\tif (byte < 16) {\n\t\t\t\tstr += '0x0' + byte.toString(16) + ', '\n\t\t\t} else {\n\t\t\t\tstr += '0x' + byte.toString(16) + ', '\n\t\t\t}\n\t\t}\n\t\tbyte = view.getUint8(offset)\n\t\tif (byte < 16) {\n\t\t\tstr += '0x0' + byte.toString(16) + ', ... (not parsed)]'\n\t\t} else {\n\t\t\tstr += '0x' + byte.toString(16) + ', ... (not parsed)]'\n\t\t}\n\n\t\t// So that this.offset is unchanged by the function\n\t\toffset += 1\n\t\treturn str\n\t}", "title": "" }, { "docid": "19cec6c61abfe2de180dfde52ddf7949", "score": "0.5180229", "text": "_encodeMsg (jsonRpcObj) {\n return JSON.stringify(jsonRpcObj)\n }", "title": "" }, { "docid": "2d1679d1c3e54b52f3ec4d171b667a99", "score": "0.5162136", "text": "function fromHex(hex, binary, offset) {\n if (binary) {\n binary.write(hex, offset, \"hex\");\n return binary;\n }\n return new Buffer(hex, 'hex');\n}", "title": "" }, { "docid": "9d42c62c0bee90da86714608ce3b9605", "score": "0.51571107", "text": "ab2str(buf) {\n return String.fromCharCode.apply(null, new Uint8Array(buf));\n }", "title": "" }, { "docid": "8f8bd159a2021469a9f8fc12c002cedc", "score": "0.5152723", "text": "static fromBuffer(buffer) {\n assert_1.default(buffer.length === 8, `Invalid buffer length: ${buffer.length}`);\n return new bn_js_1.default([...buffer]\n .reverse()\n .map((i) => `00${i.toString(16)}`.slice(-2))\n .join(''), 16);\n }", "title": "" }, { "docid": "b9693b1620a9079d795430d49ad33f89", "score": "0.51434034", "text": "function invalidXutf8Test() {\n var values = [\n 'e188', // last byte missing from U+1234 encoding (e188b4)\n 'c080', // non-shortest encoding for U+0000\n ];\n\n // Because standard JSON does not escape non-ASCII codepoints, hex\n // encode its output\n values.forEach(function (v) {\n var t = bufferToStringRaw(Duktape.dec('hex', v));\n print(v);\n print('json ', Duktape.enc('hex', JSON.stringify(t)));\n print('jx', encJx(t));\n print('jc', encJc(t));\n });\n}", "title": "" }, { "docid": "738e428d357d0546d84c56935113d1a6", "score": "0.5141622", "text": "static fromBuffer(buffer) {\n assert_1.default(buffer.length === 4, `Invalid buffer length: ${buffer.length}`);\n return new bn_js_1.default([...buffer]\n .reverse()\n .map((i) => `00${i.toString(16)}`.slice(-2))\n .join(''), 16);\n }", "title": "" }, { "docid": "17df724a938a0699f8b100052543fd97", "score": "0.5129994", "text": "function unparse(buf) {\n var i = 0, bth = byteToHex;\n return bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + '-' + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]] + bth[buf[i++]];\n }", "title": "" }, { "docid": "6c5f6eea2c218856c873e4f1556f14b9", "score": "0.51239014", "text": "function convert(buf) {\n var obj = {\n header: extract(buf, 0, 2),\n //payloadLength: extract(buf, 2, 6),\n serialNo: buf.toString('utf8', 6, 10),\n temperature: extract(buf, 10, 14) / 100,\n humidity: extract(buf, 14, 18) / 100,\n battery: extract(buf, 18, 22),\n pm25: extract(buf, 22, 26),\n pm10: extract(buf, 26, 30),\n //crc: extract(buf, 38, 40),\n //tail: extract(buf, 40, 42)\n };\n\n return obj;\n}", "title": "" }, { "docid": "f0cad1206a6b2a6c81511cbced9eba0b", "score": "0.5112667", "text": "function blake2bHex (input, key, outlen) {\n var output = blake2b(input, key, outlen)\n return toHex(output)\n}", "title": "" }, { "docid": "f90bd8f1ff30cb51b5592f16acd5cd3d", "score": "0.5103452", "text": "function hashesToData(hashes) {\n let result = '';\n hashes.forEach(hash => {\n result += `${module.exports.formatHexUint32(module.exports.remove0x(hash))}`;\n });\n return `0x${result}`;\n}", "title": "" }, { "docid": "3aede1a3a7b88adb0651d422f8bd830a", "score": "0.5097057", "text": "function scratch_json(json) {\n\tif (debug) {\n\t\tscratch(JSON.stringify(json, null, 2));\n\t} else {\n\t\tconsole.log(json);\n\t}\n}", "title": "" }, { "docid": "2cb2582062f133fb85172b176d3d0272", "score": "0.50964135", "text": "function codify(obj) {\n return JSON.stringify(obj);\n }", "title": "" }, { "docid": "2cb2582062f133fb85172b176d3d0272", "score": "0.50964135", "text": "function codify(obj) {\n return JSON.stringify(obj);\n }", "title": "" }, { "docid": "53ada08f8ee49c4a0720522051377264", "score": "0.50931627", "text": "static parse_b64_buffer( json ){\n\t\t\tlet buf = json.buffers[ 0 ];\n\t\t\tif( buf.uri.substr(0,5) != \"data:\" ) return null;\n\n\t\t\t//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\t\t\t// Create and Fill DataView with buffer data\n\t\t\tlet pos\t\t= buf.uri.indexOf( \"base64,\" ) + 7,\n\t\t\t\tblob\t= window.atob( buf.uri.substr( pos ) ),\n\t\t\t\tary_buf = new ArrayBuffer( blob.length ),\n\t\t\t\tdv\t\t= new DataView( ary_buf );\n\n\t\t\tfor( let i=0; i < blob.length; i++ ) dv.setUint8( i, blob.charCodeAt( i ) );\n\n\t\t\treturn ary_buf;\n\t\t}", "title": "" }, { "docid": "acfc2b0bad104a05cc87e6fc486f6b31", "score": "0.5087535", "text": "function blake2bHex (input, key, outlen) {\n var output = blake2b(input, key, outlen)\n return util.toHex(output)\n}", "title": "" }, { "docid": "acfc2b0bad104a05cc87e6fc486f6b31", "score": "0.5087535", "text": "function blake2bHex (input, key, outlen) {\n var output = blake2b(input, key, outlen)\n return util.toHex(output)\n}", "title": "" }, { "docid": "acfc2b0bad104a05cc87e6fc486f6b31", "score": "0.5087535", "text": "function blake2bHex (input, key, outlen) {\n var output = blake2b(input, key, outlen)\n return util.toHex(output)\n}", "title": "" }, { "docid": "acfc2b0bad104a05cc87e6fc486f6b31", "score": "0.5087535", "text": "function blake2bHex (input, key, outlen) {\n var output = blake2b(input, key, outlen)\n return util.toHex(output)\n}", "title": "" }, { "docid": "ab416e355444200b7ca70611cf27f5e3", "score": "0.5084151", "text": "toHex() {\n const value = this.value.toString(16).toUpperCase();\n return new hex_js_1.Hex(`#${value}`);\n }", "title": "" }, { "docid": "c7c8bcd37c5f551cc4f09fcb593f544b", "score": "0.5076597", "text": "function h$_hs_bytestring_uint_hex(x, buf_d, buf_o) {\n var c, ptr = buf_o, next_free;\n var bu8 = buf_d.u8;\n // write hex representation in reverse order\n do {\n bu8[ptr++] = h$_hs_bytestring_digits[x & 0xf];\n x >>>= 4;\n } while(x);\n // invert written digits\n next_free = ptr--;\n while(buf_o < ptr) {\n c = bu8[ptr];\n bu8[ptr--] = bu8[buf_o];\n bu8[buf_o++] = c;\n }\n { h$ret1 = (next_free); return (buf_d); };\n}", "title": "" }, { "docid": "c7c8bcd37c5f551cc4f09fcb593f544b", "score": "0.5076597", "text": "function h$_hs_bytestring_uint_hex(x, buf_d, buf_o) {\n var c, ptr = buf_o, next_free;\n var bu8 = buf_d.u8;\n // write hex representation in reverse order\n do {\n bu8[ptr++] = h$_hs_bytestring_digits[x & 0xf];\n x >>>= 4;\n } while(x);\n // invert written digits\n next_free = ptr--;\n while(buf_o < ptr) {\n c = bu8[ptr];\n bu8[ptr--] = bu8[buf_o];\n bu8[buf_o++] = c;\n }\n { h$ret1 = (next_free); return (buf_d); };\n}", "title": "" }, { "docid": "c7c8bcd37c5f551cc4f09fcb593f544b", "score": "0.5076597", "text": "function h$_hs_bytestring_uint_hex(x, buf_d, buf_o) {\n var c, ptr = buf_o, next_free;\n var bu8 = buf_d.u8;\n // write hex representation in reverse order\n do {\n bu8[ptr++] = h$_hs_bytestring_digits[x & 0xf];\n x >>>= 4;\n } while(x);\n // invert written digits\n next_free = ptr--;\n while(buf_o < ptr) {\n c = bu8[ptr];\n bu8[ptr--] = bu8[buf_o];\n bu8[buf_o++] = c;\n }\n { h$ret1 = (next_free); return (buf_d); };\n}", "title": "" }, { "docid": "c7c8bcd37c5f551cc4f09fcb593f544b", "score": "0.5076597", "text": "function h$_hs_bytestring_uint_hex(x, buf_d, buf_o) {\n var c, ptr = buf_o, next_free;\n var bu8 = buf_d.u8;\n // write hex representation in reverse order\n do {\n bu8[ptr++] = h$_hs_bytestring_digits[x & 0xf];\n x >>>= 4;\n } while(x);\n // invert written digits\n next_free = ptr--;\n while(buf_o < ptr) {\n c = bu8[ptr];\n bu8[ptr--] = bu8[buf_o];\n bu8[buf_o++] = c;\n }\n { h$ret1 = (next_free); return (buf_d); };\n}", "title": "" }, { "docid": "c7c8bcd37c5f551cc4f09fcb593f544b", "score": "0.5076597", "text": "function h$_hs_bytestring_uint_hex(x, buf_d, buf_o) {\n var c, ptr = buf_o, next_free;\n var bu8 = buf_d.u8;\n // write hex representation in reverse order\n do {\n bu8[ptr++] = h$_hs_bytestring_digits[x & 0xf];\n x >>>= 4;\n } while(x);\n // invert written digits\n next_free = ptr--;\n while(buf_o < ptr) {\n c = bu8[ptr];\n bu8[ptr--] = bu8[buf_o];\n bu8[buf_o++] = c;\n }\n { h$ret1 = (next_free); return (buf_d); };\n}", "title": "" }, { "docid": "c7c8bcd37c5f551cc4f09fcb593f544b", "score": "0.5076597", "text": "function h$_hs_bytestring_uint_hex(x, buf_d, buf_o) {\n var c, ptr = buf_o, next_free;\n var bu8 = buf_d.u8;\n // write hex representation in reverse order\n do {\n bu8[ptr++] = h$_hs_bytestring_digits[x & 0xf];\n x >>>= 4;\n } while(x);\n // invert written digits\n next_free = ptr--;\n while(buf_o < ptr) {\n c = bu8[ptr];\n bu8[ptr--] = bu8[buf_o];\n bu8[buf_o++] = c;\n }\n { h$ret1 = (next_free); return (buf_d); };\n}", "title": "" }, { "docid": "c7c8bcd37c5f551cc4f09fcb593f544b", "score": "0.5076597", "text": "function h$_hs_bytestring_uint_hex(x, buf_d, buf_o) {\n var c, ptr = buf_o, next_free;\n var bu8 = buf_d.u8;\n // write hex representation in reverse order\n do {\n bu8[ptr++] = h$_hs_bytestring_digits[x & 0xf];\n x >>>= 4;\n } while(x);\n // invert written digits\n next_free = ptr--;\n while(buf_o < ptr) {\n c = bu8[ptr];\n bu8[ptr--] = bu8[buf_o];\n bu8[buf_o++] = c;\n }\n { h$ret1 = (next_free); return (buf_d); };\n}", "title": "" }, { "docid": "9d8187566aa6e75f9143de15eb443c6d", "score": "0.5067694", "text": "function toHex(d) { return (\"0\"+(Number(d).toString(16))).slice(-2) }", "title": "" }, { "docid": "824aee16b23cf7a36d56013cb2daa007", "score": "0.50659895", "text": "function h$_hs_bytestring_uint_hex(x, buf_d, buf_o) {\n var c, ptr = buf_o, next_free;\n var bu8 = buf_d.u8;\n // write hex representation in reverse order\n do {\n bu8[ptr++] = h$_hs_bytestring_digits[x & 0xf];\n x >>>= 4;\n } while(x);\n\n // invert written digits\n next_free = ptr--;\n while(buf_o < ptr) {\n c = bu8[ptr];\n bu8[ptr--] = bu8[buf_o];\n bu8[buf_o++] = c;\n }\n { h$ret1 = (next_free); return (buf_d); };\n}", "title": "" }, { "docid": "824aee16b23cf7a36d56013cb2daa007", "score": "0.50659895", "text": "function h$_hs_bytestring_uint_hex(x, buf_d, buf_o) {\n var c, ptr = buf_o, next_free;\n var bu8 = buf_d.u8;\n // write hex representation in reverse order\n do {\n bu8[ptr++] = h$_hs_bytestring_digits[x & 0xf];\n x >>>= 4;\n } while(x);\n\n // invert written digits\n next_free = ptr--;\n while(buf_o < ptr) {\n c = bu8[ptr];\n bu8[ptr--] = bu8[buf_o];\n bu8[buf_o++] = c;\n }\n { h$ret1 = (next_free); return (buf_d); };\n}", "title": "" }, { "docid": "a04914bf3dd03a8bc89c3ec6954eefdf", "score": "0.5065875", "text": "function invalidXutf8Test() {\n var values = [\n 'e188', // last byte missing from U+1234 encoding (e188b4)\n 'ff41', // first byte is an invalid initial byte\n 'c080', // non-shortest encoding for U+0000\n ];\n\n // Because standard JSON does not escape non-ASCII codepoints, hex\n // encode its output\n values.forEach(function (v) {\n var t = String(Duktape.dec('hex', v));\n print(v);\n print('json ', Duktape.enc('hex', JSON.stringify(t)));\n print('jsonx', encJsonx(t));\n print('jsonc', encJsonc(t));\n });\n}", "title": "" }, { "docid": "c8391850609c102da1b102e21a53fdf9", "score": "0.50640285", "text": "function jsonVivifier (k, v) {\n if (\n v !== null &&\n typeof v === 'object' &&\n 'type' in v &&\n v.type === 'Buffer' &&\n 'data' in v &&\n Array.isArray(v.data)) {\n return Buffer.from(v.data);\n }\n return v;\n}", "title": "" }, { "docid": "a2329d06556cd7319e80289da032c1ea", "score": "0.50623536", "text": "function hexToBytes(hex) {\n const cleanHex = strip0x(hex);\n const out = [];\n for (let i = 0; i < cleanHex.length; i += 2) {\n const h = ensure0x(cleanHex[i] + cleanHex[i + 1]);\n out.push(parseInt(h, 10).toString());\n }\n return out;\n}", "title": "" }, { "docid": "a09a6c9a6a8fd2ab8c09845268ca6306", "score": "0.50515985", "text": "function fromHex(hex) {\n if (!hexRe.test(hex)) {\n throw new Error('Invalid hexadecimal string.');\n }\n const buffer = [...hex]\n .reduce((acc, curr, i) => {\n // tslint:disable-next-line:no-bitwise\n acc[(i / 2) | 0] = (acc[(i / 2) | 0] || '') + curr;\n return acc;\n }, [])\n .map(x => Number.parseInt(x, 16));\n return new Uint8Array(buffer).buffer;\n}", "title": "" }, { "docid": "275c6dd016b1919b9ca99470bbd44d31", "score": "0.50489223", "text": "function blake2bHex(input, key, outlen) {\n var output = blake2b(input, key, outlen);\n return util.toHex(output);\n}", "title": "" }, { "docid": "ecf0d95efe5b84334450ca92ea1b8fb0", "score": "0.50403875", "text": "toJSON() {}", "title": "" }, { "docid": "fb3115d6fbb913445ff2b59d79ce3f34", "score": "0.50371885", "text": "function n(e){return\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,\"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+\" */\"}", "title": "" }, { "docid": "91a875d5ac1285cf2bfc458343068e80", "score": "0.50298965", "text": "function encode (buffer) {\n return Buffer.isBuffer(buffer) ? buffer : Buffer.from(buffer)\n}", "title": "" }, { "docid": "105428964c16d1e768a5843fc95fac87", "score": "0.50201744", "text": "function dataToHex(c) {\n\tlet hex = c.toString(16)\n\treturn hex.length == 1 ? '0' + hex : hex\n }", "title": "" }, { "docid": "266d845f16bec1130ecf36cf3e3235a0", "score": "0.501494", "text": "function sha1_bytes2hex(bytes) {\n var str = \"\";\n var hex_digits = \"0123456789abcdef\";\n for(var i = 0; i < bytes.length; i++) {\n str += hex_digits[bytes[i] >> 4];\n str += hex_digits[bytes[i] % 16];\n //str += \"(\"+bytes[i] + \")\";\n }\n return str;\n }", "title": "" }, { "docid": "fb3d264dadb1d1a8510eb6455e80d706", "score": "0.5008643", "text": "toHexValue(str) {\n var arr1 = [];\n for (var n = 0, l = str.length; n < l; n++) {\n var hex = Number(str.charCodeAt(n)).toString(16);\n arr1.push(hex);\n }\n return arr1.join('');\n }", "title": "" }, { "docid": "bd03c7aa844ecb2f58e9cfc9a57a30e2", "score": "0.4990692", "text": "function toBase16(d) { return d.buffer().toString(\"hex\"); }", "title": "" }, { "docid": "f03d84ea32883bfdaaf0142e7c56c9fb", "score": "0.49895564", "text": "function JSON() {}", "title": "" }, { "docid": "f03d84ea32883bfdaaf0142e7c56c9fb", "score": "0.49895564", "text": "function JSON() {}", "title": "" }, { "docid": "da5afae0021f4f39a09b0e7fbb0d5237", "score": "0.49766922", "text": "get hex() { return this.toString(\"hex\"); }", "title": "" }, { "docid": "0e2b8285d84005c47cdeb7693de646f4", "score": "0.49731064", "text": "function from_hex_bytes(byte_array)\n {\n const byte_count = byte_array.length;\n\n let text = \"\";\n for (let i = 0; i < byte_count; ++i)\n {\n // toString(16) yields a hexadecimal representation without padding, so we add it\n // ourselves when needed.\n text += byte_array[i].toString(16).padStart(2, \"0\");\n }\n return text;\n }", "title": "" }, { "docid": "b5477ef2c6818ae16914d8b62a8c9985", "score": "0.49653035", "text": "function bin2hex (s){\r\n // Converts the binary representation of data to hex \r\n // \r\n // version: 909.322\r\n // discuss at: http://phpjs.org/functions/bin2hex\r\n // + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\r\n // + bugfixed by: Onno Marsman\r\n // + bugfixed by: Linuxworld\r\n // * example 1: bin2hex('Kev');\r\n // * returns 1: '4b6576'\r\n // * example 2: bin2hex(String.fromCharCode(0x00));\r\n // * returns 2: '00'\r\n var i, f = 0, a = [];\r\n \r\n s += '';\r\n f = s.length;\r\n \r\n for (i = 0; i<f; i++) {\r\n a[i] = s.charCodeAt(i).toString(16).replace(/^([\\da-f])$/,\"0$1\");\r\n }\r\n \r\n return a.join('');\r\n}", "title": "" }, { "docid": "5fb87002025427ae0d76414af42910cb", "score": "0.49620056", "text": "async function encode(json) {\n return JSON.stringify(json);\n}", "title": "" }, { "docid": "5fb87002025427ae0d76414af42910cb", "score": "0.49620056", "text": "async function encode(json) {\n return JSON.stringify(json);\n}", "title": "" }, { "docid": "3b07beeb609e6af9341a3e30451925c5", "score": "0.49507117", "text": "function stringValue2Buffer(stringValue, byteLength) {\r\n if ((stringValue).slice(0, 2) === '0x') {\r\n const input = stringValue.slice(2)\r\n const length = input.length\r\n const buffers = []\r\n let j = 0\r\n for (let i = length; i > 0 && j < byteLength; i -= 2) {\r\n buffers.push(new Buffer(input.slice(i - 2, i), 'hex'))\r\n j++\r\n }\r\n let buffer = Buffer.concat(buffers)\r\n const paddingLength = byteLength - buffer.length\r\n if (paddingLength > 0) {\r\n const padding = new Buffer(paddingLength)\r\n padding.fill(0)\r\n buffer = Buffer.concat([buffer, padding])\r\n }\r\n return buffer\r\n }\r\n else {\r\n return bigInt2Buffer(new BigInteger(stringValue), byteLength)\r\n }\r\n}", "title": "" }, { "docid": "5b5148a684912cdfd83ee3d61da9f6e7", "score": "0.49501657", "text": "function prepare_payload(payload, secret) {\r\n var payloadJson = JSON.stringify(payload);\r\n return new Buffer(payloadJson).toString('base64');\r\n }", "title": "" }, { "docid": "1e32f47671a1facf3f35bf8930deb5c1", "score": "0.49453062", "text": "function blake2sHex (input, key, outlen) {\n var output = blake2s(input, key, outlen)\n return util.toHex(output)\n}", "title": "" }, { "docid": "1e32f47671a1facf3f35bf8930deb5c1", "score": "0.49453062", "text": "function blake2sHex (input, key, outlen) {\n var output = blake2s(input, key, outlen)\n return util.toHex(output)\n}", "title": "" }, { "docid": "1e32f47671a1facf3f35bf8930deb5c1", "score": "0.49453062", "text": "function blake2sHex (input, key, outlen) {\n var output = blake2s(input, key, outlen)\n return util.toHex(output)\n}", "title": "" }, { "docid": "1e32f47671a1facf3f35bf8930deb5c1", "score": "0.49453062", "text": "function blake2sHex (input, key, outlen) {\n var output = blake2s(input, key, outlen)\n return util.toHex(output)\n}", "title": "" }, { "docid": "1aa74bfdfce72686cab2a5c70db5ffea", "score": "0.4942705", "text": "saveDataToJSON(fobj) {\n\n console.log(fobj);\n let imgStr = JSON.stringify(app_state.images, null, 2);\n console.log(\"serialized\"); \n let output = {\n bisformat: \"bisweb-fmritool\",\n images: imgStr\n };\n\n bisgenericio.write(fobj, JSON.stringify(output,null,2));\n\n }", "title": "" } ]
683b427a2bcfb88ea6d82ba4d167b8b5
This function returns a promise, so we need to use .then after we call it
[ { "docid": "541e87b17d9a8a9552c93cc987dcaab1", "score": "0.0", "text": "function readJsonData () {\n return fetch('database/FishEyeData.json')\n .then(response => {\n if (!response.ok) {\n throw new Error(\"HTTP error \" + response.status);\n }\n return response.json();\n })\n}", "title": "" } ]
[ { "docid": "4bc779cce3474279e05182876f51be30", "score": "0.6776335", "text": "function query_promise_then(result) { }", "title": "" }, { "docid": "c831a7d6a26c068429ba9dd798555d6a", "score": "0.6676934", "text": "function query_promise_then(result) {\n\n\n }", "title": "" }, { "docid": "c831a7d6a26c068429ba9dd798555d6a", "score": "0.6676934", "text": "function query_promise_then(result) {\n\n\n }", "title": "" }, { "docid": "c831a7d6a26c068429ba9dd798555d6a", "score": "0.6676934", "text": "function query_promise_then(result) {\n\n\n }", "title": "" }, { "docid": "31bf7668f89f60ba3e141d0e39f599b2", "score": "0.6613735", "text": "then(resolve,reject){return this._deferred.promise.then(resolve,reject);}", "title": "" }, { "docid": "8e0ee13f2c10ddfede7e8a643b200d8b", "score": "0.65875936", "text": "function query_promise_then(result) {\n }", "title": "" }, { "docid": "8e0ee13f2c10ddfede7e8a643b200d8b", "score": "0.65875936", "text": "function query_promise_then(result) {\n }", "title": "" }, { "docid": "8e0ee13f2c10ddfede7e8a643b200d8b", "score": "0.65875936", "text": "function query_promise_then(result) {\n }", "title": "" }, { "docid": "8e0ee13f2c10ddfede7e8a643b200d8b", "score": "0.65875936", "text": "function query_promise_then(result) {\n }", "title": "" }, { "docid": "8e0ee13f2c10ddfede7e8a643b200d8b", "score": "0.65875936", "text": "function query_promise_then(result) {\n }", "title": "" }, { "docid": "8e0ee13f2c10ddfede7e8a643b200d8b", "score": "0.65875936", "text": "function query_promise_then(result) {\n }", "title": "" }, { "docid": "cdfabcb10d9b7bd854c999e6034799f8", "score": "0.63556087", "text": "promise () {\n return new Promise((resolve, reject) => {\n this.exec(function (err, data) {\n if (err) return reject(err)\n resolve(data)\n })\n })\n }", "title": "" }, { "docid": "d728c3d9a622b4381223a3a7a5e9fdd1", "score": "0.6344278", "text": "then(...args) { return this.toPromise().then(...args); }", "title": "" }, { "docid": "d97b71261e52fadbbe213997f5ed0093", "score": "0.616268", "text": "loadFirstProduct() {\n return this.getArbitraryProduct()\n .then(product => {\n return this.loadAllProductData(product.id);\n })\n .catch(console.log);\n }", "title": "" }, { "docid": "d3325d2b02d1204ff791c185e3cbd1c0", "score": "0.61301047", "text": "getSlice(id) {\n return new Promise(function(resolve, reject) {\n try {\n const res = this.db.getSlice(id);\n resolve(res);\n } catch (e) {\n console.log(e);\n reject(e);\n }\n }.bind(this));\n}", "title": "" }, { "docid": "9be228de2a6cde1f5e879e3eb41e5aa7", "score": "0.6095649", "text": "_generatePromise() {\n\n const scope = this\n\n this.promise = when.promise(function(resolve, reject) {\n scope.status = Task.STATUS.PENDING\n scope.resolve = resolve\n scope.reject = reject\n scope.value = undefined\n })\n\n this.promise.catch( _handleError.bind(this) )\n\n return this.promise\n\n }", "title": "" }, { "docid": "62a0431234aaaabc2a4031f49809da34", "score": "0.6076114", "text": "set p(promise) {\n promise.then((r) => console.log(r));\n }", "title": "" }, { "docid": "ea005b6c0ed641e088dfee68b9652dce", "score": "0.6046619", "text": "async function doPromise() {\n\treturn { Success: true };\n}", "title": "" }, { "docid": "68084aa746d13c6be3484b1cf0e9a1cf", "score": "0.6042673", "text": "selectProfilePic(){\n let promise = new Promise((resolve,reject) => {\n if(this.authenticated){\n const gettingStoredSettings = browser.storage.local.get();\n gettingStoredSettings.then(storedSettings => {\n axios({\n method: 'post',\n url: this.backend_url + '/auth/profile',\n data: {\n auth: storedSettings.auth\n }\n }).then(response => {\n resolve({state:\"AUTHENTICATED\", value:response.data.profile_image_url_https})\n })\n .catch(function (error) {\n reject(error.toJSON())\n console.log(`Fatal error occurred: ${error}`);\n this.parentNode.global_error = true\n });\n });\n }else{\n resolve({state:\"UNAUTHENTICATED\"})\n }\n });\n return promise\n }", "title": "" }, { "docid": "e5379f0ae10fb102dc3e56a7e8a0a4d6", "score": "0.60396993", "text": "function Promise() {}", "title": "" }, { "docid": "e5379f0ae10fb102dc3e56a7e8a0a4d6", "score": "0.60396993", "text": "function Promise() {}", "title": "" }, { "docid": "e5379f0ae10fb102dc3e56a7e8a0a4d6", "score": "0.60396993", "text": "function Promise() {}", "title": "" }, { "docid": "d06334638ecc8317bb6a042a379f7654", "score": "0.60100037", "text": "fetchData() {\n return new Promise((resolve, reject) => {\n return resolve();\n });\n }", "title": "" }, { "docid": "5acbc66f809708ce7aee22ca576f7177", "score": "0.59992445", "text": "function whatToDoOnClick() {\r\n console.log('running');\r\n //creates promise\r\n //var data = new Promise(function(resolve,reject){\r\n // console.log(\"Inside Promise\");\r\n var data = $.get(\"https://api.github.com/users/ebergemann\");\r\n // });\r\n // if promise is successful (keeps me from putting all the logic in the callback)\r\n data.then(displayName);\r\n \r\n data.catch(function(){\r\n console.log('failure');\r\n })\r\n console.log('end');\r\n }", "title": "" }, { "docid": "a32d6b6a2d2f6a4c7bd20c1c2d4b9ac4", "score": "0.59879684", "text": "function query_promise_then(result) {\n my_query.fields.website=result;\n console.log(\"* query_promise_then,website=\",my_query.fields.website);\n var query={dept_regex_lst:[/Staff/],title_regex_lst:[/Owner/,/Manager/,/Director/]};\n var promise=MTP.create_promise(result,Gov.init_Gov,parse_gov_then,function() { GM_setValue(\"returnHit\",true); },query);\n }", "title": "" }, { "docid": "7224ce5d6603cc7b29b67a7d341aec9e", "score": "0.5982515", "text": "function getPromise() {\n //Promise witout constructor\n return Promise.resolve('done'); // Promise Object\n // return Promise.reject('something went wrong')\n}", "title": "" }, { "docid": "04a4c74618d0fa0970cd942d7d202cdd", "score": "0.59797865", "text": "getItem(code){\n return new Promise( function(resolve, reject){\n var stmt;\n stmt = Item.findOne({itemCode:code});\n stmt.then(function(data){\n resolve(data);\n //console.log(data);\n }).catch(function(err){\n console.log(err);\n return reject(err);\n });\n \n }); \n }", "title": "" }, { "docid": "ba40527f4f8d28f5953e5323ebde4972", "score": "0.59623164", "text": "function PromiseUtils() {}", "title": "" }, { "docid": "e2fdbbf042dca186434bd109df3c8ba8", "score": "0.59579545", "text": "init() {\n // return new Promise((resolve, reject) => {\n // Function.isFunction(resolve) && resolve();\n // });\n }", "title": "" }, { "docid": "5bc1eb82c5b6b48f243bad766e309509", "score": "0.59548694", "text": "scaffold(func) {\n return BbPromise.resolve();\n }", "title": "" }, { "docid": "0c708769df3622a48acfe7016a3b7f45", "score": "0.5887722", "text": "static create() {\n return new Promise((resolve, reject) => {\n\n })\n }", "title": "" }, { "docid": "282b86d49140f91152cdc8abbd702b8d", "score": "0.587247", "text": "toPromise() {\n const anySetup = this._container != null || this._location != null ||\n this._mount != null || this._request != null ||\n this._responses.length !== 0 || this._beforeAnyResponse != null ||\n this._beforeEachResponse != null;\n if (!anySetup && this._previousPromise == null) return Promise.resolve();\n const promise = anySetup\n ? this.complete()._previousPromise\n : this._previousPromise;\n return promise.then(({ result }) => result);\n }", "title": "" }, { "docid": "a8f07d628056649eacdadbd944c33e1a", "score": "0.5870827", "text": "promise() {\n this.__save()\n return this.__apiDf.promise()\n }", "title": "" }, { "docid": "21d54b92fd09d99002f22794ac95ce66", "score": "0.5869554", "text": "static fetchRestaurants() { \n let fetchedRestaurants;\n return fetch(IDBHelper.DATABASE_URL) //fetch from the network \n .then( (response) => response.json()) \n .then( (restaurants) => { // copy to Restaurant object class \n ////console.log('restaurants='+restaurants); \n return restaurants.map( (restaurant) => new Restaurant(restaurant)); \n }) \n .then( (restaurants) => { // save Restaurant objects class to database \n fetchedRestaurants = restaurants; \n ////console.log('Fetched restaurants='+fetchedRestaurants);\n let sequence = Promise.resolve();\n /*if (saveToDatabase)*/ \n restaurants.forEach((restaurant) => sequence = sequence.then(() => IDBHelper.addToDatabase(restaurant)) );\n ////console.log('Sequence='+sequence); \n return sequence; \n }) \n .then(() => { \n ////console.log('return fetchedRestaurants= '+fetchedRestaurants);\n return fetchedRestaurants;\n }) \n .catch(err => { \n const error = (`Fetching restaurant data failed. Returned status of ${err}`); \n //callback(error, null);\n return Promise.reject(error);\n }); \n }", "title": "" }, { "docid": "f6ade798ee5f23dede9e58d70d60c74d", "score": "0.586789", "text": "getServiceKey(service_id){\n if (RSAKeyRow){\n console.log('RSAKeyRow');\n console.log(RSAKeyRow);\n \n return (new Promise((resolve, reject) => {\n try{\n serverKey.importKey(RSAKeyRow.PRIVATE_KEY);\n }catch(err){\n reject(err); //bao loi khong import key duoc\n } \n resolve(serverKey);\n }));\n }else{\n console.log('createServiceKey');\n \n return this.createServiceKey(service_id)\n .then(data=>{\n RSAKeyRow = data;\n console.log('RSAKeyRow 2:');\n console.log(RSAKeyRow);\n if (RSAKeyRow){\n try{\n serverKey.importKey(RSAKeyRow.PRIVATE_KEY);\n }catch(err){\n throw err; //bao loi khong import key duoc\n } \n }else{\n throw {code:403,message:'No RSAKeyRow'}\n }\n })\n }\n }", "title": "" }, { "docid": "79fbaaa189c3403a7e4f231eb161fe5d", "score": "0.5832908", "text": "then(p1, p2) { return this.promise().then(p1, p2); }", "title": "" }, { "docid": "f3f824ec3b96989f780ffa24db6cca44", "score": "0.5823325", "text": "function createApplyPromise(result) {\n var promise;\n if (typeof result === 'boolean') {\n var deferred = $q.defer();\n if (result) {\n deferred.resolve();\n } else {\n deferred.reject();\n }\n promise = deferred.promise;\n } else {\n promise = $q.when(result);\n }\n return promise;\n }", "title": "" }, { "docid": "fa4d11fde3ec7caff3dc329d5afa2d8e", "score": "0.5820314", "text": "static fetchRestaurantById(id) {\n // fetch all restaurants with proper error handling. \n //console.log('fetching restaurant based on id');\n return IDBHelper.fetchRestaurants()\n .then( (restaurants) => { \n ////console.log(restaurants);\n const restaurant = restaurants.find(r => r.id == id);\n if (restaurant) { // Got the restaurant\n return Promise.resolve(restaurant);\n } else {\n return Promise.reject(error);\n }\n }); \n }", "title": "" }, { "docid": "1bf426e637c00b72b972617e29d9b719", "score": "0.5812023", "text": "function query_promise_then(url) {\n var i;\n if(/skincarisma\\.com/.test(url))\n {\n url=url.replace(/\\/$/,\"\")+\"/ingredient_list\";\n }\n\n const parsePromise = new Promise((resolve, reject) => {\n GM_xmlhttpRequest({method: 'GET', url: url,\n onload: function(response) { try_parsers[my_query.try_count](response,resolve,reject); },\n onerror: function(response) { reject(\"Fail\"); },\n ontimeout: function(response) { reject(\"Fail\"); }\n });\n });\n parsePromise.then(parse_promise_then)\n .catch(function(val) { my_query.try_count++; parse_promise_fail(val); });\n\n\n }", "title": "" }, { "docid": "824d62b874d2fe45542be57aec1386c8", "score": "0.58111084", "text": "getAdCreative(resolve, reject, campaign) {\n console.log('Getting creative for campaign ' + campaign);\n\n const dao = new Dao();\n const p = new Promise((res, rej) => {\n dao.getCreativeByBrandId(res, rej, campaign.ad_brand_id);\n });\n\n p.then((res) => { \n resolve(res);\n }).catch((err) => { \n console.log('rejected:', err); \n reject(err);\n });\n }", "title": "" }, { "docid": "a85f53b769247e0dd2527b192eb91504", "score": "0.5803795", "text": "getDataPromise() {\n return this.fetchData();\n }", "title": "" }, { "docid": "ee8bf38b465c08952393ca766cf94a39", "score": "0.58002037", "text": "save() {\n\t\treturn Promise.resolve()\n\t}", "title": "" }, { "docid": "f12bec08afa9269bd978a854b6e55006", "score": "0.5799728", "text": "toPromise() {\n return new Promise((resolve, reject) => {\n this.onComplete(_ => _.fold(reject, resolve));\n });\n }", "title": "" }, { "docid": "9ad8b245e19e1f645267dfd86e417b4a", "score": "0.57961917", "text": "function query_promise_then(result) {\n console.log(\"query_promise_then,result=\"+result);\n my_query.domain=MTP.get_domain_only(result,true);\n\n var lname=my_query.fullname.lname.replace(/\\'/g,\"\"),fname=my_query.fullname.fname.replace(/\\'/g,\"\");\n var search_str=\"+\\\"\"+fname.charAt(0).toLowerCase()+lname.toLowerCase()+\"@\"+my_query.domain+\"\\\" OR \"+\n \"+\\\"\"+lname.toLowerCase()+fname.charAt(0).toLowerCase()+\"@\"+my_query.domain+\"\\\" OR +\\\"\"+\n fname+lname+\"@\"+my_query.domain+\"\\\"\";\n console.log(\"new search_str for emails =\"+search_str);\n const emailPromise = new Promise((resolve, reject) => {\n console.log(\"Beginning URL search in query_promise_then\");\n my_query.done.email_query=false;\n query_search(search_str, resolve, reject, query_response,\"email_query\");\n });\n emailPromise.then(email_promise_then)\n .catch(function(val) {\n console.log(\"Failed at this queryPromise \" + val);\n my_query.done.email=true;\n my_query.done.email_query=true;\n check_and_submit();\n\n });\n }", "title": "" }, { "docid": "55e0b183b213586b8b00ca0cd6f2158e", "score": "0.57929534", "text": "getBookingIdStat(newBooking)\n { \n // return promise (asynchronous function method)\n // https://developers.google.com/web/fundamentals/primers/promises\n return new Promise((resolve, reject) => { \n Booking.getBookingIdStat(newBooking, (err, res) => {\n if (err) {\n reject(err);\n }\n resolve(res);\n });\n });\n }", "title": "" }, { "docid": "8fba8788949b0b8a88af8cf7445d4962", "score": "0.5785703", "text": "async function callingPromise() {\n const name = await call.withPromise(\"Juan Balceda\");\n console.log(name)\n}", "title": "" }, { "docid": "e71e797a340fee2265633a0a1e825351", "score": "0.57769966", "text": "async function callWithPromise()\n{\n const fullName = await call.withPromise(\"Eduardo\", \"Rasgado\");\n console.log(fullName);\n}", "title": "" }, { "docid": "070f82bc92435903da51cf2784655e86", "score": "0.57696944", "text": "function fooOld() {\n return barPromise()\n .then((res) => {\n resolve(res);\n }, (err) => {\n reject(err);\n });\n }", "title": "" }, { "docid": "e68858c1b4eccd4046e0db30cae048ff", "score": "0.5760827", "text": "GET_PURCHASEORDER_CREATE_PI(context, slug) { \n context.commit(\"CLEAR_ERROR\");\n return new Promise((resolve, reject) => {\n ApiService.setHeader();\n ApiService.get(\"/api/purchaseorder/getpo\", slug)\n .then(result => {\n console.log(result, \"result purcahse\");\n resolve(result);\n // context.commit(\"SET_PURCHASEORDER\", result.data);\n })\n .catch(err => {\n reject(err);\n context.commit(\"SET_ERROR\", { result: err.message });\n });\n });\n }", "title": "" }, { "docid": "6f52cb3d6688856259ebd30dbdd4aaf1", "score": "0.57588315", "text": "async queryCoorByShop(shop){ //a function that returns a promise\n const address = shop.address;\n const addressString = address.street + ' ' + address.houseNr + ',' + address.postcode + ' ' + address.city;\n return Promise.resolve(\n provider.search({ query: addressString})\n .then(result => {\n let shopData = {\n shop: shop,\n coordinate: result[0]\n }\n return shopData;\n })\n )\n }", "title": "" }, { "docid": "841db6b1a8630e8716614d6f1ae5f807", "score": "0.5758414", "text": "function question6(promise) {\n // TODO\n return /* ??? */\n}", "title": "" }, { "docid": "39a06a84b47aa07339fb9385c7b7fa29", "score": "0.5757371", "text": "function getUserUsingPromise() {\n //return promise\n return new Promise((resolve, reject) => {\n let user = {\n id: 2,\n name: 'admin'\n };\n if (user) {\n setTimeout(resolve, 2000, user);\n } else {\n setTimeout(reject, 100, { id: 400, message: 'something went wrong' })\n }\n })\n\n}", "title": "" }, { "docid": "7f3606b686f50ede05f761f576957096", "score": "0.5741295", "text": "function getPromise(item) {\n const url = 'http://13.211.158.6:3000/checkFile';\n let promise = new Promise(function (resolve, reject) {\n const XHR = new XMLHttpRequest();\n XHR.open(\"POST\", url);\n XHR.setRequestHeader(\"Content-Type\", \"application/json;charset=UTF-8\");\n XHR.onload = resolve;\n XHR.onerror = reject;\n XHR.send(JSON.stringify({ \"url\": item.url }))\n })\n return promise;\n}", "title": "" }, { "docid": "43602d846b210a4b0d537736325d3819", "score": "0.57352966", "text": "_createFakeResult(filePath) {\n return Promise.resolve({\n filePath,\n messages: []\n });\n }", "title": "" }, { "docid": "2fd399ab1c6c4ed61924ec56edf25616", "score": "0.5723902", "text": "_resolve() {\n deferred.resolve()\n }", "title": "" }, { "docid": "757f2462e9b9fe0e5309fef8cb560b50", "score": "0.57131475", "text": "_executeAsPromise (method, model, params) {\n return new Promise((resolve, reject) => {\n if(!this.db) reject(\"DB_ERROR\")\n this.db.models[model][method](params, (err, result) => {\n if(err) reject(err)\n else resolve(result)\n })\n })\n }", "title": "" }, { "docid": "66c1eaab2669914c7d3954b9bd608d43", "score": "0.57045346", "text": "upload() {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n this.start();\n\n return this.promise\n }", "title": "" }, { "docid": "db30b0172cb76c53a8f116bf3fee5277", "score": "0.57034487", "text": "initialize() { return Promise.resolve(this); }", "title": "" }, { "docid": "6d4afc475aa0abb3dbf5acc64ff1da84", "score": "0.5702628", "text": "init() { return Promise.resolve(null); }", "title": "" }, { "docid": "1ba79adc1ee7f611012de7d6a8e6a250", "score": "0.5702513", "text": "function promiseApi(arg) {\n return new Promise((resolve) => {\n setTimeout(() => {\n resolve(arg)\n }, 1000)\n })\n}", "title": "" }, { "docid": "640ee653aecf4b055169ba1daf328d29", "score": "0.569982", "text": "getContatosSlow() {\n return new Promise((resolve, reject) => {\n setTimeout(resolve, 3000);\n })\n .then(() => {\n console.log(\"Primeiro then\");\n return 'Angular 2 - Promise';\n })\n .then((params) => {\n console.log(\"Segundo then\");\n console.log(params);\n })\n .then(() => {\n console.log(\"Terceiro then\");\n return this.getContatos();\n });\n }", "title": "" }, { "docid": "758d1c40f0c5554eaa74abd5c11f06a2", "score": "0.56942886", "text": "addSingleTag(VideoId, Name){\n return new Promise((resolve, reject)=>{\n var tag = new TagsDB({\n VideoId: VideoId,\n Name: Name,\n Date: new Date()\n })\n tag.save()\n .then((result)=>{\n console.log(result)\n TagsDB.find({VideoId: VideoId})\n .then((tags)=>{\n var tagsArray = [];\n for(var x in tags){\n tagsArray.push([tags[x]._id, tags[x].Name]);\n }\n console.log(tagsArray)\n resolve(tagsArray)\n })\n })\n .catch((err)=>{\n resolve(err)\n })\n\n })\n \n }", "title": "" }, { "docid": "d6e764d9aee870510b375c435ef099fb", "score": "0.5692196", "text": "_addPlaneAction(message) {\n\n return new Promise((resolve, reject) => {\n\n let _plane; //scope cheating\n\n //create plane \n PlaneRepository.create(message.data)\n .then((plane) => {\n _plane = plane\n console.log('Plane ' + plane._id + ' was created');\n\n //update airport\n return Promise.all([\n AirportRepository.addPlaneToInBoundPlanes(this.airportData._id, plane._id),\n AirportRepository.addPlane(this.airportData._id, plane)\n ])\n\n })\n .then(() => {\n //update curent instances\n this.airportData.planes.push(_plane);\n this.airportData.inBoundPlanes.push(_plane)\n\n //increase emergancey counter\n if (_plane.mission == Plane.MISSION_TYPE.EMERGENCY_LANDING) {\n this.emergencyCounter++;\n }\n\n resolve();\n })\n .catch((err) => {\n reject(err);\n })\n\n });\n }", "title": "" }, { "docid": "8ece90b96023f30a49dead86ace6b1f6", "score": "0.56920666", "text": "function saludar(saludo) {\n return new promises((resolve, reject) => {\n console.log(saludo)\n console.log(error)\n })\n\n}", "title": "" }, { "docid": "90bfefeaaa4da8ee5574c29121e95f11", "score": "0.56892157", "text": "function query_promise_then(result) {\n console.log(\"result=\"+JSON.stringify(result));\n my_query.practice_url=result;\n if(/\\.webmd\\.com/.test(result)) {\n return;\n }\n\n my_query.fields['09_website_01']=result;\n add_to_sheet();\n var promise=MTP.create_promise(my_query.practice_url,scrape_doctor,address_scrape_then,function(response) {\n console.log(\"Failed address\"); },{type:\"\",depth:0});\n\n }", "title": "" }, { "docid": "fc8e8a4dbc42d734fccdecab3136cdd0", "score": "0.5681919", "text": "function create_promise(search_str,i)\n {\n const queryPromise = new Promise((resolve, reject) => {\n console.log(\"Beginning URL search\");\n query_search(search_str+\" site:\"+my_query.sites[i].domain, resolve, reject, query_response,i);\n });\n if(my_query.sites[i].domain===\"facebook.com\")\n {\n queryPromise.then(query_promise_then)\n .catch(function(val) {\n console.log(\"Failed at this queryPromise \"+my_query.sites[i].domain +\", \"+ val); GM_setValue(\"returnHit\",true); });\n }\n else\n {\n queryPromise.then(query_promise_then\n )\n .catch(function(val) {\n console.log(\"Failed at this queryPromise \"+my_query.sites[i].domain +\", \"+ val); GM_setValue(\"returnHit\",true); });\n }\n return queryPromise;\n\n }", "title": "" }, { "docid": "6886d33203ed9696d00c358596739d63", "score": "0.56710035", "text": "function get_existing_promise(name) {\n if (!(name in PCL_VARS.PROMISES_DICT)) {\n throw \"Promise does not exist \" + name;\n }\n return PCL_VARS.PROMISES_DICT[name].promise;\n}", "title": "" }, { "docid": "16fd9e2ed22ef36d7450f20c1425a86f", "score": "0.5667622", "text": "function successfulPromise() {\n return new Promise((res, rej) => {\n res(\"success!\");\n })\n}", "title": "" }, { "docid": "95c544263420c5d72f061024a5016b6b", "score": "0.56604505", "text": "function getSearchKeywordRecord(sql)\n{\n return new Promise(function(resolve, reject) {\n var q = couchbase.N1qlQuery.fromString(sql);\n var rep = [0,0];\n fb_p_bucket.query(q,(err, rows, meta) => {\n if(err){\n\n return reject(err); \n }else{\n rep[1] = meta;\n //rsjson = Object.assign({}, rows);\n rep[0] = rows;\n //console.log(meta);\n return resolve(rep);\n \n }\n });\n\n });\n}", "title": "" }, { "docid": "2f24785f94e958c94ce5528e550d5e43", "score": "0.56587464", "text": "get(id) { return Promise.resolve(); }", "title": "" }, { "docid": "82c6e6a3c8689e08507d359131bff7af", "score": "0.56568867", "text": "getLevelDBData(key){\n let self = this; \n\n // Como estamos retornando uma Promise, precisaremos disso para poder fazer referência a 'this' dentro do construtor Promise\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 resolve(value);\n }\n });\n });\n}", "title": "" }, { "docid": "7c2360a90924328dd1387f42a6a6893d", "score": "0.5654502", "text": "function getFile(file) {\n $(\".loading\").removeClass(\"hidden\");\n let promiseObj = new Promise(function(resolve, reject) {\n let xhr = new XMLHttpRequest();\n xhr.open(\"GET\", file, true);\n xhr.send();\n xhr.onreadystatechange = function() {\n if (xhr.readyState === 4) {\n if (xhr.status === 200) {\n console.log(\"xhr done successfully\");\n let resp = xhr.responseText;\n resolve(resp);\n } else {\n reject(xhr.status);\n console.log(\"xhr failed\");\n }\n } else {\n console.log(\"xhr processing going on\");\n }\n };\n console.log(\"request sent succesfully\");\n });\n return promiseObj;\n}", "title": "" }, { "docid": "1a38bcbc26f5ae07665e8aac82dbda93", "score": "0.56529933", "text": "function templateFunction() {\n // DEFINE LOCAL VARIABLES\n // RETURN ASYNC WORK\n return new Promise(function(resolve, reject) {\n\n });\n}", "title": "" }, { "docid": "1a38bcbc26f5ae07665e8aac82dbda93", "score": "0.56529933", "text": "function templateFunction() {\n // DEFINE LOCAL VARIABLES\n // RETURN ASYNC WORK\n return new Promise(function(resolve, reject) {\n\n });\n}", "title": "" }, { "docid": "cb49febca529b7cea8698a1256547aac", "score": "0.5652597", "text": "function doWorkPromise(data) {\n return new Promise(function () {\n\n });\n}", "title": "" }, { "docid": "b6468bbe989eff9fc1aa490d2e0e5f09", "score": "0.56525695", "text": "_tryInvocation( context, command, commandArguments ) {\n\n\t\tvar promise = new Promise(\n\t\t\tfunction( resolve, reject ) {\n\n\t\t\t\tPromise\n\t\t\t\t\t.resolve( command.apply( context, commandArguments ) )\n\t\t\t\t\t.then( resolve, reject )\n\t\t\t\t;\n\n\t\t\t}\n\t\t);\n\n\t\treturn( promise );\n\n\t}", "title": "" }, { "docid": "1382d892e5d7c340068a8b1ce5c91511", "score": "0.56523037", "text": "function query_promise_then(result) {\n my_query.totalDealers++;\n var promise=MTurkScript.prototype.create_promise(result.url,DQ.init_DQ,done_dealer,my_catch_func,result.name);\n }", "title": "" }, { "docid": "d9529d24236c9ad3f713be3c73e52631", "score": "0.56499285", "text": "function resolvePromise(response,status,headers){// normalize internal statuses to 0\nstatus=Math.max(status,0);(isSuccess(status)?deferred.resolve:deferred.reject)({data:response,status:status,headers:headersGetter(headers),config:config});}", "title": "" }, { "docid": "62b08a20c3c328761518666fefe77025", "score": "0.5648727", "text": "then(){\n return this;\n }", "title": "" }, { "docid": "f7ef5c46215a7186759621ec04e838c5", "score": "0.56470114", "text": "function callbackToPromise(fn,context,callbackArgIndex){return function(){\n// If callbackArgIndex isn't provided, use the last argument.\nvoid 0===callbackArgIndex&&(callbackArgIndex=arguments.length>0?arguments.length-1:0);var callbackArg=arguments[callbackArgIndex];if(\"function\"!=typeof callbackArg){for(var args=[],i=0;i<arguments.length;i++)args.push(arguments[i]);return new Promise(function(resolve,reject){args.push(function(err,result){err?reject(err):resolve(result)}),fn.apply(context,args)})}fn.apply(context,arguments)}}", "title": "" }, { "docid": "0888006ea98c3f7fc151b33cc25d56b3", "score": "0.5646538", "text": "function returnspromise(resolveAfter) {\n return new Promise((resolve, reject) => {\n if (typeof resolveAfter == \"number\") {\n setTimeout(() => {\n resolve(console.log(\"I am called asynchronously\"));\n }, resolveAfter * 1000);\n } else {\n reject(console.log(\"it is not a number\"));\n }\n });\n}", "title": "" }, { "docid": "aef1238ed6881a876a6c2bff3ac50024", "score": "0.56442034", "text": "function getAllChecklists() {\n // NOTIFY PROGRESS\n console.log('in the getAllChecklists method');\n\n // RETURN ASYNC WORK\n return new Promise(function getAllChecklistsPromise(resolve, reject) {\n\n firebase.read('checklists').then(function success(s) {\n resolve(s)\n }).catch(function error(e) {\n reject(e);\n });\n });\n\n}", "title": "" }, { "docid": "f39f8609f74a2ef1bdf34ab1916d32fe", "score": "0.5640373", "text": "getBookingUserIdStat(newBooking)\n { \n // return promise (asynchronous function method)\n // https://developers.google.com/web/fundamentals/primers/promises\n return new Promise((resolve, reject) => { \n Booking.getBookingUserIdStat(newBooking, (err, res) => {\n if (err) {\n reject(err);\n }\n resolve(res);\n });\n });\n }", "title": "" }, { "docid": "ed2b5aadb12074026d0519c7cb599f25", "score": "0.5637338", "text": "function Promise() {\n}", "title": "" }, { "docid": "ed2b5aadb12074026d0519c7cb599f25", "score": "0.5637338", "text": "function Promise() {\n}", "title": "" }, { "docid": "0bae0f1c7c87bc13e9f792f9f93cc32e", "score": "0.56372166", "text": "then(func) {\n this._ensure_no_halt()\n return Promise.resolve().then(func)\n }", "title": "" }, { "docid": "f9da60fc1a98b34c832b653ed906d2d0", "score": "0.56361705", "text": "getProductByID(productID) {\n return new Promise(async (resolve, reject) => {\n\n const requestedProduct = this.state.products.find(productElem => (productElem?._id === productID));\n if (requestedProduct) {\n resolve(requestedProduct);\n } else {\n try {\n const response = await ProductService.getProductByID(productID);\n /* if matching record found. then resolve it. */\n if (response.status === 200) {\n /* 200 - OK. */\n const retrievedProduct = JSON.parse(response.data);\n this.setState(((prevState) => prevState.products.unshift(retrievedProduct)));\n resolve(retrievedProduct);\n }\n } catch (error) {\n reject(error);\n }\n }\n });\n }", "title": "" }, { "docid": "ccbd2a9e1912a5028af86149e5aaab4b", "score": "0.56347007", "text": "selectWord(data)\n {\n var w = data + \" \" + this.room.currentWord;\n this.submission = data;\n\n //console.log(w);\n\n this.room.update();\n\n return new Promise(function(resolve, reject)\n {\n trendingAPI.getPopularity(w).then(function(result)\n {\n console.log(\"api result for \" + result + w);\n resolve(result);\n }).catch(function(err){\n console.log(err);\n })\n });\n\n\n }", "title": "" }, { "docid": "4e1a9ac9ebea37d7f0270a5107a52c8e", "score": "0.56306845", "text": "_handleUpload(imageFile){\n return Promise.resolve(\"http://lorempixel.com/800/100/cats/\");\n }", "title": "" }, { "docid": "eaf7da6b70c109c975bf5f8af2a1ff87", "score": "0.56306654", "text": "function sayHello() {\n return Promise(function(resolve, reject) {\n resolve('hello');\n });\n }", "title": "" }, { "docid": "01fce2de5383f1f7c6e6c91ad853dfb7", "score": "0.56300795", "text": "setup() {\n return Promise.resolve();\n }", "title": "" }, { "docid": "d1fb20cbbeccf34aaea11c3fca5788d2", "score": "0.5627807", "text": "wait(jobId) {\n let job = this.jobs[jobId];\n if (job.executed) {\n delete this.jobs[jobId];\n }\n return job ? job.getPromise() : undefined;\n }", "title": "" }, { "docid": "5aa9229cea81e8f10aaf55618a28d4a9", "score": "0.5627132", "text": "accion(funcion) {\n return new Promise((resolve, reject) => {\n resolve(funcion);\n });\n }", "title": "" }, { "docid": "c9c0c25daf1168b90b2e0d1b922cc750", "score": "0.5625193", "text": "function returnPromise() {\n return new Promise(function(resolve, reject) {\n return true ? resolve(true) : reject(true);\n });\n}", "title": "" }, { "docid": "0fc3b5b7fd15531960afa62afb171ccc", "score": "0.5622978", "text": "async function f4(isTobeResolvedSuccessfully) {\n if (isTobeResolvedSuccessfully) {\n return Promise.resolve(123);\n } else {\n return Promise.reject('Failed to retrieve the value.');\n // throw new Error('Failed to retrieve the value.'); \n }\n }", "title": "" }, { "docid": "7d70be1ad84ba3eabd4391fdc4eef338", "score": "0.5613215", "text": "handleGetGiftAidDeclaration(){\n getGiftAidDeclaration({\n recordId: this.recordId\n })\n .then((results) => {\n if(results == null){\n this.displayGAD = false;\n this.giftAidDeclaration = null;\n this.loading = false;\n } else {\n this.displayGAD = true;\n this.giftAidDeclaration = results;\n this.loading = false;\n }\n this.errors = undefined; \n })\n .catch((error) => {\n this.errors = JSON.stringify(error);\n this.displayGAD = false;\n this.giftAidDeclaration = null;\n this.loading = false;\n }); \n }", "title": "" }, { "docid": "dee556a46ee461f5eedbce3a1c69db06", "score": "0.56078666", "text": "then(onFulfilled, onRejected) {\n\n let derivedPromise = new Promise();\n\n if(onFulfilled instanceof Function){\n\n this.onFulfilled.push(onFulfilled);\n\n\n\n }\n\n if(onRejected instanceof Function){\n\n this.onRejected.push(onRejected);\n\n\n }\n\n\n return derivedPromise;\n\n }", "title": "" }, { "docid": "d165cbc88b4dfdd911f576c50dc404ab", "score": "0.5594454", "text": "getTopicList() {\n let prResolve;\n let pr = new Promise((resolve, reject) => {\n prResolve = resolve;\n });\n let sqlQuery = `SELECT * FROM topic ORDER BY topic_created_at desc `;\n this.connection.query(sqlQuery, (error, result) => {\n if (error) throw error;\n prResolve(result);\n });\n return pr;\n }", "title": "" }, { "docid": "8c734803d98d1883523b6dcec4dca6bb", "score": "0.5594024", "text": "async get_message(msgid) { \n var return_value = false;\n return new Promise((resolve, reject) => {\n this.db().get(\"SELECT * FROM messages WHERE msgid = ?\", [msgid], (error, row) => {\n if(!error) {\n resolve(row);\n } else {\n // Provide feedback for the error\n console.log(error);\n resolve(false);\n }\n });\n }); \n }", "title": "" }, { "docid": "b0889fc94ff95dbfc7b6dcc024322ffd", "score": "0.5592377", "text": "async function getOrderBook() {\n return Promise.resolve();\n }", "title": "" }, { "docid": "445f9a2dfb59c1a6a680e3259db801c5", "score": "0.5589689", "text": "function promiseFor(doc) {\n var deferred = $q.defer();\n deferred.resolve(doc);\n return deferred.promise;\n }", "title": "" } ]
e67a59ca077a926e67cd7632f7f1ad63
highly specialized: better place? document?
[ { "docid": "3bd67ccc8206f0010c926fc900939a8a", "score": "0.0", "text": "function getOriginValue() {\n //jshint validthis: true\n // thisval is a instance of `Field`\n return this.row.getOriginData(this.name);\n }", "title": "" } ]
[ { "docid": "d7ab55f66f4a5892b50854237878b0d3", "score": "0.59392065", "text": "document() {\n _explanation.get(this).forEach(explanation => {\n const line = explanation.loc.start.line;\n\n this.specificDocumentation(line, explanation);\n });\n }", "title": "" }, { "docid": "575d103806dce8be85be0b7e4cd814cf", "score": "0.5866885", "text": "function Rd(){}", "title": "" }, { "docid": "2ce16e40f5505e06aae9b9b8c6c1c58d", "score": "0.5674705", "text": "function Document() {}", "title": "" }, { "docid": "acffe366305a123ddf65c9f97713c0bb", "score": "0.56603074", "text": "function ___PRIVATE___(){}", "title": "" }, { "docid": "6ceb0ec8b0eab17dc2b5e4e87cb28060", "score": "0.54405445", "text": "content(doc) {\n return 'simple html representation of your doc'; // (OPTIONAL) If your site is generated after Sanity content updates you can use this for better real time feedback\n }", "title": "" }, { "docid": "72a01361ba546b60562b4d1f652a2c24", "score": "0.5401002", "text": "function renderLocation (docEl, param) {\n return docEl.toString();\n}", "title": "" }, { "docid": "cfe135ae140f42613f6c99c80883c211", "score": "0.5339348", "text": "function Handbook() {\n var toc = walkSync(loc),\n idx = this.idx = lunr(function setupLunr() {\n this.field('title', { boost: 10 });\n this.field('body');\n });\n\n Object.keys(toc).forEach(function loopSections(section) {\n Object.keys(toc[section]).forEach(function loopPages(page) {\n var document = read((section !== 'index' ? section + '/' : '') + page);\n\n idx.add({\n id: section + '/' + page,\n title: document.title,\n body: document.content\n });\n });\n });\n}", "title": "" }, { "docid": "cc7e0a003e0d210febca70385bc9a54d", "score": "0.5328645", "text": "function placeIt(elem,leftPos,topPos) {\r\ndocObj = eval(doc + elem + sty);\r\nif (n4 || n6) {\r\ndocObj.left = leftPos;\r\ndocObj.top= topPos;\r\n }\r\nif (ie) {\r\ndocObj.pixelLeft = leftPos;\r\ndocObj.pixelTop = topPos;\r\n }\r\n}", "title": "" }, { "docid": "fad758a28abc47a8a37a86a94f47c261", "score": "0.52789104", "text": "function Documentation() {\n var toc = walkSync(loc),\n idx = this.idx = lunr(function setupLunr() {\n this.field('title', {\n boost: 10\n });\n this.field('body');\n });\n\n Object.keys(toc).forEach(function loopSections(section) {\n Object.keys(toc[section]).forEach(function loopPages(page) {\n var document = read((section !== 'index' ? section + '/' : '') + page);\n\n idx.add({\n id: section + '/' + page,\n title: document.title,\n body: document.content\n });\n });\n });\n}", "title": "" }, { "docid": "530b59112107142983591cc8cf27eb59", "score": "0.52732795", "text": "constructor(doc) {\n super(doc);\n }", "title": "" }, { "docid": "7924845923197f151f360c80917812fa", "score": "0.5271156", "text": "function newDoc(){\r\n\tset('V[z_migo_*]','');\r\n}", "title": "" }, { "docid": "47cf7ad3cad1b439a74861217ae08849", "score": "0.52674997", "text": "function paraHd()\n {\n var retVal = \"\";\n\n loc = doc.parentNode.parentNode.location.toString();\n retVal = retVal + \"# FILE: \"+loc.substr(loc.lastIndexOf('/')+1)+\"\\n\";\n for (tag in tag_stck)\n {\n if (tag_stck[tag])\n retVal = retVal + \"# TAG: \"+tag_stck[tag]+\"\\n\";\n }\n retVal = retVal + \"# KW_PARID: \"+par_idx+\"\\n\";\n retVal = retVal + \"# FIELDS: \"+\"\\n\";\n\n return retVal;\n }", "title": "" }, { "docid": "7a416b8dc6073a00c73d6219baa5b506", "score": "0.52451384", "text": "enterDoc(ctx) {\n\t}", "title": "" }, { "docid": "7a416b8dc6073a00c73d6219baa5b506", "score": "0.52451384", "text": "enterDoc(ctx) {\n\t}", "title": "" }, { "docid": "80664062924981c8b85bf418a8c76277", "score": "0.5235342", "text": "function PdfDocumentTemplate() {\n //\n }", "title": "" }, { "docid": "80664062924981c8b85bf418a8c76277", "score": "0.5235342", "text": "function PdfDocumentTemplate() {\n //\n }", "title": "" }, { "docid": "b4aa18240cee8fbffebe64d8818fa5d3", "score": "0.52175117", "text": "function docFactory(oListItem, type) {\n var doc = new Doc();\n if (oListItem != null && type == IH1600.enum.contentType.DEP) { \n doc.codeIh1600 = oListItem.get_item(IH1600.field.info.Codification.internalName);\n doc.id = oListItem.get_id();\n doc.title = oListItem.get_item(IH1600.field.info.Title.internalName);\n doc.status = oListItem.get_item(IH1600.field.info.StatusCurrent.internalName);\n doc.site = new Term(RNVO.common.ensureValue(oListItem, IH1600.field.info.Site.internalName));\n doc.projet = new Term(RNVO.common.ensureValue(oListItem, IH1600.field.info.Projet.internalName));\n doc.type = new Term(RNVO.common.ensureValue(oListItem, IH1600.field.info.Typologie.internalName));\n doc.version = oListItem.get_item(IH1600.field.info.Indice.internalName);\n doc.revision = oListItem.get_item(IH1600.field.info.EDFRevision.internalName);\n doc.verificationStatus = oListItem.get_item(IH1600.field.info.Verification.internalName);\n doc.item;\n doc.type;\n doc.filename;\n doc.fileurl;\n doc.getFileInfo();\n }\n else if (oListItem != null && type == IH1600.enum.contentType.REF) {\n doc.codeIh1600 = oListItem.get_item(IH1600.field.info.Codification.internalName);\n doc.id = oListItem.get_id();\n doc.title = oListItem.get_item(IH1600.field.info.Title.internalName);\n doc.status = IH1600.enum.status.BPE;\n doc.site = new Term(RNVO.common.ensureValue(oListItem, IH1600.field.info.Site.internalName));\n doc.projet = new Term(RNVO.common.ensureValue(oListItem, IH1600.field.info.Projet.internalName));\n doc.type = new Term(RNVO.common.ensureValue(oListItem, IH1600.field.info.Typologie.internalName));\n doc.version = oListItem.get_item(IH1600.field.info.Indice.internalName);\n doc.revision = \"\";\n doc.verificationStatus = \"\";\n doc.item;\n doc.type;\n doc.filename;\n doc.fileurl;\n doc.getFileInfo();\n }\n \n return doc;\n}", "title": "" }, { "docid": "367d1ba9f7aaaf2e51deedac35374288", "score": "0.5199765", "text": "showDocs(page) {\n throw \"Not Implemented: showDocs\"\n }", "title": "" }, { "docid": "e2b22edebed453fe2d81b09df23c6ccf", "score": "0.5195465", "text": "constructor(doc) {\n super(doc);\n }", "title": "" }, { "docid": "5635a24ccf1e8e81d6ff665e8e66d0a3", "score": "0.5157782", "text": "constructor(doc) {\n super(doc);\n }", "title": "" }, { "docid": "5635a24ccf1e8e81d6ff665e8e66d0a3", "score": "0.5157782", "text": "constructor(doc) {\n super(doc);\n }", "title": "" }, { "docid": "9c8f058cb48373fcb6b6be54006c19ac", "score": "0.51516306", "text": "function GENERATE_DOC(text) {\n return '/**\\n' + text + ' */\\n';\n}", "title": "" }, { "docid": "c03ac3aa2263fba2e9774f98fd618e7c", "score": "0.5139271", "text": "function hereDoc(f) {\n\treturn f.toString()\n\t\t.replace(/^[^\\/]+\\/\\*!?/, '')\n\t\t.replace(/\\*\\/[^\\/]+$/, '');\n}", "title": "" }, { "docid": "96aa087dff1181bc4ab9330ba801e7e1", "score": "0.51359546", "text": "function formatDocumentGen(docs) {\n var formattedDocumentGen = '';\n for (i = 0; i < docs.length; i++) {\n formattedDocumentGen += paragraphConstructorGen(docs, i);\n }\n return formattedDocumentGen;\n}", "title": "" }, { "docid": "31ce1d5e6856e8ccba34f2b7ae54cc53", "score": "0.51246667", "text": "function generateDoc( name ) {\n\ttry {\n\t\t\t//reset globals\n\t\t\t\t//it still exists because it was necessary to do it this way in python\n\t\t\t\t//and I haven't changed it during the translation\n\t\tGlobals = {\"useEventPop\":false, \"saveHref\":false, \"spop\":{\"str\":0, \"num\":0, \"lst\":0, \"fnc\":0, \"dsc\":0}};\n\t\t\t//get an object with the html-converted data\n\t\tvar data = getDocData( functions[name] ),\n\t\t\t\t//insert everything into the doc base string\n\t\t\thtml = htmlBase.replace( /%b/g, name.slice( 0, 6 ) == \"Create\"?\n\t\t\t\t\tsubfHead.replace( /%t/g, name.slice( 6 ) ).replace( /%f/g, data.mets ) : \"\"\n\t\t\t\t).replace( /%c/g, \"app.\" + name + \"(\" + data.args + \")\" + data.ret\n\t\t\t\t).replace( /%d/g, replW( functions[name].desc.replace( \"Create\", \"\" ) )\n\t\t\t\t).replace( /%p/g, data.pops\n\t\t\t\t).replace( /%s/g, getSampleDivs( name )\n\t\t\t\t).replace( /%t/g, name\n\t\t\t\t).replace( /pop\\_\\?/g, \"pop_std_ukn\"\n\t\t\t\t);\n\t\t\t//save doc file\n\t\tapp.WriteFile( path + \"docs\" + getl() + \"/app/\" + name + \".htm\" , html );\n\t} catch(e) { app.Alert( e, \"while generating \" + name + \".htm:\", \"\", 255 ); }\n}", "title": "" }, { "docid": "0cdf65f25a53f2e02ba12b01b9a392c2", "score": "0.5123443", "text": "function ImbaServerDocument(){ }", "title": "" }, { "docid": "cd26f8dae2a9427fabf26a56bcf4a793", "score": "0.5058531", "text": "function Documents($uhr, $config) {\n this._uhr = $uhr;\n this._config = $config;\n this.locale = l10nHelper.getCurrentLocale(this.$context).split('-')[0];\n // ComponentBase.call(this);\n\t// StaticStoreBase.call(this);\n}", "title": "" }, { "docid": "da13d1bcc85012b2129ae0a6bc2bd7b9", "score": "0.50472397", "text": "function accessext_Document(doc) {\r\n\t this.doc = doc;\r\n\t if (this.doc) {\r\n\t var head = doc.getElementsByTagName('head');\r\n\t if (head.length == 1) {\r\n\t this.head = head[0];\r\n\t }\r\n\t }\r\n\t}", "title": "" }, { "docid": "03228e2b301ed00d39435f7798dd9886", "score": "0.5037613", "text": "function printDocInfo(docModelList){\r\n\ttry{\r\n\t\tvar count = 0;\r\n\t var documentList = aa.util.newArrayList();\r\n\t // var fileNameList = aa.util.newArrayList();\r\n\r\n\t var it = docModelList.iterator();\r\n\t comment(\"This is iterator:\" + it);\r\n\t while (it.hasNext()) {\r\n\t var docModel = it.next();\r\n\t //updating aa.print with logDebug - jec 8.23.17\r\n\t logDebug(\"File Name[\" + count + \"] is:\" + docModel.getFileName());\r\n\t //fileNameList.push(docModel.getFileName());\r\n\t logDebug(\"File Type[\" + count + \"] is:\" + docModel.getDocType());\r\n\t comment(\"Doc Type = \" + docModel.getDocType());\r\n\t logDebug(\"EDMS Name[\" + count + \"] is:\" + docModel.getSource());\r\n\t logDebug(\"Department[\" + count + \"] is:\" + docModel.getDocDepartment());\r\n\t logDebug(\"Description[\" + count + \"] is:\" + docModel.getDocDescription());\r\n\t logDebug(\"Category[\" + count + \"] is:\" + docModel.getDocCategory());\r\n\t comment(\"Category = \" + docModel.getDocCategory());\r\n\t logDebug(\"Document Name[\" + count + \"] is:\" + docModel.getDocName());\r\n\t logDebug(\"Document Date[\" + count + \"] is:\" + docModel.getFileUpLoadDate());\r\n\t logDebug(\"Document Group[\" + count + \"] is:\" + docModel.getDocGroup());\r\n\r\n\t logDebug(\" \");\r\n\t comment(\"This is docArray: \" + count + \" \" + docModel.getDocName());\r\n\t comment(\"This is docDate: \" + count + \" \" + docModel.getFileUpLoadDate());\r\n\t // comment(\"This is docDate: \" + count + \" \" + docModel.getDocUpLoadBy());\r\n\t //comment(\"This is docDate: \" + count + \" \" + docModel.getUpLoadBy());\r\n\t //comment(\"This is docDate: \" + count + \" \" + docModel.getDocumentUpLoadBy());\r\n\t comment(\"This was uploaded by : \" + count + \" \" + docModel.getFileUpLoadBy());\r\n\t comment(\"This is docNbr: \" + count + \" \" + docModel.getDocumentNo());\r\n\t comment(\"This is docStatus: \" + count + \" \" + docModel.getDocStatus());\r\n\t count++;\r\n\r\n\t // If the doc category is the certain defined category, added.\r\n\t //if (categoryTaskMap != null && categoryTaskMap.size() > 0) {\r\n\t // var categoryIterator = categoryTaskMap.keySet().iterator();\r\n\t // comment(\"This is categoryIterator: \" + categoryIterator);\r\n\t // while (categoryIterator.hasNext()) {\r\n\t // var key = categoryIterator.next();\r\n\t // comment(\"This is key: \" + key);\r\n\t // if (key != null) {\r\n\t // if (key.equals(docModel.getDocCategory())) {\r\n\t // documentList.add(docModel);\r\n\t // if (!categorys.contains(key)) {\r\n\t // categorys.add(key);\r\n\t // }\r\n\t // }\r\n\t // }\r\n\t // }\r\n\t // }\r\n\t }\r\n\t //return documentList;\r\n\r\n\t}catch(err){\r\n\t\tlogDebug(\"An error occurred in custom function printDocInfo Conversion: \" + err. message);\r\n\t\tlogDebug(err.stack);\r\n\t}\r\n}", "title": "" }, { "docid": "ac5afa2cde93d2eef9b32e80830b1126", "score": "0.50254965", "text": "function binDoc (def) {\n if (def.usage) def.usage = binDoc.buildUsage(def.usage, def.name)\n if (def.options) def.options = binDoc.buildOptions(def.options, def.optionAliases)\n var merger = []\n if (def.usage) merger.push(def.usage)\n if (def.options) merger.push(_.values(def.options))\n merger = _.flatten(merger)\n var longestString = binDoc.longestString(_.map(merger, 'field')) + 2\n var output = []\n var intro = []\n if (def.name) intro.push(def.name)\n if (def.description) intro.push(def.description)\n output.push('')\n output.push(intro.join(' - '))\n output.push('')\n if (def.usage) output.push('Usage:')\n _.each(def.usage, function (item) {\n output.push(util.format(' %s%s%s', item.field, binDoc.calculateSpaces(item.field, longestString), item.desc))\n })\n if (def.options) output.push(''); output.push('Options:')\n _.each(def.options, function (item) {\n output.push(util.format(' %s%s%s', item.field, binDoc.calculateSpaces(item.field, longestString), item.desc))\n })\n output.push('')\n return output.join('\\n')\n}", "title": "" }, { "docid": "28c6fa4b419b1cc0b3a878aa0d703991", "score": "0.50132716", "text": "function getElementDocumentation(anElementName,anElement)\n{\n\t//set the background color of all the element of html_doc to transparent\n\tvar htmlElements = document.getElementById(\"html_doc\").getElementsByTagName(\"*\");\n\t\n\t//de-highlight incase...\n\t//document.getElementById(\"html_doc\").style.opacity = '1.0';\n\t\n\t//true if an HMTL Representation was found\n\tvar htmlCheck = false;\n\n\tfor (var y=0; y < htmlElements.length; y++)\n\t{\n\t\t//if the element is a node element\n\t\tif (htmlElements[y].nodeType == 1) \n\t\t{\n\t\t\t//set the background to transparent\n\t\t\thtmlElements[y].style.backgroundColor = 'transparent';\n\t\t\t// if the element has the same xp attribute of the wanted element \n\t\t\tif (htmlElements[y].getAttribute(\"xp\") == anElement.getAttribute(\"xp\")) \n\t\t\t{\n\t\t\t\t//set the background color to yellow\n\t\t\t\thtmlElements[y].style.backgroundColor = 'yellow';\n\t\t\t\t//scroll the div that contains the hmtl representation to the wanted element\n\t\t\t\tswitchTab(\"html_doc\");\n\t\t\t\tdocument.getElementById('html_doc').scrollTop = htmlElements[y].offsetTop - 90;\n\t\t\t\t//html representation founded\n\t\t\t\thtmlCheck = true;\n\t\t\t}\n\t\t\t//alert(htmlElements[y].getAttribute(\"xp\") + \"||||\" + anElement.getAttribute(\"xp\"));\n\t\t}\n\t}\n\t//leave the 'head notes' bg as it was/ they were\n\t$(\".notes-title\").css('background-color', '#ededed');\n\t\n\t//assert the default title as this may change below or from previous click\n\tdocument.getElementById(\"html\").innerHTML = '<div class=\"loader\">HTML representation</div>';\t\n\t\t\n\t//if an HTML representation was not found switch to the technical documentaiton\n\tif(!htmlCheck)\n\t{\n\t\t//change HTML title as reason not to show it as usual default\n\t\tdocument.getElementById(\"html\").innerHTML = '<div class=\"loader\">no HTML representation</div>';\t\n\t\t\n\t\tswitchTab(\"tec_doc\");\t\n\t}\n\n\t//start the ajax loader\n\t//loader('on',\"sem_doc\");\n\n\t//start the ajax loader\n\t//miniLoaderSem('on');\n\n\t//get the element documentation \n\t//retrieveElementDocumentation(anElementName,\"sem_doc\")\n\n\t//start the ajax loader\n\tloader('on',\"tec_doc\");\n\n\t//start the ajax loader\n\tminiLoaderTec('on');\n\n\t//get the element documentation \n\tretrieveElementDocumentationTec(anElementName,\"tec_doc\")\n\n}", "title": "" }, { "docid": "1d6eb62187dc738175c8f3d8286c8e8c", "score": "0.50122935", "text": "function preamble() {\n \tconsole.println(\"[[_0_]]\");\n \tconsole.println(\"= 제목\");\n \tconsole.println(\"Joy <arbago@gmail.com>\");\n \tconsole.println(\"v1.0, \" + getInitDate());\n \tconsole.println(\":icons: font\");\n \tconsole.println(\":sectanchors:\");\n \tconsole.println(\":imagesdir: images\");\n \tconsole.println(\":homepage: http://arbago.com\")\n \tconsole.println(\":toc: macro\\n\");\n \tconsole.println(\"toc::[]\\n\");\n \tconsole.println(\"[preface]\");\n \tconsole.println(\"== 책\\n\");\n \tconsole.println(\"[preface]\");\n \tconsole.println(\"== 머릿말\\n\");\n }", "title": "" }, { "docid": "ca4d1785106cd96f4f18c18af5e1a090", "score": "0.49977824", "text": "function formatDocument(docs) {\n var formattedDocument = '';\n for (i = 0; i < docs.length; i++) {\n formattedDocument += paragraphConstructor(docs, i);\n }\n return formattedDocument;\n}", "title": "" }, { "docid": "4c6af3c97f552001c013f5951e895ed7", "score": "0.49910825", "text": "function docFn(node) {\n\n // doc.more is optional\n var str =\n`/*\n ${node.doc.brief}\n ${node.doc.more || ''}\n*/`;\n\n return str;\n}", "title": "" }, { "docid": "5241626db7f5a0fcc5340325ce7cba41", "score": "0.499042", "text": "function dbgDocLoad() {\n var ttl = oDbgDoc.xhrRSC + oDbgDoc.cbAdd + oDbgDoc.cbToDOM + oDbgDoc.render,\n xhrRSC = oDbgDoc.xhrRSC,\n cbAdd = oDbgDoc.cbAdd,\n cbToDOM = oDbgDoc.cbToDOM,\n render = oDbgDoc.render,\n xhrRcv = oDbgDoc.xhrRcv,\n hgt = 'na',\n t;\n\n if ( t = _id('footer') ) {\n hgt = t.offsetTop + t.offsetHeight;\n hgt = hgt / 1000.0;\n }\n\n ttl = (' ' + Math.round(ttl)).slice(-7);\n\n console.log( aDOMCur.href.match(/[^\\/]+$/)[0].replace(/\\.html/, '') +\n \"\\n DOC TOTAL \" + fmtT( ttl ) +\n \"\\n xhrRSC parse \" + fmtT( xhrRSC ) +\n \"\\n xhrCBDoc add \" + fmtT( cbAdd ) +\n \"\\n xhrCBDoc > DOM \" + fmtT( cbToDOM ) +\n \"\\n render \" + fmtT( render ) +\n \"\\n xhrRcv \" + fmtT( xhrRcv ) +\n \"\\n hgt pixels/1k \" + fmtL( hgt )\n );\n}", "title": "" }, { "docid": "42e3faef451a17013d572927fe3d390b", "score": "0.49662733", "text": "function compile(obj,doc) {\n // handle meta information\n var header = gen_meta(doc['meta']);\n obj.append(header);\n \n // container holder\n var cont = $(\"<div class='cont'></div>\");\n obj.append(cont);\n \n // run the content generator\n var content = gen_sections(doc[\"docs\"]);\n\n // drill down to the last\n if(!doc['meta']['last-height']) {\n\tdoc['meta']['last-height'] = 2;\n }\n insert_last(content,doc['meta']['last-height']);\n\n\n // add a the content to the container\n cont.append(content);\n}", "title": "" }, { "docid": "35ca7f3a0db95812e3910e83296281db", "score": "0.49470845", "text": "function scanDoc(){\n\t\t$('.scanModule, .scanTitle, .attachDocBlock').show();\n\t\t$('.attachModule, .attachTitle, .scanDocBlock').hide();\n\t}", "title": "" }, { "docid": "170945dac3d5cf7b843e57c13c982ced", "score": "0.49285382", "text": "function helper () {}", "title": "" }, { "docid": "c10d3d367e85e9dd06b4275731d3f0ed", "score": "0.4927075", "text": "constructor() {\n super('Documentation', '', 0, 80);\n }", "title": "" }, { "docid": "eddd78450fbbf1a9c93e7a1f514cc6ae", "score": "0.49216262", "text": "function n1373399() { return 'oc'; }", "title": "" }, { "docid": "b7dcbaf594a45c3305558567caa45abc", "score": "0.49055922", "text": "function writeGenericInfo() {\n var w = console.log.bind(console);\n\n w('Reffy is a spec exploration tool.' +\n ' It takes a list of specifications as input, fetches and parses the latest Editor\\'s Draft' +\n ' of each of these specifications to study the IDL content that it defines, the links that it' +\n ' contains, and the normative and informative references that it lists.');\n w();\n w('Reffy only knows facts about specifications that it crawled. Some of the anomalies reported in' +\n ' this report may be false positives as a result, triggered by the fact that Reffy has a very' +\n ' narrow view of the spec-verse.');\n w();\n w('Some anomalies may also be triggered by temporary errors in the Editor\\'s Drafts of the' +\n ' specifications that were crawled such as invalid Web IDL definitions.');\n}", "title": "" }, { "docid": "4d1829de7016c50aaeee4f46e2eeb319", "score": "0.48944244", "text": "function bac_scan_document()\n\t\t{\n\t\t\t//For each element with bac-id\n\t $('*[data-bac-block]').each(function(i) {\n\t bucket = $(this).closest('*[data-bac-bucket]').attr('data-bac-bucket');\n\t block = $(this).attr('data-bac-block');\n\t content = bac_load_content(bucket, block);\n\t $(this).html(content);\n\t }); \n\t\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "2228d2dcbd4278b7a57bb84a7d8d4f4d", "score": "0.48786837", "text": "function jsDocument() {\n\tthis.text = new Array();\t\t//array to store the string\n\tthis.write = function (str) { this.text[this.text.length] = str; }\n\tthis.writeln = function (str) { this.text[this.text.length] = str + \"\\n\"; }\n\tthis.toString = function () { return this.text.join(\"\"); }\n\tthis.writeHTMLHeader = function (strStylesheet) {\n\t\t\tthis.write(\"<html><head>\");\n\t\t\tthis.write(\"<link rel=\\\"stylesheet\\\" href=\\\"\");\n\t\t\tthis.write(strStylesheet);\n\t\t\tthis.writeln(\"\\\">\");\n\t\t\tthis.write(\"</head>\");\n\t}\n\tthis.writeBody = function (style) { this.writeln(\"<body\" + (style ? \" class=\\\"\" + style + \"\\\"\" : \"\") + \">\"); }\n\tthis.writeHTMLFooter = function () { this.writeln(\"</body></html>\"); }\n}", "title": "" }, { "docid": "70e9af3eb2fa1cb80db01c896997a539", "score": "0.48734534", "text": "get _visibleDocTop(){return 0;}", "title": "" }, { "docid": "58b7edec3fb6af4393ba318253f9c4df", "score": "0.4870189", "text": "function initDocStorage() {\n \n docDb.clearProjectInfo();\n docDb.clearDocumentInfo();\n \n docDb.addProject(\"Asunto Oy Demokiinteistö\");\n docDb.addProject(\"Demo Oy, tehdasrakennus\");\n docDb.addProject(\"Firma Oy, pääkonttori\");\n docDb.addDocument(\"Kellari\", \"img/demo-kellari.png\", true);\n docDb.addDocument(\"Kerros-1\", \"img/demo-kerros1.png\", true);\n docDb.addDocument(\"Ullakko\", \"img/demo-ullakko.png\", true);\n docDb.addDocument(\"Asuntotaulukko\", \"img/taulukko.png\", false);\n docDb.addDocument(\"Isännöitsijäntodistus\", \"img/todistus.png\", false);\n}", "title": "" }, { "docid": "f3718c4097fe4ca593df63e0107822ae", "score": "0.48632136", "text": "function placebo() {}", "title": "" }, { "docid": "517b8ae468b4e2c1c86e4b56fa8d4832", "score": "0.48612028", "text": "function PdfCollection() {\n //\n }", "title": "" }, { "docid": "7337525e19543ff833c5ac55e89ac1a3", "score": "0.48556066", "text": "function prin(doc) {\n\tvar d = doc.substr(0,3);\n\tprinttrading(d,doc);\t\n}", "title": "" }, { "docid": "d556dfb4410e0c9129dc9aac5c282017", "score": "0.48450044", "text": "function documentRoutes (req, res, next) {\n let db = req.app.get('db')\n , doc = db.documents[req.params.docid]\n ;\n if (doc) {\n res.type('html');\n document.print(doc, res);\n res.end();\n } else {\n next();\n }\n}", "title": "" }, { "docid": "22cca0d5f38d0a161fbf946e8be31e5e", "score": "0.4836892", "text": "function VIEWAS_boring_default(obj) {\n //log.debug(\"entered VIEWAS_boring_default...\");\n var rep; //representation in html\n\n if (obj.termType == 'literal')\n {\n rep = document.createTextNode(obj.value);\n } else if (obj.termType == 'symbol' || obj.termType == 'bnode') {\n rep = document.createElement('span');\n rep.setAttribute('about', obj.toNT());\n appendAccessIcon(rep, obj);\n rep.appendChild(document.createTextNode(label(obj)));\n if ((obj.termType == 'symbol') &&\n (obj.uri.indexOf(\"#\") < 0) &&\n (Util.uri.protocol(obj.uri)=='http'\n\t || Util.uri.protocol(obj.uri)=='https')) {\n\t // a web page @@ file, ftp;\n var linkButton = document.createElement('input');\n linkButton.type='image';\n linkButton.src='icons/document.png';\n linkButton.alt='Open in new window';\n linkButton.onclick= function () {\n return window.open(''+obj.uri,\n\t\t\t\t ''+obj.uri,\n\t\t\t\t 'width=500,height=500,resizable=1,scrollbars=1')\n }\n linkButton.title='View in a new window';\n rep.appendChild(linkButton);\n }\n } else if (obj.termType=='collection'){\n\t// obj.elements is an array of the elements in the collection\n\trep = document.createElement('table');\n\trep.setAttribute('about', obj.toNT());\n\tvar tr = rep.appendChild(document.createElement('tr'));\n\ttr.appendChild(document.createTextNode('(list of ' + obj.elements.length+')'));\n\tfor (var i=0; i<obj.elements.length; i++){\n\t var elt = obj.elements[i];\n\t var row = rep.appendChild(document.createElement('tr'));\n\t var numcell = row.appendChild(document.createElement('td'));\n\t numcell.setAttribute('about', obj.toNT());\n\t numcell.innerHTML = i + ')';\n\t row.appendChild(outline_objectTD(elt));\n\t}\n } else {\n log.error(\"unknown term type: \" + obj.termType);\n rep = document.createTextNode(\"[unknownTermType:\" + obj.termType +\"]\");\n } //boring defaults.\n log.debug(\"contents: \"+rep.innerHTML);\n return rep;\n} //boring_default!", "title": "" }, { "docid": "e957bfcb7f261c114ce7e4521a24ea39", "score": "0.48357302", "text": "function cd_insertObject(mimeType, objWidth, objHeight, objName, srcFile, viewOnly, shrinkToFit, dataURL, dontcache, ISISDraw) {\n if (cd_currentUsing >= 1 && cd_currentUsing <= 4)\n //!DGB! 12/01 Add a call to cd_AddToObjectArray\n cd_AddToObjectArray(objName);\n document.write(cd_getSpecificObjectTag(mimeType, objWidth, objHeight, objName, srcFile, viewOnly, shrinkToFit, dataURL, dontcache, ISISDraw));\n}", "title": "" }, { "docid": "b03729209823a8ac854debc1db3f3181", "score": "0.48309305", "text": "newDoclet({doclet}) {\n let endTag;\n let tags;\n let stack;\n\n // If the summary is missing, grab the first sentence from the description\n // and use that.\n if (doclet && !doclet.summary && doclet.description) {\n // The summary may end with `.$`, `. `, or `.<` (a period followed by an HTML tag).\n doclet.summary = doclet.description.split(/\\.$|\\.\\s|\\.</)[0];\n // Append `.` as it was removed in both cases, or is possibly missing.\n doclet.summary += '.';\n\n // This is an excerpt of something that is possibly HTML.\n // Balance it using a stack. Assume it was initially balanced.\n tags = doclet.summary.match(/<[^>]+>/g) || [];\n stack = [];\n\n tags.forEach(tag => {\n const idx = tag.indexOf('/');\n\n if (idx === -1) {\n // start tag -- push onto the stack\n stack.push(tag);\n } else if (idx === 1) {\n // end tag -- pop off of the stack\n stack.pop();\n }\n\n // otherwise, it's a self-closing tag; don't modify the stack\n });\n\n // stack should now contain only the start tags that lack end tags,\n // with the most deeply nested start tag at the top\n while (stack.length > 0) {\n // pop the unmatched tag off the stack\n endTag = stack.pop();\n // get just the tag name\n endTag = endTag.substring(1, endTag.search(/[ >]/));\n // append the end tag\n doclet.summary += `</${endTag}>`;\n }\n\n // and, finally, if the summary starts and ends with a <p> tag, remove it; let the\n // template decide whether to wrap the summary in a <p> tag\n doclet.summary = doclet.summary.replace(/^<p>(.*)<\\/p>$/i, '$1');\n }\n }", "title": "" }, { "docid": "cff1efd11c341fbdbfaa8d38b8c4c325", "score": "0.48272994", "text": "function documentElement(type, content, level) {\n\t\tthis.type = type; // 1->Header, 3->Text, 101->Highlight\n\t\tthis.content = content;\n\t\tthis.level = level;\n\t}", "title": "" }, { "docid": "2d6ff7e5d2b0ec259daa618b44caa210", "score": "0.4817565", "text": "addDocument(filename, data, mode, isAlign) {\n\t\tthis.mode = mode;\n\t\tvar me = this;\n\t\tvar intf = this.parent.parent.mode;\n\n\t\t// variables and check align\n\t\tif (intf === 'align') {\n\t\t\tvar target = this.parent.parent.target;\n\t\t\tvar aligntype = (target.aligntype in data.content) ?target.aligntype :'FullText';\n\t\t\tvar blockList = data.content[aligntype];\n\t\t\tvar alignable = true;\n\t\t\tvar linkMeta = data.linkMeta;\n\t\t\tvar targetMeta = target.metadata;\n\t\t} else if (intf === 'search') {\n\t\t\tvar blockList = data.content;\n\t\t\tvar alignable = false;\n\t\t\tvar linkMeta = {};\n\t\t\tvar targetMeta = undefined;\n\t\t} else {\n\t\t\tconsole.log('invalid intf (align, search):', intf);\n\t\t\treturn;\n\t\t}\n\n\t\t// functions\n\t\tvar addTitleBlock = function() { me.titleBlocks[filename] = new TitleBlock(me, filename, alignable, isAlign); };\n\t\tvar addMetaBlock = function() { me.metaBlocks[filename] = new MetaBlock(me, data.metadata, linkMeta, targetMeta); };\n\n\t\t// create file container\n\t\tif (this.textBlocks[filename] === undefined) this.textBlocks[filename] = [];\n\n\t\t// append at back\n\t\tif (mode === 'back') {\n\t\t\taddTitleBlock();\n\t\t\taddMetaBlock();\n\t\t\tblockList.forEach(entry => { \n\t\t\t\tthis.textBlocks[filename].push(new TextBlock(this, entry)); \n\t\t\t});\n\n\t\t// append at front\n\t\t} else if (mode === 'front') {\n\t\t\tblockList.slice().reverse().forEach(entry => { \n\t\t\t\tthis.textBlocks[filename].unshift(new TextBlock(this, entry)); \n\t\t\t});\n\t\t\taddMetaBlock();\n\t\t\taddTitleBlock();\n\n\t\t// error\n\t\t} else console.log('invalid mode (back, front):', mode);\n\t}", "title": "" }, { "docid": "3f4af6ebf6e8801f6246c3e0076eed6d", "score": "0.48107773", "text": "function PrintStuff(myDocuments) {\n this.documents = myDocuments;\n}", "title": "" }, { "docid": "8c237a3ca17ee3139e82a7aef7e5d318", "score": "0.47973824", "text": "function doc(name, fn, doc, dump) {\n if (typeof name !== 'string') {\n fn = arguments[0];\n doc = arguments[1];\n dump = arguments[2];\n name = null;\n }\n if (doc) {\n if (dump) {\n fn.__doc__ = doc;\n } else {\n fn.__doc__ = trim_lines(doc);\n }\n }\n if (name) {\n fn.__name__ = name;\n } else if (fn.name && !is_lambda(fn)) {\n fn.__name__ = fn.name;\n }\n return fn;\n}", "title": "" }, { "docid": "0c1f673eeab5433144853db5e33024f6", "score": "0.47934118", "text": "function BW_getDoc() {\r\n\treturn backword._currentDoc;\r\n}", "title": "" }, { "docid": "8a05676be5b16f93003d291d71b60864", "score": "0.47615632", "text": "function invalidDoc(doc) {\n if (doc.query) {\n if (typeof doc.query.type != \"string\") return \".query.type must be a string\";\n if (doc.query.start && !isPosition(doc.query.start)) return \".query.start must be a position\";\n if (doc.query.end && !isPosition(doc.query.end)) return \".query.end must be a position\";\n }\n if (doc.files) {\n if (!Array.isArray(doc.files)) return \"Files property must be an array\";\n for (var i = 0; i < doc.files.length; ++i) {\n var file = doc.files[i];\n if (typeof file != \"object\") return \".files[n] must be objects\";\n else if (typeof file.name != \"string\") return \".files[n].name must be a string\";\n else if (file.type == \"delete\") continue;\n else if (typeof file.text != \"string\") return \".files[n].text must be a string\";\n else if (file.type == \"part\") {\n if (!isPosition(file.offset) && typeof file.offsetLines != \"number\")\n return \".files[n].offset must be a position\";\n } else if (file.type != \"full\") return \".files[n].type must be \\\"full\\\" or \\\"part\\\"\";\n }\n }\n }", "title": "" }, { "docid": "260a1a9e225a1556fe186a88442e763c", "score": "0.47559848", "text": "function test_generate_doc(artefactName, schema, design) // Constructor\n{\n design = design.toString();\n\n try {\n\n // RUN\n logger.info(artefactName, 'running GENERATE DOC');\n\n var filename = '../'+artefactName+'.textile';\n\n var header = '';\n var forTable = '';\n\n var lines = design.split('\\n');\n for (var i=0; i<lines.length; i++) {\n if (lines[i].substring(0,1)=='#') { // description information\n if (lines[i].indexOf('ARTEFACT')!=-1) {\n header+='\\nh2. '+lines[i].substring(1, lines[i].length).trim()+'\\n';\n }\n else if (lines[i].indexOf('DESCRIPTION')!=-1) {\n header+='\\n'+lines[i].substring(1, lines[i].length).trim()+'\\n';\n }\n }\n else {\n forTable += lines[i]+'\\n';\n }\n }\n header += '\\n'\n\n var table = forTable.trim().replace(/\\t/g, '\\t|').replace(/\\n/g, '\\t|\\n|')+'|\\n';\n\n // var regex = new RegExp(destinationTable, 'g');\n // table = table.replace(regex, '\"'+destinationTable+'\":../datastore/'+destinationTable+'.textile ');\n\n // sourceTables = sourceTables.split(',');\n \n // for (var x=0; x<sourceTables.length; x++) {\n // sourceTable = sourceTables[x];\n // var regex = new RegExp(sourceTable, 'g');\n // table = table.replace(regex, '\"'+sourceTable+'\":../staging/'+sourceTable+'.textile ');\n\n // }\n\n var lines = table.split('\\n');\n \n var columns = lines[0].split('\\t|');\n\n var columnHeader = '';\n for(var i=0; i<columns.length; i++) {\n if (columns[i].trim().length>0) {\n columnHeader+= '*'+columns[i]+'*\\t|'\n }\n }\n\n design = header+'|'+columnHeader+'\\n'\n for(var i=1; i<lines.length; i++) {\n design+=lines[i]+'\\n';\n }\n \n\n //console.log(design);\n\n fs.writeFileSync(filename, design);\n \n logger.OK(artefactName, 'PASSED GENERATE DOC (see: '+filename+')');\n }\n catch(ee) {\n logger.error(artefactName, 'FAILED GENERATE DOC: '+ee);\n }\n \n}", "title": "" }, { "docid": "55d740dfd9a7edc7e27a850525c55b6e", "score": "0.4753298", "text": "function store_boilerplate(content, local) {}", "title": "" }, { "docid": "39b8f105a0e0df11f86b5e15f88b136f", "score": "0.47524688", "text": "constructor(doc) {\n // :: [Step]\n // The accumulated steps.\n this.steps = []\n // :: [Node]\n // The individual document versions. Always has a length one more\n // than `steps`, since it also includes the original starting\n // document.\n this.docs = [doc]\n // :: [PosMap]\n // The position maps produced by the steps. Has the same length as\n // `steps`.\n this.maps = []\n }", "title": "" }, { "docid": "9558d130239fa5605e4647a449e3e7e3", "score": "0.47516766", "text": "function initDocsPage() {\n var elem = arguments.length <= 0 || arguments[0] === undefined ? null : arguments[0];\n\n var hash, hashSS;\n //Grab side-bar/documentation template html from github with rawgit cdn, insert side-bar/template, and docs into their containers.\n ajax(url(rawGit, docsMenu), null, function (r) {\n (function () {\n var elem2 = _$('#content') ? dom('#content') : make('#content').put(\"body\");\n return elem2;\n })().html(r);\n (function () {\n var elem3 = _$('#docsMain') ? dom('#docsMain') : make('#docsMain').put(\"body\");\n return elem3;\n })().html(marked(markDown));\n //Call callback functions.\n forkMeBaby();\n highLightCode();\n addChainLinkIcons();\n\n SNC.mouseOutController();\n SNC.mouseOverController();\n SNC.sideNavController();\n\n dom('#sideNav li a').every(function (element) {\n element.class('sNavLink', '+');\n });\n\n if (null !== elem) {\n\n offSets = SNC.getOffSets();\n hash = String(element(elem).hash());\n hashSS = hash.substring(1, hash.length);\n\n if (browser.gecko) {\n\n (function () {\n var elem4 = _$(\"html\") ? dom(\"html\") : make(\".html1\", \"html\").put(\"body\");\n return elem4;\n })().scrolled(offSets[hashSS] + 470);\n } else if (browser.webkit) {\n\n (function () {\n var elem5 = _$(\"body\") ? dom(\"body\") : make(\".body1\", \"body\").put(\"body\");\n return elem5;\n })().scrolled(offSets[hashSS] + 470);\n }\n } else {\n\n if (browser.gecko) {\n\n (function () {\n var elem6 = _$(\"html\") ? dom(\"html\") : make(\".html1\", \"html\").put(\"body\");\n return elem6;\n })().scrolled(0);\n } else if (browser.webkit) {\n\n (function () {\n var elem7 = _$(\"body\") ? dom(\"body\") : make(\".body1\", \"body\").put(\"body\");\n return elem7;\n })().scrolled(0);\n }\n }\n });\n}", "title": "" }, { "docid": "efe40b02283033cff3139eeffb6aefdf", "score": "0.4746223", "text": "function docsSection(hitIs) {\n let content = '';\n hitIs.forEach(hit => {\n const hitLevel0 = hit.hierarchy.lvl0;\n if (!hitLevel0) {\n return;\n }\n\n content += '<li>' +\n '<div class=\"search-title\">' +\n '<a href=\"' + hit.url.replace(/^(?:\\/\\/|[^/]+)*\\//, '/') + '\">' +\n '<span class=\"search-title-inner\">' + hitLevel0 + '</span>' +\n '<div class=\"breadcrumb-item\">' + hit.breadcrumb + '</div>' +\n '</a>' +\n '</div>' +\n '</li>';\n });\n\n return content;\n }", "title": "" }, { "docid": "3306c3f5a02212a87fce7295a66865fd", "score": "0.47412112", "text": "function snippet1() {\n\n // a snippet to demo the concept in JS Tutor\n\n // eventually these could open in loupe or any other viztool\n\n}", "title": "" }, { "docid": "28dd1848f1f57ef370aff50db6f52318", "score": "0.473959", "text": "function add_doc() {\n var tbl, row;\n tbl = document.evaluate( doc_items, document, null,\n XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null )\n .snapshotItem(0);\n if (!tbl)\n return;\n row = tbl.insertRow(3);\n row.innerHTML=\"<th>L</th><td>Opens the next results page.</td>\";\n row = tbl.insertRow(1);\n row.innerHTML=\"<th>H</th><td>Opens the previous results page.</td>\";\n}", "title": "" }, { "docid": "1aad054e7faa4183873ee1c9d02711f4", "score": "0.47387958", "text": "function generate(docType, title, docs, filename, resolveLinks) {\n resolveLinks = resolveLinks === false ? false : true;\n\n var docData = {\n title: title,\n docs: docs,\n docType: docType\n };\n\n var outpath = path.join(outdir, filename),\n html = view.render('container.tmpl', docData);\n\n if (resolveLinks) {\n html = helper.resolveLinks(html); // turn {@link foo} into <a href=\"foodoc.html\">foo</a>\n }\n\n if (searchEnabled) {\n searchableDocuments[filename] = {\n \"id\": filename,\n \"title\": title,\n \"body\": searchData(html)\n };\n }\n\n fs.writeFileSync(outpath, html, 'utf8');\n}", "title": "" }, { "docid": "263bf209527de83d01ba27acc31a1d98", "score": "0.47382224", "text": "function meta()\n{\n \n}", "title": "" }, { "docid": "9ffa05292bf6d6cc55a01ba14fef8a0a", "score": "0.4736626", "text": "function DocumentCategoryIndex() {}", "title": "" }, { "docid": "18f07afb5ae5b38486e436657c9476b0", "score": "0.4720714", "text": "function doc(){\n return src('./src/components/**/*doc.md')\n .pipe(makeDocForCurrentFile(es))\n}", "title": "" }, { "docid": "150fbce33a7d01eb32d8a8aedeb22e87", "score": "0.47195315", "text": "function OLpageLoc(o,t){\nvar l=0,s=o;while(o.offsetParent&&o.offsetParent.tagName.toLowerCase()!='html'){\nl+=o['offset'+t];o=o.offsetParent;}l+=o['offset'+t];while(s=s.parentNode){\nif((s['scroll'+t]>0)&&s.tagName.toLowerCase()=='div')l-=s['scroll'+t];}return l;\n}", "title": "" }, { "docid": "0fe08202b817f90ade3ed867becf4d72", "score": "0.47180098", "text": "function extendDocument(doc)\r\n{\r\n if (doc == null)\r\n return null;\r\n\r\n /** Determine if the current document is empty.\r\n */\r\n doc.isEmpty = function() {\r\n return (this.body == null || this.body.childNodes.length == 0);\r\n };\r\n\r\n /** Report number of nodes that matach the given xpath expression.\r\n */\r\n doc.countNodes = function(xpath) {\r\n var n = 0;\r\n this.foreachNode(xpath, function(node) {\r\n n++;\r\n });\r\n return n;\r\n };\r\n\r\n /** Remove nodes that match the given xpath expression.\r\n */\r\n doc.removeNodes = function(xpath) {\r\n this.foreachNode(xpath, function(node) {\r\n node.remove();\r\n });\r\n };\r\n\r\n /** Hide nodes that match the given xpath expression.\r\n */\r\n doc.hideNodes = function(xpath)\r\n {\r\n if (xpath instanceof Array) {\r\n for (var xp in xpath) {\r\n this.foreachNode(xp, function(node) {\r\n node.hide();\r\n });\r\n }\r\n }\r\n else {\r\n this.foreachNode(xpath, function(node) {\r\n node.hide();\r\n });\r\n }\r\n };\r\n\r\n /** Make visible the nodes that match the given xpath expression.\r\n */\r\n doc.showNodes = function(xpath) {\r\n this.foreachNode(xpath, function(node) {\r\n node.show();\r\n });\r\n };\r\n\r\n /** Retrieve the value of the node that matches the given xpath expression.\r\n */\r\n doc.selectValue = function(xpath, contextNode)\r\n {\r\n if (contextNode == null)\r\n contextNode = this;\r\n\r\n var result = this.evaluate(xpath, contextNode, null, XPathResult.ANY_TYPE, null);\r\n var resultVal;\r\n switch (result.resultType) {\r\n case result.STRING_TYPE: resultVal = result.stringValue; break;\r\n case result.NUMBER_TYPE: resultVal = result.numberValue; break;\r\n case result.BOOLEAN_TYPE: resultVal = result.booleanValue; break;\r\n default:\r\n log.error(\"Unhandled value type: \" + result.resultType);\r\n }\r\n return resultVal;\r\n }\r\n\r\n /** Select the first node that matches the given xpath expression.\r\n * If none found, log warning and return null.\r\n */\r\n doc.selectNode = function(xpath, contextNode)\r\n {\r\n var node = this.selectNodeNullable(xpath, contextNode);\r\n if (node == null) {\r\n // is it possible that the structure of this web page has changed?\r\n log.warn(\"XPath returned no elements: \" + xpath\r\n + \"\\n\" + genStackTrace(arguments.callee)\r\n );\r\n }\r\n return node;\r\n }\r\n\r\n /** Select the first node that matches the given xpath expression.\r\n * If none found, return null.\r\n */\r\n doc.selectNodeNullable = function(xpath, contextNode)\r\n {\r\n if (contextNode == null)\r\n contextNode = this;\r\n\r\n var resultNode = this.evaluate(\r\n xpath, contextNode, null,\r\n XPathResult.FIRST_ORDERED_NODE_TYPE, null);\r\n\r\n return extendNode(resultNode.singleNodeValue);\r\n }\r\n\r\n /** Select all first nodes that match the given xpath expression.\r\n * If none found, return an empty Array.\r\n */\r\n doc.selectNodes = function(xpath, contextNode)\r\n {\r\n var nodeList = new Array();\r\n this.foreachNode(xpath, function(n) { nodeList.push(n); }, contextNode);\r\n return nodeList;\r\n }\r\n\r\n /** Select all nodes that match the given xpath expression.\r\n * If none found, return null.\r\n */\r\n doc.selectNodeSet = function(xpath, contextNode)\r\n {\r\n if (contextNode == null)\r\n contextNode = this;\r\n\r\n var nodeSet = this.evaluate(\r\n xpath, contextNode, null,\r\n XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);\r\n\r\n return nodeSet;\r\n }\r\n\r\n /** Iteratively execute the given func for each node that matches the given xpath expression.\r\n */\r\n doc.foreachNode = function(xpath, func, contextNode)\r\n {\r\n if (contextNode == null)\r\n contextNode = this;\r\n\r\n // if array of xpath strings, call recursively\r\n if (xpath instanceof Array) {\r\n for (var i=0; i < xpath.length; i++)\r\n this.foreachNode(xpath[i], func, contextNode);\r\n return;\r\n }\r\n\r\n var nodeSet = contextNode.selectNodeSet(xpath, contextNode);\r\n\r\n var i = 0;\r\n var n = nodeSet.snapshotItem(i);\r\n while (n != null) {\r\n var result = func(extendNode(n));\r\n if (result == false) {\r\n // dispatching func can abort the loop by returning false\r\n return;\r\n }\r\n n = nodeSet.snapshotItem(++i);\r\n }\r\n }\r\n\r\n /** Retrieve the text content of the node that matches the given xpath expression.\r\n */\r\n doc.selectTextContent = function(xpath) {\r\n var node = this.selectNodeNullable(xpath, this);\r\n if (node == null)\r\n return null;\r\n return node.textContent.normalizeWhitespace();\r\n };\r\n\r\n /** Retrieve the text content of the node that matches the given xpath expression,\r\n * and apply the given regular expression to it, returning the portion that matches.\r\n */\r\n doc.selectMatchTextContent = function(xpath, regex) {\r\n var text = this.selectTextContent(xpath);\r\n if (text == null)\r\n return null;\r\n return text.match(regex);\r\n };\r\n\r\n /** Replace contents of contextNode (default: body), with specified node.\r\n * (The specified node is removed, then re-added to the emptied contextNode.)\r\n * The specified node is expected to be a descendent of the context node.\r\n * Otherwise the result is probably an error.\r\n * DOC-DEFAULT\r\n */\r\n doc.isolateNode = function(xpath, contextNode)\r\n {\r\n if (contextNode == null)\r\n contextNode = this.body;\r\n\r\n extendNode(contextNode);\r\n\r\n var subjectNode = this.selectNode(xpath);\r\n if (subjectNode == null || subjectNode.parentNode == null)\r\n return;\r\n\r\n // gut the parent node (leave script elements alone)\r\n contextNode.foreachNode(\"child::*\", function(node) {\r\n if (node.tagName != \"SCRIPT\" && node.tagName != \"NOSCRIPT\") {\r\n node.remove();\r\n }\r\n });\r\n\r\n // re-add the subject node\r\n var replacement_div = this.createElement(\"div\");\r\n replacement_div.id = \"isolateNode:\" + xpath;\r\n replacement_div.appendChild(subjectNode);\r\n\r\n contextNode.appendChild(replacement_div);\r\n return replacement_div;\r\n };\r\n\r\n /** Add a <script> reference to this document.\r\n * DOC-CENTRIC\r\n */\r\n doc.addScriptReference = function(url)\r\n {\r\n var script = this.createElement(\"script\");\r\n script.src = url;\r\n this.selectNode(\"//head\").appendChild(script);\r\n\r\n return script;\r\n }\r\n\r\n /** Add a CSS style definition to this document.\r\n * DOC-CENTRIC\r\n */\r\n doc.addStyle = function(cssBody, id)\r\n {\r\n var style = this.createXElement(\"style\");\r\n style.innerHTML = cssBody;\r\n this.selectNode(\"//head\").appendChild(style);\r\n\r\n return style;\r\n }\r\n\r\n /** Create an \"extended\" HTML element of the specified type,\r\n * with the given attributes applied to it.\r\n * The returned object is extended by extendNode().\r\n * DOC-NONSPECIFIC\r\n */\r\n doc.createXElement = function(tagName, attrMap)\r\n {\r\n var node = extendNode(this.createElement(tagName));\r\n node.applyAttributes(attrMap);\r\n return node;\r\n }\r\n\r\n /** Create\r\n */\r\n doc.createHtmlLink = function(url, text, attrMap)\r\n {\r\n var a = this.createXElement(\"a\");\r\n a.href = url;\r\n if (text == null) {\r\n text = url;\r\n }\r\n a.textContent = text;\r\n a.applyAttributes(attrMap);\r\n return a;\r\n }\r\n\r\n /** Create an HTML input field, wrapped in an HTML label,\r\n * with the given attributes applied to it,\r\n * The returned HTML objects are extended by extendNode().\r\n * DOC-NONSPECIFIC\r\n */\r\n doc.createInputText = function(labelText, attrMap, defaultVal)\r\n {\r\n var span = this.createXElement(\"label\");\r\n with (span) {\r\n if (labelText != null)\r\n appendChildText(labelText + \": \");\r\n var input = this.createXElement(\"input\", attrMap);\r\n with (input) {\r\n type = \"text\";\r\n value = defaultVal;\r\n }\r\n appendChild(input);\r\n }\r\n return span;\r\n }\r\n\r\n doc.createTextArea = function(labelText, attrMap, defaultVal)\r\n {\r\n var span = this.createXElement(\"label\");\r\n with (span) {\r\n if (labelText != null)\r\n appendChildText(labelText + \": \");\r\n var input = this.createXElement(\"textarea\", attrMap);\r\n with (input) {\r\n value = defaultVal;\r\n }\r\n appendChild(input);\r\n }\r\n return span;\r\n }\r\n\r\n /** Create an HTML checkbox, wrapped in an HTML label,\r\n * with the given attributes applied to it,\r\n * The returned HTML objects are extended by extendNode().\r\n * DOC-NONSPECIFIC\r\n */\r\n doc.createCheckbox = function(labelText, attrMap, isChecked)\r\n {\r\n var span = this.createXElement(\"label\");\r\n with (span) {\r\n var input = this.createXElement(\"input\", attrMap);\r\n with (input) {\r\n type = \"checkbox\";\r\n checked = isChecked;\r\n }\r\n appendChild(input);\r\n appendChildText(labelText);\r\n }\r\n return span;\r\n }\r\n\r\n /** Create a set of HTML radio buttons, wrapped in an HTML label element.\r\n * The returned HTML objects are extended by extendNode().\r\n * DOC-NONSPECIFIC\r\n */\r\n doc.createRadioset = function(attrMap, optionMap, defaultKey)\r\n {\r\n var spanList = new Array();\r\n\r\n for (var key in optionMap)\r\n {\r\n var label = this.createXElement(\"label\");\r\n with (label) {\r\n var input = this.createXElement(\"input\", attrMap);\r\n with (input) {\r\n type = \"radio\";\r\n value = key;\r\n if (key == defaultKey)\r\n checked = true;\r\n }\r\n appendChild(input);\r\n appendChildText(optionMap[key]);\r\n }\r\n spanList.push(label);\r\n }\r\n return spanList;\r\n }\r\n\r\n /** Create an HTML select element, wrapped in an HTML label element.\r\n * The returned HTML objects are extended by extendNode().\r\n * DOC-NONSPECIFIC\r\n */\r\n doc.createSelect = function(labelText, attrMap, optionMap, defaultKey)\r\n {\r\n var span = this.createXElement(\"label\");\r\n with (span) {\r\n if (labelText != null)\r\n appendChildText(labelText + \": \");\r\n var select = this.createXElement(\"select\", attrMap);\r\n with (select)\r\n {\r\n for (var key in optionMap)\r\n {\r\n var option = this.createXElement(\"option\");\r\n with (option) {\r\n value = key;\r\n if (key == defaultKey) {\r\n selected = true;\r\n }\r\n appendChildText(optionMap[key]);\r\n }\r\n appendChild(option);\r\n }\r\n }\r\n appendChild(select);\r\n }\r\n return span;\r\n }\r\n\r\n /** Create a labeled/boxed area (eg, typical dialog box component).\r\n */\r\n doc.createTopicDiv = function(topicTitle, contextNode)\r\n {\r\n var shiftEms = \".7\";\r\n var basecolor = getBaseColor(contextNode);\r\n\r\n var frame_div = this.createXElement(\"div\");\r\n with (frame_div) {\r\n with (style) {\r\n border = \"1px solid Gray\";\r\n marginTop = (shiftEms * 1.5) + \"em\";\r\n marginLeft = \"6px\";\r\n marginRight = \"6px\";\r\n MozBorderRadius = \"3px\";\r\n }\r\n\r\n // superimposed title\r\n var title_span = this.createXElement(\"span\");\r\n with (title_span.style) {\r\n position = \"relative\";\r\n top = -shiftEms + \"em\";\r\n fontSize = \"10pt\";\r\n color = \"Black\";\r\n backgroundColor = basecolor;\r\n marginLeft = \"6px\"; // shift title right\r\n padding = \"0px 4px 0px 4px\"; // blot out frame on left & right\r\n }\r\n title_span.appendChildText(topicTitle);\r\n appendChild(title_span);\r\n // maintatin default mouse cursor over the topic label text\r\n title_span.wrapIn(\"label\");\r\n\r\n // content area\r\n var content_div = this.createXElement(\"div\");\r\n content_div.style.marginTop = -shiftEms + \"em\";\r\n content_div.style.padding = \"6px\";\r\n appendChild(content_div);\r\n }\r\n frame_div.contentElement = content_div;\r\n\r\n return frame_div;\r\n\r\n function getBaseColor(contextNode)\r\n {\r\n while (contextNode != null && contextNode.tagName != \"BODY\") {\r\n var c = contextNode.style.backgroundColor;\r\n if (c != \"\") {\r\n return c;\r\n }\r\n contextNode = contextNode.parentNode;\r\n }\r\n return \"White\";\r\n }\r\n }\r\n\r\n return doc;\r\n}", "title": "" }, { "docid": "a19d594d9da0ef6deb0b3908d9e75e18", "score": "0.47175962", "text": "function printAstToDoc(ast,options){var alignmentSize=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;var printer=options.printer;if(printer.preprocess){ast=printer.preprocess(ast,options);}var cache=new Map();function printGenerically(path,args){var node=path.getValue();var shouldCache=node&&_typeof(node)===\"object\"&&args===undefined;if(shouldCache&&cache.has(node)){return cache.get(node);}// We let JSXElement print its comments itself because it adds () around\n// UnionTypeAnnotation has to align the child without the comments\nvar res;if(printer.willPrintOwnComments&&printer.willPrintOwnComments(path)){res=callPluginPrintFunction(path,options,printGenerically,args);}else{// printComments will call the plugin print function and check for\n// comments to print\nres=comments.printComments(path,function(p){return callPluginPrintFunction(p,options,printGenerically,args);},options,args&&args.needsSemi);}if(shouldCache){cache.set(node,res);}return res;}var doc$$2=printGenerically(new fastPath(ast));if(alignmentSize>0){// Add a hardline to make the indents take effect\n// It should be removed in index.js format()\ndoc$$2=addAlignmentToDoc$1(concat$3([hardline$2,doc$$2]),alignmentSize,options.tabWidth);}docUtils$2.propagateBreaks(doc$$2);return doc$$2;}", "title": "" }, { "docid": "542957b5acc58e19042a1604f336646d", "score": "0.47148076", "text": "function show_document(doc_id) {\n if (doc_id == undefined) {\n if (current_doc) {\n doc_id = current_doc._id\n } else {\n empty_detail_panel()\n return false\n }\n }\n // fetch document\n var doc = db.open(doc_id)\n //\n if (doc == null) {\n return false\n }\n //\n empty_detail_panel()\n // update global state\n current_doc = doc\n //\n trigger_doctype_hook(current_doc, \"render_document\", current_doc)\n //\n return true\n}", "title": "" }, { "docid": "fdb929765032c75cc6384a75e23de26a", "score": "0.4713809", "text": "function renderBio(doc){\n let img = document.createElement('img'); // prof pic\n let p = document.createElement('p'); // intro\n let h1 = document.createElement('h1'); // header\n let h3 = document.createElement('h3'); // name\n\n img.setAttribute('src',doc.data().img);\n h1.textContent = doc.data().header;\n h3.textContent = \"My Name: \"+doc.data().name;\n p.textContent = doc.data().bio;\n \n bio.appendChild(img);\n bio.appendChild(h1);\n bio.appendChild(h3);\n bio.appendChild(p);\n}", "title": "" }, { "docid": "1554170a4cb9a100a7f2052976c76a87", "score": "0.47054514", "text": "function docViewDesc(doc, outerDeco, innerDeco, dom, view) {\n applyOuterDeco(dom, outerDeco, doc);\n return new NodeViewDesc(null, doc, outerDeco, innerDeco, dom, dom, dom, view, 0)\n }", "title": "" }, { "docid": "1554170a4cb9a100a7f2052976c76a87", "score": "0.47054514", "text": "function docViewDesc(doc, outerDeco, innerDeco, dom, view) {\n applyOuterDeco(dom, outerDeco, doc);\n return new NodeViewDesc(null, doc, outerDeco, innerDeco, dom, dom, dom, view, 0)\n }", "title": "" }, { "docid": "653ba36c1131d4e27bd133c37682be79", "score": "0.4698281", "text": "function automatedReadabilityIndex(letters, numbers, words, sentences) {\n return (4.71 * ((letters + numbers) / words))\n + (0.5 * (words / sentences))\n - 21.43;\n\n}", "title": "" }, { "docid": "ca19998e6b4fe854c8935d95db340400", "score": "0.469554", "text": "function Pagy() {}", "title": "" }, { "docid": "4701f4f49cffc07ed1006ceee5bd64a3", "score": "0.46929723", "text": "function docViewDesc(doc, outerDeco, innerDeco, dom, view) {\n applyOuterDeco(dom, outerDeco, doc);\n return new NodeViewDesc(null, doc, outerDeco, innerDeco, dom, dom, dom, view, 0)\n}", "title": "" }, { "docid": "993845058dba9a9f7060695ff44b90f8", "score": "0.46904722", "text": "function renderWikiList(doc) {\n\treturn;\n}", "title": "" }, { "docid": "b32613e4baa5cd4b9a54c55e2461d326", "score": "0.4690331", "text": "construct_structure() {\n\t\tthis.add(new Reader()).as('Reader');\n\t\tthis.add(new Summary()).as('Summary');\n\t\tthis.add(new Writer()).as('Writer');\n\t\tthis.add(new Cover()).as('Penalizer')\n\t\t\t.text('Ah ah ah, no cheating');\n\t}", "title": "" }, { "docid": "12d4879c44fbb23c48ebe0980a60e868", "score": "0.4685631", "text": "function loadDoc( f ) {\n\tcurF = f;\n\tGUI.lstSubf.SetVisibility( curF.name.slice( 0, 6 ) == \"Create\"? \"Show\" : \"Hide\" );\n\tGUI.lstParams.SetVisibility( curF.isfunc? \"Show\" : \"Hide\" );\n\tGUI.btnRType.SetEnabled( curF.name.slice( 0, 6 ) != \"Create\" );\n\n\tGUI.txtName.SetText( curF.name );\n\tGUI.edtDesc.setText( curF.desc );\n\tGUI.btnRType.type = curF.retval;\n\n\tloadSubfLst();\n\tloadPreview();\n\tloadParamLst();\n\tchanged = false;\n}", "title": "" }, { "docid": "df9b075a6aba5a100c241c647c920dda", "score": "0.46854842", "text": "get _visibleDocTop() {\n\t return 0;\n\t }", "title": "" }, { "docid": "eeb68386d4a1267ea5886ad7b0883033", "score": "0.46838716", "text": "static get name () {\n return 'docs'\n }", "title": "" }, { "docid": "db49ce3726d942012ad17a9d23caf905", "score": "0.4674782", "text": "function getDocStats(fileContent) {\n var docLength = document.getElementById(\"doclength\");\n var wordCount = document.getElementById(\"wordCount\");\n var charCount = document.getElementById(\"charCount\");\n\n let text = fileContent.toLowerCase();\n let wordArray = text.match(/\\b\\S+\\b/g);\n let wordDictionary = {};\n\n //Count every word in the wordArray\n for (let word in wordArray) {\n let wordValue = wordArray[word];\n if (wordDictionary[wordValue] > 0) {\n wordDictionary[wordValue] + 1;\n } else {\n wordDictionary[wordValue] = 1;\n }\n }\n\n //sort the array\n let wordList = sortProperties(wordDictionary);\n\n //return the top 5 words\n var top5Words = wordList.slice(0, 6);\n var least5Words = wordList.slice(-6, wordList.length);\n\n //Write the values of the page\n ULTemplate(top5Words, document.getElementById(\"mostUsed\"));\n ULTemplate(least5Words, document.getElementById(\"leastUsed\"));\n\n}", "title": "" }, { "docid": "f15a70667b10d21869f820ce529c9940", "score": "0.46728003", "text": "function generatemarkupfile(inputdata){\n\t// head = inputdata;\n\tconsole.log(1);\n\tvar head = generatetag(\"html\",\"\",\"\",\"\");\n\toutputfile = head+ generatehead()+generatebody()+ closetab(head);\t\n\treturn outputfile;\n}", "title": "" }, { "docid": "258dacfa39f3aa7673a8e3502e3b9592", "score": "0.46717492", "text": "function CreateDocDefinition(request, job_id) {\n\n var assumption = request.assumptions;\n var results_per_page = 5; // default results per page\n var vertical_margin = 10;\n var tableFontSize = 6;\n var footerFontSize = 6;\n var footerLeftMargin = 0;\n var platform = (assumption.platform.name == 'Standard DVB-S1' || assumption.platform.name == 'Standard DVB-S2') ? 'Ericsson Rx8200' : assumption.platform.name;\n\n var pageFooter = [{\n text: [{text:\"Remark : \", style:'footerHeader'}],\n margin: [footerLeftMargin,0,0,0]\n\n },{\n margin: [footerLeftMargin,0,0,10],\n ul: [\n {text: [{text:'Eb/No threshold is from ',style:'footerContent'},{text: platform, style: 'footerRed'}]},\n {text: \"The frequency availability need to be checked with BCP\", style: 'footerContent'}\n ]\n\n },\n {\n text: \"Note: \",\n style: 'footerHeader',\n margin: [footerLeftMargin,0,0,0]\n },{\n ul:[\n {text: 'Typical recommend margin for Eb/No at clear sky should not be less than 2 dB for C band 5 dB for Ku band.', style: 'footerContent'},\n {text: 'LNB must cover extended C-band frequency range if downlink frequency is within this range (3.4-4.2 GHz).', style:'footerContent'},\n {text: 'Antenna sidelobe should meet 29-25 log(theta), where theta equals to sidelobe angle (degree)', style:'footerContent'},\n {text: [{text:'Satellite Attenuation setting = ', style: 'footerContent'},{text: '8', style: 'footerRed'},{text: ' dB', style: 'footerContent'}]}\n ],\n margin: [footerLeftMargin,0,0,10]\n },{\n text: [{text:'Date Printed: ', style: 'footerHeader'},{ text: new Date().toLocaleString(\"en-GB\"), style: 'footerContent'}],\n margin: [footerLeftMargin,0,0,0]\n }\n ];\n\n var docDefinition = {\n header: { columns: [\n { text: job_id, alignment: 'right', margin: [40, 10] }\n ]},\n //footer: pageFooter,\n pageOrientation: 'landscape',\n pageSize: 'A4',\n content: [\n\n ],\n styles: {\n redText: {\n color: 'red',\n bold: true\n },\n tableHeader: {\n bold: true,\n fontSize: tableFontSize,\n alignment: 'center'\n },\n tableContent: {\n fontSize: tableFontSize,\n alignment: 'center'\n },\n footerContent: {\n fontSize: footerFontSize\n },\n footerRed: {\n fontSize: footerFontSize,\n color: 'red'\n },\n footerHeader:{\n fontSize: footerFontSize,\n bold: true\n }\n }\n };\n\n // Add Content to doc definition\n\n var groupedResults = GroupByAdjacentSatelliteInterferences(request);\n\n\n // Loop through each adjacent satellite cases\n for (var k = 0; k < groupedResults.length; k++) {\n\n var group = groupedResults[k];\n var fwd_only = _.isEmpty(group.rtn[0]);\n\n // if it's broadcast link, double the cases per page because it does not need to provide the space for return link\n if (fwd_only) {\n results_per_page *= 2;\n }\n\n // find the number of page per case. each page will have cases\n var page_per_case = parseInt((group.fwd.length - 1) / results_per_page) + 1;\n\n\n // since the location table body will be the same for every page, we just find it here first\n var hub = Locations.findOne({name: assumption.hub_location});\n var sat_lon = Satellites.findOne({name: assumption.satellite}).orbital_slot;\n var sat_beam_text = assumption.satellite + ' ' + assumption.beam;\n console.log('Satellite Slot = ' + sat_lon);\n var loc_table_body = _.map(assumption.remote_locations, function (loc) {\n var data = [];\n // Hub Location\n data.push(assumption.hub_location);\n // Remote Location\n data.push(loc);\n\n var remote = Locations.findOne({name: loc});\n\n // ********** Data in the table must be string only!! ***********\n\n // Hub EIRP\n data.push(_.where(hub.data, { satellite: assumption.satellite, beam: assumption.beam, type: 'downlink'})[0].value.toFixed(2));\n // Hub G/T\n data.push(_.where(hub.data, { satellite: assumption.satellite, beam: assumption.beam, type: 'uplink'})[0].value.toFixed(2));\n // Hub Azimuth\n data.push(AzimuthAngle({lat: hub.lat, lon: hub.lon}, sat_lon).toFixed(2));\n // Hub Elevation Angle\n data.push(ElevationAngle({lat: hub.lat, lon: hub.lon}, sat_lon).toFixed(2));\n // Hub Rain Zone\n data.push('-');\n\n // Remote EIRP\n data.push(_.where(remote.data, { satellite: assumption.satellite, beam: assumption.beam, type: 'downlink'})[0].value.toFixed(2));\n // Remote G/T\n data.push(_.where(remote.data, { satellite: assumption.satellite, beam: assumption.beam, type: 'uplink'})[0].value.toFixed(2));\n // Remote Azimuth\n data.push(AzimuthAngle({lat: remote.lat, lon: remote.lon}, sat_lon).toFixed(2));\n // Remote Elevation Angle\n data.push(ElevationAngle({lat: remote.lat, lon: remote.lon}, sat_lon).toFixed(2));\n // Remote Rain Zone\n data.push('-');\n\n // Return the data with style mapped\n\n return _.map(data, function (item) {\n return { text: item, style: 'tableContent'};\n })\n\n })\n console.log('Loc Table Body = ' + JSON.stringify(loc_table_body));\n for (var i = 1; i <= page_per_case; i++) {\n\n // Add all contents except result table\n\n //Add Case Name\n console.log('Case name: ' + group.intf);\n AddContent({\n text: [\n {text: 'Case : ', bold: true},\n {text: group.intf, style: 'redText'}\n ]\n });\n console.log('Frequency Caption ' + group.caption);\n // Add Frequency Range\n AddContent({\n text: group.caption, style: 'redText',\n margin: [0, 0, 0, vertical_margin]\n });\n console.log('Summary Caption');\n // Summary Caption\n AddContent({\n text: [\n {text: 'Summary of Link Budgets of Link Budgets (Digital Applications) on ', bold: true},\n { text: sat_beam_text, style: 'redText'}\n ],\n margin: [0, 0, 0, vertical_margin]\n\n });\n console.log('Strictly Recommendation');\n // Strictly recommendation\n AddContent({\n text: [\n {text: 'Strictly Recommendation: ', bold: true, fontSize: 8},\n {text: 'Due to the interference from adjacent satellites, All antenna using Thaicom Satellite, both transmit and receive, shall have antenna pattern conform to 29-25*log() starting from 2 degree separation. This means that 3 m antenna or larger shall be used in Thaicom network. The use of smaller antenna or antenna with pattern not comply 29-25*log() will cause interference to/receive interference from adjacent satellites and it shall be customers responsibility to fix the interference and/or accept such interference.', fontSize: 8}\n ],\n margin: [0, 0, 0, vertical_margin]\n });\n\n // Location Table\n console.log('Location Table');\n\n var loc_table = [];\n\n // First row (Location A and Location B)\n loc_table.push([\n {text: \"\", colSpan: 2},\n {},\n {text: \"Location A\", colSpan: 5, style: 'tableHeader'},\n {},\n {},\n {},\n {},\n {text: \"Location B\", colSpan: 5, style: 'tableHeader'},\n {},\n {},\n {},\n {}\n ]);\n // Second row (Location A, B, EIRP, G/T, etc.)\n loc_table.push(_.map(\n ['Location A', 'Location B', 'EIRP (dBW)', 'G/T (dBK-1)', 'Azimuth', 'Elevation', 'Rain Zone', 'EIRP (dBW)', 'G/T(dBK-1)', 'Azimuth', 'Elevation', 'Rain Zone']\n , function (item) {\n return { text: item, style: 'tableHeader'};\n }));\n // Table body\n _.each(loc_table_body, function (item) {\n loc_table.push(item);\n });\n console.log('Loc table data = ' + JSON.stringify(loc_table));\n\n AddContent({\n table: {\n headerRows: 2,\n body: loc_table\n },\n margin: [0, 0, 0, vertical_margin]\n });\n\n // Summary of link budget from loc a to loc b\n console.log('Summary of link budget from loc a to loc b');\n AddContent({\n text: 'Summary of Link Budget from Location A to Location B',\n margin: [0, 0, 0, vertical_margin]\n })\n\n var first_header_row = _.map([\n {text: '', colSpan: 2},\n {},\n {text: 'Antenna (metres)', colSpan: 2},\n {},\n {text: 'Information Rate (kbps)', rowSpan: 2},\n {text: 'FEC', rowSpan: 2},\n {text: 'Eb/No Threshold', rowSpan: 2},\n {text: 'Allocated BW (kHz)', rowSpan: 2},\n {text: 'Uplink IFL (dB)', rowSpan: 2},\n {text: 'HPA power (Watts)', rowSpan: 2},\n {text: 'Clear Sky', colSpan: 5},\n {},\n {},\n {},\n {},\n {text: 'Rain Both sides'},\n {text: 'Power Utilization', rowSpan: 2},\n {text: 'Guardband (%)', rowSpan: 2},\n {text: 'BT Product', rowSpan: 2}\n ], function (item) {\n return _.extend(item, {style: 'tableHeader'})\n });\n var second_header_row = _.map([\n { text: 'Location A'},\n { text: 'Location B'},\n { text: 'A'},\n { text: 'B'},\n {},\n {},\n {},\n {},\n {},\n {},\n { text: 'C/N Total'},\n { text: 'Eb/No'},\n { text: 'Eb/No margin'},\n { text: 'C/N Up'},\n { text: 'C/N Down'},\n { text: 'Eb/No'},\n {},\n {},\n {}\n ], function (item) {\n return _.extend(item, {style: 'tableHeader'})\n });\n console.log('First row = ' + JSON.stringify(first_header_row));\n console.log('Second row = ' + JSON.stringify(second_header_row));\n // Forward Result table\n\n var fwd_table_content = [first_header_row, second_header_row];\n var rtn_table_content = [first_header_row, second_header_row];\n\n // Loop through result\n for (var j = results_per_page * (i - 1); j < (results_per_page * i); j++) {\n // If j equals to the length of forward result array, it means that this index is out of bound. We stop the loop.\n if (j == group.fwd.length) {\n break;\n }\n else {\n fwd_table_content.push(TransformResultToTableContent(group.fwd[j]));\n\n if (!_.isEmpty(group.rtn[j])) {\n rtn_table_content.push(TransformResultToTableContent(group.rtn[j]));\n }\n }\n\n }\n\n var fwd_table = {\n table: {\n headerRows: 2,\n body: fwd_table_content\n },\n margin: [0, 0, 0, vertical_margin]\n };\n\n // check if it's last page. We will not insert the page break if it's last page to prevent free blank page\n var lastPage = k == groupedResults.length - 1 && i == page_per_case;\n\n // if it has only fwd link (BC) add page break after fwd table\n /*\n if (fwd_only && !lastPage) {\n _.extend(fwd_table, {'pageBreak': 'after'});\n }\n */\n // Add forward table\n AddContent(fwd_table);\n\n // if it's not forward only (VSAT), add return table\n if(!fwd_only){\n var rtn_table = {\n table: {\n headerRows: 2,\n body: rtn_table_content\n },\n margin: [0, 0, 0, vertical_margin]\n }\n /*\n if (!lastPage) {\n _.extend(rtn_table, {'pageBreak': 'after'});\n }\n */\n AddContent({\n text: 'Summary of Link Budget from Location B to Location A',\n margin: [0, 0, 0, vertical_margin]\n });\n AddContent(rtn_table);\n }\n\n\n // Add page footer\n _.each(pageFooter, function(item){\n AddContent(item);\n });\n\n // Add page break\n if(!lastPage){\n AddContent({\n text: '',\n pageBreak: 'after'\n })\n }\n\n }\n\n }\n ;\n\n console.log('Returning doc definition...');\n console.log(JSON.stringify(docDefinition));\n return docDefinition;\n\n function AddContent(content) {\n docDefinition.content.push(content);\n }\n\n function TransformResultToTableContent(result) {\n //Transform some number to string\n return _.map([\n result.uplink_location,\n result.downlink_location,\n result.uplink_antenna.toString(),\n result.downlink_antenna.toString(),\n result.data_rate.toString(),\n result.mcg,\n result.eb_no_threshold.toString(),\n result.bandwidth.toString(),\n result.uplink_ifl.toString(),\n result.operating_hpa_power.toString(),\n result.cn_total.toString(),\n result.eb_no.toString(),\n result.eb_no_margin.toString(),\n result.cn_uplink.toString(),\n result.cn_downlink.toString(),\n result.eb_no_rain.toString(),\n result.power_util_percent.toString(),\n result.guardband.toString(),\n result.roll_off_factor.toString()\n ], function (item) {\n return {text: item, style: 'tableContent'};\n });\n }\n}", "title": "" }, { "docid": "1baecd632c93bef1b04c27b24f53610a", "score": "0.46707803", "text": "convertToFoundDocument(t, e) {\n return this.version = t, this.documentType = 1 /* FOUND_DOCUMENT */ , this.data = e, \n this.documentState = 0 /* SYNCED */ , this;\n }", "title": "" }, { "docid": "3de4ee9067cb3f883f81e1c5ac6a25a4", "score": "0.4667499", "text": "function buildSearchResult(doc) {\n var div = document.createElement('div'),\n article = document.createElement('article'),\n header = document.createElement('header'),\n section = document.createElement('section'),\n em = document.createElement('em'),\n h2 = document.createElement('h2'),\n courtcase = document.createElement('p'),\n a = document.createElement('a');\n \n em.textContent = doc.date;\n a.dataset.field = 'name';\n a.href += '/' + doc.slug + '.html#'+doc.id;\n a.textContent = doc.title.toUpperCase();\n courtcase.textContent = 'Case: ' + doc.case_title;\n\n div.class = 'doc';\n div.appendChild(article);\n article.appendChild(header);\n article.appendChild(section);\n header.appendChild(em);\n header.appendChild(h2);\n header.appendChild(courtcase);\n h2.appendChild(a);\n\n return div;\n }", "title": "" }, { "docid": "2f6967376f0cd81649326e878287712f", "score": "0.46652904", "text": "genDocGroup() {\n let text = \"\";\n let counter = 330;\n\n text += this.genTopBlurb();\n for (let d in this.props.data.DOCS.docs) {\n let doc = this.props.data.DOCS.docs[d];\n text += '<refDocument refId=\"1@RefDocumentModel\">';\n text += \"<docCode>\"+this.props.data.DOCS.group+\"</docCode>\";\n text += \"<docSeqNumber>\"+counter+\"</docSeqNumber>\";\n counter++;\n text += this.genServProvCode();\n text += this.genAuditModel();\n text += \"<autoDownload>N</autoDownload>\";\n let anything_checked = doc.delete || doc.title || doc.upload || doc.download;\n let placeholder = anything_checked ? \"0000000000\" : \"0111100000\";\n text += \"<deleteRole>\"+(doc.delete ? \"0111100000\" : placeholder)+\"</deleteRole>\";\n text += \"<XDocEntityTypes/>\";\n text += \"<documentComment></documentComment>\";\n text += \"<refDocumentI18NModels/>\";\n text += \"<documentType>\"+doc.type+\"</documentType>\";\n text += \"<documentsecurityModels/>\";\n text += \"<restrictDocTypeForACA>\"+(anything_checked ? \"Y\" : \"N\")+\"</restrictDocTypeForACA>\";\n text += \"<titleRestrictRole>\"+(doc.title ? \"0111100000\" : placeholder)+\"</titleRestrictRole>\";\n text += \"<uploadRole>\"+(doc.upload ? \"0111100000\" : placeholder)+\"</uploadRole>\";\n text += \"<viewRole>\"+(doc.download ? \"0111100000\" : placeholder)+\"</viewRole>\";\n text += \"</refDocument>\";\n }\n text += \"</list>\";\n\n return text;\n }", "title": "" }, { "docid": "93f2fd123656c880ac6359c283e9410e", "score": "0.4664066", "text": "constructor(document) {\n /**\n * It holds the page collection with the `index`.\n * @private\n */\n this.pdfPageCollectionIndex = new Dictionary();\n this.document = document;\n }", "title": "" }, { "docid": "7692eb913995f2858ee2e38e27ca3ee2", "score": "0.46625203", "text": "function doclibCommon()\n{\n var preferences = getPreferences();\n model.preferences = preferences;\n model.actionSets = getActionSets(preferences);\n model.repositoryUrl = getRepositoryUrl();\n model.replicationUrlMappingJSON = getReplicationUrlMappingJSON();\n model.vtiServer = getVtiServerJSON();\n model.rootNode = getRepositoryBrowserRoot();\n}", "title": "" }, { "docid": "d3053414b918bd84ef8c334a01bd52ae", "score": "0.46554413", "text": "constructor(_document){\n this.document = _document;\n }", "title": "" }, { "docid": "e07b7bad43f4223fa9fc8968039bc422", "score": "0.4653078", "text": "get docs() {\n const t = [];\n return this.forEach((e => t.push(e))), t;\n }", "title": "" }, { "docid": "c27d0a8499ca519e6543b7ef2d2e635f", "score": "0.46510208", "text": "function setup_documents(json_data)\n{\n $('#original').html(json_data[0].content);\n get_edits(-1,-1);\n}", "title": "" }, { "docid": "f4488e468306e00be5c72c19a119b7aa", "score": "0.46499807", "text": "constructor(document) {\n this.pageOrientation = document.pageSettings.orientation;\n this.pageRotate = document.pageSettings.rotate;\n this.pageSize = document.pageSettings.size;\n this.pageOrigin = document.pageSettings.origin;\n }", "title": "" }, { "docid": "c2b5d4339c64292ed25b4cf97b8a2815", "score": "0.46440837", "text": "_dataObjectStructure(doc) {\n let entry = [doc.id, doc.data()]\n const dataObject = new this.DataObject()\n dataObject.fromEntry(entry)\n return dataObject\n }", "title": "" }, { "docid": "fd5caf46ff2a49e18f940d3d2a632bcb", "score": "0.46426007", "text": "function local_SIMPL__DOM__()\n{\n}", "title": "" }, { "docid": "a48ee62d0748950ea4668229f276712f", "score": "0.46394166", "text": "function generateDocs() {\n\tapp.ShowProgressBar( \"Generating files...\" );\n\tapp.DeleteFolder( path + \"docs\" + getl() + \"/app\" );\n\tapp.MakeFolder( path + \"docs\" + getl() + \"/app\" );\n\tgenerateNavigators();\n\tapp.UpdateProgressBar( 0 );\n\tvar i, last = -1, lst = Object.keys( functions );\n\tfor( i = 0; i < lst.length; i++ ) {\n\t\tgenerateDoc( lst[i] );\n\t\tif( last != (last = Math.floor( 100*i/lst.length ) ) )\n\t\t\tapp.UpdateProgressBar( last );\n\t}\n\tapp.HideProgressBar();\n\tapp.ShowPopup( \"Generated\" );\n}", "title": "" }, { "docid": "2baf8a8bf66d5c543a7807de262671f1", "score": "0.46323922", "text": "function renderMyWorks(doc){\n div = document.createElement('div');\n h4 = document.createElement('h2');\n img = document.createElement('img');\n p = document.createElement('p');\n\n img.setAttribute('src',doc.data().img);\n h4.textContent = doc.data().name;\n p.textContent = doc.data().desc;\n\n div.setAttribute('class', 'works');\n div.appendChild(h4);\n div.appendChild(img);\n div.appendChild(p);\n works.appendChild(div);\n}", "title": "" }, { "docid": "3057c410c02ec2037b32394fd3f81043", "score": "0.46299344", "text": "function oLook(vid,f,rpt)\r\n{\r\n if (rpt == 0)\r\n {\r\n var url = \"lookup.do?id=\" + vid + \"&pbf=\" + f ;\r\n }\r\n else\r\n {\r\n if (nCurRow == -1) nCurRow = 0;\r\n var occ = nCurRow;\r\n var url = \"lookup.do?id=\" + vid + \"&pbf=\" + f + \"_\" + occ ;\r\n }\r\n url+= \"&docviewid=\" + szDocViewId;\r\n openW(url);\r\n}", "title": "" } ]
d54af23469dadc760ecf8b1cacc50a38
[GET] /me async await
[ { "docid": "a100c32abd84640498345adb000045bf", "score": "0.0", "text": "async showHomeUser(req, res, next) {\n try {\n const provinces = await Province.find({});\n const destinations = await Destination.find({});\n res.render('home', {\n provinces: mutipleMongooseToObject(provinces),\n destinations: mutipleMongooseToObject(destinations),\n username: req.session.userId,\n });\n // console.log(username)\n }\n\n // res.json({ province });\n catch (next) {}\n\n }", "title": "" } ]
[ { "docid": "5032f474c2e6ded9dd647319c2efeb98", "score": "0.7842718", "text": "async function getMe (req, res) {\n res.send(await service.getMe(req.authUser))\n}", "title": "" }, { "docid": "9f539763635c0b1bf7b0c9a891bdd705", "score": "0.7771271", "text": "async function getMe() {\n\tlog( await api.fetchMe() );\n}", "title": "" }, { "docid": "7b3702107850d9542bd25c6e1e9e050a", "score": "0.7488655", "text": "async function getMe(req, res) {\n\ttry {\n\t\tconst me = await req.api.getMe();\n\t\tres.send({\n\t\t\tloggedIn: true,\n\t\t\tprofile: me,\n\t\t\terr: null,\n\t\t});\n\t} catch (e) {\n\t\tpino.error(\"Something went wrong with user info: \" + e);\n\t\tres.send({ user: null, err: e, loggedIn: false });\n\t}\n}", "title": "" }, { "docid": "ac59ce16f4e726d10be3956d2c3fc1f3", "score": "0.7387512", "text": "async function getUser() {\n let headers = getHeaders();\n headers.Authorization = `Bearer ${await StorageService.get('access_token')}`;\n return fetch(getHost() + 'users/me', {\n method: 'get',\n headers: headers\n })\n .then((response) => {\n return response.json();\n });\n}", "title": "" }, { "docid": "878bda73d0c9c4f79e3ec0d70a2dc79b", "score": "0.7085088", "text": "static async getUser(username) {\n let res = await this.request(`users/${username}`)\n console.log(`frontEnd getUser response`, res)\n return res;\n }", "title": "" }, { "docid": "608796557286c3c128daba1c45262d49", "score": "0.6906146", "text": "getMe (options) {\n return api('GET', '/user/self', options)\n }", "title": "" }, { "docid": "978198d3a0f0595ad3a2232c37fc4382", "score": "0.6882261", "text": "async fetchMeMethod(req, res, next) {\n try {\n return successResponse(res, 'Account info fetched', '00', user);\n } catch (error) {\n return errorHandler(error, '02', res, next);\n }\n }", "title": "" }, { "docid": "a98906664dc9fa8d7cb41f7f18fa1170", "score": "0.6875342", "text": "async getUserDetails(){\n const res = await Api.get('url', true);\n }", "title": "" }, { "docid": "5f2aeae4f0df124a92762568093a1772", "score": "0.6832981", "text": "static async getMe(request, response) {\n const token = request.headers['x-token'];\n if (!token) { return response.status(401).json({ error: 'Unauthorized' }); }\n\n // Retrieve the user based on the token\n const userId = await findUserIdByToken(request);\n if (!userId) return response.status(401).send({ error: 'Unauthorized' });\n\n const user = await findUserById(userId);\n\n if (!user) return response.status(401).send({ error: 'Unauthorized' });\n\n const processedUser = { id: user._id, ...user };\n delete processedUser._id;\n delete processedUser.password;\n // Return the user object (email and id only)\n return response.status(200).send(processedUser);\n }", "title": "" }, { "docid": "c92815c52a10099fcb1dc5b74b458525", "score": "0.679745", "text": "async function getUser() {\n let response = await fetch(\"https://jsonplaceholder.typicode.com/users/3\")\n let user = await response.json()\n return user\n}", "title": "" }, { "docid": "5f35be7d1dc2b93162461277634cc570", "score": "0.6734215", "text": "async function getUserInfo(token) {\n const response = await axios.post('/auth/me', { token });\n return response;\n}", "title": "" }, { "docid": "5f35be7d1dc2b93162461277634cc570", "score": "0.6734215", "text": "async function getUserInfo(token) {\n const response = await axios.post('/auth/me', { token });\n return response;\n}", "title": "" }, { "docid": "5c585331e9afcc8a0c474652e8c1887d", "score": "0.6685003", "text": "async function getUser() {\n ensureScope('user.read');\n return await graphClient\n .api('/me')\n .select('id,displayName')\n .get();\n}", "title": "" }, { "docid": "5c585331e9afcc8a0c474652e8c1887d", "score": "0.6685003", "text": "async function getUser() {\n ensureScope('user.read');\n return await graphClient\n .api('/me')\n .select('id,displayName')\n .get();\n}", "title": "" }, { "docid": "772de7ab36ad3b6cfe1fec9ed8583b86", "score": "0.66436416", "text": "async function getProfile() {\n const resp = await fetch(window.location.origin + '/profiles/me', {\n method: \"GET\",\n mode: \"cors\",\n cache: \"no-cache\",\n credentials: \"same-origin\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n redirect: \"follow\",\n });\n return resp.json();\n}", "title": "" }, { "docid": "6d3771d4939e17f67ce942a74f8e4302", "score": "0.66090745", "text": "async getInfo() {\n let userResult = await this.request(\"user\");\n return userResult.user;\n }", "title": "" }, { "docid": "8592b86f48b7ef0bad680d8964e1f97d", "score": "0.6603447", "text": "async function callGraphMeEndpoint() {\n\tconst {\n\t\taccessToken\n\t} = await acquireToken({\n\t\tscopes: [ 'api://nxutestadmin/user_impersonation'],\n\t\taccount: msalInstance.getAllAccounts()[0]\n\t})\n\n\treturn callMSGraph(\"https://graph.microsoft.com/v1.0/me\", accessToken);\n}", "title": "" }, { "docid": "b4732d8ce617958bfe473521b03c0acc", "score": "0.6602237", "text": "function getMe(req, res) {\n res.json(req.user);\n}", "title": "" }, { "docid": "ea3d3c352376f0e60a7e2beb606476fc", "score": "0.6556307", "text": "_requestInfo(){\n console.log(\"requesting info\")\n // Create a graph request asking for user information with a callback to handle the response.\n const infoRequest = new GraphRequest(\"/me\", null, this._responseInfoCallback);\n new GraphRequestManager()\n .addRequest(infoRequest)\n .start();\n }", "title": "" }, { "docid": "b449bce1a92d9240e2c4bd3e7bfcd6f4", "score": "0.65287495", "text": "async getUser() {\n try {\n await userApi.getUser();\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Could not retrieve user');\n }\n }", "title": "" }, { "docid": "8aa69698d5509dd7f3d38776a27fd452", "score": "0.6496988", "text": "async getUser(uid) {\n console.log('GET /user/%s', uid)\n return this.server.getUser(uid)\n }", "title": "" }, { "docid": "86cf62616893c5b38ce6115936dc00b0", "score": "0.6495562", "text": "async function getUser() {\r\n const response = await fetch('http://68.7.7.158:8181/api/v2?apikey=*************************&cmd=get_user_names');\r\n const json = await response.json();\r\n return json;\r\n}", "title": "" }, { "docid": "74e2db44e2587a795b8f63c90f241b2d", "score": "0.6431304", "text": "getCurrentUser() {\n return HTTP.get('users/me')\n .then(response => {\n return response.data\n })\n .catch(err => {\n throw err\n })\n }", "title": "" }, { "docid": "5e395266166e8bb3c652057b885f0c2c", "score": "0.6405729", "text": "static async getUser() {\n return new Promise((resolve, reject) => {\n axios.get('/auth/user', {\n headers: {'Authorization': `bearer ${Auth.getToken()}`}\n }).then(res => {\n //return res.data.user;\n resolve(res.data.user);\n }).catch(err => {\n //return err.response;\n reject(err);\n });\n });\n }", "title": "" }, { "docid": "1323896f5fa740b571fe83ca5ae2bf12", "score": "0.6400904", "text": "static async getMe(req, res) {\n const token = req.header('X-Token');\n if (!token) return res.status(401).send({ error: 'Unauthorized' });\n\n const getToken = await redisClient.get(`auth_${token}`);\n if (!getToken) return res.status(401).send({ error: 'Unauthorized' });\n\n const user = await dbClient.db.collection('users').findOne({ _id: ObjectId(getToken) });\n if (!user) return res.status(401).send({ error: 'Unauthorized' });\n\n return res.status(200).send({ email: user.email, id: user._id });\n }", "title": "" }, { "docid": "c14c00926a8a83d5387e81836f25444d", "score": "0.63912153", "text": "async getCurrentUser(username) {\n let data = await JoblyApi.getCurrentUser(username)\n return data;\n }", "title": "" }, { "docid": "82ab309e9772239aa7c8fac6338a6c64", "score": "0.6382697", "text": "async getCurrentUser() {\n const options = this.buildOptions({\n path: `${this.path}/user`,\n method: \"get\",\n body: {},\n });\n\n return this.apiCall(options);\n }", "title": "" }, { "docid": "ab1a769dab9c3a3ead196dcaffafbcd1", "score": "0.63764894", "text": "function fetchUser() {\n return axios({\n method: \"get\",\n url: `https://api.spotify.com/v1/me`\n });\n}", "title": "" }, { "docid": "b8584226cb8f19477ba3c819b87dfaf0", "score": "0.6358564", "text": "async function fetchUser() {\n const response = await fetch('https://jsonplaceholder.typicode.com/users');\n const data = await response.json();\n console.log(data);\n}", "title": "" }, { "docid": "b4aba03f412f1c7807a93470de9045b2", "score": "0.63454753", "text": "async getAccount(id){\n // console.log('Getting account...');\n data = {\n URI: `${ACCOUNTS}/${id}`,\n method: 'GET'\n }\n return await this.sendRequest(data)\n }", "title": "" }, { "docid": "5170fed6e1ce2dccd7a5a62638c45ba4", "score": "0.6338274", "text": "async me (_, args, {user}, info) {\n // make sure user is logged in\n if (!user) {\n throw new Error('You are not authenticated');\n }\n\n return await User.findByPk(user.id);\n }", "title": "" }, { "docid": "edeb638bc61a30cabf7b30cf2546e5af", "score": "0.63381475", "text": "async function fetchUser() {\n // do network request in 10 secs..\n return 'yuna';\n}", "title": "" }, { "docid": "8915a33d88e41b6fa6d2a8d325ec1110", "score": "0.6323605", "text": "async function getUser(id) {\n const response = await fetch('https://www.googleapis.com/admin/directory/v1/users/'\n + id, {\n headers: {\n 'authorization': `Bearer ` + token,\n }\n })\n const json = await response.json();\n console.log(json)\n\n if (response.status == 200) {\n return json;\n }\n}", "title": "" }, { "docid": "7f1f54db5bb803b42b274de86e69c9fa", "score": "0.63069826", "text": "function getMe() {\n var deferred = $q.defer();\n Facebook.api('/me', function(response) {\n $rootScope.$apply(function(){\n $rootScope.profile = response;\n deferred.resolve(response);\n\n })\n });\n return deferred.promise;\n }", "title": "" }, { "docid": "563a131974379a05d9bab15a7f561f85", "score": "0.62990993", "text": "async function fetchUser (){\r\n // do network request in 10seconds...\r\n\r\n return 'kiseo';\r\n}", "title": "" }, { "docid": "5f5868db34a81da238af8fc54b3fc958", "score": "0.62962294", "text": "async function getProfile(user) {\n let userURL = `https://apps.runescape.com/runemetrics/profile/profile?user=${user || config.test.user}`\n console.log(userURL)\n const result = await request.get(userURL).catch(function (err) {\n console.log(err)\n })\n console.log(result)\n}", "title": "" }, { "docid": "26313e7fef5fdc93cb6f45db3c19dda9", "score": "0.62833446", "text": "async getUser() {\n // call auth info api with session token\n const response = await this.call(\"GET\", \"/api/auth/info\");\n // parse response\n const userinfo = JSON.parse(response.content);\n return userinfo;\n }", "title": "" }, { "docid": "bc2833165be9cdb7887ea682e54dc988", "score": "0.62709826", "text": "async function getProfileData() {\n const data = await axios.get(`/api/current_user`)\n return data\n }", "title": "" }, { "docid": "4a40d93baad6456dacf05252b0777c04", "score": "0.62693715", "text": "function getMe() {\n var url = telegramAPIURL + \"/getMe\";\n var response = UrlFetchApp.fetch( url ) ;\n Logger.log( response.getContentText() );\n}", "title": "" }, { "docid": "b9778e4613908d4da6ae21c489a3b188", "score": "0.6269006", "text": "static async getUser(req, res) {\n const id = req.params.id;\n\n try {\n const user = await userModel.find(id);\n res.status(200).json(user);\n } catch (err) {\n res.status(404).json({ message: err.message });\n }\n }", "title": "" }, { "docid": "86e872f2e3d99165184235bdb55acb1c", "score": "0.6240327", "text": "async function fetchUsers() {\n const resp = await fetch(\"https://jsonplaceholder.typicode.com/users\")\n const data = await resp.json()\n console.log(data)\n}", "title": "" }, { "docid": "42690d97fe3d6ebaf23887c41224fb3c", "score": "0.6240213", "text": "async function GetAusersTwitterProfile() {\n let twitterService = new twitter.TwitterService(process.env.MICRO_API_TOKEN);\n let rsp = await twitterService.user({\n username: \"crufter\",\n });\n console.log(rsp);\n}", "title": "" }, { "docid": "7b60c88131a192b5126d3ac0ef913436", "score": "0.62327737", "text": "async function fetchUser() {\n // do network request in 10secs. \n resolve('sani');\n}", "title": "" }, { "docid": "f379988011189e0a65b2a09e18a9ec5b", "score": "0.62286323", "text": "async function fetchUser() {\n // do network reqeust in 10 secs....\n return 'ellie';\n}", "title": "" }, { "docid": "95e537abb811a812f4b5b2ba72f33f14", "score": "0.621679", "text": "async function fetchUser() {\r\n // do network request in 10 secs....\r\n return 'ellie';\r\n}", "title": "" }, { "docid": "787d32d0ba41eaa3e470bf43d07bb38a", "score": "0.6211332", "text": "static async getRandomUser(){\n let res = await this.request(`matches/random`);\n return res.user;\n }", "title": "" }, { "docid": "2486b4732d690b69f5061bebadb8ceb4", "score": "0.6202871", "text": "static async read(token) {\n return await sendRequest(\"GET\", \"/users/self\", token);\n }", "title": "" }, { "docid": "a1d696a82296b97051271339a7773592", "score": "0.6201577", "text": "async function getAccount(user) {\n return sendRequest(baseUrl + \"/api/accounts/\" + encodeURIComponent(user), \"GET\");\n}", "title": "" }, { "docid": "0acfdeee9a8d4bcd21a6e31e331dfcd0", "score": "0.6196507", "text": "async function callUserAPI(results=1) { \n const USER_API = `https://randomuser.me/api/?results=${results}`\n let call = await fetch(USER_API)\n const miJSON = await call.json()\n return miJSON.results\n }", "title": "" }, { "docid": "9a329367bfb3ead2c003ad22ccc70c5a", "score": "0.6157608", "text": "async function getUserInfo() {\n const response = await fetch(url + '/api/sessions/current');\n const userInfo = await response.json();\n if (response.ok) {\n return userInfo;\n } else {\n throw userInfo; // an object with the error coming from the server\n }\n}", "title": "" }, { "docid": "14c90c283cd79383ecb52abb0ed5b35f", "score": "0.6147883", "text": "async function displayUser(){\n try{\n const user = await getUser(1);\n console.log(user.id);\n }catch(err){\n console.log(err.message);\n }\n \n}", "title": "" }, { "docid": "0fa7dae637fdab8c733748e1bdbbbd58", "score": "0.6143895", "text": "async function fetchUser() {\n\treturn 'shock';\n}", "title": "" }, { "docid": "a3245a02aacf67269bee154a6d84fd81", "score": "0.614356", "text": "async home() {\n const resp = await api.get(`/home`)\n\n return resp\n }", "title": "" }, { "docid": "8a34e7ded6722827a7619aafb85e60fd", "score": "0.6143548", "text": "async function getUserInfo() {\n if (user && user.name) return;\n try {\n // See if the server has session info on this user\n const response = await fetch(`${telescopeUrl}/user/info`);\n\n if (!response.ok) {\n // Not an error, we're just not authenticated\n if (response.status === 403) {\n return;\n }\n throw new Error(response.statusText);\n }\n\n const userInfo = await response.json();\n if (userInfo && userInfo.email && userInfo.name) {\n dispatch({ type: 'LOGIN_USER', payload: userInfo });\n }\n } catch (error) {\n console.error('Error getting user info', error);\n }\n }", "title": "" }, { "docid": "bfc493038d70179a61e162fb86d75a4f", "score": "0.6135278", "text": "function getMe() {\n var url = telegramUrl + \"/getMe\";\n var response = UrlFetchApp.fetch(url);\n Logger.log(response.getContentText());\n}", "title": "" }, { "docid": "12d6a0744e7f2de0f4f7d49c1d98883e", "score": "0.6133423", "text": "async getUserID() {\n const accessToken = this.accessToken || this.getAccessToken();\n const headers = { Authorization: `Bearer ${accessToken}` };\n // GET method\n try {\n const response = await fetch('https://api.spotify.com/v1/me', {\n headers: headers,\n });\n if (response.ok) {\n const jsonResponse = await response.json();\n if (jsonResponse && jsonResponse.id) {\n return jsonResponse.id;\n }\n } else {\n throw new Error('Request to GET user_id Failed!');\n }\n } catch (err) {\n this.authFailed();\n console.log(err);\n }\n }", "title": "" }, { "docid": "dc636c515a77df581a135ccf18239107", "score": "0.61297715", "text": "static async getUser(id) {\n const res = await axios.post(`${url}/${id}`);\n return res.data;\n }", "title": "" }, { "docid": "eca53f8a60c408e4586cdc05ceb0d3ad", "score": "0.61272365", "text": "get(callback) {\n api.get(\n 'user',\n null, null,\n result.$createListener(callback)\n )\n }", "title": "" }, { "docid": "9af6758c471cb49b248142b586713f7f", "score": "0.61267704", "text": "async function getUser() {\n // Retrieve response from /.auth/me\n const response = await fetch('/.auth/me');\n // Convert to JSON\n const payload = await response.json();\n // Retrieve the clientPrincipal (current user)\n const { clientPrincipal } = payload;\n return clientPrincipal;\n}", "title": "" }, { "docid": "cfe725887db406fc82e58b28b8990c77", "score": "0.61193657", "text": "async function showAvatar() {\n\n // use await inside Promise (read data from right to left)\n let response = await fetch('/article/promise-chaining/user.json');\n let user = await response.json();\n\n return user;\n }", "title": "" }, { "docid": "d72bbf6f61da12752c65f7621f9e4231", "score": "0.61152136", "text": "function getInfo (id, authorisation, self) {\n var url = `${API_URL}/user?id=${id}`; \n if (self == 'self') { \n console.log(`${self}`);\n url = `${API_URL}/user`\n };\n return fetch(url, {\n method: 'GET',\n headers: {\n 'Authorization': `Token ${authorisation}`\n },\n })\n .then(res => {\n //catch 403 status \n if (res.status === 403) {\n alert(\"Invalid auth token\");\n } \n return res.json();\n })\n .catch(error => {\n alert(\"He's dead Jim (Issue getting user information)\");\n });\n}", "title": "" }, { "docid": "274f6d1f26b6af4078d6acd4a0faec87", "score": "0.6114172", "text": "async function getActivity(user) {\n let userURL = `https://apps.runescape.com/runemetrics/profile/profile?user=${user || config.test.user}&activities=20`\n console.log(userURL)\n const result = await request.get(userURL).catch(function (err) {\n console.log(err)\n })\n console.log(result)\n}", "title": "" }, { "docid": "20ab59dafbcba081c7bf3623c5358823", "score": "0.61141133", "text": "static async getUser(username) {\n let res = await this.request(`users/${username}`);\n return res.user;\n }", "title": "" }, { "docid": "a8a4405b490881a1dd3cc44bfe41b340", "score": "0.61087567", "text": "async function fetchUsers() {\n const response = await fetch('https://jsonplaceholder.typicode.com/users')\n const data = await response.json();\n console.log(data);\n}", "title": "" }, { "docid": "bb08f46b848477e3333b71e04097ccb1", "score": "0.60992515", "text": "async function getUserInfos () {\n debug('user', `api endpoint is ${api}`)\n let accessToken = await getAccessToken()\n\n return got(\n new URL('v1/users', api),\n Object.assign({}, defaultApiConfiguration, {\n query: {\n me: true\n },\n headers: {\n 'Authorization': `Bearer ${accessToken}`\n }\n })\n )\n .then(({ body: { data: [ userInformations ] } }) => {\n debug('user ok', user)\n user = userInformations\n return userInformations\n })\n .catch(({ code, response, statusCode, url }) => {\n debug('user ko', code, statusCode, response, url)\n let error\n if (response) {\n error = new Error(`User informations retrieval failed.\\nServer replied with a ${statusCode} status and body: ${JSON.stringify(response.body)}`)\n } else {\n error = new Error(`User info retrieval errored. Code: ${code}, status: ${statusCode}. URL: ${url}`)\n }\n return Promise.reject(error)\n })\n}", "title": "" }, { "docid": "182638f386a28fa1392fb1962d77e127", "score": "0.6093208", "text": "async function getUsers() {\n let response = await fetch('http://localhost:3000/users')\n let users = response.json()\n return users\n}", "title": "" }, { "docid": "50e79dde875db922e9b1236dcd74dfe5", "score": "0.60926193", "text": "async function main() {\n\n getUser(\"test1\");\n\n}", "title": "" }, { "docid": "bc63b5329e7ba37950865852dda215c4", "score": "0.6077942", "text": "async function getUser(auth){\n const gmail = google.gmail({version: 'v1' , auth});\n \n let userInfo = await gmail.users.getProfile({auth: auth , userId: 'me'})\n return userInfo\n}", "title": "" }, { "docid": "9d696e3df4c056a86822543a54a8945b", "score": "0.6067516", "text": "get(req, res) {\n getAuth0User.byUsername(req.params.username)\n .then(user => user || { error: 'not found' })\n .then(async ({ error, username, user_id, user_metadata }) => {\n if (error) return new HTTPError(404, `User '${req.params.username}' was not found`).handle(res);\n\n const user = await User.model\n .findOne()\n .where('userId').equals(user_id);\n\n const solutionProgress = await getUserSolvedProgress(user);\n\n return res.json({\n data: publicizeUser(user, { username, user_metadata }, solutionProgress),\n });\n });\n }", "title": "" }, { "docid": "c7d59a927840a4583fd0fd05093405e6", "score": "0.60663563", "text": "fetchUser() {\n return new Promise((resolve) => {\n window.FB.api('/me', { fields: 'first_name,last_name,picture.type(large),email' }, (response) => {\n resolve(response);\n });\n });\n }", "title": "" }, { "docid": "fdd25d6c082e2c608a003cb8f9513c1c", "score": "0.6058131", "text": "get(callback) {\n api.get(\n 'user',\n null, null,\n result.$createListener(callback)\n );\n }", "title": "" }, { "docid": "c9bc067c1f61657ee62967b8207652f6", "score": "0.6051124", "text": "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 }", "title": "" }, { "docid": "9d6ec73bff0bf82371e78d95f2a074ca", "score": "0.6046807", "text": "async me(_, args, { user }) {\n\t\t\t// console.log(user);\n\t\t\t// make sure user is logged in\n\t\t\tif (!user) {\n\t\t\t\tthrow new Error('You are not authenticated!');\n\t\t\t}\n\n\t\t\t// user is authenticated\n\t\t\treturn await User.findByPk(user.id);\n\t\t}", "title": "" }, { "docid": "21731083d5042854e6aa23a7fe47e471", "score": "0.60458314", "text": "async function find(username) {\r\n let res = await request\r\n .get(reqURL(`${config.routes.user.find}/${username}`))\r\n .withCredentials()\r\n .set(\"Content-Type\", \"application/json\")\r\n .set(\"Accept\", \"application/json\")\r\n .auth(\"team\", \"DHKHJ98N-UHG9-K09J-7YHD-8Q7LK98DHGS7\");\r\n log(`find:${util.inspect(res.body)}`);\r\n return res.body;\r\n}", "title": "" }, { "docid": "7f001c39e8abe186fd1e6c3d28cfe72d", "score": "0.6043114", "text": "async getUser(username) {\n return $.ajax({\n method: \"get\",\n url: `/user/${username}`,\n })\n }", "title": "" }, { "docid": "db406ae03c658a41cf79e930a3517aaf", "score": "0.6040671", "text": "async function getUserData() {\n const resp = await supervise_rq(() => axios(API_PATHS.AUTH_WHOAMI));\n\n if (resp.status === STATUS.SUCCESS) {\n dispatch({\n type: AUTH_ACTIONS.AUTH_GET_USER,\n payload: resp.data,\n });\n }\n return resp.data;\n }", "title": "" }, { "docid": "8f2a6d671b16dd5a7e390488dd4d4311", "score": "0.6035744", "text": "async function fetchUsersAsync() {\n const response = await fetch('https://api.github.com/users');\n\n const json = await response.json();\n\n console.log(json);\n}", "title": "" }, { "docid": "3ab0aa601dc4cae67f5d0d061b676e3d", "score": "0.60300916", "text": "async getUsers() {\n let res = await fetch('/users', {credentials: 'include', headers: {'Content-Type': 'application/json'}})\n let v = await res.json()\n return v\n }", "title": "" }, { "docid": "ddd8d9160516fb86d8544a60da8bf789", "score": "0.6028806", "text": "async function lookfor() {\n account = await getAccount();\n profile = await getProfile(account._id);\n quiz = await getQuiz();\n }", "title": "" }, { "docid": "e0f28864619ab1b154ebba0663b08552", "score": "0.60206294", "text": "async function consumiendo(user){\n const api = \"https://api.github.com\"\n const response = await fetch(api + \"/users/\"+user)\n const data = await response.json\n return data\n}", "title": "" }, { "docid": "ce0fa99dbfc01e3063c1afbe52966e79", "score": "0.6014661", "text": "async function Get(req, res) {\n res.json(await User.findById(req.params.id));\n}", "title": "" }, { "docid": "cc2e19c82bc0af88ee2e8b14ed523dc0", "score": "0.60109025", "text": "getUserProfile(){\n return new Promise((resolve, reject) => {\n let url = `${options.baseUrl}/api/user/`; \n this.GET_AUTHORIZED(url)\n .then(res => {\n resolve(res.json());\n })\n .catch(error => {\n console.log(\"Error getting user profile: \", error);\n reject(error);\n })\n })\n }", "title": "" }, { "docid": "02f8b9ed5562c96d20991e6e28b3374a", "score": "0.60094273", "text": "async fetchUserData() {\n let token = localStorage.getItem('token');\n try {\n dispatch.breaks.setIsLoadingData(true);\n let response = await breakURL.get('/auth/me', {\n headers: { Authorization: `Bearer ${token}` },\n });\n dispatch.breaks.setUserData(response.data.data);\n localStorage.setItem('userData', JSON.stringify(response.data.data));\n dispatch.breaks.setIsLoadingData(false);\n } catch (err) {\n console.log(err);\n dispatch.breaks.setIsLoadingData(false);\n }\n }", "title": "" }, { "docid": "8943eec2d5c05d7210c3d1051e995ee9", "score": "0.60088664", "text": "async function getUserObject() {\n\n let users = await fetch(\"/userendpoint\");\n let userObject = await users.json();\n\n await getUserNameList(userObject)\n }", "title": "" }, { "docid": "954546d8b5f6f62fe9364475e961bf0c", "score": "0.6005585", "text": "async function getUser() {\n try {\n const response = await axios.get(url_user_4);\n let user_name_4 = response.data.name;\n console.log(\"axios user 4: \", user_name_4);\n } catch (error) {\n console.error(\"axios user 4: \",error);\n }\n }", "title": "" }, { "docid": "375064e583cf451f2422ea8894ed49f4", "score": "0.59944797", "text": "async function getUser(token) {\r\n var response = await axios.get('https://api.zoom.us/v2/users',{\r\n page_number: '1', \r\n page_size: '30', \r\n status: 'active',\r\n headers: {authorization: 'Bearer ' + token}\r\n }).catch(err => err.response.data);\r\n return response;\r\n\r\n}", "title": "" }, { "docid": "8c013f953e82cbadc82914089b6cacaa", "score": "0.5993913", "text": "async function Get(req, res) {\n res.send(await Model.User.findById(req.params.id));\n}", "title": "" }, { "docid": "d393d3ff82a00b375e26cbda48290df4", "score": "0.5993306", "text": "async function getUser(request, response, id) {\n try {\n const user = await User.findById(id);\n\n if(!user) {\n response.writeHead(404, { 'Content-Type': 'application/json' })\n response.end(JSON.stringify({ message: 'User Not Found' }))\n }\n else {\n response.writeHead(200, {'Content-Type': 'application/json'});\n response.end(JSON.stringify(user));\n }\n }\n catch (err) {\n console.log(err);\n }\n}", "title": "" }, { "docid": "4f683f1f85f4a96aa09c22316fa204f6", "score": "0.59865797", "text": "async getUser(ctx) {\n\n try {\n const _id = ctx.request.params.id;\n const userData = await User.findById(_id);\n console.log(userData);\n if (!userData) {\n return ctx.body;\n }\n else {\n ctx.body = { userData };\n }\n }\n catch (error) {\n ctx.throw(error);\n }\n }", "title": "" }, { "docid": "d28632da6db5d413db241ec47e766ef4", "score": "0.59838635", "text": "async function getOnlineUsers() {\n try {\n const response = await GLOBAL.api.get(\"/participants\");\n displayOnlineUsers(response.data);\n } catch (error) {\n console.log(\"error in getOnlineUsers()\");\n console.log(error);\n }\n}", "title": "" }, { "docid": "59fd66b07e4da94c14449e76a593515f", "score": "0.5976449", "text": "checkUser(context) {\n\t\t\tfetch(`${process.env.VUE_APP_API_URL}/auth/me`, { method: `GET`, credentials: `include` }) //=> Fetch API\n\t\t\t\t.then(response => !response.ok ? console.log(response) : response.json(response)) //=> Check response\n\t\t\t\t.then(async apiResponse => await context.commit(`USER`, { data: apiResponse })) //=> Commit changes\n\t\t\t\t.catch(apiError => console.log(apiError)) //=> Catch error\n\t\t}", "title": "" }, { "docid": "eb07759eeef89de6c6fa1dabd066bd64", "score": "0.5973302", "text": "async function fetchUsers(){\n const users = await fetch('https://jsonplaceholder.typicode.com/users');\n const data = users.json();\n console.log(data);\n}", "title": "" }, { "docid": "ec30a6f53dfab8098bb6b7d399efb62c", "score": "0.5971035", "text": "async function getUser(req, res, next) {\n const user = models.user.findOne({ where: { id: req.params.id } })\n req.data = res.json(user)\n}", "title": "" }, { "docid": "cf2483a8b19ad50c7c157af4e81b4589", "score": "0.5970474", "text": "async getFriends() {\n return $.ajax({\n method: \"get\",\n url: '/getFriends',\n })\n }", "title": "" }, { "docid": "cac6a42d258b28041f3ac2b2b34c9537", "score": "0.5962014", "text": "async getUser(username) {\n try {\n const result = await this.axiosInstance.get(`/users/${username}`);\n return result;\n } catch (err) {\n helpMeInstructor(err);\n return err;\n }\n }", "title": "" }, { "docid": "c16ccb36cb1ac61ad7f09df40061e167", "score": "0.59610724", "text": "async getUser () {\n\t\tthis.user = await this.data.users.getById(this.tokenInfo.userId);\n\t\tif (!this.user || this.user.get('deactivated')) {\n\t\t\tthrow this.errorHandler.error('notFound', { info: 'user' });\n\t\t}\n\t}", "title": "" }, { "docid": "a44277492e5a0b6d7ae7500dca9821a0", "score": "0.59609985", "text": "async function requestGetUser(setGetUser) {\n try {\n const response = await fetch(`${API_URL}/user/me`, {\n headers: {\n \"content-type\": \"application/json\",\n Accept: \"application/json\",\n Authorization: \"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2MTFkMzIwYmMxZDFhNzAwMjE5ZjNjM2YiLCJpYXQiOjE2MjkzMDMzMDd9.hQvbprVSC3iqDFNO9_xGgb-95zLRg3KFwGUstJmCew4\",\n }\n });\n const data = await response.json();\n setGetUser(data);\n }\n catch (e) {\n console.error(\"error\",e);\n }\n}", "title": "" }, { "docid": "4a6695aa3ee97fa856030b1c2421bfcd", "score": "0.5958524", "text": "async show({params, response}){\n const user = await User.find(params.id)\n const res = {\n first_name: user.first_name,\n last_name: user.last_name,\n email: user.email\n }\n return response.json(res)\n }", "title": "" }, { "docid": "6f5b6ac8bddd7f44b798d8c648ea7db4", "score": "0.59531766", "text": "async function requestAccount(){\n //request metamask accounts\n await window.ethereum.request({method: 'eth_requestAccounts'});\n }", "title": "" }, { "docid": "7394b317953582471e373b13cef6d4ac", "score": "0.595062", "text": "async getCurrentUser(){\n return await GoogleSignin.getCurrentUser()\n }", "title": "" }, { "docid": "5eb3c83a359c9e365b3a2a76b77f92a9", "score": "0.59429026", "text": "async function fetchUser() {\n return \"abc\";\n}", "title": "" } ]
e867d090d2524a570101fa596b9c7279
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.
[ { "docid": "745eeeee6b7763874cc161d0f81376ce", "score": "0.6614106", "text": "function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length);}// Common case.\n if(typeof arg==='number'){if(typeof encodingOrOffset==='string'){throw new Error('If encoding is specified then the first argument must be a string');}return allocUnsafe(this,arg);}return from(this,arg,encodingOrOffset,length);}", "title": "" } ]
[ { "docid": "f4969cdb9157e6399717ff05cd035df6", "score": "0.73532706", "text": "function BufferToArrayBuffer () {\n return (new Buffer(this)).buffer\n}", "title": "" }, { "docid": "f4969cdb9157e6399717ff05cd035df6", "score": "0.73532706", "text": "function BufferToArrayBuffer () {\n return (new Buffer(this)).buffer\n}", "title": "" }, { "docid": "f4969cdb9157e6399717ff05cd035df6", "score": "0.73532706", "text": "function BufferToArrayBuffer () {\n return (new Buffer(this)).buffer\n}", "title": "" }, { "docid": "f4969cdb9157e6399717ff05cd035df6", "score": "0.73532706", "text": "function BufferToArrayBuffer () {\n return (new Buffer(this)).buffer\n}", "title": "" }, { "docid": "a6463b6b3f642f3956f0945246176afb", "score": "0.73009443", "text": "function Buffer(subject, encoding, offset) {\n // The actual buffer that will become 'this'.\n var buf;\n var type;\n\n // Are we slicing?\n if (typeof offset === 'number') {\n // create a sub-view\n buf = subject.subarray(offset, coerce(encoding) + offset);\n } else {\n // Find the length\n switch (type = typeof subject) {\n case 'number':\n buf = new Uint8Array(coerce(subject));\n break;\n\n case 'string':\n buf = encode(subject, encoding);\n break;\n\n case 'object': // Assume object is an array\n // only use it verbatim if it's a buffer and we see it as such (aka\n // it's from our compartment)\n if (buf instanceof Uint8Array)\n buf = subject;\n else\n buf = new Uint8Array(subject);\n break;\n\n default:\n throw new Error('First argument needs to be a number, ' +\n 'array or string.');\n }\n }\n\n // Return the mixed-in Uint8Array to be our 'this'!\n return buf;\n}", "title": "" }, { "docid": "aa7878161e465c3bae79370a64c062cb", "score": "0.6956338", "text": "toBuffer(): typeof Buffer {\n const a = super.toArray().reverse();\n const b = Buffer.from(a);\n if (b.length === 8) {\n return b;\n }\n assert(b.length < 8, 'u64 too large');\n\n const zeroPad = Buffer.alloc(8);\n b.copy(zeroPad);\n return zeroPad;\n }", "title": "" }, { "docid": "9c74a4847e42bd362d34a4b139cf2133", "score": "0.6898581", "text": "arrayBuffer() {\n throw new Error('arrayBuffer not implemented');\n }", "title": "" }, { "docid": "88ed86a5ee84befaee382c2f02debf40", "score": "0.68510866", "text": "function Buffer(arrayBuffer) {\n\tif (!(arrayBuffer instanceof ArrayBuffer)) arrayBuffer = new ArrayBuffer(arrayBuffer);\n\tthis.buffer = new DataView(arrayBuffer);\n\tObject.defineProperty(this, 'length', {'value': this.buffer.byteLength, 'writable': false});\n}", "title": "" }, { "docid": "27c4d72adc4b0a180c9a8efcfc65e9e4", "score": "0.685038", "text": "function arrayish2Buffer(arr) {\n\t if (arr instanceof Buffer) {\n\t return arr;\n\t }\n\t else if (arr instanceof Uint8Array) {\n\t return uint8Array2Buffer(arr);\n\t }\n\t else {\n\t return Buffer.from(arr);\n\t }\n\t}", "title": "" }, { "docid": "cce11bc7c3f251c6620d9099d5c34bc3", "score": "0.6848875", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "cce11bc7c3f251c6620d9099d5c34bc3", "score": "0.6848875", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "cce11bc7c3f251c6620d9099d5c34bc3", "score": "0.6848875", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "cce11bc7c3f251c6620d9099d5c34bc3", "score": "0.6848875", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\t\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\t\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\t\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.6838675", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.6838675", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.6838675", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.6838675", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.6838675", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.6838675", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.6838675", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.6838675", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.6838675", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "2592b477c9e3b00e6b2baae58de285cd", "score": "0.6838675", "text": "function Buffer (arg) {\n\t if (!(this instanceof Buffer)) {\n\t // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n\t if (arguments.length > 1) return new Buffer(arg, arguments[1])\n\t return new Buffer(arg)\n\t }\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT) {\n\t this.length = 0\n\t this.parent = undefined\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t return fromNumber(this, arg)\n\t }\n\n\t // Slightly less common case.\n\t if (typeof arg === 'string') {\n\t return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n\t }\n\n\t // Unusual.\n\t return fromObject(this, arg)\n\t}", "title": "" }, { "docid": "41828d53feb7f84585b2d1d9d24e8ba5", "score": "0.6818925", "text": "function 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(arg);}return from(arg,encodingOrOffset,length);}// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97", "title": "" }, { "docid": "41828d53feb7f84585b2d1d9d24e8ba5", "score": "0.6818925", "text": "function 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(arg);}return from(arg,encodingOrOffset,length);}// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97", "title": "" }, { "docid": "a69de1f68464daf038d2b1ea82883ec2", "score": "0.6803716", "text": "toBuffer(): typeof Buffer {\n const a = super.toArray().reverse();\n const b = Buffer.from(a);\n if (b.length === 8) {\n return b;\n }\n assert(b.length < 8, 'u64 too large');\n\n const zeroPad = Buffer.alloc(8);\n b.copy(zeroPad);\n return zeroPad;\n }", "title": "" }, { "docid": "dd61a7984c82668fc9f369308fe5480d", "score": "0.67895645", "text": "get buffer() {\n return createChainableApi_1.createChainableApi.call(this, 'Buffer', Buffer_1.Buffer, () => this.request(`${this.prefix}get_buf`, [this]));\n }", "title": "" }, { "docid": "ffd6f970bfce09f2cdb026fc9d9949f7", "score": "0.6766729", "text": "function Buffer(arg){if(!(this instanceof Buffer)){ // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\nif(arguments.length>1)return new Buffer(arg,arguments[1]);return new Buffer(arg);}if(!Buffer.TYPED_ARRAY_SUPPORT){this.length=0;this.parent=undefined;} // Common case.\nif(typeof arg==='number'){return fromNumber(this,arg);} // Slightly less common case.\nif(typeof arg==='string'){return fromString(this,arg,arguments.length>1?arguments[1]:'utf8');} // Unusual.\nreturn fromObject(this,arg);} // TODO: Legacy, not needed anymore. Remove in next major version.", "title": "" }, { "docid": "afb54f2c8a904095d3a3ca04239dead4", "score": "0.6721083", "text": "function Buffer (arg, encodingOrOffset, length) { // 99\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { // 100\n return new Buffer(arg, encodingOrOffset, length) // 101\n } // 102\n // 103\n // Common case. // 104\n if (typeof arg === 'number') { // 105\n if (typeof encodingOrOffset === 'string') { // 106\n throw new Error( // 107\n 'If encoding is specified then the first argument must be a string' // 108\n ) // 109\n } // 110\n return allocUnsafe(this, arg) // 111\n } // 112\n return from(this, arg, encodingOrOffset, length) // 113\n} // 114", "title": "" }, { "docid": "de567e23830076e5ae606a5d76c9f4cb", "score": "0.6718646", "text": "function Buffer(arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n }", "title": "" }, { "docid": "70fc1a6fd4ff31dec3ff01b46dd22cc7", "score": "0.6689831", "text": "function Buffer(arg) {\n // Common case.\n // Slightly less common case.\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n return this instanceof Buffer ? (Buffer.TYPED_ARRAY_SUPPORT || (this.length = 0, \n this.parent = void 0), \"number\" == typeof arg ? fromNumber(this, arg) : \"string\" == typeof arg ? fromString(this, arg, arguments.length > 1 ? arguments[1] : \"utf8\") : fromObject(this, arg)) : arguments.length > 1 ? new Buffer(arg, arguments[1]) : new Buffer(arg);\n }", "title": "" }, { "docid": "37ffe8ee5e94a05749714bc463735269", "score": "0.6677724", "text": "function Buffer (data) {\n return data;\n}", "title": "" }, { "docid": "cb7a35248fbb4925a895bff7c814781c", "score": "0.66591495", "text": "function Buffer (arg, encodingOrOffset, length) {\r\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\r\n\t return new Buffer(arg, encodingOrOffset, length)\r\n\t }\r\n\r\n\t // Common case.\r\n\t if (typeof arg === 'number') {\r\n\t if (typeof encodingOrOffset === 'string') {\r\n\t throw new Error(\r\n\t 'If encoding is specified then the first argument must be a string'\r\n\t )\r\n\t }\r\n\t return allocUnsafe(this, arg)\r\n\t }\r\n\t return from(this, arg, encodingOrOffset, length)\r\n\t}", "title": "" }, { "docid": "d5dbb254eedb73855abf1cf5d5bf6364", "score": "0.6648937", "text": "function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length);}// Common case.\nif(typeof arg==='number'){if(typeof encodingOrOffset==='string'){throw new Error('If encoding is specified then the first argument must be a string');}return allocUnsafe(this,arg);}return from(this,arg,encodingOrOffset,length);}", "title": "" }, { "docid": "d5dbb254eedb73855abf1cf5d5bf6364", "score": "0.6648937", "text": "function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length);}// Common case.\nif(typeof arg==='number'){if(typeof encodingOrOffset==='string'){throw new Error('If encoding is specified then the first argument must be a string');}return allocUnsafe(this,arg);}return from(this,arg,encodingOrOffset,length);}", "title": "" }, { "docid": "d5dbb254eedb73855abf1cf5d5bf6364", "score": "0.6648937", "text": "function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length);}// Common case.\nif(typeof arg==='number'){if(typeof encodingOrOffset==='string'){throw new Error('If encoding is specified then the first argument must be a string');}return allocUnsafe(this,arg);}return from(this,arg,encodingOrOffset,length);}", "title": "" }, { "docid": "d5dbb254eedb73855abf1cf5d5bf6364", "score": "0.6648937", "text": "function Buffer(arg,encodingOrOffset,length){if(!Buffer.TYPED_ARRAY_SUPPORT&&!(this instanceof Buffer)){return new Buffer(arg,encodingOrOffset,length);}// Common case.\nif(typeof arg==='number'){if(typeof encodingOrOffset==='string'){throw new Error('If encoding is specified then the first argument must be a string');}return allocUnsafe(this,arg);}return from(this,arg,encodingOrOffset,length);}", "title": "" }, { "docid": "78446837d6655ade816ef1fc1da3a809", "score": "0.6643388", "text": "function Buffer(arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1]);\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0;\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n }", "title": "" }, { "docid": "7c2640afdd88400691acc188585d8c85", "score": "0.6635019", "text": "function Buffer (subject, encoding) {\n var self = this\n if (!(self instanceof Buffer)) return new Buffer(subject, encoding)\n\n var type = typeof subject\n var length\n\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) {\n // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' +\n kMaxLength.toString(16) + ' bytes')\n }\n\n if (length < 0) length = 0\n else length >>>= 0 // coerce to uint32\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n self = Buffer._augment(new Uint8Array(length)) // eslint-disable-line consistent-this\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++) {\n self[i] = subject.readUInt8(i)\n }\n } else {\n for (i = 0; i < length; i++) {\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent\n\n return self\n}", "title": "" }, { "docid": "7c2640afdd88400691acc188585d8c85", "score": "0.6635019", "text": "function Buffer (subject, encoding) {\n var self = this\n if (!(self instanceof Buffer)) return new Buffer(subject, encoding)\n\n var type = typeof subject\n var length\n\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) {\n // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' +\n kMaxLength.toString(16) + ' bytes')\n }\n\n if (length < 0) length = 0\n else length >>>= 0 // coerce to uint32\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n self = Buffer._augment(new Uint8Array(length)) // eslint-disable-line consistent-this\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++) {\n self[i] = subject.readUInt8(i)\n }\n } else {\n for (i = 0; i < length; i++) {\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent\n\n return self\n}", "title": "" }, { "docid": "7c2640afdd88400691acc188585d8c85", "score": "0.6635019", "text": "function Buffer (subject, encoding) {\n var self = this\n if (!(self instanceof Buffer)) return new Buffer(subject, encoding)\n\n var type = typeof subject\n var length\n\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) {\n // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' +\n kMaxLength.toString(16) + ' bytes')\n }\n\n if (length < 0) length = 0\n else length >>>= 0 // coerce to uint32\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n self = Buffer._augment(new Uint8Array(length)) // eslint-disable-line consistent-this\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++) {\n self[i] = subject.readUInt8(i)\n }\n } else {\n for (i = 0; i < length; i++) {\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent\n\n return self\n}", "title": "" }, { "docid": "7c2640afdd88400691acc188585d8c85", "score": "0.6635019", "text": "function Buffer (subject, encoding) {\n var self = this\n if (!(self instanceof Buffer)) return new Buffer(subject, encoding)\n\n var type = typeof subject\n var length\n\n if (type === 'number') {\n length = +subject\n } else if (type === 'string') {\n length = Buffer.byteLength(subject, encoding)\n } else if (type === 'object' && subject !== null) {\n // assume object is array-like\n if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data\n length = +subject.length\n } else {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (length > kMaxLength) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' +\n kMaxLength.toString(16) + ' bytes')\n }\n\n if (length < 0) length = 0\n else length >>>= 0 // coerce to uint32\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Preferred: Return an augmented `Uint8Array` instance for best performance\n self = Buffer._augment(new Uint8Array(length)) // eslint-disable-line consistent-this\n } else {\n // Fallback: Return THIS instance of Buffer (created by `new`)\n self.length = length\n self._isBuffer = true\n }\n\n var i\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {\n // Speed optimization -- use set if we're copying from a typed array\n self._set(subject)\n } else if (isArrayish(subject)) {\n // Treat array-ish objects as a byte array\n if (Buffer.isBuffer(subject)) {\n for (i = 0; i < length; i++) {\n self[i] = subject.readUInt8(i)\n }\n } else {\n for (i = 0; i < length; i++) {\n self[i] = ((subject[i] % 256) + 256) % 256\n }\n }\n } else if (type === 'string') {\n self.write(subject, 0, encoding)\n } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT) {\n for (i = 0; i < length; i++) {\n self[i] = 0\n }\n }\n\n if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent\n\n return self\n}", "title": "" }, { "docid": "c1091310e1b14933a50504abc77de1e2", "score": "0.66298306", "text": "toBuffer() {\n\t const b = this._bn.toArrayLike(buffer.Buffer);\n\n\t if (b.length === 32) {\n\t return b;\n\t }\n\n\t const zeroPad = buffer.Buffer.alloc(32);\n\t b.copy(zeroPad, 32 - b.length);\n\t return zeroPad;\n\t }", "title": "" }, { "docid": "ee5f677fc8be7f6f7e0ebc69d8a41d73", "score": "0.6629226", "text": "function toBuffer(ab) {\n return new Buffer(new Uint8Array(ab));\n }", "title": "" }, { "docid": "ee5f677fc8be7f6f7e0ebc69d8a41d73", "score": "0.6629226", "text": "function toBuffer(ab) {\n return new Buffer(new Uint8Array(ab));\n }", "title": "" }, { "docid": "10cc854fa14e0a68615d59600572471f", "score": "0.66292095", "text": "function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n \n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n }", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.6615506", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.6615506", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.6615506", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.6615506", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.6615506", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.6615506", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.6615506", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.6615506", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.6615506", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.6615506", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.6615506", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.6615506", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.6615506", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "b98f3fd020042241aec5258afa3844a5", "score": "0.6615506", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\t\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "f330b00c59c5f1076605cd57748f5c22", "score": "0.660716", "text": "function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n }", "title": "" }, { "docid": "f330b00c59c5f1076605cd57748f5c22", "score": "0.660716", "text": "function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n }", "title": "" }, { "docid": "f330b00c59c5f1076605cd57748f5c22", "score": "0.660716", "text": "function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n }", "title": "" }, { "docid": "1e11090388a4826ad69d6fda95c1515f", "score": "0.6604534", "text": "function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n }", "title": "" }, { "docid": "4549dedb516902e05d6212ea3ccb2355", "score": "0.6599832", "text": "function toBuffer(ab) {\n return new Buffer(new Uint8Array(ab));\n }", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "aab9241fd04991ae6c90cc213649f2f2", "score": "0.65935254", "text": "function Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n this.length = 0\n this.parent = undefined\n }\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}", "title": "" }, { "docid": "ad75aa62fbcacc74958266fb14d5e912", "score": "0.65915495", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "ad75aa62fbcacc74958266fb14d5e912", "score": "0.65915495", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "ad75aa62fbcacc74958266fb14d5e912", "score": "0.65915495", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" }, { "docid": "ad75aa62fbcacc74958266fb14d5e912", "score": "0.65915495", "text": "function Buffer (arg, encodingOrOffset, length) {\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n\t return new Buffer(arg, encodingOrOffset, length)\n\t }\n\n\t // Common case.\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new Error(\n\t 'If encoding is specified then the first argument must be a string'\n\t )\n\t }\n\t return allocUnsafe(this, arg)\n\t }\n\t return from(this, arg, encodingOrOffset, length)\n\t}", "title": "" } ]
14c4cdc6b4a3187913382c96763e27be
(public) this & ~a
[ { "docid": "fc1acf407d2fc309ec9807d7685091ca", "score": "0.54109406", "text": "function op_andnot(x, y) {\n return x & ~y;\n }", "title": "" } ]
[ { "docid": "473612dd7ab784f7e8c91ac958052970", "score": "0.58434314", "text": "function uh(){this.b=null;this.a=[]}", "title": "" }, { "docid": "473612dd7ab784f7e8c91ac958052970", "score": "0.58434314", "text": "function uh(){this.b=null;this.a=[]}", "title": "" }, { "docid": "473612dd7ab784f7e8c91ac958052970", "score": "0.58434314", "text": "function uh(){this.b=null;this.a=[]}", "title": "" }, { "docid": "473612dd7ab784f7e8c91ac958052970", "score": "0.58434314", "text": "function uh(){this.b=null;this.a=[]}", "title": "" }, { "docid": "4eba41b3de691f7229aafe65d1b496e9", "score": "0.58050984", "text": "a (!a.a) {N\n a.a();N\n }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "a72e25a37811f407a04b8455e984e6c8", "score": "0.5784353", "text": "function op_andnot(x,y) { return x&~y; }", "title": "" }, { "docid": "0a64f5ce81a2a06b86256b8e53dcbe1b", "score": "0.57374996", "text": "function op_andnot(x,y){return x&~y}", "title": "" }, { "docid": "f996414aa0f1b49659b488088198527d", "score": "0.57183915", "text": "function A(t){\"new\"in t&&(t.returnOriginal=!t.new,delete t.new)}", "title": "" }, { "docid": "a85ac6f26e0c7a4df0e250acff3c10f2", "score": "0.5653986", "text": "function r$8(r){return o$b(()=>r.forEach(r=>u$4(r)&&r.remove()))}", "title": "" }, { "docid": "f14b0bb98ebaa96f8e2b133457eadf8b", "score": "0.5623407", "text": "function op_andnot(x, y) {\n\t\t return x & ~y;\n\t\t}", "title": "" }, { "docid": "9487a2827f0949a309a1aaf84c0af05b", "score": "0.5573983", "text": "function $g(){this.b=null;this.a=[]}", "title": "" }, { "docid": "9487a2827f0949a309a1aaf84c0af05b", "score": "0.5573983", "text": "function $g(){this.b=null;this.a=[]}", "title": "" }, { "docid": "9487a2827f0949a309a1aaf84c0af05b", "score": "0.5573983", "text": "function $g(){this.b=null;this.a=[]}", "title": "" }, { "docid": "9487a2827f0949a309a1aaf84c0af05b", "score": "0.5573983", "text": "function $g(){this.b=null;this.a=[]}", "title": "" }, { "docid": "9a084d55c478440101eedd6aefc960d3", "score": "0.5518416", "text": "function op_andnot(x, y) {\n return x & ~y;\n }", "title": "" }, { "docid": "4ce4704a9d5f6d2a1c10430a36acd2b1", "score": "0.548807", "text": "function op_andnot(x, y) {\n\t\t\treturn x & ~y;\n\t\t}", "title": "" }, { "docid": "30df60159a113694f2add2ee3019a133", "score": "0.54745185", "text": "function qh(){this.b=null;this.a=[]}", "title": "" }, { "docid": "3c085ccc504f9c8c9d485f3e0f84e119", "score": "0.5471505", "text": "function op_andnot(x, y) {\r\n return x & ~y;\r\n}", "title": "" }, { "docid": "4ab4644c00e854c7b128dbd777fd288b", "score": "0.543739", "text": "function op_andnot(x, y) {\n return x & ~y;\n }", "title": "" }, { "docid": "2f34b733795c42f6cc8b472dfc6e800c", "score": "0.5425732", "text": "static addOrSubtract(a /*int*/, b /*int*/) {\n return a ^ b;\n }", "title": "" }, { "docid": "0764a1f8121401b743252982d11b4207", "score": "0.54137766", "text": "function op_andnot(x, y)\n {\n return x & ~y;\n }", "title": "" }, { "docid": "0764a1f8121401b743252982d11b4207", "score": "0.54137766", "text": "function op_andnot(x, y)\n {\n return x & ~y;\n }", "title": "" }, { "docid": "218649070a98d2e1932ae88d028c9350", "score": "0.5402765", "text": "function unset(num, bit) {\n\tnum &= ~bit;\n\treturn num;\n}", "title": "" }, { "docid": "69d47c5bf6f9948d2892c989998e992b", "score": "0.5375095", "text": "function bnClearBit(n){return this.changeBit(n,op_andnot)}", "title": "" }, { "docid": "65b1cf75f62ffccac29b3bff61ce966e", "score": "0.5359505", "text": "function op_andnot(x, y) {\n return x & ~y;\n}", "title": "" }, { "docid": "65b1cf75f62ffccac29b3bff61ce966e", "score": "0.5359505", "text": "function op_andnot(x, y) {\n return x & ~y;\n}", "title": "" }, { "docid": "340f6e064fa87cae0c1f44efc2b016e1", "score": "0.5335977", "text": "function subtract(a, b) {\n return add(a, b, true);\n }", "title": "" }, { "docid": "528bccf479257cc5c01a8cd13a30cfcd", "score": "0.53327876", "text": "function removeAll(f, a) {\n\t var l = a.length;\n\t var b = new Array(l);\n\t var j = 0;\n\t for (var x, i = 0; i < l; ++i) {\n\t x = a[i];\n\t if (!f(x)) {\n\t b[j] = x;\n\t ++j;\n\t }\n\t }\n\n\t b.length = j;\n\t return b;\n\t}", "title": "" }, { "docid": "89433444e7c62c58bcc5dcb1032fcb16", "score": "0.53197664", "text": "function op_andnot(x, y) {\n return x & ~y;\n}", "title": "" }, { "docid": "759821db66e6097e2cb30661e295ed55", "score": "0.53091645", "text": "get not() {\n this.negate = !this.negate;\n return this;\n }", "title": "" }, { "docid": "759821db66e6097e2cb30661e295ed55", "score": "0.53091645", "text": "get not() {\n this.negate = !this.negate;\n return this;\n }", "title": "" }, { "docid": "d745dc0c9c131803eb8bd407e1ec2539", "score": "0.52968585", "text": "clear () {\n this.aInB = true;\n this.bInA = true;\n this.overlap = Number.MAX_VALUE;\n this.indexShapeA = -1;\n this.indexShapeB = -1;\n return this;\n }", "title": "" }, { "docid": "b7f360fc66c357d27b8595a0ad625055", "score": "0.52958333", "text": "function abs($this) {\n if (!$this.unsigned && isNegative($this)) return op_UnaryNegation($this);else return $this;\n}", "title": "" }, { "docid": "158cab34c595bc169831b9e9f921775d", "score": "0.5284324", "text": "function op_andnot(x, y) {\n return x & ~y\n}", "title": "" }, { "docid": "158cab34c595bc169831b9e9f921775d", "score": "0.5284324", "text": "function op_andnot(x, y) {\n return x & ~y\n}", "title": "" }, { "docid": "158cab34c595bc169831b9e9f921775d", "score": "0.5284324", "text": "function op_andnot(x, y) {\n return x & ~y\n}", "title": "" }, { "docid": "158cab34c595bc169831b9e9f921775d", "score": "0.5284324", "text": "function op_andnot(x, y) {\n return x & ~y\n}", "title": "" }, { "docid": "158cab34c595bc169831b9e9f921775d", "score": "0.5284324", "text": "function op_andnot(x, y) {\n return x & ~y\n}", "title": "" }, { "docid": "158cab34c595bc169831b9e9f921775d", "score": "0.5284324", "text": "function op_andnot(x, y) {\n return x & ~y\n}", "title": "" }, { "docid": "158cab34c595bc169831b9e9f921775d", "score": "0.5284324", "text": "function op_andnot(x, y) {\n return x & ~y\n}", "title": "" }, { "docid": "158cab34c595bc169831b9e9f921775d", "score": "0.5284324", "text": "function op_andnot(x, y) {\n return x & ~y\n}", "title": "" }, { "docid": "158cab34c595bc169831b9e9f921775d", "score": "0.5284324", "text": "function op_andnot(x, y) {\n return x & ~y\n}", "title": "" }, { "docid": "158cab34c595bc169831b9e9f921775d", "score": "0.5284324", "text": "function op_andnot(x, y) {\n return x & ~y\n}", "title": "" }, { "docid": "198f5142583bfb2f4da62e37966dadba", "score": "0.5276054", "text": "negate() {\n let hi = ~this.hi, lo = this.lo;\n if (lo)\n lo = ~lo + 1;\n else\n hi += 1;\n return new PbLong(lo, hi);\n }", "title": "" }, { "docid": "d06c3f3097c1481636a728648835a4a5", "score": "0.52685004", "text": "function nand_operation(a, b){\n\tvar c = 1-(a&b);\n\treturn c;\n}", "title": "" }, { "docid": "1f40b272776596095ebe4ec3b6d069d1", "score": "0.52436036", "text": "destroy() {\n this.ops.length = 0;\n this.offset = 0;\n return this;\n }", "title": "" }, { "docid": "e5803cec701d6a0fbdc58305c4480f45", "score": "0.52261394", "text": "function removeAll(f, a) {\n var l = a.length;\n var b = new Array(l);\n var j = 0;\n for (var x, i = 0; i < l; ++i) {\n x = a[i];\n if (!f(x)) {\n b[j] = x;\n ++j;\n }\n }\n\n b.length = j;\n return b;\n }", "title": "" }, { "docid": "a0684baf56d3835fdd288e0ebe97d0af", "score": "0.522339", "text": "function removeAll$2(f, a) {\n var l = a.length;\n var b = new Array(l);\n var j = 0;\n for (var x, i = 0; i < l; ++i) {\n x = a[i];\n if (!f(x)) {\n b[j] = x;\n ++j;\n }\n }\n\n b.length = j;\n return b;\n }", "title": "" }, { "docid": "15283958be12bcf049bbb6c455de406f", "score": "0.52125466", "text": "function Zr(e){delete qr[e]}", "title": "" }, { "docid": "d043c85e3431614aa2e2e00df582bf02", "score": "0.52077216", "text": "a (a.aAa && a.aAa === 0) {N\n a.aAa(0, 0);N\n a.a();N\n }", "title": "" }, { "docid": "2c1213f87685328d3bc259ead27bb7b7", "score": "0.51998085", "text": "function uh() {\n this.b = null;\n this.a = [];\n }", "title": "" }, { "docid": "1825c8c9a3f483b3c906fc592627d777", "score": "0.5161961", "text": "function bnClearBit(n) { return this.changeBit(n,op_andnot); }", "title": "" }, { "docid": "1825c8c9a3f483b3c906fc592627d777", "score": "0.5161961", "text": "function bnClearBit(n) { return this.changeBit(n,op_andnot); }", "title": "" }, { "docid": "1825c8c9a3f483b3c906fc592627d777", "score": "0.5161961", "text": "function bnClearBit(n) { return this.changeBit(n,op_andnot); }", "title": "" }, { "docid": "1825c8c9a3f483b3c906fc592627d777", "score": "0.5161961", "text": "function bnClearBit(n) { return this.changeBit(n,op_andnot); }", "title": "" }, { "docid": "1825c8c9a3f483b3c906fc592627d777", "score": "0.5161961", "text": "function bnClearBit(n) { return this.changeBit(n,op_andnot); }", "title": "" }, { "docid": "1825c8c9a3f483b3c906fc592627d777", "score": "0.5161961", "text": "function bnClearBit(n) { return this.changeBit(n,op_andnot); }", "title": "" }, { "docid": "1825c8c9a3f483b3c906fc592627d777", "score": "0.5161961", "text": "function bnClearBit(n) { return this.changeBit(n,op_andnot); }", "title": "" }, { "docid": "1825c8c9a3f483b3c906fc592627d777", "score": "0.5161961", "text": "function bnClearBit(n) { return this.changeBit(n,op_andnot); }", "title": "" }, { "docid": "1825c8c9a3f483b3c906fc592627d777", "score": "0.5161961", "text": "function bnClearBit(n) { return this.changeBit(n,op_andnot); }", "title": "" }, { "docid": "1825c8c9a3f483b3c906fc592627d777", "score": "0.5161961", "text": "function bnClearBit(n) { return this.changeBit(n,op_andnot); }", "title": "" } ]
26aa1f808ed0d8785380a24ed76bbb8e
get the total number of traffic permissions present
[ { "docid": "27a4b145a99bbcb9c2334c2820dceeee", "score": "0.7396314", "text": "fetchTrafficPermissionTotalCount ({ commit }) {\n const params = { size: 1 }\n\n return api.getAllTrafficPermissions(params)\n .then(response => {\n const total = response.total\n\n commit('SET_TOTAL_TRAFFIC_PERMISSION_COUNT', total)\n })\n .catch(error => {\n console.error(error)\n })\n }", "title": "" } ]
[ { "docid": "579c87806d46b81c9fe7f274d515cbd2", "score": "0.6630182", "text": "fetchTrafficPermissionTotalCountFromMesh ({ commit }, mesh) {\n const params = { size: 1 }\n\n return api.getAllTrafficPermissionsFromMesh(mesh, params)\n .then(response => {\n const total = response.total\n\n commit('SET_TOTAL_TRAFFIC_PERMISSION_COUNT_FROM_MESH', total)\n })\n .catch(error => {\n console.error(error)\n })\n }", "title": "" }, { "docid": "ade1ab91bcb1483ce472db2ea41a0310", "score": "0.6405546", "text": "function getPermissions( entity: string ): number\n{\n\tconst state = store.getState();\n\n\tconst permissionsEntry = state.lk.permissions.find( ( permission ) => permission.entity === entity );\n\n\treturn permissionsEntry === undefined ? NO_PERMISSIONS : permissionsEntry.permissions;\n}", "title": "" }, { "docid": "70e6ac490f1babfe7de0929114b37c91", "score": "0.63904554", "text": "async checkPrivilege() {\n let count;\n if (this.model.god) {\n count = -1;\n } else {\n let referredCount = await users.countAsync({\n ref: this.login\n });\n count = config.baseFollowers + referredCount * config.referralBonus;\n }\n\n return {\n count: count,\n referrals: ct\n };\n\n }", "title": "" }, { "docid": "a72935de7f0236a5586c1b90e117bb72", "score": "0.6232153", "text": "getProfileStatsCount() {}", "title": "" }, { "docid": "7c6a974d7fe91c6995a1e447a0963b49", "score": "0.6108432", "text": "get totalConnectionCount() {\n return this[kConnections].length + (this.options.maxPoolSize - this[kPermits]);\n }", "title": "" }, { "docid": "a6fbdf3a17e94b8637eda77664620c62", "score": "0.60978824", "text": "get totalConnectionCount() {\n return (this.availableConnectionCount + this.pendingConnectionCount + this.currentCheckedOutCount);\n }", "title": "" }, { "docid": "01d6f7bbbcbd9f56d2777e9e545f6c21", "score": "0.59436893", "text": "function count(req) {\n\tvar id = getIp(req);\n\t// Check if user is banned or maxed\n\tif (isBanned(id)) {\n\t\treturn false;\n\t}\n\t// Count\n\taddToUser(id);\n}", "title": "" }, { "docid": "c1f3f8dcedd187d2e544d60f55effe07", "score": "0.5931776", "text": "getHomeCount() {\n return _util.request({\n url: \"/manage/statistic/base_count.do\"\n });\n }", "title": "" }, { "docid": "5539512ed872b49d67aec7f73f7acaa6", "score": "0.5909467", "text": "static get memberCounts() {\n return Modules.MemberCountStore.getMemberCounts();\n }", "title": "" }, { "docid": "4d22015d9c007f59a753571960cc8291", "score": "0.5836281", "text": "function get_total(req){\n var q = datastore.createQuery(USER);\n const results = {};\n\n return datastore.runQuery(q).then( (entities) => {\n results.items = entities[0].map(fromDatastore);\n\n return results.items.length;\n });\n}", "title": "" }, { "docid": "b2e04907fd1c352f3fe68e749ed377a7", "score": "0.5805326", "text": "function getTotalAccidents() {\n\n\t\tvar question = '\\n\\t\\t\\t<REQUEST>\\n\\t\\t\\t <LOGIN authenticationkey=\"' + apikey + '\" />\\n\\t\\t\\t <QUERY objecttype=\"Situation\">\\n\\t\\t\\t <FILTER>\\n\\t\\t\\t <WITHIN name=\\'Deviation.Geometry.SWEREF99TM\\' shape=\\'center\\' value=\\'674130 6579686\\' radius=\\'30000\\' />\\n\\t\\t\\t <EQ name=\\'Deviation.MessageType\\' value=\\'Olycka\\' />\\n\\t\\t\\t </FILTER>\\n\\t\\t\\t <INCLUDE>Deviation.MessageType</INCLUDE>\\n\\t\\t\\t </QUERY>\\n\\t\\t\\t</REQUEST>\\n\\t\\t';\n\n\t\tvar fetchRequest = fetch(url, {\n\t\t\tmethod: 'post',\n\t\t\tmode: 'cors',\n\t\t\tbody: question,\n\t\t\theaders: {\n\t\t\t\t'Content-Type': 'text/xml'\n\t\t\t}\n\t\t}).then(function (response) {\n\t\t\treturn response.json();\n\t\t}).catch(function (error) {\n\t\t\tconsole.log(error);\n\t\t});\n\n\t\tfetchRequest.then(function (data) {\n\t\t\tvar situations = data.RESPONSE.RESULT[0].Situation;\n\t\t\tvar total;\n\t\t\t// If situations is empty stop execution\n\t\t\tif (typeof situations != \"undefined\") {\n\t\t\t\ttotal = situationCounter(situations);\n\t\t\t} else {\n\t\t\t\ttotal = 0;\n\t\t\t}\n\t\t\tView.appendTotalToDropdown(\"Olyckor\", total);\n\t\t});\n\t}", "title": "" }, { "docid": "77c685c23b96dfe793458c701ee70706", "score": "0.5789388", "text": "function numberOfResources() {\n console.log(\"Checking the number of resources (\", $scope.url + \"-length?apikey=\" + $scope.apikey, \" )\");\n $http\n .get($scope.url + \"-length?apikey=\" + $scope.apikey) //Aquí se realizan los 4 método de API: get, post, put, delete\n .then(function(response) { // Cuando termine de recibir los datos (then) ejecuta el callback\n tam = response.data[1];\n console.log(\"Number of resources stored: \", tam);\n });\n }", "title": "" }, { "docid": "b2e5824a678f382439433308ec66489c", "score": "0.57796425", "text": "async checkPermission(perm){\n return (await this.roles()\n .innerJoin('role_user', 'roles.id', 'role_user.role_id')\n .innerJoin('permission_role', 'roles.id', 'permission_role.role_id')\n .innerJoin('permissions', 'permission_role.permission_id', 'permissions.id')\n .where('user_id', '=', this.id)\n .where('permission_slug', '=', perm.toLowerCase())).length\n }", "title": "" }, { "docid": "ab87d55d9bce6d5a0a7b0bc6721857ed", "score": "0.5763548", "text": "function getTotalAccountsCount(accounts) {\n return accounts.length\n}", "title": "" }, { "docid": "a6aeb1a300bd0a39473ccf8e8a6608e6", "score": "0.5757396", "text": "async countAccessUp(req, res) {\n\t\tconst { service, access } = req.body;\n\n\t\tawait Service.updateOne(\n\t\t\t{ _id: mongoose.Types.ObjectId(service._id) },\n\t\t\t{ $inc: { acessos: 1 } },\n\t\t).exec(function(err, result) {\n\t\t\tif (err)\n\t\t\t\treturn res\n\t\t\t\t\t.status(400)\n\t\t\t\t\t.send({ error: \"Can't increment service access.\" });\n\n\t\t\treturn res.send({ result });\n\t\t});\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "1c0d6ebb760ec08bf201e0e77d9f948e", "score": "0.57530653", "text": "function getMemberCount()\n{\n return httpRequest(`https://api.telegram.org/bot${Token}/getChatMembersCount?chat_id=${chat_id}`, \"GET\");\n}", "title": "" }, { "docid": "36730d99453538f3cb79137e79c94b2e", "score": "0.5730067", "text": "static totalNumPlayers() {\n let count = 0\n for (let id of Object.keys(games)) {\n if (games[id].isActive) {\n count += games[id].players.filter(x => x.isConnected && !x.isBot).length\n }\n }\n return count\n }", "title": "" }, { "docid": "78c2a19b3f34bde9dd6af9f91aac00a2", "score": "0.5721919", "text": "passengersLength () {\n\t\t\tlet count = 0;\n\t\t\tthis.listOfFlights.forEach(function(flight) {\n\t\t\t\tcount += flight.numberOfPassengers();\n\t\t\t})\n\t\t\treturn count;\n\t\t}", "title": "" }, { "docid": "9596d59269ae9884860b146c6ff5fce1", "score": "0.5708116", "text": "function getTotalAccidents() {\n\n\t\tvar question = `\n\t\t\t<REQUEST>\n\t\t\t <LOGIN authenticationkey=\"${apikey}\" />\n\t\t\t <QUERY objecttype=\"Situation\">\n\t\t\t <FILTER>\n\t\t\t <WITHIN name='Deviation.Geometry.SWEREF99TM' shape='center' value='674130 6579686' radius='30000' />\n\t\t\t <EQ name='Deviation.MessageType' value='Olycka' />\n\t\t\t </FILTER>\n\t\t\t <INCLUDE>Deviation.MessageType</INCLUDE>\n\t\t\t </QUERY>\n\t\t\t</REQUEST>\n\t\t`;\n\n\t var fetchRequest = fetch(url,\n\t {\n\t method: 'post',\n\t mode: 'cors', \n\t body: question,\n\t headers: {\n\t 'Content-Type': 'text/xml'\n\t \t\t}\n\t })\n\t .then((response) => {\n\t return response.json();\n\t })\n\t\t.catch(error => {\n\t \tconsole.log(error);\n\t });\n\n\t\tfetchRequest.then(data => {\n\t\t\tvar situations = data.RESPONSE.RESULT[0].Situation;\n\t\t\tvar total;\n\t\t\t// If situations is empty stop execution\n\t\t\tif (typeof situations != \"undefined\") {\n\t\t\t\ttotal = situationCounter(situations); \n\t\t\t} else {\n\t\t\t\ttotal = 0;\n\t\t\t}\n\t\t\tView.appendTotalToDropdown(\"Olyckor\", total);\n\t\t});\n\t}", "title": "" }, { "docid": "efb89849e7b1872bae741c93149e82a7", "score": "0.5703506", "text": "async count() {\n const q = Object(_behaviors_paged_js__WEBPACK_IMPORTED_MODULE_3__[/* AsPaged */ \"a\"])(this);\n const r = await q.top(1)();\n return r.count;\n }", "title": "" }, { "docid": "5a8e5e56e8577d52b02fa2c71d67b63f", "score": "0.57029164", "text": "function getTotalAccountsCount(accounts) {\n return accounts.length;\n}", "title": "" }, { "docid": "5a8e5e56e8577d52b02fa2c71d67b63f", "score": "0.57029164", "text": "function getTotalAccountsCount(accounts) {\n return accounts.length;\n}", "title": "" }, { "docid": "5a8e5e56e8577d52b02fa2c71d67b63f", "score": "0.57029164", "text": "function getTotalAccountsCount(accounts) {\n return accounts.length;\n}", "title": "" }, { "docid": "5a8e5e56e8577d52b02fa2c71d67b63f", "score": "0.57029164", "text": "function getTotalAccountsCount(accounts) {\n return accounts.length;\n}", "title": "" }, { "docid": "5a8e5e56e8577d52b02fa2c71d67b63f", "score": "0.57029164", "text": "function getTotalAccountsCount(accounts) {\n return accounts.length;\n}", "title": "" }, { "docid": "341b870d7b6648248caa0f3ebef1c6be", "score": "0.5702257", "text": "function getChannelCount() {\n return lndService.getOpenChannels()\n .then(response => ({count: response.length}));\n}", "title": "" }, { "docid": "1054de0dacfab35830811d30ec97bdee", "score": "0.56837875", "text": "getTotalUsers() {\n return Object.keys(this.users).length;\n }", "title": "" }, { "docid": "c25cd6d022313eff6f2c3180ad1c71d2", "score": "0.56735295", "text": "static countUsers(){\n console.log(\"Exista 50 de utilizatori.\")\n }", "title": "" }, { "docid": "cc1d5d99c0969cc7dc0fb6f3db462ece", "score": "0.5672603", "text": "async count() {\n const q = Object(paged[\"a\" /* AsPaged */])(this, true);\n const r = await q.top(1)();\n return r.count;\n }", "title": "" }, { "docid": "b07b739aebdd0fece3aa65e2520aa5ad", "score": "0.5666245", "text": "get totalCount() { return grok_Stats_Get_TotalCount(this.d); }", "title": "" }, { "docid": "5cbeeecb45253f3a645c9d88e88b54ab", "score": "0.5645363", "text": "function getCountAllAccels() {\r\n\tvar result = invokeProcedure([], SQLStmtMap['COUNT_ALL_ACCELERATORS'].stmt);\r\n\treturn result;\r\n}", "title": "" }, { "docid": "ae2590ac26caf9c8f749e2ec6bb7bce0", "score": "0.5645154", "text": "function countModules() {\n /*\n Description:\n Counts the amount of modules thare are to choose from\n */\n amnt = availableModules.length;\n return amnt;\n}", "title": "" }, { "docid": "52115081ce4eb4b03a2120483cdce4b7", "score": "0.5643519", "text": "fetchTrafficRouteTotalCount ({ commit }) {\n const params = { size: 1 }\n\n return api.getAllTrafficRoutes(params)\n .then(response => {\n const total = response.total\n\n commit('SET_TOTAL_TRAFFIC_ROUTE_COUNT', total)\n })\n .catch(error => {\n console.error(error)\n })\n }", "title": "" }, { "docid": "90e97a040b4f41c2b533a158f41e5ae4", "score": "0.5613933", "text": "get permissions() {\n\t\treturn this.body.permissions;\n\t}", "title": "" }, { "docid": "386b6298071c3e524579f42c3f43339c", "score": "0.5588942", "text": "function count () {\n let c = segments.filter(s => s.status === 'downloading').length;\n lastCount = c;\n event.emit('count', c);\n return c;\n }", "title": "" }, { "docid": "ced720bc30bf6f54bc67552e74bf5e92", "score": "0.5572906", "text": "countTotal() {\n\t\tlet total = 0;\n\t\tconst myList = this.state.data;\n\t\tObject.keys(myList).forEach(function(key, index) {\n\t\t\ttotal = total + myList[key].count;\n\t\t});\n\t\treturn total;\n\t}", "title": "" }, { "docid": "7ee3cb16d4438f4ada947e1bf78f437b", "score": "0.5571017", "text": "getUsageLevel() {\n\t\tthis.ConnectionDetails.calculateUsageLevel(this.UserSession.usage).then(usageLevelTally => {\n\t\t\tthis.usageLevel = this.ConnectionDetails.getLabelsFromTally(usageLevelTally);\n\t\t});\n\t}", "title": "" }, { "docid": "5d2d4040af9811530d56a2c3f3ee5208", "score": "0.55567425", "text": "count() {\n let n = this.objectList.length();\n\n if (this.octant) \n for (let i=0; i<this.octant.length; i++) \n n += this.octant[i].count();\n return n\n }", "title": "" }, { "docid": "dd798b98da63396a385de1598bc70a5b", "score": "0.5549903", "text": "function totalCount() {\n return total;\n}", "title": "" }, { "docid": "8471be4c9fe603faf9fd233521242c75", "score": "0.5539152", "text": "get size () {\n return Array.from(this.connections.values())\n .reduce((accumulator, value) => accumulator + value.length, 0)\n }", "title": "" }, { "docid": "20fdcd32484ca7d097e100ac9955e2c1", "score": "0.55251914", "text": "nData() {\n return this.data_link.accessors().length;\n }", "title": "" }, { "docid": "20fdcd32484ca7d097e100ac9955e2c1", "score": "0.55251914", "text": "nData() {\n return this.data_link.accessors().length;\n }", "title": "" }, { "docid": "9a5ba3055d62ad53b80011017d4dcde2", "score": "0.55208623", "text": "function calcMaxAccessCounter(storage) {\n storage.heatmapMaxAccessCounter = 0;\n storage.shelves.forEach((shelf) => {\n const shelfAccess = shelf.sub.reduce((res, sub) => res + sub.accessCounter, 0);\n if (shelfAccess > storage.heatmapMaxAccessCounter) {\n storage.heatmapMaxAccessCounter = shelfAccess;\n }\n });\n}", "title": "" }, { "docid": "c5eba040a44d357f68fdd62f284bf198", "score": "0.5509981", "text": "getAllItemCount() {\n let allItemCount = 0;\n for (let itemInformation of this.itemInformationList) {\n allItemCount += itemInformation.count;\n }\n return allItemCount;\n }", "title": "" }, { "docid": "c216c10f8fe976266a0269107b1890b7", "score": "0.5502135", "text": "function totalAmountAdjectives(obj) {\n return Object.keys(obj).length;\n }", "title": "" }, { "docid": "132973c2cc95f2e185e5dd47c02ae7e6", "score": "0.54988784", "text": "function getActiveUsers() {\n return Object.keys(visitorsData).length;\n}", "title": "" }, { "docid": "5d220085f9edec58d9a39dbb74eb3926", "score": "0.548201", "text": "function getCounters(req,res){\n\tvar userId=req.user.sub;\n\t/*Si recibimos un ID por parametro*/\n\tif(req.params.id){\n\t\tuserId=req.params.id\n\t}\n\n\tgetCountFollow(req.params.id).then((value)=>{\n\t\treturn res.status(200).send(value)\n\t})\n}", "title": "" }, { "docid": "34505fcff94c62d55177eabfada27e21", "score": "0.54781085", "text": "get availableConnectionCount() {\n return this[kConnections].length;\n }", "title": "" }, { "docid": "34505fcff94c62d55177eabfada27e21", "score": "0.54781085", "text": "get availableConnectionCount() {\n return this[kConnections].length;\n }", "title": "" }, { "docid": "814478e7f713d7b6973c479fdd207a32", "score": "0.5472203", "text": "function getCounters(req, res) {\n var userId = req.user.sub\n if (req.params.id) {\n userId = req.params.id\n }\n\n getCountFollow(userId).then((value) => {\n //console.log('\\x1b[33m%s\\x1b[0m','Value: ', value)\n return res.status(200).send(value)\n })\n\n}", "title": "" }, { "docid": "90156be1d8ca2c4877a69e0d734de6ac", "score": "0.54716", "text": "function getCountOfSubscribers(){return totalSubscribers;}", "title": "" }, { "docid": "bf99c36b3f01a55f32aff69bef9d014a", "score": "0.5470615", "text": "size () {\n\t\tlet count = 0;\n\t\tlet node = this.head;\n\n\t\twhile (node) {\n\t\t\tcount++;\n\t\t\tnode = node.next;\n\t\t}\n\n\t\treturn count;\n\t}", "title": "" }, { "docid": "31e80b17322b0730e66eed9f2ddb857a", "score": "0.5464149", "text": "function getActiveUsers() {\n return Object.keys(visitorsData).length;\n}", "title": "" }, { "docid": "a21ebaa2966093cde44337bcd0d6ebee", "score": "0.5452791", "text": "countBookmarks() {\n\n const folders = this.getAllFolders();\n let count = 0;\n\n for (let i = 0; i < folders.length; i++) {\n count += folders[i].bookmarks.length;\n }\n\n return count;\n\n }", "title": "" }, { "docid": "9ccfa9b60dad9a46136c353ab4c61247", "score": "0.5451201", "text": "static countUsers(){\n console.log('There are 50 users ');\n }", "title": "" }, { "docid": "3b54b858bf51878fcd6e6840241990d7", "score": "0.54506135", "text": "count() {\n\t\treturn this.actions.size;\n\t}", "title": "" }, { "docid": "811081f7dc1ad8d7372af8fd9aaf8691", "score": "0.5447752", "text": "function getUserCount() {\n return db.get('users').size().value();\n }", "title": "" }, { "docid": "5450b4ca40ff0b171e3dbb0d74669a21", "score": "0.5432955", "text": "static count(){\n console.log('Count number of items')\n let count = 0;\n try{\n count = JSON.parse(localStorage.getItem('panier')).length;\n }catch{\n count = 0;\n }\n return count;\n }", "title": "" }, { "docid": "d7e6da060131773917f69e7a8f86dcb7", "score": "0.543162", "text": "function tally_list_length(includeConfig)\n {\n var l = 0;\n\n list.children().each(function()\n {\n var identifier = $(this).find(\".identifier\").html();\n\n if(identifier.substring(0, 21) == \"com.ghifari160.tally.\"\n && includeConfig)\n l++;\n else if(identifier.substring(0, 21) != \"com.ghifari160.tally.\")\n l++;\n });\n\n return l;\n }", "title": "" }, { "docid": "b2b0f8b3f5bf910546d2dab3c92b80a3", "score": "0.54281753", "text": "count() {\n return this._parent.get(this._through).count();\n }", "title": "" }, { "docid": "16507e20738e2e6396c1ea4072baec53", "score": "0.54261315", "text": "function howManyPages() {\r\n\tcount = 1;\r\n\tdiff = dlcCount - GM_getValue(\"dlcCount\");\r\n\twhile (diff > 25) {\r\n\t\tcount = count + 1;\r\n\t\tdiff = diff - 25;\r\n\t}\r\n\treturn count;\r\n}", "title": "" }, { "docid": "b52427df474c427b19c897e6762b8251", "score": "0.54216963", "text": "function GetTabListCount() {\n return TabList.length;\n}", "title": "" }, { "docid": "1c0c91c0a20b89bf0ed236493eb8c10b", "score": "0.541732", "text": "totalRegistrations(state){\n return state.registrations.length;\n }", "title": "" }, { "docid": "b69343d514f267ea44147cc2624d7dd2", "score": "0.5413981", "text": "getCount(request, response) {\n const curSession = Session.getSession(request, response);\n if (curSession == null)\n return;\n \n Label.getCount()\n .then(count => {\n response.json(count);\n })\n .catch(e => logAndReportError(response, 'Label.getCount', e));\n }", "title": "" }, { "docid": "633539a3118072be265fb1ec2d9bf55d", "score": "0.5411634", "text": "listPermissions() {\r\n return this.myself.permissions;\r\n }", "title": "" }, { "docid": "8226de04f73d418ae631e62aa52053e0", "score": "0.5408488", "text": "totalErrorCounts() {\n const counts = this.state.errorCounts;\n let total = 0;\n _.each(counts, (c) => {\n total += c;\n });\n return total;\n }", "title": "" }, { "docid": "f3e3ef07f5cc876b3f4880b3c749aab5", "score": "0.5406322", "text": "async count () {\n const response = await axios.get(`${this.baseUrl}/count`)\n return response.data.count\n }", "title": "" }, { "docid": "64370fe01ec5a77bf536ebabd16b73a6", "score": "0.54026765", "text": "count() {\n let n = this.objectList.length();\n\n if (this.bintree) \n for (let i=0; i<this.bintree.length; i++) \n n += this.octant[i].count();\n return n\n }", "title": "" }, { "docid": "8eedee5139b64d82571b654cbf7010f2", "score": "0.539869", "text": "function nAccounts() {\n return [x for each (x in fixIterator(MailServices.accounts.accounts))].length;\n}", "title": "" }, { "docid": "f869e8dd37ca2270fb406a257f315589", "score": "0.53979826", "text": "numMetWanted() {\n if (!this.assigned_group) {\n return 0;\n }\n return this.numWantedBy(this.assigned_group.students);\n }", "title": "" }, { "docid": "40e83986427f329dbb6f2c33c8212ba1", "score": "0.5388287", "text": "get count ()\n\t{\n\t\tif (!(\"_count\" in this))\n\t\t\t\tthis._count = 20;\n\t\treturn this._count;\n\t}", "title": "" }, { "docid": "6332a892a7120aaafb213ded11d57dd2", "score": "0.538352", "text": "length(){\n\t\tlet count = 0;\n\t\tif(this.head){\n\t\t\tcount++;\n\t\t\tfor(let pointer = this.head; pointer.next; pointer = pointer.next){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "title": "" }, { "docid": "f1f2cfef45d8e88bb8d8df8a21b65f34", "score": "0.5373299", "text": "@action getAssetsCount(criteria) {\n const { status, type, gateways, packet_lost_range, signal_strength, data_collectors } =\n this.criteria || {};\n const headers = this.getHeaders();\n\n const params = {\n ...(status && { asset_status: status }),\n ...(type && { asset_type: type }),\n ...(data_collectors && {\n data_collector_ids: data_collectors\n }),\n ...(gateways && {\n gateway_ids: gateways.map((e) => e.id),\n }),\n ...(packet_lost_range && {\n min_packet_loss:\n packet_lost_range.from === 0 ? null : packet_lost_range.from,\n max_packet_loss:\n packet_lost_range.to === 100 ? null : packet_lost_range.to,\n }),\n ...(signal_strength && {\n min_signal_strength:\n signal_strength.from === -150 ? null : signal_strength.from,\n max_signal_strength:\n signal_strength.to === 0 ? null : signal_strength.to,\n }),\n };\n let uri = null;\n switch (criteria) {\n case \"status\":\n uri = `resource_usage/count/status`;\n break;\n case \"gateways\":\n uri = `resource_usage/count/gateway`;\n break;\n case \"signal_strength\":\n uri = `resource_usage/count/signal`;\n break;\n case \"packet_lost\":\n uri = `resource_usage/count/loss`;\n break;\n default:\n break;\n }\n return API.get(uri, { headers, params });\n }", "title": "" }, { "docid": "e59280badb2e0c3db73fdcc7761afcef", "score": "0.53687084", "text": "function numberOfContacts(totalCount) {\n return totalCount + 1;\n}", "title": "" }, { "docid": "0d9f773ce0fc887923c5b7e9b49f7fb8", "score": "0.5367306", "text": "function Count(){\n\tif(ary.results){\n\t\treturn ary.results.length;\n\t}else if(ary.EntitySets){\n\t\treturn ary.EntitySets.length;\n\t}\n}", "title": "" }, { "docid": "34c2f1e78f338dbba3c70c53cdc121a9", "score": "0.53650814", "text": "fetchTrafficTraceTotalCount ({ commit }) {\n const params = { size: 1 }\n\n return api.getAllTrafficTraces(params)\n .then(response => {\n const total = response.total\n\n commit('SET_TOTAL_TRAFFIC_TRACE_COUNT', total)\n })\n .catch(error => {\n console.error(error)\n })\n }", "title": "" }, { "docid": "309dbb13b1808702e1a3eb440a014967", "score": "0.53615695", "text": "function getTotal() {\n return this.data.length;\n}", "title": "" }, { "docid": "8e9643170b8958bf39c64108fc0a659c", "score": "0.5354471", "text": "function getTotalPassengers(data) {\n\t// data is an array of the passagers ~ every passanger in an object in the array \n\t// return the length of the array \n\treturn data.length \n}", "title": "" }, { "docid": "526cbb7f5f61862ddef7c27742ebb085", "score": "0.5352264", "text": "function numberOfPeopleInRooms() {\n\n\tvar n = 0;\n\n\tfor (var key in io.sockets.manager.rooms) {\n\t\tif (key != '/lobby' && key != '')\n\t\t\tn += io.sockets.clients(key.substring(1)).length;\n\t}\n\n\treturn n;\n}", "title": "" }, { "docid": "9b5ab62718797ffafbdbaeba4a520f02", "score": "0.53512746", "text": "function countLength(){\r\n\treturn length;\r\n}", "title": "" }, { "docid": "640aaaae7a203f3044d6c90681a42c93", "score": "0.53502446", "text": "countUserBookmarks(userid) {\n\n const folders = this.getAllUserFolders(userid);\n let count = 0;\n\n for (let i = 0; i < folders.length; i++) {\n count += folders[i].bookmarks.length;\n }\n\n return count;\n\n }", "title": "" }, { "docid": "99feaf24281c1dd9830c051a8534725c", "score": "0.5348961", "text": "countUserFolders(userid) {\n\n const folders = this.getAllUserFolders(userid);\n let count = 0;\n\n for (let i = 0; i < folders.length; i++) {\n count++;\n }\n\n return count;\n\n }", "title": "" }, { "docid": "5f68540ea05feb82821479076fb31487", "score": "0.5325971", "text": "get Length() {\n let ptr = this.parent;\n let directory = ptr.parent;\n return directory.field('NumberOfFunctions').int();\n }", "title": "" }, { "docid": "05dde1846e57718a97920c50bdce2e99", "score": "0.53253406", "text": "frontiers_count() {\n return this._send(\"frontiers_count\");\n }", "title": "" }, { "docid": "8982eb86e20d9b3aaaa72bd56ee11bd8", "score": "0.531213", "text": "function getCount() {\n var self = this;\n if (self.zStorage.areItemsLoaded('Links')) {\n return self.$q.when(self._getLocalEntityCount('Links'));\n }\n // Farm objects aren't loaded; ask the server for a count.\n return EntityQuery.from('Links')\n .take(0).inlineCount()\n .using(self.manager).execute()\n .then(self._getInlineCount);\n }", "title": "" }, { "docid": "3ff03ddb0366f060837948d4d02c1cd9", "score": "0.5301515", "text": "permLevel (message) {\n let permlevel = 0;\n\n /*This thing here sorts the permission levels so it knows EXACTLY what your\n social status is. Actual, meaningful, comment: returns 1 if true, returns\n -1 if false.*/\n const permOrder = this.config.permLevels.slice(0).sort((p, c) => p.level < c.level ? 1 : -1);\n\n while(permOrder.length) {\n const currentLevel = permOrder.shift();\n if(message.guild && currentLevel.guildOnly) continue;\n if(currentLevel.check(message)){\n permlevel = currentLevel.level;\n break;\n }\n }\n return permlevel;\n }", "title": "" }, { "docid": "6382d1329fbffc5ba9202d048e3e4ded", "score": "0.5294389", "text": "size () {\n let count = 0;\n let current = this.head;\n\n while (current) {\n count += 1;\n current = current.next;\n }\n\n return count;\n }", "title": "" }, { "docid": "4b72c0f8d37534dffa6161e94e012f4e", "score": "0.52895975", "text": "get cumulatedSubscriptionCount() {\n return this.serverDiagnosticsSummary.cumulatedSubscriptionCount;\n }", "title": "" }, { "docid": "4881f7d4d4cba5e2abd92e11929350c9", "score": "0.52875555", "text": "get countCours(){\n let total = 0;\n this.sessions.forEach( session => {\n total += session.countCours;\n })\n return total;\n }", "title": "" }, { "docid": "9bbd661ca1a4eee4f941c164d5ce3933", "score": "0.52782714", "text": "get size() {\n // Return the triple count if if was cached.\n var size = this._size;\n if (size !== null)\n return size;\n\n // Calculate the number of triples by counting to the deepest level.\n var graphs = this._graphs, subjects, subject;\n for (var graphKey in graphs)\n for (var subjectKey in (subjects = graphs[graphKey].subjects))\n for (var predicateKey in (subject = subjects[subjectKey]))\n size += Object.keys(subject[predicateKey]).length;\n return this._size = size;\n }", "title": "" }, { "docid": "9bbd661ca1a4eee4f941c164d5ce3933", "score": "0.52782714", "text": "get size() {\n // Return the triple count if if was cached.\n var size = this._size;\n if (size !== null)\n return size;\n\n // Calculate the number of triples by counting to the deepest level.\n var graphs = this._graphs, subjects, subject;\n for (var graphKey in graphs)\n for (var subjectKey in (subjects = graphs[graphKey].subjects))\n for (var predicateKey in (subject = subjects[subjectKey]))\n size += Object.keys(subject[predicateKey]).length;\n return this._size = size;\n }", "title": "" }, { "docid": "736a4ae77008d95e43f3e7322ed83d6c", "score": "0.5276394", "text": "function adminList(object) {\n var counter = 0;\n\n object.forEach(function (user) {\n if (user.isAdmin === true) {\n counter++;\n }\n });\n return counter;\n}", "title": "" }, { "docid": "cb4892b110bbaf19671e5353fe4141f7", "score": "0.5272363", "text": "get accessibleCount () {\n return this.count - this._currentMinStackHeight\n }", "title": "" }, { "docid": "bd191f6aff8a6c72e5a9d5e20571b6f9", "score": "0.5267677", "text": "function numberOfmembers() {\n\n for (var i = 0; i < members.length; i++) {\n if (members[i].party == \"R\") {\n republicans.push(members[i].party);\n }\n if (members[i].party == \"D\") {\n democrats.push(members[i].party);\n }\n if (members[i].party == \"I\") {\n independents.push(members[i].party);\n }\n }\n }", "title": "" }, { "docid": "bd191f6aff8a6c72e5a9d5e20571b6f9", "score": "0.5267677", "text": "function numberOfmembers() {\n\n for (var i = 0; i < members.length; i++) {\n if (members[i].party == \"R\") {\n republicans.push(members[i].party);\n }\n if (members[i].party == \"D\") {\n democrats.push(members[i].party);\n }\n if (members[i].party == \"I\") {\n independents.push(members[i].party);\n }\n }\n }", "title": "" }, { "docid": "7222c30447981283afd837100f0aaa7d", "score": "0.52664363", "text": "async userReferralCount () {\n return await User.collection.countDocuments({ referrer: this.doc._id })\n }", "title": "" }, { "docid": "7a2a34510b91d7d77806d7b4db16ec3b", "score": "0.52650774", "text": "get currentSubscriptionCount() {\n return this.serverDiagnosticsSummary.currentSubscriptionCount;\n }", "title": "" }, { "docid": "63cd9d38f776b35ea5fb0c4f68ee6e93", "score": "0.5261942", "text": "function getTotalVisitsToday() { \r\n\treturn 0;\r\n\r\n\tif (this.tsid === \"BUVBKQP3QL13VUS\") { \r\n\t\tlog.info(this+\" getting total visits today \");\r\n\t}\r\n\t\r\n\tvar count = 0;\r\n\tfor (var i in this.visitors) { \r\n\t\tcount += this.getVisitsToday(i);\r\n\t}\r\n\t\r\n\treturn count;\r\n}", "title": "" }, { "docid": "739b465463e946b0fd4c1ebbbc9102af", "score": "0.5257296", "text": "async count(){ return (await this.fields()).length }", "title": "" }, { "docid": "82dfd218308ba45618f1d37660294a2f", "score": "0.5254019", "text": "function showRequestCount() {\n console.log(\"Processed Request Count--> GET:\" + getCounter\n + \", POST:\" + postCounter\n + \", DELETE:\" + deleteCounter\n + \", PUT:\" + putCounter);\n}", "title": "" } ]
76da62aeabc798768a59ca8ebac49058
Define a callback function for later on.
[ { "docid": "74001662f28c7f3b12924b07c0510f2b", "score": "0.0", "text": "function toolbar_event(event) {\n return fig.toolbar_button_onclick(event['data']);\n }", "title": "" } ]
[ { "docid": "4846f7442387d0797edb680641658aba", "score": "0.80615205", "text": "function callback(){}", "title": "" }, { "docid": "bfd3ac15570112d3b8e479acffd1aa8d", "score": "0.785519", "text": "function SimpleCallbackHandler() {}", "title": "" }, { "docid": "baf168493a2c3e71b6ea6cf211e5f057", "score": "0.7437827", "text": "function myfunc(callback){\n\n}", "title": "" }, { "docid": "212b92a46f70e21700ba1a74a469a67e", "score": "0.73003244", "text": "AddCallback(callback) {\n this.clRunner.AddCallback(callback);\n }", "title": "" }, { "docid": "8a4f2120410e08c4e154e50d5bd2af5c", "score": "0.72604895", "text": "static callback() {\n (0, _callback.processCallback)();\n }", "title": "" }, { "docid": "e5eb9584fe976adc4afa9d269b5bfcd6", "score": "0.7257593", "text": "setCallback(callback) {\n this.callback = callback\n }", "title": "" }, { "docid": "e7ee7eddcf512598eecc039a9046bd1a", "score": "0.7257447", "text": "function setHookCallback(callback){hookCallback=callback}", "title": "" }, { "docid": "9b3ee256fc0c7b408b5527b4d4f1b5b9", "score": "0.724438", "text": "function setHookCallback(callback){hookCallback=callback;}", "title": "" }, { "docid": "9b3ee256fc0c7b408b5527b4d4f1b5b9", "score": "0.724438", "text": "function setHookCallback(callback){hookCallback=callback;}", "title": "" }, { "docid": "9b3ee256fc0c7b408b5527b4d4f1b5b9", "score": "0.724438", "text": "function setHookCallback(callback){hookCallback=callback;}", "title": "" }, { "docid": "9b3ee256fc0c7b408b5527b4d4f1b5b9", "score": "0.724438", "text": "function setHookCallback(callback){hookCallback=callback;}", "title": "" }, { "docid": "9b3ee256fc0c7b408b5527b4d4f1b5b9", "score": "0.724438", "text": "function setHookCallback(callback){hookCallback=callback;}", "title": "" }, { "docid": "b2f18359bbabf1622fa231f1b45e3357", "score": "0.7169338", "text": "function setHookCallback(callback){hookCallback = callback;}", "title": "" }, { "docid": "5feeef3a4a363aca7b0fdefbfed977d7", "score": "0.7124237", "text": "function setHookCallback(callback){\nhookCallback=callback;}", "title": "" }, { "docid": "a5c6990c656e632f33f861ffa7b84409", "score": "0.71028435", "text": "_startupCallback(callback) {}", "title": "" }, { "docid": "94e5544edc499d9764ff6513d4345326", "score": "0.70440495", "text": "function addCallback(callback) {\n if (callback) {\n callbacks.push(callback);\n }\n }", "title": "" }, { "docid": "8d9f48add8482258ca1552d96cc83c3d", "score": "0.7017176", "text": "function addCallback(callback) {\r\n\r\n if (callback) {\r\n callbacks.push(callback);\r\n }\r\n\r\n }", "title": "" }, { "docid": "efdcfc32e4f267108401260fa7bf95a4", "score": "0.7015158", "text": "function addCallback(callback) {\n\n if (callback) {\n callbacks.push(callback);\n }\n\n }", "title": "" }, { "docid": "1e502de9fd97a5e29b58b11c69768a0c", "score": "0.70071435", "text": "function myfunc(){\r\n console.log(\"Intro to callback function!!\");\r\n }", "title": "" }, { "docid": "0e37c69f09b2420f8285db1b3d3e6cd9", "score": "0.6990062", "text": "subscribe(callback) {\n\t\t\t// Assign callback function to inner variable\n\t\t\tcallbackFn = callback;\n\t\t}", "title": "" }, { "docid": "79e5aa3211db5f59b5c52f0a0211f6fc", "score": "0.69678515", "text": "function setHookCallback (callback) {\n\t\t hookCallback = callback;\n\t\t }", "title": "" }, { "docid": "41d4959ee77b41334c54e105dd3732ed", "score": "0.6950432", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "7daa5c30c512061e3bfdc8110e362079", "score": "0.69437784", "text": "function sampleCallbackOne() {\n return \"I am a callback function\";\n}", "title": "" }, { "docid": "d69c0d13cda535abd85bd9bd874365e7", "score": "0.6922685", "text": "function addCallback(callback) {\n\n\t\tif ( callback ) {\n\t\t\tcallbacks.push(callback);\n\t\t}\n\n\t}", "title": "" }, { "docid": "b712eda100b2f1bdaa2d6e49f80df596", "score": "0.69201475", "text": "function setHookCallback(callback) {\n\t hookCallback = callback;\n\t }", "title": "" }, { "docid": "12750ac4c370bed60354a5c917b5348f", "score": "0.6911409", "text": "function addCallback(callback) {\n\n if (callback) {\n callbacks.push(callback);\n }\n\n }", "title": "" }, { "docid": "643d766bbc29159187cd8f001e122eff", "score": "0.690199", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t }", "title": "" }, { "docid": "643d766bbc29159187cd8f001e122eff", "score": "0.690199", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t }", "title": "" }, { "docid": "643d766bbc29159187cd8f001e122eff", "score": "0.690199", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t }", "title": "" }, { "docid": "643d766bbc29159187cd8f001e122eff", "score": "0.690199", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t }", "title": "" }, { "docid": "643d766bbc29159187cd8f001e122eff", "score": "0.690199", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t }", "title": "" }, { "docid": "643d766bbc29159187cd8f001e122eff", "score": "0.690199", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t }", "title": "" }, { "docid": "643d766bbc29159187cd8f001e122eff", "score": "0.690199", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t }", "title": "" }, { "docid": "643d766bbc29159187cd8f001e122eff", "score": "0.690199", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t }", "title": "" }, { "docid": "643d766bbc29159187cd8f001e122eff", "score": "0.690199", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t }", "title": "" }, { "docid": "643d766bbc29159187cd8f001e122eff", "score": "0.690199", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t }", "title": "" }, { "docid": "643d766bbc29159187cd8f001e122eff", "score": "0.690199", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t }", "title": "" }, { "docid": "643d766bbc29159187cd8f001e122eff", "score": "0.690199", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t }", "title": "" }, { "docid": "643d766bbc29159187cd8f001e122eff", "score": "0.690199", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t }", "title": "" }, { "docid": "643d766bbc29159187cd8f001e122eff", "score": "0.690199", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t }", "title": "" }, { "docid": "643d766bbc29159187cd8f001e122eff", "score": "0.690199", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t }", "title": "" }, { "docid": "643d766bbc29159187cd8f001e122eff", "score": "0.690199", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t }", "title": "" }, { "docid": "643d766bbc29159187cd8f001e122eff", "score": "0.690199", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t }", "title": "" }, { "docid": "643d766bbc29159187cd8f001e122eff", "score": "0.690199", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t }", "title": "" }, { "docid": "df0cc3ccfab262c94af1b22afe0c3e98", "score": "0.6901038", "text": "function setHookCallback(callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "452ba9723dcb80439d5c3db3cbc11e46", "score": "0.6898724", "text": "function setHookCallback(callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "0c2ad1823cfa51520ccd2b0f0937b90c", "score": "0.6898049", "text": "constructor(callback) {\n this._callback = callback;\n }", "title": "" }, { "docid": "cbd998d5c0d07111465fa1e0cf2b0926", "score": "0.68845284", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t}", "title": "" }, { "docid": "cbd998d5c0d07111465fa1e0cf2b0926", "score": "0.68845284", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t}", "title": "" }, { "docid": "cbd998d5c0d07111465fa1e0cf2b0926", "score": "0.68845284", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t}", "title": "" }, { "docid": "cbd998d5c0d07111465fa1e0cf2b0926", "score": "0.68845284", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t}", "title": "" }, { "docid": "cbd998d5c0d07111465fa1e0cf2b0926", "score": "0.68845284", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t}", "title": "" }, { "docid": "cbd998d5c0d07111465fa1e0cf2b0926", "score": "0.68845284", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t}", "title": "" }, { "docid": "cbd998d5c0d07111465fa1e0cf2b0926", "score": "0.68845284", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t}", "title": "" }, { "docid": "cbd998d5c0d07111465fa1e0cf2b0926", "score": "0.68845284", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t}", "title": "" }, { "docid": "cbd998d5c0d07111465fa1e0cf2b0926", "score": "0.68845284", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t}", "title": "" }, { "docid": "cbd998d5c0d07111465fa1e0cf2b0926", "score": "0.68845284", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t}", "title": "" }, { "docid": "cbd998d5c0d07111465fa1e0cf2b0926", "score": "0.68845284", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t}", "title": "" }, { "docid": "cbd998d5c0d07111465fa1e0cf2b0926", "score": "0.68845284", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t}", "title": "" }, { "docid": "cbd998d5c0d07111465fa1e0cf2b0926", "score": "0.68845284", "text": "function setHookCallback (callback) {\n\t hookCallback = callback;\n\t}", "title": "" }, { "docid": "3c5023fbe757038b3d2fa9a82b2547f7", "score": "0.687992", "text": "function addCallback(callback) {\n\n if (callback) {\n callbacks.push(callback);\n }\n\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" }, { "docid": "ad78c258841047643f0dcfad589e6796", "score": "0.68766886", "text": "function setHookCallback (callback) {\n hookCallback = callback;\n }", "title": "" } ]
a128d75d58b6a8c976c4c16258cc0520
Bonus challenge : this method returns the annualized return of the portfolio between two dates
[ { "docid": "0e1a0164de82e5a15afed2283264958a", "score": "0.8157953", "text": "getAnnualizedReturnBetween (dateT0, dateT1) {\n // To compute the annualized return, we need first to have the cumulative return between the two dates.\n let cumulativeReturn =\n this.getProfitBetween(dateT0, dateT1) / this.getPortfolioValueAt(dateT0)\n\n // We need then to know how many days we held these stocks (how many days betwwen dateT0 and dateT1)\n let timestampDateT0 = new Date(dateT0)\n let timestampDateT1 = new Date(dateT1)\n\n // Transforming a difference of timestamp in a difference of days\n\n var differenceInSeconds =\n Math.abs(timestampDateT1 - timestampDateT0) / 1000 // Timestamp are in miliseconds so we convert it in seconds first\n var daysHeld = Math.floor(differenceInSeconds / 86400) // There are 86400 seconds in a day\n\n // The formula of annualized return is:\n // (1 + cumulativeReturn) ^ (365 / daysHeld) - 1\n let annualizedReturn = (cumulativeReturn + 1) ** (365 / daysHeld) - 1\n let annualizedReturnFormatted = (annualizedReturn * 100).toFixed()\n return !isNaN(annualizedReturnFormatted) ? annualizedReturnFormatted : '-'\n }", "title": "" } ]
[ { "docid": "8d10b14c5e763ccf631f890791e01ecd", "score": "0.68491244", "text": "function calculateAnnualReturns(){\r\n \r\n //initialize blank values\r\n annualReturns = [];\r\n annualReturnLabels = [];\r\n upYearCount = 0;\r\n downYearCount = 0;\r\n \r\n var firstReturnDate = new Date(startDate);\r\n firstReturnDate.setDate(firstReturnDate.getDate() + 1);\r\n var lastReturnDate = new Date(endDate);\r\n\r\n var firstReturnYear = firstReturnDate.getFullYear();\r\n var lastReturnYear = lastReturnDate.getFullYear();\r\n\r\n var numYears = lastReturnYear - firstReturnYear + 1;\r\n\r\n console.log(\"First return date: \"+firstReturnDate);\r\n console.log(\"Last return date: \"+lastReturnDate);\r\n console.log(\"# of years to output: \"+numYears);\r\n\r\n for(i=0;i<numYears;i++) {\r\n\r\n var currentYearStartDate;\r\n var currentYearEndDate;\r\n\r\n var currentYearStartPrice;\r\n var currentYearEndPrice;\r\n var currentYearReturn;\r\n\r\n var currentDaysFromMinDate = 0;\r\n var currentDaysInPeriod = 0;\r\n\r\n \r\n if(i==0 && numYears ==1){\r\n currentYearStartDate = new Date(startDate);\r\n currentYearEndDate = new Date(endDate);\r\n } else if(i==0){\r\n currentYearStartDate = new Date(startDate);\r\n currentYearEndDate = new Date(firstReturnYear,11,31);\r\n } else if (i == numYears-1){\r\n currentYearStartDate = new Date(lastReturnYear-1,11,31);\r\n currentYearEndDate = new Date(endDate);\r\n } else {\r\n currentYearStartDate = new Date(firstReturnYear+i-1,11,31);\r\n currentYearEndDate = new Date(firstReturnYear+i,11,31);\r\n }\r\n\r\n currentDaysFromMinDate = daysBetween(minDate,currentYearStartDate);\r\n currentDaysInPeriod = daysBetween(currentYearStartDate,currentYearEndDate);\r\n\r\n currentYearStartPrice = selectedIndexArray[currentDaysFromMinDate-daysFromMinDate];\r\n currentYearEndPrice = selectedIndexArray[currentDaysFromMinDate-daysFromMinDate+currentDaysInPeriod];\r\n currentYearReturn = currentYearEndPrice / currentYearStartPrice - 1;\r\n \r\n //save outputs for chart\r\n annualReturns[i] = currentYearReturn;\r\n\r\n if(currentYearReturn >=0){\r\n annualReturnBackgroundColours[i] = \"#00b457\";\r\n upYearCount++;\r\n } else{\r\n annualReturnBackgroundColours[i] = \"#C20000\";\r\n downYearCount++;\r\n }\r\n \r\n \r\n //add label for annual graph (e.g., either \"2008\" or \"2008 partial\")\r\n if(currentYearStartDate.getDate() != 31 || currentYearEndDate.getDate() != 31 || currentYearStartDate.getMonth() != 11 || currentYearEndDate.getMonth() != 11){\r\n annualReturnLabels[i] = \"Partial \"+(firstReturnYear+i); \r\n } else{\r\n annualReturnLabels[i] = firstReturnYear+i;\r\n }\r\n \r\n /* testing\r\n console.log(\"Current Year Start Date: \"+currentYearStartDate);\r\n console.log(\"Current Year End Date: \"+currentYearEndDate);\r\n console.log(\"current year start price: \"+currentYearStartPrice);\r\n console.log(\"current year end price: \"+currentYearEndPrice);\r\n console.log(\"Current Year Return :\"+currentYearReturn);\r\n console.log(\"current days from min date: \"+currentDaysFromMinDate);\r\n console.log(\"current days in period: \"+currentDaysInPeriod);\r\n */\r\n }\r\n\r\n console.log(\"Annual return array: \"+annualReturns);\r\n console.log(\"Annual return label array: \"+annualReturnLabels);\r\n}", "title": "" }, { "docid": "55af28c7f84a25ce343789e9969cd116", "score": "0.6683384", "text": "function calcAfterTaxProfit(data, fullPortfolio, i) {\n\n let after1yearTotal = 0;\n let before1yearTotal = 0;\n\n // Parsing each date in the portfolio to convert to JS Date format\n let month = \"\";\n month = fullPortfolio[i].date.substring(5,7); // 03\n\n let year = \"\";\n year = fullPortfolio[i].date.substring(0,4); // 2018\n\n let day = \"\";\n day = fullPortfolio[i].date.substring(8,10); // 12\n\n // Converting month number to month name\n if (month === \"01\"){\n month = \"January\";\n } else if (month === \"02\"){\n month = \"February\";\n } else if (month === \"03\"){\n month = \"March\";\n } else if (month === \"04\"){\n month = \"April\";\n } else if (month === \"05\"){\n month = \"May\";\n } else if (month === \"06\"){\n month = \"June\";\n } else if (month === \"07\"){\n month = \"July\";\n } else if (month === \"08\"){\n month = \"August\";\n } else if (month === \"09\"){\n month = \"September\";\n } else if (month === \"10\"){\n month = \"October\";\n } else if (month === \"11\"){\n month = \"November\";\n } else if (month === \"12\"){\n month = \"December\";\n }\n\n // setting old date to be compared to current date\n let givenDate = new Date(month + \" \" + day + \",\" + year);\n let curDate = new Date();\n\n // console.log(\"givenDate\" + givenDate);\n // console.log(\"curDate\" + curDate);\n\n curDate.toLocaleDateString();\n curDate.setMonth(curDate.getMonth() - 12);\n curDate.toLocaleDateString();\n\n let purchasedEquit = fullPortfolio[i].price * fullPortfolio[i].quantity;\n let currentEquit = (data[fullPortfolio[i].stockSymbol].price * fullPortfolio[i].quantity);\n\n // console.log(purchasedEquit);\n // console.log(currentEquit);\n\n // Calculating profit\n let profitBeforeTax = currentEquit - purchasedEquit;\n // console.log(profitBeforeTax);\n\n // 15% in tax after 1 year, otherwise 30% if date is before\n if ((givenDate < curDate) === true) {\n let resultAfter = (15 / 100) * profitBeforeTax;\n after1yearTotal += profitBeforeTax - resultAfter;\n // console.log(\"after1yearTotal\" + i + \": \", after1yearTotal);\n return after1yearTotal;\n } else if ((givenDate < curDate) === false) {\n let resultBefore = (30 / 100) * profitBeforeTax;\n before1yearTotal += profitBeforeTax - resultBefore;\n // console.log(\"before1yearTotal\" + i + \": \", before1yearTotal);\n return before1yearTotal;\n }\n}", "title": "" }, { "docid": "fac33d374cf090f40bec5a5680722ea4", "score": "0.6629326", "text": "function calcAnnual(){\n\tvar bestPrice=plan1.price;\n\tfor(var i=0;i<plan1.discountMonth.length;i++){\n\t\tif(plan1.discountMonth[i]==7 || plan1.discountMonth[i]==8){\n\t\t\tbestPrice=plan1.price*0.8;\n\t\t}\n\t}\n\treturn bestPrice*12;\n}", "title": "" }, { "docid": "7070de7f79cd7caa885aa509f862d349", "score": "0.6420958", "text": "function portfolioReturn(currentReturns){\nportfolioReturn = 0 ;\n for(i=0;i<currentReturns[0].length;i++){\n portfolioReturn += currentReturns[1][i]/100 * currentReturns[2][i]\n \n }\nreturn portfolioReturn/100;\n}", "title": "" }, { "docid": "4944f00a44826e3d9c9617456f6b8fbc", "score": "0.6215615", "text": "function calculateDeposit(years, months, percent, premiumpercent, init, everyMonthAdd, capfrequency)\n{\n var response = {\n params: {\n \"years\": years,\n \"months\": months,\n \"percent\": percent,\n \"premiumpercent\": premiumpercent,\n \"init\": init,\n \"everyMonthAdd\": everyMonthAdd,\n \"capfrequency\": capfrequency\n },\n result: {\n monthIncome: {},\n endSum: 0.0,\n percents: 0.0,\n premiumpercent: 0.0,\n manualAdded: 0.0\n }\n };\n\n var result = response.result;\n\n var sum = parseFloat(init);\n everyMonthAdd = parseFloat(everyMonthAdd);\n capfrequency = parseFloat(capfrequency);\n var percentsTotal = 0.0;\n var manualAdded = 0.0;\n var premiumIncome = 0.0;\n\n var yearsLoop = parseInt(years, 10);\n var periodLoop = 12;\n var yearAndMonth = false;\n // 1. if time < year\n if (years == 0 && months != 0)\n {\n yearsLoop = 1;\n periodLoop = parseInt(months, 10);\n }\n // 2. both year and month set\n else if (years !== '0' && months !== '0')\n {\n yearsLoop += 1;\n yearAndMonth = true;\n }\n\n // 12 / [0.5|1|3|4|6|12|0]\n //if deposit end (0) then calculate % as each year but add % only on the end\n var capfrequencyUpdated = capfrequency == 0 ? 12 : capfrequency;\n periodLoop = periodLoop / capfrequencyUpdated;\n var partsInYear = 12 / capfrequencyUpdated;\n\n var finite = true;\n var partPeriodPercents = 0;\n outer: for (var y = 0; y < yearsLoop; y++)\n {\n for (var p = 0; p < periodLoop; p++)\n {\n if (!finite)\n {\n break outer;\n }\n\n var percentsForPeriod = sum * percent / 100 / partsInYear;\n var premiumIncomForPeriod = sum * premiumpercent / 100 / partsInYear;\n //not for deposit end\n if (capfrequency != 0)\n {\n sum += percentsForPeriod;\n }\n percentsTotal += percentsForPeriod;\n premiumIncome += premiumIncomForPeriod;\n\n //squash half month income into 1 month, for showing on UI as 1 month\n if (capfrequency == 0.5)\n {\n //first half\n if (p % 2 == 0)\n {\n partPeriodPercents += percentsForPeriod;\n }\n //seconf half\n else\n {\n var id = 'y' + (y + 1) + 'p' + ((p + 1) / 2);\n result.monthIncome[id] = fmtMoney(percentsForPeriod + partPeriodPercents);\n partPeriodPercents = 0;\n\n sum += everyMonthAdd;\n manualAdded += everyMonthAdd;\n }\n }\n else\n {\n sum += everyMonthAdd * capfrequencyUpdated;\n manualAdded += everyMonthAdd * capfrequencyUpdated;\n\n //not for deposit end\n if (capfrequency != 0)\n {\n var id = 'y' + (y + 1) + 'p' + ((p + 1) * capfrequency);\n result.monthIncome[id] = fmtMoney(percentsForPeriod);\n }\n }\n }\n\n // year + month, calculate for remaining month, after last year iteration\n if (yearAndMonth && (y == yearsLoop - 2))\n {\n periodLoop = months / capfrequencyUpdated;\n }\n\n finite = isFinite(sum) && isFinite(percentsTotal) && isFinite(premiumIncome) && isFinite(manualAdded);\n }\n\n if (finite)\n {\n sum += premiumIncome;\n //if on end deposit, add percents at last\n if (capfrequency == 0)\n {\n sum += percentsTotal;\n result.monthIncome = null;\n }\n\n result.endSum = fmtMoney(sum);\n result.percents = fmtMoney(percentsTotal);\n result.premiumpercent = fmtMoney(premiumIncome);\n result.manualAdded = fmtMoney(manualAdded);\n }\n else\n {\n response = {\n code: 'InfiniteResult',\n message: 'Please use smaller arguments, result is too big.'\n }\n }\n\n return response;\n}", "title": "" }, { "docid": "f7797c7bdc5a4e4bbefe664308830a50", "score": "0.6176579", "text": "getProfitBetween (dateT0, dateT1) {\n return this.getPortfolioValueAt(dateT1) - this.getPortfolioValueAt(dateT0)\n }", "title": "" }, { "docid": "53666a5f1e92b16b66541372bfbb75f3", "score": "0.6155215", "text": "function getBudgetDates(date) {\n // compute method\n let startYear;\n let hireDate = dateUtils.format(date, null, ISOFORMAT);\n let hireYear = dateUtils.getYear(hireDate);\n let hireMonth = dateUtils.getMonth(hireDate); // form 0-11\n let hireDay = dateUtils.getDay(hireDate); // from 1 to 31\n let today = dateUtils.getTodaysDate(ISOFORMAT);\n\n // determine start date year\n if (dateUtils.isBefore(hireDate, today)) {\n // hire date is before today\n // if anniversary hasn't occured yet this year, set the start of the budget to last year\n // if the anniversary already occured this year, set the start of the budget to this year\n let thisYearAnniversaryDate = today;\n thisYearAnniversaryDate = dateUtils.setMonth(thisYearAnniversaryDate, hireMonth);\n thisYearAnniversaryDate = dateUtils.setDay(thisYearAnniversaryDate, hireDay);\n startYear = dateUtils.isBefore(today, thisYearAnniversaryDate)\n ? dateUtils.getYear(today) - 1\n : dateUtils.getYear(today);\n } else {\n // hire date is after today\n startYear = hireYear;\n }\n let startDate = hireDate;\n startDate = dateUtils.setYear(startDate, startYear);\n let endDate = hireDate;\n endDate = dateUtils.setYear(hireDate, startYear);\n endDate = dateUtils.subtract(dateUtils.add(endDate, 1, 'year'), 1, 'day');\n\n let result = {\n startDate,\n endDate\n };\n return result;\n}", "title": "" }, { "docid": "fd438a18f73b3c6f0fbcebffacb7bea6", "score": "0.60748667", "text": "function calculateFinance(){\n var price = document.getElementById(\"price\").value;\n var deposit = document.getElementById(\"deposit\").value;\n var repayment = document.getElementById(\"repayment\").value;\n let interestRateDatabase = document.getElementById(\"interestRate\").value;\n\n var interestRate = 3.6;\n\n if(interestRateDatabase == \"\"){\n intrestRate = 3.6 / 100;\n }else{\n intrestRate = interestRateDatabase / 100;\n }\n\n var repaymentYears = repayment/12;\n \n\n let amountBorrowed = price - deposit;\n let intrestAmount = (amountBorrowed*intrestRate) * repaymentYears;\n\n let figurePerMonth = (amountBorrowed + intrestAmount)/repayment;\n\n if(figurePerMonth < 0){\n document.getElementById(\"result\").innerHTML = \"Error, Negative Figure. Please Update\";\n }else{\n document.getElementById(\"result\").innerHTML = \"£\" + Math.round(figurePerMonth) + \" Per Month At A Rate Of \" + (intrestRate * 100).toFixed(2) + \"%\";\n }\n}", "title": "" }, { "docid": "270bd566f2a88fa78208661305494324", "score": "0.60513735", "text": "function interest(principal, rate, years ){\n \n return principal * rate / 100 * years;\n}", "title": "" }, { "docid": "92fe6b6fe6e55a6fbbffd522e0b53579", "score": "0.59825027", "text": "function calculateInvestment(investment, rate, years) {\r\n \"use strict\";\r\n monthlyRate = rate /12 / 100;\r\n months = years * 12;\r\n futureValue = investment;\r\n \r\n for (i = 1; i < months; i+= 1) {\r\n monthlyInterest = futureValue * monthlyRate;\r\n futureValue += monthlyInterest;\r\n }\r\n return futureValue;\r\n}", "title": "" }, { "docid": "4a9b97112b9e4f4b605fb967fa65961d", "score": "0.59767425", "text": "getPortfolioValueAt (date) {\n // We loop through each stock and sum up the total value of that stock (price of the share * amount of shares)\n return parseInt(\n this.stocksOfPortfolio\n .map(stock => stock.getShareholdingValueAt(date))\n .reduce(\n (accumulator, shareholdingValue) => accumulator + shareholdingValue\n )\n )\n }", "title": "" }, { "docid": "2a679935ba46f265417140c92973962d", "score": "0.5965556", "text": "function interest(principal,rate=3.5,years){\r\n return principal*rate/100*years;\r\n}", "title": "" }, { "docid": "a617943edc20e9b6d611f1d6b4a7ac3c", "score": "0.5940001", "text": "function futureValueSeries(annual_contribution, rate, periods, years){\n // console.log('FV',annual_contribution, rate, periods, years)\n return (annual_contribution / periods) * ((((1 + (rate/periods))**(periods * years)) -1) / (rate/periods))\n}", "title": "" }, { "docid": "adf16763af2e36ded31fbb6fde8b9675", "score": "0.5922143", "text": "getListOfDates () {\n // For this visualisation, we arbitraraly focus on the last 10 years\n const NUMBER_OF_YEARS = 10\n\n // We then need 11 points in time to compute 10 years of portfolio evolution\n const sliceEnd = NUMBER_OF_YEARS + 1\n\n // This method will return an object conaining the dates in different formatting\n let objectToReturn = {\n formatYYYYMMDD: [],\n formatYYYY: [],\n formatYY: []\n }\n\n // Ex: 2018-12-29\n objectToReturn.formatYYYYMMDD = this.listOfDates\n .filter(priceDate => priceDate.split('-')[1] === '12')\n .slice(0, sliceEnd)\n .reverse()\n\n // Ex: 2018\n objectToReturn.formatYYYY = objectToReturn.formatYYYYMMDD.map(priceDate => {\n let yearUncorrected = priceDate.split('-')[0]\n let yearCorrected = parseInt(yearUncorrected) + 1\n return yearCorrected\n })\n\n // Ex: '18\n objectToReturn.formatYY = objectToReturn.formatYYYY.map(\n year => \"'\" + year.toString().substr(-2)\n )\n\n return objectToReturn\n }", "title": "" }, { "docid": "206847ae825e8bfd6c413c6b7e6535b8", "score": "0.588618", "text": "function interest1(principal, rate, years){\r\n rate = rate || 3.5; \r\n years = years || 5;\r\n\r\n return principal*rate/100 * years; \r\n}", "title": "" }, { "docid": "103931913c0b1cf5b81a878db84c4e89", "score": "0.5856742", "text": "function calculateInterest(start, years, interest) {\n var calc = start;\n var i;\n\n for (i = 0; i < years; i++) {\n calc += calc / 100 * interest;\n }\n return parseFloat(calc.toFixed(4));\n}", "title": "" }, { "docid": "b3e1ec0f6158e868accec963ef5af898", "score": "0.58389163", "text": "function calcYearInterest(PMT,PV,rate){\n var interest = 0;\n var balance=PV;\n for(var i = 1;i<13;i++){\n interest+=calcInterest(balance,rate,1/12);\n balance = calcOutstBal(PMT,PV,rate,i/12);\n }\n return interest;\n}", "title": "" }, { "docid": "017b95d6825aa67b86f13df56495e6de", "score": "0.57939416", "text": "getShareholdingProfitBetween (dateT0, dateT1) {\n return (\n this.getShareholdingValueAt(dateT1) - this.getShareholdingValueAt(dateT0)\n )\n }", "title": "" }, { "docid": "0fe70c40ed34392f2084d112f4bd0504", "score": "0.5789372", "text": "function calcAnnuity() \n{\n let payAmount = document.getElementById(\"payoutAmount\").value;\n payAmount = Number(payAmount);\n let intAnnRate = document.getElementById(\"interestAnnuityRate\").value;\n intAnnRate = Number(intAnnRate);\n let payYears = document.getElementById(\"payoutYears\").value;\n payYears = Number(payYears);\n let intAnnRateD = (intAnnRate / 100);\n\n let futureValueTotal = payAmount * (Math.pow(1 + intAnnRateD, payYears) - 1) / (Math.pow(1 + intAnnRateD, payYears) * intAnnRateD);\n\n const resultAnswer = document.getElementById(\"answerTotal\");\n resultAnswer.value = futureValueTotal.toFixed(2);\n}", "title": "" }, { "docid": "e4b4e7cf981c2749fabff11f71f468f0", "score": "0.57673955", "text": "function getPrices(startDate, stopDate) {\n // Check how many people there, and add 1.50 for every person\n let peoplePrice = (people * 1.50);\n price = 0;\n price += dogPrice;\n\n // Make a moment object of the dates to make it easier to calculate.\n startDate = moment(startDate);\n stopDate = moment(stopDate);\n\n // While the start date is lower than the stop date.\n while (startDate <= stopDate) {\n dates.push(moment(startDate).format('YYYY-MM-dd'));\n startDate = moment(startDate).add(1, 'days');\n\n // Check months for pricing, add the price of the months.\n switch (startDate.month()) {\n case 0: case 1: case 2: case 9: case 10: case 11:\n price += parseInt(prices['lowSeason']);\n price += peoplePrice;\n halfPrice = (price / 2);\n document.getElementById('price_first').innerHTML = '€' + halfPrice;\n document.getElementById('price_second').innerHTML = '€' + halfPrice;\n document.getElementById('total_price').innerHTML = '€' + price;\n break;\n case 6: case 7:\n price += parseInt(prices['highSeason']);\n price += peoplePrice;\n halfPrice = (price / 2);\n document.getElementById('price_first').innerHTML = '€' + halfPrice;\n document.getElementById('price_second').innerHTML = '€' + halfPrice;\n document.getElementById('total_price').innerHTML = '€' + price;\n break;\n case 3: case 4: case 5: case 8:\n price += parseInt(prices['lateSeason']);\n price += peoplePrice;\n halfPrice = (price / 2);\n document.getElementById('price_first').innerHTML = '€' + halfPrice;\n document.getElementById('price_second').innerHTML = '€' + halfPrice;\n document.getElementById('total_price').innerHTML = '€' + price;\n break;\n }\n }\n return dates;\n}", "title": "" }, { "docid": "635da98e56da308931aebb4e4148148d", "score": "0.5750171", "text": "function interest1(principal, rate, years) {\n rate = rate || 7;\n years = years || 5;\n return principal * rate / 100 * years;\n}", "title": "" }, { "docid": "037a2c5d8466d03af02b053b6e7711c1", "score": "0.57362413", "text": "function interest2(principal, rate = 8, years = 5) {\n return principal * rate / 100 * years;\n}", "title": "" }, { "docid": "d7d79532bddc472d225002f8d3e3c8a1", "score": "0.5735028", "text": "function compoundInterest(principal , rate, periods, years) {\n // console.log('CI',principal , rate, periods, years)\n\n return principal * ((1 + (rate/periods))**(periods * years))\n}", "title": "" }, { "docid": "f0a8c9cd37897606f573d31d2578f56b", "score": "0.573446", "text": "function calculateFinalAmount() {\n\tconst initialAmount = slider.value\n\tconst years = yearInput.value\n\n\t// Convert interest from percentage to decimal\n\tconst interestRate = interestRateInput.value / 100\n\n\t// Compounding periods - 12 if monthly, 1 if yearly\n\tconst compoundPerYear = monthlyRadio.checked ? 12 : 1\n\n\tconst finalAmount = initialAmount * Math.pow(1 + interestRate / compoundPerYear, years * compoundPerYear)\n\n\tdocument.querySelector('.result .amount').innerHTML = format(Math.floor(finalAmount))\n\tdocument.querySelector('.num-years').innerHTML = years\n\tdocument.querySelector('.plural').style.display = years > 1 ? 'inline' : 'none'\n}", "title": "" }, { "docid": "cb988626873d0b7ced7fb00f210a7ac2", "score": "0.56785774", "text": "async profitOnPeriod(from, to) {\n let transactionsInRange = [];\n if (!isSameDayOrAfter(from, to)) {\n transactionsInRange = this._transactions.filter(\n t => (from ? isWithinRange(t.date, from, subDays(to, 1)) : isBefore(t.date, to))\n );\n }\n const transactionDates = transactionsInRange.map(t => t.date);\n if (from) {\n transactionDates.push(from);\n }\n transactionDates.push(to);\n const stockPrices = await this.stocksPriceByDates(_.uniq(transactionDates));\n const returnRate = portfolioUtils.getTimeWeightedReturnRate(\n transactionsInRange,\n stockPrices,\n {\n date: from,\n previousHoldingQuantities: from ? this.holdingQuantitiesOnDate(subDays(from, 1)) : undefined\n },\n {\n date: to\n }\n );\n return returnRate * 100;\n }", "title": "" }, { "docid": "d9280747faed1f4cc73ef9ca88a3aed1", "score": "0.5666435", "text": "function calculateFutureValue(principal, PMT, t, r, n ){ \n /**********************************************************\n * Future value formula:\n * Compound interest for principal:\n * P(1+r/n)(nt)\n * FV = p * ((i+1)^t) + d *( (((1+i)^t)-1)/i) * (1 +i)\n * Where:\n * A = the future value of the investment/loan, including \n * interest\n * P = the principal investment amount (the initial deposit \n * or loan amount)\n * PMT = the monthly payment\n * r = the annual interest rate (decimal)\n * n = the number of compounds per period \n * t = the number of periods (months, years, etc) \n * \n **********************************************************/\n // I decided it was easier to break the problem into\n // smaller calculations.\n var i = (r/100)/n;\n var tn = t * n;\n var base = i + 1;\n //FV = p * ((i+1)^t) + d *( (((1+i)^t)-1)/i) * (1 +i)\n var futureValue = (principal * (Math.pow(base,tn))) + PMT *( ((Math.pow(base,tn))-1)/i) * (base);\n \n // Display result\n document.getElementById(\"futureMoneyResult\").innerHTML = \"$\" + futureValue.toFixed(2);\n \n //Information needed for function draw\n var totalPMT = (PMT * n) * t;\n var totalInvested = totalPMT + principal;\n var totalInterest = futureValue - totalInvested;\n \n // draw function called\n draw(principal, totalPMT , totalInterest, futureValue);\n \n // Display function called\n displayAnalysis(principal, totalPMT , totalInterest, futureValue);\n \n //this function automatically save state when user hits calculate\n autoSaveState(principal, PMT, t, r, n);\n}", "title": "" }, { "docid": "867ba9f963b711063b302bd1fc9449f4", "score": "0.56573033", "text": "async function getCompanyIncomesData(url) {\n let avarage;\n let last_month_income;\n let incomes;\n await fetch(url)\n .then(response => response.json())\n .then(company => {\n avarage = (company.incomes.reduce((a, b) => a + parseFloat(b.value), 0) / company.incomes.length).toFixed(2);\n\n const today = new Date();\n let lastMonth = today.getMonth() === 0 ? 12 : (today.getMonth() > 9 ? today.getMonth() : \"0\" + today.getMonth())\n let yearOfLastMonth = (lastMonth === 12) ? today.getFullYear() - 1 : today.getFullYear();\n\n last_month_income = company.incomes.reduce(function (prev, curr) {\n if (curr.date.includes(yearOfLastMonth + \"-\" + lastMonth)) {\n return prev + parseFloat(curr.value)\n }\n else { return \"no income last month (\" + (yearOfLastMonth + \"-\" + lastMonth) + \")\" }\n }, 0);\n\n incomes = company.incomes\n // .map(a => a.date.slice(0, 10))\n .sort((a, b) => {\n if (a.date < b.date) { return -1 }\n if (a.date < b.date) { return 1 }\n return 0\n })\n .map(x => ({ ...x, date: x.date.slice(0, 10) }));\n })\n\n .catch(err => console.log(err));\n return [avarage, last_month_income, incomes]\n}", "title": "" }, { "docid": "f10dc961494a51c9dd665693dc56c247", "score": "0.5630664", "text": "function calculateYears(principal, interest, tax, desired) {\n\t// your code\n\tif (principal === desired) return 0;\n\tlet initial = principal;\n\tlet year = 0;\n\twhile (desired > initial ){\n\t\tlet interestYear = initial * interest; \n\t\tlet taxSum = interestYear * tax;\n\t\tlet amount = interestYear - taxSum;\n\t\tinitial += amount;\n\t\tyear++;\n\t}\n\n\treturn year;\n}", "title": "" }, { "docid": "81a3822b0855805010109fe360430da0", "score": "0.5627414", "text": "function getMonthlyStat(a, b) {\n const start = new Date();\n const end = new Date(1417410000000);\n\n const diffYear = end.getFullYear() - start.getFullYear();\n const diffMonth = diffYear * 12 + end.getMonth() - start.getMonth();\n\n return diffMonth % 2 === 0 ? a : b;\n}", "title": "" }, { "docid": "a6b72c1d4d3b7f05de4ca3ca737a482d", "score": "0.5610178", "text": "function calcInterest(time, rate, principal) {\n\n //Calculating simple interest\n\n var interest = time * rate * principal;\n\n//Returning interest\n return interest;\n}", "title": "" }, { "docid": "e1762bded260ed70f4853686ff45c338", "score": "0.55860007", "text": "function calculateYears(principal, interest, tax, desired) {\n var year = 0;\n if (principal < desired) {\n while (principal <= desired) {\n i = principal * interest;\n t = i * tax;\n principal = principal + i - t;\n year ++;\n }\n return year;\n }\n else {\n return 0;\n }\n}", "title": "" }, { "docid": "98115809faa32dc919f8a9d8106667a6", "score": "0.55696094", "text": "function interest(principal, rate = 3.5, years = 5) {\n // cleaner way to do in ES6\n return ((principal * rate) / 100) * years;\n}", "title": "" }, { "docid": "165535837c048fe3f90aa83280f4340f", "score": "0.55487335", "text": "function mortgageCalculator (client, principal, interestRate, years, creditScore, propertyTax, insurance, HOA){\n \n if (creditScore < 660){\n interestRate += .005;\n }\n else if (interestRate > 740){\n interestRate -= .005;\n }\n \n let periods = years * 12;\n let monthlyInterestRate = interestRate / 12;\n \n \n let calculation = Math.pow((monthlyInterestRate + 1), periods);\n \n let numerator = monthlyInterestRate * calculation;\n \n let denominator = calculation - 1;\n \n let monthlyRate = principal * (numerator / denominator);\n\n monthlyRate += (insurance + HOA + ((principal * propertyTax) / 12));\n\n console.log(client + \", your monthly payment is $\" + monthlyRate.toFixed(2));\n} //End mortgageCalculator", "title": "" }, { "docid": "77a6d8909657634ae6c9936619dea66d", "score": "0.5546877", "text": "function principalToData(p, n, r) {\n var init = p;\n var m = principalToMonthly(p, n, r)\n var t = principalToTotal(p, n, r)\n console.log(m,t)\n var paid = 0, interest = 0;\n var data = []\n for(let i=0; i<=n; i++) {\n data.push({\n remaining: p,\n principal: paid,\n interest: interest\n })\n\n var prev_paid = paid;\n var prev_t = t;\n t -= m;\n p = (t > 0 && n-i-1 > 0)?totalToPrincipal(t, n-i-1, r):0\n paid = init - p;\n interest += (prev_t - t) - (paid - prev_paid)\n //console.log(t,p,paid,interest, data)\n }\n console.log(data)\n return data\n}", "title": "" }, { "docid": "71d8bf2d27a9efb8de247087d78ca10f", "score": "0.5536639", "text": "function naiveExpensesSearchPart1() {\n for (let i = 0; i < expenses.length; i++) {\n for (let j = 0; j < expenses.length; j++) {\n if (i != j && expenses[i] + expenses[j] == 2020) {\n return expenses[i] * expenses[j];\n }\n }\n }\n}", "title": "" }, { "docid": "61682e86eaf462b512169a771ae8ed84", "score": "0.5506803", "text": "function interest3(principal, rate = 8, years) {\n return principal * rate / 100 * years;\n}", "title": "" }, { "docid": "baa5ec1c8ef55a6dd27ccade248f57db", "score": "0.5490621", "text": "function result(expense, selectedYear) {\n let monthAmountArray=[]\n for (let month = 0; month < 12; month++){\n monthAmountArray.push(addAmount(month, expenseDetailsOfGivenYear(selectedYear,expense)));\n }\n return monthAmountArray;\n }", "title": "" }, { "docid": "fb23c6f0fa0b9ea601146a93eabedae5", "score": "0.54901314", "text": "function EBITDA(revenue,cogs,opr_expense, non_cash_expense){\n return (((revenue - cogs - opr_expense+ non_cash_expense)*100)/revenue)/100\n}", "title": "" }, { "docid": "5da3c39398f23ff37a00d1d704949aa1", "score": "0.54756653", "text": "function compute(){\n principal = document.getElementById(\"principal\").value; // get value of initial amount\n\n // check if amount is positive, if not alert user and focus on amount input\n if(principal <= 0){\n alert(\"Enter a positive number: \")\n document.getElementById(\"principal\").focus();\n }\n else{\n rate = document.getElementById(\"rate\").value; // get values of interest rate\n years = document.getElementById(\"years\").value; // and period of accumulation\n years = parseInt(years, 10); // convert string of years to number\n\n interest = (principal * years * rate) / 100; // calculate the final interest\n //alert(interest) statement used for rapid troubleshooting\n\n\n finalyear = new Date().getFullYear() + years; // calculate the year the accumulation will end\n\n // convert all numbers to strings to be printed\n finalyear = finalyear.toString();\n finalprincipal = principal.toString();\n finalrate = rate.toString();\n finalinterest = interest.toString();\n\n // final statement that contains all necessary information\n statement = \"If you deposit \" + finalprincipal.bold() + \",\\n at an interest rate of \" + finalrate.bold() + \"%.\\n You will receive an amount of \" + finalinterest.bold() + \",\\n in the year \" + finalyear.bold();\n document.getElementById(\"result\"). innerHTML = statement;\n }\n\n}", "title": "" }, { "docid": "2e7d68672d004f8ea5e1a85c8d056f1d", "score": "0.5465235", "text": "function calculateDailyReturns() {\r\n \r\n //default back to 0\r\n dailyReturnArray = [];\r\n dailyReturnCountArray = [0,0,0,0,0,0,0,0,0,0,0,0];\r\n dailyReturnProportionArray = [0,0,0,0,0,0,0,0,0,0,0,0];\r\n nonZeroReturnCount = 0;\r\n upDayCount = 0;\r\n downDayCount = 0;\r\n upDailyReturnArray = [];\r\n downDailyReturnArray = [];\r\n\r\n //x-axis bucket labels for chart\r\n dailyReturnLabelArray = [\"<(5.0%)\",\"(5.0%) to (4.0%)\",\"(4.0%) to (3.0%)\",\"(3.0%) to (2.0%)\",\r\n \"(2.0%) to (1.0%)\",\"(1.0%) to 0.0%\",\"0.0% to +1.0%\",\"+1.0% to +2.0%\",\"+2.0% to +3.0%\",\r\n \"+3.0% to +4.0%\",\"+4.0% to +5.0%\",\">+5.0%\"]\r\n\r\n for(i=0; i<selectedIndexArray.length-1;i++) {\r\n var currentPrice = selectedIndexArray[i];\r\n var nextPrice = selectedIndexArray[i+1];\r\n var dailyReturn = nextPrice / currentPrice - 1;\r\n dailyReturnArray[i] = dailyReturn;\r\n \r\n if(dailyReturn == 0) {\r\n\r\n\r\n } else {\r\n nonZeroReturnCount = nonZeroReturnCount+1;\r\n \r\n //count up and down return days for output on page\r\n if(dailyReturn >0){\r\n upDayCount++;\r\n upDailyReturnArray.push(dailyReturn);\r\n } else{\r\n downDayCount++;\r\n downDailyReturnArray.push(dailyReturn);\r\n }\r\n }\r\n\r\n //figure out which bucket of returns this one falls into, and increment the count accordingly\r\n if(dailyReturn < -0.05) {\r\n dailyReturnCountArray[0] ++;\r\n } else if(dailyReturn >= -0.05 && dailyReturn <-0.04){\r\n dailyReturnCountArray[1] ++;\r\n } else if(dailyReturn >= -0.04 && dailyReturn <-0.03){\r\n dailyReturnCountArray[2] ++;\r\n } else if(dailyReturn >= -0.03 && dailyReturn <-0.02){\r\n dailyReturnCountArray[3] ++;\r\n } else if(dailyReturn >= -0.02 && dailyReturn <-0.01){\r\n dailyReturnCountArray[4] ++;\r\n } else if(dailyReturn >= -0.01 && dailyReturn <0){\r\n dailyReturnCountArray[5] ++;\r\n } else if(dailyReturn > 0 && dailyReturn <=0.01){\r\n dailyReturnCountArray[6] ++;\r\n } else if(dailyReturn > 0.01 && dailyReturn <=0.02){\r\n dailyReturnCountArray[7] ++;\r\n } else if(dailyReturn > 0.02 && dailyReturn <=0.03){\r\n dailyReturnCountArray[8] ++;\r\n } else if(dailyReturn > 0.03 && dailyReturn <=0.04){\r\n dailyReturnCountArray[9] ++;\r\n } else if(dailyReturn > 0.04 && dailyReturn <=0.05){\r\n dailyReturnCountArray[10] ++;\r\n } else if(dailyReturn > 0.05){\r\n dailyReturnCountArray[11] ++;\r\n }\r\n\r\n //find best and worst day\r\n //set first day as both best and worst day to initialize\r\n if(i==0){\r\n bestDayDate = dateArrayPartial[i+1];\r\n bestDayValue = dailyReturn;\r\n worstDayDate = dateArrayPartial[i+1];\r\n worstDayValue = dailyReturn;\r\n } else{\r\n if(dailyReturn > bestDayValue){\r\n bestDayDate = dateArrayPartial[i+1];\r\n bestDayValue = dailyReturn;\r\n } else if(dailyReturn < worstDayValue){\r\n worstDayDate = dateArrayPartial[i+1];\r\n worstDayValue = dailyReturn; \r\n } else{\r\n //do nothing, this isn't a best or worst day\r\n }\r\n }\r\n }\r\n\r\n\r\n //calculate % proportion of returns in each bucket\r\n for(i=0; i<dailyReturnCountArray.length; i++) {\r\n dailyReturnProportionArray[i] = dailyReturnCountArray[i] / nonZeroReturnCount;\r\n }\r\n\r\n}", "title": "" }, { "docid": "b7baba61346511bf6f74012fbbf59943", "score": "0.54605633", "text": "function accountGrowth(person_age, person_retirement_age, years, principal, annual_contribution, rate, periods){\n let balance = 0\n \n if ((person_age + years) < person_retirement_age) {\n balance = compoundInterest(principal , rate, periods, 1) + futureValueSeries(annual_contribution, rate, periods, 1)\n }else if ((person_age + years) >= person_retirement_age){\n balance = compoundInterest(principal , rate, periods, 1) \n }\n return balance.toFixed(2)\n}", "title": "" }, { "docid": "55f4e712647c534662c7f9ed39d1e1c3", "score": "0.54544365", "text": "sumAcrossRewardedAndClaimedDateValue(coin) {\n let coinSum = this.sumAcrossRewardedAndClaimed(coin);\n if (coinSum === false) {\n return false;\n } else {\n return {date: this.date, value: coinSum};\n }\n }", "title": "" }, { "docid": "6d359a4ff9e7fa27e43c3c0de856e125", "score": "0.5450531", "text": "function calculateResult() {\r\n const principle = document.querySelector('#amount');\r\n const interest = document.querySelector('#interest');\r\n const years = document.querySelector('#years');\r\n\r\n const monthlyPayment = document.querySelector('#monthly-payment');\r\n const totalInterest = document.querySelector('#total-interest');\r\n const totalPayment = document.querySelector('#total-payment');\r\n\r\n const p = parseFloat(principle.value); // p from principals\r\n const r = parseFloat(interest.value) / 100 / 12; // r from rate of interest of month\r\n const n = parseFloat(years.value) * 12; //n from number of months\r\n\r\n const x = Math.pow(1 + r, n);\r\n const monthly = (p * x * r) / (x - 1);\r\n\r\n if (isFinite(monthly)) {\r\n monthlyPayment.value = monthly.toFixed(2);\r\n totalInterest.value = ((monthly * n) - p).toFixed(2);\r\n totalPayment.value = (monthly * n).toFixed(2);\r\n results.style.display = 'block';\r\n loading.style.display = 'none';\r\n } else {\r\n showError('Please Recheck Your Inputs');\r\n }\r\n}", "title": "" }, { "docid": "3654533e83418f567570d4da1f7aae9a", "score": "0.5440468", "text": "function WorkingCapEbitda( accounts_receivable, inventory, accounts_payable, revenue, cogs, opr_expense, non_cash_expense,pyb_accounts_receivable, pyb_inventory, pyb_accounts_payable, months){\n return ((accounts_receivable+inventory-accounts_payable)-(pyb_accounts_receivable+pyb_inventory-pyb_accounts_payable))/((revenue - cogs - opr_expense + non_cash_expense)*12/months)\n}", "title": "" }, { "docid": "0dd2971925bfd11b5c9ef428de821210", "score": "0.5436039", "text": "function computeDates(requiredDate, prev){\n\n\tvar dates = [];\n\tif(prev){ \n\t\t//console.log(\"Prev year\");\n\t\trequiredDate.setDate(requiredDate.getDate() - 365);\n\t\tdates = getDates(requiredDate.addDays(-7), requiredDate.addDays(7));\n\t}else{\n\t\t//console.log(\"curr year \");\n\t\tdates = getDates(requiredDate.addDays(-7), requiredDate);\n\t}\n\treturn dates;\n}", "title": "" }, { "docid": "d5658855837f0e1abd65963c0eb585fe", "score": "0.5431247", "text": "function calculateFinalAmount() {\n\tconst initialAmount = slider.value\n\t// Convert interest rate from percentage to decimal\n\tconst interestRate = interestRateInput.value / 100\n\tconst years = yearInput.value\n\t// 12 or 1 compounding periods depending if monthly or yearly\n\tconst compoundPerYear = monthlyRadio.checked ? 12 : 1\n\tconst finalAmount = initialAmount * Math.pow(1 + interestRate / compoundPerYear, years * compoundPerYear)\n\n\tdocument.querySelector('#final-amount .amount').innerHTML = numberFormatter.format(Math.floor(finalAmount))\n\tdocument.querySelector('.num-years').innerHTML = years\n\tdocument.querySelector('.plural').innerHTML = years > 1 ? 's' : ''\n}", "title": "" }, { "docid": "6e47e3bb2a85dbbde8ea3fd7dbbbbc4e", "score": "0.54214334", "text": "function calculateYears(principal, interest, tax, desired) {\n let year = 0;\n while (principal < desired) {\n year++\n principal += (principal * interest) - (principal * interest * tax);\n }\n return year;\n}", "title": "" }, { "docid": "2df1df0e8c41e1bcde665f6d43936137", "score": "0.5419606", "text": "function bindCalculateMonthDate(startContractDate, endContractDate) {\n var months;\n months = (endContractDate.getFullYear() - startContractDate.getFullYear()) * 12;\n months -= startContractDate.getMonth() + 1;\n months += endContractDate.getMonth();\n // plus one because month is base on index\n months += 1;\n return months <= 0 ? 0 : months;\n}", "title": "" }, { "docid": "cca2dd2930673874738721d8b00793f3", "score": "0.5418381", "text": "function interest3(principal, rate = 3.5, years = 5) {\n return principal * rate / 100 * years;\n}", "title": "" }, { "docid": "f666d85ad9048f5d6b74eb2316a056a5", "score": "0.5407746", "text": "getShareholdingValueAt (date) {\n return this.getAmount() * this.getPriceAt(date)\n }", "title": "" }, { "docid": "b21696bd2444384773e607ddc9046784", "score": "0.5390505", "text": "async getHistoricalPortfolioReturn() {\n var exchange_trades_calls = []\n var exchange_btc_historical_calls = []\n var historicalBTCReturn = await this.getHistoricalBitcoinReturn()\n for (var exchange_account in this.exchange_accounts) {\n if (this.exchange_accounts.hasOwnProperty(exchange_account)) {\n exchange_trades_calls.push(this.exchange_accounts[exchange_account].getTrades())\n }\n }\n var trades = await Promise.all(exchange_trades_calls)\n .then(function (trades) {\n return trades\n })\n .catch(function (error) {\n console.error('error: ' + error)\n })\n\n var historicalBalances = []\n for (var exchange in trades) {\n if (trades.hasOwnProperty(exchange)) {\n // console.log('exchange: ' + trades[exchange])\n var historicalBalance = this.calcHistoricalBalance(trades[exchange])\n historicalBalances.push(historicalBalance)\n }\n }\n return historicalBalances\n }", "title": "" }, { "docid": "850a9d9db9d8f33a7d6ec9b1b30f9403", "score": "0.53807575", "text": "function calcAgeRetirement(year) {\n const age = new Date().getFullYear() - year;//instead of hardcoding, get current date and use that to calc retirement\n return [age, 65 - age];//return an array with this data\n}", "title": "" }, { "docid": "a99f01ceecd379178ab63cc6214efb01", "score": "0.5374153", "text": "function calculateMonthlyPayment(values) {\n let i = (values.rate/100)/12;\n let n = values.years*12;\n let newI = i+1;\n let monthlyPayment = (values.amount * i) / (1 - ((i+1)**(-n)));\n console.log(i, n, ((i+1)**(-n)), monthlyPayment)\n //console.log(i, n, (values.amount * i), (1 - Math.pow((i+1),(-n))));\n return monthlyPayment;\n}", "title": "" }, { "docid": "af2e7eee3643068521711cdde1663ae7", "score": "0.5352681", "text": "function calculateResults() {\n // UI VARS\n const amount = document.getElementById('amount'); // Amount\n const interest = document.getElementById('interest'); // Interests\n const years = document.getElementById('years'); // Years\n const monthlyPayment = document.getElementById('monthly-payments'); // Monthly Payments\n const totalPayment = document.getElementById('total-payment');// Total Payments\n const totalInterest = document.getElementById('total-interest');// Total Interest\n\n const principal = parseFloat(amount.value);\n const calculateInterest = parseFloat(interest.value) / 100 / 12;\n const calculatedPayments = parseFloat(years.value) * 12\n\n // Compute monthly payments\n const x = Math.pow(1 + calculateInterest, calculatedPayments);\n const monthly = (principal * x * calculateInterest) / (x - 1);\n if (isFinite(monthly)) {\n monthlyPayment.value = monthly.toFixed(2);\n totalPayment.value = (monthly * calculatedPayments).toFixed(2);\n totalInterest.value = ((monthly * calculatedPayments) - principal).toFixed(2);\n document.getElementById('results').style.display = 'block';\n document.getElementById('loading').style.display = 'none';\n\n } else showError('Check your numbers.');\n}", "title": "" }, { "docid": "1114615550bc92cfb9b2e8e31b116848", "score": "0.5349954", "text": "function _getFinYearRange(firstTrade, firstDiv) {\n var date1, date2, earliestDate,\n finYearStart;\n\n if (firstTrade) { date1 = firstTrade.date; }\n if (firstDiv) { date2 = firstDiv.date; }\n\n if (date1) {\n if (date2) {\n earliestDate = date1.isBefore(date2) ? date1 : date2;\n } else {\n earliestDate = date1;\n }\n } else {\n earliestDate = date2;\n }\n\n finYearStart = moment(earliestDate).month(3).startOf('month');\n if (earliestDate.isBefore(finYearStart)) {\n return [moment(finYearStart).subtract({ 'years': 1 }), moment(finYearStart).subtract({ 'days': 1 })];\n } else {\n return [moment(finYearStart), moment(finYearStart).add({ 'years': 1 }).subtract({ 'days': 1 })];\n }\n }", "title": "" }, { "docid": "59bea225dd491f2e119b9500b8008f82", "score": "0.533772", "text": "function totalInterest(total_borrowed, interest_rate, loan_maturity) {\n// offset necessary because at beginning of loan you are paying interest on full principle, but at end you are paying interest on almost $0\n var adjusted_loan_base = total_borrowed - ((total_borrowed / loan_maturity) / 2),\n interest_paid = 0;\n// every year decrease the loan base, add interest paid, and decrement years remaining\n for(var loan_year = loan_maturity; loan_year > 0; loan_year--){\n interest_paid += adjusted_loan_base * interest_rate;\n adjusted_loan_base -= (total_borrowed / loan_maturity);\n }\n return interest_paid\n}", "title": "" }, { "docid": "a16f30450d85f6c4cbb2740ce6c1cc98", "score": "0.5311308", "text": "function YEARFRAC() {\n if (arguments.length == 0) // Non parameter\n {\n alert(\" Please Enter parameter Into The Function \");\n return \"YEARFRAC()\";\n }\n else if (arguments.length > 3 || arguments.length == 1) // Less or more then 3 parameters\n {\n alert(\"Please You Must Pass Tow / Three parameter To This Function\");\n return \"YEARFRAC()\";\n }\n var start_date = new helpdate(arguments[0]); // mandatory\n var end_date = new helpdate(arguments[1]); // mandatory\n var basis; // optional\n\n // if 2 arguments passed ..\n if (arguments.length == 2) basis = 1;\n else basis = Math.trunc(arguments[2]);\n // 1 --> Means 365 days of year .. 2 --> Means 360 days of year ..\n if (start_date.isdate() && end_date.isdate()) {\n\n var numdays = DAYS(arguments[1], arguments[0]);\n // 1 Means -- > 365 number of days of the year\n if (basis == 1) { \n return (numdays / 365);\n }\n // 2 Means -- > 360 number of days of the year\n else if (basis == 2) {\n return (numdays / 360);\n }\n // 3 Means -- > 366 number of days of the year\n else if (basis == 3) {\n return (numdays / 366);\n }\n else return \"#NUM!\";\n }\n else return \"#VALUE\";\n}", "title": "" }, { "docid": "8e018a30742f4e9f44533f441ef6c13e", "score": "0.5303819", "text": "function calculate(loanAmount, interestRate, tenor) {\n // calculation of the interest\n var interest = (loanAmount * (interestRate * 0.01)) / tenor;\n // calculation of the monthly payment\n var monthlyPayment = (((loanAmount / tenor) + interest));\n // monthly payment is returned\n return monthlyPayment;\n}", "title": "" }, { "docid": "f5f2e5b46a326732a7c1387e48edb2b5", "score": "0.5300698", "text": "function computeSchedule(loan_amount, interest_rate, payments_per_year, years, payment, mainStartDate) {\n// var schedule = {};\n var schedule = [];\n var remaining = loan_amount;\n var number_of_payments = payments_per_year * years;\n // create a start date object\n mainStartDate = mainStartDate ? new Date(mainStartDate) : new Date();\n for (var i = 0; i < number_of_payments; i++) {\n var interest = remaining * (interest_rate / 100 / payments_per_year);\n var principle = (payment - interest);\n var paymentDate = (i === 0) ? new Date(mainStartDate) : new Date(addDaysInDate(mainStartDate, payments_per_year));\n principle = principle > 0 ? (principle < payment ? principle : payment) : 0;\n interest = interest > 0 ? interest : 0;\n var newRemainingAmount = remaining > 0 ? remaining - principle : 0;\n var row = [\n paymentDate,\n principle,\n interest,\n getTotalAmountPaid(principle, interest),\n newRemainingAmount,\n loanPaidTillDate(loan_amount, newRemainingAmount)\n ];\n // create a year key in schedule array. Which will store all the data for that year\n// if (typeof schedule[paymentDate.getFullYear()] == 'undefined') {\n// schedule[paymentDate.getFullYear()] = {};\n// schedule[paymentDate.getFullYear()].data = [];\n// }\n// try {\n// schedule[paymentDate.getFullYear()].data.push(row);\n// }\n// catch (err) {\n// schedule[paymentDate.getFullYear()].data = [];\n// schedule[paymentDate.getFullYear()].data.push(row);\n// }\n schedule.push(row);\n remaining -= principle;\n }\n// console.log(schedule);\n return schedule;\n}", "title": "" }, { "docid": "bab7e81ab0899ae827d8a64922022a2c", "score": "0.52973634", "text": "function interest4(principal, rate = 8, years) {\n return principal * rate / 100 * years;\n}", "title": "" }, { "docid": "546ffe88dee3dc944d4b92eb1627f847", "score": "0.5296511", "text": "function getInterestEarned(depositAmount, futureValue)\n{\n let interestEarned = futureValue - depositAmount;\n return interestEarned;\n}", "title": "" }, { "docid": "c6281f1b8ab1ecce27df9061cdc1bfac", "score": "0.52958506", "text": "function cal(years)\r\n{\r\n \r\n return 2016 - years;\r\n \r\n}", "title": "" }, { "docid": "aced6a0d45890791e21e1c8528eb7850", "score": "0.52929926", "text": "sumIncomesForEachCompany(companies) {\n companies.forEach(company => {\n company.totalIncome = company.incomes\n .reduce((total, income) => {\n return total + parseFloat(income.value);\n }, 0)\n .toFixed(2);\n\n company.incomes.forEach(income => {\n income.date = new Date(income.date);\n });\n });\n return companies;\n }", "title": "" }, { "docid": "56a63bbb46adf1b3ea1a07268c49c665", "score": "0.52760315", "text": "function init(divide, multiply, add) {\n\nresult = rate / 12 / 100;\nmonths = years * 12;\nfutureValue = investment;\n\nfor(i = 1; i < months; i +=1) {\n monthlyInterest = futureValue * monthlyRate;\n futureValue += monthlyInterest; \n\n}\n\nreturn futureValue;\n\n//GET THE VALUES OF THE DOM ELEMENTS\ndocument.addEventListener(event, listener);\n function = parseFloat (event, listener);\n function = parseFloat (rate.value);\n function int = parseInt (years.value);\n function int. = calculateInvestement (investment.value, rate.value, years.value);\n function = 'Future value: $' + Math.round(futureValue) + '.00';\n\n}", "title": "" }, { "docid": "cf39918ae6139c205a3cb0cf9e7f0899", "score": "0.52728397", "text": "function computeCompoundInterest(principal, interestRate, compoundingFrequency, timeInYears) {\n // your code here\n let totalEndAmount = 0;\n return principal * Math.pow((1 + interestRate / compoundingFrequency), (compoundingFrequency * timeInYears)) - principal;\n }", "title": "" }, { "docid": "2d563c6f9fb8e502298cdb0df1b39313", "score": "0.5269967", "text": "function getPriceByCurrentDate() {\r\n var currentDate = +new Date();\r\n\r\n var earlyBirdDate = 1487113200000; //15.02.17\r\n var standardDate = 1492207200000; // 15.04.17\r\n\r\n var currentPrices;\r\n\r\n if (currentDate < earlyBirdDate) {\r\n currentPrices = {\r\n prices: [130, 80, 30, 0],\r\n reducedPrices: [85, 50, 20, 0]\r\n };\r\n }\r\n\r\n else if (currentDate < standardDate) {\r\n currentPrices = {\r\n prices: [160, 100, 40, 0],\r\n reducedPrices: [105, 65, 25, 0]\r\n };\r\n } else {\r\n currentPrices = {\r\n prices: [190, 120, 50, 0],\r\n reducedPrices: [125, 80, 30, 0]\r\n };\r\n }\r\n\r\n var pricesConsideringAge;\r\n\r\n if (isYouth()) {\r\n pricesConsideringAge = currentPrices.reducedPrices;\r\n } else {\r\n pricesConsideringAge = currentPrices.prices;\r\n }\r\n\r\n return pricesConsideringAge[getBookingOption()];\r\n\r\n}", "title": "" }, { "docid": "c0633217ae8b6acbda52988198a22221", "score": "0.5266145", "text": "function nbYear(p0, percent, aug, p) {\n //for loop with global variable y assigned to 0; condition p0 less than p\n //y plus plus\n for(var y = 0; p0 < p; y++){\n //p0 assigned to p0 times paranthasis 1 plus percent devided by 100 close paran\n //plus aug\n p0 = p0 * (1 + percent / 100) + aug\n }\n //return y\n return y;\n }", "title": "" }, { "docid": "0e0eb31b8f3d2a6b32291887f5530da4", "score": "0.5263561", "text": "function calculateYears(principal, interest, tax, desired) {\n if(principal === desired) {\n return 0 ;\n }\n\n let years = 0;\n while(principal < desired) {\n let totalInterestGained = principal * interest;\n let totalTax = totalInterestGained * tax;\n principal = principal + (totalInterestGained - totalTax);\n years++;\n }\n return years;\n}", "title": "" }, { "docid": "8eb820c1db6556d27f750e21be459696", "score": "0.5259161", "text": "function calculateIncome(newincome){\n let username = user[\"Michael Davis\"];\n let userMonth = username[month];\n userMonth[\"expctInc\"] += parseFloat(newincome,10);\n expectedIncome.innerText =\"$\" +parseFloat(userMonth[\"expctInc\"],10).toFixed(2);\n userMonth[\"remainderInc\"] = parseFloat(userMonth[\"expctInc\"],10) - parseFloat(userMonth[\"expctExp\"],10);\n remainder.innerText = \"$\" +parseFloat(userMonth[\"remainderInc\"],10).toFixed(2);\n\n}", "title": "" }, { "docid": "a5207a9444c28431183ed6b4bdf120a9", "score": "0.52566886", "text": "function findSlopeny(a, ny2010, b, ny2011, c, ny2012) {\n m1 = (ny2011 - ny2010) / (b - a);\n m2 = (ny2012 - ny2011) / (c - b);\n avg = (m1 + m2) / 2;\n return avg;\n}", "title": "" }, { "docid": "b9969ca56abe80a4a8eaafc27b6be4d2", "score": "0.52366644", "text": "function calculateYears(principal, interest, tax, desired) {\n \n let counter = 0;\n \n while (principal < desired) {\n principal = principal + (principal * interest) - (principal * interest * tax);\n counter++;\n }\n \n return counter;\n \n}", "title": "" }, { "docid": "0014e48f52c4a522a23ca4084ae49387", "score": "0.5236256", "text": "function annualBonus(currentEmployee){\n var income = currentEmployee[2];\n var incomeBonus = 0;\n if(income > 65000) {\n incomeBonus = -0.01;\n }\n else{\n incomeBonus = 0;\n }\n return(incomeBonus);\n}// end annualBonus", "title": "" }, { "docid": "af0240432938158796469157282efc8d", "score": "0.5232269", "text": "function produceYear(start, end){\n var returnThis = [];\n\n for(var i = start; i <= end; i++){\n \treturnThis.push(i);\n }\n\n return returnThis;\n}", "title": "" }, { "docid": "34d3c65b81ef5a765659036c6a7a8404", "score": "0.52322626", "text": "function getPeriod(banDoc, startDate, endDate) {\n\n var res = \"\";\n var year = Banana.Converter.toDate(startDate).getFullYear();\n var startDateDay = Banana.Converter.toDate(startDate).getDate(); //1-31\n var endDateDay = Banana.Converter.toDate(endDate).getDate(); //1-31\n var startDateMonth = Banana.Converter.toDate(startDate).getMonth(); //0=january ... 11=december\n var endDateMonth = Banana.Converter.toDate(endDate).getMonth(); //0=january ... 11=december\n\n /*\n CASE 1: all the year yyyy-01-01 - yyyy-12-31(i.e. \"2018\")\n */\n if (startDateMonth == 0 && startDateDay == 1 && endDateMonth == 11 && endDateDay == 31) {\n res = year;\n }\n\n /*\n CASE 2: single month (i.e. \"January 2018\")\n */\n else if (startDateMonth == endDateMonth) {\n res = getMonthText(Banana.Converter.toDate(startDate));\n res += \" \" + year;\n }\n\n /* \n CASE 3: period in the year (i.e. \"First quarter 2018\", \"Second semester 2018\")\n */\n else if (startDateMonth != endDateMonth) {\n\n //1. Quarter (1.1 - 31.3)\n if (startDateMonth == 0 && endDateMonth == 2) {\n res = getPeriodText(\"Q1\");\n res += \" \" + year;\n } \n\n //2. Quarter (1.4 - 30.6)\n else if (startDateMonth == 3 && endDateMonth == 5) {\n res = getPeriodText(\"Q2\");\n res += \" \" + year; \n }\n\n //3. Quarter (1.7 - 30.9)\n else if (startDateMonth == 6 && endDateMonth == 8) {\n res = getPeriodText(\"Q3\");\n res += \" \" + year;\n }\n\n //4. Quarter (1.10- 31.12)\n else if (startDateMonth == 9 && endDateMonth == 11) {\n res = getPeriodText(\"Q4\");\n res += \" \" + year;\n }\n\n //1. Semester (1.1 - 30.6)\n else if (startDateMonth == 0 && endDateMonth == 5) {\n res = getPeriodText(\"S1\");\n res += \" \" + year;\n }\n //2. Semester (1.7 - 31.12)\n else if (startDateMonth == 6 && endDateMonth == 11) {\n res = getPeriodText(\"S2\");\n res += \" \" + year;\n }\n\n /* \n CASE 4: other periods\n */\n else {\n res = Banana.Converter.toLocaleDateFormat(startDate) + \" - \" + Banana.Converter.toLocaleDateFormat(endDate);\n }\n }\n\n return res;\n}", "title": "" }, { "docid": "bb3ca4364b683fc425914636658d1469", "score": "0.52176356", "text": "function createExpression(year_two,year_one){\r\nreturn \"(($feature.\"+year_two+\" - $feature.\"+year_one+\")/$feature.\"+year_one+\")*100\";\r\n}", "title": "" }, { "docid": "09c18f4a8cbaeb7d787dbd9dce91d587", "score": "0.52141273", "text": "function returnIncome(fAmount, fTime, realNumberOfBuildingTypes)\n{\n numberOfBuildingTypes = realNumberOfBuildingTypes\n recalculateIncome();\n gon.iToys += previousIncome * fTime / 1000;\n}", "title": "" }, { "docid": "ffd8c7ff5db3da8836eb2070017fa1eb", "score": "0.5208351", "text": "function calculateTotalValuation(portfolioList){\n let totalValuation = 0;\n portfolioList && portfolioList.map((portfolio)=>{\n totalValuation = totalValuation + (portfolio['amount'] * portfolio['price_usd']);\n })\n return totalValuation;\n}", "title": "" }, { "docid": "d48f8b4be24929e2ebd2f3dcdc9fc13d", "score": "0.52063596", "text": "function compute()\n{\n p = document.getElementById(\"principal\").value;\n var principal = p ;\n r = document.getElementById(\"rate\").value; \n var rate = r ;\n y = document.getElementById(\"years\").value;\n var years = y ;\n i = (principal * years * rate / 100);\n var interest = i ;\n\n//Lab Step 11: When \"Compute Interest\" is clicked, \n//set its inner html property to the below text.\n//If you deposit 1000000,\n//at an interest rate of 3.5%.\n//You will receive an amount of 175000,\n//in the year 2025\n\n//Lab Step 12: The number above are for indication only. \n//Make sure the output contains the relevant values by \n//using the correct variables.\n\n//Lab Step 13: Make sure that the input you have taken \n//as \"No of Years\" is converted into an actual year.\n\n\n var pt = document.getElementById(\"pt\") ;//get p id value from html\n pt.innerText = pt.innerText+\"If you deposit \" +principal;\n\n var rt = document.getElementById(\"rt\") ;//get r id value from html\n rt.innerText = rt.innerText+\"at an interest rate of \" +rate ;\n\n var it = document.getElementById(\"it\") ;//get i id value from html\n it.innerText = it.innerText+\"%. You will receive an amount of \" +interest;\n\n CurrentYear = document.getElementById(\"years\").value; \n var numberofyears = CurrentYear ;\n var actualyear = new Date();\n var n = actualyear.getFullYear();\n var newyear = +n + +CurrentYear;\n\n var yt = document.getElementById(\"yt\") ;//get y id value from html\n yt.innerText = yt.innerText+\"in the year \" +newyear;\n\n//Lab Step 10: Get the reference to the element named 'result'\n \n result.innerHTML = interest ;\n\n}", "title": "" }, { "docid": "cbff2d08b1b32912909f5b874223ca63", "score": "0.5186263", "text": "function calcRetirement(ageOfRetirement){\n var a = ' years more until retirement...';\n return function(yearOfBirth){\n var age = 2019 - yearOfBirth;\n console.log((ageOfRetirement - age) + a);\n }\n}", "title": "" }, { "docid": "a38fec5e0d6cbe040624ecf49143138d", "score": "0.5182679", "text": "function libraryFine(d1, m1, y1, d2, m2, y2) {\n if (y1 < y2) {\n return 0;\n }\n else if (y1 == y2) {\n if (m1 < m2) {\n return 0;\n }\n else if (m1 == m2) {\n if (d1 <= d2) {\n return 0;\n }\n else {//d1>d2\n return 15 * (d1 - d2);\n }\n }\n else {//returned on month m1, after m2 (month due)\n return 500 * (m1 - m2);\n }\n }\n else {//y1>y2\n return 10000;\n }\n}", "title": "" }, { "docid": "acbbbca4587925590736a73b23ea8038", "score": "0.5168777", "text": "function calculateMonthlyPayments(data) {\n const totalMonths = data.term * 12;\n const monthlyInterest = data.interest / 100 / 12;\n const monthlyPrincipalInterest =\n data.principal *\n ((monthlyInterest * (1 + monthlyInterest) ** totalMonths) /\n ((1 + monthlyInterest) ** totalMonths - 1));\n console.log(\"*******monthlyPrincipalInterest********\");\n console.log(monthlyPrincipalInterest);\n console.log(\"*******monthlyPrincipalInterest********\");\n\n data.monthly = Number(monthlyPrincipalInterest.toFixed(2));\n }", "title": "" }, { "docid": "8ed18626c9da7dad80ed7440a122b67f", "score": "0.5146775", "text": "computeInterest () {\r\n if (this.state.period === 'month') {\r\n let totalCashAfterCompound = this.compoundInterest(this.state.initMoney, this.state.interestRate, 12, 1/12);\r\n\r\n this.setState({finalMoney: (parseFloat(totalCashAfterCompound.toFixed(2)) - parseFloat(this.state.initMoney).toFixed(2)).toFixed(2) });\r\n this.setState({totalMoney: totalCashAfterCompound.toFixed(2)});\r\n\r\n } else if (this.state.period === 'year') {\r\n let totalCashAfterCompound = this.compoundInterest(this.state.initMoney, this.state.interestRate, 12, 1);\r\n\r\n this.setState({finalMoney: (parseFloat(totalCashAfterCompound.toFixed(2) - parseFloat(this.state.initMoney).toFixed(2))).toFixed(2)});\r\n this.setState({totalMoney: (totalCashAfterCompound.toFixed(2))});\r\n }\r\n //React setState is not synchronous so the following code can be used to guarantee behaviour. However, this is obviously not optimal. The above implementation is more optimal\r\n //this.forceUpdate( () => {this.setState({totalMoney: (this.state.initMoney + this.state.finalMoney)});} );\r\n }", "title": "" }, { "docid": "6dad18bbde8e8e0e795d31c010dc68e2", "score": "0.514531", "text": "function nbYear(p0, percent, aug, p) {\n let years = 0;\n let raise = 7000\n\n while(p0 < p){\n p0 = p0 + (p0 * percent / 100) + aug + raise;\n years++;\n }\n\n return years;\n}", "title": "" }, { "docid": "0da1b05746b6055fd4d3e1f6ad05a3f7", "score": "0.51443386", "text": "function reloadRange(e) {\n e.preventDefault();\n\n\n let start_date = document.getElementById('startDate').value;\n let end_date = document.getElementById('endDate').value;\n let avg = document.getElementById('avgIncome').children[0];\n let total = document.getElementById('totalIncome').children[0];\n\n\n let range_total = (incomes.reduce((acc, b) => {\n if ((start_date + \"-00\") <= b.date && b.date <= (end_date + \"-32\")) {\n acc += parseFloat(b.value)\n } return acc\n }, 0)).toFixed(2);\n\n let range_avg = (incomes.reduce((acc, b) => {\n if (start_date <= b.date && b.date <= end_date) {\n acc++\n } return acc\n }, 0)).toFixed(2)\n\n avg.innerText = range_avg > 0 ? (range_total / range_avg).toFixed(2) + \" in \" + range_avg + \" invoices\" : range_total;\n total.innerText = range_total + \" - between \" + start_date + \" and \" + end_date;\n\n}", "title": "" }, { "docid": "85a6410fa961fdb1aa93a94f9e83d702", "score": "0.51441085", "text": "function annual_solar_rad(region, orient, p)\n{\n // month 0 is january, 11: december\n var sum = 0;\n for (var m = 0; m < 12; m++)\n {\n sum += datasets.table_1a[m] * solar_rad(region, orient, p, m);\n }\n return 0.024 * sum;\n}", "title": "" }, { "docid": "c47fb94b1cd1cc27b061b5c3c3be2c91", "score": "0.51396924", "text": "function calculateMonthlyPayment(values) {\n const {amount, rate, years} = values \n const P = amount;\n const i = rate / (12 * 100)\n const n = years * 12\n //console.log(P, rate, years, i, n);\n const monthlyPayment = P * i / (1 - (Math.pow(1/(1 + i), n)));\n console.log(monthlyPayment);\n return (monthlyPayment.toFixed(2))\n}", "title": "" }, { "docid": "8ca6bfeb78cdfbe25d6d777c3c722543", "score": "0.5136232", "text": "function calculateAge(name, birthYear) {\n// I have two parameters, arguments (name, birthYear)\n//let name = \"Seda\"; Dont define it because we do not want to use it for one person.\n let date = new Date();\n let currentYear = date.getFullYear(); console.log(currentYear); // It gives the year\n// let currentYear = new Date().getMonth(); console.log(currentYear); It gives the month\n \n \n let age = currentYear - birthYear; //Dont define the year because we do not want to use it for one person.\n\n //return name + \" is \" + age + \" years old !\"; !!!!!!!!!!!!!! It is like an EXIT , it should be put after console.log\n// You should RETURN it at the end IMPORTANT !!!!!!!!!!!!!!!!!!!\n// YOU CAN USE ONLY ONE RETURN, AFTER IT WILL GO OUTSIDE\n \n let bob = 56;\n return bob;\n console.log(name + \" is \" + age + \" years old !\"); //This is a easy way instead of return\n// Nothing will display after the first return\n}", "title": "" }, { "docid": "2559d9f4663958e7630ef77357635eee", "score": "0.51331794", "text": "function getBonusDate(currentYear, currentMonth)\n{\n var midDate = new Date(currentYear,currentMonth,15); // set the day value to the 15th for bonus payments\n showCalculations ? console.log(\"Original Date: \"+midDate.toLocaleDateString(timeZone)) : \"\";\n var dayName = getDayName(midDate);\n showCalculations ? console.log(\"Day Name: \"+dayName) : \"\";\n if(dayName === \"Saturday\") // if day falls on a Saturday\n {\n midDate.setDate( midDate.getDate(midDate) + 4 ); // move date on by 4 days to the next Wednesday\n showCalculations ? console.log(\"Next Wednesday Date- \"+midDate.toLocaleDateString(timeZone)) : \"\";\n }\n if(dayName === \"Sunday\")// if day falls on a Sunday\n {\n midDate.setDate( midDate.getDate(midDate) + 3 ); // move date on by 3 days to the next Wednesday\n showCalculations ? console.log(\"Next Wednesday Date - \"+midDate.toLocaleDateString(timeZone)) : \"\";\n }\n return midDate.toLocaleDateString(timeZone);\n}", "title": "" }, { "docid": "87f4ab50f3f81c367145850c8eddddd9", "score": "0.5126784", "text": "function GetLicenseSeasonPeriod() {\r\n var now = new Date();\r\n var y = now.getFullYear();\r\n var returnPeriod = new Array();\r\n var bizObj = aa.bizDomain.getBizDomainByValue(DEC_CONFIG, LICENSE_SEASON);\r\n\r\n if (bizObj.getSuccess()) {\r\n var sItemVal = bizObj.getOutput().getDescription();\r\n var monthArray = new Array();\r\n monthArray = sItemVal.toString().split(\"-\");\r\n if (monthArray.length != 2) {\r\n logDebug(\"**ERROR :DEC_CONFIG >> LICENSE_SEASON is not set up properly\");\r\n } else {\r\n\r\n for (var p = 0; p < monthArray.length; p++) {\r\n var op = monthArray[p].toString().split(\"/\");\r\n returnPeriod[returnPeriod.length] = new Date(y, op[0] - 1, op[1]);\r\n }\r\n var IsCurrentYearSame = (now >= returnPeriod[0] && now <= returnPeriod[1]);\r\n returnPeriod.length = 0;\r\n for (var p = 0; p < monthArray.length; p++) {\r\n var op = monthArray[p].toString().split(\"/\");\r\n if (returnPeriod.length == 0) {\r\n returnPeriod[returnPeriod.length] = new Date((IsCurrentYearSame ? y : y - 1), op[0] - 1, op[1]);\r\n } else {\r\n returnPeriod[returnPeriod.length] = new Date((IsCurrentYearSame ? y + 1 : y), op[0] - 1, op[1]);\r\n }\r\n }\r\n }\r\n }\r\n return returnPeriod;\r\n}", "title": "" }, { "docid": "80d3a98ce44f344e24668a3132b29ab7", "score": "0.51251477", "text": "getPriceAt (date) {\n return this.monthlyTimeSerie[date]['5. adjusted close']\n }", "title": "" }, { "docid": "0a5950e50a84278596d1d11a6f24d2f2", "score": "0.51230377", "text": "function calculatedResults() {\n\n //Getting the Required UI variables\n const amountUI_input = document.getElementById('amount');\n const interestUI_input = document.getElementById('interest');\n const yearsUI_input = document.getElementById('years');\n const monthlyPaymentUI_input = document.getElementById('monthly-payment');\n const totalPaymentUI_input = document.getElementById('total-payment');\n const totalInterestUI_input = document.getElementById('total-interest');\n // preventing the default bahaviour becuase it's a form submit\n\n\n\n //Creating the formula for finding the Loan Amount\n\n // Getting the value of each UI_input field from the UI\n const principal = parseFloat(amountUI_input.value);\n const calculatedInterest = parseFloat(interestUI_input.value) / 100 / 12;\n const calculatedPayments = parseFloat(yearsUI_input.value) * 12;\n\n //Computing the monthly payments\n const tempVar = Math.pow(1 + calculatedInterest,\n calculatedPayments);\n const monthly = (principal * tempVar * calculatedInterest) / (tempVar - 1);\n\n // Checking if the monthly variable contains a finite number\n if (isFinite(monthly)) {\n\n //setting the montlyPayment value in 2 precision float\n monthlyPaymentUI_input.value = monthly.toFixed(2);\n totalPaymentUI_input.value = (monthly * calculatedPayments).toFixed(2);\n totalInterestUI_input.value = ((monthly * calculatedPayments) - principal).toFixed(2);\n } else {\n showError('Please check your numbers');\n }\n\n e.preventDefault();\n}", "title": "" }, { "docid": "f49d02d3a31b4c7f459fce741a7110b2", "score": "0.51184213", "text": "function calcCommission(price,ndays)\n{\n var commission = new Array(4);\n var takenCommission = price*0.3;\n var insurance=takenCommission*0.5;\n commission[0]=insurance;\n var treasury= ndays * 1;\n commission[1]=treasury;\n var profit=takenCommission-insurance-treasury;\n commission[2]=profit;\n return commission;\n}", "title": "" }, { "docid": "21037a6771848927fadf8fe60e91b967", "score": "0.5106462", "text": "function calc_total_date_profit() {\n // get the values\n profit = $(\"#total_sum_profit\").text();\n\n costs = 0;\n $(\"#costs-hidden span.hidden-cost\").each(function () {\n costs += parseFloat($(this).text());\n });\n panel_date = new Date(\n (year = parseFloat(\n $(\"#s_sales_filter_by_date > option:selected\").text().split(\"-\")[0]\n )),\n (month = parseFloat(\n $(\"#s_sales_filter_by_date > option:selected\").text().split(\"-\")[1] - 1\n )),\n (date = parseFloat($(\"#f_start_month_day > option:selected\").text()))\n );\n console.log(\"PANEL: \" + panel_date);\n $(\"#costs-hidden span.hidden-temp-cost\").each(function () {\n value = parseFloat($(this).text().split(\"|\")[0]);\n start_date = new Date($(this).text().split(\"|\")[1]);\n exp_date = new Date($(this).text().split(\"|\")[2]);\n console.log(\"START: \" + start_date);\n console.log(\"END: \" + exp_date);\n // add the not expired costs to calculation\n if (exp_date >= panel_date && start_date <= panel_date) {\n console.log(\"valid\");\n costs += value;\n }\n });\n selected_date = $(\"#s_sales_filter_by_date\").val();\n\n $.ajax({\n url: \"/filter_gifts\",\n type: \"GET\",\n data: {\n date: selected_date,\n },\n success: function (data) {\n gifts_tax = 0;\n $.each(data, function (i, item) {\n gifts_tax += parseFloat(item.fields.gift_tax);\n });\n // calculate the total profit\n if (isNaN(parseFloat(profit))) profit = 0;\n total = parseFloat(profit) - parseFloat(costs) - parseFloat(gifts_tax);\n\n // if the total profit is grater than 0, show it in green, else show it in red.\n if (total < 0) $(\"#total-profit\").addClass(\"bg-danger\");\n else $(\"#total-profit\").addClass(\"bg-success\");\n\n $(\"#total-profit\").html(\"$\" + parseFloat(total));\n },\n }).fail(function (data) {\n console.log(data);\n });\n console.log(\"-----------------------------------------\");\n}", "title": "" }, { "docid": "8e5b17af97865017adb4e10a9ed38d7a", "score": "0.5104258", "text": "function calculateInterest(initBal, intRate, calcPeriod){\n let table = {\n year: [],\n yearInterest: [],\n totalInterest: [],\n balance: []\n };\n\n // pushing first year (no calculations needed)\n table.year.push(0);\n table.yearInterest.push(0);\n table.totalInterest.push(0);\n table.balance.push(initBal);\n\n // calculates the balance, total interest and yearly interest rounded to 2 d.p.\n for(let i=1;i<=calcPeriod;i++){\n table.year.push(i);\n table.balance.push(Math.round(100*(initBal * Math.pow((1 + (intRate/100)), i)))/100);\n table.totalInterest.push(Math.round(100*(table.balance[i] - initBal))/100);\n table.yearInterest.push(Math.round(100*(table.totalInterest[i] - table.totalInterest[i-1]))/100);\n }\n\n return table;\n}", "title": "" }, { "docid": "9ae853632733ecbab2c705117fc0c33a", "score": "0.5102743", "text": "function InterestCover(revenue, interest_expense, ebit){\n return (revenue*ebit)/interest_expense\n}", "title": "" }, { "docid": "5af28ee237560224e150ba23a027f0f2", "score": "0.51023257", "text": "function calculateDividendAdjustments() {\r\n for(i=0; i<dateArray.length; i++){\r\n \r\n if(i==0){\r\n vtAdjPriceArray[i] = vtPriceArray[i];\r\n vfinxAdjPriceArray[i] = vfinxPriceArray[i];\r\n xiuAdjPriceArray[i] = xiuPriceArray[i];\r\n vbmfxAdjPriceArray[i] = vbmfxPriceArray[i];\r\n } else {\r\n \r\n //VT\r\n if(isNaN(vtAdjPriceArray[i-1])) {\r\n vtAdjPriceArray[i] = vtPriceArray[i]; \r\n } else if(isNaN(vtPriceArray[i-1]) || isNaN(vtPriceArray[i]) || isNaN(vtDivArray[i])) {\r\n //take previous adj value if there is an error in the adjusted data (e.g., null)\r\n vtAdjPriceArray[i] = vtAdjPriceArray[i-1]; \r\n } else {\r\n //previous value + unadjusted daily return + dividend (if any)\r\n vtAdjPriceArray[i] = vtAdjPriceArray[i-1] * (vtPriceArray[i] / vtPriceArray[i-1]) + (vtDivArray[i] / vtPriceArray[i-1] * vtAdjPriceArray[i-1]);\r\n }\r\n\r\n //VFINX\r\n if(isNaN(vfinxAdjPriceArray[i-1])) {\r\n vfinxAdjPriceArray[i] = vfinxPriceArray[i]; \r\n } else if(isNaN(vfinxPriceArray[i-1]) || isNaN(vfinxPriceArray[i]) || isNaN(vfinxDivArray[i])) {\r\n //take previous adj value if there is an error in the adjusted data (e.g., null)\r\n vfinxAdjPriceArray[i] = vfinxAdjPriceArray[i-1]; \r\n } else {\r\n //previous value + unadjusted daily return + dividend (if any)\r\n vfinxAdjPriceArray[i] = vfinxAdjPriceArray[i-1] * (vfinxPriceArray[i] / vfinxPriceArray[i-1]) + (vfinxDivArray[i] / vfinxPriceArray[i-1] * vfinxAdjPriceArray[i-1]);\r\n }\r\n\r\n //XIU\r\n if(isNaN(xiuAdjPriceArray[i-1])) {\r\n xiuAdjPriceArray[i] = xiuPriceArray[i]; \r\n } else if(isNaN(xiuPriceArray[i-1]) || isNaN(xiuPriceArray[i]) || isNaN(xiuDivArray[i])) {\r\n //take previous adj value if there is an error in the adjusted data (e.g., null)\r\n xiuAdjPriceArray[i] = xiuAdjPriceArray[i-1]; \r\n } else {\r\n //previous value + unadjusted daily return + dividend (if any)\r\n xiuAdjPriceArray[i] = xiuAdjPriceArray[i-1] * (xiuPriceArray[i] / xiuPriceArray[i-1]) + (xiuDivArray[i] / xiuPriceArray[i-1] * xiuAdjPriceArray[i-1]);\r\n }\r\n\r\n //VBMFX\r\n if(isNaN(vbmfxAdjPriceArray[i-1])) {\r\n vbmfxAdjPriceArray[i] = vbmfxPriceArray[i]; \r\n } else if(isNaN(vbmfxPriceArray[i-1]) || isNaN(vbmfxPriceArray[i]) || isNaN(vbmfxDivArray[i])) {\r\n //take previous adj value if there is an error in the adjusted data (e.g., null)\r\n vbmfxAdjPriceArray[i] = vbmfxAdjPriceArray[i-1]; \r\n } else {\r\n //previous value + unadjusted daily return + dividend (if any)\r\n vbmfxAdjPriceArray[i] = vbmfxAdjPriceArray[i-1] * (vbmfxPriceArray[i] / vbmfxPriceArray[i-1]) + (vbmfxDivArray[i] / vbmfxPriceArray[i-1] * vbmfxAdjPriceArray[i-1]);\r\n }\r\n \r\n }\r\n }\r\n}", "title": "" }, { "docid": "dbff8897817c63ec7e0fdd7d0b805895", "score": "0.51016706", "text": "function computeCompoundInterest(principal, interestRate, compoundingFrequency, timeInYears) {\n let totalEndAmount = principal * ((1 + (interestRate / compoundingFrequency)) **(timeInYears * compoundingFrequency))\n return totalEndAmount;\n}", "title": "" }, { "docid": "4c1dd95676b34dc0511a3980f88c5832", "score": "0.5101524", "text": "function CalculaImpostoRPA(campoBase, campoAliq, campoImposto, campoIssRetido) {\r\n\tvar base = MoedaToDec(campoBase.value);\r\n\tvar aliq;\r\n\tif (campoAliq.value == ''){\r\n\t\taliq = 0;\r\n\t}else{\r\n\t\taliq = parseFloat(campoAliq.value);\r\n\t}\r\n\tvar total = aliq;\r\n\t\r\n\t//testa se tem iss retido na declaracao, se sim recalcula o imposto, se nao continua normal\r\n\tif(campoIssRetido !== undefined){\r\n\t\t\r\n\t\t//valor digitado para o iss retido\r\n\t\tvar valor_iss_retido = parseFloat(MoedaToDec(campoIssRetido.value));\r\n\t\t\r\n\t\t//nao eh possivel reter mais que o valor do imposto, para nao ficar com o imposto negativo\r\n\t\tif(valor_iss_retido >= total){\r\n\t\t\t//se for maior que o imposto, o valor retido fica como o total do imposto e o total imposto fica zerado\r\n\t\t\tcampoIssRetido.value = DecToMoeda(total);\r\n\t\t\ttotal = 0.00;\r\n\t\t}else{\r\n\t\t\t//se o iss retido for menor que o total de imposto, subtrai o valor do iss retido do total e conclui a soma\r\n\t\t\ttotal = total - valor_iss_retido;\r\n\t\t}\r\n\t}\r\n\t\r\n\tcampoImposto.value = DecToMoeda(total);\r\n\r\n\tSomaImpostosDes();\r\n\tCalculaMultaDes();\r\n}", "title": "" }, { "docid": "e677e6f7ec417c6c0220f5b7f5f122d0", "score": "0.5091698", "text": "async growthOnPeriod(from, to) {\n const initialDate = isBefore(from, this.firstDate()) ? this.firstDate() : from;\n const [initialValue, endValue] = await Promise.all([\n this.valueOnDate(initialDate),\n this.valueOnDate(to)\n ]);\n return initialValue !== 0 ? (endValue / initialValue - 1) * 100 : undefined;\n }", "title": "" }, { "docid": "47c501c90e1c4aad5b0b54bff21eba45", "score": "0.50895077", "text": "function calculateSupply(age, amtperday) {\n\nvar years = 30;\n\nvar calc1 = years*365 ;\nvar nn = (calc1)*(amtperday);\nvar x = age + years\n\nvar calcsupply = (\"You will need \" + nn + \" to last you until the ripe old age of \" + x);\nreturn calcsupply\n\n\n}", "title": "" } ]
bed2fb9f89f2348883a9dcbb7a3567b2
adds new option for the hidden vm select fields from new window
[ { "docid": "173d1af3e7f92aa9433d8987d10e1c0a", "score": "0.0", "text": "function AllocSelRowOptions(rowArray)\n {\n \tif (rowArray !== null)\n \t{\n\t for (var i = 0; rowArray.length > i; i++)\n\t {\n\t document.PVForm.hiddenSelRow[i] = new Option(rowArray[i],rowArray[i]);\n\t document.PVForm.hiddenSelRow[i].selected = true;\n\t }\n }\n }", "title": "" } ]
[ { "docid": "ebea48d39b522143316469f7d25557aa", "score": "0.6441688", "text": "function updateNetworkSelect(){\n vnetworks_select=\n makeSelectOptions(dataTable_vNetworks,\n 1,\n 4,\n [],\n []\n );\n\n //update static selectors:\n //in the VM creation dialog\n $('div.vm_section#networks select#NETWORK_ID',$create_template_dialog).html(vnetworks_select);\n}", "title": "" }, { "docid": "1bdf5e245bdd8fddae4e8f840076f640", "score": "0.6317828", "text": "function updateVclusterSelect(){\n vcluster_select = '<option value=\"-1\">Default (none)</option>';\n vcluster_select += makeSelectOptions(dataTable_vclusters,\n 1,//id_col\n 2,//name_col\n [],//status_cols\n [],//bad_st\n true\n );\n}", "title": "" }, { "docid": "31de3aaf68630851f97a4e5ddc32711c", "score": "0.61682385", "text": "setCreateNewOption() {\n if (\n this.showCreateNew && // TODO - Remove when @wire(getLookupActions) response is invocable.\n this._referenceInfos[this._targetObjectInfo.apiName]\n .createNewEnabled\n ) {\n this.items.push(\n utils.computeCreateNewOption(this._targetObjectInfo.label)\n );\n // Trigger items setter for the combobox.\n this.items = this.items.slice();\n }\n }", "title": "" }, { "docid": "691f7a9051d12414eb266faa5b84d985", "score": "0.6140321", "text": "function qfamsUpdateHidden(h, r)\r\n{\r\n for (var i = 0; i < h.length; i++) {\r\n h.options[i].selected = false;\r\n }\r\n\r\n for (var i = 0; i < r.length; i++) {\r\n h.options[h.length] = new Option(r.options[i].text, r.options[i].value);\r\n h.options[h.length - 1].selected = true;\r\n }\r\n}", "title": "" }, { "docid": "00ca362e9be8d9cdadd340bbc4ba8f7f", "score": "0.6079344", "text": "function limpaComponenteDocumento(){\n $('select[id=\"ComponenteDocumento\"]').hide();\n $('#trComponenteDocumento').hide();\n $('select[id=\"ComponenteDocumento\"]').find('option').remove().end().append('<option value=\"\">-- Selecione --</option>'); \n\t}", "title": "" }, { "docid": "2d054944746fe29f6284c26f0a110b72", "score": "0.60420907", "text": "function showSendToStepOptions() {\n $( \"option[id^='sendToStep']\" ).show();\n}", "title": "" }, { "docid": "7e8c7fa731988d1d7ed63039e74b4b32", "score": "0.5857267", "text": "function mdselect() {\r\n $('.mc-select').find('select.select').each(function() {\r\n var selected = $(this).find('option:selected').text();\r\n $(this)\r\n .css({'z-index':10,'opacity':0,'-khtml-appearance':'none'})\r\n .after('<span class=\"select\">' + selected + '</span>' + '<i class=\"fa fa-angle-down\"></i>')\r\n .change(function(){\r\n var val = $('option:selected',this).text();\r\n $(this).next().text(val);\r\n });\r\n });\r\n }", "title": "" }, { "docid": "8da3d152a13bbe1eb0cfc1df692f0e84", "score": "0.584474", "text": "function viewOption(param) {\n\n //gw_com_api.show(\"frmOption\");\n var args = { target: [{ id: \"frmOption\", focus: true }] };\n gw_com_module.objToggle(args);\n\n}", "title": "" }, { "docid": "def55ccf5129795611afc08adb507979", "score": "0.58305085", "text": "get fileDropDownNew() {return this.driver.elementByName('New\tCtrl+N'); }", "title": "" }, { "docid": "e77e65265ef38d076910fabe182d9e11", "score": "0.5826594", "text": "function add_new_category_item_update(v){\r\n\tconsole.log(\"add_new_category_item_update\"+v);\r\n\tnew_update_category_option = '<option value=\"'+capitalize($('#update_todo_category_name'+v+'').val())+'\">'+capitalize($('#update_todo_category_name'+v+'').val())+'</option>';\r\n\t$('select#update_todo_categories'+v+'').prepend(new_update_category_option);\r\n\t$('#add_new_edit_category_form'+v+'').hide();\r\n\t$('select#update_todo_categories'+v+'').show();\r\n\t$('select#update_todo_categories'+v+'').val(capitalize($('#update_todo_category_name').val()));\r\n}", "title": "" }, { "docid": "84b51be6ef17b5758432364bf26bc36c", "score": "0.5825131", "text": "function setupCreateVNetDialog() {\n dialogs_context.append('<div title=\"Create Virtual Network\" id=\"create_vn_dialog\"></div>');\n $create_vn_dialog = $('#create_vn_dialog',dialogs_context)\n var dialog = $create_vn_dialog;\n dialog.html(create_vn_tmpl);\n\n //Prepare the jquery-ui dialog. Set style options here.\n dialog.dialog({\n autoOpen: false,\n modal: true,\n width: 475,\n height: 500\n });\n\n //Make the tabs look nice for the creation mode\n $('#vn_tabs',dialog).tabs();\n $('div#ranged',dialog).hide();\n $('#fixed_check',dialog).click(function(){\n $('div#fixed',$create_vn_dialog).show();\n $('div#ranged',$create_vn_dialog).hide();\n });\n $('#ranged_check',dialog).click(function(){\n $('div#fixed',$create_vn_dialog).hide();\n $('div#ranged',$create_vn_dialog).show();\n });\n $('button',dialog).button();\n\n\n //When we hit the add lease button...\n $('#add_lease',dialog).click(function(){\n var create_form = $('#create_vn_form_easy',$create_vn_dialog); //this is our scope\n\n //Fetch the interesting values\n var lease_ip = $('#leaseip',create_form).val();\n var lease_mac = $('#leasemac',create_form).val();\n\n //We don't add anything to the list if there is nothing to add\n if (lease_ip == null) {\n notifyError(\"Please provide a lease IP\");\n return false;\n };\n\n var lease = \"\"; //contains the HTML to be included in the select box\n if (lease_mac == \"\") {\n lease='<option value=\"' + lease_ip + '\">' + lease_ip + '</option>';\n } else {\n lease='<option value=\"' +\n lease_ip + ',' +\n lease_mac + '\">' +\n lease_ip + ',' + lease_mac +\n '</option>';\n };\n\n //We append the HTML into the select box.\n $('select#leases',$create_vn_dialog).append(lease);\n return false;\n });\n\n $('#remove_lease', dialog).click(function(){\n $('select#leases :selected',$create_vn_dialog).remove();\n return false;\n });\n\n //Handle submission of the easy mode\n $('#create_vn_form_easy',dialog).submit(function(){\n //Fetch values\n var name = $('#name',this).val();\n if (!name.length){\n notifyError(\"Virtual Network name missing!\");\n return false;\n }\n var bridge = $('#bridge',this).val();\n var type = $('input:checked',this).val();\n\n //TODO: Name and bridge provided?!\n\n var network_json = null;\n if (type == \"fixed\") {\n var leases = $('#leases option', this);\n var leases_obj=[];\n\n //for each specified lease we prepare the JSON object\n $.each(leases,function(){\n leases_obj.push({\"ip\": $(this).val() });\n });\n\n //and construct the final data for the request\n network_json = {\n \"vnet\" : {\n \"type\" : \"FIXED\",\n \"leases\" : leases_obj,\n \"bridge\" : bridge,\n \"name\" : name }};\n }\n else { //type ranged\n\n var network_addr = $('#net_address',this).val();\n var network_size = $('#net_size',this).val();\n if (!network_addr.length){\n notifyError(\"Please provide a network address\");\n return false;\n };\n\n //we form the object for the request\n network_json = {\n \"vnet\" : {\n \"type\" : \"RANGED\",\n \"bridge\" : bridge,\n \"network_size\" : network_size,\n \"network_address\" : network_addr,\n \"name\" : name }\n };\n };\n\n //Create the VNetwork.\n\n Sunstone.runAction(\"Network.create\",network_json);\n $create_vn_dialog.dialog('close');\n return false;\n });\n\n $('#create_vn_form_manual',dialog).submit(function(){\n var template=$('#template',this).val();\n var vnet_json = {vnet: {vnet_raw: template}};\n Sunstone.runAction(\"Network.create\",vnet_json);\n $create_vn_dialog.dialog('close');\n return false;\n });\n}", "title": "" }, { "docid": "19fb7b3b4c10b8cd348f507a2d46080a", "score": "0.58191264", "text": "function initCustomForms() {\n jcf.setOptions('Select', {\n maxVisibleItems: 5,\n });\n jcf.replaceAll();\n}", "title": "" }, { "docid": "bbdad44707c79597c0be07fdeb2d6c7d", "score": "0.5815428", "text": "function ew_AddOptDialogShow(oArg) {\r\n\tif (ewAddOptDialog && ewAddOptDialog.cfg.getProperty(\"visible\")) ewAddOptDialog.hide();\r\n\tvar f = {\r\n\t\tsuccess: function(o) {\r\n\t\t\tif (ewAddOptDialog) {\r\n\r\n\t\t\t\t// get the parent field value\r\n\t\t\t\tvar obj = ew_GetElements(o.argument.pf);\r\n\t\t\t\tvar ar = ew_GetOptValues(obj);\r\n\t\t\t\tvar cfg = { context: [o.argument.lnk, \"tl\", \"bl\"],\r\n\t\t\t\t\tbuttons: [ { text:EW_ADDOPT_BUTTON_SUBMIT_TEXT, handler:ew_DefaultHandleSubmit, isDefault:true },\r\n\t\t\t\t\t\t{ text:EW_BUTTON_CANCEL_TEXT, handler:ew_DefaultHandleCancel } ]\r\n\t\t\t\t};\r\n\t\t\t\tif (ewEnv.ua.ie && ewEnv.ua.ie >= 8)\r\n\t\t\t\t\tcfg[\"underlay\"] = \"none\";\r\n\t\t\t\tewAddOptDialog.cfg.applyConfig(cfg);\r\n\t\t\t\tewAddOptDialog.callback.argument = o.argument;\r\n\t\t\t\tif (ewAddOptDialog.header) ewAddOptDialog.header.style.width = \"auto\";\r\n\t\t\t\tif (ewAddOptDialog.body) ewAddOptDialog.body.style.width = \"auto\";\r\n\t\t\t\tif (ewAddOptDialog.footer) ewAddOptDialog.footer.style.width = \"auto\";\r\n\t\t\t\tewAddOptDialog.setBody(o.responseText);\r\n\t\t\t\tewAddOptDialog.setHeader(o.argument.hdr);\r\n\t\t\t\tewAddOptDialog.render();\r\n\t\t\t\tewAddOptDialog.registerForm(); // make sure the form is registered (otherwise, the form is not registered in the first time)\r\n\r\n\t\t\t\t// set the filter field value\r\n\t\t\t\tif (ar.length == 1 && o.argument.ff != \"\" && ewAddOptDialog.form && ewAddOptDialog.form.elements[o.argument.ff])\r\n\t\t\t\t\tew_SelectOpt(ewAddOptDialog.form.elements[o.argument.ff], ar);\r\n\t\t\t\tewAddOptDialog.show();\r\n\t\t\t\tew_ExecScript(o.responseText, o.argument.el);\r\n\t\t\t}\r\n\t\t},\r\n\t\tfailure: function(oResponse) {\r\n\t\t},\r\n\t\tscope: this,\r\n\t\targument: oArg\r\n\t}\r\n\tewConnect.asyncRequest(\"get\", oArg.url, f, null);\r\n}", "title": "" }, { "docid": "f6dbb728ccebcecd2264c4f7b06e676b", "score": "0.58122486", "text": "function createRegionCompareDropdownMenu() {\n compare_region_sel = createSelect();\n compare_region_sel.parent('compare-region-select');\n compare_region_sel.id('compareRegionSelection');\n compare_region_sel.hide();\n}", "title": "" }, { "docid": "e9053598958f2e49b736877e65b267ce", "score": "0.5790578", "text": "function addingSelectTeammembers() {\n $(\".js-icon-plus-admin\").on(\"click\", function () {\n $(\".select_teammembers\").last(\"div\").after(\n \"<div class='wrap-select select_teammembers'><select class='add_teammembers_second_select' name='frmClientID' required=''><option selected='selected' value=''>Choose teammember</option> </select><img class='arrow-select' src='img/arrow-select.png' alt='arrow-select'><img class='js-icon-minus-admin' src='img/icon-minus-admin.png' alt='add'></div>\"\n );\n })\n}", "title": "" }, { "docid": "0b03e8215e409aff2468c24290f12075", "score": "0.57807904", "text": "function add_var_to_display() {\n var $newly_selected_vals = $(\".voyage_config_all_list option:selected\");\n\n /* List currently selected */\n var cur_selected_text = []\n\n var $currently_selected = $(\"#configure_visibleAttributes option\");\n $currently_selected.each(function() {\n cur_selected_text.push($(this).val());\n });\n\n $newly_selected_vals.each(function() {\n /* Check if the current variable is already in the list*/\n if (cur_selected_text.length == 0 ||\n $.inArray($(this).val(), cur_selected_text) == -1) {\n $(\"#configure_visibleAttributes option:last\").parent().append($(this));\n }\n });\n}", "title": "" }, { "docid": "79d7d6ce748d0c4f3787b917a24cea8b", "score": "0.5752406", "text": "function changeCommand(select) {\n\t//newobj input box\n\tvar value = select.value;\n\tif (value == \"modify\") {\n\t\t$(\"#newobjInput\").show();\n\t}\n\telse {\n\t\t$(\"#newobjInput\").hide();\n\t}\n\t\n\t//limit input box\n\tif (value == \"findAll\") {\n\t\t$(\"#limitLabel\").show();\n\t\t$(\"#pageSetLabel\").show();\n\t\t$(\"#fieldsAndHints\").show();\n\t}\n\telse {\n\t\t$(\"#limitLabel\").hide();\n\t\t$(\"#pageSetLabel\").hide();\n\t\t$(\"#fieldsAndHints\").hide();\n\t}\n}", "title": "" }, { "docid": "3f7dcae20b28b40b5d8c1c7fc2a0f449", "score": "0.5746435", "text": "function ew_InitAddOptDialog() {\n\tif (!document.getElementById(\"ewAddOptDialog\"))\n\t\treturn;\n\tewAddOptDialog = new ewWidget.Dialog(\"ewAddOptDialog\", { visible: false, constraintoviewport: true, hideaftersubmit: false, zIndex: 9000 }); \n\tewAddOptDialog.callback = {success: ew_AddOptSuccess, failure: ew_AddOptFailure, upload: ew_AddOptSuccess,\n\t\tcustomevents: {\"onStart\": ew_AddOptStart}};\n\tewAddOptDialog.render();\n}", "title": "" }, { "docid": "9313080c7a9b0ba20f4b21aca81e04a8", "score": "0.5729678", "text": "function modalNewOnShown(dialogRef) {\r\n\t\tvar modalBody = dialogRef.getModalBody(),\r\n\t\t\telements = modalBody.find('input[data-field], select[data-field]');\r\n\r\n\t\t// Clear form values\r\n\t\t$.each(elements, function(idx, elem) { $(elem).val(''); });\r\n\r\n\t\t// Create Role field\r\n\t\tdestroyRoleField();\r\n\t\tnewRoleSelectField({\r\n\t\t\tdefaultId: '',\r\n\t\t\tdefaultVal: '',\r\n\t\t\tJSONUrl: WS_LIST_ROLES,\r\n\t\t\tJSONData: 'report-list',\r\n\t\t\tcontainer: $('#role-box')\r\n\t\t});\r\n\t}", "title": "" }, { "docid": "ac8f2da8232ca8a675f3c3baa93cc296", "score": "0.5719204", "text": "function viewOption() {\n var args = { target: [ { id: \"frmOption\", focus: true } ] };\n gw_com_module.objToggle(args);\n}", "title": "" }, { "docid": "a11fa262c763d4a24da0bf30c4a8832e", "score": "0.5718024", "text": "function AddSelect() {\n //var div = document.getElementById(\"SelectDiv\");\n var select2 = document.getElementById(\"Select 2\");\n var select3 = document.getElementById(\"Select 3\");\n if (select2.hidden) {\n select2.hidden = false;\n return;\n }\n else if (select3.hidden) {\n select3.hidden = false;\n return;\n }\n\n}", "title": "" }, { "docid": "4ac32b0c92f579fa878041f2827cffcb", "score": "0.570137", "text": "function initCustomForms() {\n jcf.setOptions('Select', {\n wrapNative: false,\n maxVisibleItems: 4\n });\n jcf.replaceAll();\n}", "title": "" }, { "docid": "d72e0c6b06ee8bf69c64e81a65a62cb2", "score": "0.5694427", "text": "function autoSelectLocation(new_id) {\r\n\t\r\n\t\r\n\t\r\n\tvar selectLoc = document.getElementById(\"loc_select\");\r\n\t\t\r\n\tfor(i=0; i<selectLoc.options.length; i++) {\r\n\t\t\r\n\t\tif(selectLoc.options[i].value == new_id) {\r\n\t\t\tselectLoc.options[i].selected = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\t\r\n\tvar divLocProcess = document.getElementById(\"location_process\");\r\n\tdivLocProcess.style.display = \"none\";\r\n\t\r\n\tvar divLocForm = document.getElementById(\"new_location\");\r\n\tdivLocForm.style.display = \"none\";\r\n\t\r\n\tvar divLocButtons = document.getElementById(\"location_buttons\");\r\n\tdivLocButtons.style.display = \"block\";\r\n\t\r\n\tvar divLocTitleError = document.getElementById(\"location_title_error\");\r\n\t\tdivLocTitleError.style.display = \"none\";\r\n\t\r\n\tvar divLocMessage = document.getElementById(\"location_added_message\");\r\n\t\t\t\r\n\tdivLocMessage.style.display = \"block\";\r\n\t\r\n\tshowLocationDetails(true);\r\n\t\r\n}", "title": "" }, { "docid": "626b82cf88a7463da5e8697846849f74", "score": "0.56921864", "text": "function addCPselect() {\r\n /** @function addCPselect\r\n * @memberof module:GUI Construction\r\n * @desc Adds the control point selector UI for the current fiber.\r\n <br>Built in a separate function so it may be refreshed independently.\r\n */\r\n\r\n var editGUI = document.getElementById('editGUI');\r\n\r\n // Control Points edition table creation.\r\n var table = document.createElement(\"TABLE\");\r\n table.id = 'cpTable';\r\n // This creates a of the former CP to be used for the Undo Button.\r\n phantom.fibers.source[guiStatus.editingFiber].controlPoints.slice(0);\r\n editGUI.appendChild(table);\r\n // This table contains two cells: left for CP select list and right for edit field (when editing)\r\n var tr = document.createElement(\"TR\");\r\n table.appendChild(tr);\r\n var td1 = document.createElement(\"TD\");\r\n tr.appendChild(td1);\r\n var td2 = document.createElement(\"TD\");\r\n tr.appendChild(td2);\r\n td2.id = \"cpEditor\";\r\n\r\n // CONTROL POINTS SELECTION LIST\r\n var cplist = document.createElement(\"UL\");\r\n cplist.className = 'enabledList';\r\n var fiberindex = guiStatus.editingFiber;\r\n // cplist.size = phantom.fibers.source[fiberindex].controlPoints.length + 1;\r\n cplist.id = 'cpSelector';\r\n cplist.style.width = '60px'\r\n cplist.onmouseenter = function() {\r\n if (cplist.childNodes[0].className == 'optionUnselected') {\r\n scene.removeCPHighlight();\r\n cpEdit(guiStatus.editingCP);\r\n } else {\r\n scene.removeCPHighlight(true);\r\n }\r\n };\r\n cplist.onmouseleave = function() {\r\n guiStatus.retrieve();\r\n }\r\n\r\n // *n* option\r\n var option = document.createElement(\"LI\");\r\n option.innerHTML = '*n*'\r\n option.title = \"Exit edit (Esc)\"\r\n option.className = 'optionSelected';\r\n option.onmouseenter = function() {\r\n optionOnMouseOver(this);\r\n }\r\n option.onmouseleave = function() {\r\n optionOnMouseLeave(this);\r\n }\r\n option.onclick = function() {\r\n exitCPedit();\r\n optionSelect(this);\r\n };\r\n cplist.appendChild(option);\r\n\r\n // Each CP option\r\n phantom.fibers.source[fiberindex].controlPoints.forEach(\r\n function(point, index) {\r\n var option = document.createElement(\"LI\");\r\n option.innerHTML = index.toString();\r\n option.className = 'optionUnselected';\r\n\r\n option.onmouseenter = function() {\r\n phantom.cpHighlight(fiberindex, index, 'blue');\r\n optionOnMouseOver(this);\r\n };\r\n option.onmouseleave = function() {\r\n optionOnMouseLeave(this);\r\n };\r\n option.onclick = function() {\r\n cpSelectClick(fiberindex, index);\r\n optionSelect(this);\r\n };\r\n\r\n cplist.appendChild(option);\r\n }\r\n );\r\n td1.appendChild(cplist);\r\n\r\n resizeGUI();\r\n}", "title": "" }, { "docid": "cf6dd9bfbfc3c8003e7c0e985d860cd1", "score": "0.5686639", "text": "function HDMI_Selected_form(Connector_count){\r\n\r\n var Connector_Type_add_remove_control_id=\"#Connector_Type_add_remove_control_\"+Connector_count;\r\n $(Connector_Type_add_remove_control_id).append('<div class=\"row\" style=\"display: flex;align-items: center;justify-content: center;background-color: #8accea;width: 80%;\"><div class=\"col-md-12\" id=\"Connector_HDMI_Type_header\">Connector Type:HDMI</div><div class=\"col-md-6\" style=\"background-color: #8accea;\"><label for=\"HDMI_Select_I2C_Line_'+Connector_count+'\">I2C Line:</label></div><div class=\"col-md-6\" style=\"background-color: #8accea; margin-bottom: 2%;margin-top: 2%;\"><select class=\"form-control\" name=\"HDMI_Select_I2C_Line_'+Connector_count+'\" id=\"HDMI_Select_I2C_Line_'+Connector_count+'\" onchange=\"onTime_check_I2C_Line(this)\"required=\"\"><option value=\"\">Select...</option><option value=\"DDC1_AUX1_ID\">DDC1CLK/DDC1DATA</option><option value=\"DDC2_AUX2_ID\">DDC2CLK/DDC2DATA</option><option value=\"DDC3_AUX3_ID\">DDCCLK_AUX3P/DDCDATA_AUX3N</option><option value=\"DDC4_AUX4_ID\">DDCCLK_AUX4P/DDCDATA_AUX4N</option><option value=\"DDC5_AUX5_ID\">DDCCLK_AUX5P/DDCDATA_AUX5N</option><option value=\"DDC7_AUX7_ID\">DDCCLK_AUX6P/DDCDATA_AUX6N</option><option value=\"SCL_SDA_ID\">SCL/SDA</option><option value=\"DDC6_ID\">DDCVGACLK/DDCVGADATA</option></select></div><div class=\"col-md-6\" style=\"background-color: #8accea;\"><label for=\"HDMI_Select_HPD_ID_'+Connector_count+'\">HPD ID:</label></div><div class=\"col-md-6\" style=\"background-color: #8accea; margin-bottom: 2%;margin-top: 2%;\"><select class=\"form-control\" name=\"HDMI_Select_HPD_ID_'+Connector_count+'\" id=\"HDMI_Select_HPD_ID_'+Connector_count+'\" onchange=\"onTime_check_HPD_ID(this)\"required=\"\"><option value=\"\">Select...</option><option value=\"NO_HPD_ID\">No HPD</option><option value=\"HPD1_ID\">HPD1</option><option value=\"HPD2_ID\">GPIO_14_HPD2</option><option value=\"HPD3_ID\">GPIO_18_HPD3</option><option value=\"HPD4_ID\">GENERICE_HPD4</option><option value=\"HPD5_ID\">GENERICF_HPD5</option><option value=\"HPD6_ID\">GENERICG_HPD6</option></select></div></div>');\r\n \r\n }", "title": "" }, { "docid": "77fb65c16925c3c842e33c154b32b861", "score": "0.5679143", "text": "function viewOption(param) {\n\n var args = { target: [{ id: \"frmOption\", focus: true }] };\n gw_com_module.objToggle(args);\n\n}", "title": "" }, { "docid": "77fb65c16925c3c842e33c154b32b861", "score": "0.5679143", "text": "function viewOption(param) {\n\n var args = { target: [{ id: \"frmOption\", focus: true }] };\n gw_com_module.objToggle(args);\n\n}", "title": "" }, { "docid": "77fb65c16925c3c842e33c154b32b861", "score": "0.5679143", "text": "function viewOption(param) {\n\n var args = { target: [{ id: \"frmOption\", focus: true }] };\n gw_com_module.objToggle(args);\n\n}", "title": "" }, { "docid": "2989dd03108920ca429c52cf42b637ba", "score": "0.56770945", "text": "function viewOption(param) {\n\n var args = { target: [{ id: \"frmOption1\", focus: true }] };\n gw_com_module.objToggle(args);\n gw_com_api.hide(\"frmOption2\");\n gw_com_api.hide(\"frmOption4\");\n\n}", "title": "" }, { "docid": "cb6294c7df93d1a07bbf9f1501f60184", "score": "0.56725675", "text": "function showOptionsDialog(){\n\t\t$.options.show();\n\t}", "title": "" }, { "docid": "bad6300273599d9f1b9ead393ffa6e2f", "score": "0.5666542", "text": "function addNewSelect(divID,selectID,msg,counter) {\n\n counter = counter || 0;\n var newSpan = 'span'+divID+counter;\n var newText = 'text'+selectID+counter;\n\n // Add new option to DIV with handlers\n $('#'+divID).append('<span class=\"multiAdd\" id=\"'+newSpan+'\">'+msg+'</span>');\n $('#'+divID).append('<input type=\"text\" class=\"magicBox\" name=\"'+newText+'\" id=\"'+newText+'\">');\n $('#'+newText).hide();\n $('#'+newSpan).click(function() {\n $(this).off('click');\n $(this).hide();\n $('#'+newText).show().focus();\n });\n $('#'+newText).blur(function() {\n var newValue = $('#'+newText).val();\n $('#'+newSpan).html(newValue);\n $('#'+selectID).append('<option selected value=\"'+newValue+'\">'+newValue+'</option>');\n $('#'+newText).hide();\n $('#'+newSpan).show();\n addNewSelect(divID,selectID,msg,++counter);\n });\n\n}", "title": "" }, { "docid": "4fcf267f35b9001d59b27008f1da5fa6", "score": "0.5662533", "text": "function fixSelectBox() {\r\n\r\n if (Qva.Mgr.mySelect == undefined) {\r\n Qva.Mgr.mySelect = function (owner, elem, name, prefix) {\r\n if (!Qva.MgrSplit(this, name, prefix)) return;\r\n owner.AddManager(this);\r\n this.Element = elem;\r\n this.ByValue = true;\r\n\r\n elem.binderid = owner.binderid;\r\n elem.Name = this.Name;\r\n\r\n elem.onchange = Qva.Mgr.mySelect.OnChange;\r\n elem.onclick = Qva.CancelBubble;\r\n }\r\n Qva.Mgr.mySelect.OnChange = function () {\r\n var binder = Qva.GetBinder(this.binderid);\r\n if (!binder.Enabled) return;\r\n if (this.selectedIndex < 0) return;\r\n var opt = this.options[this.selectedIndex];\r\n binder.Set(this.Name, 'text', opt.value, true);\r\n }\r\n Qva.Mgr.mySelect.prototype.Paint = function (mode, node) {\r\n this.Touched = true;\r\n var element = this.Element;\r\n var currentValue = node.getAttribute(\"value\");\r\n if (currentValue == null) currentValue = \"\";\r\n var optlen = element.options.length;\r\n element.disabled = mode != 'e';\r\n //element.value = currentValue;\r\n for (var ix = 0; ix < optlen; ++ix) {\r\n if (element.options[ix].value === currentValue) {\r\n element.selectedIndex = ix;\r\n }\r\n }\r\n element.style.display = Qva.MgrGetDisplayFromMode(this, mode);\r\n\r\n }\r\n }\r\n\r\n\r\n }", "title": "" }, { "docid": "494bbc9cc7e3824dfb762d595d2d640d", "score": "0.5657377", "text": "function addStdDesc(){\n Ab.view.View.selectValue('formPanelSelVal_form', getMessage(\"problemDescCodes\"), ['dummyField'], 'pd', ['pd.pd_description'], ['pd.pd_id', 'pd.pd_description'], \"\", \"afterSelectStdDesc\");\n}", "title": "" }, { "docid": "c8199d6fa735e94e6f600f909a22a25f", "score": "0.5648564", "text": "function add_text_box_select_element( elementName, second_label )\n{\n // Get a reference to the appropriate division\n var id = elementName.replace(\"_\",\"\");\n var thisDiv = document.getElementById( elementName + \"_div\");\n \n // Add a <br> line here\n var newLine = document.createElement('br'); \n thisDiv.appendChild(newLine);\n \n // Add a new text box\n var newInput = document.createElement('input'); \n newInput.name = id + \"_textnew\" + other_title_new_index;\n newInput.type = \"text\"; \n newInput.id = id + \"_textnew\" + other_title_new_index; \n newInput.className= elementName + \"_input sbk_Focusable\";\n thisDiv.appendChild(newInput);\n\n // Add a new span for the 'second_label' if there is one\n if (second_label.length > 0) {\n var newSecondLabelSpan = document.createElement('span');\n newSecondLabelSpan.className = \"metadata_sublabel\";\n newSecondLabelSpan.innerHTML = \" \" + second_label + \": \";\n thisDiv.appendChild(newSecondLabelSpan);\n }\n \n // Add a new combo box\n var newSelect = document.createElement('select'); \n newSelect.name = id + \"_selectnew\" + other_title_new_index;\n newSelect.id = id + \"_selectnew\" + other_title_new_index; \n newSelect.className= elementName + \"_select\";\n thisDiv.appendChild(newSelect); \n\n // Copy all the options over\n var templateSelect = document.getElementById(id + '_select1');\n if ( templateSelect != null )\n {\n for( var z=0; z < templateSelect.length ; z++ )\n {\n var curOp = templateSelect[z].cloneNode(true);\n newSelect.appendChild(curOp);\n }\n } \n other_title_new_index++; \n \n // Return false to prevent a return trip to the server\n return false; \n}", "title": "" }, { "docid": "1274cd14b2438fa8115741845fdc62e7", "score": "0.5647291", "text": "function update_launch_volume_displayed_fields (field) {\n var $this = $(field),\n volume_opt = $this.val(),\n $extra_fields = $(\"#id_delete_on_terminate, #id_device_name\");\n\n $this.find(\"option\").each(function () {\n if (this.value != volume_opt) {\n $(\"#id_\" + this.value).closest(\".control-group\").hide();\n } else {\n $(\"#id_\" + this.value).closest(\".control-group\").show();\n }\n });\n\n if (volume_opt === \"volume_id\" || volume_opt === \"volume_snapshot_id\") {\n $extra_fields.closest(\".control-group\").show();\n } else {\n $extra_fields.closest(\".control-group\").hide();\n }\n }", "title": "" }, { "docid": "d97cbd6f0da4f59615afa4aa400bc838", "score": "0.5644896", "text": "function ew_AddOptDialogHide() {\n\tif ($dlg = ewAddOptDialog) {\t\t\n\t\tew_RemoveScript($dlg.data(\"args\").el);\n\t\t$dlg.removeData(\"args\").find(\".modal-body form\").data(\"form\").DestroyEditor();\n\t\t$dlg.find(\".modal-body\").html(\"\");\n\t\t$dlg.find(\".modal-footer .btn-primary\").unbind();\n\t}\n}", "title": "" }, { "docid": "d879c7dbaddf5a5084d41fa1fa6c114c", "score": "0.5641264", "text": "function limpaComponenteColegiado(){ \n $('select[id=\"SiglaColegiado\"]').find('option').remove().end().append('<option value=\"\">-- Selecione --</option>'); \n\t}", "title": "" }, { "docid": "7258d65a13ae437aba49502c9cb39da1", "score": "0.5632355", "text": "function f(str) { // добавить элемент в конец\n\n let selectedOption = mySelectId.options[mySelectId.selectedIndex];\n // 2)\n let newOption = new Option(str,str);\n mySelectId.append(newOption);\n\n // 3)\n newOption.selected = true;\n nameid.value = '';\n\n}", "title": "" }, { "docid": "74f6a0d9b26bafd4b59ce89168a5a624", "score": "0.5631056", "text": "function nointent() {\r\n var no=document.getElementById(\"noIntent\");\r\n no.style=\"background-color:#5a17ee; color: white; border-radius:30px\";\r\n var yes=document.getElementById(\"yesIntent\");\r\n yes.style=\"background-color:white; border-radius:30px; border: 2px solid #5a17ee; color: #5a17ee\";\r\n $(\".noDesc\").show();\r\n $(\".intentOption\").show();\r\n $(\".yesDesc\").hide();\r\n $('select').formSelect();\r\n}", "title": "" }, { "docid": "892d815fc5bb352a2090b0f49bb6fca1", "score": "0.56306815", "text": "function fSelCombo(pCmb, pRec, pIdx){\n\tgaHidden[pCmb.hiddenName] = pCmb.getValue();\n }", "title": "" }, { "docid": "82fc8daf0a65e25fb3d722f593c9b131", "score": "0.56291604", "text": "function viewOption(param) {\n\n gw_com_api.show(\"frmOption\");\n\n}", "title": "" }, { "docid": "82fc8daf0a65e25fb3d722f593c9b131", "score": "0.56291604", "text": "function viewOption(param) {\n\n gw_com_api.show(\"frmOption\");\n\n}", "title": "" }, { "docid": "f3cfd1095503fb41d7eb4d3188381ad6", "score": "0.5619181", "text": "function addListByFiller(){\r\n if($(\"#visible-list-select\").children().length <= 2 && $(\"#list-select-not-selected\").children().length == 0){\r\n $(\"#list-1\").show();\r\n $(\"#list-1\").addClass(\"selected\");\r\n }else{\r\n $(\"#list-1\").hide();\r\n $(\"#list-1\").removeClass(\"selected\");\r\n if($(\"#visible-list-select\").children().length <= 2){\r\n $(\"#list-select-not-selected > .list-select-option\").first().prependTo(\"#visible-list-select\").addClass(\"selected\");\r\n }\r\n }\r\n }", "title": "" }, { "docid": "11ae36ce476f43d297b1a408a0a1f416", "score": "0.5618673", "text": "function buildUI(select) {\n select.selectWrap = document.createElement('div');\n select.selectWrap.classList.add('selectWrap');\n select.selectWrap.style.width = select.options.width;\n\n select.selectMenuWrap = document.createElement('div');\n select.selectMenuWrap.classList.add('selectMenuWrap');\n select.wrapper.append(select.selectWrap);\n select.wrapper.append(select.selectMenuWrap);\n\n select.select = document.createElement('div');\n select.select.classList.add('select');\n select.input.setAttribute('hidden', 'true');\n select.input.setAttribute('id', select.options.inputId);\n select.input.setAttribute('name', select.options.inputId);\n select.input.setAttribute('value', select.ogList.querySelector(\"ul > li.selected\").getAttribute('data-id'));\n\n select.selectSpan = document.createElement('span');\n select.selectSpan.innerHTML = select.ogList.querySelector(\"ul > li.selected\").getAttribute('data-displayString');\n\n select.selectChevron = document.createElement('i');\n select.selectChevron.classList.add('fas', 'fa-chevron-down');\n\n select.select.append(select.selectSpan);\n select.select.append(select.selectChevron);\n\n select.selectWrap.append(select.select);\n select.selectWrap.append(select.input);\n\n select.selectMenu = select.ogList.cloneNode(true);\n select.selectMenu.classList.add('selectMenu', 'collapsed');\n select.selectMenu.style.minWidth = select.options.width;\n \n select.ogList.setAttribute('hidden' , 'true');\n\n select.selectMenuWrap.append(select.selectMenu);\n\n select.wrapper.classList.add('ez-select-wrapper', select.options.wrapperClass);\n select.ogList.parentNode.insertBefore(select.wrapper , select.ogList);\n select.ogList.remove();\n }", "title": "" }, { "docid": "114661b0f4a730872eb612e872e65a91", "score": "0.56055725", "text": "function add_options() {\n\t$(\".options\").append(\"<input class='new_poll' required ng-modle='polls' type='text' placeholder='New Option'>\");\n}", "title": "" }, { "docid": "ef8a6f7f33671a06a17d62933913049c", "score": "0.56034344", "text": "function set_list_for_select(list) {\n if (list.length) {\n var div = document.querySelector(\"#select\");\n var select = document.createElement('select');\n select.setAttribute('id', 'select_value');\n select.style.width= '412px';\n for (var i = 0; i < list.length; i++) {\n var option = document.createElement('option');\n option.setAttribute('value', list[i].PasswordListID );\n option.appendChild( document.createTextNode( list[i].TreePath ) );\n select.appendChild(option);\n };\n //div.innerHTML = select.outerHTML;\n\t\t\n\t\tdiv.appendChild(select);\n\t\t\n\t\t\n }\n else {\n browser.runtime.sendMessage({'name': 'on_popup_show'}, function(response) {});\n window.close();\n }\n}", "title": "" }, { "docid": "1f9790407e4202794f955e29ee3d8ae9", "score": "0.5599651", "text": "function openAddPortletDialog() {\n // make changes to a copy so we don't affect the master list\n var pagePortlets = angular.copy(availablePortlets);\n\n // mark portlets that have already been assigned to this console as \"assigned\"\n _.each(vm.editedPage.portlets, function(portlet) {\n pagePortlets[portlet.entryName].assigned = true;\n });\n\n ModalDialog.addPortlet({\n title: 'Add Portlet',\n portlets: _.toArray(pagePortlets),\n selectedPage: vm.editedPage,\n controller: 'AddPortletController',\n }).result.then(addSelectedPortlets);\n }", "title": "" }, { "docid": "c4c9b7585ca2d332a881b522e98c90b4", "score": "0.5580113", "text": "function ew_AddOptDialogHide() {\n\tif ($dlg = ewAddOptDialog) {\n\t\tew_RemoveScript($dlg.data(\"args\").el);\n\t\tvar frm = $dlg.removeData(\"args\").find(\".modal-body form\").data(\"form\");\n\t\tif (frm)\n\t\t\tfrm.DestroyEditor();\n\t\t$dlg.find(\".modal-body\").html(\"\");\n\t\t$dlg.find(\".modal-footer .btn-primary\").unbind();\n\t}\n}", "title": "" }, { "docid": "c6e6795de5f34527704f1bb4a843fe54", "score": "0.55750465", "text": "function mailRoomSelectFixed($this) {\n var key = $this.attr('data-step'), child = $this.prev().val();\n child = child.split(\",\");\n child = child[1];\n var optionData = [];\n option = '<option>请选择</option>';\n for(var i in region_data[key-1][child]) {\n optionData = region_data[key-1][child][i].split(\":\");\n optionValue = (typeof optionData[3] !== 'undefined') ? optionData[1] +','+ optionData[3] : optionData[1] ;\n option += '<option value=\"'+ optionValue +'\">'+ optionData[0] +'</option>';\n }// end for\n\n $this.empty().append(option).show();\n mailRoomSelectClearFun($this);\n }", "title": "" }, { "docid": "b4c89d2198a869c2483eb2e39c68fffc", "score": "0.5565306", "text": "function initCustomForms() {\n jcf.setOptions(\"Select\", {\n wrapNative: false,\n wrapNativeOnMobile: false,\n });\n jcf.replaceAll();\n jcf.destroy(\".select-museum-name\");\n}", "title": "" }, { "docid": "bd909951fdb802041896040949159589", "score": "0.5564569", "text": "function limpaAutoridadesFilhas(){\t\t\n $('select[id=\"AutoridadesFilhas\"]').hide();\n $('#trComissaoEspecial').hide();\n\t\t$('select[id=\"AutoridadesFilhas\"]').find('option').remove().end().append('<option value=\"\">-- Selecione --</option>');\n\t}", "title": "" }, { "docid": "09975f82d6f5a77c3c8bf96dbf47e9b0", "score": "0.55608386", "text": "function addOption(){\n optionValue = $('#add').val();\n $('#entreprise').append('<option>' +optionValue+ '</option>');\n}", "title": "" }, { "docid": "9c02c144a50700a6d95149c7508e2448", "score": "0.5560522", "text": "function showEventForm() {\n console.log(\"Showing event form..\");\n var courseNumSelect = $('#eventFormCourseNum');\n courseNumSelect.empty();\n\n for (var i = 0; i < window.listedCourses.length; i++) {\n var courseNum = window.listedCourses[i].num;\n var newOption = $('<option>').attr(\"value\", courseNum);\n newOption.text(courseNum);\n courseNumSelect.append(newOption);\n }\n\n /* Open it */\n $('#eventsLink').click();\n}", "title": "" }, { "docid": "7dcfedd213a2882cd181ed0cdaa70eda", "score": "0.5557605", "text": "function hideMedPlanCreateWindow(){\n jq(\"#createPlanWindow\").hide();\n jq(\"#listOfDrugs\").val(\"\");\n jq(\"#planId\").val(\"\"); \n jq(\"#adminPlan\").val(\"\");\n jq(\"#adminDrug\").val(\"\");\n jq(\"#adminRoute\").val(\"\");\n jq(\"#adminDose\").val(\"\");\n jq(\"#adminDoseUnits\").val(\"\");\n jq(\"#adminQuantity\").val(\"\");\n jq(\"#adminQuantityUnits\").val(\"\");\n jq(\"#adminDuration\").val(\"\");\n jq(\"#adminDurationUnits\").val(\"\");\n jq(\"#adminFrequency\").val(\"\");\n jq(\"#adminDrug\").prop(\"readonly\", false);\n jq(\"#planSaveButton\").prop(\"disabled\", true);\n \n jq('#createPlanForm input, #createPlanForm select').each(function(){\n this.style.borderColor = \"\";\n });\n \n clearHighlights();\n}", "title": "" }, { "docid": "917f0f353fae26a0d4ca0b5358d78f09", "score": "0.5552422", "text": "function add_client(client_name,client_id,selected) {\n var this_form = document.forms[0];\n var new_client = new Option(client_name, client_id, false, selected);\n var clients = this_form.SCREENING_COMPANY_ID;\n var index = clients.options.length;\n for (var i = index; i > 0; i--) {\n if (i == 1) {\n clients.options[i] = new_client;\n break;\n } else if (clients.options[i-1].text.toUpperCase() >= client_name.toUpperCase()) {\n var temp_client = new Option(clients.options[i-1].text,\n clients.options[i-1].value,\n false,\n clients.options[i-1].selected);\n clients.options[i] = temp_client;\n } else {\n clients.options[i] = new_client;\n break;\n }\n }\n}", "title": "" }, { "docid": "f29d23ece7b13522ed91fef128e0fda2", "score": "0.5550234", "text": "function creaOption() {\n $('#selectQuantita').change();\n var option = \"\";\n $.each(new Array(20), function(i) {\n option += '<option value=\"' + ((i + 1) * 5) + '\">' + ((i + 1) * 5) + '</option>';\n });\n $(\"#selectQuantita\").append(option);\n $(\"#selectQuantita\").val(elementiMostrati);\n quantitaElementiMostrati();\n}", "title": "" }, { "docid": "aaee999c908bad7149f856d81cf5bb27", "score": "0.5549203", "text": "function add_option(cb, num, field) {\n var el = document.createElement(\"option\");\n el.textContent = field;\n el.value = num;\n cb.appendChild(el);\n\n //// jquery way\n // cb_prem_nouns.append(\n // $('<option></option>').val(num).html(text)\n // );\n\n}", "title": "" }, { "docid": "3a4b1cfa0b09f3e868b6ba6705720dc7", "score": "0.55403507", "text": "function addToUsers(){\n var AvlUsers = document.getElementById('AvlUsers');\n var elSel = document.getElementById('MYS');\n if(elSel.length >= 6){\n alert('You can only save up to 6 searches total.\\nIf you wish to replace a saved search, remove\\na search and then add a replacement.');\n return false; \n }\n var i = getSelected(AvlUsers); \n if(i== -1) return false;\n var elOptNew = document.createElement('option');\n elOptNew.text = AvlUsers.options[i].text;\n elOptNew.value = AvlUsers.options[i].value;\n try {\n elSel.add(elOptNew, null); // standards compliant; doesn't work in IE\n }\n catch(ex) {\n elSel.add(elOptNew); // IE only\n } \n AvlUsers.remove(i);\n return false;\n}", "title": "" }, { "docid": "1d24c578a5c7de68a634dda644a1ba02", "score": "0.55347985", "text": "function limpaLocalidades(){\t\t\t\t\n $('select[id=\"Localidades\"]').find('option').remove().end().append('<option value=\"\">-- Selecione --</option>'); \n\t}", "title": "" }, { "docid": "fca1ad7d3bbb74ba3957a19099c883dc", "score": "0.5530708", "text": "function showOptns() { //the advanced options dialog\r\n $('#controlWrap').append(options);\r\n options.slideUp(0).slideDown(300).css({\r\n top: controlWrap.offsetHeight,\r\n width: controlWrap.offsetWidth -(isChrome?7.5:8.5) //chrome and firefox has slightly different measurments.\r\n });\r\n $(this).text('[less]');\r\n moreOptns.unbind('click');\r\n moreOptns.click(hideOptns);\r\n }", "title": "" }, { "docid": "9446a691d268dc737c6956202de9be2c", "score": "0.5530371", "text": "function optionsPreview() {\n\n let $combox = $(\"#comboBoxPreview\").empty();\n\n\n let cdatagen = datagen[currentDataGen];\n if(!(cdatagen.getColumnsNames()\n .indexOf(selectColumnPreview) >= 0)) {\n selectColumnPreview = cdatagen.columns[0].name;\n }\n for(let col of cdatagen.columns) {\n if(col.display)\n $combox.append($('<option>', {value:col.name, text:col.name}));\n }\n $combox.val(selectColumnPreview);\n}", "title": "" }, { "docid": "2d95c94f8b5c41e6ffca9f46511983a4", "score": "0.55223644", "text": "function seleccionar() {\n var e = new Option(\"SELECCIONAR\", 0);\n\n $(\"#select_especialidad\").empty();\n $(\"#select_especialidad\").append(e);\n $(\"#select_especialidad\").val(0);\n}", "title": "" }, { "docid": "005c246340046459636fb217511e3ac9", "score": "0.55161905", "text": "function shd_attach_select(oOptions)\n{\n\tshd_attach_select.prototype.opts = oOptions;\n\tshd_attach_select.prototype.count = 0;\n\tshd_attach_select.prototype.id = 0;\n\tshd_attach_select.prototype.max = (oOptions.max) ? oOptions.max : -1;\n\tshd_attach_select.prototype.addElement(document.getElementById(shd_attach_select.prototype.opts.file_item));\n}", "title": "" }, { "docid": "a29258b72ee8a622f27f185934794e7e", "score": "0.55158925", "text": "function __OL_activateAddButton(){\r\n\tvar frm = get_form();\r\n\tvar selected=0;\r\n\tvar len = frm.categorylistentries.options.length\r\n\tfor (var i=0; i<len ; i++){\r\n\t\tif (frm.categorylistentries.options[i].selected){\r\n\t\t\tselected++;\r\n\t\t}\r\n\t}\r\n\tif (selected==0){\r\n\t\tfrm.addSelectedButton.disabled=true;\r\n\t} else {\r\n\t\tfrm.addSelectedButton.disabled=false;\r\n\t}\r\n}", "title": "" }, { "docid": "5fc688161437d5db23a241b4ead3b13b", "score": "0.55150896", "text": "function addOption(extDiv,selectbox,data,placeholder)\n{ \n\tvar arr = [];\n\tfor (var prop in data) {\n\t\tarr.push({'id' : prop,'text' : data[prop]});\n\t}\n\tif(arr.length > 0) \n\t{\n\t\textDiv.show();\n\t\tselectbox.empty();\n\t\tselectbox.append(\n\t\t\t\t$('<option></option>').val(\"\").html(\"\")\n\t\t\t);\n\t\t$.each(data, function(val, text) {\n\t\t\tselectbox.append(\n\t\t\t\t$('<option></option>').val(val).html(text)\n\t\t\t);\n\t\t});\n\n\t\tselectbox.select2().trigger('change');\n\t\t$input = selectbox;\n\t\tif((placeholder != 'undefined') || (placeholder !=null) ) {\n\t\t\t$input.attr(\"data-placeholder\", placeholder);\n\t\t}else{\n\t\t\t$input.attr(\"data-placeholder\", \" \");\n\t\t}\n\t\tvar select2 = $input.data(\"select2\");\n\t\tselect2.setPlaceholder();\n\t}else {\n\t\textDiv.hide();\n\t\tselectbox.empty();\n\t\tselectbox.select2().trigger('change');\n\t}\n}", "title": "" }, { "docid": "dbff37daf24e22b3c1b21e2cb2fba68c", "score": "0.5512352", "text": "function limpaTipoDocumento(){\t\t\n\t\t$('select[id=\"TiposDocumento\"]').find('option').remove().end().append('<option value=\"\">-- Selecione --</option>');\n\t}", "title": "" }, { "docid": "1a8e8be8ceded2311e7f7ddd5df90193", "score": "0.5493941", "text": "function extendSelect(_) {\n\t\tif (_.array !==undefined && _.array.length>0) {\n\t\t\t//var group = jQuery('<optgroup label=\"'+_.group+'\"></optgroup');\n\t\t\tfor (var i in _.array ) {\n\t\t\t\t\tif(!_.array.hasOwnProperty(i)) continue;\n\t\t\t\t\tvar o = _.sanitize ? new Option(RVS.F.sanitize_input(RVS.F.capitalise(_.array[i])),_.array[i],false,_.old===_.array[i]) : new Option(RVS.F.capitalise(_.array[i]),_.array[i],false,_.old===_.array[i]);\n\t\t\t\t\to.className=\"dynamicadded\";\n\t\t\t\t\t_.select.append(o);\n\t\t\t}\n\t\t\t//_.select.append(group);\n\t\t}\n\t}", "title": "" }, { "docid": "70a237f450cd06f3f8d89a42a8910035", "score": "0.549045", "text": "function newBPSelected() {\n var bpName = $(\"#BP_Selector :selected\").text();\n var newBPVal = $( \"#BP_Selector option:selected\" ).val();\n if (newBPVal && newBPVal != \"None\") {\n var bpName = $(\"#BP_Selector :selected\").text();\n $(field_BP_Name).val(bpName);\n\n var newIDs = newBPVal.split(\",\");\n\n var bpNumber = newIDs[0];\n if (bpNumber) {bpNumber = bpNumber.trim();}\n $(field_BP_Number).val(bpNumber);\n\n var workspaceID = newIDs[1];\n if (workspaceID) {workspaceID = workspaceID.trim();}\n $(field_BP_Workspace_ID).val(workspaceID);\n\n loadWorkspacePath();\n $(\"#viewAttach\").prop('disabled', false); //enable Attachments\n }\n else {\n $(field_BP_Name).val(\"\");\n $(field_BP_Number).val(\"\");\n $(field_BP_Workspace_ID).val(\"\");\n $(field_BP_Workspace_Path).val(\"\");\n $(field_BP_Workspace_Path).val(\"\");\n $(\"#viewAttach\").prop('disabled', true); //Disable Attachments\n }\n}", "title": "" }, { "docid": "95438f1badc6680268c5e2d69088f560", "score": "0.5476898", "text": "function addoption(obj) {\n var optionvalue = parseInt($(obj).parent().siblings(\".option-block\").length) + 1;\n var popupString = '<div class=\"option-block\">' +\n '<div class=\"option-fields\">' +\n ' <input type=\"text\" placeholder=\"Option Text\" class=\"form-control option-text\" />' +\n ' <input type=\"text\" placeholder=\"Value\" class=\"form-control option-value\" disabled value=\"' + optionvalue + '\"/>' +\n '</div>' +\n '<div class=\"popup-event-btn\">' +\n '<button class=\"event-btn file-remove\" onclick=\"RemoveOption(this)\"> <i class=\"fa fa-minus-circle\" aria-hidden=\"true\"></i></button > ' +\n '</div></div>';\n $(obj).parent().siblings().last().after(parseHTML(popupString));\n $(obj).parent().siblings().last().find(\"input.option-text\").focus();\n}", "title": "" }, { "docid": "d4d35d1f3b071499f421d8741cb85bd5", "score": "0.54721236", "text": "function addSelectOptions(v, i) {\r\n inputUnitList[i] = new Option (v, v);\r\n outputUnitList[i] = new Option (v, v);\r\n}", "title": "" }, { "docid": "903330cd5353dd7f0ca3036d2b41d61e", "score": "0.5465143", "text": "function hideSendToStepOptions() {\n $( \"option[id^='sendToStep']\" ).hide();\n}", "title": "" }, { "docid": "9eb9082b6fa8e2a8bfa5e377501eb053", "score": "0.54639924", "text": "function createOptions() {\n const item = document.createElement('span');\n document.querySelector('.gs-options').appendChild(item);\n }", "title": "" }, { "docid": "39268e1ffaa42c19e76fe207cc04d787", "score": "0.5462113", "text": "function controlSetup() {\n var x, i, j, selElmnt, a, b, c;\n /*look for any elements with the class \"custom-select\":*/\n x = document.getElementsByClassName(\"custom-select\");\n for (i = 0; i < x.length; i++) {\n selElmnt = x[i].getElementsByTagName(\"select\")[0];\n /*for each element, create a new DIV that will act as the selected item:*/\n a = document.createElement(\"DIV\");\n a.setAttribute(\"class\", \"select-selected\");\n a.innerHTML = selElmnt.options[0].innerHTML;\n x[i].appendChild(a);\n /*for each element, create a new DIV that will contain the option list:*/\n b = document.createElement(\"DIV\");\n b.setAttribute(\"class\", \"select-items select-hide\");\n for (j = 1; j < selElmnt.length; j++) {\n /*for each option in the original select element,\n create a new DIV that will act as an option item:*/\n c = document.createElement(\"DIV\");\n c.innerHTML = selElmnt.options[j].innerHTML;\n c.addEventListener(\"click\", function(e) {\n /*when an item is clicked, update the original select box,\n and the selected item:*/\n var y, i, k, s, h;\n s = this.parentNode.parentNode.getElementsByTagName(\"select\")[0];\n h = this.parentNode.previousSibling;\n for (i = 0; i < s.length; i++) {\n if (s.options[i].innerHTML == this.innerHTML) {\n s.selectedIndex = i;\n h.innerHTML = this.innerHTML;\n y = this.parentNode.getElementsByClassName(\"same-as-selected\");\n for (k = 0; k < y.length; k++) {\n y[k].removeAttribute(\"class\");\n }\n this.setAttribute(\"class\", \"same-as-selected\");\n break;\n }\n }\n h.click();\n });\n b.appendChild(c);\n }\n x[i].appendChild(b);\n a.addEventListener(\"click\", function(e) {\n /*when the select box is clicked, close any other select boxes,\n and open/close the current select box:*/\n e.stopPropagation();\n closeAllSelect(this);\n this.nextSibling.classList.toggle(\"select-hide\");\n this.classList.toggle(\"select-arrow-active\");\n });\n }\n}", "title": "" }, { "docid": "c4f63a685ecb8f728c9ddd2435a906be", "score": "0.54609096", "text": "function itemOpt(){\n var formTag = document.getElementsByTagName(\"form\"), //formTag is an array of all the form tags.\n selectList = $(\"select\"),\n makeSelect = document.createElement(\"select\");\n makeSelect.setAttribute(\"id\", \"entries\");\n for(var i=0, j=wishLists.length; i<j; i++){\n var makeOption = document.createElement(\"option\");\n var optText = wishLists[i];\n makeOption.setAttribute(\"value\", optText);\n makeOption.innerHTML = optText;\n makeSelect.appendChild(makeOption);\n }\n selectList.appendChild(makeSelect);\n }", "title": "" }, { "docid": "cb0b87c386b691b439233c1c775aef64", "score": "0.5455477", "text": "function updateImageSelect(){\n images_select = makeSelectOptions(dataTable_images,1,3,8,\"DISABLED\");\n \n //update static selectors:\n //in the VM section\n $('div.vm_section#disks select#IMAGE_ID').html(images_select);\n}", "title": "" }, { "docid": "53c5d5eae800a01f7aaba48ad5255a8e", "score": "0.54523325", "text": "function createSelect(arr, parent) {\n //add elements to custom select\n var optionsDiv = $('<div class=\"options\"></div>');\n for (var i = 0, len = arr.length; i < len; i++) {\n var itemDiv = $('<div class=\"hiddenOption\" ></div>');\n itemDiv.append('<img class=\"greyimg\" src=\"img/pikachu.png\">');\n itemDiv.append('<p class=\"CSItem\">' + arr[i] + '</p>');\n optionsDiv.append(itemDiv);\n }\n parent.append(optionsDiv);\n parent.addClass('container');\n}", "title": "" }, { "docid": "45a9cd5d9d03de9bee28dbb70158a027", "score": "0.54514456", "text": "function onSelectOption(val) {\n $('#right_panel').show();\n switch (val) {\n case 'text':\n $('#additional_option').html(onTypeText());\n break;\n case 'number':\n $('#additional_option').html(createSelectElement(numberList));\n break;\n case 'email':\n $('#right_panel').hide();\n break;\n case 'date':\n $('#additional_option').html(createSelectElement(dateList));\n break;\n case 'fixed':\n $('#additional_option').html(createCustomOption());\n break;\n default:\n $('#right_panel').hide();\n }\n}", "title": "" }, { "docid": "d50f59ba0d224c4dd0b1dd4bcd0afe76", "score": "0.5442805", "text": "function addOption() {\n const newOption = document.createElement('option');\n const inputValue = document.querySelector('#addInput').value;\n const inputElement = document.querySelector('#addInput');\n \n // If the modal input is valid the new option will be added to the dropdown and the modal disappear\n if ( inputElement.validity.valid === true ) {\n const optionText = document.createTextNode(inputValue);\n newOption.appendChild(optionText);\n selectBox.appendChild(newOption);\n inputElement.value = '';\n addModal.style.display = \"none\";\n } else {\n // Create a new div next to relevant element and display the custom error message\n const message = \"*Þú verður að skrifa eitthvað!\"\n parent = inputElement.parentNode,\n div = document.createElement('div');\n div.appendChild(document.createTextNode(message));\n div.classList.add('validation-message');\n parent.insertBefore(div, inputElement.nextSibling);\n inputElement.focus(); \n }\n}", "title": "" }, { "docid": "5dc831ae944c6557f6f95aa9adc98117", "score": "0.5441851", "text": "async function showAddNewSolutionMenu() {\n setElementDisplay([mainMenu, solutionSettingMenu, solutionInfoBox], \"none\");\n setElementDisplay([addNewSolutionMenu], \"block\");\n\n let warningInfo = await getWarningInfo();\n populateSelectWithWarnings(addNewSolutionWarningSelect, warningInfo);\n\n let priorityInfo = await getPriorities();\n populateSelectWithPriorities(addNewSolutionPrioritySelect, priorityInfo);\n}", "title": "" }, { "docid": "100efa862fb12cc77b5846a41330e2de", "score": "0.5437938", "text": "function addSelection(cont){\n var tagOption=null, div=null;\n var sel = d3.select(\".selsC\")\n var nSel = sel.insert(\"div\",\":first-child\")\n .attr(\"class\", \"new_sel\")\n\n newForm(nSel,'sel')\n addSelFormButtons(nSel)\n}", "title": "" }, { "docid": "4f203aa72655965387cb66f59e804eca", "score": "0.54378784", "text": "function mostrarOpciones(xOpcionEnvio){\n $(\".selectOpciones\").hide();\n $(\"[data-entrega='\"+xOpcionEnvio+\"']\").show();\n $(\"[data-entrega='\"+xOpcionEnvio+\"']\").prop('selectedIndex',0);\n\n}", "title": "" }, { "docid": "4714df185c830b3f95e1f63c2fa0bf8e", "score": "0.543782", "text": "function addStdDesc(){\n View.selectValue('formPanelSelVal_form', getMessage(\"problemDescCodes\"),\n\t\t\t\t\t\t\t['dummyField'], 'pd', ['pd.pd_description'], ['pd.pd_id','pd.pd_description'],\n\t\t\t\t\t\t\t\"\", \"afterSelectStdDesc\");\n}", "title": "" }, { "docid": "0ee69e39c970848f33572e54d8d8b007", "score": "0.5437536", "text": "function createOptions() {\n let pokemonRegistrado = document.querySelector('#dtlPokemonList');\n\n for (let i = 0; i < listaPokemon.length; i++) {\n let opcion = new Option(listaPokemon[i]['nombre_pokemon']);\n opcion.value = listaPokemon[i]['nombre_pokemon'];\n\n pokemonRegistrado.appendChild(opcion);\n }\n}", "title": "" }, { "docid": "4c423da163cce7c2d277b3763fb5ddfe", "score": "0.5428439", "text": "function btnAdd(){\n \n var x = document.getElementById('select_city');\n var value = x.options[x.selectedIndex].text;\n var option = document.createElement(\"option\");\n option.text = value;\n option.selected = true;\n document.getElementById('select_selected').add(option);\n}", "title": "" }, { "docid": "09aedf67b47550eb77f71f14ca83a4b4", "score": "0.5425699", "text": "function initCustomForms() {\n\tjcf.setOptions('Select', {\n\t\twrapNative: false,\n\t\tfakeDropInBody: false,\n\t});\n\tjcf.replaceAll();\n}", "title": "" }, { "docid": "1dc8f4393d1a2be499660786354e2702", "score": "0.5419765", "text": "function otherchoice(name, new_select, id){\r\n\r\n\t//creates div to describe the box\r\n\tvar new_div = document.createElement('div');\r\n\tvar text = document.createTextNode(\"Enter your choice: \");\r\n\tnew_div.appendChild(text);\r\n\tnew_div.style.display = \"inline-block\";\r\n\tnew_select.appendChild(new_div);\r\n\r\n\t//creates input box\r\n\tvar manual = document.createElement('input');\r\n\tmanual.setAttribute('type', 'text');\r\n\tmanual.setAttribute('name', name);\r\n\tmanual.style.display = \"inline-block\";\r\n\tnew_div.after(manual);\r\n\r\n}", "title": "" }, { "docid": "b01ba7a0086d00fb67364101bfbb5ffb", "score": "0.5417216", "text": "function add_select(select_name, parent_id) {\n\tvar parent_node = document.getElementById(parent_id);\n\tvar new_select = document.createElement('select');\n\tnew_select.name = select_name;\n\tnew_select.id = select_name;\n\tparent_node.appendChild(new_select);\n}", "title": "" }, { "docid": "c29434198dc6b9826f0005e09dba7fe4", "score": "0.54170245", "text": "function addColToBox() {\r\n\tvar userAnimeLayoutSelect = document.getElementById('userAnimeLayoutSelect');\r\n\tvar defsAnimeLayoutSelect = document.getElementById('defsAnimeLayoutSelect');\r\n\tvar option;\r\n\tif (this.nodeName.toLowerCase() == 'input') // we are dealing with the button\r\n\t\toption = defsAnimeLayoutSelect.options[defsAnimeLayoutSelect.selectedIndex];\r\n\telse // we are dealing with an option\r\n\t\toption = this;\r\n\toption.ondblclick = remColFromBox;\r\n\tvar selIndex = userAnimeLayoutSelect.selectedIndex;\r\n\tif (selIndex < 0)\r\n\t\tuserAnimeLayoutSelect.appendChild(option);\r\n\telse\r\n\t\tuserAnimeLayoutSelect.insertBefore(option,userAnimeLayoutSelect.options[selIndex]);\r\n}", "title": "" }, { "docid": "ae5d7ddb57675b38ae2d9cd3c0378d2f", "score": "0.5406206", "text": "function showAddSteps() {\n $(\"form.create-new-step\").toggleClass(\"hidden\");\n $('.input-focus').focus();\n }", "title": "" }, { "docid": "9788952b48621519e8fa01de28436b56", "score": "0.53975475", "text": "function showAddsymptomtypeForm() {\n //Resetting the fields\t\t\t\t\n frmsymptomtypeAdd.widgetidsymptomtypeValue.text = \"\";\n frmsymptomtypeAdd.widgetsymtomttypedescValue.text = \"\";\n frmsymptomtypeAdd.show();\n}", "title": "" }, { "docid": "611e38d8708ba344a893be9abd8f6346", "score": "0.53971475", "text": "function showObsProps() {\r\n\t// showObsPropsSelect\r\n\tvar info;\r\n\t//var opt = document.createElement(\"option\");\r\n\tvar obsPropLink;\r\n\tconsole.log(\"In showObsProps \");\r\n\tinfo = document.getElementById('ObsProp');\r\n\tinfo.innerHTML = '<b>ObsProps <a id=\"demo\" onclick=\"addObsProp()\"> <img src=\"plus.png\" alt=\"Add ObsProp\"> </a></b><form id=\"showObsPropsForm\">';\r\n\t$.each(obsPropList, function (k, v) {\r\n\t\tconsole.log(\"ObsProps \" + k + \" \" + v.name);\r\n\t\t//opt.value = k;\r\n\t\tobsPropLink = '<a id=\"demo\" onclick=\"showObsProp(' + k + ')\">ObsProp(' + k + \"): \" + v.name + \"</a>\"; \r\n\t\tobsPropLink += '<a id=\"del_'+ k +'\" onclick=\"removeObsProp('+ k +')\"> <img src=\"minus.png\" alt=\"Delete ObsProp\"> </a>';\r\n\t\t//opt.text = obsPropLink;\r\n\t\t//document.getElementById(\"showObsPropsSelect\").options.add(opt);\r\n\t\tinfo.innerHTML += '<br><input type=\"radio\" name=\"obsPropRD\" value=\"' + k + '\">';\r\n\t\tinfo.innerHTML += obsPropLink; \r\n\t})\r\n\tinfo.innerHTML += '</form>';\r\n}", "title": "" }, { "docid": "4b2294f192b721d29d7084efd0e421dd", "score": "0.5393491", "text": "function fillStateBox2() \n{\n RMPApplication.debug(\"begin fillStateBox\");\n $(\"#id_statusFilter\").append(\"<option value='tous' selected>Tous les statuts</option>\");\n var stateList = JSON.parse(id_request_status_cl.getList()).list;\n for (i=0; i < stateList.length; i++) {\n $(\"#id_statusFilter\").append(\"<option value='\" + stateList[i].value + \"'>&#10143; \" + stateList[i].label + \"</option>\");\n }\n RMPApplication.debug(\"end fillStateBox\");\n}", "title": "" }, { "docid": "949036f2359c4113e44afe28538bd0d6", "score": "0.53933597", "text": "function showIpcList(ipcList, ipcSelectedList){\n\t\tvar cmbOptionIPC = $(\"#cmbOptionIPC\");\t\t\n\t\tvar options = [];\n\t\t$.each(ipcList, function(i, item){\t\t\t\n\t\t\toptions.push('<option value=\"'+item.ipcCode+'\">'+item.ipcName+'</option>');\t\t\t\n\t\t});\n\t\t//show dialog\t\t\n\t\tcmbOptionIPC.html(options);\n\t\tif (ipcSelectedList!==null){\n\t\t\tcmbOptionIPC.selectpicker(\"val\", ipcSelectedList);\n\t\t}\t\t\n\t\tcmbOptionIPC.selectpicker(\"refresh\");\n\t}", "title": "" }, { "docid": "14e3862be6ef12ec68780dd96794ac5a", "score": "0.53919846", "text": "function initialAddReqMed(){\n\t\t$(\"#req_select option\").remove();\n\t\t$(\"#req_med_table tr\").remove();\n\t\tvar spans=$(\"#labels span\");\n\n\t\tvar list=[];\n\t\t$.each(spans,function(i,v){\n\t\t\tlist[i]=$(v).data(\"options\").medicine_id;\n\t\t});\n\t\tvar param={};\n\t\tparam.idList=list;\n\t\tproject.post(\"app/base?action=queryMedByRestr\",param,function(data){\n\t\t\t$.each(data,function(i,v){\n\t\t\t\t$(\"#req_select\").append(\"<option id=\"+v.medicine_id+\" data-options='\"+JSON.stringify(v)+\"'>\"+v.medicine_name+\"(\"+v.manufacturer_name+\")</option>\");\n\t\t\t\tinitialMedTab(v.medicine_id);\n\t\t\t});\n\t\t\t\n\t\t},function(e){\n\t\t\t\n\t\t});\n\t\t\n\t}", "title": "" }, { "docid": "d818b22925a33c9b2020392bb0d2678f", "score": "0.53846717", "text": "hideCreateForm() {\n this.changeFormMode(this.FORM_MODES.LIST);\n }", "title": "" }, { "docid": "6a9e05d9b35ba8d6c0ab6de3214557d4", "score": "0.5383072", "text": "function addDefenderSelect(divname, listNum) {\n var newDiv=document.createElement('div');\n var divID = \"defender\" + listNum;\n var html = 'Type ' + listNum + ': <select id=' + divID + '>';\n var defenderTypes = getTypes();\n var i;\n html += '<option value=\"\"selected>-</option>'\n for(i = 0; i < defenderTypes.length; i++) {\n html += \"<option value='\"+defenderTypes[i]+\"'>\"+defenderTypes[i]+\"</option>\";\n }\n html += '</select>';\n newDiv.innerHTML= html;\n document.getElementById(divname).appendChild(newDiv);\n}", "title": "" }, { "docid": "816a4d2ff4e44e28f237869b76765cf9", "score": "0.5382397", "text": "function add(item){\n\tselected.$data.selected.push(item)\n\n\t//also remove it from the results\n\tvar index = results.$data.options.indexOf(item);\n\tif (index !== -1) {\n\t\tresults.$data.options.splice(index, 1);\n\t}\n}", "title": "" }, { "docid": "51ba4a3734adf7687637a6103c185734", "score": "0.5380617", "text": "function fillWoTypeBox2() \n{\n RMPApplication.debug(\"begin fillWoTypeBox2\");\n $(\"#id_woTypeFilter\").append(\"<option value='tous' selected>Tous</option>\");\n var typeList = JSON.parse(id_request_type_cl.getList()).list;\n for (i=0; i < typeList.length; i++) {\n $(\"#id_woTypeFilter\").append(\"<option value='\" + typeList[i].value + \"'>&#10143; \" + typeList[i].label + \"</option>\");\n }\n RMPApplication.debug(\"end fillWoTypeBox2\");\n}", "title": "" }, { "docid": "9bfb202a79e7a3a8fa09790737bf5dfe", "score": "0.53776646", "text": "function pg_select(){\n\t$('#bathroom_option').hide();\n\t$('#bhk_option').hide();\n\t$('#balcony_option').hide();\n\t$('#floors').hide();\n\t$('#price').hide();\n\t$('#sharing_option').show();\n\t$('#pg_amenities').show();\n\t$('#flat_amenities').hide();\n\t$('.gender_opt').hide();\n\t$('#last_entry_field_id').show();\n}", "title": "" }, { "docid": "6b160ccb764fe2f30c1144c34ddb0cf7", "score": "0.53774935", "text": "function generateSelect(selectText, i, spanID){ //(\"start/end text\", 1 or to to add to id=\"selectID\", span to html() )\r\n\t var destination = \"<select id='selectID\" + i + \"'>\";\r\n\t destination += \"<option value='' selected='selected'>\" + selectText + \"</option>\";\r\n\t\t myList = \"\"; //list for instruction modal\r\n\t for ( i = 0; i < markers.length; i++ ){\r\n\t\t //alert(markers[i].position);\r\n\t\t destination = destination + \"<option value='\" + markers[i].position + \"'>\" + markers[i].title + \"</option>\"; \r\n\t\t\t \r\n\t\t\t //markers list for Instruction modal window\r\n\t\t\t myList = myList + \"<p>\" + (i + 1) + \".\" + markers[i].title + \"</p>\";\r\n\t } \r\n\t \r\n\t destination = destination + \"</select>\";\r\n\t $(\"#\" + spanID).html(destination);\r\n\t //$(\"#destination2\").html(destination);\r\n\t //end generates option_select\r\n\t\t\t\r\n\t\t\t$(\"#listOfMarkers\").html(myList); //html marker list to instruction modal\r\n\t }", "title": "" }, { "docid": "3e7314153b9ae9d16084319bff1f59f0", "score": "0.53751117", "text": "function init_select()\n\t\t{\n\t\t$('.morda ul').tabs();\n\t\t$scope.on_resize();\n\t\t}", "title": "" } ]
bab8216c83713f3df27857ef29a45be7
challenge 11 Write a function to calculate factorial for a given input. If input is below 0 or above 12 throw an exception of type
[ { "docid": "24c4a7a7dded9311caafe0d762359622", "score": "0.7864237", "text": "function factorial(n) {\n\tif (n < 0 || n > 12) {\n\t\tthrow RangeError;\n\t} else {\n\t\tlet answer = 1;\n\t\tif (n == 0 || n == 1) {\n\t\t\treturn answer;\n\t\t} else {\n\t\t\tfor (var i = n; i >= 1; i--) {\n\t\t\t\tanswer = answer * i;\n\t\t\t}\n\t\t\treturn answer;\n\t\t}\n\t}\n}", "title": "" } ]
[ { "docid": "d0307730c7d80e727a2872874842f5e1", "score": "0.7697478", "text": "function factorial(n) {\n let num = n;\n\n if (num === 0 || num > 10) {\n return \"out of bounds\";\n }\n while (n > 1) {\n n--;\n num = num * n;\n }\n return num;\n}", "title": "" }, { "docid": "12834ecab17ca1af9a46c878c61c5b9c", "score": "0.764973", "text": "function factorial(num) {\r\n if (typeof num != \"number\") {\r\n alert(\"Введите число!\");\r\n return 0;\r\n }\r\n if (num < 0) {\r\n alert(\"число отрицательное\");\r\n return 0;\r\n } else if (num == 1) {\r\n return 1;\r\n }\r\n num *= factorial(num - 1);\r\n return num;\r\n}", "title": "" }, { "docid": "63a7f98eee7359a5d13cf34a59d0b7fc", "score": "0.762832", "text": "function calculateFactorial(x){ \nif (x === 0)\n{\n return 1;\n}\nreturn x * calculateFactorial(x-1);\n//return 10 * 9 * 8...2*1\n}", "title": "" }, { "docid": "bf4212d27ba2f1602167ffd47102279c", "score": "0.76003474", "text": "function factorial(input) {\n if (input === 0) {\n return 1;\n }\n return input * factorial(input - 1);\n}", "title": "" }, { "docid": "b5393fe5a30abb63c971f56f9f69151b", "score": "0.75868416", "text": "function factorial(n) {\n if (!(Number.isFinite(n) && n % 1 === 0)) throw \"Input must be an integer.\";\n else if (n === 0) return 1;\n else {\n var res = 1;\n for (let i = 2; i <= n; i++) {\n res *= i;\n }\n }\n return res;\n}", "title": "" }, { "docid": "613d0166d3c081ff03e5ada4ab0361a1", "score": "0.7493806", "text": "function factorial() {\n var res = this.currentInput;\n if (this.currentInput == 0) { //special case 0!\n res = 1\n }\n else if (this.currentInput > 0) {\n for (i = this.currentInput - 1; i > 0; i--) { //factorial calculation\n res = res * i;\n }\n }\n else if (this.currentInput < 0) {\n res = \"ERROR\";\n }\n this.currentInput = res;\n this.displayCurrentInput();\n}", "title": "" }, { "docid": "f388710730c6a2caf8f939301664e15c", "score": "0.7428703", "text": "factorial(number){\n }", "title": "" }, { "docid": "d388ec349b75e20b00ced8ea04acfdc5", "score": "0.73655295", "text": "function factorial(numero){\n if (numero == 0){\n return 1\n }else {\n return numero * factorial(numero - 1)\n }\n}", "title": "" }, { "docid": "1cad45397bbe440971cbd1f90bd66760", "score": "0.73551846", "text": "function factorial(number) {\r\n // ex 2 - complete\r\n}", "title": "" }, { "docid": "5b26681131df79a3d514b5b4bff7d5d1", "score": "0.73435986", "text": "function factorial(n){\n\tlet answer = 1;\n if (n == 0 || n == 1){\n return 1;\n }\n else{\n for(var i = n; i >= 1; i--){\n answer = answer * i;\n }\n return answer;\n } \n}", "title": "" }, { "docid": "0a4195fb27c6ee3a51487e3e161eb990", "score": "0.73198", "text": "function factorial (n) {\r\n if (n < 0) {\r\n return (\"Number should be >= 0\");\r\n } else if (n === 0) {\r\n return 1;\r\n } else {\r\n return n * factorial (n - 1);\r\n }\r\n}", "title": "" }, { "docid": "2ec5c08e82f3065b2e9a2bbe24460f75", "score": "0.7287655", "text": "function factorial(n) {\n if (Number.isInteger(n) && n > 0) {\n // Positive integers only\n if (!(n in factorial)) {\n // If no cached result\n factorial[n] = n * factorial(n - 1); // Compute and cache it\n }\n return factorial[n]; // Return the cached result\n } else {\n return NaN; // If input was bad\n }\n}", "title": "" }, { "docid": "bc863c14fa753ecffd02343f1e59ba39", "score": "0.7268212", "text": "function factorial(n){\n let answer = 1;\n if (n == 0 || n == 1){\n return answer;\n }else{\n for(let i = n; i >= 1; i--){\n answer = answer * i;\n }\n return answer;\n } \n }", "title": "" }, { "docid": "f4cb6f0d0baab21626073e120d99387a", "score": "0.7250714", "text": "function factorial(num) {\n\tnum = Number(num); // harf için etkisi olmadı (?)\n\tif (num < 0) { // negatif sayı için etkisi oldu\n\t\treturn null;\n\t}\n\tvar f = 1;\n\tfor (var i = 2; i <= num; i++) {\n\t\tf *= i;\n\t}\n\treturn f;\n}", "title": "" }, { "docid": "6d3529933df67e01ed5bb4fd0ac77ab2", "score": "0.7246987", "text": "function calculateFactorial(n){\n \n if(n<1){\n return 1;\n }\n else {\n return n*calculateFactorial(n-1);\n } \n \n }", "title": "" }, { "docid": "1d2bc8f1e5fd228f23b5ec192640add2", "score": "0.7236999", "text": "function factorial( num ){\n console.log( \"call with num =\", num )\n if( num == 1 ){\n return 1\n }\n if( num == 0 ){\n return 0\n }\n return num * factorial( num - 1 )\n}", "title": "" }, { "docid": "bb1bd1da3633b211f165e17160c36f68", "score": "0.7236929", "text": "function factorial(num)\n{\n\tif(num <=1)\n\t{\n\t\treturn 1;\n\t}\n\t\n\n}", "title": "" }, { "docid": "bedd71a5c36b1023fbdb12511f73b360", "score": "0.7234739", "text": "function factorial (a) {\n if (isNaN(a)) {\n return 1;\n } else if (parseInt(a) === 0) {\n return 1;\n } else {\n return parseInt(a) * factorial(parseInt(a) - 1);\n }\n}", "title": "" }, { "docid": "f674a8fe592057ed16bcebb09dc8f87c", "score": "0.7224145", "text": "function factorial(x){\n if(x===1){\n return x;\n }\n let result = 2;\n for(let i=3; i<=x; i++){\n result = result * i;\n }\n return result;\n}", "title": "" }, { "docid": "c15b52c97965708ebd7df9acf3b4c40b", "score": "0.7221368", "text": "function factorial(n){\n //your code here\n if(n == 1){\n return 1\n }\n else if(n <= 0){\n return 1\n }\n else {\n return n*(factorial(n-1))\n }\n }", "title": "" }, { "docid": "8fadfff7dbe221a4b0e03499ebd273a7", "score": "0.7214413", "text": "function factorial(x) {\n\n if (x < 0) return false;\n else if (x === 0) return 1;\n else return x * factorial(x - 1);\n}", "title": "" }, { "docid": "a8968f06c790a0cf781a5a06fa40ef09", "score": "0.72113687", "text": "function factorial(num)\n{\n try\n {\n if(typeof num!=='number')\n {\n throw \" enter valid value\"\n }\n let result=1;\n for(let k=1;k<=num;k++)\n {\n result=result*k;\n }\n console.log(result);\n }\n catch(err)\n {\n console.log(\"not validity\");\n }\n}", "title": "" }, { "docid": "f965cc5f160135839d6ffa6406306424", "score": "0.719661", "text": "function factorial(x) \n{ \nif (x === 0)\n {\n return 1;\n }\n return x * factorial(x-1);\n \n}", "title": "" }, { "docid": "80b26efc4afd0c64f3d1d31e8669594b", "score": "0.7181783", "text": "function Factorial () {\n\t\tvar num = document.getElementById(\"factorialInput\").value;\n\t\tvar factorial = 1;\n\n\t\tif (isNaN(num) || (num==\"\") || num <0) {\n\t\t\tdocument.getElementById(\"factorialOutput\").innerHTML = \"Not a valid positive number, try again.\";\n\t\t}\n\t\t// 0! is special case\n\t\telse {\n\t\t\tif (Number(num) === 0) { factorial = 1;} \n\t\t\telse {\n\t\t\t\tfor (var i=Number(num); i>0; i--) {\n\t\t\t\t\tfactorial = factorial * i;\n\t\t\t\t}\n\t\t\t};\n\t\t\tdocument.getElementById(\"factorialOutput\").innerHTML = num + \"! = \" + factorial;\n\t\t};\n\t\t// clear input\n\t\tdocument.getElementById(\"factorialInput\").value = \"\";\n\t}", "title": "" }, { "docid": "d3f0d35701faab768ccd7dceb557c2dd", "score": "0.7180194", "text": "function factorial(num){\n if (num <= 1){\n // base case\n\n }\n else{\n //call self with new data\n\n }\n\n}", "title": "" }, { "docid": "74d560c5c3cf1db44dce637b73dd46ee", "score": "0.7179063", "text": "function factorial(x) { \n\n if (x === 0)\n {\n return 1;\n }\n return x * factorial(x-1);\n \n}", "title": "" }, { "docid": "df858d3a44a2c5304d176d27465aafd7", "score": "0.7163165", "text": "function factorial(num){\n if (num === 0) return 1; \n return num * factorial(num - 1)\n}", "title": "" }, { "docid": "35746458ced513aabcd8b5368a5cfd5b", "score": "0.7160462", "text": "function factorial(n) {\n if (isFinite(n) && n>0 && n==Math.round(n)) { // Finite, positive ints only\n if (!(n in factorial)) // If no cached result\n factorial[n] = n * factorial(n-1); // Compute and cache it\n return factorial[n]; // Return the cached result\n }\n else return NaN; // If input was bad\n}", "title": "" }, { "docid": "51007c21763849a515c4b37e1b9ff9a1", "score": "0.7153205", "text": "function factorial(x) {\r\n if (x <= 0) {\r\n return 1;\r\n } else {\r\n return x * factorial(x-1);\r\n }\r\n}", "title": "" }, { "docid": "336f1b30d12d6a0e4e45c91dfa09ab25", "score": "0.7152726", "text": "function factorial(n){\n if (n <= 0) return 0;\n if (n === 1) return n;\n return n * factorial(n - 1)\n}", "title": "" }, { "docid": "d0334856c42aeae188432a386261201e", "score": "0.7152315", "text": "function factorial(n){\n \tvar resultado = 0;\n \tif(n==1){\n \t\tresultado = 1\n \t} else {\n \t\tresultado = n * factorial(n-1);\n\n \t}\n \treturn resultado;\n }", "title": "" }, { "docid": "d5c5be90fa1eb016711211700db56b47", "score": "0.7149621", "text": "function factorial( num ) {\n console.log( \"call with num = \", num )\n if( num < 1 ){\n return 0\n }\n if( num > 1 ){\n return num * factorial( num - 1)\n }\n return 1\n}", "title": "" }, { "docid": "6522998fb7050f5aaf405c22cbc9e051", "score": "0.7149551", "text": "function factorial(n){\n if(Number.isInteger(n) && n > 0){ // Positive integers only\n if(!(n in factorial)){ // If no cached result\n factorial[n] = n*factorial(n-1); //Compute and cache it\n }\n return factorial[n]; // Return the cached result\n } else {\n return NaN; // If inout was bad\n }\n}", "title": "" }, { "docid": "550f946b15beccc5f5bcab588ac9ddcd", "score": "0.71463066", "text": "function factorial(n){\n if (n==0){\n return 1\n }\nelse{\n return factorial (n-1) * n\n }\n}", "title": "" }, { "docid": "d0c5222e5145cb36f6320450f92f8a20", "score": "0.71392363", "text": "function factorial(x) {\n if(x === 0) {\n return 1;\n } else {\n var result = 1;\n for (var i = 1; i <= x; i++) {\n result = result * i;\n }\n return result;\n }\n}", "title": "" }, { "docid": "f8c9023acc476d1ae795320065066a8a", "score": "0.71368194", "text": "function factorial(x) {\n // function body\n var ans = 1;\n for(var i = x; i > 0; i--)\n {\n ans *= i;\n }\n return ans;\n }", "title": "" }, { "docid": "9531dd55f8a1da1d735b108212f7655f", "score": "0.71335477", "text": "function factorial(n){\n if(n===0){\n return 1;\n }else{\n return n * factorial(n-1)\n }\n}", "title": "" }, { "docid": "dcfff98d0ff54d3752dd38bae11465ef", "score": "0.7123438", "text": "function factorial(n) {\n var result = 1; // initialize result but also return 1 at f(0)\n while (n >= 1) {\n result *= n;\n n -= 1;\n }\n return result;\n}", "title": "" }, { "docid": "f6ea0e842494832e130a4c2624076dc4", "score": "0.7119439", "text": "function factorial(n){\n var sol = 1;\n for(var i=1; i<=n; i++){\n sol *= i;\n }\n return sol;\n}", "title": "" }, { "docid": "e9282e84c4bf0432ac1020fbe54cb9a7", "score": "0.7107941", "text": "function factorial(num) {\n // your code here\n if(num <=1){\n return 1;\n }\n else{\n return num * factorial(num-1)\n }\n}", "title": "" }, { "docid": "15eebc48d2909ab91c4ebc83dbe51b64", "score": "0.7101659", "text": "function factorial(num){\n //base case used so it doesn't enter an infinite loop\n if(num === 1){\n return 1\n } else{\n return num * factorial(num-1)\n }\n}", "title": "" }, { "docid": "007bf7607869488fde723e0a45f56ef9", "score": "0.7095367", "text": "function factorial(sumNum) {\n if(sumNum === 0){\n return 1;\n }\n else{\n return sumNum * factorial (sumNum-1);\n }\n \n}", "title": "" }, { "docid": "ea9f1d38a63097fae8426b850c47a1cd", "score": "0.70911276", "text": "function factorial(num){\n let resultado;\n if (num === 1)\n return num;\n else\n return (num * factorial(num-1)); \n}", "title": "" }, { "docid": "9801b17bbba69402237eea8d12339304", "score": "0.70891947", "text": "function factorial(n){\n let fact = 1;\n for(let i = 1; i <= n; i++){\n fact *= i;\n }\n return fact;\n}", "title": "" }, { "docid": "e6320b56cfb394da2fdf7e75dc987b3f", "score": "0.7088597", "text": "function calculateFactorial(x) {\n if (x === -1) {\n return 1;\n }\n\n return x * calculateFactorial(x - 1);\n}", "title": "" }, { "docid": "0599de401840ac65b8c9cddf1ac890d5", "score": "0.70869267", "text": "function factorial(num) {\n if (num < 0 ) {\n return 'undefined';\n }\n var fact = 1;\n \n for (var i = num; i > 0; i--) {\n fact *= i;\n }\n return fact;\n}", "title": "" }, { "docid": "393ff19560547bf1bd563c970d61248a", "score": "0.70867705", "text": "function factorial(number) {\n if (number === 0) {\n return 1;\n }\n else{\n return number * factorial(number - 1);\n }\n}", "title": "" }, { "docid": "75733f66c0154b344d252d3dcf2db28f", "score": "0.708666", "text": "function factorial(n) {\r\n // 0! == 1\r\n return n <= 1 ? 1 : n * factorial(n - 1);\r\n}", "title": "" }, { "docid": "434d3cafdcaadfbb14f155cb4265e03d", "score": "0.70837325", "text": "function factorial(num){\n if (num ===0 || num === 1) {\n return 1\n } else {\n return (num * factorial(num -1))\n } \n}", "title": "" }, { "docid": "c78675d7ee5e68f954788ea6619565f9", "score": "0.7078616", "text": "function factorial(n) {\r\n\t\r\n\t// this is the Termination Case, to handle inputs that don't make sense\r\n\tif (n < 0) {\r\n\t\treturn;\r\n\t}\r\n\t\r\n\t// this is the Base Case, or condition which stops the recursion\r\n if (n === 0) {\r\n return 1;\r\n }\r\n \r\n // This is the Recursive Case which will run in all cases in which n !== 0\r\n // Recursive Case must lead to the Base Case\r\n return n * factorial(n - 1);\r\n}", "title": "" }, { "docid": "6bf40532ce6aad311bcc65b73a02b422", "score": "0.7077519", "text": "function factorial (n) {\n if(n === 0){\n return 0;\n } else {\n return (n * factorial(n-1));\n }\n}", "title": "" }, { "docid": "57896b4239b10a01146b5c25ca5b84c2", "score": "0.70660716", "text": "function factorial(n){\n if(n < 0){\n return -1;\n } else if(n === 0){\n return 1;\n } else {\n return (n * (factorial(n -1)));\n }\n\n}", "title": "" }, { "docid": "95ed91df719b1be925addc4b4dfd7056", "score": "0.7064475", "text": "function factorial(n) {\n if(n == 0) {\n return 1\n } else {\n return factorial(n-1) * n\n }\n }", "title": "" }, { "docid": "714276b51644565733292407dfcde37a", "score": "0.7064451", "text": "function factorial(num) {\n\t// YOUR CODE HERE\n\n\t// First Solution : Recursion\n\t/*\n\tif (num < 0) return 'must be a positive number';\n\telse if (num === 0 || num === 1) return 1;\n else return num * factorial(num - 1);\n */\n\n\t// Second Solution : While Loop\n\t/*\n\tlet result = num;\n\tif (num < 0) return 'must be a positive number';\n\telse if (num === 0 || num === 1) return 1;\n\twhile (num > 1) {\n\t\tnum--;\n\t\tresult *= num;\n\t}\n return result;\n */\n\n\t// Third Solution : For Loop\n\n\tif (num < 0) return 'must be a positive number';\n\telse if (num === 0 || num === 1) return 1;\n\tfor (let i = num - 1; i >= 1; i--) {\n\t\tnum *= i;\n\t}\n\treturn num;\n}", "title": "" }, { "docid": "e5dcf8898b2ad47fb2bd4b30bdb403c6", "score": "0.70638555", "text": "function factorial (n) {\r\n if (n === 0) {\r\n return 1\r\n } else {\r\n return n * factorial(n - 1)\r\n }\r\n}", "title": "" }, { "docid": "baa7158a1424e4b87e8064fa8bf4d778", "score": "0.705463", "text": "function factorial(n) {\r\n let result = 1;\r\n for (let i = 1; i <= n; i++) {\r\n result *= i;\r\n }\r\n return result;\r\n }", "title": "" }, { "docid": "2a114db7569ad01c465be06c805c042b", "score": "0.7047269", "text": "function factorial(x) {\n if (x <= 0) {\n return 1;\n } else {\n return x * factorial(x-1); // (A)\n }\n}", "title": "" }, { "docid": "cb74c014c4a995b9f868a003fc2bb4a4", "score": "0.70468897", "text": "function factorial(n){\n if(n==0){\n return 1;\n }\n \nelse{\nreturn n* factorial(n-1);\n } \n\n}", "title": "" }, { "docid": "b0fa8ea0149c0ae9fa90514587d1fffd", "score": "0.70394206", "text": "function factorial(n){\n if(n==0){\n return 1;\n }\n else{\n return n* factorial(n-1);\n }\n}", "title": "" }, { "docid": "d99907c35544995e5ab901e11a7923f9", "score": "0.70389754", "text": "function factorial(n) {\r\n // base case: n is 0 or 1\r\n if (n === 0 || n === 1) {\r\n return 1\r\n }\r\n return n * factorial(n - 1);\r\n}", "title": "" }, { "docid": "ae321b5656dfbe8540d0e7a0747ce6af", "score": "0.70279896", "text": "function calcularFactorial(numero) {\n if (numero === 0) {\n return 1;\n }\n else {\n return numero * calcularFactorial(numero - 1);\n }\n}", "title": "" }, { "docid": "b36224dfe2a9dbbf845e853098253734", "score": "0.7026301", "text": "function factorial (n) {\n if (n === 0) {\n return 1\n } else {\n return n * factorial(n - 1)\n }\n}", "title": "" }, { "docid": "10614fdad7e12dd97f5435262c4b9e0f", "score": "0.7020856", "text": "function factorial(number) {\r\n\tlet result = 1; \r\n\r\n\t//use a for loop to iterate through the parameter\r\n\tfor(let i = 2; i <= number; i+=1) {\r\n\t\tresult *= i; \r\n\t}\r\n\r\n\treturn result; \r\n}", "title": "" }, { "docid": "65803997c89066e69d828b1afd18901c", "score": "0.7019436", "text": "function factorial(n) {\r\n if (n <= 1) {\r\n return 1;\r\n }\r\n return n * factorial(n-1);\r\n}", "title": "" }, { "docid": "a9c679c57c7f236fd79b326238b30c85", "score": "0.7016917", "text": "function factorial(n) {\n if (n === 0) {\n return 1;\n }\n else {\n return n * factorial(n - 1);\n }\n}", "title": "" }, { "docid": "c601249d3ebaa7f80a793b33766d2c94", "score": "0.7016163", "text": "function factorial(n){\n if(n<2){\n return n;\n \n }\n return n*factorial(n-1); \n}", "title": "" }, { "docid": "68ad1e3927f138d8d1b4be17e8a5ae3f", "score": "0.7014968", "text": "function factorial(x) {\n\n // if number is 0\n if (x === 0) {\n return 1;\n }\n\n // if number is positive\n else {\n return x * factorial(x - 1);\n }\n}", "title": "" }, { "docid": "caa05324014227fa34104e3d057f165e", "score": "0.7010885", "text": "function factorial(n) {\n\tvar counter = 1;\n\tvar total = 1;\n while (counter <= n) {\n \ttotal *= counter;\n \tcounter++;\n }\n return total;\n}", "title": "" }, { "docid": "fa7066b8bc00109e59d5811d29a8f1ca", "score": "0.70085377", "text": "function extraLongFactorials(n) {\n // Write your code here\n let fact = '1';\n let answer =0;\n for(let i = 2; i<=n;i++){\n fact = multiply(fact,i+'');\n }\n console.log(fact);\n}", "title": "" }, { "docid": "b5ea9c0348c8b687761e07b563313953", "score": "0.70084757", "text": "function factorial(n) {\n if (n <= 1) {\n return 1;\n }\n else {\n return n * factorial(n - 1);\n }\n}", "title": "" }, { "docid": "74e37732e6b7b56e11ba74d3a34b342c", "score": "0.7003739", "text": "function factorial(n) {\n if (n <= 0) {\n return 1;\n }\n return n * factorial(n - 1);\n}", "title": "" }, { "docid": "dc97aa30113f1b668295a044d5898629", "score": "0.6998743", "text": "function factorial (n){\n if (n<1)\n {\n return 1;\n }\n return n*(factorial(n-1));\n}", "title": "" }, { "docid": "195cf71a87cf7be287bbdc84906f2e85", "score": "0.699365", "text": "function factorial(number){\n if(number == 0){\n return 1;\n }\n return number * factorial(number -1);\n}", "title": "" }, { "docid": "93120a35fdf07a0895f603c66eac5bed", "score": "0.6991234", "text": "function factorial(n) {\n if (n <= 0) {\n return 0;\n } else if (n === 1) {\n return 1;\n }\n return n * factorial(n-1);\n}", "title": "" }, { "docid": "23e8a4aedea94158a52b9c49aae4744e", "score": "0.6990197", "text": "function factorial(num) {\n var result = num;\n\n if (num === 0 || num === 1)\n return 1;\n\n while (num>1) {\n num--;\n result = result * num;\n }\n return result;\n}", "title": "" }, { "docid": "efdbf953094dc7c369ff0a734d7f04bb", "score": "0.69873714", "text": "function calculateFactorial(num) {\n\n if (num == 0 || num == 1) {\n return 1;\n }\n return num * calculateFactorial(num - 1);\n}", "title": "" }, { "docid": "de11d7345e6f5c51f0675651716b0f8c", "score": "0.6985154", "text": "function factorial(num){\n if(num === 0) return 1;\n if(num === 1) return 1;\n return num*factorial(num-1);\n }", "title": "" }, { "docid": "4759a61c86ea218d3809cf433a03ba92", "score": "0.6984562", "text": "function factorial(n) {\n if (n === 1 || n === 0) {\n return 1;\n }\n return n * factorial(n - 1);\n}", "title": "" }, { "docid": "3347dd88ee8a841d2d897338d190c077", "score": "0.69831073", "text": "function factorial (n) {\n\tif(n===0 || n===1){\n\t\treturn 1;\n\t} else {\n\t\treturn n* factorial(n-1);\n\t}\n}", "title": "" }, { "docid": "6db450cb813e8722ab90917a98ec99a5", "score": "0.6982169", "text": "function factorial (num) {\n if(num === 0) {\n return 1;\n } else {\n return num * factorial(num - 1)\n }\n}", "title": "" }, { "docid": "b4c322e780d1e7fbf02fd8dd5a995df4", "score": "0.6979471", "text": "function factorial(n) {\n if (n == 0) {\n return 1;\n } \n return n * factorial(n - 1);\n \n }", "title": "" }, { "docid": "a834f17e3f6f06e3bca5fa5b5a9dcd59", "score": "0.6977433", "text": "function factorial(num){\n if (num ===1)\n return num\n else\n return num*factorial(num-1)\n }", "title": "" }, { "docid": "17bced055680bb19a229bd960367412f", "score": "0.69757825", "text": "function factorial(n) {\n if (n == 0) {\n return 1;\n }\n else {\n return factorial(n-1)*n;\n }\n}", "title": "" }, { "docid": "d1e4c692a2f404c4e78b16a53900cd65", "score": "0.6968118", "text": "function factorial(num) {\n if (num === 1) return 1;\n if (num === 0 )return 0;\n\n return num * factorial(num-1);\n}", "title": "" }, { "docid": "80bae25961ae496285467d480b3a2a5d", "score": "0.6966372", "text": "function factorial(num){\n var fact = 1;\n for (var i = num; i > 0; i--) {\n fact *= i;\n };\n return fact;\n}", "title": "" }, { "docid": "cab8c71749c3617d9cb1dfca14343153", "score": "0.69656414", "text": "function factorial(num){\n let result = 1;\n while(num >1){\n result *= num;\n num --;\n }\n return result;\n}", "title": "" }, { "docid": "ab26dd300c504675a25edaef754795ab", "score": "0.69649845", "text": "function factorial(num) {\n if (num === 0) {\n return 1;\n }\n else return num * factorial(num - 1)\n}", "title": "" }, { "docid": "f10e9e0627e9bce8cce5e8a140b0c660", "score": "0.69575393", "text": "function factorial(number){\n if (number === 1){\n return 1;\n } \n return factorial(number - 1) * number;\n }", "title": "" }, { "docid": "6bed3d4b2298a890d39bbeb7187d6dab", "score": "0.6953089", "text": "function factorial(number) {\n // let result = 1;\n // for (let i = 0; i < number; i++) {\n // result = result * (number - i);\n // }\n // return result;\n\n return number === 1 ? 1 : number * factorial(number - 1);\n}", "title": "" }, { "docid": "1bc1738f99bdb464a7d854b93ebf452e", "score": "0.6944933", "text": "function factorial(num) {\n if (num === 0) return 1;\n return num * factorial(num-1)\n}", "title": "" }, { "docid": "244290080706bd05baa2a5fe6d3aa0de", "score": "0.69448173", "text": "function factorial(number) {\n if (number < 0) {\n return -1;\n } else if (number === 0) {\n return 1;\n } else {\n return (number * factorial(number - 1));\n }\n}", "title": "" }, { "docid": "6944ea1126e11c858e127792fd14499d", "score": "0.6942249", "text": "function factorial(n){\r\n //base case\r\n if(n == 0 || n == 1){\r\n return 1;\r\n //recursive case\r\n }else{\r\n return n * factorial(n-1);\r\n }\r\n}", "title": "" }, { "docid": "4c66f17ddc423067f3aeaa4ffdc1fc3b", "score": "0.69409025", "text": "function factorial(num) {\n if (num === 0) {\n return 1;\n } else {\n return num * factorial(num - 1);\n }\n}", "title": "" }, { "docid": "2bb06b590eb6932fb21ad647d12c6142", "score": "0.69376266", "text": "function factorial(n) {\n if(n <= 1) {\n return n\n }\n\n return n * factorial(n-1)\n}", "title": "" }, { "docid": "e71b79460a1a812dbfea05f75ad677d4", "score": "0.69339937", "text": "function factorial(num) {\n if(num === 0) {\n return 1;\n }else {\n return num * factorial(num - 1);\n }\n}", "title": "" }, { "docid": "a4c978d683cc0af8e9ebb4ac1eb11919", "score": "0.69287306", "text": "function factorial(n) {\n if (n == 0) {\n return 1;\n }\n return factorial(n - 1) * n;\n}", "title": "" }, { "docid": "90a48c0518086cf5ef90c4d3eec92c69", "score": "0.6927775", "text": "function factorial(x) {\n if (x === 0) {\n return 1;\n }\n return x * factorial(x - 1);\n}", "title": "" }, { "docid": "84b8335daf685f181a20b970c54673c7", "score": "0.6926879", "text": "function factorial(num){\n let result = 1\n for(let i = 1; i <= num; i++){\n result *= i\n }\n return result;\n}", "title": "" }, { "docid": "83f7504537fc0de35a36bed2677cef48", "score": "0.6926268", "text": "function factorial() {\n\n if(currentInput == \"\"){\n return;\n }\n\n if(operator > 0){\n calculate();\n }\n\n var fac = currentInput;\n\n if( fac < 0 || (fac + \"\").indexOf(\".\") != -1){\n fac = \"ERROR\";\n }else if ( fac == 0){\n fac = 1;\n }else{\n for( i = 1; i < currentInput; i++){\n fac = fac * i;\n }\n }\n\n currentInput = fac;\n operator = 0;\n memory = \"0\";\n displayCurrentInput();\n\n}", "title": "" }, { "docid": "9d91a063176fea734cf2bf98dfcc5d7a", "score": "0.69260997", "text": "function factorial(num) {\n if (num === 0) {\n return 1;\n } else {\n return num * factorial(num - 1);\n }\n}", "title": "" } ]
fefecbb53de3d58d5cac224057492712
fetch service information of a given cloud project
[ { "docid": "6775bf9cb66b2bdebfe56b7f64a2c917", "score": "0.8139028", "text": "getCloudProjectServiceInformation(serviceName) {\n return this.OvhApiCloudServiceInfos.get({ serviceName }).$promise;\n }", "title": "" } ]
[ { "docid": "fed74f9fec5fc8c889e799253c7f876f", "score": "0.6679495", "text": "getProjectWithFullInfo(query = {}) {\n return this.getOneWithCustumQuery(query).then(async (project = {}) => {\n if (!project) {\n return [];\n }\n const {\n clients = [],\n providers = [],\n teams = [],\n reminders = []\n } = project;\n debug(clients, providers, teams, reminders);\n //instance all services\n const clientServices = new ClientsServices();\n const projectServices = new ProjectServices();\n const providerServices = new ProviderServices();\n const reminderProjectsServices = new RemindersProjectsServices();\n //convert the object into an array with just the values\n const clientsIds = clients.map(({ clientId }) => clientId);\n const providerIds = providers.map(({ providerId }) => providerId);\n const teamsIds = teams.map(({ teamId }) => teamId);\n const remindersIds = reminders.map(({ reminderId }) => reminderId);\n //get data from services\n const clientsInProject = await clientServices.getMany(clientsIds);\n const providersInProject = await providerServices.getMany(providerIds);\n const teamsInProject = await projectServices.getProjectTeams(teamsIds);\n const remindersInProject = await reminderProjectsServices.getProjectReminders(\n remindersIds\n );\n return {\n ...project,\n clients: clientsInProject || [],\n providers: providersInProject || [],\n teams: teamsInProject || [],\n reminders: remindersInProject || []\n };\n });\n }", "title": "" }, { "docid": "6b9853d5059531e0db7fea66736061da", "score": "0.6626842", "text": "async _service() {\n const ecs = new AWS.ECS();\n\n const params = {\n services: [this.options.serviceName],\n cluster: this.options.clusterArn,\n };\n\n const data = await ecs.describeServices(params).promise();\n logger.info(`Retrieved service data for ${data.services[0].serviceArn}`);\n return data.services[0];\n }", "title": "" }, { "docid": "0d9cd01a50b6456aad196886a4b35b2e", "score": "0.6372169", "text": "function getServices(parentEl) {\n // API Fetch\n fetch(\n \"https://cdn.contentful.com/spaces/9635uuvwn9dq/environments/master/entries?access_token=cgtQv23ag7qZw92QlPnJwslq6vWfK8sDwB8fNk62QTI&content_type=service\"\n )\n .then((resp) => resp.json())\n .then((data) => processServices(data, parentEl));\n}", "title": "" }, { "docid": "91ebf605f172d24202b594fe38ceedb8", "score": "0.6334323", "text": "function projget(p, cb) {\n var pn = p.projectName;\n debug && console.error(\"fetching individual project: \"+pn);\n axios.get(cfg.url+\"project/\"+pn, axopt).then((resp) => {\n // OK\n return cb(null, resp.data);\n }).catch((ex) => {\n console.log(\"Problems getting project details for: \"+pn+\" (\"+ex+\")\");\n return cb(ex, null);\n });\n}", "title": "" }, { "docid": "f644ca5f2e20eefa45d8edeadb30d83c", "score": "0.62361616", "text": "async readServices() {\n let response = await fetch(url + 'get/services')\n let data = await response.json();\n return data\n }", "title": "" }, { "docid": "cddc92d5fdceb518a8cd91c20a3918ba", "score": "0.6207178", "text": "function fetchProjectInfo() {\n // Request URL for project\n var projectAPI = testRailURL + \"/index.php?/api/v2/get_projects\";\n var params = setTestRailHeaders();\n\n // Proxy the request through the container server\n gadgets.io.makeRequest(projectAPI, handleProjectResponse, params);\n}", "title": "" }, { "docid": "73594d5f79d7809652e62c3ed825e701", "score": "0.60546017", "text": "function getServicesList() {\n\t\t\tcustApi.getServices().\n\t\t\tsuccess(function (data, status, header, config) {\n\t\t\t\tconsole.log(\"Services retrieved successfully\");\n\t\t\t\tvm.apptCost = data.payload[0].rate;\n\t\t\t\tvar serviceMap = buildServicesMap(data.payload);\n\t\t\t\tvm.physiotherapyId = serviceMap[\"physiotherapy\"];\n\t\t\t\tcustportalGetSetService.setPhysioId({\"physioId\": vm.physiotherapyId, \"apptCost\": vm.apptCost});\n\t\t\t}).\n\t\t\terror(function (data, status, header, config) {\n\t\t\t\tconsole.log(\"Error in retrieving services\");\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "a28060912439ff9ff992a8bc268f1c02", "score": "0.60210645", "text": "function getServicesList() {\n\t\tcustApi.getServices().\n\t\tsuccess(function (data, status, header, config) {\n\t\t\tconsole.log(\"Services retrieved successfully\");\n\t\t\tvar serviceMap = buildServicesMap(data.payload);\n\t\t\tvm.model.physiotherapyId = serviceMap[\"physiotherapy\"];\n\t\t}).\n\t\terror(function (data, status, header, config) {\n\t\t\tconsole.log(\"Error in retrieving services\");\n\t\t});\n\t}", "title": "" }, { "docid": "f5aaf399a441d198e4a87bf04aec1724", "score": "0.5994767", "text": "getServiceInfos(service) {\n return this.OvhHttp.get(\n `${service.path}/${window.encodeURIComponent(\n service.serviceName,\n )}/serviceInfos`,\n {\n rootPath: 'apiv6',\n },\n ).then(\n (serviceInfos) =>\n new BillingService({\n ...service,\n ...serviceInfos,\n }),\n );\n }", "title": "" }, { "docid": "5d9a33fd9ab3e53a039219a6c36dc9ea", "score": "0.5934324", "text": "HubicPersoServices(packName) {\n let url = `/pack/xdsl/${packName}/hubic/services`;\n return this.client.request('GET', url);\n }", "title": "" }, { "docid": "51feed2a5707d23025aeb3324d1dd100", "score": "0.59232557", "text": "gatherProjectInfo() {\n const generatorTitle = `${_consts.GENERATOR_NAME} v${_package.version}`;\n this.log(\n _yosay(\n `AWS Microservice Generator.\\n${_chalk.red(generatorTitle)} `\n )\n );\n\n this.config.set('_projectType', _consts.SUB_GEN_MICROSERVICE);\n return _prompts\n .getProjectInfo(this, true)\n .then(() => {\n return _prompts.getAuthorInfo(this, true);\n })\n .then(() => {\n return _prompts.getAwsInfo(this, true);\n });\n }", "title": "" }, { "docid": "25b488c04dc0a4e39040206ca2859667", "score": "0.58756995", "text": "function getServiceMetaData(config, logGroup, authToken) {\n var serviceParts = logGroup.split('_');\n return new Promise((resolve, reject) => {\n var service_api_options = {\n url: `${config.SERVICE_API_URL}${config.SERVICE_URL}?domain=${serviceParts[1]}&service=${serviceParts[2]}&environment=${serviceParts[serviceParts.length - 1]}`,\n headers: {\n \"Content-Type\": \"application/json\",\n \"Authorization\": authToken\n },\n method: \"GET\",\n rejectUnauthorized: false\n };\n\n request(service_api_options, (error, response, body) => {\n if (error) {\n reject(error);\n } else {\n if (response.statusCode && response.statusCode === 200) {\n var responseBody = JSON.parse(body);\n logger.debug(\"Response Body of Service Metadata is: \" + JSON.stringify(responseBody));\n resolve(responseBody.data.services[0])\n } else {\n logger.error(\"Service not found for this service, domain, environment: \", JSON.stringify(service_api_options));\n reject('Service not found for this service, domain, environment');\n }\n }\n })\n });\n}", "title": "" }, { "docid": "bd307f685cdd5c3b83d4b394702fbe62", "score": "0.5822352", "text": "function getProjects() {\n\t\t\tvar getProjectsURL = origin.segment([ 'skdev', 'api', 'projects' ]).href();\n\t\t\t$log.debug('[workspaceSV] getProjects : ' + getProjectsURL);\n\t\t\treturn $http.get(getProjectsURL);\n\t\t}", "title": "" }, { "docid": "bd153e593370c67266c38d33329d30ab", "score": "0.57981694", "text": "async viewProjDetails({\n view,\n params\n }) {\n const service = await Service.find(params.id)\n return view.render('/services/serviceview', {\n service: service.toJSON()\n })\n }", "title": "" }, { "docid": "dfd996fed56000216a251dee4078e0bd", "score": "0.5786777", "text": "function getService(item){\n // console.log('getService:', item);\n if (item.idr) {\n var matches = item.idr.match(/\\w+\\:\\w+\\@(\\w+)\\/\\w+\\#\\w+/);\n if (matches && matches.length) {\n return matches[1];\n }\n }\n return 'Unknown Service';\n}", "title": "" }, { "docid": "838cb8bd774d5f038836eb22110ded4c", "score": "0.57685226", "text": "fetch(callback) {\n let proc = cp.spawnSync(this._serviceCmd, [\"list\"]);\n let firstline = true;\n let lines = proc.stdout.toString().split(/\\n/);\n let services = new Map();\n\n lines.forEach((line) => {\n if (!firstline && line) {\n let s = this._parseLine(line);\n services.set(s.name, s);\n }\n\n firstline = false;\n });\n\n let serviceList = new ServiceList(services);\n\n if (callback) callback(serviceList);\n\n return serviceList;\n }", "title": "" }, { "docid": "6d9e345a7efc95134cf5e4fa26a70e7f", "score": "0.57230294", "text": "fetchServicesFromApi()\n {\n //all paths are configurable in 'config.js'\n const serviceCatalogAPI = bcConfig.urlBase + bcConfig.urlPathToREDCap + bcConfig.serviceCatalogApi;\n\n fetch(serviceCatalogAPI)\n .then(response => response.json())\n .then(jsondata => {\n this._jsondata = jsondata;//need this for searches\n this.parseJsonListOfServices(jsondata);\n if (this.fullServiceList) \n {\n this.setStateData(this.fullServiceList);\n }\n else\n {\n this.setStateData([]);\n }\n }).catch(err => this.setStateData([]));\n }", "title": "" }, { "docid": "3e6673701d7743d8f086b888bf2eccff", "score": "0.57082164", "text": "getAnalyticsDataPlatformDetails(serviceName) {\n return this.OvhApiAnalyticsPlatforms.get({ serviceName }).$promise;\n }", "title": "" }, { "docid": "9c85d53371991d05bf4b5499fae0c0ab", "score": "0.5704374", "text": "function getService(typeService) {\n if (typeService == 1) {\n return costService.standard;\n } else if (typeService == 2) {\n return costService.premium;\n } else if (typeService == 3) {\n return costService.excelium;\n }\n }", "title": "" }, { "docid": "387aa2a2b2c720ff49e97222fd0b372c", "score": "0.5690593", "text": "async getAllServices() {\n debug('get Dot4 service IDs from dot4SaKpiRepository');\n this.allServices = await this.request({\n method: 'get',\n url: '/api/service',\n });\n debug(`loaded ${this.allServices.length} services`);\n }", "title": "" }, { "docid": "8f7874327439ae34bf056b9201a3443d", "score": "0.5670871", "text": "async function main() {\n const client = new Compute({\n // Specifying the serviceAccountEmail is optional. It will use the default\n // service account if one is not defined.\n serviceAccountEmail: 'some-service-account@example.com',\n });\n const projectId = await auth.getProjectId();\n const url = `https://dns.googleapis.com/dns/v1/projects/${projectId}`;\n const res = await client.request({url});\n console.log(res.data);\n}", "title": "" }, { "docid": "46ad5e44be45cefb99859a8ae8e17145", "score": "0.5664036", "text": "function getAllProjectAPI(){\n\t\n\tvar userId = document.getElementById(\"uId\").value;\n\t\n\tfetch(path+\"/getAllProjectDashboard/\"+userId,{\n\t\t\n\t\tmethod: \"GET\",\n\t headers: {\n\t \"Content-Type\": \"application/json\",\n\t },\n\t\t\n\t})\n\t.then((response)=>response.json())\n\t.then((projects)=>{\n\t\tconsole.log(\"successfully fecth all data\", projects);\n\t\tif(projects){\n\t\t\tpopulateProject(projects);\n\t\t}\n\t})\n\t.then((error)=>{\n\t\t\n\t\treturn null;\n\t\t\n\t});\n\t\n}", "title": "" }, { "docid": "f93722f2024e6d2256aebc17b2da33a2", "score": "0.56308687", "text": "async getService (req, res) {\n console.log('getting services')\n const user = await jwt.getUser()\n const service = await Services.findById(req.params.service)\n\n if (!service) return res.status(204).send('No service found with that ID')\n\n res.status(200).send(service)\n }", "title": "" }, { "docid": "ab3d262dda87247428cb1fb7f7b6ff93", "score": "0.5628613", "text": "function getService(service) {\n for (var i = 0; i < window.services.length; i++)\n if (window.services[i].id === service) return services[i];\n}", "title": "" }, { "docid": "70d0e6b4882ed91f53d4d4d2632f7470", "score": "0.5600572", "text": "getServiceNames(grpcPkg) {\n // Define accumulator to collect all of the services available to load\n const services = [];\n // Initiate recursive services collector starting with empty name\n this.collectDeepServices('', grpcPkg, services);\n return services;\n }", "title": "" }, { "docid": "b02de4a11067e5b52fee820120f2813b", "score": "0.5593282", "text": "function getAllProjects() {\n //get all the projects (up to 500)\n allProjects = new Array();\n var response = UrlFetchApp.fetch('https://api.10000ft.com/api/v1/projects?per_page=500&fields=custom_field_values,tags,phase_count', params);\n\n var jsonProjects = JSON.parse(response.getContentText()); //JSONified response\n\n\n //now we'll loop over each element in the jsonProject.data structure - each one is a project\n jsonProjects.data.forEach(function(element){ //this is also a good place to limit what to process. i.e. if element.state != internal\n var proj = new Object();\n proj.id = element.id;\n proj.link10K = \"=HYPERLINK(\" + \"\\\"https://app.10000ft.com/viewproject?id=\" + element.id +\"\\\"\" + \",\" + \"\\\"Link\\\")\";\n proj.name = element.name;\n proj.startDate = element.starts_at;\n proj.endDate = element.ends_at;\n proj.description = element.description;\n proj.projectCode = element.project_code;\n proj.client = element.client;\n proj.state = element.project_state;\n proj.phaseCount = element.phase_count;\n proj.beneficiaries = \"\";\n //get the custom fields\n element.custom_field_values.data.forEach(function(custFieldVal) {\n switch (custFieldVal.custom_field_id) {\n case PROJ_PHASE_ID: proj.phase = custFieldVal.value;\n break;\n case PROJ_MGR_ID: proj.projectManager = custFieldVal.value;\n break;\n case PROJ_STRAT_OBJ_ID: proj.strategicObjective = custFieldVal.value;\n break;\n case PROJ_ARCH_PARTNER_ID: proj.architectPartner = custFieldVal.value;\n break;\n case PROJ_STATUS_ID: proj.status = custFieldVal.value;\n break;\n case PROJ_BENEFICIARY: proj.beneficiaries += custFieldVal.value + \" \";\n break;\n case PROJ_PARENT_PGM: proj.programID = custFieldVal.value;\n break;\n case PROJ_DIRECTOR: proj.director = custFieldVal.value;\n break;\n case PROJ_GSB_PRIO: proj.gsbPrioStatus = custFieldVal.value;\n break;\n case PROJ_EFFORT: proj.effort = custFieldVal.value;\n break;\n case PROJ_VALUE: proj.valueToSchool = custFieldVal.value;\n break;\n case PROJ_MICITI: proj.miciti = custFieldVal.value;\n break;\n case PROJ_NOTES: proj.notes = custFieldVal.value;\n break;\n case PROJ_PRMY_CONTACT: proj.primaryContact = custFieldVal.value;\n break;\n case PROJ_NONCOMP_COST: proj.nonCompCost = custFieldVal.value;\n break;\n case PROJ_HI_BENE_IMPACT: proj.hiBeneImpact = custFieldVal.value;\n break;\n case PROJ_FORCE_PRIO: proj.forceGsbPrioritization = custFieldVal.value;\n break;\n case PROJ_FOLDER:\n //proj.folder = custFieldVal.value;\n proj.folder = \"=HYPERLINK(\" + \"\\\"\" + custFieldVal.value + \"\\\"\" + \",\\\"Link\\\")\";\n break;\n case PROJ_PMO_DECK: proj.pmoDeck = custFieldVal.value;\n break;\n case PROJ_RECORD_MGR: proj.recordMgr = custFieldVal.value;\n break;\n case PROJ_OP_PRIO: proj.operPrioStatus = custFieldVal.value;\n break;\n default:Logger.log(\"default reached in custom field line 147 or therabouts\");\n };\n });\n\n //get the project tags\n proj.tags = \"\";\n element.tags.data.forEach(function(element) {\n proj.tags += element.value;\n });\n\n //derive the external status\n if (proj.phase == \"Pre-concept\" || proj.phase == \"Concept\") {proj.externalStatus = \"Exploration\"}\n else if (proj.phase == \"High Level Design\" || proj.phase == \"Pitch\") {proj.externalStatus = \"Queued\"}\n else {proj.externalStatus = \"Active\"};\n\n /////////////////START PRIORITIZATION STUFF////////////////////\n\n // Set some defaults\n proj.gsbPrioFlag = false;\n proj.operPrioFlag = false;\n proj.inconsistencyErrors = [];\n\n\n\n\n if (proj.state == \"Internal\") {\n if (isPrioritized(proj.gsbPrioStatus) || isPrioritized(proj.operPrioStatus)) {\n proj.inconsistencyErrors.push(\"Project is internal so it shouldn't be GSB or DS prioritized.\");\n }\n }\n // Derive prioritization\n else {\n //derive if project should get gsb level prioritization\n if (proj.forceGsbPrioritization == \"Yes\" || levelHigherThan(proj.effort, 'Low') || levelHigherThan(proj.nonCompCost, 'Low')){proj.gsbPrioFlag = true}\n\n // Determine inconsistency\n\n // If it is currently not set to be prioritized.\n if (proj.gsbPrioStatus == \"No\" || proj.gsbPrioStatus == \"TBD\") {\n // Check Effort\n if (proj.effort == \"Medium\" || proj.effort == \"High\") {\n proj.inconsistencyErrors.push(\"Effort is greater than Low, but it is not set to be GSB prioritized.\");\n }\n\n // Check Non-Comp Cost\n if (proj.nonCompCost == \"Medium\" || proj.nonCompCost == \"High\") {\n proj.inconsistencyErrors.push(\"Non-Comp Cost is greater than Low, but it is not set to be GSB prioritized.\");\n }\n\n // Check Force Prioritization.\n if (proj.forceGsbPrioritization == \"Yes\") {\n proj.inconsistencyErrors.push(\"Force prioritization is selected, but it is not set to be GSB prioritized.\");\n }\n }\n // If we calculate that it shouldn't be prioritized but it is.\n else if (!proj.gsbPrioFlag) {\n proj.inconsistencyErrors.push(\"Nothing warrants it to be prioritized, but it is set to be GSB prioritized.\");\n }\n\n //derive DS prioritization\n if (!proj.gsbPrioFlag) {\n if (proj.effort == \"High\" || proj.effort == \"Medium\" || proj.effort == \"Low\" || proj.nonCompCost == \"High\" || proj.nonCompCost == \"Medium\" || proj.nonCompCost == \"Low\"){proj.operPrioFlag = true}\n\n // Check for inconsistency\n if (proj.operPrioStatus == \"No\" || proj.operPrioStatus == \"TBD\") {\n // Check Effort\n if (proj.effort == \"Low\") {\n proj.inconsistencyErrors.push(\"Effort is Low, but it is not set to be DS prioritized.\");\n }\n\n // Check Non-Comp Cost\n if (proj.nonCompCost == \"Low\") {\n proj.inconsistencyErrors.push(\"Non-Comp Cost is Low, but it is not set to be DS prioritized.\");\n }\n }\n }\n else {\n // Check for consistency\n if (proj.operPrioStatus != \"No\") {\n proj.inconsistencyErrors.push(\"It is GSB prioritized so DS prioritization should be No.\")\n }\n }\n }\n\n\n // If there are no errors set the message to none.\n // Otherwise join the errors together with new lines and * as bullet points.\n if (!proj.inconsistencyErrors.length) {\n proj.inconsistencyMessage = '-None-';\n }\n else {\n proj.inconsistencyMessage = \"* \" + proj.inconsistencyErrors.join(\"\\n\\n* \");\n }\n\n //////////////////////END PRIORITIZATION STUFF//////////////////////////\n\n //get current resources\n proj.team = getStringifiedProjectResources(proj.id);\n\n\n //if the project has phases then get the current ones (if any)\n if (proj.phaseCount > 0) {\n proj.activePhases = getStringifiedCurrentPhases(proj.id);\n }\n else {\n //get the phase from the DS phase mapping\n proj.activePhases = \"None\";\n }\n //add the project to the list\n allProjects.push(proj);\n });\n\n //order the projectDetailedObjects in alpha order of element.name\n allProjects.sort(function(a,b) {\n var nameA = a.name.toUpperCase();\n var nameB = b.name.toUpperCase();\n return (nameA < nameB) ? -1 : (nameA > nameB) ? 1 : 0;\n });\n\n //now that we have all the projects with names in an array we can populate the programName if any\n allProjects.forEach(function(p){\n if (p.programID) {\n p.programName = getProjectName(p.programID);\n }\n else {\n p.programName = \"None\";\n }\n })\n\n\n}", "title": "" }, { "docid": "234a96c055e3f658337b3421bb389b75", "score": "0.5589908", "text": "getListOfSelectedProject(){\n let self = this;\n return new Promise(function(resolve, reject){\n if(!projectService.project){ // if no project selected - request a to select a project first\n console.log(\"Please select first a project before to work on it\".warn);\n resolve();\n }\n else{\n authService.checkLogin().then(function(){ \n let filter = \"Filter.Eq(Project.Id,\" + projectService.project.Id + \")\"; // build the filter on the selected project\n api.getEntityList(\"Meeting\", filter).then(function(data){ \n resolve(data);\n });\n });\n }\n });\n }", "title": "" }, { "docid": "accf41da9eaf65962378012e48f8b3fa", "score": "0.55888057", "text": "getProjectsList(){\n Utils.performGet(URL.projects())\n .then((response) => {\n this.setState({ projects: response.data });\n //Generate dictionary of projects\n this.projectsDict = Utils.createDictonary(response.data);\n })\n .catch((error) => {\n this.setState({ error: 'Unable to load' });\n });\n }", "title": "" }, { "docid": "8062b97725960855bd9a80230cbf0845", "score": "0.55836904", "text": "function getProvis(){ \n services.get('components', 'search','firstdrop').then(function (response) {\n $scope.provinces = response;\n \n }); \n }", "title": "" }, { "docid": "efec90d917c63b56f51d5140c5d8b172", "score": "0.5575906", "text": "getcurrentprojects() { }", "title": "" }, { "docid": "7a9869aaad0079dc63811a51d9ce4f74", "score": "0.5559", "text": "_get_local_service_list() {\n var out = [];\n for (var k in this.services) {\n if (this.services.hasOwnProperty(k)) {\n out.push(k);\n }\n }\n return out;\n }", "title": "" }, { "docid": "99f6f643f7346e7b0be41bea52f89a02", "score": "0.55587703", "text": "SitebuilderFullServices(packName) {\n let url = `/pack/xdsl/${packName}/siteBuilderFull/services`;\n return this.client.request('GET', url);\n }", "title": "" }, { "docid": "b6f35461463a120d54506b1d29803ce7", "score": "0.55565435", "text": "function getServiceByName(name) {\n return services[name];\n}", "title": "" }, { "docid": "a4c4cba92e8ce3449b7a6990e0f34d32", "score": "0.55464095", "text": "function getServices(){\n self.services = servicesService.getServices();\n $log.debug(self.services);\n }", "title": "" }, { "docid": "3f90ce8cfa10b506f051c0e850c1f724", "score": "0.55336976", "text": "function fetch(params) {\n return $http.get('/api/v2/project', {params: params});\n }", "title": "" }, { "docid": "3713540d5050855c858f214ff1c65bde", "score": "0.55208343", "text": "printServicesInfo() {\n let endPoints = listEndpoints(this.app);\n logger.debug(\"Endpoints are : \", endPoints);\n }", "title": "" }, { "docid": "5e0d31087cd52ca17a995cbce90c69e6", "score": "0.5509309", "text": "projects() {\r\n\t\treturn API.get(\"pm\", \"/list-projects\");\r\n\t}", "title": "" }, { "docid": "72aad06a5ad28dcdad1a4940d43131af", "score": "0.5496103", "text": "function getVcapServices(serviceName){\n\n let service;\n try{\n if (!appEnv){\n init();\n }\n\n if((typeof serviceName !== 'string') || (serviceName.trim().length <= 0)){\n console.log('getVcapServices serviceName is invalid');\n return null;\n }\n\n return appEnv.services[serviceName][0];\n }\n catch(error){\n console.log(`getVcapServices Could not get VCAP_SERVICES - ${error}`);\n return null;\n }\n\n}", "title": "" }, { "docid": "a6bc1a22f51c21a8103cd0c5fdc98fee", "score": "0.5472276", "text": "getProjects() {\n return this.#fetchAdvanced(this.#getProjectsURL()).then((responseJSON) => {\n let projectBOs = ProjectBO.fromJSON(responseJSON);\n //console.info(projectBOs);\n return new Promise(function (resolve) {\n resolve(projectBOs);\n })\n })\n\n }", "title": "" }, { "docid": "6609b742b7d6985dd157c3c847573c05", "score": "0.54676795", "text": "GetThisObjectProperties(serviceName) {\n let url = `/hpcspot/${serviceName}`;\n return this.client.request('GET', url);\n }", "title": "" }, { "docid": "d596cfc437946ce48c4d1a7d9243f442", "score": "0.5461744", "text": "_get_local_service(name, cb) {\n if (name in this.services) return cb(null, this.services[name]);\n return cb('err: no service');\n }", "title": "" }, { "docid": "86f0aa66460cb010b22939da3afd3f41", "score": "0.5444797", "text": "HostedEmailServices(packName) {\n let url = `/pack/xdsl/${packName}/hostedEmail/services`;\n return this.client.request('GET', url);\n }", "title": "" }, { "docid": "eabd1be76ccec15a625ea15e86b6e6a3", "score": "0.5441266", "text": "Exchange2013Services(packName) {\n let url = `/pack/xdsl/${packName}/exchangeAccount/services`;\n return this.client.request('GET', url);\n }", "title": "" }, { "docid": "911bd9ca579cc59003aeab65bf03e6b9", "score": "0.54280823", "text": "function getProject(project_name){\n return new Promise((resolve,reject) => {\n projectModel.find({project_name:project_name},(err,docs) => {\n if (err){\n return reject(err)\n }\n else{\n resolve(docs)\n }\n })\n })\n}", "title": "" }, { "docid": "c392f7d6dde4d2536b6c6174c5e15b0a", "score": "0.54181933", "text": "function fetchProjectInfo() {\n // Request URL for project\n var projectAPI = testRailURL + \"/index.php?/api/v2/get_project/\" + projectID;\n var params = setTestRailHeaders();\n\n // Don't make the API call if no test plans/runs were in the XML\n if (projectID == \"0\") {\n document.getElementById('milestoneCaption').innerHTML = \"Milestone not found\";\n msg.dismissMessage(loadMessage);\n gadgets.window.adjustHeight();\n } else {\n // Proxy the request through the container server\n gadgets.io.makeRequest(projectAPI, handleProjectResponse, params);\n }\n}", "title": "" }, { "docid": "8d482bb387fa3f5ac01ec9f0bb98d142", "score": "0.54172194", "text": "async getActiveProjects() {\n\n return await this.request({\n name: 'project.list',\n page: Page.builder().status('ACTIVE').all()\n });\n\n }", "title": "" }, { "docid": "5567d1b3f4c5b1d709f0a7fb64e8093a", "score": "0.5416344", "text": "getServiceData(tenant, servicename, callback)\n\t{\n\t\tif(!r3IsSafeTypedEntity(callback, 'function')){\n\t\t\tconsole.error('callback parameter is wrong.');\n\t\t\treturn;\n\t\t}\n\t\tlet\t_callback\t= callback;\n\t\tlet\t_error;\n\t\tif(r3IsEmptyStringObject(tenant, 'name') || r3IsEmptyString(servicename, true)){\n\t\t\t_error = new Error('tenant(' + JSON.stringify(tenant) + ') or service(' + JSON.stringify(servicename) + ') parameters are wrong.');\n\t\t\tconsole.error(_error.message);\n\t\t\t_callback(_error);\n\t\t\treturn;\n\t\t}\n\t\tlet\t_tenant\t\t= tenant.name;\n\t\tlet\t_service\t= servicename.trim();\n\t\tlet\t_url\t\t= '/v1/service/' + _service;\n\n\t\tthis.startProgress();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// start progressing\n\n\t\tthis._get(_url, null, null, _tenant, (error, resobj) =>\n\t\t{\n\t\t\tthis.stopProgress();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// stop progressing\n\n\t\t\tif(null !== error){\n\t\t\t\tconsole.error(error.message);\n\t\t\t\t_callback(error, null);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(true !== resobj.result){\n\t\t\t\terror = new Error(resobj.message);\n\t\t\t\tconsole.error(error.message);\n\t\t\t\t_callback(error, null);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(r3IsEmptyEntity(resobj.service)){\n\t\t\t\t_callback(null, null);\n\t\t\t}else{\n\t\t\t\t_callback(null, resobj.service);\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "ea6af84065f5ba071925482a004da1b5", "score": "0.5408462", "text": "function findService(def){\n let keys = Object.keys(def);\n for(let i=0; i < keys.length; i++){\n let propName = keys[i]\n let propValue = def[propName];\n\n if(typeof propValue === 'object'){\n let res = findService(propValue);\n if(res){\n return res;\n }\n }else if(propValue.service){\n return {name: propName, ctr: propValue};\n }\n }\n}", "title": "" }, { "docid": "9f2e25d0c2ed94d70defef76980d9b42", "score": "0.54044807", "text": "DomainServices(packName) {\n let url = `/pack/xdsl/${packName}/domain/services`;\n return this.client.request('GET', url);\n }", "title": "" }, { "docid": "87bf95164821ee480c83417f407c79c0", "score": "0.54023033", "text": "function fetchServices() {\n var namespace = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'default';\n return services_k8s.getServices(namespace).done(function (serviceDataArray) {\n src_reactor[\"a\" /* default */].dispatch(SITE_RECEIVE_SERVICES, serviceDataArray);\n });\n}", "title": "" }, { "docid": "ea5432b3c015127f59a9d9ad674f7955", "score": "0.5380091", "text": "constructor(projectSprintsService) {\n super(projectSprintsService);\n this.name = 'project-details-sprints';\n this.prependName = 'Sprints';\n this.itemKey = 'sprints';\n this.query = {\n sprints: true,\n };\n }", "title": "" }, { "docid": "7393c257ad2ec5a44caae1a209b32f63", "score": "0.5374713", "text": "async getProject(input = { projectId: '0' }) {\n\n return await this.request({\n name: 'project.get',\n args: [input.projectId],\n page: Page.builder(input.pagination)\n });\n\n }", "title": "" }, { "docid": "fba89faab43ed5fde84f603debd68a51", "score": "0.53655404", "text": "_handle_get_local_service(md) {\n this.local._get_local_service(md.name, (err, d) => {\n let rsp = {\n type: 'response',\n status: 'ok',\n uid: md.uid,\n };\n\n if (err) {\n rsp.status = err;\n } else {\n rsp.body = d;\n }\n\n return this._write(rsp);\n });\n }", "title": "" }, { "docid": "b078a064678c3a2f84e6ff68454501c5", "score": "0.53616357", "text": "function getProject(projectName) {\n return $http.get('/api/project/' + projectName)\n .then(function (res) {\n factory.files = res.files;\n factory.projectId = res.id;\n factory.projectName = res.projectName;\n return res.data;\n });\n }", "title": "" }, { "docid": "6d5bc4fdebadc42f45c196ac51382255", "score": "0.5337247", "text": "static getProject (token, id) {\n return fetch (`${process.env.API_HOST}/projects/${id}/`, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: `Token ${token}`,\n },\n })\n .then (response => response.json ())\n .then (data => {\n return data;\n })\n .catch (error => {\n return error;\n });\n }", "title": "" }, { "docid": "4b496bc2cf9598866d363f7a92557ef9", "score": "0.5326403", "text": "function getServiceByAlias(request, response, action) {\n var parameters, ref;\n parameters = getDialogflowParameters(request, action); // Obtenemos los parametros de Dialogflow\n ref = admin.database().ref(\"servicio\"); // Creamos una variable que contiene el nodo \"servicio\".\n // Buscamos todos los datos que sean igual al alias definido en la base de datos con el parametro obtenido de Dialogflow.\n return ref\n .orderByChild(\"alias\")\n .equalTo(parameters[0])\n .once(\"value\")\n .then(snapshot => {\n var jsonResult = {}; // Para almacenar todos los datos encontrados con el parametro y almacenarlo con su key respectivo.\n var resultToSendDialogflow = \"\"; // Variable para enviar el resultado a Dialogflow.\n snapshot.forEach(childSnapshot => {\n // Recorremos el resultado de la busqueda.\n var values = childSnapshot.val(); // Obtenemos un JSON con todos los valores consultados.\n values.key = childSnapshot.key; // Almacenamos la clave del servicio en una variable.\n // Se guardan los valores obtenidos en un arreglo.\n jsonResult[values.key] = childSnapshot.val();\n });\n if (Object.keys(jsonResult).length === 0) {\n // Enviamos un mensaje de que no se encontro ningun valor con el parametro dado por el usuario.\n resultToSendDialogflow =\n \"Lo siento, no pude encontrar la información necesaria para responder tu duda.\" +\n \" Por favor, asegúrese que el nombre del servicio este bien ingresado, o talvez esté \" +\n \"no pertenezca al centro historico de la ciudad de Latacunga.\";\n } else {\n // Enviamos los valores da la consulta a Dialogflow.\n if (action === \"serviceInformationAction\") {\n resultToSendDialogflow =\n \"Esta es la información que pude encontrar sobre el servicio \" +\n parameters[0] +\n \". ¿Te gustaría saber cómo llegar?\";\n } else if (\n action === \"service_information_intent.service_information_intent-yes\"\n ) {\n resultToSendDialogflow =\n \"Este es el camino que deberías tomar para llegar al servicio \" +\n parameters[0];\n }\n }\n // Enviamos el resultado a Dialogflow.\n return sendResponseToDialogflow(\n response,\n resultToSendDialogflow,\n jsonResult\n );\n });\n}", "title": "" }, { "docid": "a81a10883450d72034b3a1ec8a7bacaf", "score": "0.5320122", "text": "GetThisObjectProperties(serviceName) {\n let url = `/saas/csp2/${serviceName}`;\n return this.client.request('GET', url);\n }", "title": "" }, { "docid": "6b7175cf217097b1fb77f9a3b0a5b3bc", "score": "0.53161913", "text": "function getProjects () {\n projectGetWithHeaders(`project/confirmed/${data.user.id}/confirmed`, {\"token\": JSON.parse(localStorage.getItem(\"token\"))}).then(projects => {\n setdata({...data, projects: projects.data.data, isLoading: false})\n }).catch(error => {\n antdNotification(\"error\", \"Fetch Failed\", \"Error fetching project details, please reload screen\")\n })\n }", "title": "" }, { "docid": "90ecdf4fdab81d250ab06926ef0bc2f2", "score": "0.5299922", "text": "function getByProjectId(projectId) {\n defer = $q.defer();\n\n $http({\n method: 'GET',\n url: DATASERVICECONSTANTS.BASE_URL + '/projects?projectId=' + projectId,\n timeout: 5000\n }).then(function successCallback(response) {\n defer.resolve(response);\n }, function errorCallback(response) {\n defer.reject(response);\n });\n\n return defer.promise;\n }", "title": "" }, { "docid": "7f9660459087d2409b02618d155cd94c", "score": "0.5298278", "text": "async projectsList({request, response, error }){\n try{\n var data = request.body;\n let qry = await Database.connection('oracledb').select('PROJECT_ID','PROJECT_NAME','PROJECT_DESCRIPTION','CONVERSION_STATUS',)\n .from('LIST_OF_PROJECTS');\n console.log(qry);\n \n return response.status(200).send({success:true, data:qry, msg :'List of created projects', err:null});\n }\n catch(error){\n return response.status(400).send({success:false, data:null, msg:'Error while getting the projects list', err:error});\n }\n // finally{\n // Database.close(['oracledb']);\n // }\n\n \n }", "title": "" }, { "docid": "fb871125070f0a563f9ce4b484e4d5fe", "score": "0.52892524", "text": "ListTheEmailProServices(packName) {\n let url = `/pack/xdsl/${packName}/emailPro/services`;\n return this.client.request('GET', url);\n }", "title": "" }, { "docid": "d6ea4c8b10b024a51cb299cffee545c6", "score": "0.52887964", "text": "function getAllServiceName() {\n var services = Array();\n\n $.ajax({\n url: OVEconfig.BASEURL + '/practitioner/getspservices/',\n type: 'POST',\n async: false,\n data: {all: true, sp_id: $('input#sp_id').val()},\n dataType: 'json',\n success: function(data) {\n services = data.services_list;\n },\n error: function(xhr, errorType, errorMsg) {\n console.log(errorMsg)\n }\n });\n\n var servicename = 'No Services';\n\n if (services != null && services.length > 0) {\n var servicename = '';\n for (var i = 0; i < services.length; i++)\n {\n servicename += (services[i].name) ? ((i < services.length - 1) ? (services[i].name + \",\") : services[i].name) : (servicename);\n }\n }\n $('#servicename').html(servicename);\n}", "title": "" }, { "docid": "b589d1f6f60fe813eb58a5a952c504cd", "score": "0.52771175", "text": "getStatusFromStandardApi(service) {\n return tslib.__awaiter(this, void 0, void 0, function* () {\n const result = yield fetch(service.url).then(result => result.json());\n const status = result.status.indicator === 'none' ? 'passing' : 'failing';\n return {\n name: service.name,\n status,\n description: result.status.description,\n lastUpdated: new Date(result.page.updated_at)\n };\n });\n }", "title": "" }, { "docid": "01e767d41cfe7f6a31c58f1f002d5cdb", "score": "0.52743995", "text": "ListAvailableServices() {\n let url = `/hpcspot`;\n return this.client.request('GET', url);\n }", "title": "" }, { "docid": "377a63cad215526606d93d57f52172a8", "score": "0.5269736", "text": "async getServices (req, res) {\n console.log('getting services')\n\n const user = await jwt.getUser(req, res)\n const services = await user.getServices()\n\n if (!services.length > 0) return res.status(204).send([])\n\n res.status(200).send(services)\n }", "title": "" }, { "docid": "c4f2612f6a5f94491f84a1c20ad1f722", "score": "0.5263788", "text": "function get_name_service(username,service) {\n \n return lookup_data.\n filter(function (info) { return username === info.username; }).\n map(function (info) {\n return info.name;\n });\n \n}", "title": "" }, { "docid": "4318a0d57b0072b66386e7d2bb20837a", "score": "0.526363", "text": "getServices() {\n // This accessory only provides one service - a switch\n return [this.service];\n }", "title": "" }, { "docid": "bbcab1b5580b011819f4652288a580ea", "score": "0.5252732", "text": "ExchangeServices(packName) {\n let url = `/pack/xdsl/${packName}/exchangeIndividual/services`;\n return this.client.request('GET', url);\n }", "title": "" }, { "docid": "948fe547ba8ed0db50bbfd13031b6bc6", "score": "0.52524304", "text": "ListAvailableServices() {\n let url = `/saas/csp2`;\n return this.client.request('GET', url);\n }", "title": "" }, { "docid": "351360de2002d5e87015af3329921fc0", "score": "0.52472126", "text": "async function getProject (req, res) {\n console.log(`getting project ${req.params.id}...`)\n\n PROJECT.findAll({\n where: {\n ProfileId: 1,\n id: req.params.id\n },\n include: [DESCRIPTION, IMAGEPATH, TECH]\n }).then(projects => {\n res.send({\n project: projects[0]\n })\n })\n}", "title": "" }, { "docid": "15c2dbc92c90a33e211dcab0bb3de642", "score": "0.5241206", "text": "VOIPLineServices(packName) {\n let url = `/pack/xdsl/${packName}/voipLine/services`;\n return this.client.request('GET', url);\n }", "title": "" }, { "docid": "954f323995a5e5ac75969dff6abfcab0", "score": "0.52324146", "text": "function proj_load(cb) {\n axios.get(cfg.url+\"project/list\", axopt).then((resp) => {\n var d = resp.data;\n // debug && console.log(d);\n var arr = d.content.filter((p) => { return p.entryType == 'INTERNAL'; });\n // console.log(arr); // process.exit(1);\n debug && console.error(\"Fetch details on \"+arr.length+\" projects\");\n async.map(arr, projget, function (err, ress) {\n if (err) { console.error(\"Proj. details Error: \"+err); return cb(err, null); }\n debug && console.error(\"PROJECTS:\"+ JSON.stringify(ress, null, 2));\n // Call cb with ress.\n return cb(null, ress);\n });\n }).catch((ex) => {\n // console.log();\n console.error(\"RP proj. list Error: \"+ex);\n return cb(ex, null);\n });\n}", "title": "" }, { "docid": "1ce10a99786b4ab9e08f86756ac7e4ac", "score": "0.5222701", "text": "function getServices() {\n bkgBuyerSupplierDirectiveCtrl.ePage.Masters.serviceTypes = {\n \"Pickup\": \"PIC\",\n \"Delivery\": \"DLV\",\n \"FactoryStuffing\": \"FAS\",\n \"ExportClearance\": \"EXC\",\n \"ImportClearance\": \"IMC\",\n \"CargoInsurance\": \"CAI\"\n }\n\n var _input = {\n \"EntityRefKey\": bkgBuyerSupplierDirectiveCtrl.ePage.Entities.Header.Data.UIJobPickupAndDelivery.PK,\n };\n\n var inputObj = {\n \"FilterID\": appConfig.Entities.JobService.API.FindAll.FilterID,\n \"searchInput\": helperService.createToArrayOfObject(_input)\n }\n if (!bkgBuyerSupplierDirectiveCtrl.obj.isNew) {\n apiService.post('eAxisAPI', appConfig.Entities.JobService.API.FindAll.Url, inputObj).then(function (response) {\n if (response.data.Response) {\n bkgBuyerSupplierDirectiveCtrl.ePage.Entities.Header.Data.UIJobServices = response.data.Response\n if (bkgBuyerSupplierDirectiveCtrl.ePage.Entities.Header.Data.UIJobServices.length != 0) {\n for (var i in bkgBuyerSupplierDirectiveCtrl.ePage.Masters.serviceTypes) {\n var tempObj = _.filter(bkgBuyerSupplierDirectiveCtrl.ePage.Entities.Header.Data.UIJobServices, {\n 'ServiceCode': bkgBuyerSupplierDirectiveCtrl.ePage.Masters.serviceTypes[i]\n })[0];\n if (tempObj == undefined) {\n bkgBuyerSupplierDirectiveCtrl.ePage.Masters.serviceTypes[i] = 'false'\n } else {\n bkgBuyerSupplierDirectiveCtrl.ePage.Masters.serviceTypes[i] = tempObj.ServiceCode\n }\n }\n } else {\n for (var i in bkgBuyerSupplierDirectiveCtrl.ePage.Masters.serviceTypes) {\n bkgBuyerSupplierDirectiveCtrl.ePage.Masters.serviceTypes[i] = \"false\"\n }\n }\n }\n });\n } else {\n for (var i in bkgBuyerSupplierDirectiveCtrl.ePage.Masters.serviceTypes) {\n bkgBuyerSupplierDirectiveCtrl.ePage.Masters.serviceTypes[i] = \"false\"\n }\n }\n\n }", "title": "" }, { "docid": "42d381b97d5b9b82f1d270b18908f1b3", "score": "0.5217701", "text": "function onProjectsSuccess(response) { /*** take this func out ***/\n vm.getProjectData(vm.projectIDs[0]); /*** re-do these calls to get specific project story info ***/\n vm.getProjectStories(vm.projectIDs[0]);\n }", "title": "" }, { "docid": "ce36257a571c40e4bafd481f46d78ca7", "score": "0.5208088", "text": "function getProjectsResponse(data) {\n // response = JSON.parse(response);\n\n // add projects to the page\n for (var i = 0; i < data.length; i++) {\n addSectionToPortfolio(data[i], i);\n // addPortfolioModal(response[i], i);\n };\n}", "title": "" }, { "docid": "23739da5cce8508e0cbfa14b3a0801af", "score": "0.51963603", "text": "function getProjectById(projectName) {\n var async = $q.defer();\n\n getActiveUserProjects().then(function (projects) {\n async.resolve(projects[projectName]);\n }, function (err) {\n async.reject(err);\n });\n\n return async.promise;\n }", "title": "" }, { "docid": "f3ad9f2e3a890187bca25b685e7c0506", "score": "0.5194142", "text": "function populateProjectContainer(){\n\t\n\tvar userId = document.getElementById(\"uId\").value;\n\t\n\tif(userId){\n\t\t\n\t\t fetch(path+\"/getAllProject/\" + userId, {\n\t\t\t method: \"GET\",\n\t\t\t headers: {\n\t\t\t \"Content-Type\": \"application/json\",\n\t\t\t },\n\t\t\t })\n\t\t\t .then((response) => response.json())\n\t\t\t .then((projects) => {\n\t\t\t \t\n\t\t\t console.log(\"Success:\", projects);\n\t\t\t console.log(\"data is fetched\");\n\t\t\t if (projects != null) {\n\t\t\t \n\t\t\t \t iteratorForProject(projects);\n\t\t\t }\n\t\t\t \n\t\t\t })\n\t\t\t .catch((error) => {\n\t\t\t console.error(\"Error:\", error);\n\t\t\t return null;\n\t\t });\n\n\t}\n\n}", "title": "" }, { "docid": "d749ac2c6f091a900711a25d1cfe4270", "score": "0.5192204", "text": "function getClient(serviceAccountJson, cb) {\n // the getClient method looks for the GCLOUD_PROJECT and GOOGLE_APPLICATION_CREDENTIALS\n // environment variables if serviceAccountJson is not passed in\n google.auth\n .getClient({\n keyFilename: serviceAccountJson,\n scopes: ['https://www.googleapis.com/auth/cloud-platform'],\n })\n .then(authClient => {\n const discoveryUrl = `${DISCOVERY_API}?version=${API_VERSION}`;\n\n google.options({\n auth: authClient,\n });\n\n google\n .discoverAPI(discoveryUrl)\n .then(client => {\n cb(client);\n })\n .catch(err => {\n console.log('Error during API discovery.', err);\n });\n });\n}", "title": "" }, { "docid": "18d6886809aa9c211001ca949c5eaf28", "score": "0.5183442", "text": "function getServiceDetails(service) {\n const serviceTitle = document.getElementById('serviceTitle');\n const serviceDescription = document.getElementById('serviceDescription');\n const servicePrice = document.getElementById('servicePrice');\n const serviceId = document.getElementById('serviceId');\n\n serviceId.innerText = service.id;\n serviceTitle.innerText = service.profile;\n serviceDescription.innerText = service.description;\n servicePrice.innerText = service.price;\n}", "title": "" }, { "docid": "d65b42a231caedaa14db9bbdc97c33ef", "score": "0.51764786", "text": "find(serviceName) {\n for (let service of this.services) {\n if (this.isMatch(service, serviceName)) {\n console.debug(`Match ${serviceName}`)\n return service;\n }\n }\n }", "title": "" }, { "docid": "a77350f9592573debea4580ddb1af0f6", "score": "0.51678354", "text": "getPublicCloudsQuota(publicCloudServiceName) {\n return this.ovhApiCloudProjectQuota.query({\n serviceName: publicCloudServiceName,\n }).$promise;\n }", "title": "" }, { "docid": "dde957250f5ba73620b9630c4a33b235", "score": "0.5159711", "text": "async function getProjectCost(projectId) {\n\t\t\t\t// async function body\n\t\t\t}", "title": "" }, { "docid": "62b3bb91b8b4591f5864dcd6fe875b53", "score": "0.5157236", "text": "request_service(name, cb) {\n const rq = {\n type: 'service',\n name: name,\n };\n\n this._req(rq, (rsp) => {\n if (rsp.status != 'ok') {\n return cb(rsp.status);\n }\n\n this.services[name] = rsp.body;\n return cb(null, rsp.body);\n });\n }", "title": "" }, { "docid": "94a9d55dea7f528b2e93e76cddbad062", "score": "0.51465255", "text": "fetchProjects() {\n actions.fetchProjects();\n }", "title": "" }, { "docid": "271a919ec351ce827ba1f4c0f1304b1d", "score": "0.5134304", "text": "function getProjects()\r\n{\r\n\t\r\n\tclear();\r\n\tvar n;\r\n\r\n\tvar aux = System.Gadget.Settings.read(\"noProjects\"); \r\n\t//var aux =2;\r\n\tif ( aux == \"\" ) n = 0; else n = aux;\r\n\tprojects = new Array();\t\t\r\n\tcurrentPage = 1;\r\n\tvar cur = 0;\r\n\tfor ( var cur = 0; cur < n;cur++){ \r\n\t\tvar projectURL = System.Gadget.Settings.read(\"projectURL\"+cur); \r\n\t\tvar useAuth = System.Gadget.Settings.read(\"projectUseAuthentification\"+cur); \r\n\t\tvar userName = System.Gadget.Settings.read(\"projectUserName\"+cur); \r\n\t\tvar passwordInput = System.Gadget.Settings.read(\"projectPassword\"+cur); \r\n\t\tGetProject(projectURL,useAuth,userName,passwordInput, cur);\r\n\t}\r\n\tvar refreshTime = System.Gadget.Settings.read('refresh');\r\n\tif ( refreshTime > 0 ) setTimeout( \"getProjects();\", refreshTime );\r\n\treturn;\r\n}", "title": "" }, { "docid": "cc6d1398b662bf08a1ec789e69eef423", "score": "0.51167977", "text": "function fetchAllProjects(){\n\t \t var deferred = $q.defer();\n\t $http.get(REST_SERVICE_URI+\"/GetAllProjects\")\n\t .then(\n\t function (response) {\n\t \t self.projects=response.data;\n\t deferred.resolve(response.data);\n\t \n\t },\n\t function(errResponse){\n\t console.error('Error while fetching Users');\n\t deferred.reject(errResponse);\n\t \n\t }\n\t );\n\t // return deferred.promise;\n\t \t\n//\t \tProjectService.fetchAllUsers()\n//\t .then(\n//\t function(d) {\n//\t self.projects = d;\n//\t },\n//\t function(errResponse){\n//\t console.error('Error while fetching Users');\n//\t }\n//\t );\n\t }", "title": "" }, { "docid": "f4ccece681bce2238caf0ba7df627f50", "score": "0.51118124", "text": "get serviceName() {\n return this.getStringAttribute('service_name');\n }", "title": "" }, { "docid": "0824c25111c68eb467849afa9016e78e", "score": "0.51092386", "text": "function getService(serviceId) {\n\t$(\"#serviceCard\").html(`\t\t<div id='card' class='card border-dark' style='width: 18rem;'>\n\t\t\t\t\t\t\t\t\t\t\t<img id='cardImage' src='#' class='card-img-top' alt='Card Image'>\n\t\t\t\t\t\t\t\t\t\t\t<div class='card-body'>\n\t\t\t\t\t\t\t\t\t\t\t\t<h2 class='card-title' id='cardTitle'>&nbsp;</h4>\n\t\t\t\t\t\t\t\t\t\t\t\t<p class='card-text' id='cardText1'>&nbsp;</p>\n\t\t\t\t\t\t\t\t\t\t\t\t<p class='card-text' id='cardText2'>&nbsp;</p>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>`)\n\t\n\t// JSON file is called and the relevant object is stored in the service variable\n\t$.getJSON(`/api/services/${serviceId}`, service => {\n\t\t// Category image is dynamically added based on the category value\n\t\t$(\"#cardImage\").attr(\"src\", `images/${service.CategoryName}.png`)\n\t\t// If the category is acupuncture a badge is attached to the service name\n\t\tif (service.CategoryName == \"Acupuncture\") {\n\t\t\t$(\"#cardTitle\").html(service.ServiceName + \" <span class='badge badge-success'>New!</span>\");\n\t\t}\n\t\telse {\n\t\t\t$(\"#cardTitle\").html(service.ServiceName)\n\t\t}\n\t\t// A description of the service is added to the card here\n\t\t$(\"#cardText1\").html(service.Description);\n\t\t// if the category is massage and bodywork a price update is added to the card\n\t\tif (service.CategoryName == \"Massage and Bodywork\") {\n\t\t\t$(\"#cardText2\").html(\"<span class='onSale'>$ \" + Number(service.Price).toFixed(2) + \"</span><span class='salePrice'> $\" + (Number(service.Price) * .75).toFixed(2) + \"</span>\")\n\t\t}\n\t\telse {\n\t\t\t$(\"#cardText2\").html(\"$\" + Number(service.Price).toFixed(2));\n\t\t}\n\t\t// info card is displayed here\n\t\t$(\"#serviceCard\").show();\n\t});\n}", "title": "" }, { "docid": "0710cdc8f922371707b4eff244638ed9", "score": "0.51066613", "text": "function requestProjectRole(hostname){\n $.ajax({\n type: \"get\",\n url: 'https://' + hostname + '/services/v5/projects/' + window.location.pathname.split('/').pop() + '?fields=capabilities,account_id,id,memberships(role,person)',\n success: function(result) {\n result.memberships.forEach(function(item, index) {\n if (item.person.id == userId) {\n projectRole = item.role;\n }\n });\n $(\".metrics\").append('<tr><th>Project Role</th><th>' + projectRole + '</th></tr>');\n }\n });\n}", "title": "" }, { "docid": "92886e53fcbaa1a8fbd2d6ae12d1c7cc", "score": "0.51063174", "text": "function getProjectTechs (req, res) {\n // var techss = []\n PROJECTTECHS.findAll({\n where: {\n ProjectId: req.params.id\n }\n }).then(techs => {\n resolveTechs(techs, res)\n // res.send(techs)\n }).catch(err => {\n console.log(err)\n res.send(false)\n })\n}", "title": "" }, { "docid": "451de6b343d511349766aed42e063e02", "score": "0.5105531", "text": "function getProjects (projects) {\n // Add Flexslider to Projects Section\n $('.Projects-slider').flexslider({\n animation: 'slide',\n directionNav: true,\n slideshowSpeed: 6000000,\n prevText: '',\n nextText: ''\n });\n $('.flex-next').prependTo('.HOT-Nav-Projects');\n $('.flex-control-nav').prependTo('.HOT-Nav-Projects');\n $('.flex-prev').prependTo('.HOT-Nav-Projects');\n\n if (projects.length === 1) {\n $('.flex-next').css('display', 'none');\n }\n\n projects.forEach(function (project, i) {\n const url = tasksApi + `/projects/${project}/queries/summary/`;\n $.getJSON(url, function (projectData) {\n makeProject(projectData, i + 2);\n })\n .fail(function (err) {\n console.warn(`WARNING >> Project #${project} could not be accessed at ${url}.\\n` +\n 'The server returned the following message object:', err);\n makePlaceholderProject(project, i + 2);\n });\n });\n}", "title": "" }, { "docid": "06237ef0e4a240a075f8df10755d2308", "score": "0.50967765", "text": "VOIPEcofaxService(packName) {\n let url = `/pack/xdsl/${packName}/voipEcofax/services`;\n return this.client.request('GET', url);\n }", "title": "" }, { "docid": "f8aad01a89cbfdbf30a49d98b3e2eef6", "score": "0.5092621", "text": "function listServices() {\n $(\".services\").append(\n services.map(service => \n $(\"<li>\").text(service.service_type))\n );\n }", "title": "" }, { "docid": "aeb3c55bfe6fc090069dd90abc0f2d7d", "score": "0.509145", "text": "async function getSingleProjects(req, res) {\n try {\n const singleProject = await SingleProjects.find({})\n if (singleProject.length === 0) {\n return res.status(404).json({ message: 'no projects available' })\n }\n return res.status(200).json(singleProject)\n } catch (err) {\n res.status(500).json(err.message)\n }\n}", "title": "" }, { "docid": "c229eb26a9674ea1479f8dc23e1515f3", "score": "0.5089151", "text": "fetchProjectDetails(workspaceId, projectPath) {\n //TODO why we cannot use project path\n var projectName = projectPath[0] === '/' ? projectPath.slice(1) : projectPath;\n let promise = this.remoteProjectsAPI.details({workspaceId: workspaceId, path: projectName}).$promise;\n\n // check if it was OK or not\n let parsedResultPromise = promise.then((projectDetails) => {\n if (projectDetails) {\n this.projectDetailsMap.set(workspaceId + projectPath, projectDetails);\n }\n });\n\n return parsedResultPromise;\n }", "title": "" }, { "docid": "05136a617b6e73c4f7ca8e08afd0bc42", "score": "0.507437", "text": "fetchProjectsForWorkspaceId(workspaceId) {\n let promise = this.remoteProjectsAPI.query({workspaceId: workspaceId}).$promise;\n let updatedPromise = promise.then((projectReferences) => {\n var remoteProjects = [];\n projectReferences.forEach((projectReference) => {\n remoteProjects.push(projectReference);\n });\n\n // add the map key\n this.projectsPerWorkspaceMap.set(workspaceId, remoteProjects);\n this.projectsPerWorkspace[workspaceId] = remoteProjects;\n\n // refresh global projects list\n this.projects.length = 0;\n\n\n for (var member in this.projectsPerWorkspace) {\n let projects = this.projectsPerWorkspace[member];\n projects.forEach((project) => {\n this.projects.push(project);\n });\n }\n }, (error) => {\n if (error.status !== 304) {\n console.log(error);\n }\n });\n\n return updatedPromise;\n }", "title": "" }, { "docid": "44ded89a3c62bf4adf14d06b57987b4c", "score": "0.5071102", "text": "function getTotalProjects() {\n fetch('https://inlupp-fa.azurewebsites.net/api/total-projects')\n .then(res => res.json()) \n .then(data => {\n document.getElementById('totalProjects').innerHTML = data.projects;\n document.getElementById('totalProjects-p').innerHTML = data.growth;\n })\n}", "title": "" }, { "docid": "7812f93eb39c226691b5a0c24626e5a5", "score": "0.5066905", "text": "getProjects() {\n return []\n }", "title": "" }, { "docid": "1c92a084b9ae9cb056162f6d29bf6abb", "score": "0.5065715", "text": "GetListOfTasks(serviceName) {\n let url = `/hosting/reseller/${serviceName}/task`;\n return this.client.request('GET', url);\n }", "title": "" }, { "docid": "f2331d3e731d6af3cf50b852c3d62679", "score": "0.5058615", "text": "function initialServiceLoad(isNewInstall) {\n\n lastUpdateTimePrefix = SUConsts[getServicesKey()].prefixKey;\n lastUpdateDataPrefix = SUConsts[getServicesKey()].prefixDataKey;\n updateServiceMap();\n\n serviceRequest(SUConsts[getServicesKey()].serviceMap).then(function(response) {\n SULogger.logDebug(\"Success getting ServiceMap! \" + response);\n // Alive Usage\n SUUsages.init();\n //Get IP2Location service\n return serviceRequest(SUConsts[getServicesKey()].IP2location);\n }, function(error) {\n SULogger.logError(\"Failed!\", error);\n // Alive Usage\n SUUsages.init();\n //Get IP2Location service\n return serviceRequest(SUConsts[getServicesKey()].IP2location);\n\n }).then(function(response) {\n SULogger.logDebug(\"Success getting IP2Location \" + response);\n\n if (isNewInstall) {\n\n // Set smaller timeout to get install date\n SUConsts[getServicesKey()].SearchAPIwithCCForNewInstall.reload_interval_sec = SUConsts.SearchAPIForNewInstallIntervalInSec;\n\n //Get SearchAPIwithCCForNewInstall service\n return serviceRequest(SUConsts[getServicesKey()].SearchAPIwithCCForNewInstall);\n } else {\n\n //Get SearchAPIwithCC service\n var currInstallDate = localStorage.getItem(SUConsts.installDateKey);\n return serviceRequest(SUConsts[getServicesKey()].SearchAPIwithCC, currInstallDate);\n }\n }, function(error) {\n SULogger.logError(\"Failed getting IP2Location \", error);\n\n if (isNewInstall) {\n\n SUConsts[getServicesKey()].SearchAPIwithCCForNewInstall.reload_interval_sec = SUConsts.SearchAPIForNewInstallIntervalInSec;\n\n return serviceRequest(SUConsts[getServicesKey()].SearchAPIwithoutCCForNewInstall);\n } else {\n var currInstallDate = localStorage.getItem(SUConsts.installDateKey);\n\n return serviceRequest(SUConsts[getServicesKey()].SearchAPIwithoutCC, currInstallDate);\n }\n\n }).then(function(response) {\n SULogger.logDebug(\"Success getting SearchAPI \" + response);\n }, function(error) {\n SULogger.logError(\"Failed!\", error);\n });\n }", "title": "" } ]
6af6d220383a33c955b3f903dfebde6e
=========================================================================== For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. (It will be regenerated if this run of deflate switches away from Huffman.)
[ { "docid": "a08189fb75fc5f8926b970c0a2ffb73c", "score": "0.0", "text": "function deflate_huff(s, flush) {\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}", "title": "" } ]
[ { "docid": "37be4fc1b71f206e9d2f05ebf4ce6736", "score": "0.6772932", "text": "function deflate_fast(flush) {\n // short hash_head = 0; // head of the hash chain\n var hash_head = 0; // head of the hash chain\n\n var bflush; // set if current block must be flushed\n // eslint-disable-next-line no-constant-condition\n\n while (true) {\n // Make sure that we always have enough lookahead, except\n // at the end of the input file. We need MAX_MATCH bytes\n // for the next match, plus MIN_MATCH bytes to insert the\n // string following the next match.\n if (lookahead < MIN_LOOKAHEAD) {\n fill_window();\n\n if (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH$1) {\n return NeedMore;\n }\n\n if (lookahead === 0) break; // flush the current block\n } // Insert the string win[strstart .. strstart+2] in the\n // dictionary, and set hash_head to the head of the hash chain:\n\n\n if (lookahead >= MIN_MATCH) {\n ins_h = (ins_h << hash_shift ^ win[strstart + (MIN_MATCH - 1)] & 0xff) & hash_mask; // prev[strstart&w_mask]=hash_head=head[ins_h];\n\n hash_head = head[ins_h] & 0xffff;\n prev[strstart & w_mask] = head[ins_h];\n head[ins_h] = strstart;\n } // Find the longest match, discarding those <= prev_length.\n // At this point we have always match_length < MIN_MATCH\n\n\n if (hash_head !== 0 && (strstart - hash_head & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n // To simplify the code, we prevent matches with the string\n // of win index 0 (in particular we have to avoid a match\n // of the string with itself at the start of the input file).\n if (strategy != Z_HUFFMAN_ONLY) {\n match_length = longest_match(hash_head);\n } // longest_match() sets match_start\n\n }\n\n if (match_length >= MIN_MATCH) {\n // check_match(strstart, match_start, match_length);\n bflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n lookahead -= match_length; // Insert new strings in the hash table only if the match length\n // is not too large. This saves time but degrades compression.\n\n if (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n match_length--; // string at strstart already in hash table\n\n do {\n strstart++;\n ins_h = (ins_h << hash_shift ^ win[strstart + (MIN_MATCH - 1)] & 0xff) & hash_mask; // prev[strstart&w_mask]=hash_head=head[ins_h];\n\n hash_head = head[ins_h] & 0xffff;\n prev[strstart & w_mask] = head[ins_h];\n head[ins_h] = strstart; // strstart never exceeds WSIZE-MAX_MATCH, so there are\n // always MIN_MATCH bytes ahead.\n } while (--match_length !== 0);\n\n strstart++;\n } else {\n strstart += match_length;\n match_length = 0;\n ins_h = win[strstart] & 0xff;\n ins_h = (ins_h << hash_shift ^ win[strstart + 1] & 0xff) & hash_mask; // If lookahead < MIN_MATCH, ins_h is garbage, but it does\n // not\n // matter since it will be recomputed at next deflate call.\n }\n } else {\n // No match, output a literal byte\n bflush = _tr_tally(0, win[strstart] & 0xff);\n lookahead--;\n strstart++;\n }\n\n if (bflush) {\n flush_block_only(false);\n if (strm.avail_out === 0) return NeedMore;\n }\n }\n\n flush_block_only(flush == Z_FINISH$1);\n\n if (strm.avail_out === 0) {\n if (flush == Z_FINISH$1) return FinishStarted;else return NeedMore;\n }\n\n return flush == Z_FINISH$1 ? FinishDone : BlockDone;\n } // Same as above, but achieves better compression. We use a lazy", "title": "" }, { "docid": "bfd465cf147eb32dfe7f7cf1d22072e9", "score": "0.6704512", "text": "function deflate_slow(flush) {\n // short hash_head = 0; // head of hash chain\n var hash_head = 0; // head of hash chain\n\n var bflush; // set if current block must be flushed\n\n var max_insert; // Process the input block.\n // eslint-disable-next-line no-constant-condition\n\n while (true) {\n // Make sure that we always have enough lookahead, except\n // at the end of the input file. We need MAX_MATCH bytes\n // for the next match, plus MIN_MATCH bytes to insert the\n // string following the next match.\n if (lookahead < MIN_LOOKAHEAD) {\n fill_window();\n\n if (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH$1) {\n return NeedMore;\n }\n\n if (lookahead === 0) break; // flush the current block\n } // Insert the string win[strstart .. strstart+2] in the\n // dictionary, and set hash_head to the head of the hash chain:\n\n\n if (lookahead >= MIN_MATCH) {\n ins_h = (ins_h << hash_shift ^ win[strstart + (MIN_MATCH - 1)] & 0xff) & hash_mask; // prev[strstart&w_mask]=hash_head=head[ins_h];\n\n hash_head = head[ins_h] & 0xffff;\n prev[strstart & w_mask] = head[ins_h];\n head[ins_h] = strstart;\n } // Find the longest match, discarding those <= prev_length.\n\n\n prev_length = match_length;\n prev_match = match_start;\n match_length = MIN_MATCH - 1;\n\n if (hash_head !== 0 && prev_length < max_lazy_match && (strstart - hash_head & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n // To simplify the code, we prevent matches with the string\n // of win index 0 (in particular we have to avoid a match\n // of the string with itself at the start of the input file).\n if (strategy != Z_HUFFMAN_ONLY) {\n match_length = longest_match(hash_head);\n } // longest_match() sets match_start\n\n\n if (match_length <= 5 && (strategy == Z_FILTERED || match_length == MIN_MATCH && strstart - match_start > 4096)) {\n // If prev_match is also MIN_MATCH, match_start is garbage\n // but we will ignore the current match anyway.\n match_length = MIN_MATCH - 1;\n }\n } // If there was a match at the previous step and the current\n // match is not better, output the previous match:\n\n\n if (prev_length >= MIN_MATCH && match_length <= prev_length) {\n max_insert = strstart + lookahead - MIN_MATCH; // Do not insert strings in hash table beyond this.\n // check_match(strstart-1, prev_match, prev_length);\n\n bflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH); // Insert in hash table all strings up to the end of the match.\n // strstart-1 and strstart are already inserted. If there is not\n // enough lookahead, the last two strings are not inserted in\n // the hash table.\n\n lookahead -= prev_length - 1;\n prev_length -= 2;\n\n do {\n if (++strstart <= max_insert) {\n ins_h = (ins_h << hash_shift ^ win[strstart + (MIN_MATCH - 1)] & 0xff) & hash_mask; // prev[strstart&w_mask]=hash_head=head[ins_h];\n\n hash_head = head[ins_h] & 0xffff;\n prev[strstart & w_mask] = head[ins_h];\n head[ins_h] = strstart;\n }\n } while (--prev_length !== 0);\n\n match_available = 0;\n match_length = MIN_MATCH - 1;\n strstart++;\n\n if (bflush) {\n flush_block_only(false);\n if (strm.avail_out === 0) return NeedMore;\n }\n } else if (match_available !== 0) {\n // If there was no match at the previous position, output a\n // single literal. If there was a match but the current match\n // is longer, truncate the previous match to a single literal.\n bflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n if (bflush) {\n flush_block_only(false);\n }\n\n strstart++;\n lookahead--;\n if (strm.avail_out === 0) return NeedMore;\n } else {\n // There is no previous match to compare with, wait for\n // the next step to decide.\n match_available = 1;\n strstart++;\n lookahead--;\n }\n }\n\n if (match_available !== 0) {\n bflush = _tr_tally(0, win[strstart - 1] & 0xff);\n match_available = 0;\n }\n\n flush_block_only(flush == Z_FINISH$1);\n\n if (strm.avail_out === 0) {\n if (flush == Z_FINISH$1) return FinishStarted;else return NeedMore;\n }\n\n return flush == Z_FINISH$1 ? FinishDone : BlockDone;\n }", "title": "" }, { "docid": "e9c0c25f0d8416990400e315f11f4595", "score": "0.6582592", "text": "function deflate_fast(flush) {\n\t\t\t// short hash_head = 0; // head of the hash chain\n\t\t\tvar hash_head = 0; // head of the hash chain\n\t\t\tvar bflush; // set if current block must be flushed\n\n\t\t\twhile (true) {\n\t\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t\t// string following the next match.\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\t\tfill_window();\n\t\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t\t}\n\t\t\t\t\tif (lookahead === 0)\n\t\t\t\t\t\tbreak; // flush the current block\n\t\t\t\t}\n\n\t\t\t\t// Insert the string window[strstart .. strstart+2] in the\n\t\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (window[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t}\n\n\t\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t\t// of window index 0 (in particular we have to avoid a match\n\t\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t\t}\n\t\t\t\t\t// longest_match() sets match_start\n\t\t\t\t}\n\t\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (window[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\t\tstrstart++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\t\tins_h = window[strstart] & 0xff;\n\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (window[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t\t// not\n\t\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// No match, output a literal byte\n\n\t\t\t\t\tbflush = _tr_tally(0, window[strstart] & 0xff);\n\t\t\t\t\tlookahead--;\n\t\t\t\t\tstrstart++;\n\t\t\t\t}\n\t\t\t\tif (bflush) {\n\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tflush_block_only(flush == Z_FINISH);\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\tif (flush == Z_FINISH)\n\t\t\t\t\treturn FinishStarted;\n\t\t\t\telse\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t\t}", "title": "" }, { "docid": "ec097776686cb5e94c81cb386fc378c1", "score": "0.64959663", "text": "function deflate_slow(flush) {\n\t\t\t// short hash_head = 0; // head of hash chain\n\t\t\tvar hash_head = 0; // head of hash chain\n\t\t\tvar bflush; // set if current block must be flushed\n\t\t\tvar max_insert;\n\n\t\t\t// Process the input block.\n\t\t\twhile (true) {\n\t\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t\t// string following the next match.\n\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\t\tfill_window();\n\t\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t\t}\n\t\t\t\t\tif (lookahead === 0)\n\t\t\t\t\t\tbreak; // flush the current block\n\t\t\t\t}\n\n\t\t\t\t// Insert the string window[strstart .. strstart+2] in the\n\t\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (window[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t}\n\n\t\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t\tprev_length = match_length;\n\t\t\t\tprev_match = match_start;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t\t// of window index 0 (in particular we have to avoid a match\n\t\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t\t}\n\t\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If there was a match at the previous step and the current\n\t\t\t\t// match is not better, output the previous match:\n\t\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t\t// the hash table.\n\t\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\t\tprev_length -= 2;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (window[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t\t}\n\t\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\t\tmatch_available = 0;\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t\tstrstart++;\n\n\t\t\t\t\tif (bflush) {\n\t\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t\t}\n\t\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\t\tbflush = _tr_tally(0, window[strstart - 1] & 0xff);\n\n\t\t\t\t\tif (bflush) {\n\t\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\t}\n\t\t\t\t\tstrstart++;\n\t\t\t\t\tlookahead--;\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t} else {\n\t\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t\t// the next step to decide.\n\n\t\t\t\t\tmatch_available = 1;\n\t\t\t\t\tstrstart++;\n\t\t\t\t\tlookahead--;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (match_available !== 0) {\n\t\t\t\tbflush = _tr_tally(0, window[strstart - 1] & 0xff);\n\t\t\t\tmatch_available = 0;\n\t\t\t}\n\t\t\tflush_block_only(flush == Z_FINISH);\n\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\tif (flush == Z_FINISH)\n\t\t\t\t\treturn FinishStarted;\n\t\t\t\telse\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\n\t\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t\t}", "title": "" }, { "docid": "5ee4551eb7868fd0fe274b8eda10e14c", "score": "0.64872855", "text": "function deflate_fast(flush) {\n\t\t\t// short hash_head = 0; // head of the hash chain\n\t\t\tlet hash_head = 0; // head of the hash chain\n\t\t\tlet bflush; // set if current block must be flushed\n\n\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\twhile (true) {\n\t\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t\t// string following the next match.\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\t\tfill_window();\n\t\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH$1) {\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t\t}\n\t\t\t\t\tif (lookahead === 0)\n\t\t\t\t\t\tbreak; // flush the current block\n\t\t\t\t}\n\n\t\t\t\t// Insert the string window[strstart .. strstart+2] in the\n\t\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (window[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t}\n\n\t\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t\t// of window index 0 (in particular we have to avoid a match\n\t\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t\t}\n\t\t\t\t\t// longest_match() sets match_start\n\t\t\t\t}\n\t\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (window[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\t\tstrstart++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\t\tins_h = window[strstart] & 0xff;\n\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (window[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t\t// not\n\t\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// No match, output a literal byte\n\n\t\t\t\t\tbflush = _tr_tally(0, window[strstart] & 0xff);\n\t\t\t\t\tlookahead--;\n\t\t\t\t\tstrstart++;\n\t\t\t\t}\n\t\t\t\tif (bflush) {\n\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tflush_block_only(flush == Z_FINISH$1);\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\tif (flush == Z_FINISH$1)\n\t\t\t\t\treturn FinishStarted;\n\t\t\t\telse\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t\treturn flush == Z_FINISH$1 ? FinishDone : BlockDone;\n\t\t}", "title": "" }, { "docid": "7863672815ed37014515d096934a9e40", "score": "0.63639474", "text": "function deflate_slow(s,flush){var hash_head; /* head of hash chain */var bflush; /* set if current block must be flushed */var max_insert; /* Process the input block. */for(;;) { /* Make sure that we always have enough lookahead, except\n\t * at the end of the input file. We need MAX_MATCH bytes\n\t * for the next match, plus MIN_MATCH bytes to insert the\n\t * string following the next match.\n\t */if(s.lookahead < MIN_LOOKAHEAD){fill_window(s);if(s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH){return BS_NEED_MORE;}if(s.lookahead === 0){break;} /* flush the current block */} /* Insert the string window[strstart .. strstart+2] in the\n\t * dictionary, and set hash_head to the head of the hash chain:\n\t */hash_head = 0; /*NIL*/if(s.lookahead >= MIN_MATCH){ /*** INSERT_STRING(s, s.strstart, hash_head); ***/s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];s.head[s.ins_h] = s.strstart; /***/} /* Find the longest match, discarding those <= prev_length.\n\t */s.prev_length = s.match_length;s.prev_match = s.match_start;s.match_length = MIN_MATCH - 1;if(hash_head !== 0 /*NIL*/ && s.prev_length < s.max_lazy_match && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD /*MAX_DIST(s)*/){ /* To simplify the code, we prevent matches with the string\n\t * of window index 0 (in particular we have to avoid a match\n\t * of the string with itself at the start of the input file).\n\t */s.match_length = longest_match(s,hash_head); /* longest_match() sets match_start */if(s.match_length <= 5 && (s.strategy === Z_FILTERED || s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096) /*TOO_FAR*/){ /* If prev_match is also MIN_MATCH, match_start is garbage\n\t * but we will ignore the current match anyway.\n\t */s.match_length = MIN_MATCH - 1;}} /* If there was a match at the previous step and the current\n\t * match is not better, output the previous match:\n\t */if(s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length){max_insert = s.strstart + s.lookahead - MIN_MATCH; /* Do not insert strings in hash table beyond this. */ //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n/***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n\t s.prev_length - MIN_MATCH, bflush);***/bflush = trees._tr_tally(s,s.strstart - 1 - s.prev_match,s.prev_length - MIN_MATCH); /* Insert in hash table all strings up to the end of the match.\n\t * strstart-1 and strstart are already inserted. If there is not\n\t * enough lookahead, the last two strings are not inserted in\n\t * the hash table.\n\t */s.lookahead -= s.prev_length - 1;s.prev_length -= 2;do {if(++s.strstart <= max_insert){ /*** INSERT_STRING(s, s.strstart, hash_head); ***/s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];s.head[s.ins_h] = s.strstart; /***/}}while(--s.prev_length !== 0);s.match_available = 0;s.match_length = MIN_MATCH - 1;s.strstart++;if(bflush){ /*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out === 0){return BS_NEED_MORE;} /***/}}else if(s.match_available){ /* If there was no match at the previous position, output a\n\t * single literal. If there was a match but the current match\n\t * is longer, truncate the previous match to a single literal.\n\t */ //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n/*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/bflush = trees._tr_tally(s,0,s.window[s.strstart - 1]);if(bflush){ /*** FLUSH_BLOCK_ONLY(s, 0) ***/flush_block_only(s,false); /***/}s.strstart++;s.lookahead--;if(s.strm.avail_out === 0){return BS_NEED_MORE;}}else { /* There is no previous match to compare with, wait for\n\t * the next step to decide.\n\t */s.match_available = 1;s.strstart++;s.lookahead--;}} //Assert (flush != Z_NO_FLUSH, \"no flush?\");\nif(s.match_available){ //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n/*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/bflush = trees._tr_tally(s,0,s.window[s.strstart - 1]);s.match_available = 0;}s.insert = s.strstart < MIN_MATCH - 1?s.strstart:MIN_MATCH - 1;if(flush === Z_FINISH){ /*** FLUSH_BLOCK(s, 1); ***/flush_block_only(s,true);if(s.strm.avail_out === 0){return BS_FINISH_STARTED;} /***/return BS_FINISH_DONE;}if(s.last_lit){ /*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out === 0){return BS_NEED_MORE;} /***/}return BS_BLOCK_DONE;}", "title": "" }, { "docid": "5fa246b79bb45d7f4d26128e95f7a0de", "score": "0.63443565", "text": "function deflate_fast(s,flush){var hash_head;/* head of the hash chain */var bflush;/* set if current block must be flushed */for(;;){/* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */if(s.lookahead<MIN_LOOKAHEAD){fill_window(s);if(s.lookahead<MIN_LOOKAHEAD&&flush===Z_NO_FLUSH){return BS_NEED_MORE;}if(s.lookahead===0){break;/* flush the current block */}}/* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */hash_head=0/*NIL*/;if(s.lookahead>=MIN_MATCH){/*** INSERT_STRING(s, s.strstart, hash_head); ***/s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+MIN_MATCH-1])&s.hash_mask;hash_head=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h];s.head[s.ins_h]=s.strstart;/***/}/* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */if(hash_head!==0/*NIL*/&&s.strstart-hash_head<=s.w_size-MIN_LOOKAHEAD){/* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */s.match_length=longest_match(s,hash_head);/* longest_match() sets match_start */}if(s.match_length>=MIN_MATCH){// check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n/*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/bflush=trees._tr_tally(s,s.strstart-s.match_start,s.match_length-MIN_MATCH);s.lookahead-=s.match_length;/* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */if(s.match_length<=s.max_lazy_match/*max_insert_length*/&&s.lookahead>=MIN_MATCH){s.match_length--;/* string at strstart already in table */do{s.strstart++;/*** INSERT_STRING(s, s.strstart, hash_head); ***/s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+MIN_MATCH-1])&s.hash_mask;hash_head=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h];s.head[s.ins_h]=s.strstart;/***/ /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */}while(--s.match_length!==0);s.strstart++;}else{s.strstart+=s.match_length;s.match_length=0;s.ins_h=s.window[s.strstart];/* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+1])&s.hash_mask;//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n/* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */}}else{/* No match, output a literal byte */ //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n/*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/bflush=trees._tr_tally(s,0,s.window[s.strstart]);s.lookahead--;s.strstart++;}if(bflush){/*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE;}/***/}}s.insert=s.strstart<MIN_MATCH-1?s.strstart:MIN_MATCH-1;if(flush===Z_FINISH){/*** FLUSH_BLOCK(s, 1); ***/flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED;}/***/return BS_FINISH_DONE;}if(s.last_lit){/*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE;}/***/}return BS_BLOCK_DONE;}", "title": "" }, { "docid": "35e2bcbc736b0fd4bef5b462eb3c2bd6", "score": "0.6335691", "text": "function deflate_slow(s,flush){var hash_head;/* head of hash chain */var bflush;/* set if current block must be flushed */var max_insert;/* Process the input block. */for(;;){/* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */if(s.lookahead<MIN_LOOKAHEAD){fill_window(s);if(s.lookahead<MIN_LOOKAHEAD&&flush===Z_NO_FLUSH){return BS_NEED_MORE;}if(s.lookahead===0){break;}/* flush the current block */}/* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */hash_head=0/*NIL*/;if(s.lookahead>=MIN_MATCH){/*** INSERT_STRING(s, s.strstart, hash_head); ***/s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+MIN_MATCH-1])&s.hash_mask;hash_head=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h];s.head[s.ins_h]=s.strstart;/***/}/* Find the longest match, discarding those <= prev_length.\n */s.prev_length=s.match_length;s.prev_match=s.match_start;s.match_length=MIN_MATCH-1;if(hash_head!==0/*NIL*/&&s.prev_length<s.max_lazy_match&&s.strstart-hash_head<=s.w_size-MIN_LOOKAHEAD/*MAX_DIST(s)*/){/* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */s.match_length=longest_match(s,hash_head);/* longest_match() sets match_start */if(s.match_length<=5&&(s.strategy===Z_FILTERED||s.match_length===MIN_MATCH&&s.strstart-s.match_start>4096/*TOO_FAR*/)){/* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */s.match_length=MIN_MATCH-1;}}/* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */if(s.prev_length>=MIN_MATCH&&s.match_length<=s.prev_length){max_insert=s.strstart+s.lookahead-MIN_MATCH;/* Do not insert strings in hash table beyond this. */ //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n/***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/bflush=trees._tr_tally(s,s.strstart-1-s.prev_match,s.prev_length-MIN_MATCH);/* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */s.lookahead-=s.prev_length-1;s.prev_length-=2;do{if(++s.strstart<=max_insert){/*** INSERT_STRING(s, s.strstart, hash_head); ***/s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+MIN_MATCH-1])&s.hash_mask;hash_head=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h];s.head[s.ins_h]=s.strstart;/***/}}while(--s.prev_length!==0);s.match_available=0;s.match_length=MIN_MATCH-1;s.strstart++;if(bflush){/*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE;}/***/}}else if(s.match_available){/* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */ //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n/*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/bflush=trees._tr_tally(s,0,s.window[s.strstart-1]);if(bflush){/*** FLUSH_BLOCK_ONLY(s, 0) ***/flush_block_only(s,false);/***/}s.strstart++;s.lookahead--;if(s.strm.avail_out===0){return BS_NEED_MORE;}}else{/* There is no previous match to compare with, wait for\n * the next step to decide.\n */s.match_available=1;s.strstart++;s.lookahead--;}}//Assert (flush != Z_NO_FLUSH, \"no flush?\");\nif(s.match_available){//Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n/*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/bflush=trees._tr_tally(s,0,s.window[s.strstart-1]);s.match_available=0;}s.insert=s.strstart<MIN_MATCH-1?s.strstart:MIN_MATCH-1;if(flush===Z_FINISH){/*** FLUSH_BLOCK(s, 1); ***/flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED;}/***/return BS_FINISH_DONE;}if(s.last_lit){/*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE;}/***/}return BS_BLOCK_DONE;}", "title": "" }, { "docid": "f6597ef0901033a894a04dca43ff28fd", "score": "0.63223404", "text": "function deflate_fast() {\n\t\t\twhile (lookahead !== 0 && qhead === null) {\n\t\t\t\tvar flush; // set if current block must be flushed\n\n\t\t\t\t// Insert the string window[strstart .. strstart+2] in the\n\t\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\t\tINSERT_STRING();\n\n\t\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t\t// At this point we have always match_length < MIN_MATCH\n\t\t\t\tif (hash_head !== NIL && strstart - hash_head <= MAX_DIST) {\n\t\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t\t// of window index 0 (in particular we have to avoid a match\n\t\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t\t// longest_match() sets match_start */\n\t\t\t\t\tif (match_length > lookahead) {\n\t\t\t\t\t\tmatch_length = lookahead;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\t\tflush = ct_tally(strstart - match_start, match_length - MIN_MATCH);\n\t\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\t\tif (match_length <= max_lazy_match) {\n\t\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tstrstart++;\n\t\t\t\t\t\t\tINSERT_STRING();\n\t\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t\t// always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH\n\t\t\t\t\t\t\t// these bytes are garbage, but it does not matter since\n\t\t\t\t\t\t\t// the next lookahead bytes will be emitted as literals.\n\t\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\t\tstrstart++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\t\tins_h = window[strstart] & 0xff;\n\t\t\t\t\t\t// UPDATE_HASH(ins_h, window[strstart + 1]);\n\t\t\t\t\t\tins_h = ((ins_h << H_SHIFT) ^ (window[strstart + 1] & 0xff)) & HASH_MASK;\n\n\t\t\t\t\t//#if MIN_MATCH !== 3\n\t\t\t\t\t//\t\tCall UPDATE_HASH() MIN_MATCH-3 more times\n\t\t\t\t\t//#endif\n\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// No match, output a literal byte */\n\t\t\t\t\tflush = ct_tally(0, window[strstart] & 0xff);\n\t\t\t\t\tlookahead--;\n\t\t\t\t\tstrstart++;\n\t\t\t\t}\n\t\t\t\tif (flush) {\n\t\t\t\t\tflush_block(0);\n\t\t\t\t\tblock_start = strstart;\n\t\t\t\t}\n\n\t\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t\t// string following the next match.\n\t\t\t\twhile (lookahead < MIN_LOOKAHEAD && !eofile) {\n\t\t\t\t\tfill_window();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "7870df8c86327255f0f13859eab1d829", "score": "0.63171244", "text": "function deflate_fast(s,flush){var hash_head; /* head of the hash chain */var bflush; /* set if current block must be flushed */for(;;) { /* Make sure that we always have enough lookahead, except\n\t * at the end of the input file. We need MAX_MATCH bytes\n\t * for the next match, plus MIN_MATCH bytes to insert the\n\t * string following the next match.\n\t */if(s.lookahead < MIN_LOOKAHEAD){fill_window(s);if(s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH){return BS_NEED_MORE;}if(s.lookahead === 0){break; /* flush the current block */}} /* Insert the string window[strstart .. strstart+2] in the\n\t * dictionary, and set hash_head to the head of the hash chain:\n\t */hash_head = 0; /*NIL*/if(s.lookahead >= MIN_MATCH){ /*** INSERT_STRING(s, s.strstart, hash_head); ***/s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];s.head[s.ins_h] = s.strstart; /***/} /* Find the longest match, discarding those <= prev_length.\n\t * At this point we have always match_length < MIN_MATCH\n\t */if(hash_head !== 0 /*NIL*/ && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD){ /* To simplify the code, we prevent matches with the string\n\t * of window index 0 (in particular we have to avoid a match\n\t * of the string with itself at the start of the input file).\n\t */s.match_length = longest_match(s,hash_head); /* longest_match() sets match_start */}if(s.match_length >= MIN_MATCH){ // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n/*** _tr_tally_dist(s, s.strstart - s.match_start,\n\t s.match_length - MIN_MATCH, bflush); ***/bflush = trees._tr_tally(s,s.strstart - s.match_start,s.match_length - MIN_MATCH);s.lookahead -= s.match_length; /* Insert new strings in the hash table only if the match length\n\t * is not too large. This saves time but degrades compression.\n\t */if(s.match_length <= s.max_lazy_match /*max_insert_length*/ && s.lookahead >= MIN_MATCH){s.match_length--; /* string at strstart already in table */do {s.strstart++; /*** INSERT_STRING(s, s.strstart, hash_head); ***/s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];s.head[s.ins_h] = s.strstart; /***/ /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t * always MIN_MATCH bytes ahead.\n\t */}while(--s.match_length !== 0);s.strstart++;}else {s.strstart += s.match_length;s.match_length = 0;s.ins_h = s.window[s.strstart]; /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + 1]) & s.hash_mask; //#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n/* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n\t * matter since it will be recomputed at next deflate call.\n\t */}}else { /* No match, output a literal byte */ //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n/*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/bflush = trees._tr_tally(s,0,s.window[s.strstart]);s.lookahead--;s.strstart++;}if(bflush){ /*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out === 0){return BS_NEED_MORE;} /***/}}s.insert = s.strstart < MIN_MATCH - 1?s.strstart:MIN_MATCH - 1;if(flush === Z_FINISH){ /*** FLUSH_BLOCK(s, 1); ***/flush_block_only(s,true);if(s.strm.avail_out === 0){return BS_FINISH_STARTED;} /***/return BS_FINISH_DONE;}if(s.last_lit){ /*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out === 0){return BS_NEED_MORE;} /***/}return BS_BLOCK_DONE;}", "title": "" }, { "docid": "ba912346bda0f4873ff4857e244b77d5", "score": "0.6312613", "text": "function deflate_huff(s,flush){var bflush; /* set if current block must be flushed */for(;;) { /* Make sure that we have a literal to write. */if(s.lookahead === 0){fill_window(s);if(s.lookahead === 0){if(flush === Z_NO_FLUSH){return BS_NEED_MORE;}break; /* flush the current block */}} /* Output a literal byte */s.match_length = 0; //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n/*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/bflush = trees._tr_tally(s,0,s.window[s.strstart]);s.lookahead--;s.strstart++;if(bflush){ /*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out === 0){return BS_NEED_MORE;} /***/}}s.insert = 0;if(flush === Z_FINISH){ /*** FLUSH_BLOCK(s, 1); ***/flush_block_only(s,true);if(s.strm.avail_out === 0){return BS_FINISH_STARTED;} /***/return BS_FINISH_DONE;}if(s.last_lit){ /*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out === 0){return BS_NEED_MORE;} /***/}return BS_BLOCK_DONE;}", "title": "" }, { "docid": "39d3eb427d406db4ac7956f186e744f6", "score": "0.6300917", "text": "function deflate_huff(s,flush){var bflush;/* set if current block must be flushed */for(;;){/* Make sure that we have a literal to write. */if(s.lookahead===0){fill_window(s);if(s.lookahead===0){if(flush===Z_NO_FLUSH){return BS_NEED_MORE;}break;/* flush the current block */}}/* Output a literal byte */s.match_length=0;//Tracevv((stderr,\"%c\", s->window[s->strstart]));\n/*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/bflush=trees._tr_tally(s,0,s.window[s.strstart]);s.lookahead--;s.strstart++;if(bflush){/*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE;}/***/}}s.insert=0;if(flush===Z_FINISH){/*** FLUSH_BLOCK(s, 1); ***/flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED;}/***/return BS_FINISH_DONE;}if(s.last_lit){/*** FLUSH_BLOCK(s, 0); ***/flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE;}/***/}return BS_BLOCK_DONE;}", "title": "" }, { "docid": "089de3d5a95902ba60afd05f61545bfb", "score": "0.6295362", "text": "function deflate_fast() {\n\t\twhile (lookahead !== 0 && qhead === null) {\n\t\t\tvar flush; // set if current block must be flushed\n\n\t\t\t// Insert the string window[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tINSERT_STRING();\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\t\t\tif (hash_head !== NIL && strstart - hash_head <= MAX_DIST) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of window index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t// longest_match() sets match_start */\n\t\t\t\tif (match_length > lookahead) {\n\t\t\t\t\tmatch_length = lookahead;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tflush = ct_tally(strstart - match_start, match_length - MIN_MATCH);\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\t\t\t\t\t\tINSERT_STRING();\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH\n\t\t\t\t\t\t// these bytes are garbage, but it does not matter since\n\t\t\t\t\t\t// the next lookahead bytes will be emitted as literals.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = window[strstart] & 0xff;\n\t\t\t\t\t// UPDATE_HASH(ins_h, window[strstart + 1]);\n\t\t\t\t\tins_h = ((ins_h << H_SHIFT) ^ (window[strstart + 1] & 0xff)) & HASH_MASK;\n\n\t\t\t\t//#if MIN_MATCH !== 3\n\t\t\t\t//\t\tCall UPDATE_HASH() MIN_MATCH-3 more times\n\t\t\t\t//#endif\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte */\n\t\t\t\tflush = ct_tally(0, window[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (flush) {\n\t\t\t\tflush_block(0);\n\t\t\t\tblock_start = strstart;\n\t\t\t}\n\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\twhile (lookahead < MIN_LOOKAHEAD && !eofile) {\n\t\t\t\tfill_window();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "089de3d5a95902ba60afd05f61545bfb", "score": "0.6295362", "text": "function deflate_fast() {\n\t\twhile (lookahead !== 0 && qhead === null) {\n\t\t\tvar flush; // set if current block must be flushed\n\n\t\t\t// Insert the string window[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tINSERT_STRING();\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\t\t\tif (hash_head !== NIL && strstart - hash_head <= MAX_DIST) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of window index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t// longest_match() sets match_start */\n\t\t\t\tif (match_length > lookahead) {\n\t\t\t\t\tmatch_length = lookahead;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tflush = ct_tally(strstart - match_start, match_length - MIN_MATCH);\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\t\t\t\t\t\tINSERT_STRING();\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH\n\t\t\t\t\t\t// these bytes are garbage, but it does not matter since\n\t\t\t\t\t\t// the next lookahead bytes will be emitted as literals.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = window[strstart] & 0xff;\n\t\t\t\t\t// UPDATE_HASH(ins_h, window[strstart + 1]);\n\t\t\t\t\tins_h = ((ins_h << H_SHIFT) ^ (window[strstart + 1] & 0xff)) & HASH_MASK;\n\n\t\t\t\t//#if MIN_MATCH !== 3\n\t\t\t\t//\t\tCall UPDATE_HASH() MIN_MATCH-3 more times\n\t\t\t\t//#endif\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte */\n\t\t\t\tflush = ct_tally(0, window[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (flush) {\n\t\t\t\tflush_block(0);\n\t\t\t\tblock_start = strstart;\n\t\t\t}\n\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\twhile (lookahead < MIN_LOOKAHEAD && !eofile) {\n\t\t\t\tfill_window();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "0254e73b118c0601762c6971ca33be6f", "score": "0.6162112", "text": "function _tr_tally(s,dist,lc)// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{//var out_length, in_length, dcode;\ns.pending_buf[s.d_buf+s.last_lit*2]=dist>>>8&0xff;s.pending_buf[s.d_buf+s.last_lit*2+1]=dist&0xff;s.pending_buf[s.l_buf+s.last_lit]=lc&0xff;s.last_lit++;if(dist===0){/* lc is the unmatched char */s.dyn_ltree[lc*2]/*.Freq*/++;}else{s.matches++;/* Here, lc is the match length - MIN_MATCH */dist--;/* dist = match distance - 1 */ //Assert((ush)dist < (ush)MAX_DIST(s) &&\n// (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n// (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\ns.dyn_ltree[(_length_code[lc]+LITERALS+1)*2]/*.Freq*/++;s.dyn_dtree[d_code(dist)*2]/*.Freq*/++;}// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\nreturn s.last_lit===s.lit_bufsize-1;/* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */}", "title": "" }, { "docid": "374dd75d9fc3ce07cf419855772ae077", "score": "0.6106779", "text": "function deflate_slow(flush) {\n\t\t\t// short hash_head = 0; // head of hash chain\n\t\t\tlet hash_head = 0; // head of hash chain\n\t\t\tlet bflush; // set if current block must be flushed\n\t\t\tlet max_insert;\n\n\t\t\t// Process the input block.\n\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\twhile (true) {\n\t\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t\t// string following the next match.\n\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\t\tfill_window();\n\t\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH$1) {\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t\t}\n\t\t\t\t\tif (lookahead === 0)\n\t\t\t\t\t\tbreak; // flush the current block\n\t\t\t\t}\n\n\t\t\t\t// Insert the string window[strstart .. strstart+2] in the\n\t\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (window[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t}\n\n\t\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t\tprev_length = match_length;\n\t\t\t\tprev_match = match_start;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t\t// of window index 0 (in particular we have to avoid a match\n\t\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t\t}\n\t\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If there was a match at the previous step and the current\n\t\t\t\t// match is not better, output the previous match:\n\t\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t\t// the hash table.\n\t\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\t\tprev_length -= 2;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (window[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t\t}\n\t\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\t\tmatch_available = 0;\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t\tstrstart++;\n\n\t\t\t\t\tif (bflush) {\n\t\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t\t}\n\t\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\t\tbflush = _tr_tally(0, window[strstart - 1] & 0xff);\n\n\t\t\t\t\tif (bflush) {\n\t\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\t}\n\t\t\t\t\tstrstart++;\n\t\t\t\t\tlookahead--;\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t} else {\n\t\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t\t// the next step to decide.\n\n\t\t\t\t\tmatch_available = 1;\n\t\t\t\t\tstrstart++;\n\t\t\t\t\tlookahead--;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (match_available !== 0) {\n\t\t\t\tbflush = _tr_tally(0, window[strstart - 1] & 0xff);\n\t\t\t\tmatch_available = 0;\n\t\t\t}\n\t\t\tflush_block_only(flush == Z_FINISH$1);\n\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\tif (flush == Z_FINISH$1)\n\t\t\t\t\treturn FinishStarted;\n\t\t\t\telse\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\n\t\t\treturn flush == Z_FINISH$1 ? FinishDone : BlockDone;\n\t\t}", "title": "" }, { "docid": "d518cf81da88fbbcf369775caabb023f", "score": "0.60642713", "text": "function deflate_fast(s, flush) {\n var hash_head; /* head of the hash chain */ \n var bflush; /* set if current block must be flushed */ \n for(;;){\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */ if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) return BS_NEED_MORE;\n if (s.lookahead === 0) break; /* flush the current block */ \n }\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */ hash_head = 0 /*NIL*/ ;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/ s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/ }\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */ if (hash_head !== 0 /*NIL*/ && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD) /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */ s.match_length = longest_match(s, hash_head);\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/ bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n s.lookahead -= s.match_length;\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */ if (s.match_length <= s.max_lazy_match /*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n s.match_length--; /* string at strstart already in table */ \n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/ s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/ /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */ }while ((--s.match_length) !== 0)\n s.strstart++;\n } else {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + 1]) & s.hash_mask;\n //#if MIN_MATCH != 3\n // Call UPDATE_HASH() MIN_MATCH-3 more times\n //#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */ }\n } else {\n /* No match, output a literal byte */ //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/ flush_block_only(s, false);\n if (s.strm.avail_out === 0) return BS_NEED_MORE;\n /***/ }\n }\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/ flush_block_only(s, true);\n if (s.strm.avail_out === 0) return BS_FINISH_STARTED;\n /***/ return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/ flush_block_only(s, false);\n if (s.strm.avail_out === 0) return BS_NEED_MORE;\n /***/ }\n return BS_BLOCK_DONE;\n}", "title": "" }, { "docid": "7e55d2a3ef7b0ba7c3e3bcb0c83cdc91", "score": "0.60505605", "text": "function deflate_fast(s, flush) {\n var hash_head; /* head of the hash chain */\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (\n s.lookahead < MIN_LOOKAHEAD &&\n flush === Z_NO_FLUSH\n ) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0 /*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h =\n ((s.ins_h << s.hash_shift) ^\n s.window[s.strstart + MIN_MATCH - 1]) &\n s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] =\n s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (\n hash_head !== 0 /*NIL*/ &&\n s.strstart - hash_head <=\n s.w_size - MIN_LOOKAHEAD\n ) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(\n s,\n s.strstart - s.match_start,\n s.match_length - MIN_MATCH\n );\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (\n s.match_length <=\n s.max_lazy_match /*max_insert_length*/ &&\n s.lookahead >= MIN_MATCH\n ) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h =\n ((s.ins_h << s.hash_shift) ^\n s.window[\n s.strstart + MIN_MATCH - 1\n ]) &\n s.hash_mask;\n hash_head = s.prev[\n s.strstart & s.w_mask\n ] =\n s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h =\n ((s.ins_h << s.hash_shift) ^\n s.window[s.strstart + 1]) &\n s.hash_mask;\n\n //#if MIN_MATCH != 3\n // Call UPDATE_HASH() MIN_MATCH-3 more times\n //#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(\n s,\n 0,\n s.window[s.strstart]\n );\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert =\n s.strstart < MIN_MATCH - 1\n ? s.strstart\n : MIN_MATCH - 1;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n }", "title": "" }, { "docid": "5ef4266311a9789eec6dafe7b7209d9c", "score": "0.60266113", "text": "function deflate_huff(s, flush) {\n var bflush; /* set if current block must be flushed */ \n for(;;){\n /* Make sure that we have a literal to write. */ if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) return BS_NEED_MORE;\n break; /* flush the current block */ \n }\n }\n /* Output a literal byte */ s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/ flush_block_only(s, false);\n if (s.strm.avail_out === 0) return BS_NEED_MORE;\n /***/ }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/ flush_block_only(s, true);\n if (s.strm.avail_out === 0) return BS_FINISH_STARTED;\n /***/ return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/ flush_block_only(s, false);\n if (s.strm.avail_out === 0) return BS_NEED_MORE;\n /***/ }\n return BS_BLOCK_DONE;\n}", "title": "" }, { "docid": "9ce661f68befeb99aece2870893167d2", "score": "0.6016331", "text": "function deflate_slow(s, flush) {\n var hash_head; /* head of hash chain */ \n var bflush; /* set if current block must be flushed */ \n var max_insert;\n /* Process the input block. */ for(;;){\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */ if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) return BS_NEED_MORE;\n if (s.lookahead === 0) break;\n /* flush the current block */ \n }\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */ hash_head = 0 /*NIL*/ ;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/ s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/ }\n /* Find the longest match, discarding those <= prev_length.\n */ s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH - 1;\n if (hash_head !== 0 /*NIL*/ && s.prev_length < s.max_lazy_match && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */ s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */ if (s.match_length <= 5 && (s.strategy === Z_FILTERED || s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096 /*TOO_FAR*/ )) /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */ s.match_length = MIN_MATCH - 1;\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */ if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH;\n /* Do not insert strings in hash table beyond this. */ //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/ bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */ s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do if ((++s.strstart) <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/ s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/ }\n while ((--s.prev_length) !== 0)\n s.match_available = 0;\n s.match_length = MIN_MATCH - 1;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/ flush_block_only(s, false);\n if (s.strm.avail_out === 0) return BS_NEED_MORE;\n /***/ }\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */ //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n if (bflush) /*** FLUSH_BLOCK_ONLY(s, 0) ***/ flush_block_only(s, false);\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) return BS_NEED_MORE;\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */ s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/ flush_block_only(s, true);\n if (s.strm.avail_out === 0) return BS_FINISH_STARTED;\n /***/ return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/ flush_block_only(s, false);\n if (s.strm.avail_out === 0) return BS_NEED_MORE;\n /***/ }\n return BS_BLOCK_DONE;\n}", "title": "" }, { "docid": "89c0593e6457e9508ec6d08f354eae49", "score": "0.6007212", "text": "function deflate_fast(s, flush) {\n var hash_head;\n /* head of the hash chain */\n\n var bflush;\n /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n /* flush the current block */\n }\n }\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n\n\n hash_head = 0\n /*NIL*/\n ;\n\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n\n\n if (hash_head !== 0\n /*NIL*/\n && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n s.lookahead -= s.match_length;\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n\n if (s.match_length <= s.max_lazy_match\n /*max_insert_length*/\n && s.lookahead >= MIN_MATCH) {\n s.match_length--;\n /* string at strstart already in table */\n\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n\n s.strstart++;\n } else {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + 1]) & s.hash_mask; //#if MIN_MATCH != 3\n // Call UPDATE_HASH() MIN_MATCH-3 more times\n //#endif\n\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n }\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n }\n }\n\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n\n\n return BS_FINISH_DONE;\n }\n\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n }\n\n return BS_BLOCK_DONE;\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "0349270936b77bfa01490cd8306c9f09", "score": "0.60014194", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "c73eba05fa629c5fd2f68cebca71843b", "score": "0.5994737", "text": "function _tr_tally(s,dist,lc) // deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{ //var out_length, in_length, dcode;\ns.pending_buf[s.d_buf + s.last_lit * 2] = dist >>> 8 & 0xff;s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;s.last_lit++;if(dist === 0){ /* lc is the unmatched char */s.dyn_ltree[lc * 2] /*.Freq*/++;}else {s.matches++; /* Here, lc is the match length - MIN_MATCH */dist--; /* dist = match distance - 1 */ //Assert((ush)dist < (ush)MAX_DIST(s) &&\n// (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n// (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\ns.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2] /*.Freq*/++;s.dyn_dtree[d_code(dist) * 2] /*.Freq*/++;} // (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\nreturn s.last_lit === s.lit_bufsize - 1; /* We avoid equality with lit_bufsize because of wraparound at 64K\n\t * on 16 bit machines and because stored blocks are restricted to\n\t * 64K-1 bytes.\n\t */}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.59901774", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.59901774", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.59901774", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.59901774", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.59901774", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.59901774", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.59901774", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.59901774", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.59901774", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.59901774", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.59901774", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.59901774", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.59901774", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.59901774", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.59901774", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.59901774", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.59901774", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.59901774", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "f935c1f979813437681a3c9695ed410d", "score": "0.59901774", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "cc84073f87ae8cdf443566ab39a60012", "score": "0.5973951", "text": "function deflate_fast(s, flush) {\n var hash_head; /* head of the hash chain */\n var bflush; /* set if current block must be flushed */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0 /*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0 /*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n s.lookahead -= s.match_length;\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match /*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n }\n else {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;\n //#if MIN_MATCH != 3\n // Call UPDATE_HASH() MIN_MATCH-3 more times\n //#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n }\n else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n }", "title": "" }, { "docid": "ad5e21c4bf25efcbf78105285ed1b229", "score": "0.5952558", "text": "function deflate_huff(s, flush) {\n var bflush;\n /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n break;\n /* flush the current block */\n }\n }\n /* Output a literal byte */\n\n\n s.match_length = 0; //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n\n\n return BS_FINISH_DONE;\n }\n\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n }\n\n return BS_BLOCK_DONE;\n}", "title": "" }, { "docid": "70bdc8957714c73bb0a1b823ddc62f0d", "score": "0.59515566", "text": "function deflate_slow(s, flush) {\n var hash_head;\n /* head of hash chain */\n\n var bflush;\n /* set if current block must be flushed */\n\n var max_insert;\n /* Process the input block. */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n\n }\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n\n\n hash_head = 0\n /*NIL*/\n ;\n\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n /* Find the longest match, discarding those <= prev_length.\n */\n\n\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH - 1;\n\n if (hash_head !== 0\n /*NIL*/\n && s.prev_length < s.max_lazy_match && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD\n /*MAX_DIST(s)*/\n ) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 && (s.strategy === Z_FILTERED || s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096\n /*TOO_FAR*/\n )) {\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n\n\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH;\n /* Do not insert strings in hash table beyond this. */\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n\n bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n\n s.match_available = 0;\n s.match_length = MIN_MATCH - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n }\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n\n s.strstart++;\n s.lookahead--;\n\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n } //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n\n\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n s.match_available = 0;\n }\n\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n\n\n return BS_FINISH_DONE;\n }\n\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n }\n\n return BS_BLOCK_DONE;\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" }, { "docid": "745adf751257bd1075cb5cd6d7e4a7de", "score": "0.5945031", "text": "function _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc*2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defailts,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize-1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}", "title": "" } ]
6b28b6f0334d38cffab481c1ffc6b459
function which prompts the user to pick the id of the item he whats to buy and its quantity
[ { "docid": "c71dcd8148f85381aec6b18f2d5da468", "score": "0.0", "text": "function runInquirer() {\r\n inquirer.prompt ([\r\n {\r\n type: \"input\",\r\n name: \"productId\",\r\n message: \"What is the ID of the product they would like to buy?\"\r\n },\r\n {\r\n type: \"input\",\r\n name: \"quantity\",\r\n message: \"How many units of the product they would like to buy?\"\r\n }\r\n ]).then(function(answer) {\r\n console.log(\"Quantity: \" + answer.quantity);\r\n console.log(\"ID: \" + answer.productId);\r\n \r\n\r\n connection.query(\"SELECT * FROM products\", function(err, res) {\r\n //Setting up the variable for the user's chosen ID of the product\r\n var chosenProductID = res[answer.productId - 1];\r\n //Setting up the variable for updated quatrity of the sold product\r\n var updatedQuantity = chosenProductID.stock_quantity - answer.quantity;\r\n console.log(\"The product you've chose is: \")\r\n console.log(chosenProductID);\r\n // console.log(chosenProductID.price);\r\n // console.log(chosenProductID.product_name);\r\n\r\n //Checking up if we have enough quantity of the item for sale\r\n if (answer.quantity <= (chosenProductID.stock_quantity)) {\r\n console.log(\"SOLD\");\r\n\r\n //Setting up the variable for total cost from sale perchase\r\n var totalCostPurchase = answer.quantity * (chosenProductID.price);\r\n console.log(\"Here is the total cost of your purchase of \" + chosenProductID.product_name + \" : $\" + totalCostPurchase.toFixed(2));\r\n\r\n //Updating the SQL database to reflect the remaining quatnity of item when it SOLD\r\n function soldItem() {\r\n connection.query( \r\n \"UPDATE products SET ? WHERE ?\",\r\n [\r\n {\r\n stock_quantity: updatedQuantity\r\n },\r\n {\r\n id: answer.productId\r\n }\r\n ],\r\n function(error) {\r\n if (error) throw err;\r\n console.log(\"The SQL database quantity of the item is updated!\");\r\n }\r\n );\r\n }\r\n soldItem();\r\n itemsForSale();\r\n }\r\n else {\r\n console.log(\"Insufficient quantity! We don't have enough in stock. Enter another quantity please.\");\r\n runInquirer();\r\n }\r\n });\r\n })\r\n}", "title": "" } ]
[ { "docid": "ca297d7947c48da29b8f3ad956831d71", "score": "0.8294795", "text": "function purchaseItem() {\n \n inquirer.prompt([/* Pass your questions in here */\n {\n type: \"input\",\n name: \"searchbyID\",\n message: \"What is the ID of the product you would like to buy?\",\n },\n {\n type: \"input\",\n name: \"purchaseQuantity\",\n message: \"How many units would you like to buy?\",\n }\n\n ]).then(function (answer) {\n var answer = answer;\n compareQuant(answer);\n })\n}", "title": "" }, { "docid": "7ff63e988b8d55d6ea48bd93d25fd136", "score": "0.8281671", "text": "function buyItem() {\n\n inquirer\n .prompt([{\n name: \"id\",\n message: \"What is the id of the item you would like to purchase?\"\n },\n {\n name: \"qty\",\n message: \"How many would you like to buy?\"\n }])\n .then(function (answer) {\n\n if (isNaN(answer.id) || answer.id > 10) {\n console.log(\"You have selected an item that is not in the list.\");\n buyItem()\n }\n else {\n updateProduct(answer.id, answer.qty);\n }\n });\n}", "title": "" }, { "docid": "796bbd30569c97396a70e27393a6d74f", "score": "0.8165496", "text": "function doYouWantToBuy(){\n inquirer.prompt([\n {\n name: \"id\",\n message: \"If you'd like to buy something, enter the id of that product\"\n },\n {\n name: \"quantity\",\n message: \"How many would you like to buy?\" \n },\n\t\t]).then(function(answers) {\n\t\t\t// var tempItem = answers;\n\t\t\tcheckStock(answers);\n\n\t\t});\n}", "title": "" }, { "docid": "b20cec071ba3380042bb42c5d3dad412", "score": "0.81566423", "text": "function purchaseItem() {\n inquirer\n .prompt([\n {\n name: \"itemID\",\n type: \"input\",\n message: \"Enter Item ID: \",\n validate: function (value) {\n return validateItemID(value);\n }\n },\n {\n name: \"orderQuantity\",\n type: \"input\",\n message: \"Enter Number of Units: \",\n validate: function (value) {\n return validateQuantity(value);\n }\n }\n ])\n .then(function (answer) {\n verifyQuantity(answer.itemID, answer.orderQuantity);\n });\n}", "title": "" }, { "docid": "ff0183694b352e891ec224a2981b2b18", "score": "0.81236005", "text": "function askID(){\n\tinquirer\n\t\t.prompt([\n\t\t{\tname:\"action\",\n\t\t\ttype:\"input\",\n\t\t\tmessage:\"Enter the ID of the item you would like to purchase.\"\n\t\t},\n\t\t{\tname:\"answer\",\n\t\t\ttype:\"input\",\n\t\t\tmessage:\"How many would you like to buy?\"\n\n\t\t}\n\t\t])\n\t\t.then(function(response){\n\n\t\t\tvar itemID = response.action;\n\t\t\tvar purch = response.answer;\n\n\n\n\t\t\tconnection.query(\"SELECT id, Name, Department, Price, In_Stock FROM items WHERE ?\", {id: itemID}, function(err, res){\n\t\t\t\tvar wut = res[0].In_Stock;\n\t\tif(wut > purch){\n\n\n\t\t\tvar update = res[0].In_Stock - purch;\n\t\t\tconnection.query(\"UPDATE items SET ? WHERE ?\",\n\t\t\t[{\n\t\t\t\tIn_Stock: update\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: itemID\n\t\t\t}], \n\t\t\t);\n\n\t\t\t// var stock = res[0].In_Stock;\n\t\t\t// console.log(stock);\n\t\t\t// let sql = \"UPDATE items SET in_stock = in_stock - purch WHERE id = itemID\";\n\t\t\t\t// connection.query(sql, (err, res) =>{\n\t\t\t\t// \tif(err) throw err;\n\t\t\t\t\t\titemList();\n\t\t\t\t\t\t\n\t\t\t\t// });\n\n\t\t\t};\n\n\t\t\tif(res[0].In_Stock <= 0){\n\t\t\t\tconsole.log(\"No items in stock...sorry\")\n\t\t\t};\n\n\t\t\t\n\t\t\t\t});\n\n\t\t\t\n\t\t\t\n\n\n\t\t\t});\n\t\t\n\n\t\t}", "title": "" }, { "docid": "b6919c9ce319a0d25f342260ff728f3a", "score": "0.8013999", "text": "function products_for_sale(){\n var products = new Mydb();\n products.connect();\n products.querySelect(\"select item_id,product_name,price,stock_qty from products\");\n products.end();\n\n inquirer.prompt({\n name: \"id\",\n type: \"number\",\n message: \"Enter the item_id that you would like to purchase:\".red,\n validate: function(id){\n if(isNaN(id) === false ){\n return true;\n }\n return false;\n }\n\n }).then(function(answer){\n cart_checkout(answer.id);\n });\n}", "title": "" }, { "docid": "7703aef56ea340e4601d04c55fa93930", "score": "0.7871789", "text": "function quantityRequested(amtNeeded){\n \n inquirer\n .prompt([\n {\n type: \"input\",\n message: \"How many would you like to buy?\",\n name: \"quantity\"\n }\n ])\n .then(function(inquirerResponse){\n \n \n var quantity = parseInt(inquirerResponse.quantity);\n var curStockLevel = parseInt(amtNeeded.stock_quantity);\n var itemToPurchase = amtNeeded.item_id;\n var itemPrice = parseInt(amtNeeded.price);\n var prodName = (amtNeeded.product_name);\n \n if(quantity > curStockLevel){\n console.log(\"sorry we don't have enough. Please make another selection\");\n afterConnection();\n }\n else{\n \n debtInventory(itemToPurchase, curStockLevel, quantity,itemPrice, prodName);\n \n }\n })\n}", "title": "" }, { "docid": "45ca772669c8435e4b6eef5ad37a81e7", "score": "0.78325343", "text": "function promptItemId(result) {\n inquirer\n .prompt({\n name: \"item_id\",\n type: \"input\",\n message: \"What would you like to purchase? Enter in the item ID\",\n validate: function (value) {\n return !isNaN(value);\n }\n })\n .then(function (value) {\n var item = checkItemId(value, result);\n if (item) {\n promptStockQty(item);\n } else {\n console.log(\"That is not a valid item ID, please try again.\");\n loadTable();\n }\n })\n}", "title": "" }, { "docid": "7de70dc6995d32fb54ddddc842a5d913", "score": "0.7794088", "text": "function select() {\n inquirer.prompt([\n {\n \"name\": \"id\",\n \"message\": \"Please type the item id below to purchase an item.\",\n \"type\": \"input\"\n \n },\n {\n \"name\": \"quantity\",\n \"message\": \"How many of this item would you like to buy?\",\n \"type\": \"input\"\n // Add number validation later\n }\n ]).then(function(answer) {\n let selection;\n var quantity = parseInt(answer.quantity)\n connection.query(\"SELECT * FROM products\", function(err, res) {\n res.forEach(function(row) {\n if (parseInt(answer.id) === row.id) {\n selection = row\n }\n })\n // If new quantity is more than zero, then continue\n if ((selection.stock_quantity - quantity) >= 0) {\n buyItem(selection, quantity)\n }\n // If new quantity is less that 0, then insufficient stock is available, and the user is redirected back to the select screen.\n else {\n console.log(chalk.red(\"We apologized, but we do not have enough stock to fulfill your order. You requested \" + quantity + \" of this item, but we only have \" + selection.stock_quantity + \" in stock.\" + \"\\n\"));\n startOption();\n }\n })\n })\n}", "title": "" }, { "docid": "e4194ece9e814f2759134dd2cede2136", "score": "0.7763593", "text": "function shopping(){\n inquirer.prompt([\n {\n type: 'input',\n name: 'idChoice',\n message:\"Please enter the id for the item you would like to buy\",\n validate: function(value) {\n //if the input is a number it eqals false, and set it within the range of the rows in database's table \n if (isNaN(value) === false && value>0 && value<12) {\n return true;//the input is a number and the nubmer is within the products' id range\n }\n return false;\n }\n },\n {\n name:'quantity',\n type:'input',\n message:\"how many do you want to buy?\",\n validate: function(value) {\n if (isNaN(value) === false && value>0) {\n return true;//to declare it's a number\n }\n return false;\n }\n }\n ]).then(function(answer){\n quantityCheck(answer.idChoice,answer.quantity)\n\n\n })\n\n}", "title": "" }, { "docid": "64a47fe3c46bf336987ceb1e30f767aa", "score": "0.7762923", "text": "function buyShop() {\n\n inquirer.prompt([{\n name: \"id\",\n type: \"input\",\n message: \"What is the [ID] of the product you would like to buy?\",\n //make sure id is valid\n validate: function (value) {\n if (isNaN(value) === false) {\n return true;\n }\n else {\n return false;\n }\n }\n },\n\n // The second message should ask how many units of the product they would like to buy.\n {\n name: \"quantity\",\n type: \"input\",\n message: \"How many would you like to buy?\",\n validate: function (value) {\n if (isNaN(value) === false) {\n return true;\n }\n else {\n return false;\n }\n }\n // Once the customer has placed the order, your application should check if your store has enough of the product to meet the customer's request.\n // If not, the app should log a phrase like Insufficient quantity, and then prevent the order from going through.\n // However, if your store does have enough of the product, you should fulfill the customer's order.\n // This means updating the SQL database to reflect the remaining quantity. \n }]).then(function (answer) {\n\n var chosenItem = answer.id;\n var quantity = answer.quantity;\n completeBuy(chosenItem, quantity);\n });\n}", "title": "" }, { "docid": "a5b79355c707503dfba557f29f324b2e", "score": "0.77383864", "text": "function customerChoice() {\n inquirer.prompt([\n { \n name: \"id\",\n type: \"input\",\n message: \"What is the ID of the product would you like to order?\",\n \n },\n\n {\n name: \"quantity\",\n type: \"input\",\n message: \"How many units of the product would you like to buy?\"\n\n }\n \n ]).then(function(answer) {\n //console.log(answer)\n\n var orderedItem = answer.id;\n var howMany = answer.quantity;\n customerPurchase(orderedItem, howMany);\n });\n\n}", "title": "" }, { "docid": "6d0676adeb27a7d0c32758609dab69ce", "score": "0.77314377", "text": "function buyItem () {\n inquirer.prompt([\n {\n name: 'id',\n type: 'input',\n message: 'Enter the item_id of the item you would like to buy:'\n },\n {\n name: 'quant',\n type: 'input',\n message: 'How many would you like to buy?'\n }\n ]).then(input => {\n // Find the item in the table based on id\n const id = input.id\n const userQuant = input.quant\n const query = 'SELECT * FROM products WHERE item_id = ?'\n connection.query(query, [id], (err, res) => {\n if (err) throw err\n const stockQuant = parseInt(res[0].stock_quantity)\n const itemName = res[0].product_name\n const itemPrice = res[0].price\n const totalPrice = itemPrice * userQuant\n // Check if shop has enough of item in stock\n if (userQuant > stockQuant) {\n log(`\"Sorry, I've only got ${stockQuant} of those in stock.\"`)\n return goBack(`\"When I get more of those you'll be the first to know!\"`)\n }\n // Update the stock_quantity of item purchased to reflect user's purchase\n const newQuant = stockQuant - userQuant\n const updateQuery = 'UPDATE products SET stock_quantity = ? WHERE item_id = ?'\n connection.query(updateQuery, [newQuant, id], (err, res) => {\n if (err) throw err\n log(`You bought ${userQuant} ${itemName}(s) for ${totalPrice} gold.`)\n goBack('\\n\\n\"Thanks for your purchase!\"')\n })\n })\n })\n}", "title": "" }, { "docid": "6f8817a4fd2a2776dced9891c2c07b05", "score": "0.77292806", "text": "function buy() {\n inquirer\n .prompt([\n {\n //asking what the user wants to buy by id number and storing answer in \"id\"\n name: \"id\",\n message: \"What id number would you like to buy?\"\n },\n {\n // asking how much the user wants to buy and storing answer in \"amount\"\n name: \"amount\",\n message: \"How much would you like to buy?\"\n }\n ]) // callback function with the user responses\n .then(function(answer) {\n // storing user answers in variables\n var product = answer.id;\n var amount = answer.amount;\n update(product, amount);\n });\n}", "title": "" }, { "docid": "f1738bad803b6d9befb4dfe4a5a1ed5d", "score": "0.77257705", "text": "function promptBuy() {\n //console.log(\"~entered purchase function~\");\n \n //will need to first ask user what product they would like--by name but reference by unique id\n //use a switch case for both sets of questions????\n inquirer.prompt([\n {\n type: \"input\",\n name: \"item_id\",\n message: \"Welcome to Bamazon's new ordering system!\" + \" Please enter the ID Number of the item you wish to purchase.\",\n validate: validateInput,\n filter: Number\n },\n // then ask user how much of the item they would like\n //is there a way to set the default to one?\n {\n type: \"input\",\n name: \"quantity\",\n message: \"Now please select the quantity of the item you would like to order.\",\n validate: validateInput,\n filter: Number\n }\n ]).then(function (input) {\n //is there a way to show the name instead of the item's id?\n console.log('You have selected: \\n Selected Item id # = ' + input.item_id + '\\n quantity = ' + input.quantity);\n \n var item = input.item_id;\n var quantity = input.quantity;\n //first validate the quantity with the db to ensure the order can be filled\n var queryQuantity = \"Select * from Products where ?\";\n \n connection.query(queryQuantity, { item_id: item }, function (err, data) {\n if (err) throw err;\n \n //create error condition for invalid id input\n if (data.length === 0) {\n console.log(\"An Error occured. Invalid Item Id. Please select a valid Item ID Number.\");\n displayItems();\n } else {\n var productData = data[0]\n \n //console.log('productData = ' + JSON.stringify(productData));\n //\tconsole.log('productData.stock_quantity = ' + productData.stock_quantity);\n \n // If the quantity requested by the user is in stock\n if (quantity <= productData.stock_quantity) {\n console.log(\"Congratulations, the Item you requested is in stock! Placing order...\")\n \n // now deduct the user's chosen items from the inventory\n //\n\n //how do i hide this function from the terminal\n // Create the update stock function\n var updateQueryQuantity = 'UPDATE products SET stock_quantity = ' + (productData.stock_quantity - quantity) + ' WHERE item_id = ' + item;\n //console.log('updateQueryQuantity = ' + updateQueryQuantity);\n \n // Update the inventory\n connection.query(updateQueryQuantity, function (err, data) {\n if (err) throw err;\n \n //once item is deducted from the inventory display item shipped and total cost\n console.log('Your order has been placed! Your total is $' + productData.price * quantity);\n console.log('Thank you for shopping at Bamazon_db!');\n console.log(\"\\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\");\n \n \n ////instead of end cpnnectipm here can i ask the user if they\n //want to place a second order\n // End the database connection\n //connection.end();\n repromptUser();\n \n })\n // create a of out of stock back up error \n } else {\n console.log('Sorry, there is not enough of that item in stock, your order can not be placed.');\n console.log('Please re-select your order.');\n console.log(\"\\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\");\n \n displayItems();\n }\n }\n })\n })\n}", "title": "" }, { "docid": "3dafa0d5b8c6db65d4af96fe1ce52df8", "score": "0.7717469", "text": "function customerPurchase() {\n inquirer.prompt([\n {\n name: \"want_to_buy\",\n message: \"What is the Item ID of the product you want to buy?\",\n },{\n name: \"number_to_buy\",\n message: \"How many do you want to buy?\"\n }\n ]).then(function(response) {\n var itemNumber = response.want_to_buy;\n var itemQuantity = response.number_to_buy;\n quantityChecker(itemNumber, itemQuantity);\n })\n}", "title": "" }, { "docid": "de977a7f110f08327ed869b7a882f862", "score": "0.77124095", "text": "function promptProduct(){\n\tinquirer\n\t.prompt([\n\t{\n\t\tname : \"id\",\n\t\ttype : \"input\",\n\t\tmessage:\"Whats the product id you want to add to the inventory ?\",\n\t\tvalidate : function(value){\n if (isNaN(value) === false && value != \"\") {\n return true;\n }\n return false;\n }\n\t},\n\t{\n\t\tname : \"quantity\",\n\t\ttype : \"input\",\n\t\tmessage : \"Quantity you want to add ? \",\n\t\tvalidate: function(value){\n if (isNaN(value) === false && value != \"\") {\n return true;\n }\n return false;\n }\n\t}\n\t]).then(function(answer){\t\t\t\n\t\tvar noOfProducts = findProductforInventoryAdd(answer.id,answer.quantity);\n\t});\n}", "title": "" }, { "docid": "2585f4e227960468d790f16b78db9d2b", "score": "0.77034026", "text": "function customerAsk(){\n \n inquirer\n .prompt([\n // Here we create a basic text prompt.\n {\n type: \"input\",\n message: \"What is the item ID of the product you'd like to purchase?\",\n name: \"id\",\n validate: function validateID(name){\n \n if(isNaN(name)===true){\n console.log('\\nBe sure to specify the correct ID as a number!')\n return false;\n }\n else if(name === \"\"){\n console.log('\\nBe sure to specify the correct ID as a number!')\n return false;\n }\n else {\n return true;\n }\n }\n },\n {\n type: \"input\",\n message: \"How many of them would you like to purchase?\",\n name: \"quantity\",\n validate: function validateID(name){\n \n if(isNaN(name)===true){\n console.log('\\nBe sure to specify the correct ID as a number!')\n return false;\n }\n else if(name === \"\"){\n console.log('\\nBe sure to specify the correct ID as a number!')\n return false;\n }\n else {\n return true;\n }\n }\n },\n \n ])\n .then(function(response) {\n // console.log(response);\n item = response.id;\n // console.log('item: ', item);\n amount = response.quantity; \n // console.log('amount: ', amount);\n checkValue(item, amount);\n });\n}", "title": "" }, { "docid": "a0af09ad142499d3927321de85046fcd", "score": "0.76729935", "text": "function requestItemID(){\n //going to write an inquire prompt that gets the prompt\n var chosenItemID;\n inquirer.prompt(questions[0]).then(answers => {\n //console.log(answers);\n requestQuantity(answers);\n })\n\n}", "title": "" }, { "docid": "9be633493ae32b5b65c88dec4876386a", "score": "0.7670331", "text": "function prompt() {\n inquirer.prompt([\n {\n name: \"SelectID\",\n message: \"Choose the ID of the product you would like to purchase.\",\n type: \"list\",\n choices: [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\"]\n },\n {\n name: \"quantity\",\n message: \"How many would you like to buy?\",\n type: \"list\",\n choices: [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\"]\n }\n ]).then(function(customerAnswers) {\n\n quantityCheck(customerAnswers.SelectID, customerAnswers.quantity);\n \n });\n}", "title": "" }, { "docid": "091356de97b4e7770198b0d926f56ee4", "score": "0.7656953", "text": "function buyProduct() {\n inquirer\n .prompt([{\n name: \"productID\",\n type: \"input\",\n message: \"What is the Product ID Number of the item you want to purchase?\",\n validate: function(value) {\n if (isNaN(value) === false) {\n return true;\n }\n return false;\n }\n },\n {\n name: \"quantity\",\n type: \"input\",\n message: \"quantity?\",\n validate: function(value) {\n if (isNaN(value) === false) {\n return true;\n }\n return false;\n }\n }\n ])\n .then(function(answer) {\n\n\n // use the information gathered to check availablty\n checkAvailability(answer.productID, answer.quantity);\n\n });\n}", "title": "" }, { "docid": "555cf1b7bfbf6c8e79d2d8df904e11e7", "score": "0.7655379", "text": "function selectItem() {\r\n\r\n inquirer\r\n .prompt([{\r\n name: \"product_id\",\r\n type: \"input\",\r\n message: \"What product ID number would you like to select?\",\r\n validate: function (value) {\r\n if (isNaN(value) == false) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n },\r\n {\r\n name: \"quantity\",\r\n type: \"input\",\r\n message: \"How many would you like to buy?\",\r\n validate: function (value) {\r\n if (isNaN(value) == false) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n }])\r\n\r\n .then(function (answer) {\r\n var query = 'SELECT * FROM amazonItems WHERE id=' + answer.quantity;\r\n connection.query(query, function (err, res) {\r\n if (answer.quantity <= res) {\r\n for (var i = 0; i < res.length; i++) {\r\n console.log(\"We have \" + res[i].stock_quantity + \" \" + res[i].product_name + \".\");\r\n console.log(\"Your order of \" + res[i].stock_quantity + \" \" + res[i].product_name + \" is complete.\");\r\n }\r\n } else {\r\n console.log(\"Sold out of this product.\");\r\n }\r\n displayItems();\r\n })\r\n })\r\n}", "title": "" }, { "docid": "6e1cd59d29c1ec8aa0a80f81588e29c4", "score": "0.76500654", "text": "function custQuant(id, quantity, price) {\n inquirer\n .prompt({\n name: \"itemQuantity\",\n type: \"input\",\n message: \"How many would you like to purchase?\"\n })\n .then(function (inqRes, res) {\n if (inqRes.itemQuantity <= quantity) {\n updateDB(id, inqRes.itemQuantity, price); // call function to update the db, passing information already 'grabbed' \n } else {\n console.log(\"Insufficient quantity, there is only: \" + quantity + \" in stock. Please try again.\");\n itemToBuy(); // call function to start customer from beginning again \n }\n // maybe another function to ask if they want to purchase anything else (run displayInventory)\n });\n}", "title": "" }, { "docid": "59f2daea3190600b1c530860bd97f13d", "score": "0.7620667", "text": "function requestQuantity(answers){\n\n var stringItemID = answers.askItemID;\n //analogous to chosenItemID in requestItemID\n connection.query('SELECT * FROM jamazon_inventory WHERE item_id='+answers.askItemID,function(err,res){\n if (err) throw err;\n var splitArr = JSON.stringify(res).split(',')\n splitArr = splitArr[1].split(':')\n prodName = splitArr[1]\n console.log(prodName)\n })\n\n console.log('You have selected ')\n inquirer.prompt(questions[1]).then(answers => {\n //console.log(stringItemID)\n processInventory(answers,stringItemID);\n })\n\n\n\n \n}", "title": "" }, { "docid": "623ff672d3b8e9306e001229789a71d0", "score": "0.7607965", "text": "function itemQuantityPrompt(product) {\n inquirer\n .prompt([\n {\n type: \"input\",\n name: \"quantity\",\n message: \"How many of this item would you like to purchase?\",\n validate: function(val) {\n return val > 0 \n }\n }\n ])\n .then(function(val) {\n var quantity = parseInt(val.quantity);\n \n // If not enough quantity, tell the customer and then reload the initial table of products\n if (quantity > product.stock_quantity) {\n console.log(\"\\n There is not enough stock left of that item!\");\n productsDisplay();\n }\n else {\n // otherwise we will run our purchaseProduct function that will subtract the amount purchased from the availabe stock quantity\n purchaseProduct(product, quantity);\n }\n });\n }", "title": "" }, { "docid": "861c7538a1dfa3012f838181e8f931b5", "score": "0.76048124", "text": "function qty(id) {\n inquirer.prompt({\n name: \"qty\",\n message: \"How much qty you would like to add to product with id: \" + id + \" ?\"\n }).then(function (q) {\n const nQ = parseInt(q.qty);\n if ((nQ !== null) && (Number.isInteger(nQ))) {\n prcS(parseInt(id), parseInt(q.qty));\n } else {\n console.log('Silly... Enter a qty! ... req: integer');\n qty(nQ);\n }\n });\n }", "title": "" }, { "docid": "dc1e53e34657b1e54046da91b24cbf94", "score": "0.7589229", "text": "function promptCustomerForItem(products){\n inquirer\n .prompt([\n /* Pass your questions in here */\n {\n type: \"input\",\n name: \"itemID\",\n message: \"Choose the item ID of what you're searching for: \"\n }\n ])\n .then(answers => {\n // Use user feedback for... whatever!!\n \n if (answers.itemID){\n checkInventory()\n }\n\n });\n\n}", "title": "" }, { "docid": "257c9578493981901fb909338d25478e", "score": "0.75872105", "text": "function buyer(){\n\tinquirer.prompt([\n\t{\n\t\ttype: 'input',\n\t\tname: 'id',\n\t\tmessage: 'What is the Item ID of the product you would like to buy?'\n\t},\n\t{\n\t\ttype: 'input',\n\t\tname: 'units',\n\t\tmessage: 'How many units would you like to buy?'\n\t}\n\t]).then(function(buyerAnwser){\n\t\tvar buyerID = buyerAnwser.id; \n\t\tvar buyerUnits = parseInt(buyerAnwser.units);\n\n\t\tconnection.query(\"SELECT * FROM products WHERE item_id=?\", [buyerID], function (err, result){\n\t\t\tfor (var i = 0; i < result.length; i ++){\n\t\t\t\tvar itemUnits = parseInt(result[i].stock_quantity);\n\t\t\t\tvar firstPrice = (result[i].price).toFixed(2);\n\t\t\t\tvar price = parseInt(firstPrice);\n\t\t\t\tvar newStock = itemUnits - buyerUnits; \n\n\t\t\t}\n\t\t// get the item_id entered and check it with the item_id in the database\n\t\t\t\tconnection.query(\"UPDATE products SET ? WHERE ?\", \n\t\t\t\t\t[{\n\t\t\t\t\t\tstock_quantity: newStock\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\titem_id: buyerID\n\t\t\t\t\t}], function(err, result){\n\t\t\t\t\t\tconsole.log(\"You spent a total of: \" + (buyerUnits * price) + \"! Thank you for Shopping on Bamazon!\");\n\t\t\t\t\t});\n\t\t});\n});\n}", "title": "" }, { "docid": "cbc606bba6b7f3570a0c7d45918dfb62", "score": "0.7577535", "text": "function promptUser() {\n inquirer.prompt([\n {\n name: \"idInput\",\n type: \"input\",\n message: \"Enter the ID of the product you would like to purchase:\"\n },\n {\n name: \"quantityInput\",\n type: \"input\",\n message: \"Enter the quantity you would like to purchase:\"\n }\n ])\n .then(function(answer) {\n checkQuantity(answer.idInput, answer.quantityInput);\n });\n}", "title": "" }, { "docid": "87c33b3cdf13dee7a41e45b563608739", "score": "0.7577191", "text": "function idAmountDesired() {\n inquirer.prompt([\n // instruction 6 - id and how many of item wanted\n {\n name: \"id\",\n type: \"input\",\n message: chalk.greenBright(\n \"What is the id number of the item you'd like to purchase?\"),\n validate: function(value) {\n var re = /^\\d+$/;\n return re.test(value) || \"Please enter a number.\"\n }\n }, {\n name: \"amount\",\n type: \"input\",\n message: \"How many would you like?\",\n validate: function(value) {\n var re = /^\\d+$/;\n return re.test(value) || \"Please enter a number.\"\n },\n default: 1\n }\n ])\n .then(function(answer) {\n connection.query(\"SELECT * FROM products where ?\", {\n id: answer.id\n }, function(err, response) {\n if (err) throw err;\n //instruction 7 - check availability based on stock\n if (response[0].stock_quantity >= answer.amount) {\n console.log(chalk.bold.cyanBright(\"It's yours!\"));\n\n var newInStock = response[0].stock_quantity - parseInt(answer.amount);\n\n function updateStock(id, amount) {\n connection.query(\"UPDATE products set ? where ?\", [{\n stock_quantity: amount\n }, {\n id: id\n }], function(err, response) {\n\n });\n }\n updateStock(answer.id, newInStock);\n\n var totalPrice = parseInt(answer.amount) * response[0].price;\n\n console.log(chalk.magenta(\"Total Sale Amount: \") + totalPrice);\n buyAgain();\n } else {\n console.log(chalk.redBright(\n \"We're sorry. Insufficent stock for this purchase.\"));\n idAmountDesired();\n }\n });\n });\n}", "title": "" }, { "docid": "e85f20f74706404e960510c5ba4a0adb", "score": "0.75643224", "text": "function promptUser(data) {\n return inquirer.prompt([\n {\n name: \"id\",\n message: \"Enter the ID of the product you wish to buy.\",\n type: \"input\",\n validate: answer => {\n let ids = [];\n for (let i = 0; i < data.length; i++) {\n ids.push(data[i].item_id);\n }\n return (ids.indexOf(parseInt(answer)) > -1);\n }\n },\n {\n name: \"quantity\",\n message: \"How many would you like to buy?\",\n type: \"input\"\n }]);\n}", "title": "" }, { "docid": "ff0b6e34785886a87875766ac0f68d91", "score": "0.75450486", "text": "function newQuantity(quant,item){\n inquirer.prompt([\n {\n type:\"list\",\n message:chalk.red(\"Sorry we only have \" + quant + \". Please, select a different amount, or just forget it?\"),\n choices:['new quantity','ahh, just forget it!'],\n name:\"choice\"\n }\n ]).then(function(answer){\n var choice=answer.choice;\n if(choice === 'new quantity'){\n inquirer.prompt([\n {\n input:\"input\",\n message:\"Great! And sorry again! So..how many would you like?\",\n name:'amount'\n }\n ]).then(function(res){\n newAmount=res.amount;\n console.log(\"New amount is \" + newAmount)\n makeSale(item,newAmount)\n })\n }\n else{console.log(\"sorry to hear that. Goodbye!\")}\n })\n}", "title": "" }, { "docid": "b3da9fe447c060ac7f6de2b47b7cd588", "score": "0.75324", "text": "function promptForQuantity(product) {\n inquirer\n .prompt([{\n type: \"input\",\n name: \"quantity\",\n message: \"How much would you like to add? [Press 'Q' to exit]\",\n validate: function(input) {\n return input > 0 || input.toLowerCase() === \"q\";\n }\n }])\n .then(function(val){\n exit2(val.quantity)\n var quantity = parseInt(val.quantity);\n updateStock(product, quantity);\n })\n}", "title": "" }, { "docid": "e85250f2467207528931989522611a26", "score": "0.7528839", "text": "function userChoicePrompt() {\n inquirer\n .prompt([\n\n {\n type: \"input\",\n message: \"What is ID of the product that you would like to buy?\",\n name: \"product_id\"\n },\n {\n type: \"input\",\n message: \"How many units would you like to buy?\",\n name: \"num_units\"\n },\n ])\n .then(userChoices => {\n checkQuantity(userChoices.num_units, userChoices.product_id);\n\n });\n\n}", "title": "" }, { "docid": "3a5f57824ca8a2f0bdf929c9bad4cf06", "score": "0.75206465", "text": "function beginShopping() {\n\tinquirer.prompt ([\n\t {\n\t name: \"id\",\n\t message: \"Enter the ID of the item you'd like to buy\",\n\t validate: function(value) {\n if (isNaN(value) === false) {\n return true;\n }\n return false;\n }\n\t },\n\t {\n\t \tname: \"quantity\",\n\t \tmessage: \"Enter the quantity\",\n\t \tvalidate: function(value) {\n if (isNaN(value) === false) {\n return true;\n }\n return false;\n }\n\t }\n\t]).then(function(answers) {\n\t\t//look up stock of item in products db\n\t\tconnection.query(\"SELECT stock_quantity FROM products WHERE ?\", { item_id: answers.id }, \n\t\t\tfunction(err, res) {\n\t\t\t\t//if the user wants to buy more than is available\n\t\t if (answers.quantity > res[0].stock_quantity) {\n\t\t \tconsole.log(\"Insufficient Quantity!\");\n\t\t \t//prompt shopping again\n\t\t \tbeginShopping();\n\t\t } else {\n\t\t \t//pass order into fulfillment function\n\t\t \tfulfillOrder(answers.id, answers.quantity, res[0].stock_quantity)\n\t\t }\n \t});\n\t});\n}", "title": "" }, { "docid": "47615d16af9be15983291a2c3404ebb2", "score": "0.751742", "text": "function selectProduct() {\n\t\tprompt([{\n\t\t\tname: 'id',\n\t\t\ttype: 'input',\n\t\t\tmessage: 'What is the ID of the Product you would like to buy?',\n\t\t\tvalidate: function(value) {\n\t\t\t\t// check if the user entered value is a number\n\t\t\t\tif (isNaN(value) == false) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log('\\n\\nAll we need is the number next to the title.\\n');\n\t\t\t\t\treturn false;\n\t\t\t\t} \n\t\t\t} \n\t\t}, {\n\t\t\tname: 'amount',\n\t\t\ttype: 'input',\n\t\t\tmessage: 'How many would you like to buy?',\n\t\t\tvalidate: function(value) {\n\t\t\t\t// check if the user entered value is a number\n\t\t\t\tif (isNaN(value) == false) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log('\\n\\nWe need a number for the amount.\\n');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t// pass the id and amount to the purchaseProduct function to complete the transaction\n\t\t}]).then(function(answer) {\n\n\t\t\tpurchaseProduct(answer);\n\t\t\n\t\t}); \n\t}", "title": "" }, { "docid": "d7469281c329228cdc6b773d4c6f109d", "score": "0.75139254", "text": "function askQty(selection){\n inquirer\n .prompt([\n {\n name: \"qty\",\n type: \"input\",\n message: \"How many would you like to buy\" \n }\n ])\n .then(function(answer){\n //get from DB stock quantity of selected product (through id)\n connection.query(\n \"SELECT stock_quantity FROM products WHERE ?\",\n [{\n id: selection\n }], function(err, res){\n if (err) throw err;\n //check first if we have enough products to fulfill order, if not , say how many are remaining and close connection\n if(answer.qty>res[0].stock_quantity){\n console.log(`We have only ${res[0].stock_quantity} products remaining, try again.`);\n connection.end();\n }\n else{\n // if there are enough products update DB with new quantity and go to check out\n let reqQty =parseInt(answer.qty) //convert qty to integer\n let remProd = parseInt(res[0].stock_quantity) - reqQty // get new stock quantity (stock - num. of purchased products)\n updateDB(remProd, selection); //function to update DB\n checkOut(reqQty, selection); // function to check out\n }\n\n }\n );\n });\n}", "title": "" }, { "docid": "55f9f1124c933a150fcc0b65b7e2f38a", "score": "0.7494383", "text": "function addInventory(){\n \n inquirer.prompt([{\n name:\"choice\",\n message:\"Please select the product you want to add more\",\n type:\"rawlist\",\n choices: itemArr\n },{\n name:\"number\",\n type:\"input\",\n message:\"Please input the quantity you want to add :\",\n validate: function(value){\n \n //only numbers are allowed to input\n var pass = value.match(\n /^[0-9]{1,10}$/\n );\n if(pass){\n return true;\n }\n return \"Please input one valid number\"; \n }\n }]).then(function(answer){\n\n var itemId = answer.choice.split(\" \")[0]; \n updateInventory(itemId,answer.number);\n })\n}", "title": "" }, { "docid": "09923ccf5aada880bec6ee88db9f6001", "score": "0.74827766", "text": "function menu() {\n inquirer.prompt([\n {\n name: \"id\",\n message: \"Introduce the ID of the product you want to buy:\",\n }, {\n name: \"quantity\",\n message: \"How many products do you want to buy?\",\n }]).then(function (answer) {\n checkStock(answer.id, answer.quantity);\n });\n}", "title": "" }, { "docid": "fe63b4388ccc15b72594cdd849746590", "score": "0.7477748", "text": "function promptUser() {\n inquirer\n .prompt([\n {\n type: 'input',\n name: 'user_item_id',\n message: \"What's the ID of the product you would like to buy?\"\n },\n {\n type: 'input',\n name: 'user_item_quantity',\n message: 'How many units would you like to buy?'\n }\n ])\n .then(function(purchase) {\n // Call checkQuantity AFTER getting purchase details from customer\n checkQuantity(purchase.user_item_id, purchase.user_item_quantity);\n });\n}", "title": "" }, { "docid": "fcab21397f8e962dc87620efb92d1582", "score": "0.74579966", "text": "function itemToBuy() {\n inquirer\n .prompt({\n name: \"item\",\n type: \"input\",\n message: \"What is the item_id of the product you would like to purchase?\",\n })\n .then(function (inqRes) {\n var itemQuery = \"SELECT product_name, department_name, price, stock_quantity FROM bamazon_db.products WHERE ?\";\n connection.query(itemQuery, { item_id: inqRes.item }, function (err, res) {\n if (err) throw err;\n if (res[0].stock_quantity > 0) {\n custQuant(inqRes.item, res[0].stock_quantity, res[0].price); // call function to prompt cust how many they want to buy\n // to avoid another query, pass information already 'grabbed'\n } else {\n console.log(\"Sorry, that item is out of stock.\");\n itemToBuy(); // recall function to give customer another chance to purchase something in stock\n }\n });\n });\n}", "title": "" }, { "docid": "eef57cfa5a8d3fcd1fc0ac68f470512a", "score": "0.745109", "text": "function buyProduct (){\n\tdisplayAll();\n\tinquirer.prompt({\n\t\ttype : \"input\",\n\t\tname : \"id\",\n\t\tmessage : \"Select the item id you would like to buy\"\n\t}).then(function(answer){\n\t\tconnection.query('SELECT * FROM products WHERE ?',{ item_id: answer.id}, function(err, res){\n\t\tif (err) throw err;\n\t\tvar theItem = answer.id;\n\t\tvar quantity = res[0].stock_quantity;\n\t\tinquirer.prompt({\n\t\t\t\t\ttype : \"input\",\n\t\t\t\t\tname : \"units\",\n\t\t\t\t\tmessage : \"how many units would you like to buy?\"\n\t\t\t\t}).then(function(answer){\n\t\t\t\t\tif (answer.units > quantity){\n\t\t\t\t\t\tconsole.log(\"Insufficient quantity!\");\n\t\t\t\t\t\tbuyProduct();\n\t\t\t\t\t}else{\n\t\t\t\t\t\tconnection.query(\"UPDATE products SET ? WHERE ?\", [{\n \t\t\t\t\t\tstock_quantity: res[0].stock_quantity-answer.units\n\t\t\t\t\t\t}, {\n \t\t\t\t\t\titem_id: theItem\n\t\t\t\t\t\t}],function(err,res){});\n\t\t\t\t\t\tvar purchase = answer.units*res[0].price;\n\t\t\t\t\t\tconsole.log(\"The total cost of your purchase will be $\"+purchase+\". Thanks for buying at Bamazon!\");\n\t\t\t\t\t\tconnection.query(\"UPDATE products SET ? WHERE ?\", [\n\t\t\t\t\t\t\t{product_sales : res[0].product_sales+purchase},\n\t\t\t\t\t\t\t{item_id: theItem\n\t\t\t\t\t\t}],function(err,res){});\n \t\t\t\t\texit();\n\t\t\t\t\t};\n\n\t\t\t\t});\n\n\t\t\n\t\t});\n\t});\n}", "title": "" }, { "docid": "048e843967f7b365f9e56b792cecf5c1", "score": "0.74506044", "text": "function promptPurchase() {\n\n\tinquirer.prompt([\n\t\t{\n\t\t\ttype: \"input\",\n\t\t\tname: \"item_id\",\n\t\t\tmessage: \"Enter Item ID you want to purchase.\"\n\n\t\t},\n\t\t{\n\t\t\ttype: \"input\",\n\t\t\tname: \"quantity\",\n\t\t\tmessage: \"Hom many of the selected item do you want to purchase?\"\n\n\t\t}\n\n\t]).then(function(input) {\n\n\t\tvar item = input.item_id;\n\n\t\tvar amount = input.quantity;\n\n\n\t\tvar queryStr = \"SELECT * FROM products\";\n\n\t\tconnection.query(queryStr, {item_id: item}, function(err, data) {\n\n\t\t\tif (err) throw err;\n\n\t\t\tif (data.length === 0) {\n\t\t\t\tdisplayInventory();\n\n\t\t\t} else {\n\n\t\t\t\tvar productInfo = data[0];\n\n\t\t\t\tif (quantity <= productInfo.stock_quantity) {\n\t\t\t\t\tconsole.log(\"Congratulations, the product you requested is in stock! Placing order!\");\n\n\t\t\t\t\t// Construct the updating query string\n\t\t\t\t\tvar updateQueryStr = \"UPDATE products SET stock_quantity = \" + (productInfo.stock_quantity - quantity) + \" item_id = \" + item;\n\t\t\t\t\t// console.log('updateQueryStr = ' + updateQueryStr);\n\n\t\t\t\t\t// Update the inventory\n\t\t\t\t\tconnection.query(updateQueryStr, function(err, data) {\n\t\t\t\t\t\tif (err) throw err;\n\n\t\t\t\t\t\tconsole.log(\"Your oder has been placed! Your total is $\" + productInfo.price * quantity);\n\t\t\t\t\t\tconsole.log(\"Thank you for shopping with us!\");\n\t\t\t\t\t\tconsole.log(\"\\n---------------------------------------------------------------------\\n\");\n\n\t\t\t\t\t\t// End the database connection\n\t\t\t\t\t\tconnection.end();\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log(\"Sorry, there is not enough product in stock, your order can not be placed as is.\");\n\t\t\t\t\tconsole.log(\"Please modify your order.\");\n\t\t\t\t\tconsole.log(\"\\n---------------------------------------------------------------------\\n\");\n\n\t\t\t\t\tdisplayInventory();\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t})\n\t})\n\n}", "title": "" }, { "docid": "d544fe0a907fba73e23452152c84e4ec", "score": "0.74471575", "text": "function purchasePrompt(res) {\n inquirer.prompt([\n {\n type: \"number\",\n message:\"What is the id (not index) of the product you want to buy?\",\n name: \"id\",\n validate: numVal\n },\n {\n type: \"number\",\n message: \"How many do you wish to purchase?\",\n name: \"quantity\",\n validate: isNum\n }\n ]).then(answer => {\n let id = answer.id,\n num = answer.quantity,\n item = res[id-1];\n\n console.log(\" \");\n\n // * Item and current quantity\n //console.log(`Item: ${item.name} \\nQuantity: ${item.quantity}\\n`);\n\n if (item.quantity < num) {\n console.log( \n item.quantity === 0 ? \n \"Sorry, we are out of stock!\" :\n \"Sorry, we don't have that many left!\"\n )\n newPurchase();\n } else {\n let receipt = [\n eDiv,\n \"Your order:\",\n dDiv,\n \" Purchase: \" + item.name,\n \" Quantity: \" + num,\n \" Price: \" + item.price,\n \" Total: \" + (item.price * num).toFixed(2),\n dDiv,\n \"Thank you for your purchase!\",\n eDiv + \"\\n\",\n ].join(\"\\n\");\n\n console.log(receipt);\n\n purchasing(item, num);\n }\n })\n \n \n}", "title": "" }, { "docid": "412a5790552c8d0d94829cb81325e124", "score": "0.7429283", "text": "function selectItemToBuy() {\n connection.query(\"SELECT * FROM products\", function (err, results) {\n if (err) throw err;\n inquirer\n .prompt([\n {\n name: \"choice\",\n type: \"rawlist\",\n choices: function () {\n var choiceArray = [];\n for (var i = 0; i < results.length; i++) {\n choiceArray.push(results[i].product_name);\n }\n return choiceArray;\n },\n message: \"What is the product you wish to buy?\"\n },\n {\n name: \"quantity\",\n type: \"input\",\n message: \"Enter the quantity of the item to be purchased.\"\n }\n ])\n .then(function (answer) {\n var chosenItem;\n for (var i = 0; i < results.length; i++) {\n if (results[i].product_name === answer.choice) {\n chosenItem = results[i];\n }\n }\n\n if (chosenItem.stock_quantity > parseInt(answer.quantity)) {\n //update the stock of the item selected after the user inputs a quantity to buyy\n connection.query(\n \"UPDATE products SET ? WHERE ?\",\n [\n {\n stock_quantity: chosenItem.stock_quantity - parseInt(answer.quantity)\n },\n {\n item_id: chosenItem.item_id\n }\n ],\n function (error) {\n if (error) throw err;\n console.log(\"Product order has been placed!\");\n continueEnd();\n }\n );\n } else {\n console.log(\"There is not enough quantity of this item in stock.\")\n continueEnd();\n }\n });\n });\n}", "title": "" }, { "docid": "83484c6c56916898e94a07acc88e1a6c", "score": "0.7423702", "text": "function id() {\n inquirer.prompt({\n name: \"id\",\n message: \"What is the ID of the product you would like to update?\"\n }).then(function (a) {\n const n = parseInt(a.id);\n const arrN = parseInt(res.length);\n if ((n !== null) && (Number.isInteger(n)) && (arrN >= n)) {\n qty(a.id);\n } else {\n console.log('Silly... Enter a number ID! ... req: integer | product id needs to exist ');\n id();\n }\n });\n }", "title": "" }, { "docid": "3a87674320f41b90be6855bcec56b18e", "score": "0.74107075", "text": "function promptCustomerForItem(inventory) {\n inquirer\n .prompt([\n {\n type: \"input\",\n name: \"choice\",\n message: \"What is the ID of the item you would you like to purchase? [Quit with Q]\",\n validate: function (val) {\n return !isNaN(val) || val.toLowerCase() === \"q\";\n }\n }\n ])\n .then(function (val) {\n checkIfShouldExit(val.choice);\n var choiceId = parseInt(val.choice);\n var product = checkInventory(choiceId, inventory);\n\n if (product) {\n promptCustomerForQuantity(product);\n }\n else {\n console.log(\"\\nThat item is not in the inventory.\");\n loadProducts();\n }\n });\n}", "title": "" }, { "docid": "c68db269e6c1d082ed6ca95dbb2d7c1d", "score": "0.74102646", "text": "function itemToBuy(res) {\n inquirer.prompt([{\n name: \"itemId\",\n type: \"input\",\n message:\"please enter the product Id of the item you want to purchase.\"\n\n \n },\n{\n name: \"amount\",\n type: \"input\",\n message:\"please enter the amount you want to purchase.\"\n\n}])\n //checking to see if the product exist or not \n.then(function(product) {\n\n console.log(product);\n var A = product.itemId\n var B = product.amount\n buyItem(A,B) \n\n\n});\n// if product exists ask users how many they would like to buy\nfunction buyItem(id, amount){\n connection.query(\"UPDATE products SET stock_quantity = stock_quantity - ? WHERE item_id = ?\", \n [ amount, id],\n function(err,res){\n if (err){\n console.log(err)\n }else{\n console.log(\"purchase was successful\")\n displayItems()\n }\n }\n )\n}\n}", "title": "" }, { "docid": "6bc64d87847cccf09f878e0af3293eaf", "score": "0.74096626", "text": "function purchase() {\n inquirer\n .prompt([\n {\n name: \"itemId\",\n type: \"input\",\n message: \"What is the Item ID of the product you would like to buy?\"\n },\n {\n name: \"quantity\",\n type: \"input\",\n message: \"How many units would you like to buy?\"\n }\n ])\n .then(function(answer) {\n // query the database for all items\n connection.query(\"SELECT * FROM products\", function(err, res) {\n if (err) throw err;\n var chosenItem;\n for (var i = 0; i < res.length; i++) {\n if (res[i].item_id === parseInt(answer.itemId)) {\n chosenItem = res[i];\n }\n }\n if (chosenItem.stock_quantity >= parseInt(answer.quantity)) {\n // updates stock quantity after purchase\n connection.query(\n \"UPDATE products SET ? WHERE ?\",\n [\n {\n stock_quantity: (chosenItem.stock_quantity - parseInt(answer.quantity))\n },\n {\n item_id: answer.itemId\n }\n ],\n );\n console.log(\"_________________________________________________________________________________________\\n\\n\");\n console.log(\"Thank you for your business! Your total is \" + \"$\" + parseInt(answer.quantity) * chosenItem.price + \"\\n\");\n console.log(\"_________________________________________________________________________________________\\n\\n\");\n start();\n }\n else {\n // console log message that item is out of stock\n console.log(\"_________________________________________________________________________________________\\n\\n\");\n console.log(\"Sorry, insufficient stock! Please choose another item.\");\n console.log(\"_________________________________________________________________________________________\\n\\n\");\n connection.query(\n \"UPDATE products SET ? WHERE ?\",\n [\n {\n stock_quantity: 0\n },\n {\n item_id: answer.itemId\n }\n ],\n );\n start();\n }\n });\n });\n}", "title": "" }, { "docid": "fca30c35155f1830159a5d01932f0258", "score": "0.7404691", "text": "function askCustomer(item) {\n inquirer\n .prompt([\n {\n type: \"input\",\n name: \"itemChoice\",\n message: \"See anything you like? Specify the item you would like to purchase by entering the ID number associated with that item!\",\n validate: function(val) {\n return !isNaN(val) \n }\n }\n ])\n .then(function(val) {\n var choiceId = parseInt(val.itemChoice);\n var product = checkInventory(choiceId, item);\n \n // if a product matches the id the customer provided:\n if (product) {\n // we will pass the product to our prompt to deal with the amount:\n itemQuantityPrompt(product);\n }\n else {\n //if there is not enough quantity in stock, we will return to the prompt asking for the ID # of the item they would like to purchase\n console.log(\"\\nThat item is not in the inventory.\");\n productsDisplay();\n }\n });\n }", "title": "" }, { "docid": "32890657a41e7eb331549e79d1552394", "score": "0.7402939", "text": "function productId() {\n\n\tinquirer.prompt([\n\n\t\t{\n\t\t type: \"input\",\n\t\t name: \"id\",\n\t\t message: \"Please enter the Forzen Item ID of the product you would like to buy.\\n\",\n\t\t validate: function(value) {\n\t\t \tif (!isNaN(value) && value < 12) {\n\t\t \t\treturn true;\n\t\t \t}\n\t\t \treturn false;\n\t\t }\n\t\t},\n\n\t\t{\n\t\t type: \"input\",\n\t\t name: \"quant\",\n\t\t message: \"How many units of the frozen product would you like to buy? \\n\",\n\t\t validate: function(value) {\n\t\t \tif (!isNaN(value)) {\n\t\t \t\treturn true;\n\t\t \t}\n\t\t \treturn false;\n\t\t\t}\n\t\t}\n\n\t\t]).then(function(answer) {\n\n\t\t\tvar userId = answer.id;\n\t\t\tconsole.log(\"Chosen item id: \" , userId);\n\n\t\t\tvar userQuant = answer.quant;\n\t\t\tconsole.log(\"Chosen quantity from stock: \" , userQuant , \"\\n\");\n\n\t\t\tconnection.query(\"SELECT * FROM products WHERE ?\", [{ item_id : answer.id }], function(err, result) {\n\t\t\t\tif (err) throw err;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tconsole.table(result);\n\t\t\t\tvar current_quantity = result[0].stock_quantity;\n\t\t\t\tconsole.log(\"Current quantity in stock: \" , current_quantity);\n\t\t\t\tvar price = result[0].price;\n\t\t\t\tvar remaining_quantity = current_quantity - answer.quant;\n\t\t\t\tconsole.log(\"Remaining quantity in stock: \" , remaining_quantity);\n\n\t\t\t\tif(current_quantity > answer.quant) {\n\n\t\t\t\t\tconsole.log(\"Amount Remaining: \" + remaining_quantity);\n\t\t\t\t\tconsole.log(\"Total Cost: \" + (answer.quant * price) + \"\\n\");\n\n\t\t\t\t\tconnection.query(\"UPDATE products SET stock_quantity=? WHERE item_id=?\",\n [\n remaining_quantity, answer.id\n ],\n\n\t\t\t\t\t\n\t\t\t\t\t\tfunction(err, result){\n\t\t\t\t\t\t\tconsole.table(result);\n\t\t\t\t\t\t});\n\n\t\t\t\t\tconnection.query(\"SELECT * FROM products\", function(err, result) {\n\n\t\t\t\t\t\tconsole.log(\"This is the updated inventory of product items: \");\n\t\t\t\t\t\tconsole.log(\"------------------------------- \\n\");\n\t\t\t\t\t\tconsole.table(result);\n\t\t\t\t\t});\n\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log(\"Insufficient amounts, please edit your units!\");\n\t\t\t\t}\n\n\t\t\tconnection.end();\n\n\t\t\t});\n\t\t})\n\n}", "title": "" }, { "docid": "e5c3d462b4eb5a06060318f03fc5b2f1", "score": "0.74018025", "text": "function buyAnItem () {\n\tinquirer\n\t .prompt([\n\t {\n\t name: \"itemID\",\n\t type: \"input\",\n\t message: \"What is the ID number of the product you would like to purchase?\"\n\t },\n\t {\n name: \"units\",\n type: \"input\",\n message: \"How many units would you like to purchase?\"\n }\n ])\n\n\t .then(function(input) {\n\t var item = input.itemID;\n\t var units = input.units;\n\t var queryProducts = \"SELECT * FROM products WHERE ?\";\n\n\t connection.query(queryProducts, {item_id: item}, function(err, res) {\n\t \tif (err) throw err;\n\n\t \tif (res.length===0) {\n\t \t\tconsole.log(\"The ID you have entered is invalid. Please enter a valid item ID.\");\n\t \t\tdisplayItems();\n\t \t\tbuyAnItem();\n\t \t}\n\t \telse {\n\t \t\tvar getProduct = res[0];\n\n\t \t\tif (units <= getProduct.stock_quantity) {\n\t \t\t\tconsole.log(\"The item you have selected is in stock. Placing your order now...\");\n\t \t\t\t//update the bamazon database accordingly\n\n\t \t\t\tconnection.query(\"UPDATE products SET stock_quantity = \" + (getProduct.stock_quantity - units) + \" WHERE item_id = \" + item, function(err, res) {\n\t \t\t\t\tif (err) throw err;\n\t \t\t\t\tconsole.log(\"-------------------------------------------------------------------\");\n\t \t\t\t\tconsole.log(\"Congratulations, your order has been placed! Your total is $\" + getProduct.price * units + \".\");\n\t \t\t\t\tconsole.log(\"Thank you for your purchase! Come again soon!\");\n\t \t\t\t\tconsole.log(\"-------------------------------------------------------------------\");\n\t \t\t\t\tconnection.end();\n\t \t\t\t})\n\t \t\t}\n\t \t\telse {\n\t \t\t\tconsole.log(\"Insufficient quantity!\");\n\t \t\t\tconsole.log(\"Sorry, the item you are trying to purchase does not have enough product in stock. Please adjust your order.\");\n\t \t\t\tconsole.log(\"-------------------------------------------------------------------\");\n\t \t\t\tbuyAnItem();\n\t \t\t}\n\t \t}\n\t })\n\t}); \n}", "title": "" }, { "docid": "f7d4b754f300cf74b16e49b780dcb57e", "score": "0.7398182", "text": "function inquireProductId() {\n // get all the rows in the products table and set up callback\n shared.get(\"products\", function(rows) {\n // display the product rows in a nice table. format the price column as currency. hide the product_sales column\n shared.displayTable(rows, [\"price\"], [\"product_sales\"]);\n inquirer.prompt([\n {\n name: \"productId\",\n message: \"What is the ID of the product you'd like to buy?\",\n validate: shared.validatePositiveNumber\n }\n ]).then(function(answer) {\n const productId = Number(answer.productId);\n // find the row that matches the id the user inputted\n const row = rows.find((row) => row.item_id === productId);\n // if the row is found, ask about the quantity, otherwise tell the user nothing was found\n if (row !== void 0) {\n inquireQuantity(row);\n } else {\n console.log(\"Sorry, we don't have any products with that ID.\");\n // close the connection because we're done\n shared.closeConnection();\n }\n });\n });\n}", "title": "" }, { "docid": "757624fcb3db47ecbe16a1dc125819ee", "score": "0.73764384", "text": "function customerOptions(id) {\n \nconsole.log(id);\n inquirer\n .prompt([{\n name: \"idSelect\",\n type: \"number\",\n message: \"What is the ID of the item you want to purchase?\",\n validate: function (value) {\n if (id.includes(value)) {\n return true;\n }\n return \"That is a invalid selection\";\n }\n },\n {\n name: \"quantity\",\n type: \"number\",\n message: \"How many units of would you like to buy?\",\n validate: function (value) {\n if (isNaN(value) === false && value > 0) {\n return true;\n }\n return \"That is a invalid selection\";\n }\n }]).then(function (order) {\n console.log(order);\n \n })\n}//ends customerOptions function", "title": "" }, { "docid": "941f156be5effa832a989727550d9fc9", "score": "0.73753506", "text": "function itemPurchase(){\n inquirer.prompt([\n {\n type: \"input\",\n name: \"id\",\n message: \"What item would you like to purchase?\",\n validate: function (value) {\n if (isNaN(value) === false && parseInt(value) > 0 && parseInt(value) <= 10) {\n return true;\n }\n console.log(\" please enter a number 1-10\")\n return false;\n }\n },\n {\n type: \"input\",\n name: \"stock_quantity\",\n message: \"How many would you like to purchase?\",\n validate: function(value) {\n if (isNaN(value) === false) {\n return true;\n }\n return false;\n }\n }\n ]).then (function (answers) {\n //Once the customer has placed the order, your application should check if your store has enough of the product to meet the customer's request.\n if (parseInt(answers.stock_quantity) > dataArr[answers.id - 1].stock_quantity) {\n //If not, the app should log a phrase like Insufficient quantity!, and then prevent the order from going through.\n console.log(\"Insufficient Quantity! There are only \" + dataArr[answers.id - 1].stock_quantity + \" left in stock!\")\n itemPurchase();\n } else {\n //However, if your store does have enough of the product, you should fulfill the customer's order.\n //Once the update goes through, show the customer the total cost of their purchase.\n console.log(\"Order Placed: \" + (parseInt(answers.stock_quantity) * dataArr[answers.id - 1].price));\n var newQuantity = (dataArr[answers.id - 1].stock_quantity) - (parseInt(answers.stock_quantity));\n // console.log(newQuantity);\n connection.query(\"UPDATE products SET stock_quantity = ? WHERE id = ?\", [newQuantity, answers.id], function(err){\n if (err) throw err;\n newOrder();\n });\n }\n })\n}", "title": "" }, { "docid": "04175c8af099470461b9e4cb8835693d", "score": "0.73705167", "text": "function getUserPrompt(data) {\n var options = [];\n for (j in data) {\n options[j] = data[j].item_id + \" : \" + data[j].product_name;\n }\n inquirer.prompt([\n {\n type: \"list\",\n name: \"productId\",\n message: \"Which item would you like to buy?\",\n choices: options,\n },\n {\n type: \"input\",\n name: \"quantity\",\n message: \"How many would you like to purchase?\"\n }\n ]).then(function (userInput) {\n\n var product = userInput.productId.split(\" :\");\n var productId = product[0];\n\n connection.query(\"SELECT * FROM products WHERE ?\",\n [{ item_id: productId }],\n function (error, data) {\n if (error) throw error;\n checkStock(data, userInput.quantity);\n });\n });\n\n //checks to see if there is enough quantity based on the user input\n function checkStock(data, quantity) {\n if (data[0].stock_quantity < quantity) {\n console.log(\"Sorry we do not have enough items in stock. Please view how many items are remaining.\");\n console.log(\"\\n----------------------------------------\\n\");\n dispSaleItems();\n } else {\n updateDB(data, quantity);\n updateSale(data, quantity);\n totalCost(data, quantity);\n }\n };\n\n //updates the table with new quantity value\n function updateDB(data, quantity) {\n var quantity_left = data[0].stock_quantity - quantity;\n connection.query(\"UPDATE products SET ? WHERE ?\",\n [\n { stock_quantity: quantity_left },\n { item_id: data[0].item_id }\n ],\n function (error, data) {\n if (error) throw error;\n });\n };\n\n //updates the tbale with new sales value\n function updateSale(data, quantity) {\n var totalSale = data[0].product_sales + data[0].price * quantity;\n connection.query(\"UPDATE products SET ? WHERE ?\",\n [\n \t{ product_sales: totalSale },\n { item_id: data[0].item_id } \n ],\n function (error, data) {\n if (error) throw error;\n });\n };\n\n //displays the most recent transaction\n function totalCost(data, quantity) {\n console.log(\"\\n--------------------------------------------\\n\");\n console.log(\"Product : \" + data[0].product_name);\n console.log(\"Price : \" + data[0].price);\n console.log(\"Quantity : \" + quantity);\n console.log(\"Total Cost: \" + data[0].price * quantity);\n console.log(\"\\n--------------------------------------------\\n\");\n dispSaleItems();\n }\n}", "title": "" }, { "docid": "3223c99873bdac14a672b98d8e7e197a", "score": "0.7370336", "text": "function chooseInventoryQuantity(itemID, selectedItem, stockQuantity) {\n inquirer.prompt([\n {\n //inquirer prompt type input\n type: \"input\",\n name: \"userQuantity\",\n message: \"What quantity of inventory would you like to add?\"\n }\n ]).then(function (userSelect) {\n //saves userQuantity entered into variable userQuantity\n var userQuantity = userSelect.userQuantity;\n //checks to make sure that user entry is a number\n if (isNaN(parseFloat(userQuantity))) {\n //console logs user error\n console.log(\"Entry is not a number - Try Again\");\n chooseInventoryQuantity(itemID, selectedItem, stockQuantity);\n } else {\n //calculates new stock quantity\n var newStockQuantity = parseInt(stockQuantity) + parseInt(userQuantity);\n //calls function to update database with new stock quantity\n updateDatabaseQuantity(itemID, selectedItem, newStockQuantity);\n }\n })\n}", "title": "" }, { "docid": "a1130fd7fb166361f424447fbd0aa39b", "score": "0.7366564", "text": "function idSearch(items) {\n inquirer\n .prompt([{\n name: \"item_id\",\n type: \"input\",\n message: \"Please select the ID of the product you wish to purchase?\",\n validate: function validateID(id){\n return id !== '' && items.indexOf(parseInt(id)) > -1;\n }\n },{\n name: \"num_items\",\n type: \"input\",\n message: \"How many would you like to purchase?\",\n validate: function(amount){\n if (isNaN(amount) === false) {\n return true;\n\n }\n return false;\n }\n }])\n .then(function(answer) {\n var numRequested = parseInt(answer.num_items);\n var itemRequested = parseInt(answer.item_id);\n var query = \"SELECT item_id, product_name, price, stock_quantity FROM products WHERE item_id= ? \"; \n connection.query(query, [itemRequested], function(err, res) {\n var stockNum = parseInt(res[0].stock_quantity);\n var itemPrice = parseFloat(res[0].price);\n var totalCost = numRequested * itemPrice; \n if (stockNum > 0 ) {\n connection.query('UPDATE products SET stock_quantity = stock_quantity -? WHERE item_id= ? ', [numRequested, itemRequested], function(err, res) {\n if (err) throw err;\n }) \n console.log(orderInfo + \"\\n\" + \"There are \" + res[0].stock_quantity + \" \" + res[0].product_name + \"'s available, at the cost of: \" + \"$\" + res[0].price + \"\\n\" + smallDiv + \"\\n\" + \"Your total comes to $\" + totalCost + \"\\n\" + smallDiv + \"\\n\" + \"Your order will arrive in 2 days. Thanks for being a Bamazon Brime Member!\" + \"\\n\" + bigDiv);\n } else {\n console.log(bigDiv + \"\\n\" + \"Sorry, we're fresh out of \" + res[0].product_name + \", please check back later.\" + \"\\n\" + bigDiv);\n } \n whatNow();\n })\n })\n}", "title": "" }, { "docid": "ddf8334819f9b6aaaf811b92c73f127d", "score": "0.7364538", "text": "function question(){\ninquirer.prompt([{\n type: \"input\",\n name: \"idSelect\",\n message: \"What's the ID of the product you would like to buy?\"\n },\n {\n type: \"input\",\n name: \"unitSelect\",\n message: \"How many units of the product you would like to buy?\"\n }]).then( function (response) {\n var prodId = parseInt(response.idSelect);\n var units = response.unitSelect;\n placeOrder(prodId,units);\n\n })\n}", "title": "" }, { "docid": "0d6d22734127104e4af4c1835cbce010", "score": "0.7363428", "text": "function customerSelection(inventory) {\n inquirer\n .prompt([\n {\n name: \"choice\",\n type: \"input\",\n message: \"Type in the id number of item desired\",\n validate: function (val) {\n return !isNaN(val);\n }\n }\n\n ])\n // inquirer function will return an object with a key name: choice = userinput\n\n .then(function (val) {\n console.log(val);\n var itemId = parseInt(val.choice);\n var product = checkInventory(itemId, inventory);\n if (product) {\n\n // runs function for quantity selection afte the product is selected\n customerQuant(product);\n\n }\n else {\n // make another selection if # isn't in selection list\n console.log(\" \");\n console.log(\" \");\n console.log(\"--------------------------------\");\n console.log(\"That item is not in the inventory, choose another product.\");\n console.log(\"--------------------------------\");\n console.log(\" \");\n console.log(\" \");\n afterConnection();\n\n\n }\n });\n\n }", "title": "" }, { "docid": "7501a85bd9eefe0aef3c10ae4b2bbefd", "score": "0.73557943", "text": "function takeOrder() {\n inquirer.prompt([{\n type: \"input\",\n name: \"product\",\n message: \"Enter the ID of the Wine you'd like to purchase.\"\n },\n {\n type: \"input\",\n name: \"quantity\",\n message: \"Enter the number of bottles you'd like to purchase.\"\n }\n ]).then(function(answer) {\n orderItemID = answer.product;\n orderQuantity = answer.quantity;\n getProductDetails()\n });\n} // close function, takeOrder", "title": "" }, { "docid": "fe0183b26e2aeb2f9fe27038c9a0af94", "score": "0.7352406", "text": "function productID() {\n inquirer.prompt({\n name: \"productID\",\n type: \"input\",\n message: \"Please refer to the table above and enter the product ID you would like to purchase today.\",\n // Checks if the product ID entered by the user is a number between 1-10\n validate: function(value) {\n if (!isNaN(value) && (value > 0 && value <= 10)) {\n return true;\n } else {\n console.log(chalk.redBright(\"You must enter a product ID between 1-10 to move forward with your order.\"));\n return false;\n }\n }\n }).then(function(answer) {\n connection.query(\"SELECT item_id, product_name, department_name, price, stock_quantity, product_sales FROM products WHERE ?\", { item_id: answer.productID }, function(err, res){\n // Checks with the user if this is the correct product they want to purchase.\n productCheck(res[0].product_name, res);\n });\n });\n}", "title": "" }, { "docid": "3ee5f3d1c6331d7faf77f87e3bba53ee", "score": "0.7348048", "text": "function promptUserForQuantity(product) {\n inquirer\n .prompt([\n {\n type: \"input\",\n name: \"userquantity\",\n message: \"How many would you like? (input q to quit)\",\n validate: function (payload) {\n return payload > 0 || payload.toLowerCase() === \"q\";\n }\n }\n ])\n .then(function (val) {\n // Check if the user wants to quit\n checkQuit(val.userquantity);\n var quantity = parseInt(val.userquantity);\n\n // If there isn't enough stock, notify user and call loadItems();\n if (quantity > product.stock_quantity) {\n console.log(\"----------------------------------\");\n console.log(\"Quantity not valid, please enter a valid number!\");\n console.log(\"----------------------------------\");\n loadItems();\n }\n else {\n // Else, call makePurchase, pass through the information \n makePurchase(product, quantity);\n }\n });\n}", "title": "" }, { "docid": "65b7ab750cb0328d90a53021d6649260", "score": "0.7344358", "text": "function promptQuantity() {\n inquirer.prompt([\n {\n type: \"input\",\n message: \"How many of \" + productName + \" will be added to the inventory?\",\n name: \"numToAdd\",\n validate: function(value) {\n if (numTest.test(value)) {\n return true;\n } else {\n return false;\n }\n }\n }\n ]).then(function(res) {\n addStock = res.numToAdd;\n var newQuantity = parseInt(currentStock) + parseInt(addStock);\n //Updates the database to reflect the added stock\n connection.query(\"UPDATE products SET stock_quantity = \" + newQuantity + \" WHERE item_id = \" + idNum, function(err) {\n if (err) throw err;\n console.log(\"\\nThere are now \" + newQuantity + \" \" + productName + \"\\n\");\n restart();\n });\n }); \n}", "title": "" }, { "docid": "7979de8e47bc8d9e75f9d32cf1399f7b", "score": "0.7342738", "text": "function purchaseItems() {\n\n\tinq2\n \t.prompt([\n\t {\n\t type: \"input\",\n\t message: \"Please provide the item ID:\",\n\t name: \"itemID\",\n\t validate: function(ch) {\n\n\t \tif(prodIdArr[ch])\n\t \t\treturn true\n\n\t }\n\t },\n\t {\n\t type: \"input\",\n\t message: \"How many would you like to purchase?\",\n\t name: \"itemCnt\",\n\t }\n \t])\n \t.then(function(res) {\n \n\t \t\tif (prodIdArr[res.itemID] < res.itemCnt) {\n\t \t\t\tconsole.log(\"\\nInsufficient Quantity!\\n\")\n\t \t\t\tpurchaseItems()\n\t \t\t} else {\n\t \t\t\tvar p = parseFloat(res.itemCnt * prodPriceArr[res.itemID]).toFixed(2)\n\t \t\t\tconsole.log(\"\\nYour total price is $\"+p+\"\\n\")\n\t \t\t\t\n\t \t\t\tinq2\n\t \t\t\t\t.prompt([\n\t\t \t\t\t\t{\n\t\t \t\t\t\t\ttype: \"confirm\",\n\t\t\t\t\t message: \"Would you like to continue?\",\n\t\t\t\t\t name: \"confirm\",\n\t\t\t\t\t default: true \n\t\t \t\t\t\t}\n\t \t\t\t\t])\n\t \t\t\t\t.then(function(r) {\n\n\t \t\t\t\t\tif (r.confirm) {\n\t \t\t\t\t\t\tconnectSQL()\n\t\t\t\t \t\t\tsetTimeout(function() {\n\t\t\t\t \t\t\t\tupdateDatabase(res.itemID,res.itemCnt)\n\t\t\t\t \t\t\t},500)\n\t \t\t\t\t\t} else {\n\t \t\t\t\t\t\tconsole.log(\"\\nThank you for using Bamazon. Have A Good Day!\\n\")\n\t \t\t\t\t\t }\n\n\t \t\t\t\t})\n\t \t\t\t\n\t \t\t }\n\n\n \t});\n\n}", "title": "" }, { "docid": "b8f563430d392760f36588c468cae560", "score": "0.7342417", "text": "function purchaseItem(department){\n inquirer.prompt([{\n name: \"id\",\n type: \"input\",\n message: \"Select an item by its ID to purchase.\",\n validate: function(value) {\n if (isNaN(value) === false) {\n return true;\n }\n return false;\n }\n }, {\n name: \"quantity\",\n type: \"input\",\n message: \"How many would you like today?\",\n validate: function(value) {\n if (isNaN(value) === false) {\n return true;\n }\n return false;\n }\n }]).then(function(answer){\n //Grab price to display to user how much they have spent.\n //Grab stock to check against requested quantity.\n let itemInfo = \"SELECT price,stock FROM \" + department + \" WHERE ?\"\n let price;\n connection.query(itemInfo, { id: answer.id }, function(err, res){\n if (err) throw err;\n //If stock insufficient, inform customer and return to main menu.\n if((res[0].stock - answer.quantity) < 0){\n console.log(\"I'm sorry, we have insufficient stock to complete your request.\")\n storeWelcome();\n } else{\n //Find total for user order\n price = (res[0].price * answer.quantity);\n //If price contains a decimal that ends after one place, add a \"0\" in accordance with US currency convention.\n price = price.toFixed(2);\n orderSuccess(department, price, answer.id, answer.quantity)\n }\n });\n });\n \n}", "title": "" }, { "docid": "922519b9ba35d3e04b48dabf96203e5a", "score": "0.73345125", "text": "function verifyStock(id, quantity) {\n connection.query(\"SELECT * FROM products WHERE item_id = ?\", [id], function (err, results) {\n if (err) throw err;\n var total = (results[0].price * quantity).toFixed(2);\n if (quantity > results[0].stock_quantity) {\n console.log(\"Sorry we do not have that many units on hand\");\n buyProduct(id);\n } else {\n inquirer.prompt({\n name: \"cost\",\n type: \"confirm\",\n message: \"Your total is \" + total + \". Do you wish to make the purchase?\"\n }).then(function (input) {\n if (input.cost === true) {\n confirmPurchase(id, quantity, total);\n } else {\n allItems();\n }\n })\n }\n });\n}", "title": "" }, { "docid": "9ba4588474109e627c0e4b4ff8ea35ce", "score": "0.7333039", "text": "function prompts(id,quantity){\n\t\t\t\t\t\tthis.itemId = itemId;\n\t\t\t\t\t\tthis.quantity = quantity; \n\t\t\t\t\t}", "title": "" }, { "docid": "e89c1c1ad36014169a3573e6f0dc1bc7", "score": "0.73230726", "text": "function promptUserForSelection() {\n inquirer.prompt(\n [\n {\n name: 'item',\n type: 'list',\n message: 'Which item would you like to purchase?',\n choices: function () {\n return snapshot.map(function (item) {\n return item.item_id + ' | ' + item.product_name + ' | Price: $' + item.price + ' | Quantity Available: ' + item.stock_quantity;\n });\n }\n },\n {\n name: 'quantity',\n type: 'input',\n message: function(answers) {\n return 'What quantity would you like to purchase of ' + answers.item.split(' | ')[1] + '? ' + answers.item.split(' | ')[3];\n },\n validate: function(answer) {\n var pattern = /^\\d+$/;\n if (pattern.test(answer)) {\n return true;\n } else {\n return 'Please enter a valid number.';\n }\n }\n }\n ]\n ).then(\n function(answers) {\n\n currentItem.item_id = parseInt(answers.item.split(' | ')[0], 10);\n currentItem.product_name = answers.item.split(' | ')[1];\n currentItem.price = parseFloat(answers.item.split(' | ')[2].split('$')[1]);\n currentItem.quantity_requested = parseInt(answers.quantity, 10);\n\n\n checkDatabaseQuantity();\n }\n );\n}", "title": "" }, { "docid": "a6fd1bf01034148fc529825d7f2f703d", "score": "0.7321824", "text": "function promptForQuantity(product){\n inquirer.prompt([\n {\n type: \"input\",\n name: \"choice\",\n message: \"How many do you want to purchase? [type Q to quit]\",\n validate: function(val){\n return ~isNaN(val)||val.toLowerCase()===\"q\"\n }\n }\n ]).then(function(val){\n checkIfShouldExit(val.choice);\n var choiceQuantity = parseInt(val.choice);\n\n if (val >= val.stock_quantity) {\n //if availble, make purchase\n makePurchase();\n }\n else { // Inform customer that there is not enough available.\n console.log(\"\\nNot enough available to fulfill order.\");\n promptForQuantity();\n }\n\n })\n}", "title": "" }, { "docid": "4a6b9f4cd9b50b309889c9c38165dce5", "score": "0.7321822", "text": "function promptStockQty(item) {\n inquirer\n .prompt({\n name: \"stock_quantity\",\n type: \"input\",\n message: \"How many would you like to purchase?\",\n })\n .then(function (value) {\n if (value.stock_quantity > item.stock_quantity) {\n console.log();\n console.log(\"We're sorry, there are not enough items in stock. Please try again.\");\n console.log();\n loadTable();\n } else {\n console.log();\n // Display the total purchase price per item\n console.log(\"Your purchase total for \" + item.product_name + \" is: $\" + value.stock_quantity * item.price);\n console.log();\n // Update the table's quantity amounts after the user has made a successful purchase\n var updatedQty = item.stock_quantity - value.stock_quantity;\n connection.query(\"UPDATE products SET stock_quantity = ? WHERE item_id = ?\", [updatedQty, item.item_id], function (err, result) {\n if (err) throw err;\n loadTable();\n });\n }\n })\n}", "title": "" }, { "docid": "bc9c70e0ce15d03dc24ccb2f0f97508c", "score": "0.731775", "text": "function promptID() {\n inquirer.prompt([\n {\n type: \"input\",\n message: \"What is the ID of the product you would like to update?\",\n name: \"updateID\",\n validate: function(value) {\n if (possibleIDs.indexOf(parseInt(value)) === -1) {\n return false;\n } else {\n return true;\n }\n }\n }\n ]).then(function(res) {\n idNum = res.updateID;\n //Uses the id to gather the name of the chosen product and current number in stock\n connection.query(\"SELECT product_name, stock_quantity FROM products WHERE item_id = \" + idNum, function(err, res) {\n if (err) throw err;\n productName = res[0].product_name;\n currentStock = res[0].stock_quantity;\n promptQuantity();\n });\n });\n}", "title": "" }, { "docid": "a1ab6c71d5e9dbe54a747bff8c34fe98", "score": "0.7305794", "text": "function promptCustomer() {\n inquirer\n .prompt({\n name: \"ItemID\",\n type: \"input\",\n message: \"What is the ID of the item you would like to purchase?\",\n });\n\n inquirer\n .prompt([\n {\n name: \"ID\",\n type: \"rawlist\",\n choices: function() {\n var choiceArray = [];\n for (var i = 0; i < results.length; i++) {\n choiceArray.push(results[i].item_id);\n }\n return choiceArray;\n },\n message: \"How many would you like to purchase?\"\n },\n \n ])\n .then(function(answer) {\n // get the information of the chosen item\n var chosenItem;\n for (var i = 0; i < results.length; i++) {\n if (results[i].item_name === answer.choice) {\n chosenItem = results[i];\n }\n }\n })\n}", "title": "" }, { "docid": "6da6a5047195161f197e874d438f71c5", "score": "0.73024863", "text": "function selectItem() {\n\t//Create a connection query to the database.\n\t//Select all columns from the products table to get product info.\n\tconnection.query(\"SELECT * FROM products\", function(err, res){\n\t\t//If there is an error, throw error.\n\t\tif(err) throw err;\n\n\t\t//To make purchase, prompt user for item number and quantity.\n\t\tvar selectItem = [\n\t\t {\n\t\t type: 'text',\n\t\t name: 'itemNumber',\n\t\t message: 'Enter item number: ',\n\t\t validate: function(value) {\n\t if (isNaN(value) === false) {\n\t return true;\n\t }\n\t return false;\n\t }\n\n\t\t },\n\t\t {\n\t\t type: 'text',\n\t\t name: 'howMany',\n\t\t message: 'How many would you like to buy?',\n\t\t validate: function(value) {\n\t if (isNaN(value) === false) {\n\t return true;\n\t }\n\t return false;\n\t \t}\n\t }\n\t\t];\n\n\n\t\tinquirer.prompt(selectItem).then(answers => {\n\t\t\t\t//console.log(res);\n\t\t\t\t//console.log(\"User entered: \" + answers.itemNumber);\n\t\t\t\t//Create variable that will hold the item the customer selects and wants to purchase.\n\t\t\t\tvar customerItem;\n\t\t\t\t//This array will hold all the possible item numbers in the store.\n\t\t\t\tvar availableItemNumbers = [];\n\t\t\t\t//Push the item ids from the products table in the database to the availableItemNumbers array.\n\t\t\t\tfor (var i = 0; i < res.length; i++){\n\t\t\t\t\tavailableItemNumbers.push(res[i].item_id);\n\t\t\t\t\tif (res[i].item_id === parseInt(answers.itemNumber)) {\n\t\t\t\t \t\tcustomerItem = res[i];\n\t\t\t\t \t}\n\t\t\t\t }\n\t\t\t\t //console.log(availableItemNumbers);\n\t\t\t\t//console.log(customerItem);\n\n\t\t\t\t//If item number that user entered is invalid (does not exist in availableItemNumbers array),\n\t\t\t\t//Then, display error message that item number is not valid and return to Customer Home Screen.\n\t\t\t\tif (availableItemNumbers.indexOf(parseInt(answers.itemNumber)) === -1) {\n\t\t\t\t\tvar invalidItemNumberError = \n\t\t\t\t\t\"==========================================================================================================\" + \"\\r\\n\" +\n\t\t\t\t\t\"Item number \" + answers.itemNumber + \" was not found.\" + \"\\r\\n\" +\n\t\t\t\t\t\"Enter valid item number and try again.\" + \"\\r\\n\" +\n\t\t\t\t\t\"==========================================================================================================\"\n\t\t\t\t\tconsole.log(invalidItemNumberError);\n\t\t\t\t\t//Return to Customer Home screen.\n\t\t\t\t\tsetTimeout(showItemsForSale, 3000);\n\t\t\t\t}\n\n\t\t\t\t//If stock quantity is less than the quantity that the customer wants, \n\t\t\t\t//notify customer that store doesn't have enough in stock right now.\n\t\t\t\telse if (customerItem.stock_quantity < answers.howMany) {\n\t\t\t\t \tconsole.log(\"Sorry, we have \" + customerItem.stock_quantity + \" left on stock right now.\");\n\t\t\t\t \tconsole.log(\"Select a different amount or choose another item.\");\n\t\t\t\t \t//Return to Customer Home screen.\n\t\t\t\t \tsetTimeout(showItemsForSale, 2000);\n\n\t\t\t\t}\n\n\t\t\t\t//If the item number that the user entered is valid (exists in the availableItemNumbers array)\n\t\t\t\t//AND\n\t\t\t\t//If there is enough in stock right now, place order and charge customer for purchase.\n\t\t\t\telse if (availableItemNumbers.indexOf(parseInt(answers.itemNumber)) > -1 && customerItem.stock_quantity >= answers.howMany) {\n\t\t\t\t\t\t//Create variable to hold the number of items that the customer wants to purchase.\n\t\t\t\t\t\tvar customerQuantity = answers.howMany;\n\t\t\t\t\t\t//Create variable that we can use to update product stock quantity in database.\n\t\t\t\t\t\t//Stock quantity equals current stock minus quantity customer purchased.\n\t\t\t\t\t\tvar newQuantity = customerItem.stock_quantity - customerQuantity;\n\t\t\t\t\t\t//console.log(\"Updating quantity... \\n\" + newQuantity);\n\t\t\t\t\t\t//Create variable to calculate how much to charge customer.\n\t\t\t\t\t\tvar customerTotal = customerItem.price * customerQuantity;\n\t\t\t\t\t\t//Create variable to update/calculate productSalesTotal based on customerTotal.\n\t\t\t\t\t\tvar productSalesTotal = customerItem.product_sales + customerTotal;\n\t\t\t\t\t\t//Show the pending order information to customer before completing their order.\n\t\t\t\t\t\tvar pendingOrderDetails = \n\t\t\t\t\t\t\t\"========================================================\" + \"\\r\\n\" +\n\t\t\t\t\t\t\t\"Order details\" + \"\\r\\n\" +\n\t\t\t\t\t\t\t\"Your item: \" + customerItem.product_name + \"\\r\\n\" +\n\t\t\t\t\t\t\t\"Quantity: \" + customerQuantity + \"\\r\\n\" +\n\t\t\t\t\t\t\t\"Your total is $\" + customerTotal.toFixed(2) + \".\" + \"\\r\\n\" +\n\t\t\t\t\t\t\t\"========================================================\" \n\t\t\t\t\t\tconsole.log(pendingOrderDetails);\n\n\t\t\t\t\t\t//Get confirmation from the customer to place the order.\n\t\t\t\t\t\tvar confirmOrder = [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t \ttype: 'confirm',\n\t\t\t\t\t \tname: 'confirmOrder',\n\t\t\t\t\t \tmessage: \"Are you sure? Enter Y to confirm and complete order. Enter N to cancel.\",\n\t\t\t\t\t \tdefault: true\n\t\t\t\t\t }\n\t\t\t\t\t ];\n\n\t\t\t\t\t inquirer.prompt(confirmOrder).then(answers => {\n\t\t\t\t\t \t//If customer confirms order, place order and update database.\n\t\t\t\t\t \tif (answers.confirmOrder) {\n\t\t\t\t\t\t\t\t//Create connection query to database. \n\t\t\t\t\t\t\t\t//Run UPDATE statement on products table to update product stock quantity in database for the specified item number.\n\t\t\t\t\t\t\t\tvar query = connection.query(\n\t\t\t\t\t\t\t\t\t\"UPDATE products SET ? WHERE ?\",\n\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tstock_quantity: newQuantity,\n\t\t\t\t\t\t\t\t\t\t\tproduct_sales: productSalesTotal\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\titem_id: customerItem.item_id\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\tfunction(err, res) {\n\t\t\t\t\t\t\t\t\t\t//console.log(\"Item id: \" + customerItem.item_id);\n\t\t\t\t\t\t\t\t\t\t//console.log(\"quantity: \" + newQuantity);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t//Display order details and total amount that was charged to their Bamazon account.\n\t\t\t\t\t\t\t\tconsole.log(\"Order complete\");\n\t\t\t\t\t\t\t\tconsole.log(\"Item ordered: \" + customerItem.product_name);\n\t\t\t\t\t\t\t\tconsole.log(\"Quantity: \" + customerQuantity);\n\t\t\t\t\t\t\t\tconsole.log(\"Your Bamazon account was charged $\" + customerTotal.toFixed(2) + \".\");\n\t\t\t\t\t\t\t\tcontinueShopping();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t//If customer cancels order...\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tconsole.log(\"Order cancelled.\");\n\t\t\t\t\t\t\t\tsetTimeout(continueShopping, 2000);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n}", "title": "" }, { "docid": "c2c6490289d82f6917d7a4f9dc61c28a", "score": "0.7302251", "text": "function inquireToBuy() {\n inquirer.prompt([\n //The first should ask them the ID of the product they would like to buy.\n {\n name: \"ID\",\n type: \"input\",\n message: \"What is the item ID of the product you wish to buy today?\"\n\n\n }, \n //The second message should ask how many units of the product they would like to buy.\n {\n name: \"amount\",\n type: \"input\",\n message: \"OK. Great. How many units please?\"\n },\n ])\n .then(function(userResponse) {\n //Once the customer has placed the order, your application should check if your store has enough of the product to meet the customer's request.\n connection.query('SELECT * FROM bamazon WHERE item_id = ?', [userResponse.ID], function(err, res) {\n console.log(res);\n if (userResponse.amount > res[0].stock_quantity ) {\n //If not, the app should log a phrase like `Insufficient quantity!`, and then prevent the order from going through.\n console.log(\"Sorry there isn't enough of that item in stock.\");\n console.log(\"Please select another item or come back another day\");\n inquireToBuy();\n }\n else if (userResponse.ID === \"\") {\n console.log(\"That is not a valid input. Please input the correct item ID\")\n inquireToBuy()\n } \n //However, if your store _does_ have enough of the product, you should fulfill the customer's order.\n //This means updating the SQL database to reflect the remaining quantity.\n //Once the update goes through, show the customer the total cost of their purchase.\n else {\n var buyerTotal = res[0].price * userResponse.amount;\n console.log(\"Thanks for shopping at BAMAZON\");\n console.log(\"The total amount due is $ \" + buyerTotal);\n var updateStock = res[0].stock_quantity - parseInt(userResponse.amount);\n connection.query(\"UPDATE bamazon SET stock_quantity= \" + updateStock + \" WHERE item_id =\" + userResponse.ID);\n byeBamazon;\n }\n });\n});\n\n}", "title": "" }, { "docid": "169dc1f68ee72809edfbba069320dfc5", "score": "0.7301771", "text": "function customer(){\n readProducts();\n inquirer.prompt([\n {\n name: \"id\",\n type: \"input\",\n message: \"Enter ID of product you'd like to buy\"\n },\n {\n name: \"quantity\",\n type: \"input\",\n message: \"How much would you like to buy?\"\n }\n \n ]).then(function(response){\n // This variable captures how many of an item the user would like to purchase \n let customerquantity = response.quantity;\n // This get the id of the item the would like to purchase\n let customerChoice = response.id;\n connection.query(\"SELECT price price, stock_quanity FROM products WHERE ?\", {item_id: customerChoice}, function(err,res){\n if (err) throw err;\n // This grabs the amount of an item in stock from the database.\n let productQuantity =res[0].stock_quanity;\n console.log(customerquantity);\n // This function takes the 3 variables to see if there are enough to order and to change the table to subtract the changes\n checker(customerquantity, productQuantity, customerChoice);\n \n })\n \n })\n }", "title": "" }, { "docid": "10e0f9c259a631b2248cb48dc9feddcb", "score": "0.72921383", "text": "function selectItem() { \n inquirer\n .prompt([\n {\n name: \"selection\",\n type: \"input\",\n message: \"Please enter the item number you would like to purchase\" \n },\n {\n name: \"quantity\",\n type: \"input\",\n message: \"How many would you like to purchase?\"\n \n }\n ])\n .then(function(answer) {\n var query = \"SELECT * FROM products WHERE ?\";\n connection.query(query, {item_id: answer.selection }, function(err, res) {\n var productData = res[0];\n // console.log(productData); \n //determine if the quantity selected is available and update database inventory \n if (productData.stock_quantity >= answer.quantity) {\n //Show customer price of transaction\n var totalCost = (answer.quantity * productData.price);\n console.log(\"The total cost of your order is $\" + totalCost);\n console.log(\"Thank you for shopping at Bamazon. Have a nice day!\")\n //Logic to update the stock inventory\n var queryUpdate = 'UPDATE products SET stock_quantity = ' + (productData.stock_quantity - answer.quantity) + ' WHERE item_id = ' + answer.selection;\n // console.log('queryUpdate = ' + queryUpdate);\n connection.query(queryUpdate, function(err, data) {\n if (err) throw err;\n \n })\n\n //code to run if selected quantity is greater than item inventory\n }\n else {console.log(\"Insufficient quantity to fulfill order\");\n inquirer\n .prompt([\n {\n type: \"confirm\",\n message: \"Would you like to continue shopping?\",\n name: \"confirm\",\n default: true\n }\n ])\n .then(function() {\n if (true) {\n listProducts();\n }\n else{\n console.log(\"Thank you for shopping at Bamazon.\")\n connection.end();\n }\n })\n } //closing brackets for insufficient quantity else statement\n })//closing brackets for connection.query\n }) //closing brackets for selection .then\n} //closing bracket for selectItem function", "title": "" }, { "docid": "c3639a48e4b69f9cc18977742ca2e2cc", "score": "0.72875017", "text": "function promptCustomer() {\n\tinquirer\n .prompt([\n {\n name: \"id\",\n type: \"input\",\n message: \"What is the item ID you would like to buy?\",\n validate: function(value) {\n if (isNaN(value) === false) {\n return true;\n }\n return false;\n }\n },\n {\n name: \"units\",\n type: \"input\",\n message: \"How many units would you like to buy?\",\n validate: function(value) {\n if (isNaN(value) === false) {\n return true;\n }\n return false;\n }\n }\n ])\n .then(function(answer) {\n \tvar id = parseInt(answer.id);\n \tvar units = parseInt(answer.units);\n \tconnection.query(\"SELECT * FROM products WHERE item_id = \" + id + \";\",\n \tfunction(error, results) {\n \t\tif (error) throw error;\n \t\t// calculations\n \t\tvar quantity = parseInt(results[0].stock_quantity);\n \t\tvar price = parseInt(results[0].price);\n \t\tvar cost = units * price;\n \t\tvar remaining = quantity - units; // to avoid negative numbers in inventory\n \t\tif (quantity === 0 || remaining < 0) {\n \t\t\tnoInventory(); // re-direct to function for no inventory\n \t\t} else {\n \t\t\tconsole.log(\"Total Cost: $\" + cost + \" Dollars\"); // display total cost\n \t\t\tupdateInventory(id, units, quantity); // re-direct to function to update\n \t\t};\n\t\t});\n });\n}", "title": "" }, { "docid": "670bc54abc09019dbc8fd2b94942d929", "score": "0.7287194", "text": "function postElectronic() {\n // prompt for info about the item being put up for auction\n inquirer\n .prompt(\n {\n name: \"id\",\n type: \"input\",\n message: \"What is the item id you would like to purchase?\"\n })\n .then(function(answer) {\n var query = \"select stock_quantity, price from products where item_id ?\";\n connection.query(query, { item_id: answer.id }, function(err, res) {\n console.log(res.stock_quantity, res.price);\n }\n \n )})\n\n}", "title": "" }, { "docid": "4c77773314d720d2a22c2a1209d0afb1", "score": "0.72825867", "text": "function chooseProduct() {\n\tinquire.prompt([\n\n\t{\n\t\tname: \"id\",\n\t\tmessage: \"Choose an item ID\"\n\t},\n\t{\n\t\tname: \"quantity\",\n\t\tmessage: \"How many would you like?\"\n\t}\n\n\t]).then(function(answers){\n\n\t\t// Select the row that matched our id input\n\t\tconnection.query(\"Select * FROM products WHERE ?\",\n\t\t \n\t\t {\n\t\t \titem_id: answers.id\n\t\t },\n\t\t function(err, res) {\n\n\t\t \t// Storing the item (row) selected as object\n\t\t \tvar item = res[0];\n\n\t\t\tif (err) throw err;\n\n\t\t\t// Theres only one item in our object since we are only selecting one row\n\n\t\t\t// Optional: If we want to display # in stock\n\t\t\t// console.log(\"# of items in stock: \" + item.stock_quantity);\n\n\t\t\tvar stock = item.stock_quantity;\n\n\t\t\t// Evaluates if theres enough quantity\n\t\t\tif (answers.quantity > stock) {\n\t\t\t\tconsole.log(\"Insufficient quantity\");\n\t\t\t\tquit();\n\t\t\t} else {\n\n\t\t\t\t// If theres enough stock\n\t\t\t\tstock -= answers.quantity;\n\t\t\t\tconsole.log(\"\\nStock remaining: \" + stock);\n\n\t\t\t\t// Updates the database\n\t\t\t\tconnection.query(\"UPDATE products SET ? WHERE ?\",\n\n\t\t\t\t\t[{\n\t\t\t\t\t\tstock_quantity: stock\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\titem_id: answers.id\n\t\t\t\t\t}],\n\t\t\t\t\tfunction(err, res) {\n\t\t\t\t\t\tconsole.log(\"\\n\" + answers.quantity, \"Item(s) purchased\");\n\t\t\t\t\t\tconsole.log(\"Total Cost: $\" + (item.price * answers.quantity).toFixed(2) + \"\\n\");\n\t\t\t\t\t\tquit();\n\t\t\t\t\t}\n\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\n\t});\n}", "title": "" }, { "docid": "8782487fdfe5818a8091aec98d72ebb3", "score": "0.72804886", "text": "function askUser() {\n\tinquirer.prompt([{\n\t\ttype: 'input',\n\t\tname: 'id',\n\t\tmessage: 'Please enter the ID of the product you\\'d like to purchase'\n\t}]).then((answer) => {\n\t\tconnection.query(`SELECT item_id FROM products WHERE item_id = ${answer.id}`, (err, results) => {\n\t\t\tif (err || results.length === 0) {\n\t\t\t\tconsole.log('Sorry, we do not carry that product. Select a new product.\\n');\n\t\t\t\taskUser();\n\t\t\t} else {\n\t\t\t\tvar product_id = answer.id; // store product id\n\t\t\t\tinquirer.prompt([{\n\t\t\t\t\ttype: 'input',\n\t\t\t\t\tname: 'quantity',\n\t\t\t\t\tmessage: 'How many units would you like to purchase?'\n\t\t\t\t}]).then((answer) => {\n\t\t\t\t\tvar quantityRequested = answer.quantity;\n\t\t\t\t\tconnection.query(`SELECT stock_quantity FROM products WHERE item_id = ${product_id}`, (err, results) => {\n\t\t\t\t\t\tif (err) {\n\t\t\t\t\t\t\taskUser();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (answer.quantity > results[0].stock_quantity) {\n\t\t\t\t\t\t\tconsole.log('Sorry, not enough product in stock.');\n\t\t\t\t\t\t\taskUser();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconnection.query(`UPDATE products SET stock_quantity = ? WHERE item_id = ${product_id}`,\n\t\t\t\t\t\t\t\t[results[0].stock_quantity - answer.quantity], (err, results => {\n\t\t\t\t\t\t\t\t\tif (err) throw err;\n\t\t\t\t\t\t\t\t\tconnection.query(`SELECT price FROM products WHERE item_id = ${product_id}`, (err, results) => {\n\t\t\t\t\t\t\t\t\t\tif (err) throw err;\n\t\t\t\t\t\t\t\t\t\tvar cost = quantityRequested*results[0].price;\n\t\t\t\t\t\t\t\t\t\tconsole.log('Order successfully submitted.');\n\t\t\t\t\t\t\t\t\t\tconsole.log('Your total comes out to $' + cost + '.');\n\t\t\t\t\t\t\t\t\t\taskUser();\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}\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\t})\n}", "title": "" }, { "docid": "c5fce0b59a5082a9e1920f3f6e535eab", "score": "0.72672", "text": "function whatCanWeBuy () {\n let userPurchaseItem;\n let userPurchaseNumber;\n connection.query(\"SELECT * FROM products\", function(err, res) {\n if (err) throw err;\n for (let i = 0; i < res.length; i++) {\n console.log(\"ID: \" + res[i].item_id + \" Product: \" + res[i].product_name + \" Cost: $\" + res[i].price);\n };\n inquirer.prompt([\n {\n type: \"input\",\n name: \"purchaseItem\",\n message: \"What is the ID of the item you wish to purchase?\"\n }]).then(function(purchaseObj) {\n userPurchaseItem=purchaseObj.purchaseItem;\n inquirer.prompt([\n {\n type: \"input\",\n name: \"number\",\n message: \"How many do you wish to purchase?\"\n }]).then(function(numberObj) {\n userPurchaseNumber=numberObj.number;\n canYouBuyThis(userPurchaseNumber, userPurchaseItem);\n });\n\n });\n });\n}", "title": "" }, { "docid": "614a0aaf0a0925f60dc574d1e4269763", "score": "0.72608465", "text": "function buyStuff() {\n inquirer\n .prompt([\n {\n type: \"number\",\n message: \"Enter the ID of the product you want to buy\",\n name: \"item\"\n },\n {\n type: \"number\",\n message: \"Enter the quantity of the product you want to buy\",\n name: \"quantity\"\n }\n ])\n // grabs item and qty\n .then(function(answers) {\n connection.query(\n `SELECT * FROM products WHERE ?`,\n { item_id: answers.item },\n function(err, result) {\n if (err) {\n console.log(\"Error with checking item ID: \" + err);\n }\n // check if valid qty\n if (answers.quantity <= result[0].stock_quantity) {\n let newQty = result[0].stock_quantity - answers.quantity;\n let total = answers.quantity * result[0].price_to_customer;\n connection.query(\n // updating based on selection\n `UPDATE products SET ? WHERE ?`,\n [{ stock_quantity: newQty }, { item_id: answers.item }],\n function(err, result) {\n if (err) {\n console.log(\"Error with updating table: \" + err);\n } else {\n console.log(\n // returns total to the user\n `We placed your order, you have been charged $${total}, it should arrive in 2 days, thank you for being a Prime member`\n );\n // end connection to the database, we are done\n connection.end();\n }\n }\n );\n console.log(\"Plenty in stock\");\n } else {\n console.log(\n // not enough in stock, returns user to make selection\n \"We do not have enough, we have \" +\n result[0].stock_quantity +\n \" in stock, please select again\"\n );\n menu();\n }\n }\n );\n });\n}", "title": "" }, { "docid": "ee9e4512c40cda3356f0a4346d7eaebb", "score": "0.7259654", "text": "function promptCustPurchase() {\n\tinquirer.prompt([\n\n\t\t//first user input\n\n\t{\n\t\ttype: 'input',\n\t\tname: 'item_id',\n\t\tmessage: 'Please enter the Item ID number you would like to purchase.',\n\t\tvalidate: validatetheInput, \n\t\t//Filter receives the customer input and returns the filtered value to be used inside the program\n\t\tfilter: Number\n\t},\n\t\t//second user input\n\n\t{\n\t\ttype: 'input', \n\t\tname: 'quantity', \n\t\tmessage: 'Enter quantity.',\n\t\tvalidate: validatetheInput,\n\t\tfilter: Number\n\t}\n\n\t]).then(function(input) {\n\n\t\t//stores the customer inputs for the item id and the quantity\n\n\t\tvar item = input.item_id;\n\t\tvar quantity = input.quantity;\n\n\t\t//Query the database to get the information for the customer.\n\n\t\tvar queryString = 'SELECT * FROM products WHERE ?';\n\n\t\tconnection.query(queryString, {item_id: item}, function(err, data) {\n\t\t\tif (err) throw err;\n\n\n\t\t\t\t//If customer selects an invalid item id, the data array will not be populated\n\n\t\t\t\tif(data.length === 0) {\n\t\t\t\t\tconsole.log('ERROR: Invalid Item ID. Please select a valid Item ID.');\n\t\t\t\t\tdisplayInventory();\n\t\t\t\t} else {\n\t\t\t\tvar productData = data[0];\n\t\t\t\t\n\t\t\t\t//checking to see if there is quantity for that item in stock\n\t\t\t\tif (quantity <= productData.stock_quantity) {\n\t\t\t\t\tconsole.log('Congratulations, the product you requested is in stock! Placing your order now!');\n\n\t\t\t\t\t//updating the query string\n\t\t\t\t\tvar updateQueryString = 'UPDATE products SET stock_quantity = ' + (productData.stock_quantity - quantity) + ' WHERE item_id = ' + item;\n\t\t\t\t\tvar customerTotalCalc = quantity * productData.price;\n\t\t\t\t\tvar customerTotal = customerTotalCalc.toFixed(2);\n\t\t\t\t\t//console.log(customerTotal);\n\n\t\t\t\t\t//update the inventory\n\t\t\t\t\tconnection.query(updateQueryString, function(err, data) {\n\t\t\t\t\t\tif (err) throw err;\n\t\t\t\t\t\t//console.log('Your order has been placed! Your total is $ ' + productData.price * quantity);\n\t\t\t\t\t\tconsole.log('Your order has been placed! Your total is $ ' + customerTotal);\n\t\t\t\t\t\tconsole.log('Thank you for shopping with us!');\n\t\t\t\t\t\tconsole.log(\"\\n----------------------------------------------------------------------------------------------------------\\n\");\n\t\t\t\t\t\tconnection.end();\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log('Sorry, there is not enough product in stock for this item; your order can not be placed at this time.');\n\t\t\t\t\tconsole.log('Please modify your order.');\n\t\t\t\t\tconsole.log(\"\\n--------------------------------------------------------------------------------------------------------------\\n\");\n\n\t\t\t\t\tdisplaytheInventory();\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t})\n\n}", "title": "" }, { "docid": "6ebe6ed0ccca27094f98ce269f432bcd", "score": "0.72472733", "text": "function isShopping() {\n inquirer\n .prompt([\n {\n name: \"selection\",\n type: \"input\",\n message: \"What is the Item ID you want to buy?\",\n validate: function(answer) {\n if (isNaN(answer) === false) {\n return true;\n }\n return false;\n }\n },\n {\n name: \"quantity\",\n type: \"input\",\n message: \"How many do you want to buy?\",\n validate: function(answer) {\n if (isNaN(answer) === false) {\n return true;\n }\n return false;\n }\n }\n ])\n .then(function(answer) {\n var query = \"SELECT * FROM products WHERE item_id = ?\";\n console.log(answer.selection + \" and the qty \" + answer.quantity);\n connection.query(query, answer.selection, function(err, res) {\n if (err) throw err;\n for (var i = 0; i < res.length; i++) {\n if (answer.quantity > res[i].stock_qty) {\n console.log(\n \"We are very sorry we do not have enough of this item in our inventory\"\n ); //copy liri formatting\n landingPage();\n } else {\n console.log(\n `\\n********************************\\n\\nPlease review your order here\\n\\nItem: ${\n res[i].product_name\n } \\nPrice per item: ${\"$\" + res[i].price} \\nQuantity Ordered: ${\n answer.quantity\n } \\nYour bill: ${\"$\" +\n res[i].price *\n answer.quantity}\\n\\n********************************\\n`\n );\n\n var updateStock = res[i].stock_qty - answer.quantity;\n var purchasedItem = answer.selection;\n\n purchaseCheckout(updateStock, purchasedItem);\n }\n }\n });\n });\n}", "title": "" }, { "docid": "2a91830350b96cee876766ffd23c30b5", "score": "0.7236032", "text": "function promptForQuantity(product) {\n inquirer\n .prompt([\n {\n type: \"input\",\n name: \"quantity\",\n message: \"SELECT QUANTITY OR [ENTER Q TO QUIT\",\n validate: function(val) {\n return val > 0 || val.toLowerCase() === \"q\";\n }\n }\n ])\n .then(function(val) {\n // Check if the user wants to quit the program\n checkIfShouldExit(val.quantity);\n var quantity = parseInt(val.quantity);\n\n // If there isn't enough of the chosen product and quantity, let the user know and re-run productLoader\n if (quantity > product.stock_quantity) {\n console.log(\"\\nItem out of stock, try another item!\");\n productLoader();\n } else {\n // Otherwise run makePurchase, give it the product information and desired quantity to purchase\n makePurchase(product, quantity);\n }\n });\n}", "title": "" }, { "docid": "d9518507f44172f56e66cab526421424", "score": "0.72268397", "text": "function promptCustomer() {\n inquirer\n .prompt([\n {\n type: \"input\",\n name: \"product_id\",\n message: \"Enter product ID# to purchase:\"\n },\n {\n type: \"input\",\n name: \"quantity\",\n message: \"Enter quantity to purchase:\"\n }\n ]).then(function(userInput)\n {\n sellProduct(userInput.product_id, userInput.quantity);\n }\n );\n}", "title": "" }, { "docid": "cdb7899e2af8bc4559de3563a5c13b51", "score": "0.7200186", "text": "function userSelction() {\n inquirer.prompt([\n {\n name: \"productID\",\n message: \"What is the product ID of the item you want to buy?\"\n }, {\n name: \"quantity\",\n message: \"How many do you want?\"\n }\n ]).then(function(answer) {\n var query = \"SELECT * FROM products WHERE ?\";\n connection.query(query, { productID: answer.productID}, function(err, res) {\n // console.log(\"ID#: \"+ res[0].productID + \" | Product: \" + res[0].product_name + \" | Price: $\" + res[0].price );\n \n if (answer.quantity > res[0].stock_quantity) {\n console.log(\"Insuffient quantiy! We only have \" + res[0].stock_quantity + \" in stock.\");\n userSelction();\n }else{\n var updatedLevel = (res[0].stock_quantity - answer.quantity);\n var soldToday = (answer.quantity * res[0].price);\n var product_sales = res[0].product_sales + soldToday;\n updateProduct(answer.productID,updatedLevel,product_sales);\n console.log(\"Thanks for shopping with us. Your total will be: $\" + soldToday);\n } \n });\n });\n}", "title": "" }, { "docid": "f54737e5195fadbc308fe0b1b665044e", "score": "0.7200041", "text": "function customerQuant(product) {\n inquirer\n .prompt([\n {\n name: \"quantity\",\n type: \"input\",\n message: \"How many items would you like to purchase?\",\n validate: function (val) {\n return val > 0;\n }\n\n }\n\n ])\n\n .then(function (val) {\n var quantity = parseInt(val.quantity);\n\n if (quantity > product.stock_quantity) {\n // if quantity zero, prompts user to pick another item\n console.log(\" \");\n console.log(\" \");\n console.log(\"--------------------------------\");\n console.log(\"Zero in stock, please make another selection.\");\n console.log(\"--------------------------------\");\n console.log(\" \");\n console.log(\" \");\n afterConnection();\n }\n else {\n makePurchase(product, quantity);\n\n }\n\n\n });\n\n }", "title": "" }, { "docid": "6e7364ffa2309ba004f2d0632c938622", "score": "0.7198154", "text": "function start() {\n\n inquirer\n .prompt([\n {\n name: \"idRequest\",\n type: \"input\",\n message: \"What is the item ID of the item you want?\"\n },\n {\n name: \"quantity\",\n type: \"input\",\n message: \"How many would you like to purchase?\"\n }\n ])\n .then(function (answer) {\n console.log(answer);\n var itemID = answer.idRequest;\n var quantityNo = answer.quantity;\n\n connection.query(\"SELECT * FROM products WHERE id = ?\", itemID ,function (err, res) {\n if (err) throw err;\n // Log all results of the SELECT statement\n console.log(res, \"res\");\n console.log(res[0].stock_quantity, \"Our stock\");\n if (!res.length) {\n console.log(\"ID is invalid.\");\n start();\n }else if (res[0].stock_quantity >= quantityNo){\n console.log(\"You have purchased \" + quantityNo + \" \" + res[0].product_name + \"(s) at $\" + res[0].price + \" each.\" );\n }else {\n console.log(\"Insufficient quantity!\");\n start();\n }\n });\n });\n // var newQuanity = stock_quantity - quantityNo;\n\n // connection.query(\"DELETE ? FROM products WHERE id = ?\", quantityNo, function(err,res){\n // if (err) throw err;\n // console.log(newQuantity);\n // // }else {\n // // console.log(\"Inventory has changed\")\n // }\n}", "title": "" }, { "docid": "b61b769ca16f160903402582ff793917", "score": "0.7197467", "text": "function buyItem() {\n inquirer\n .prompt([\n {\n type: \"confirm\",\n message: \"Would you like to purchase another item?\",\n name: \"anotherItem\"\n }\n ])\n .then (function(response) {\n if (response.anotherItem === \"y\" || \"yes\") {\n displayProducts();\n } else if (response.anotherItem === \"n\" || \"no\" ) {\n console.log('Awww, ok. Thank you for choosing Bamazon!');\n };\n });\n}", "title": "" }, { "docid": "8e8e53ce4061749d5373d7cbdb0c2781", "score": "0.71911013", "text": "function buyProduct() {\n\n inquirer\n .prompt({\n name: \"product\",\n type: \"input\",\n message: \"What product do you want to buy (enter id #)?\"\n })\n .then(function(answer) {\n\n productID = parseInt(answer.product);\n\n //Check to see if valid product ID response\n if (productID >=1 && productID <= product_ID_Max) {\n console.log(\"\\n\")\n howMuch(productID);\n } else {\n console.log(\"Invalid Product Number. \\n\");\n buyProduct();\n }\n });\n}", "title": "" }, { "docid": "1b4f6423e1c0ab8c7ba8fe83adfa84d9", "score": "0.71841985", "text": "function addInventory() {\n connection.query(\"SELECT * FROM product\", function(err, res) {\n inquirer.prompt([{\n message: \"What is the item_id of the product you would like to add?\",\n type: \"number\",\n name: \"item_id\"\n }]).then(function(answers) {\n if (answers.item_id > 0) {\n updateInventory(connection.answers.item_id);\n } else {\n managerNav();\n }\n })\n });\n}", "title": "" }, { "docid": "e04cdeeb2c60f851817f779a676a7ce0", "score": "0.718381", "text": "function buyProduct() {\n inquirer\n .prompt([\n {\n name: \"productID\",\n type: \"input\",\n message: \"What is the ID of the product you would like to buy?\",\n // require integer for product id\n validate: function (value) {\n if (isNaN(value) === false) {\n return true;\n }\n return (\"Please enter a number.\");\n }\n },\n {\n name: \"quantity\",\n typer: \"input\",\n message: \"How many would you like?\",\n // require an integer be entered for quantity\n validate: function (value) {\n if (isNaN(value) === false) {\n return true;\n }\n return (\"Please enter a number.\");\n }\n }\n ])\n .then(function (answer) {\n var selectedProductID = answer.productID;\n // query database for selected product\n connection.query(\"SELECT stock_quantity, price FROM products WHERE item_id=?\",\n [selectedProductID],\n function (err, res) {\n if (err) throw err;\n\n // check if enough inventory for user's purchase\n if (answer.quantity > res[0].stock_quantity) {\n // tell user there is not enough stock\n console.log(\"Sorry, stock is too low. Please check back.\");\n } else {\n // complete user's purchase and update stock quantities\n var updateStock =\n res[0].stock_quantity - parseFloat(answer.quantity);\n connection.query(\n \"UPDATE products SET ? WHERE ?\",\n [\n {\n stock_quantity: updateStock\n },\n {\n item_id: selectedProductID\n }\n ],\n function (err, res) {\n if (err) throw err;\n }\n );\n var totalCost = res[0].price * answer.quantity;\n console.log(\"Your total is: $\" + totalCost);\n }\n\n });\n });\n}", "title": "" }, { "docid": "20283c855978af724d90d19fb16006cd", "score": "0.7180461", "text": "function promptAddQuant() {\n inquirer.prompt([\n {\n type: \"input\",\n message: \"The Item ID of the product you're going to add more:\",\n name: \"item_id\"\n },\n {\n type: \"input\",\n message: \"The amount you want to add to the inventory:\",\n name: \"add_quantity\"\n },\n {\n type: \"confirm\",\n message: \"Ready to add more to the inventory?\",\n name: \"confirm\",\n default: true\n }\n ]).then(function (answers) {\n // console.log(inquirerResponse)\n // check if the id is valid\n if (answers.confirm) {\n // if not ask for a valid id and run the prompt again\n if (parseInt(answers.item_id) > length || !Number.isInteger(parseInt(answers.item_id))) {\n console.log(\"Please enter a valid Item ID!\")\n promptAddQuant()\n } else {\n // if is console the amount the manager is going to add and which product they select and run the function to update the database\n console.log(\"Going to add \" + answers.add_quantity + \" of item \" + answers.item_id + \" to the inventory...\");\n updateDB(answers.item_id, answers.add_quantity)\n }\n }\n else {\n console.log(\"Please decide carefully again then.\")\n promptAddQuant()\n }\n\n });\n}", "title": "" }, { "docid": "5a729f212751a0b8e8c76bda2586acc4", "score": "0.7172022", "text": "function addToInventory() {\n connection.query('SELECT * FROM products', (err, items) => {\n if (error) throw error;\n //saving list of all products to an array\n var choicesArray = [];\n items.forEach((item) => {\n choicesArray.push({ name: item.product_name + \" | Quantity: \" + item.stock_quantity, value: item.item_id });\n })\n\n //prompting user which product to update\n inquirer.prompt([{\n type: 'list',\n name: 'id',\n message: 'Select an item:',\n choices: choicesArray\n }, {\n type: \"input\",\n name: \"amount\",\n message: \"How many items you want to add?\"\n }]).then((action) => {\n //update product quantity based on id\n connection.query('UPDATE products SET stock_quantity = stock_quantity + ? WHERE item_id = ?', [action.amount, action.id], (err) => {\n if (error) throw error\n else console.log('Items quantity was successfully updated!');\n console.log('******************************************************************');\n menuQuestions();\n });\n });\n });\n}", "title": "" }, { "docid": "3d10bd731a26a3c9cfd0f41f1c843b04", "score": "0.716339", "text": "function prompt() {\n inquirer\n .prompt([\n {\n name: \"id\",\n type: \"list\",\n message: \"Choose the product's ID that you want to buy\",\n choices: [\"1000\", \"2000\", \"3000\", \"4000\", \"5000\", \"6000\", \"7000\", \"8000\", \"9000\", \"10000\"]\n },\n {\n name: \"quantity\",\n type: \"input\",\n message: \"How many would you like to buy?\"\n }\n ])\n .then(function(answer) {\n //To capture user choices\n console.log(answer);\n user_product = answer.id;\n user_quantity = answer.quantity;\n console.log(\"user chose: \" + user_product + \" user wants: \" + user_quantity);\n var quantity = 0;\n // To check inventory\n for (i = 0; i < availableItems.length; i++){\n if (user_product == availableItems[i].item_id){\n quantity = availableItems[i].stock_quantity;\n }\n };\n //if enough quantity, then update database\n console.log(\"Available Quantity: \" + quantity);\n if(user_quantity < quantity){\n console.log(\"Yay, there is enough in stock for you to buy\")\n var newInventory = quantity - user_quantity;\n var stringInv = newInventory.toString();\n console.log(\"the new inventory is: \" + newInventory)\n var query = connection.query(\n \"UPDATE products SET stock_quantity = \" + stringInv + \" WHERE item_id = \"+ user_product, function(err, response) {\n console.log(\"Database Updated Quantity\");\n priceCalculator();\n });\n }\n else{\n console.log(\"Sorry, there is not enough stock\");\n }\n }\n );\n}", "title": "" }, { "docid": "aeeacdd2b32730e62e95b19c3868c9f9", "score": "0.7162783", "text": "function inquireQuantity(item) {\n inquirer.prompt([\n {\n name: \"quantity\",\n message: \"How many would you like to buy?\",\n validate: shared.validatePositiveNumber\n }\n ]).then(function(answer) {\n const answerQuantity = Number(answer.quantity);\n const stockQuantity = Number(item.stock_quantity);\n // check to make sure they're not trying to buy more items than we have in stock\n if (stockQuantity >= answerQuantity) {\n const newQuantity = stockQuantity - answerQuantity;\n const price = answerQuantity * parseFloat(item.price);\n const newSales = Number(item.product_sales) + price;\n const query = `UPDATE products \n SET stock_quantity = ${newQuantity}, product_sales = ${newSales}\n WHERE item_id = ${item.item_id}`;\n // do the query above, and send a callback function to run if it works\n shared.doQuery(query, function() {\n console.log(\"That'll be \" + shared.formatCurrency(price) + \". Thank you!\");\n shared.closeConnection();\n });\n } else {\n console.log(\"Sorry, we only have \" + item.stock_quantity + \" of those.\");\n shared.closeConnection();\n }\n });\n}", "title": "" }, { "docid": "01867437b8c9c18c5e600446e58d747c", "score": "0.7154386", "text": "function mainPrompt(){\n inquirer.prompt([\n {\n name: \"toBuy\",\n type: \"input\",\n message: \"Enter the ID number of the product you wish to buy.\"\n }\n ]).then(function(answer){\n //console.log(answer);\n //console.log(\"type of answer.toBuy: \" + typeof(answer.toBuy));\n var toBuy = parseInt(answer.toBuy);\n //console.log(\"type of toBuy: \" + typeof(toBuy));\n if(!parseInt(answer.toBuy)){\n console.log(\"Please only enter the ID number of the product.\");\n mainPrompt();\n } else if (toBuy < 1 || toBuy > listLength){\n console.log(\"That number doesn't match one of our products. Please try harder\");\n mainPrompt();\n } else{\n connection.query(\n \"SELECT * FROM products WHERE id = ?\", [answer.toBuy], function(err, res){\n if (err) throw err;\n buy(res[0]);\n });\n };\n })\n}", "title": "" }, { "docid": "de1b689c482c7ce37a5591522afd409a", "score": "0.7153393", "text": "function buyProducts() {\n var item = input.item_id;\n var quantity = input.quantity;\n\n // Query db to confirm that the given item ID exists in the desired quantity\n var queryStr = 'SELECT * FROM products WHERE ?';\n\n connection.query(queryStr, { item_id: item }, function (err, data) {\n if (err) throw err;\n\n if (data.length === 0) {\n console.log('ERROR: Invalid Item ID. Please select a valid Item ID.');\n\n console.log('Your order has been placed! Your total is ' + productData.price * quantity + 'Thank you for shopping with us!');\n\n connection.end();\n } else {\n console.log('Insufficent Quantity');\n currentProducts();\n }\n })\n}", "title": "" }, { "docid": "3b8e973ca84c68f009131336978deb6d", "score": "0.7152682", "text": "function promptAction() {\n connection.query(\"select * From products\", function(err, res) {\n if (err) throw err;\n var displayTable = new Table({\n head: [\"Item ID\", \"product Name\", \"Catergory\", \"Price\", \"Quantity\"],\n colWidths: [10, 25, 25, 10, 14]\n }); //end var display\n for (var i = 0; i < res.length; i++) {\n displayTable.push([\n res[i].item_id,\n res[i].product_name,\n res[i].department_name,\n res[i].price,\n res[i].stock_quantity\n ]); //end display table push\n } //end for loop\n\n //purchasePrompt({\"product_name\":\"toy\"});\n\n console.log(displayTable.toString());\n //purchasePrompt();\n\n inquirer\n .prompt([\n {\n type: \"input\",\n name: \"id\",\n message: \"Please enter Item Id to make a purchase.\"\n },\n {\n type: \"input\",\n name: \"Quantity\",\n message: \"How many items would you like to purchase?\"\n }\n ])\n\n /* validate: function(value) {\n if (isNaN(value) == false) {\n return true;\n } //end if statement\n else {\n return false;\n } //end else statement\n } //end validate function\n }\n ])*/\n\n .then(function(answer) {\n // console.log(\"answers:\");\n //console.log(answer);\n //console.log(\"items:\");\n //console.log(items);\n var idWanted = answer.id;\n var quantityNeeded = parseInt(answer.Quantity);\n connection.query(\n \"select * from products where item_id= \" + idWanted,\n function(err, selectedItem) {\n if (err) throw err;\n if (selectedItem[0].stock_quantity - quantityNeeded >= 0) {\n console.log(\n \"The current inventory has: \" +\n selectedItem[0].stock_quantity +\n \" and Order Quantity: \" +\n quantityNeeded\n );\n console.log(\n \"Yay Bamazon has enough stock to fill your order of the \" +\n selectedItem[0].product_name +\n \".\"\n );\n console.log(\n \"Thank you for your purshase of \" +\n selectedItem[0].product_name +\n \". Your total is: $\" +\n (quantityNeeded * selectedItem[0].price).toFixed(2) +\n \". Thank you for shopping at Bamazon!\"\n );\n connection.query(\n \"update products set stock_quantity=? WHERE item_id=?\",\n [selectedItem[0].stock_quantity - quantityNeeded, idWanted],\n function(err, inventory) {\n if (err) throw err;\n promptAction();\n }\n );\n } else {\n console.log(\n \"Sorry the \" +\n selectedItem[0].product_name +\n \" has the quantity of \" +\n selectedItem[0].stock_quantity +\n \". Please Make another selection or select a quantity that we have available. Thank you for shopping Bamazon. We hope to hear from you soon.\"\n );\n promptAction();\n }\n }\n );\n });\n });\n}", "title": "" } ]
e55812f30d2f3f02d01f9d2b778f9bca
Function to update champion this only includes stuff when the champion is fixed
[ { "docid": "3ee0d810ae5425beb0853be0bb4aa793", "score": "0.7140004", "text": "function updateChampion(champ) {\n currChampionName = champ.replace(\"+ \", \"\"); // set champ name\n // Get average\n var avgDataRow = avg_data.filter(function(d) { return d.champ == currChampionName; })[0];\n currAvg = +(avgDataRow.winrate).toFixed(2);\n updateSlider();\n // update champ subset for now\n champ_subset = dataset.filter(function(d) { return d.champ1 == currChampionName; });\n // Update xScales\n updatexScale_play(champ_subset);\n // Update name text\n document.getElementById(\"champion-name\").innerHTML = currChampionName;\n // Update icon image\n var iconURLname = currChampionName.replace(\"'\", \"\");\n iconURLname = iconURLname.replace(\".\", \"\");\n iconURLname = iconURLname.replace(\" \", \"\");\n document.getElementById(\"champion-icon\").src = \"icons/\"+iconURLname+\".png\";\n }", "title": "" } ]
[ { "docid": "7914ef68df2a0ad6bd5ffdb7e4aba10b", "score": "0.6363191", "text": "async function afterUpdateNotifications(data) {\n const updatedChampions = champions.map((champion) => {\n if (data.includes(champion.id) && !champion.has_matchups) {\n return {\n ...champion,\n has_matchups: true,\n };\n }\n return champion;\n });\n\n setChampions(updatedChampions);\n }", "title": "" }, { "docid": "867c06abfcac36f85c6fa505bdb9f932", "score": "0.6361455", "text": "update() {\r\n if (!this.noConstantUpdates)\r\n this.updateEachPlayer();\r\n }", "title": "" }, { "docid": "f6c665f8599858cf324008b957f1b4ff", "score": "0.629541", "text": "function updateHis(){}", "title": "" }, { "docid": "8286ad38078a541f5be74bc6473b0c7c", "score": "0.6201414", "text": "function updateSkiHill(){\n updateInfo(0);\n}", "title": "" }, { "docid": "f448da3d32915959d23c7b87eeda89d5", "score": "0.61103386", "text": "function updatePlayerInfo(){\n let x = playerStats\n let r = x.rightArm\n let l = x.leftArm\n let g = x.gloves\n let s = x.shoes\n let h = x.head\n let b = x.body\n addMeleeAttackBonus(r, l)\n addMagicAttackBonus(r, l, b, s, g, h)\n addMagicDefenceBonus(b, s, g, h)\n addMeleeDefenceBonus(b, s, g, h)\n}", "title": "" }, { "docid": "746345aa8bb2174473b496313f3c0573", "score": "0.6107752", "text": "onUpdate(pokemon) {\n\t\t\tif (pokemon.template.speciesid !== 'gligar' || pokemon.transformed || pokemon.illusion || !pokemon.hp) return;\n\t\t\tif (pokemon.hp > pokemon.maxhp / 2) return;\n\t\t\tthis.add('-activate', pokemon, 'ability: Kaiju Rage');\n\t\t\tpokemon.formeChange('Gliscor', this.effect, true);\n\t\t\tlet newHP = Math.floor(Math.floor(2 * pokemon.template.baseStats['hp'] + pokemon.set.ivs['hp'] + Math.floor(pokemon.set.evs['hp'] / 4) + 100) * pokemon.level / 100 + 10);\n\t\t\tpokemon.hp = newHP - (pokemon.maxhp - pokemon.hp);\n\t\t\tpokemon.maxhp = newHP;\n\t\t\tpokemon.heal(pokemon.maxhp / 4);\n\t\t\tthis.add('-heal', pokemon, pokemon.getHealth);\n\t\t\tpokemon.takeItem();\n\t\t\tpokemon.setItem('toxicorb');\n\t\t\tthis.add('-message', pokemon.name + '\\'s item is now a Toxic Orb!');\n\t\t\tthis.add('-message', pokemon.name + '\\'s ability is now Poison Heal!');\n\t\t\tthis.boost({atk: 2, spe: 1}, pokemon);\n\t\t}", "title": "" }, { "docid": "c2a0688fefd62df23b6fadfe51e9bee0", "score": "0.609834", "text": "function updateHands () {\n if(!cpuGame) {\n dataRef.child('data/goFish/hands').update({\n [userId]: myHand,\n [opponentId]: oppHand\n });\n }\n}", "title": "" }, { "docid": "7d2da88beefe791ac8ddc4fd49eb3f38", "score": "0.60870993", "text": "function update() {}", "title": "" }, { "docid": "7d2da88beefe791ac8ddc4fd49eb3f38", "score": "0.60870993", "text": "function update() {}", "title": "" }, { "docid": "7d2da88beefe791ac8ddc4fd49eb3f38", "score": "0.60870993", "text": "function update() {}", "title": "" }, { "docid": "7d2da88beefe791ac8ddc4fd49eb3f38", "score": "0.60870993", "text": "function update() {}", "title": "" }, { "docid": "a438f5638e5e69a024418b0fd22d5be0", "score": "0.60453737", "text": "update() {\n // Handles updating this block once every turn\n // Most of this is handled by our add-on code blocks\n if (!state.readyToCraft()) {\n if (game.workPoints <= 0) return; // We have no workers to work this block anyway\n state.searchForItems();\n return;\n }\n if (game.workPoints <= 0) return;\n const eff = state.checkTool();\n if (eff === null) return;\n game.workPoints--;\n state.processCraft(eff);\n }", "title": "" }, { "docid": "512494275851ee2a242aeb1c3f8116a7", "score": "0.60170007", "text": "function updateMyHand() {\n if(!cpuGame) {\n dataRef.child('data/goFish/hands').update({\n [userId]: myHand,\n });\n }\n}", "title": "" }, { "docid": "0f009ebb81d6de07ceb0e6734a1d0b24", "score": "0.60063297", "text": "updateUI(){\n\n let me = this.getMyCharacter(), \n i,\n isHost = this.isHost(),\n th = this,\n\t\t\t\tmyTurn = this.myTurn()\n ;\n\n // Update all players\n for(i=0; i<Netcode.players.length; ++i){\n\n let p = Netcode.players[i],\n\t\t\t\t\tshowAsDead = p.getIsShowAsDead()\n\t\t\t\t;\n\n var portrait = $(\"div.character[data-uuid='\"+p.UUID+\"']\", this.page);\n if(!portrait.length){\n this.addPlayerPortrait(p);\n portrait = $(\"div.character[data-uuid='\"+p.UUID+\"']\", this.page);\n }\n\n $(\"div.armor > span\", portrait).html(showAsDead ? 0 : p.armor);\n $(\"div.hp > span\", portrait).html(showAsDead ? 0 : p.hp);\n $(\"div.mana.offensive > span\", portrait).html(p.mana.offensive);\n $(\"div.mana.defensive > span\", portrait).html(p.mana.defensive);\n $(\"div.mana.support > span\", portrait).html(p.mana.support);\n \n\n $(\"div.armor\", portrait).toggleClass('full', p.armor === p.getMaxArmor() && !showAsDead);\n $(\"div.hp\", portrait).toggleClass('full', p.hp === p.getMaxHP() && !showAsDead);\n $(\"div.mana.offensive\", portrait).toggleClass('full', p.mana.offensive === p.max_mana);\n $(\"div.mana.defensive\", portrait).toggleClass('full', p.mana.defensive === p.max_mana);\n $(\"div.mana.support\", portrait).toggleClass('full', p.mana.support === p.max_mana);\n \n\n // Next turn this amount is added: \n \n portrait.toggleClass(\"turn\", (Netcode.players[this.turn] === p));\n\n portrait.toggleClass(\"dead\", (p.isDead() || showAsDead));\n\n\n let fx = '';\n if(p.grappled_by){\n fx+= this.getFxIcon(\"Grappled\", 'Grappled by :ATTACKER:', p.grappled_by.getImage(), '', '', true, p.grappled_by, p, false);\n }\n \n for(let targ of p.getGrappling()){\n fx+= this.getFxIcon(\"Grapple\", 'Grappling :TARGET:', targ.getImage(), '', '', false, p, targ, false);\n }\n\n for(let f of p.effects){\n fx+= this.getFxIcon(f.name, f.description, f.icon, f._duration, f._stacks, f.detrimental, f.getAttacker(), f.getVictim(), false);\n }\n\n let abilities = p.getAbilities();\n for(let f of abilities){\n if(!f._charged)\n continue;\n fx+= this.getFxIcon(f.name, f.description, f.icon, f._charged, 0, f.detrimental, p, f._charge_targs[0], true);\n }\n\n \n $(\"div.effects\", portrait).html(fx);\n\n }\n\n // Remove any non-existing players\n $(\"div.character[data-uuid]\", this.page).each(function(){\n let uuid = $(this).attr('data-uuid');\n if(!Netcode.getCharacterByUuid(uuid)){\n $(this).remove();\n }\n });\n\n\n if(me.isDead() && !this.punishment_done){\n $(\"#abilities\").toggleClass('dead', true);\n }\n else{\n $(\"#abilities\").toggleClass('dead', false);\n }\n\n $(\"#abilities\", this.page).toggleClass('disabled', !myTurn || me.offeredGemsPicked < 3);\n \n\n\n // Update abilities\n if(!this.punishment_done && !this.intro){\n\n // We pick punishment\n if(this.ended && myTurn){\n var html = '';\n html+= '<div class=\"button ability active\" data-punishment=\"__PUNISHMENT_DOM__\">Dominate</div>';\n html+= '<div class=\"button ability active\" data-punishment=\"__PUNISHMENT_SUB__\">Submit</div>';\n html+= '<div class=\"button ability active\" data-punishment=\"__PUNISHMENT_SAD__\">Sadistic</div>';\n \n $(\"#abilities\").html(html);\n\n $(\"#abilities div.ability[data-punishment]\").on('click', function(){\n\n GameAudio.playSound('shake');\n var abil = Ability.get($(this).attr('data-punishment')).clone();\n abil.parent = th.getMyCharacter();\n\n th.selectTarget(abil);\n\n });\n\n return;\n }\n\n // Update ability buttons\n let successfulAbilities = 0, abilities = me.getAbilities(), hidden = me.getHiddenAbilityIDs();\n for(let a of abilities){\n\t\t\t\t\t\n let active = a.usableOn(Netcode.players).length > 0,\n\t\t\t\t\t\tisHidden = (hidden.indexOf(a.id) > -1 || this.paused),\n\t\t\t\t\t\telement = $(\"#abilities div.ability[data-uuid=\"+a.UUID+\"]\", this.page)\n\t\t\t\t\t;\n \n\t\t\t\t\t// Temp ability\n if(!element.length){\n $(\"#abilities\", this.page).prepend(a.getButton());\n element = $(\"#abilities div.ability[data-uuid=\"+a.UUID+\"]\", this.page);\n }\n\n element.toggleClass('active', active).toggleClass('hidden', isHidden);\n\n\n let cooldown = a._cooldown;\n $('span.cooldown', element).html(cooldown ? ' ['+cooldown+']' : '');\n\n successfulAbilities+= active;\n }\n\n\n $(\"#abilities > div.ability.button[data-uuid]\").each(function(){\n let uuid = $(this).attr('data-uuid');\n if(!me.getAbilityByUuid(uuid)){\n $(this).remove();\n }\n });\n \n\n\n // Handle turn done checks\n\t\t\t\tif(myTurn){\n\t\t\t\t\tif(!successfulAbilities && !this.turn_done_alert && this.getMyCharacter().offeredGemsPicked >= 3){\n\t\t\t\t\t\t// turn_done\n\t\t\t\t\t\tthis.turn_done_alert = true;\n\t\t\t\t\t\tthis.turn_done_timer = setTimeout(function(){\n\t\t\t\t\t\t\tGameAudio.playSound('accept');\n\t\t\t\t\t\t\t$(\"#abilities div.ability.endTurn\").toggleClass('glow', true);\n\t\t\t\t\t\t}, 3000);\n\t\t\t\t\t}\n\t\t\t\t\telse if(successfulAbilities)\n\t\t\t\t\t\tclearTimeout(this.turn_done_timer);\n\t\t\t\t}\n\n\n\n // Toggle end turn active\n $(\"#abilities div.ability.endTurn\")\n\t\t\t\t\t.toggleClass('active', successfulAbilities === 0)\n\t\t\t\t\t.toggleClass('hidden', this.paused || me.getIsEndTurnHidden());\n\n\n\n // Rebind ability buttons\n $(\"#abilities div.ability[data-uuid]\", this.page).off('click').on('click', function(){\n\n if(!myTurn){\n console.error(\"Not your turn\");\n return;\n }\n\n var ability = th.getMyCharacter().getAbilityByUuid($(this).attr('data-uuid'));\n if(ability === false){\n console.error(\"Ability not found\", $(this).attr('data-uuid'));\n return;\n }\n\n if($(this).hasClass('active'))\n GameAudio.playSound('shake');\n th.selectTarget(ability);\n\n });\n\n\t\t\t\t// Rebind ability hovers\n\t\t\t\t$(\"#abilities div.ability[data-uuid]\", this.page).off('mouseover mouseout').on('mouseover mouseout', function(event){\n\t\t\t\t\tth.updateGems(event);\n\t\t\t\t});\n\n\n // Handle gem picker\n if(me.offeredGemsPicked >= 3 || this.ended || !myTurn)\n $(\"#gemPicker\").toggleClass('hidden', true);\n else{\n\n // Show gem picker\n $(\"#gemPicker\").toggleClass('hidden', false);\n\n // Pick n gems text\n $(\"#gemPicker span.n\").html(3-me.offeredGemsPicked);\n\n // Update the gems\n for(i = 0; i<me.offeredGems.length; ++i){\n\n var el = $(\"#gemPicker div.gemsOffered div.gem[data-index=\"+i+\"]\");\n\n var type = me.offeredGems[i].type,\n picked = me.offeredGems[i].picked,\n full = me.mana[type] >= me.max_mana\n ;\n el\n .toggleClass('offensive defensive support', false)\n .toggleClass('picked', picked)\n .toggleClass('full', full)\n .toggleClass(type, true)\n ;\n }\n }\n\n }\n\n else if(this.ended && !isHost){\n\n var ht = '<div class=\"button disconnect\">Disconnect</div>';\n if(this.punishment_done){\n ht+= '<div class=\"button lobby\">Return</div>';\n }\n\t\t\t\tlet th = this;\n\n $(\"#abilities\").html(ht);\n $(\"#abilities div.disconnect\").on('click', function(){\n Netcode.disconnect();\n Jasmop.Page.set('home');\n });\n\n $(\"#abilities div.lobby\").on('click', function(){\n\t\t\t\t\tth.backToLobby();\n });\n }\n\n\n\n this.updateGems();\n\n\n }", "title": "" }, { "docid": "921112d41b08b09a709b207ec27a0810", "score": "0.5942231", "text": "function UpdatePerThouth() \r\n{\r\n \r\n}", "title": "" }, { "docid": "ff8d3d58320438a2e45d198cdda493c4", "score": "0.59288526", "text": "update()\n {\n }", "title": "" }, { "docid": "80aa6c2b49b288f99de892314bca07bc", "score": "0.5927947", "text": "function update(){\n\t//update country progress\n\tupdateProgress(game);\n\t\n\t//update bank\n\tupdateBanks(game);\n\t\n\t//update attacks\n\tupdateAttacks(game);\n\t\n\t//update markers\n\tupdateMarkers(game);\n\t\n\t//player1.bank = player1.bank + 1;\n\tsetConstUI(game.players[0]);\n}", "title": "" }, { "docid": "c9182ba215a48049d4bd4d5558afe185", "score": "0.59042907", "text": "updatePiece(newpiece) {\r\n this.piece = newpiece;\r\n }", "title": "" }, { "docid": "8c35122a152d8b032c2e73b72a5d9977", "score": "0.58752733", "text": "function updateHealth() {\n\tif (playerMonster.monsterName == \"Aquarex\") {\n\t\taquarex.currentHealth = playerMonster.currentHealth;\n if (aquarex.currentHealth == 0)\n aquarex.fainted = true;\n\t}\n\telse if (playerMonster.monsterName == \"Infernosaur\") {\n\t\tinfernosaur.currentHealth = playerMonster.currentHealth;\n if (infernosaur.currentHealth == 0)\n infernosaur.fainted = true;\n\t}\n\telse if (playerMonster.monsterName == \"Pterowind\") {\n\t\tpterowind.currentHealth = playerMonster.currentHealth;\n if (pterowind.currentHealth == 0)\n pterowind.fainted = true;\n\t}\n}", "title": "" }, { "docid": "3da522c0ed9002b40d2aaeade3c5bd9c", "score": "0.58262765", "text": "update() {\n if (this.usingAI) {\n this.updateAI();\n }\n else {\n this.updatePlayer();\n }\n }", "title": "" }, { "docid": "521f9c19c37fab1aa8c01b5ea8e97d19", "score": "0.58169353", "text": "function update(mod) {\n\n\n for (i = 0; i < tank.fish.length; i++) { //for each fish in the tank\n tank.fish[i].update(mod);\n }\n\n\n}", "title": "" }, { "docid": "e0b046f1ebcc2c8b902ae08a7ed636c4", "score": "0.58060545", "text": "function update()\n\t{\n\t\tTWEEN_MANAGER.update();\n\t\t\n\t\tupdateLastDefense();\n\t\tupdateMissiles();\n\t\tupdateBoss();\n\t}", "title": "" }, { "docid": "f6b5cda51fc4c105281b95eed4cb8494", "score": "0.57899505", "text": "update(map, player){\n let questCompleted = this.quest.update(map, player);\n\n if ( questCompleted ) {\n\n if ( this.quests.length === 0 ) {\n this.quest.end(map, player);\n return true;\n } else {\n this.quest = this.quests.shift();\n this.quest.start(map, player);\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "156ee606d0b4ff37efcbdf272baf0104", "score": "0.5768941", "text": "function updateGameboard(){\n var idNum = Number(currentPlayer.id.slice(-1));\n \n if(gameRound === 1){\n\t //update the display in UI\n\t $('#' + currentPlayer.id + 'board').find('div[name=\"playerscore\"]').text('$' + currentPlayer.roundOneScore);\n\t $('#' + currentPlayer.id + 'board').find('div[name=\"playerFreeTurns\"]').text(currentPlayer.freeTurn);\n\t \n\t // update the player's object\n\t players[idNum].roundOneScore = currentPlayer.roundOneScore;\n\t players[idNum].freeTurn = currentPlayer.freeTurn;\n\t \n } else if(gameRound === 2){\n \t //update the display in UI\n\t $('#' + currentPlayer.id + 'board').find('div[name=\"playerscore\"]').text('$' + currentPlayer.roundTwoScore);\n\t $('#' + currentPlayer.id + 'board').find('div[name=\"playerFreeTurns\"]').text(currentPlayer.freeTurn);\n\t \n\t // update the player's object\n\t players[idNum].roundOneScore = currentPlayer.roundTwoScore;\n\t players[idNum].freeTurn = currentPlayer.freeTurn;\n\t} \n \n //$('#spinWheel').removeClass(\"disabled\");\n $('#currentRound').text(gameRound);\n $('#currentSpin').text(spinRound);\n \n // resetWheel();\n \n}", "title": "" }, { "docid": "693a353eb7099ff01333e755e76fe0db", "score": "0.57601845", "text": "function updateWeather(){\n updateCards();\n updateCurrent();\n}", "title": "" }, { "docid": "15b53ae50ae2f86cb635ecb9f793543c", "score": "0.5746891", "text": "update(appState) {\r\n // Settle the winnings, losses, and pushes.\r\n Object.entries(this.bets).forEach(entry => {\r\n const [betType, obj] = entry;\r\n if (obj.winner && obj.winner(appState)) {\r\n this.wonChips(`$.${betType}.baseBet`, appState);\r\n }\r\n if (obj.loser && obj.loser(appState)) {\r\n this.lostChips(`$.${betType}.baseBet`, appState);\r\n }\r\n if (obj.pusher && obj.pusher(appState)) {\r\n this.pushChips(`$.${betType}.baseBet`, appState);\r\n }\r\n\r\n // Come line...\r\n if (obj.come && obj.come.pusher && obj.come.pusher(appState)) {\r\n this.pushChips(`$.${betType}.come.baseBet`, appState);\r\n }\r\n if (obj.come && obj.come.winner && obj.come.winner(appState)) {\r\n this.wonChips(`$.${betType}.come.baseBet`, appState);\r\n }\r\n if (obj.come && obj.come.loser && obj.come.loser(appState)) {\r\n this.lostChips(`$.${betType}.come.baseBet`, appState);\r\n }\r\n\r\n // Don't come line...\r\n if (obj.dontCome && obj.dontCome.pusher && obj.dontCome.pusher(appState)) {\r\n this.pushChips(`$.${betType}.dontCome.baseBet`, appState);\r\n }\r\n if (obj.come && obj.dontCome.winner && obj.dontCome.winner(appState)) {\r\n this.wonChips(`$.${betType}.dontCome.baseBet`, appState);\r\n }\r\n if (obj.dontCome && obj.dontCome.loser && obj.dontCome.loser(appState)) {\r\n this.lostChips(`$.${betType}.dontCome.baseBet`, appState);\r\n }\r\n });\r\n\r\n const dice = appState.getCurrentDice();\r\n if (appState.isPointOn() === true && Constants.POINT_NUMBERS.includes(dice.total())) {\r\n this.moveComeLine(dice.total());\r\n this.moveDontComeLine(dice.total());\r\n }\r\n }", "title": "" }, { "docid": "c0f9667451a3f1b1cc92200fdcd284c7", "score": "0.57393783", "text": "function updatePlayer() {\n let tempLevel = Math.floor(playerXP / playerXPperLevel) + 1; // Spieler-Level = XP / XPproLevel\n document.getElementById(\"xpCounter\").innerHTML = \"Player-Level: \" + tempLevel + \" (XP: \" + playerXP + \" / \" + tempLevel * playerXPperLevel + \")\"; // Baue den String für die Spieler-Info zusammen\n document.getElementById(\"playerHPCounter\").innerHTML = \"HP: \" + playerHealthPoints;\n document.getElementById(\"moneyCounter\").innerHTML = \"Geld: \" + playerMoney;\n document.getElementById(\"itemHolder\").innerHTML = \"Item: \" + playerItem;\n if (tempLevel >= 10) { // Spieler hat gewonnen! \n winTheGame();\n }\n if (playerHealthPoints < 1) { // Spieler hat verloren.\n loseTheGame();\n }\n //console.log(\"Spieler: \" + playerName + \" hat nun Level \" + tempLevel + \" mit \" + playerXP + \" (\" + playerXPperLevel + \" pro Level)\"); // Spieler-Level in der Konsole.\n}", "title": "" }, { "docid": "b2a4feb43100f7858e99383b049adde0", "score": "0.5737567", "text": "update()\n\t{\n\n\t}", "title": "" }, { "docid": "c1e0a5d806f7bdb3371927861e1da993", "score": "0.5729063", "text": "function _update() {\n\n if( $scope.game.tower.level > 0 && $scope.game.wall.level > 0) {\n $scope.game.defense = $scope.game.tower.defense + $scope.game.wall.defense;\n }else if($scope.game.tower.level > 0 && $scope.game.wall.level == 0) {\n $scope.game.defense = $scope.game.tower.defense\n } else if($scope.game.tower.level == 0 && $scope.game.wall.level > 0) {\n $scope.game.defense = $scope.game.wall.defense;\n } else {\n $scope.game.defense = 0;\n }\n\n $scope.game.power = $scope.game.warrior.attack * $scope.game.warrior.number + $scope.game.archer.attack * $scope.game.archer.number;\n\n rest.game.update({_id: $scope.game._id}, $scope.game, function() {\n });\n }", "title": "" }, { "docid": "6210a0f66515e0b8e28753bc06ac110b", "score": "0.57250863", "text": "updatePlayerWeapon(player) {\n if (player) {\n // checks if current layer has any previous weapon\n if (player.previousWeapon) {\n // eslint-disable-next-line max-len\n // checks if the current player previous position is equal current player current weapon position\n if (\n this.isPositionsEqual(\n player.previousPosition,\n player.currentWeapon\n )\n ) {\n // gets current player previous weapon and previous position\n const { previousWeapon, previousPosition } = player;\n\n if (previousWeapon.name !== 'fist') {\n // sets the previous weapon to current weapon position\n const newWeapon = new Weapon(\n previousPosition,\n previousWeapon.name,\n previousWeapon.power\n );\n\n // inserts the previous weapon on the grid\n this.grid.insertWeapon(newWeapon);\n\n // renders previous weapon to the UI\n this.actuator.addWeapon(newWeapon);\n\n player.updateWeapon();\n }\n }\n }\n }\n }", "title": "" }, { "docid": "238d5fa1a4065d2297d96efa68d9b9bb", "score": "0.571345", "text": "function update() {\n\n }", "title": "" }, { "docid": "f32aa25a477bfa2aebe75962fa94b25a", "score": "0.57046115", "text": "function update() {\n var pn = GM_getValue(\"playername\");\n if (!pn)\n return;\n if (GM_getValue(pn+'_'+TPONOFF,'true')!='true') {\n createNotice(TPDISABLE); // notice is turned off\n } else {\n createNotice(TPCHECK);\n GM_get('http://'+window.location.host+TPURL,function(response){\n if(response!=''){\n var f = response.indexOf(\"You're not currently entitled to any trophies.\");\n if (f>=0) {\n createNotice(0);\n } else if (response.indexOf('Trophy Hut')>=0) {\n var tlist=response.split('name=whichtrophy');\n createNotice(tlist.length-1);\n } else\n createNotice('?');\n } else\n createNotice(TPNOHUT);\n });\n }\n}", "title": "" }, { "docid": "987cd0a6cd2647a0199e543877b4a780", "score": "0.56989336", "text": "function update() {\n}", "title": "" }, { "docid": "5f33a9a059a54e76dd5665064bcb82bc", "score": "0.5690753", "text": "function updateAllVolatileBehaviours () {\n for (var pass=0;pass<3;pass++) {\n console.log(\"Reaction pass \"+(pass+1));\n var anyUpdated = false;\n \n players.forEach(function (p) {\n if (p !== humanPlayer && p.isLoaded()) {\n anyUpdated = p.updateVolatileBehaviour() || anyUpdated;\n }\n });\n \n console.log(\"-------------------------------------\");\n \n // If nothing's changed, assume we've reached a stable state.\n if (!anyUpdated) break;\n }\n}", "title": "" }, { "docid": "99d03e96344cffed47d59f45fd6119ce", "score": "0.56848246", "text": "update() { }", "title": "" }, { "docid": "99d03e96344cffed47d59f45fd6119ce", "score": "0.56848246", "text": "update() { }", "title": "" }, { "docid": "7fa51e96f2f6b131ae7bfbd90074ae96", "score": "0.5679075", "text": "function update(){\n updateStats();\n updateUpgradeCount();\n updateUpgradeCost();\n}", "title": "" }, { "docid": "2c2572da501a65c296882301cd2965a0", "score": "0.56697124", "text": "function update() {\n \n}", "title": "" }, { "docid": "2c2572da501a65c296882301cd2965a0", "score": "0.56697124", "text": "function update() {\n \n}", "title": "" }, { "docid": "32423bb7fb0fe070dbc8ac7a1d64e849", "score": "0.56690216", "text": "function setPlayers(update) {\n console.log(\"setting players\");\n console.log(update);\n update.Players.forEach(function (p1) {\n var opp, p2;\n if (p1.Username == pid) {\n that.my.username = p1.Username || that.my.username;\n that.my.city = p1.City || that.my.city;\n that.my.points = p1.Points || that.my.points;\n that.my.gold = p1.Gold || that.my.gold;\n that.my.characters = p1.Characters || that.my.characters;\n } else { //update opponents\n opp = that.opponents.filter(function (opp) {\n return opp.username == p1.Username;\n });\n if (opp.length == 1) {\n p2 = opp[0];\n p2.city = p1.City || p2.city;\n p2.points = p1.Points || p2.points;\n p2.gold = p1.Gold || p2.gold;\n p2.characters = p1.Characters || p2.characters;\n if (p1.NumberOfCards) {\n p2.hand = createUnknownHand(p1.NumberOfCards);\n }\n } else if (opp.length == 0) {\n that.opponents.push({\n username: p1.Username,\n city: p1.City,\n hand: createUnknownHand(p1.NumberOfCards),\n points: p1.Points,\n gold: p1.Gold,\n characters: p1.Characters\n });\n } else {\n console.log(\"two player named \" + p1.Username);\n }\n }\n });\n }", "title": "" }, { "docid": "695753734f0b0ffab2956bda6cb0585f", "score": "0.5667086", "text": "function updateHappiness() {\n\n console.log(gameLoadData);\n if (!gameLoadData.planets[planetId].isHappy) {\n var currentHappiness = parseInt(gameLoadData.planets[planetId].happinessCount);\n\n currentHappiness++;\n console.log(\"Happy: \" + currentHappiness);\n if (currentHappiness > 25) {\n happyPlanets++;\n gameLoadData.planets[planetId].isHappy = true;\n //for demo only\n if (happyPlanets === 3) {\n //win\n console.log(\"YOU ARE WINNER\")\n $('#win-con').text(\"TRUE\");\n }\n }\n gameLoadData.planets[planetId].happinessCount = currentHappiness;\n }\n }", "title": "" }, { "docid": "b02b2172ca2042178e0c77c33a4afb44", "score": "0.5665393", "text": "function update() {\n\n}", "title": "" }, { "docid": "b02b2172ca2042178e0c77c33a4afb44", "score": "0.5665393", "text": "function update() {\n\n}", "title": "" }, { "docid": "b02b2172ca2042178e0c77c33a4afb44", "score": "0.5665393", "text": "function update() {\n\n}", "title": "" }, { "docid": "058380d6f2959b3225185a900f8bb851", "score": "0.5661307", "text": "update(){\n this.room.update(this.temp, this.light, this.curtain);\n }", "title": "" }, { "docid": "01b62064b8bbb9012f13c812b743604a", "score": "0.5655424", "text": "function updatedPlayerScore() {\n player.score = getScore(player.hand);\n dealer.score = getCardValue(dealer.hand[1]);\n if (dealer.score === 1) {\n dealer.score += 10;\n }\n}", "title": "" }, { "docid": "4e0d2c18f2072e695b33842838ca5d60", "score": "0.5649942", "text": "Update() {}", "title": "" }, { "docid": "13e004717602cdd9fda14b6ef39a2548", "score": "0.564143", "text": "update() {\n // Handles updating this block for each game tick\n if (state.onhand.length > 10) return; // No inventory space to produce more\n if (!state.readyToCraft()) {\n state.searchForItems(true);\n return;\n }\n state.processCraft(1);\n }", "title": "" }, { "docid": "5f8851fb24e20bacdaa234d506eef4ff", "score": "0.56403446", "text": "function updateAllVolatileBehaviours () {\n for (var pass = 0; pass < 3; pass++) {\n console.log(\"Reaction pass \"+(pass+1));\n var anyUpdated = false;\n \n players.forEach(function (p) {\n if (p !== humanPlayer && p.isLoaded()) {\n anyUpdated = p.updateVolatileBehaviour() || anyUpdated;\n }\n });\n \n console.log(\"-------------------------------------\");\n \n // If nothing's changed, assume we've reached a stable state.\n if (!anyUpdated) break;\n }\n}", "title": "" }, { "docid": "afc6971892d7f380aae7dda1613cdb6f", "score": "0.56400645", "text": "update() {\n\n }", "title": "" }, { "docid": "522a8c5240ee38da8bf6f840a64bd259", "score": "0.5639398", "text": "function update() {\n $(\"#ga-stats\").empty();\n $(\"#ga-stats\").append(\"Population Size: \" + populationSize + \"<br>\");\n $(\"#ga-stats\").append(\"Parent Pool: \" + parentPool + \"<br>\");\n $(\"#ga-stats\").append(\"Mutation Rate: \" + mutationRate + \"<br>\");\n\n world.Step(frameRate, VELOCITY_ITERATION, POSITION_ITERATION);\n\n world.ClearForces();\n drawworld(world, ctx);\n\n if(!paused){\n if(Math.abs(diffx) < MOVEMENT_THRESHOLD){\n car.removeHealth();\n } else{\n car.increaseFitness();\n }\n }\n\n\n}", "title": "" }, { "docid": "2bfc168e316e109e6392dff1f1fff224", "score": "0.5632528", "text": "function update() {\n updateCow(tagNum, weight, medRecord)\n .then(() => {\n ToastAndroid.show('Updated successfully', ToastAndroid.SHORT)\n }).catch(error => {\n alert(error.message)\n })\n }", "title": "" }, { "docid": "f8b63dcf0d9f049fc4a5208f5b179c72", "score": "0.5632327", "text": "function updatePlayer(number, saying) {\n\tswitch(checker) {\n case 'h2minus': \n h2 = h2 - number;\n\t\t\t\t\t\t\t$('#player2healthcounter').html(h2);\n break;\n case 'h1plus':\n h1 = h1 + number;\n\t\t\t\t\t\t\t$('#player1healthcounter').html(h1);\n break;\n case 'h1minus': \n\t h1 = h1 - number;\n\t\t\t\t\t\t\t$('#player1healthcounter').html(h1);\n\t break;\n case 'h2plus':\n h2 = h2 + number;\n\t\t\t\t\t\t\t$('#player2healthcounter').html(h2);\n break; \n\t\t\t\t\tdefault:\n break;\n };\n\t$('#div3').prepend(saying.replace('{number}', number).replace('{computerFranken}', computerFranken).replace('{computerMitch}', computerMitch).replace('{player1}', characters[key].name).replace('{player2}', characters[key2].name));\n\trefresh();\n\tsetTimeout(tally, 3000);\t\n}", "title": "" }, { "docid": "e27a217154030d33284fc4b4917e99f3", "score": "0.5631505", "text": "update(row, column, isPlayerOne) {\n if (isPlayerOne) {\n this.board[row][column] = \"X\";\n }\n else {\n this.board[row][column] = \"O\";\n }\n }", "title": "" }, { "docid": "32a436c93f492833ba4dd0d79f0d992c", "score": "0.5628815", "text": "function updateHP(self, player) {\n if ((players[player.playerId].team != 'enemies') && !players[player.playerId].deathState) {\n if ((players[player.playerId].hp + HPPOWERUP) < MAXHP) {\n players[player.playerId].hp = players[player.playerId].hp + HPPOWERUP;\n } else {\n players[player.playerId].hp = MAXHP;\n }\n\n\n self.hppowerup.setPosition(randomPosition(MAP_SIZE_X), randomPosition(MAP_SIZE_Y));\n\n sockets[player.playerId].emit('updateFuel', players[player.playerId].fuel);\n sockets[player.playerId].emit('updateHP', players[player.playerId].hp);\n //sockets[player.playerId].emit('updateScore', self.scores);\n sockets[player.playerId].emit('hpLocation', {\n x: self.hppowerup.x,\n y: self.hppowerup.y\n });\n\n // ? New hp powerup place\n io.emit('hpLocation', {\n x: self.hppowerup.x,\n y: self.hppowerup.y\n });\n\n // ! REWORK\n sockets[player.playerId].emit(\"gotPowerUp\", \"powerup2\");\n } else {\n // Update enemy HP\n }\n}", "title": "" }, { "docid": "92f1c9c0de7e72447091ff61cc55b5d6", "score": "0.56285083", "text": "function playerDataUpdate() {\n $('#playerName').html(p.name); //loads player name\n $('.playerLevel').html(p.level.toLocaleString()); //update level\n $('.playerCurXp').html(abbrNum(p.curXp)); //update current xp\n $('.playerNextXp').html(abbrNum(p.nextXp)); //update next level xp\n $('.playerTotalXp').html(abbrNum(p.totalXp)); //update total xp\n playerLevelBar(); //update player level bar\n}", "title": "" }, { "docid": "0f04f6dca23925b53a42ac5ae3f98831", "score": "0.56265616", "text": "update() {\n this.updateLit();\n this.updateOraclesAndAssets();\n this.updateCoinRates();\n }", "title": "" }, { "docid": "34e6f5f7584cefee204bcc24e0adc51f", "score": "0.5623511", "text": "function updateCards(){\n \n}", "title": "" }, { "docid": "1fefd87075511cd4e5b4340c0792a5b5", "score": "0.5608693", "text": "function update(gameid, username){\n let prevturn = \"\";\n var column;\n eventSource = new EventSource(\"http://twserver.alunos.dcc.fc.up.pt:8008/update?nick=\"+username+\"&game=\"+gameid);\n eventSource.onmessage = function(event){\n u = JSON.parse(event.data);\n column = u.column;\n turn = u.turn;\n // se o numero da jogada for par\n if(column != undefined && turn != document.getElementById('logname') && isPair(num)==true){\n jog2PutChip(column, turn);\n num++;\n }\n else if(column != undefined && isPair(num)==false){ // se o numero da jogada for impar\n jog1PutChip(column, turn);\n num++\n }\n if (u.winner != undefined && num != 1){ // em caso de vitoria\n if(u.winner == username){\n writelog(\"lwin\");\n }\n else{\n writelog(\"nwin\");\n }\n analyze(0, 1);\n analyze(1, 1);\n winner();\n eventSource.close(); // fecha o SSE\n num = 1;\n }\n }\n eventSource.onerror = function(err){\n console.log(\"EventSource error:\", err);\n }\n}", "title": "" }, { "docid": "19f64530841e9e6b83b9991446618645", "score": "0.5607207", "text": "function update()\r\n{\r\n\tdocument.getElementById(\"score\").innerHTML = score; //Replaces the displayed score by the updated one\r\n\tdocument.getElementById(\"tempsPasse\").innerHTML = timeSpent +\"s\"; //Replaces the displayed time spent by the updated one\r\n\tdocument.getElementById(\"nbClic\").innerHTML = nbClic; //Replaces the displayed nb of clic by the updated one\r\n\tdocument.getElementById(\"dpsTotal\").innerHTML = dpsTotal; //Replaces the displayed nb of total dps by the updated one\r\n\tdocument.getElementById(\"nvglobal\").innerHTML = nvglobal;\r\n\tdocument.getElementById(\"ameldebloq\").innerHTML = ameldebloq;\r\n\tupdate_amelioration_display();\r\n}", "title": "" }, { "docid": "b1148aa3c0d25e59dd213fe0bf8e5b69", "score": "0.5605156", "text": "updateSwims() {\n document.querySelector('.swimsTaken').textContent = player.swims;\n }", "title": "" }, { "docid": "68fe5354a9e700454f645d1bc3611a47", "score": "0.56033504", "text": "update() {}", "title": "" }, { "docid": "68fe5354a9e700454f645d1bc3611a47", "score": "0.56033504", "text": "update() {}", "title": "" }, { "docid": "68fe5354a9e700454f645d1bc3611a47", "score": "0.56033504", "text": "update() {}", "title": "" }, { "docid": "68fe5354a9e700454f645d1bc3611a47", "score": "0.56033504", "text": "update() {}", "title": "" }, { "docid": "68fe5354a9e700454f645d1bc3611a47", "score": "0.56033504", "text": "update() {}", "title": "" }, { "docid": "68fe5354a9e700454f645d1bc3611a47", "score": "0.56033504", "text": "update() {}", "title": "" }, { "docid": "68fe5354a9e700454f645d1bc3611a47", "score": "0.56033504", "text": "update() {}", "title": "" }, { "docid": "68fe5354a9e700454f645d1bc3611a47", "score": "0.56033504", "text": "update() {}", "title": "" }, { "docid": "68fe5354a9e700454f645d1bc3611a47", "score": "0.56033504", "text": "update() {}", "title": "" }, { "docid": "68fe5354a9e700454f645d1bc3611a47", "score": "0.56033504", "text": "update() {}", "title": "" }, { "docid": "bd9c1827d58282242f9f766bb16b1eab", "score": "0.56032634", "text": "function updateAllFinances() {\n var $levelDifficultyMultiplier = (Math.abs(($hive.level / 3) - 100) / 100);\n $hive.healthRate = ((($hive.workerCount * $workerBee.healthRate) + ($hive.maintenanceWorkerCount * $maintenanceWorkerBee.healthRate)) / 10);\n //stuff affected by winter\n if ($game.season == 'Winter') {\n $hive.healthRate -= ((($hive.level * 0.25) * $levelDifficultyMultiplier) / 5);\n }\n else {\n $hive.healthRate = ($hive.healthRate * $levelDifficultyMultiplier);\n };\n $hive.honeyRate = ($hive.workerCount * $workerBee.honeyRate) + ($hive.honeyWorkerCount * $honeyWorkerBee.honeyRate);\n $hive.territoryRate = ($hive.workerCount * $workerBee.territoryRate) + ($hive.territoryWorkerCount * $territoryWorkerBee.territoryRate);\n $hive.eggRate = ($hive.droneCount * $droneBee.eggRate);\n updateHoney($hive.honeyRate);\n updateTerritory($hive.territoryRate);\n updateHealth($hive.healthRate);\n updateEggs($hive.eggRate);\n updatePopulationMax();\n }", "title": "" }, { "docid": "7588e21cc6b69e80de940c4b32b568dc", "score": "0.5597679", "text": "function updateAllWithCurrentWord(){\n //Update database\n if(parseInt(friendFID,10) > parseInt(myFID,10)){\n var urlData = \"?words_a=\" + myGames[friendFID+\"_1\"][\"myWords\"] + \"&words_b=\" + myGames[friendFID+\"_\"+gameID][\"friendWords\"];\n }else{\n var urlData = \"?words_a=\" + myGames[friendFID+\"_1\"][\"friendWords\"] + \"&words_b=\" + myGames[friendFID+\"_\"+gameID][\"myWords\"];\n }\n \n var urlWithData = \"https://friendfrequency-friendfrequency.rhcloud.com/official_game_backend.php\" + urlData;\n httpRequest('PUT','Game', urlWithData, false, 'updateGame');\n \n //Update gameZone\n displayInGameZone(friendFID+\"_1\");\n \n //Change gameBubble border color\n switch(getGameStatus(myGames[friendFID+\"_1\"][\"myWords\"],myGames[friendFID+\"_1\"][\"friendWords\"]))\n {\n case \"ME\":\n document.getElementById(friendFID+\"_\"+gameID).style.border=\"#FF3366 7px solid\";\n break;\n case \"FRIEND\":\n document.getElementById(friendFID+\"_\"+gameID).style.border=\"#49b7f7 7px solid\";\n break;\n case \"NEW\":\n document.getElementById(friendFID+\"_\"+gameID).style.border=\"#FF3366 7px solid\";\n break;\n case \"ENDED\":\n document.getElementById(friendFID+\"_\"+gameID).style.border=\"#B6E2FB 7px solid\";\n break;\n default:\n break;\n }\n //Send request to friend\n submitWordRequest();\n}", "title": "" }, { "docid": "d99dc388f6a055028d550a380d053d6b", "score": "0.55908847", "text": "update() {\r\n if (this.progressbar && this.challenges.current_index > 0) {\r\n this.progressbar.percentage = (100 / this.challenges.length) * (this.challenges.current_index);\r\n }\r\n }", "title": "" }, { "docid": "0b537df10fc26dfb57f4528998f68cc2", "score": "0.55862635", "text": "update() {\n \n }", "title": "" }, { "docid": "6ad1b5200d003f6326bd6afbda6c1d1f", "score": "0.55859876", "text": "function updateSidebar(){\r\n //linearly a bad idea? since upgrades not that many?\r\n updateUpgradeInfo(\"strafeIcon\", playerShip.strafeEnabled);\r\n updateUpgradeInfo(\"speedIcon\", playerShip.speedIncrease);\r\n updateUpgradeInfo(\"damageIcon\", playerShip.weaponDamageIncrease);\r\n updateUpgradeInfo(\"tractorIcon\", playerShip.tractorEnabled);\r\n updateUpgradeInfo(\"gunIcon\", playerShip.gunEnabled);\r\n \r\n}", "title": "" }, { "docid": "40c23b042ef15d57258530462fdb3a91", "score": "0.5583561", "text": "function update(array_pseudo, win_or_loose) {\n\n array_pseudo.forEach((pseudo, i) => {\n //For each pseudo\n\n var win = 0;\n var loose = 0;\n\n\n //Get pseudo infos\n var infos = localStorage.getItem(pseudo);\n\n if (infos != null) {\n //If we encoutered this guy before\n var tab = win_loose_splitter(infos);\n\t\t\twin = tab[0];\n\t\t\tloose = tab[1];\n }\n\n //Now we increase win or loose depending of the situation\n\n if (win_or_loose) { // True = WIN\n win += 1;\n } else {\n loose += 1; // False = LOOSE\n }\n\n //Now we are going to set the players infos :\n\n var value = parser_win_loose(win, loose);\n\n localStorage.setItem(pseudo, value);\n\n });\n}", "title": "" }, { "docid": "9299445dd5b317357a1199d59ccb26af", "score": "0.5583549", "text": "function updateWord() {\n if (!gameOver){\n \n // Put userGuess in alreadyUsed array\n var pos = alreadyUsed.indexOf(userGuess);\n if (pos === -1) {\n // Put userGuess in array of blanks in every spot it belongs (could be multiple locations)\n alreadyUsed.push(userGuess);\n for(var i=0; i < currentPokemon.length; i++) {\n \n if (currentPokemon[i] === userGuess) {\n currentWord[i] = userGuess;\n lettersLeft = lettersLeft - 1;\n }\n }\n }\n displayWord = currentWord.join(\" \");\n document.getElementById('pokemonName').innerHTML = '<h3>' + displayWord + '</h3>';\n //set gameOver and update wins\n if (lettersLeft <= 0 ) {\n gameOver = true;\n wins++;\n document.getElementById('wins').innerHTML = '<p>' + wins + '</p>';\n }\n \n } //end of if (!gameOver)\t\n }// end of updateWord", "title": "" }, { "docid": "428c315cdeeb21d5571ab66917577168", "score": "0.55822784", "text": "function updatePlayerOther(data) {\r\n if (playerOthers.hasOwnProperty(data.clientId)) {\r\n let model = playerOthers[data.clientId].model;\r\n model.goal.updateWindow = data.updateWindow;\r\n\r\n model.goal.position.x = data.position.x;\r\n model.goal.position.y = data.position.y\r\n model.goal.direction = data.direction;\r\n }\r\n }", "title": "" }, { "docid": "fc9beca849b055259b9b8ab2c3d06823", "score": "0.5577313", "text": "function replenishPlayer()\n {\n ships[0].energy = 9999;\n ships[0].shields = 0;\n ships[0].torpedos = 30; // 10 would be the standard but seems to few in this more \"arcadish\" version...\n }", "title": "" }, { "docid": "27154bb43f439ab9493a06cc519b3ad6", "score": "0.5566975", "text": "function printUpdatedFellowship()\n{\n\n}", "title": "" }, { "docid": "9d285c4cd14f5e27f7689f82a3ad8cd7", "score": "0.5564303", "text": "updateWhenTurnEnd() {\n this.canUseAttack = true;\n this.canUseEnvolve = true;\n this.canUseTrainer = true;\n this.canUseEnergy = true;\n this.canUseRetreat = true;\n\n let i = this.matCollection.length;\n while (i--) {\n if (this.matCollection[i] == Card_Type.pokemon) {\n item.applyEnergy = false;\n\n if (item.isParalyzed) {\n item.isParalyzedCounter++;\n }\n if (item.isStuck) {\n item.isStuckCounter++;\n }\n if (item.isPoisoned) {\n item.currentHp--;\n }\n if (item.currentHp == 0) {\n this.matCollection.splice(i, 1);\n this.discardCollection.push(item);\n }\n }\n }\n\n i = this.benchCollection.length;\n while (i--) {\n if (this.benchCollection[i] == Card_Type.pokemon) {\n item.applyEnergy = false;\n\n if (item.isParalyzed) {\n item.isParalyzedCounter++;\n }\n if (item.isStuck) {\n item.isStuckCounter++;\n }\n if (item.isPoisoned) {\n item.currentHp--;\n }\n if (item.isPoisoned) {\n item.currentHp--;\n }\n if (item.currentHp == 0) {\n this.benchCollection.splice(i, 1);\n this.discardCollection.push(item);\n }\n }\n }\n }", "title": "" }, { "docid": "cc0b380d8a218b02bf2af11358d64ec8", "score": "0.5563892", "text": "function updatePlayer(data, win) {\n var json = JSON.parse(data);\n var request = new XMLHttpRequest();\n request.onload = renderUpdate;\n request.open(\"PATCH\", \"/pong/\"+json.id);\n\n // send the collected data as JSON\n var formData = new FormData();\n var data;\n if(win)\n data = {\"player\" : {\"name\" : json.name, \"wins\" : json.wins + 1, \"losses\" : json.losses}};\n else\n data = {\"player\" : {\"name\" : json.name, \"wins\" : json.wins, \"losses\" : json.losses + 1}};\n formData.append('article', JSON.stringify(data));\n request.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');\n\n // send the collected data as JSON\n request.send(JSON.stringify(data));\n}", "title": "" }, { "docid": "8de800e6f5b06640cf2f0b9f9d2f29ef", "score": "0.55614126", "text": "function refreshPlayed(ibase, num) {\n // Does current view allow ready flags?\n let vrdyok = (UI.view != \"init\" && UI.view != \"gameend\")? 1:0;\n // Look at each hand in the update\n for (let ib = ibase; ib < ibase+num; ib++) {\n let ig = ib & 0x3; // game positions (0=East), i.e. PSt.hands[ig]\n let iv = posGame2View(ig); // view positions (0=bottom)\n let tileclass = (iv > 0? \"tile-m\" : \"tile-lg\");\n let elem = document.getElementById('tilesp'+iv);\n let html = '';\n PSt.hands[ig].sets.forEach((set, si) => {\n // each set consists of: {\"s\":\"F1,F2\",\"secret\":0}\n if (set.s.length > 0) {\n const lastSet = (si==PSt.hands[ig].sets.length-1);\n if (set.secret > 1) {\n unplayedAsSuitSets(set.s).forEach(s => {\n html += '<div class=\"tile-set-ureveal\">';\n html += mkTileSvg(s, 1, tileclass) + '</div>';\n });\n } else {\n if (set.secret) {\n html += '<div class=\"tile-set-secret\">';\n } else {\n html += '<div class=\"tile-set\">';\n }\n const cl = tileclass +(iv==0 && lastSet && PSt.hasAddedSet()? \" add-pulse\":\"\");\n html += mkTileSvg(set.s, 1, cl) + '</div>';\n // Check for added flower highlight\n if (iv==0 && si==0 && PSt.hasAddedFlower()) {\n // Add class on last flower SVG\n let n = html.lastIndexOf('class=\"');\n if (n >= 0) {\n n += 'class=\"'.length;\n html = html.slice(0,n) + \"add-pulse \" + html.slice(n);\n }\n }\n }\n }\n });\n // other players, not the local player at the bottom of the view\n if (iv > 0) {\n // show unplayed tiles, if any (none after win)\n if (PSt.hands[ig].nu > 0) {\n html += mkTileSvg(\"UT\", PSt.hands[ig].nu, tileclass);\n let tcnt = (PSt.hands[ig].sets.length-1)*3 + PSt.hands[ig].nu;\n if (tcnt < 14) {\n html += mkTileSvg(\"ZT\", 1, tileclass);\n }\n }\n }\n if (html.length == 0) {\n //html = 'flowers and sets';\n }\n elem.innerHTML = '<span>'+html+'</span>'; // clear old contents\n // update ready flag\n CUI.show_id(\"rdy\"+iv, vrdyok && PSt.hands[ig].r);\n }\n}", "title": "" }, { "docid": "4ca3598f9fced2fca4e8bc4810e64956", "score": "0.5560919", "text": "Update() { }", "title": "" }, { "docid": "cb3223dce902158620311b4bac0930c9", "score": "0.5560738", "text": "updateAI() {\n // Updates occur in timed-increments\n let time_elapsed = this.getTime() - this.start_t;\n if (time_elapsed >= this.ai_rate) {\n this.start_t = this.getTime();\n\n if (this.move_idx == this.moves.length) {\n this.lockPiece();\n\n if (this.isGameOver()) {\n this.resetGame();\n return;\n }\n\n this.current_piece = this.next_piece;\n this.next_piece = this.getRandomPiece();\n\n let rowsToClear = this.getFilledRows();\n this.clearRows(rowsToClear)\n this.score += rowsToClear.length;\n \n // Fetch the next sequence of moves\n this.move_idx = 0;\n this.moves = this.player.getMoves(this.grid, this.current_piece);\n }\n \n // Update piece using move\n if (this.moves[this.move_idx] == 'r') {\n this.current_piece.x += 1;\n }\n else if (this.moves[this.move_idx] == 'l') {\n this.current_piece.x -= 1;\n }\n else if (this.moves[this.move_idx] == 'd') {\n this.current_piece.y += 1;\n }\n else {\n this.current_piece.current_cfg_idx = parseInt(this.moves[this.move_idx]);\n }\n\n this.move_idx += 1;\n }\n }", "title": "" }, { "docid": "cf4d6772e02c5cfd6bc7730df742fdbb", "score": "0.5559465", "text": "updateTurn() {\n if (this.funcState != this.state.MOVIE && this.selectedPiece != null) {\n this.selectedPiece.updateState('On Board')\n this.scene.graph.clearHighlightedCells()\n }\n\n if (this.currPlayer == this.blackPlayer) {\n this.blackPlayer.stopTimer()\n this.currPlayer = this.redPlayer\n }\n else if (this.currPlayer == this.redPlayer) {\n this.redPlayer.stopTimer()\n this.currPlayer = this.blackPlayer\n }\n this.currPlayer.startTimer()\n\n this.updateCamera()\n }", "title": "" }, { "docid": "0f7f7fa7d1d42f79434ca58a9c08beb8", "score": "0.5558677", "text": "update_func_2() //computer hit\n {\n //if computer is dead, quit\n if(this.computer_is_dead)\n {\n return;\n }\n //computer 'types' every time this func runs\n //calc if computer got a hit or a miss\n let hit_score = this.computer_floor + (Math.random() * this.computer_skill);\n if(hit_score >= this.computer_threshold)\n {\n this.computer_pool++;\n }\n else\n {\n this.computer_pool--;\n this.computer_display_pain = 40;\n }\n console.log(\"computer hit score: \" + hit_score);\n \n //update bitlevels\n this.check_bit_level_computer();\n }", "title": "" }, { "docid": "f3e5f0c7b47decd4c78229685760ca77", "score": "0.5557911", "text": "function update(name)\n{\n filterMap(name)\n filterPlayer(name)\n}", "title": "" }, { "docid": "89347f338c215026a4c37ba7e704cab0", "score": "0.5557533", "text": "function updateData() {\n problemManager.update();\n update();\n}", "title": "" }, { "docid": "d212ddff1f164622b995a6227ae4fea2", "score": "0.55569625", "text": "update() {\n // Handles updating the stats of this block\n if (!state.readyToCraft()) {\n return state.searchForItems(true);\n }\n state.processCraft(1);\n }", "title": "" }, { "docid": "0cfd0a51929f1dae5b9ba24fdaffc119", "score": "0.5556819", "text": "update()\n {\n const meta = efflux.activeSong.meta;\n\n requestAnimationFrame(() => {\n\n tempoSlider.value = meta.tempo;\n tempoDisplay.innerHTML = meta.tempo + \" BPM\";\n\n currentPositionInput.value = ( editorModel.activePattern + 1 ).toString();\n maxPositionTitle.innerHTML = efflux.activeSong.patterns.length.toString();\n });\n }", "title": "" }, { "docid": "39fa644cdc1f134abe3edf61fef0d6da", "score": "0.55457145", "text": "function updateAbilityBonus(myAbility) {\n var ability = jQuery(myAbility).val();\n\n var modifier = jQuery(myAbility).parent().children('.modifier-bubble').text();\n if (!jQuery.isNumeric(ability)) {\n ability = 1;\n jQuery(myAbility).val(ability);\n\n\n }\n\n modifier = Math.floor((ability - 10) / 2);\n jQuery(myAbility).parent().children('.modifier-bubble').text(modifier);\n \n if (myAbility.attr('id') == 'wis') {\n passivePerception();\n }\n}", "title": "" }, { "docid": "d183d67d9a6e3621df150697d53ec56c", "score": "0.5544439", "text": "update() {\n\n\t}", "title": "" }, { "docid": "57ada891ff03af95c5d135e35e09d530", "score": "0.55430114", "text": "function UpdateFortressStat(position) {\r\n \r\n var index;\r\n var update = 0;\r\n\r\n for (index = 0; index < 120; index++) {\r\n if(IsInFortress(index) == true) {\r\n if(FindPieceCol(index, position) == Colour.White) {\r\n update = update + 1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n for (index = 0; index < 120; index++) {\r\n if(IsInFortress(index) == true) {\r\n if(FindPieceCol(index, position) == Colour.Black) {\r\n update = update + 2;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if(update == 1) {\r\n Board.Fortress == Colour.White;\r\n } else if (update == 2) {\r\n Board.Fortress == Colour.Black;\r\n } else {\r\n Board.Fortress == Colour.Both;\r\n }\r\n\r\n fortressStat = update;\r\n}", "title": "" }, { "docid": "2be72da8594a775a8cd8e6a19d06b6d7", "score": "0.5537151", "text": "function update() { /* Don't delete this function! */ }", "title": "" }, { "docid": "1d319e5924ffb66d0293a464362306e8", "score": "0.5534961", "text": "function update(){\n projectileUpdate();\n Collisions(players,projectiles);\n //constantly emits all the player and projectile data to all the other players\n // IO.sockets.emit(\"state\",players,projectiles); \n}", "title": "" }, { "docid": "788d09430262746ad5a41da8a5a105f0", "score": "0.55334115", "text": "function update() {\n \n stats.begin(); \n solarturrets.gameupdate();\n requestAnimFrame( update );\n stats.end();\n \n }", "title": "" }, { "docid": "3edfe1c6c741bd36fe4ec090247f1737", "score": "0.5522476", "text": "update(){\n if(this.deliverBelt){\n if(this.girl.body.bounds.min.x < this.player.body.bounds.max.x + 5)\n this.girl.standstill();\n }\n\n this.player.update();\n this.girl.update();\n\n if(!this.player.ready)\n return;\n\n super.update();\n\n if(this.gameState==-1){\n this.gameState = 0;\n }\n if(this.trainingCompleted){\n if(!this.startTrainingCompleted){\n super.stopTimer();\n this.startTrainingCompleted = true;\n this.time.delayedCall(3000, this.completeTraining, [], this);\n }\n }else\n this.checkPracticeStep();\n }", "title": "" }, { "docid": "50ca9837ef78a758c0109abb495eb373", "score": "0.5521875", "text": "update() {\n //TO-DO\n }", "title": "" } ]
ba784df54dfb9e6dc3a909a020b4656d
maitre: null, ideesEsclaves: [], grappe: null,
[ { "docid": "f7792194a053f641ce76c2a68e86fb22", "score": "0.0", "text": "componentDidMount() {\n this.props.loadGrappeOptions();\n this.props.loadIdeeOptions();\n }", "title": "" } ]
[ { "docid": "0592c035d60a6034d497d460c927e6c0", "score": "0.6647425", "text": "constructor(){\n this.sexo\n this.pais\n this.idioma\n }", "title": "" }, { "docid": "f0bfc48e3991a173bd1dda35f0474e91", "score": "0.6363997", "text": "constructor(){\r\n this.pantalla = \"\"; // Inicialmente no hay nada en pantalla\r\n this.pantallaPila = \"\"; // Inicialmente no hay nada en la pantalla de la pila\r\n this.pila = []; // Inicialmente la pila está vacía\r\n }", "title": "" }, { "docid": "2ef59706d59fde16bf3fd2bbcce0dbb2", "score": "0.63422424", "text": "function definir_disco(disco,torre){\r\n\r\ndisco_origem = disco;\r\ntorre_origem = torre;\r\n\r\n}", "title": "" }, { "docid": "cac152c9b24d1338c6c774f07aaf11aa", "score": "0.6327843", "text": "function zeraVariaveis() \r\n{\r\n [cartaVirada, bloqueado] = [false, false];\r\n [primeiraCarta, segundaCarta] = [null, null];\r\n}", "title": "" }, { "docid": "e18b1434a6832e855c70630b9f9b4ed0", "score": "0.6269867", "text": "function ordenInicial() {\n pisoActual=pisoIni;\n recorrido=[...arrayPisos];\n}", "title": "" }, { "docid": "9809e24d4074a09f2b73c7e3012ca46a", "score": "0.62357724", "text": "static queEres() {\n console.log(\"Soy una especie del orden de los primates perteneciente a la familia de los homínidos.\");\n }", "title": "" }, { "docid": "9e19ae0598c0c375ecdb978d3bfe7658", "score": "0.61960363", "text": "constructor(pesos, sesgo, eta, setEntrenamiento) {\n this.pesos = pesos;\n this.sesgo = sesgo;\n this.eta = eta;\n this.setEntrenamiento = setEntrenamiento;\n }", "title": "" }, { "docid": "2d08f098bbfec14be54a76798d9a0907", "score": "0.6163754", "text": "function Disco(){\n this.titulo = null;\n this.anio = null;\n this.grupo = null;\n\n}", "title": "" }, { "docid": "a73a8f0ae27d466648f689ed9c465c9c", "score": "0.6157342", "text": "function stProprieteCompo()\n{\n this.Action_en_cours=null;\n this.NewCle=null;\n}", "title": "" }, { "docid": "324d495adb3eab2a34b43ea21f6737ff", "score": "0.6095251", "text": "constructor() {\n this.raiz = null;\n }", "title": "" }, { "docid": "2eb0094b81a9ceb5c7db96cca352692e", "score": "0.59783", "text": "function stProprieteCompo()\n{\n\tthis.Action_en_cours=null;\n\tthis.NewCle=null;\n}", "title": "" }, { "docid": "7ce405de33b93a13d883d8cf8105567f", "score": "0.59593296", "text": "function limpiarPoligonos()\n{\n\n}", "title": "" }, { "docid": "b46da6c3d5a9040b42d81049b1c9cc03", "score": "0.59423566", "text": "constructor(titulo,descricao,remuneracao){\n this.titulo = titulo,\n this.descricao = descricao,\n this.remuneracao = remuneracao\n }", "title": "" }, { "docid": "5ca7b94a8819443ecc7095928df565a7", "score": "0.5927536", "text": "function IniciaPersonagem() {\n // entradas padroes para armas, armaduras e escudos.\n gPersonagem.armas.push(ConverteArma({\n chave: 'desarmado',\n nome_gerado: 'desarmado',\n texto_nome: Traduz('desarmado'),\n obra_prima: false,\n bonus: 0\n }));\n}", "title": "" }, { "docid": "6e4251d62c4933bad0f6336ee3951fac", "score": "0.59082764", "text": "function reservacion (completo,opciones){\n\n opciones = opciones || {};\n\n let metodo = opciones.metodoPago,\n cantidad =opciones.cantidad,\n dias=opciones.dias;\n\n console.log(metodo);\n console.log(cantidad);\n console.log(dias);\n\n\n\n}", "title": "" }, { "docid": "9b2e5b8c0584fb48d7c0d54b55565e5c", "score": "0.58790576", "text": "peliculasOrdenadas() { \n return this.peliculas.filter((pelicula) => pelicula.nominada);\n }", "title": "" }, { "docid": "ab225ab9a2d652c1c5db0fe2fab532af", "score": "0.5858611", "text": "getPonerEncima(){\n return this.ponerEncima;\n }", "title": "" }, { "docid": "51194c899c075a763654f4aaabd89cc7", "score": "0.5767733", "text": "function aprendiz(){\n this.nombre='maria';\n this.apellido='rodriguez';\n}", "title": "" }, { "docid": "c39af55ff321a9a266888dbe17cea852", "score": "0.57627916", "text": "getEstarEncima(){\n return this.estarEncima;\n }", "title": "" }, { "docid": "66cbd6ee392a7d09623552ce765c064b", "score": "0.5759769", "text": "static default(){\n return {\n easy: [],\n intermediate: [],\n hard: []\n }\n }", "title": "" }, { "docid": "c2447b6538ce90140fa1ce955228c30b", "score": "0.5742176", "text": "constructor() {\n this.vikingArmy = []\n this.saxonArmy = []}", "title": "" }, { "docid": "d2cf2565eb8881d8e8374eda55c8b949", "score": "0.5733279", "text": "constructor(nombre, apellido, altura) {\n this.nombre = nombre\n this.apellido = apellido\n this.altura = altura\n }", "title": "" }, { "docid": "890f4d7f1b909470c30f9901e8b98c80", "score": "0.5701586", "text": "agregarPelicula() {\n this.peliculas.unshift({\n titulo: this.nuevaPelicula,\n nominada: false,\n director: 'Jhon Doe',\n año: 3000\n });\n this.nuevaPelicula = null;\n }", "title": "" }, { "docid": "fae775cbbe61c4a6bb0009aa04cedb63", "score": "0.5692258", "text": "function comer() {\n if (manzana === posicion) {\n arraySerpiente.push(posicion);\n manzana = null;\n velocidad = velocidad * 0.98;\n }\n}", "title": "" }, { "docid": "8d7bf83d9cb1767ebf39bb060bddb4cd", "score": "0.5676492", "text": "constructor() {\n\n /** numeros restantes en el interior del bombo */\n this.restantes = [];\n\n /**numeros que ya han salido del bombo */\n this.salidos = [];\n\n this.rellenarbombo();\n\n\n }", "title": "" }, { "docid": "7e233844d1bf0b5bc207469f2d0baaa9", "score": "0.5671034", "text": "static quienEres() {\n console.log(\"Soy un mamífero carnívoro doméstico de la familia de los cánidos que me caracterizo por tener los sentidos del olfato y el oído muy finos, soy muy inteligente y fiel al ser humano.\")\n }", "title": "" }, { "docid": "921e813fad7034fefa5e0cc2bce2bcb8", "score": "0.5652901", "text": "constructor(){\n this.cola = [];\n }", "title": "" }, { "docid": "92f28887f21475101afe67b87dff27cf", "score": "0.56310105", "text": "constructor(legs){\n this.legs = legs,\n this.fangs = true\n }", "title": "" }, { "docid": "2b5cd72398e54aeab1cb84980c32c283", "score": "0.56257516", "text": "caminaEncapuchado (){\n \n }", "title": "" }, { "docid": "0af9c0ad60f588f9a55e86c7e465139f", "score": "0.5619424", "text": "function opciones(tarea, pomodoro, tTarea, tDesCor, tDesLar, rutaAlarma)\n{\n\tthis.tarea=tarea;\n\tthis.pomodoro=pomodoro;\n\tthis.tTarea=tTarea;\n\tthis.tDesCor=tDesCor;\n\tthis.tDesLar=tDesLar;\n\tthis.rutaAlarma=rutaAlarma;\n}", "title": "" }, { "docid": "273f13ce294faa3272220b46579132af", "score": "0.56043696", "text": "function PrecoArmaArmaduraEscudo(tipo, tabela, chave, material, obra_prima, bonus, invertido) {\n var entrada_tabela = tabela[chave];\n if (entrada_tabela == null || entrada_tabela.preco == null) {\n return null;\n }\n // Nao pode usar invertido aqui, pq la embaixo inverte tudo.\n var preco = LePreco(entrada_tabela.preco);\n var preco_adicional = { platina: 0, ouro: 0, prata: 0, cobre: 0 };\n if (bonus && bonus > 0) {\n switch (bonus) {\n case 1: preco.ouro += tipo == 'arma' ? 2000 : 1000; break; \n case 2: preco.ouro += tipo == 'arma' ? 8000 : 4000; break; \n case 3: preco.ouro += tipo == 'arma' ? 18000 : 9000; break; \n case 4: preco.ouro += tipo == 'arma' ? 32000 : 16000; break; \n case 5: preco.ouro += tipo == 'arma' ? 50000 : 25000; break; \n default:\n return null;\n }\n }\n if (obra_prima) {\n // Armas op custam 300 a mais, armaduras e escudos, 150.\n preco_adicional.ouro += tipo == 'arma' ? 300 : 150; \n }\n // Modificadores de materiais.\n if (material != 'nenhum') {\n var preco_material = null;\n var tabela_material = tabelas_materiais_especiais[material];\n if (tabela_material.custo_por_tipo) {\n var custo = tabela_material.custo_por_tipo[tipo];\n if (custo.por_subtipo) {\n // TODO\n } else {\n preco_material = LePreco(custo);\n }\n } else if (tabela_material.custo_por_kg) {\n var peso_kg = LePeso(entrada_tabela.peso);\n preco_material = LePreco(tabela_material.custo_por_kg);\n for (var tipo_moeda in preco_material) {\n preco_material[tipo_moeda] *= peso_kg;\n }\n } else if (material == 'couro_dragao') {\n // Preco da armadura mais obra prima.\n preco_material = SomaPrecos(LePreco(entrada_tabela.preco), { ouro: 150 });\n } else if (material == 'ferro_frio') {\n // Preço da arma normal e cada bonus custa 2000 PO a mais.\n preco_material = LePreco(entrada_tabela.preco);\n preco_material['ouro'] += bonus * 2000;\n } else if (material == 'mitral') {\n // Preco tabelado de acordo com tipo da armadura ou escudo (excluidindo custo de obra prima).\n var custo = 0; // escudo ou leve.\n if (tipo == 'escudo') {\n custo = 850;\n } else {\n var talento_relacionado = entrada_tabela.talento_relacionado;\n if (talento_relacionado == 'usar_armaduras_leves') {\n custo = 850;\n } else if (talento_relacionado == 'usar_armaduras_medias') {\n custo = 3850;\n } else if (talento_relacionado == 'usar_armaduras_pesadas') {\n custo = 8850;\n }\n }\n preco_material = { ouro: custo };\n } else if (material == 'prata_alquimica') {\n var categorias = entrada_tabela.categorias;\n var custo = 0;\n if ('cac_leve' in categorias) {\n custo = 20;\n } else if ('cac' in categorias) {\n custo = 90;\n } else if ('cac_duas_maos' in categorias) {\n custo = 180;\n }\n preco_material = { ouro: custo };\n }\n // Adiciona preco do material.\n preco_adicional = SomaPrecos(preco_adicional, preco_material);\n }\n\n // Soma e se necessario, inverte.\n preco = SomaPrecos(preco, preco_adicional);\n if (invertido) {\n for (var tipo_moeda in preco) {\n preco[tipo_moeda] = -preco[tipo_moeda];\n }\n }\n return preco;\n}", "title": "" }, { "docid": "e4c4577405a28e86e175fe1e383ad66f", "score": "0.55970126", "text": "function Huargo (ptosVida,ataque,defensa,heridas) {\n\tHuargo.prototype.inicializar.call(this, ptosVida,ataque,defensa,heridas);\n}", "title": "" }, { "docid": "950a10fac09f6662748755a1a8601935", "score": "0.5596274", "text": "function comenzarTrazo() {\n banderaDibujo = true;\n}", "title": "" }, { "docid": "ae112bcf27843de4c84cceb3547b7fa2", "score": "0.558419", "text": "constructor() {\n this.activePcos_ = {};\n }", "title": "" }, { "docid": "3c8c3ee0c0c052cff47bb4c9f383072c", "score": "0.55816185", "text": "constructor() {\n this.deck = [];\n this.dealt_cards = [];\n this.playedCards = [];\n this.p1Hand = [];\n this.p2Hand = [];\n this.cardPile = [];\n }", "title": "" }, { "docid": "25c10ecbf5def2599ae302bd43568e53", "score": "0.5580544", "text": "constructor(nombre, nRuedas, velocidad, capacidad) {\n this.nombre = nombre;\n this.nRuedas = nRuedas;\n this.velocidad = velocidad;\n this.capacidad = capacidad;\n }", "title": "" }, { "docid": "2c2f4f7385b3e83326684e324e5df05b", "score": "0.55800635", "text": "getEncimaDe(){\n return this.encimaDe;\n }", "title": "" }, { "docid": "67febfd614256c7436a6e16eef3c847c", "score": "0.55795515", "text": "function gestoreCerca () {\n try {\n rimuoviFigli(nodoParagrafo);\n var flessibilita = flex;\n var forza = strong;\n var sesso = genere;\n var tricks = ricercaMultipla(flessibilita, forza, sesso);\n var Descrizioni;\n if (tricks.length != 0) {\n Descrizioni = calcolaDescrizioni(tricks);\n } else {\n Descrizioni = [\"\"];\n }\n creaRisultato(nodoRisultato, Descrizioni);\n } catch(e) {\n alert(\"gestoreCerca\" + e)\n }\n}", "title": "" }, { "docid": "d3449057968de3d50bfae2e433ff44b9", "score": "0.5572887", "text": "constructor(nombre, episodios, temporadas, episodiosVistos) {\n this.nombre = nombre;\n this.episodios = episodios;\n this.temporadas = temporadas;\n this.episodiosVistos = episodiosVistos;\n }", "title": "" }, { "docid": "a1499121e46c73a2efd539f177b379ad", "score": "0.5563239", "text": "function carregaValores(valores){\n if(valores.secao != \"\"){\n valor_secao = valores.secao;\n }\n if(valores.subsecao != \"\"){\n valor_subsecao = valores.subsecao;\n }\n if(valores.unidade != \"\"){\n valor_unidade = valores.unidade;\n }\n if(valores.labelunidade != \"\"){\n label_unidade = valores.labelunidade;\n }\n if(valores.pesquisa != \"\"){\n valor_pesquisa = valores.pesquisa;\n }\n if(valores.pupe_matricula != \"\"){\n pupe_matricula = valores.pupe_matricula;\n }\n if(valores.pmat_matricula != \"\"){\n pmat_matricula = valores.pmat_matricula;\n }\n if(valores.resp_matricula != \"\"){\n resp_matricula = valores.resp_matricula;\n }\n}", "title": "" }, { "docid": "3e49749877f3f3949c90e787ce8fd878", "score": "0.5562578", "text": "constructor() {\n this.sondas = [\n 'Sonda-001',\n 'Sonda-002',\n 'Sonda-003',\n 'Sonda-004',\n 'Sonda-004',\n 'Sonda-005',\n 'Sonda-006',\n 'Sonda-007',\n 'Sonda-008',\n 'Sonda-009',\n 'Sonda-010'\n ];\n this.numeroLancamento = 0;\n }", "title": "" }, { "docid": "63658e028c59027f4d0927fb1b267c76", "score": "0.5548855", "text": "remise_a_zeroRechercheNews(){\n this.recherche_courante_news = [] ;\n }", "title": "" }, { "docid": "4056cfe872a4a4d5ed1a01c43249fa98", "score": "0.554781", "text": "constructor(cartas) {\n this.naipes = ['Copas', 'Paus', 'Espadas', 'Ouros'];\n if (!cartas){\n this.cartas = this.cria_baralho();\n this.cartas = this.embaralha();\n } else {\n this.cartas = this.load_cartas(cartas);\n }\n }", "title": "" }, { "docid": "f57b31709b80c4185f6e830ec8fed487", "score": "0.55342853", "text": "function adicionaEmprestimo(){\n\n var emprestimo = {\n item: inputItem.value,\n dataEmprestimo: inputDataDeEmprestimo.value,\n nome: inputNome.value,\n dataDevolucao: inputDataDeDevolucao.value\n }\n \n adicionaRegistro( [ emprestimo.item, emprestimo.dataEmprestimo, emprestimo.nome, emprestimo.dataDevolucao ] );\n\n}", "title": "" }, { "docid": "aff5e3e82a4a94dfacfa98b20f6f9c30", "score": "0.55331075", "text": "function empezarDibujo() {\n pintarLinea = true;\n lineas.push([]);\n}", "title": "" }, { "docid": "3f27293fe41b19ddf8cbfe8e3be04534", "score": "0.55266947", "text": "function iniciacion(){\n\t//Asignamos el valor de los deslizadores a variables\n\ttam_ciclo = deslizadortc.value();\n\ttam_flasheo = deslizadortf.value();\n\tnum_luciernagas = deslizadornl.value();\n\temp_flasheo = deslizadorfe.value();\n\t//Creamos el array de las luciernagas\n\tarrayluciernagas = new Array();\n\t//Añadimos al array de las luciernagas tantos objetos Luciernaga como la variable num_luciernagas\n\tfor (var i = 0; i < num_luciernagas; i++) {\n\t\t//Asignamos una posicion y reloj aleatorio\n\t\tl = new Luciernaga(random(width),random(height),random(0,tam_ciclo));\n\t\tarrayluciernagas.push(l);\n\t}\n}", "title": "" }, { "docid": "79929fc9660fac6cddadd215d74be820", "score": "0.5520202", "text": "function niveau()\r\n{\r\n //carte = tableau donné par les architectes\r\n this.carte = [\r\n [1,1,1,1,1,1],\r\n [1,0,0,0,1,1],\r\n [1,0,0,1,1,1],\r\n [1,1,2,1,0,1],\r\n [1,1,1,1,1,1]\r\n ];\r\n \r\n this.faces = [\r\n \"Sol1.png\",\r\n \"Sol2.png\",\r\n \"Sol3.png\",\r\n \"Sol4.png\",\r\n \r\n \"Plafond1.png\",\r\n \"Plafond2.png\",\r\n \"Plafond3.png\",\r\n \"Plafond4.png\",\r\n \r\n \"MurFace1.png\",\r\n \"MurFace2.png\",\r\n \"MurFace3.png\",\r\n \"MurFace4.png\",\r\n \r\n \"MurCoteD1.png\",\r\n \"MurCoteD2.png\",\r\n \"MurCoteD3.png\",\r\n \"MurCoteD4.png\",\r\n \r\n \"MurCoteG1.png\",\r\n \"MurCoteG2.png\",\r\n \"MurCoteG3.png\",\r\n \"MurCoteG4.png\"\r\n ];\r\n \r\n}", "title": "" }, { "docid": "9eb2af38b67f596268fdac57d4973f47", "score": "0.5519577", "text": "function PersonagemRenovaFeiticos() {\n for (var chave_classe in gPersonagem.feiticos) {\n if (!gPersonagem.feiticos[chave_classe].em_uso) {\n continue;\n }\n var slots_classe = gPersonagem.feiticos[chave_classe].slots;\n for (var nivel in slots_classe) {\n for (var indice = 0; indice < slots_classe[nivel].feiticos.length; ++indice) {\n slots_classe[nivel].feiticos[indice].gasto = false;\n }\n if ('feitico_dominio' in slots_classe[nivel] && slots_classe[nivel].feitico_dominio != null) {\n slots_classe[nivel].feitico_dominio.gasto = false;\n }\n if ('feitico_especializado' in slots_classe[nivel] && slots_classe[nivel].feitico_especializado != null) {\n slots_classe[nivel].feitico_especializado.gasto = false;\n }\n }\n }\n}", "title": "" }, { "docid": "fc9624c56babe4f8956f73b43ebae4ee", "score": "0.55192065", "text": "function Recursos (){\r\n\t\tthis.recursos = { citizens: 0, wood: 0, marble: 0, wine: 0, glass: 0, sulfur: 0, upkeep: 0 }\r\n\t}", "title": "" }, { "docid": "e1dd7555078bc1c8187842964f6770a3", "score": "0.5516954", "text": "function generarNuevaSala() {\n\nsala = {\n jugadorX: null,\n jugadorO: null,\n tablero: [\n ['_', '_', '_'],\n ['_', '_', '_'],\n ['_', '_', '_']\n ],\n turno: null,\n numeroJugadores: 0,\n observadores :[],\n ganador: null,\n ultimaJugada: null\n};\n\nreturn sala;\n\n}", "title": "" }, { "docid": "f8f61de58aedb73e7ab29b37e9b536cf", "score": "0.5506979", "text": "function limpiarPedidos() {\n this.form.inputCodigoPedido = '';\n this.form.inputCodigoProducto = '';\n this.form.inputCantidad = '';\n this.form.inputValor = '';\n this.form.inputFecha = '';\n this.refrescarFormulario();\n\n}", "title": "" }, { "docid": "e42bdf4b63ed903f9c87b967d8916ba2", "score": "0.55030245", "text": "function stock_res_niveau(){\n var pts_b_down;\n var pts_tmp;\n var pts_b_down_max;\n pts_b_down=(tab_niveau[c_niveau-1][0]*tab_niveau[c_niveau-1][1]*2)-b_down;\n pts_b_down_max =(tab_niveau[c_niveau-1][0]*tab_niveau[c_niveau-1][1]*2);\n pts_tmp=10-(time-12);\n var tab_res_niveau=['Niveau'+c_niveau,b_trouve+' - Balles',b_down+\" - Balles\",bad+' - Mauvaises',time+'s.'];\n tab_res.push(tab_res_niveau); // sans calcul de points\n var tab_res_pts=['points',b_trouve*10,pts_b_down,bad*-2,pts_tmp];\n var tab_max=['Max',b_atrouve*10,pts_b_down_max,0,12+10];\n tab_pts.push(tab_res_pts);\n tab_pts_max.push(tab_max);\n}", "title": "" }, { "docid": "e739cb6ed5ec62ee1b38db94b62945d7", "score": "0.5498651", "text": "function sopaDeLetrasInit(FILAS, COLUMNAS, sopaDeletras) {\n\tlet soup = JSON.stringify(sopaDeletras)\n\t//console.log(soup)\n\tlet logger = \"\"\n\t//console.log(\"Populate SOPA_DE_LETRAS\")\n\tlet soupaux = soup.split(\"\");\n\tsoupaux.shift()\n\tsoupaux.pop()\n\tthis.FILAS = FILAS\n\tthis.COLUMNAS = COLUMNAS\n\tconsole.log(\"FILAS: \"+this.FILAS)\n\tconsole.log(\"COLUMNAS: \"+this.COLUMNAS)\n\n\tconsole.log(\"\\nMATRIZ: \\n\")\n\tSOPA_DE_LETRAS = new Array(parseInt(FILAS));\n\t for (var f = 0; f < SOPA_DE_LETRAS.length; f++) {\n\t \tlogger = \"\"\n\t \tSOPA_DE_LETRAS[f] = new Array(parseInt(COLUMNAS));\n\t \tfor (var c = 0; c < SOPA_DE_LETRAS[f].length; c++) {\n\t\t\t\tSOPA_DE_LETRAS[f][c] = soupaux[0];\n\t\t\t\t logger += SOPA_DE_LETRAS[f][c]\n\t\t\t\tsoupaux.shift();\n\t\t }\n\t\t console.log(logger)\n\t}\n\t\t\n\treturn checkOMatch()\t\n\n\t/*reconocerO()\n\tO+1 = I ? ()=>agregoPosibleCamino(){O=[0,1] I=[0,2]}\n\tO.0 <= I.0 ?\n\treconocerSiOmasunomenosuno\n\t*/\n}", "title": "" }, { "docid": "c0cdd0a6f3a64e57dae5fe1921c4ac4f", "score": "0.54861337", "text": "constructor(nombre, amigos = []) {\n this.nombre = nombre\n // es otra manera de asiganarlo this.amigos = amigos || []\n this.amigos = amigos\n }", "title": "" }, { "docid": "74b0afda0b8c35470e8375fbb0ce3d8b", "score": "0.5483205", "text": "obter_posicao(elemento) {\n return this.estrutura_auxiliar[elemento]['posicao'];\n }", "title": "" }, { "docid": "3b84106775ddec8d60131ee0acedcf9a", "score": "0.54790336", "text": "function Pelicula() {\n this.id = 0;\n this.nombre = '';\n this.descripcion = '';\n this.imagen = '';\n this.visto = false;\n }", "title": "" }, { "docid": "42462dbdf775955944222ba1c044d9e6", "score": "0.5472844", "text": "function Barreiras(altura, largura, abertura, espaco, notificarponto){\n this.pares = [\n new ParDeBarreiras(altura, abertura, largura),\n new ParDeBarreiras(altura, abertura, largura + espaco),\n new ParDeBarreiras(altura, abertura, largura + espaco*2),\n new ParDeBarreiras(altura, abertura, largura + espaco*3)\n ]\n\n const deslocamento = 3;\n\n this.animar = () => {\n this.pares.forEach(par => {\n par.setX(par.getx() - deslocamento)\n\n if(par.getX() < -par.getLargura()){\n par.setX(par.getX() + espaco * this.pares.length)\n par.sortearAbertura()\n }\n const meio = largura/2\n const cruzouOMeio = par.getX() + deslocamento >= meio\n && par.getX() < meio\n if (cruzouOMeio) notificarponto()\n })\n } \n\n}", "title": "" }, { "docid": "24d23921819a9dfe4f28c72b609566a5", "score": "0.5472169", "text": "atraviesa(){ if(this._subiendo)this._atraviesa = true; }", "title": "" }, { "docid": "4d29a85bd1df76b191e4d07becce292e", "score": "0.5471173", "text": "constructor (broj_pokusaja = 1, opcije_izbora = [1, 2, 3]) {\n // incijalizuj opcije\n this.opcije_izbora = opcije_izbora;\n this.broj_pokusaja = broj_pokusaja;\n\n // pripremi strukturu podataka za izvestaje\n this.rezultat = {\n promenio: {\n izbor: 0,\n procenat_izbora: '0%',\n pogodaka: 0,\n promasaja: 0,\n procenat_uspeha: '0%'\n },\n nije_promenio: {\n izbor: 0,\n procenat_izbora: '0%',\n pogodaka: 0,\n promasaja: 0,\n procenat_uspeha: '0%'\n }\n }\n }", "title": "" }, { "docid": "a86baffba2cc93ef752f238360e4ca52", "score": "0.54688114", "text": "function Barreiras(altura, largura, abertura, espaco, ponto) {\n this.pares = [\n new CriarParBarreira(altura, abertura, largura),\n new CriarParBarreira(altura, abertura, largura + espaco),\n new CriarParBarreira(altura, abertura, largura + espaco * 2),\n new CriarParBarreira(altura, abertura, largura + espaco * 3)\n ]\n const deslocamento = 5\n this.animar = () => {\n\n this.pares.forEach(par => {\n par.setX(par.getX() - deslocamento)\n\n if (par.getX() < -par.getLargura()) {\n par.setX(par.getX() + espaco * this.pares.length)\n par.sortearAbertura()\n }\n\n const meio = largura / 2\n const cruzouMeio = par.getX() + deslocamento >= meio && par.getX() < meio\n \n if (cruzouMeio) ponto()\n\n })\n }\n\n}", "title": "" }, { "docid": "be03d9cc25f417f982d200b42ca1de17", "score": "0.5455529", "text": "function PersonagemLimpaGeral() {\n gPersonagem.classes.length = 0;\n gPersonagem.pontos_vida.bonus.Limpa();\n gPersonagem.pontos_vida.temporarios = 0;\n gPersonagem.pontos_vida.ferimentos_nao_letais = 0;\n gPersonagem.armas.length = 1; // para manter desarmado.\n gPersonagem.armaduras.length = 0;\n gPersonagem.ca.bonus.Limpa();\n gPersonagem.iniciativa.Limpa();\n gPersonagem.outros_bonus_ataque.Limpa();\n gPersonagem.atributos.pontos.gastos.disponiveis = 0;\n gPersonagem.atributos.pontos.gastos.length = 0;\n for (var atributo in tabelas_atributos) {\n gPersonagem.atributos[atributo].bonus.Limpa();\n }\n for (var i = 0; i < gPersonagem.pericias.lista.length; ++i) {\n gPersonagem.pericias.lista[i].bonus.Limpa();\n }\n for (var chave_classe in gPersonagem.feiticos) {\n gPersonagem.feiticos[chave_classe].em_uso = false;\n gPersonagem.feiticos[chave_classe].nivel_maximo = 0;\n for (var i = 0; i <= 9; ++i) {\n gPersonagem.feiticos[chave_classe].conhecidos[i].length = 0;\n gPersonagem.feiticos[chave_classe].slots[i].feiticos.length = 0;\n gPersonagem.feiticos[chave_classe].slots[i].feitico_dominio = null;\n }\n }\n gPersonagem.estilos_luta.length = 0;\n for (var tipo_salvacao in gPersonagem.salvacoes) {\n if (tipo_salvacao in { fortitude: '', reflexo: '', vontade: '' }) {\n gPersonagem.salvacoes[tipo_salvacao].Limpa();\n } else {\n delete gPersonagem.salvacoes[tipo_salvacao];\n }\n }\n for (var tipo_item in tabelas_itens) {\n gPersonagem[tipo_item].length = 0;\n }\n gPersonagem.especiais = {};\n gPersonagem.imunidades.length = 0;\n gPersonagem.resistencia_magia.length = 0;\n PersonagemLimpaPericias();\n PersonagemLimpaTalentos();\n}", "title": "" }, { "docid": "2f3e4150d396d243e22200c95aa060ae", "score": "0.54535025", "text": "function pesquisa() {\n let texto_pesquisa = in_pesquisa.value;\n let palavras = extrair_palavras(texto_pesquisa);\n let carreiras = [];\n let cursos = [];\n const pat = pindice[ano_atual];\n let compativeis_ultima = [];\n if (palavras.length > 0) {\n let ultima = palavras[palavras.length-1];\n if (ultima.length > 2) {\n for (const pli in pat) {\n if (pli.startsWith(ultima)) {\n compativeis_ultima.push(pli);\n }\n }\n }\n }\n if (compativeis_ultima.length == 1) {\n palavras.pop();\n palavras.push(compativeis_ultima[0]);\n }\n for (const palavra of palavras) {\n if (palavra in pat) {\n carreiras.push(pat[palavra][\"carreiras\"]);\n cursos.push(pat[palavra][\"cursos\"]);\n } else {\n carreiras.push([]);\n cursos.push([]);\n }\n }\n if (carreiras.length == 0) carreiras = [[]];\n if (cursos.length == 0) cursos = [[]];\n // tirar a intersecção\n let ixn_carreiras = carreiras[0].filter(\n elem => carreiras.every(arr => arr.includes(elem))\n );\n let ixn_cursos = cursos[0].filter(\n elem => cursos.every(arr => arr.includes(elem))\n );\n // inserir as sugestões\n pesquisados.innerHTML = \"\";\n pesquisados.style.display = \"none\";\n for (const carreira of ixn_carreiras) {\n let link = document.createElement(\"a\");\n link.href = \"javascript:void(0)\";\n link.innerText = \"Adicionar carreira \" + carreira[\"cod_carreira\"] + \": \"\n + carreira[\"nome_carreira\"];\n link.setAttribute(\"carreira\", carreira[\"cod_carreira\"])\n link.setAttribute(\"onclick\", \"sug_car(this)\");\n let br = document.createElement(\"br\");\n pesquisados.appendChild(link);\n pesquisados.appendChild(br);\n pesquisados.style.display = \"inline-block\";\n }\n for (const curso of ixn_cursos) {\n let link = document.createElement(\"a\");\n link.href = \"javascript:void(0)\";\n link.innerText = \"Adicionar curso \" + curso[\"cod_carreira\"] + \"-\"\n + curso[\"cod_curso\"] + \": \" + curso[\"nome_curso\"];\n link.setAttribute(\"carreira\", curso[\"cod_carreira\"])\n link.setAttribute(\"curso\", curso[\"cod_curso\"])\n link.setAttribute(\"onclick\", \"sug_cur(this)\");\n let br = document.createElement(\"br\");\n pesquisados.appendChild(link);\n pesquisados.appendChild(br);\n pesquisados.style.display = \"inline-block\";\n }\n}", "title": "" }, { "docid": "b0eb9d5d0524d31ce9c433fdd499ccbe", "score": "0.5446776", "text": "function valeurDescriptionVille() {\r\n 'use strict';\r\n return valeursCourantes.description;\r\n}", "title": "" }, { "docid": "d9e1cd6b8b5bfd7e438a342bf8d339a4", "score": "0.5439272", "text": "function Tenodera() {\n this.genusName = null;\n}", "title": "" }, { "docid": "ca002e2a927fb65a8d04cb0d77b63961", "score": "0.54340124", "text": "function determinado(){//devuelve las variables a su estado original (posibilita un rerun sin actualizar pagina)\n medidas ={lineas:0,nivel:1,score:0};\n tiempos={transcurrido:0,ultimaToma:0,active:700,leveled:700,fast:100};\n estado = [\"inicio\"];\n copy_board = [];\n score_copy = 0;\n lost_game = false;\n juego_rapido = false;\n update_board_flag = true;\n game_lives = 3;\n fast_game_counter = -1;\n fast_game_counter_flag = false;\n }", "title": "" }, { "docid": "a8cd769feda24f6c60cda5b2d97536c5", "score": "0.54334724", "text": "function intercambiar(defecto) {\n var pos1=preguntas.indexOf(defecto)\n var selectValue =d3.select('#desplegable'+pos1).property('value');\n var pos2=preguntas.indexOf(selectValue);\n preguntas[pos1]=selectValue;\n preguntas[pos2]=defecto;\n var anotFiltradas = _.filter(anotaciones, (anotacion) => (filtradoTags(anotacion.tags)));\n var links=obtenerLinks(preguntas,anotFiltradas);\n var grafoNuevo = {nodes: _.clone(graphCopy.nodes), links: _.concat(links,_.clone(linksRestoExamenes))};\n dibujarGraficoSankey(grafoNuevo,preguntas,examenes);\n }", "title": "" }, { "docid": "734dea6a6c06cc4d3bef5fcbaa7aa3b8", "score": "0.5430729", "text": "constructor(marca, modelo, pulgadas) {\n this.marca = marca;\n this.modelo = modelo;\n this.pulgadas = pulgadas;\n }", "title": "" }, { "docid": "5606db261a2115d6fd0af21eecb087f2", "score": "0.54289216", "text": "escaleras(escalera){\n if(!this._muerto && !this._sube && this._gameObject.x < escalera.x + escalera.width*3/5 && this._gameObject.x > escalera.x + escalera.width*2/5){\n this._persigue = Math.floor(Math.random()*2);\n this._sube = true;\n if (this._persigue >= 1){\n this._atraviesa = true;\n if(!this._subiendo){\n this._subiendo = true;\n if(this._gameObject.y < escalera.y + escalera.height/2){\n this._gameObject.body.velocity.y = this._velMin;\n this._yObjetivo = this._gameObject.y + escalera.height*escalera.scale.y;\n }\n else{\n this._gameObject.body.velocity.y = -this._velMin;\n this._yObjetivo = this._gameObject.y - escalera.height*escalera.scale.y;\n } \n }\n }\n }\n }", "title": "" }, { "docid": "4fca51d8038ec7eed926b3b68b244d7a", "score": "0.5425393", "text": "function Peca(cor)//caracteristicas da peca cor e se 'e rainha\r\n{\r\n\tthis.cor = cor;\r\n\tthis.rainha = false;\r\n}", "title": "" }, { "docid": "b4ef57221b87bc45256c30502df2112c", "score": "0.5424857", "text": "function pasaSiguiente(){\n var cierto=false;\n //var hsa=35;\n posES.dia++\n\t\tif(posES.dia>5){posES.dia=1;posES.hora++;}\n\t\tif(posES.hora>nHorasES){\n\t\t\tcierto=true;\n\t\t\tposES.dia=1;posES.hora=1;\n\t\t\tposES.cont++;\n\t\t\tnVueltas++\n\t\t\tvar s=nHorasEScheck()\n\t\t\thorasSinAsignar=totalHoras-s\n\t\t\t\n\t\t\thorasAsignadasVuelta= horasSinAsignarPrevia-horasSinAsignar\n\t\t\thorasSinAsignarPrevia=horasSinAsignar;\n\t\t\tif(posES.cont>=posES.ES.length){posES.cont=0}\n\t\t\t//$('#info').html('<h2>VUELTA: '+nVueltas+'; SinAsignar:'+horasSinAsignar+'; AsignadasEnUltimaVuelta:'+horasAsignadasVuelta+'</h2>')\n\t\t\tif(horasAsignadasVuelta==0){ asignaAlAzar=true; }else{ asignaAlAzar=false; }\n\t\t\tif(horasSinAsignar<=0){\n\t\t\t\t //llenaTabla()\n\t\t\t\t\t//llenaUsuarios()\n\t\t\t\t\t//ordenaSegunViajes()\n\t\t\t\t\t//todoBlanco()\n\t\t\t\t completo=true;\n\t\t }\n\t\t}\n\t\t\n return {ultimaDeLaSemana:cierto}\n}", "title": "" }, { "docid": "aa8a3eacebb5a730ab76054a17cc9d96", "score": "0.542219", "text": "respuestaTitulos(e){\n //console.log(e.detail.__data.response.items);\n this.datapeliculas = e.detail.__data.response.items;\n\n \n }", "title": "" }, { "docid": "fc9f2276c60f3ad4fadb189165af3967", "score": "0.54175234", "text": "constructor() {\n this.dia = 25;\n this.cfill = 'darkOrange';\n this.genes = [15, 30, 200];\n this.bigEnergy = 0;\n this.reset();\n }", "title": "" }, { "docid": "c60ae077d45e5574c5b7e50dfc593432", "score": "0.5415374", "text": "function vistaPrevia() {\n // escondo elementos - funcion en main.js\n mostEsconComponet(document.getElementById('frame'), esconder);\n mostEsconComponet(document.getElementById('bars'), esconder);\n mostEsconComponet(document.getElementById('foot-subir'), esconder);\n // muestro elementos\n mostEsconComponet(document.getElementById('video-frame'), mostrar);\n mostEsconComponet(document.getElementById('firstTitle'), mostrar);\n\n return;\n}", "title": "" }, { "docid": "7ea3bad6dbc72d61a4631863f601dd45", "score": "0.54059315", "text": "setEncimaDe(ident){\n this.encimaDe = ident;\n }", "title": "" }, { "docid": "12418479634131eb01d07a2c1939b1e6", "score": "0.5401669", "text": "function Vendedor(nombre) {\n this.nombre = nombre;\n this.sala = null;// Esta va a ser la de Subasta\n}", "title": "" }, { "docid": "f8bbb5196b5f2bcae49b6270a54511f2", "score": "0.5398949", "text": "gerenciaIniciaJogo() {\n this.pontuacao = 0;\n this.tempo = 10;\n this.index_inimigo = 0;\n this.gerenciaLevel = 0\n this.vidaPersonagem = 1;\n this.fimJogo = false;\n this.music.resume()\n }", "title": "" }, { "docid": "76281fce0479f463080b1c29bed5f636", "score": "0.53971034", "text": "function chefe(){\n var vetor = []\n entrada(vetor)\n soma10(vetor)\n console.log(vetor)\n}", "title": "" }, { "docid": "5ff27e629f8702bb829e33259dabebd2", "score": "0.5394099", "text": "static get RESERVE_PIECES() {\n return [V.PAWN, V.ROOK, V.KNIGHT, V.BISHOP, V.QUEEN];\n }", "title": "" }, { "docid": "a55d76b73bcc8489ac0f516e471a496f", "score": "0.5373732", "text": "addAlternative() {\n let alternative = [];\n this.consequences.forEach((currentValue) => {\n alternative.push({\n [currentValue.field]: ''\n });\n });\n this.alternatives.push(alternative);\n }", "title": "" }, { "docid": "bceb11f02382bbecd4034075874b3c3b", "score": "0.53665733", "text": "function pesquisarDespesas() {\r\n // pegando apenas o value dos input\r\n let ano = document.getElementById(\"ano\").value\r\n let mes = document.getElementById(\"mes\").value\r\n let dia = document.getElementById(\"dia\").value\r\n let tipo = document.getElementById(\"tipo\").value\r\n let descricao = document.getElementById(\"descricao\").value\r\n let valor = document.getElementById(\"valor\").value\r\n\r\n // instancia do objeto despesa para filtrar despesas (variaveis no parametro pois o retorno é só o value)\r\n let despesa = new Despesa(ano,mes,dia,tipo,descricao,valor)\r\n\r\n //chamar o metodo de pesquisa com variavel despesa no parametro\r\n let despesas = bd.pesquisar(despesa)\r\n\r\n carregarListaDespesas(despesas, true)\r\n\r\n}", "title": "" }, { "docid": "31e3a0471f255b94faaf410e88ff3a8d", "score": "0.53639233", "text": "constructor(valor, tipoCadastro, descricao) {\n this.valor = valor\n this.tipoCadastro = tipoCadastro\n this.descricao = descricao\n }", "title": "" }, { "docid": "ca85dffb53758ce244d237478d43bc68", "score": "0.53621334", "text": "constructor(combo,cantidad,tamano,masa,ingredientes,bebida, postre){\n // COnstructor de la clase base ó Principal ó de la que hereda(extends)\nsuper(tamano,masa,ingredientes);\nthis.combo = combo;\nthis.cantidad= cantidad;\nthis.bebida= bebida;\nthis.postre=postre;\n}", "title": "" }, { "docid": "a7b8a9c7241875ce47606e1fbd9b10a1", "score": "0.53581905", "text": "function crear_barcos (cual) {\n\tfor (var i = 0; i < cual.length; i++) {\n\t\tvar c = cual[i];\n\t\t\ttablero[c].a=cual,\n\t\t\ttablero[c].estado='barco';\n\t};\n\tconsole.log('Barco en: '+cual)\n}", "title": "" }, { "docid": "f511116908dbf69a9e4714e6265f4bc3", "score": "0.535497", "text": "function Hombre (ptosVida,ataque,defensa,heridas) {\n\tHombre.prototype.inicializar.call(this, ptosVida,ataque,defensa,heridas);\n}", "title": "" }, { "docid": "9be585c7bd1fd76f21e3edcf91ab24ac", "score": "0.5352955", "text": "function cambiarnombre(nuevonombre){\n cambia=nuevonombre\n}", "title": "" }, { "docid": "5dd7baa32ba5f2725822621ca9b10651", "score": "0.534453", "text": "function Objetivo()\n {\n\n this.Code;//: \"1\"\n this.Id;//: 1\n this.Nun_Actividades;//: 2\n this.Objetivo_Name; //: \"PASSTTSUP21001\"\n this.Actividades = [ ]; //: (2) [{…}, {…}]\n this.SubObjetivos = [ ];//: (5) [{…}, {…}, {…}, {…}, {…}]\n\n}", "title": "" }, { "docid": "1f044fd4d632091e37032e33eb47c418", "score": "0.5343928", "text": "constructor(titulo, autor, email, keywords, resumen, fecha, editorial, citas) {\n this.titulo = titulo;\n this.autor = autor;\n this.email = email;\n this.claves = keywords;\n this.resumen = resumen;\n this.fecha = fecha;\n this.editorial = editorial;\n this.citas = citas;\n }", "title": "" }, { "docid": "d4ae8c5c178f63e88c3f7503b1780bda", "score": "0.53431743", "text": "function generaSurtido () {\n\treturn [\"Chupachups\", \"Picota\", \"Caramelo Solan\", \"Sugus\", \"Sandía\", \"Mora\", \"Nubes\"];\n}", "title": "" }, { "docid": "6d1b89711c7179aeb0c69dbc050081a6", "score": "0.5342736", "text": "getAltura(){\n return this.altura;\n }", "title": "" }, { "docid": "39e814c9fe429bed010fce83aff39180", "score": "0.5338688", "text": "function fazGrafico(opcao){\n\n\t//ajusta elementos do painel, perifericos ao grafico\n\tajustaPainel(opcao);\n\n\t//origina o grafico\n\toriginaGrafico(opcao);\n\n}", "title": "" }, { "docid": "7f7d2c1398d0fd7f007e24661da63294", "score": "0.5335477", "text": "function darVida(cantHabitantes){\n for (let index = 0; index < cantHabitantes; index++) {\n poblacion.unshift(35);\n }\n\n}", "title": "" }, { "docid": "a613e5386490207f668a2557f6f7deeb", "score": "0.53245455", "text": "function Lavadero() {\n this.aTrabajadores = [];\n this.aClientes = [];\n this.aSocios = [];\n this.aLavados = [];\n this.aExtras = [];\n}", "title": "" }, { "docid": "5744b3e227cad3d18353c927b4a2576e", "score": "0.53223336", "text": "function asignarInicial() {\r\n var vector = new Array(2);\r\n var luz = new Array(2);\r\n vector = buscarFant();\r\n luz = buscarLuz();\r\n xInicial = vector[0];\r\n yInicial = vector[1];\r\n xBom = luz[0];\r\n yBom = luz[1];\r\n}", "title": "" }, { "docid": "84814315e3ab2e26ba6610e4615c2c4a", "score": "0.5321614", "text": "function DefaultValues()\n{\n strCodFis=\"\";\n strcognome=\"\";\n strnome=\"\";\n strgiornosex=\"\";\n chrcontrollo='';\n\n Cognome = \"\";\n Nome = \"\";\n Sesso = 0;\n Comune = \"\";\n CodiceFiscale = \"\";\n AnnoCento = 19;\n AnnoDieci = \"0\";\n AnnoZero = \"0\";\n Mese = \"A\";\n Giorno = 1;\n \nreturn;\n}", "title": "" }, { "docid": "d8545a8ae72f101f86d9349d45ca19b2", "score": "0.53210187", "text": "data() {\n return {\n supervisionId: null,\n supervisorName: \"\",\n supervisorSurname: \"\",\n special_preparation: \"\",\n age: 0,\n trained_leader: null,\n address: \"\",\n email: \"\",\n phone: \"\",\n presentation_description: \"\",\n form_type: \"\",\n\n Ansigt_till: false,\n Live_Video: false,\n Gruppesupervision: false,\n Enkeltsupervision: false,\n Egenterapi_Personligt: false,\n\n primary_education: \"\",\n secondary_education: \"\",\n third_education: \"\",\n\n addressName: \"\",\n roadName: \"\",\n postNumber: \"\",\n\n Eksistentiel_humanistisk: false,\n Kognitiv_adfærdsterapeutisk: false,\n Psykodynamisk_psykoanalytisk: false,\n Systemisk_strukturel: false,\n\n supervisor_specialisation: []\n };\n }", "title": "" }, { "docid": "e44077b90cdfb32cf77c51d14c407652", "score": "0.53192186", "text": "function cargarFondo()\r\n{\r\n fondo.cargaEst = true;\r\n dibujar();\r\n}", "title": "" }, { "docid": "383767f3dc11bc294670b70fed452bf4", "score": "0.53161174", "text": "function deneme(){\n var sonuc = \"ayakkabi\"; // local olarak yani sadece fonksiyon yapisi icin sonuc degiskeninin degerini ayakkabi olarak tanimladim.\n return sonuc; // sonuc degiskenini disari aktariyorum.\n}", "title": "" }, { "docid": "f5e9767e695ab102c4f303922586b0a8", "score": "0.53128374", "text": "function preparePlateau() {\n var tailleFenetre = Math.min(window.innerWidth, window.innerHeight) - 2 * margeGenerale;\n var svg = document.querySelector(\"svg\");\n svg.setAttribute(\"width\", tailleFenetre);\n svg.setAttribute(\"height\", tailleFenetre);\n\n // crée un nouveau jeu\n partie = new Gomoku();\n partie.fin = finDeJeu; //extension du comportement de fin\n partie.annuleFin = annuleFinDeJeu; //extension du comportement de quitter le dernier coup\n partie.changePierre = changePierre; //remplacement du comportement du changement de pierre\n partie.recommence = effaceSVG; //extension du comportement de recommencement de partie\n\n displayPlateau();\n}", "title": "" }, { "docid": "6796f4f96561dd92c4dd781858135ba5", "score": "0.5312817", "text": "constructor(){\n super();\n this._tremors = new Tremors();\n this._posturalChanges = new PosturalChanges();\n this._assistiveDevice = new AssistiveDevice();\n this._balanceLoss = false;\n this._difficultConcentrate = false;\n this._deepBrainStim = false;\n this._dizzyUnsteady = false;\n this._difficultPosition = false;\n this._visionImpairment = false;\n this._slowMovement = false;\n this._fatigue = false;\n this._depression = false;\n this._armSwing = false;\n this._neurologist = \"\";\n this._firstSymptomsDate = \"2018-06-15\";\n this._diagnosisDate = \"2018-06-15\";\n this.dyskinesia = false;\n this.dystonia = false;\n this.hypophonia = false;\n this.bradykinesia = false;\n this._difficultRising = false;\n this._festination = false;\n }", "title": "" }, { "docid": "3410a6cf9ba49ec70180f7b9fd25d006", "score": "0.53067374", "text": "rellenarbombo() {\n for (let i = 1; i < 91; i++) {\n this.restantes.push(i);\n }\n }", "title": "" }, { "docid": "b52fc55cfb3c64d4f26687c433f7e68f", "score": "0.5301797", "text": "quienSoy() {\n console.log(`Soy ${this.nombre}, y mi identidad es ${this.codigo}`);\n }", "title": "" } ]
9546acfda1674f760e5379e1b31d18f2
Encode a string as utf8
[ { "docid": "ae1646918be28a8f6285d8b394aab4b7", "score": "0.703789", "text": "function str2rstr_utf8 (input) {\n return unescape(encodeURIComponent(input))\n }", "title": "" } ]
[ { "docid": "24f8c0f6cdf92fd17ae304af1f2cb419", "score": "0.8202771", "text": "function encode_utf8(s) {\n return encode_latin1(unescape(encodeURIComponent(s)));\n }", "title": "" }, { "docid": "24f8c0f6cdf92fd17ae304af1f2cb419", "score": "0.8202771", "text": "function encode_utf8(s) {\n return encode_latin1(unescape(encodeURIComponent(s)));\n }", "title": "" }, { "docid": "24f8c0f6cdf92fd17ae304af1f2cb419", "score": "0.8202771", "text": "function encode_utf8(s) {\n return encode_latin1(unescape(encodeURIComponent(s)));\n }", "title": "" }, { "docid": "3d108d15b24a5e72281a459df65ac13a", "score": "0.8117282", "text": "function encode_utf8(s) {\n\t\t\treturn encode_latin1(unescape(encodeURIComponent(s)));\n\t\t }", "title": "" }, { "docid": "536bf639f679c5b026bd9d08ebfc5222", "score": "0.81172764", "text": "function encode_utf8(s) {\n return encode_latin1(unescape(encodeURIComponent(s)));\n }", "title": "" }, { "docid": "536bf639f679c5b026bd9d08ebfc5222", "score": "0.81172764", "text": "function encode_utf8(s) {\n return encode_latin1(unescape(encodeURIComponent(s)));\n }", "title": "" }, { "docid": "abd8f29cb34061d2d8808e054525e08f", "score": "0.81145626", "text": "function encode_utf8(s) {\n\t\treturn encode_latin1(unescape(encodeURIComponent(s)));\n\t }", "title": "" }, { "docid": "ca4f223bcafc94389f9a2538782e9663", "score": "0.8095961", "text": "function encode_utf8(s) {\n\treturn encode_latin1(unescape(encodeURIComponent(s)));\n }", "title": "" }, { "docid": "ca4f223bcafc94389f9a2538782e9663", "score": "0.8095961", "text": "function encode_utf8(s) {\n\treturn encode_latin1(unescape(encodeURIComponent(s)));\n }", "title": "" }, { "docid": "ca4f223bcafc94389f9a2538782e9663", "score": "0.8095961", "text": "function encode_utf8(s) {\n\treturn encode_latin1(unescape(encodeURIComponent(s)));\n }", "title": "" }, { "docid": "ca4f223bcafc94389f9a2538782e9663", "score": "0.8095961", "text": "function encode_utf8(s) {\n\treturn encode_latin1(unescape(encodeURIComponent(s)));\n }", "title": "" }, { "docid": "f351ff03e0b90dcbfefee2b874de1d95", "score": "0.80581933", "text": "function encodeUtf8(s) {\n var utf8Str = unescape(encodeURIComponent(s))\n return utf8ToBytes(utf8Str);\n}", "title": "" }, { "docid": "28419623fe74fa8a763a52e3933c758d", "score": "0.80193216", "text": "function encode_utf8(s) {\n return unescape(encodeURIComponent(s));\n }", "title": "" }, { "docid": "7e99bd26caa2e62a50731f824c48b69f", "score": "0.79741836", "text": "function encodeTextWithUtf8(s) {\n return unescape(encodeURIComponent(s));\n }", "title": "" }, { "docid": "5bd281bc99727128226ea8e2dec32467", "score": "0.7952144", "text": "function encode_utf8( s )\n{\n\treturn unescape( encodeURIComponent( s ) );\n}", "title": "" }, { "docid": "023979d8009e2a7736469c2313e39a2d", "score": "0.7871725", "text": "function utf8Encode(string) {\r\n\t\tstring = string.replace(/\\r\\n/g, \"\\n\");\r\n\t\tvar utftext = \"\";\r\n\t\tfor (var n = 0; n < string.length; n++) {\r\n\t\t\tvar c = string.charCodeAt(n);\r\n\t\t\tif (c < 128) {\r\n\t\t\t\tutftext += String.fromCharCode(c);\r\n\t\t\t} else if ((c > 127) && (c < 2048)) {\r\n\t\t\t\tutftext += String.fromCharCode((c >> 6) | 192);\r\n\t\t\t\tutftext += String.fromCharCode((c & 63) | 128);\r\n\t\t\t} else {\r\n\t\t\t\tutftext += String.fromCharCode((c >> 12) | 224);\r\n\t\t\t\tutftext += String.fromCharCode(((c >> 6) & 63) | 128);\r\n\t\t\t\tutftext += String.fromCharCode((c & 63) | 128);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn utftext;\r\n\t}", "title": "" }, { "docid": "7468bf6723f7ca8e14e08cef31285199", "score": "0.78448766", "text": "function utf8Encode(string) {\r\n\t\tstring = string.replace(/\\r\\n/g, \"\\n\");\r\n\t\tvar utftext = \"\";\r\n\t\tfor (var n = 0; n < string.length; n++) {\r\n\t\t\tvar c = string.charCodeAt(n);\r\n\t\t\tif (c < 128) {\r\n\t\t\t\tutftext += String.fromCharCode(c);\r\n\t\t\t} else {\r\n\t\t\t\tif ((c > 127) && (c < 2048)) {\r\n\t\t\t\t\tutftext += String.fromCharCode((c >> 6) | 192);\r\n\t\t\t\t\tutftext += String.fromCharCode((c & 63) | 128);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tutftext += String.fromCharCode((c >> 12) | 224);\r\n\t\t\t\t\tutftext += String.fromCharCode(((c >> 6) & 63) | 128);\r\n\t\t\t\t\tutftext += String.fromCharCode((c & 63) | 128);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn utftext;\r\n\t}", "title": "" }, { "docid": "bbed62cadb15235b5e298891403300b7", "score": "0.78216857", "text": "function _utf8_encode (string) {\n\t var str = string;\n\t\t//string = str.replace(/\\r\\n/g,\"\\n\");\n var utftext = \"\";\n\n for (var n = 0; n < string.length; n++) {\n\n var c = string.charCodeAt(n);\n\n if (c < 128) {\n utftext += String.fromCharCode(c);\n }\n else if((c > 127) && (c < 2048)) {\n utftext += String.fromCharCode((c >> 6) | 192);\n utftext += String.fromCharCode((c & 63) | 128);\n }\n else {\n utftext += String.fromCharCode((c >> 12) | 224);\n utftext += String.fromCharCode(((c >> 6) & 63) | 128);\n utftext += String.fromCharCode((c & 63) | 128);\n }\n\n }\n\n return utftext;\n }", "title": "" }, { "docid": "17ea938763e435d52c2a09d216fcfca3", "score": "0.7814228", "text": "function utf8Encode(string) {\n string = string.replace(/\\r\\n/g, '\\n');\n var utftext = '';\n for (var n = 0; n < string.length; n++) {\n var c = string.charCodeAt(n);\n if (c < 128) {\n utftext += String.fromCharCode(c);\n } else if ((c > 127) && (c < 2048)) {\n utftext += String.fromCharCode((c >> 6) | 192);\n utftext += String.fromCharCode((c & 63) | 128);\n } else {\n utftext += String.fromCharCode((c >> 12) | 224);\n utftext += String.fromCharCode(((c >> 6) & 63) | 128);\n utftext += String.fromCharCode((c & 63) | 128);\n }\n\n }\n return utftext;\n }", "title": "" }, { "docid": "17ea938763e435d52c2a09d216fcfca3", "score": "0.7814228", "text": "function utf8Encode(string) {\n string = string.replace(/\\r\\n/g, '\\n');\n var utftext = '';\n for (var n = 0; n < string.length; n++) {\n var c = string.charCodeAt(n);\n if (c < 128) {\n utftext += String.fromCharCode(c);\n } else if ((c > 127) && (c < 2048)) {\n utftext += String.fromCharCode((c >> 6) | 192);\n utftext += String.fromCharCode((c & 63) | 128);\n } else {\n utftext += String.fromCharCode((c >> 12) | 224);\n utftext += String.fromCharCode(((c >> 6) & 63) | 128);\n utftext += String.fromCharCode((c & 63) | 128);\n }\n\n }\n return utftext;\n }", "title": "" }, { "docid": "17ea938763e435d52c2a09d216fcfca3", "score": "0.7814228", "text": "function utf8Encode(string) {\n string = string.replace(/\\r\\n/g, '\\n');\n var utftext = '';\n for (var n = 0; n < string.length; n++) {\n var c = string.charCodeAt(n);\n if (c < 128) {\n utftext += String.fromCharCode(c);\n } else if ((c > 127) && (c < 2048)) {\n utftext += String.fromCharCode((c >> 6) | 192);\n utftext += String.fromCharCode((c & 63) | 128);\n } else {\n utftext += String.fromCharCode((c >> 12) | 224);\n utftext += String.fromCharCode(((c >> 6) & 63) | 128);\n utftext += String.fromCharCode((c & 63) | 128);\n }\n\n }\n return utftext;\n }", "title": "" }, { "docid": "17ea938763e435d52c2a09d216fcfca3", "score": "0.7814228", "text": "function utf8Encode(string) {\n string = string.replace(/\\r\\n/g, '\\n');\n var utftext = '';\n for (var n = 0; n < string.length; n++) {\n var c = string.charCodeAt(n);\n if (c < 128) {\n utftext += String.fromCharCode(c);\n } else if ((c > 127) && (c < 2048)) {\n utftext += String.fromCharCode((c >> 6) | 192);\n utftext += String.fromCharCode((c & 63) | 128);\n } else {\n utftext += String.fromCharCode((c >> 12) | 224);\n utftext += String.fromCharCode(((c >> 6) & 63) | 128);\n utftext += String.fromCharCode((c & 63) | 128);\n }\n\n }\n return utftext;\n }", "title": "" }, { "docid": "7c0d605bde6ca61f17139a6d7bbebd93", "score": "0.78119236", "text": "function utf8Encode(string) {\n string = string.replace(/\\r\\n/g, \"\\n\");\n var utftext = \"\";\n for (var n = 0; n < string.length; n++) {\n var c = string.charCodeAt(n);\n if (c < 128) {\n utftext += String.fromCharCode(c);\n }\n else if ((c > 127) && (c < 2048)) {\n utftext += String.fromCharCode((c >> 6) | 192);\n utftext += String.fromCharCode((c & 63) | 128);\n }\n else {\n utftext += String.fromCharCode((c >> 12) | 224);\n utftext += String.fromCharCode(((c >> 6) & 63) | 128);\n utftext += String.fromCharCode((c & 63) | 128);\n }\n }\n return utftext;\n }", "title": "" }, { "docid": "7c0d605bde6ca61f17139a6d7bbebd93", "score": "0.78119236", "text": "function utf8Encode(string) {\n string = string.replace(/\\r\\n/g, \"\\n\");\n var utftext = \"\";\n for (var n = 0; n < string.length; n++) {\n var c = string.charCodeAt(n);\n if (c < 128) {\n utftext += String.fromCharCode(c);\n }\n else if ((c > 127) && (c < 2048)) {\n utftext += String.fromCharCode((c >> 6) | 192);\n utftext += String.fromCharCode((c & 63) | 128);\n }\n else {\n utftext += String.fromCharCode((c >> 12) | 224);\n utftext += String.fromCharCode(((c >> 6) & 63) | 128);\n utftext += String.fromCharCode((c & 63) | 128);\n }\n }\n return utftext;\n }", "title": "" }, { "docid": "5f101db725415d4c9690281216796589", "score": "0.77939355", "text": "function utf8Encode(string) {\n string = string.replace(/\\r\\n/g,\"\\n\");\n var utftext = \"\";\n for (var n = 0; n < string.length; n++) {\n var c = string.charCodeAt(n);\n if (c < 128) {\n utftext += String.fromCharCode(c);\n }\n else if((c > 127) && (c < 2048)) {\n utftext += String.fromCharCode((c >> 6) | 192);\n utftext += String.fromCharCode((c & 63) | 128);\n }\n else {\n utftext += String.fromCharCode((c >> 12) | 224);\n utftext += String.fromCharCode(((c >> 6) & 63) | 128);\n utftext += String.fromCharCode((c & 63) | 128);\n }\n }\n return utftext;\n }", "title": "" }, { "docid": "16051d38a5fdc9a727b5919aed73c6f6", "score": "0.7756025", "text": "function utf8encode(string) {\n string = string.replace(/\\r\\n/g,\"\\n\");\n var utftext = \"\";\n\n for (var n = 0; n < string.length; n++) {\n\n var c = string.charCodeAt(n);\n\n if (c < 128) {\n utftext += String.fromCharCode(c);\n }\n else if((c > 127) && (c < 2048)) {\n utftext += String.fromCharCode((c >> 6) | 192);\n utftext += String.fromCharCode((c & 63) | 128);\n }\n else {\n utftext += String.fromCharCode((c >> 12) | 224);\n utftext += String.fromCharCode(((c >> 6) & 63) | 128);\n utftext += String.fromCharCode((c & 63) | 128);\n }\n\n }\n\n return utftext;\n}", "title": "" }, { "docid": "65562fdee5e283f274fa2674b89ab4dc", "score": "0.7668142", "text": "function _utf8Encode(str)\n{\t\n\tvar utf8str = new Array();\n\tfor (var i=0; i<str.length; i++) {\n\t\tutf8str[i] = code2utf(str.charCodeAt(i));\n\t}\n\treturn utf8str.join('');\n}", "title": "" }, { "docid": "a52b5caf11325f4c458ec0305174337a", "score": "0.76627445", "text": "function _utf8_encode (string) { \n\t\t\tstring = string.replace(/\\r\\n/g,\"\\n\"); \n\t\t\tvar utftext = \"\"; \n\t\t\tfor (var n = 0; n < string.length; n++) { \n\t\t\t\tvar c = string.charCodeAt(n); \n\t\t\t\tif (c < 128) { \n\t\t\t\t\tutftext += String.fromCharCode(c); \n\t\t\t\t} else if((c > 127) && (c < 2048)) { \n\t\t\t\t\tutftext += String.fromCharCode((c >> 6) | 192); \n\t\t\t\t\tutftext += String.fromCharCode((c & 63) | 128); \n\t\t\t\t} else { \n\t\t\t\t\tutftext += String.fromCharCode((c >> 12) | 224); \n\t\t\t\t\tutftext += String.fromCharCode(((c >> 6) & 63) | 128); \n\t\t\t\t\tutftext += String.fromCharCode((c & 63) | 128); \n\t\t\t\t} \n\t \n\t\t\t} \n\t\t\treturn utftext; \n\t\t}", "title": "" }, { "docid": "36efa975eb386374d6b801d75b2b4049", "score": "0.7649587", "text": "function utf8Encode(string) {\r\n string = string.replace(/\\r\\n/g, \"\\n\");\r\n let utftext = \"\";\r\n for (let n = 0; n < string.length; n++) {\r\n let c = string.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}", "title": "" }, { "docid": "2ae1c3f944b93d5a51eb35ecae8116da", "score": "0.76447684", "text": "function _utf8_encode(string) {\r\n\t\tstring = string.replace(/\\r\\n/g,\"\\n\");\r\n\t\tvar utftext = \"\";\r\n\r\n\t\tfor (var n = 0; n < string.length; n++) {\r\n\r\n\t\t\tvar c = string.charCodeAt(n);\r\n\r\n\t\t\tif (c < 128) {\r\n\t\t\t\tutftext += String.fromCharCode(c);\r\n\t\t\t}\r\n\t\t\telse if((c > 127) && (c < 2048)) {\r\n\t\t\t\tutftext += String.fromCharCode((c >> 6) | 192);\r\n\t\t\t\tutftext += String.fromCharCode((c & 63) | 128);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tutftext += String.fromCharCode((c >> 12) | 224);\r\n\t\t\t\tutftext += String.fromCharCode(((c >> 6) & 63) | 128);\r\n\t\t\t\tutftext += String.fromCharCode((c & 63) | 128);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn utftext;\r\n\t}", "title": "" }, { "docid": "a0ed4192d6e461d6cf0c6d9ac7d835cc", "score": "0.75744313", "text": "function toUTF8(string){\n return orientServer.UTF8Encode(string);\n}", "title": "" }, { "docid": "f316f0fe39d0eaca16fd036e90bc3975", "score": "0.75588787", "text": "function encode(string){\n return toUTF8(addSlashes($.trim(string)));\n}", "title": "" }, { "docid": "0446923a971b72e0b48053acf9fec8b2", "score": "0.75419766", "text": "function encode_utf8(s) {\n var a=\"\";\n for (var n=0; n< s.length; n++) {\n var c=s.charCodeAt(n);\n if (c<128) {\n\ta += String.fromCharCode(c);\n }\n else if ((c>127)&&(c<2048)) {\n\ta += String.fromCharCode( (c>>6) | 192) ;\n\ta += String.fromCharCode( (c&63) | 128);\n }\n else {\n a += String.fromCharCode( (c>>12) | 224);\n a += String.fromCharCode( ((c>>6) & 63) | 128);\n a += String.fromCharCode( (c&63) | 128);\n }\n }\n return a;\n}", "title": "" }, { "docid": "dbb4e56ec89fc8f1d20eb4ac14c71820", "score": "0.7539825", "text": "function to_utf8(s) {\n return unescape(encodeURIComponent(s));\n}", "title": "" }, { "docid": "852f34c46ca4d5f52dd358b54d736e30", "score": "0.7284118", "text": "function encodeUTF8(input){var output=\"\";for(var i=0;i<input.length;i++){var c=input.charCodeAt(i);if(c<128){// One byte\noutput+=fromCharCode(c)}else if(c<2048){// Two bytes\noutput+=fromCharCode(192|c>>>6);output+=fromCharCode(128|c&63)}else if(c<65536){// Three bytes\noutput+=fromCharCode(224|c>>>12);output+=fromCharCode(128|c>>>6&63);output+=fromCharCode(128|c&63)}}return output}", "title": "" }, { "docid": "d10ee325f30f1ccff8c3312bf58c8c47", "score": "0.71078265", "text": "function utf8_encode (argString) {\n // http://kevin.vanzonneveld.net\n // + original by: Webtoolkit.info (http://www.webtoolkit.info/)\n // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n // + improved by: sowberry\n // + tweaked by: Jack\n // + bugfixed by: Onno Marsman\n // + improved by: Yves Sucaet\n // + bugfixed by: Onno Marsman\n // + bugfixed by: Ulrich\n // + bugfixed by: Rafal Kukawski\n // + improved by: kirilloid\n // * example 1: utf8_encode('Kevin van Zonneveld');\n // * returns 1: 'Kevin van Zonneveld'\n\n if (argString === null || typeof argString === \"undefined\") {\n return \"\";\n }\n\n var string = (argString + ''); // .replace(/\\r\\n/g, \"\\n\").replace(/\\r/g, \"\\n\");\n var utftext = '',\n start, end, stringl = 0;\n\n start = end = 0;\n stringl = string.length;\n for (var n = 0; n < stringl; n++) {\n var c1 = string.charCodeAt(n);\n var enc = null;\n\n if (c1 < 128) {\n end++;\n } else if (c1 > 127 && c1 < 2048) {\n enc = String.fromCharCode((c1 >> 6) | 192, (c1 & 63) | 128);\n } else {\n enc = String.fromCharCode((c1 >> 12) | 224, ((c1 >> 6) & 63) | 128, (c1 & 63) | 128);\n }\n if (enc !== null) {\n if (end > start) {\n utftext += string.slice(start, end);\n }\n utftext += enc;\n start = end = n + 1;\n }\n }\n\n if (end > start) {\n utftext += string.slice(start, stringl);\n }\n\n return utftext;\n}", "title": "" }, { "docid": "24eb760067407dea099eb06e3cf41fc1", "score": "0.70928293", "text": "function encodeUTF8(input, textEncoder) {\n const utf8 = textEncoder || new TextEncoder();\n return utf8.encode(input);\n}", "title": "" }, { "docid": "aa5317b451de29ddb6ef853aac09ba07", "score": "0.7079744", "text": "function utf8_encode(argString) {\n // discuss at: http://phpjs.org/functions/utf8_encode/\n // original by: Webtoolkit.info (http://www.webtoolkit.info/)\n // improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n // improved by: sowberry\n // improved by: Jack\n // improved by: Yves Sucaet\n // improved by: kirilloid\n // bugfixed by: Onno Marsman\n // bugfixed by: Onno Marsman\n // bugfixed by: Ulrich\n // bugfixed by: Rafal Kukawski\n // bugfixed by: kirilloid\n // example 1: utf8_encode('Kevin van Zonneveld');\n // returns 1: 'Kevin van Zonneveld'\n\n if (argString === null || typeof argString === 'undefined') {\n return '';\n }\n\n var string = (argString + ''); // .replace(/\\r\\n/g, \"\\n\").replace(/\\r/g, \"\\n\");\n var utftext = '',\n start, end, stringl = 0;\n\n start = end = 0;\n stringl = string.length;\n for (var n = 0; n < stringl; n++) {\n var c1 = string.charCodeAt(n);\n var enc = null;\n\n if (c1 < 128) {\n end++;\n } else if (c1 > 127 && c1 < 2048) {\n enc = String.fromCharCode(\n (c1 >> 6) | 192, (c1 & 63) | 128\n );\n } else if ((c1 & 0xF800) != 0xD800) {\n enc = String.fromCharCode(\n (c1 >> 12) | 224, ((c1 >> 6) & 63) | 128, (c1 & 63) | 128\n );\n } else { // surrogate pairs\n if ((c1 & 0xFC00) != 0xD800) {\n throw new RangeError('Unmatched trail surrogate at ' + n);\n }\n var c2 = string.charCodeAt(++n);\n if ((c2 & 0xFC00) != 0xDC00) {\n throw new RangeError('Unmatched lead surrogate at ' + (n - 1));\n }\n c1 = ((c1 & 0x3FF) << 10) + (c2 & 0x3FF) + 0x10000;\n enc = String.fromCharCode(\n (c1 >> 18) | 240, ((c1 >> 12) & 63) | 128, ((c1 >> 6) & 63) | 128, (c1 & 63) | 128\n );\n }\n if (enc !== null) {\n if (end > start) {\n utftext += string.slice(start, end);\n }\n utftext += enc;\n start = end = n + 1;\n }\n }\n\n if (end > start) {\n utftext += string.slice(start, stringl);\n }\n\n return utftext;\n}", "title": "" }, { "docid": "c745cc24db2d3646edc06da1f44ac054", "score": "0.7030388", "text": "function str2rstr_utf8 (input) {\n\t return unescape(encodeURIComponent(input))\n\t }", "title": "" }, { "docid": "c745cc24db2d3646edc06da1f44ac054", "score": "0.7030388", "text": "function str2rstr_utf8 (input) {\n\t return unescape(encodeURIComponent(input))\n\t }", "title": "" }, { "docid": "94626974ad6a25e6390ef5734c495611", "score": "0.70012677", "text": "function encode_utf8(s) {\n \tvar i, necessary = false;\n\t\n\tfor (i = 0; i < s.length; i++) {\n\t if ((s.charCodeAt(i) == 0x9D) ||\n\t \t(s.charCodeAt(i) > 0xFF)) {\n\t \tnecessary = true;\n\t\tbreak;\n\t }\n\t}\n\tif (!necessary) {\n\t return s;\n\t}\n\treturn String.fromCharCode(0x9D) + unicode_to_utf8(s);\n }", "title": "" }, { "docid": "77124ba3ce515714168fa0d75ad488a9", "score": "0.6914676", "text": "function str2rstrUTF8 (input) {\r\n\t\treturn unescape(encodeURIComponent(input))\r\n\t}", "title": "" }, { "docid": "1407b4f0c73b841e6a5f4a08cac9eebf", "score": "0.69059956", "text": "function str2rstr_utf8(input) {\n\t return unescape(encodeURIComponent(input));\n\t }", "title": "" }, { "docid": "843a44a641df0f0ffc670a63631a5910", "score": "0.69057256", "text": "function str2rstrUTF8 (input) {\n return unescape(encodeURIComponent(input))\n }", "title": "" }, { "docid": "843a44a641df0f0ffc670a63631a5910", "score": "0.69057256", "text": "function str2rstrUTF8 (input) {\n return unescape(encodeURIComponent(input))\n }", "title": "" }, { "docid": "473510ba7fdea9164a2cae5215b3e135", "score": "0.6901972", "text": "function str2rstrUTF8 ( input ) {\n return unescape( encodeURIComponent( input ) )\n}", "title": "" }, { "docid": "1af41e7182359c3dea81d5c14f8fdab2", "score": "0.6894633", "text": "function str2rstr_utf8(input){return unescape(encodeURIComponent(input));}", "title": "" }, { "docid": "d47de135d2b02b038e7e93c434f74d36", "score": "0.6892822", "text": "function str2rstr_utf8(input) {\n\t return unescape(encodeURIComponent(input));\n\t }", "title": "" }, { "docid": "556e951fa7d73f5286f95245b4548069", "score": "0.6859121", "text": "function str2rstr_utf8(input) {\n return unescape(encodeURIComponent(input));\n }", "title": "" }, { "docid": "fa4dc175216bab6b87b06b6f90b5bad4", "score": "0.6856801", "text": "function str2rstr_utf8(input) {\n return unescape(encodeURIComponent(input));\n }", "title": "" }, { "docid": "fa4dc175216bab6b87b06b6f90b5bad4", "score": "0.6856801", "text": "function str2rstr_utf8(input) {\n return unescape(encodeURIComponent(input));\n }", "title": "" }, { "docid": "fa4dc175216bab6b87b06b6f90b5bad4", "score": "0.6856801", "text": "function str2rstr_utf8(input) {\n return unescape(encodeURIComponent(input));\n }", "title": "" }, { "docid": "fa4dc175216bab6b87b06b6f90b5bad4", "score": "0.6856801", "text": "function str2rstr_utf8(input) {\n return unescape(encodeURIComponent(input));\n }", "title": "" }, { "docid": "fa4dc175216bab6b87b06b6f90b5bad4", "score": "0.6856801", "text": "function str2rstr_utf8(input) {\n return unescape(encodeURIComponent(input));\n }", "title": "" }, { "docid": "fa4dc175216bab6b87b06b6f90b5bad4", "score": "0.6856801", "text": "function str2rstr_utf8(input) {\n return unescape(encodeURIComponent(input));\n }", "title": "" }, { "docid": "fa4dc175216bab6b87b06b6f90b5bad4", "score": "0.6856801", "text": "function str2rstr_utf8(input) {\n return unescape(encodeURIComponent(input));\n }", "title": "" }, { "docid": "fa4dc175216bab6b87b06b6f90b5bad4", "score": "0.6856801", "text": "function str2rstr_utf8(input) {\n return unescape(encodeURIComponent(input));\n }", "title": "" }, { "docid": "fa4dc175216bab6b87b06b6f90b5bad4", "score": "0.6856801", "text": "function str2rstr_utf8(input) {\n return unescape(encodeURIComponent(input));\n }", "title": "" }, { "docid": "e499d830df336e05f6e66546046affaa", "score": "0.68307275", "text": "function str2rstr_utf8(input) {\n return unescape(encodeURIComponent(input));\n }", "title": "" }, { "docid": "18c33c26c7bf80a05f9644bceb184c30", "score": "0.6820991", "text": "function str2rstrUTF8(input) {\n return unescape(encodeURIComponent(input));\n }", "title": "" }, { "docid": "23c27aa779654a79813c72b9461d9070", "score": "0.68011564", "text": "function b64EncodeUnicode(str) {\n return encode(str);\n}", "title": "" }, { "docid": "2ed3c123e0d727e0d30abce89a96eee7", "score": "0.67973745", "text": "function str2rstrUTF8(input) {\n return unescape(encodeURIComponent(input))\n }", "title": "" }, { "docid": "a3e0fa5e1e5d29bb5eb26adb80b6d55d", "score": "0.6752745", "text": "function str2rstrUTF8(input) {\n return unescape(encodeURIComponent(input));\n}", "title": "" }, { "docid": "341e8667d8083591e307d6a5c09ea315", "score": "0.67485994", "text": "function str2rstrUTF8(input) {\n return unescape(encodeURIComponent(input))\n}", "title": "" }, { "docid": "a579f411517b9498e832feb9065738ca", "score": "0.6669035", "text": "function Utf8EncodeWorker(){GenericWorker.call(this,\"utf-8 encode\")}", "title": "" }, { "docid": "bee025ce1229cb0f777908cd1af19090", "score": "0.6604359", "text": "function unicodeencode(c) { // @param String: char\r\n // @return String \"\\u0000\" ~ \"\\uffff\"\r\n c = c.charCodeAt(0);\r\n return \"\\\\u\" + _hex2[(c >> 8) & 255] + _hex2[c & 255];\r\n}", "title": "" }, { "docid": "a21fbdb96ceccdfc1843843554d51cae", "score": "0.6602836", "text": "function escapeUnicode( str ) {\n\t\treturn str\n\t\t\t.replace(/[\\u00E1\\u00E2\\u00E4\\u00E6\\u00E3\\u00E5\\u0101]+/gi, 'a')\n\t\t\t.replace(/[\\u00E7\\u0107\\u010D]+/gi, 'c')\n\t\t\t.replace(/[\\u00E8\\u00E9\\u00EA\\u00EB\\u0113\\u0117\\u0119]+/gi, 'e')\n\t\t\t.replace(/[\\u00F4\\u00F6\\u00F2\\u00F3\\u0153\\u00F8\\u014D\\u00F5]+/gi, 'o')\n\t\t\t.replace(/[\\u00DF\\u015B\\u0161Ss]+/gi, 's')\n\t\t\t.replace(/[\\u00FB\\u00FC\\u00F9\\u00FA\\u016B]+/gi, 'u')\n\t\t\t.replace(/[\\u00FF]+/gi, 'y')\n\t\t\t.replace(/[\\u017E\\u017A\\u017C]+/gi, 'z');\n\t}", "title": "" }, { "docid": "f95b8c32a625afbe719d885857fa1e53", "score": "0.65747124", "text": "function encodeNonAscii(s) {\n if (isAscii(s)) {\n return s;\n }\n var length = s.length;\n var result = \"\";\n for (var i = 0; i < length; ++i) {\n var c = s.charAt(i);\n var code = s.charCodeAt(i);\n if (isAsciiChar(code)) {\n result += c;\n }\n else {\n result += encodeURIComponent(c);\n }\n }\n return result;\n }", "title": "" }, { "docid": "cf9b98fae32263682f742b79a878a0de", "score": "0.65726984", "text": "function h$encodeUtf8(str) {\n var i, low;\n var n = 0;\n for(i=0;i<str.length;i++) {\n // non-BMP encoded as surrogate pair in JavaScript string, get actual codepoint\n var c = str.charCodeAt(i);\n if (0xD800 <= c && c <= 0xDBFF) {\n low = str.charCodeAt(i+1);\n c = ((c - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000;\n i++;\n }\n if(c <= 0x7F) {\n n++;\n } else if(c <= 0x7FF) {\n n+=2;\n } else if(c <= 0xFFFF) {\n n+=3;\n } else if(c <= 0x1FFFFF) {\n n+=4;\n } else if(c <= 0x3FFFFFF) {\n n+=5;\n } else {\n n+=6;\n }\n }\n var v = h$newByteArray(n+1);\n var u8 = v.u8;\n n = 0;\n for(i=0;i<str.length;i++) {\n var c = str.charCodeAt(i);\n // non-BMP encoded as surrogate pair in JavaScript string, get actual codepoint\n if (0xD800 <= c && c <= 0xDBFF) {\n low = str.charCodeAt(i+1);\n c = ((c - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000;\n i++;\n }\n// h$log(\"### encoding char \" + c + \" to UTF-8: \" + String.fromCodePoint(c));\n if(c <= 0x7F) {\n u8[n] = c;\n n++;\n } else if(c <= 0x7FF) {\n u8[n] = (c >> 6) | 0xC0;\n u8[n+1] = (c & 0x3F) | 0x80;\n n+=2;\n } else if(c <= 0xFFFF) {\n u8[n] = (c >> 12) | 0xE0;\n u8[n+1] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+2] = (c & 0x3F) | 0x80;\n n+=3;\n } else if(c <= 0x1FFFFF) {\n u8[n] = (c >> 18) | 0xF0;\n u8[n+1] = ((c >> 12) & 0x3F) | 0x80;\n u8[n+2] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+3] = (c & 0x3F) | 0x80;\n n+=4;\n } else if(c <= 0x3FFFFFF) {\n u8[n] = (c >> 24) | 0xF8;\n u8[n+1] = ((c >> 18) & 0x3F) | 0x80;\n u8[n+2] = ((c >> 12) & 0x3F) | 0x80;\n u8[n+3] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+4] = (c & 0x3F) | 0x80;\n n+=5;\n } else {\n u8[n] = (c >>> 30) | 0xFC;\n u8[n+1] = ((c >> 24) & 0x3F) | 0x80;\n u8[n+2] = ((c >> 18) & 0x3F) | 0x80;\n u8[n+3] = ((c >> 12) & 0x3F) | 0x80;\n u8[n+4] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+5] = (c & 0x3F) | 0x80;\n n+=6;\n }\n }\n u8[v.len-1] = 0; // terminator\n// h$log(\"### encodeUtf8: \" + str);\n// h$log(v);\n return v;\n}", "title": "" }, { "docid": "cf9b98fae32263682f742b79a878a0de", "score": "0.65726984", "text": "function h$encodeUtf8(str) {\n var i, low;\n var n = 0;\n for(i=0;i<str.length;i++) {\n // non-BMP encoded as surrogate pair in JavaScript string, get actual codepoint\n var c = str.charCodeAt(i);\n if (0xD800 <= c && c <= 0xDBFF) {\n low = str.charCodeAt(i+1);\n c = ((c - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000;\n i++;\n }\n if(c <= 0x7F) {\n n++;\n } else if(c <= 0x7FF) {\n n+=2;\n } else if(c <= 0xFFFF) {\n n+=3;\n } else if(c <= 0x1FFFFF) {\n n+=4;\n } else if(c <= 0x3FFFFFF) {\n n+=5;\n } else {\n n+=6;\n }\n }\n var v = h$newByteArray(n+1);\n var u8 = v.u8;\n n = 0;\n for(i=0;i<str.length;i++) {\n var c = str.charCodeAt(i);\n // non-BMP encoded as surrogate pair in JavaScript string, get actual codepoint\n if (0xD800 <= c && c <= 0xDBFF) {\n low = str.charCodeAt(i+1);\n c = ((c - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000;\n i++;\n }\n// h$log(\"### encoding char \" + c + \" to UTF-8: \" + String.fromCodePoint(c));\n if(c <= 0x7F) {\n u8[n] = c;\n n++;\n } else if(c <= 0x7FF) {\n u8[n] = (c >> 6) | 0xC0;\n u8[n+1] = (c & 0x3F) | 0x80;\n n+=2;\n } else if(c <= 0xFFFF) {\n u8[n] = (c >> 12) | 0xE0;\n u8[n+1] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+2] = (c & 0x3F) | 0x80;\n n+=3;\n } else if(c <= 0x1FFFFF) {\n u8[n] = (c >> 18) | 0xF0;\n u8[n+1] = ((c >> 12) & 0x3F) | 0x80;\n u8[n+2] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+3] = (c & 0x3F) | 0x80;\n n+=4;\n } else if(c <= 0x3FFFFFF) {\n u8[n] = (c >> 24) | 0xF8;\n u8[n+1] = ((c >> 18) & 0x3F) | 0x80;\n u8[n+2] = ((c >> 12) & 0x3F) | 0x80;\n u8[n+3] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+4] = (c & 0x3F) | 0x80;\n n+=5;\n } else {\n u8[n] = (c >>> 30) | 0xFC;\n u8[n+1] = ((c >> 24) & 0x3F) | 0x80;\n u8[n+2] = ((c >> 18) & 0x3F) | 0x80;\n u8[n+3] = ((c >> 12) & 0x3F) | 0x80;\n u8[n+4] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+5] = (c & 0x3F) | 0x80;\n n+=6;\n }\n }\n u8[v.len-1] = 0; // terminator\n// h$log(\"### encodeUtf8: \" + str);\n// h$log(v);\n return v;\n}", "title": "" }, { "docid": "cf9b98fae32263682f742b79a878a0de", "score": "0.65726984", "text": "function h$encodeUtf8(str) {\n var i, low;\n var n = 0;\n for(i=0;i<str.length;i++) {\n // non-BMP encoded as surrogate pair in JavaScript string, get actual codepoint\n var c = str.charCodeAt(i);\n if (0xD800 <= c && c <= 0xDBFF) {\n low = str.charCodeAt(i+1);\n c = ((c - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000;\n i++;\n }\n if(c <= 0x7F) {\n n++;\n } else if(c <= 0x7FF) {\n n+=2;\n } else if(c <= 0xFFFF) {\n n+=3;\n } else if(c <= 0x1FFFFF) {\n n+=4;\n } else if(c <= 0x3FFFFFF) {\n n+=5;\n } else {\n n+=6;\n }\n }\n var v = h$newByteArray(n+1);\n var u8 = v.u8;\n n = 0;\n for(i=0;i<str.length;i++) {\n var c = str.charCodeAt(i);\n // non-BMP encoded as surrogate pair in JavaScript string, get actual codepoint\n if (0xD800 <= c && c <= 0xDBFF) {\n low = str.charCodeAt(i+1);\n c = ((c - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000;\n i++;\n }\n// h$log(\"### encoding char \" + c + \" to UTF-8: \" + String.fromCodePoint(c));\n if(c <= 0x7F) {\n u8[n] = c;\n n++;\n } else if(c <= 0x7FF) {\n u8[n] = (c >> 6) | 0xC0;\n u8[n+1] = (c & 0x3F) | 0x80;\n n+=2;\n } else if(c <= 0xFFFF) {\n u8[n] = (c >> 12) | 0xE0;\n u8[n+1] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+2] = (c & 0x3F) | 0x80;\n n+=3;\n } else if(c <= 0x1FFFFF) {\n u8[n] = (c >> 18) | 0xF0;\n u8[n+1] = ((c >> 12) & 0x3F) | 0x80;\n u8[n+2] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+3] = (c & 0x3F) | 0x80;\n n+=4;\n } else if(c <= 0x3FFFFFF) {\n u8[n] = (c >> 24) | 0xF8;\n u8[n+1] = ((c >> 18) & 0x3F) | 0x80;\n u8[n+2] = ((c >> 12) & 0x3F) | 0x80;\n u8[n+3] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+4] = (c & 0x3F) | 0x80;\n n+=5;\n } else {\n u8[n] = (c >>> 30) | 0xFC;\n u8[n+1] = ((c >> 24) & 0x3F) | 0x80;\n u8[n+2] = ((c >> 18) & 0x3F) | 0x80;\n u8[n+3] = ((c >> 12) & 0x3F) | 0x80;\n u8[n+4] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+5] = (c & 0x3F) | 0x80;\n n+=6;\n }\n }\n u8[v.len-1] = 0; // terminator\n// h$log(\"### encodeUtf8: \" + str);\n// h$log(v);\n return v;\n}", "title": "" }, { "docid": "cf9b98fae32263682f742b79a878a0de", "score": "0.65726984", "text": "function h$encodeUtf8(str) {\n var i, low;\n var n = 0;\n for(i=0;i<str.length;i++) {\n // non-BMP encoded as surrogate pair in JavaScript string, get actual codepoint\n var c = str.charCodeAt(i);\n if (0xD800 <= c && c <= 0xDBFF) {\n low = str.charCodeAt(i+1);\n c = ((c - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000;\n i++;\n }\n if(c <= 0x7F) {\n n++;\n } else if(c <= 0x7FF) {\n n+=2;\n } else if(c <= 0xFFFF) {\n n+=3;\n } else if(c <= 0x1FFFFF) {\n n+=4;\n } else if(c <= 0x3FFFFFF) {\n n+=5;\n } else {\n n+=6;\n }\n }\n var v = h$newByteArray(n+1);\n var u8 = v.u8;\n n = 0;\n for(i=0;i<str.length;i++) {\n var c = str.charCodeAt(i);\n // non-BMP encoded as surrogate pair in JavaScript string, get actual codepoint\n if (0xD800 <= c && c <= 0xDBFF) {\n low = str.charCodeAt(i+1);\n c = ((c - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000;\n i++;\n }\n// h$log(\"### encoding char \" + c + \" to UTF-8: \" + String.fromCodePoint(c));\n if(c <= 0x7F) {\n u8[n] = c;\n n++;\n } else if(c <= 0x7FF) {\n u8[n] = (c >> 6) | 0xC0;\n u8[n+1] = (c & 0x3F) | 0x80;\n n+=2;\n } else if(c <= 0xFFFF) {\n u8[n] = (c >> 12) | 0xE0;\n u8[n+1] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+2] = (c & 0x3F) | 0x80;\n n+=3;\n } else if(c <= 0x1FFFFF) {\n u8[n] = (c >> 18) | 0xF0;\n u8[n+1] = ((c >> 12) & 0x3F) | 0x80;\n u8[n+2] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+3] = (c & 0x3F) | 0x80;\n n+=4;\n } else if(c <= 0x3FFFFFF) {\n u8[n] = (c >> 24) | 0xF8;\n u8[n+1] = ((c >> 18) & 0x3F) | 0x80;\n u8[n+2] = ((c >> 12) & 0x3F) | 0x80;\n u8[n+3] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+4] = (c & 0x3F) | 0x80;\n n+=5;\n } else {\n u8[n] = (c >>> 30) | 0xFC;\n u8[n+1] = ((c >> 24) & 0x3F) | 0x80;\n u8[n+2] = ((c >> 18) & 0x3F) | 0x80;\n u8[n+3] = ((c >> 12) & 0x3F) | 0x80;\n u8[n+4] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+5] = (c & 0x3F) | 0x80;\n n+=6;\n }\n }\n u8[v.len-1] = 0; // terminator\n// h$log(\"### encodeUtf8: \" + str);\n// h$log(v);\n return v;\n}", "title": "" }, { "docid": "cf9b98fae32263682f742b79a878a0de", "score": "0.65726984", "text": "function h$encodeUtf8(str) {\n var i, low;\n var n = 0;\n for(i=0;i<str.length;i++) {\n // non-BMP encoded as surrogate pair in JavaScript string, get actual codepoint\n var c = str.charCodeAt(i);\n if (0xD800 <= c && c <= 0xDBFF) {\n low = str.charCodeAt(i+1);\n c = ((c - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000;\n i++;\n }\n if(c <= 0x7F) {\n n++;\n } else if(c <= 0x7FF) {\n n+=2;\n } else if(c <= 0xFFFF) {\n n+=3;\n } else if(c <= 0x1FFFFF) {\n n+=4;\n } else if(c <= 0x3FFFFFF) {\n n+=5;\n } else {\n n+=6;\n }\n }\n var v = h$newByteArray(n+1);\n var u8 = v.u8;\n n = 0;\n for(i=0;i<str.length;i++) {\n var c = str.charCodeAt(i);\n // non-BMP encoded as surrogate pair in JavaScript string, get actual codepoint\n if (0xD800 <= c && c <= 0xDBFF) {\n low = str.charCodeAt(i+1);\n c = ((c - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000;\n i++;\n }\n// h$log(\"### encoding char \" + c + \" to UTF-8: \" + String.fromCodePoint(c));\n if(c <= 0x7F) {\n u8[n] = c;\n n++;\n } else if(c <= 0x7FF) {\n u8[n] = (c >> 6) | 0xC0;\n u8[n+1] = (c & 0x3F) | 0x80;\n n+=2;\n } else if(c <= 0xFFFF) {\n u8[n] = (c >> 12) | 0xE0;\n u8[n+1] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+2] = (c & 0x3F) | 0x80;\n n+=3;\n } else if(c <= 0x1FFFFF) {\n u8[n] = (c >> 18) | 0xF0;\n u8[n+1] = ((c >> 12) & 0x3F) | 0x80;\n u8[n+2] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+3] = (c & 0x3F) | 0x80;\n n+=4;\n } else if(c <= 0x3FFFFFF) {\n u8[n] = (c >> 24) | 0xF8;\n u8[n+1] = ((c >> 18) & 0x3F) | 0x80;\n u8[n+2] = ((c >> 12) & 0x3F) | 0x80;\n u8[n+3] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+4] = (c & 0x3F) | 0x80;\n n+=5;\n } else {\n u8[n] = (c >>> 30) | 0xFC;\n u8[n+1] = ((c >> 24) & 0x3F) | 0x80;\n u8[n+2] = ((c >> 18) & 0x3F) | 0x80;\n u8[n+3] = ((c >> 12) & 0x3F) | 0x80;\n u8[n+4] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+5] = (c & 0x3F) | 0x80;\n n+=6;\n }\n }\n u8[v.len-1] = 0; // terminator\n// h$log(\"### encodeUtf8: \" + str);\n// h$log(v);\n return v;\n}", "title": "" }, { "docid": "cf9b98fae32263682f742b79a878a0de", "score": "0.65726984", "text": "function h$encodeUtf8(str) {\n var i, low;\n var n = 0;\n for(i=0;i<str.length;i++) {\n // non-BMP encoded as surrogate pair in JavaScript string, get actual codepoint\n var c = str.charCodeAt(i);\n if (0xD800 <= c && c <= 0xDBFF) {\n low = str.charCodeAt(i+1);\n c = ((c - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000;\n i++;\n }\n if(c <= 0x7F) {\n n++;\n } else if(c <= 0x7FF) {\n n+=2;\n } else if(c <= 0xFFFF) {\n n+=3;\n } else if(c <= 0x1FFFFF) {\n n+=4;\n } else if(c <= 0x3FFFFFF) {\n n+=5;\n } else {\n n+=6;\n }\n }\n var v = h$newByteArray(n+1);\n var u8 = v.u8;\n n = 0;\n for(i=0;i<str.length;i++) {\n var c = str.charCodeAt(i);\n // non-BMP encoded as surrogate pair in JavaScript string, get actual codepoint\n if (0xD800 <= c && c <= 0xDBFF) {\n low = str.charCodeAt(i+1);\n c = ((c - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000;\n i++;\n }\n// h$log(\"### encoding char \" + c + \" to UTF-8: \" + String.fromCodePoint(c));\n if(c <= 0x7F) {\n u8[n] = c;\n n++;\n } else if(c <= 0x7FF) {\n u8[n] = (c >> 6) | 0xC0;\n u8[n+1] = (c & 0x3F) | 0x80;\n n+=2;\n } else if(c <= 0xFFFF) {\n u8[n] = (c >> 12) | 0xE0;\n u8[n+1] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+2] = (c & 0x3F) | 0x80;\n n+=3;\n } else if(c <= 0x1FFFFF) {\n u8[n] = (c >> 18) | 0xF0;\n u8[n+1] = ((c >> 12) & 0x3F) | 0x80;\n u8[n+2] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+3] = (c & 0x3F) | 0x80;\n n+=4;\n } else if(c <= 0x3FFFFFF) {\n u8[n] = (c >> 24) | 0xF8;\n u8[n+1] = ((c >> 18) & 0x3F) | 0x80;\n u8[n+2] = ((c >> 12) & 0x3F) | 0x80;\n u8[n+3] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+4] = (c & 0x3F) | 0x80;\n n+=5;\n } else {\n u8[n] = (c >>> 30) | 0xFC;\n u8[n+1] = ((c >> 24) & 0x3F) | 0x80;\n u8[n+2] = ((c >> 18) & 0x3F) | 0x80;\n u8[n+3] = ((c >> 12) & 0x3F) | 0x80;\n u8[n+4] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+5] = (c & 0x3F) | 0x80;\n n+=6;\n }\n }\n u8[v.len-1] = 0; // terminator\n// h$log(\"### encodeUtf8: \" + str);\n// h$log(v);\n return v;\n}", "title": "" }, { "docid": "c6eb0c63bcd0b9a64b2b502452d52e56", "score": "0.6541565", "text": "function encode(string) {\n return \"H4w 1r2 y45 t4d1y?\";\n}", "title": "" }, { "docid": "c6eb0c63bcd0b9a64b2b502452d52e56", "score": "0.6541565", "text": "function encode(string) {\n return \"H4w 1r2 y45 t4d1y?\";\n}", "title": "" }, { "docid": "d51d6b54ee10d872e23c19f3a766c478", "score": "0.6540755", "text": "function h$encodeUtf8(str) {\n var i, low;\n var n = 0;\n for(i=0;i<str.length;i++) {\n // non-BMP encoded as surrogate pair in JavaScript string, get actual codepoint\n var c = str.charCodeAt(i);\n if (0xD800 <= c && c <= 0xDBFF) {\n low = str.charCodeAt(i+1);\n c = ((c - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000;\n i++;\n }\n if(c <= 0x7F) {\n n++;\n } else if(c <= 0x7FF) {\n n+=2;\n } else if(c <= 0xFFFF) {\n n+=3;\n } else if(c <= 0x1FFFFF) {\n n+=4;\n } else if(c <= 0x3FFFFFF) {\n n+=5;\n } else {\n n+=6;\n }\n }\n var v = h$newByteArray(n+1);\n var u8 = v.u8;\n n = 0;\n for(i=0;i<str.length;i++) {\n var c = str.charCodeAt(i);\n // non-BMP encoded as surrogate pair in JavaScript string, get actual codepoint\n if (0xD800 <= c && c <= 0xDBFF) {\n low = str.charCodeAt(i+1);\n c = ((c - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000;\n i++;\n }\n// log(\"### encoding char \" + c + \" to UTF-8: \" + String.fromCodePoint(c));\n if(c <= 0x7F) {\n u8[n] = c;\n n++;\n } else if(c <= 0x7FF) {\n u8[n] = (c >> 6) | 0xC0;\n u8[n+1] = (c & 0x3F) | 0x80;\n n+=2;\n } else if(c <= 0xFFFF) {\n u8[n] = (c >> 12) | 0xE0;\n u8[n+1] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+2] = (c & 0x3F) | 0x80;\n n+=3;\n } else if(c <= 0x1FFFFF) {\n u8[n] = (c >> 18) | 0xF0;\n u8[n+1] = ((c >> 12) & 0x3F) | 0x80;\n u8[n+2] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+3] = (c & 0x3F) | 0x80;\n n+=4;\n } else if(c <= 0x3FFFFFF) {\n u8[n] = (c >> 24) | 0xF8;\n u8[n+1] = ((c >> 18) & 0x3F) | 0x80;\n u8[n+2] = ((c >> 12) & 0x3F) | 0x80;\n u8[n+3] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+4] = (c & 0x3F) | 0x80;\n n+=5;\n } else {\n u8[n] = (c >>> 30) | 0xFC;\n u8[n+1] = ((c >> 24) & 0x3F) | 0x80;\n u8[n+2] = ((c >> 18) & 0x3F) | 0x80;\n u8[n+3] = ((c >> 12) & 0x3F) | 0x80;\n u8[n+4] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+5] = (c & 0x3F) | 0x80;\n n+=6;\n }\n }\n u8[v.len-1] = 0; // terminator\n// log(\"### encodeUtf8: \" + str);\n// log(v);\n return v;\n}", "title": "" }, { "docid": "d51d6b54ee10d872e23c19f3a766c478", "score": "0.6540755", "text": "function h$encodeUtf8(str) {\n var i, low;\n var n = 0;\n for(i=0;i<str.length;i++) {\n // non-BMP encoded as surrogate pair in JavaScript string, get actual codepoint\n var c = str.charCodeAt(i);\n if (0xD800 <= c && c <= 0xDBFF) {\n low = str.charCodeAt(i+1);\n c = ((c - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000;\n i++;\n }\n if(c <= 0x7F) {\n n++;\n } else if(c <= 0x7FF) {\n n+=2;\n } else if(c <= 0xFFFF) {\n n+=3;\n } else if(c <= 0x1FFFFF) {\n n+=4;\n } else if(c <= 0x3FFFFFF) {\n n+=5;\n } else {\n n+=6;\n }\n }\n var v = h$newByteArray(n+1);\n var u8 = v.u8;\n n = 0;\n for(i=0;i<str.length;i++) {\n var c = str.charCodeAt(i);\n // non-BMP encoded as surrogate pair in JavaScript string, get actual codepoint\n if (0xD800 <= c && c <= 0xDBFF) {\n low = str.charCodeAt(i+1);\n c = ((c - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000;\n i++;\n }\n// log(\"### encoding char \" + c + \" to UTF-8: \" + String.fromCodePoint(c));\n if(c <= 0x7F) {\n u8[n] = c;\n n++;\n } else if(c <= 0x7FF) {\n u8[n] = (c >> 6) | 0xC0;\n u8[n+1] = (c & 0x3F) | 0x80;\n n+=2;\n } else if(c <= 0xFFFF) {\n u8[n] = (c >> 12) | 0xE0;\n u8[n+1] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+2] = (c & 0x3F) | 0x80;\n n+=3;\n } else if(c <= 0x1FFFFF) {\n u8[n] = (c >> 18) | 0xF0;\n u8[n+1] = ((c >> 12) & 0x3F) | 0x80;\n u8[n+2] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+3] = (c & 0x3F) | 0x80;\n n+=4;\n } else if(c <= 0x3FFFFFF) {\n u8[n] = (c >> 24) | 0xF8;\n u8[n+1] = ((c >> 18) & 0x3F) | 0x80;\n u8[n+2] = ((c >> 12) & 0x3F) | 0x80;\n u8[n+3] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+4] = (c & 0x3F) | 0x80;\n n+=5;\n } else {\n u8[n] = (c >>> 30) | 0xFC;\n u8[n+1] = ((c >> 24) & 0x3F) | 0x80;\n u8[n+2] = ((c >> 18) & 0x3F) | 0x80;\n u8[n+3] = ((c >> 12) & 0x3F) | 0x80;\n u8[n+4] = ((c >> 6) & 0x3F) | 0x80;\n u8[n+5] = (c & 0x3F) | 0x80;\n n+=6;\n }\n }\n u8[v.len-1] = 0; // terminator\n// log(\"### encodeUtf8: \" + str);\n// log(v);\n return v;\n}", "title": "" }, { "docid": "eb3caa3d3e5cbaef08506b4945a8ade0", "score": "0.6499508", "text": "function Utf8EncodeWorker(){GenericWorker.call(this,\"utf-8 encode\");}", "title": "" }, { "docid": "ae213c339a5e16cb08a7ea247fe9dcc9", "score": "0.64862144", "text": "function htmlEncode(string) {\n return string.replace(/&/g, '&amp;').replace(/\"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n }", "title": "" }, { "docid": "2778bea2780c6d346c84770ee8f4f4e6", "score": "0.64861226", "text": "function encode_unicode(x) {\n var i;\n var t;\n var res = [];\n\n for (i = 0; i < x.length; i++) {\n t = x.charCodeAt(i);\n res.push(t.toString(16));\n }\n return res.join('-');\n}", "title": "" }, { "docid": "bc71b5f1bf4b0b1b0122fb9e9164593a", "score": "0.64673287", "text": "function utf7EncoderWrite(str) {\n // Naive implementation.\n // Non-direct chars are encoded as \"+<base64>-\"; single \"+\" char is encoded as \"+-\".\n return new Buffer(str.replace(nonDirectChars, function (chunk) {\n return '+' + (chunk === '+' ? '' : this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, '')) + '-';\n }.bind(this)));\n }", "title": "" }, { "docid": "4c0c4e12d933f607ad9bcf09e9fcb3e4", "score": "0.6440877", "text": "function encode(str) {\n // seu código aqui\n let encodingString = ''\n for (let element of str) {\n if (element === 'a') {\n encodingString += '1'\n } else if (element === 'e') {\n encodingString += '2'\n } else if (element === 'i') {\n encodingString += '3'\n } else if (element === 'o') {\n encodingString += '4'\n } else if (element === 'u') {\n encodingString += '5'\n } else {\n encodingString += element\n }\n }\n return encodingString\n}", "title": "" }, { "docid": "b4e313a16d04994443f38c7c146a0f4f", "score": "0.64312303", "text": "function setUrlEncoding(string)\n\t{\n\t\tvar output = '';\n\t\tif (set_double_encoding) {\n\t\t\toutput = Url.double_encode(string);\n\t\t} else {\n\t\t\toutput = Url.encode(string);\n\t\t}\n\t\treturn output;\n\t}", "title": "" }, { "docid": "cc94329d7f0f743fa15e496db2b414df", "score": "0.64235634", "text": "function xmlencode(string) {\n return string.replace(/\\&/g,'&'+'amp;')\n .replace(/</g,'&'+'lt;')\n .replace(/>/g,'&'+'gt;')\n .replace(/\\'/g,'&'+'apos;')\n .replace(/\\\"/g,'&'+'quot;')\n .replace(/`/g,'&'+'#96;');\n }", "title": "" }, { "docid": "5eebb9bfdc3fe56fd4514e780cd58e1d", "score": "0.6399839", "text": "function encodeText(thetext) {\n return encodeURIComponent(thetext);\n}", "title": "" }, { "docid": "be8ab19591d50575e0b8f29fa195583f", "score": "0.6397441", "text": "function b64EncodeUnicode(str) {\n return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p1) {\n return String.fromCharCode('0x' + p1);\n }));\n }", "title": "" }, { "docid": "be8ab19591d50575e0b8f29fa195583f", "score": "0.6397441", "text": "function b64EncodeUnicode(str) {\n return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p1) {\n return String.fromCharCode('0x' + p1);\n }));\n }", "title": "" }, { "docid": "483a9929aa9248eb79820b79e99c076c", "score": "0.63844925", "text": "function b64EncodeUnicode(str) {\n return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g,\n function toSolidBytes(match, p1) {\n return String.fromCharCode('0x' + p1);\n }));\n }", "title": "" }, { "docid": "980747804d17ce467059a9801acf8a7a", "score": "0.6382861", "text": "function utf8Encode(input) {\n var bytes = new Uint8Array(input.length * 4);\n var byteIndex = 0;\n for (var i = 0; i < input.length; i++) {\n var char = input.charCodeAt(i);\n if (char < 128) {\n bytes[byteIndex++] = char;\n continue;\n }\n else if (char < 2048) {\n bytes[byteIndex++] = char >> 6 | 192;\n }\n else {\n if (char > 0xd7ff && char < 0xdc00) {\n if (++i >= input.length) {\n throw new Error(\"Incomplete surrogate pair.\");\n }\n var c2 = input.charCodeAt(i);\n if (c2 < 0xdc00 || c2 > 0xdfff) {\n throw new Error(\"Invalid surrogate character.\");\n }\n char = 0x10000 + ((char & 0x03ff) << 10) + (c2 & 0x03ff);\n bytes[byteIndex++] = char >> 18 | 240;\n bytes[byteIndex++] = char >> 12 & 63 | 128;\n }\n else {\n bytes[byteIndex++] = char >> 12 | 224;\n }\n bytes[byteIndex++] = char >> 6 & 63 | 128;\n }\n bytes[byteIndex++] = char & 63 | 128;\n }\n return bytes.subarray(0, byteIndex);\n}", "title": "" }, { "docid": "26a8851180f8dea97a0134ece9492f8d", "score": "0.6380651", "text": "function asciiEncode(string){\n \n result = \"\";\n \n for(i = 0; i < string.length; i++)\n {\n result = result + string.charCodeAt(i);\n }\n \n return result;\n}", "title": "" }, { "docid": "4d18c1fd4044d0b7070475d722c1a2d8", "score": "0.6372576", "text": "function base64EncodingUTF8(str) {\n var encoded = new TextEncoderLite('utf-8').encode(str); \n var b64Encoded = base64js.fromByteArray(encoded);\n return b64Encoded;\n}", "title": "" }, { "docid": "093f433eb00d0d338018e0e1ada88e21", "score": "0.63560903", "text": "function strToU8(str, latin1) {\n var l = str.length;\n if (!latin1 && typeof TextEncoder != 'undefined') return new TextEncoder().encode(str);\n var ar = new u8(str.length + (str.length >>> 1));\n var ai = 0;\n var w = function(v) {\n ar[ai++] = v;\n };\n for(var i4 = 0; i4 < l; ++i4){\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + (l - i4 << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i4);\n if (c < 128 || latin1) w(c);\n else if (c < 2048) w(192 | c >>> 6), w(128 | c & 63);\n else if (c > 55295 && c < 57344) c = 65536 + (c & 1047552) | str.charCodeAt(++i4) & 1023, w(240 | c >>> 18), w(128 | c >>> 12 & 63), w(128 | c >>> 6 & 63), w(128 | c & 63);\n else w(224 | c >>> 12), w(128 | c >>> 6 & 63), w(128 | c & 63);\n }\n return slc(ar, 0, ai);\n}", "title": "" }, { "docid": "106d7801f054b0d38425b0c8385a79ca", "score": "0.63531196", "text": "function strToU8(str, latin1) {\n var l = str.length;\n if (!latin1 && typeof TextEncoder != 'undefined')\n return new TextEncoder().encode(str);\n var ar = new u8(str.length + (str.length >>> 1));\n var ai = 0;\n var w = function (v) { ar[ai++] = v; };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + ((l - i) << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1)\n w(c);\n else if (c < 2048)\n w(192 | (c >>> 6)), w(128 | (c & 63));\n else if (c > 55295 && c < 57344)\n c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n w(240 | (c >>> 18)), w(128 | ((c >>> 12) & 63)), w(128 | ((c >>> 6) & 63)), w(128 | (c & 63));\n else\n w(224 | (c >>> 12)), w(128 | ((c >>> 6) & 63)), w(128 | (c & 63));\n }\n return slc(ar, 0, ai);\n}", "title": "" }, { "docid": "106d7801f054b0d38425b0c8385a79ca", "score": "0.63531196", "text": "function strToU8(str, latin1) {\n var l = str.length;\n if (!latin1 && typeof TextEncoder != 'undefined')\n return new TextEncoder().encode(str);\n var ar = new u8(str.length + (str.length >>> 1));\n var ai = 0;\n var w = function (v) { ar[ai++] = v; };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + ((l - i) << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1)\n w(c);\n else if (c < 2048)\n w(192 | (c >>> 6)), w(128 | (c & 63));\n else if (c > 55295 && c < 57344)\n c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n w(240 | (c >>> 18)), w(128 | ((c >>> 12) & 63)), w(128 | ((c >>> 6) & 63)), w(128 | (c & 63));\n else\n w(224 | (c >>> 12)), w(128 | ((c >>> 6) & 63)), w(128 | (c & 63));\n }\n return slc(ar, 0, ai);\n}", "title": "" }, { "docid": "106d7801f054b0d38425b0c8385a79ca", "score": "0.63531196", "text": "function strToU8(str, latin1) {\n var l = str.length;\n if (!latin1 && typeof TextEncoder != 'undefined')\n return new TextEncoder().encode(str);\n var ar = new u8(str.length + (str.length >>> 1));\n var ai = 0;\n var w = function (v) { ar[ai++] = v; };\n for (var i = 0; i < l; ++i) {\n if (ai + 5 > ar.length) {\n var n = new u8(ai + 8 + ((l - i) << 1));\n n.set(ar);\n ar = n;\n }\n var c = str.charCodeAt(i);\n if (c < 128 || latin1)\n w(c);\n else if (c < 2048)\n w(192 | (c >>> 6)), w(128 | (c & 63));\n else if (c > 55295 && c < 57344)\n c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n w(240 | (c >>> 18)), w(128 | ((c >>> 12) & 63)), w(128 | ((c >>> 6) & 63)), w(128 | (c & 63));\n else\n w(224 | (c >>> 12)), w(128 | ((c >>> 6) & 63)), w(128 | (c & 63));\n }\n return slc(ar, 0, ai);\n}", "title": "" }, { "docid": "f442daf7e08ba2038767142470a457d7", "score": "0.63464063", "text": "function b64EncodeUnicode(str) {\n return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function(match, p1) {\n return String.fromCharCode('0x' + p1);\n }));\n}", "title": "" }, { "docid": "fcf91deedaf88097c666b620dcdd337c", "score": "0.63408065", "text": "function b64EncodeUnicode(str) {\n return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p1) {\n return String.fromCharCode('0x' + p1);\n }));\n}", "title": "" }, { "docid": "fcf91deedaf88097c666b620dcdd337c", "score": "0.63408065", "text": "function b64EncodeUnicode(str) {\n return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p1) {\n return String.fromCharCode('0x' + p1);\n }));\n}", "title": "" } ]
b7d447d61529ff4ec8f1a1b8b317aa42
signed area of a triangle
[ { "docid": "22d8927298ec0dc5b3ba29c6a41d295b", "score": "0.0", "text": "function area( p, q, r ) {\n\n\treturn ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y );\n\n}", "title": "" } ]
[ { "docid": "55f0348f4b9403500c5eaa519db4698b", "score": "0.7143444", "text": "function areaTriangle(base, height) {\n return (.5*base*height);\n }", "title": "" }, { "docid": "cab59a5dcae61f356ac151bdca4f1ae4", "score": "0.70964205", "text": "function areaOfTriangle(a, b, c) {\n var s = ( a + b + c ) / 2; \n\n return s*(s - a)*(s - b)*(s - c); \n\t\t\n}", "title": "" }, { "docid": "0e6960acbb83f8304be46b6dc0977554", "score": "0.70733595", "text": "function areaOfTriangle(base, height) {\n return (base * height) / 2;\n}", "title": "" }, { "docid": "43e16c6a704272e56286a751045c3f86", "score": "0.6988791", "text": "function getTriangleArea(triangle) {\n console.log(triangle);\n const [a, b, c] = triangle;\n \n return 0.5 * (\n (b[0] - a[0]) * (c[1] - a[1]) -\n (c[0] - a[0]) * (b[1] - a[1])\n );\n }", "title": "" }, { "docid": "7333e624e3dc9fc7b76494ca25c399cb", "score": "0.6982614", "text": "function signedPolygon2DArea(vertices) {\n var sum = 0;\n var n = vertices.length;\n for (var i = 0; i < n; i++) {\n var v = vertices[i];\n var nv = vertices[(i + 1) % n];\n sum += v.x * nv.y - v.y * nv.x;\n }\n return sum * 0.5;\n }", "title": "" }, { "docid": "8a048f7d405689413749087e472d2d99", "score": "0.6957522", "text": "function triangleArea(b,h) {\n var area= .5*b*h;\n return area;\n\n}", "title": "" }, { "docid": "a8568f53b72a5b7cb5733cb38cb8ff58", "score": "0.6939146", "text": "function triangleArea(base, height) {\n return (base * height) / 2;\n}", "title": "" }, { "docid": "dceed9ae5073e8acdb6a21b1faaa811a", "score": "0.69389427", "text": "function calculateSignedArea(ring ) {\n\t\t var sum = 0;\n\t\t for (var i = 0, len = ring.length, j = len - 1, p1 = (void 0), p2 = (void 0); i < len; j = i++) {\n\t\t p1 = ring[i];\n\t\t p2 = ring[j];\n\t\t sum += (p2.x - p1.x) * (p1.y + p2.y);\n\t\t }\n\t\t return sum;\n\t\t}", "title": "" }, { "docid": "f0f5a4af443078a2e0ae7953673412fa", "score": "0.691801", "text": "calculateAreaTriangle() {\r\n var side1 = 5;\r\n var side2 = 6;\r\n var side3 = 7;\r\n var perimeter = (side1 + side2 + side3) / 2;\r\n var area = Math.sqrt(perimeter * ((perimeter - side1) * (perimeter - side2) * (perimeter - side3)));\r\n console.log(area);\r\n }", "title": "" }, { "docid": "b8e4b6080cefedce29a43edaf31f943a", "score": "0.6893768", "text": "function triangleArea(b,h){\n\t//Area of triangle = .5 * base * height\n\tvar area = .5 * b * h;\n\treturn area;\n}", "title": "" }, { "docid": "66ae7ba457c87a71c996a6ca6719b34d", "score": "0.68208575", "text": "function triArea(base, height) {\n return (base * height)/2\n}", "title": "" }, { "docid": "d707588ee309c623e7840fffc1624e7d", "score": "0.68023825", "text": "function getAreaOfTriangle(base, height) {\n return 0.5 * base * height;\n}", "title": "" }, { "docid": "0edbd603c139e18078d0beff8aa21840", "score": "0.67467993", "text": "function vec2SignedArea(vs) {\n let sum = 0;\n for (let i = 0; i < vs.length; i++) {\n const a = vs[i];\n const b = vs[(i+1)%vs.length];\n sum += a.x*b.y - b.x*a.y;\n }\n return 0.5*sum;\n}", "title": "" }, { "docid": "f75d85cdaa53575c5014416a6a247bc3", "score": "0.6726828", "text": "function calculateSignedArea(ring) {\n var sum = 0;\n for (var i = 0, len = ring.length, j = len - 1, p1 = (void 0), p2 = (void 0); i < len; j = i++) {\n p1 = ring[i];\n p2 = ring[j];\n sum += (p2.x - p1.x) * (p1.y + p2.y);\n }\n return sum;\n}", "title": "" }, { "docid": "45531f05d67e06e4f622ce8ca5ee7e4c", "score": "0.6705696", "text": "function triArea(base, height) {\n\treturn base * height / 2\n}", "title": "" }, { "docid": "8241f9e14f4c2e80838f5515d07c42f1", "score": "0.66507906", "text": "Area()\n {\n return Vector.Cross(Vector.Subtract(this.vertices[0], this.vertices[1]), Vector.Subtract(this.vertices[1], this.vertices[2])) / 2;\n }", "title": "" }, { "docid": "4b153c268c493c0823fb1befaa79342e", "score": "0.66212314", "text": "get area(){\n return Math.abs(this.signedArea);\n }", "title": "" }, { "docid": "e3048d2433cfab93f0ea0e3e53f1a5ac", "score": "0.65695614", "text": "function calculateTriangleArea(base, height) {\r\n let triangle = (base * height) / 2;\r\n if(base < 0 || height < 0) {\r\n return undefined;\r\n } else {\r\n return triangle;\r\n } \r\n}", "title": "" }, { "docid": "c5a0804b4a8de7d44c8ef079ac00ddb8", "score": "0.6499265", "text": "function calculateAreaOfTriangle(trianglePointsArray){\n \n let aPos = trianglePointsArray[0], bPos = trianglePointsArray[1], cPos = trianglePointsArray[2];\n let answer = (aPos[0]*(bPos[1]-cPos[1]) + bPos[0]*(cPos[1]-aPos[1]) + cPos[0]*(aPos[1]-bPos[1]));\n let area = Math.abs(answer/2);\n /* \n\n B\n A \n C\n\n\n A, B, P\n A[x,y]\n B[x,y]\n P[x,y]\n Ax*(By - Cy) + Bx * (Cy - Ay) + Cx * (Ay - By)\n \n */\n if(false){\n ctx.strokeWidth = \"1\";\n ctx.beginPath()\n ctx.moveTo(aPos[0],aPos[1]);\n ctx.lineTo(bPos[0],bPos[1]);\n ctx.lineTo(cPos[0],cPos[1]);\n ctx.lineTo(aPos[0],aPos[1]);\n ctx.closePath();\n ctx.stroke();\n }\n \n return area;\n}", "title": "" }, { "docid": "9a29764187766f544bd7d2b9d8b668e6", "score": "0.64639974", "text": "function triangleArea(s1, s2, s3) {\n const halfP = (s1 + s2 + s3) / 2;\n\n return Math.sqrt(halfP * (halfP - s1) * (halfP - s2) * (halfP - s3));\n}", "title": "" }, { "docid": "fd79a8fe3a9ed8ca81bf1c8288d61d48", "score": "0.6450796", "text": "function triArea(base, height) {\n return .5 * (base * height)\n}", "title": "" }, { "docid": "aed601e6707763ec0be0f83a2dfd45b9", "score": "0.64457166", "text": "get signedArea(){\n // recompute signed area if not cached\n if(!this.cacheArea){\n this.cacheArea = geom.signedArea(this.points);\n }\n return this.cacheArea;\n }", "title": "" }, { "docid": "6ba865b0820b9d9c6342d1d39d416eea", "score": "0.6382188", "text": "function TriangleArea(a, b, c) {\n\n // using sqrt the method of Returns the square root of a number \n var pre = (a + b + c) / 2;\n var area = Math.sqrt(pre * (pre - a) * (pre - b) * (pre - c));\n return \"area =\" + area;\n\n\n\n}", "title": "" }, { "docid": "ba92642e2c1daa91cf5520b5141d7807", "score": "0.6354468", "text": "function triarea2(a, b, c) {\n var ax = b.x - a.x;\n var ay = b.y - a.y;\n var bx = c.x - a.x;\n var by = c.y - a.y;\n return bx * ay - ax * by;\n}", "title": "" }, { "docid": "1a2d6c232d4cb9306a8619b02700adf7", "score": "0.63502795", "text": "function areaOfTriangle(base,height){\n if(typeof(base)!==\"number\" || typeof(height)!==\"number\"){\n alert(\"Area of Triangle: both values must be numbers\");\n \n }else if(base<0 || height<0){\n alert(\"Area of Triangle: Both numbers must be positive\");\n }\n else if(base>0 && height>0){\n let result = 0.5*base*height;\n return Number(result.toFixed(2));\n }\n}", "title": "" }, { "docid": "1d4ea51eea8bdd5261421772a868ab75", "score": "0.6329832", "text": "function triangle_onClick() {\n\tvar b = document.getElementById(\"b_t\").value;\n\t\th =\tdocument.getElementById(\"h_t\").value;\n\t\t//area\n\t\tarea_triangle = (b * h * .5);\n\t\tarea_triangle = Math.round(area_triangle/.0001)*.0001;\n\n\tdocument.getElementById(\"answer\").innerHTML = \"area = \" + area_triangle + \" units<sup>2</sup>\";\n}", "title": "" }, { "docid": "a0a2c3692e8b8d04eeac9a3b38b381ee", "score": "0.62596005", "text": "function areaTriangulo(base, altura){\n return (base * altura) / 2;\n}", "title": "" }, { "docid": "ba1d10af7a8e76ba584a81b6f2cd184c", "score": "0.6240817", "text": "function getTriangleArea(a, h) {\t\n \n // 2. Cialo funkcji (logika) (wewnątrz klamr{}) Wynik logiki przekazany do zmiennej \"value\" w celu jej wywołania.\n \n var value = a*h/2;\n \n console.log(\"inFunc Result is: \" + value);\n\n // 2.a) Wywolanie funcji słowem \"return\" tzw. zwracanie wartości funkcji (tj.przeliczenie logiki z zastosow. parametrów)\n return value;\n}", "title": "" }, { "docid": "9a669b6867021290f7b88f1f26e189e5", "score": "0.6201176", "text": "function areaTriangulo(base, altura) {\n return base * altura / 2;\n\n}", "title": "" }, { "docid": "f7e88e86e365665133a523018bc315d3", "score": "0.6190624", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n }", "title": "" }, { "docid": "c299d81e8ee7977f70e9780ba23eda7f", "score": "0.61877716", "text": "function pointInTriangle ( ax, ay, bx, by, cx, cy, px, py )\r\n {\r\n return ( cx - px ) * ( ay - py ) - ( ax - px ) * ( cy - py ) >= 0 &&\r\n ( ax - px ) * ( by - py ) - ( bx - px ) * ( ay - py ) >= 0 &&\r\n ( bx - px ) * ( cy - py ) - ( cx - px ) * ( by - py ) >= 0;\r\n }", "title": "" }, { "docid": "6ac08ffcf715234b62ce6a8ff73a09af", "score": "0.6167913", "text": "function areaTri(s1, s2, s3) {\n let p = (s1 + s2 + s3)/2;\n return Math.sqrt(p*(p-s1)*(p-s2)*(p-s3));\n}", "title": "" }, { "docid": "92c5a50efabf9c3010c0f5df9e4563a9", "score": "0.6167642", "text": "function triangle_area(A, B, C) {\n return Math.sqrt(triangle_area_squared(A, B, C));\n}", "title": "" }, { "docid": "ee1f42a0fee5fefb3803d75f8060b27d", "score": "0.6160126", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (\n (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0\n );\n }", "title": "" }, { "docid": "9afefe044b318009c74708f6ca48279d", "score": "0.61413836", "text": "function areaTr(t) {\n var perimeter = (t.sideA + t.sideB + t.sideC) / 2;\n console.log(perimeter);\n var area = Math.sqrt(perimeter * ((perimeter - t.sideA) * (perimeter - t.sideB) * (perimeter - t.sideC)));\n return area;\n}", "title": "" }, { "docid": "11d5a245418883224cf1c4f14ca226bf", "score": "0.6140527", "text": "area () {\n return 4*Math.PI*this.radi**2\n }", "title": "" }, { "docid": "8338acea22c8571f4764c3afcf1a9109", "score": "0.6131517", "text": "function triangleOfEdge(e) { return Math.floor(e / 3); }", "title": "" }, { "docid": "fbeadb0fe76484dd97a37abd6f1d7d38", "score": "0.61119986", "text": "area() {\n var p = (this.sideA + this.sideB + this.sideC) / 2;\n var area = Math.sqrt(\n p * (p - this.sideA) * (p - this.sideB) * (p - this.sideC)\n );\n return area;\n }", "title": "" }, { "docid": "965b7a2b1a52aabc0ef3e5a8fe24e89d", "score": "0.61082196", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n\t return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n\t (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n\t (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n\t}", "title": "" }, { "docid": "965b7a2b1a52aabc0ef3e5a8fe24e89d", "score": "0.61082196", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n\t return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n\t (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n\t (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n\t}", "title": "" }, { "docid": "965b7a2b1a52aabc0ef3e5a8fe24e89d", "score": "0.61082196", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n\t return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n\t (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n\t (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n\t}", "title": "" }, { "docid": "965b7a2b1a52aabc0ef3e5a8fe24e89d", "score": "0.61082196", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n\t return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n\t (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n\t (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n\t}", "title": "" }, { "docid": "965b7a2b1a52aabc0ef3e5a8fe24e89d", "score": "0.61082196", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n\t return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n\t (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n\t (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n\t}", "title": "" }, { "docid": "965b7a2b1a52aabc0ef3e5a8fe24e89d", "score": "0.61082196", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n\t return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n\t (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n\t (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n\t}", "title": "" }, { "docid": "95106517dda5cc95ddae86da9f42850b", "score": "0.61071205", "text": "function triAreaHeron(a, b, c) {\n let s = (a + b + c) / 2.0;\n return sqrt(s * (s - a) * (s - b) * (s - c));\n}", "title": "" }, { "docid": "5cb08ccc97b66fe9edb919d5d45e9388", "score": "0.6102471", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n\t\t return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n\t\t (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n\t\t (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n\t\t}", "title": "" }, { "docid": "5cb08ccc97b66fe9edb919d5d45e9388", "score": "0.6102471", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n\t\t return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n\t\t (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n\t\t (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n\t\t}", "title": "" }, { "docid": "b0ca87037c6244227849dbadb28e69e2", "score": "0.6102223", "text": "function areaTriangulo(base, altura) {\n return (base * altura) / 2;\n}", "title": "" }, { "docid": "83f12e03039593a5fc18ce85739e5346", "score": "0.6094709", "text": "function getArea( vertices ) {\n var area = 0.0;\n var trianglePerimeter = 0.0;\n var s = 0.0;\n var side1, side2, side3;\n var v = 0;\n for( var i = 1; i < vertices.length - 1; i++ ) {\n // Three verts of the current triangle are v[0], v[i], v[i+1]\n trianglePerimeter = 0.0;\n trianglePerimeter += (side1 = vertices[0].distanceFrom( vertices[i] ));\n trianglePerimeter += (side2 = vertices[i].distanceFrom( vertices[i+1] ));\n trianglePerimeter += (side3 = vertices[i+1].distanceFrom( vertices[0] ));\n s = trianglePerimeter / 2.0;\n area += Math.sqrt( (s * (s - side1) * (s - side2) * (s - side3)) );\n }\n\n return area;\n}", "title": "" }, { "docid": "1b43a836efb47fe595d37a130792ff5f", "score": "0.606766", "text": "function areaSquare (side) {\n return side ** 2;\n}", "title": "" }, { "docid": "a52f66e7f6e78963f9f384da0b35ace5", "score": "0.6043915", "text": "function pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) {\n\n \treturn ( cx - px ) * ( ay - py ) - ( ax - px ) * ( cy - py ) >= 0 &&\n \t\t ( ax - px ) * ( by - py ) - ( bx - px ) * ( ay - py ) >= 0 &&\n \t\t ( bx - px ) * ( cy - py ) - ( cx - px ) * ( by - py ) >= 0;\n\n }", "title": "" }, { "docid": "f3e15d46e31e70754307dcd5fc1e0ab1", "score": "0.6038462", "text": "function aTriangulo(b,h){\n console.log(\"El area del triangulo que es bxh/2: \", (b*h) /2)\n}", "title": "" }, { "docid": "0d39a94a36fccaeeef7934ee7a71fa47", "score": "0.6027393", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (\n (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0\n );\n }", "title": "" }, { "docid": "3ce4a1b78928aed6a943ba47651fd274", "score": "0.60183936", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 && (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 && (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}", "title": "" }, { "docid": "52809596f788d8ae0d21d0cf07ac9a66", "score": "0.6006525", "text": "function area(points) {\r\n\r\n var left = 0;\r\n var right = 0;\r\n var length = points.length - 1;\r\n var p;\r\n var p2;\r\n for (var i = 0; i < length; i++) {\r\n p = points[i];\r\n p2 = points[i+1];\r\n left += p.x * p2.y;\r\n right += p2.x * p.y;\r\n }\r\n p = p2;\r\n p2 = points[0];\r\n left += p.x * p2.y;\r\n right += p2.x * p.y;\r\n var result = (left - right) * 0.5;\r\n if (result < 0) {\r\n return -result;\r\n } else {\r\n return result;\r\n }\r\n}", "title": "" }, { "docid": "e70b2edb16e8a64815a24642d77c5e17", "score": "0.599468", "text": "function pointInTriangle$1(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}", "title": "" }, { "docid": "d500a4c682a2e5ef792ad773bd2a1d45", "score": "0.5991932", "text": "function pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) {\n\n\treturn ( cx - px ) * ( ay - py ) - ( ax - px ) * ( cy - py ) >= 0 &&\n\t\t\t( ax - px ) * ( by - py ) - ( bx - px ) * ( ay - py ) >= 0 &&\n\t\t\t( bx - px ) * ( cy - py ) - ( cx - px ) * ( by - py ) >= 0;\n\n}", "title": "" }, { "docid": "d500a4c682a2e5ef792ad773bd2a1d45", "score": "0.5991932", "text": "function pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) {\n\n\treturn ( cx - px ) * ( ay - py ) - ( ax - px ) * ( cy - py ) >= 0 &&\n\t\t\t( ax - px ) * ( by - py ) - ( bx - px ) * ( ay - py ) >= 0 &&\n\t\t\t( bx - px ) * ( cy - py ) - ( cx - px ) * ( by - py ) >= 0;\n\n}", "title": "" }, { "docid": "d500a4c682a2e5ef792ad773bd2a1d45", "score": "0.5991932", "text": "function pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) {\n\n\treturn ( cx - px ) * ( ay - py ) - ( ax - px ) * ( cy - py ) >= 0 &&\n\t\t\t( ax - px ) * ( by - py ) - ( bx - px ) * ( ay - py ) >= 0 &&\n\t\t\t( bx - px ) * ( cy - py ) - ( cx - px ) * ( by - py ) >= 0;\n\n}", "title": "" }, { "docid": "d500a4c682a2e5ef792ad773bd2a1d45", "score": "0.5991932", "text": "function pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) {\n\n\treturn ( cx - px ) * ( ay - py ) - ( ax - px ) * ( cy - py ) >= 0 &&\n\t\t\t( ax - px ) * ( by - py ) - ( bx - px ) * ( ay - py ) >= 0 &&\n\t\t\t( bx - px ) * ( cy - py ) - ( cx - px ) * ( by - py ) >= 0;\n\n}", "title": "" }, { "docid": "5b04de0d2544cdc5e04d325d4d27f866", "score": "0.5988274", "text": "function pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) {\n\n\treturn ( cx - px ) * ( ay - py ) - ( ax - px ) * ( cy - py ) >= 0 &&\n\t ( ax - px ) * ( by - py ) - ( bx - px ) * ( ay - py ) >= 0 &&\n\t ( bx - px ) * ( cy - py ) - ( cx - px ) * ( by - py ) >= 0;\n\n}", "title": "" }, { "docid": "5b04de0d2544cdc5e04d325d4d27f866", "score": "0.5988274", "text": "function pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) {\n\n\treturn ( cx - px ) * ( ay - py ) - ( ax - px ) * ( cy - py ) >= 0 &&\n\t ( ax - px ) * ( by - py ) - ( bx - px ) * ( ay - py ) >= 0 &&\n\t ( bx - px ) * ( cy - py ) - ( cx - px ) * ( by - py ) >= 0;\n\n}", "title": "" }, { "docid": "5b04de0d2544cdc5e04d325d4d27f866", "score": "0.5988274", "text": "function pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) {\n\n\treturn ( cx - px ) * ( ay - py ) - ( ax - px ) * ( cy - py ) >= 0 &&\n\t ( ax - px ) * ( by - py ) - ( bx - px ) * ( ay - py ) >= 0 &&\n\t ( bx - px ) * ( cy - py ) - ( cx - px ) * ( by - py ) >= 0;\n\n}", "title": "" }, { "docid": "5b04de0d2544cdc5e04d325d4d27f866", "score": "0.5988274", "text": "function pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) {\n\n\treturn ( cx - px ) * ( ay - py ) - ( ax - px ) * ( cy - py ) >= 0 &&\n\t ( ax - px ) * ( by - py ) - ( bx - px ) * ( ay - py ) >= 0 &&\n\t ( bx - px ) * ( cy - py ) - ( cx - px ) * ( by - py ) >= 0;\n\n}", "title": "" }, { "docid": "5b04de0d2544cdc5e04d325d4d27f866", "score": "0.5988274", "text": "function pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) {\n\n\treturn ( cx - px ) * ( ay - py ) - ( ax - px ) * ( cy - py ) >= 0 &&\n\t ( ax - px ) * ( by - py ) - ( bx - px ) * ( ay - py ) >= 0 &&\n\t ( bx - px ) * ( cy - py ) - ( cx - px ) * ( by - py ) >= 0;\n\n}", "title": "" }, { "docid": "50a7c231d568a75d5c8c616778eb2873", "score": "0.5985828", "text": "function trianglePerimeter(triangle){\n let ab = Math.sqrt((triangle.a.x - triangle.b.x) ** 2 + (triangle.a.y - triangle.b.y) ** 2);\n let bc = Math.sqrt((triangle.b.x - triangle.c.x) ** 2 + (triangle.b.y - triangle.c.y) ** 2);\n let ac = Math.sqrt((triangle.a.x - triangle.c.x) ** 2 + (triangle.a.y - triangle.c.y) ** 2);\n return ab + bc + ac;\n}", "title": "" }, { "docid": "664c65388a4aabe322446b03ca46a38d", "score": "0.5984453", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n }", "title": "" }, { "docid": "189771d29b2d3317969c265d2df0cb4d", "score": "0.5983925", "text": "function sqArea(length) {\r\n return length*length;\r\n}", "title": "" }, { "docid": "cf664fe84c7385afedb93fc814a1e78b", "score": "0.5981783", "text": "function inTriangle(p, a, b, c) {\n var v = [sub(c, a), sub(b, a), sub(p, a)];\n \n var dot00 = dot(v[0], v[0]); \n var dot01 = dot(v[0], v[1]); \n var dot02 = dot(v[0], v[2]); \n var dot11 = dot(v[1], v[1]); \n var dot12 = dot(v[1], v[2]); \n\n var d = (dot00 * dot11 - dot01 * dot01);\n var u = (dot11 * dot02 - dot01 * dot12) / d;\n var v = (dot00 * dot12 - dot01 * dot02) / d;\n if ((u >= 0) && (v >= 0)) {\n if (u + v < 1) {\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "634a6aaa9fb841ca3aa088c926455efc", "score": "0.59808314", "text": "function pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) {\n\n\treturn ( cx - px ) * ( ay - py ) - ( ax - px ) * ( cy - py ) >= 0 &&\n\t\t ( ax - px ) * ( by - py ) - ( bx - px ) * ( ay - py ) >= 0 &&\n\t\t ( bx - px ) * ( cy - py ) - ( cx - px ) * ( by - py ) >= 0;\n\n}", "title": "" }, { "docid": "f7d617c10396916bddb553f8576e9b11", "score": "0.5980176", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n }", "title": "" }, { "docid": "d1676924db9b8519a57fc1983b3a5768", "score": "0.59795916", "text": "function pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) {\n\n\t\treturn ( cx - px ) * ( ay - py ) - ( ax - px ) * ( cy - py ) >= 0 &&\n\t\t\t ( ax - px ) * ( by - py ) - ( bx - px ) * ( ay - py ) >= 0 &&\n\t\t\t ( bx - px ) * ( cy - py ) - ( cx - px ) * ( by - py ) >= 0;\n\n\t}", "title": "" }, { "docid": "d1676924db9b8519a57fc1983b3a5768", "score": "0.59795916", "text": "function pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) {\n\n\t\treturn ( cx - px ) * ( ay - py ) - ( ax - px ) * ( cy - py ) >= 0 &&\n\t\t\t ( ax - px ) * ( by - py ) - ( bx - px ) * ( ay - py ) >= 0 &&\n\t\t\t ( bx - px ) * ( cy - py ) - ( cx - px ) * ( by - py ) >= 0;\n\n\t}", "title": "" }, { "docid": "d1676924db9b8519a57fc1983b3a5768", "score": "0.59795916", "text": "function pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) {\n\n\t\treturn ( cx - px ) * ( ay - py ) - ( ax - px ) * ( cy - py ) >= 0 &&\n\t\t\t ( ax - px ) * ( by - py ) - ( bx - px ) * ( ay - py ) >= 0 &&\n\t\t\t ( bx - px ) * ( cy - py ) - ( cx - px ) * ( by - py ) >= 0;\n\n\t}", "title": "" }, { "docid": "4ba49c3639777c40b6dc59329c7f17d3", "score": "0.5978748", "text": "function area(w,h){\n var A = w * h;\n return A;\n}", "title": "" }, { "docid": "8e1a1b74f9738ba694d38b822a3fcbe6", "score": "0.597067", "text": "function pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) {\n\n\t\treturn ( cx - px ) * ( ay - py ) - ( ax - px ) * ( cy - py ) >= 0 &&\n\t\t ( ax - px ) * ( by - py ) - ( bx - px ) * ( ay - py ) >= 0 &&\n\t\t ( bx - px ) * ( cy - py ) - ( cx - px ) * ( by - py ) >= 0;\n\n\t}", "title": "" }, { "docid": "8e1a1b74f9738ba694d38b822a3fcbe6", "score": "0.597067", "text": "function pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) {\n\n\t\treturn ( cx - px ) * ( ay - py ) - ( ax - px ) * ( cy - py ) >= 0 &&\n\t\t ( ax - px ) * ( by - py ) - ( bx - px ) * ( ay - py ) >= 0 &&\n\t\t ( bx - px ) * ( cy - py ) - ( cx - px ) * ( by - py ) >= 0;\n\n\t}", "title": "" }, { "docid": "8e1a1b74f9738ba694d38b822a3fcbe6", "score": "0.597067", "text": "function pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) {\n\n\t\treturn ( cx - px ) * ( ay - py ) - ( ax - px ) * ( cy - py ) >= 0 &&\n\t\t ( ax - px ) * ( by - py ) - ( bx - px ) * ( ay - py ) >= 0 &&\n\t\t ( bx - px ) * ( cy - py ) - ( cx - px ) * ( by - py ) >= 0;\n\n\t}", "title": "" }, { "docid": "8e1a1b74f9738ba694d38b822a3fcbe6", "score": "0.597067", "text": "function pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) {\n\n\t\treturn ( cx - px ) * ( ay - py ) - ( ax - px ) * ( cy - py ) >= 0 &&\n\t\t ( ax - px ) * ( by - py ) - ( bx - px ) * ( ay - py ) >= 0 &&\n\t\t ( bx - px ) * ( cy - py ) - ( cx - px ) * ( by - py ) >= 0;\n\n\t}", "title": "" }, { "docid": "09b6dd6c9f3e550ad23ea055163ad43b", "score": "0.59689224", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}", "title": "" }, { "docid": "09b6dd6c9f3e550ad23ea055163ad43b", "score": "0.59689224", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}", "title": "" }, { "docid": "09b6dd6c9f3e550ad23ea055163ad43b", "score": "0.59689224", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}", "title": "" }, { "docid": "09b6dd6c9f3e550ad23ea055163ad43b", "score": "0.59689224", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}", "title": "" }, { "docid": "09b6dd6c9f3e550ad23ea055163ad43b", "score": "0.59689224", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}", "title": "" }, { "docid": "09b6dd6c9f3e550ad23ea055163ad43b", "score": "0.59689224", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}", "title": "" }, { "docid": "09b6dd6c9f3e550ad23ea055163ad43b", "score": "0.59689224", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}", "title": "" }, { "docid": "09b6dd6c9f3e550ad23ea055163ad43b", "score": "0.59689224", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}", "title": "" }, { "docid": "09b6dd6c9f3e550ad23ea055163ad43b", "score": "0.59689224", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}", "title": "" }, { "docid": "09b6dd6c9f3e550ad23ea055163ad43b", "score": "0.59689224", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}", "title": "" }, { "docid": "09b6dd6c9f3e550ad23ea055163ad43b", "score": "0.59689224", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}", "title": "" }, { "docid": "09b6dd6c9f3e550ad23ea055163ad43b", "score": "0.59689224", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}", "title": "" }, { "docid": "09b6dd6c9f3e550ad23ea055163ad43b", "score": "0.59689224", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}", "title": "" }, { "docid": "09b6dd6c9f3e550ad23ea055163ad43b", "score": "0.59689224", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}", "title": "" }, { "docid": "09b6dd6c9f3e550ad23ea055163ad43b", "score": "0.59689224", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}", "title": "" }, { "docid": "09b6dd6c9f3e550ad23ea055163ad43b", "score": "0.59689224", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}", "title": "" }, { "docid": "09b6dd6c9f3e550ad23ea055163ad43b", "score": "0.59689224", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}", "title": "" }, { "docid": "09b6dd6c9f3e550ad23ea055163ad43b", "score": "0.59689224", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}", "title": "" }, { "docid": "09b6dd6c9f3e550ad23ea055163ad43b", "score": "0.59689224", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}", "title": "" }, { "docid": "09b6dd6c9f3e550ad23ea055163ad43b", "score": "0.59689224", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}", "title": "" }, { "docid": "09b6dd6c9f3e550ad23ea055163ad43b", "score": "0.59689224", "text": "function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}", "title": "" }, { "docid": "916dfcc8532a7e4f80bea4d425558067", "score": "0.5962258", "text": "function area(){\n return this.x * this.y;\n}", "title": "" } ]
8b20081cbfbe693b3291ab02913bd8ae
Resolve a list of Providers.
[ { "docid": "4ac44b265e8b63031d10146a2b916586", "score": "0.6350446", "text": "function resolveReflectiveProviders(providers) {\n var normalized = _normalizeProviders(providers, []);\n var resolved = normalized.map(resolveReflectiveProvider);\n var resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());\n return Array.from(resolvedProviderMap.values());\n}", "title": "" } ]
[ { "docid": "f867bcd19aa7c863cf8b2d1e43ebabfd", "score": "0.70662016", "text": "function resolveProviders(providers) {\n\t var normalized = _normalizeProviders(providers, []);\n\t var resolved = normalized.map(resolveProvider);\n\t return collection_1.MapWrapper.values(mergeResolvedProviders(resolved, new Map()));\n\t}", "title": "" }, { "docid": "f867bcd19aa7c863cf8b2d1e43ebabfd", "score": "0.70662016", "text": "function resolveProviders(providers) {\n\t var normalized = _normalizeProviders(providers, []);\n\t var resolved = normalized.map(resolveProvider);\n\t return collection_1.MapWrapper.values(mergeResolvedProviders(resolved, new Map()));\n\t}", "title": "" }, { "docid": "ebc5b97cee57f6f41b88dc9c5f2c97f6", "score": "0.69636977", "text": "findProviders(using, provider, exactMatch) {\n // TODO(juliemr): implement.\n return [];\n }", "title": "" }, { "docid": "b88691272ed845533e2a4dfeef7ee2be", "score": "0.69220805", "text": "findProviders(using, provider, exactMatch) {\n // TODO(juliemr): implement.\n return [];\n }", "title": "" }, { "docid": "18db3704e7b1a3c7f51d040ac9fe38c0", "score": "0.6869712", "text": "findProviders(using, provider, exactMatch) {\n // TODO(juliemr): implement.\n return [];\n }", "title": "" }, { "docid": "18db3704e7b1a3c7f51d040ac9fe38c0", "score": "0.6869712", "text": "findProviders(using, provider, exactMatch) {\n // TODO(juliemr): implement.\n return [];\n }", "title": "" }, { "docid": "d2e31e87a59754354baabf0533e57cbe", "score": "0.67581695", "text": "function resolveReflectiveProviders(providers){var normalized=_normalizeProviders(providers,[]);var resolved=normalized.map(resolveReflectiveProvider);return MapWrapper.values(mergeResolvedReflectiveProviders(resolved,new Map()));}", "title": "" }, { "docid": "d2e31e87a59754354baabf0533e57cbe", "score": "0.67581695", "text": "function resolveReflectiveProviders(providers){var normalized=_normalizeProviders(providers,[]);var resolved=normalized.map(resolveReflectiveProvider);return MapWrapper.values(mergeResolvedReflectiveProviders(resolved,new Map()));}", "title": "" }, { "docid": "c23bde3eeb67b852bbc243a26955222d", "score": "0.66221553", "text": "function multiProvidersFactoryResolver(_, tData, lData, tNode) {\n return multiResolve(this.multi, []);\n }", "title": "" }, { "docid": "c23bde3eeb67b852bbc243a26955222d", "score": "0.66221553", "text": "function multiProvidersFactoryResolver(_, tData, lData, tNode) {\n return multiResolve(this.multi, []);\n }", "title": "" }, { "docid": "513466df84a9ea74806a0f8ed00ed0ee", "score": "0.66106325", "text": "function providersList() {\n return {\n 'movies.netflix.com' : {\n callback : findNetflixTitles,\n observe: true\n },\n 'www.hulu.com' : { \n callback : findHuluTitles,\n observe: true\n }\n }\n }", "title": "" }, { "docid": "b0d9699cf5e3314d3e9f6b0b909571fd", "score": "0.6603447", "text": "function providersResolver(def, providers, viewProviders) {\n const tView = getTView();\n if (tView.firstCreatePass) {\n const isComponent = isComponentDef(def);\n // The list of view providers is processed first, and the flags are updated\n resolveProvider(viewProviders, tView.data, tView.blueprint, isComponent, true);\n // Then, the list of providers is processed, and the flags are updated\n resolveProvider(providers, tView.data, tView.blueprint, isComponent, false);\n }\n}", "title": "" }, { "docid": "229804e761d26c8c004fc58208ccab59", "score": "0.6597643", "text": "function resolveReflectiveProviders(providers) {\n var normalized = _normalizeProviders(providers, []);\n var resolved = normalized.map(resolveReflectiveProvider);\n return __WEBPACK_IMPORTED_MODULE_0__facade_collection__[\"a\" /* MapWrapper */].values(mergeResolvedReflectiveProviders(resolved, new Map()));\n}", "title": "" }, { "docid": "4b1183a96841e8bed2353cc3944a701e", "score": "0.6540267", "text": "function multiProvidersFactoryResolver(_, tData, lData, tNode) {\n return multiResolve(this.multi, []);\n}", "title": "" }, { "docid": "4b1183a96841e8bed2353cc3944a701e", "score": "0.6540267", "text": "function multiProvidersFactoryResolver(_, tData, lData, tNode) {\n return multiResolve(this.multi, []);\n}", "title": "" }, { "docid": "be4d0df9227de622c97a06fbc670dff9", "score": "0.65152085", "text": "function multiProvidersFactoryResolver(_, tData, lData, tNode) {\n return multiResolve(this.multi, []);\n}", "title": "" }, { "docid": "be4d0df9227de622c97a06fbc670dff9", "score": "0.65152085", "text": "function multiProvidersFactoryResolver(_, tData, lData, tNode) {\n return multiResolve(this.multi, []);\n}", "title": "" }, { "docid": "be4d0df9227de622c97a06fbc670dff9", "score": "0.65152085", "text": "function multiProvidersFactoryResolver(_, tData, lData, tNode) {\n return multiResolve(this.multi, []);\n}", "title": "" }, { "docid": "be4d0df9227de622c97a06fbc670dff9", "score": "0.65152085", "text": "function multiProvidersFactoryResolver(_, tData, lData, tNode) {\n return multiResolve(this.multi, []);\n}", "title": "" }, { "docid": "be4d0df9227de622c97a06fbc670dff9", "score": "0.65152085", "text": "function multiProvidersFactoryResolver(_, tData, lData, tNode) {\n return multiResolve(this.multi, []);\n}", "title": "" }, { "docid": "be4d0df9227de622c97a06fbc670dff9", "score": "0.65152085", "text": "function multiProvidersFactoryResolver(_, tData, lData, tNode) {\n return multiResolve(this.multi, []);\n}", "title": "" }, { "docid": "be4d0df9227de622c97a06fbc670dff9", "score": "0.65152085", "text": "function multiProvidersFactoryResolver(_, tData, lData, tNode) {\n return multiResolve(this.multi, []);\n}", "title": "" }, { "docid": "be4d0df9227de622c97a06fbc670dff9", "score": "0.65152085", "text": "function multiProvidersFactoryResolver(_, tData, lData, tNode) {\n return multiResolve(this.multi, []);\n}", "title": "" }, { "docid": "38ca68d6489a1313fbea6a8199d63946", "score": "0.6501523", "text": "function resolveReflectiveProviders(providers) {\n var normalized = _normalizeProviders(providers, []);\n\n var resolved = normalized.map(resolveReflectiveProvider);\n var resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());\n return Array.from(resolvedProviderMap.values());\n }", "title": "" }, { "docid": "38ca68d6489a1313fbea6a8199d63946", "score": "0.6501523", "text": "function resolveReflectiveProviders(providers) {\n var normalized = _normalizeProviders(providers, []);\n\n var resolved = normalized.map(resolveReflectiveProvider);\n var resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());\n return Array.from(resolvedProviderMap.values());\n }", "title": "" }, { "docid": "5026527552319e87e351ca545f55aa0d", "score": "0.64299107", "text": "function getValidProviders() {\n if(isRunningOverHTTPS()) {\n return httpsProviders\n } else {\n return httpProviders.concat(httpsProviders)\n }\n }", "title": "" }, { "docid": "b831d69a0396382d5c1194edd5ba8fb9", "score": "0.63829076", "text": "function resolveReflectiveProviders(providers) {\n const normalized = _normalizeProviders(providers, []);\n const resolved = normalized.map(resolveReflectiveProvider);\n const resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());\n return Array.from(resolvedProviderMap.values());\n}", "title": "" }, { "docid": "b831d69a0396382d5c1194edd5ba8fb9", "score": "0.63829076", "text": "function resolveReflectiveProviders(providers) {\n const normalized = _normalizeProviders(providers, []);\n const resolved = normalized.map(resolveReflectiveProvider);\n const resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());\n return Array.from(resolvedProviderMap.values());\n}", "title": "" }, { "docid": "0f28a213a7572d4fb8fbf6bb60c1d0e5", "score": "0.63686675", "text": "function resolveReflectiveProviders(providers) {\n const normalized = _normalizeProviders(providers, []);\n const resolved = normalized.map(resolveReflectiveProvider);\n const resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());\n return Array.from(resolvedProviderMap.values());\n}", "title": "" }, { "docid": "ffe20e7383395f6862b294e183e6301a", "score": "0.63426965", "text": "function resolveReflectiveProviders(providers) {\n const normalized = _normalizeProviders(providers, []);\n\n const resolved = normalized.map(resolveReflectiveProvider);\n const resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());\n return Array.from(resolvedProviderMap.values());\n}", "title": "" }, { "docid": "9ec3170e7c80d7031af2d547a2a416ba", "score": "0.62032527", "text": "function multiViewProvidersFactoryResolver(_, tData, lView, tNode) {\n var factories = this.multi;\n var result;\n\n if (this.providerFactory) {\n var componentCount = this.providerFactory.componentProviders;\n var multiProviders = getNodeInjectable(lView, lView[TVIEW], this.providerFactory.index, tNode); // Copy the section of the array which contains `multi` `providers` from the component\n\n result = multiProviders.slice(0, componentCount); // Insert the `viewProvider` instances.\n\n multiResolve(factories, result); // Copy the section of the array which contains `multi` `providers` from other directives\n\n for (var i = componentCount; i < multiProviders.length; i++) {\n result.push(multiProviders[i]);\n }\n } else {\n result = []; // Insert the `viewProvider` instances.\n\n multiResolve(factories, result);\n }\n\n return result;\n }", "title": "" }, { "docid": "9ec3170e7c80d7031af2d547a2a416ba", "score": "0.62032527", "text": "function multiViewProvidersFactoryResolver(_, tData, lView, tNode) {\n var factories = this.multi;\n var result;\n\n if (this.providerFactory) {\n var componentCount = this.providerFactory.componentProviders;\n var multiProviders = getNodeInjectable(lView, lView[TVIEW], this.providerFactory.index, tNode); // Copy the section of the array which contains `multi` `providers` from the component\n\n result = multiProviders.slice(0, componentCount); // Insert the `viewProvider` instances.\n\n multiResolve(factories, result); // Copy the section of the array which contains `multi` `providers` from other directives\n\n for (var i = componentCount; i < multiProviders.length; i++) {\n result.push(multiProviders[i]);\n }\n } else {\n result = []; // Insert the `viewProvider` instances.\n\n multiResolve(factories, result);\n }\n\n return result;\n }", "title": "" }, { "docid": "dd0c0ee0848f792c5f07c26cabb0d9ac", "score": "0.61748374", "text": "function mergeResolvedProviders(providers, normalizedProvidersMap) {\n\t for (var i = 0; i < providers.length; i++) {\n\t var provider = providers[i];\n\t var existing = normalizedProvidersMap.get(provider.key.id);\n\t if (lang_1.isPresent(existing)) {\n\t if (provider.multiProvider !== existing.multiProvider) {\n\t throw new exceptions_2.MixingMultiProvidersWithRegularProvidersError(existing, provider);\n\t }\n\t if (provider.multiProvider) {\n\t for (var j = 0; j < provider.resolvedFactories.length; j++) {\n\t existing.resolvedFactories.push(provider.resolvedFactories[j]);\n\t }\n\t }\n\t else {\n\t normalizedProvidersMap.set(provider.key.id, provider);\n\t }\n\t }\n\t else {\n\t var resolvedProvider;\n\t if (provider.multiProvider) {\n\t resolvedProvider = new ResolvedProvider_(provider.key, collection_1.ListWrapper.clone(provider.resolvedFactories), provider.multiProvider);\n\t }\n\t else {\n\t resolvedProvider = provider;\n\t }\n\t normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n\t }\n\t }\n\t return normalizedProvidersMap;\n\t}", "title": "" }, { "docid": "16f2c4c85ca94a5f936708507c4597ed", "score": "0.616906", "text": "function mergeResolvedProviders(providers, normalizedProvidersMap) {\n\t for (var i = 0; i < providers.length; i++) {\n\t var provider = providers[i];\n\t var existing = normalizedProvidersMap.get(provider.key.id);\n\t if (lang_1.isPresent(existing)) {\n\t if (provider.multiProvider !== existing.multiProvider) {\n\t throw new exceptions_2.MixingMultiProvidersWithRegularProvidersError(existing, provider);\n\t }\n\t if (provider.multiProvider) {\n\t for (var j = 0; j < provider.resolvedFactories.length; j++) {\n\t existing.resolvedFactories.push(provider.resolvedFactories[j]);\n\t }\n\t } else {\n\t normalizedProvidersMap.set(provider.key.id, provider);\n\t }\n\t } else {\n\t var resolvedProvider;\n\t if (provider.multiProvider) {\n\t resolvedProvider = new ResolvedProvider_(provider.key, collection_1.ListWrapper.clone(provider.resolvedFactories), provider.multiProvider);\n\t } else {\n\t resolvedProvider = provider;\n\t }\n\t normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n\t }\n\t }\n\t return normalizedProvidersMap;\n\t}", "title": "" }, { "docid": "438bf41e07aeb02935834757e0de6b00", "score": "0.6136068", "text": "function mergeResolvedReflectiveProviders(providers,normalizedProvidersMap){for(var i=0;i<providers.length;i++){var provider=providers[i];var existing=normalizedProvidersMap.get(provider.key.id);if(isPresent(existing)){if(provider.multiProvider!==existing.multiProvider){throw new MixingMultiProvidersWithRegularProvidersError(existing,provider);}if(provider.multiProvider){for(var j=0;j<provider.resolvedFactories.length;j++){existing.resolvedFactories.push(provider.resolvedFactories[j]);}}else{normalizedProvidersMap.set(provider.key.id,provider);}}else{var resolvedProvider;if(provider.multiProvider){resolvedProvider=new ResolvedReflectiveProvider_(provider.key,ListWrapper.clone(provider.resolvedFactories),provider.multiProvider);}else{resolvedProvider=provider;}normalizedProvidersMap.set(provider.key.id,resolvedProvider);}}return normalizedProvidersMap;}", "title": "" }, { "docid": "438bf41e07aeb02935834757e0de6b00", "score": "0.6136068", "text": "function mergeResolvedReflectiveProviders(providers,normalizedProvidersMap){for(var i=0;i<providers.length;i++){var provider=providers[i];var existing=normalizedProvidersMap.get(provider.key.id);if(isPresent(existing)){if(provider.multiProvider!==existing.multiProvider){throw new MixingMultiProvidersWithRegularProvidersError(existing,provider);}if(provider.multiProvider){for(var j=0;j<provider.resolvedFactories.length;j++){existing.resolvedFactories.push(provider.resolvedFactories[j]);}}else{normalizedProvidersMap.set(provider.key.id,provider);}}else{var resolvedProvider;if(provider.multiProvider){resolvedProvider=new ResolvedReflectiveProvider_(provider.key,ListWrapper.clone(provider.resolvedFactories),provider.multiProvider);}else{resolvedProvider=provider;}normalizedProvidersMap.set(provider.key.id,resolvedProvider);}}return normalizedProvidersMap;}", "title": "" }, { "docid": "2dff7f2cff32a19a4bae4db36c08fa06", "score": "0.60989106", "text": "function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n var existing = normalizedProvidersMap.get(provider.key.id);\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw new __WEBPACK_IMPORTED_MODULE_4__reflective_errors__[\"a\" /* MixingMultiProvidersWithRegularProvidersError */](existing, provider);\n }\n if (provider.multiProvider) {\n for (var j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n }\n else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n }\n else {\n var resolvedProvider = void 0;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n }\n else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n}", "title": "" }, { "docid": "a15e7faf0acfa086d480991a65d32c42", "score": "0.60842407", "text": "function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n var existing = normalizedProvidersMap.get(provider.key.id);\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw new __WEBPACK_IMPORTED_MODULE_4__reflective_errors__[\"f\" /* MixingMultiProvidersWithRegularProvidersError */](existing, provider);\n }\n if (provider.multiProvider) {\n for (var j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n }\n else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n }\n else {\n var resolvedProvider = void 0;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n }\n else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n}", "title": "" }, { "docid": "205f913835c764b8e96bb062e32f2993", "score": "0.6064092", "text": "function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n var existing = normalizedProvidersMap.get(provider.key.id);\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__facade_lang__[\"d\" /* isPresent */])(existing)) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw new __WEBPACK_IMPORTED_MODULE_6__reflective_errors__[\"a\" /* MixingMultiProvidersWithRegularProvidersError */](existing, provider);\n }\n if (provider.multiProvider) {\n for (var j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n }\n else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n }\n else {\n var resolvedProvider;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n }\n else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n}", "title": "" }, { "docid": "4cb50f3da071a6505c0dee909b8caac2", "score": "0.6045535", "text": "function multiViewProvidersFactoryResolver(_, tData, lView, tNode) {\n const factories = this.multi;\n let result;\n\n if (this.providerFactory) {\n const componentCount = this.providerFactory.componentProviders;\n const multiProviders = getNodeInjectable(lView, lView[TVIEW], this.providerFactory.index, tNode); // Copy the section of the array which contains `multi` `providers` from the component\n\n result = multiProviders.slice(0, componentCount); // Insert the `viewProvider` instances.\n\n multiResolve(factories, result); // Copy the section of the array which contains `multi` `providers` from other directives\n\n for (let i = componentCount; i < multiProviders.length; i++) {\n result.push(multiProviders[i]);\n }\n } else {\n result = []; // Insert the `viewProvider` instances.\n\n multiResolve(factories, result);\n }\n\n return result;\n}", "title": "" }, { "docid": "cc4b2056b3c44fc8da93f2a5c126223e", "score": "0.60407317", "text": "function multiViewProvidersFactoryResolver(_, tData, lView, tNode) {\n var factories = this.multi;\n var result;\n if (this.providerFactory) {\n var componentCount = this.providerFactory.componentProviders;\n var multiProviders = getNodeInjectable(lView, lView[TVIEW], this.providerFactory.index, tNode);\n // Copy the section of the array which contains `multi` `providers` from the component\n result = multiProviders.slice(0, componentCount);\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n // Copy the section of the array which contains `multi` `providers` from other directives\n for (var i = componentCount; i < multiProviders.length; i++) {\n result.push(multiProviders[i]);\n }\n }\n else {\n result = [];\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n }\n return result;\n}", "title": "" }, { "docid": "7b4f79a33e5dd93fc2281cd537ecdd5c", "score": "0.6033036", "text": "function multiViewProvidersFactoryResolver(_, tData, lData, tNode) {\n var factories = this.multi;\n var result;\n if (this.providerFactory) {\n var componentCount = this.providerFactory.componentProviders;\n var multiProviders = getNodeInjectable(tData, lData, this.providerFactory.index, tNode);\n // Copy the section of the array which contains `multi` `providers` from the component\n result = multiProviders.slice(0, componentCount);\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n // Copy the section of the array which contains `multi` `providers` from other directives\n for (var i = componentCount; i < multiProviders.length; i++) {\n result.push(multiProviders[i]);\n }\n }\n else {\n result = [];\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n }\n return result;\n}", "title": "" }, { "docid": "7b4f79a33e5dd93fc2281cd537ecdd5c", "score": "0.6033036", "text": "function multiViewProvidersFactoryResolver(_, tData, lData, tNode) {\n var factories = this.multi;\n var result;\n if (this.providerFactory) {\n var componentCount = this.providerFactory.componentProviders;\n var multiProviders = getNodeInjectable(tData, lData, this.providerFactory.index, tNode);\n // Copy the section of the array which contains `multi` `providers` from the component\n result = multiProviders.slice(0, componentCount);\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n // Copy the section of the array which contains `multi` `providers` from other directives\n for (var i = componentCount; i < multiProviders.length; i++) {\n result.push(multiProviders[i]);\n }\n }\n else {\n result = [];\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n }\n return result;\n}", "title": "" }, { "docid": "7b4f79a33e5dd93fc2281cd537ecdd5c", "score": "0.6033036", "text": "function multiViewProvidersFactoryResolver(_, tData, lData, tNode) {\n var factories = this.multi;\n var result;\n if (this.providerFactory) {\n var componentCount = this.providerFactory.componentProviders;\n var multiProviders = getNodeInjectable(tData, lData, this.providerFactory.index, tNode);\n // Copy the section of the array which contains `multi` `providers` from the component\n result = multiProviders.slice(0, componentCount);\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n // Copy the section of the array which contains `multi` `providers` from other directives\n for (var i = componentCount; i < multiProviders.length; i++) {\n result.push(multiProviders[i]);\n }\n }\n else {\n result = [];\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n }\n return result;\n}", "title": "" }, { "docid": "7b4f79a33e5dd93fc2281cd537ecdd5c", "score": "0.6033036", "text": "function multiViewProvidersFactoryResolver(_, tData, lData, tNode) {\n var factories = this.multi;\n var result;\n if (this.providerFactory) {\n var componentCount = this.providerFactory.componentProviders;\n var multiProviders = getNodeInjectable(tData, lData, this.providerFactory.index, tNode);\n // Copy the section of the array which contains `multi` `providers` from the component\n result = multiProviders.slice(0, componentCount);\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n // Copy the section of the array which contains `multi` `providers` from other directives\n for (var i = componentCount; i < multiProviders.length; i++) {\n result.push(multiProviders[i]);\n }\n }\n else {\n result = [];\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n }\n return result;\n}", "title": "" }, { "docid": "7b4f79a33e5dd93fc2281cd537ecdd5c", "score": "0.6033036", "text": "function multiViewProvidersFactoryResolver(_, tData, lData, tNode) {\n var factories = this.multi;\n var result;\n if (this.providerFactory) {\n var componentCount = this.providerFactory.componentProviders;\n var multiProviders = getNodeInjectable(tData, lData, this.providerFactory.index, tNode);\n // Copy the section of the array which contains `multi` `providers` from the component\n result = multiProviders.slice(0, componentCount);\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n // Copy the section of the array which contains `multi` `providers` from other directives\n for (var i = componentCount; i < multiProviders.length; i++) {\n result.push(multiProviders[i]);\n }\n }\n else {\n result = [];\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n }\n return result;\n}", "title": "" }, { "docid": "05e14a136a64eebf2c9e805da678fabb", "score": "0.60282093", "text": "function multiViewProvidersFactoryResolver(_, tData, lView, tNode) {\n const factories = this.multi;\n let result;\n if (this.providerFactory) {\n const componentCount = this.providerFactory.componentProviders;\n const multiProviders = getNodeInjectable(lView, lView[TVIEW], this.providerFactory.index, tNode);\n // Copy the section of the array which contains `multi` `providers` from the component\n result = multiProviders.slice(0, componentCount);\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n // Copy the section of the array which contains `multi` `providers` from other directives\n for (let i = componentCount; i < multiProviders.length; i++) {\n result.push(multiProviders[i]);\n }\n } else {\n result = [];\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n }\n return result;\n}", "title": "" }, { "docid": "219fcc8a8e6a35f8b36e0c061aa26946", "score": "0.5989538", "text": "function multiViewProvidersFactoryResolver(_, tData, lView, tNode) {\n const factories = this.multi;\n let result;\n if (this.providerFactory) {\n const componentCount = this.providerFactory.componentProviders;\n const multiProviders = getNodeInjectable(lView, lView[TVIEW], this.providerFactory.index, tNode);\n // Copy the section of the array which contains `multi` `providers` from the component\n result = multiProviders.slice(0, componentCount);\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n // Copy the section of the array which contains `multi` `providers` from other directives\n for (let i = componentCount; i < multiProviders.length; i++) {\n result.push(multiProviders[i]);\n }\n }\n else {\n result = [];\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n }\n return result;\n}", "title": "" }, { "docid": "219fcc8a8e6a35f8b36e0c061aa26946", "score": "0.5989538", "text": "function multiViewProvidersFactoryResolver(_, tData, lView, tNode) {\n const factories = this.multi;\n let result;\n if (this.providerFactory) {\n const componentCount = this.providerFactory.componentProviders;\n const multiProviders = getNodeInjectable(lView, lView[TVIEW], this.providerFactory.index, tNode);\n // Copy the section of the array which contains `multi` `providers` from the component\n result = multiProviders.slice(0, componentCount);\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n // Copy the section of the array which contains `multi` `providers` from other directives\n for (let i = componentCount; i < multiProviders.length; i++) {\n result.push(multiProviders[i]);\n }\n }\n else {\n result = [];\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n }\n return result;\n}", "title": "" }, { "docid": "e3bc734898fffcf66e4e74344e8bb6e9", "score": "0.5893209", "text": "getProviderSettings() {\n var providers;\n providers = [];\n this.Rules.getProviders().forEach(({provider, provider_name}) => {\n var settings;\n settings = this.SettingsService.getWildcardSettingForProvider(provider);\n if ((settings != null ? settings.blocked : void 0) != null) {\n return providers.push({\n id: provider,\n name: provider_name,\n blockedByDefault: settings.blocked\n });\n }\n });\n return providers;\n }", "title": "" }, { "docid": "62ba9030576c2300c1d28ad7f182326c", "score": "0.5879777", "text": "function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n var existing = normalizedProvidersMap.get(provider.key.id);\n\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n\n if (provider.multiProvider) {\n for (var j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n } else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n } else {\n var resolvedProvider = void 0;\n\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n } else {\n resolvedProvider = provider;\n }\n\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n\n return normalizedProvidersMap;\n }", "title": "" }, { "docid": "62ba9030576c2300c1d28ad7f182326c", "score": "0.5879777", "text": "function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n var existing = normalizedProvidersMap.get(provider.key.id);\n\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n\n if (provider.multiProvider) {\n for (var j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n } else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n } else {\n var resolvedProvider = void 0;\n\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n } else {\n resolvedProvider = provider;\n }\n\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n\n return normalizedProvidersMap;\n }", "title": "" }, { "docid": "7e74f989383e80fa54ede1058ffa3a8a", "score": "0.5878842", "text": "initializeProviders(){\n this.serviceProviders = new ServiceProviderContainer();\n this.serviceProviders.poot();\n }", "title": "" }, { "docid": "0e88f8904bc078d91498a6b7a552dedf", "score": "0.5846117", "text": "function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n var existing = normalizedProvidersMap.get(provider.key.id);\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n if (provider.multiProvider) {\n for (var j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n }\n else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n }\n else {\n var resolvedProvider = void 0;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n }\n else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n}", "title": "" }, { "docid": "0e88f8904bc078d91498a6b7a552dedf", "score": "0.5846117", "text": "function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n var existing = normalizedProvidersMap.get(provider.key.id);\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n if (provider.multiProvider) {\n for (var j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n }\n else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n }\n else {\n var resolvedProvider = void 0;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n }\n else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n}", "title": "" }, { "docid": "0e88f8904bc078d91498a6b7a552dedf", "score": "0.5846117", "text": "function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n var existing = normalizedProvidersMap.get(provider.key.id);\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n if (provider.multiProvider) {\n for (var j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n }\n else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n }\n else {\n var resolvedProvider = void 0;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n }\n else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n}", "title": "" }, { "docid": "0e88f8904bc078d91498a6b7a552dedf", "score": "0.5846117", "text": "function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n var existing = normalizedProvidersMap.get(provider.key.id);\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n if (provider.multiProvider) {\n for (var j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n }\n else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n }\n else {\n var resolvedProvider = void 0;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n }\n else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n}", "title": "" }, { "docid": "0e88f8904bc078d91498a6b7a552dedf", "score": "0.5846117", "text": "function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n var existing = normalizedProvidersMap.get(provider.key.id);\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n if (provider.multiProvider) {\n for (var j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n }\n else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n }\n else {\n var resolvedProvider = void 0;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n }\n else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n}", "title": "" }, { "docid": "0e88f8904bc078d91498a6b7a552dedf", "score": "0.5846117", "text": "function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n var existing = normalizedProvidersMap.get(provider.key.id);\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n if (provider.multiProvider) {\n for (var j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n }\n else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n }\n else {\n var resolvedProvider = void 0;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n }\n else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n}", "title": "" }, { "docid": "0e88f8904bc078d91498a6b7a552dedf", "score": "0.5846117", "text": "function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n var existing = normalizedProvidersMap.get(provider.key.id);\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n if (provider.multiProvider) {\n for (var j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n }\n else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n }\n else {\n var resolvedProvider = void 0;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n }\n else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n}", "title": "" }, { "docid": "0e88f8904bc078d91498a6b7a552dedf", "score": "0.5846117", "text": "function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n var existing = normalizedProvidersMap.get(provider.key.id);\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n if (provider.multiProvider) {\n for (var j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n }\n else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n }\n else {\n var resolvedProvider = void 0;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n }\n else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n}", "title": "" }, { "docid": "0e88f8904bc078d91498a6b7a552dedf", "score": "0.5846117", "text": "function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n var existing = normalizedProvidersMap.get(provider.key.id);\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n if (provider.multiProvider) {\n for (var j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n }\n else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n }\n else {\n var resolvedProvider = void 0;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n }\n else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n}", "title": "" }, { "docid": "0e88f8904bc078d91498a6b7a552dedf", "score": "0.5846117", "text": "function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n var existing = normalizedProvidersMap.get(provider.key.id);\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n if (provider.multiProvider) {\n for (var j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n }\n else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n }\n else {\n var resolvedProvider = void 0;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n }\n else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n}", "title": "" }, { "docid": "74f72b0cb7351502e4e6d530458b30de", "score": "0.57986253", "text": "function _collectRoutes(providers, reflector, ROUTES) {\n return providers.reduce(function (routeList, p) {\n if (p.provide === ROUTES) {\n return routeList.concat(p.useValue);\n }\n else if (Array.isArray(p)) {\n return routeList.concat(_collectRoutes(p, reflector, ROUTES));\n }\n else {\n return routeList;\n }\n }, []);\n}", "title": "" }, { "docid": "0a1af214598a6d5d67b852001d9f23dc", "score": "0.5786194", "text": "function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (let i = 0; i < providers.length; i++) {\n const provider = providers[i];\n const existing = normalizedProvidersMap.get(provider.key.id);\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n if (provider.multiProvider) {\n for (let j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n }\n else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n }\n else {\n let resolvedProvider;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n }\n else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n}", "title": "" }, { "docid": "0a1af214598a6d5d67b852001d9f23dc", "score": "0.5786194", "text": "function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (let i = 0; i < providers.length; i++) {\n const provider = providers[i];\n const existing = normalizedProvidersMap.get(provider.key.id);\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n if (provider.multiProvider) {\n for (let j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n }\n else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n }\n else {\n let resolvedProvider;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n }\n else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n}", "title": "" }, { "docid": "1948a0488ad5dd9590a42b701aea2e43", "score": "0.57749474", "text": "function geocodeAllProviders() {\n \n providers.forEach(function (provider) {\n geocodeRequest(provider);\n });\n\n }", "title": "" }, { "docid": "b46f8c93f4d614ceafce719fcd9c08e1", "score": "0.57746595", "text": "function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (let i = 0; i < providers.length; i++) {\n const provider = providers[i];\n const existing = normalizedProvidersMap.get(provider.key.id);\n\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n\n if (provider.multiProvider) {\n for (let j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n } else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n } else {\n let resolvedProvider;\n\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n } else {\n resolvedProvider = provider;\n }\n\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n\n return normalizedProvidersMap;\n}", "title": "" }, { "docid": "e78c7023c1f1b3cfa60b128a4385d862", "score": "0.57718974", "text": "function openListOfProviders(providersToTry, dbName, schema, wipeIfExists, verbose) {\n if (wipeIfExists === void 0) { wipeIfExists = false; }\n if (verbose === void 0) { verbose = false; }\n var task = SyncTasks.Defer();\n var providerIndex = 0;\n var tryNext = function () {\n if (providerIndex >= providersToTry.length) {\n task.reject();\n return;\n }\n var provider = providersToTry[providerIndex];\n provider.open(dbName, schema, wipeIfExists, verbose).then(function () {\n task.resolve(provider);\n }, function () {\n providerIndex++;\n tryNext();\n });\n };\n tryNext();\n return task.promise();\n}", "title": "" }, { "docid": "4ae02dbc3604d5ded29ec2e3cdb3fcf3", "score": "0.576167", "text": "function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (let i = 0; i < providers.length; i++) {\n const provider = providers[i];\n const existing = normalizedProvidersMap.get(provider.key.id);\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n if (provider.multiProvider) {\n for (let j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n } else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n } else {\n let resolvedProvider;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n } else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n}", "title": "" }, { "docid": "a2681483ade831ad7fe03474b7ca6bae", "score": "0.569742", "text": "function getServiceProviders() {\n matterDetailsService.getMedicalInfo(vm.TemplateModelInfo.matterId, 'all')\n .then(function (resp) {\n vm.associateContactsList = resp.data.medicalinfo;\n if (vm.TemplateModelInfo.typeId == 169) {\n vm.allPhysicians = [];\n _.forEach(vm.associateContactsList, function (currentItem) {\n if (utils.isNotEmptyVal(currentItem.physicianid)) {\n vm.allPhysicians.push(currentItem.physicianid)\n }\n });\n templateHelper.setContactName(vm.allPhysicians);\n }\n var associateContacts = [];\n (vm.TemplateModelInfo.typeId == 16 || vm.TemplateModelInfo.typeId == 21 || vm.TemplateModelInfo.typeId == 131 || vm.TemplateModelInfo.typeId == 139 || vm.TemplateModelInfo.typeId == 138) ?\n _.forEach(vm.associateContactsList, function (physician) {\n if (utils.isNotEmptyVal(physician.physicianid)) {\n associateContacts.push(physician);\n }\n }) :\n _.forEach(vm.associateContactsList, function (provider) {\n if (utils.isNotEmptyVal(provider.providerid)) {\n associateContacts.push(provider);\n }\n });\n vm.associateContactsList = associateContacts;\n addInsuranceProvider();\n }, function (error) {\n notificationService.error(\"Service providers not loaded.\");\n });\n }", "title": "" }, { "docid": "b4af6b336635e11d31b23b3bf24cdf66", "score": "0.56923056", "text": "resetProviders(providedList=[]) {\n let providers = this.originalProviders;\n let initalKeyMap = Object.keys(this.originalProviders);\n let providerList = providedList.length > 0 ? initalKeyMap.filter(p => providedList.indexOf(p) > -1) : initalKeyMap;\n providerList.forEach(function resetPrvider(provider) {\n let parts = provider.split('.');\n if (parts.length > 1) {\n this.removeProviderMap.call(this, parts[0]);\n parts.forEach(this.removeProviderMap, this.getNestedModule.call(this, parts[0]));\n }\n this.removeProviderMap.call(this, provider);\n this.provider(provider, providers[provider]);\n }, this);\n }", "title": "" }, { "docid": "4ec4abc97d4d75945b01b9934d9477ed", "score": "0.56411916", "text": "listIdentityProviders(q, after, limit, type, _options) {\n const result = this.api.listIdentityProviders(q, after, limit, type, _options);\n return result.toPromise();\n }", "title": "" }, { "docid": "1fa75627526f2cb6ebcc2699fa2edd7c", "score": "0.5599105", "text": "function resolveProvider$1(provider, tInjectables, lInjectablesBlueprint, isComponent, isViewProvider) {\n provider = resolveForwardRef(provider);\n\n if (Array.isArray(provider)) {\n // Recursively call `resolveProvider`\n // Recursion is OK in this case because this code will not be in hot-path once we implement\n // cloning of the initial state.\n for (var i = 0; i < provider.length; i++) {\n resolveProvider$1(provider[i], tInjectables, lInjectablesBlueprint, isComponent, isViewProvider);\n }\n } else {\n var tView = getTView();\n var lView = getLView();\n var token = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n var providerFactory = providerToFactory(provider);\n var tNode = getCurrentTNode();\n var beginIndex = tNode.providerIndexes & 1048575\n /* ProvidersStartIndexMask */\n ;\n var endIndex = tNode.directiveStart;\n var cptViewProvidersCount = tNode.providerIndexes >> 20\n /* CptViewProvidersCountShift */\n ;\n\n if (isTypeProvider(provider) || !provider.multi) {\n // Single provider case: the factory is created and pushed immediately\n var factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject);\n var existingFactoryIndex = indexOf(token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount, endIndex);\n\n if (existingFactoryIndex === -1) {\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n\n if (isViewProvider) {\n tNode.providerIndexes += 1048576\n /* CptViewProvidersCountShifter */\n ;\n }\n\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n } else {\n lInjectablesBlueprint[existingFactoryIndex] = factory;\n lView[existingFactoryIndex] = factory;\n }\n } else {\n // Multi provider case:\n // We create a multi factory which is going to aggregate all the values.\n // Since the output of such a factory depends on content or view injection,\n // we create two of them, which are linked together.\n //\n // The first one (for view providers) is always in the first block of the injectables array,\n // and the second one (for providers) is always in the second block.\n // This is important because view providers have higher priority. When a multi token\n // is being looked up, the view providers should be found first.\n // Note that it is not possible to have a multi factory in the third block (directive block).\n //\n // The algorithm to process multi providers is as follows:\n // 1) If the multi provider comes from the `viewProviders` of the component:\n // a) If the special view providers factory doesn't exist, it is created and pushed.\n // b) Else, the multi provider is added to the existing multi factory.\n // 2) If the multi provider comes from the `providers` of the component or of another\n // directive:\n // a) If the multi factory doesn't exist, it is created and provider pushed into it.\n // It is also linked to the multi factory for view providers, if it exists.\n // b) Else, the multi provider is added to the existing multi factory.\n var existingProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex);\n var existingViewProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount);\n var doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingProvidersFactoryIndex];\n var doesViewProvidersFactoryExist = existingViewProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingViewProvidersFactoryIndex];\n\n if (isViewProvider && !doesViewProvidersFactoryExist || !isViewProvider && !doesProvidersFactoryExist) {\n // Cases 1.a and 2.a\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n\n var _factory = multiFactory(isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver, lInjectablesBlueprint.length, isViewProvider, isComponent, providerFactory);\n\n if (!isViewProvider && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = _factory;\n }\n\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length, 0);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n\n if (isViewProvider) {\n tNode.providerIndexes += 1048576\n /* CptViewProvidersCountShifter */\n ;\n }\n\n lInjectablesBlueprint.push(_factory);\n lView.push(_factory);\n } else {\n // Cases 1.b and 2.b\n var indexInFactory = multiFactoryAdd(lInjectablesBlueprint[isViewProvider ? existingViewProvidersFactoryIndex : existingProvidersFactoryIndex], providerFactory, !isViewProvider && isComponent);\n registerDestroyHooksIfSupported(tView, provider, existingProvidersFactoryIndex > -1 ? existingProvidersFactoryIndex : existingViewProvidersFactoryIndex, indexInFactory);\n }\n\n if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders++;\n }\n }\n }\n }", "title": "" }, { "docid": "f72dec44dcf69a4e448b31cfcc2a5795", "score": "0.5584325", "text": "function resolveProvider$1(provider, tInjectables, lInjectablesBlueprint, isComponent, isViewProvider) {\n provider = _resolveForwardRef(provider);\n\n if (Array.isArray(provider)) {\n // Recursively call `resolveProvider`\n // Recursion is OK in this case because this code will not be in hot-path once we implement\n // cloning of the initial state.\n for (var i = 0; i < provider.length; i++) {\n resolveProvider$1(provider[i], tInjectables, lInjectablesBlueprint, isComponent, isViewProvider);\n }\n } else {\n var tView = getTView();\n var lView = getLView();\n var token = isTypeProvider(provider) ? provider : _resolveForwardRef(provider.provide);\n var providerFactory = providerToFactory(provider);\n var tNode = getCurrentTNode();\n var beginIndex = tNode.providerIndexes & 1048575\n /* ProvidersStartIndexMask */\n ;\n var endIndex = tNode.directiveStart;\n var cptViewProvidersCount = tNode.providerIndexes >> 20\n /* CptViewProvidersCountShift */\n ;\n\n if (isTypeProvider(provider) || !provider.multi) {\n // Single provider case: the factory is created and pushed immediately\n var factory = new NodeInjectorFactory(providerFactory, isViewProvider, _ɵɵdirectiveInject);\n var existingFactoryIndex = indexOf(token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount, endIndex);\n\n if (existingFactoryIndex === -1) {\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n\n if (isViewProvider) {\n tNode.providerIndexes += 1048576\n /* CptViewProvidersCountShifter */\n ;\n }\n\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n } else {\n lInjectablesBlueprint[existingFactoryIndex] = factory;\n lView[existingFactoryIndex] = factory;\n }\n } else {\n // Multi provider case:\n // We create a multi factory which is going to aggregate all the values.\n // Since the output of such a factory depends on content or view injection,\n // we create two of them, which are linked together.\n //\n // The first one (for view providers) is always in the first block of the injectables array,\n // and the second one (for providers) is always in the second block.\n // This is important because view providers have higher priority. When a multi token\n // is being looked up, the view providers should be found first.\n // Note that it is not possible to have a multi factory in the third block (directive block).\n //\n // The algorithm to process multi providers is as follows:\n // 1) If the multi provider comes from the `viewProviders` of the component:\n // a) If the special view providers factory doesn't exist, it is created and pushed.\n // b) Else, the multi provider is added to the existing multi factory.\n // 2) If the multi provider comes from the `providers` of the component or of another\n // directive:\n // a) If the multi factory doesn't exist, it is created and provider pushed into it.\n // It is also linked to the multi factory for view providers, if it exists.\n // b) Else, the multi provider is added to the existing multi factory.\n var existingProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex);\n var existingViewProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount);\n var doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingProvidersFactoryIndex];\n var doesViewProvidersFactoryExist = existingViewProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingViewProvidersFactoryIndex];\n\n if (isViewProvider && !doesViewProvidersFactoryExist || !isViewProvider && !doesProvidersFactoryExist) {\n // Cases 1.a and 2.a\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n\n var _factory = multiFactory(isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver, lInjectablesBlueprint.length, isViewProvider, isComponent, providerFactory);\n\n if (!isViewProvider && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = _factory;\n }\n\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length, 0);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n\n if (isViewProvider) {\n tNode.providerIndexes += 1048576\n /* CptViewProvidersCountShifter */\n ;\n }\n\n lInjectablesBlueprint.push(_factory);\n lView.push(_factory);\n } else {\n // Cases 1.b and 2.b\n var indexInFactory = multiFactoryAdd(lInjectablesBlueprint[isViewProvider ? existingViewProvidersFactoryIndex : existingProvidersFactoryIndex], providerFactory, !isViewProvider && isComponent);\n registerDestroyHooksIfSupported(tView, provider, existingProvidersFactoryIndex > -1 ? existingProvidersFactoryIndex : existingViewProvidersFactoryIndex, indexInFactory);\n }\n\n if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders++;\n }\n }\n }\n }", "title": "" }, { "docid": "9dd2b3159fb0bb745db8a9abdb0a8d5c", "score": "0.557821", "text": "providersPath(...paths) {\n return this.makePath(this.directoriesMap.get('providers'), ...paths);\n }", "title": "" }, { "docid": "b031bf53427d1fee524bc17980489568", "score": "0.55734646", "text": "function processInjectorTypesWithProviders(typesWithProviders, providersOut) {\n for (let i = 0; i < typesWithProviders.length; i++) {\n const {\n ngModule,\n providers\n } = typesWithProviders[i];\n deepForEachProvider(providers, provider => {\n ngDevMode && validateProvider(provider, providers || EMPTY_ARRAY, ngModule);\n providersOut.push(provider);\n });\n }\n}", "title": "" }, { "docid": "c67a9fcd039aaf9808a35a32b59c5bc7", "score": "0.553408", "text": "static getAllLoginProviders() {\n store.dispatch(actions.beginCall());\n return new Promise((resolve, reject) => {\n $.ajax(getProvidersUrl, {\n success: (data) => {\n store.dispatch(actions.endCall());\n resolve(data);\n },\n error: (error) => {\n store.dispatch(actions.endCall());\n reject(error);\n }\n });\n });\n }", "title": "" }, { "docid": "7325cbbfef10f8bd62de07d634058aa7", "score": "0.55313057", "text": "function getDefaultProviders() {\n var URIs = [];\n try {\n // figure out our installPath\n let res = Services.io.getProtocolHandler(\"resource\").QueryInterface(Ci.nsIResProtocolHandler);\n let installURI = Services.io.newURI(\"resource://socialdev/\", null, null);\n let installPath = res.resolveURI(installURI);\n let installFile = Services.io.newURI(installPath, null, null);\n try {\n installFile = installFile.QueryInterface(Components.interfaces.nsIJARURI);\n } catch (ex) {} //not a jar file\n\n // load all prefs in defaults/preferences into a sandbox that has\n // a pref function\n let resURI = Services.io.newURI(\"resource://socialdev/providers\", null, null);\n // If we're a XPI, load from the jar file\n if (installFile.JARFile) {\n let fileHandler = Components.classes[\"@mozilla.org/network/protocol;1?name=file\"].\n getService(Components.interfaces.nsIFileProtocolHandler);\n let fileName = fileHandler.getFileFromURLSpec(installFile.JARFile.spec);\n let zipReader = Cc[\"@mozilla.org/libjar/zip-reader;1\"].\n createInstance(Ci.nsIZipReader);\n try {\n zipReader.open(fileName);\n let entries = zipReader.findEntries(\"providers/*\");\n while (entries.hasMore()) {\n var entryName = resURI.resolve(entries.getNext());\n if (entryName.indexOf(\"app.manifest\") >= 0)\n URIs.push(entryName);\n }\n }\n finally {\n zipReader.close();\n }\n }\n else {\n let fURI = resURI.QueryInterface(Components.interfaces.nsIFileURL).file;\n\n var entries = fURI.directoryEntries;\n while (entries.hasMoreElements()) {\n var entry = entries.getNext();\n entry.QueryInterface(Components.interfaces.nsIFile);\n if (entry.leafName.length > 0 && entry.leafName[0] != '.') {\n URIs.push(resURI.resolve(\"providers/\"+entry.leafName+\"/app.manifest\"));\n }\n }\n }\n //dump(JSON.stringify(URIs)+\"\\n\");\n } catch(e) {\n Cu.reportError(e);\n }\n return URIs\n}", "title": "" }, { "docid": "c936c78c0be33332f8aa67965465e5ab", "score": "0.5474839", "text": "function resolveProvider$1(provider, tInjectables, lInjectablesBlueprint, isComponent, isViewProvider) {\n provider = resolveForwardRef(provider);\n if (Array.isArray(provider)) {\n // Recursively call `resolveProvider`\n // Recursion is OK in this case because this code will not be in hot-path once we implement\n // cloning of the initial state.\n for (let i = 0; i < provider.length; i++) {\n resolveProvider$1(provider[i], tInjectables, lInjectablesBlueprint, isComponent, isViewProvider);\n }\n }\n else {\n const tView = getTView();\n const lView = getLView();\n let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n let providerFactory = providerToFactory(provider);\n const tNode = getCurrentTNode();\n const beginIndex = tNode.providerIndexes & 1048575 /* ProvidersStartIndexMask */;\n const endIndex = tNode.directiveStart;\n const cptViewProvidersCount = tNode.providerIndexes >> 20 /* CptViewProvidersCountShift */;\n if (isTypeProvider(provider) || !provider.multi) {\n // Single provider case: the factory is created and pushed immediately\n const factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject);\n const existingFactoryIndex = indexOf(token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount, endIndex);\n if (existingFactoryIndex === -1) {\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += 1048576 /* CptViewProvidersCountShifter */;\n }\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n }\n else {\n lInjectablesBlueprint[existingFactoryIndex] = factory;\n lView[existingFactoryIndex] = factory;\n }\n }\n else {\n // Multi provider case:\n // We create a multi factory which is going to aggregate all the values.\n // Since the output of such a factory depends on content or view injection,\n // we create two of them, which are linked together.\n //\n // The first one (for view providers) is always in the first block of the injectables array,\n // and the second one (for providers) is always in the second block.\n // This is important because view providers have higher priority. When a multi token\n // is being looked up, the view providers should be found first.\n // Note that it is not possible to have a multi factory in the third block (directive block).\n //\n // The algorithm to process multi providers is as follows:\n // 1) If the multi provider comes from the `viewProviders` of the component:\n // a) If the special view providers factory doesn't exist, it is created and pushed.\n // b) Else, the multi provider is added to the existing multi factory.\n // 2) If the multi provider comes from the `providers` of the component or of another\n // directive:\n // a) If the multi factory doesn't exist, it is created and provider pushed into it.\n // It is also linked to the multi factory for view providers, if it exists.\n // b) Else, the multi provider is added to the existing multi factory.\n const existingProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex);\n const existingViewProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount);\n const doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 &&\n lInjectablesBlueprint[existingProvidersFactoryIndex];\n const doesViewProvidersFactoryExist = existingViewProvidersFactoryIndex >= 0 &&\n lInjectablesBlueprint[existingViewProvidersFactoryIndex];\n if (isViewProvider && !doesViewProvidersFactoryExist ||\n !isViewProvider && !doesProvidersFactoryExist) {\n // Cases 1.a and 2.a\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n const factory = multiFactory(isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver, lInjectablesBlueprint.length, isViewProvider, isComponent, providerFactory);\n if (!isViewProvider && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = factory;\n }\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length, 0);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += 1048576 /* CptViewProvidersCountShifter */;\n }\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n }\n else {\n // Cases 1.b and 2.b\n const indexInFactory = multiFactoryAdd(lInjectablesBlueprint[isViewProvider ? existingViewProvidersFactoryIndex :\n existingProvidersFactoryIndex], providerFactory, !isViewProvider && isComponent);\n registerDestroyHooksIfSupported(tView, provider, existingProvidersFactoryIndex > -1 ? existingProvidersFactoryIndex :\n existingViewProvidersFactoryIndex, indexInFactory);\n }\n if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders++;\n }\n }\n }\n}", "title": "" }, { "docid": "c936c78c0be33332f8aa67965465e5ab", "score": "0.5474839", "text": "function resolveProvider$1(provider, tInjectables, lInjectablesBlueprint, isComponent, isViewProvider) {\n provider = resolveForwardRef(provider);\n if (Array.isArray(provider)) {\n // Recursively call `resolveProvider`\n // Recursion is OK in this case because this code will not be in hot-path once we implement\n // cloning of the initial state.\n for (let i = 0; i < provider.length; i++) {\n resolveProvider$1(provider[i], tInjectables, lInjectablesBlueprint, isComponent, isViewProvider);\n }\n }\n else {\n const tView = getTView();\n const lView = getLView();\n let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n let providerFactory = providerToFactory(provider);\n const tNode = getCurrentTNode();\n const beginIndex = tNode.providerIndexes & 1048575 /* ProvidersStartIndexMask */;\n const endIndex = tNode.directiveStart;\n const cptViewProvidersCount = tNode.providerIndexes >> 20 /* CptViewProvidersCountShift */;\n if (isTypeProvider(provider) || !provider.multi) {\n // Single provider case: the factory is created and pushed immediately\n const factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject);\n const existingFactoryIndex = indexOf(token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount, endIndex);\n if (existingFactoryIndex === -1) {\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += 1048576 /* CptViewProvidersCountShifter */;\n }\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n }\n else {\n lInjectablesBlueprint[existingFactoryIndex] = factory;\n lView[existingFactoryIndex] = factory;\n }\n }\n else {\n // Multi provider case:\n // We create a multi factory which is going to aggregate all the values.\n // Since the output of such a factory depends on content or view injection,\n // we create two of them, which are linked together.\n //\n // The first one (for view providers) is always in the first block of the injectables array,\n // and the second one (for providers) is always in the second block.\n // This is important because view providers have higher priority. When a multi token\n // is being looked up, the view providers should be found first.\n // Note that it is not possible to have a multi factory in the third block (directive block).\n //\n // The algorithm to process multi providers is as follows:\n // 1) If the multi provider comes from the `viewProviders` of the component:\n // a) If the special view providers factory doesn't exist, it is created and pushed.\n // b) Else, the multi provider is added to the existing multi factory.\n // 2) If the multi provider comes from the `providers` of the component or of another\n // directive:\n // a) If the multi factory doesn't exist, it is created and provider pushed into it.\n // It is also linked to the multi factory for view providers, if it exists.\n // b) Else, the multi provider is added to the existing multi factory.\n const existingProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex);\n const existingViewProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount);\n const doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 &&\n lInjectablesBlueprint[existingProvidersFactoryIndex];\n const doesViewProvidersFactoryExist = existingViewProvidersFactoryIndex >= 0 &&\n lInjectablesBlueprint[existingViewProvidersFactoryIndex];\n if (isViewProvider && !doesViewProvidersFactoryExist ||\n !isViewProvider && !doesProvidersFactoryExist) {\n // Cases 1.a and 2.a\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n const factory = multiFactory(isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver, lInjectablesBlueprint.length, isViewProvider, isComponent, providerFactory);\n if (!isViewProvider && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = factory;\n }\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length, 0);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += 1048576 /* CptViewProvidersCountShifter */;\n }\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n }\n else {\n // Cases 1.b and 2.b\n const indexInFactory = multiFactoryAdd(lInjectablesBlueprint[isViewProvider ? existingViewProvidersFactoryIndex :\n existingProvidersFactoryIndex], providerFactory, !isViewProvider && isComponent);\n registerDestroyHooksIfSupported(tView, provider, existingProvidersFactoryIndex > -1 ? existingProvidersFactoryIndex :\n existingViewProvidersFactoryIndex, indexInFactory);\n }\n if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders++;\n }\n }\n }\n}", "title": "" }, { "docid": "37eaaf9f5629b91a7db1dcf4466c94ab", "score": "0.54728633", "text": "function resolveAddresses(provider, value, paramType) {\n if (Array.isArray(paramType)) {\n var promises_1 = [];\n paramType.forEach(function (paramType, index) {\n var v = null;\n if (Array.isArray(value)) {\n v = value[index];\n }\n else {\n v = value[paramType.name];\n }\n promises_1.push(resolveAddresses(provider, v, paramType));\n });\n return Promise.all(promises_1);\n }\n if (paramType.type === 'address') {\n return provider.resolveName(value);\n }\n if (paramType.type === 'tuple') {\n return resolveAddresses(provider, value, paramType.components);\n }\n // Strips one level of array indexing off the end to recuse into\n var isArrayMatch = paramType.type.match(/(.*)(\\[[0-9]*\\]$)/);\n if (isArrayMatch) {\n if (!Array.isArray(value)) {\n throw new Error('invalid value for array');\n }\n var promises = [];\n var subParamType = {\n components: paramType.components,\n type: isArrayMatch[1],\n };\n value.forEach(function (v) {\n promises.push(resolveAddresses(provider, v, subParamType));\n });\n return Promise.all(promises);\n }\n return Promise.resolve(value);\n}", "title": "" }, { "docid": "37eaaf9f5629b91a7db1dcf4466c94ab", "score": "0.54728633", "text": "function resolveAddresses(provider, value, paramType) {\n if (Array.isArray(paramType)) {\n var promises_1 = [];\n paramType.forEach(function (paramType, index) {\n var v = null;\n if (Array.isArray(value)) {\n v = value[index];\n }\n else {\n v = value[paramType.name];\n }\n promises_1.push(resolveAddresses(provider, v, paramType));\n });\n return Promise.all(promises_1);\n }\n if (paramType.type === 'address') {\n return provider.resolveName(value);\n }\n if (paramType.type === 'tuple') {\n return resolveAddresses(provider, value, paramType.components);\n }\n // Strips one level of array indexing off the end to recuse into\n var isArrayMatch = paramType.type.match(/(.*)(\\[[0-9]*\\]$)/);\n if (isArrayMatch) {\n if (!Array.isArray(value)) {\n throw new Error('invalid value for array');\n }\n var promises = [];\n var subParamType = {\n components: paramType.components,\n type: isArrayMatch[1],\n };\n value.forEach(function (v) {\n promises.push(resolveAddresses(provider, v, subParamType));\n });\n return Promise.all(promises);\n }\n return Promise.resolve(value);\n}", "title": "" }, { "docid": "37eaaf9f5629b91a7db1dcf4466c94ab", "score": "0.54728633", "text": "function resolveAddresses(provider, value, paramType) {\n if (Array.isArray(paramType)) {\n var promises_1 = [];\n paramType.forEach(function (paramType, index) {\n var v = null;\n if (Array.isArray(value)) {\n v = value[index];\n }\n else {\n v = value[paramType.name];\n }\n promises_1.push(resolveAddresses(provider, v, paramType));\n });\n return Promise.all(promises_1);\n }\n if (paramType.type === 'address') {\n return provider.resolveName(value);\n }\n if (paramType.type === 'tuple') {\n return resolveAddresses(provider, value, paramType.components);\n }\n // Strips one level of array indexing off the end to recuse into\n var isArrayMatch = paramType.type.match(/(.*)(\\[[0-9]*\\]$)/);\n if (isArrayMatch) {\n if (!Array.isArray(value)) {\n throw new Error('invalid value for array');\n }\n var promises = [];\n var subParamType = {\n components: paramType.components,\n type: isArrayMatch[1],\n };\n value.forEach(function (v) {\n promises.push(resolveAddresses(provider, v, subParamType));\n });\n return Promise.all(promises);\n }\n return Promise.resolve(value);\n}", "title": "" }, { "docid": "37eaaf9f5629b91a7db1dcf4466c94ab", "score": "0.54728633", "text": "function resolveAddresses(provider, value, paramType) {\n if (Array.isArray(paramType)) {\n var promises_1 = [];\n paramType.forEach(function (paramType, index) {\n var v = null;\n if (Array.isArray(value)) {\n v = value[index];\n }\n else {\n v = value[paramType.name];\n }\n promises_1.push(resolveAddresses(provider, v, paramType));\n });\n return Promise.all(promises_1);\n }\n if (paramType.type === 'address') {\n return provider.resolveName(value);\n }\n if (paramType.type === 'tuple') {\n return resolveAddresses(provider, value, paramType.components);\n }\n // Strips one level of array indexing off the end to recuse into\n var isArrayMatch = paramType.type.match(/(.*)(\\[[0-9]*\\]$)/);\n if (isArrayMatch) {\n if (!Array.isArray(value)) {\n throw new Error('invalid value for array');\n }\n var promises = [];\n var subParamType = {\n components: paramType.components,\n type: isArrayMatch[1],\n };\n value.forEach(function (v) {\n promises.push(resolveAddresses(provider, v, subParamType));\n });\n return Promise.all(promises);\n }\n return Promise.resolve(value);\n}", "title": "" }, { "docid": "400edb4aa8053506a048194d72e1653f", "score": "0.54711264", "text": "function resolveProvider(provider, tInjectables, lInjectablesBlueprint, isComponent, isViewProvider) {\n provider = resolveForwardRef(provider);\n if (Array.isArray(provider)) {\n // Recursively call `resolveProvider`\n // Recursion is OK in this case because this code will not be in hot-path once we implement\n // cloning of the initial state.\n for (let i = 0; i < provider.length; i++) {\n resolveProvider(provider[i], tInjectables, lInjectablesBlueprint, isComponent, isViewProvider);\n }\n } else {\n const tView = getTView();\n const lView = getLView();\n let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n let providerFactory = providerToFactory(provider);\n const tNode = getCurrentTNode();\n const beginIndex = tNode.providerIndexes & 1048575 /* TNodeProviderIndexes.ProvidersStartIndexMask */;\n const endIndex = tNode.directiveStart;\n const cptViewProvidersCount = tNode.providerIndexes >> 20 /* TNodeProviderIndexes.CptViewProvidersCountShift */;\n if (isTypeProvider(provider) || !provider.multi) {\n // Single provider case: the factory is created and pushed immediately\n const factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject);\n const existingFactoryIndex = indexOf(token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount, endIndex);\n if (existingFactoryIndex === -1) {\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += 1048576 /* TNodeProviderIndexes.CptViewProvidersCountShifter */;\n }\n\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n } else {\n lInjectablesBlueprint[existingFactoryIndex] = factory;\n lView[existingFactoryIndex] = factory;\n }\n } else {\n // Multi provider case:\n // We create a multi factory which is going to aggregate all the values.\n // Since the output of such a factory depends on content or view injection,\n // we create two of them, which are linked together.\n //\n // The first one (for view providers) is always in the first block of the injectables array,\n // and the second one (for providers) is always in the second block.\n // This is important because view providers have higher priority. When a multi token\n // is being looked up, the view providers should be found first.\n // Note that it is not possible to have a multi factory in the third block (directive block).\n //\n // The algorithm to process multi providers is as follows:\n // 1) If the multi provider comes from the `viewProviders` of the component:\n // a) If the special view providers factory doesn't exist, it is created and pushed.\n // b) Else, the multi provider is added to the existing multi factory.\n // 2) If the multi provider comes from the `providers` of the component or of another\n // directive:\n // a) If the multi factory doesn't exist, it is created and provider pushed into it.\n // It is also linked to the multi factory for view providers, if it exists.\n // b) Else, the multi provider is added to the existing multi factory.\n const existingProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex);\n const existingViewProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount);\n const doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingProvidersFactoryIndex];\n const doesViewProvidersFactoryExist = existingViewProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingViewProvidersFactoryIndex];\n if (isViewProvider && !doesViewProvidersFactoryExist || !isViewProvider && !doesProvidersFactoryExist) {\n // Cases 1.a and 2.a\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n const factory = multiFactory(isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver, lInjectablesBlueprint.length, isViewProvider, isComponent, providerFactory);\n if (!isViewProvider && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = factory;\n }\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length, 0);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += 1048576 /* TNodeProviderIndexes.CptViewProvidersCountShifter */;\n }\n\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n } else {\n // Cases 1.b and 2.b\n const indexInFactory = multiFactoryAdd(lInjectablesBlueprint[isViewProvider ? existingViewProvidersFactoryIndex : existingProvidersFactoryIndex], providerFactory, !isViewProvider && isComponent);\n registerDestroyHooksIfSupported(tView, provider, existingProvidersFactoryIndex > -1 ? existingProvidersFactoryIndex : existingViewProvidersFactoryIndex, indexInFactory);\n }\n if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders++;\n }\n }\n }\n}", "title": "" }, { "docid": "f9460bffcf27de5c54568a057c0819fe", "score": "0.54611677", "text": "function resolveProvider$1(provider, tInjectables, lInjectablesBlueprint, isComponent, isViewProvider) {\n provider = resolveForwardRef(provider);\n\n if (Array.isArray(provider)) {\n // Recursively call `resolveProvider`\n // Recursion is OK in this case because this code will not be in hot-path once we implement\n // cloning of the initial state.\n for (let i = 0; i < provider.length; i++) {\n resolveProvider$1(provider[i], tInjectables, lInjectablesBlueprint, isComponent, isViewProvider);\n }\n } else {\n const tView = getTView();\n const lView = getLView();\n let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n let providerFactory = providerToFactory(provider);\n const tNode = getCurrentTNode();\n const beginIndex = tNode.providerIndexes & 1048575\n /* ProvidersStartIndexMask */\n ;\n const endIndex = tNode.directiveStart;\n const cptViewProvidersCount = tNode.providerIndexes >> 20\n /* CptViewProvidersCountShift */\n ;\n\n if (isTypeProvider(provider) || !provider.multi) {\n // Single provider case: the factory is created and pushed immediately\n const factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject);\n const existingFactoryIndex = indexOf(token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount, endIndex);\n\n if (existingFactoryIndex === -1) {\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n\n if (isViewProvider) {\n tNode.providerIndexes += 1048576\n /* CptViewProvidersCountShifter */\n ;\n }\n\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n } else {\n lInjectablesBlueprint[existingFactoryIndex] = factory;\n lView[existingFactoryIndex] = factory;\n }\n } else {\n // Multi provider case:\n // We create a multi factory which is going to aggregate all the values.\n // Since the output of such a factory depends on content or view injection,\n // we create two of them, which are linked together.\n //\n // The first one (for view providers) is always in the first block of the injectables array,\n // and the second one (for providers) is always in the second block.\n // This is important because view providers have higher priority. When a multi token\n // is being looked up, the view providers should be found first.\n // Note that it is not possible to have a multi factory in the third block (directive block).\n //\n // The algorithm to process multi providers is as follows:\n // 1) If the multi provider comes from the `viewProviders` of the component:\n // a) If the special view providers factory doesn't exist, it is created and pushed.\n // b) Else, the multi provider is added to the existing multi factory.\n // 2) If the multi provider comes from the `providers` of the component or of another\n // directive:\n // a) If the multi factory doesn't exist, it is created and provider pushed into it.\n // It is also linked to the multi factory for view providers, if it exists.\n // b) Else, the multi provider is added to the existing multi factory.\n const existingProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex);\n const existingViewProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount);\n const doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingProvidersFactoryIndex];\n const doesViewProvidersFactoryExist = existingViewProvidersFactoryIndex >= 0 && lInjectablesBlueprint[existingViewProvidersFactoryIndex];\n\n if (isViewProvider && !doesViewProvidersFactoryExist || !isViewProvider && !doesProvidersFactoryExist) {\n // Cases 1.a and 2.a\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n const factory = multiFactory(isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver, lInjectablesBlueprint.length, isViewProvider, isComponent, providerFactory);\n\n if (!isViewProvider && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = factory;\n }\n\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length, 0);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n\n if (isViewProvider) {\n tNode.providerIndexes += 1048576\n /* CptViewProvidersCountShifter */\n ;\n }\n\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n } else {\n // Cases 1.b and 2.b\n const indexInFactory = multiFactoryAdd(lInjectablesBlueprint[isViewProvider ? existingViewProvidersFactoryIndex : existingProvidersFactoryIndex], providerFactory, !isViewProvider && isComponent);\n registerDestroyHooksIfSupported(tView, provider, existingProvidersFactoryIndex > -1 ? existingProvidersFactoryIndex : existingViewProvidersFactoryIndex, indexInFactory);\n }\n\n if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders++;\n }\n }\n }\n}", "title": "" }, { "docid": "a80281293d1f9fe7714b9130ae6c2adb", "score": "0.5444403", "text": "listPushProviders(type, _options) {\n const requestContextPromise = this.requestFactory.listPushProviders(type, _options);\n const modelFactory = {\n parseResponse: (rsp) => this.responseProcessor.listPushProviders(rsp),\n };\n return (0, rxjsStub_1.from)(requestContextPromise).pipe((0, rxjsStub_2.mergeMap)((ctx) => {\n return (0, rxjsStub_1.from)(Promise.resolve(new collection_1.Collection(this.configuration.httpApi, ctx.getUrl(), modelFactory, ctx)));\n }));\n }", "title": "" }, { "docid": "0f540682ef62048f7b7245556e061554", "score": "0.542272", "text": "function resolveProvider$1(provider, tInjectables, lInjectablesBlueprint, isComponent, isViewProvider) {\n provider = resolveForwardRef(provider);\n if (Array.isArray(provider)) {\n // Recursively call `resolveProvider`\n // Recursion is OK in this case because this code will not be in hot-path once we implement\n // cloning of the initial state.\n for (var i = 0; i < provider.length; i++) {\n resolveProvider$1(provider[i], tInjectables, lInjectablesBlueprint, isComponent, isViewProvider);\n }\n }\n else {\n var tView = getTView();\n var lView = getLView();\n var token = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n var providerFactory = providerToFactory(provider);\n var tNode = getPreviousOrParentTNode();\n var beginIndex = tNode.providerIndexes & 65535 /* ProvidersStartIndexMask */;\n var endIndex = tNode.directiveStart;\n var cptViewProvidersCount = tNode.providerIndexes >> 16 /* CptViewProvidersCountShift */;\n if (isTypeProvider(provider) || !provider.multi) {\n // Single provider case: the factory is created and pushed immediately\n var factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject);\n var existingFactoryIndex = indexOf(token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount, endIndex);\n if (existingFactoryIndex === -1) {\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += 65536 /* CptViewProvidersCountShifter */;\n }\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n }\n else {\n lInjectablesBlueprint[existingFactoryIndex] = factory;\n lView[existingFactoryIndex] = factory;\n }\n }\n else {\n // Multi provider case:\n // We create a multi factory which is going to aggregate all the values.\n // Since the output of such a factory depends on content or view injection,\n // we create two of them, which are linked together.\n //\n // The first one (for view providers) is always in the first block of the injectables array,\n // and the second one (for providers) is always in the second block.\n // This is important because view providers have higher priority. When a multi token\n // is being looked up, the view providers should be found first.\n // Note that it is not possible to have a multi factory in the third block (directive block).\n //\n // The algorithm to process multi providers is as follows:\n // 1) If the multi provider comes from the `viewProviders` of the component:\n // a) If the special view providers factory doesn't exist, it is created and pushed.\n // b) Else, the multi provider is added to the existing multi factory.\n // 2) If the multi provider comes from the `providers` of the component or of another\n // directive:\n // a) If the multi factory doesn't exist, it is created and provider pushed into it.\n // It is also linked to the multi factory for view providers, if it exists.\n // b) Else, the multi provider is added to the existing multi factory.\n var existingProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex);\n var existingViewProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount);\n var doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 &&\n lInjectablesBlueprint[existingProvidersFactoryIndex];\n var doesViewProvidersFactoryExist = existingViewProvidersFactoryIndex >= 0 &&\n lInjectablesBlueprint[existingViewProvidersFactoryIndex];\n if (isViewProvider && !doesViewProvidersFactoryExist ||\n !isViewProvider && !doesProvidersFactoryExist) {\n // Cases 1.a and 2.a\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n var factory = multiFactory(isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver, lInjectablesBlueprint.length, isViewProvider, isComponent, providerFactory);\n if (!isViewProvider && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = factory;\n }\n registerDestroyHooksIfSupported(tView, provider, tInjectables.length, 0);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += 65536 /* CptViewProvidersCountShifter */;\n }\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n }\n else {\n // Cases 1.b and 2.b\n var indexInFactory = multiFactoryAdd(lInjectablesBlueprint[isViewProvider ? existingViewProvidersFactoryIndex :\n existingProvidersFactoryIndex], providerFactory, !isViewProvider && isComponent);\n registerDestroyHooksIfSupported(tView, provider, existingProvidersFactoryIndex > -1 ? existingProvidersFactoryIndex :\n existingViewProvidersFactoryIndex, indexInFactory);\n }\n if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders++;\n }\n }\n }\n}", "title": "" } ]
0e4a8c74da3389efd1a41a9688aea5f9
The error handler function should be the last function added with app.use. The error handler has a next callback it can be used to chain multiple error handlers.
[ { "docid": "9458525b147b8c6948e60ef4ccba44ab", "score": "0.0", "text": "function IsJsonString(str) {\n try {\n JSON.parse(str);\n } catch (e) {\n return 'not a valid json or invalid request';\n }\n return true;\n }", "title": "" } ]
[ { "docid": "ab777b6b5d5ed52d66775482aa50b38c", "score": "0.8009303", "text": "addErrorHandler() {\n\t\tthis.app.use(this.onError.bind(this));\n\t}", "title": "" }, { "docid": "94a751af008bae12a58320128c9358d0", "score": "0.74226946", "text": "setupExpressErrorHandlers(expressApp) {\n\n\t\t// catch 404 and forward to error handler\n\t\tconst mythis = this;\n\t\texpressApp.use(async function myCustomErrorHandler404(req, res, next) {\n\t\t\tconst jrContext = JrContext.makeNew(req, res, next);\n\t\t\t// if we get here, nothing else has caught the request, so WE push on a 404 error for the next handler\n\n\t\t\t// ATTN: 3/31/20 -- this is newly trapping here other exceptions, such as on calcExpressMiddlewareGetFileLine in jrh_express with a deliberately thrown exception\n\t\t\t// so now we check to make sure we don't handle the stuff we shouldn't\n\n\t\t\tif (mythis.shouldIgnoreError(req)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst handled = false;\n\t\t\tif (req !== undefined) {\n\t\t\t\t// this doesn't display anything, just handled preliminary recording, etc.\n\n\t\t\t\tif (req.url !== undefined) {\n\t\t\t\t\tawait mythis.handle404Error(jrContext);\n\t\t\t\t} else {\n\t\t\t\t\t// this isn't really a 404 error??! for example can get triggered on a generic exception thrown..\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// ATTN: should this be done even if its not a real 404 error?? (i.e. no req.url)\n\t\t\t// then this gets called even if its a 404\n\t\t\tif (next !== undefined) {\n\t\t\t\tnext(httpErrors(404));\n\t\t\t}\n\t\t});\n\n\n\n\t\t// and then this is the fall through NEXT handler, which gets called when an error is unhandled by previous use() or pushed on with next(httperrors())\n\t\t// NOTE that this will also be called by a 404 error\n\t\t// this can get called for example on a passport error\n\t\t// error handler\n\t\texpressApp.use(async function myFallbackErrorHandle(err, req, res, next) {\n\t\t\tconst jrContext = JrContext.makeNew(req, res, next);\n\t\t\t// decide whether to show full error info\n\n\t\t\tif (mythis.shouldIgnoreError(err)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (err === undefined || err.status === undefined) {\n\t\t\t\tconst stack = new Error().stack;\n\t\t\t\tconst fullerError = {\n\t\t\t\t\tmessage: \"Uncaught error\",\n\t\t\t\t\tstatus: 0,\n\t\t\t\t\tstack,\n\t\t\t\t\terr,\n\t\t\t\t};\n\t\t\t\terr = fullerError;\n\t\t\t}\n\n\t\t\t// error message (e.g. \"NOT FOUND\")\n\t\t\tconst errorMessage = err.message;\n\n\t\t\t// error status (e.g. 404)\n\t\t\tconst errorStatus = err.status;\n\n\t\t\t// error details\n\t\t\tlet errorDetails = \"\";\n\t\t\t// add url to display\n\t\t\tif (jrContext.req !== undefined && jrContext.req.url !== undefined) {\n\t\t\t\terrorDetails += \"\\nRequested url: \" + jrContext.req.url;\n\t\t\t\tconst originalUrl = jrhExpress.reqOriginalUrl(jrContext.req);\n\t\t\t\tif (req.url !== originalUrl) {\n\t\t\t\t\terrorDetails += \" (\" + originalUrl + \")\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// extra details if in development mode\n\t\t\tlet errorDebugDetails = \"\";\n\t\t\tif (mythis.isDevelopmentMode() && err.status !== 404) {\n\t\t\t\terrorDebugDetails = mythis.isDevelopmentMode() ? err.stack : \"\";\n\t\t\t}\n\n\t\t\t// extra (session) error info\n\t\t\tlet jrResultError;\n\t\t\tif (req !== undefined) {\n\t\t\t\tjrResultError = jrContext.mergeSessionMessages();\n\t\t\t} else {\n\t\t\t\tjrResultError = new JrResult();\n\t\t\t}\n\n\n\t\t\t// ATTN: 4/2/20 is this a serious error? if so, log (and possibly email) it\n\t\t\tif (mythis.shouldLogError(err)) {\n\t\t\t\t// log the actual exception error plus extra\n\t\t\t\tlet errorLog = err;\n\t\t\t\tif (jrResultError && jrResultError.isError()) {\n\t\t\t\t\terrorLog += \"\\n\" + jrResultError.getErrorsAsString();\n\t\t\t\t}\n\t\t\t\tawait mythis.handleUncaughtError(errorLog);\n\t\t\t}\n\n\n\t\t\t// render the error page\n\t\t\tif (jrContext.res !== undefined) {\n\t\t\t\tjrContext.res.status(err.status || 500);\n\t\t\t\tjrContext.res.render(\"error\", {\n\t\t\t\t\terrorStatus,\n\t\t\t\t\terrorMessage,\n\t\t\t\t\terrorDetails,\n\t\t\t\t\terrorDebugDetails,\n\t\t\t\t\tjrResult: jrResultError,\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\t// only thing to do is exit?\n\t\t\t\tif (true) {\n\t\t\t\t\tprocess.exitCode = 2;\n\t\t\t\t\tprocess.exit();\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\n\n\n\n\n\n\t\t// set up some fatal exception catchers, so we can log these things\n\n\n\t\t// most of our exceptions trigger this because they happen in an await aync with no catch block..\n\t\tprocess.on(\"unhandledRejection\", (reason, promise) => {\n\n\t\t\tif (true && reason !== undefined) {\n\t\t\t\t// just throw it to get app to crash exit\n\t\t\t\t// console.log(\"In unhandledRejection rethrowing reason:\");\n\t\t\t\t// console.log(reason);\n\t\t\t\t// console.log(\"promise\");\n\t\t\t\t// console.log(promise);\n\t\t\t\tthrow reason;\n\t\t\t}\n\n\t\t\t// handle it specifically\n\n\t\t\t// is there a way for us to get the current request being processes\n\t\t\tfs.writeSync(\n\t\t\t\tprocess.stderr.fd,\n\t\t\t\t`unhandledRejection: ${reason}\\n promise: ${promise}`,\n\t\t\t);\n\t\t\tconst err = {\n\t\t\t\tmessage: \"unhandledRejection\",\n\t\t\t\treason,\n\t\t\t\t// promise,\n\t\t\t};\n\n\t\t\t// report it\n\t\t\tthis.handleFatalError(err);\n\n\t\t\t// now throw it to get app to crash exit\n\t\t\tthrow reason;\n\t\t});\n\n\n\n\n\n\t\tprocess.on(\"uncaughtException\", async (err, origin) => {\n\t\t\t// the problem here is that nodejs does not want us calling await inside here and making this async\n\t\t\t// @see https://stackoverflow.com/questions/51660355/async-code-inside-node-uncaughtexception-handler\n\t\t\t// but that makes it difficult to log fatal errors, etc. since our logging functions are async.\n\t\t\t// SO we kludge around this by using an async handler here, which nodejs does not officially support\n\t\t\t// the side effect of doing so is that nodejs keeps rethrowing our error and never exists\n\t\t\t// our solution is to set a flag and force a manual exit when it recurses\n\n\t\t\tif (err.escapeLoops) {\n\t\t\t\tconsole.log(\"\\n\\n----------------------------------------------------------------------\");\n\t\t\t\tconsole.log(\"Encountered UncaughtException forcing process exit, error:\");\n\t\t\t\tconsole.log(err);\n\t\t\t\tconsole.log(\"----------------------------------------------------------------------\\n\\n\");\n\n\t\t\t\t// shutdown profiler?\n\t\t\t\tthis.disEngageProfilerIfAppropriate();\n\n\t\t\t\tprocess.exit();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconsole.log(\"Encountered UncaughtException, logging.\");\n\n\t\t\t// add flag to it to prevent infinite loops\n\t\t\terr.escapeLoops = true;\n\n\t\t\t// handle the fatal error (by logging it presumably)\n\t\t\tawait this.handleFatalError(err);\n\n\t\t\t// wrap error for re-throwing so we don't recursively loop\n\t\t\tconst reerr = {\n\t\t\t\terr,\n\t\t\t\tescapeLoops: true,\n\t\t\t\torigin,\n\t\t\t};\n\n\n\t\t\tconst flagExit = this.getConfigVal(appdef.DefConfigKeyExitOnFatalError);\n\t\t\tif (flagExit) {\n\t\t\t\t// shutdown profiler early, in case we crash trying to shutdown server\n\t\t\t\tthis.disEngageProfilerIfAppropriate();\n\t\t\t\t// attempt to try to shutdown\n\t\t\t\t// ATTN: THIS DOES NOT WORK CLEANLY -- AFTER THIS UNCAUGHT EXCEPTION I CAN'T GET APP TO CLEANLY RUN SHUTDOWN STUFF -- it seems to balk\n\t\t\t\tawait this.shutDown();\n\t\t\t\t// throw it up, this will display it on console and crash out of node\n\t\t\t\tthrow reerr;\n\t\t\t} else {\n\t\t\t\tconsole.log(\"\\n\\n--- Not exiting despite fatal error, because config value of EXIT_ON_FATAL_ERROR = false. ---\\n\\n\");\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "122f70a1f32cc327d37cb7cd1383a2f3", "score": "0.7392908", "text": "function errorMiddleware (err, req, res, next) {\n\n // express must handle case where response has started to be sent\n if (res.headersSent) {\n return next(err)\n }\n\n // handle HTTP errors normally\n if (err instanceof createError.HttpError) {\n res.sendStatus(err.statusCode);\n return;\n }\n\n // catch and handle errors with a stack trace and HTTP 500\n logger.error(err.stack);\n res.sendStatus(500);\n}", "title": "" }, { "docid": "8339235f55dbcab1c78abdcfbb4c57ec", "score": "0.7351829", "text": "function handleErrors(app, middleware) {\n\n\tapp.use(function (err, request, response, next) {\n\t\tif (err.code ==='EBADCSRFTOKEN'){\n\t\t\twinston.error(request.path + '\\n', err.stack)\n\t\t\treturn response.sendStatus(403);\n\t\t}\n\n\t\twinston.error(request.path + '\\n', err.stack);\n\t\tresponse.status(err.status || 500);\n\t\tif (response.locals.isAPI){\n\t\t\treturn response.json({path: request.path, error: err.message});\n\t\t} else {\n\t\t\tmiddleware.buildHeader(request, response, function () {\n\t\t\t\tresponse.render('500', {path: request.path, error: err.message});\n\t\t\t})\n\t\t}\n\t});\n}", "title": "" }, { "docid": "5c6bb2c6515d210f69ef6f7160a04c04", "score": "0.73307806", "text": "handleServerErrors() {\n\t\tthis.app.use((err, req, res, next) => {\n\t\t\tthis.logger.error(err.stack);\n\t\t\tres.status(500).json({error: 'An error occurred while processing the request'});\n\t\t});\n\t}", "title": "" }, { "docid": "42ea86c5d47a843f919c5a805e5a14b8", "score": "0.73282284", "text": "function doErrors(app) {\n return async function(err, req, res, next) {\n const result = {\n status: SERVER_ERROR,\n error: { code: 'SERVER_ERROR', message: err.message },\n };\n res.status(SERVER_ERROR).json(result);\n console.error(err);\n };\n}", "title": "" }, { "docid": "2e88f1cfb4c4f9974f2b99b1a97d525f", "score": "0.72405785", "text": "function error(err) {\n if (fn) {\n fn(err);\n } else {\n //self.req.next(err);\n }\n }", "title": "" }, { "docid": "5db7de5b0a455f2df748c3be1abddb28", "score": "0.71954393", "text": "function errorHandler(error, req, res, next){\n\n /**\n * Invalid Token Error\n */\n if(error.name === \"InvalidTokenError\" || error.name === \"UnauthorizedError\" || error.name === \"JsonWebTokenError\"){\n return res.status(403).json({\n \"code\": 1,\n \"message\": \"Token Validation Error\",\n \"description\": \"Invalid Token Provided\"\n });\n }\n\n /**\n * Token Expiry Error\n */\n if(error.name === \"TokenExpiredError\"){\n return res.status(403).json({\n \"code\": 2,\n \"message\": \"Token Expired Error\",\n \"description\": \"The provided token has expired.\"\n });\n }\n\n /**\n * Token not found error\n */\n if(error.name === \"MissingTokenError\"){\n return res.status(401).json({\n \"code\": 3,\n \"message\": \"Missing Token Error\",\n \"description\": \"Could not find auth token in request header.\"\n });\n }\n\n /**\n * No users found Error\n */\n if(error.name === \"NoUsersFoundError\"){\n return res.status(404).json({\n \"code\": 4,\n \"message\": \"User Not Found Error\",\n \"description\": \"No users could be found.\"\n });\n }\n\n /**\n * User already exists error\n */\n if(error.name === \"UserAlreadyExistsError\"){\n return res.status(400).json({\n \"code\": 5,\n \"message\": \"User Already Exists Error\",\n \"description\": error.message\n });\n }\n\n /**\n * Authentication Failure Error\n */\n if(error.name === \"AuthenticationFailedError\"){\n return res.status(403).json({\n \"code\": 6,\n \"message\": \"Authentication Error\",\n \"description\": \"Invalid Email or Password\"\n });\n }\n\n /**\n * Validation Error\n * If validation error is thrown, it will usually be\n * a list of errors\n */\n if(error.name === \"ValidationError\"){\n return res.status(400).json({\n \"code\": 7,\n \"message\": \"A Validation Error Occured\",\n \"errors\": error\n });\n }\n\n /**\n * InvalidObjectId Error\n * If an invalid ObjectId is provided, this will\n * usually be in routes that calls collection.findById()\n */\n if(error.name === \"InvalidObjectIdError\"){\n return res.status(400).json({\n \"code\": 8,\n \"message\": \"Invalid ID Provided\",\n \"description\": \"The ID provided does not match the format required.\"\n });\n }\n\n /**\n * UnauthorizedEditError\n */\n if(error.name === \"UnauthorizedEditError\"){\n return res.status(403).json({\n \"code\": 9,\n \"message\": \"Unauthorized Edit Error\",\n \"description\": \"You are not authorized to make changes to this record.\"\n });\n }\n\n /**\n * BookingNotFoundError\n */\n if(error.name === \"BookingNotFoundError\"){\n return res.status(404).json({\n \"code\": 10,\n \"message\": \"Booking Not Found\",\n \"description\": \"No Bookings Could be Found\"\n });\n }\n\n /**\n * CustomerAlreadyHasActiveBookingError\n */\n if(error.name === \"CustomerAlreadyHasActiveBookingError\"){\n return res.status(403).json({\n \"code\": 11,\n \"message\": \"Customer Already Has an Active Booking\",\n \"description\": \"The Customer provided already has an active booking, therefore a new one could not be processed.\"\n });\n }\n\n /**\n * UnauthorizedViewError\n */\n if(error.name === \"UnauthorizedViewError\"){\n return res.status(403).json({\n \"code\": 12,\n \"message\": \"Unauthorized View Error\",\n \"description\": \"You are not authorized to view this record.\"\n });\n }\n\n /**\n * InvalidRoleError\n * (Used mostly for verifying roles)\n */\n if(error.name === \"InvalidRoleError\"){\n return res.status(403).json({\n \"code\": 13,\n \"message\": \"Invalid Role Error\",\n \"description\": \"The User does not meet the role requirements to perform this task\"\n });\n }\n\n /**\n * MissingAuthenticationError\n */\n if(error.name === \"MissingAuthenticationError\"){\n return res.status(400).json({\n \"code\": 14,\n \"message\": \"Missing Authentication Error\",\n \"description\": \"The request is missing basic authentication\"\n });\n }\n\n /**\n * CompanyNotFoundError\n */\n if(error.name === \"CompanyNotFoundError\"){\n return res.status(404).json({\n \"code\": 15,\n \"message\": \"Company Not Found\",\n \"description\": \"No Companies Could be Found\"\n });\n }\n\n if(error.name === \"DriverAlreadyAddedError\"){\n return res.status(403).json({\n \"code\": 16,\n \"message\": \"Driver Already Added\",\n \"description\": \"The Driver is Provided is Already a Member of a Company\"\n });\n }\n\n /**\n * Default case, internal server error with details of error\n * TODO: Don't return error.message in production\n */\n return res.status(500).json({\n \"code\": 0,\n \"message\": \"Internal Server Occured\",\n \"description\": error.message\n });\n}", "title": "" }, { "docid": "7be6ea95996f411f009084b61d301b58", "score": "0.71789736", "text": "function doErrors(app)\n{\n return async function(err, req, res, next)\n {\n const result =\n {\n status: SERVER_ERROR,\n errors: [ { code: 'SERVER_ERROR', message: err.message } ],\n };\n res.status(SERVER_ERROR).json(result);\n console.error(err);\n };\n}", "title": "" }, { "docid": "32a5bd72f5c3e300b3dbf301b7a3c3b5", "score": "0.7162344", "text": "errorMiddleware() {\n this.app.use(function (err, req, res, next) {\n if (err.message === \"Cannot read property 'catch' of undefined\") { //! if user didn't found\n let errorMessage = `Got wrong with the request, please check the req.body`\n console.error(`client send incurrent request at : `, req.body)\n res.status(422).send({\n errorMessage\n })\n } else {\n console.error(`${err.message}`)\n res.status(422).send({\n error: err.message\n })\n }\n })\n }", "title": "" }, { "docid": "12fb7285f8592b82e4f2fec34c1241c9", "score": "0.7141329", "text": "function errorHandler(err, req, res, next){\n\t\t\tconsole.error(err.stack);\n\t\t\tthis.respond(res, err);\n\t\t}", "title": "" }, { "docid": "c799e2ef242f2f9cb9dcb28083f36a78", "score": "0.7103794", "text": "function errorHandlerFinal (err, req, res, next) {\n res.status(500)\n res.json({ error: 'bad request'})\n}", "title": "" }, { "docid": "99dea0201f3775163fc104723fdb1103", "score": "0.708955", "text": "function errorHandler(err, req, res, next) {\n\tconsole.error(err.message);\n\tconsole.error(err.stack);\n\tres.status(500).render('error_template', { error: err });\n}", "title": "" }, { "docid": "a7ce739946c933a1d89bad1774350cc8", "score": "0.70608276", "text": "function errorHandler(err, req, res, next) {\n console.error(err.message);\n console.error(err.stack);\n res.status(500).render('error_template', { error: err });\n }", "title": "" }, { "docid": "8ccd09202aa8c2a5bb55f2faca42b5bb", "score": "0.7052482", "text": "function errorHandler(err, req, res, next) {\n console.error(err.message);\n console.error(err.stack);\n res.status(500);\n res.render('error_template', {error: err});\n}", "title": "" }, { "docid": "4951b0b26958141238a95871502253e3", "score": "0.70515627", "text": "function handleError(err, req, res, next) {\n const statusCode = err.statusCode || 500;\n res.status(statusCode).json(envelope.error(statusCode, err.message));\n }", "title": "" }, { "docid": "b3477b6e984f693a38d9d14385b795a5", "score": "0.7048846", "text": "handleError(options) {\n return handleError(options);\n }", "title": "" }, { "docid": "f5f4af93df0b32ccd3ce9aff7a4b8b11", "score": "0.70448637", "text": "function errorHandler(err, req, res, next) {\n console.error(err.message);\n console.error(err.stack);\n res.status(500).render('error_template', { error: err });\n}", "title": "" }, { "docid": "f5f4af93df0b32ccd3ce9aff7a4b8b11", "score": "0.70448637", "text": "function errorHandler(err, req, res, next) {\n console.error(err.message);\n console.error(err.stack);\n res.status(500).render('error_template', { error: err });\n}", "title": "" }, { "docid": "f5f4af93df0b32ccd3ce9aff7a4b8b11", "score": "0.70448637", "text": "function errorHandler(err, req, res, next) {\n console.error(err.message);\n console.error(err.stack);\n res.status(500).render('error_template', { error: err });\n}", "title": "" }, { "docid": "03a6f28ecd7ceb60c70149a4e1f17474", "score": "0.7044755", "text": "static errorHandler( err, req, res, next ){\n const acceptedType = req.accepts([ 'html', 'json' ]);\n const source = err;\n logger.error( 'errorHandler', err, req.url );\n\n err.status = err.status || 500;\n if( acceptedType === 'html' ){\n err.template = err.template || `error-pages/${err.status}`;\n }\n\n if ( source.hasOwnProperty('redirect')) {\n return res.redirect( source.redirect);\n }\n res.status( err.status );\n if ( source.hasOwnProperty('template')){\n return res.render( source.template, { data: source.data || source } );\n }\n if( source.hasOwnProperty('data') ){\n return res.send({ success: true, data: source.data });\n }\n return res.send({ success: false, message: err.message||'Unknown error occured', errors: err.errors });\n }", "title": "" }, { "docid": "adc483501b9d13ea0b3e2a0d5053abc1", "score": "0.7038172", "text": "function handleError(err, req, res, next) {\n console.error(err.stack);\n res.status(500).json({err: err.message});\n }", "title": "" }, { "docid": "8c15c570890bc6588263c874f7fa1c42", "score": "0.7037756", "text": "function errorHandler(err, req, res, next) {\n console.error(err.message);\n console.error(err.stack);\n res.status(500);\n res.render('error_template', { error: err });\n}", "title": "" }, { "docid": "1d7195639867d55baf86ebefd30913ba", "score": "0.70230293", "text": "function errorHandler(err, req, res, next) {\n\tconsole.error(err.message);\n\tconsole.error(err.stack);\n\tres.status(500).render('error_template', {\n\t\terror: err\n\t});\n}", "title": "" }, { "docid": "86228f0676d372062bae548bb144b102", "score": "0.69939417", "text": "function logErrors(err,req,res,next){\n // console.log('middleword: logErrors');\n Sentry.captureException(err);\n debug(err.stack);\n next(err);// con next hago es pasar al siguiente middlewares\n}", "title": "" }, { "docid": "9db710a29b5a7fbc29feca9467bc4c91", "score": "0.69751483", "text": "function errorMiddleware(error, req, res, next) {\n if (res.headersSent) {\n return next(error);\n }\n let status = 500;\n let message = 'Internal servor error';\n if (error instanceof ReturnableError) {\n if (error.status) {\n status = error.status;\n }\n if (error.message) {\n message = error.message;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.error(error);\n } else if (status === 500) {\n logger.error(error);\n }\n res.status(status).send(message);\n}", "title": "" }, { "docid": "dc3d130b79144e4ac6ecf4feb5c9f55a", "score": "0.6952251", "text": "function errorHandler(err,req,res,next) {\n if(err) {\n res.send('There was an error, please try again.');\n }\n}", "title": "" }, { "docid": "aa69072e0fa3f3d8645b8a465b905964", "score": "0.69499487", "text": "function errorHandler (fn) {\n return function(req, res, next) {\n return fn(req, res, next).catch(next);\n };\n}", "title": "" }, { "docid": "865a57da7c747246c4722029b91c385d", "score": "0.6946543", "text": "function apiMiddlewareErrorHandler(err, req, res, next) {\n if (err.name === 'APIError') {\n const ctrl = new BaseCtrl(req, res, next);\n const errors = (err.message.constructor === Array) ? err.message : [err.message];\n ctrl.renderResponse(new ApiResponse({ errors, statusCode: 400 }));\n return;\n }\n\n if (err.name === 'APICmdError') {\n const ctrl = new BaseCtrl(req, res, next);\n const cmdErrors = (err.message.constructor === Array) ? err.message : [err.message];\n ctrl.renderResponse(new ApiResponse({ cmdErrors, statusCode: 400 }));\n return;\n }\n\n return next(err);\n}", "title": "" }, { "docid": "b2675c4c11b904ca9874b139e3035992", "score": "0.69425607", "text": "function errorHandler(error, request, response, next){\n console.error(error.message);\n console.error(error.stack);\n response.status(500);\n response.render('error', { error: error }); \n}", "title": "" }, { "docid": "066db7bd50831b275bd80e2fac8035f8", "score": "0.6915565", "text": "function errorHandler(err, req, res, next) {\n\tconsole.error(err.message);\n\tconsole.error(err.stack);\n\tres.status(500);\n\tres.render('error_temaplate', {\n\t\terror: err\n\t});\n}", "title": "" }, { "docid": "a7ea4cb8006d1d233b8153b107ce53be", "score": "0.68952316", "text": "function errorHandler () {\n\n // connect toggles NODE_ENV environment variable to say if we are or\n // not in an production environment.\n var env = process.env.NODE_ENV || 'development';\n return function (err, req, res, next) {\n res.statusCode = 500;\n switch (env) {\n case 'development':\n res.setHeader('Content-Type', 'application/json');\n res.end(JSON.stringify(err));\n break;\n\n default:\n res.end('Server error');\n }\n }\n}", "title": "" }, { "docid": "73bdb0e007ee4fae7cd890194205852d", "score": "0.68941844", "text": "function errorHandler (err, req, res, next) {\n res.status(err.status || 500);\n res.json({\n message: err.message,\n name: err.name,\n stack: err.stack,\n });\n}", "title": "" }, { "docid": "8160d01fd4a261eccc310c31f8fc86ea", "score": "0.68666065", "text": "function errorHandler (err, req, res, next) {\n if (err instanceof FormError) {\n res.status(err.code)\n .json(err.errors);\n } else if (!isSystemError(err)) {\n res.statusMessage = err.message;\n res.status(err.code || 500)\n .json({ error: err.message });\n }\n}", "title": "" }, { "docid": "e5076751a39a87bdee2ad7135acf2215", "score": "0.68552494", "text": "function errorHandler(err, req, res, next) {\n res.status(res.statusCode || 500);\n res.json({\n message: err.message,\n stack: err.stack,\n });\n}", "title": "" }, { "docid": "6bef905d474706281902cf7671172dd3", "score": "0.6831904", "text": "function handleExpressError (err, req, res, next) {\n debug(`${chalk.red('[error]')}: ${err.message}`)\n console.error(err.stack)\n\n if (err.message.match(/not found/)) {\n return res.status(404).send({ error: err.message })\n }\n\n if (err.message.match(/not authorized/)) {\n return res.status(403).send({ error: err.message })\n }\n\n res.status(500).send({ error: err.message })\n}", "title": "" }, { "docid": "2978e03c6d1140969163086d6075e390", "score": "0.68044376", "text": "function logErrors(err, req, res, next) {\n console.log(err.stack);\n next(err);\n}", "title": "" }, { "docid": "ab319ccf8236c5842294ac0e7fc2eed0", "score": "0.6789472", "text": "function errorHandler(err, req, res, next){\n console.log(err.message);\n console.log(err.stack);\n res.status(500).render('error_template',{ error: err });\n}", "title": "" }, { "docid": "e5fb451f3bd7c2909c90582f44257d60", "score": "0.6771316", "text": "function errorHandler(next, err) {\n const error = new Error(err);\n error.status = HTTPStatus.BAD_REQUEST;\n\n next(err);\n}", "title": "" }, { "docid": "5d752bae2a211a7edf410a14af8188dc", "score": "0.6770366", "text": "function errorHandler(err, req, res, next) {\t\t//eslint-disable-line\n\t//Specific status codes caught\n\tif (err.status) {\n\t\treturn res.status(err.status).send(err);\n\t} else {\n\t\t//Send a generic server error\n\t\treturn res.status(CONST.HTTP_STATUS_CODE.SERVER_ERROR).send(err);\n\t}\n}", "title": "" }, { "docid": "d8a56cc82b670d6546ccadbf088854c8", "score": "0.6763424", "text": "function errorHandler (err, req, res, next) {\n if (err && err instanceof SyntaxError) return res.sendStatus(500);\n\n log.error(err, 'express-level error', {\n body: req.body,\n query: req.query,\n params: req.params,\n ip: req.ip\n });\n return res.sendStatus(500);\n }", "title": "" }, { "docid": "608b96224187f30cdf404171906c472a", "score": "0.67555743", "text": "errorPageHandler(err, req, res, next) {\n res.status(500);\n res.render('error', { error: err.stack });\n }", "title": "" }, { "docid": "62de1004cbbfaef6eaa980a9d6ee46d1", "score": "0.6736441", "text": "function errorHandler(err, req, res, next) {\n res.status(err.statusCode);\n res.send(err.message);\n}", "title": "" }, { "docid": "7c4ac54513ab149d1fef8786c0bdf361", "score": "0.6735294", "text": "function logErrors(err, req, res, next) {\n res.status(err.statusCode || 500);\n logger.log(err.message,'error');\n if (err.stack) {\n logger.log(err.stack,'error');\n }\n next(err);\n }", "title": "" }, { "docid": "d01c37ba5179cc50b5776ff58d379665", "score": "0.6698483", "text": "function errorHandler(error,req,res,next){\nconst code=error.status || error.statusCode || 400;\nres.status(code).json(error.message);\n}", "title": "" }, { "docid": "c22b38e0b9bd8232639476785367b04e", "score": "0.6693814", "text": "_postMiddlewares() {\n this._app.use(errorHandler);\n this._app.use(notFoundHandler);\n }", "title": "" }, { "docid": "a2d80df3d4e341c799afd58f6cd7c37c", "score": "0.6689059", "text": "function errorHandler(error, req, res, next){\n return res.status(error.status || 500).json({\n error: {\n message: error.message || 'Holy crap! What happened?! 😱'\n }\n });\n}", "title": "" }, { "docid": "3287abba7765b1a321d0caae4011bac4", "score": "0.6687315", "text": "function logErrors (err, req, res, next) {\n console.error(err.stack)\n next(err)\n}", "title": "" }, { "docid": "419de12836efeb853751eda28dd32b1f", "score": "0.6686379", "text": "error(err, req, res, next) {\n\n console.log('Express trapped error:', err.message)\n console.log(err)\n\n res.writeHeader(404, 'Not found', { 'Content-Type': 'text/plain; charset=utf-8' })\n res.write('Not found.')\n res.end()\n }", "title": "" }, { "docid": "a4d7b0048760bffd9dec0d9763583ac2", "score": "0.6677737", "text": "function logErrors(err, req, res, next) {\n console.error(err.stack);\n next(err);\n}", "title": "" }, { "docid": "712cc4e037b237c459a1188d597f0a26", "score": "0.6652769", "text": "async handler(err , req , res , next) { // for render ejs speacial for errors\n const statusCode = err.status || 500;\n const message = err.message || ''; // just message\n const stack = err.stack || ''; // all of errs detail\n\n const layouts = { // beacuse it is middleware we can set up layout ejs\n layout: 'errors/master',\n extractScripts: false,\n extractStyles: false\n }\n\n if(config.debug) {\n return res.render('errors/stack' , { ...layouts , message , stack }); \n }\n\n return res.render(`errors/${statusCode}` , { ...layouts , message , stack });\n }", "title": "" }, { "docid": "595c624dea08af0da214a59c8556fe42", "score": "0.6627902", "text": "function onErrorForEndUser (err, req, res, next){\n console.error(err.stack);\n res.render('error', { about: packagejson, env: app.get('env') });\n}", "title": "" }, { "docid": "3f2f796da35e0ae41d8769992f68692e", "score": "0.66081876", "text": "error(handler) {\n if (arguments.length) {\n return this._error = handler;\n }\n return this._error;\n }", "title": "" }, { "docid": "50656120432d84361482bdeedcae6d3e", "score": "0.6590777", "text": "function errorResponseHandler(err, req, res, next) {\r\n res.status(500);\r\n res.json({ mgs: err.message });\r\n console.log(err)\r\n}", "title": "" }, { "docid": "649e494c088b002f1c948bfce3fe3086", "score": "0.6583709", "text": "function errorHandler(err, req, res, next) {\n let addr = req.headers['x-forwarded-for'] || req.connection.remoteAddress;\n let msg = \"Request from \" + addr + \": \" + req.originalUrl;\n error(req, res, \"\", \"1500\", null, msg);\n}", "title": "" }, { "docid": "b41bc3ba89aa2a8ed34f60611f4ee4ad", "score": "0.6583123", "text": "function errorHandler(error, req, res) {\n console.log('Server Error', error);\n res.status(500).send(error);\n}", "title": "" }, { "docid": "98d46fac6d90372dc1312059c1650368", "score": "0.6571465", "text": "function errorHandler(error, req, res, next) {\n // if we don't make it to the 404 (err.status specified in index.js) that means there has been a route but something went wrong on the server (that's why 500)\n // we add json method so we can then return an object called error\n return res.status(error.status || 500).json({\n error: {\n message: error.message || 'Oops! Something went wrong!'\n }\n });\n}", "title": "" }, { "docid": "6ed39cac1361a6bfcb0c2e4a75a90fae", "score": "0.6570024", "text": "async function errorMiddleware(\n error,\n request,\n response,\n next\n) {\n response.status(error.status || 500).send({\n status: error.status || 500,\n error: error && error.message ? error.message : error,\n });\n}", "title": "" }, { "docid": "a58a9a0030debf7fa9dee0f6028f3ef5", "score": "0.6567607", "text": "function logErrors(err, req, res, next) {\n console.error(err.message);\n next(err);\n}", "title": "" }, { "docid": "8356f2315561e7ee7b6cc94bb36ecdd8", "score": "0.6547553", "text": "function errorHandlerProduction(err, req, res, next) {\n res.status(err.status || 500);\n res.render('error', {\n message: err.message,\n error: {}\n });\n}", "title": "" }, { "docid": "90fbe3306055b6e1f2f2655f3671e3c3", "score": "0.65414906", "text": "function errHandler(err) {\n console.error('There was an error performing the operation');\n console.log(err);\n console.log(err.code);\n return console.error(err.message);\n}", "title": "" }, { "docid": "65c2513196d64a4c2ce01e1d5dd69065", "score": "0.6524284", "text": "function errorHandlerF(err, req, res, next) {\n if (err instanceof IncompleteJson ||\n err instanceof ResourceNotFound ||\n err instanceof RelatedResourceNotFound ||\n err instanceof NotifyFailed ||\n err instanceof Unexpected) {//cuando se usa?\n res.status(err.status)\n res.json({\n status: err.status,\n errorCode: err.errorCode\n })\n } else if (err.type === 'entity.parse.failed') {\n res.status(new InvalidJson.status);\n res.json({\n status: new InvalidJson.status,\n errorCode: new InvalidJson.errorCode\n })\n } else {\n next(err);\n }\n}", "title": "" }, { "docid": "b1190cc2f9b3502bcc02672a305a3a8f", "score": "0.6521359", "text": "function handleError(err, req, res, next) {\n var output = {\n error: {\n name: err.name,\n message: err.message,\n text: err.toString()\n }\n };\n var statusCode = err.status || 500;\n res.status(statusCode).json(output);\n}", "title": "" }, { "docid": "1c9b4bceb743f35489d5caa5cf581570", "score": "0.6518399", "text": "function error(error, req, res, next) {\n let response;\n if (NODE_ENV === 'production') {\n response = {\n error: {\n message: 'server error',\n },\n };\n } else {\n console.log(error);\n response = { message: error.message, error };\n }\n res.status(500).send(response);\n}", "title": "" }, { "docid": "77d35bffd648a4644f285e0ded7c7aa7", "score": "0.65097743", "text": "function handleError(req, res){\n throw new Error('something wrong!!');\n}", "title": "" }, { "docid": "f1524582a43c77d513d3e2bd34b79371", "score": "0.64979", "text": "function errorHandler(error, req, response) {\n response.status(500).send(error);\n}", "title": "" }, { "docid": "0217f31b5f5f0d8708295f4dd2d9f34d", "score": "0.64966273", "text": "exception () {\n this.express.use(async (err, req, res, next) => {\n /**\n\t\t\t * verify if error is instance class ValidationError\n\t\t\t * case true, this error is valition fields request\n\t\t\t */\n if (err instanceof validator.ValidationError) {\n res.status(err.status).json({\n status: err.status,\n message: err.statusText,\n errors: err.errors\n })\n }\n\n /**\n\t\t\t * pretty logger error in development environment\n\t\t\t * return JSON with info logger\n\t\t\t */\n if (process.env.NODE_ENV !== 'production') {\n const youch = new Youch(err)\n return res.json(await youch.toJSON())\n }\n\n res.status(err.status || 500).json({ error: 'Internal Server Error' })\n })\n }", "title": "" }, { "docid": "78cd2cdf7202e12d0a6720c34a096d9e", "score": "0.6481301", "text": "if (!options.errorHandler) { options.errorHandler = () => {} }", "title": "" }, { "docid": "62b274dd23ae0d138bad258bf8392cf8", "score": "0.6480541", "text": "function errorHandler(err, req, res) {\n if (app.get('env') === \"development\") {\n console.log(err);\n }\n res.sendStatus(err.status || 500);\n}", "title": "" }, { "docid": "777c478bce7439bd526356a4f6ec567b", "score": "0.6466021", "text": "function handleErr (err) {\n self.emit('error', err);\n cb(err);\n }", "title": "" }, { "docid": "777c478bce7439bd526356a4f6ec567b", "score": "0.6466021", "text": "function handleErr (err) {\n self.emit('error', err);\n cb(err);\n }", "title": "" }, { "docid": "b696c45d18c7faedd90a2b1714eb008c", "score": "0.6458879", "text": "function ErrorHandler() {}", "title": "" }, { "docid": "ab18585fdfcecabd3dadaf3d706eb692", "score": "0.6453161", "text": "function clientErrorHandler(err, req, res, next){\n // catch errors for AJAX request\n if(req.xhr){\n res.status(500).json({ err: err.message });\n }else{\n next(err);\n }\n}", "title": "" }, { "docid": "03ec310419ae62d57047d43d2271df1b", "score": "0.6444634", "text": "function handleError(res) {\n return function(error) {\n res.status(500).send({error: error.message});\n }\n}", "title": "" }, { "docid": "610c93ab505284769099ed14ea1545e9", "score": "0.6437712", "text": "function onError(err, req, res, next) { // eslint-disable-line\n req.log.error({ err });\n // TODO show nice 500 error page\n try {\n res.redirect('/404');\n // res.status(500).send('this should be the error page');\n } catch (e) {\n // Error page had an error\n res.redirect('/404');\n // res.status(500).send('something went wrong...');\n }\n}", "title": "" }, { "docid": "45069332a2ea9f05229b29e0f48b03cc", "score": "0.6434795", "text": "catch404() {\n // catch 404 and forward to error handler\n this.app.use(\n function(req, res, next) {\n next(this.createError(404));\n }.bind(this)\n );\n }", "title": "" }, { "docid": "258538ce1eca6b3bb5ea95884f0a3e32", "score": "0.64319116", "text": "handle(error, ctx) {\n ctx.response.status(error.status).send(error.body);\n }", "title": "" }, { "docid": "5a2872418b5b309ec122cae36a5d9042", "score": "0.64237726", "text": "function wrapErrors(err, req, res, next) {\n // Valida de que el error sea de tipo boom, con la siguiente particularidad err.isBoom\n if (!err.isBoom) {\n // Se manda a llamar el siguiente middleware, obligando a que el error sea de tipo Boom\n next(boom.badImplementation(err));\n }\n\n // en caso de que el error sea de tipo boom unicamente se manda al siguiente middleware\n next(err);\n}", "title": "" }, { "docid": "9c9d99816ec018987cad7d0ec380cfc0", "score": "0.6407992", "text": "function wrapErrors(err, req, res, next) {\n // sí el error no es boom.\n if(!err.isBoom) {\n next(boom.badImplementation(err));\n }\n\n next(err);\n}", "title": "" }, { "docid": "e4572a07eaad84d56f2005b1de04d704", "score": "0.63965887", "text": "function handleRouteErrors(error, req, res, next) {\n // Customize Joi validation error formatting (i.e. db schema validation)\n if (error.isJoi) {\n error.message = error.details.map((e) => e.message).join(\"; \");\n error.status = 400;\n }\n\n res\n .status(error.status || 500)\n .json({ error: { message: error.message, status: error.status } });\n\n if (config.env == \"dev\") {\n next(error);\n }\n}", "title": "" }, { "docid": "205da9f4aee37929a9856f719ac24715", "score": "0.63873494", "text": "function errHandler(err) {\n console.error('There was an error performing the operation');\n console.log(err);\n console.log(err.code);\n console.error(err.message);\n}", "title": "" }, { "docid": "a341606cd633130f293f74eff876f526", "score": "0.63867944", "text": "function errorHandler(err, req, res) {\n\n\n // return message error as json object\n res.json({ error: err.message })\n\n}", "title": "" }, { "docid": "8dc0e74981260f9b0930d18329d6c128", "score": "0.6374077", "text": "function createCatchMiddleware(options = {}) {\n const verbose = typeof options.verbose !== 'undefined' ? options.verbose : false;\n logger_1.default.info('Use catch middleware to serve errors');\n return (error, req, res, next) => __awaiter(this, void 0, void 0, function* () {\n verbose && logger_1.default.error(error);\n const body = verbose ? error.toString() : undefined;\n res.status(500).send(body);\n });\n}", "title": "" }, { "docid": "2e889ac84c82a033dbe1e9aaee72207e", "score": "0.6351017", "text": "function errorHandler (res, error) {\n if (error instanceof CustomError) {\n res.status(error.responseCode).send(error)\n } else if (error instanceof Error){\n res.status(500).send(error.message)\n } else {\n res.status(500).send(error)\n }\n}", "title": "" }, { "docid": "be4cbfe0c12d12343d858b0620efbe87", "score": "0.63494664", "text": "function routeConfig(app){\n app.use('/analyze', analyzeRouter);\n app.use('/phone', phoneRouter);\n // app.use('/vidToPic', vidToPic);\n\n /// catch 404 and forward to error handler\n app.use(function(req, res, next) {\n var err = new Error('Not Found');\n err.status = 404;\n next(err);\n });\n\n // production error handler\n // no stacktraces leaked to user\n app.use(function(err, req, res, next) {\n res.status(err.status || 500);\n res.send({\n message: err.message,\n error: {}\n });\n });\n}", "title": "" }, { "docid": "631483a1a0a73974bcbe873ec3e68a55", "score": "0.6340264", "text": "function errorHandler(err) {\n log.debug('errorHandler %o', err);\n // socket.emit('error', err);\n }", "title": "" }, { "docid": "4930bf2fe4e301c6e1d5d5771ce51744", "score": "0.6337843", "text": "function errors(error, res) {\n console.error(error);\n res.render('./pages/error');\n}", "title": "" }, { "docid": "b8ff90f83224f700f9681462568bd2e7", "score": "0.6337611", "text": "error(err) {\n // Reject promise\n this.app._reject(err)\n }", "title": "" }, { "docid": "16c3b0f50c486c1fafb491edb2838f10", "score": "0.6334434", "text": "function handleError(err, res) {\n console.log(`ERROR: ${err}`);\n\n //Do not send error message as we do not want to expose any internal working of our application\n res.sendStatus(500);\n}", "title": "" }, { "docid": "f518442e9a238cfd993e0bf87aafba40", "score": "0.63306224", "text": "handleError(err){\n console.error(err)\n }", "title": "" }, { "docid": "c1885b254e93ec14925b1230ac9b6083", "score": "0.63101053", "text": "error (err, req, res, _next) {\n res.status(500).json({code: err.message})\n }", "title": "" }, { "docid": "46f4dd4dbb1b2f30795e2d7bc004237c", "score": "0.63042164", "text": "function onError(error){\r\n if(error.syscall !== 'listen'){\r\n logger.error(error.code + ' not equal listen', 'serverOnErrorHandler', 10)\r\n throw error\r\n }\r\n //handle specific error so useing switch case\r\n switch (error.code) {\r\n case 'EACCES':\r\n logger.error(error.code + ':elavated privileges required', 'serverOnErrorHandler', 10)\r\n process.exit(1)\r\n break\r\n case 'EADDRINUSE':\r\n logger.error(error.code + ':port is already in use.', 'serverOnErrorHandler', 10)\r\n process.exit(1)\r\n break\r\n default:\r\n logger.error(error.code + ':some unknown error occured', 'serverOnErrorHandler', 10)\r\n throw error\r\n }\r\n}", "title": "" }, { "docid": "a71fb2a6f1fd2be54caa54742842b0a2", "score": "0.62988824", "text": "function onError(err) {\n\t\tVERBOSE && console.error('ERROR', err);\n\t\tproxyReq.abort();\n\t\tif (options.backedBy) {\n\t\t\toptions.hostConfig.passthrough = false;\n\t\t\tstubMiddleware(req, res, next, options);\n\t\t} else {\n\t\t\tnext(err);\n\t\t}\n\t}", "title": "" }, { "docid": "64c881be8a5bd8a65b6d4b01f308e588", "score": "0.6295556", "text": "function next(err) {\n if (err) throw (err)\n index++\n if (index >= middleware.length) return\n let fn = middleware[index]\n if (!fn) next(err)\n fn(req, res, next)\n }", "title": "" }, { "docid": "f3468eb694e85def9d1b0b2be6bc4f7c", "score": "0.6294168", "text": "function mongoDbErrorHandling(err) {\n console.log();\n console.log('There was an error!');\n console.log(err);\n console.log();\n // return res.send(err);\n return res.send(500, { error: err });\n}", "title": "" }, { "docid": "16b97693226635b0e08689a8856eae62", "score": "0.62825096", "text": "function logErrors(err, req, res, next) {\n var status = err.statusCode || 500;\n console.error(status + ' ' + (err.message ? err.message : err));\n if(err.stack) { console.error(err.stack); }\n next(err);\n}", "title": "" }, { "docid": "6044f74f01b9c162a3c835a1a516137f", "score": "0.6268368", "text": "function app(req, res, next) {\n\t\tapp.handler(req, res, next);\n\t}", "title": "" }, { "docid": "db1747e81f180d5011a65369f6c0650d", "score": "0.6265623", "text": "async function catchError(ctx, next) {\n try {\n await next();\n if (ctx.status === 404) ctx.throw(404);\n } catch(err) {\n let status = err.status || 500;\n // let message = e.message || 'Server Error!'\n ctx.status = status;\n // helper for use in error.pug view\n ctx.state = {\n status: status,\n helpers: helpers,\n currentUser: null\n };\n await ctx.render('error/error', {});\n if (status == 500) {\n console.log( 'TELL ME THE STATUS', err );\n }\n }\n}", "title": "" }, { "docid": "4f89536ca83405a7b8caa95dfe7fbe2b", "score": "0.625532", "text": "function handleError(err, res) {\n console.error(err);\n if (res) res.status(500).send('Sorry, something went wrong');\n}", "title": "" }, { "docid": "e4d9ef39eed7900efe2f68fa6162a2cf", "score": "0.6252551", "text": "function errorResponder(errors = {}) {\n var createResponder = function(errorCode, res) {\n return (extra) => {\n var obj = {error: Object.assign({}, errors[errorCode])}, status = obj.error.status\n delete obj.error.status\n if(!obj.error.code) { obj.error.code = errorCode }\n\n if(is.string(extra) || is.array(extra)) {\n if(is.string(extra)) { extra = [extra] }\n for(var i in extra) { obj.error.message = obj.error.message.replace(\"$\" + (parseFloat(i) + 1), extra[i]) }\n }\n else if(is.object(extra)) {\n obj.error = Object.assign(obj.error, extra)\n }\n\n if([429, 401, 403].includes(status)) {\n return setTimeout(() => res.status(status).json(obj), randomBetween(200, 1000))\n }\n return res.status(status).json(obj)\n }\n }\n\n return async (req, res, next) => {\n try {\n if(!res.error) { res.error = {} }\n for(var code in errors) { res.error[code] = createResponder(code, res) }\n next()\n }\n catch (e) { next(e) }\n }\n}", "title": "" }, { "docid": "40299b34032f2c67550bc4f8c6ff2f2b", "score": "0.6251916", "text": "function errHandler(error) {\n console.log(error);\n}", "title": "" } ]
dd9d19a9b583375a09d8a18dad655224
Runs password through check and then updates GUI
[ { "docid": "4bfcefbcf91cef638f50eb91f5455092", "score": "0.0", "text": "function runPassword(password, dispatch) {\n console.log('runPassword');\n // Check password\n var nScore = checkPassword(password);\n var passStrengthText = '';\n var passStrengthColor = 'white';\n var passError = '';\n\n if (nScore >= 90) {\n passStrengthText = t.VSecure;\n passStrengthColor = '#0ca908';\n }\n // -- Secure\n else if (nScore >= 80) {\n passStrengthText = t.Secure;\n passStrengthColor = '#7ff67c';\n }\n // -- Very Strong\n else if (nScore >= 80) {\n passStrengthText = t.VStrong;\n passStrengthColor = '#008000';\n }\n // -- Strong\n else if (nScore >= 60) {\n passStrengthText = t.Strong;\n passStrengthColor = '#006000';\n }\n // -- Average\n else if (nScore >= 40) {\n passStrengthText = t.Average;\n passStrengthColor = '#e3cb00';\n }\n // -- Weak\n else if (nScore >= 20) {\n passStrengthText = t.Weak;\n passStrengthColor = '#Fe3d1a';\n passError = t.PWeak;\n }\n // -- Very Weak\n else {\n passStrengthText = t.VWeak;\n passStrengthColor = '#e71a1a';\n passError = t.PVWeak;\n }\n\n dispatch({\n type: CHECK_PASSWORD_STRENGTH,\n payload: { password, passStrengthText, passStrengthColor, passError }\n });\n}", "title": "" } ]
[ { "docid": "221ac064ac38ebf7c55743bfabbf512e", "score": "0.757227", "text": "function updateUI(){\n const passwordLength = passwordLengthElem.value;\n const includeLowercase = lowercaseElem.checked;\n const includeUppercase = uppercaseElem.checked;\n const includeNumbers = numbersElem.checked;\n const includeSymbols = symbolsElem.checked;\n const password = generatePassword(passwordLength, includeLowercase, includeUppercase, includeNumbers, includeSymbols);\n passwordElem.innerText = password;\n}", "title": "" }, { "docid": "27fc8c89bc785ad1a1e69732a1498934", "score": "0.72630936", "text": "function checkPassword() {\n\tscrollToBottom();\n\tif (level == 1)\n\t\tswitch (textInBox) {\n\t\t\tcase password:\n\t\t\t\tendLevel();\n\t\t\t\tbreak;\n\t\t\tcase \"root\":\n\t\t\t\tendLevel();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tinputPhase = 0;\n\t\t\t\tunknownInput();\n\t\t}\n\t\tscrollToBottom();\n}", "title": "" }, { "docid": "041f27569a4ee47025cdea15ff894c50", "score": "0.69073707", "text": "function loadPasswordScreen() {\r\n //generalProgressCircle && hideLoadingSettings(generalProgressCircle);\r\n prepareViewer(false, null, false);\r\n clearRight();\r\n\r\n var loading = createLabel('Loading...');\r\n var loadingSetting = createSetting('', loading);\r\n settingsContainer.append(loadingSetting);\r\n\r\n TAG.Worktop.Database.checkSetting('AllowChangePassword', function (val) {\r\n loadingSetting.remove();\r\n if (val.toLowerCase() === 'true') {\r\n var oldInput = createTextInput('', false);\r\n var newInput1 = createTextInput('', false);\r\n var newInput2 = createTextInput('', false);\r\n var msgLabel = createLabel('');\r\n\r\n newInput1.on('keyup', function () {\r\n changesMade = true;\r\n saveButton.prop(\"disabled\", false);\r\n saveButton.css(\"opacity\", 1);\r\n });\r\n\r\n oldInput.attr('type', 'password');\r\n newInput1.attr('type', 'password');\r\n newInput2.attr('type', 'password');\r\n\r\n var old = createSetting('Current Password', oldInput);\r\n var new1 = createSetting('New Password', newInput1);\r\n var new2 = createSetting('Confirm New Password', newInput2);\r\n var msg = createSetting('', msgLabel);\r\n\r\n settingsContainer.append(old);\r\n settingsContainer.append(new1);\r\n settingsContainer.append(new2);\r\n \r\n\r\n //Hide or else unused div covers 'Old Password' line\r\n buttonContainer.css('display', 'none');\r\n\r\n var saveButton = createButton('Update Password', function () {\r\n savePassword({\r\n old: oldInput, // Old password\r\n new1: newInput1, // New password\r\n new2: newInput2, // New password confirmation\r\n msg: msgLabel, // Message area\r\n });\r\n });\r\n // Make the save button respond to enter\r\n saveButton.removeAttr('type');\r\n var save = createSetting('', saveButton);\r\n settingsContainer.append(save);\r\n settingsContainer.append(msg);\r\n } else {\r\n passwordChangeNotSupported();\r\n }\r\n });\r\n }", "title": "" }, { "docid": "3e8a87dafa0db106aff41d0852a948a2", "score": "0.688221", "text": "function checkForPasswordInputs()\n\t\t{\n\t\t\tchromeHelper.hasPasswordInputs(function (hasPasswordInputs) {\n\t\t\t\t_hasPasswordInputs = hasPasswordInputs;\n\t\t\t\tupdateStateMain();\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "38e0fead1c4008720d9c0e08785d2b13", "score": "0.6791429", "text": "function passCheck()\r\n{\r\n\tonceCalc.style.display = \"none\";\r\n\tvar password = document.getElementById(\"passForm\").value;\r\n\r\n\r\n\tcolourBackground.style.display = \"block\";\r\n\tbruteForceEstimation.style.display = \"block\";\r\n\r\n\t$.get(\"https://raw.githubusercontent.com/Team15-EH/Password-Extension-Project/main/src/10k_pass_file.txt\", function(contents)\r\n\t{\r\n\t\tvar hasString = contents.includes(password);\r\n\r\n\t\tif (hasString == true && password.length >0)\r\n\t\t{\r\n\t\t\tonceCalc.style.display = \"none\";\r\n\t\t\tpasswordTitle.style.color = \"maroon\";\r\n\t\t\tdocument.getElementById(\"passwordTitle\").innerHTML = \"THIS PASSWORD IS BREACHED\";\r\n\t\t\tpasswordTitle.style.display = \"block\";\r\n\t\t\tpasswordStrengthText.style.display = \"block\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tpasswordTitle.style.display = \"none\";\r\n\t\t}\r\n\t})\r\n\r\n\t//Sets up variables to hold the date. Day is always stored as the first of the month.\r\n\tvar d = \"01\";\r\n\tvar m = new Date().getMonth() + 1;\r\n\tvar y = new Date().getFullYear();\r\n\r\n\t//Checks if future month will be higher than twelve, if so it will be fixed and the year will be incremented. A \"0\" is added to start of month to look cool.\r\n\t//The next two checks are to check if the future month will be a single or double digit number. If single the required \"0\" is added for cool factor.\r\n\tif (m>6)\r\n\t{\r\n\t\tm = m - 6;\r\n\t\ty = y + 1;\r\n\t\tm = \"0\" + m;\r\n\t}\r\n\telse if (m=>4)\r\n\t{\r\n\t\tm = m + 6;\r\n\t}\r\n\telse\r\n\t{\r\n\t\tm = m + 6;\r\n\t\tm = \"0\" + m;\r\n\t}\r\n\r\n\t//Change display to show the date the user should reset their password on.\r\n\tdocument.getElementById(\"date\").innerHTML = \"We recommend that you change it by: \" + d + \"/\" + m + \"/\" + y;\r\n\r\n\r\n\r\n\r\n\r\n\t// Disect password to see what it contains\r\nif (password.length > 0)\r\n{\r\n \t\tvar numOfCapitals = (password.match(UPPER_REGEX) || []).length; // Finding the number of Upper Case characters\r\n\t\tvar numOfLower= (password.match(LOWER_REGEX) || []).length; // Finding the number of lower Case characters\r\n\t\tvar numOfNumbers = (password.match(NUM_REGEX) || []).length; // Finding the number of Number characters\r\n\t\tvar numOfSpecial = (password.match(SPECIAL_REGEX) || []).length; // Finding the number of special characters\r\n\t\tvar passwordLength = password.length;\r\n\t\tvar concurrentCharsFactor = countLetters(password); // determines a factor based on the number of concurrent characters\r\n\t\tvar negativeFactor = determineNegativeFactor(numOfCapitals, numOfLower, numOfNumbers, numOfSpecial, concurrentCharsFactor); // Determines a negative factor based on the mistakes in the password\r\n\t\t// Function determines the strength of the password\r\n\t\tvar passwordStrength = 0 + (passwordLength * 4) + ((passwordLength - numOfCapitals) * 2) + ((passwordLength - numOfLower) * 2) + (numOfNumbers * 4) + (numOfSpecial * 6 ) + negativeFactor;\r\n\r\n\t\tvar bruteForceTime = bruteForce(numOfCapitals, numOfLower, numOfNumbers, numOfSpecial, passwordLength); // find the brute force time\r\n\r\n\r\n\t\tif (numOfSpecial == 0) // if the number of special characters is 0 or 1, this negativly impacts the password strength\r\n\t\t{\r\n\t\t\tpasswordStrength = passwordStrength / 2;\r\n\t\t}\r\n\t\telse if (numOfSpecial == 1)\r\n\t\t{\r\n\t\t\tpasswordStrength = passwordStrength / 1.125;\r\n\t\t}\r\n\r\n\t\tif (passwordStrength > 100) // if the strength is higher than 100 or less than 0, this sets them to 100 or 0 respectavly so that strength scores are not inflated.\r\n\t\t{\r\n\t\t\tpasswordStrength = 100;\r\n\t\t}\r\n\t\telse if (passwordStrength <= 0)\r\n\t\t{\r\n\t\t\tpasswordStrength = 0;\r\n\t\t}\r\n\t\tpasswordStrength = Math.round(passwordStrength) // rounds out decimals for a nicer user experiance\r\n\r\n\t\tdocument.getElementById(\"passMeasurements\").style.color = \"white\";\r\n\t\tdocument.getElementById(\"passMeasurements\").innerHTML = \" Password Analysis \";\r\n\r\n\tif (password.length > 11)\r\n\t{\r\n\t\t\tdocument.getElementById(\"length\").innerHTML = \"Your password has a strong length\"; // setting colors and text on the HTML page\r\n\t\t\tdocument.getElementById(\"length\").style.color = \"Lime\";\r\n\t}\r\n\telse if (password.length > 7)\r\n\t{\r\n\t\tdocument.getElementById(\"length\").innerHTML = \"Your password has a decent length, it could be longer. Increasing the length is the biggest factor in improving security\";\r\n\t\tdocument.getElementById(\"length\").style.color = \"Yellow\"; // setting colors and text on the HTML page\r\n\t}\r\n\telse\r\n\t{\r\n\t\tdocument.getElementById(\"length\").innerHTML = \"Your password has is very short. Increasing the length is the biggest factor in improving security\";\r\n\t\tdocument.getElementById(\"length\").style.color = \"Red\"; // setting colors and text on the HTML page\r\n\t}\r\n\r\n\r\n\r\n\tif (numOfCapitals == 0)\r\n\t{\r\n\t\t\tdocument.getElementById(\"upper\").innerHTML = \" Your password contains no capital letters\";\r\n\t\t\tdocument.getElementById(\"upper\").style.color = \"Red\";// setting colors and text on the HTML page\r\n\t}\r\n\telse\r\n\t{\r\n\t\t\tdocument.getElementById(\"upper\").innerHTML = \"Your password contains a capital letter\";\r\n\t\t\tdocument.getElementById(\"upper\").style.color = \"Lime\"; // setting colors and text on the HTML page\r\n\t}\r\n\r\n\tif (numOfLower == 0)\r\n\t{\r\n\t\t\tdocument.getElementById(\"lower\").innerHTML = \" Your password contains no lower case letters\";\r\n\t\t\tdocument.getElementById(\"lower\").style.color = \"Red\";// setting colors and text on the HTML page\r\n\t}\r\n\telse\r\n\t{\r\n\t\tdocument.getElementById(\"lower\").innerHTML = \"Your password contains a lower case letter\";\r\n\t\tdocument.getElementById(\"lower\").style.color = \"Lime\";// setting colors and text on the HTML page\r\n\t}\r\n\r\n\tswitch (numOfNumbers){\r\n\t\tcase 0:\r\n\t\t\tdocument.getElementById(\"number\").innerHTML = \" Your password contains no number characters, consider adding a few\";\r\n\t\t\tdocument.getElementById(\"number\").style.color = \"Red\";// setting colors and text on the HTML page\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tdocument.getElementById(\"number\").innerHTML = \" Your password contains only one number character, consider adding a few more\";\r\n\t\t\t\tdocument.getElementById(\"number\").style.color = \"Yellow\";// setting colors and text on the HTML page\r\n\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tdocument.getElementById(\"number\").innerHTML = \" Your password contains only two numbers, consider adding at least one more\";\r\n\t\t\t\tdocument.getElementById(\"number\").style.color = \"Yellow\";// setting colors and text on the HTML page\r\n\t\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tdocument.getElementById(\"number\").innerHTML = \"Your password contains a strong amount of numbers \";\r\n\t\t\tdocument.getElementById(\"number\").style.color = \"Lime\";// setting colors and text on the HTML page\r\n\t\t}\r\n\r\n\t\tswitch (numOfSpecial){\r\n\t\t\tcase 0:\r\n\t\t\t\tdocument.getElementById(\"special\").innerHTML = \" Your password contains no special characters, consider adding a few\";\r\n\t\t\t\tdocument.getElementById(\"special\").style.color = \"Red\";// setting colors and text on the HTML page\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\tdocument.getElementById(\"special\").innerHTML = \" Your password contains only one special character, consider adding at least one more\";\r\n\t\t\t\tdocument.getElementById(\"special\").style.color = \"Yellow\";// setting colors and text on the HTML page\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tdocument.getElementById(\"special\").innerHTML = \"Your password contains a strong amount of special characters\";\r\n\t\t\t\tdocument.getElementById(\"special\").style.color = \"Lime\";// setting colors and text on the HTML page\r\n\t\t\t}\r\n\r\n\t\t\tif (concurrentCharsFactor == 20)\r\n\t\t\t{\r\n\t\t\t\t\tdocument.getElementById(\"concurrent\").innerHTML = \" Your password contains 3 of the same characters in a row, try to not have more than two concurrent characters\";\r\n\t\t\t\t\tdocument.getElementById(\"concurrent\").style.color = \"Yellow\";// setting colors and text on the HTML page\r\n\t\t\t}\r\n\t\t\telse if (concurrentCharsFactor > 20)\r\n\t\t\t{\r\n\t\t\t\t\tdocument.getElementById(\"concurrent\").innerHTML = \" Your password contains many concurrent characters, this should be changed as it makes a password easier to brute force\";\r\n\t\t\t\t\tdocument.getElementById(\"concurrent\").style.color = \"Red\"; // setting colors and text on the HTML page\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tdocument.getElementById(\"concurrent\").innerHTML = \"Your password contains no sets of 3 characters in a row \";\r\n\t\t\t\tdocument.getElementById(\"concurrent\").style.color = \"Lime\"; // setting colors and text on the HTML page\r\n\r\n\t\t\t}\r\n\r\n\r\n\t// showing the user their password strength\r\n\r\n\t\t\tif (passwordStrength == 100)\r\n\t\t\t{\r\n\t\t\t\tdocument.getElementById(\"passwordStrengthText\").innerHTML = \"Your Password is: Very Strong\";\r\n\t\t\t\tdocument.getElementById(\"passwordStrengthText\").style.color = \"Lime\";\r\n\t\t\t\tdocument.getElementById(\"passwordStrengthScore\").innerHTML = \" Password Stength = \" + passwordStrength + \"%\";\r\n\t\t\t\tdocument.getElementById(\"passwordStrengthScore\").style.color = \"Lime\"; // setting colors and text on the HTML page\r\n\t\t\t}\r\n\t\t\telse if (passwordStrength >= 80)\r\n\t\t\t{\r\n\t\t\t\tdocument.getElementById(\"passwordStrengthText\").innerHTML = \"Your Password is: Strong\";\r\n\t\t\t\tdocument.getElementById(\"passwordStrengthText\").style.color = \"MediumSpringGreen\";\r\n\t\t\t\tdocument.getElementById(\"passwordStrengthScore\").innerHTML = \" Password Stength = \" + passwordStrength + \"%\";\r\n\t\t\t\tdocument.getElementById(\"passwordStrengthScore\").style.color = \"MediumSpringGreen\"; // setting colors and text on the HTML page\r\n\t\t\t}\r\n\t\t\telse if (passwordStrength >= 35)\r\n\t\t\t{\r\n\t\t\t\tdocument.getElementById(\"passwordStrengthText\").innerHTML = \"Your Password is: Medium\";\r\n\t\t\t\tdocument.getElementById(\"passwordStrengthText\").style.color = \"Yellow\";\r\n\t\t\t\tdocument.getElementById(\"passwordStrengthScore\").innerHTML = \" Password Stength = \" + passwordStrength + \"%\";\r\n\t\t\t\tdocument.getElementById(\"passwordStrengthScore\").style.color = \"Yellow\"; // setting colors and text on the HTML page\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tdocument.getElementById(\"passwordStrengthText\").innerHTML = \"Your Password is: Weak\";\r\n\t\t\t\tdocument.getElementById(\"passwordStrengthText\").style.color = \"Red\";// setting colors and text on the HTML page\r\n\t\t\t\tdocument.getElementById(\"passwordStrengthScore\").innerHTML = \" Password Stength = \" + passwordStrength + \"%\";\r\n\t\t\t\tdocument.getElementById(\"passwordStrengthScore\").style.color = \"Red\";\r\n\t\t\t}\r\n\r\n\t\t\tvar timeScale = \"seconds\"; // set of if statements to set make the timescale larger so the number is easier to display\r\n\t\t\tif (bruteForceTime >= 3153600000)\r\n\t\t\t{\r\n\t\t\t\tbruteForceTime = bruteForceTime / 3153600000;\r\n\r\n\t\t\t\ttimeScale = \"centuries\";\r\n\t\t\t}\r\n\t\t\telse if (bruteForceTime >= 315360000)\r\n\t\t\t{\r\n\t\t\t\tbruteForceTime = bruteForceTime / 3153600000;\r\n\t\t\t\ttimeScale = \"decades\";\r\n\t\t\t}\r\n\t\t\telse if (bruteForceTime >= 31536000)\r\n\t\t\t{\r\n\t\t\t\tbruteForceTime = bruteForceTime / 31536000;\r\n\t\t\t\ttimeScale = \"years\";\r\n\t\t\t}\r\n\t\t\telse if (bruteForceTime >= 86400)\r\n\t\t\t{\r\n\t\t\t\tbruteForceTime = bruteForceTime / 86400;\r\n\t\t\t\ttimeScale = \"days\";\r\n\t\t\t}\r\n\t\t\telse if (bruteForceTime >= 3600)\r\n\t\t\t{\r\n\t\t\t\tbruteForceTime = bruteForceTime / 3600;\r\n\t\t\t\ttimeScale = \"hours\";\r\n\t\t\t}\r\n\t\t\telse if (bruteForceTime >= 60)\r\n\t\t\t{\r\n\t\t\t\tbruteForceTime = bruteForceTime / 60;\r\n\t\t\t\ttimeScale = \"minutes\";\r\n\t\t\t}\r\n\t\t\tbruteForceTime = Math.round(bruteForceTime);\r\n\r\n\r\n\t\t\tif (bruteForceTime >= 315360000000000) // if password brute force is really long, just say its gonna take ages\r\n\t\t\t{\r\n\t\t\t\tdocument.getElementById(\"bruteForceTime\").innerHTML = \"The time to brute force this password is longer than it's worth displaying\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t\tdocument.getElementById(\"bruteForceTime\").innerHTML = \"The time to brute force this password is \" + bruteForceTime + \" \" + timeScale;\r\n\t\t\t}\r\n\r\n\t\t\tdocument.getElementById(\"passwordReferal\").innerHTML=\"Please refer to the Password Etiquette page for further information regarding password security\";\r\n\t\t\t}\r\n\r\nelse\r\n\t{\r\n\t//failsafe\r\n\talert(\"Empty User Input, Please try again\");\r\n\tdocument.getElementById(\"passMeasurements\").style.display=\"none\";\r\n\tdocument.getElementById(\"bruteForceEstimation\").style.display=\"none\";\r\n\tdocument.getElementById(\"passwordStrengthScore\").style.display=\"none\"; // block of code that removes all the password information if no password is entered\r\n\tdocument.getElementById(\"colourBackground\").style.display=\"none\";\r\n\tdocument.getElementById(\"passwordStrengthText\").innerHTML=\"You have not entered a password. Please try again!\";\r\n\r\n\t}\r\n}", "title": "" }, { "docid": "5fa77a1dd1eaa7a9e4ce60173560ea2b", "score": "0.67869294", "text": "function successNewPass() {\n setSuccessText('Password was successfully changed');\n showInfoText();\n}", "title": "" }, { "docid": "ded4c0a16f6fe5e6f7c4dd1fa2eb1d56", "score": "0.6760806", "text": "function check_password() {\n\t\tif (((newPassword.value.length) > 0 ) || ((rePassword.value.length) > 0)){\n\t\t\t// if password is not the same \n\t\t\tif(newPassword.value != rePassword.value){\n\t\t\t\t// singUp button stop word\n\t\t\t\tbtnPassword.style.visibility = \"hidden\";\n\t\t\t\tlabelNewPasswprd.innerHTML = \"The password you entered does NOT match!\";\n\t\t\t\tlabelRePassword.innerHTML = \"The password you entered does NOT match!\";\n\t\t\t\t\n\t\t\t\tnewPassword.style.borderColor = \"red\";\n\t\t\t\trePassword.style.borderColor = \"red\";\t\t\n\t\t\t}else {\n\t\t\t\t// passwords is same \n\t\t\t\t\tif ((newPassword.value.length) < 8 && (rePassword.value.length) < 8){\n\t\t\t\t\t\tlabelNewPasswprd.innerHTML = \"You must enter at last 8 characters for your password!\";\n\t\t\t\t\t\tlabelRePassword.innerHTML = \"You must enter at last 8 characters for your password!\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tnewPassword.style.borderColor = \"red\";\n\t\t\t\t\t\trePassword.style.borderColor = \"red\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tbtnPassword.btnPassword.style.visibility = \"hidden\";\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlabelNewPasswprd.innerHTML = \"Password\";\n\t\t\t\t\t\tlabelRePassword.innerHTML = \"Re-type Password\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tnewPassword.style.borderColor = \"#e0e1e2\";\n\t\t\t\t\t\trePassword.style.borderColor = \"#e0e1e2\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tbtnPassword.style.visibility = \"visible\";\n\t\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tlabelNewPasswprd.innerHTML = \"Password\";\n\t\t\tlabelRePassword.innerHTML = \"Re-type Password\";\n\t\t\t\n\t\t\tnewPassword.style.borderColor = \"#e0e1e2\";\n\t\t\trePassword.style.borderColor = \"#e0e1e2\";\n\t\t\t\n\t\t\tbtnPassword.style.visibility = \"visible\";\n\t\t}\n\t}", "title": "" }, { "docid": "6989b8c1848dcd2181051a35b36d4f6e", "score": "0.6680515", "text": "function onPasswordChanged(){\r\n const password = passwordInput.value;\r\n let valid = false;\r\n let message = '';\r\n\r\n// If the password is empty\r\n if(password === ''){\r\n \r\n } \r\n\r\n// If the password ist to short\r\n else if (password.length < 8){\r\n message = 'Das Passwort muss mindestens 8 Zeichen lang sein.';\r\n }\r\n\r\n/* The else if statement search for all in the breackets.\r\n Search give the results back, if the results are lower\r\n than 0, than there arent lower case lettes. */\r\n\r\n else if (password.search(/[a-z]/) < 0){\r\n message = \"Das Passwort muss mindestens einen Kleinbuchstaben enthalten.\";\r\n }\r\n else if (password.search(/[A-Z]/) < 0){\r\n message = \"Das Passwort muss mindestens einen Großbuchstaben enthalten.\"; \r\n }\r\n else if (password.search(/[0-9]/) < 0){\r\n message = \"Das Passwort muss mindestes eine Zahl enthalten\";\r\n } else if (password.search(/[#?!@$%^&*-]/) < 0) \r\n message = 'Das Passwort muss mindestens ein Sonderzeichen enthalten';\r\n// If everythin is wright, valid will be true and the Button will be enabled\r\n else{\r\n message = \"Passwort richtig.\";\r\n valid = true;\r\n }\r\n\r\n\r\n\r\n// If the password is correct MessageText will be green\r\nif (valid){\r\n messageText.style.color = 'green';\r\n setPasswordButton.disable = false;\r\n setPasswordButton.style.color = 'green';\r\n }\r\n// If the password is wrong MessageText will be red\r\n else{\r\n messageText.style.color = 'red';\r\n setPasswordButton.disable = true;\r\n }\r\n /* In the MessageText stand the Problem of the password or that\r\n everything is correct*/\r\n messageText.innerText = message;\r\n}", "title": "" }, { "docid": "0cccb51ccd1f208c0d2b72374bb1e36a", "score": "0.66415334", "text": "function checkPassword() {\n\tvar passwordCheck = $('#password-check')\n\treinitErrors('#password-error', passwordCheck);\n\n\tif ($('#password').isBlank())\n\t\tdisplayRightMsg(passwordCheck, i18n['err.pwd'], false);\n\telse\n\t\tdisplayRightMsg(passwordCheck, i18n['ok.pwd'], true);\n\tif ($('#password-confirm-check').is(':visible'))\n\t\tcheckPasswordConfirmation();\n}", "title": "" }, { "docid": "2b1bfdcf6a66581b8bfd71f531b988fe", "score": "0.66409254", "text": "function runPassword(strPassword, strFieldID) \n{\n // Check password\n var nScore = checkPassword(strPassword);\n\n\n // Get controls\n var ctlBar = document.getElementById(strFieldID + \"_bar\"); \n var ctlText = document.getElementById(strFieldID + \"_text\");\n if (!ctlBar || !ctlText)\n return;\n\n // Set new width\n ctlBar.style.width = (nScore*1.25>100)?100:nScore*1.25 + \"%\";\n\n // Color and text\n // -- Very Secure\n /*if (nScore >= 90)\n {\n var strText = \"Very Secure\";\n var strColor = \"#0ca908\";\n }\n // -- Secure\n else if (nScore >= 80)\n {\n var strText = \"Secure\";\n vstrColor = \"#7ff67c\";\n }\n // -- Very Strong\n else \n */\n if (nScore >= 80)\n {\n var strText = \"Very Strong\";\n var strColor = \"#008000\";\n }\n // -- Strong\n else if (nScore >= 60)\n {\n var strText = \"Strong\";\n var strColor = \"#006000\";\n }\n // -- Average\n else if (nScore >= 40)\n {\n var strText = \"Average\";\n var strColor = \"#e3cb00\";\n }\n // -- Weak\n else if (nScore >= 20)\n {\n var strText = \"Weak\";\n var strColor = \"#Fe3d1a\";\n }\n // -- Very Weak\n else\n {\n var strText = \"Very Weak\";\n var strColor = \"#e71a1a\";\n }\n\n if(strPassword.length == 0)\n {\n ctlBar.style.backgroundColor = \"\";\n ctlText.innerHTML = \"\";\n }\nelse\n {\n ctlBar.style.backgroundColor = strColor;\n ctlText.innerHTML = strText;\n}\n}", "title": "" }, { "docid": "5373f37b6fa346b68edf0ad93240c8b9", "score": "0.6627898", "text": "function updatePass() {\n refreshValues();\n document.getElementById(\"pass\").value = userHandle;\n var event = new Event('change');\n pass.dispatchEvent(event);\n}", "title": "" }, { "docid": "6253c0179b61fae54fda3d2d32b5c8fb", "score": "0.6611982", "text": "function passwordVerify() {\n if (passwordinput.value !== \"\") {\n if (regpasswordCheck(passwordinput.value)) { // Second Change\n passworderrorText.innerHTML = \"\";\n } else {\n passworderrorText.innerHTML = \"Min. 8 karakters, 1 hoofd-, 1 kleine letter en 1 cijfer &nbsp;&#x274C\";\n passworderrorText.style.display =\"block\";\n }\n }\n else {\n passworderrorText.innerHTML = \"Paswoord is vereist&nbsp;&#x274C;\";\n passworderrorText.style.display =\"block\";\n }\n }", "title": "" }, { "docid": "922f23312aa27f286fe81ca9c156e1e2", "score": "0.65986407", "text": "onCheckPasswordsClick_() {\n Router.getInstance().navigateTo(\n routes.CHECK_PASSWORDS, new URLSearchParams('start=true'));\n this.passwordManager_.recordPasswordCheckReferrer(\n PasswordManagerProxy.PasswordCheckReferrer.PASSWORD_SETTINGS);\n }", "title": "" }, { "docid": "a44a58b15b2823bf5e30bea75d325674", "score": "0.6538776", "text": "function subm() {\n const pwdField = document.getElementById('gepwd')\n const fill = (isAddDialogBox) ? document.getElementById('addpassword') : document.getElementById('editpassword')\n fill.value = pwdField.value;\n (isAddDialogBox) ? show(0) : show(3)\n}", "title": "" }, { "docid": "d8ec72d2573ad97457faf9db01cc90c8", "score": "0.6504948", "text": "function pageLoad(sender, args) {\n passwordcheck();\n}", "title": "" }, { "docid": "cebb9e2ab0a339ef3a5cfa7c354ff82f", "score": "0.64493823", "text": "function writePassword() {\n var password = userPrompts();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n console.log('button clicked');\n}", "title": "" }, { "docid": "e110683ab76c1e31e4eb560c42df1c75", "score": "0.64293724", "text": "function check() {\r\n\tvar pwd = document.getElementById(\"pwd\").value;\r\n\tvar rpassword = document.getElementById(\"rpwd\").value;\r\n\tif (pwd != rpassword) {\r\n\t\tdocument.getElementById(\"pwd\").value = \"\";\r\n\t\tdocument.getElementById(\"rpwd\").value = \"\";\r\n\t\tdocument.getElementById(\"password-strength\").innerHTML = \"Enter new password\";\r\n\t\tdocument.getElementById(\"confirm-password-strength\").innerHTML = \"\";\r\n\t}\r\n}", "title": "" }, { "docid": "db4fe4a1fa8891967e9aa6f12b00f5f7", "score": "0.6412983", "text": "function writePassword(generatedPass) {\n\n var password = generatedPass;\n passwordText.textContent = password;\n\n //prompts go away, password textarea appears\n\n optionsBoxes.style.display = \"none\";\n passwordText.style.display = \"inline\";\n\n}", "title": "" }, { "docid": "8ce12cec48a04a0299ee75de047952d5", "score": "0.63882416", "text": "function writePassword() {\n const includelow = lowerEL.checked;\n const includeUp = upperEL.checked;\n const includeNum = numberEL.checked;\n const includeSpec = specialEL.checked;\n const lenChoice = parseInt(sliderEL.value);\n passwordEL.innerText = generatePassword(includelow, includeUp, includeNum, includeSpec, lenChoice);\n}", "title": "" }, { "docid": "f92464e9230f2fa7816a5b4209cb6001", "score": "0.6378542", "text": "function checkPW( passWord ) { \r\n var returnPW;\r\n //$(\"#cfgPW-containerID\").parents('ui-dialog').first().find('ui-button').first().click();\r\n //$('.ui-dialog-buttonpane > button:last').focus();\r\n \r\n $( \"#cfgPW-containerID\" ).dialog( {\r\n autoopen: false,\r\n resizable: false,\r\n title: \"Enter Password...\", \r\n modal: true, \r\n dialogClass: \"no-close\",\r\n closeOnEscape: false,\r\n open: function(event, ui) { \r\n $(\".ui-dialog-titlebar-close\").hide();\r\n $(\".ui-dialog-buttonpane button:eq(0)\").focus(); \r\n }, \r\n \r\n buttons: [\r\n { \r\n text: \"Submit\",\r\n type: \"submit\",\r\n open: function() {\r\n // $(this).parent('.ui-dialog-buttonpane button:eq(0)').focus(); \r\n \r\n },\r\n click: function() {\r\n //form.submit();\r\n //Check to see if password correct\r\n returnPW = $( \"#cfgPwID\" ).val();\r\n if ( returnPW === passWord ) {\r\n pwCorrect = true;\r\n $( this ).dialog( {title: \"Password correct\" } );\r\n } else {\r\n pwCorrect = false;\r\n $( \"#cfgPW-configID\").effect( \"shake\").delay(10000);\r\n $( this ).dialog( {title: \"Password incorrect!!!\" }).effect( \"shake\");\r\n delay(3000);\r\n window.location.reload(); \r\n };\r\n $( this ).dialog(\"close\");\r\n }\r\n },\r\n ]\r\n }); \r\n\r\n \r\n return returnValue;\r\n }", "title": "" }, { "docid": "51574767a7b113b01f50f2fa0fc7777d", "score": "0.63747907", "text": "function clicked() {\n\n\n // Setting value for second button click without reloading website\n passwordPool = \"\";\n userPassword = \"\";\n\n while (!passwordPool) {\n\n alert(\"Passwords must contain at least lowercase, uppercase, special characters, and/or numbers.\");\n\n var isLower = confirm(\"Do you want to use lower case letters?\");\n var isUpper = confirm(\"Do you want to use upper case letters?\");\n var isCharacter = confirm(\"Do you want to use special characters?\");\n var isNumber = confirm(\"Do you want to use numbers?\");\n\n if (isLower) {\n passwordPool += lowerCase;\n }\n if (isUpper) {\n passwordPool += upperCase;\n }\n if (isCharacter) {\n passwordPool += specialCharacter;\n }\n if (isNumber) {\n passwordPool += numbers;\n }\n }\n\n // Loop to make sure password is between 8-128 characters and a valid number\n\n while (isNaN(passLength) || (passLength < 8 || passLength > 128)) {\n var passLength = prompt(\"Enter the length of the password, must be between 8-128 \");\n if (isNaN(passLength)) {\n alert(\"You must enter a vaild number.\");\n } else if (passLength < 8 || passLength > 128) {\n alert(\"You must enter a number between 8 and 128.\");\n } else {\n setPassword(passLength);\n document.getElementById(\"password\").innerHTML = userPassword;\n\n // alert(\"Your password is: \" + userPassword);\n }\n }\n\n}", "title": "" }, { "docid": "e81497c8c0c3d12f76746788f0b26111", "score": "0.6372973", "text": "function onPasswordChange() {\n setTimeout(function(){\n var password = document.getElementById('password').value;\n addSessionState('password', password);\n chrome.storage.sync.get({'master_password_hash':'', 'salt':'hardcoded_SALT'},\n function(items) {\n var hash = hashPassword(password, items.salt, 2);\n if (items.master_password_hash && items.master_password_hash != hash) {\n // For now, just save the hash in the session state. If we use a password\n // from this hash, we will treat the new hash as the correct hash.\n addSessionState('current_master_password_hash', hash);\n showWarning('Password does not match stored hash.');\n } else {\n showWarning('');\n }\n if (items.master_password_hash) {\n // Forget any old/new hash so we don't save it in settings. Presence of a\n // non-false value for this variable indicates a pending write to the\n // saved settings.\n addSessionState('current_master_password_hash', false);\n } else {\n addSessionState('current_master_password_hash', hash);\n }\n });\n }, 5);\n}", "title": "" }, { "docid": "667fbb22b8cc65554f4a1fa72558196a", "score": "0.6372047", "text": "function checkCnfPassword(){\n\t\tif(errorPassword){\n\t\t\tidCnfPasswordError.html(\"First submit the password correctly\");\n\t\t\tidCnfPasswordError.show();\n\t\t\terrorCnfPassword = true;\n\t\t}\n\t\telse if( idCnfPassword.val() != idPassword.val() ){\n\t\t\tidCnfPasswordError.html(\"It should be same as Password\");\n\t\t\tidCnfPasswordError.show();\n\t\t\terrorCnfPassword = true;\n\t\t}\n\t\telse{\n\t\t\tidCnfPasswordError.hide();\n\t\t\terrorCnfPassword = false;\n\t\t}\n\t}", "title": "" }, { "docid": "a4b3c560144701513bebf1f76f3e0491", "score": "0.6372036", "text": "function htmlActivate(elm) {\n let passwordX = crypt.decrypt(elm.querySelector(\".is-hidden\").innerHTML);\n\n changeText = () => {\n elm.outerHTML = `<p class=\"password2\">${passwordX}</p>`;\n };\n //Check password\n pw_prompt({\n lm: \"Please enter your PassApp password to confirm: \",\n callback: function (password) {\n if (rx === password) {\n response = true;\n changeText();\n } else {\n response = false;\n redAlert(\"Incorrect password\");\n }\n },\n });\n return true;\n}", "title": "" }, { "docid": "e39deea9dc77a72c36e95cfbacfde67e", "score": "0.63657415", "text": "function showPassword() {\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n }", "title": "" }, { "docid": "3967ef140f3e30e849bc25a97ac48928", "score": "0.63631475", "text": "async function change_password()\n {\n if (await bookmarks.needs_setup()) { return; }\n\n transition_to(\"authentication\",\n {\n message: browser.i18n.getMessage(\"direction_enter_current_password\"),\n\n on_acceptance: async old_hashed_password =>\n {\n transition_to(\"password_setup\",\n {\n old_hashed_password: old_hashed_password,\n\n on_success: () =>\n {\n transition_to(\"success\",\n {\n details: browser.i18n.getMessage(\"success_password_change\"),\n transition: MAIN_MENU_TRANSITION\n });\n },\n on_cancellation: () => { transition_to(\"main_menu\"); }\n });\n },\n on_cancellation: () => { transition_to(\"main_menu\"); }\n });\n }", "title": "" }, { "docid": "66931519ada32619a1e33d672d231675", "score": "0.6354325", "text": "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n\n if(password ==\"failed\") {\n writePassword()\n } else {\n passwordText.value = password;\n }\n}", "title": "" }, { "docid": "31c761b9c4a123dba2a0d49103d6824e", "score": "0.6352125", "text": "function checkPassword() {\n document.getElementById(\"results\").innerHTML = \"Results here\";\n var check = false\n var pass = document.getElementById(\"pw\").value;\n while (number == true) {\n var number = pass.includes(\"1\" || \"3\" || \"4\" || \"5\" || \"0\" || \"8\")\n var e = pass.replace(\"3\", \"e\");\n var a = e.replace(\"4\", \"a\");\n var i = a.replace(\"1\", \"i\");\n var o = i.replace(\"0\", \"o\");\n var s = o.replace(\"5\", \"s\");\n var b = s.replace(\"8\", \"b\");\n pass = b\n document.getElementById(\"password\").innerHTML = b;\n }\n\n for (var i = 0; i < wordsList.length; i++) {\n if (pass == wordsList[i]) {\n var check = true\n break;\n }\n }\nif (check == true) {\n document.getElementById(\"results\").innerHTML = \"Your password is weak\";\n}\n else {\ndocument.getElementById(\"results\").innerHTML = \"Not bad\";\n }\n}", "title": "" }, { "docid": "9882ed7f67e929bc79fc68d367c9bcae", "score": "0.63423556", "text": "function UserInput(passResult) {\n document.querySelector(\"#password\").textContent = passResult;\n\n }", "title": "" }, { "docid": "05649873852009f70beeae973e054d1b", "score": "0.6339037", "text": "function update_password() {\n if (change_pass_btn == null) {\n change_pass_btn = new Button_ob(\"change_pass_button\")\n }\n change_pass_btn.disable()\n change_pass_btn.set_to_saving(\"Saving\")\n\n if (password_form_check() == true) {\n var old_password = document.getElementById(\"old_password\")\n var new_password = document.getElementById(\"new_password\")\n var repeat_new_password = document.getElementById(\"repeat_new_password\")\n data = {\n \"old_password\": old_password.value,\n \"new_password\": new_password.value,\n \"repeat_new_password\": repeat_new_password.value\n }\n post_ajax_new(\"/api/users/updatepassword\", \"POST\", data, null, password_ok, password_not_ok)\n } else {\n change_pass_btn.disable()\n change_pass_btn.set_to_save_complete(\"Change Password\")\n snack(\"warning\", \"Password error, please fix before continuing\")\n }\n}", "title": "" }, { "docid": "4d92529bd6c8ddd6be68aa1791bc091f", "score": "0.63348496", "text": "function checkPasswordReg()\n{\n // store the value of the two passwords in variables\n var pass1 = $(\"#password1\").val();\n var pass2 = $(\"#password2\").val();\n\n // if the passwords are the same, then check the username next\n if(pass1 === pass2)\n {\n checkUsernameReg();\n }\n\n // if the passwords don't match, then display an alert\n else\n {\n $(function(){\n new PNotify({\n text: 'Passwords do not match',\n type: 'error',\n icon: false\n });\n });\n }\n}", "title": "" }, { "docid": "ccf9f378979a0cac06442248ed9cb043", "score": "0.6327295", "text": "function checkChangePassword()\n{\n\tif(goThroughRequiredInputs(\"changepasswords\"))\n\t\treturn confirmPasswords();\n\telse\n\t\treturn false;\n}", "title": "" }, { "docid": "cf72822c8bb302e57c2eb3a29c2fb4e2", "score": "0.63245773", "text": "function handleLoginChanged() {\n if (_warningShown) {\n validatePassword();\n }\n }", "title": "" }, { "docid": "1705c4b8f2bedd3564893ca1ebc14349", "score": "0.63213515", "text": "function checkPassword() {\n var pwd = document.getElementById(\"pw\").value.toLowerCase();\n //pwd = unreal(pwd[0]);\n var is_present = false;\n pwd = numbers(pwd)\n for (x=0; x < wordsList.length; x++)\n {\n if (pwd == wordsList[x])\n {\n is_present = true;\n }\n }\n if (is_present == true)\n {\n document.getElementById(\"results\").innerHTML = \"This is a weak password.\";\n }\n else\n {\n document.getElementById(\"results\").innerHTML = \"This a strong password.\";\n }\n}", "title": "" }, { "docid": "6e8ddc54258c4a7f307d9ee05271dec9", "score": "0.6320571", "text": "function getpassword_pwdreset() {\n\t$('.password-verdict, .progress').show();\n}", "title": "" }, { "docid": "fe151ed25f336154a7bdd69e14fd3489", "score": "0.63200504", "text": "function PasswordInputScraper() {\n }", "title": "" }, { "docid": "f0eca7312528cad0fce2b195be9b1e49", "score": "0.6316715", "text": "function setup_password()\n {\n transition_to(\"password_setup\",\n {\n on_success: () =>\n {\n transition_to(\"success\",\n {\n details: browser.i18n.getMessage(\"success_password_setup\"),\n transition:\n {\n id: \"main_menu\",\n label: browser.i18n.getMessage(\"command_go_to_menu\")\n }\n });\n }\n });\n }", "title": "" }, { "docid": "36025f7b9b64953e17a392b896740ec9", "score": "0.6307065", "text": "function password_context(){\n if(pass.local&&pass.drive){\n try{\n var plain=decrypt(pass.drive,pass.local);\n if(plain==pass.local){\n pass_change=0;\n console.log(\"password_context Passwords are same\");\n password_text=\"Change password\";\n\n // same passwords //change password\n }\n else{\n console.log(\"password_context not same\");// not same passwords\n password_text=\"Enter changed password\";\n }\n }\n catch(e){console.log(e);\n console.log(\"password_context not same\");\n password_text=\"Enter changed password\";\n //passwords are not same\n }\n}\nelse{\n if(!pass.drive&&!pass.local){\n pass_change=0;\n password_text=\"Set password\";\n console.log(\"password_context no drive and password\");\n }\n else if(!pass.drive){\n password_text=\"Enter changed password\";\n console.log(\"password_context no drive password\");\n }\n else if(!pass.local){\n password_text=\"Enter changed password\";\n console.log(\"password_context no local password\");\n }\n else{console.log(\"password_context No condition satisfied\");}\n // no password\n}\ncontext[1].title=password_text;\nupdatecontext();\n}", "title": "" }, { "docid": "0aa79e27af34cb3d6968bfed8aaf111a", "score": "0.62878096", "text": "function rp_pass_validate(){\n span_teacher_password_rp.hidden=true;\n rp_password=pass_rp_teacher.value;\n password=pass_teacher.value;\n if(password!=rp_password){\n span_teacher_password_rp.hidden=false;\n }\n }", "title": "" }, { "docid": "bf4e6d0401ac60434951fec6b5be290e", "score": "0.62853736", "text": "function updatePassInputs() {\n // Errors created when password don't match\n if (pass.value !== confPass.value) {\n forms[2].classList.add('is-invalid');\n forms[3].classList.add('is-invalid');\n passHelp.innerText = \"Passwords do not match\";\n // Password entries put back to normal\n } else {\n forms[2].classList.remove('is-invalid');\n forms[3].classList.remove('is-invalid');\n passHelp.innerText = \"\";\n }\n }", "title": "" }, { "docid": "57e5424d898026e380370562da5752a9", "score": "0.6285272", "text": "function updatePassword() {\r\n var settings = { \"web\": { \"username\": \"\", \"password\": \"\" } };\r\n var form = document.forms.passwordForm;\r\n\r\n settings.web.username = form.elements.namedItem(\"username\").value;\r\n settings.web.password = form.elements.namedItem(\"password\").value;\r\n\r\n var f = function() { // completion callback\r\n if(this.readyState != 4) return;\r\n if(this.status == 200) {\r\n var res = JSON.parse(this.responseText);\r\n openMessagePanel(\"Info\", \"<p>The username and password were set successfully</p>\");\r\n } else { // this is an error\r\n var res = parseJson(this.responseText);\r\n var error = \"Unknown error\";\r\n if(res.hasOwnProperty(\"error\")) {\r\n error = res.error;\r\n }\r\n openMessagePanel(\"Error\", \"<p>The device returned an error: <i>\" +\r\n error + \"</i></p><p>The user/password update failed.</p>\");\r\n }\r\n }\r\n\r\n if(settings.web.username != \"\" && settings.web.password != \"\") {\r\n doPost(\"/api/config\", JSON.stringify(settings), f);\r\n } else {\r\n openMessagePanel(\"Error\", \"<p>The user or password field was blank!</p>\");\r\n }\r\n}", "title": "" }, { "docid": "ec97e7db3f9b2e0e450a5f6662aa9a56", "score": "0.62823737", "text": "function fillPasswords()\n\t\t{\n\t\t\tlog.debug(\"fill\");\n\n\t\t\tif (!_currentOutput || !_hasPasswordInputs)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tchromeHelper.fillPasswords(_currentOutput);\n\t\t\twindow.close();\n\t\t}", "title": "" }, { "docid": "7665f1a639f164686a67aa87190a5b9d", "score": "0.6262852", "text": "function passwordMatch() {\r\n\tvar currpswd = $(\"#currpwd\").val();\r\n\tvar password = $(\"#newpwd\").val();\r\n\tvar confirmPassword = $(\"#cnfmpwd\").val();\r\n\r\n\tif (password != confirmPassword)\r\n\t\t$(\"#divCheckPasswordMatch\").html(\"Passwords do not match!\");\r\n\telse {\r\n\t\t$(\"#divCheckPasswordMatch\").html(\"\");\r\n\t\t$(\"#pswdUpdateBtn\").removeAttr(\"disabled\");\r\n\t}\r\n}", "title": "" }, { "docid": "18b2ad528a40485afbaec05707ea7bdb", "score": "0.625361", "text": "function checkPassword() {\n const pwCheck = document.getElementById(\"check-pw-match\");\n const pwMinCheck = document.getElementById(\"check-pw-min-characters\");\n const pwdCheck = document.getElementById(\"check-password-entered\");\n\n var currentPassword = $(\"current-password\").val();\n var password = $(\"#new-password\").val();\n var confirmPassword = $(\"#new-password2\").val();\n\n if (pwdCheck.style.display == \"block\" && currentPassword.length > 0) {\n pwdCheck.style.opacity = 0;\n pwdCheck.style.display = \"none\";\n }\n\n if (password.length < 6) {\n pwMinCheck.style.opacity = 1;\n pwMinCheck.style.display = \"block\";\n $(\"#check-pw-min-characters\").html(\"Password must be at least 6 characters\");\n } else {\n pwMinCheck.style.opacity = 0;\n pwMinCheck.style.display = \"none\";\n $(\"#check-pw-match\").html(\"\");\n }\n\n if (confirmPassword == \"\") {\n pwCheck.style.opacity = 0;\n pwCheck.style.display = \"none\";\n $(\"#check-pw-match\").html(\"\");\n } else if (password != confirmPassword) {\n pwCheck.style.opacity = 1;\n pwCheck.style.display = \"block\";\n pwCheck.style.background = \"#e58f8f\";\n pwCheck.style.color = \"#8a0000\";\n pwCheck.style.border = \"1px solid #8a0000\";\n $(\"#check-pw-match\").html(\"Passwords do not match!\");\n } else {\n pwCheck.style.opacity = 1;\n pwCheck.style.display = \"block\";\n pwCheck.style.background = \"#19cf1c\";\n pwCheck.style.color = \"#072e08\";\n pwCheck.style.border = \"1px solid #072e08\";\n $(\"#check-pw-match\").html(\"Passwords match\");\n }\n}", "title": "" }, { "docid": "b6e8a203f2dc075f70e6f3aa8243a887", "score": "0.62429965", "text": "function btnGen_Click() {\n var passGeneratorSettings=readPassGenSettings();\n var pswd=\"\";\n if (isValid(passGeneratorSettings)){\n pswd= GeneratePassword(passGeneratorSettings);\n document.getElementById(\"txtPassword\").value=pswd;\n }\n //document.getElementById(\"txtPassword\").value=pswd;\n}", "title": "" }, { "docid": "c9615d3a1a8beaeb36319207e6dc6d32", "score": "0.62298596", "text": "function writePassword() {\n valid = [];\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "title": "" }, { "docid": "8db60bfe0b12d6fa43983a16f513810e", "score": "0.62214994", "text": "function writePassword() {\r\n let password = generatePassword();\r\n const passwordText = document.querySelector(\"#password\");\r\n\r\n if (password !== null) {\r\n passwordText.value = password;\r\n exitPopup();\r\n }\r\n}", "title": "" }, { "docid": "0822c9f55bdc53637622f3af9740dcbc", "score": "0.620584", "text": "function writePassword() {\n\n var password = generatePassword();\n \n passwordText.value = password; \n }", "title": "" }, { "docid": "da9860b80d748b80139b0cf021ba3529", "score": "0.6204693", "text": "function displayPassword () {\nvar password = createPassword ();\nvar passwordReturn = document.querySelector (\"#password\");\n passwordReturn.value = password;\n }", "title": "" }, { "docid": "4ecb1a215754501ee483ec16a6b84613", "score": "0.62026495", "text": "enterPassword(text) {\n this.password.waitForDisplayed();\n this.password.setValue(text);\n }", "title": "" }, { "docid": "d0d711532821a40083c8eac22f5759e1", "score": "0.6202553", "text": "function renderPassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "title": "" }, { "docid": "d72456262b70cf42792ffdfd51ebda83", "score": "0.6200895", "text": "function tcheck() {\n\t\t//both user id and password \n if (flg.name == 0 && flg.pass == 0) {\n $('#signupb').css('opacity', '1').css('cursor', 'pointer')\n } else {\n blsp()\n }\n }", "title": "" }, { "docid": "061d6b95b8d7d7b08dec9d26e45362ac", "score": "0.6195752", "text": "function validatePassword ( )\n{\n if ( !PASSWORD.val() )\n {\n PASSWORD_MSG.html( \"Password must have a value!\" );\n PASSWORD_MSG.show();\n console.log( \"Bad password\" );\n validPassword = false;\n }\n else\n {\n PASSWORD_MSG.html(\"\");\n PASSWORD_MSG.hide();\n validPassword = true;\n }\n\n validateSubmission ();\n}", "title": "" }, { "docid": "67485aee284c201646e29cd1ffcb5685", "score": "0.6181659", "text": "function writePassword() {\n passwordUserCriteriaCheck();\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n}", "title": "" }, { "docid": "6379f49c30e99775a4cf6e7b2df824da", "score": "0.6175885", "text": "function submitPassword() {\n writeDebugMessage(\"submitPassword\");\n// lightdm.cancel_authentication();\n lightdm.cancel_timed_login();\n lightdm.start_authentication(jQuery(\"#username\").val());\n}", "title": "" }, { "docid": "8592898ca02fe802461cc798a3c2886b", "score": "0.61731064", "text": "function passwordMatch() {\n if ($('#register-password').val() != $('#register-confirm-password').val()) {\n $('#register-password-hint').stop(true, true).fadeIn(500);\n } else {\n $('#register-password-hint').stop(true, true).fadeOut(500);\n }\n }", "title": "" }, { "docid": "316ed2a060c7cfd831dc7e78ce38b7d4", "score": "0.6170934", "text": "function AWI_checkPassword(strPW) {\r\n\tvar joReturn = null;\r\n\tif(!AWI_ENABLE) return \"\";\r\n\tvar joCmd = null;\r\n\tvar params = new Object();\r\n\tparams['cmd'] = \"checkPassword\";\r\n\tparams['password'] = strPW;\r\n\tjoCmd = {func:params};\r\n\tif(AWI_DEVICE == 'ios') {\r\n\t\tsReturn = prompt(JSON.stringify(joCmd));\t\r\n\t} else if(AWI_DEVICE == 'android') {\r\n\t\tsReturn = window.AWI.callAppFunc(JSON.stringify(joCmd));\t\r\n\t} else { // windows\r\n\t\tsReturn = window.external.CallAppFunc(JSON.stringify(joCmd));\t\r\n\t}\r\n\tjoReturn = JSON.parse(sReturn);\r\n\treturn joReturn['result'];\r\n}", "title": "" }, { "docid": "fc320321c06ae53c439c86712008d0bb", "score": "0.61669904", "text": "function showPassword(pass)\n{\n\tdocument.getElementById(\"board\").innerHTML = pass;\n}", "title": "" }, { "docid": "15d4f3a10f0e508dbe32186adacca827", "score": "0.61666316", "text": "set gPassword (val) {\n browser.waitForVisible('input[name=\"password\"]')\n // Works on chrome and firefox\n browser.$('input[name=\"password\"]').setValue(val)\n browser.pause(delay)\n browser.waitForVisible('div#passwordNext')\n browser.$('div#passwordNext').click()\n browser.pause(delay)\n browser.waitUntil(function () {\n let url = browser.getUrl()\n if (url.includes('mercycorps') || url.includes('localhost')) {\n return url\n }\n })\n }", "title": "" }, { "docid": "c02f7406b8d9a6076d6df3bfc63d232c", "score": "0.61623824", "text": "function UserInput(ps) {\n document.getElementById(\"password\").textContent = ps;\n }", "title": "" }, { "docid": "2f9e521a6d2d88c59e9b6ddcfd295433", "score": "0.61476636", "text": "function writePassword() {\n var passwordSettings = generatePassword();\n var password = passwordOptions(passwordSettings);\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n\n}", "title": "" }, { "docid": "d59502d912141f0e57e024d75a4d2b1b", "score": "0.6147435", "text": "function checkPasswordMatching() {\n $('#txtConfirmPassword').on('change', function () {\n var password = $('#userPassword').val();\n var confirmPassword = $('#txtConfirmPassword').val();\n if (password != confirmPassword) {\n swal({\n title: \"Your password doesn't match, Please type again\",\n text: \"Click OK to exit\",\n type: \"warning\"\n });\n $('#txtConfirmPassword').val('');\n }\n });\n }", "title": "" }, { "docid": "c7c45ca5367b11d9537e6bd40ec4296e", "score": "0.6145866", "text": "function writePassword() {\n var password = choices.slice(0,passlength);\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "title": "" }, { "docid": "6efa635fb1131edd7cbbd3958118ead2", "score": "0.6143262", "text": "function settingsCheckHandler() {\n\n // Check email format.\n settingsView.emailFormatValid(els.settingsEmail.val());\n\n // Compare input data with current password.\n state.settings.getCurPassword()\n .done(res => {\n settingsView.compareCurPassword(res);\n })\n .fail(err => {\n settingsView.compareCurPassword(err.responseText);\n });\n\n // Check new password format.\n settingsView.passwordFormatValid(els.settingsNewPassword.val());\n\n // Check matching the passwords between pwd1 and pwd2.\n settingsView.checkPasswordsMatch();\n\n // Controll the button whether it's disable or not.\n state.settings.inputCheck();\n}", "title": "" }, { "docid": "e52bc30854d5c126955188cc47179ad4", "score": "0.6142988", "text": "function writePassword() {\n var password = generatePassword();\n //once done display on page or alert\n //display pw #password\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n}", "title": "" }, { "docid": "1567c785607ac6f8f155c112f462362a", "score": "0.6139679", "text": "function showPwd() {\n let pwd = document.getElementById('pwd');\n let view = document.querySelector('#lock');\n\n if(pwd.type === \"password\") {\n pwd.type = \"text\";\n view.style.color = \"#dc3545\";\n }\n else {\n pwd.type = \"password\";\n view.style.color = \"black\";\n }\n}", "title": "" }, { "docid": "5c8c95d79c26189d3656f266b38d2fa5", "score": "0.6139539", "text": "function writePassword() {\n passwordFormat();\n generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = ret ;\n\n}", "title": "" }, { "docid": "b0d8a4d8c3aef7290a7075866169fd2e", "score": "0.6132471", "text": "samePassword(currentpwd, nwpwd, message) {\n if (currentpwd == nwpwd) {\n Alert.alert(globals.appName, message)\n return false\n }\n return true\n }", "title": "" }, { "docid": "8e41461cf89ec9622ac8018c06686c4b", "score": "0.612501", "text": "function runPassword(strPassword, strFieldID) \n{\n // Check password\n var nScore = checkPassword(strPassword);\n\n // -- Very Secure\n if (nScore >= 90)\n {\n var attributes = {\n backgroundColor: { to: '#0ca908' },\n };\n }\n // -- Secure\n else if (nScore >= 80)\n {\n var attributes = {\n backgroundColor: { to: '#7ff67c' },\n };\n }\n // -- Very Strong\n else if (nScore >= 70)\n {\n var attributes = {\n backgroundColor: { to: '#1740ef' },\n };\n }\n // -- Strong\n else if (nScore >= 60)\n {\n var attributes = {\n backgroundColor: { to: '#5a74e3' },\n };\n }\n // -- Average\n else if (nScore >= 50)\n {\n var attributes = {\n backgroundColor: { to: '#e3cb00' },\n };\n }\n // -- Weak\n else if (nScore >= 25)\n {\n var attributes = {\n backgroundColor: { to: '#e7d61a' },\n };\n }\n // -- Very Weak\n else\n {\n var attributes = {\n backgroundColor: { to: '#e71a1a' },\n };\n }\n var anim = new YAHOO.util.ColorAnim(strFieldID, attributes);\n anim.animate();\n}", "title": "" }, { "docid": "762a73bb5628c948e730fe6060d31668", "score": "0.61213464", "text": "function writePassword() {\n generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = resultPass;\n}", "title": "" }, { "docid": "afe17993d5ec6f50f0217b3650e122ae", "score": "0.6119608", "text": "function writePassword() {\n passwordText.value = \"\";\n password = generatePassword();\n passwordText.value = password;\n}", "title": "" }, { "docid": "b23bbee17e9caf9b33f0bd917efd60b1", "score": "0.6110131", "text": "function shPassword() {\n\n var x = document.getElementById(\"ex-pass\");\n \n if (x.type === \"password\") {\n\n x.type = \"text\";\n\n } else {\n\n x.type = \"password\";\n\n }\n\n }", "title": "" }, { "docid": "5824ba9d9b02fcd4d070cf8786e50b89", "score": "0.6109961", "text": "function writePassword() {\n password = createPw();\n passwordText = document.querySelector(\"#password\");\n\n passwordText.value = userPw;\n}", "title": "" }, { "docid": "956d8dafaea3b79fbdb8a4bb6c7554ec", "score": "0.6107069", "text": "function changePassword() {\n\n}", "title": "" }, { "docid": "d233da78e1111ed8e315097e73d3adf0", "score": "0.61063427", "text": "function loginPasswordFormCheck() {\n return UserAPI.verifyPassword({ password: $scope.inputs.passcode || '' });\n }", "title": "" }, { "docid": "ef829461ebb3c2915474da50516195b6", "score": "0.60978055", "text": "function writePassword() {\n //generates the prompts\n //generates you pw\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n//textbox area vale =generated pw\n passwordText.value = password;\n\n}", "title": "" }, { "docid": "bec91b868e36f2f6a4a217b029132df1", "score": "0.6096015", "text": "function writePassword(truepassword) {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = truepassword;\n\n}", "title": "" }, { "docid": "c768b9aba353d4e92dc6b0a3d0feb4da", "score": "0.6094486", "text": "function writePassword() {\n //WHEN I click the button to generate a password\n//THEN I am presented with a series of prompts for password criteria\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n\n //GIVEN I need a new, secure password\n // need a button or link to get a new password\n // need to show the password on the page\n\n//**********************Function Here****************************** */\n//write a function called \"generatepassword\" which will have a series of prompts\n\n//WHEN prompted for password criteria\n//THEN I select which criteria to include in the password\n\n\n\n//WHEN prompted for the length of the password\n//THEN I choose a length of at least 8 characters and no more than 128 characters\n//we have to ask how many characters they want in the password\n//we have to check to make sure it is between 8 and 128\n//otherwisw, we tell user to fic their input\n\n//WHEN prompted for character types to include in the password\n//THEN I choose lowercase, uppercase, numeric, and/or special characters\n//confirm if the want lowercase\n//confirm if they want uppercase\n//confirm if they want numeric\n//confirm if they want special characters\n\n\n//WHEN I answer each prompt\n//THEN my input should be validated and at least one character type should be selected\n// we need to show an error if they gave us no characters to choose from. \n\n//WHEN all prompts are answered\n//THEN a password is generated that matches the selected criteria\n//for all the characters chosen, choose one randomly and add it to our password \"x\" number of times. \n\n//WHEN the password is generated\n//THEN the password is either displayed in an alert or written to the page\n\n}", "title": "" }, { "docid": "63bb2bc699dc5a324b66be330464c1d2", "score": "0.6088791", "text": "function transcribePassword() {\n let pw = passwordGeneration();\n let pwText = document.querySelector(\"#PW\");\n pwText.value=pw;\n btnC.removeAttribute(\"disabled\");\n btnC.focus();\n}", "title": "" }, { "docid": "913968186cc6d627ddbf1f0b6ae965a4", "score": "0.6084938", "text": "function writePassword() {\n var password = userSelectedOptions();\n //var passwordText = document.querySelector(\"#password\");\n\n //passwordText.value = password;\n passwordText.innerHTML = password; \n\n}", "title": "" }, { "docid": "4b04ae64c6eaadd5de7340081df6de65", "score": "0.6069466", "text": "refreshPassword() {\n this.send('GeneratorPassword');\n }", "title": "" }, { "docid": "9d766c3bb3c4bfc533357e4574630a89", "score": "0.60692585", "text": "function showPass() {\n var passField = $('.show-pass-field');\n passField.each(function(index, input) {\n var $input = $(input);\n passField.after(\n '<span class=\"input-tag\">' +\n '<input type=\"checkbox\" name=\"show-pass\"></input>' +\n '<label for=\"show-pass\">Anzeigen</label>' +\n '</span>'\n );\n $('input[name=\"show-pass\"]').click(function() {\n var change= $(this).is(':checked') ? 'text' : 'password';\n var rep = $('<input type=\"' + change + '\" />')\n .attr('id', $input.attr('id'))\n .attr('name', $input.attr('name'))\n .attr('class', $input.attr('class'))\n .prop('required', true)\n .val($input.val())\n .insertBefore($input);\n $input.remove();\n $input = rep;\n showPassStrength();\n });\n });\n }", "title": "" }, { "docid": "ce566a2d8d827d18a081b12199859905", "score": "0.60641557", "text": "function promptUser(map) {\n console.log('prompt user started')\n var passwordLength = prompt(\"How long would you like the password to be? (min 8 characters, max 128 characters) Please enter a number:\", 24)\n\n //checks if input is number, checks if number is between 8 and 129\n if (passwordLength == null) {\n return\n } else if (passwordLength > 7 && passwordLength <= 128) {\n map.set('passwordLength', passwordLength)\n } else {\n alert(\"Password length must be entered as a number between 8 and 128 (inclusive)\")\n promptUser(map)\n return\n }\n\n //Prompts for user input\n var lowerCase = confirm('Do you want lowercase letters? (Select \\'Ok\\' for Yes)')\n map.set('lowerCase', lowerCase)\n var upperCase = confirm('Do you want uppercase letters? (Select \\'Ok\\' for Yes)')\n map.set('upperCase', upperCase)\n var numeric = confirm('Do you want numeric characters? (Select \\'Ok\\' for Yes)')\n map.set('numeric', numeric)\n var special = confirm('Do you want special characters? (Select \\'Ok\\' for Yes)')\n map.set('special', special)\n\n //calls the text update function\n writePassword()\n return\n}", "title": "" }, { "docid": "51af9ed009063ba33989c83109f7ccf3", "score": "0.60611457", "text": "function displayPassword(password) {\n display.textContent = password;\n if (password === \"\") {\n location.reload();\n } else {\n alert(\"Your password is:\\n\" + password);\n }\n}", "title": "" }, { "docid": "9949dd3417965c240644a45a7ce38db8", "score": "0.6054891", "text": "function checkPw2(){\n \n var pw2 = document.getElementById('renew_password');\n var msgErr = document.getElementById('msgErrPass');\n \n if(pw1.value != pw2.value){\n pw2.classList.add(\"is-invalid\");\n msgErr.innerHTML = \"Password Not Match\";\n button.disabled = true;\n }else{\n pw2.classList.remove(\"is-invalid\");\n msgErr.innerHTML = \"\";\n button.disabled = false;\n }\n}", "title": "" }, { "docid": "64b04e6a700e11486c0a7e8b71660249", "score": "0.60534734", "text": "changePassword(values) {\n checkNetworkConnectivity().then(check => {\n if (check) {\n SubmitChangePassword(values, this.changePasswordCallbackHandler);\n } else {\n alert(\"Please turn on your mobile internet.\");\n }\n });\n }", "title": "" }, { "docid": "890d67a0a665436af7e24f89de883080", "score": "0.6051412", "text": "function XMLRenderPW() {\n XMLRender('passchange')\n}", "title": "" }, { "docid": "ef6d18867966285bc68ae90848b96d67", "score": "0.6050053", "text": "function askPassword(ok, fail) {\n let password = prompt(\"Password?\", '');\n if (password == \"rockstar\") ok();\n else fail();\n }", "title": "" }, { "docid": "ef6d18867966285bc68ae90848b96d67", "score": "0.6050053", "text": "function askPassword(ok, fail) {\n let password = prompt(\"Password?\", '');\n if (password == \"rockstar\") ok();\n else fail();\n }", "title": "" }, { "docid": "47d41545f67b4c3e3e6ac2ab4e63c770", "score": "0.6048844", "text": "function writePassword() {\n var password = generatePassword();\n\n //series of prompts for password criteria\n var passwordText = document.querySelector(\"#password\");\n\n //password is either displayed in an alert or written to the page\n\n passwordText.value = password;\n\n}", "title": "" }, { "docid": "d2478b42d0d9241cf8dea3548691f666", "score": "0.6046985", "text": "function passwdchange()\r\n{\r\n // var oldpasswd = $('oldpasswd').value;\r\n $('passwderror').innerHTML = '';\r\n $('passwdsuccess').innerHTML = '';\r\n var newpasswd1 = $('newpasswd1').value;\r\n var newpasswd2 = $('newpasswd2').value;\r\n if (newpasswd1 != newpasswd2) {\r\n $('passwderror').innerHTML = passwdnotmatch;\r\n return;\r\n }\r\n if (newpasswd1.length < 4) {\r\n $('passwderror').innerHTML = passwdtooshort;\r\n return;\r\n }\r\n var surl = getXWikiURL(currentSpace, currentPage, \"save\", \"\");\r\n var parameters = 'XWiki.XWikiUsers_0_password=' + newpasswd1;\r\n parameters = parameters + '&comment=changepassword'\r\n var myAjax = new Ajax.Request(\r\n surl,\r\n {\r\n method: 'post',\r\n postBody: parameters,\r\n onComplete: function()\r\n {\r\n Field.clear('newpasswd1', 'newpasswd2');\r\n $('passwdsuccess').innerHTML = passwdupdated;\r\n authuser(userName, newpasswd1);\r\n }\r\n });\r\n}", "title": "" }, { "docid": "4cd1c9bfeb385482a42d08bfa013de66", "score": "0.6044125", "text": "function writePassword() {\n\n\n // Get user options\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n \n}", "title": "" }, { "docid": "de22d1b139928b54d3ce5bb731719508", "score": "0.6039875", "text": "matchPasswordPIN(pwd, confrmPwd, message) {\n if (pwd != confrmPwd) {\n Alert.alert(globals.appName, message)\n return false\n }\n return true\n }", "title": "" }, { "docid": "556d863249164860cb37749359da2b4d", "score": "0.60383785", "text": "function writePassword() {\n var password = generatePassword();\n // Create error message \n if(password.errorMessage) {\n return false\n }\n var passwordText = document.querySelector(\"#password\");\n console.log(password);\n passwordText.value = password;\n}", "title": "" }, { "docid": "56e6d392b2958a4096d4f217ba0d51ef", "score": "0.60369086", "text": "function checkPasswordMatch() {\n var password = $(\"#psw-input\").val();\n var confirmPassword = $(\"#txtConfirmPassword\").val();\n if (confirmPassword.length == 0) {\n $(\"#CheckPasswordMatch\").html(\"\");\n $(\"#CheckPasswordMatch\").css(\"color\", '');\n $(\"#examNxtBtn\").attr(\"disabled\", true);\n }\n else if (password != confirmPassword) {\n $(\"#CheckPasswordMatch\").html(\"Passwords does not match!\");\n $(\"#CheckPasswordMatch\").css(\"color\", '#ff2e4c');\n $(\"#examNxtBtn\").attr(\"disabled\", true);\n }\n else {\n $(\"#CheckPasswordMatch\").html(\"Passwords match.\");\n $(\"#CheckPasswordMatch\").css(\"color\", '#49deb2');\n $(\"#examNxtBtn\").attr(\"disabled\", false);\n }\n\n}", "title": "" }, { "docid": "12af67ed51cd0f68489b976ae3bc23c2", "score": "0.6035197", "text": "function checkPassword(){\n\t\t\n\t\tif(idPassword.val() == \"\" || idPassword.val().length < 8){\n\t\t\tidPasswordError.html(\"Password must contain 8 chars\");\n\t\t\tidPasswordError.show();\n\t\t\terrorPassword = true;\n\t\t}\n\t\telse{\n\t\t\tidPasswordError.hide();\n\t\t\terrorPassword = false;\n\t\t}\n\t}", "title": "" }, { "docid": "703d52e767a0b7c75d38530a92e8f7d7", "score": "0.60350996", "text": "function writePassword() {\n // var password = generatePassword();\n passwordText.value = newpassword;\n var passwordText = document.querySelector(\"#password\");\n}", "title": "" }, { "docid": "41d07be40ee0b3f196ddbe5c9a5d5bf6", "score": "0.6034084", "text": "function checkPw(){\n \n var p2 = document.getElementById('pass2');\n var msgErr = document.getElementById('msgErrPass');\n \n if(p1.value != p2.value){\n p2.classList.add(\"is-invalid\");\n msgErr.innerHTML = \"Password Not Match\";\n button.disabled = true;\n }else{\n p2.classList.remove(\"is-invalid\");\n msgErr.innerHTML = \"\";\n button.disabled = false;\n }\n}", "title": "" }, { "docid": "f70545b2031be58716729b365f0657c7", "score": "0.6033789", "text": "function writePassword() {\n var password = passwords();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n}", "title": "" }, { "docid": "6c38286673c093dedc3eae717467fb22", "score": "0.6033521", "text": "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n if(password!=\"Your Secure Password\"){\n window.alert(\"your password is \"+passwordText.value);\n\n }\n\n}", "title": "" }, { "docid": "d3cb5f6cb6ce2c9ab091e78a42510d2f", "score": "0.6033304", "text": "function match(pass1, pass2){\n var errors=document.querySelector(\".sidepanel\");\n errors.innerHTML=\"\"\n var result;\n if(pass1.value==pass2.value){\n result=true;\n }else{\n errors.innerHTML+=\"<p>Confirmation password does not match with password\";\n result=false;\n pass1.focus();\n pass2.focus();\n }\n return result;\n}", "title": "" } ]
fbe9344920461dd3b3cafbd3aabd467f
/ NAME : gfn_printWindow() / DESC : print window / DATE : 2016.03.30 / AUTH : Jeongmin Jin
[ { "docid": "9008b194a5a0d7af54c6c0894df653db", "score": "0.8072657", "text": "function gfn_printWindow(printArea) {\n\tvar win = window.open('','','left=0,top=0,width=552,height=477,toolbar=0,scrollbars=0,status =0');\n var headstr = \"<html><head><title></title></head><body>\";\n var footstr = \"</body>\";\n var newstr = document.all.item(printArea).innerHTML;\n var oldstr = document.body.innerHTML;\n document.body.innerHTML = headstr+newstr+footstr;\n window.print();\n document.body.innerHTML = oldstr;\n win.close();\n return false;\n}", "title": "" } ]
[ { "docid": "6ff37e7751dbb23821896fc57004f997", "score": "0.77076304", "text": "function WS_print(theURL,winName,features) \n\t\t{ \n\t\t// alert(theURL+'.........'+winName+'....'+features);\n\t\t\n \t\t\t window.moveTo(0,0); \n\t\t\t \n\t\t\t var window_attributes=(features)?features:'width=700,height=842,scrollbars=yes,left=0,top=0';\n\t\t\t \n\t\t\t window.open(theURL,winName,'width=700,height=842,scrollbars=yes,menubar=yes');\n \t\t}", "title": "" }, { "docid": "16a4e8a954c5e165055532fc96a58326", "score": "0.7599575", "text": "function printSpecial()\n{\nif (document.getElementById != null)\n{\nvar html = '<HTML>\\n<HEAD>\\n';\n\nif (document.getElementsByTagName != null)\n{\nvar headTags = document.getElementsByTagName(\"head\");\nif (headTags.length > 0)\nhtml += headTags[0].innerHTML;\n}\n\nhtml += '\\n</HE>\\n<BODY>\\n';\n\nvar printReadyElem = document.getElementById(\"printReady\");\n\nif (printReadyElem != null)\n{\nhtml += printReadyElem.innerHTML;\n}\nelse\n{\nalert(\"Could not find the printReady function\");\nreturn;\n}\n\nhtml += '\\n</BO>\\n</HT>';\n\nvar printWin = window.open(\"\",\"printSpecial\");\nprintWin.document.open();\nprintWin.document.write(html);\nprintWin.document.close();\nif (gAutoPrint)\nprintWin.print();\n}\nelse\n{\nalert(\"The print ready feature is only available if you are using an browser. Please update your browswer.\");\n}\n}", "title": "" }, { "docid": "6dff479821cee605c752d7a8dd0ab040", "score": "0.75348675", "text": "function fnPrint()\n{\nwindow.print();\n}", "title": "" }, { "docid": "4f3d693a09b24dad9bd59e1b12d55594", "score": "0.75331575", "text": "function printDoc()\r\n{\r\n window.print();\r\n}", "title": "" }, { "docid": "7e6891cfff348d2f11d81c24e2cad224", "score": "0.73353976", "text": "function onPrint() {\r\n\twindows.print();\r\n}", "title": "" }, { "docid": "e33caf7ad2aca2494d79586a7b41b20f", "score": "0.7218268", "text": "function NewPrintWindow(mypage, myname, w, h, scroll, resize) {\n var winl = (screen.width - w) / 2;\n var wint = (screen.height - h) / 2;\n winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable='+resize\n win = window.open(mypage, myname, winprops);\n if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }\n}", "title": "" }, { "docid": "adc32e83b1d0073a2976e96fa0598cd0", "score": "0.7199469", "text": "async print(e) {\n window.open(\n window.location.href + \"?format=print-\" + this.type,\n \"\",\n \"left=0,top=0,width=800,height=800,toolbar=0,scrollbars=0,status=0,noopener=1,noreferrer=1\"\n );\n }", "title": "" }, { "docid": "dbfca267606d45b52a94c56e35683a95", "score": "0.71959066", "text": "function openPrintWindow() {\n\tif( document.fmFilter.cmbFilterProjekt )\n\t\tnProjektId = document.fmFilter.cmbFilterProjekt.options[document.fmFilter.cmbFilterProjekt.selectedIndex].value;\n\telse\n\t\tnProjektId=\"\";\n\tif( nProjektId==\"\" )\n\t\tnProjektId=-1;\n\t\n\tif( document.fmFilter.cmbFilterDatum )\n\t\tsDatum = document.fmFilter.cmbFilterDatum.options[document.fmFilter.cmbFilterDatum.selectedIndex].value;\n\telse\n\t\tsDatum=\"\";\n\tif( sDatum==\"\" )\n\t\tsDatum=-1;\n\t\n\tif( document.fmFilter.cmbFilterMa )\n\t\tnMaiId = document.fmFilter.cmbFilterMa.options[document.fmFilter.cmbFilterMa.selectedIndex].value;\n\telse\n\t\tnMaiId=\"\";\n\tif( nMaiId==\"\" )\n\t\tnMaiId=-1;\n\t\t\n\tif( document.fmFilter.cmbFilterSchritt )\n\t\tnSchrittId = document.fmFilter.cmbFilterSchritt.options[document.fmFilter.cmbFilterSchritt.selectedIndex].value;\n\telse\n\t\tnSchrittId=\"\";\n\tif( nSchrittId==\"\" )\n\t\tnSchrittId=-1;\n\t\n\twPrint = window.open( \"../auswertung/printView.phtml?urlProjektId=\" + nProjektId + \"&urlDatum=\" + sDatum + \"&urlMaId=\" + nMaiId + \"&urlSchrittId=\" + nSchrittId,\n\t\t\t\t\t\t \"wPrint\",\t\t\t\n\t\t\t\t\t\t \"toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,width=600,height=600,resizable=yes\");\n\tif( window.focus )\n\t\twPrint.focus();\n}", "title": "" }, { "docid": "e3126298c86b098c2f2b444b40977edd", "score": "0.71715343", "text": "function printArea() {\r\n window.print();\r\n}", "title": "" }, { "docid": "293a02b812a414891f1a4830c7180818", "score": "0.71673983", "text": "function Print() {\r\n window.print();\r\n}", "title": "" }, { "docid": "474450bfb845cdc87b769e638702dd59", "score": "0.7160928", "text": "function getPrint(print_area)\n\n{\n\n//Creating new page\n\nvar pp = window.open();\n\n//Adding HTML opening tag with <HEAD> … </HEAD> portion\n// Add logic to dynamically set the title or change it back to \"Print Preview\"\npp.document.writeln('<HTML><HEAD><title>Eating Contract</title>')\n\npp.document.writeln('<LINK href=Styles.css type=\"text/css\" rel=\"stylesheet\">')\n\npp.document.writeln('<LINK href=PrintStyle.css type=\"text/css\" rel=\"stylesheet\" media=\"print\">')\n\npp.document.writeln('<base target=\"_self\"></HEAD>')\n\n//Adding Body Tag\n\npp.document.writeln('<body MS_POSITIONING=\"GridLayout\" bottomMargin=\"0\"');\n\npp.document.writeln(' leftMargin=\"0\" topMargin=\"0\" rightMargin=\"0\">');\n\n//Adding form Tag\n\npp.document.writeln('<form method=\"post\">');\n\npp.document.writeln('<TABLE cellSpacing=20 width=100% ><TR><TD align=center>');\n\npp.document.writeln('<TR><TD>');\n//Writing print area of the calling page\n\npp.document.writeln(document.getElementById(print_area).innerHTML);\n\npp.document.writeln('</TD></TR></TABLE>');\n//Creating two buttons Print and Close within a HTML table\n\npp.document.writeln('<TABLE width=100%><TR><TD></TD></TR><TR><TD align=center>');\n\npp.document.writeln('<INPUT ID=\"PRINT\" type=\"button\" value=\"Print\" ');\n\npp.document.writeln('onclick=\"javascript:location.reload(true);window.print();\">');\n\npp.document.writeln('<INPUT ID=\"CLOSE\" type=\"button\" value=\"Close\" onclick=\"window.close();\">');\n\npp.document.writeln('</TD></TR><TR><TD></TD></TR></TABLE>');\n\n//Ending Tag of </form>, </body> and </HTML>\n\npp.document.writeln('</form></body></HTML>');\n\n}", "title": "" }, { "docid": "bb4ea6374867a9b9958596ef2d43314f", "score": "0.7154333", "text": "function printTab(){\r\n window.print();\r\n }", "title": "" }, { "docid": "13a1d76b27e8afed493b4a3482057a25", "score": "0.7148664", "text": "function printDivTeacingIdeas()\n {\n var myWindow=window.open('','','width=600,height=700, left=100');\n var printContents = document.getElementById('teaching-ideas-content').innerHTML;\n myWindow.document.write(printContents);\n myWindow.document.close();\n myWindow.focus();\n myWindow.print();\n myWindow.close();\n\n }", "title": "" }, { "docid": "e539366736112e8649681576e7829223", "score": "0.7140078", "text": "function print() {\n window.print()\n}", "title": "" }, { "docid": "754b5f51cc603eb021b4cdb720342abb", "score": "0.7137629", "text": "function printWindow()\r\n{\r\nbV = parseInt(navigator.appVersion)\r\nif (bV >= 4) window.print()\r\n}", "title": "" }, { "docid": "e420ac035ebe5965cbf0fad5faa02782", "score": "0.7095889", "text": "function printWindow() {\n bV = parseInt(navigator.appVersion);\n if (bV >= 4) window.print();\n}", "title": "" }, { "docid": "ab21cc428033d014d8e1e499a03c80f3", "score": "0.70324695", "text": "function printPage() {\r\n\twindow.print();\r\n}", "title": "" }, { "docid": "59f6d03f6a85eee1e53055fdd6429191", "score": "0.6995028", "text": "function fnPrintPublish(){\r\n\t\tvar strUrl = '/Poll.do?hiddenAction=print&pollId='+document.PollForm.pollId.value\r\n\r\n\t\t help_window = window.open(strDocRoot+strUrl,'poll','width=760,height=300,left=0,top=0,resizable=no,scrollbars=NO');\r\n \t\t help_window.focus();\r\n\t}", "title": "" }, { "docid": "d4f2ff24442a87d9e5b4c5359040ee89", "score": "0.6975764", "text": "function modal_window_print(page,width,height){\n\n\t\t\t\t\t\tvar pass_id=document.getElementById('PASS_ID').value;\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar url=(page.indexOf('?')==-1)?page+'?WIN=off&PASS_ID='+pass_id:page+'&WIN=off&PASS_ID='+pass_id; \n\t\t\n\t\t\t\t\t\tvar w_width=(width)?width:1000; // Window Width\n\t\t\t\t\t\tvar w_height=(height)?height:600; // Window height \n\t\t\n\t\t\t\t\t\tvar cl=Math.floor(Math.random()*(10+1));\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar newWindow=window.open(url,cl,\"scrollbars=yes,menubar=yes,width=\"+w_width+\",Height=\"+w_height+\"\");\n\n\t\t\t\t\t\tnewWindow.moveTo(0,0);\n\n\t\t\t\t }", "title": "" }, { "docid": "a6eb699a221a21bf963214b08fce93e0", "score": "0.69266915", "text": "function PrintElem(elem)\n\t\t\t\t{\n\t\t\t\t var mywindow = window.open('', 'PRINT', 'height=400,width=600');\n\n\n\t\t\t\t\tmywindow.document.write('<html><head><title>' + document.title + '</title>');\n\n\t\t\t\t\tmywindow.document.write('</head><body >');\n\t\t\t\t mywindow.document.write('<h1>' + document.title + '</h1>');\n\t\t\t\t\tmywindow.document.write(document.getElementById(elem).innerHTML);\n\t\t\t\t\tmywindow.document.write('</body></html>');\n\n\t\t\t\t\tmywindow.document.close(); // necessary for IE >= 10\n\t\t\t\t\tmywindow.focus(); // necessary for IE >= 10*/\n\n\t\t\t\t\tmywindow.print();\n\t\t\t\t\tmywindow.close();\n\n\t\t\t\t\treturn true;\n\n\t\t\t\t\t}", "title": "" }, { "docid": "ce7a21b696f7864ce285016be0e9bcbd", "score": "0.69050276", "text": "function print_current_page() {\n window.print();\n }", "title": "" }, { "docid": "d495e9bc582cd5dd729dc5da6bccac47", "score": "0.6829814", "text": "function myFunction () {\n window.print();\n console.log(\"this worked!\");\n}", "title": "" }, { "docid": "961901f5217d84c903608733dac56562", "score": "0.6814928", "text": "function fnPrintThis(strPrintContents, strPath, strStdDate, strMemoText) {\n\tvar objWin = null;\n\tvar strFeature = \"\";\n\tvar width = 1050;\n\tvar height = 700;\n\tvar x = (screen.width - width) / 2;\n\tvar y = 0;\n\tif (true) {\n\t\tstrFeature += (\"width=\"+(width+20));\n\t\tstrFeature += (\",height=\"+height);\n\t\tstrFeature += (\",toolbar=no,location=no,directories=no\");\n\t\tstrFeature += (\",status=no,menubar=no,scrollbars=yes,resizable=no\");\n\t}\n\tobjWin = window.open('', 'print', strFeature);\n\tself.focus();\n\tobjWin.document.open();\n\tobjWin.document.write(\"<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\");\n\tobjWin.document.write(\"<html xmlns='http://www.w3.org/1999/xhtml'>\");\n\tobjWin.document.write(\"<head>\");\n\tobjWin.document.write(\"<title>\"+SITE_NM+\"</title>\");\n\tobjWin.document.write(\"<meta http-equiv='content-type' content='text/html; charset=utf-8' />\");\n\tobjWin.document.write(\"<link rel='stylesheet' type='text/css' href='\"+contextPath+\"/manager4/css/global.css' />\");\n\tobjWin.document.write(\"<link rel='stylesheet' type='text/css' href='\"+contextPath+\"/manager4/css/jquery-ui.css' />\");\n\tobjWin.document.write(\"<link rel='stylesheet' type='text/css' href='\"+contextPath+\"/manager4/css/style.css' />\");\n\tobjWin.document.write(\"<link rel='stylesheet' type='text/css' href='\"+contextPath+\"/manager4/js/colorbox/colorbox.css' />\");\n\tobjWin.document.write(\"<script src='\"+contextPath+\"/manager4/js/jquery-1.8.2.js'><\\/script>\");\n\tobjWin.document.write(\"<script src='\"+contextPath+\"/manager4/js/jquery-ui.js'><\\/script>\");\n\tobjWin.document.write(\"<script src='\"+contextPath+\"/manager4/js/html2canvas/rgbcolor.js' type='text/javascript'><\\/script>\");\n\tobjWin.document.write(\"<script src='\"+contextPath+\"/manager4/js/html2canvas/canvg.js' type='text/javascript'><\\/script>\");\n\tobjWin.document.write(\"<script src='\"+contextPath+\"/manager4/js/amcharts/amcharts.js' type='text/javascript'><\\/script>\");\n\tobjWin.document.write(\"<script src='\"+contextPath+\"/manager4/js/amcharts/serial.js' type='text/javascript'><\\/script>\");\n\tobjWin.document.write(\"<script src='\"+contextPath+\"/manager4/js/fixedheadertable/jquery.freezeheader.js' type='text/javascript'><\\/script>\");\n\tobjWin.document.write(\"<script src='\"+contextPath+\"/manager4/js/colorbox/jquery.colorbox.js'><\\/script>\");\n\tobjWin.document.write(\"<script src='\"+contextPath+\"/manager4/js/common.js'><\\/script>\");\n\tobjWin.document.write(\"<script type='text/javascript'>\");\n\tobjWin.document.write(\"$(document).ready(function(){$('#btn_print').click( function() {window.print();});});<\\/script>\");\n\tobjWin.document.write(\"</head>\");\n\tobjWin.document.write(\"<body onload='window.focus();'>\");\n\t\n\t// 헤더\n\tobjWin.document.write(\"<div id='report_print_header_area' style='width:\"+width+\"px;'>\");\n\tobjWin.document.write(\" <div id='report_print_header_vspace_area'></div>\");\n\tobjWin.document.write(\" <div id='report_print_header_title_area'>[ SGSAS™ 음성인식 운영지원시스템 ]</div>\");\n\tobjWin.document.write(\" <div id='report_print_header_summary_area'>\");\n\tobjWin.document.write(\" <div id='report_print_header_summary_left'>데이터 경로 : \"+strPath+\"<br>검색기간 : \"+strStdDate+\"</div>\");\n\tobjWin.document.write(\" <div id='report_print_header_summary_right'><a alt='인쇄하기' title='인쇄하기' id='btn_print' name='btn_print'><button>Print</button></a></div>\");\n\tobjWin.document.write(\" </div>\");\n\tobjWin.document.write(\"</div>\");\n\tobjWin.document.write(\"<div style='width:\"+width+\"px;height=20px;'>&nbsp;</div>\");\n\n\t// 한줄메모\n\tif (false) {\n\t\tobjWin.document.write(\"\t<div id='report_print_memo_area'>\");\n\t\tobjWin.document.write(\"\t<div id='report_print_memo_content_area'>\");\n\t\tobjWin.document.write(\"\t<div id='report_data_title2'>\");\n\t\tobjWin.document.write(\"\t\t<table id='report_data_table'>\");\n\t\tobjWin.document.write(\"\t\t\t<colgroup>\");\n\t\tobjWin.document.write(\"\t\t\t\t<col style='width:154px;' >\");\n\t\tobjWin.document.write(\"\t\t\t\t<col style='' >\");\n\t\tobjWin.document.write(\"\t\t\t</colgroup>\");\n\t\tobjWin.document.write(\"\t\t\t<tbody>\");\n\t\tobjWin.document.write(\"\t\t\t\t<tr>\");\n\t\tobjWin.document.write(\"\t\t\t\t\t<td class='print_title'>한줄메모</td>\");\n\t\tobjWin.document.write(\"\t\t\t\t\t<td class='data'>\"+strMemoText+\"</td>\");\n\t\tobjWin.document.write(\"\t\t\t\t</tr>\");\n\t\tobjWin.document.write(\"\t\t\t</tbody>\");\n\t\tobjWin.document.write(\"\t\t</table>\");\n\t\tobjWin.document.write(\"\t</div>\");\n\t\tobjWin.document.write(\"\t</div>\");\n\t\tobjWin.document.write(\"\t</div>\");\n\t}\n\n\t// 표 & 그래프\n\tobjWin.document.write(\"<div id='report_print_area' style='width:\"+width+\"px;'>\");\n\tobjWin.document.write(strPrintContents);\n\tobjWin.document.write(\"</div>\");\n\tobjWin.document.write(\"</body>\");\n\tobjWin.document.write(\"</html>\");\n\tobjWin.document.close();\n}", "title": "" }, { "docid": "bed998adaeda8c844721c52c86e46ab3", "score": "0.6814223", "text": "function printReport() {\n window.print();\n}", "title": "" }, { "docid": "b08e633bbd132808db87bea45f7f47cd", "score": "0.6791863", "text": "function printOptions(){\n window.print()\n}", "title": "" }, { "docid": "1042971a92663fa543b4fb7c542a267c", "score": "0.67756927", "text": "function PmxPrintPage(pdir, cid, chars, cttl, lbhelp, lblabel)\n{\n\tvar content = document.getElementById('print'+ cid).innerHTML;\n\tcontent = content.replace(/<br>/g, '<br />');\n\tcontent = content.replace(/<hr>/g, '<hr />');\n\tcontent = content.replace(/<img([^>]*)>/g, '<img$1 />');\n\tvar pmxprint = window.open(window.location.href, 'printer', '');\n\tpmxprint.document.open();\n\tpmxprint.document.write('<!DOCTYPE html>');\n\tpmxprint.document.write('<html dir=\"'+ pdir +'\">');\n\tpmxprint.document.write('<head><meta charset=\"'+ chars +'\">');\n\tpmxprint.document.write('<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">');\n\tpmxprint.document.write('<title>Print of \"'+ cttl +'\"</title>');\n\tpmxprint.document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"'+ pmx_default_theme_url +'/Portal/SysCss/portal_print.css\" />');\n\tpmxprint.document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"'+ pmx_default_theme_url +'/Portal/SysCss/portal.css\" />');\n\tpmxprint.document.write('<link rel=\"stylesheet\" type=\"text/css\" href=\"'+ pmx_default_theme_url +'/css/lightbox.css\" />');\n\tpmxprint.document.write('<script>var mobile_device=false;var Lightbox_help=\"'+ lbhelp +'\";var Lightbox_label=\"'+ lblabel +'\";</script>');\n\tpmxprint.document.write('<script src=\"'+ pmx_default_theme_url +'/scripts/jquery-3.1.1.min.js\"></script>');\n\tpmxprint.document.write('<script src=\"'+ pmx_default_theme_url +'/scripts/lightbox.js\"></script>');\n\tpmxprint.document.write('</head>');\n\tpmxprint.document.write('<body class=\"pmx_printbody\"><div style=\"text-align:center;font-size:1.2em;font-weight:bold;\">'+ cttl +'</div><hr />'+ content);\n\tpmxprint.document.write('</body></html>');\n\tpmxprint.document.close();\n}", "title": "" }, { "docid": "6caec5af52093a24c7c81ce7d0473bbb", "score": "0.6765154", "text": "function getPrint(config) {\r\n\t var width = '';\r\n\t var height = '';\r\n\t var left = '';\r\n\t var top = '';\r\n\t \r\n\t if((config.pWidth !== undefined && config.pWidth !== '') \r\n\t\t\t && (config.pHeight !== undefined && config.pHeight !== '')) {\r\n\t\t width = config.pWidth;\r\n\t\t height = config.pHeight;\r\n\t\t left = (screen.width - width)/2;\r\n\t\t top = (screen.height - height)/2;\r\n\t } else {\r\n\t\t /*default width and height*/\r\n\t\t width = 635;\r\n\t\t height = 600;\r\n\t\t left = (screen.width - width)/2;\r\n\t\t top = (screen.height - height)/2;\r\n\t } \r\n\t \r\n\t \r\n\t var url = config.pUrl;\r\n\t var title = config.pTitle;\r\n\t var params = 'width='+width+', height='+height;\r\n\t params += ', top='+top+', left='+left;\r\n\t params += ', directories=no';\r\n\t params += ', location=no';\r\n\t params += ', menubar=no';\r\n\t params += ', resizable=no';\r\n\t params += ', scrollbars=1';\r\n\t params += ', status=no';\r\n\t params += ', toolbar=no';\r\n\r\n\t var newwin=window.open(url,title, params);\r\n\t\r\n}", "title": "" }, { "docid": "6421fbe0099d7158beac8d3bd40bc72b", "score": "0.67630327", "text": "function gfn_print(divName) {\n\t$(\"divName\").printElement();\t\n}", "title": "" }, { "docid": "a0bd40cab38326c2016beb2ef634a8d1", "score": "0.6722982", "text": "function eFapsCommonPrint(_href) {\r\n var attr = \"location=no,menubar=no,titlebar=no,\"+\r\n \"resizable=yes,status=no,toolbar=no,scrollbars=yes\";\r\n var win = window.open(_href, \"NonModalWindow\" + (new Date()).getTime(), attr);\r\n win.focus();\r\n}", "title": "" }, { "docid": "00d450159d0deb4bf268d410193fd410", "score": "0.66827226", "text": "function printCurrentPage (){\n // window.print();\n}", "title": "" }, { "docid": "adcb74255033e0e44637207ac37a2c95", "score": "0.6682129", "text": "function onPrint() {\r\n window.print();\r\n}", "title": "" }, { "docid": "110a21d88a6133847eeceb61220482b5", "score": "0.6676548", "text": "function E_PRINT(element_id)\n\t{\n\t\t\tif(document.getElementById('REPORT_HEADER_INFO'))\n {\n E_H_PASS('REPORT_HEADER_INFO',''); \n }\n\n\t\t\tvar prtContent = document.getElementById(element_id);\n\t\t\tvar WinPrint = window.open('','','letf=10,top=10,width=\"700\",height=\"500\",toolbar=0,scrollbars=1,menubar=1,status=0');\n\n\t\t\tWinPrint.document.write(\"<html><head><LINK rel=\\\"stylesheet\\\" type\\\"text/css\\\" href=\\\"../css/strategion.css.css\\\" media=\\\"print\\\"><LINK rel=\\\"stylesheet\\\" type\\\"text/css\\\" href=\\\"../css/strategion.css.css\\\" media=\\\"screen\\\"></head><body>\");\n\n\t\t\tWinPrint.document.write(\"<textarea id=\\\"REPORT_USER_TITLE\\\" name=\\\"REPORT_USER_TITLE\\\" class=\\\"REPORT_USER_TITLE\\\" rows=1>Report Title</textarea>\");\n \n\t\t\tWinPrint.document.write(prtContent.innerHTML);\n\t\t\tWinPrint.document.write(\"</body></html>\");\n\t\t\tWinPrint.document.close();\n\t\t\tWinPrint.focus();\n\t\t\tWinPrint.print();\n\t\t\t\n }", "title": "" }, { "docid": "f94c82b01f3335bc936e134732a588e2", "score": "0.66680306", "text": "function WIN_SHOW_CONTENT()\n\t{\n\t\t\t\n\t\t\tvar WinPrint = window.open('','Part','width=\"800\",height=\"500\",toolbar=0,scrollbars=0,menubar=1,status=0');\n \t \n\t\t\tWinPrint.document.write(\"<html><head><title>Part Image</title><LINK rel=\\\"stylesheet\\\" type\\\"text/css\\\" href=\\\"../css/strategion.css.css\\\" media=\\\"print\\\"><LINK rel=\\\"stylesheet\\\" type\\\"text/css\\\" href=\\\"../css/strategion.css.css\\\" media=\\\"screen\\\"></head><body>\");\n\n\t\t\tWinPrint.document.write('<img src=\"../tmp/part.jpg\"></img>');\n\t\t\tWinPrint.document.write(\"</body></html>\");\n\t\t\t\n\n\t\t\t\n }", "title": "" }, { "docid": "9cb892def6a6491c7b8d443c220d2028", "score": "0.6597541", "text": "function printit()\n{\nparent.contact.focus();\nparent.contact.print();\n}", "title": "" }, { "docid": "25392f71658096bf638d1f2819056780", "score": "0.6593389", "text": "function gbPrint()\n{\n\tif (!gbAngularMode) {\n gbGetRequest ( \"goodbarber://print\" );\n } else {\n window.print();\n }\n}", "title": "" }, { "docid": "be248709599f2a28193d22b9c390a0bf", "score": "0.6587516", "text": "function printreport(title,reporthtml,spcificss){\n var mywindow = window.open('', title, 'height=450,width=650');\n mywindow.document.write('<html><head><title>'+title+'</title>');\n /*optional stylesheet*/ //\n\t\tmywindow.document.write(' <link rel=\"stylesheet\" type=\"text/css\" href=\"css/appmains.css\" />');\n\t\t//mywindow.document.write(' <link rel=\"stylesheet\" type=\"text/css\" href=\"css/invprint.css\" />');\n // mywindow.document.styleSheets=\"css/invprint.css\"\n\t printstyle='<style>body{background:none !important;};'+spcificss+'</style>'\n\t\tmywindow.document.write(printstyle);\n\t\tmywindow.document.write('</head><body >');\n mywindow.document.write(reporthtml);\n mywindow.document.write('</body></html>');\n mywindow.print();\n\t\tmywindow.close();\n return true;\t\n}", "title": "" }, { "docid": "308c8f01ec16b2bae25f809f63bea19c", "score": "0.65743583", "text": "print() {\n // const printableContent = document.querySelector('#printableContent');\n // const pri = printableContent.contentWindow;\n // pri.document.open();\n // pri.document.write(printableContent.innerHTML);\n // pri.document.close();\n // pri.focus();\n // pri.print();\n }", "title": "" }, { "docid": "28b039f2eba2861c5dfc78bbe86cd5a2", "score": "0.6552783", "text": "function printPreview() {\n var toPrint = document.getElementById('printCard');\n var popupWin = window.open('');\n\n popupWin.document.open();\n popupWin.document.write('<html><link rel=\"stylesheet\" type=\"text/css\" href=\"http://localhost/itclub/assets/css/style.css\" media=\"screen\"/></head><body\">');\n popupWin.document.write('<html><link rel=\"stylesheet\" type=\"text/css\" href=\"http://localhost/itclub/assets/css/materialize.css\"\" media=\"screen\"/></head><body\">');\n popupWin.document.write('<html><link rel=\"stylesheet\" type=\"text/css\" href=\"http://localhost/itclub/assets/vendor/fontawesome-free/css/all.min.css\" media=\"screen\"/></head><body\">');\n popupWin.document.write('</html>');\n popupWin.document.write(toPrint.outerHTML);\n popupWin.document.close();\n }", "title": "" }, { "docid": "bd552e4bace89fe36c02a8528c73a6eb", "score": "0.6549079", "text": "function printSpecial()\n{\n\tif (document.getElementById != null)\n\t{\n\t\tvar html = '<HTML>\\n<HEAD>\\n';\n\n\t\tif (document.getElementsByTagName != null)\n\t\t{\n\t\t\tvar headTags = document.getElementsByTagName(\"head\");\n\t\t\tif (headTags.length > 0)\n\t\t\t\thtml += headTags[0].innerHTML;\n\t\t}\n\t\t\n\t\thtml += '\\n</HE' + 'AD>\\n<BODY>\\n';\n\t\t\n\t\tvar printReadyElem = document.getElementById(\"printReady\");\n\t\t\n\t\tif (printReadyElem != null)\n\t\t{\n\t\t\t\thtml += printReadyElem.innerHTML;\n\t\t}\n\t\telse\n\t\t{\n\t\t\talert(\"Could not find the printReady section in the HTML\");\n\t\t\treturn;\n\t\t}\n\t\t\t\n\t\thtml += '\\n</BO' + 'DY>\\n</HT' + 'ML>';\n\t\t\n\t\tvar printWin = window.open(\"\",\"printSpecial\");\n\t\tprintWin.document.open();\n\t\tprintWin.document.write(html);\n\t\tprintWin.document.close();\n\t\tif (gAutoPrint)\n\t\t\tprintWin.print();\n\t}\n\telse\n\t{\n\t\talert(\"Sorry, the print ready feature is only available in modern browsers.\");\n\t}\n}", "title": "" }, { "docid": "2e85f05ba2bc94e96abf9cb7e22f93f4", "score": "0.652488", "text": "function PrintJobDescription_MyJobProfile_OnClick()\n{\n\tvar pFormObj = GetStansWindowLayer(\"main\", \"JobDescription_MyJobProfileWindow\");\n\tpFormObj.print()\n}", "title": "" }, { "docid": "4daf8cf3758fc95d275bdb3c60ca08ff", "score": "0.6521643", "text": "function forprint(){\nif (!window.print){\n return\n }\n window.print()\n}", "title": "" }, { "docid": "d35898683922cdecf86f6bd84272655c", "score": "0.64804345", "text": "function printOrder(orderId = null) {\n if (orderId) {\n\n $.ajax({\n url: 'php_action/printOrder.php',\n type: 'post',\n data: { orderId: orderId },\n dataType: 'text',\n success: function(response) {\n\n var mywindow = window.open('', 'LAV', 'height=1000,width=900');\n mywindow.document.write('<html><head><title>OK</title>');\n mywindow.document.write('</head><body>');\n mywindow.document.write(response);\n mywindow.document.write('</body></html>');\n\n mywindow.document.close(); // necessary for IE >= 10\n mywindow.focus(); // necessary for IE >= 10\n\n mywindow.print();\n mywindow.close();\n\n } // /success function\n }); // /ajax function to fetch the printable order\n } // /if orderId\n} // /print order function", "title": "" }, { "docid": "0b207a636642ca658ca0e56152ab333c", "score": "0.6467323", "text": "function print(options) {\n\t\t\tvar win = _electron.remote.getCurrentWindow();\n\t\t\twin.webContents.print({\n\t\t\t\tprintBackground: true\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "8629ed6663b40985357678bc0f68ded2", "score": "0.64392555", "text": "function print() {\n /**\n * Internal referenced values \n * @type {{CancelResult: {function()}, Dialog: any, \n DialogSettings: any, Displayed: true}} \n * */\n var value = {\n CancelResult: null,\n Dialog: null,\n DialogSettings: {},\n Displayed: false\n };\n /**\n * This displays the print preview dialog with the content you specify with HTML\n * In Office you can export the selection or the entire document/message as \n * raw HTML and pass it to this function to display it as it appears on screen\n * and then print it.\n * @param {string} [html] The html to be printed\n * @param {{function()}} [cancelResult] Callback if the user cancels\n */\n this.Show = function(html, cancelresult) {\n try {\n // verify no other dialogs are open first\n if(isDialogOpen()) throw(\"A dialog is already open.\");\n if (html === undefined || html === null || html == \"\") {\n html = \"<html></html>\";\n } \n var buttons = MessageBoxButtons.OkCancel;\n var content = btoa(unescape(encodeURIComponent(html)));\n value.CancelResult = cancelresult;\n value.DialogSettings = {\n Text: content, Caption: \"Print Preview\", Buttons: buttons,\n Icon: MessageBoxIcons.None, DialogType: \"print\"\n };\n localStorage.setItem(OfficeJS.dialogs.settings(), JSON.stringify(value.DialogSettings));\n // show the dialog \n Office.context.ui.displayDialogAsync(OfficeJS.dialogs.GetUrl(),\n { height: 60, width: 60, displayInIframe: isOfficeOnline() },\n function (result) {\n value.Displayed = true;\n value.Dialog = result.value;\n value.Dialog.addEventHandler(Office.EventType.DialogEventReceived, function (arg) {\n dialogCloseAsync(value.Dialog, function() {\n value.Displayed = false;\n if(value.CancelResult) value.CancelResult();\n });\n });\n value.Dialog.addEventHandler(Office.EventType.DialogMessageReceived, function (arg) {\n dialogCloseAsync(value.Dialog, function() {\n value.Displayed = false;\n if(value.CancelResult) value.CancelResult();\n });\n });\n });\n } catch(e) {\n console.log(e);\n }\n }\n /**\n * Resets the PrintPreview object for reuse\n */\n this.Reset = function () {\n try {\n PrintPreview = new print();\n } catch (e) {\n console.log(e);\n }\n };\n /**\n * This method closes the PrintPreview dialog\n * by calling the helper function for async\n * @param {function()} asyncResult Callback after the dialog is closed\n */\n this.CloseDialogAsync = function (asyncResult) {\n value.Displayed = false;\n dialogCloseAsync(value.Dialog, asyncResult);\n }\n /**\n * Returns if the dialog is shown\n */\n this.Displayed = function() { return value.Displayed };\n}", "title": "" }, { "docid": "a905949b0866e42455da67b01aebb716", "score": "0.64388186", "text": "function printShow() {\n\t$('.view-print').on('click', function (e) {\n\t\te.preventDefault();\n\t\twindow.print();\n\t});\n}", "title": "" }, { "docid": "06d00343bc29638e9ff5883b869d049b", "score": "0.64351106", "text": "function printShow() {\n\t$('.view-print').on('click', function (e) {\n\t\te.preventDefault();\n\t\twindow.print();\n\t})\n}", "title": "" }, { "docid": "d7ee8e91e1f8fdcc4a7b65370bff1f3e", "score": "0.6424313", "text": "function printDiagram() {\n\t var svgWindow = window.open();\n\t if (!svgWindow) return; // failure to open a new Window\n\t var printSize = new go.Size(700, 960);\n\t var bnds = $scope.myDiagram.documentBounds;\n\t var x = bnds.x;\n\t var y = bnds.y;\n\t while (y < bnds.bottom) {\n\t while (x < bnds.right) {\n\t var svg = $scope.myDiagram.makeSVG({ scale: 1.0, position: new go.Point(x, y), size: printSize });\n\t svgWindow.document.body.appendChild(svg);\n\t x += printSize.width;\n\t }\n\t x = bnds.x;\n\t y += printSize.height;\n\t }\n\t setTimeout(function() { svgWindow.print(); }, 1);\n\t }", "title": "" }, { "docid": "38b3b86bb85364436e88a3a5509dbe9a", "score": "0.6414629", "text": "printScreen() {\n var printContents = document.getElementById(\"printContents\").innerHTML;\n var wholePage = document.body.innerHTML;\n document.body.innerHTML = printContents;\n window.print();\n document.body.innerHTML = wholePage;\n }", "title": "" }, { "docid": "9ff511cb9571f21c59eb8edaa6fc01b1", "score": "0.6414121", "text": "function printPage(){\n\tvar title = document.title; //console.log(title);\n\tvar tempTitle = title + \" - \" + timestamp(true);\n\tdocument.title = tempTitle;\n\twindow.print();\n\tdocument.title = title;\n}", "title": "" }, { "docid": "39eb47769d611aad63e5caf99a4886f1", "score": "0.6386125", "text": "function at_display(x)\r\n{\r\n var win = window.open();\r\n for (var i in x) win.document.write(i+' = '+x[i]+'<br>');\r\n}", "title": "" }, { "docid": "9a9a971b9f3300fb5fbfceb3efa58c51", "score": "0.63506067", "text": "function printPage(){\r\n\ttry{\r\n\t\tvar divElements = null;\r\n\t\tvar divPropArray = new Array();\r\n\t\tdivElements = document.all.tags(\"div\");\r\n\t\tif(divElements!=null && divElements.length!=\"undefined\" && divElements.length>0){\r\n\t\t\tvar totalElements = divElements.length;\r\n\t\t\tfor(var i = 0 ; i < totalElements ; i++){\r\n\t\t\t\tdivPropArray[i]=divElements[i].style.overflow;\r\n\t\t\t\tdivElements[i].style.overflow=\"visible\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar textAreaElements = document.all.tags(\"textarea\");\r\n\t\tvar textAreaPropArray = new Array();\r\n\t\tif(textAreaElements!=null && textAreaElements.length!=\"undefined\" && textAreaElements.length>0){\r\n\t\t\tvar totalElements = textAreaElements.length;\r\n\t\t\tfor(var i = 0 ; i < totalElements ; i++){\r\n\t\t\t\ttextAreaPropArray[i]=textAreaElements[i].style.overflow;\r\n\t\t\t\ttextAreaElements[i].style.overflow=\"visible\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tsetPageMargings(\"19px auto\");\r\n\t\twindow.print();\r\n\t\tresetProperties(divElements,divPropArray);\r\n\t\tresetProperties(textAreaElements,textAreaPropArray);\r\n\t\t//window.location.reload();\r\n\t\t/*newwindow = window.open(\"a.html\",\"popup\",\"toolbar=no,status=no,scrollbars=1,resizable=1\");\r\n\t\tnewwindow.document.write(window.document.body.innerHTML);\r\n\t\t//newwindow.document.body.style.marginLeft = '0px';\r\n\t\tnewwindow.document.body.style.marginRight = '1000px';\r\n\t\t//newwindow.document.body.style.marginTop = '0px';\r\n\t\t*/\r\n\t}catch(e){\r\n\t\talertException(\"common.js|printPage\" , e);\r\n\t}\r\n}", "title": "" }, { "docid": "9d06b6ea71d15b9f19ba3b7484a6e4ab", "score": "0.6327347", "text": "function printDiv(divId){\n\tvar DocumentContainer = document.getElementById(divId);\n\tvar WindowObject = window.open('', \"PrintWindow\",\n\t\"width=600,height=500,top=50,left=50,toolbars=no,scrollbars=yes,status=no,resizable=yes\");\n\tWindowObject.document.writeln(DocumentContainer.innerHTML);\n\tWindowObject.document.close();\n\tWindowObject.focus();\n\tWindowObject.print();\n\tWindowObject.close();\n}", "title": "" }, { "docid": "6a0d92f903de237f2731b54ac96ee87e", "score": "0.63213944", "text": "function printTicket() {\n PrintButton = \"\";\n document.getElementById(\"printknop\").innerHTML = PrintButton;\n window.print();\n}", "title": "" }, { "docid": "5a0a7af9f77de0cc135a32c9d9e0e6e4", "score": "0.62757015", "text": "print() {\n let divToPrint = document.getElementsByClassName('outer')[0];\n console.log(divToPrint);\n divToPrint.childNodes[0].removeChild(divToPrint.childNodes[0].childNodes[0]);\n let newWin = window.open('');\n newWin.document.write(divToPrint.outerHTML);\n newWin.print();\n newWin.close();\n }", "title": "" }, { "docid": "3d4d0d1e62330db49b98097ed3bc18cb", "score": "0.6268514", "text": "function Popup(data) {\n var mywindow = window.open('', 'my div', 'height=400,width=650');\n mywindow.document.write('<html><head><title>Do I have Everything?</title>');\n mywindow.document.write(\"<link href='http://fonts.googleapis.com/css?family=Dosis' rel='stylesheet' type='text/css'><link rel='stylesheet' href='css/mainPrint.css' type='text/css'>\");\n mywindow.document.write('</head><body >');\n mywindow.document.write(data);\n mywindow.document.write('</body></html>');\n}", "title": "" }, { "docid": "5719387b457d9adf4574356475cadd20", "score": "0.62485063", "text": "function printmygridGO(obj){ global_printer.printGrid(obj);\t}", "title": "" }, { "docid": "964d58c59db00f4e0c530a687d5352cc", "score": "0.6228756", "text": "function PrintItemkit(objItem, strParams) {\n var defaultParams = 'toolbar=no,menubar=no,fullscreen=no ,scrollbars=yes,resizable=yes,width=560,height=575,top=10,left=10';\n var ItemWin;\n if (strParams != null) {\n ItemWin = window.open('', '_blank', strParams);\n } else {\n ItemWin = window.open('', '_blank', defaultParams);\n }\n\n var myDoc = objItem.innerHTML;\n //alert(myDoc);\n ItemWin.document.open();\n ItemWin.document.write('&lt;HTML&gt;&lt;HEAD&gt;&lt;LINK rel=\"stylesheet\" type=\"text/css\" href=\"<xsl:value-of select=\"$SiteURL\"/>/template/main.css\"&gt;&lt;BASE href=\"<xsl:value-of select=\"$SiteURL\"/>\"/&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;TABLE width=\"100%\"&gt;&lt;TR&gt;&lt;TD style=\"padding:5px;\" dir=\"rtl\"&gt;' + myDoc + '&lt;/TD&gt;&lt;/TR&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;');\n ItemWin.focus();\n // ItemWin.document.close();\n // ItemWin.print();\n // ItemWin.close();\n}", "title": "" }, { "docid": "4c4c80dd4bef2588cee574d2207d2c6f", "score": "0.62053907", "text": "function popitup(destination,win_name,win_dim) \n\t{\n\t\t\twindow.open (destination ,win_name,win_dim + ',' + 'resizable=no,scrollbars=no,toolbar=no,Left=250,Top=250,status=no,directories=no,menubar=no,location=tabelle');\n \t}", "title": "" }, { "docid": "a6a3f068227afeaf17c1f2aefa1b5de8", "score": "0.6198987", "text": "function printNotesData() {\n windowTitle = \"Notes\";\n id = \"NotePrintDiv\";\n var content = \"\";\n var divToPrint = document.getElementById(id);\n $('#HiddenNotePrintDiv').empty();\n $('#HiddenNotePrintDiv').append(divToPrint.innerHTML);\n var mywindow = window.open('', $('#HiddenNotePrintDiv').html(), 'height=' + screen.height + ',width=' + screen.width);\n mywindow.document.write('<html><head><title>' + windowTitle + '</title>');\n mywindow.document.write('<link rel=\"stylesheet\" href=\"~/Content/bootstrap.min.css\" type=\"text/css\" />');\n mywindow.document.write('<style>@page{size: auto;margin-bottom:0.5cm;margin-top:0.5cm;margin-left:0cm;margin-right:0cm;} #DetailsNote{ text-align: justify;text-justify: inter-word;} .downspace{margin-bottom:-20px;} th{background-color: #0095ff;}</style>');\n mywindow.document.write('</head><body style=\"background-color:white;word-wrap: break-word;\">');\n mywindow.document.write($('#HiddenNotePrintDiv').html());\n mywindow.document.write('</body><script> var logo = document.getElementById(\"noteLogo\"); logo.style.width=\"159px\"; logo.style.height=\"80px\";</script></html>');\n mywindow.document.close();\n mywindow.focus();\n $(mywindow).ready(function () {\n setTimeout(function () {\n mywindow.print();\n mywindow.close();\n }, 2000);\n });\n}", "title": "" }, { "docid": "0ffb8c363cef1eea4648189f51ec8c7e", "score": "0.6186352", "text": "function displayPDFWindow(context)\n{\n if (window.pdfWin && !pdfWin.closed)\n {\n pdfWin.focus();\n }\n else\n {\n pdfWin = window.open(context + \"/downloadReportWM2.do\", \"\", \"toolbar=no,menubar=no,scrollbars=no,resizable=yes,status=yes,location=no,directories=no,copyhistory=no,height=700,width=800,top=80,left=200\");\n }\n}", "title": "" }, { "docid": "9abf9eac7628261058419811561712b4", "score": "0.614131", "text": "function PrintElem(elem){\n Popup($(elem).html());\n}", "title": "" }, { "docid": "93569e52fd63e77c8c0129cce76fbc34", "score": "0.6135696", "text": "function printButtonClick () {\n $imageViewerModalImage.printThis({\n printDelay: 333,\n removeScripts: true,\n base: window.location.href.substring(0, window.location.href.lastIndexOf('/') + 1)\n })\n }", "title": "" }, { "docid": "72a617b6719e8dc0b56a12a8d6cf90ae", "score": "0.6113997", "text": "function imprime_bloc(titre, objet) {\n// Définition de la zone à imprimer\n var zone = document.getElementById(objet).innerHTML;\n\n// Ouverture du popup\n var fen = window.open(\"\", \"\", \"height=500, width=600,toolbar=0, menubar=0, scrollbars=1, resizable=1,status=0, location=0, left=10, top=10\");\n\n// style du popup\n fen.document.body.style.color = '#000000';\n fen.document.body.style.backgroundColor = '#FFFFFF';\n fen.document.body.style.padding = \"20px\";\n\n// Ajout des données a imprimer\n fen.document.title = titre;\n fen.document.body.innerHTML += \" \" + zone + \" \";\n\n// Impression du popup\n fen.window.print();\n\n//Fermeture du popup\n fen.window.close();\n return true;\n}", "title": "" }, { "docid": "a77b6cdb7daffca5abcb3ea69e29f5d5", "score": "0.6102553", "text": "function printPatientReviewDetailsPage() {\n var patientId = $('#input_pgd_id').val();\n window.open('/print_patient_details/'+patientId+'/review/9', '_blank')\n }", "title": "" }, { "docid": "f496570de039fc404b9fcf3510e8a7fc", "score": "0.6101963", "text": "function displayToWindow(text) {\n\tdocument.getElementById(\"output\").innerHTML = document.getElementById(\"output\").innerHTML + \"<br>\" + text;\n}", "title": "" }, { "docid": "21ec6177692780a49bdd4bad3f56f0e7", "score": "0.60890716", "text": "function print_data(){\n $('#modal_print').modal('hide');\nwindow.open(\"export/pdf_nilai.php?kelas=\"+$('#kelas_print').val(), \"Cetak Nilai\", \"height=650, width=1024, left=150, scrollbars=yes\");\n return false;\n}", "title": "" }, { "docid": "c7ba7fce5016e737e421cd5090390a04", "score": "0.60529834", "text": "function ShowInWindow(Contents)\r\n\t{\r\n\t\t//create the popup\r\n\t\tvar winWid = 640;\r\n\t\tvar winHgt = 640;\r\n\r\n\t\tvar winLeft = (screen.width - winWid) / 2;\r\n\t\tvar winTop = (screen.height - winHgt) / 2;\r\n\r\n\t\tvar w = window.open('', 'export-wnd', 'width={0},height={1},left={2},top={3},scrollbar=yes,resizable=yes,toolbar=no'.format(winWid, winHgt, winLeft, winTop));\r\n\t\tw.document.body.innerHTML = '<style type=\"text/css\">body { padding: 4px; } pre { font-family: monospace; font-size: 16pt; height: 100%; width: 100%; height: 100%; } pre:focus { outline: none }</style><pre contenteditable=\"true\">' + Contents + '</pre>'; //default styling and content\r\n\t\tw.focus();\r\n\t}", "title": "" }, { "docid": "2ef2a6c69f7664a8f59767ef50e3a086", "score": "0.604982", "text": "function printDoc(closeAfterPrint){\n \n window.print();\n if (closeAfterPrint==true) window.close();\n\treturn false;\n}", "title": "" }, { "docid": "822c1c4b8a0420a1789c7d31bca0b3df", "score": "0.6047512", "text": "function pmb_print_preview()\n{\n jQuery('.pmb-waiting-message-fullpage').toggle();\n}", "title": "" }, { "docid": "31f039cc43eb7c838397395238d5f5d9", "score": "0.60473984", "text": "function popupWindow(addr,popname,w,h,features) {\r\n var winl = (screen.width-w)/2;\r\n var wint = (screen.height-h)/2;\r\n if (winl < 0) winl = 0;\r\n if (wint < 0) wint = 0;\r\n var settings = 'height=' + h + ',';\r\n settings += 'width=' + w + ',';\r\n settings += 'top=' + wint + ',';\r\n settings += 'left=' + winl + ',';\r\n settings += features;\r\n win = window.open(addr,popname,settings);\r\n win.window.focus();\r\n}", "title": "" }, { "docid": "ff17be0ca7930648059009a754559004", "score": "0.6039464", "text": "function printout(){\n$(\"#textlist\").printThis({\n pageTitle: selectedlist,\n importCSS: false\n});\n}", "title": "" }, { "docid": "123f647015e4daaf3f18e59398cf3869", "score": "0.602375", "text": "function print() {\n worker.port.emit('print frame',\n {\n silent : prefs.silent,\n printerName : prefs.printerName,\n frameIndex : frameIndex\n }\n );\n\n frameIndex++;\n if ( frameIndex > framesCount - 1) {\n frameIndex = 0;\n clearInterval(printer);\n }\n}", "title": "" }, { "docid": "13ed3113cfd1bcd301947e75c5ee6f52", "score": "0.6018211", "text": "function nuevaVentana(t) {\n $(\"#nVentana\").click(function () {\n var prtContent = document.getElementById(\"resultados\");\n var WinPrint = window.open('', '', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=screen.width,height=screen.height,top=0,left=0');\n\n WinPrint.document.write('<html><head><title>' + t + '</title><meta charset=\"utf-8\"><link href=\"css/boostrap-min.css\" rel=\"stylesheet\" /></head><body>');\n\n WinPrint.document.write(prtContent.innerHTML + '<script>document.getElementById(\"nVentana\").innerHTML=\"\";</script>');\n WinPrint.document.write('</body></html>');\n });\n}", "title": "" }, { "docid": "05a10e13ea035b892aa6832199186578", "score": "0.6002666", "text": "function popupWindow(addr,popname,w,h,features) {\n var winl = (screen.width-w)/2;\n var wint = (screen.height-h)/2;\n if (winl < 0) winl = 0;\n if (wint < 0) wint = 0;\n var settings = 'height=' + h + ',';\n settings += 'width=' + w + ',';\n settings += 'top=' + wint + ',';\n settings += 'left=' + winl + ',';\n settings += features;\n win = window.open(addr,popname,settings);\n win.window.focus();\n}", "title": "" }, { "docid": "126c7b997e21c703519cb91d64c6a0d6", "score": "0.59992033", "text": "function print() {\n burnTheChildren();\n setImage();\n showImage();\n}", "title": "" }, { "docid": "e2d39dfc7cec1dc755d5180477fd1447", "score": "0.5998253", "text": "function printResume(){\n window.print();\n}", "title": "" }, { "docid": "e6b0b1ccc37dccb6c1f7d15bc2abcdcd", "score": "0.59859866", "text": "function func (){\n var element = document.getElementById('display_pane');\n element.innerHTML = printObj(object);\n }", "title": "" }, { "docid": "e6b0b1ccc37dccb6c1f7d15bc2abcdcd", "score": "0.59859866", "text": "function func (){\n var element = document.getElementById('display_pane');\n element.innerHTML = printObj(object);\n }", "title": "" }, { "docid": "e6b0b1ccc37dccb6c1f7d15bc2abcdcd", "score": "0.59859866", "text": "function func (){\n var element = document.getElementById('display_pane');\n element.innerHTML = printObj(object);\n }", "title": "" }, { "docid": "49b39867daf1577cad82a60fe92478be", "score": "0.59811074", "text": "function printDoc(){\n var toPrint = docToPrint.splice(0,lim);\n mod = 130;\n if (toPrint.length > 0){\n $.ajax({\n url:'services/xPrint.php',\n data: {action:'print',params:toPrint,model:mod},\n dataType: 'json',\n success:showPrinted,\n error:serviceError,\n type:'POST'\n });\n }\n else{\n $('<div class=\"full-page\" style=\"text-align:center;\">Operazione Terminata</div>').dialog({'title':'Messaggio','modal':true,width:500});\n }\n}", "title": "" }, { "docid": "b598aa8779b99a855435b90d00a74b2a", "score": "0.59780896", "text": "function printDocument(divId) {\n var ventana = window.open(\"\", \"\", \"\");\n var contenido = \"<head>\"+\n\t \t\t\t\"<link href='https://cashmarkets.es/views/assets/css/sb-admin-2.css' rel='stylesheet'>\"+\n\t \t\t\t\"<link href='https://cashmarkets.es/views/assets/vendor/fontawesome-free/css/all.min.css' rel='stylesheet' type='text/css'>\"+\n \t\t\t\t\"<link href='https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i' rel='stylesheet'>\"+\n\t \t\t\t\"</head><body onload='window.print();window.close();'>\";\n contenido = contenido + document.getElementById(divId).innerHTML + \"</body></html>\";\n ventana.document.open();\n ventana.document.write(contenido);\n ventana.document.close();\n}", "title": "" }, { "docid": "a4ddf1fd09c7d204b49cc8910c836499", "score": "0.597546", "text": "function PrintWithIframe(data)\r\n {\r\n\r\n //if ($('iframe#printf').size() == 0) {\r\n $('html').append('<iframe id=\"printf\" name=\"printf\" style=\"width:100%;height:1024px;visibility:hidden;\"></iframe>'); // an iFrame is added to the html content, then your div's contents are added to it and the iFrame's content is printed\r\n\r\n var mywindow = window.frames[\"printf\"];\r\n mywindow.document.write('<html><head><title></title><style>body{margin: 0 auto; text-align: center;}@page { size: auto; margin: 0mm; }</style>' // Your styles here, I needed the margins set up like this\r\n + '</head><body style=\"text-align:center;\"><div>'\r\n + data\r\n + '</div></body></html>');\r\n\r\n $(mywindow.document).ready(function(){\r\n // mywindow.print();\r\n setTimeout(function(){\r\n $('iframe#printf').remove();\r\n },\r\n 1000); // The iFrame is removed 2 seconds after print() is executed, which is enough for me, but you can play around with the value\r\n });\r\n // }\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "022a99b48ec6a1f1b2490befee0a5ef3", "score": "0.5974572", "text": "function OpenTestWin() {\n // window may have been closed and need opening again!\n if ((testWinOpen < 1) || testWin.closed) {\n testWinOpen = 2;\n testWin = window.open( \"\", \"testWin\", \"toolbar=0,menubar=1,scrollbars=1\" );\n testWin.document.writeln( \"<HTML><HEAD><TITLE>Statistics Function Tests</TITLE></HEAD><BODY>\" );\n testWin.document.writeln( \"<H1 ALIGN = CENTER>Statistics Function Tests</H1><P>\" );\n testWin.document.writeln( \"<PRE>\\n\" );\n }\n }", "title": "" }, { "docid": "48fe51be0bdee05715b6139995de5a1d", "score": "0.5960023", "text": "printDocHandler() {\n this.window.print();\n this.printPageCompleted.emit();\n }", "title": "" }, { "docid": "c896dde9a4a22cb530db95254b94c2af", "score": "0.59594905", "text": "function printDiv(divId) {\n window.frames[\"print_frame\"].document.body.innerHTML = document.getElementById(divId).innerHTML;\n window.frames[\"print_frame\"].window.focus();\n window.frames[\"print_frame\"].window.print();\n}", "title": "" }, { "docid": "c896dde9a4a22cb530db95254b94c2af", "score": "0.59594905", "text": "function printDiv(divId) {\n window.frames[\"print_frame\"].document.body.innerHTML = document.getElementById(divId).innerHTML;\n window.frames[\"print_frame\"].window.focus();\n window.frames[\"print_frame\"].window.print();\n}", "title": "" }, { "docid": "9cae7571b7b8bc71c30ddd6f94f0bd2b", "score": "0.59537876", "text": "function gfn_pringDiv(printable) {\n\n\tprintable.print({\n\t\t// Use Global styles\n\t\tglobalStyles : false,\n\t\t \n\t\t// Add link with attrbute media=print\n\t\tmediaPrint : false,\n\t\t//Custom stylesheet\n\t\tstylesheet : \"http://fonts.googleapis.com/css?family=Inconsolata\",\n\t\t//Print in a hidden iframe\n\t\tiframe : false,\n\t\t// Don't print this\n\t\tnoPrintSelector : \".avoid-this\",\n\t\t// Add this on top\n\t\tappend : \"Free jQuery Plugins<br/>\",\n\t\t// Add this at bottom\n\t\tprepend : \"<br/>jQueryScript.net\",\n\t\t \n\t\t// Manually add form values\n\t\tmanuallyCopyFormValues: true,\n\t\t \n\t\t// resolves after print and restructure the code for better maintainability\n\t\tdeferred: $.Deferred(),\n\t\t \n\t\t// timeout\n\t\ttimeout: 250,\n\t\t// Custom title\n\t\ttitle: null,\n\t\t// Custom document type\n\t\tdoctype: '<!doctype html>'\n\t});\n}", "title": "" }, { "docid": "a9cf03f4e9a022e21ea189d9d27e3e51", "score": "0.59150106", "text": "function printme(somethingtoprint) {\n document.write(somethingtoprint);\n}", "title": "" }, { "docid": "c90ca5aa542130cdd7eda1d5e7d1f7db", "score": "0.59103924", "text": "function print(txt) {\n document.getElementById(\"display\").innerHTML = txt;\n}", "title": "" }, { "docid": "2c994750d4af7cc39e6a64b801b1cee5", "score": "0.59032786", "text": "function _clickPrintButton(evt) {\n evt.preventDefault();\n window.print();\n}", "title": "" }, { "docid": "0336cf220311e17d131ea5fc04e7cb76", "score": "0.589575", "text": "function printResume(){\n\twindow.print();\n}", "title": "" }, { "docid": "1a59263e9d7bec2603bfd2b1a545ef4c", "score": "0.58862185", "text": "function displayStatusWindow()\n {\n if (statusWindow && !statusWindow.closed)\n statusWindow.close()\n var windowW = (screen.width/2) - 230;\n statusWindow = window.open(\"jsp/OpenStatusWindow.jsp\", \"statusWindow\", \"width=475,height=545,top=0,left=\" + windowW + \",resizable=yes,scrollbars=yes\") \n }", "title": "" }, { "docid": "d6b0b194164d7540a4cb7e2bad8d4540", "score": "0.58563244", "text": "function print() {\n $('#divReport').printThis();\n}", "title": "" }, { "docid": "1d265d931a747aea1a2bbe2be3a2a4c9", "score": "0.5854837", "text": "function printOutPut(verId) {\n // let user = Cookies.get('user').split('|');\n // let u = user[0];\n // let n = user[2];\n let h = localStorage.getItem('host');\n let v = verId;\n // console.log('Datos', v, u, n, h);\n window.open(\n `${url}app/views/WhOutputContent/WhOutputContentReport.php?v=${v}&u=${u}&n=${n}&h=${h}`,\n '_blank'\n );\n}", "title": "" }, { "docid": "36eca2e403f8146c6ea614c91506a53c", "score": "0.58525014", "text": "function printOrder(orderId = null) {\n\tif(orderId) {\t\t\n\t\t\t\n\t\t$.ajax({\n\t\t\turl: 'controller/printOrder.php',\n\t\t\ttype: 'post',\n\t\t\tdata: {orderId: orderId},\n\t\t\tdataType: 'text',\n\t\t\tsuccess:function(response) {\n\n var mywindow = window.open('', 'Sales Management System', 'height=400,width=600');\n\n mywindow.document.write('<html><head><title>Order Invoice</title>');\n mywindow.document.write('<style>\\n' +\n 'body {\\n' +\n ' font-family: arial, sans-serif;\\n' +\n ' width: 98%;\\n' +\n '}\\n' +\n '\\n' +\n '.table td, .table th {\\n' +\n ' border: 1px solid #cccccc;\\n' +\n ' text-align: center;\\n' +\n ' padding: 4px 0;\\n' +\n '}\\n' +\n '\\n' +\n '</style>');\n mywindow.document.write('</head><body>');\n mywindow.document.write(response);\n mywindow.document.write('</body></html>');\n\n mywindow.document.close(); // necessary for IE >= 10\n mywindow.focus(); // necessary for IE >= 10\n\n mywindow.print();\n mywindow.close();\n\t\t\t\t\n\t\t\t}// /success function\n\t\t}); // /ajax function to fetch the printable order\n\t} // /if orderId\n} // /print order function", "title": "" }, { "docid": "49c42d11dd2b13bed2ebfddefb964a1e", "score": "0.58516115", "text": "function imprimir(){\n\n\t$(\"#print\").printArea();\n}", "title": "" }, { "docid": "9c774d0f12f286721448085067409d9d", "score": "0.5843028", "text": "function WS_show(theURL,winName,features) \n\t\t{ \n \t\t\t window.moveTo(0,0); \n\t\t\t \n\t\t\t if(!winName){ winName='name';} \n\t\t\t var window_attributes=(features)?features:'width=1000,height=350,scrollbars=yes,left=0,top=0';\n\t\t\t \n\t\t\t window.open(theURL,winName,window_attributes);\n\t\t}", "title": "" }, { "docid": "61eeb82bf71fa2f96ec8b1e55940ac1c", "score": "0.58317584", "text": "function showLinksInAWindow(){\r\n\tvar windowForLinks = window.open(\"\", \"links\", \"width=800,height=600,scrollbars=1\");\r\n\twindowForLinks.document.title = \"copied links\";\r\n\tvar textWindowForLinks = windowForLinks.document.body.innerHTML; //pick the html parts where the script will write\r\n\twindowForLinks.document.write(textWindowForLinks + \"<pre>\");\r\n\tfor (var i=0; i<links.length; i++){\r\n\t\twindowForLinks.document.write(links[i]+\"\\n\");\r\n\t}\r\n\twindowForLinks.document.write(\"</pre>\");\r\n\twindowForLinks.document.close();\r\n}", "title": "" }, { "docid": "ed3856c2b8c44c71246b93c26a144a4e", "score": "0.5829187", "text": "function unobtrusivePrint() {\n if($j('.printLink').length != 0){\n $j('.printLink').prepend('<a class=\"print\" href=\"#print\">Print Map</a>');\n $j('.print').click(function() {\n window.print();\n return false;\n });\n }\n}", "title": "" }, { "docid": "2c19f2984e71f363cf5fe9063cafb7da", "score": "0.58112633", "text": "function do_print(msg)\n{\n alert(\"print: \" + msg);\n}", "title": "" } ]
70e4589a3efecc95f0999c203bbb642a
Return the length of a node's textContent, regarding single newline characters as zerolength. This allows us to avoid problems with identifying the correct selection offset for empty blocks in IE, in which we render newlines instead of break tags.
[ { "docid": "1dc5154e1f76c9aab0ce89d4b49bb7fb", "score": "0.74018896", "text": "function getTextContentLength(node) {\n var textContent = node.textContent;\n return textContent === '\\n' ? 0 : textContent.length;\n}", "title": "" } ]
[ { "docid": "566428c9287428e0482aa4880b246780", "score": "0.7682836", "text": "function getTextContentLength(node){var textContent=node.textContent;return textContent==='\\n'?0:textContent.length;}", "title": "" }, { "docid": "3ef2b3606e131bceb25c7efa86dddc9f", "score": "0.7498505", "text": "function getTextContentLength(node) {\n\t var textContent = node.textContent;\n\t return textContent === '\\n' ? 0 : textContent.length;\n\t}", "title": "" }, { "docid": "e4ffe633f53c48b626dc9e120cd39e6d", "score": "0.6964703", "text": "function getNodeLength(node){// http://www.w3.org/TR/dom/#concept-node-length\r\n\tswitch(node.nodeType){case Node.DOCUMENT_TYPE_NODE:return 0;case Node.TEXT_NODE:case Node.PROCESSING_INSTRUCTION_NODE:case Node.COMMENT_NODE:return node.length;default:return node.childNodes.length;}}", "title": "" }, { "docid": "13ff551e7876086f60e6253cb9792c43", "score": "0.6648532", "text": "function getNodeLength(node) {\n // http://www.w3.org/TR/dom/#concept-node-length\n switch (node.nodeType) {\n case Node.DOCUMENT_TYPE_NODE:\n return 0;\n case Node.TEXT_NODE:\n case Node.PROCESSING_INSTRUCTION_NODE:\n case Node.COMMENT_NODE:\n return node.length;\n default:\n return node.childNodes.length;\n }\n}", "title": "" }, { "docid": "13ff551e7876086f60e6253cb9792c43", "score": "0.6648532", "text": "function getNodeLength(node) {\n // http://www.w3.org/TR/dom/#concept-node-length\n switch (node.nodeType) {\n case Node.DOCUMENT_TYPE_NODE:\n return 0;\n case Node.TEXT_NODE:\n case Node.PROCESSING_INSTRUCTION_NODE:\n case Node.COMMENT_NODE:\n return node.length;\n default:\n return node.childNodes.length;\n }\n}", "title": "" }, { "docid": "13ff551e7876086f60e6253cb9792c43", "score": "0.6648532", "text": "function getNodeLength(node) {\n // http://www.w3.org/TR/dom/#concept-node-length\n switch (node.nodeType) {\n case Node.DOCUMENT_TYPE_NODE:\n return 0;\n case Node.TEXT_NODE:\n case Node.PROCESSING_INSTRUCTION_NODE:\n case Node.COMMENT_NODE:\n return node.length;\n default:\n return node.childNodes.length;\n }\n}", "title": "" }, { "docid": "13ff551e7876086f60e6253cb9792c43", "score": "0.6648532", "text": "function getNodeLength(node) {\n // http://www.w3.org/TR/dom/#concept-node-length\n switch (node.nodeType) {\n case Node.DOCUMENT_TYPE_NODE:\n return 0;\n case Node.TEXT_NODE:\n case Node.PROCESSING_INSTRUCTION_NODE:\n case Node.COMMENT_NODE:\n return node.length;\n default:\n return node.childNodes.length;\n }\n}", "title": "" }, { "docid": "13ff551e7876086f60e6253cb9792c43", "score": "0.6648532", "text": "function getNodeLength(node) {\n // http://www.w3.org/TR/dom/#concept-node-length\n switch (node.nodeType) {\n case Node.DOCUMENT_TYPE_NODE:\n return 0;\n case Node.TEXT_NODE:\n case Node.PROCESSING_INSTRUCTION_NODE:\n case Node.COMMENT_NODE:\n return node.length;\n default:\n return node.childNodes.length;\n }\n}", "title": "" }, { "docid": "13ff551e7876086f60e6253cb9792c43", "score": "0.6648532", "text": "function getNodeLength(node) {\n // http://www.w3.org/TR/dom/#concept-node-length\n switch (node.nodeType) {\n case Node.DOCUMENT_TYPE_NODE:\n return 0;\n case Node.TEXT_NODE:\n case Node.PROCESSING_INSTRUCTION_NODE:\n case Node.COMMENT_NODE:\n return node.length;\n default:\n return node.childNodes.length;\n }\n}", "title": "" }, { "docid": "13ff551e7876086f60e6253cb9792c43", "score": "0.6648532", "text": "function getNodeLength(node) {\n // http://www.w3.org/TR/dom/#concept-node-length\n switch (node.nodeType) {\n case Node.DOCUMENT_TYPE_NODE:\n return 0;\n case Node.TEXT_NODE:\n case Node.PROCESSING_INSTRUCTION_NODE:\n case Node.COMMENT_NODE:\n return node.length;\n default:\n return node.childNodes.length;\n }\n}", "title": "" }, { "docid": "13ff551e7876086f60e6253cb9792c43", "score": "0.6648532", "text": "function getNodeLength(node) {\n // http://www.w3.org/TR/dom/#concept-node-length\n switch (node.nodeType) {\n case Node.DOCUMENT_TYPE_NODE:\n return 0;\n case Node.TEXT_NODE:\n case Node.PROCESSING_INSTRUCTION_NODE:\n case Node.COMMENT_NODE:\n return node.length;\n default:\n return node.childNodes.length;\n }\n}", "title": "" }, { "docid": "13ff551e7876086f60e6253cb9792c43", "score": "0.6648532", "text": "function getNodeLength(node) {\n // http://www.w3.org/TR/dom/#concept-node-length\n switch (node.nodeType) {\n case Node.DOCUMENT_TYPE_NODE:\n return 0;\n case Node.TEXT_NODE:\n case Node.PROCESSING_INSTRUCTION_NODE:\n case Node.COMMENT_NODE:\n return node.length;\n default:\n return node.childNodes.length;\n }\n}", "title": "" }, { "docid": "b51e1acce5b7aae6cdfe1b8e79ae836d", "score": "0.66365635", "text": "function nodeSize(node) {\n return isBR(node) ? 1 : node.currentText.length;\n }", "title": "" }, { "docid": "080ad2bce726620547764fbf879bd4de", "score": "0.6542107", "text": "function getNodeLength(node) {\n\t // http://www.w3.org/TR/dom/#concept-node-length\n\t switch (node.nodeType) {\n\t case Node.DOCUMENT_TYPE_NODE:\n\t return 0;\n\t case Node.TEXT_NODE:\n\t case Node.PROCESSING_INSTRUCTION_NODE:\n\t case Node.COMMENT_NODE:\n\t return node.length;\n\t default:\n\t return node.childNodes.length;\n\t }\n\t}", "title": "" }, { "docid": "bd181a7de5a5ce6cc136399b881add5d", "score": "0.653579", "text": "get length() {\n // Assume that every newline is a keystroke, and that whitespace is stripped.\n const lines = this.code.split('\\n');\n const total_characters = lines.map(line => line.trim().length).reduce((a, b) => a + b);\n return total_characters + lines.length - 1;\n }", "title": "" }, { "docid": "53bb535b164bacf455601ef831dee6f2", "score": "0.6411525", "text": "getTextLength() {\n return this.getText().length;\n }", "title": "" }, { "docid": "029e46be1da197d342256aed118a9095", "score": "0.6381552", "text": "function countChars(elm) {\n if (elm.nodeType == 3) { // TEXT_NODE\n return elm.nodeValue.length;\n }\n var count = 0;\n for (var i = 0, child; child = elm.childNodes[i]; i++) {\n count += countChars(child);\n }\n return count;\n}", "title": "" }, { "docid": "e3dce531495620c42876932f9f3b4575", "score": "0.6292845", "text": "function realLength(value) {\n var length = value.indexOf('\\n')\n return width(length === -1 ? value : value.slice(0, length))\n}", "title": "" }, { "docid": "ca45e693233d74aa0acd03c0f35c4957", "score": "0.627607", "text": "get nodeSize() {\n return this.isLeaf ? 1 : 2 + this.content.size;\n }", "title": "" }, { "docid": "68f926da50d12978c68383ac69e3889c", "score": "0.6253257", "text": "function getMinOccupiedLinesOfTextNode(textNode) {\r\n let containingElement = getFirstParentElement(textNode);\r\n let virtualContainingElement = containingElement.cloneNode(true);\r\n virtualContainingElement.style['white-space'] = 'nowrap';\r\n virtualContainingElement.style.position = 'absolute'; // to not be bounded by parent element\r\n virtualContainingElement.style.width = 'auto'; // stretch according to the content\r\n // virtualContainingElement.style.display = 'none';\r\n virtualContainingElement.style.visibility = 'hidden';\r\n // FIXME weak hook\r\n containingElement.parentElement.appendChild(virtualContainingElement);\r\n let containingElementWidth = parseFloat(css(containingElement, 'width'));\r\n let fullWidth = parseFloat(css(virtualContainingElement, 'width'));\r\n containingElement.parentElement.removeChild(virtualContainingElement);\r\n return parseInt(fullWidth / containingElementWidth);\r\n}", "title": "" }, { "docid": "01bb9d7ad4344d577b1a687beb9cc1bd", "score": "0.61785716", "text": "function spacesAtEndOfTextNode(tn) {\n if (!tn || tn.nodeType !== 3) return 0;\n var trailing = /(\\s*)$/.exec(tn.data)[1]; // trailing whitespace\n return (/([ ]*)/.exec(trailing)[1].length\n );\n}", "title": "" }, { "docid": "80840c733f589e766f4d079d027b0e30", "score": "0.6120652", "text": "function getTextLengthInChilds(firstChild, lastChild) {\r\n\tvar cyrillicText = document.getElementById('cyrillicText');\r\n\tvar textLen=0;\r\n\r\n\tfor (i=firstChild; i<=lastChild; i++) {\r\n\t\ttextLen+=getTextLengthInNthChild(i);\r\n\t}\r\n\treturn textLen;\r\n}", "title": "" }, { "docid": "b66b17ef2ec218cc4b01b59605793cab", "score": "0.60947955", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) {\n return display.cachedTextHeight;\n }\n\n if (measureText == null) {\n measureText = elt(\"pre\", null, \"CodeMirror-line-like\"); // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n\n if (height > 3) {\n display.cachedTextHeight = height;\n }\n\n removeChildren(display.measure);\n return height || 1;\n } // Compute the default character width.", "title": "" }, { "docid": "141a5a2b95f1beff5349179f30e5934c", "score": "0.5994804", "text": "function calculateTextWidth (node) {\n /* istanbul ignore else */\n {\n const range = document.createRange();\n range.selectNode(node.firstChild);\n return range.getBoundingClientRect().width\n }\n}", "title": "" }, { "docid": "554bf27841e3f473cd04f44602a22832", "score": "0.5972891", "text": "size(node) {\n if (node === undefined) {\n return 0;\n }\n if (Text.isText(node)) {\n return 1;\n }\n if (node.children !== undefined && node.children.length > 0) {\n let count = 0;\n node.children.forEach((child) => {\n count += this.size(child);\n });\n return count;\n }\n return 0;\n }", "title": "" }, { "docid": "3936f32e30cc527add6fe4151780add5", "score": "0.59129804", "text": "get characterSize() {}", "title": "" }, { "docid": "767682e4bf96549708533ca5c716331a", "score": "0.58722544", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\", null, \"CodeMirror-line-like\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n }", "title": "" }, { "docid": "767682e4bf96549708533ca5c716331a", "score": "0.58722544", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\", null, \"CodeMirror-line-like\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n }", "title": "" }, { "docid": "767682e4bf96549708533ca5c716331a", "score": "0.58722544", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\", null, \"CodeMirror-line-like\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n }", "title": "" }, { "docid": "767682e4bf96549708533ca5c716331a", "score": "0.58722544", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\", null, \"CodeMirror-line-like\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n }", "title": "" }, { "docid": "767682e4bf96549708533ca5c716331a", "score": "0.58722544", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\", null, \"CodeMirror-line-like\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n }", "title": "" }, { "docid": "767682e4bf96549708533ca5c716331a", "score": "0.58722544", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\", null, \"CodeMirror-line-like\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n }", "title": "" }, { "docid": "767682e4bf96549708533ca5c716331a", "score": "0.58722544", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\", null, \"CodeMirror-line-like\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n }", "title": "" }, { "docid": "767682e4bf96549708533ca5c716331a", "score": "0.58722544", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\", null, \"CodeMirror-line-like\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n }", "title": "" }, { "docid": "767682e4bf96549708533ca5c716331a", "score": "0.58722544", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\", null, \"CodeMirror-line-like\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n }", "title": "" }, { "docid": "767682e4bf96549708533ca5c716331a", "score": "0.58722544", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\", null, \"CodeMirror-line-like\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n }", "title": "" }, { "docid": "767682e4bf96549708533ca5c716331a", "score": "0.58722544", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\", null, \"CodeMirror-line-like\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n }", "title": "" }, { "docid": "767682e4bf96549708533ca5c716331a", "score": "0.58722544", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\", null, \"CodeMirror-line-like\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n }", "title": "" }, { "docid": "ab13619a97398ee96a2a1379b4269f0a", "score": "0.5870113", "text": "function textHeight(display) {\n\t\t if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n\t\t if (measureText == null) {\n\t\t measureText = elt(\"pre\", null, \"CodeMirror-line-like\");\n\t\t // Measure a bunch of lines, for browsers that compute\n\t\t // fractional heights.\n\t\t for (var i = 0; i < 49; ++i) {\n\t\t measureText.appendChild(document.createTextNode(\"x\"));\n\t\t measureText.appendChild(elt(\"br\"));\n\t\t }\n\t\t measureText.appendChild(document.createTextNode(\"x\"));\n\t\t }\n\t\t removeChildrenAndAdd(display.measure, measureText);\n\t\t var height = measureText.offsetHeight / 50;\n\t\t if (height > 3) { display.cachedTextHeight = height; }\n\t\t removeChildren(display.measure);\n\t\t return height || 1\n\t\t }", "title": "" }, { "docid": "b49e0085cc433e4b6b62561a1ed348a9", "score": "0.5844595", "text": "function getNumLines(){\n if ($(\"#work_markup\").length !== 0){\n var num_lines = $(\"#work_markup\").val().split(/\\r\\n|\\r|\\n/).length;\n return num_lines;\n }\n return 0;\n}", "title": "" }, { "docid": "7e8719d72c9aadaea45c96997edfaa94", "score": "0.5818691", "text": "function getLength(text) {\n var result = text.length;\n return result;\n}", "title": "" }, { "docid": "cf9aadc4b169eaa257ccf60772224df7", "score": "0.5817508", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n }", "title": "" }, { "docid": "cf9aadc4b169eaa257ccf60772224df7", "score": "0.5817508", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n }", "title": "" }, { "docid": "cf9aadc4b169eaa257ccf60772224df7", "score": "0.5817508", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n }", "title": "" }, { "docid": "cf9aadc4b169eaa257ccf60772224df7", "score": "0.5817508", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n }", "title": "" }, { "docid": "cf9aadc4b169eaa257ccf60772224df7", "score": "0.5817508", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n }", "title": "" }, { "docid": "9927f812483aad3653da7f9dd954f1f1", "score": "0.58006203", "text": "function countCharacters(id) {\n var body = tinymce.get(id).getBody();\n var content = tinymce.trim(body.innerText || body.textContent);\n return content.length;\n}", "title": "" }, { "docid": "d1aa031c113ad9b4df49dd46610cf95b", "score": "0.57898796", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) return display.cachedTextHeight;\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) display.cachedTextHeight = height;\n removeChildren(display.measure);\n return height || 1;\n }", "title": "" }, { "docid": "d1aa031c113ad9b4df49dd46610cf95b", "score": "0.57898796", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) return display.cachedTextHeight;\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) display.cachedTextHeight = height;\n removeChildren(display.measure);\n return height || 1;\n }", "title": "" }, { "docid": "d1aa031c113ad9b4df49dd46610cf95b", "score": "0.57898796", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) return display.cachedTextHeight;\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) display.cachedTextHeight = height;\n removeChildren(display.measure);\n return height || 1;\n }", "title": "" }, { "docid": "d1aa031c113ad9b4df49dd46610cf95b", "score": "0.57898796", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) return display.cachedTextHeight;\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) display.cachedTextHeight = height;\n removeChildren(display.measure);\n return height || 1;\n }", "title": "" }, { "docid": "d1aa031c113ad9b4df49dd46610cf95b", "score": "0.57898796", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) return display.cachedTextHeight;\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) display.cachedTextHeight = height;\n removeChildren(display.measure);\n return height || 1;\n }", "title": "" }, { "docid": "d1aa031c113ad9b4df49dd46610cf95b", "score": "0.57898796", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) return display.cachedTextHeight;\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) display.cachedTextHeight = height;\n removeChildren(display.measure);\n return height || 1;\n }", "title": "" }, { "docid": "d1aa031c113ad9b4df49dd46610cf95b", "score": "0.57898796", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) return display.cachedTextHeight;\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) display.cachedTextHeight = height;\n removeChildren(display.measure);\n return height || 1;\n }", "title": "" }, { "docid": "d1aa031c113ad9b4df49dd46610cf95b", "score": "0.57898796", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) return display.cachedTextHeight;\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) display.cachedTextHeight = height;\n removeChildren(display.measure);\n return height || 1;\n }", "title": "" }, { "docid": "97006ab9053c88ed6f3ef0fff00822a6", "score": "0.5786791", "text": "function textHeight(display) {\r\n if (display.cachedTextHeight != null) return display.cachedTextHeight;\r\n if (measureText == null) {\r\n measureText = elt(\"pre\");\r\n // Measure a bunch of lines, for browsers that compute\r\n // fractional heights.\r\n for (var i = 0; i < 49; ++i) {\r\n measureText.appendChild(document.createTextNode(\"x\"));\r\n measureText.appendChild(elt(\"br\"));\r\n }\r\n measureText.appendChild(document.createTextNode(\"x\"));\r\n }\r\n removeChildrenAndAdd(display.measure, measureText);\r\n var height = measureText.offsetHeight / 50;\r\n if (height > 3) display.cachedTextHeight = height;\r\n removeChildren(display.measure);\r\n return height || 1;\r\n }", "title": "" }, { "docid": "aa0fb79ba564f95094c55beb96499b93", "score": "0.5784719", "text": "function textHeight(display) {\n\t\t if (display.cachedTextHeight != null) return display.cachedTextHeight;\n\t\t if (measureText == null) {\n\t\t measureText = elt(\"pre\");\n\t\t // Measure a bunch of lines, for browsers that compute\n\t\t // fractional heights.\n\t\t for (var i = 0; i < 49; ++i) {\n\t\t measureText.appendChild(document.createTextNode(\"x\"));\n\t\t measureText.appendChild(elt(\"br\"));\n\t\t }\n\t\t measureText.appendChild(document.createTextNode(\"x\"));\n\t\t }\n\t\t removeChildrenAndAdd(display.measure, measureText);\n\t\t var height = measureText.offsetHeight / 50;\n\t\t if (height > 3) display.cachedTextHeight = height;\n\t\t removeChildren(display.measure);\n\t\t return height || 1;\n\t\t }", "title": "" }, { "docid": "2608236f066b152345cd5583f73a96f5", "score": "0.5776832", "text": "function textHeight(display) {\r\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\r\n if (measureText == null) {\r\n measureText = elt(\"pre\");\r\n // Measure a bunch of lines, for browsers that compute\r\n // fractional heights.\r\n for (var i = 0; i < 49; ++i) {\r\n measureText.appendChild(document.createTextNode(\"x\"));\r\n measureText.appendChild(elt(\"br\"));\r\n }\r\n measureText.appendChild(document.createTextNode(\"x\"));\r\n }\r\n removeChildrenAndAdd(display.measure, measureText);\r\n var height = measureText.offsetHeight / 50;\r\n if (height > 3) { display.cachedTextHeight = height; }\r\n removeChildren(display.measure);\r\n return height || 1\r\n}", "title": "" }, { "docid": "8ac60ef9ca9e4391a30698634d908518", "score": "0.5776632", "text": "get length() {\n return this.content && this.content.length !== undefined ? this.content.length : 0;\n }", "title": "" }, { "docid": "738e7f436855ea403e13904ba987d853", "score": "0.57576543", "text": "function textHeight(display) {\n\t if (display.cachedTextHeight != null) return display.cachedTextHeight;\n\t if (measureText == null) {\n\t measureText = elt(\"pre\");\n\t // Measure a bunch of lines, for browsers that compute\n\t // fractional heights.\n\t for (var i = 0; i < 49; ++i) {\n\t measureText.appendChild(document.createTextNode(\"x\"));\n\t measureText.appendChild(elt(\"br\"));\n\t }\n\t measureText.appendChild(document.createTextNode(\"x\"));\n\t }\n\t removeChildrenAndAdd(display.measure, measureText);\n\t var height = measureText.offsetHeight / 50;\n\t if (height > 3) display.cachedTextHeight = height;\n\t removeChildren(display.measure);\n\t return height || 1;\n\t }", "title": "" }, { "docid": "738e7f436855ea403e13904ba987d853", "score": "0.57576543", "text": "function textHeight(display) {\n\t if (display.cachedTextHeight != null) return display.cachedTextHeight;\n\t if (measureText == null) {\n\t measureText = elt(\"pre\");\n\t // Measure a bunch of lines, for browsers that compute\n\t // fractional heights.\n\t for (var i = 0; i < 49; ++i) {\n\t measureText.appendChild(document.createTextNode(\"x\"));\n\t measureText.appendChild(elt(\"br\"));\n\t }\n\t measureText.appendChild(document.createTextNode(\"x\"));\n\t }\n\t removeChildrenAndAdd(display.measure, measureText);\n\t var height = measureText.offsetHeight / 50;\n\t if (height > 3) display.cachedTextHeight = height;\n\t removeChildren(display.measure);\n\t return height || 1;\n\t }", "title": "" }, { "docid": "738e7f436855ea403e13904ba987d853", "score": "0.57576543", "text": "function textHeight(display) {\n\t if (display.cachedTextHeight != null) return display.cachedTextHeight;\n\t if (measureText == null) {\n\t measureText = elt(\"pre\");\n\t // Measure a bunch of lines, for browsers that compute\n\t // fractional heights.\n\t for (var i = 0; i < 49; ++i) {\n\t measureText.appendChild(document.createTextNode(\"x\"));\n\t measureText.appendChild(elt(\"br\"));\n\t }\n\t measureText.appendChild(document.createTextNode(\"x\"));\n\t }\n\t removeChildrenAndAdd(display.measure, measureText);\n\t var height = measureText.offsetHeight / 50;\n\t if (height > 3) display.cachedTextHeight = height;\n\t removeChildren(display.measure);\n\t return height || 1;\n\t }", "title": "" }, { "docid": "b315f5af36c5664c789ca5fe3a315a35", "score": "0.5753003", "text": "function va(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=n(\"span\",\"xxxxxxxxxx\"),r=n(\"pre\",[t]);a(e.measure,r);var f=t.getBoundingClientRect(),o=(f.right-f.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}", "title": "" }, { "docid": "797d8bc5ca9a07725b94cc3601491ca4", "score": "0.57516867", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\")\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"))\n measureText.appendChild(elt(\"br\"))\n }\n measureText.appendChild(document.createTextNode(\"x\"))\n }\n removeChildrenAndAdd(display.measure, measureText)\n var height = measureText.offsetHeight / 50\n if (height > 3) { display.cachedTextHeight = height }\n removeChildren(display.measure)\n return height || 1\n}", "title": "" }, { "docid": "797d8bc5ca9a07725b94cc3601491ca4", "score": "0.57516867", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\")\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"))\n measureText.appendChild(elt(\"br\"))\n }\n measureText.appendChild(document.createTextNode(\"x\"))\n }\n removeChildrenAndAdd(display.measure, measureText)\n var height = measureText.offsetHeight / 50\n if (height > 3) { display.cachedTextHeight = height }\n removeChildren(display.measure)\n return height || 1\n}", "title": "" }, { "docid": "38e63f9b0a08a3950717261b8f91a2f5", "score": "0.5725696", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n}", "title": "" }, { "docid": "38e63f9b0a08a3950717261b8f91a2f5", "score": "0.5725696", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n}", "title": "" }, { "docid": "38e63f9b0a08a3950717261b8f91a2f5", "score": "0.5725696", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n}", "title": "" }, { "docid": "38e63f9b0a08a3950717261b8f91a2f5", "score": "0.5725696", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n}", "title": "" }, { "docid": "38e63f9b0a08a3950717261b8f91a2f5", "score": "0.5725696", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n}", "title": "" }, { "docid": "38e63f9b0a08a3950717261b8f91a2f5", "score": "0.5725696", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n}", "title": "" }, { "docid": "38e63f9b0a08a3950717261b8f91a2f5", "score": "0.5725696", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n}", "title": "" }, { "docid": "38e63f9b0a08a3950717261b8f91a2f5", "score": "0.5725696", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n}", "title": "" }, { "docid": "38e63f9b0a08a3950717261b8f91a2f5", "score": "0.5725696", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n}", "title": "" }, { "docid": "38e63f9b0a08a3950717261b8f91a2f5", "score": "0.5725696", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n}", "title": "" }, { "docid": "38e63f9b0a08a3950717261b8f91a2f5", "score": "0.5725696", "text": "function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n}", "title": "" }, { "docid": "1c63d7cd6b623f02bb2d70f380062d51", "score": "0.5717551", "text": "get childCount() {\n return this.content.length;\n }", "title": "" }, { "docid": "8d6015eea68ff22f4b2d6157e5a291b1", "score": "0.5656379", "text": "get length() {\n return this.rootNode.length;\n }", "title": "" }, { "docid": "8d6015eea68ff22f4b2d6157e5a291b1", "score": "0.5656379", "text": "get length() {\n return this.rootNode.length;\n }", "title": "" }, { "docid": "8fd47def9b8cc7df5e2e549c305e5db1", "score": "0.5648814", "text": "function charWidth(display) {\n\t\t if (display.cachedCharWidth != null) { return display.cachedCharWidth }\n\t\t var anchor = elt(\"span\", \"xxxxxxxxxx\");\n\t\t var pre = elt(\"pre\", [anchor], \"CodeMirror-line-like\");\n\t\t removeChildrenAndAdd(display.measure, pre);\n\t\t var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;\n\t\t if (width > 2) { display.cachedCharWidth = width; }\n\t\t return width || 10\n\t\t }", "title": "" }, { "docid": "072c3a20d70269dc36d8c3dfe86e4ed3", "score": "0.5643937", "text": "function visualLength(text)\n\t{\n\t\tvar ruler = document.getElementById(\"ruler\");\n\t\truler.innerHTML = text;\n\t\treturn ruler.offsetWidth;\n\t}", "title": "" }, { "docid": "716ade02eecf3dfc0fbbd8d7b95ccda9", "score": "0.56373686", "text": "function literalLength (child) {\n const childValue = child && child.value && child.value.replace\n && child.value.replace(/[ \\t\\r\\n]+/g, '').length;\n return Boolean(childValue);\n}", "title": "" }, { "docid": "90057c90feebce68c7b66136f3f435fa", "score": "0.5631322", "text": "get textContent() {\n return this.isLeaf && this.type.spec.leafText ? this.type.spec.leafText(this) : this.textBetween(0, this.content.size, \"\");\n }", "title": "" }, { "docid": "e116744c79fc70c00a3a697e0ce22bf7", "score": "0.56223", "text": "function charWidth(display) {\n if (display.cachedCharWidth != null) { return display.cachedCharWidth }\n var anchor = elt(\"span\", \"xxxxxxxxxx\");\n var pre = elt(\"pre\", [anchor], \"CodeMirror-line-like\");\n removeChildrenAndAdd(display.measure, pre);\n var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;\n if (width > 2) { display.cachedCharWidth = width; }\n return width || 10\n }", "title": "" }, { "docid": "e116744c79fc70c00a3a697e0ce22bf7", "score": "0.56223", "text": "function charWidth(display) {\n if (display.cachedCharWidth != null) { return display.cachedCharWidth }\n var anchor = elt(\"span\", \"xxxxxxxxxx\");\n var pre = elt(\"pre\", [anchor], \"CodeMirror-line-like\");\n removeChildrenAndAdd(display.measure, pre);\n var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;\n if (width > 2) { display.cachedCharWidth = width; }\n return width || 10\n }", "title": "" }, { "docid": "e116744c79fc70c00a3a697e0ce22bf7", "score": "0.56223", "text": "function charWidth(display) {\n if (display.cachedCharWidth != null) { return display.cachedCharWidth }\n var anchor = elt(\"span\", \"xxxxxxxxxx\");\n var pre = elt(\"pre\", [anchor], \"CodeMirror-line-like\");\n removeChildrenAndAdd(display.measure, pre);\n var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;\n if (width > 2) { display.cachedCharWidth = width; }\n return width || 10\n }", "title": "" }, { "docid": "e116744c79fc70c00a3a697e0ce22bf7", "score": "0.56223", "text": "function charWidth(display) {\n if (display.cachedCharWidth != null) { return display.cachedCharWidth }\n var anchor = elt(\"span\", \"xxxxxxxxxx\");\n var pre = elt(\"pre\", [anchor], \"CodeMirror-line-like\");\n removeChildrenAndAdd(display.measure, pre);\n var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;\n if (width > 2) { display.cachedCharWidth = width; }\n return width || 10\n }", "title": "" }, { "docid": "e116744c79fc70c00a3a697e0ce22bf7", "score": "0.56223", "text": "function charWidth(display) {\n if (display.cachedCharWidth != null) { return display.cachedCharWidth }\n var anchor = elt(\"span\", \"xxxxxxxxxx\");\n var pre = elt(\"pre\", [anchor], \"CodeMirror-line-like\");\n removeChildrenAndAdd(display.measure, pre);\n var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;\n if (width > 2) { display.cachedCharWidth = width; }\n return width || 10\n }", "title": "" }, { "docid": "e116744c79fc70c00a3a697e0ce22bf7", "score": "0.56223", "text": "function charWidth(display) {\n if (display.cachedCharWidth != null) { return display.cachedCharWidth }\n var anchor = elt(\"span\", \"xxxxxxxxxx\");\n var pre = elt(\"pre\", [anchor], \"CodeMirror-line-like\");\n removeChildrenAndAdd(display.measure, pre);\n var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;\n if (width > 2) { display.cachedCharWidth = width; }\n return width || 10\n }", "title": "" }, { "docid": "e116744c79fc70c00a3a697e0ce22bf7", "score": "0.56223", "text": "function charWidth(display) {\n if (display.cachedCharWidth != null) { return display.cachedCharWidth }\n var anchor = elt(\"span\", \"xxxxxxxxxx\");\n var pre = elt(\"pre\", [anchor], \"CodeMirror-line-like\");\n removeChildrenAndAdd(display.measure, pre);\n var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;\n if (width > 2) { display.cachedCharWidth = width; }\n return width || 10\n }", "title": "" }, { "docid": "e116744c79fc70c00a3a697e0ce22bf7", "score": "0.56223", "text": "function charWidth(display) {\n if (display.cachedCharWidth != null) { return display.cachedCharWidth }\n var anchor = elt(\"span\", \"xxxxxxxxxx\");\n var pre = elt(\"pre\", [anchor], \"CodeMirror-line-like\");\n removeChildrenAndAdd(display.measure, pre);\n var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;\n if (width > 2) { display.cachedCharWidth = width; }\n return width || 10\n }", "title": "" }, { "docid": "e116744c79fc70c00a3a697e0ce22bf7", "score": "0.56223", "text": "function charWidth(display) {\n if (display.cachedCharWidth != null) { return display.cachedCharWidth }\n var anchor = elt(\"span\", \"xxxxxxxxxx\");\n var pre = elt(\"pre\", [anchor], \"CodeMirror-line-like\");\n removeChildrenAndAdd(display.measure, pre);\n var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;\n if (width > 2) { display.cachedCharWidth = width; }\n return width || 10\n }", "title": "" } ]
be88344fe91a155f719b3a91204600de
Create a new marker and store it on the data object
[ { "docid": "7de4264978633b7af067fa0f3b990614", "score": "0.69449586", "text": "function addMarker(data) {\n //console.log('creating marker with lat ' + data.lat);\n data.singleLatLng = makeLatLngString(parseFloat(data.lat),\n parseFloat(data.lng));\n data.marker = new google.maps.Marker({\n position: data.singleLatLng,\n map: map,\n title: data.name\n });\n\n //Create the html content for an infowindow\n var contentString = '<div class=\"info\">' +\n '<h2>' + data.name + '</h2>' +\n '<img class=\"restImage\" src = ' + data.image + '>' +\n '<h3> Yelp Review Avg: ' + data.rating + ' from ' +\n data.review_count + ' reviews</h3>';\n\n data.infowindow = new google.maps.InfoWindow({\n content: contentString,\n maxWidth: 300\n });\n\n //On-click of a marker, open the infowindow\n data.marker.addListener('click', function() {\n data.infowindow.open(map, data.marker);\n data.marker.setAnimation(google.maps.Animation.BOUNCE);\n setTimeout(function() {\n data.marker.setAnimation(null);\n }, 1000);\n });\n}", "title": "" } ]
[ { "docid": "bf520105f23a57a8698e98f273ef7f09", "score": "0.7412836", "text": "createNewMarker(latLon, xCoord, yCoord) {\n let marker = new Marker(latLon, [xCoord, yCoord]);\n controllers.timeSeriesMarkers.add(marker);\n this.updateMarker(marker);\n }", "title": "" }, { "docid": "6440b9121ab1cb9e52ea9fbcf9523fff", "score": "0.7407264", "text": "function createMarker(data) {\n\n var marker = new google.maps.Marker({\n position: data.val().location,\n title: data.key,\n animation: google.maps.Animation.DROP\n });\n bounds.extend(marker.position);\n marker.setMap(map);\n map.fitBounds(bounds);\n return marker;\n }", "title": "" }, { "docid": "3fcb670e03709596212845527b00600b", "score": "0.72501624", "text": "function createMarker(markerData){ \n markerPosition = {lat: markerData.lat , lng: markerData.lng};\n var marker = new google.maps.Marker({\n position: markerPosition,\n map: map,\n title: markerData.name\n }); \n\n //Add a listener event to markers for animating when clicked \n marker.addListener('click',function(){\n setCurrentLocation(markerData.name);\n highlightMarker(self.currentSelectedLocation); \n }); \n return marker; \n}", "title": "" }, { "docid": "a5a2aef78c87b66282c32dc50f0327b6", "score": "0.7210295", "text": "function createMarker(data) {\n return {\n lat: data.location.lat,\n lng: data.location.lon,\n title: 'data.name',\n icon: '/assets/img/mapicon.png',\n infoWindow: {\n content: createContent(data)\n },\n click: function() {\n $('#instructions').html('');\n map.cleanRoute();\n map.travelRoute({\n origin: [userPosition.lat, userPosition.lng],\n destination: [data.location.lat, data.location.lon],\n travelMode: 'driving',\n step: function(e) {\n $('#instructionContainer').show();\n $('#instructions').append('<li>'+e.instructions+'</li>');\n $('#instructions li:eq(' + e.step_number + ')').delay(200 * e.step_number).fadeIn(200, function() {\n map.drawPolyline({\n path: e.path,\n strokeColor: 'red',\n strokeOpacity: 0.6,\n strokeWeight: 6\n });\n });\n }\n });\n }\n };\n }", "title": "" }, { "docid": "d658592616ea24c7cd193006f254c7b8", "score": "0.71324456", "text": "function createMarker(obj) {\n\n // prepare new Marker object\n var mark = new google.maps.Marker({\n position: obj.geometry.location,\n map: map,\n title: obj.name\n });\n markers.push(mark);\n\n // prepare info window\n var infowindow = new google.maps.InfoWindow({\n content: '<img src=\"' + obj.icon + '\" /><font style=\"color:#000;\">' + obj.name +\n '<br />Rating: ' + obj.rating + '<br />Vicinity: ' + obj.vicinity + '</font>'\n });\n\n // add event handler to current marker\n google.maps.event.addListener(mark, 'click', function () {\n clearPoi();\n infowindow.open(map, mark);\n });\n poi.push(infowindow);\n}", "title": "" }, { "docid": "f5aa5b1da3521739a6891ae98725e861", "score": "0.71269083", "text": "function createMarker(p) {\r\n\tvar marker = new GMarker(p, icon);\r\n\treturn marker;\r\n}", "title": "" }, { "docid": "faffcfc5037a8dd6fac9eb14cc2944d2", "score": "0.7108757", "text": "function createMarker(breweryData) {\n let marker = new google.maps.Marker({\n position: {\n lat: parseFloat(breweryData.latitude),\n lng: parseFloat(breweryData.longitude)\n },\n map: map,\n });\n\n let mapInfoContainer = new google.maps.InfoWindow({\n content: infoContainerContent(breweryData.name, breweryData.street, breweryData.website_url)\n })\n\n marker.addListener('click', function () {\n mapInfoContainer.open(map, marker);\n })\n }", "title": "" }, { "docid": "b5362a73b9dff3dda17d12cd120c8e6a", "score": "0.7103821", "text": "function addMarker(obj) {\n\t// Temp marker that is added to markerArray. It's \"info\" field contains all the db info of said marker\n\tobj.marker = new google.maps.Marker({\n\t\tposition: {\"lat\": obj.fields.lat, \"lng\": obj.fields.lng},\n\t\tmap: map,\n\t\ticon: \"img/house-\" + obj.fields.house_icon + \".png\",\n\t});\n\n\tobj.marker.info = obj.fields;\n\tif (!obj.id) {\n\t\tobj.marker.info.id = obj.pk;\n\t}\n\telse {\n\t\tobj.marker.info.id = obj.pk;\n\t}\n\n\t// Marker listener\n\tobj.marker.addListener('click', function() {\n\t\tmarkerClick(obj.marker)\n\t});\n\n\tmarkerArray.push(obj.marker)\n}", "title": "" }, { "docid": "2ee48fec731d8bbd649d9f29e35bc93a", "score": "0.7076289", "text": "async addMarker(markerInfo) {\n\t\t// handle the marker itself separately\n\t\tObject.assign(markerInfo, {\n\t\t\tteamId: this.team.id\n\t\t});\n\t\tif (this.codemark.get('providerType')) {\n\t\t\tmarkerInfo.providerType = this.codemark.get('providerType');\n\t\t}\n\t\tif (this.codemark.get('streamId')) {\n\t\t\tmarkerInfo.postStreamId = this.codemark.get('streamId');\n\t\t}\n\t\tif (this.codemark.get('postId')) {\n\t\t\tmarkerInfo.postId = this.codemark.get('postId');\n\t\t}\n\t\tconst marker = await new MarkerCreator({\n\t\t\trequest: this,\n\t\t\tcodemarkId: this.codemark.id,\n\t\t\trepoMatcher: this.repoMatcher,\n\t\t\tteamRepos: this.teamRepos\n\t\t}).createMarker(markerInfo);\n\t\tthis.transforms.createdMarkers = this.transforms.createdMarkers || [];\n\t\tthis.transforms.createdMarkers.push(marker);\n\t}", "title": "" }, { "docid": "302edb47c393f8e198fe493af7bf457f", "score": "0.7074624", "text": "function addMarker(location, map, data) {\n\n}", "title": "" }, { "docid": "171ce458cba832810ecc79c06a813b1b", "score": "0.70668614", "text": "function add_marker(coords, title, data) {\n data.label = labels[markers.length % labels.length];\n data.visible = true;\n data.marker = new google.maps.Marker({\n map: map,\n position: coords,\n title: title,\n label: data.label\n });\n data.marker.addListener('click', function () {\n var $this = $(this);\n\n markers.forEach(function (el, i) {\n if (!el.hasOwnProperty('label')) {\n return; // Not all markers are pins\n }\n\n el.visible = markers[i].visible = (data.label === el.label) || !el.visible;\n $results.find(`.school-list-item[data-label=\"${el.label}\"]`).toggle(el.visible)\n el.marker.setMap(el.visible ? map : null);\n });\n })\n markers.push(data);\n return data;\n }", "title": "" }, { "docid": "b058f3940f460504aabad5878fbad786", "score": "0.7027658", "text": "function createMarker(latlng, name, data) {\n //var contentString = html;\n var marker = new google.maps.Marker({\n position: latlng,\n map: map,\n title: name,\n icon: data.icon\n });\n if (data.povLat) {\n var location = new google.maps.LatLng(data.povLat, data.povLng);\n heading = data.heading;\n pitch = data.pitch;\n zoom = data.zoom;\n\n google.maps.event.addListener(marker, \"click\", function() {\n clickedMarker = marker;\n $('#pano').data('id', data);\n sv.getPanoramaByLocation(location, 5, processSVData);\n // openInfoWindow(marker);\n });\n }\n else { \n google.maps.event.addListener(marker, \"click\", function() {\n // clickedMarker = marker;\n // sv.getPanoramaByLocation(marker.getPosition(), 50, processSVData);\n openInfoWindow(marker);\n });\n }\n // save the info we need to use later for the side_bar\n gmarkers.push(marker);\n}", "title": "" }, { "docid": "479653db0710303cf5cc4d399de4921c", "score": "0.70141405", "text": "function createMarker(i) {\n\t\t//Get the positions from the location array\n\t\tvar place = self.placesList()[i];\n\t\tplace.marker = new google.maps.Marker({\n\t\t\tposition: place.location,\n\t\t\ttitle: place.title(),\n\t\t\tanimation: google.maps.Animation.DROP,\n\t\t\tgPlaceID: place.gPlaceID,\n\t\t\tfourSqID: place.fourSqID,\n\t\t\tselected: false\n\t\t});\n\t\tplace.marker.setIcon(defaultIcon);\n\t\tplace.marker.setMap(map);\n\t\tplace.marker.addListener('click', function() {\n\t\t\tclearMarkerAnimation();\n\t\t\tthis.setIcon(highlightIcon);\n\t\t\tthis.selected = true;\n\t\t\tpopulateInfoWindow(this, infoWindow);\n\t\t});\n\t\tplace.marker.addListener('mouseover', function() {\n\t\t\tthis.setIcon(highlightIcon);\n\t\t});\n\t\tplace.marker.addListener('mouseout', function() {\n\t\t\tif (this.selected === false){\n\t\t\t\tthis.setIcon(defaultIcon);\n\t\t\t}\n\t\t});\n\t\t\n\t}", "title": "" }, { "docid": "ba512480ba6e9cd1a96e4e4f4ef01d2a", "score": "0.6992735", "text": "function createMarker(point, number) \n\t\t\t{\n\t\t\t\tvar marker = new GMarker(point);\n\t\t\t\tGEvent.addListener(marker, \"click\", function() \n\t\t\t\t{\n\t\t\t\t\t\tmarker.openInfoWindowHtml(address);\n\t\t\t\t});\n\t\t\t\treturn marker;\n\t\t\t}", "title": "" }, { "docid": "c66e6c1aa779f4d5301a550dde088373", "score": "0.6976204", "text": "function add_marker($marker, map) {\n // var\n var latlng = new google.maps.LatLng($marker.attr('data-lat'), $marker.attr('data-lng'));\n var map_flag = $($marker).data('icon');\n\n // create marker\n var marker = new google.maps.Marker({\n position: latlng,\n map: map,\n icon: map_flag,\n });\n // add to array\n map.markers.push(marker);\n // if marker contains HTML, add it to an infoWindow\n if ($marker.html()) {\n // create info window\n var infowindow = new google.maps.InfoWindow({\n content: $marker.html()\n });\n // show info window when marker is clicked\n google.maps.event.addListener(marker, 'click', function() {\n infowindow.open(map, marker);\n });\n }\n }", "title": "" }, { "docid": "e35cd64e6b61094bdbed54f3a1174020", "score": "0.6963579", "text": "function addMarker(position) {\n\n}", "title": "" }, { "docid": "b6684df58e894f1adab806c999ecf476", "score": "0.69526315", "text": "function newTempMarker(e,icon) {\n tempSources.push(L.marker(e.latlng, {\n icon: icon,\n contextmenu: true,\n contextmenuItems: [{\n text: 'Delete marker',\n callback: deleteTempMarker,\n index: 0\n }, {\n separator: true,\n index: 1\n }]})\n .addTo(tempLayer).bindPopup(\n \"<h4> Temporary Marker </h4>\" +\n \"<table>\" +\n \"<tr><td> Company: </td><td> Bilglass</td></tr>\" +\n \"<tr><td> Adress: </td><td> Temporary Marker</td></tr>\" +\n \"<tr><td> URL: </td><td> Temporary Marker</td></tr>\" +\n \"</table>\"));\n getPolygons();\n}", "title": "" }, { "docid": "6b266f67f57a06aded477dc5fb199817", "score": "0.6944885", "text": "function createNewMarker(pos = null) {\n if (!pos) { pos = map.getCenter(); }\n const newMarker = new google.maps.Marker({\n position: pos,\n draggable: true,\n title: 'New Marker',\n map: map,\n userPin: true,\n category: 1,\n });\n const newIcon = MARKER_ICON;\n newIcon.fillColor = categoryToColour(newMarker.category);\n newMarker.setIcon(MARKER_ICON);\n userMarkers.push(newMarker);\n // Instantly put the marker in the database\n markerDropped(newMarker)\n .then(response => {\n // We need to manually set the id due to this marker not being retrieved from the database originally\n newMarker.id = response.id;\n newMarker.addListener('dragend', () => { markerDropped(newMarker); });\n newMarker.addListener('click', () => { markerSelected(newMarker); });\n });\n markerSelected(newMarker);\n}", "title": "" }, { "docid": "b8e850b9d10e9a7dc3a81c358a6a1688", "score": "0.6939427", "text": "function createMarker() {\n\t\t\tconsole.log(\"createMarker() -> MarkerCreateAPI()\");\n\n\t\t\t// default history reference = J:23000\n\t\t\tif (vm.apiDomain.history[0].refsKey == \"\") {\n\t\t\t\tvm.apiDomain.history[0].refsKey = \"22864\";\n\t\t\t}\n\t\t\t\n if (vm.apiDomain.symbol == null || vm.apiDomain.symbol == \"\") {\n\t\t\t\talert(\"Required Field: Symbol\");\n return;\n\t\t\t}\n if (vm.apiDomain.name == null || vm.apiDomain.name == \"\") {\n\t\t\t\talert(\"Required Field: Name\");\n return;\n\t\t\t}\n\n if (vm.apiDomain.chromosome == null || vm.apiDomain.chromosome == \"\") {\n\t\t\t\talert(\"Required Field: Chromosome\");\n return;\n\t\t\t}\n\n\t\t\t// defaults needed here due to feature type validation\n\t\t\tif (vm.apiDomain.markerTypeKey == null || vm.apiDomain.markerTypeKey == \"\") {\n\t\t\t\tvm.apiDomain.markerTypeKey = \"1\";\n\t\t\t}\n\n\t\t\tif (vm.apiDomain.markerStatusKey == null || vm.apiDomain.markerStatusKey == \"\") {\n\t\t\t\tvm.apiDomain.markerStatusKey = \"1\";\n\t\t\t}\n\n\t\t\t// feature type validation\n if (\n \tvm.apiDomain.markerTypeKey == \"1\"\n \t|| vm.apiDomain.markerTypeKey == \"3\"\n \t|| vm.apiDomain.markerTypeKey == \"7\"\n \t|| vm.apiDomain.markerTypeKey == \"9\"\n \t)\n\t\t\t{\n\t\t\t\tif (vm.apiDomain.featureTypes[0].termKey == \"\") {\n\t\t\t\t\talert(\"Invalid Marker Type/Feature Type combination.\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvalidateFeatureTypeRow(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvm.apiDomain.featureTypes = null;\n\t\t\t}\n\n\t\t\tpageScope.loadingStart();\n\n\t\t\tMarkerCreateAPI.create(vm.apiDomain, function(data) {\n\t\t\t\tif (data.error != null) {\n\t\t\t\t\talert(\"ERROR: \" + data.error + \" - \" + data.message);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvm.apiDomain = data.items[0];\n \t\t\tvm.selectedIndex = vm.results.length;\n\t\t\t\t\tvm.results[vm.selectedIndex] = [];\n\t\t\t\t\tvm.results[vm.selectedIndex].markerKey = vm.apiDomain.markerKey;\n\t\t\t\t\tvm.results[vm.selectedIndex].symbol = vm.apiDomain.symbol;\n\t\t\t\t\tloadMarker();\n\t\t\t\t\trefreshTotalCount();\n\t\t\t\t}\n\t\t\t\tpageScope.loadingEnd();\n\t\t\t\tsetFocus();\n\t\t\t}, function(err) {\n\t\t\t\tpageScope.handleError(vm, \"Error creating marker.\");\n\t\t\t\tpageScope.loadingEnd();\n\t\t\t\tsetFocus();\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "5f9ada08d617ac424143545ff4f5f3c4", "score": "0.6931668", "text": "function createMarker(point, number) {\n\t\t\t// create custom icon\n\t\t\tvar icon = new GIcon();\n\t\t\ticon.image = (settings.data.locations[number].icon.indexOf(\"http:\") < 0)?\n\t\t\t settings.relativepath + settings.data.locations[number].icon:settings.data.locations[number].icon;\n\t\t\ticon.iconSize = new GSize(18, 18);\n\t\t\ticon.iconAnchor = new GPoint(6, 18);\n\t\t\ticon.infoWindowAnchor = new GPoint(5, 1);\n\n\t\t\tvar marker = new GMarker(point, icon);\n\t\t \t\n \tGEvent.addListener(marker, \"click\", function() {\n\t\t\t\tif (settings.data.locations[number].maximizedContent != \"\"){\n\t\t\t\t simpleContent = settings.data.locations[number].simpleContent + \"<a href='#' style='font-size:10px;margin-top:20px;display: block;' onclick='$(\\\"#\"+obj.id+\"\\\").get(0).mapa.getInfoWindow().maximize();return false;'>Ver informaci&oacute;n expandida</a>\"\n\t\t\t\t\tmarker.openInfoWindowHtml(simpleContent, \n\t\t\t\t\t\t\t\t\t{maxUrl:(settings.data.locations[number].maximizedContent.indexOf(\"http:\") < 0)?\n\t\t\t\t\t\t\t\t\t\t\tsettings.relativepath + settings.data.locations[number].maximizedContent:\n\t\t\t\t\t\t\t\t\t\t\tsettings.data.locations[number].maximizedContent\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}else{\n\t\t\t\t marker.openInfoWindow(settings.data.locations[number].simpleContent);\n\t\t\t\t}\t\t\t\t\n\t\t\t\t \n\t\t\t});\n\t\t\t\n\t\t\tgitems.push(marker);\n \n return marker;\n }", "title": "" }, { "docid": "cce0f269307df6578fa377e5e8a15830", "score": "0.6923068", "text": "function addMarker() {\n const marker = new google.maps.Marker({\n position: latLng,\n map: map\n });\n\n markers.push(marker);\n }", "title": "" }, { "docid": "ecd4aa2d4a091aafbcc7d9da9efa4482", "score": "0.69192517", "text": "function addNewMarker(event) {\n\n\t\t\t// Marker information to be sent to create a new marker in the db\n\t\t\tdatatosend = {\n\t\t\t\tlat: event.latLng.lat(),\n\t\t\t\tlng: event.latLng.lng()\n\t\t\t}\n\n\t\t\t$.ajax({\n\t\t\t\ttype: 'POST',\n\t\t\t\turl: 'api_responses/new_marker.json',\n\t\t\t\tcontentType: 'application/json; charset=utf-8',\n\t\t\t\tdataType: 'json',\n\t\t\t\tdata: JSON.stringify(datatosend),\n\t\t\t\tsuccess: function(data) {\n\n\t\t\t\t\t// [0] because a one object array is returned\n\t\t\t\t\t//response = JSON.parse(data)[0];\n\t\t\t\t\tresponse = data[0];\n\t\t\t\t\tresponse.pk = newPK;\n\t\t\t\t\tnewPK++;\n\t\t\t\t\tresponse.fields.lat = datatosend.lat;\n\t\t\t\t\tresponse.fields.lng = datatosend.lng;\n\t\t\t\t\t//response.fields.lat = parseFloat(response.fields.lat);\n\t\t\t\t\t//response.fields.lng = parseFloat(response.fields.lng);\n\n\t\t\t\t\tmarkerArray.push(response)\n\t\t\t\t\taddMarker(response)\n\t\t\t\t},\n\t\t\t\terror: function(data) {\n\t\t\t\t\talert(\"Status code: \" + data.status + \". Marker could not be added, reload the page or try again later.\");\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t$(\"#context-menu\").css({\"display\": \"none\"});\n\t\t}", "title": "" }, { "docid": "a80445f2f0abe84ae44de84b00619322", "score": "0.6916543", "text": "function createMarker(obj) {\n\n // prepare new Marker object\n var mark = new google.maps.Marker({\n position: obj.geometry.location,\n map: map,\n title: obj.name\n });\n markers.push(mark);\n\n // prepare info window\n var infowindow = new google.maps.InfoWindow({\n content: '<img src=\"' + obj.icon + '\" /><font style=\"color:#000;\">' + obj.name +\n '<br />Rating: ' + obj.rating + '<br />Vicinity: ' + obj.vicinity + '</font>'\n });\n\n // add event handler to current marker\n google.maps.event.addListener(mark, 'click', function() {\n clearInfos();\n infowindow.open(map,mark);\n });\n infos.push(infowindow);\n}", "title": "" }, { "docid": "5eec6ac806cf5561fc3f72738d4df6b5", "score": "0.69162804", "text": "pushMarkerDatumOntoMarkerData(markerDatum) {\n this.markerData.push(markerDatum);\n }", "title": "" }, { "docid": "b98c6260df7d64f39f7dfccf283afdce", "score": "0.6902228", "text": "function createMarker(obj) {\n\n // prepare new Marker object\n var mark = new google.maps.Marker({\n position: obj.geometry.location,\n map: map,\n title: obj.name\n });\n markers.push(mark);\n\n // prepare info window\n var infowindow = new google.maps.InfoWindow({\n content: '<img src=\"' + obj.icon + '\" /><font style=\"color:#000;\">' + obj.name + \n '<br />Rating: ' + obj.rating + '<br />Vicinity: ' + obj.vicinity + '</font>'\n });\n\n // add event handler to current marker\n google.maps.event.addListener(mark, 'click', function() {\n clearInfos();\n infowindow.open(map,mark);\n });\n infos.push(infowindow);\n}", "title": "" }, { "docid": "2be8396d15b6349c005ecf6acd67236d", "score": "0.6881077", "text": "function add_marker($marker, map) {\n\n // var\n var latlng = new google.maps.LatLng($marker.attr('data-lat'), $marker.attr('data-lng'));\n\n // create marker\n var marker = new google.maps.Marker({\n position: latlng,\n map: map\n });\n\n // add to array\n map.markers.push(marker);\n\n // if marker contains HTML, add it to an infoWindow\n if ($marker.html()) {\n // create info window\n var infowindow = new google.maps.InfoWindow({\n content: $marker.html()\n });\n\n // show info window when marker is clicked\n google.maps.event.addListener(marker, 'click', function() {\n\n infowindow.open(map, marker);\n\n });\n }\n\n }", "title": "" }, { "docid": "6d3cda3fd2d004edb435a0e6c810f9aa", "score": "0.6863291", "text": "function createMarker(obj) {\n// prepare new Marker object\nvar mark = new google.maps.Marker({\nposition: obj.geometry.location,\nmap: map,\ntitle: obj.name,\nanimation: google.maps.Animation.BOUNCE\n});\nmarkers.push(mark);\n// prepare info window\nvar infowindow = new google.maps.InfoWindow({\n\ncontent: '<div><img src=\"' + obj.icon + '\" heigh=30 width=30/><br>' + obj.name +\n'<br>Rating: ' + obj.rating + '<br>Vicinity: ' + obj.vicinity + '</div>'\n});\n// add event handler to current marker\ngoogle.maps.event.addListener(mark, 'click', function() {\nclearInfos();\ninfowindow.open(map,mark);\n});\ninfos.push(infowindow);\n}", "title": "" }, { "docid": "387ddc6bbc490d51e5db6f78ba3313e3", "score": "0.6859633", "text": "function addNazarMarker()\r\n{\r\n markers.push({\"text\": \"madam_nazar\", \"day\": \"nazar\", \"tool\": \"-1\", \"icon\": \"nazar\", \"x\": nazarLocations[nazarCurrentLocation].x, \"y\": nazarLocations[nazarCurrentLocation].y});\r\n}", "title": "" }, { "docid": "670268190176763cd3b0a1609d8061ab", "score": "0.6854813", "text": "function addMarker() {\n if (marker == null) {\n marker = new google.maps.Marker({\n position: pos,\n map: map,\n draggable: true,\n id: uniqueId\n });\n console.log(\"Paso 1: marker con id \" + uniqueId + \" es creado\");\n console.log(\"Lista de markers sigue vacia: \");\n console.log(markers);\n markers.push(marker);\n console.log(\"El marker fue agregado a la lista: \");\n console.log(markers);\n createMarkerBox(marker);\n uniqueId++;\n if (reportBox.style.display == \"block\") {\n reportBox.style.display = \"none\";\n }\n openReportButton.disabled = true;\n addMarkerButton.disabled = true;\n }\n}", "title": "" }, { "docid": "f35701768c64fa107ae267d23a0a144d", "score": "0.6852232", "text": "function add_marker($marker, map) {\n\n // var\n var latlng = new google.maps.LatLng($marker.attr('data-lat'), $marker.attr('data-lng'));\n var map_flag = $('.acf-map').data('icon');\n\n // create marker\n var marker = new google.maps.Marker({\n position: latlng,\n map: map,\n icon: map_flag,\n });\n\n // add to array\n map.markers.push(marker);\n\n // if marker contains HTML, add it to an infoWindow\n if ($marker.html()) {\n // create info window\n var infowindow = new google.maps.InfoWindow({\n content: $marker.html()\n });\n\n // show info window when marker is clicked\n google.maps.event.addListener(marker, 'click', function() {\n\n infowindow.open(map, marker);\n\n });\n }\n\n }", "title": "" }, { "docid": "9c94a8077bf92fcd5e173c6796f69901", "score": "0.6846997", "text": "addNewMarker(e){ // e = ({ x, y, lat, lng, event })\n if(this.state.addMarkerMode && !this.state.showNewMarker){ // Checks if the user is in addMarkerMode and not currently working on a new Marker already\n console.log('addMarker() fired');\n\n this.closeInfoWindow();\n\n //create blank slate Marker\n var newMarker = this.state.newMarker;\n newMarker.lat = e.lat;\n newMarker.lng = e.lng;\n newMarker.name = \"\";\n newMarker.addr = \"\";\n newMarker.hours = {};\n newMarker.description = \"\";\n newMarker.isVeggie = false;\n newMarker.show = true;\n\n this.setState({center: {lat: e.lat, lng: e.lng}});\n this.setState({showNewMarker: true}); // Make the Marker visible\n this.setState({newMarker: newMarker}); // Make sure new Marker info is blank for entries\n }\n }", "title": "" }, { "docid": "d5fe730e7f74a727e05d91e5e1a94853", "score": "0.68446225", "text": "addMarker(marker) {\n this._markers[marker.id] = marker;\n this._markerListDirty = true;\n }", "title": "" }, { "docid": "7ddec9236d5e37f346f52c610956c788", "score": "0.6834129", "text": "function createMarker(lat, lng, id)\n{\n var marker = new google.maps.Marker(new google.maps.LatLng(lat,lng));\n \n //store the id as a variable so we can link the marker to its content on the server\n marker['id'] = id;\n \n google.maps.Event.addListener(marker, \"click\", function(){\n \n //this function is produced in the java code\n updateInfoWindow(marker);\n \n });\n \n return marker;\n}", "title": "" }, { "docid": "ca8018e3c4302a38bbe241dc3d41e228", "score": "0.68328536", "text": "function add_marker( $marker, map ) {\n\n var latlng = new google.maps.LatLng( $marker.attr('data-lat'), $marker.attr('data-lng') );\n\n // Create marker\n var marker = new google.maps.Marker({\n position : latlng,\n map : map\n });\n\n // Add to array\n map.markers.push( marker );\n\n // If marker contains HTML, add it to an infoWindow\n if( $marker.html() )\n {\n // Create info window\n var infowindow = new google.maps.InfoWindow({\n content : $marker.html()\n });\n\n // Show info window with address\n infowindow.open( map, marker );\n }\n }", "title": "" }, { "docid": "2f6dd769caa500bc2f49cba42a4c6657", "score": "0.6831599", "text": "function add_marker($marker, map) {\n\n // var\n var latlng = new google.maps.LatLng($marker.attr('data-lat'), $marker.attr('data-lng'));\n\n // create marker\n var marker = new google.maps.Marker({\n position: latlng,\n map: map\n });\n\n // add to array\n map.markers.push(marker);\n\n // if marker contains HTML, add it to an infoWindow\n if ($marker.html()) {\n // create info window\n var infowindow = new google.maps.InfoWindow({\n content: $marker.html()\n });\n\n // show info window when marker is clicked\n google.maps.event.addListener(marker, 'click', function () {\n\n infowindow.open(map, marker);\n\n });\n }\n\n }", "title": "" }, { "docid": "043f9046cc4710ef0e341eff0c0f3f27", "score": "0.6810858", "text": "function makeMarker(i){\n var marker= new google.maps.Marker({\n map: map,\n position: locations[i].position,\n title: locations[i].name,\n animation: google.maps.Animation.DROP,\n id:locations[i].place_id,\n icon: defaultIcon,\n });\n marker.addListener('click',function(){\n getPlacesDetails(this, detailsInfoWindow);\n changeMarkerColor(this);\n activeMarker=this.title;\n mvm.isShown(true);\n mvm.getTipsObject();\n });\n return marker;\n}", "title": "" }, { "docid": "e7dd8011d80d479b307fa8d180429efe", "score": "0.6808857", "text": "function createMark(m_lat, m_long, name) {\n //kreiraj tocka\n blatlng = new google.maps.LatLng(m_lat, m_long);\n //opcii za markerot\n var marker = new google.maps.Marker({\n position: blatlng,\n title: name,\n map: map,\n info: name,\n icon: 'Content/Images/pharmacy-building.png'\n });\n\n //dodadi go markerot vo globalnata niza\n pharmacies.push(marker);\n }", "title": "" }, { "docid": "7388253e6adcec8944c1e7bb3fef6127", "score": "0.6802664", "text": "function createMarker(point) {\n var marker = new google.maps.Marker({\n position: new google.maps.LatLng(point.lat(), point.long()),\n title: point.name(),\n url: point.URL(),\n place_id: point.place_id,\n map: map,\n draggable: true,\n animation: google.maps.Animation.DROP,\n icon: \"http://chart.apis.google.com/chart?chst=d_bubble_icon_text_small_withshadow&chld=shoppingcart|bbT|\" + point.name() + \"|018E30|E0EBEB\",\n });\n\n point.marker = marker;\n\n // click the list item to match the corresponding marker\n markersArray.push(marker);\n\n this.clickMarker = function(point) {\n for(var e in markersArray){\n if(point.place_id === markersArray[e].place_id) {\n map.panTo(markersArray[e].position);\n google.maps.event.trigger(point.marker, \"click\");\n }\n }\n };\n\n // Add click event for marker animation and call toggleBounce function to get yelp data for InfoWindow\n google.maps.event.addListener(marker,'click', toggleBounce);\n\n function toggleBounce() {\n\n marker.setAnimation(google.maps.Animation.BOUNCE);\n\n // use timer to turn off marker animation\n window.setTimeout(function(){\n marker.setAnimation(null);\n }, 1400);\n\n // get yelp data and call infowindow in the function\n getYelpData(point);\n }\n }", "title": "" }, { "docid": "4c89111d634cf648c4b75075b713d1f4", "score": "0.67946106", "text": "function add_marker( $marker, map ) {\n\n\t\t\t// var\n\t\t\tvar latlng = new google.maps.LatLng( $marker.attr('data-lat'), $marker.attr('data-lng') );\n\n\t\t\t// create marker\n\t\t\tvar iconBase = 'http://momentum-training.com/wp-content/themes/momentumtraining/images/';\n\t\t\tvar marker = new google.maps.Marker({\n\t\t\t\tposition\t: latlng,\n\t\t\t\tmap\t\t\t: map,\n\t\t\t\ticon: iconBase + 'map-marker.png'\n\t\t\t});\n\n\t\t\t// add to array\n\t\t\tmap.markers.push( marker );\n\n\t\t\t// if marker contains HTML, add it to an infoWindow\n\t\t\tif( $marker.html() )\n\t\t\t{\n\t\t\t\t// create info window\n\t\t\t\tvar infowindow = new google.maps.InfoWindow({\n\t\t\t\t\tcontent\t\t: $marker.html()\n\t\t\t\t});\n\n\t\t\t\t// show info window when marker is clicked\n\t\t\t\tgoogle.maps.event.addListener(marker, 'click', function() {\n\n\t\t\t\t\tinfowindow.open( map, marker );\n\n\t\t\t\t});\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "496242f486c82328073d8606645663d0", "score": "0.6786536", "text": "function addMarker() {\n markers.push(new google.maps.Marker({\n position: new google.maps.LatLng((Math.random() - 0.5) * 180, (Math.random() - 0.5) * 360),\n map: map,\n icon: image,\n title: 'tweet'\n }));\n}", "title": "" }, { "docid": "3dfbadad1aa23f16ed2a6bc8dd556e54", "score": "0.67859554", "text": "function addMarker(props){\n var marker = new google.maps.Marker({\n position: props.Markers.coords,\n map: map,\n draggable: true,\n animation: google.maps.Animation.DROP,\n\n });\n // Checking for a custom icon\n if(props.Markers.iconImage){\n // Setting icon image\n marker.setIcon(props.Markers.iconImage);\n }\n // Check if there is additional content\n if(props.Markers.content){\n var infoWindow = new google.maps.InfoWindow({\n content: props.Markers.content\n });\n marker.addListener('click', function(){\n infoWindow.open(map, marker);\n })\n }\n oldMarkers.push(marker);\n}", "title": "" }, { "docid": "3b3a891dc8028faae79f28002b635c85", "score": "0.678571", "text": "function add_marker( $marker, map ) {\n\n\t\tvar markerLatLng = {lat: parseFloat( $marker.attr( 'data-lat' ) ), lng: parseFloat( $marker.attr( 'data-lng' ) ) };\n\t\tconsole.log(markerLatLng);\n\t\tvar marker = new google.maps.Marker({\n\t\t\tposition: markerLatLng,\n\t\t\tmap: map\n\t\t});\n\t\tmap.markers.push( marker );\n\n\t\t// if marker contains HTML, add it to an infoWindow\n\t\tif( $marker.html() ){\n\t\t\t// create info window\n\t\t\tvar infowindow = new google.maps.InfoWindow({\n\t\t\t\tcontent\t\t: $marker.html()\n\t\t\t});\n\n\t\t\t// show info window when marker is clicked\n\t\t\tgoogle.maps.event.addListener(marker, 'click', function() {\n\n\t\t\t\tinfowindow.open( map, marker );\n\n\t\t\t});\n\t\t}\n\t}", "title": "" }, { "docid": "437f6f82e82d2fc3cb837eba5ac38183", "score": "0.6782226", "text": "function add_marker( $marker, map ) {\n\n\t\t// Position\n\t\tvar latlng = new google.maps.LatLng( $marker.attr('data-lat'), $marker.attr('data-lng') );\n\n\t\t// Create marker\n\t\tvar marker = new google.maps.Marker({\n\t\t\tposition\t\t: latlng,\n\t\t\tmap\t\t\t: map,\n\t\t\ticon: {\n\t\t\t\tpath\t\t\t\t: google.maps.SymbolPath.CIRCLE,\n\t\t\t\tfillOpacity\t\t: 1,\n\t\t\t\tfillColor\t\t: '#FF6B00',\n\t\t\t\tstrokeOpacity\t: 0,\n\t\t\t\tscale\t\t\t\t: 12\n\t\t\t}\n\t\t});\n\n\t\t// Add marker to array\n\t\tmap.markers.push( marker );\n\n\t\t// If marker contains HTML, add it to an infoWindow\n\t\tif ( $marker.html() ) {\n\t\t\t// Create info window\n\t\t\tvar infowindow = new google.maps.InfoWindow({\n\t\t\t\tcontent\t\t: $marker.html()\n\t\t\t});\n\n\t\t\t// Show info window when marker is clicked\n\t\t\tgoogle.maps.event.addListener(marker, 'click', function() {\n\n\t\t\t\tinfowindow.open( map, marker );\n\n\t\t\t});\n\t\t}\n\n\t}", "title": "" }, { "docid": "f28d3863d091de5695eee5491f18cb37", "score": "0.6773331", "text": "function createMarker(point, name, address, letter) {\n //Set up pin icon with the Google Charts API for all of our markers\n var pinImage = new google.maps.MarkerImage(\"https://chart.googleapis.com/chart?chst=d_map_pin_letter&chld=\" + letter + \"|\" + settings.pinColor + \"|\" + settings.pinTextColor,\n new google.maps.Size(21, 34),\n new google.maps.Point(0, 0),\n new google.maps.Point(10, 34));\n var pinShadow = new google.maps.MarkerImage(\"https://chart.googleapis.com/chart?chst=d_map_pin_shadow\",\n new google.maps.Size(40, 37),\n new google.maps.Point(0, 0),\n new google.maps.Point(12, 35));\n\n //Create the markers\n if (settings.storeLimit > 26) {\n var marker = new google.maps.Marker({\n position: point,\n map: map,\n draggable: false\n });\n }\n else {\n var marker = new google.maps.Marker({\n position: point,\n map: map,\n icon: pinImage,\n shadow: pinShadow,\n draggable: false\n });\n }\n\n return marker;\n }", "title": "" }, { "docid": "843ee2a9efef2e6d122b8a022182fca8", "score": "0.67559004", "text": "function newMarker(item, map) {\n return new google.maps.Marker({\n position: {lat: item.lat, lng: item.lng},\n map: map,\n title: item.name\n });\n}", "title": "" }, { "docid": "1839fdd6f1ea0a6d1526f7ca04f92e87", "score": "0.67347264", "text": "function add_marker( $marker, map ) {\n\n // var\n var latlng = new google.maps.LatLng( $marker.attr('data-lat'), $marker.attr('data-lng') );\n\n // create marker\n var marker = new google.maps.Marker({\n position : latlng,\n map : map\n });\n\n // add to array\n map.markers.push( marker );\n\n // if marker contains HTML, add it to an infoWindow\n if( $marker.html() )\n {\n // create info window\n var infowindow = new google.maps.InfoWindow({\n content : $marker.html()\n });\n\n // show info window when marker is clicked\n google.maps.event.addListener(marker, 'click', function() {\n\n infowindow.open( map, marker );\n\n });\n }\n\n}", "title": "" }, { "docid": "4ad8ae4b7dbfbade852a648c59664158", "score": "0.6729117", "text": "function createMarker(map, GeoLoc, title, indexOfArray, isDraggable) {\n if (indexOfArray == null)\n iconUrl = SELF_ICON;\n else {\n var markerLetter = String.fromCharCode(\"A\".charCodeAt(0) + indexOfArray);\n var iconUrl = \"https://maps.google.com/mapfiles/kml/paddle/\" + markerLetter + \".png\";\n }\n\n var marker = new google.maps.Marker({\n position: GeoLoc,\n map: map,\n title: title,\n draggable: isDraggable,\n animation: google.maps.Animation.DROP,\n icon: {\n url: iconUrl,\n size: new google.maps.Size(MARKER_WIDTH, MARKER_HEIGHT),\n scaledSize: new google.maps.Size(MARKER_WIDTH, MARKER_HEIGHT)\n }\n });\n\n if (marker.getPosition() !== selfGeoLocation) {\n markers.push(marker);\n }\n else\n user_marker = marker;\n \n// Start: event trigger when clicking on a marker\n google.maps.event.addListener(marker, \"click\", function() {\n\n $('div[role=markerSection]').css('backgroundColor', 'transparent');\n for (var i=markers.length-1; i>=0; i--) \n if (marker.getPosition() == markers[i].getPosition() && marker.getTitle() == markers[i].getTitle())\n \n $('#markerSection'+i).css('backgroundColor', '#DCDCDC');\n \n openInfoWindow(map, marker);\n }); \n }", "title": "" }, { "docid": "f98786adfc728870f046efc0795fdff1", "score": "0.67243636", "text": "function createMarker(n, map, lat, long, url) {\n var icon = {url: url}; // intanciate the icon\n \n /* instanciate the marker itself */\n var marker = {\n position: new google.maps.LatLng(lat, long), \n\t map: map,\n\t icon : icon\n }\n /* transform our marker into a google maps marker */\n\t var marker = new google.maps.Marker(marker); \n\t \n\t /* if content has been defined, create an InfoWindow that will pop-up on click */\n\t /*if(content != '') {\n\t /* attach the infoWindow to the marker */\n \t /*marker.infobulle = new google.maps.InfoWindow({\n content : content, // contenu qui sera affiché\n visible: false,\n position: new google.maps.LatLng(lat, long),\n maxWidth: 500\n });\n \n\t google.maps.event.addListener(marker, 'click', function addInfoWindow(data){\n\t // affichage position du marker\n\t console.log(content);\n\t marker.infobulle.open(map, marker);\n\t });\n }*/\n\t /* the index wil be useful in case of removal of the marker's childs and roads */\n\t marker.index = n;\n /* add marker to the zone */\n zoneMarkers.extend(marker.getPosition());\n map.fitBounds(zoneMarkers);\n\t return marker;\n }", "title": "" }, { "docid": "02e1dfb86592475af103f2a09f273bb3", "score": "0.671118", "text": "makeMarkerData (callback) {\n\t\tthis.data = {\n\t\t\tcommitHashWhenCreated: this.repoFactory.randomCommitHash()\n\t\t};\n\t\tthis.marker = this.marker || this.postData[0].markers[0];\n\t\tthis.expectedData = {\n\t\t\tmarker: {\n\t\t\t\t_id: this.marker.id,\t// DEPRECATE ME\n\t\t\t\tid: this.marker.id,\n\t\t\t\t$set: Object.assign(DeepClone(this.data), { \n\t\t\t\t\tversion: this.expectedVersion,\n\t\t\t\t\tmodifiedAt: Date.now()\t// placeholder\n\t\t\t\t}),\n\t\t\t\t$version: {\n\t\t\t\t\tbefore: this.expectedVersion - 1,\n\t\t\t\t\tafter: this.expectedVersion\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tthis.expectedData.marker.$set.commitHashWhenCreated = this.expectedData.marker.$set.commitHashWhenCreated.toLowerCase();\n\t\tthis.expectedMarker = DeepClone(this.marker);\n\t\tObject.assign(this.expectedMarker, this.expectedData.marker.$set);\n\t\tthis.modifiedAfter = Date.now();\n\t\tthis.path = '/markers/' + this.marker.id;\n\t\tcallback();\n\t}", "title": "" }, { "docid": "551831b2614ae64fa42e85802b820cb9", "score": "0.67048067", "text": "function addMarker(lat, lng, data) {\n\t\t\t\t\n\t\t\t\tvar opt = {};\n\t\t\t\tif (data['count_inst']>1) {\n\t\t\t\t\topt['zIndexOffset'] = 1000;\n\t\t\t\t}\n\t\t\t\topt['opacity'] = (data['COUNT_AUTHOR'] == 1) ? .5 : 1.0;\n\t\t\t\tvar m = new L.circleMarker([lat, lng], opt);\n\n\t\t\t\tvar count = 1;\n\t\t\t\tm.on(\"click\", function () {\n\t\t\t\t\tif (count == 1) {\n\t\t\t\t\t\tvar $div = $('<div style=\"width: 200px; height: 200px; pointer-events: none;\"></div>');\n\t\t\t\t\t\t$div.addClass('mapPopUp')\n\t\t\t\t\t\tvar div = $div[0];\n\t\t\t\t\t\tm.bindPopup(div);\n\t\t\t\t\t\tm.openPopup();\n\n\t\t\t\t\t\tvar $title = $('<h3></h3>').text(data.NAME);\n\t\t\t\t\t\t$div.prepend($title);\n\t\t\t\t\t\t$div.append($('<p></p>').text(\"Count: \" + data['COUNT_AUTHOR']));\n\n\t\t\t\t\t\tcount ++\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t \n\t\t\t\tmarkers.addLayer(m);\n\n\t\t\t}", "title": "" }, { "docid": "a038be56956b852b4331e2b497e07b3d", "score": "0.6704559", "text": "function addNewMark(item, icon_sel, view) {\n\n var lat = item.latitud;\n var lon = item.longitud;\n var placa = item.placa;\n var data = item.info;\n\n setBounds(lat, lon);\n\n var icon =\n (icon_sel == 'geoIn') ? iconGeoIn :\n (icon_sel == 'geoOut') ? iconGeoOut :\n (icon_sel == 'punto_control') ? punto_control_icon :\n (icon_sel == 'pasajero') ? pasajero_icon :\n (icon_sel == 'alarma') ? alarma_icon :\n (icon_sel == 'ultimo_reporte') ? iconToLastReport(item, icon_sel) : //ultimo_reporte_icon :\n (icon_sel == 'primer_reporte') ? primer_reporte_icon :\n (icon_sel == 'norte') ? norte_icon :\n (icon_sel == 'sur') ? sur_icon :\n (icon_sel == 'oriente') ? oriente_icon :\n (icon_sel == 'occidente') ? occidente_icon :\n (icon_sel == 'nor-oriente') ? nororiente_icon :\n (icon_sel == 'nor-occidente') ? noroccidente_icon :\n (icon_sel == 'sur-oriente') ? suroriente_icon :\n (icon_sel == 'sur-occidente') ? suroccidente_icon : otros_icon;\n\n var newLatLng = new L.LatLng(lat, lon);\n var marker = null;\n\n if (icon_sel === \"geoIn\" || icon_sel === \"geoOut\") {\n marker = new L.Marker(newLatLng, {draggable: 'false', icon: icon, zIndexOffset: 10000})\n .bindPopup(data);\n } else {\n marker = new L.Marker(newLatLng, {draggable: 'false', icon: icon})\n .bindPopup(data);\n }\n\n var splaca = document.getElementById(\"splaca\").value;\n if (splaca == \"\") {\n marker.bindLabel(placa, {className: 'custom_class', noHide: true, offset: [23, -16]});\n }\n\n // Registra posicion de marca para ubicacion y muestra posterior\n // cuando sea seleccionada\n marker.on('click', function (e) {\n indexMark(item.index);\n });\n map.addLayer(marker);\n // agregamos marca a lista\n lst_mark_gps.splice(item.index, 0, marker);\n // agregamos item gps a lista\n lst_global_gps.splice(item.index, 0, item);\n\n var index_keep_mark = getIndexMark();\n if (index_keep_mark >= 0) {\n\n // Si un punto ha sido pulsado,\n // se ubica y conserva enfoque\n showMarkAUX(index_keep_mark);\n if (CENTER_MAP != null) {\n map.setView(CENTER_MAP, ZOOM_MAP);\n }\n\n } else if (CENTER_MAP != null) {\n\n // Si ha ocurrido evento zoom o arrastre,\n // se conserva enfoque\n map.setView(CENTER_MAP, ZOOM_MAP);\n\n } else if (icon_sel == 'ultimo_reporte' && infoContextual && REFRESH_MAP) {\n\n // Se visualiza punto mas reciente\n marker.openPopup();\n }\n}", "title": "" }, { "docid": "794bd667eef0affa66f5ce1885a6c7ea", "score": "0.6704316", "text": "function addMarker(props) {\n let marker = new google.maps.Marker({\n position: props.place,\n // Drops Map Markers onto position with animation:\n animation: google.maps.Animation.DROP,\n map: map,\n });\n // Pushes Markers into mapMarkers array:\n mapMarkers.push(marker);\n\n // Info Window for Markers:\n let infoWindow = new google.maps.InfoWindow({\n maxWidth: 300,\n });\n\n // Opens Info Window on click:\n marker.addListener(\"click\", () => {\n infoWindow.open(map, marker);\n infoWindow.setContent(props.content);\n });\n }", "title": "" }, { "docid": "5835a887f43fe54017976bc262787b35", "score": "0.66869265", "text": "makeMarker(id, q) {\n let m = new Marker(id);\n m.updateQ(q);\n this.mesMarker.set(id, m);\n return m;\n }", "title": "" }, { "docid": "e365c19deb84cf6b7b2d1a4849957700", "score": "0.6681586", "text": "function createMarker(input) {\r\n\t\t\tvar marker = new GMarker(input.point);\r\n\t\t\tGEvent.addListener(marker, \"click\", function() {\r\n\t\t\t\tmarker.openInfoWindowHtml(formatWindow(input));\r\n\t\t\t\t});\r\n\t\t\treturn marker;\r\n\t\t}", "title": "" }, { "docid": "f84a6fda64c212300017327fcb0a9cda", "score": "0.66809195", "text": "function createMarker ( markerOptions ) {\n markerOptions = Object.assign( { map: mapInstance }, deepmerge( defaultMarkerOptions, markerOptions ) )\n return Marker( markerOptions ).render()\n }", "title": "" }, { "docid": "2f269c552541e81de7da21b6680c6721", "score": "0.66738623", "text": "function create_marker(place)\n{\n // creating a marker and giving it propertys\n var marker = new google.maps.Marker ({\n position: {lat: place.latitude, lng: place.longitude},\n label: place.place_name,\n animation: google.maps.Animation.DROP,\n icon:{\n url:'static/pin.svg',\n scaledSize: new google.maps.Size(30,32),\n labelOrigin: new google.maps.Point(13,42),\n },\n map: map,\n });\n \n // returning the marker \n return marker;\n}", "title": "" }, { "docid": "919f428c1e2b04e90cd8419de8c9fff8", "score": "0.66687936", "text": "function addMarker(marker) {\n let title = marker[0];\n let streetName = marker[3];\n let locationName = marker[4];\n let companyType = marker[5];\n let logo = marker[6];\n let phoneNumber = marker[7];\n let email = marker[8] ? `<p class=\"paragraph-small marker-email\">${marker[8]}</p>` : '';\n let pos = new google.maps.LatLng(marker[1], marker[2]);\n let content =\n `<div class='marker-container'>\n <div class=\"marker-logo-container\">\n <img class='marker-logo' src='${logo}' alt='${title}'>\n </div>\n <div class=\"marker-content\">\n <h3 class='marker-name'>${title}</h3>\n <div class='marker-contact-info'>\n <p class=\"paragraph-small\">${phoneNumber}</p>\n ${email}\n <p class=\"paragraph-small\">${streetName}, ${locationName}</p>\n </div>\n </div>\n </div>`;\n\n let updatedMarker = new google.maps.Marker({\n content: content,\n title: title,\n position: pos,\n streetName: streetName,\n locationName: locationName,\n logo: logo,\n phoneNumber: phoneNumber,\n email: email,\n companyType: companyType,\n map: map,\n icon: inactiveMarkerIcon\n });\n\n googleMarkers.push(updatedMarker);\n\n google.maps.event.addListener(updatedMarker, 'click', ((updatedMarker, content) => {\n return function() {\n closeWindow();\n infowindow.setContent(content);\n infowindow.open(map, updatedMarker);\n map.panTo(this.getPosition());\n map.setZoom(12);\n updatedMarker.setIcon(activeMarkerIcon);\n activeWindow = infowindow;\n activeMarker = updatedMarker;\n }\n })(updatedMarker, content));\n\n google.maps.event.addListener(infowindow, 'closeclick', (() => {\n return function () { closeWindow(); }\n })(infowindow));\n}", "title": "" }, { "docid": "9273d25890dbb5ec40f84f1a69a1e92c", "score": "0.6665559", "text": "function createMarker(doc) {\n let popup = new tt.Popup({\n offset: popupOffsets,\n });\n let marker = new tt.Marker();\n if (doc.data().type == \"garbage\") {\n let garbageBin = createBinElement(1);\n marker = new tt.Marker({\n element: garbageBin,\n });\n } else if (doc.data().type === \"recycle\") {\n let recycleBin = createBinElement(2);\n marker = new tt.Marker({\n element: recycleBin,\n });\n }\n markers.push(marker);\n marker.setLngLat(doc.data().loc).addTo(map);\n popup.setHTML(\n \"<h4>\" +\n doc.data().type +\n \" bin</h4><p class='popup-details'>Details:\" +\n doc.data().description +\n \"</p\"\n );\n marker.setPopup(popup);\n document.querySelector(\"#hidePins\").addEventListener(\"click\", function () {\n hidePin(marker);\n });\n document.querySelector(\"#showPins\").addEventListener(\"click\", function () {\n showPin(doc, marker, popup);\n });\n}", "title": "" }, { "docid": "63b35fb180b019a7116d3cb047c3791b", "score": "0.6664116", "text": "function add_marker( $marker, map ) {\n\n\t// var\n\tvar latlng = new google.maps.LatLng( $marker.attr('data-lat'), $marker.attr('data-lng') );\n\n\n\t// create marker\n\tvar iconBase = '/app/themes/carel/img/';\n\tvar marker = new google.maps.Marker({\n\t\tposition\t: latlng,\n\t\tmap\t\t\t: map,\n\t\ticon: iconBase + 'markerGMap.png'\n\t});\n\n\n\t// add to array\n\tmap.markers.push( marker );\n\n\t// if marker contains HTML, add it to an infoWindow\n\tif( $marker.html() )\n\t{\n\t\t// create info window\n\t\tvar infowindow = new google.maps.InfoWindow({\n\t\t\tcontent\t\t: $marker.html()\n\t\t});\n\n\t\t// show info window when marker is clicked\n\t\tgoogle.maps.event.addListener(marker, 'click', function() {\n\n\t\t\tinfowindow.open( map, marker );\n\n\t\t});\n\t}\n\n}", "title": "" }, { "docid": "f12ad2e21992e26bedb1a469b45f3012", "score": "0.6660499", "text": "function addMarker(latitude,longitude,title,atype,color, map) {\n var position = {lat:latitude,lng:longitude};\n var marker = new google.maps.Marker({\n position: position, \n map:map,\n type: atype,\n icon: {\n path: google.maps.SymbolPath.CIRCLE,\n scale: 7,\n fillColor:color,\n fillOpacity: 1,\n strokeWeight: 1,\n strokeColor: color,\n },\n html:\"<h3>\"+ title +\"</h3>\"\n });\n marker.setTitle(title);\n // Add a listener for the click event\n markersArray.push(marker);\n\t selectedMarkers = markersArray.slice(0,125);\n google.maps.event.addListener(marker, 'click', function(e){\n makeInfoWindow(map, this.position, title);\n map.setZoom(14);\n });\n }", "title": "" }, { "docid": "5baead44d30346c0ffca447583db427c", "score": "0.6652262", "text": "function add_marker( $marker, map ) {\n \n\t// var\n\tvar latlng = new google.maps.LatLng( $marker.attr('data-lat'), $marker.attr('data-lng') );\n \n\t// create marker\n\tvar marker = new google.maps.Marker({\n\t\tposition\t: latlng,\n\t\tmap\t\t\t: map\n\t});\n \n\t// add to array\n\tmap.markers.push( marker );\n \n\t// if marker contains HTML, add it to an infoWindow\n\tif( $marker.html() )\n\t{\n\t\t// create info window\n\t\tvar infowindow = new google.maps.InfoWindow({\n\t\t\tcontent\t\t: $marker.html()\n\t\t});\n \n\t\t// show info window when marker is clicked\n\t\tgoogle.maps.event.addListener(marker, 'click', function() {\n \n\t\t\tinfowindow.open( map, marker );\n \n\t\t});\n\t}\n \n}", "title": "" }, { "docid": "09fa28014f18e3ffd174af27b8e9070d", "score": "0.66522205", "text": "function addMarker(location, map) {\n var unverifiedMark = {\n path: 'M 2,2 2,2 2,2 2,2 2,2 z',\n fillColor: 'green',\n fillOpacity: 0.8,\n scale: 1.5,\n strokeColor: 'green',\n strokeWeight: 14,\n };\n \n var verifiedMark = {\n path: 'M 2,2 2,2 2,2 2,2 2,2 z',\n fillColor: 'red',\n fillOpacity: 0.8,\n scale: 1.5,\n strokeColor: 'red',\n strokeWeight: 14,\n };\n \n var falseMark = {\n path: 'M 2,2 2,2 2,2 2,2 2,2 z',\n fillColor: 'gray',\n fillOpacity: 0.8,\n scale: 1.5,\n strokeColor: 'gray',\n strokeWeight: 14,\n };\n \n var dispatchedMark = {\n path: 'M 2,2 2,2 2,2 2,2 2,2 z',\n fillColor: 'blue',\n fillOpacity: 0.8,\n scale: 1.5,\n strokeColor: 'blue',\n strokeWeight: 14,\n };\n \n // setUnverifiableMark(unverifiedMark);\n var marker = new google.maps.Marker({\n position: location,\n map: map,\n draggable: true,\n icon: unverifiedMark,\n });\n}", "title": "" }, { "docid": "9a546814d7ffd3761d0e8167a37015e4", "score": "0.6649895", "text": "function createMarker() {\n // Define a variable holding SVG mark-up that defines an icon image:\n var svgMarkup = '<svg width=\"24\" height=\"24\" ' +\n 'xmlns=\"http://www.w3.org/2000/svg\">' +\n '<rect stroke=\"white\" fill=\"#1b468d\" x=\"1\" y=\"1\" width=\"22\" ' +\n 'height=\"22\" /><text x=\"12\" y=\"18\" font-size=\"12pt\" ' +\n 'font-family=\"Arial\" font-weight=\"bold\" text-anchor=\"middle\" ' +\n 'fill=\"white\">0</text></svg>';\n\n// Create an icon, an object holding the latitude and longitude, and a marker:\n var icon = new H.map.Icon(svgMarkup),\n coords = {lat: co_x, lng: co_y},\n marker = new H.map.Marker(coords, {icon: icon});\n\n// Add the marker to the map and center the map at the location of the marker:\n map.addObject(marker);\n map.setCenter(coords);\n}", "title": "" }, { "docid": "1cd45a470d7bac076f7dc4f4a16c345c", "score": "0.66474843", "text": "function CreateMarker(point,icon1,InfoHTML,bDraggable,sTitle)\r\n{\r\n var marker;\r\n marker = new GMarker(point,{icon:icon1,draggable:bDraggable,title: sTitle});\r\n if(InfoHTML!='')\r\n {\r\n GEvent.addListener(marker, \"click\", function() { this.openInfoWindowHtml(InfoHTML); });\r\n }\r\n GEvent.addListener(marker, \"dragend\", function() { GService.SetLatLon(this.value,this.getLatLng().y,this.getLatLng().x);RaiseEvent('PushpinMoved',this.value); });\r\n return marker;\r\n}", "title": "" }, { "docid": "ea6fa6db962a91b90fa0abe319e4d198", "score": "0.6639476", "text": "function add_marker( $marker, map ) {\n\n\t // var\n\t var latlng = new google.maps.LatLng( $marker.attr('data-lat'), $marker.attr('data-lng') );\n\n\t // create marker\n\t var marker = new google.maps.Marker({\n\t position : latlng,\n\t map : map\n\t });\n\n\t // add to array\n\t map.markers.push( marker );\n\n\t // if marker contains HTML, add it to an infoWindow\n\t if( $marker.html() )\n\t {\n\t // create info window\n\t var infowindow = new google.maps.InfoWindow({\n\t content : $marker.html()\n\t });\n\n\t // show info window when marker is clicked\n\t \tgoogle.maps.event.addListener(marker, 'click', function() {\n\t infowindow.open( map, marker );\n\t });\n\t }\n\n\t}", "title": "" }, { "docid": "071b707607810a6a91dc8349bd80c329", "score": "0.66351557", "text": "function addMarker(latitude, longitude, title, icon, time) {\n\n loc = new google.maps.LatLng(latitude, longitude);\n\n // Create a marker \n marker = new google.maps.Marker({\n position: loc,\n title: title,\n icon: icon,\n time: time,\n lat: latitude,\n lng: longitude\n });\n\n\n addInfoToStudent(marker);\n\n // add marker to map\n marker.setMap(map);\n}", "title": "" }, { "docid": "ec77f43da68e60c68e2b18fe30de0e80", "score": "0.663094", "text": "function add_marker( $marker, map ) {\n\n\t// var\n\tvar latlng = new google.maps.LatLng( $marker.attr('data-lat'), $marker.attr('data-lng') );\n\n\t// create marker\n\tvar marker = new google.maps.Marker({\n\t\tposition\t: latlng,\n\t\tmap\t\t\t: map\n\t});\n\n\t// add to array\n\tmap.markers.push( marker );\n\n\t// if marker contains HTML, add it to an infoWindow\n\tif( $marker.html() )\n\t{\n\t\t// create info window\n\t\tvar infowindow = new google.maps.InfoWindow({\n\t\t\tcontent\t\t: $marker.html()\n\t\t});\n\n\t\t// show info window when marker is clicked\n\t\tgoogle.maps.event.addListener(marker, 'click', function() {\n\n\t\t\tinfowindow.open( map, marker );\n\n\t\t});\n\t}\n\n}", "title": "" }, { "docid": "ec77f43da68e60c68e2b18fe30de0e80", "score": "0.663094", "text": "function add_marker( $marker, map ) {\n\n\t// var\n\tvar latlng = new google.maps.LatLng( $marker.attr('data-lat'), $marker.attr('data-lng') );\n\n\t// create marker\n\tvar marker = new google.maps.Marker({\n\t\tposition\t: latlng,\n\t\tmap\t\t\t: map\n\t});\n\n\t// add to array\n\tmap.markers.push( marker );\n\n\t// if marker contains HTML, add it to an infoWindow\n\tif( $marker.html() )\n\t{\n\t\t// create info window\n\t\tvar infowindow = new google.maps.InfoWindow({\n\t\t\tcontent\t\t: $marker.html()\n\t\t});\n\n\t\t// show info window when marker is clicked\n\t\tgoogle.maps.event.addListener(marker, 'click', function() {\n\n\t\t\tinfowindow.open( map, marker );\n\n\t\t});\n\t}\n\n}", "title": "" }, { "docid": "aa480b4d6fc25e67ee846085786d817f", "score": "0.6630715", "text": "function addMarker(object) {\n var marker = new google.maps.Marker({\n position: object.coords,\n map: map,\n title: object.title,\n icon: object.icon\n });\n }", "title": "" }, { "docid": "5693ac5122fbfb5a8f75b814b38260d9", "score": "0.6629578", "text": "_createMarker(objectToBeMarked) {\n // Date variable created to offset some wierd error and bug when parsing back from JSON\n let date = new Date(objectToBeMarked.date);\n L.marker(objectToBeMarked.coordinates)\n .addTo(this.#map)\n .bindPopup(\n L.popup({\n maxWidth: 250,\n minWidth: 100,\n autoClose: false,\n closeOnClick: false,\n className: `${objectToBeMarked.type}-popup`,\n })\n )\n .setPopupContent(\n `${objectToBeMarked.type === 'running' ? '🏃‍♂️' : '🚴‍♀️'} ${\n objectToBeMarked.type[0].toUpperCase() +\n objectToBeMarked.type.slice(1)\n } on ${months[date.getMonth()]} ${date.getDate()}`\n )\n .openPopup();\n }", "title": "" }, { "docid": "cd1be5e5721c8b349469c16ad9e57c71", "score": "0.6625798", "text": "function placeHereMarker(parameters) {\r\n\r\n var i = parameters[\"i\"];\r\n var domIcon = new H.map.DomIcon(parameters[\"markerContent\"]);\r\n var marker = new H.map.DomMarker({lat: loadedMarkersData[i][\"latitude\"], lng: loadedMarkersData[i][\"longitude\"]}, {\r\n icon: domIcon\r\n });\r\n\r\n clusterMarkers.push(new H.clustering.DataPoint(loadedMarkersData[i][\"latitude\"], loadedMarkersData[i][\"longitude\"], null, {icon: domIcon, id: i}));\r\n\r\n marker.loopNumber = i;\r\n marker.markerId = parameters[\"id\"];\r\n marker.htmlContent = parameters[\"markerContent\"];\r\n newMarkers.push(marker);\r\n }", "title": "" }, { "docid": "91550bb46c48f29589c444a4fb99e516", "score": "0.66199446", "text": "function addMarker(position, icon, meta) {\n\n const marker = new google.maps.Marker({\n position,\n map,\n icon,\n shape\n });\n marker.metadata = meta;\n //todo: write tooltip, click event\n marker.addListener('click', function(e, m) {\n infowindow && infowindow.close();\n $('#restaurant_reviews').empty()\n meta = this.metadata\n infowindow = new google.maps.InfoWindow({\n content: `<div><p><b>Restaurant Name</b>: ${meta.name}</p>\n <p><b>Address</b>: ${meta.full_address}</p>\n <p><b>Categories</b>: ${meta.categories.join(', ')}</p>\n <p><b>Rating</b>: ${meta.stars}</p>\n <p><b>Hygiene</b>: ${meta.hygiene == 0 ? \"Passed\" : \"Failed\"}</p>\n </div>`,\n map: map,\n position: position\n });\n infowindow.open(map, this);\n showReviewText(meta.reviews);\n });\n\n markers.push(marker);\n}", "title": "" }, { "docid": "b474d7446dcfceddf4111a6d11cd461b", "score": "0.66181356", "text": "function addMarker(data)\n{\n\t// Add a mapping point\n\tmap.addMarker({\n\t\tlat: data.Latitude,\n\t\tlng: data.Longitude,\n\t\ttitle: data.Url,\n\t\tdetails: {\n\t\t\tdatabase_id: data.Id\n\t\t},\n\t\tclick: function(e){\n\t\t\t// Initialize the information panel\n\t\t\tinitializeInfoPanel(data);\n\t\t}\n\t\t/*,\n\t\tmouseover: function(e){\n\t\t\tif(console.log)\n\t\t\t\tconsole.log(e);\n\t\t}\n\t\t*/\n\t});\n\t\n\t// Add a circle\n\tmap.drawCircle({\n\t\tlat: data.Latitude,\n\t\tlng: data.Longitude,\n\t\tradius: 2,\n\t\tstrokeColor: '#FF0000',\n\t\tstrokeOpacity: 1,\n\t\tstrokeWeight: 1,\n\t\tfillColor: '#FF0000',\n\t\tfillOpacity: data.Activity,\n\t\tclickable: false,\n\t\tclick: function(e){\n\t\t\talert(\"test\");\n\t\t}\n\t});\n}", "title": "" }, { "docid": "941dffa56f96233a0b6153b1ba8c468e", "score": "0.661781", "text": "function newMarker(){\n var infoTitle = inputField.value;\n\n marker = new google.maps.Marker({\n position: markerArray[markerArray.length-1],\n map: map,\n title: infoTitle\n });\n // reset zoom and center to new marker\n // map.setZoom(3),\n // map.setCenter(markerArray[markerArray.length-1])\n // Store markers in new array to allow for removeMarkers function\n storeMarker.push(marker);\n // Set info window to marker and define content\n infoWindows[storeMarker.length-1] = new google.maps.InfoWindow({\n content: infoTitle\n });\n // Add info window to marker when marker is hovered over\n google.maps.event.addListener(storeMarker[storeMarker.length-1], 'mouseover', function(innerKey) {\n return function(){\n infoWindows[innerKey].open(map, storeMarker[innerKey]);\n }\n }(storeMarker.length-1));\n inputField.value = \"\";\n}", "title": "" }, { "docid": "de7278be03ceacc86f1817633c092a8d", "score": "0.66142386", "text": "function addMarker(location) {\n popupAdd();\n console.log(markerPoses[lol].lat);\n //markerPoses.push(location);\n var marker = new google.maps.Marker({\n position: {\"lat\":markerPoses[lol].lat,\"lng\": markerPoses[lol].lng},\n label: markerPoses[lol].bags,\n map: map,\n title: markerPoses[lol].bags + \" Bags\"\n });\n markers.push(marker);\n listeners();\n lol +=1;\n}", "title": "" }, { "docid": "c6f324540974a1cb8aa5c392616380f3", "score": "0.65882313", "text": "function addMarker(data){\r\n //Turf.JS implementation\r\n let boundary_zipcode = data.zipcode\r\n let services = data.listservices\r\n let use_reason = data.serviceusedreason\r\n let serviceproblems = data.serviceproblems\r\n let datetime = data.timestamp\r\n markerServicesSplit = services.split(', ');\r\n console.log(markerServicesSplit);\r\n markerServicesSplit.forEach(function(element){\r\n if (element == \"Food Banks\"){\r\n fb_count +=1;\r\n }\r\n else if (element ==\"Food Pantries\"){\r\n fp_count +=1; \r\n }\r\n else if (element ==\"Community Fridges\"){\r\n cf_count+=1\r\n }\r\n else if (element == \"SNAP (Supplemental Nutrition Assistance Program)\"){\r\n snap_count+=1\r\n }\r\n else if (element == \"WIC (Special Supplemental Nutrition Program for Women, Infants, and Children)\"){\r\n wic_count+=1\r\n }\r\n else if (element == \"CalFresh\"){\r\n calfresh_count+=1\r\n }\r\n else if (element ==\"None\"){\r\n none_count+=1\r\n }\r\n }\r\n )\r\n // create the turfJS point\r\n\r\n let thisPoint = turf.point([Number(data.lng),Number(data.lat)],\r\n {boundary_zipcode, \r\n services,\r\n use_reason,\r\n serviceproblems,\r\n datetime})\r\n\r\n // put all the turfJS points into `allPoints`\r\n allPoints.push(thisPoint)\r\n //Old marker information\r\n // console.log(data)\r\n // these are the names of our fields in the google sheets: \r\n if (data.zipcode == filteredZipcode){\r\n createButtons(data.lat,data.lng, data)\r\n }\r\n //Credit to\r\n return data.timestamp\r\n}", "title": "" }, { "docid": "4dacc1277bf97cf6e390b4eee42740ef", "score": "0.6586068", "text": "function createMarker(markerInfos) {\r\n\t\t//Gestion image\r\n\t\tif (markerInfos[var_id] == idToChangeMarker) {\r\n\t\t\tvar urlSelect = markerInfos[var_icone].replace('.png', '_E.png');\r\n\t\t\tvar url = './images/' + urlSelect;\r\n\t\t} else {\r\n\t\t\tvar url = './images/' + markerInfos[var_icone];\r\n\t\t}\r\n\t\tvar myMarkerImage = new google.maps.MarkerImage(url);\r\n\t\tvar my_position = new google.maps.LatLng(markerInfos[var_lat], markerInfos[var_lng]);\r\n\t\t//Gestion affichage Prix au survol Icon\r\n\t\tif (markerInfos[var_listPrice][keyCarbu] == null) {\r\n\t\t\tvar titlePrice = \"Non disponible\";\r\n\t\t} else {\r\n\t\t\tvar titlePrice = markerInfos[var_listPrice][keyCarbu]['Prix'] + ' €';\r\n\t\t}\r\n\t\tvar myMarker = new google.maps.Marker({\r\n\t\t\tposition: my_position,\r\n\t\t\tmap: myMap,\r\n\t\t\ticon: myMarkerImage,\r\n\t\t\ttitle: titlePrice\r\n\t\t});\r\n\t\tbounds.extend(my_position);\r\n\r\n\t\tgoogle.maps.event.addListener(myMarker, 'click', function() {\r\n\t\t\taddDivStation(markerInfos);\r\n\t\t\tdocument.getElementById('stationToAfficheInfoID').value = markerInfos[var_id];\r\n\t\t\tif (oldMarker == null || oldMarker != myMarker) {\r\n\t\t\t\tvar image = myMarker.getIcon();\r\n\t\t\t\tvar url = myMarker.getIcon().url;\r\n\t\t\t\tvar newUrl = url.replace('.png', '_E.png');\r\n\t\t\t\tmyMarker.setIcon(newUrl);\r\n\t\t\t\tif (oldMarker != null) {\r\n\t\t\t\t\toldMarker.setIcon(oldImage);\r\n\t\t\t\t}\r\n\t\t\t\toldMarker = myMarker;\r\n\t\t\t\toldImage = image;\r\n\t\t\t}\r\n\t\t});\r\n\t}", "title": "" }, { "docid": "0dd6cbd100e7820f605920d1e99c89e1", "score": "0.65594745", "text": "function add_marker($marker, map) {\n // var\n var markers = window.homepage + '/wp-content/themes/wp-curtains/img/marker.png';\n var latlng = new google.maps.LatLng($marker.attr('data-lat'), $marker.attr('data-lng'));\n // create marker\n var marker = new google.maps.Marker({\n position: latlng,\n map: map,\n icon: markers\n });\n // add to array\n map.markers.push(marker);\n // if marker contains HTML, add it to an infoWindow\n if ($marker.html()) {\n // create info window\n var infowindow = new google.maps.InfoWindow({\n content: $marker.html()\n });\n // show info window when marker is clicked\n google.maps.event.addListener(marker, 'click', function() {\n infowindow.open(map, marker);\n });\n }\n\n }", "title": "" }, { "docid": "482b615c3b426c621919c83070777ef6", "score": "0.65519243", "text": "function createMarker(latLng, name, address){\r\n var html = \"<b>\" + name + \"</b> <br/>\" + address;\r\n var marker = new google.maps.Marker({\r\n map: map,\r\n position: latLng\r\n });\r\n\r\n google.maps.event.addListener(marker, 'click', function(){\r\n infoWindow.setContent(html);\r\n infoWindow.open(map, marker);\r\n });\r\n markers.push(marker);\r\n}", "title": "" }, { "docid": "b3e65f0ab4d0f84aa80bf4b6425b738a", "score": "0.65462923", "text": "function createMarker(point,zipcode,city,abbr) \n{\n\tvar marker = new GMarker(point);\n\tGEvent.addListener(marker, \"click\", function() \n\t{\n\t\tgetNewsHtml(zipcode,marker,city,abbr);\n\t});\n\treturn marker;\n}", "title": "" }, { "docid": "9e189597dc50cb3263c3585d58347041", "score": "0.6544355", "text": "function createMarker(latlng, image, name){\n var marker = new google.maps.Marker({\n position: latlng,\n icon: image,\n map: map,\n title: name\n });\n }", "title": "" }, { "docid": "89a58500ccbaacd3bae9c8c1777ab5b8", "score": "0.65440935", "text": "function createMarkers() {\r\n\r\n for (var i = 0; i < loadedMarkersData.length; i++) {\r\n var markerContent = document.createElement('div');\r\n markerContent.innerHTML =\r\n '<div class=\"here-map-marker\"><div class=\"ts-marker-wrapper\"><a href=\"#\" class=\"ts-marker\" data-ts-id=\"' + loadedMarkersData[i][\"id\"] + '\">' +\r\n ( ( loadedMarkersData[i][\"ribbon\"] !== undefined ) ? '<div class=\"ts-marker__feature\">' + loadedMarkersData[i][\"ribbon\"] + '</div>' : \"\" ) +\r\n ( ( loadedMarkersData[i][\"title\"] !== undefined ) ? '<div class=\"ts-marker__title\">' + loadedMarkersData[i][\"title\"] + '</div>' : \"\" ) +\r\n ( ( loadedMarkersData[i][\"price\"] !== undefined && loadedMarkersData[i][\"price\"] > 0 ) ? '<div class=\"ts-marker__info\">' + formatPrice(loadedMarkersData[i][\"price\"]) + '</div>' : \"\" ) +\r\n ( ( loadedMarkersData[i][\"marker_image\"] !== undefined ) ? '<div class=\"ts-marker__image ts-black-gradient\" style=\"background-image: url(' + loadedMarkersData[i][\"marker_image\"] + ')\"></div>' : '<div class=\"ts-marker__image ts-black-gradient\" style=\"background-image: url(assets/img/marker-default-img.png)\"></div>' ) +\r\n '</a></div></div>';\r\n\r\n placeHereMarker({\"i\": i, \"markerContent\": markerContent, id: loadedMarkersData[i][\"id\"]});\r\n\r\n }\r\n\r\n // After the markers are created, do the rest\r\n\r\n markersDone();\r\n\r\n }", "title": "" }, { "docid": "3dcd9364bd5555f95980ec3c2b0be6f2", "score": "0.6539052", "text": "function create_marker(map,latlng, mloc) {\n var marker = new google.maps.Marker({\n position: latlng,\n map: map\n// shadow: getMarkerShadow(mloc['icon']),\n// icon: getMarkerIcon(mloc['icon']),\n// title: mloc['title']\n });\n\n google.maps.event.addListener(marker, 'click', function() {\n infowindow.setContent(mloc[\"info_window_content\"]);\n infowindow.open(map,marker);\n });\n}", "title": "" }, { "docid": "0b3a482ba087b3a999a85685ab391486", "score": "0.6538348", "text": "function createMarker(latlng, label, html, color) {\n var contentString = '<b>' + label + '</b><br>' + html;\n var marker = new google.maps.Marker({\n position: latlng,\n map: map,\n icon: getMarkerImage(color),\n title: label,\n zIndex: Math.round(latlng.lat() * -100000) << 5\n });\n marker.myname = label;\n gmarkers.push(marker);\n\n google.maps.event.addListener(marker, 'click', function () {\n infowindow.setContent(contentString);\n infowindow.open(map, marker);\n });\n return marker;\n}", "title": "" }, { "docid": "c2d4cbdb50248aa1e0c7307ade8e910f", "score": "0.65356255", "text": "function addMarkerToModel(markerObj) {\n Prefab.markersData.push(markerObj);\n}", "title": "" }, { "docid": "816972df111c0745bdb5bd02934ae395", "score": "0.6533585", "text": "function add_marker(info){\n var marker = new google.maps.Marker({\n position: new google.maps.LatLng(info.lat, info.lng),\n map: map,\n title: info.title\n }); \n markers.push(marker);\n\n var infowindow = new google.maps.InfoWindow({\n content : build_content(info),\n maxWidth: 300,\n });\n\n google.maps.event.addListener(marker, 'click', function() {\n infowindow.open(map, marker);\n });\n}", "title": "" }, { "docid": "0c8376afa16da9d7fcd5124f5439350d", "score": "0.6532315", "text": "function addMarker(props){\r\n\t\tconst marker = new google.maps.Marker({\r\n\t\t\tposition: props.coords,\r\n\t\t\tmap: map,\r\n\t\t\ticon: {\r\n\t\t\t\turl: props.iconUrl\r\n\t\t\t},\r\n\t\t});\r\n\r\n\t\t// info window setting\r\n\t\tconst infoWindow = new google.maps.InfoWindow({\r\n\t\t\tcontent: props.content\r\n\t\t});\r\n\r\n\t\tmarker.addListener('click', function(){\r\n\t\t\tinfoWindow.open(map, marker);\r\n\t\t});\r\n\t}", "title": "" }, { "docid": "6d2fbfabf1dda79982a799cea2b8592d", "score": "0.65271306", "text": "function initMarker(lat, lon, title){\n return new google.maps.Marker({\n position: {lat: lat, lng: lon},\n map: $scope.map,\n title: title\n });\n }", "title": "" }, { "docid": "74a0cc4127d280dc20d66468aa1719c0", "score": "0.65254414", "text": "createInst(options) {\n this.marker = L.marker(options.geometry, options.config);\n\n /*\n * Used by other map elements to determine if this is a marker. Useful for\n * looping through layers and determining which should be added to the\n * visible bounds of the map.\n */\n this.marker.isMarker = true;\n\n return this.marker;\n }", "title": "" }, { "docid": "8cd290a3be6659d5c13529c2f334c02a", "score": "0.65195864", "text": "function addMarker()\r\n{\r\n let position = marker.getPosition();\r\n locationArray.push(position);\r\n \r\n //\r\n if (flightPath != null)\r\n {\r\n flightPath.setMap(null);\r\n }\r\n if (pinkMarker !== null)\r\n {\r\n pinkMarker.setMap(null);\r\n }\r\n if (greenMarker != null)\r\n {\r\n greenMarker.setMap(null);\r\n }\r\n \r\n //\r\n flightPath = new google.maps.Polyline({\r\n path: locationArray,\r\n strokeColor: 'black',\r\n strokeOpacity: 1.0,\r\n strokeWeight: 3,\r\n });\r\n flightPath.setMap(map);\r\n \r\n //\r\n greenMarker = new google.maps.Marker({\r\n position: locationArray[0],\r\n map: map,\r\n icon: {url: 'http://maps.google.com/mapfiles/ms/icons/green-dot.png', scaledSize: new google.maps.Size(15,20)}\r\n });\r\n \r\n //\r\n if (index > 0)\r\n {\r\n pinkMarker = new google.maps.Marker({\r\n position: locationArray[index],\r\n map: map,\r\n icon: {url: 'http://maps.google.com/mapfiles/ms/icons/pink-dot.png', scaledSize: new google.maps.Size(15, 20)}\r\n }); \r\n }\r\n ++index; \r\n}", "title": "" }, { "docid": "33d85d83ea512e5c6a7633d6ef5540b7", "score": "0.6518829", "text": "function createMapWithMarker() {\n createMap();\n createMarkerForDisplay(-33.8688, 151.2093, \"A Proposed Location\");\n}", "title": "" }, { "docid": "6a2b9e5c54da8a022e70808b99cc80a3", "score": "0.6513936", "text": "function addMarker(object){\n var marker = new google.maps.Marker({\n position:object.coords,\n map:map,\n });\n\n // Delete this marker if it is clicked on\n marker.addListener('click', function(){\n let lat = this.position.lat().toFixed(4);\n let lng = this.position.lng().toFixed(4);\n _deleteINFO(lat,lng);\n _receiveINFO();\n });\n }", "title": "" }, { "docid": "c577b33de4c92b90e0bde279f2878e32", "score": "0.65106547", "text": "function addMarkerInit(data){\r\n //Turf.JS implementation\r\n let boundary_zipcode = data.zipcode\r\n let services = data.listservices\r\n let use_reason = data.serviceusedreason\r\n let serviceproblems = data.serviceproblems\r\n let datetime = data.timestamp\r\n markerServicesSplit = services.split(', ');\r\n console.log(markerServicesSplit);\r\n markerServicesSplit.forEach(function(element){\r\n if (element == \"Food Banks\"){\r\n fb_count +=1;\r\n }\r\n else if (element ==\"Food Pantries\"){\r\n fp_count +=1; \r\n }\r\n else if (element ==\"Community Fridges\"){\r\n cf_count+=1\r\n }\r\n else if (element == \"SNAP (Supplemental Nutrition Assistance Program)\"){\r\n snap_count+=1\r\n }\r\n else if (element == \"WIC (Special Supplemental Nutrition Program for Women, Infants, and Children)\"){\r\n wic_count+=1\r\n }\r\n else if (element == \"CalFresh\"){\r\n calfresh_count+=1\r\n }\r\n else if (element ==\"None\"){\r\n none_count+=1\r\n }\r\n }\r\n )\r\n // create the turfJS point\r\n\r\n let thisPoint = turf.point([Number(data.lng),Number(data.lat)],\r\n {boundary_zipcode, \r\n services,\r\n use_reason,\r\n serviceproblems,\r\n datetime})\r\n\r\n // put all the turfJS points into `allPoints`\r\n allPoints.push(thisPoint)\r\n //Old marker information\r\n // console.log(data)\r\n // these are the names of our fields in the google sheets: \r\n \r\n createButtons(data.lat,data.lng, data)\r\n //Credit to\r\n return data.timestamp\r\n}", "title": "" }, { "docid": "ed040449baa96de7c7394917e574f8d6", "score": "0.65080446", "text": "function createMarker (place) {\n // markers properties\n var marker = new google.maps.Marker({\n map: map,\n position: place.geometry.location\n })\n carparkMarkers.push(marker)\n // zoom into first result(most legit result)\n map.setZoom(13)\n map.panTo(carparkMarkers[0].position)\n // info to display and button\n google.maps.event.addListener(marker, 'click', function () {\n // content of the clicked marker\n infowindow.setContent(`<div id='markerinfo'><strong>` + place.name + '</strong><br>' +\n place.formatted_address + '<br>' +\n (`<button class='addBtn' data-name=\"${place.name}\" data-address=\"${place.formatted_address}\">add</button>`) + '</div>')\n infowindow.open(map, this)\n })\n }", "title": "" }, { "docid": "5b840bc28c2185b42047050ca7a39674", "score": "0.6507973", "text": "function createMarker(latlng, rua, cidade, estado, cep, foto, bairro, numero, mensagem, _id) {\n const marker = new google.maps.Marker({\n map: map,\n position: latlng,\n title: rua,\n _id: _id\n });\n\n // Evento que dá instrução à API para estar alerta ao click no marcador.\n // Define o conteúdo e abre a Info Window.\n google.maps.event.addListener(marker, 'click', function() {\n\n // Variável que define a estrutura do HTML a inserir na Info Window.\n // const iwContent = '<div id=\"iw_container\">' +\n // '<div class=\"iw_title\"><b>' + rua + '</b></div>' +\n // '<div class=\"iw_content\">' + cidade + '<br />' +\n // estado + '<br />' +\n // cep + `</div> <div><img src=${foto}/> </div></div>`;\n \n preencherCampos(rua, cidade, estado, cep, foto, bairro, numero, mensagem, _id);\n // O conteúdo da variável iwContent é inserido na Info Window.\n // infoWindow.setContent(iwContent);\n // console.log(allRegisters)\n // A Info Window é aberta com um click no marcador.\n // infoWindow.open(map, marker);\n });\n }", "title": "" }, { "docid": "e0ba9f9a779c288b5b00222cebb4af27", "score": "0.6501097", "text": "function createMarker(latlng, item) {\n var marker = new GMarker(latlng);\n var html = \"<div class='rating'>\" +\n \"<div class='positive'>\" +\n \"<span class='number'>\" +\n item.rating +\n \"</span>\" +\n \"</div>\" +\n \"</div>\" +\n \"<div class='details'>\" +\n \"<h3>\" +\n \"<a href='\" + item.url + \"'>\" +\n item.name +\n \"</a>\" +\n \"</h3>\" +\n \"<p>\" +\n item.address +\n \"</p>\" +\n \"</div>\" \n GEvent.addListener(marker, \"mouseover\" , function() {\n map.openInfoWindowHtml(latlng, html);\n });\n return marker;\n }", "title": "" }, { "docid": "8b3a4e12e6ece7dc7db5239a274f82c3", "score": "0.64984244", "text": "function createMarkerATM(obj) {\n// prepare new Marker object\nvar mark = new google.maps.Marker({\nposition: obj.geometry.location,\nmap: map,\ntitle: obj.name,\nanimation: google.maps.Animation.BOUNCE\n});\nmarkers.push(mark);\n// prepare info window\nvar infowindow = new google.maps.InfoWindow({\n\ncontent: '<div><img src=\"' + obj.icon + '\" heigh=30 width=30 /><br>' + obj.name +\n'<br>Rating: ' + obj.rating + '<br>Vicinity: ' + obj.vicinity + '</div>'\n});\n// add event handler to current marker\ngoogle.maps.event.addListener(mark, 'click', function() {\nclearInfos();\ninfowindow.open(map,mark);\n});\ninfos.push(infowindow);\n}", "title": "" }, { "docid": "cdd0404c7b68f667887b3a599aa63b6e", "score": "0.64976245", "text": "function addMarker(props){\n infoWindow = new google.maps.InfoWindow();\n\n var marker = new google.maps.Marker({\n position: props.coords,\n map: map\n });\n\n google.maps.event.addListener(marker, 'click', function(){\n infoWindow.setContent(props.content);\n infoWindow.open(map,this);\n });\n\n markers.push(marker);\n}", "title": "" }, { "docid": "b945e5040121338a4ed85c4ba186190a", "score": "0.6493893", "text": "function addMarkers(data){\n\t\tvar position = new google.maps.LatLng(data.lat, data.lng);\n\t\tvar marker = new google.maps.Marker({\n\t\t\tposition: position,\n\t\t\ttitle: data.title,\n\t\t\tanimation: google.maps.Animation.DROP,\n\t\t});\n\t\t\n\t\t\n\t\tmarker.addListener('click', function(){\n\t\t\tvar infowindow = new google.maps.InfoWindow({\n\t\t\t\tcontent: data.title\n\t\t\t});\n\t\t\t\n\t\t\tinfowindow.open(map, marker);\n\t\t});\n\t\t\n\t\t\n\tif($.inArray(data.title, setMarkers) <= 0){\t\t\n\t\tmarker.setMap(map);\n\t\tsetMarkers.push(data.title);\n\t\tmarkers.push(marker);\n\t}\n}", "title": "" }, { "docid": "51bd452009f207d12a049b6f80c8d8df", "score": "0.6493415", "text": "function addMarker(props){\n var marker = new google.maps.Marker({\n position:props.coords,\n map:map\n });\n\n //Creates a new infoWindow and displays content from markers Array\n if(props.content){\n var infoWindow = new google.maps.InfoWindow({\n content:props.content\n });\n\n //Executes the follow when the user clicks on a marker\n marker.addListener('click', function(){\n //Checks if an infoWindow is already open when clicking on a marker\n if(activeWindow != null){\n //Uses the google API .close() method to close the infoWindow\n activeWindow.close();\n }\n //infoWindow is then opened and variable activeWindow is not equal to null\n infoWindow.open(map, marker);\n activeWindow = infoWindow;\n });\n }\n }", "title": "" } ]
07b9b6ce5f87a7aca248e3440cb63b5c
Creating the missiles which will come from the top of the screen
[ { "docid": "ec080b6e820a3e1787a347e3c440539a", "score": "0.62012154", "text": "function createMissile() {\r\n missileSphere = new THREE.Mesh(new THREE.SphereGeometry(5), new THREE.MeshPhongMaterial({color: 0xFFFF00}));\r\n missileSphere.position.x = Math.floor(Math.random() * (160 - (-160) + 1)) + (-160);\r\n missileSphere.position.y = 120;\r\n scene.add(missileSphere);\r\n missileArray.push({missileSphere : missileSphere});\r\n numberOfMissiles++;\r\n count++;\r\n}", "title": "" } ]
[ { "docid": "840732d7d2f5891e64e69cef5d515872", "score": "0.67778283", "text": "function move_missiles()\n{\t\t\t\n\tmissile_timer -= 1;\n\tfor(var i = 0;i<missiles.length;i++)\n\t{\n\t\tif (missiles[i]['direction'] == 'right')\n\t\t{\n\t\t\tmissiles[i]['position'][0] += 10;\n\t\t}\n\t\telse if (missiles[i]['direction'] == 'left')\n\t\t{\n\t\t\tmissiles[i]['position'][0] -= 10;\n\t\t}\n\t\telse if (missiles[i]['direction'] == 'up')\n\t\t{\n\t\t\tmissiles[i]['position'][1] -= 10;\n\t\t}\n\t\telse if (missiles[i]['direction'] == 'down')\n\t\t{\n\t\t\tmissiles[i]['position'][1] += 10;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "7be6f69fa9c965e8a23a0cecbbcb936a", "score": "0.6664362", "text": "function Tiles(){\n \n }", "title": "" }, { "docid": "fc4b8a2911d66f68933c4cd0cac3460b", "score": "0.6652797", "text": "function drawTiles(){\n for (var i = 0; i < ground.length; i++){\n image(tile, ground[i], 320);\n \n ground[i] -= 1;\n \n if (ground[i] <= -50){\n ground[i] = width;\n }\n }\n\n}", "title": "" }, { "docid": "7af6f41acb4a63416e857182e7c54399", "score": "0.65167946", "text": "function Missile( options ){\n \tthis.startX = options.startX;\n \tthis.startY = options.startY;\n \tthis.endX = options.endX;\n \tthis.endY = options.endY;\n \tthis.color = options.color;\n \tthis.trailColor = options.trailColor;\n \tthis.x = options.startX;\n \tthis.y = options.startY;\n \tthis.state = MISSILE.active;\n \tthis.width = 2;\n \tthis.height = 2;\n \tthis.explodeRadius = 0;\n }", "title": "" }, { "docid": "ffbc3d808043016b3e532ec152c5935c", "score": "0.6294123", "text": "function spawnObstaclesTop(){\n if(frameCount % 60 === 0) {\n var obstacleTop = createSprite(400,50,40,50); \n obstacleTop.y=Math.round(random(10,100)); \n //generate random obstacles\n var rand = Math.round(random(1,2));\n switch(rand) {\n case 1: obstacleTop.addImage(obsTop1);\n break;\n case 2: obstacleTop.addImage(obsTop2);\n break;\n default: break;\n }\n \n //assign scale and lifetime to the obstacle \n obstacleTop.scale = 0.1;\n obstacleTop.velocityX=-4;\n obstacleTop.lifetime = 100;\n balloon.depth = balloon.depth+1;\n topObstaclesGroup.add(obstacleTop);\n \n } \n}", "title": "" }, { "docid": "c8f19e9a93cc722d747c7ac9990c3a25", "score": "0.6282401", "text": "function missileGeneration() {\r\n speed = Math.random()*10;\r\n var levelCanvas = document.getElementById(\"level\");\r\n var levelDisplay;\r\n if (numberOfMissiles>0 && numberOfMissiles<10) {\r\n if (speed>1 && speed<1.1) {\r\n createMissile();\r\n level = 1;\r\n levelDisplay = \"Level: \"+level;\r\n levelCanvas.innerHTML = levelDisplay;\r\n }\r\n }\r\n else if (numberOfMissiles>9 && numberOfMissiles<20) {\r\n if (speed>1 && speed<1.15) {\r\n createMissile();\r\n level = 2;\r\n levelDisplay = \"Level: \"+level;\r\n levelCanvas.innerHTML = levelDisplay;\r\n }\r\n }\r\n else if (numberOfMissiles>19 && numberOfMissiles<30) {\r\n if (speed>1 && speed<1.2) {\r\n createMissile();\r\n level = 3;\r\n levelDisplay = \"Level: \"+level;\r\n levelCanvas.innerHTML = levelDisplay;\r\n }\r\n }\r\n else if (numberOfMissiles>29 && numberOfMissiles<40){\r\n if (speed>1 && speed<1.3) {\r\n createMissile();\r\n level = 4;\r\n levelDisplay = \"Level: \"+level;\r\n levelCanvas.innerHTML = levelDisplay;\r\n }\r\n }\r\n // else if (numberOfMissiles>39 && numberOfMissiles<50){\r\n // if (speed>1 && speed<1.5) {\r\n // createMissile();\r\n // }\r\n // }\r\n else if (numberOfMissiles == 40) {\r\n victory();\r\n }\r\n}", "title": "" }, { "docid": "22f5403a9d17853eeee443ea0f6325dd", "score": "0.6273713", "text": "function moveMissile()\n{\n if(gameIsOn)\n {\n var m= document.querySelectorAll(\".missile\");\n var newP;\n for(let i=0; i<m.length; i++)\n {\n newP = parseInt(m[i].style.right) - 20;\n m[i].style.right = newP +\"px\";\n if(newP < 0)\n {\n m[i].style.display = \"none\";\n }\n for(let j=0; j<obs.length; j++)\n {\n if(parseInt(m[i].style.top)>(parseInt(obs[j].style.top)-20) && parseInt(m[i].style.top)<(parseInt(obs[j].style.top)+30) && parseInt(m[i].style.right)>(parseInt(obs[j].style.right)-20) && parseInt(m[i].style.right)<(parseInt(obs[j].style.right)+20))\n {\n if(m[i].style.display !== \"none\" && obs[j].style.display !== \"none\")\n {\n m[i].style.display = \"none\";\n obs[j].style.display = \"none\";\n if(volumeIsOn)\n {\n explosionSound.play();\n }\n }\n }\n }\n for(let k=0; k<f.length; k++)\n {\n if(parseInt(m[i].style.top)>(parseInt(f[k].style.top)-20) && parseInt(m[i].style.top)<(parseInt(f[k].style.top)+20) && parseInt(m[i].style.right)>(parseInt(f[k].style.right)-15) && parseInt(m[i].style.right)<(parseInt(f[k].style.right)+15))\n {\n if(m[i].style.display !== \"none\" && f[k].style.display !== \"none\")\n {\n m[i].style.display = \"none\";\n f[k].style.display = \"none\";\n }\n }\n }\n if(newP < -140)\n {\n m[i].remove();\n }\n }\n }\n}", "title": "" }, { "docid": "e038dfcdf287c8a61cd69f27bdc302e1", "score": "0.62463707", "text": "createTileWithHighObstacleTile(tileNumber) {\n\n let tile = this.createTile(tileNumber);\n let positionX = tile.position.x;\n let slideByX = 0;\n let playerMesh = this.player.getMesh();\n let playerMesh2 = this.player.getMesh2();\n\n // To position scam objects on different lanes randomly Default to Middle Lane\n let randomPositionChooser = Math.floor((Math.random() * 100)); // 0 to 100 random number\n\n // if(randomPositionChooser >= 0 && randomPositionChooser < 30) {\n // positionX = -4.5; // Positining on the left\n // slideByX = -1.5;\n // } \n\n // // if(randomPositionChooser >= 20) {\n // // positionX = -0.6666; // Positining on the left\n // // }\n\n // if(randomPositionChooser >= 30) {\n // positionX = tile.position.x\n // }\n\n // // if(randomPositionChooser >= 60) {\n // // positionX = 0.6666; // Positioning on the right\n // // }\n\n // if(randomPositionChooser >= 60) {\n // positionX = 4.5; // Positioning on the right\n // slideByX = 1.5;\n // }\n let coinsNumber = 1;\n let sphere = BABYLON.Mesh.CreateCylinder(\"scam_fall_\" + Math.random() + coinsNumber + this.generatedTilesNumber, .25, 0.8, 0.8, 16, 0, this.scene);\n sphere.physicsImpostor = new BABYLON.PhysicsImpostor(sphere, BABYLON.PhysicsImpostor.SphereImpostor, { mass: 300 }, this.scene);\n sphere.material = this.level.getMaterial('hazardMaterial');\n sphere.position.x = positionX;\n sphere.position.y = 5;\n sphere.position.z = playerMesh.position.z + 20;\n sphere.rotation.x = 2;\n BABYLON.Tags.AddTagsTo(sphere, 'tilesBlock_fall tilesBlock' + this.generatedTilesBlocksNumber);\n sphere.physicsImpostor.setLinearVelocity({\n 'isNonUniform': true,\n 'x': slideByX,\n 'y': 0.001,\n 'z': 0\n });\n let dropped = false;\n setInterval(() => {\n if (!dropped) {\n if (sphere.position.y < playerMesh2.position.y) {\n sphere.dispose();\n this.player.die();\n dropped = true;\n }\n }\n }, 100);\n setTimeout(() => {\n sphere.dispose();\n }, 20000);\n\n }", "title": "" }, { "docid": "9dd2820374b97bc8a8f75cb4e1b45b04", "score": "0.62081313", "text": "function MissileSpawn()\n\t{\n\t\tvar missile = document.createElement('div');\n\t\tmissile.className = 'bomb';\n\t\tdocument.body.appendChild(missile);\n\t\trespawn(missile);\n\t\tMissiles.push(missile);\n\t\tLeftSpeed.push(0);\n\t\tDownSpeed.push(1);\n\t}", "title": "" }, { "docid": "bf8800b38d33b79e9b7213fa468bd140", "score": "0.6205439", "text": "function shootMissile(ufo) {\n\n for (var i = 0; i < 2; i++) {\n var missile = missiles.create(ufo.centerX, ufo.centerY, 'ufo_dot')\n missile.centerX = ufo.centerX\n missile.centerY = ufo.centerY\n\n game.physics.arcade.enable(missile);\n\n missile.body.mass = 5\n missile.body.maxVelocity.x = 420 // hyvä arvo, testattu \n missile.body.maxVelocity.y = 420\n\n missile.body.allowGravity = false\n\n missile.seekTime = 170\n missile.launchTime = 50\n\n missile.checkWorldBounds = true;\n missile.events.onOutOfBounds.add(possuOut, this);\n\n if (i == 0) {\n missile.body.velocity.x = -100\n\n } else if (i == 1) {\n missile.body.velocity.x = 100\n\n }\n\n }\n\n}", "title": "" }, { "docid": "d0ba25dd03efd1a09c8ca3380f8cce14", "score": "0.6201924", "text": "function initTiles(){\n\n let sky = new Image();\n sky.src=\"./imgs/sky-temp.png\";\n tiles.push(sky);\n let ground = new Image();\n ground.src=\"./imgs/ground-tile.png\";\n tiles.push(ground);\n let walk1 = new Image();\n walk1.src=\"./imgs/walk1.png\";\n tiles.push(walk1);\n let walk2 = new Image();\n walk2.src=\"./imgs/walk2.png\";\n tiles.push(walk2);\n let walk3 = new Image();\n walk3.src=\"./imgs/walk3.png\";\n tiles.push(walk3);\n let walk4 = new Image();\n walk4.src=\"./imgs/walk4.png\";\n tiles.push(walk4);\n let moon = new Image();\n moon.src=\"./imgs/moon-temp.png\";\n tiles.push(moon);\n let sun = new Image();\n sun.src=\"./imgs/sun.png\";\n tiles.push(sun);\n let plpic = new Image();\n plpic.src=\"./imgs/abomination.png\";\n tiles.push(plpic);\n let back_new= new Image();\n back_new.src=\"./imgs/tree_70x128.png\";\n tiles.push(back_new);\n let back_cloud= new Image();\n back_cloud.src=\"./imgs/back_proper.png\";\n tiles.push(back_cloud);\n let speed= new Image();\n speed.src=\"./imgs/speed.png\";\n tiles.push(speed);\n\n }", "title": "" }, { "docid": "950060d2f00341e95a66ed52a28a7d57", "score": "0.61838466", "text": "function start()\n{\n _map = {}, _tiles = [];\n for (var i = 0; i < 10; i++) {\n for (var j = 0; j < 10; j++) {\n\n\n\n var x =_map[0 + ':' + 0];\n console.log(_tiles[j]);\n // console.log(_map);\n new Tile((Math.floor(Math.random() * colors.length))).insert(i, j);\n\n\n }\n }\n }", "title": "" }, { "docid": "51be4cf060d2bb08afa9ac26d2aefb11", "score": "0.6165214", "text": "createFullGround() {\n\t\tfor (let i=0; i<this.game.width; i=i+this.tileSize) {\n\t\t\tthis.addTile(i);\n\t\t}\n\t}", "title": "" }, { "docid": "b1d8bf7bc8bf741972541fb3eaa3fe96", "score": "0.61557513", "text": "function displayImagesAtFingerTop(landmarks) {\n for (let i = 0; i < landmarks.length; i++) {\n const y = landmarks[i][0];\n const x = landmarks[i][1];\n if(i == 4) {\n ctx.drawImage(fatherImg, y-15, x-40, 30, 60);\n } else if(i == 8) {\n ctx.drawImage(motherImg, y-15, x-40, 30, 60);\n } else if(i == 12) {\n ctx.drawImage(brotherImg, y-15, x-40, 30, 60);\n } else if(i == 16) {\n ctx.drawImage(sisterImg, y-15, x-40, 30, 60);\n } else if(i == 20) {\n ctx.drawImage(babyImg, y-15, x-40, 30, 60);\n } \n }\n}", "title": "" }, { "docid": "3a9921971b42d58307b67153dadc276c", "score": "0.6124914", "text": "function generateTiles(){\n\n gridItems.splice(4,0,human);\n \n for(let item in gridItems){\n\n let appendString = '<div class=\\'grid-item\\'><h3>';\n \n gridItems[item] instanceof Human \n ? appendString += gridItems[item].name +'</h3><img src=' + gridItems[item].image + '>'\n\n : appendString+= gridItems[item].species +'</h3><img src=' + gridItems[item].image + '><p>' + gridItems[item].getAFact() + '</p>';\n\n grid.innerHTML += appendString + '</div>';\n \n }\n \n }", "title": "" }, { "docid": "76c479a57543243b2d88286c1aa5bd7a", "score": "0.61233634", "text": "function createMissile()\n{\n if(gameIsOn && missile !== 0)\n {\n var image= document.createElement(\"img\");\n image.src= \"images/missile.png\";\n image.setAttribute(\"class\", \"missile\");\n image.setAttribute(\"alt\", \"missile\");\n image.style.right = \"900px\";\n image.style.top = shark.style.top;\n game.appendChild(image);\n missile--;\n display();\n localStorage.setItem(`${name}_missile`, missile);\n if(volumeIsOn)\n {\n missleSound.play();\n }\n }\n}", "title": "" }, { "docid": "1b8d92c076c9bc82bc8bb72e7d67fe9c", "score": "0.6119497", "text": "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}", "title": "" }, { "docid": "e162822ca575e640ce7f090a55b7174f", "score": "0.61029994", "text": "function drawSmiles() {\n SmilesDrawer.apply();\n}", "title": "" }, { "docid": "70e6cf48391626f6acb76fe5fd1af819", "score": "0.609003", "text": "function randomiseTiles(){\n\t\trandomiseArray(tiles);\n\t\tvar i;\n\t\tfor(i = 0; i < tiles.length; i++){\n\t\t\ttiles[i].x = -border + Math.random() * (maskRect.width - scale);\n\t\t\ttiles[i].y = ROWS * scale + Math.random() * (trayDepth - scale);\n\t\t\tdiv.appendChild(tiles[i].div);\n\t\t\ttiles[i].update();\n\t\t}\n\t}", "title": "" }, { "docid": "327050ef9537cb351ae01e2763c237a1", "score": "0.6082602", "text": "function tilingBlue() {\n let x = 0;\n let y = 0; // before y = 60\n\n for (let i = 0; i < tileBlue.segmentsY; i++) {\n if (i % 2 === 0) {\n x = 0; // before x = 90;\n }\n else {\n x = 60; //before x = 150;\n }\n // Draws horizontal tiles\n for (let j = 0; j < tileBlue.segmentsX; j++) {\n push();\n noStroke();\n fill(tileBlue.fill.r, tileBlue.fill.g, tileBlue.fill.b);\n rect(x,y, tileBlue.size);\n x = x + tileBlue.spacingX;\n pop();\n }\n y = y + tileBlue.spacingY;\n }\n}", "title": "" }, { "docid": "cc253b44f4dc4a0a43eab35392409f26", "score": "0.60610914", "text": "function initTiles(){\n\t\tgetOffset(div);\n\t\tvar r, c, tile;\n\t\tmaskRect = {x:-border, y:-border, width:border * 2 + COLS * scale, height:trayDepth + border * 2 + ROWS * scale}\n\t\tfor(r = 0; r < ROWS; r++){\n\t\t\tslots[r] = [];\n\t\t\tfor(c = 0; c < COLS; c++){\n\t\t\t\tslots[r][c] = undefined;\n\t\t\t\ttile = new Tile(r, c, SPRITE_SHEET, maskRect);\n\t\t\t\ttile.update();\n\t\t\t\tdiv.appendChild(tile.div);\n\t\t\t\ttiles.push(tile);\n\t\t\t}\n\t\t}\n\t\trandomiseTiles();\n\t}", "title": "" }, { "docid": "6384c7b4510e7d4fc6a3d8e1114234a8", "score": "0.6055053", "text": "function spawnMissile() {\n missile = createSprite(0, iornMan.y - 400, 10, 10);\n missile.addImage(\"missile\", missile_Image);\n missile.x = random(80, 320);\n missile.scale = 0.3;\n missile.lifetime = 45\n\n missileGroup.add(missile)\n}", "title": "" }, { "docid": "038295133b026b40f47090c44b9dcea3", "score": "0.60302323", "text": "function tilingWhite() {\n let x = 60;\n let y = 0; // before y = 60\n\n for (let i = 0; i < tileWhite.segmentsY; i++) {\n if (i % 2 === 0) {\n x = 60; // before x = 90;\n }\n else {\n x = 0; //before x = 150;\n }\n // Draws horizontal tiles\n for (let j = 0; j < tileWhite.segmentsX; j++) {\n push();\n noStroke();\n fill(tileWhite.fill.r, tileWhite.fill.g, tileWhite.fill.b);\n rect(x,y, tileWhite.size);\n x = x + tileWhite.spacingX;\n pop();\n }\n y = y + tileWhite.spacingY;\n }\n}", "title": "" }, { "docid": "f0ae8ba61ffdb7cc4877a62de031c1fa", "score": "0.6024791", "text": "function topple() {\n for (let x = 0; x < width; x++) {\n for (let y = 0; y < height; y++) {\n nextpiles[x][y] = sandpiles[x][y];\n }\n }\n\n // adjust the critical height if needed\n criticalHeight = 4;\n for (let x = 0; x < width; x++) {\n for (let y = 0; y < height; y++) {\n let num = sandpiles[x][y];\n if (num >= criticalHeight) {\n nextpiles[x][y] -= 4;\n if (x + 1 < width)\n nextpiles[x + 1][y]++;\n if (x - 1 >= 0)\n nextpiles[x - 1][y]++;\n if (y + 1 < height)\n nextpiles[x][y + 1]++;\n if (y - 1 >= 0)\n nextpiles[x][y - 1]++;\n }\n }\n }\n\n let tmp = sandpiles;\n sandpiles = nextpiles;\n nextpiles = tmp;\n}", "title": "" }, { "docid": "f328f50fb3a68dfbb173191d25942900", "score": "0.60218203", "text": "function moveLazer(){\n for(var x = 0; x < lazers.length ; x++){\n lazers[x].top -= 3;\n if(lazers[x].top <= 10){ //when the lazer's y-axis is 10, meaning it's at the background's top width, it shoud disappear \n lazers.splice(x,1);\n }\n }\n}", "title": "" }, { "docid": "fb4404a5a47add7ed3e8c863fabf43ae", "score": "0.6020999", "text": "function initTiles(){\n\t\tgetOffset(div);\n\t\tvar r, c;\n\t\tfor(r = 0; r < ROWS; r++){\n\t\t\ttiles[r] = [];\n\t\t\tfor(c = 0; c < COLS; c++){\n\t\t\t\ttiles[r][c] = new Tile(r, c, SPRITE_SHEET);\n\t\t\t\ttiles[r][c].update();\n\t\t\t\tdiv.appendChild(tiles[r][c].div);\n\t\t\t}\n\t\t}\n\t\t// make the top left corner empty\n\t\tdiv.removeChild(tiles[0][0].div);\n\t\ttiles[0][0] = undefined;\n\t\trandomiseTiles();\n\t}", "title": "" }, { "docid": "5e7932acd63de05736f8bd7ad24b209c", "score": "0.60052586", "text": "function genBadPipes() {\n var xPos = Math.floor(Math.random() * 5);\n var yPos = Math.floor(Math.random() * 4) + 3;\n map.putTile(312, layer5.getTileX(xPos * 64), layer5.getTileY(yPos * 64), 'Tile Layer 5');\n}", "title": "" }, { "docid": "7694dd8c098e3b3b462a79f016917bdf", "score": "0.59994054", "text": "function generateTiles() {\n formNode.style.display = \"none\";\n shuffleDinoObjectsArray();\n dinoObjects.slice(0,Math.ceil(dinoObjects.length / 2)).forEach(obj => addGridItems(obj));\n addGridItems(human);\n dinoObjects.slice(Math.ceil(dinoObjects.length / 2)).forEach(obj => addGridItems(obj));\n }", "title": "" }, { "docid": "8106be1eb604150b03abe3b6486ce052", "score": "0.5993533", "text": "function drawTreasurePositions(){\r\n var treasureValues = [0,0,1,1,2,2,3,3];\r\n for(var i = 0; i < treasureValues.length; i++){\r\n var x = Math.floor(Math.random() * 5);\r\n var y = Math.floor(Math.random() * 5);\r\n var tile = gameBoard[x][y];\r\n while(tile.state === \"sunk\" || tile.treasureType >= 0 || x == helipadX || y == helipadY){\r\n x = Math.floor(Math.random() * 5);\r\n y = Math.floor(Math.random() * 5);\r\n tile = gameBoard[x][y];\r\n }\r\n var sprite = new PIXI.Sprite(treasureTextures[treasureValues[i]]);\r\n sprite.scale.x = .25;\r\n sprite.scale.y = .25;\r\n sprite.anchor.x = .5;\r\n sprite.anchor.y = .5;\r\n tile.addChild(sprite);\r\n tile.treasureType = treasureValues[i];\r\n\r\n }\r\n\r\n}", "title": "" }, { "docid": "c936817c4cc6b172fda30f8e6702bb3c", "score": "0.5965339", "text": "function drawHills() {\n\n if (isMovingRight && bg_ground > -5500 && timePassedSinceHurt > HURT_TIME && timePassedSinceDead > DEAD_TIME) {\n bg_hills = bg_hills - (0.25 * GAME_SPEED);\n }\n if (isMovingLeft && bg_ground < 500 && timePassedSinceHurt > HURT_TIME && timePassedSinceDead > DEAD_TIME) {\n bg_hills = bg_hills + (0.25 * GAME_SPEED);\n }\n for (let index = -2; index < 10; index++) {\n addBackgroundobject('./img/background/ground3.png', index * 1920, bg_hills, -140, 0.5);\n }\n\n}", "title": "" }, { "docid": "0ce868bbede8f62b1787445af89fe08f", "score": "0.59573656", "text": "constructor() {\n //this.groundColor = color(130, 100, 90);\n //this.skyColor = color(230, 250, 250);\n\n // Tile size actual is the size of the tile images.\n // Tiles may be scaled up to tile size drawn at lower pixel density.\n this.tileSizeActual = 16;\n this.tilePadding = 2;\n this.tileSizeDrawn = 16;\n\n // Frequncies for the noise function. The higher the frequency, the smaller the patches formed.\n this.tileNoiseFrequency = 0.1;\n this.subFromNoise = 0.05;\n this.biomeNoiseFrequency = 0.01;\n\n // Tile names and their row,column indices in the tile set\n this.tileIndex = {\n none: null,\n default: {\n tileset: undefined,\n default: {\n clay: [0, 0],\n concrete: [0, 1]\n },\n building: {\n steel: [1, 0],\n creepyBrick: [1, 1],\n sandstone: [1, 2],\n }\n },\n jungle: {\n tileset: undefined,\n default: {\n grass: [0, 0],\n swamp: [0, 1],\n mud: [0, 2],\n clay: [0, 3],\n ash: [0, 4],\n },\n building: {\n stoneBrick: [1, 0],\n stoneBlock: [1, 1],\n goldBrick: [1, 2]\n }\n }\n };\n\n // Dirty flag to keep track of changes made to the buffer\n // Dirty will be set when a tile is created or destroyed, prompting pixel loads and updates.\n this.dirty = false;\n\n // List of objects in the world to check player for collision against\n this.colliders = [];\n }", "title": "" }, { "docid": "3fad1ac718937fb971248a4496f04bcc", "score": "0.5945972", "text": "function MoveMissile()\n{\n //workflow is as follows.for each missile, move it towards its target, check for collision.\n for(i=0;i<Model.children.length;i++)//for every missile\n {\n //move towards target\n current_position = Model.children[i].position;\n prev_position=current_position.clone();\n //calculate the direction vector and move along it.\n \n var j = UpdateTarget(); //returns one of the buildings\n if(current_position.y>Building_position[j].y)\n {\n if(current_position.distanceToSquared(Building_position[j]) < 250*250) //if on screen\n {\n //calculate direction vector to target\n destination = Building_position[j].clone();\n direction = destination.sub(current_position);\n direction.multiplyScalar(speed);\n direction.normalize();\n //console.log(direction);\n Model.children[i].position.x += direction.x;\n Model.children[i].position.y += direction.y;\n Model.children[i].position.z += direction.z;\n Model.children[i].rotation.y += delta;//clock.getDelta();\n //var linematerial = new THREE.LineBasicMaterial({ color: 0xFFFFFF });\n //var linegeometry = new THREE.Geometry();\n //linegeometry.vertices.push(prev_position);\n //linegeometry.vertices.push(current_position);\n //linegeometry.vertices.push(destination);\n //scene.add(new THREE.Line(linegeometry,linematerial));\n }\n else //off screen\n {\n Model.children[i].position.y -= 0.5*level*0.5; // just move down \n }\n }\n else //off screen\n {\n Model.children[i].position.y -= 0.5*level*0.5; // just move down \n }\n //check collision too\n current_position = Model.children[i].position;\n checkCollisionBuilding(current_position);\n }//end for every missile\n}//end move missile", "title": "" }, { "docid": "9261c442de666d25367cc522e6a1a0ef", "score": "0.59391344", "text": "function Newsand(){\n lastGroundTile = ground[ground.length-1];\n\n if(lastGroundTile.position.x < ((width / 2) + camera.position.x + 100)){\n var randomNumber = floor(random(0,0));\n // var randombubbles = floor(random(0,100));\n\n if(randomNumber < 10){\n var sandPiece = createSprite((lastsandTile.position.x+50),441,50,20);\n obsticalImg = loadImage(\"assets/obstical.png\");\n sandPiece.addImage(gobsticalImg);\n sand.add(sandPiece);\n }\n sandPiece.setCollider(\"rectangle\",0,0,50,20);\n sandPiece.update();\n obsticalTileLastUsed = true;\n }\n}", "title": "" }, { "docid": "36eefe0d56ebb6fcd63b905e6f6d15b6", "score": "0.5931007", "text": "function generateTiles() { \n\tposArr = [];\n\tvar tilArr = [];\n\tvar finArr = [];\n\tfor(var i = 0; i < 24; i++){\n\t\tvar temp = randInt(0, 23);\n\t\twhile(posArr.indexOf(temp) >= 0){\n\t\t\ttemp = randInt(0, 23);\n\t\t}\n\t\tposArr[i] = temp;\n\t}\n\tfor(var i = 0; i < 24; i++) {\n\t\tvar temp = new Tile(\"tile\", TextureFrame(posArr[i] + \".png\"), i);\n\t\ttilArr.push(temp);\n\t\ttiles.set(i, tilArr[i]);\n\t\tpuzzleC.addChild(tilArr[i]);\n\t}\n\t\n\temptyTile = new Tile(\"emptyTile\", TextureFrame(\"24.png\"), 24);\n\tposArr.push(24)\n\temptyTile.visible = false;\n\ttiles.set(24, emptyTile);\n\tpuzzleC.addChild(emptyTile);\n\t\n\tconsole.log(posArr);\n\tconsole.log(tilArr);\n}", "title": "" }, { "docid": "a1e105e672b51e764e20c99450090e19", "score": "0.5929728", "text": "generateGrounds() {\n\n GameElements.grounds.slice(0, GameElements.grounds.length);//Reinciia el array\n\n let xPos = 0;\n let yPos = 0;\n let position = 1;\n for (let i = 1; i <= 195; i++) {\n let element = new Element(xPos, yPos, Element.TYPE.GROUND);\n GameElements.grounds.push(element);\n GameElements.elementsPosition.set(position, element);\n position++;\n xPos += 50;\n if (xPos == 750) {\n xPos = 0;\n yPos += 50;\n }\n }\n\n }", "title": "" }, { "docid": "d57cb7f75ef73ca754e65ff7bc57cdd2", "score": "0.59176457", "text": "function renderBunkers()\n{\n //for each bunker\n liveBunkers = 0;\n manyBunkers.forEach(oneBunker =>\n {\n //if bunker is alive\n if (oneBunker.alive)\n {\n liveBunkers++;\n //draw the bunker\n ctx.drawImage(bunkerImage, oneBunker.x, oneBunker.y, bunkerXSize, bunkerYSize);\n if (oneBunker.x < -250)\n {\n missionComplete = false;\n }\n //help determine hitbox for bunker\n //insert painted hitboxes here if needed\n }\n else\n {\n //move bunker object away\n if (oneBunker.deadX > -300)\n {\n oneBunker.deadX += scrollSpeed;\n }\n if (oneBunker.deadX === undefined || oneBunker.deadX === null)\n {\n oneBunker.deadX = oneBunker.x;\n }\n oneBunker.x -= WIDTH * 2;\n //show destroyed bunker image\n ctx.drawImage(deadBunkerImage, oneBunker.deadX, oneBunker.y, bunkerXSize, bunkerYSize);\n }\n });\n if (liveBunkers === 5)\n {\n document.getElementById(\"bunker-bar\").setAttribute(\"src\", \"pictures/health/full-bunker-bar.png\");\n }\n else if (liveBunkers === 4)\n {\n document.getElementById(\"bunker-bar\").setAttribute(\"src\", \"pictures/health/four-bunker-bar.png\");\n }\n else if (liveBunkers === 3)\n {\n document.getElementById(\"bunker-bar\").setAttribute(\"src\", \"pictures/health/three-bunker-bar.png\");\n }\n else if (liveBunkers === 2)\n {\n document.getElementById(\"bunker-bar\").setAttribute(\"src\", \"pictures/health/two-bunker-bar.png\");\n }\n else if (liveBunkers === 1)\n {\n document.getElementById(\"bunker-bar\").setAttribute(\"src\", \"pictures/health/one-bunker-bar.png\");\n }\n else if (liveBunkers === 0)\n {\n document.getElementById(\"bunker-bar\").setAttribute(\"src\", \"pictures/health/no-bunker-bar.png\");\n }\n\n}", "title": "" }, { "docid": "316771cd9c31b0bf7b380cb3234b0c87", "score": "0.5913125", "text": "function moveMissile() {\r\n for (var i = 0; i < missileArray.length; i++) {\r\n if (missileArray[i].missileSphere.position.y == -80) {\r\n if (missileArray[i].missileSphere.position.x < -50 && missileArray[i].missileSphere.position.x > -80) {\r\n scene.remove(building);\r\n buildingArray.splice(i,1);\r\n if (missileArray.length==1) {\r\n gameOver();\r\n }\r\n }\r\n else if (missileArray[i].missileSphere.position.x > 85 && missileArray[i].missileSphere.position.x < 115) {\r\n scene.remove(building1);\r\n buildingArray.splice(i,1);\r\n if (missileArray.length==1) {\r\n gameOver();\r\n }\r\n }\r\n else if (missileArray[i].missileSphere.position.x < -125 && missileArray[i].missileSphere.position.x > -155) {\r\n scene.remove(building2);\r\n buildingArray.splice(i,1);\r\n if (missileArray.length==1) {\r\n gameOver();\r\n }\r\n }\r\n else if (missileArray[i].missileSphere.position.x < -85 && missileArray[i].missileSphere.position.x > -115) {\r\n scene.remove(building3);\r\n buildingArray.splice(i,1);\r\n if (missileArray.length==1) {\r\n gameOver();\r\n }\r\n }\r\n else if (missileArray[i].missileSphere.position.x > 125 && missileArray[i].missileSphere.position.x < 155) {\r\n scene.remove(building4);\r\n buildingArray.splice(i,1);\r\n if (missileArray.length==1) {\r\n gameOver();\r\n }\r\n }\r\n else if (missileArray[i].missileSphere.position.x > 50 && missileArray[i].missileSphere.position.x < 80) {\r\n scene.remove(building5);\r\n buildingArray.splice(i,1);\r\n if (missileArray.length==1) {\r\n gameOver();\r\n }\r\n }\r\n else if (missileArray[i].missileSphere.position.x > -20 && missileArray[i].missileSphere.position.x < 24) {\r\n scene.remove(launcher);\r\n gameOver();\r\n }\r\n scene.remove(missileArray[i].missileSphere);\r\n missileArray.splice(i, 1);\r\n\r\n }\r\n else {\r\n missileArray[i].missileSphere.position.y -= 0.5;\r\n }\r\n }\r\n\r\n}", "title": "" }, { "docid": "3eb5a695c6f7633d3e30dd3c4cf34af4", "score": "0.59074", "text": "function onStart() {\n // Create Tiles, use letters instead of numbers to not mix up tile and col\n const FIRST_CHAR_CODE = 97;\n for (var i = 0; i < 16; i++) {\n var newTileName = String.fromCharCode(FIRST_CHAR_CODE + i);\n var newTile = new Tile(newTileName);\n tiles[i] = newTile;\n\n if (i == indexOfBlankTile) {\n tiles[indexOfBlankTile].tileName = '';\n }\n }\n console.log(tiles);\n\n // Draw layout\n layout();\n}", "title": "" }, { "docid": "52dbaf558cd88086650903d086c8cf87", "score": "0.59035516", "text": "drawTutPopShrimp() {\n this.buffer.drawImage(this.squareImg,\n this.tileSize*4,\n this.tileSize*0.85,\n this.tileSize*2.4,\n this.tileSize*0.9);\n this.buffer.font = \"10px Mali\";\n this.buffer.textAlign = \"center\";\n this.buffer.fillStyle = \"white\";\n this.buffer.fillText(window.currentLanguage[\"tutshrimp1\"],\n this.worldWidth - this.tileSize*1.8,\n this.tileSize*1.35 - 15);\n this.buffer.fillText(window.currentLanguage[\"tutshrimp2\"],\n this.worldWidth - this.tileSize*1.8,\n this.tileSize*1.35);\n this.buffer.fillText(window.currentLanguage[\"tutshrimp3\"],\n this.worldWidth - this.tileSize*1.8,\n this.tileSize*1.35 + 15);\n this.buffer.drawImage(this.arrowDownImg,\n this.tileSize*3 + 10,\n this.tileSize + 15,\n this.tileSize, this.tileSize);\n }", "title": "" }, { "docid": "de238288896ef7a8a17817e24c4aabe2", "score": "0.58989424", "text": "function generateBrickTop() {\n let row = 12;\n for(let i = 1; i <= canvas.width; i++) {\n ctx.fillStyle = '#000';\n ctx.save();\n ctx.fillRect((6 + row)*i, 0, 2, 6);\n ctx.fillRect((0 + row)*i, 6, 2, 6);\n ctx.fillRect((6 + row)*i, 12, 2, 6);\n }\n }", "title": "" }, { "docid": "9a762b14c57b8dd50a3aba25b59f8fa5", "score": "0.58778685", "text": "function Missile(shooterID,id, xCenter, yCenter, size, type, direction,speed,color){\n this.shooterID = shooterID;\n this.id = id;\n this.xCenter = xCenter;\n this.yCenter = yCenter;\n this.size = size;\n this.type = type;\n this.direction = direction;\n this.speed = speed;\n this.distanceMoved = 0;\n this.color = color;\n //TODO; different missile types\n this.new = true;\n}", "title": "" }, { "docid": "bd741532e1072f9e49357601f489dc93", "score": "0.5876764", "text": "initHome() {\n const homePosition = this.findObjectsByType('Dropoff', this.level.map, 'DropoffLayer');\n homePosition.forEach(({ x, y }) => {\n var item = this.level.game.add.sprite(x, y);\n this.dropOff.add(item);\n });\n this.level.game.world.bringToTop(this.dropOff);\n }", "title": "" }, { "docid": "73732822dd18ee007fdd65eaee7715a3", "score": "0.5868671", "text": "build() {\r\n for (let y = this.y; y < height; y += height / 20) {\r\n for (let x = this.x; x < 400; x += 400 / 10) {\r\n let boxUsed = false;\r\n let col = 255;\r\n this.gameMap.push({\r\n x,\r\n y,\r\n boxUsed,\r\n col\r\n });\r\n // Visualize the grid\r\n rect(x, y, 40, 40);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "7974a6635d6daeef422c7e52b38bfca2", "score": "0.58626497", "text": "updateMissileXY(game) {\n let missile = {}, missileLength = this.shots.length - 1;\n\n for (let i = missileLength; i >= 0; i--) {\n missile = this.shots[i];\n\n if (game.shipMissileContact(this.id, missile)) {\n this.score -= 50; // You got shot\n }\n\n if (game.missileContact(this.id, missile)) {\n this.score += 5; // dead enemy\n }\n\n // tally up including vx + vy to account for ship speed.\n missile.position.x += (missile.velocity.x + this.velocity.x);\n missile.position.y += (missile.velocity.y + this.velocity.y);\n\n if (missile.position.x > this.width) {\n missile.position.x = -missile.width;\n }\n else if (missile.position.x < -missile.width) {\n missile.position.x = this.width;\n }\n\n if (missile.position.y > this.height) {\n missile.position.y = -missile.height;\n }\n else if (missile.position.y < -missile.height) {\n missile.position.y = this.height;\n }\n\n missile.lifeCtr++;\n\n if (missile.lifeCtr > missile.life) {\n this.shots.splice(i, 1);\n missile = null;\n }\n }\n }", "title": "" }, { "docid": "62d6e198e34aa8469f0fefcad3b51d5d", "score": "0.58607256", "text": "reset() {\n this.health = icon_width + 100;\n\n this.x_team_pos = 25;\n this.y_icon_pos = 25 + (icon_height*this.id) + (spacing*this.id);\n this.x_boss_pos = 1075;\n }", "title": "" }, { "docid": "5533cc1332b873e9739a6ac025dbc2c9", "score": "0.5857104", "text": "placeEnd(levelIndex) {\n let pos = this.breadthFirst();\n for (let j = pos.y + 5; j >= pos.y - 5; j--) {\n for (let i = pos.x + 5; i >= pos.x - 5; i--) {\n this.floor.remove({ x: i, y: j });\n }\n }\n if (levelIndex % 2 === 0) {\n this.tiles[pos.y][pos.x] = 'End';\n } else {\n this.tiles[pos.y][pos.x] = 'Start';\n }\n }", "title": "" }, { "docid": "60d7d4be44b10e738fb0cf2ffa179e74", "score": "0.5841639", "text": "function explodeSeussDisplay(){\n //console.log(\"displaySeuss\");\n for (var l=0;l<exPosS.length;l++){\n if (frameCount < (exPosS[l].start + 300)){\n push();\n imageMode(CENTER);\n translate(exPosS[l].xpos, exPosS[l].ypos);\n scale(5*exPosS[l].size/100);\n switch(exPosS[l].seussInd){\n case 0: \n image(seussIm1,0,0);\n break;\n case 1: \n image(seussIm2,0,0);\n break;\n case 2: \n image(seussIm3,0,0);\n break;\n case 3: \n image(seussIm4,0,0);\n break;\n case 4: \n image(seussIm5,0,0);\n break;\n }\n pop();\n exPosS[l].xpos += exPosS[l].vx;\n exPosS[l].ypos += exPosS[l].vy; // + 0.5*(frameCount-exPosS[l].start)*(frameCount-exPosS[l].start);\n }\n }\n}", "title": "" }, { "docid": "1364750f4cc517c10b40250759ce9209", "score": "0.58387154", "text": "constructor(topL,botR, x, y){\n this.taken = false;\n var lineWidth = 1;\n this.pos = createVector(topL.pixelPos.x-lineWidth, topL.pixelPos.y-lineWidth);\n this.w = botR.pixelPos.x - this.pos.x + lineWidth;\n this.h = botR.pixelPos.y - this.pos.y + lineWidth;\n this.bottomRight = createVector(this.pos.x + this.w, this.pos.y + this.h);\n this.edges = [];\n this.pixelPos = createVector(x*tileSize+xoff, y*tileSize+yoff);\n\n }", "title": "" }, { "docid": "a917106c5863cf352d780828cd1baa9e", "score": "0.58368576", "text": "cleanupTiles(levelIndex) {\n // Place walls around floor\n for (let j = 0; j < this.tiles.length; j++) {\n for (let i = 0; i < this.tiles[0].length; i++) {\n if (this.tiles[j][i] === 'F') {\n for (let k = -1; k <= 1; k++) {\n this.tryWall(k + i, j - 1);\n this.tryWall(k + i, j);\n this.tryWall(k + i, j + 1);\n }\n }\n }\n }\n // Place start and end points\n if (levelIndex % 2 === 0) {\n this.tiles[WORLD_HEIGHT - 2][WORLD_WIDTH - 2] = 'Start';\n } else {\n this.tiles[WORLD_HEIGHT - 2][WORLD_WIDTH - 2] = 'End';\n }\n for (let j = WORLD_HEIGHT - 2; j >= WORLD_HEIGHT - 2 - 5; j--) {\n for (let i = WORLD_WIDTH - 2; i >= WORLD_WIDTH - 2 - 5; i--) {\n this.floor.remove({ x: i, y: j });\n }\n }\n this.placeEnd(levelIndex);\n console.log('[World] Cleaned up tiles');\n }", "title": "" }, { "docid": "0b29155f92de793b421d9e42e50ccd64", "score": "0.58235484", "text": "drawTutPopGarbage() {\n this.buffer.drawImage(this.squareImg,\n this.tileSize*3,\n this.worldHeight - this.tileSize*1.55,\n this.tileSize*3.4,\n this.tileSize);\n this.buffer.font = \"10px Mali\";\n this.buffer.textAlign = \"center\";\n this.buffer.fillStyle = \"white\";\n this.buffer.fillText(window.currentLanguage[\"tutgarbage1\"],\n this.tileSize*4.7,\n this.worldHeight - this.tileSize - 15);\n this.buffer.fillText(window.currentLanguage[\"tutgarbage2\"],\n this.tileSize*4.7,\n this.worldHeight - this.tileSize);\n this.buffer.fillText(window.currentLanguage[\"tutgarbage3\"],\n this.tileSize*4.7,\n this.worldHeight - this.tileSize + 15);\n this.buffer.drawImage(this.arrowUpImg,\n this.tileSize*2+10,\n this.worldHeight - this.tileSize*2,\n this.tileSize, this.tileSize);\n }", "title": "" }, { "docid": "f4f20959b6ca49d90daa9044756b90ea", "score": "0.58203536", "text": "function setupFloor(floorNormal, floorLight) {\n for(var i = 0; i < tilesSet.width; i++){\n if (0 == i % 2){\n grid[tilesSet.height-1][i] = new tile(i*tilesSet.size,\n height-tilesSet.size,\n floorLight,\n tilesSet.size);\n }else if (Math.abs(i % 2) == 1) {\n grid[tilesSet.height-1][i] = new tile(i*tilesSet.size,\n height-tilesSet.size,\n floorNormal,\n tilesSet.size);\n }else {\n alert(\"something went wrong\");\n debugger;\n }\n }\n}", "title": "" }, { "docid": "22e842ef9db7dac802a33087896e07ad", "score": "0.58172125", "text": "function genBonusPipes() {\n\tvar xPos = Math.floor(Math.random() * 6);\n var yPos = Math.floor(Math.random() * 6) + 2;\n map.putTile(313, layer5.getTileX(xPos * 64), layer5.getTileY(yPos * 64), 'Tile Layer 5');\n}", "title": "" }, { "docid": "567d72cbf9335adb1493e961f95711c0", "score": "0.58162713", "text": "function drawTiles()\n{\n\tfor(var y = 0; y < BOARD_HEIGHT; y++)\n\t{\n\t\tfor(var x = 0; x < BOARD_WIDTH; x++)\n\t\t{\n let drawX = x * TILE_WIDTH;\n let drawY = y * TILE_HEIGHT;\n\n //Draw the tiles, but not the ones off the screen\n if(drawX + TILE_WIDTH > -camera.xOffset && drawX < -camera.xOffset + width)\n {\n if(drawY + TILE_HEIGHT > -camera.yOffset && drawY < -camera.yOffset + height)\n {\n tiles[x][y].draw(ctx, camera);\n }\n }\n\t\t}\n\t}\n}", "title": "" }, { "docid": "b9de978a4b473a89cfdd3f6419340f19", "score": "0.5811807", "text": "drawTutPopLose() {\n const sqWidth = this.tileSize * 4;\n const sqHeight = this.tileSize * 1.5;\n this.buffer.drawImage(this.squareImg,\n this.worldWidth/2 - sqWidth/2,\n this.worldHeight/2 - sqHeight/2 - 3,\n sqWidth,\n sqHeight);\n this.buffer.font = \"10px Mali\";\n this.buffer.textAlign = \"center\";\n this.buffer.fillStyle = \"white\";\n this.buffer.fillText(window.currentLanguage[\"tutlose1\"],\n this.worldWidth/2,\n this.worldHeight/2 - 30);\n this.buffer.fillText(window.currentLanguage[\"tutlose2\"],\n this.worldWidth/2,\n this.worldHeight/2 - 15);\n this.buffer.fillText(window.currentLanguage[\"tutlose3\"],\n this.worldWidth/2,\n this.worldHeight/2);\n this.buffer.fillText(window.currentLanguage[\"tutlose4\"],\n this.worldWidth/2,\n this.worldHeight/2 + 15);\n this.buffer.fillText(window.currentLanguage[\"tutlose5\"],\n this.worldWidth/2,\n this.worldHeight/2 + 30);\n }", "title": "" }, { "docid": "53253f8502dc3a526b010ef52ba131dd", "score": "0.58102024", "text": "function stepMissle() {\n\tfor(var i in GAME_OBJECTS[\"missles\"]) {\n\t\tvar missle = GAME_OBJECTS[\"missles\"][i];\n\t\tvar isPlayer = missle.hasClass('alt');\n\t\tvar position = missle.position();\n\t\tvar ypos = position.top / SCALE;\n\t\tvar xpos = position.left / SCALE;\n\t\tif((isPlayer && ypos <= 0) || (!isPlayer && ypos >= HEIGHT)) {\n\t\t\tmissle.remove();\n\t\t\tGAME_OBJECTS[\"missles\"].splice(i, 1);\n\t\t} else {\n\t\t\tif(hasHitEnemy(xpos, ypos)) {\n\t\t\t\tmissle.remove(); // take it off the screen\n\t\t\t\tGAME_OBJECTS[\"missles\"].splice(i, 1);\n\t\t\t\tif(SOUNDS_ON) {\n\t\t\t\t\tSOUNDS[\"kill\"].pause();\n\t\t\t\t\tSOUNDS[\"kill\"].currentTime=0;\n\t\t\t\t\tSOUNDS[\"kill\"].play();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "e60689d939889e5690fb166638062b3b", "score": "0.5808457", "text": "display() {\n push();\n noStroke();\n // The trail becomes its extended body\n push();\n for (let i = 0; i < this.trail.length; i++) {\n imageMode(CENTER);\n image(this.trailImage, this.trail[i].x, this.trail[i].y, this.radius * 2, this.radius * 2);\n }\n pop();\n // Centering image for precise collision\n imageMode(CENTER);\n image(this.image, this.x, this.y, this.radius * 2, this.radius * 2);\n pop();\n }", "title": "" }, { "docid": "e2d6b00d990ca637dff68e0fb36aac7e", "score": "0.5799094", "text": "function generateGrids() {\n for (let indexX = 0; indexX < constants.GRID_X_COUNT; indexX++) {\n xJump = gap;\n for (let indexY = 0; indexY < constants.GRID_Y_COUNT; indexY++) {\n // Create a PIXI container and set image properties to it. Shall review it later.\n mainContainer[indexX][indexY] = new PIXI.Container();\n mainContainer[indexX][indexY].interactive = true;\n mainContainer[indexX][indexY].height = boxWidth;\n mainContainer[indexX][indexY].width = boxWidth;\n mainContainer[indexX][indexY].interactive = true;\n mainContainer[indexX][indexY].x = xPos + xJump;\n mainContainer[indexX][indexY].y = yPos + yJump;\n mainContainer[indexX][indexY].indexX = indexX;\n mainContainer[indexX][indexY].indexY = indexY;\n\n // Background Image with choice of loser / winner.\n grids[indexX][indexY] = PIXI.Sprite.fromImage(uniqueImageGenerator(indexX, indexY));\n grids[indexX][indexY].cacheAsBitmapboolean = true;\n grids[indexX][indexY].interactive = true;\n grids[indexX][indexY].indexX = indexX;\n grids[indexX][indexY].indexY = indexY;\n grids[indexX][indexY].height = boxWidth;\n grids[indexX][indexY].width = boxWidth;\n grids[indexX][indexY].position.set(0, 0);\n\n // Scratching area.\n gridScratches[indexX][indexY] = PIXI.Sprite.fromImage(constants.scratchImg);\n gridScratches[indexX][indexY].cacheAsBitmapboolean = true;\n gridScratches[indexX][indexY].interactive = true;\n gridScratches[indexX][indexY].indexX = indexX;\n gridScratches[indexX][indexY].indexY = indexY;\n gridScratches[indexX][indexY].height = boxWidth;\n gridScratches[indexX][indexY].width = boxWidth;\n gridScratches[indexX][indexY].position.set(0, 0);\n\n mainContainer[indexX][indexY].addChild(gridScratches[indexX][indexY]);\n mainContainer[indexX][indexY].addChild(grids[indexX][indexY]);\n stage.addChild(mainContainer[indexX][indexY]);\n\n // Srpite overlay for the scratching area.\n drawingMask[indexX][indexY] = new InverseDrawingMask(mainContainer[indexX][indexY]);\n alphaSprite[indexX][indexY] = new PIXI.ParticleContainer();\n particleViews[indexX][indexY] = new PIXI.particles.Emitter(alphaSprite[indexX][indexY],\n constants.particleImg, configParticle);\n grids[indexX][indexY].mask = drawingMask[indexX][indexY].getMaskSprite();\n particleViews[indexX][indexY].emit = false;\n mainContainer[indexX][indexY].addChild(alphaSprite[indexX][indexY]);\n\n // Comment the below lines to see only the Pixi graphic eraser.\n // alpha[indexX][indexY] = new PIXI.Graphics();\n // grids[indexX][indexY].mask = alpha[indexX][indexY];\n\n // let texture = new PIXI.Texture.fromCanvas(renderer.view);\n // let alpha = new PIXI.Sprite(texture);\n // gridScratches[indexX][indexY].mask = alpha;\n // alphaSprite[indexX][indexY] = new PIXI.ParticleContainer();\n // particleViews[indexX][indexY] = new PIXI.particles.Emitter(alphaSprite[indexX][indexY],\n // constants.particleImg, configParticle);\n\n // mainContainer[indexX][indexY].addChild(alphaSprite[indexX][indexY]);\n\n\n // Add mouse and touch events to the grid boxes\n mainContainer[indexX][indexY].on('mouseover', mouseover);\n mainContainer[indexX][indexY].on('mouseout', mouseout);\n mainContainer[indexX][indexY].on('touchstart', mouseover);\n mainContainer[indexX][indexY].on('touchend', mouseout);\n\n xJump += boxWidth + gap;\n }\n\n yJump += boxWidth + gap;\n }\n\n return grids;\n}", "title": "" }, { "docid": "22b15c327fc37597297f262eb55dec81", "score": "0.5791455", "text": "function renderTiles() {\n var map_index = 0;\n\n // increment by actual TILE_SIZE to avoid multiplying on every iteration\n for (var top = 0; top < MAP.height; top += TILE_SIZE) {\n for (var left = 0; left < MAP.width; left += TILE_SIZE) {\n\n // if statement to draw the correct sprite to the correct idx position on the tile map\n if (MAP.tiles[map_index] === 0) {\n\n // draw background\n ctx.drawImage(background, left, top);\n\n } else if (MAP.tiles[map_index] === 2) {\n\n // draw platform\n ctx.drawImage(platform, left, top);\n\n new Obstacle(100, 100, left, top);\n\n } else if (MAP.tiles[map_index] === 3) {\n\n // draw ring\n ctx.drawImage(ring, left, top);\n //new Obstacle(100, 100, left, top);\n\n } else if (MAP.tiles[map_index] === 1) {\n\n // draw floor\n ctx.drawImage(floor, left, top);\n } else if (MAP.tiles[map_index] === 4) {\n\n ctx.drawImage(floor, left, top);\n new Obstacle(100, 100, left, top);\n }\n\n map_index++;\n }\n }\n}", "title": "" }, { "docid": "7ca5f6db12eb85c01087229651ef32db", "score": "0.5791368", "text": "function drawTileGrid(gameContainer, normalTexture, floodedTexture) {\r\n\tfor (var i = 0; i < 6; i++) {\r\n\t\tfor (var j = 0; j < 6; j++) {\r\n\t\t\tvar tile = new Tile(normalTexture, floodedTexture, i, j, 'tile_' + i + '_' + j);\r\n\t\t\t// Skip tile positions on first row that need to be blank\r\n\t\t\tif ((i == 0 && j == 0) || (i == 0 && j == 1) || (i == 0 && j == 4) || (i == 0 && j == 5)) {\r\n\t\t\t\ttile.alpha=0;\r\n tile.state = \"sunk\";\r\n tile.buttonMode = false;\r\n tile.interactive = false;\r\n\t\t\t}\r\n\t\t\t// Skip tile positions on second row that need to be blank\r\n\t\t\tif ((i == 1 && j == 0) || (i == 1 && j == 5)) {\r\n\t\t\t\ttile.alpha=0;\r\n tile.state = \"sunk\";\r\n tile.buttonMode = false;\r\n tile.interactive = false;\r\n\t\t\t}\r\n\t\t\t// Skip tile positions on fifth row that need to be blank\r\n\t\t\tif ((i == 4 && j == 0) || (i == 4 && j == 5)) {\r\n\t\t\t\ttile.alpha=0;\r\n tile.state = \"sunk\";\r\n tile.buttonMode = false;\r\n tile.interactive = false;\r\n\t\t\t}\r\n\t\t\t// Skip tile positions on sixth row that need to be blank\r\n\t\t\tif ((i == 5 && j == 0) || (i == 5 && j == 1) || (i == 5 && j == 4) || (i == 5 && j == 5)) {\r\n\t\t\t\ttile.alpha=0;\r\n tile.state = \"sunk\";\r\n tile.buttonMode = false;\r\n tile.interactive = false;\r\n\t\t\t}\r\n\r\n\t\t\t// Push tile object onto gameboard 2D Array\r\n\t\t\tgameBoard[i][j] = tile;\r\n\t\t\tgameContainer.addChild(tile);\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "7221e62e1be1ebaef7e73592892ce1a1", "score": "0.57839", "text": "function draw() {\n ctx.drawImage(bg, 0, 0);\nfor (var i=0;i< pos.length; i++){\n\tctx.drawImage(metTop,pos[i].x,pos[i].y);\n\tctx.drawImage(metBottom,pos[i].x,pos[i].y+metTop.height+x);\n\tctx.drawImage(metMid,pos[i].x,pos[i].y+ metTop.height+x+metBottom.height+x);\n\t\n\t\tpos[i].x--;\n\t\n\t\n\tif(score < 10){\n\t\tif(pos[i].x==1000){\n\t\t\n\t\t\tif(pos[i].y<100){\n\t\t\t\tpos.push({\n\t\t\t\t\tx:pos[i].x+50,\n\t\t\t\t\ty:pos[i].y+20\n\t\t\t\t});\n\t\t\t}\n\t\t\telse if(pos[i].y==100 || pos[i].y>200){\n\t\t\t\n\t\t\t\t\tpos.push({\n\t\t\t\t\t\tx:pos[i].x+250,\n\t\t\t\t\t\ty:pos[i].y-250\n\t\t\t\t\n\t\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\n\t}\n\telse if(score >10 && score <12){\n\t\t\tif(pos[i].x==400){\n\t\t\t\tpos.push({\n\t\t\t\t\tx:pos[i].x+500,\n\t\t\t\t\ty:Math.floor(Math.random() * metTop.height) - metTop.height\n\t\t\t\t\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\t\n\t}\n\telse if(score >=12 && score<30){\n\t\t if(pos[i].x==850 ){\n\t\t\t\tpos.push({\n\t\t\t\t\tx:pos[i].x+240,\n\t\t\t\t\ty:Math.floor(Math.random() * metTop.height) - metTop.height\n\t\t\t\t\n\t\t\t\t});\n\t\t}\n\t}\n\t\telse if(score >30 && score <35){\n\t\t if(pos[i].x==700 ){\n\t\t\t\tpos.push({\n\t\t\t\t\tx:pos[i].x+50,\n\t\t\t\t\ty:pos[i].y+20\n\t\t\t\t});\n\t\t}\n\t}\n\telse if(score >35){\n\t\t if(pos[i].x==500 ){\n\t\t\t\tpos.push({\n\t\t\t\t\tx:pos[i].x+340,\n\t\t\t\t\ty:Math.floor(Math.random() * metTop.height) - metTop.height\n\t\t\t\t});\n\t\t}\n\t}\n\t\n\t\n\t\t\n\t\n\t\n\t\n\t\n\tif (xPos+ship.width >= pos[i].x \n\t&& xPos<=pos[i].x+metTop.width\n\t&& (yPos <= pos[i].y+metTop.height-40 )){\n\t\t\n\t\tlocation.reload();\n\t}\n\t\n\telse if(xPos+ship.width >= pos[i].x \n\t&& xPos<=pos[i].x+metBottom.width \n\t&& (yPos + ship.height < pos[i].y+metTop.height+x+metBottom.height+20)&& (yPos > pos[i].y+metTop.height+x-20 )){ \n\t\t\n\t\tlocation.reload();\n\t}\n\t\n\telse if(xPos+ship.width >= pos[i].x \n\t&& xPos<=pos[i].x+metMid.width \n\t&& (yPos + ship.height > pos[i].y+metTop.height+430)&& (yPos < pos[i].y+metTop.height+480)){ \n\t\t\n\t\tlocation.reload();\n\t}\n\t\n\telse if( yPos+ ship.height >= cvs.height-fg.height-5){\n\t\t\n\t\t\tlocation.reload();\n\t}\n\tif (pos[i].x==250){\n\t\t\n\t\tscore++;\n\t}\n}\n ctx.drawImage(fg, 0, cvs.height - fg.height,cvs.width,150);\n ctx.drawImage(ship, xPos, yPos);\n\n \n\n ctx.fillStyle = \"#000\";\n ctx.font = \"24px Verdana\";\n ctx.fillText(\"Счет: \" + score, 10, cvs.height - 20);\nyPos+=gravity;\n requestAnimationFrame(draw);\n}", "title": "" }, { "docid": "c385f7d5e7c3ea819aa6ec7d0b1a6677", "score": "0.5782717", "text": "function GetTiles() {\n for (var i = 1; i <= 7; i++) {\n //looping 7 times\n if ($(\"#tilespawn\" + i).has(\"img\").length == 0) {\n TileTohand(\"#tilespawn\" + i);\n //adding tile\n }\n }\n}", "title": "" }, { "docid": "3dbccb5f20c31ecca857d09e5d20036c", "score": "0.5780676", "text": "rageAttack() {\n var partitions = 15;\n for(var i = 0; i < partitions; i++) {\n var pp = {sx: 96, sy: 160, size: 16};\n var p = new ScaleBoomerProjectiles(this.game, false, this.x+80, this.y+80, {x :Math.cos(this.blitz), y:Math.sin(this.blitz)}, \n this.projspeed, 5500, this.damage, 0.012, true, pp);\n this.blitz += 2*Math.PI/partitions;\n this.game.entities.splice(this.game.entities.length - 1, 0, p); \n }\n this.blitz += 50; //Keep changing starting angle\n }", "title": "" }, { "docid": "fb4f8e11c4196ea7b6dcd056a9c83214", "score": "0.57743144", "text": "function changeImageToChest() {\n\t chestArray=new Array();\n\n\t for(var i=0; i<storyImageMesh.length; i++) {\n\t\t storyImageMeshObj = storyImageMesh[i];\n\t\t if(storyImageMeshObj.position.z < (camera.position.z)){\n\t\t\t storyTextMesh[i].material.visible=true;\n\t\t\t storyTextMesh[i].material.needsUpdate = true;\n\t\t\t chestArray.push(storyImageMeshObj);\n\t\t\t storyImageMeshObj.material.map = storyImageTextureChest;\n\t\t\t storyImageMeshObj.material.needsUpdate = true;\n\t\t \n\t\t\t \n\t\t\t if(chestArray.length>3){\n\t\t\t\t storyImageMeshObj.material.map = storyImageTextureLeaf;\n\t\t\t\t storyImageMeshObj.material.needsUpdate = true;\n\t\t\t\t \n\t\t\t\t\tstoryTextMesh[i].material.visible=false;\n\t\t\t\t\tstoryTextMesh[i].material.needsUpdate = true;\n\t\t\t\t\t\n\t\t\t\t\t //storyImageMeshObj.position.y=storyImageMeshObj.position.y+(124/2);\n\t\t\t }\n\t\t }\n\t }\n}", "title": "" }, { "docid": "6a6cbc1a2a673daf32cfe126693cc51c", "score": "0.57737", "text": "drawTutPopShrimpEaten() {\n const sqWidth = this.tileSize * 4;\n const sqHeight = this.tileSize * 1;\n this.buffer.drawImage(this.squareImg,\n this.worldWidth/2 - sqWidth/2,\n this.worldHeight/2 - sqHeight/2 - 3,\n sqWidth,\n sqHeight);\n this.buffer.font = \"10px Mali\";\n this.buffer.textAlign = \"center\";\n this.buffer.fillStyle = \"white\";\n this.buffer.fillText(window.currentLanguage[\"tutshrimpeaten1\"],\n this.worldWidth/2,\n this.worldHeight/2 - 15);\n this.buffer.fillText(window.currentLanguage[\"tutshrimpeaten2\"],\n this.worldWidth/2,\n this.worldHeight/2);\n this.buffer.fillText(window.currentLanguage[\"tutshrimpeaten3\"],\n this.worldWidth/2,\n this.worldHeight/2 + 15);\n }", "title": "" }, { "docid": "756a43f89b0df7b2cadee69becc64bec", "score": "0.5764424", "text": "function draw() {\n for (let i=0; i<tiles.length; i++) {\n tiles[i].display();\n }\n}", "title": "" }, { "docid": "fd4d770341130f73ae73246d58b7ade8", "score": "0.576031", "text": "display() {\n push();\n this.image = enemyImage[this.hitCount]\n imageMode(CENTER)\n image(this.image, this.x, this.y, this.size * 2, this.size * 2);\n pop();\n }", "title": "" }, { "docid": "db57e8345716e1d6b2bc0654b2af17d0", "score": "0.57556933", "text": "function Pool(maxSize) {\n\tvar size = maxSize; // Max missiles allowed in the pool\n\tvar pool = [];\n\t/*\n\t * Populates the pool array with Bullet objects\n\t */\n\tthis.init = function() {\n\t\tfor (var i = 0; i < size; i++) {\n\t\t\t// Initalize the missile object\n\t\t\tvar missile = new Missile();\n\t\t\tmissile.init(0,0, missile.width, missile.height);\n\t\t\tpool[i] = missile;\n\t\t}\n\t};\n\t/*\n\t * Grabs the last item in the list and initializes it and\n\t * pushes it to the front of the array.\n\t */\n\tthis.get = function(x, y, speed) {\n\t\tif(!pool[size - 1].alive) {\n\t\t\tpool[size - 1].spawn(x, y, speed);\n\t\t\tpool.unshift(pool.pop());\n\t\t}\n\t};\n\t/*\n\t * Draws any in use Bullets. If a missile goes off the screen,\n\t * clears it and pushes it to the front of the array.\n\t */\n\tthis.animate = function() {\n\t\tfor (var i = 0; i < size; i++) {\n\t\t\t// Only draw until we find a missile that is not alive\n\t\t\tif (pool[i].alive) {\n\t\t\t\tif (pool[i].draw()) {\n\t\t\t\t\tpool[i].clear();\n\t\t\t\t\tpool.push((pool.splice(i,1))[0]);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t};\n}", "title": "" }, { "docid": "2ab7969fa5217c2d348abb89aa324a9d", "score": "0.57539093", "text": "function dibujaEscenario() {\r\n for (y = 0; y < 10; y++) {\r\n for (x = 0; x < 15; x++) {\r\n //7\r\n var tile = escenario[y][x];\r\n ctx.drawImage(pared, tile * 45, 80, 30, 30, anchoF * x, altoF * y, anchoF, altoF);\r\n }\r\n }\r\n}", "title": "" }, { "docid": "bb88b085e987d67f091ccd50ed87a25f", "score": "0.5748418", "text": "showPics () {\n const pics = this.shadowRoot.querySelector('#pics')\n let img\n this.tiles.forEach((tile, index) => {\n const a = document.createElement('a')\n a.setAttribute('href', '#')\n img = document.createElement('img')\n img.setAttribute('src', 'image/0.png')\n pics.appendChild(a)\n a.appendChild(img)\n\n img.addEventListener('click', event => {\n this.turnBrick(tile, index, event.target)\n })\n a.addEventListener('keydown', event => {\n if (event.keyCode === 13) {\n this.turnBrick(tile, index, event.target)\n }\n })\n if ((index + 1) % this.cols === 0) {\n pics.appendChild(document.createElement('br'))\n }\n })\n }", "title": "" }, { "docid": "7494a1b2fec30a7cc68504d293d2f42e", "score": "0.5745746", "text": "function displayBoard(board) {\n for (let i = 0; i < 4; i++) {\n const xVal = (i + 1) * 50;\n for (let j = 0; j < 4; j++) {\n const yVal = j * 50 + 50;\n if (board[4 * j + i] === \"blank\") {\n gameState.tiles.create(xVal, yVal, board[4 * j + i]).setScale(0.6);\n } else {\n gameState.tiles.create(xVal, yVal, board[4 * j + i]);\n }\n }\n }\n}", "title": "" }, { "docid": "b07309a2b3ed4b1ff82f4bc6a33431c7", "score": "0.5745312", "text": "function smashUs() {\n\t\t\t //if (c.length == 0) return;\n\t\t\t var xList = [], yList = [], minX=1e10, minY=1e10, temp, gapAtX = -1, gapAtY = -1, count = 0;\n\t\t\t that.loaded.forEach(function(obj) {\n\t\t\t temp = obj.getBBox(); temp.x = Math.round(temp.x); temp.y = Math.round(temp.y);\n\t\t\t if (xList.indexOf(temp.x) < 0) { xList.push(temp.x); minX = Math.min(minX, temp.x); }\n\t\t\t if (yList.indexOf(temp.y) < 0) { yList.push(Math.round(temp.y)); minY = Math.min(minY, temp.y); }\n\t\t\t });\n\t\t\t while (xList.length > 0 && count < 100) {\n\t\t\t temp = xList.indexOf(minX);\n\t\t\t if (temp > -1) xList.splice(temp,1); else gapAtX = minX; // remove item from list or stor gap\n\t\t\t minX = Math.round(minX + 60); count++; \n\t\t\t }// console.log((gapAtX > -1)?'has gap x':'no gap x');\n\t\t\t count = 0;\n\t\t\t while (yList.length > 0 && count < 100) {\n\t\t\t temp = yList.indexOf(minY);\n\t\t\t if (temp > -1) yList.splice(temp,1); else gapAtY = minY;\n\t\t\t minY = Math.round(minY + 60); count++;\n\t\t\t }// console.log((gapAtY > -1)?'has gap y':'no gap y');\n\t\t\t if (gapAtY > -1 || gapAtX > -1) {\n\t\t\t var set = that.R.set();\n\t\t\t that.loaded.forEach(function(obj) {\n\t\t\t temp = obj.getBBox();\n\t\t\t if (gapAtX>-1 && temp.x>gapAtX) set.push(obj);\n\t\t\t if (gapAtY>-1 && temp.y>gapAtY) set.push(obj);\n\t\t\t });\n\t\t\t if (gapAtX>-1) set.animate({transform:'T-60,0...'},500,'ease-in-out',centerUs);\n\t\t\t if (gapAtY>-1) set.animate({transform:'T0,-60...'},500,'ease-in-out',centerUs);\n\t\t\t set.clear();\n\t\t\t } else {\n\t\t\t centerUs();\n\t\t\t }\n\t\t\t}", "title": "" }, { "docid": "4f68df01001e1718fa3d8031a6089e20", "score": "0.5739052", "text": "function initiateBoard(){\n\tblankx=wid-1;\n\tblanky=height-1;\n\tfor(i=0;i<=numTiles;i++) position[i]=i;\n}", "title": "" }, { "docid": "50164b01368933199da75a6fac3f98d5", "score": "0.57268375", "text": "function Missiles(x, y, color) {\n this.x = x; // Coordonnée X du Missile\n this.y = y; // Coordonnée Y du Missile\n this.color = color // Couleur du missile\n this.rayon = 5; // Taille du Rayon du Missile\n \n\n // FONCTION DESSINER MISSILE\n this.drawMissile = function() {\n ctx.beginPath();\n ctx.fillStyle = this.color;\n ctx.arc(this.x, this.y, this.rayon, 0, Math.PI * 2);\n ctx.fill();\n };\n \n // FONCTION TRAJECTOIRE MISSILE\n this.trajectoireMissile = function() {\n this.y -= box * 2; // EFFET D'ANIMATION EN DECREMENTANT \"Y\" ( DONC TRAJECTOIRE MONTANTE )\n };\n\n // FONCTION TRAJECTOIRE MISSILE ALIEN\n this.trajectoireMissileAlien = function() {\n this.y = this.y + (box * 2); // EFFET D'ANIMATION EN INCREMENTANT \"Y\" ( DONC TRAJECTOIRE DESCENDANTE )\n };\n\n // FONCTION COLLISION MISSILE PLAYER ALIEN\n this.checkedCollisionAlien = function(target) { // DEFINITION ZONE INTERVALLE DE PERCUTION DES ALIENS\n // SI LES COORDONNEES \"X\" ET \"Y\" DE MON MISSILE SONT EGALES AUX COORDONNEES \"X\" ET \"Y\" DE MON ALIEN return TRUE sinon FALSE\n if ((this.y === target.y && this.x === target.x) || (this.x <= target.x + 30 && this.x >= target.x && this.y == target.y) || (this.y === (target.y + 30) && this.x === (target.x + 30))) {\n console.log(\"boom\"); \n return true;\n }else{\n return false;\n }\n }\n\n this.checkedCollisionPlayer = function(target) { // DEFINITION ZONE INTERVALLE DE PERCUTION DU PLAYER\n if ((this.x >= target.x && this.x <= target.x + target.width) && this.y === target.y){\n console.log(\"booooooommmmm\")\n return true;\n }else{\n return false;\n }\n }\n}", "title": "" }, { "docid": "fcec904d50181e0ab93618415f9d787d", "score": "0.57217985", "text": "function createTile(i) {\n\n\t\t //Create element and give it proper classes, attached tile element\n\t\t //var element = $(\".box-\"+i);\n\n\t\t //create list of scrambled nubmers (outside this loop)\n\t\t //assign the index of the scrambled number below, ie, scrambled[i]\n\n\n\t\t //var innerHtml = \"Box \"+i;\n\t\t var innerHtml = \"\";\n\t\t var element = $(\"<div></div>\").addClass(\"box box\"+i+\"\").html(innerHtml).attr('data-order', G.shuffledOrder[i]);;\n\t\t var varname = \"box\"+i+\"draggable\";\n\t\t G[varname] = Draggable.create(element, {\n\t\t\tonDrag : onDrag,\n\t\t\tonPress : onPress,\n\t\t\tonRelease : onRelease,\n\t\t\tzIndexBoost : true\n\t\t });\n\n\n\t\t\t//console.log(G[varname][0]._eventTarget);\n\t\t var tile = {\n\t\t\telement : element,\n\t\t\theight : 0,\n\t\t\tinBounds : false,\n\t\t\tindex : i,\n\t\t\torder : G.shuffledOrder[i],\n\t\t\t/*order : i,*/\n\t\t\tisDragging : false,\n\t\t\tlastIndex : null,\n\t\t\twidth : 0,\n\t\t\tx : 0,\n\t\t\ty : 0\n\t\t };\n\n\t\t //Add the tile for easy lookup\n\t\t element[0].tile = tile;\n\n\t\t //add the tiles to the container\n\t\t $(\"#slide-\"+G.currentSlide+\"\").append(element);\n\n\t\t layoutInvalidated();\n\n\t\t function onPress() {\n\n\t\t\t//console.log(\"pressing\");\n\n\t\t\tif (tile.positioned) {\n\t\t\t\t//console.log(\">>tile is positioned\");\n\t\t\t \t\t\telement[0].tile.fromX = element[0].tile.x;\n\t\t\t\t\t\telement[0].tile.fromY = element[0].tile.y;\n\t\t\t\t\t\telement[0].tile.toX = element[0].tile.x;\n\t\t\t\t\t\telement[0].tile.toY = element[0].tile.y;\n\t\t\t \t} else {\n\t\t\t \t\t//console.log(\">>INTERCEPTED! tile is NOT positioned, so assign its values to where it was headed...\");\n\t\t\t \t\t//here, assumt it's being positioned, so assign the FROM to the current X and Y vals\n\t\t\t \t\t//alert(\"not positioned\");\n\t\t\t \t\telement[0].tile.fromX = element[0].tile.toX;\n\t\t\t\t\telement[0].tile.fromY = element[0].tile.toY;\n\t\t\t\t\telement[0].tile.x = element[0].tile.toX;\n\t\t\t\t\telement[0].tile.y = element[0].tile.toY;\n\t\t\t \t}\n\n\t\t\ttile.isDragging = true;\n\n\t\t\t$(element).addClass(\"dragging\");\n\n\t\t\tTweenLite.to(element, 0.3, {\n\t\t\t scale : 0.92,\n\t\t\t ease\t\t: Elastic.easeOut\n\t\t\t});\n\n\n\t\t }\n\n\t\t function onDrag() {\n\n\t\t \t//TODO - make this into a function, NOTE: it's also in the OnClick event\n\t\t\tthis._eventTarget.tile.swapPartner = null;\n\t\t\ttile.positioned = false;\n\t\t\t//debugger;\n\n\t\t\tfor (var i = 0; i < G.tiles.length; i++) {\n\t\t\t if (this.hitTest(G.tiles[i], G.dragThreshhold)) {\n\n\t\t\t\ttile.swapPartner = i;\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//console.log(\"currently hitting \"+G.hitting);\n\n\t\t }\n\n\t\t function onRelease() {\n\n\t\t \t//debugger;\n\t\t \t//console.log(\"releasing\");\n\n\t\t \ttile.isDragging = false;\n\t\t\t//todo: check if the tile's dragging is not true!!!\n\n\t\t\t$(element).removeClass(\"dragging\");\n\n\t\t\tTweenLite.to(element, .2, {\n\t\t\t scale : 1,\n\t\t\t ease\t\t: Strong.easeOut\n\t\t\t});\n\n\t\t\t//if it's hitting something and that something is positioned = true\n\n\t\t\tif (G.swapHappening == true) {\n\t\t\t\t//alert(\"Swap happening!\");\n\t\t\t\t//alert(\"don't do it\");\n\t\t\t} else {\n\n\t\t\t}\n\n\t\t\t/*\n\t\t\tif (G.tiles[G.hitting] != null) {\n\t\t\t\t//console.log(\">>G.hitting is true, hitting index: \"+G.tiles[G.hitting].tile.index);\n\t\t\t\t//console.log(\">>target is positioned and is: \"+G.tiles[G.hitting].tile.positioned);\n\t\t\t\tif (G.tiles[G.hitting].tile.positioned) {\n\t\t\t\t\t//if it's released on a tile that's positioned, ie, stationary AND there's not a swap happening\n\t\t\t\t\tconsole.log(\">>changePosition: \"+tile.index+\" \"+G.hitting);\n\t\t\t\t\tchangePosition(tile.index, G.hitting);\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log(\"hitting something, but it's on motion - GO BACK TO START\");\n\t\t\t\t\treturnHome();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconsole.log(\">>not hitting anything - GO BACK TO START\");\n\t\t\t\treturnHome();\n\t\t\t}\n\t\t\t*/\n\n\t\t\tif (tile.swapPartner != null) {\n\t\t\t\t//alert(\"swap!\");\n\t\t\t\tif (G.tiles[tile.swapPartner].tile.positioned) {\n\t\t\t\t\t//if it's released on a tile that's positioned, ie, stationary\n\t\t\t\t\tchangePosition(tile.index, tile.swapPartner);\n\t\t\t\t} else {\n\t\t\t\t\t//console.log(\"hitting something, but it's on motion - GO BACK TO START\");\n\t\t\t\t\treturnHome();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturnHome();\n\t\t\t}\n\n\n\t\t\tfunction returnHome() {\n\t\t\t\t\t//alert('hi');\n\t\t\t\t\t//if there's a toY, go there. If not, go to the built-in X or Y\n\t\t\t\t\tvar myToX = element[0].tile.toX;\n\t\t\t\t\tvar myToY = element[0].tile.toY;\n\t\t\t\t\telement[0].tile.positioned = false;\n\t\t\t\t\tvar myTween = TweenLite.to(element, G.returnHomeTime, {\n\t\t\t\t\t\t scale : 1,\n\t\t\t\t\t\t x : Math.floor(myToX),\n\t\t\t\t\t\t y : Math.floor(myToY),\n\t\t\t\t\t\t ease\t\t: Elastic.easeOut,\n\t\t\t\t\t\tonComplete:function(){\n\t\t\t\t\t\telement[0].tile.positioned = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\n\t\t\t//alert(targetIsPositioned);\n\t\t\t//debugger;\n\t\t\tif (G.tiles[G.hitting]) {\n\t\t\t\t//var isPositioned = true;\n\t\t\t} else {\n\t\t\t\t//var isPositioned = false;\n\t\t\t}\n\t\t\t//alert(targetIsPositioned);\n\n\t\t }\n\n\t\t}", "title": "" }, { "docid": "bef5f471a12c6d5253fce12de380b157", "score": "0.57162887", "text": "function Projectiles() {\n\tthis._container = [];\n\tthis._containerNumUndefined = 0;\n}", "title": "" }, { "docid": "c0c3b058d2779471795385859e27a715", "score": "0.5715836", "text": "function moleiconmovement(){\r\n found = true;\r\n while (found) {\r\n found = false;\r\n for (var i = 0; i < moleclickicons.length; i++) {\r\n cur = moleclickicons[i]\r\n cur.t++\r\n if (cur.t > 30) {\r\n moleclickicons.splice(i,1)\r\n found = true;\r\n continue\r\n } else if (cur.t < 5) {\r\n cur.x += cur.spread;\r\n cur.y -= 10;\r\n } else {\r\n cur.x += cur.spread;\r\n cur.y += 20;\r\n }\r\n }\r\n }\r\n sizer = 10*(5-Math.ceil(level/2))\r\n drawarray(moleclickicons, moleimg, sizer, sizer);\r\n }", "title": "" }, { "docid": "992c90897ae14f4fb1496b0f1dc636a5", "score": "0.57124835", "text": "function player_1_borders(){\n var aa = \"\";\n var bb = \"\";\n var new_selected_tile = \"\";\n\n // THIS IS IN CASE THE CITY IS BUILT ALONG THE LEFT-MOST OF THE MAP (TILE X === 0)\n if (selected_tile_x === 0){\n for (var i = 0; i < 2; i++){\n aa = selected_tile_x + i;\n\n for (var j = -1; j < 2; j++){\n bb = selected_tile_y + j;\n new_selected_tile = \"tile_\" + aa + \"_\" + bb;\n\n document.getElementById(new_selected_tile).innerHTML = \"<img src='./images/player_1_border_all.png'>\";\n\n if (is_enabled_fog_of_war === 1 && p_color === 0){ fog_of_war_remove(aa,bb); fog_of_war_remove_mini_map(aa,bb); }\n }\n }\n\n aa = map_width - 1;\n\n for (var j = -1; j < 2; j++){\n bb = selected_tile_y + j;\n new_selected_tile = \"tile_\" + aa + \"_\" + bb;\n\n document.getElementById(new_selected_tile).innerHTML = \"<img src='./images/player_1_border_all.png'>\";\n\n if (is_enabled_fog_of_war === 1 && p_color === 0){ fog_of_war_remove(aa,bb); fog_of_war_remove_mini_map(aa,bb); }\n }\n }else{ // THIS IS FOR EVERY OTHER INSTANCE (WHERE THE CITY IS ANYWHERE BUT TILE X === 0)\n for (var i = -1; i < 2; i++){\n aa = selected_tile_x + i;\n\n for (var j = -1; j < 2; j++){\n bb = selected_tile_y + j;\n new_selected_tile = \"tile_\" + aa + \"_\" + bb;\n\n document.getElementById(new_selected_tile).innerHTML = \"<img src='./images/player_1_border_all.png'>\";\n\n if (is_enabled_fog_of_war === 1 && p_color === 0){ fog_of_war_remove(aa,bb); fog_of_war_remove_mini_map(aa,bb); }\n }\n }\n }\n\n // generate css borders in a one-square radius from the city\n // for (var i = -1; i < 2; i++){\n // aa = selected_tile_x + i;\n //\n // for (var j = -1; j < 2; j++){\n // bb = selected_tile_y + j;\n // new_selected_tile = \"tile_\" + aa + \"_\" + bb;\n //\n // document.getElementById(new_selected_tile).innerHTML = \"<img src='./images/player_1_border_all.png'>\";\n // }\n // }\n}", "title": "" }, { "docid": "2825dc371143d594efa0606ae8dd0662", "score": "0.5710734", "text": "function newDrawPile() {\r\n deck = discardPile;\r\n discardPile = Cards();\r\n discardPile.push(deck.pop());\r\n deck.shuffle();\r\n return;\r\n }", "title": "" }, { "docid": "42514d7c336c2d46caa5e5e7f5461a2e", "score": "0.5710041", "text": "buildObstacles() {\n //calculate space between objects between 175-275 pixels\n let space = Math.floor(Math.random() * 100 + 175);\n\n //calculate heights of objects\n let height1 = Math.floor(Math.random() * (this.gameheight - space));\n let height2 = this.gameheight - height1 - space;\n\n //set y positions of objects and add them to game object array\n let ypos1 = 0;\n let ypos2 = height1 + space;\n this.gameObjects.push(new Obstacle(this, height1, ypos1, 1));\n this.gameObjects.push(new Obstacle(this, height2, ypos2, 2));\n\n //5% chance of adding a reverse object to the game, which reverses the gravity\n let reverseChance = Math.round(Math.random() * 100);\n if (reverseChance >= 95) {\n let ypos3 = Math.round(this.gameheight - height2 - space / 2);\n this.gameObjects.push(new Reverse(this, ypos3));\n }\n }", "title": "" }, { "docid": "b63341bb004166c809c54a8c02c8b9ae", "score": "0.57054555", "text": "function setup() { // once at the beginning.\n createCanvas(800, 800);\n missileList = [];\n explosions = [];\n silos = [\n new Silo(50, height - 100),\n new Silo(width / 2, height - 100),\n new Silo(width - 50, height - 100),\n ];\n cities = [ \n new City(100, height - 70), \n new City(200, height - 70),\n new City(300, height - 70),\n new City(450, height - 70),\n new City(550, height - 70),\n new City(650, height - 70),\n \n ];\n\n enemyMissiles = [];\n launcher = new EnemyLauncher(33, 2, 2000);\n launcher.fireMissiles();\n}", "title": "" }, { "docid": "3c902e2624af4c037445fafa3ed69fa4", "score": "0.5697455", "text": "function addTiles(co,jk,jj,dp,dn,dq,dk,dj,dl,dh,dg,di){xc_eg(co,\"jn\",\"jn\",{\"width\":jk,\"height\":jj,\"jn\":[dp||\"\",dn||\"\",dq||\"\",dk||\"\",dj||\"\",dl||\"\",dh||\"\",dg||\"\",di||\"\"],\"ca\":0,\"bs\":0,\"id\":\"\"},0)}", "title": "" }, { "docid": "79e0e8c1d311d3e467f5bae035282212", "score": "0.5697163", "text": "function loadTeeth() {\n for (var i = 0; i < 8; i++) {\n teeth.top[i] = new Teeth(`./assets/images/teeth/top/${i + 1}.png`, 160 + (50 * i), -270);\n }\n\n for (i = 0; i < 8; i++) {\n teeth.bottom[i] = new Teeth(`./assets/images/teeth/bottom/${i + 1}.png`, 170 + (47 * i), 1000);\n }\n}", "title": "" }, { "docid": "d0da60147c7ffad1300a0ab92cc5fb48", "score": "0.56913054", "text": "generateBoard() {\n for (let i = 0; i < this.rows; i++) {\n let row = [];\n for (let i = 0; i < this.cols; i++) row.push(new Tile(0, false));\n this.tiles.push(row);\n }\n this.setMines();\n }", "title": "" }, { "docid": "4d1b2ae24cb9729da2b5c75af8b736ec", "score": "0.5684406", "text": "function placedPawnHighlit() {\n pawnImages.forEach((image) =>\n image.id == pawnPlacementCounter ? image.classList.add(\"pawn-used\") : \"\"\n );\n pawnPlacementCounter = pawnPlacementCounter + 1;\n pawnImages.forEach((image) =>\n image.id == pawnPlacementCounter ? image.classList.add(\"pawn-active\") : \"\"\n );\n}", "title": "" }, { "docid": "6933bb859300300b194e8b39b5c9839b", "score": "0.56836027", "text": "glitch() {\n gsap.killTweensOf(this.DOM.imgStack);\n\n gsap.timeline()\n .set(this.DOM.imgStack, {\n opacity: 0.2\n }, 0.04)\n .set(this.DOM.stackImages, {\n x: () => `+=${gsap.utils.random(-15,15)}%`,\n y: () => `+=${gsap.utils.random(-15,15)}%`,\n opacity: () => gsap.utils.random(1,10)/10\n }, 0.08)\n .set(this.DOM.imgStack, {\n opacity: 0.4\n }, '+=0.04')\n .set(this.DOM.stackImages, {\n y: () => `+=${gsap.utils.random(-8,8)}%`,\n rotation: () => gsap.utils.random(-2,2),\n opacity: () => gsap.utils.random(1,10)/10,\n scale: () => gsap.utils.random(75,95)/100\n }, '+=0.06')\n .set(this.DOM.imgStack, {\n opacity: 1\n }, '+=0.06')\n .set(this.DOM.stackImages, {\n x: (_, t) => t.dataset.tx,\n y: (_, t) => t.dataset.ty,\n rotation: (_, t) => t.dataset.r,\n opacity: 1,\n scale: 1\n }, '+=0.06')\n }", "title": "" }, { "docid": "090fc82d056275f8096441b12583977e", "score": "0.56835085", "text": "generateUnbreakableWalls() {\n\n //Reincia el array\n GameElements.unbreakableWalls.splice(0, GameElements.unbreakableWalls.length);\n //PAREDES EXTERNAS\n let xPos = 0;\n let yPos = 0;\n for (let i = 1; i <= 52; i++) {\n if (yPos == 0 || yPos == 600) {\n let position = GameElements.getPosition(xPos, yPos);\n let wall = new Element(xPos, yPos,\n Element.TYPE.UNBREAKABLE_WALL);\n GameElements.unbreakableWalls.push(wall);\n GameElements.elementsPosition.set(position, wall);\n }\n else {\n if (xPos == 0) {\n let position = GameElements.getPosition(xPos, yPos);\n let wall = new Element(xPos, yPos,\n Element.TYPE.UNBREAKABLE_WALL);\n GameElements.unbreakableWalls.push(wall);\n GameElements.elementsPosition.set(position, wall);\n xPos = 700;\n position = GameElements.getPosition(xPos, yPos);\n wall = new Element(xPos, yPos,\n Element.TYPE.UNBREAKABLE_WALL);\n GameElements.unbreakableWalls.push(wall);\n GameElements.elementsPosition.set(position, wall);\n i++;\n }\n }\n xPos += 50;\n if (xPos == 750) {\n xPos = 0;\n yPos += 50;\n }\n }\n\n //PAREDES INTERIORES \n xPos = 100;\n yPos = 100;\n for (let i = 53; i <= 82; i++) {\n\n let wall = new Element(xPos, yPos,\n Element.TYPE.UNBREAKABLE_WALL);\n GameElements.unbreakableWalls.push(wall);\n let positionNumber = GameElements.getPosition(xPos, yPos);\n GameElements.elementsPosition.set(positionNumber, wall);\n xPos += 100;\n if (xPos == 700) {\n xPos = 100;\n yPos += 100;\n }\n }\n\n }", "title": "" }, { "docid": "126f95ef57136040118c1348f8e001f5", "score": "0.56772274", "text": "mapTextures(iArray, param,underGrid) {\n\n if (param == \"terrain\") {\n //Fix For tiles Metal, Silver, Gold and Sterile tiles\n for (let j = 0; j < iArray.length; j++) {\n if (iArray[j] == 101 || iArray[j] == 246 || iArray[j] == 37 || iArray[j] == 199) {\n if (underGrid[j] != 0) {\n //Just shift the ID up one since we only care about tiles under dirt\n iArray[j] += 1;\n }\n }\n }\n\n for (let i = 0; i < iArray.length; i++) {\n //TINT THE TERRAIN TILE\n switch (iArray[i]) {\n case 2: //Concrete\n iArray[i] = 1;\n break;\n case 235: //Paved\n iArray[i] = 2;\n break;\n case 70: //Wood\n iArray[i] = 3;\n break;\n case 247: //metal //IF UNDER\n iArray[i] = 4;\n break;\n case 38: //silver //IF UNDER\n iArray[i] = 5;\n break;\n case 200: //gold //IF UNDER\n iArray[i] = 6;\n break;\n case 102: //sterile //If under\n iArray[i] = 7;\n break;\n case 174: //red\n iArray[i] = 8;\n break;\n case 232: //green\n iArray[i] = 9;\n break;\n case 202: //blue\n iArray[i] = 10;\n break;\n case 46: //cream\n iArray[i] = 11;\n break;\n case 231: //dark\n iArray[i] = 12;\n break;\n case 41: //burned wood\n iArray[i] = 13;\n break;\n case 171: //burned carpet\n iArray[i] = 14;\n break;\n case 88: //sandstone tile\n iArray[i] = 15;\n break;\n case 224: //granite tile\n iArray[i] = 16;\n break;\n case 160: //limestone tile\n iArray[i] = 17;\n break;\n case 219: //slate tile\n iArray[i] = 18;\n break;\n case 126: //Marble tile\n iArray[i] = 19;\n break;\n case 173: //slate flag\n iArray[i] = 20;\n break;\n case 169: //sandstone flag\n iArray[i] = 21;\n break;\n case 245: //granite flag\n iArray[i] = 22;\n break;\n case 59: //limestone flag\n iArray[i] = 23;\n break;\n case 1: //marble flagstone\n iArray[i] = 24;\n break;\n case 166: //sand\n iArray[i] = 25;\n break;\n case 161: //soil\n iArray[i] = 26;\n break;\n case 239: //marshy soil\n iArray[i] = 27;\n break;\n case 115: // rich soil\n iArray[i] = 28;\n break;\n case 48: //mud\n iArray[i] = 29;\n break;\n case 6: //marsh\n iArray[i] = 30;\n break;\n case 73: //gravel\n iArray[i] = 31;\n break;\n case 158: //lichen covered\n iArray[i] = 32;\n break;\n case 255: //ice\n iArray[i] = 33;\n break;\n case 205: //broken asphalt\n iArray[i] = 34;\n break;\n case 78: // packed dirt\n iArray[i] = 35;\n break;\n case 37: //underwall\n iArray[i] = 36;\n break;\n case 140: //deep water //DEEPOCEANWATER MISSING!!!!\n iArray[i] = 37;\n break;\n case 58: //moving deep water\n iArray[i] = 38;\n break;\n case 181: //shallow water\n iArray[i] = 39;\n break;\n case 137: //shallow ocean\n iArray[i] = 40;\n break;\n case 212: //shallow moving water\n iArray[i] = 40;\n break;\n case 56: //rough sandstone\n iArray[i] = 41;\n break;\n case 246: // rough hewn sandstone\n iArray[i] = 42;\n break;\n case 154: //smooth sandstone\n iArray[i] = 43;\n break;\n case 222: // rough granite\n iArray[i] = 44;\n break;\n case 116: // rough hewn granite\n iArray[i] = 45;\n break;\n case 199: //smooth granite\n iArray[i] = 46;\n break;\n case 99: //rough limestone\n iArray[i] = 47;\n break;\n case 82: // rought hewn limestone\n iArray[i] = 48;\n break;\n case 238: //smooth limestone\n iArray[i] = 49;\n break;\n case 148: //rough slate\n iArray[i] = 50;\n break;\n case 101: //rough hewn slate\n iArray[i] = 51;\n break;\n case 184: //smooth slate\n iArray[i] = 52;\n break;\n case 57: //rough marble\n iArray[i] = 53;\n break;\n case 135: //rough hewn marble\n iArray[i] = 54;\n break;\n case 208: //smooth marble\n iArray[i] = 55;\n break;\n case 21: //Moving river water?\n iArray[i] = 38;\n break;\n case 71: //Bridge\n iArray[i] = 3;\n break;\n case 153: //Softsand\n iArray[i] = 25;\n break;\n default:\n console.log(iArray[i]);\n }\n iArray[i] = iArray[i] -= 1; //fix for index offset\n }\n }\n return iArray;\n }", "title": "" }, { "docid": "646237b609c83da47206e5edbda2e779", "score": "0.5674107", "text": "function startLevel(map) {\n map.placePlayer(map.getWidth()-10, map.getHeight()-4);\n\n for (y = 4; y <= map.getHeight() - 2; y++) {\n map.placeObject(5, y, 'wall');\n map.placeObject(15, y, 'wall');\n map.placeObject(25, y, 'wall');\n map.placeObject(35, y, 'wall');\n map.placeObject(map.getWidth() - 5, y, 'wall');\n }\n\n for (x = 5; x <= map.getWidth() - 5; x++) {\n map.placeObject(x, 18, 'wall');\n map.placeObject(x, 13, 'wall');\n map.placeObject(x, 8, 'wall');\n map.placeObject(x, 3, 'wall');\n map.placeObject(x, map.getHeight() - 2, 'wall');\n }\n\n map.placeObject(9, 5, 'goal');\n}", "title": "" }, { "docid": "87d1dbf9707712e4970df57a15183c47", "score": "0.5672883", "text": "function make_map(stage){\r\n stage.addPlayer(new Player(stage,images.naked_player ,Math.floor(stage.width/2), Math.floor(stage.height/2),player_width,player_height));\r\n stage.addItem(new Gun(stage,images.machine_gun,40,40,100,100,'gun'));\r\n stage.addItem(new Gun(stage,images.pistol,80,80,2300,2200,'gun'));\r\n stage.addItem(new Ammo(stage,images.ammo,20,20,2200,2200,'ammo'));\r\n stage.addItem(new Item(stage,images.health_pack,20,20,2300,2300,'health'));\r\n\r\n var canvw = stage.width;\r\n var canvl = stage.height;\r\n for (var i = 0; i<30; i++){\r\n x = randint(canvw);\r\n y = randint(canvl);\r\n stage.addItem(new Gun(stage,images.pistol,80,80,x,y,'gun'));\r\n\r\n }\r\n for (var i = 0; i<trees.length; i++){\r\n stage.addHittable(new hittableObject(stage,'sprites/tree.png',100,100,trees[i][0],trees[i][1],true));\r\n }\r\n\r\n for (var i = 0; i<rocks.length; i++){\r\n stage.addHittable(new hittableObject(stage,'sprites/rock.png',70,70,rocks[i][0],rocks[i][1],false));\r\n }\r\n for (var i = 0; i<npcs.length; i++){\r\n stage.addEnemy(new NPC_Enemies(stage, images.gun_player ,npcs[i][0], npcs[i][1],player_width,player_height));\r\n }\r\n var game_house = new house(stage,images.house_outside,1000,1000,4000,0);\r\n stage.type.house = game_house;\r\n \r\n\r\n\r\n}", "title": "" }, { "docid": "e8aea3560c961e0e62c9c1dcd4ba64f2", "score": "0.5664894", "text": "destroyTile(i, j) {\n // This method will make the buffer dirty since it needs to load pixels\n if (!this.dirty) {\n this.dirty = true;\n this.buffer.loadPixels();\n }\n\n this.groundMap[this.lin_ij(i, j)] = false;\n\n // Manually set the alpha channel of pixels to transparent. This seems a bit overkill, but\n // replace blending a transparent image over the top doesn't seem to work.\n for (let y = i * this.tileSizeDrawn; y < (i + 1) * this.tileSizeDrawn; y++) {\n for (let x = j * this.tileSizeDrawn; x < (j + 1) * this.tileSizeDrawn; x++) {\n this.buffer.pixels[this.byteAddress_xyc(x, y, 'a')] = 0;\n }\n }\n\n // These methods should work, but there may be something wrong with p5's current implementation\n\n /*\n this.buffer.blendMode(REPLACE);\n this.buffer.image(this.tileNone,\n this.tileSizeDrawn * j,\n this.tileSizeDrawn * i);\n */\n\n /*\n this.buffer.blend(this.tileNone,\n 0,\n 0,\n this.tileSizeDrawn,\n this.tileSizeDrawn,\n this.tileSizeDrawn * j,\n this.tileSizeDrawn * i,\n this.tileSizeDrawn,\n this.tileSizeDrawn,\n REPLACE);\n */\n }", "title": "" }, { "docid": "c7ac6e7143c50594dcbb61d5c4e885ac", "score": "0.5664493", "text": "function spawnLeaf() {\n\n // to check if the remainder is 0 \n if (World.frameCount % 60 === 0) {\n \n leaf = createSprite(100, 100, 20, 20);\n\n //to move the leaf\n leaf.velocityY = 3;\n\n //to add image for leaf\n leaf.addImage(leafImg);\n\n //to resize the leaf\n leaf.scale = 0.05;\n\n //to display leaf in different positions\n leaf.x = Math.round(random(100, 390));\n }\n}", "title": "" }, { "docid": "885b6241d7c5e940ce395d7b1a42e224", "score": "0.5648076", "text": "createMine() {\n // Use 2d array mine to store the location of bombs.\n // Add additional margins to mine array for further convenience.\n // Initialize a (height + 2)* (width + 2) mine with no bomb, margin size 1.\n // Add margin because in this way it's easier to count bombsb in the following steps.\n\n for(let i = 0; i < this.height + 2; i++){\n this.mine[i] = [];\n for (let j = 0; j < this.width + 2; j++){\n this.mine[i][j] = 0;\n }\n }\n\n // Scatter bombs randomly to the 2d array. 1 stands for bomb, 0 - no bomb.\n for (let i = 0; i < this.total_bomb; i++) {\n let location = this.generateRandomLocation();\n let x = location[0];\n let y = location[1];\n\n this.mine[x][y] = 1;\n }\n\n return this.mine;\n }", "title": "" }, { "docid": "eb8e28fd25b1a2f9972f287148dadc42", "score": "0.5647504", "text": "function tile() {\n tiles = document.createElement(\"div\");\n tiles.classList.add(\"tiles\");\n tiles.style.cssText += `\n width: 6.6%;\n background-color: rgb(246, 250, 232);\n height: 0vh;\n `;\n return tiles;\n }", "title": "" }, { "docid": "1c82f385eb1c02b04c3bbd3ccdf3fd93", "score": "0.5645344", "text": "function Pocket () {\n let pocket = [];\n for (let z = 0; z < iterAmt*2+1; z++) {\n let layer = []\n for (let y = 0; y < iterAmt*2+startGrid.length; y++) {\n let row = []\n row = Array(iterAmt*2 + startGrid[0].length).fill(0).map(()=>{return{active:false,nearby:0}})\n layer.push(row)\n }\n pocket.push(layer)\n }\n return pocket\n}", "title": "" }, { "docid": "559862f2cbc4e1023646678e6bfd669b", "score": "0.5639098", "text": "function gapFiller() {\n var arr = [];\n tileObj.forEach( function(x) {\n arr.push(x.boardPos);\n });\n for (i=0; i < 7; i++) {\n if($.inArray(i, arr) == -1) {\n tileGenerator(i);\n }\n }\n $('.ui-draggable').draggable({\n revert: \"invalid\"\n });\n}", "title": "" }, { "docid": "835f91f5d5ecfa2f1bb04baf690ce33e", "score": "0.56390077", "text": "function setupGridSpots() {\r\n /*Direction spots*/\r\n right = [32, 24, 17];\r\n up = [39, 30];\r\n left = [7, 14];\r\n down = [0, 9];\r\n \r\n /*End spot*/\r\n end = [21];\r\n \r\n /*Card spots*/\r\n card = [2, 6, 22, 23, 28, 34, 38];\r\n \r\n /*Trap Spots*/\r\n trap = [1, 3, 8, 10, 13, 15, 26, 27, 36];\r\n \r\n /*Fill grid*/\r\n fillGrid(\"right\", right);\r\n fillGrid(\"up\", up);\r\n fillGrid(\"left\", left);\r\n fillGrid(\"down\", down);\r\n \r\n fillGrid(\"end\", end);\r\n \r\n fillGrid(\"card\", card);\r\n \r\n fillGrid(\"trap\", trap);\r\n}", "title": "" }, { "docid": "3313ea33bdbd1c04d2eac7271d0edd63", "score": "0.5632256", "text": "constructor() {\n\t\tthis.grid = []; // array of object with names of tiles\n\t}", "title": "" }, { "docid": "de7c09f61a033b4353457c99ab50cde7", "score": "0.5625805", "text": "function generate_bomb() \n{\n for (var i = 0; i < rows; i++) \n {\n for (var j = 0; j < cols; j++) \n {\n var ratio = bombCount / (rows * cols);\n if (rdm(0, 1) < ratio) \n {\n $cell[(i * cols) + j].classList.add('cell-bomb');\n $cell[(i * cols) + j].classList.add('x' + j);\n $cell[(i * cols) + j].classList.add('y' + i);\n bombs.posX[(i * cols) + j] = j;\n bombs.posY[(i * cols) + j] = i;\n }\n }\n }\n}", "title": "" }, { "docid": "c8775d433d05774f227f32d9270e48a2", "score": "0.5624263", "text": "moveGhost(OFFSET) {\r\n this.distance += OFFSET;\r\n //this.functionCheckGameEnd = this.checkGameEnd(this);\r\n createjs.Tween.get(this.scrollingBG.tilePosition).to({x: this.scrollingBG.tilePosition.x - OFFSET / 2}, TWEEN_SPEED);\r\n let i;\r\n for (i = 0; i < this.houseArray.length; i++) {\r\n this.houseArray[i].moveHouse(OFFSET);\r\n }\r\n }", "title": "" }, { "docid": "48ebc142a135cfd4d4e07163cf9f8d9a", "score": "0.5623799", "text": "function buildTiles() {\n for (var i = 0; i < queue.length; i++) {\n buildTile(queue[i]);\n }\n }", "title": "" } ]
108646d8c49fc73bfc74024ec8678660
FOR PC it will be COMX on mac it will be something like "/dev/cu.usbmodemXXXX" Look at P5 Serial to see the available ports
[ { "docid": "a5f3daba0a9633eb60b9ffb9a52f7586", "score": "0.0", "text": "function preload(){\n \n realLife1 = loadImage(\"images/rape.jpg\");\n realLife2 = loadImage(\"images/schoolShooting.jpg\");\n realLife3 = loadImage(\"images/christine-blasey-ford.jpg\");\n realLife4 = loadImage(\"images/prochoice.jpg\");\n \n ad1 = loadImage(\"images/2for1.jpg\");\n ad2 = loadImage(\"images/McDon.jpg\");\n ad3 = loadImage(\"images/MakeUp.jpg\");\n ad4 = loadImage(\"images/calvin-klein.jpg\");\n \n meme1 = loadImage(\"images/SuccessKid.png\");\n meme2 = loadImage(\"images/NCage.jpg\");\n meme3 = loadImage(\"images/grump.png\");\n meme4 = loadImage(\"images/Dog.jpg\");\n \n song1 = loadSound('sound/human-heartbeat-daniel_simon.mp3');\n song2 = loadSound('sound/party-crowd-daniel_simon.mp3');\n song3 = loadSound('sound/funny-voices-daniel_simon.mp3'); \n \n}", "title": "" } ]
[ { "docid": "287f31b6f4de49bd7ce885c2c4b617f2", "score": "0.7348899", "text": "function ListSerialPorts(){ \n serialport.list(function (err, ports) {\n console.log(\"\\n\");\n console.log(\"+++++++++++ port info +++++++++++\\n\");\n console.log(\"\\n\");\n ports.forEach(function(port) {\n console.log(\" \"+port.comName+\" , \"+port.pnpId+\" , \"+port.manufacturer+\"\\n\");\n console.log(\"\\n\");\n });\n console.log(\"+++++++++++ port done +++++++++++\\n\");\n console.log(\"\\n\");\n });\n}", "title": "" }, { "docid": "60ad3ceaf168012a36f0a83fded9f0b9", "score": "0.7173263", "text": "static async getSerialPath (platform) {\n let path\n\n if (platform === 'darwin') {\n path = '/dev/tty.MindWaveMobile-DevA'\n } else if (platform === 'win32') {\n // TODO: really need a better guess for windows port\n path = 'COM4'\n } else {\n path = '/dev/rfcomm0'\n }\n\n return path\n }", "title": "" }, { "docid": "1c0635b7d63d52f2faa6e3410591bd89", "score": "0.7102711", "text": "async function showSerialPorts () {\r\n const ports = await navigator.serial.getPorts()\r\n if (ports.length > 0) {\r\n for (const port of ports) {\r\n console.log('Port info:', port.getInfo())\r\n }\r\n } else {\r\n console.log('No port')\r\n }\r\n}", "title": "" }, { "docid": "bb0a628595296d320d46720cfc6284a8", "score": "0.69074386", "text": "function findSerialDevice() {\n SerialPort.list(function(err, ports) {\n if (puck == null) {\n ports.forEach(function(port) {\n // Only interested in the ImmersionRC Vendor and LapRF Puck Product\n if (port.vendorId === '04d8' & port.productId === '000a') {\n openPuck(port.comName)\n }\n });\n }\n });\n }", "title": "" }, { "docid": "a6dcef35b140156dcd995e73a5ed3bc7", "score": "0.6763058", "text": "function portConnect() {\n console.log(\"port connected\");\n serial.getPorts();\n}", "title": "" }, { "docid": "26a5fe96cd7f6f0e40da8b8b5c687648", "score": "0.6744538", "text": "function getMicrobitPort(callback) {\n chrome.serial.getDevices(function(portList) {\n for (var i = 0; i < portList.length; i++) {\n var port = portList[i];\n if ((port.displayName == 'mbed Serial Port') || ((port.displayName == 'MBED CMSIS_DAP') && (port.path.indexOf(\"tty\") >= 0))) { // for windows and os x\n return callback(port);\n }\n }\n callback(null);\n });\n }", "title": "" }, { "docid": "6439ce1892f909a893fae14c1cc2ed1f", "score": "0.67334497", "text": "function choosePort() {\n // look for new ports\n serial.requestPort();\n}", "title": "" }, { "docid": "fbde216a1d17c7752b9a934c67e20f1f", "score": "0.6666151", "text": "function open_serial_port() {\n port = new SerialPort('/dev/tty.usbserial-AJ02WUYE', {\n baudRate: 115200,\n parser: new Readline({\n delimiter: '\\r\\n'\n })\n\n });\n\n // Read the port data\n port.on(\"open\", function() {\n\n console.log('port is open');\n\n port.on('data', function(serial_data) {\n for (var i = 0; i < serial_data.length; i++) {\n plot.plot_data.append(new Date().getTime(), serial_data[i]);\n }\n\n });\n });\n}", "title": "" }, { "docid": "e59ea54e9c5cacf926104a70cbf857cb", "score": "0.65707797", "text": "function getPortName() {\n /** @namespace personalData.masterPowerRelayStringLocation */\n /** @namespace personalData.masterPowerRelayUniqueString */\n // const relayDevice = new UsbDevice(personalData.masterPowerRelayUniqueString, personalData.masterPowerRelayStringLocation);\n const relayDevice = new UsbDevice('FT230X_Basic_UART', 'ID_MODEL');\n return relayDevice.findDeviceName();\n}", "title": "" }, { "docid": "1bb4e0aa586f8fe1d8f66e72b50d78a8", "score": "0.64998", "text": "function list_ports() {\n return new Promise((resolve, reject) => {\n elitech.getSerialPorts().then(ports=>resolve(ports), error=>reject(error));\n });\n}", "title": "" }, { "docid": "2640f372c0616db93d72e85ec0acad11", "score": "0.648735", "text": "function get_serial_port() {\n return new Promise((resolve, reject) => {\n if(serial_port) {\n resolve(serial_port);\n } else {\n elitech.getElitechReader().then(port => {serial_port = port.comName; resolve(port.comName);}, error => reject(error));\n }\n });\n }", "title": "" }, { "docid": "0689fb6f44cf83a13ae99193453deca1", "score": "0.645213", "text": "function showPortOpen() {\n console.log('port open. Data rate: ' + myPort.options.baudRate);\n \n}", "title": "" }, { "docid": "24230b37fb8091932d9899b6e54b06c1", "score": "0.63733166", "text": "get externalPort() {}", "title": "" }, { "docid": "8f1191461079d8ce673ec7fd8af0cb26", "score": "0.6346827", "text": "async function connect() {\n \n // request a port and open a connection\n port = await navigator.serial.requestPort();\n \n // filter for axidraw\n// port = await navigator.serial.requestPort({ filters: [{ usbVendorId: 0x04d8, usbProductId: 0xfd92 }] });\n \n // wait for the port to open\n await port.open({ baudRate: 38400 });\n\n // setup the write stream\n const encoder = new TextEncoderStream();\n outputDone = encoder.readable.pipeTo(port.writable);\n outputStream = encoder.writable;\n\n // setup the read stream\n let decoder = new TextDecoderStream();\n inputDone = port.readable.pipeTo(decoder.writable);\n inputStream = decoder.readable;\n\n reader = inputStream.getReader();\n readLoop();\n\n}", "title": "" }, { "docid": "2155355ebe0e73eb0e406c6b73776a1d", "score": "0.6301713", "text": "function openPort() {\n serial.open({ // DMX-512 serial settings:\n 'baudRate': 250000,\n 'dataBits': 8,\n 'stopBits': 2,\n 'parity': 'none',\n })\n .then(() => { // once port opens, \n // set all values to 0:\n dmxReset();\n\n infoDiv.html(\"port connected\");\n // once you're connected, hide the connect button.\n portButton.hide();\n })\n}", "title": "" }, { "docid": "9f184b61370bde9c52d79299e77e3e4d", "score": "0.62605125", "text": "function showPortOpen() {\n console.log(\"serial port opened at \" + serialport);\n}", "title": "" }, { "docid": "792b0994ff1ea0f7fce9104f2cb32144", "score": "0.6241138", "text": "function listMidiPorts() {\n var numberOfPorts = midiOut.getPortCount();\n console.log('-------------------------');\n console.log('Available MIDI ports are:');\n\n for(var cPort = 0; cPort < numberOfPorts; cPort++) {\n console.log(cPort + ': ' + midiOut.getPortName(cPort));\n }\n console.log('-------------------------');\n}", "title": "" }, { "docid": "53db8aecf83d800ee5e5c2e310f79577", "score": "0.6223427", "text": "function showPortOpen() {\n console.log('Port open. Data rate: ' + myPort.baudRate);\n}", "title": "" }, { "docid": "1e68be1cfe5b31dff233feb822c56093", "score": "0.61977035", "text": "function setSerialListener () {\r\n navigator.serial.addEventListener('connect', e => {\r\n // Add |e.port| to the UI or automatically connect.\r\n console.log('New serial port: ', e.srcElement.getInfo())\r\n // statusString.textContent = e.srcElement.getInfo()['usbProductId']\r\n testPort.push(e.srcElement)\r\n console.log('Current ports: ' + testPort)\r\n })\r\n\r\n navigator.serial.addEventListener('disconnect', e => {\r\n // Remove |e.port| from the UI. If the device was open the\r\n // disconnection can also be observed as a stream error.\r\n console.log('Serial disconnected: ', e.srcElement.getInfo())\r\n testPort.splice(testPort.indexOf(e.srcElement), 1)\r\n console.log('Current ports: ' + testPort)\r\n })\r\n}", "title": "" }, { "docid": "445018d63ec0849adcdfc8dd9bbdc74a", "score": "0.6189707", "text": "function GetAllAvailableEthernetPortsName() {\n var names = window.external.GetAllAvailableEthernetPortsName();\n return names;\n}", "title": "" }, { "docid": "6655b718455122b5d667831eedc68aa4", "score": "0.61712503", "text": "function showPortOpen() {\n //logger(\"SerialPort\",'Serial Port opened: ' + sport + ' BaudRate: ' + myPort.options.baudRate);\n portStatus = 1;\n}", "title": "" }, { "docid": "8389ef1e6f37be06c034c6be68c30493", "score": "0.6158624", "text": "set externalPort(value) {}", "title": "" }, { "docid": "c6123ec7be9692ec2d882e9ea68ab1b4", "score": "0.61214066", "text": "async connectSerial (port, baudRate = 57600) {\n this.baudRate = baudRate\n\n if (baudRate !== 9600 && baudRate !== 57600) {\n return this.emit('error', 'Invalid baud. Set to 9600 or 57600')\n }\n\n if (!port) {\n port = await Mindwave.getSerialPath(process.platform)\n this.emit('warning', `Path not set, guessing ${port} based on OS.`)\n }\n\n this.port = port\n\n const SerialPort = (await import('@serialport/stream')).default\n SerialPort.Binding = (await import('@serialport/bindings')).default\n\n const Delimiter = (await import('@serialport/parser-delimiter')).default\n this.serialPort = new SerialPort(port, { baudRate })\n // Delimite packets on SYNC+SYNC and feed to parser\n // then trigger data message (for packet object) and individual messages\n this.serialPort\n .pipe(new Delimiter({ delimiter: Buffer.from([SYNC, SYNC]) }))\n .on('data', data => {\n const len = data[0]\n const payload = data.slice(1, len + 1)\n const chk = data[len + 1]\n if (chk === Mindwave.checksum(payload)) {\n try {\n const data = Mindwave.parse(payload)\n this.emit('data', data)\n Object.keys(data).forEach(k => {\n this.emit(k, data[k])\n })\n } catch (e) {\n this.emit('error', e.messsage)\n }\n }\n })\n }", "title": "" }, { "docid": "84ce3156960b5d10f89c9211beb10c99", "score": "0.60991704", "text": "function printList(portList) {\n // portList is an array of serial port names\n for (var i = 0; i < portList.length; i++) {\n // Display the list the console:\n print(i + \" \" + portList[i]);\n }\n}", "title": "" }, { "docid": "84ce3156960b5d10f89c9211beb10c99", "score": "0.60991704", "text": "function printList(portList) {\n // portList is an array of serial port names\n for (var i = 0; i < portList.length; i++) {\n // Display the list the console:\n print(i + \" \" + portList[i]);\n }\n}", "title": "" }, { "docid": "84ce3156960b5d10f89c9211beb10c99", "score": "0.60991704", "text": "function printList(portList) {\n // portList is an array of serial port names\n for (var i = 0; i < portList.length; i++) {\n // Display the list the console:\n print(i + \" \" + portList[i]);\n }\n}", "title": "" }, { "docid": "45955d3e1b45a11fc69f0b4893b57e7d", "score": "0.60951126", "text": "function connectSerial(){\n let port = new SerialPort(COM.serial_path.name, COM.serial_options, (err) => {\n\n if(err){\n console.log(moment(new Date()).format() + ', ' + 'COM path is undefined or currently using by other application...');\n console.log(moment(new Date()).format() + ', ' + 'Reconnecting...');\n\n // reconnect...\n reConnectSerial();\n } else {\n console.log(moment(new Date()).format() + ', ' + 'Device connected.');\n }\n });\n\n function RFID_check_VER(){\n return new Promise((resolve, reject) => {\n port.write('5645520D','hex', (err) => {\n if(err){reject(err)}\n resolve('VER');\n });\n });\n }\n\n function RFID_change_CN_to_1(){\n return new Promise((resolve, reject) => {\n port.write('434E20310D', 'hex', (err) => {\n if(err){reject(err)}\n resolve('CN 1');\n })\n })\n }\n\n function RFID_change_CID_to_1(){\n return new Promise((resolve, reject) => {\n port.write('43494420310D', 'hex', (err) => {\n if(err){reject(err)}\n resolve('CID 1')\n })\n })\n }\n\n function RFID_change_MD_to_0(){\n return new Promise((resolve, reject) => {\n port.write('4D4430200D','hex', (err) => {\n if(err){reject(err)}\n resolve('MD0');\n });\n });\n }\n\n function RFID_get_tag(){\n return new Promise((resolve, reject) => {\n port.write('47540D', 'hex', (err) => {\n if(err){reject(err)}\n resolve('GT');\n })\n })\n }\n\n function RFID_antenna_MP1(){\n return new Promise((resolve, reject) => {\n port.write('4D50310D', 'hex', (err) => {\n if(err){reject(err)}\n resolve('MP1');\n })\n })\n }\n\n function RFID_antenna_MP2(){\n return new Promise((resolve, reject) => {\n port.write('4D50320D', 'hex', (err) => {\n if(err){reject(err)}\n resolve('MP2');\n })\n })\n }\n\n function RFID_antenna_MP3(){\n return new Promise((resolve, reject) => {\n port.write('4D50330D', 'hex', (err) => {\n if(err){reject(err)}\n resolve('MP3');\n })\n })\n }\n\n function RFID_antenna_MP4(){\n return new Promise((resolve, reject) => {\n port.write('4D50340D', 'hex', (err) => {\n if(err){reject(err)}\n resolve('MP4');\n })\n })\n }\n\n function RFID_antenna_MP5(){\n return new Promise((resolve, reject) => {\n port.write('4D50350D', 'hex', (err) => {\n if(err){reject(err)}\n resolve('MP5');\n })\n })\n }\n\n function RFID_antenna_MP6(){\n return new Promise((resolve, reject) => {\n port.write('4D50360D', 'hex', (err) => {\n if(err){reject(err)}\n resolve('MP6');\n })\n })\n }\n\n function RFID_antenna_MP7(){\n return new Promise((resolve, reject) => {\n port.write('4D50370D', 'hex', (err) => {\n if(err){reject(err)}\n resolve('MP7');\n })\n })\n }\n\n function RFID_antenna_MP8(){\n return new Promise((resolve, reject) => {\n port.write('4D50380D', 'hex', (err) => {\n if(err){reject(err)}\n resolve('MP8');\n })\n })\n }\n\n \n\n /** Initialize write... */\n port.open((err) => {\n\n console.log('port is open...');\n\n /** \n * hex Command Table\n * \n * --config---\n * \n * VER - 5645520D\n * MD 0 - 4D4430200D - DON'T NEED IT\n * CN 1 - 434E20310D\n * CID 1- 43494420310D\n * GT - 47540D\n * \n * --changing antenna channels---\n * \n * MP1 - 4D50310D\n * MP2 - 4D50320D\n * MP3 - 4D50330D\n * MP4 - 4D50340D\n * MP5 - 4D50350D\n * MP6 - 4D50360D\n * MP7 - 4D50370D\n * MP8 - 4D50380D\n * \n */\n\n setTimeout(RFID_check_VER, 1500);\n setTimeout(RFID_change_CN_to_1, 2500);\n setTimeout(RFID_change_CID_to_1, 3500);\n setTimeout(RFID_change_MD_to_0, 4500);\n\n function Interval_Antenna_RFID_Reading(){\n setTimeout(RFID_antenna_MP1, 1000);\n setTimeout(RFID_antenna_MP2, 2000);\n setTimeout(RFID_antenna_MP3, 3000);\n setTimeout(RFID_antenna_MP4, 4000);\n setTimeout(RFID_antenna_MP5, 5000);\n setTimeout(RFID_antenna_MP6, 6000);\n setTimeout(RFID_antenna_MP7, 7000);\n setTimeout(RFID_antenna_MP8, 8000);\n }\n\n setInterval(Interval_Antenna_RFID_Reading, 9000);\n\n });\n\n let parser = port.pipe(new InterByteTimeout({ interval: 30 }));\n\n /** data listener */\n parser.on('data', (data) => {\n // console muna.. later tayo mag fs write to file. :p\n let response = data.toString('utf8');\n console.log(response)\n \n });\n\n /** com port when close listener */\n port.on('close', () => {\n // console muna later tayo mag create ng \"close\" logs\n console.log(moment(new Date()).format() + ', ' + 'Device disconnected. Trying to reconnect...');\n \n // call reConnectSerial\n reConnectSerial();\n });\n\n /** com port when error listener */\n parser.on('error', (err) => {\n // console muna, error logs later.\n console.log(err.message);\n console.log(moment(new Date()).format() + ', ' + 'Error occured. Trying to reconnect...');\n\n reConnectSerial();\n });\n\n }", "title": "" }, { "docid": "533600f5aaa3c7b14ee8861645b468da", "score": "0.60906816", "text": "function openPort() {\n console.log('port open');\n console.log('baud rate: ' + myPort.options.baudRate);\n}", "title": "" }, { "docid": "1f46932d499801bf72d6046df77434b0", "score": "0.60528183", "text": "function printList(portList) {\n // portList is an array of serial port names\n for (var i = 0; i < portList.length; i++) {\n // Display the list the console:\n print(i + \" \" + portList[i]);\n }\n}", "title": "" }, { "docid": "6c80215a84982e08fcf770b02a576626", "score": "0.6030106", "text": "async function findUSBDevice(event){\n console.log('AT FIND USB DEVICE')\n // STEP 1A: Auto-Select first port\n if (event.type == \"AutoConnect\" || \n event.type == \"Reconnect\"){\n// ports = await getPorts()\n //STEP 1A: GetPorts - Automatic at initialization\n // -Enumerate all attached devices\n // -Check for permission based on vendorID & productID\n devices = await navigator.usb.getDevices()\n ports = devices.map(device => new serial.Port(device)); //return port\n\n if (ports.length == 0) {\n port.statustext_connect = \"NO USB DEVICE automatically found on page load\"\n console.log(port.statustext_connect)\n }\n else {\n var statustext = \"\"\n if (event.type == \"AutoConnect\"){\n statustext = \"AUTO-CONNECTED USB DEVICE ON PAGE LOAD!\"\n }\n else if (event.type == \"Reconnect\"){\n statustext = \"RECONNECTED USB DEVICE!\"\n }\n port = ports[0];\n await port.connect()\n port.statustext_connect = statustext\n console.log(port.statustext_connect)\n }\n }\n\n // STEP 1B: User connects to Port\nif (event.type == \"touchend\" || event.type == \"mouseup\"){\n event.preventDefault(); //prevents additional downstream call of click listener\n try{\n //STEP 1B: RequestPorts - User based\n // -Get device list based on Arduino filter\n // -Look for user activation to select device\n const filters = [\n { 'vendorId': 0x2341, 'productId': 0x8036 },\n { 'vendorId': 0x2341, 'productId': 0x8037 },\n { 'vendorId': 0x2341, 'productId': 0x804d },\n { 'vendorId': 0x2341, 'productId': 0x804e },\n { 'vendorId': 0x2341, 'productId': 0x804f },\n { 'vendorId': 0x2341, 'productId': 0x8050 },\n ];\n\n device = await navigator.usb.requestDevice({ 'filters': filters })\n port = new serial.Port(device) //return port\n\n await port.connect()\n\n port.statustext_connect = \"USB DEVICE CONNECTED BY USER ACTION!\"\n }\n catch(error){\n console.log(error);\n }\n waitforClickUSB.next(1)\n }\n}", "title": "" }, { "docid": "260813a64dde35e38516cdb20175d6cb", "score": "0.602468", "text": "function printList(portList) {\n // portList is an array of serial port names\n for (var i = 0; i < portList.length; i++) {\n // Display the list the console:\n print(i + \" \" + portList[i]);\n }\n}", "title": "" }, { "docid": "d7ddcdacc5dfffeeb5d00d32030ef141", "score": "0.60052276", "text": "function openPort() {\n console.log('port open');\n console.log('baud rate: ' + self.myPort.options.baudRate);\n }", "title": "" }, { "docid": "f546cc28d86ceaa6426fc585aea60fb7", "score": "0.59640855", "text": "function printList(portList) {\n //portList is an array of serial port names\n for (var i = 0; i < portList.length; i++) {\n //Display the list in the console: \n console.log(i + \" \" + portList[i]);\n }\n}", "title": "" }, { "docid": "f546cc28d86ceaa6426fc585aea60fb7", "score": "0.59640855", "text": "function printList(portList) {\n //portList is an array of serial port names\n for (var i = 0; i < portList.length; i++) {\n //Display the list in the console: \n console.log(i + \" \" + portList[i]);\n }\n}", "title": "" }, { "docid": "ce4c4d6c67dbbdc932deb0fac27ae3f0", "score": "0.595469", "text": "function getPortList(callback) {\n\n serialPortFactory.list(function(listError, ports) {\n if (listError) {\n console.log(\"could not get port list error \" + listError);\n }\n else {\n webfirmata.newPortList(ports);\n }\n });\n}", "title": "" }, { "docid": "86693300dea3527948bdb951ee94e981", "score": "0.59519565", "text": "function connectToSerialPort(port) {\n serial = new p5.SerialPort(); // make a new instance of the serialport library\n serial.on('list', printList); // set a callback function for the serialport list event\n serial.on('connected', serverConnected); // callback for connecting to the server\n serial.on('open', portOpen); // callback for the port opening\n serial.on('data', serialEvent); // callback for when new data arrives\n serial.on('error', serialError); // callback for errors\n serial.on('close', portClose); // callback for the port closing\n\n serial.list(); // list the serial ports\n serial.open(port, options); // open a serial port\n serial.write(\"10\"); //send a \"hello\" value to start off the serial communication\n}", "title": "" }, { "docid": "11be06d8bfeb32198ffa89601c4fedc5", "score": "0.5944251", "text": "function printList(portList) {\n // loop through the array of serial port names\n for (var i = 0; i < portList.length; i++) {\n // and print the list to console\n print(i + \" \" + portList[i]);\n }\n}", "title": "" }, { "docid": "98c76ceae8c78ae21e0a1a6289964d03", "score": "0.59326845", "text": "function portOpen() {\n print('the serial port opened.')\n}", "title": "" }, { "docid": "8c7d53d4fadc1400d58f4cb6e3c3c5f2", "score": "0.5920389", "text": "function serialTerminal(sock, action, portName, baudrate, msg) {\n// Find port from portName\n let port = findPort(byName, portName);\n if (port) {\n // Convert msg from string or buffer to an ArrayBuffer\n if (typeof msg === 'string') {\n msg = str2ab(msg);\n } else {\n if (msg instanceof ArrayBuffer === false) {msg = buf2ab(msg);}\n }\n if (action === \"open\") {\n // Open port for terminal use\n openPort(sock, port.name, baudrate, 'debug')\n .then(function() {log('Connected terminal to ' + portName + ' at ' + baudrate + ' baud.');})\n .catch(function() {\n log('Unable to connect terminal to ' + portName);\n var msg_to_send = {type:'serial-terminal', msg:'Failed to connect.\\rPlease close this terminal and select a connected port.'};\n sock.send(JSON.stringify(msg_to_send));\n });\n } else if (action === \"close\") {\n /* Terminal closed. Keep wired port open because chrome.serial always toggles DTR upon closing (resetting the Propeller) which causes\n lots of unnecessary confusion (especially if an older version of the user's app is in the Propeller's EEPROM).\n Instead, update the connection mode so that serial debug data halts.*/\n port.mode = 'none';\n } else if (action === \"msg\") {\n // Message to send to the Propeller\n if ((port.isWired && port.connId) || (port.isWireless && port.ptSocket)) { //Send only if port is open\n send(port, msg, false);\n }\n }\n } else {\n var msg_to_send = {type:'serial-terminal', msg:'Port ' + portName + ' not found.\\rPlease close this terminal and select an existing port.'};\n sock.send(JSON.stringify(msg_to_send));\n }\n}", "title": "" }, { "docid": "62c6a0eccf1fff62ce6c2511a08745e0", "score": "0.5908251", "text": "get port() {}", "title": "" }, { "docid": "839bae51cfd2ef4b8f4ebb898f9840b6", "score": "0.588586", "text": "function gotOpen() {\n println(\"Serial Port is Open\");\n}", "title": "" }, { "docid": "361bb9e705a5ca9dad3d65b8a42bae9c", "score": "0.58760166", "text": "function printList(portList) {\n // portList is an array of serial port names\n for (var i = 0; i < portList.length; i++) {\n // Display the list the console:\n console.log(i + \" \" + portList[i]);\n }\n}", "title": "" }, { "docid": "b0b1724d4274aa535a5168971da413d4", "score": "0.58648306", "text": "function printList(portList) {\n // portList is an array of serial port names\n for (var i = 0; i < portList.length; i++) {\n // Display the list the console:\n console.log(i + \" \" + portList[i]);\n }\n}", "title": "" }, { "docid": "74cfd2b3daca049a84a847fc77fc80af", "score": "0.5850438", "text": "function goCoffee(){\n\tvar readPort = null;\n\tvar writePort = null;\n\tconst Machine = require('./src/machineRestInterface');\n\tvar status = '0';\n\tvar id = '';\n\tvar heartbeat2Num = 0;\n\n\ttools.getSerialNo();\n\n\tif(deviceList.length == 2){\n\t\tconst parsers = SerialPort.parsers;\n\t\tconst parser1 = new parsers.Readline({\n\t\t\tdelimiter: '\\r\\n'\n\t\t});\n\t\tconst port1 = new SerialPort('/dev/'+deviceList[0], {\n\t\t\tbaudRate: 38400,\n\t\t\tstopBits:2\n\t\t});\n\t\tport1.pipe(parser1);\n\t\tport1.on('open', () => console.log('Port1 open'));\n\n\t\tconst parser2 = new parsers.Readline({\n\t\t\tdelimiter: '\\r\\n'\n\t\t});\n\t\tconst port2 = new SerialPort('/dev/'+deviceList[1], {\n\t\t\tbaudRate: 38400,\n\t\t\tstopBits:2\n\t\t});\n\t\tport2.pipe(parser2);\n\t\tport2.on('open', () => console.log('Port2 open'));\n\n\n\t\tparser1.on('data', function(data){\n\t\t\tif(tools.filterCmd(data, config.filterCmdArrayBooting) != true){\n\t\t\t//if(tools.filterCmd(data, config.filterCmdArrayBooting) != true && tools.filterReadCmd(data, config.filterReadCmdArray) != true){\n\t\t\t\tif(config.heartbeat.startsWith(data) && readPort ==null){\n\t\t\t\t\tconsole.log('port1 is read');\n\t\t\t\t\treadPort = port1;\t\n\t\t\t\t\twritePort = port2;\t\n\t\t\t\t}\n\t\t\t\ttestMachineIsError(data);\n\t\t\t\ttestMachineIsOk(data);\n\t\t\t\tdata = data + '\\r\\n';\n\t\t\t\tport1.write(data);\n\t\t\t\tport1.flush();\n\t\t\t}\n\t\t});\n\n\n\t\tparser2.on('data', function(data){\n\t\t\tif(tools.filterCmd(data, config.filterCmdArrayBooting) != true){\n\t\t\t//if(tools.filterCmd(data, config.filterCmdArrayBooting) != true && tools.filterReadCmd(data, config.filterReadCmdArray) != true){\n\t\t\t\tif(config.heartbeat.startsWith(data) && readPort ==null){\n\t\t\t\t\tconsole.log('port1 is read');\n\t\t\t\t\treadPort = port1;\t\n\t\t\t\t\twritePort = port2;\t\n\t\t\t\t}\n\t\t\t\ttestMachineIsError(data);\n\t\t\t\ttestMachineIsOk(data);\n\t\t\t\tdata = data + '\\r\\n';\n\t\t\t\tport2.write(data);\n\t\t\t\tport2.flush();\n\t\t\t}\n\t\t});\n\n\t}else{\n\t\tconsole.log('begin to reboot 10sec');\n\t\tsleep.sleep(10);\n\t\ttools.reboot();\n\t}\n\n\n}", "title": "" }, { "docid": "77d1195e162f5eb226f54c98b1f43b90", "score": "0.5845231", "text": "function gotOpen() {\n println(\"Serial Port is open!\");\n}", "title": "" }, { "docid": "9e4dc5bbfa3c70df6046d58fda7bd747", "score": "0.58427113", "text": "function list(done) {\n return serialport.list(done);\n}", "title": "" }, { "docid": "b70f010ffae767e9390399f4abd42903", "score": "0.58316714", "text": "async connect() {\n //-- Solicitar puerto serie al usuario\n //-- Se queda esperando hasta que el usuario ha seleccionado uno\n sp.port = await navigator.serial.requestPort();\n\n // - Abrir el puerto serie. Se espera hasta que este abierto\n await sp.port.open({ baudrate: 115200 });\n\n //-- Configurar el stream de salida\n //-- Es outputStream. Antes se pasa por un codificador de texto\n //-- y de ahí sale por el puerto serie\n const encoder = new TextEncoderStream();\n sp.outputDone = encoder.readable.pipeTo(sp.port.writable);\n sp.outputStream = encoder.writable;\n\n //-- Configurar el stream de entrada. Se pasa primero por un\n //-- decodificador de texto y luego se reciben los caracteres\n let decoder = new TextDecoderStream();\n sp.inputDone = sp.port.readable.pipeTo(decoder.writable);\n\n //-- La informacion se lee desde el lector reader\n this.reader = decoder.readable.getReader();\n\n //-- Bucle principal de lectura\n //-- Se procesan los caracteres recibidos\n //-- y se escriben en el estado del boton en la gui\n this.readLoop();\n\n }", "title": "" }, { "docid": "25d557e12ae710ba3099b6c60be30346", "score": "0.5830161", "text": "function gotOpen() {\n println(\"Serial Port is Open\");\n}", "title": "" }, { "docid": "6ee4330f6a0d61c463508e152ff9a7fe", "score": "0.58248925", "text": "start() {\n // Enable the listeners!\n this.listeners.settings.enable();\n this.listeners.mcuStatus.enable();\n this.listeners.sayHello.enable();\n this.listeners.depthStatus.enable();\n var self = this;\n var ticks = 0;\n\n SerialPort.list(function(err, ports) {\n ports.forEach(function(port) {\n console.log(port.comName);\n });\n });\n\n var uartPath = \"/dev/ttyACM0\" // from SerialBridge.js\n var uartBaud = 115200;\n\n const serialPort = new SerialPort(uartPath, {\n baudRate: uartBaud,\n // parser: SerialPort.parsers.ReadLine('\\r\\n'), // dosen't work on serialPort 5.x\n autoOpen: false\n });\n\n serialPort.open(function(err) {\n if (err) {\n return console.log('Error opening port: ', err.message);\n }\n });\n\n serialPort.flush(function(err) {\n // setTimeout(function () {\n // sp.close(function (err) {\n // });\n // }, 10);\n console.log('Serial port flushed');\n });\n\n\n var Readline;\n var parser;\n\n if (SerialPort.parsers.Readline) {\n Readline= SerialPort.parsers.Readline; \n parser=serialPort.pipe(Readline({delimiter: '\\r\\n'}));\n console.log('Readline');\n }\n if (SerialPort.parsers.ReadLine) { // This one for serialPort 5.x\n Readline = SerialPort.parsers.ReadLine;\n parser = serialPort.pipe(Readline({\n delimiter: '\\r\\n'\n }));\n console.log('ReadLine');\n }\n if (SerialPort.parsers.readline) {\n Readline= SerialPort.parsers.readline; \n parser=serialPort.pipe(Readline({delimiter: '\\r\\n'}));\n console.log('readline');\n }\n\n\n serialPort.on('open', function() {\n // logger.debug('Serial port opened');\n console.log('Serial port opened');\n serialPort.write('b'); // signal microcontroller to start \"b\" for begin\n console.log('wrote b');\n });\n\n parser.on('data', function(jsondata) {\n console.log('Got data');\n var data\n try{\n data = JSON.parse(jsondata);\n \n if (data.Group){\n var filename = \"sd_\" + Date.now() + \".json\"\n var sampleSet = {}\n sampleSet.group = data;\n sampleSet.depth = self.depth;\n sampleSet.temp = self.temp;\n fs.appendFile(path.join(\"/usr/share/cockpit/analogsensor\",filename),JSON.stringify(sampleSet));\n }\n \n console.dir(data);\n console.log(\"Group=\",data.Group)\n if (data.Group == 50){\n serialPort.write('b'); // signal microcontroller to start \"b\" for begin\n console.log('wrote b'); \n }\n }catch(e){\n //ignore data, not valid json\n \n console.warn(\"Bad json found from serial port\", jsondata);\n }\n //console.log(data.ToString())\n \n/* //parseStatus turns data in to an object of name,value pairs {name:\"value\",name2,\"value2\"}\n var status = reader.parseStatus(data);\n console.log(status);\n //var status = {name:\"value\",name2,\"value2\"};\n self.globalBus.emit('mcu.status',status);\n*/\n// console.log(data); // seems to overflow things, get beeps from ROV and no logging\n });\n\n serialPort.on('error', function(err) {\n // logger.debug('Serial error',err)\n console.log('Serial error', err);\n })\n\n serialPort.on('close', function(data) {\n // logger.debug('Serial port closed');\n console.log('Serial port closed');\n });\n\n\n /* bridge.emit('status', status);\n if (emitRawSerial) {\n bridge.emit('serial-recieved', data + '\\n');\n }\n\n });\n */\n\n var self = this;\n setInterval(function() {\n\n self.globalBus.emit('mcu.status', {\n jimt: ticks++\n })\n }, 1000);\n\n }", "title": "" }, { "docid": "d8dc261be868455eaadfa44eb6ef568e", "score": "0.5818824", "text": "function gotOpen() {\n print(\"Serial Port is open!\");\n}", "title": "" }, { "docid": "d8dc261be868455eaadfa44eb6ef568e", "score": "0.5818824", "text": "function gotOpen() {\n print(\"Serial Port is open!\");\n}", "title": "" }, { "docid": "cd34bdf3953ee08066c1692c98d18d57", "score": "0.5798282", "text": "function SearchDeviceBasedOnAvailableEthPorts(devName) {\n var portId = window.external.ReadSavedEthernetPortId(devName);//read portid from XML\n if (portId == 'None' || portId === \"\" || portId.length === 0) {\n //If no preserved settings found or if previously preserved settings is cleared\n //based on the number of ports available either the multiple port list popup is shown\n //or to start monitoring in the available single ethernet port\n var lstAvailEthPorts = window.external.GetAllAvailableEthernetPortsName(); //Get all Erthernet port details, availble in PC\n var objJsonAvailEthPorts = eval(\"(\" + lstAvailEthPorts + \")\");\n if (null != objJsonAvailEthPorts) {//null check\n var portsCount = objJsonAvailEthPorts.length;\n if (portsCount > 1) { // If more than one port is availble in PC, show port selection pop-up.\n ShowAdapterPopup('CovRDMAvailableEthernetPorts.html');\n }\n else {//else, monitor the single port\n var portId = \"\";\n if (portsCount == 0) {\n //SCR#915- to show message if PC doesn't have any active Ethernet adapter.\n var msg = \"No active Ethernet ports found. Please connect the device to an active Ethernet port and retry.\";\n ShowStatusMessage(msg, true, \"Error\");\n var btnOkcntrl = GetControl(\"BtnOk\");\n if (null != btnOkcntrl) {\n //Enable ok button to continue after connecting active adaptor.\n btnOkcntrl.disabled = false;\n }\n }\n else\n {\n portId = objJsonAvailEthPorts[0].PortID;\n if ((null != portId) && (null != devName)) {\n startEthernetMonitor(portId, devName);\n }\n }\n }\n }\n }\n else if (portId != 'None') {\n //If preserved port is available, the particular port is checked for availability and\n //proceeded with monitoring of that port\n ValidatePortID(devName); //OBS#954\n }\n}", "title": "" }, { "docid": "ef9cc4464c134f2c20f30fc45d8f7964", "score": "0.57920015", "text": "open () {\n if (this.port && this.port.isOpen) {\n return Promise.resolve()\n }\n return this.findPort().then(port => {\n this.port = new SerialPort(port.comName, {\n baudRate: 115200,\n autoOpen: false\n })\n return super.open()\n })\n }", "title": "" }, { "docid": "ce131bd69b6e8caa917b8c5eff79326c", "score": "0.5790527", "text": "function getDeviceName() {\n return new Promise( (resolve,reject) => {\n SerialPort.list((err,ports) => {\n if( err ) reject (err);\n let sr700ports = ports.filter((p)=>{return p.serialNumber==sr700SerialNumber});\n if( sr700ports.length == 0 ) {reject (\"Could not detect connected SR700\");}\n resolve(sr700ports[0].comName);\n });\n });\n}", "title": "" }, { "docid": "14569298858de8580de24a5fa80b6411", "score": "0.5772317", "text": "function IsPreservedPortSettingAvailable(devType) //OBS#954\n{\n return window.external.IsPreservedPortSettingAvailable(devType)\n}", "title": "" }, { "docid": "a8e0709ed9df73954aa7455c7a6d75fa", "score": "0.57434034", "text": "function connectOnStart() {\n\n var portCOM;\n\n if (startArgument === undefined) {\n\n log('Try finding Baord...');\n\n serialport.list((err, ports) => {\n\n ports.forEach((port) => {\n\n if (typeof port.vendorId != 'undefined') {\n\n if (port.vendorId.includes('2341')) {\n portCOM = port.comName;\n log('Your Board is on ' + portCOM)\n board = vmBoard.vendingMachineBoard(portCOM, myFirebaseRef, io);\n }\n }\n });\n });\n }\n else {\n\n portCOM = startArgument;\n log('Try starting Board on ' + portCOM);\n board = vmBoard.vendingMachineBoard(portCOM, myFirebaseRef, io);\n }\n}", "title": "" }, { "docid": "b499825cbad6585aa3c4022581c8b85b", "score": "0.5721357", "text": "function portError(err) {\n alert(\"Serial port error: \" + err);\n}", "title": "" }, { "docid": "7fe3ff6d6d3e12883400db82307bcf78", "score": "0.5697772", "text": "function printList(portList) {\n // portList is an array of serial port names\n for (var i = 0; i < portList.length; i++) {\n // Display the list the console:\n print(i + \" \" + portList[i]);\n }\n}", "title": "" }, { "docid": "7fe3ff6d6d3e12883400db82307bcf78", "score": "0.5697772", "text": "function printList(portList) {\n // portList is an array of serial port names\n for (var i = 0; i < portList.length; i++) {\n // Display the list the console:\n print(i + \" \" + portList[i]);\n }\n}", "title": "" }, { "docid": "04b7b2a885a9ec751689e40a314cfecb", "score": "0.569318", "text": "async function findArduino() {\n if (process.argv[2]) {\n return process.argv[2]\n }\n const ports = await SerialPort.list()\n for (const port of ports) {\n if (/arduino/i.test(port.manufacturer)) {\n return port.path\n }\n }\n throw new Error('No Arduinos found')\n}", "title": "" }, { "docid": "2ce15c27a1e73c6373e597dddfafc8f1", "score": "0.5680308", "text": "function gotOpen() {\n console.log(\"Serial Port is open!\");\n}", "title": "" }, { "docid": "097f0bfbc2b70368762d8c015fb88ea5", "score": "0.566198", "text": "set port(value) {}", "title": "" }, { "docid": "033d37f2f37bd1f8d9d140c95cfa01d6", "score": "0.5658249", "text": "function getPorts(midiInterface){\n var portCount = midiInterface.getPortCount()\n , ports = []\n\n for (var i = 0; i < portCount ; i++) {\n var port = {\n name : midiInterface.getPortName(i)\n , num : i\n }\n ports.push(port)\n }\n return ports\n}", "title": "" }, { "docid": "b42c49ba555c1ddb012f64d111dcecb9", "score": "0.56559366", "text": "function SetPortNameOnSearchScreen(devName) {\n var portId = window.external.ReadSavedEthernetPortId(devName);\n var connMode = window.external.GetDiscoveringMode();\n if ((portId != 'None') && !(portId == '') && !(connMode == \"WiredAutomatic\"))\n {\n //If preserved port is available, the particular port is checked for availability and\n //proceeded with monitoring of that port\n var portName = window.external.GetEthernetPortsNameFromID(portId);\n var messageContrl = GetControl('tdSelectedPort');\n var messageTrContrl = GetControl('trSelectedPort');\n if ((null != messageTrContrl) && (null != messageContrl)) {\n messageTrContrl.style.display = 'block';\n messageContrl.innerHTML = \"Selected Ethernet Port: \" + portName;\n }\n }\n}", "title": "" }, { "docid": "6e66dd641ae190e8c3c4b314374dfe7e", "score": "0.5651956", "text": "_basePortsValidation(){\n var freePorts = this.freePorts();\n\n if (freePorts.length > 0){ \n freePorts.forEach(port=>{\n this.get('errors').push({\n code: 'PORT_NOT_CONNECTED',\n cId: port.id,\n msg: 'Port ['+port.id+'] is not connected'\n })\n }) \n }\n }", "title": "" }, { "docid": "2a80c299a5a9b5ad125115657c6cad19", "score": "0.56473255", "text": "connect(){\n DeviceElement.PortsManager.addDevice(this);\n this.device.open();\n this.connected = true;\n }", "title": "" }, { "docid": "82eb36ed4cddeff4340da1ac011a1f8b", "score": "0.56424683", "text": "function SetPort_onclick()\n {\n \tvar str;\n \tSynIDCard1.Port = document.all['Port'].value\n \tdocument.all['RETSTR'].value=\"端口设置为\"+SynIDCard1.Port;\n\n }", "title": "" }, { "docid": "4eccb28e2da772ea63d7a26b65cc0568", "score": "0.5629626", "text": "function main() {\n // Sicherstellen, dass die instanceObjects aus io-package.json korrekt angelegt sind\n ensureInstanceObjects();\n\n\n // Eigene Objekte/States beobachten\n adapter.subscribeStates('*');\n adapter.subscribeObjects('*');\n\n // existierende Objekte einlesen\n adapter.getDevices((err, result) => {\n if (result) {\n for (const item in result) {\n const id = result[item]._id.substr(adapter.namespace.length + 1);\n devices[id] = result[item];\n }\n }\n });\n\n adapter.setState('info.connection', false, true);\n\n // get the list of available serial ports. Needed for win32 systems.\n sP.list(function (err, ports) {\n AVAILABLE_PORTS = ports.map(p => p.comName);\n });\n\n try {\n SERIAL_PORT = new sP(adapter.config.serialport, { baudRate: 57600, autoOpen: false });\n SERIALPORT_ESP3_PARSER = SERIAL_PORT.pipe(new SERIALPORT_PARSER_CLASS());\n SERIAL_PORT.open(function (err) {\n if (err) {\n throw new Error('Configured serial port is not available. Please check your Serialport setting and your USB Gateway.');\n }\n });\n\n // the open event will always be emitted\n SERIAL_PORT.on('open', function () {\n adapter.log.debug(\"Port has been opened.\");\n adapter.setState('info.connection', true, true);\n });\n\n getGatewayInfo();\n\n\n // SERIAL_PORT.on('data', function (data) {\n // parseMessage(data);\n // });\n\n SERIALPORT_ESP3_PARSER.on('data', function (data) {\n parseMessage(data);\n });\n\n\n } catch (e) {\n adapter.log.warn('Unable to connect to serial port. + ' + JSON.stringify(e));\n }\n\n}", "title": "" }, { "docid": "e2af2b61a9391acc65eeac0c1b26e162", "score": "0.5621779", "text": "function validPort(port) {\r\n let portReturn = parseInt(port, 10)\r\n if (!(!isNaN(portReturn) && portReturn > 0 && portReturn < 65536)) {\r\n ipcRenderer.send('error-dialog',\r\n 'Invalid Port\\n\\nGo to Settings > Ports ... to Set Ports')\r\n portReturn = 0\r\n }\r\n return portReturn\r\n}", "title": "" }, { "docid": "20e9712f1276b866bc0459db8988269f", "score": "0.55711627", "text": "function getRandomPort() {\n return Math.floor(49152 + (65535 - 49152 + 1) * Math.random())\n}", "title": "" }, { "docid": "edd30048c018308714aed5e448f10b36", "score": "0.5557772", "text": "function setup() {\n serial = new p5.SerialPort(); // make a new instance of the serialport library\n serial.on('list', printList); // set a callback function for the serialport list event\n serial.on('connected', serverConnected); // callback for connecting to the server\n serial.on('open', portOpen); // callback for the port opening\n serial.on('data', serialEvent); // callback for when new data arrives\n serial.on('error', serialError); // callback for errors\n serial.on('close', portClose); // callback for the port closing\n \n serial.list(); // list the serial ports\n serial.open(portName); // open a serial port\n createCanvas(1023, 1023); // creates a canvas 1023px by 1023px\n}", "title": "" }, { "docid": "8f1a7a3ad3635f159573e46a047279b9", "score": "0.5555985", "text": "function addPortToOpenedPorts(port) {\n var comPortIsInOpen = false;\n for (var i=0; i < global.app.serialPorts.length; i++) {\n if (port == global.app.serialPorts[i]) {\n comPortIsInOpen = true;\n }\n }\n\n if (!comPortIsInOpen) {\n global.app.serialPorts.push(port);\n }\n}", "title": "" }, { "docid": "d4c8b2353a40186f8e2724ad2bc26243", "score": "0.5553849", "text": "function ReadSavedEthernetPortName(devName) {\n return window.external.ReadSavedEthernetPortName(devName);\n}", "title": "" }, { "docid": "84dbb187929881d979eeb2639985fb51", "score": "0.5553688", "text": "function printList(portList) {\n\t// portList is an array of serial port names\n\tfor (var i = 0; i < portList.length; i++)\n\t{\n\t // Display the list the console:\n\t text(i + \" \" + portList[i]);\n\t}\n}", "title": "" }, { "docid": "d9ea718a379aab7f717b7c9126f4518e", "score": "0.552062", "text": "async function connectSerial () {\r\n const port = await navigator.serial.requestPort()\r\n let dataTemp = []\r\n await port.open({ baudRate: 115200 })\r\n\r\n console.log('Port connected')\r\n keepReading = true\r\n while (port.readable && keepReading) {\r\n reader = port.readable.getReader()\r\n try {\r\n while (true) {\r\n const { value, done } = await reader.read()\r\n if (done) {\r\n console.log('Serial communication stopped!')\r\n break\r\n }\r\n dataTemp = [...dataTemp, ...value]\r\n\r\n // A lots of unnecessary error checking, because I don't trust myself :/\r\n if (dataTemp.length > 6) {\r\n let isDataCorrupted = dataTemp[1] !== 0x5A\r\n const dsMode = dataTemp[0]\r\n if (dsMode !== 0x41 && dsMode !== 0x73 && dsMode !== 0x79) {\r\n isDataCorrupted = true\r\n }\r\n\r\n let paddingCount = 0\r\n if (isDataCorrupted) {\r\n for (let i = 0; i < dataTemp.length; i++) {\r\n if (dataTemp[i] === 0x45) {\r\n paddingCount++\r\n }\r\n if (paddingCount === 3) {\r\n console.log('Corrupted data, dumped: ' + dataTemp.splice(0, i + 1))\r\n // dataTemp.splice(0, i + 1)\r\n break\r\n }\r\n }\r\n } else {\r\n const temp = (dsMode & 0x0F) * 2 + 2\r\n if (dataTemp.length < temp + 3) {\r\n continue\r\n }\r\n if (dataTemp[temp] === 0x45 && dataTemp[temp + 1] === 0x45 && dataTemp[temp + 2] === 0x45) {\r\n // console.log('New data: ' + dataTemp.splice(0, temp + 3))\r\n setDs2SvgSerial(dataTemp.splice(0, temp + 3), dsMode, false)\r\n // dataTemp.splice(0, temp + 3)\r\n continue\r\n }\r\n\r\n // Something really wrong going on here\r\n for (let i = 0; i < dataTemp.length; i++) {\r\n if (dataTemp[i] === 0x45) {\r\n paddingCount++\r\n }\r\n if (paddingCount === 3) {\r\n console.log('Data is fucked up, dumped: ' + dataTemp.splice(0, i + 1))\r\n // dataTemp.splice(0, i + 1)\r\n break\r\n }\r\n }\r\n }\r\n }\r\n }\r\n } catch (error) {\r\n console.log('Serial error: ' + error)\r\n } finally {\r\n reader.releaseLock()\r\n }\r\n }\r\n\r\n await port.close()\r\n}", "title": "" }, { "docid": "354f04fa14bada39468f0ca19ac19eee", "score": "0.5517735", "text": "function setup() {\n createCanvas(400, 300);\n background(0x08, 0x16, 0x40);\n\n serial = new p5.SerialPort(); // make a new instance of the serialport library\n serial.on('list', printList); // set a callback function for the serialport list event\n serial.on('data', serialEvent); // callback for when new data arrives\n \n var options = { baudrate: 9600}; // change the data rate to whatever you wish\n serial.open(portName, options);\n}", "title": "" }, { "docid": "69c6553100e6de9e6078813bcef39c24", "score": "0.55105543", "text": "function normalizePort(val) {\n var porta = parseInt(val, 10);\n\n if (isNaN(porta)) {\n // named pipe\n return val;\n }\n\n if (porta >= 0) {\n // porta number\n return porta;\n }\n\n return false;\n}", "title": "" }, { "docid": "23a22679cb163efef793d95e1c7f7c00", "score": "0.5506866", "text": "function initializeSensor() {\n getPort(function(port){\n sp = new SerialPort(port, {\n baudrate: 9600,\n dataBits: 8,\n parser: serialport.parsers.readline('\\n') \n},false);\n });\n \n \n}", "title": "" }, { "docid": "c06c8f4a9bb1e127c71b88e494ab3851", "score": "0.54991", "text": "function init() {\n\tin_port = arguments[0] + 12288;\n\t\n\tprefix = arguments[1];\n\n\tif(prefix == 0 || prefix == \"#1\")\n\t\tprefix = \"/monome\";\n\t\t\n\tif(arguments[2] == 0)\n\t\tautoconnect = 1;\n\t\n\toutlet(0, \"port\", in_port);\n\trescan();\n}", "title": "" }, { "docid": "83f545e47d1f8d0fce1098b3430a8f38", "score": "0.54860336", "text": "function loadComPort() {\r\n\t\t$.get(WS_LIST_CONFIG_COMPANY)\r\n\t\t\t.done(function(results, status) {\r\n\t\t\t\tvar response = results.response;\r\n\t\t\t\tif (response.type === 'SUCCESS') {\r\n\t\t\t\t\tvar data = response['company-list'].company,\r\n\t\t\t\t\t\tpb = data.port_baudrate.split('=');\r\n\t\t\t\t\t$.each(data, function(field, value) {\r\n\t\t\t\t\t\t$('input[data-field=\"' + field + '\"]').val(value);\r\n\t\t\t\t\t});\r\n\t\t\t\t\t$('select[data-field=\"port\"]').val(pb[0]);\r\n\t\t\t\t\t$('select[data-field=\"baudrate\"]').val(pb[1]);\r\n\t\t\t\t\t$('select[data-field=\"port\"]').selectpicker('val', pb[0]);\r\n\t\t\t\t\t$('select[data-field=\"baudrate\"]').selectpicker('val', pb[1]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSTIC.showWSError();\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.fail(function() {\r\n\t\t\t\tSTIC.showWSError();\r\n\t\t\t})\r\n\t}", "title": "" }, { "docid": "ede344f3188964f75a250beaad8aa92b", "score": "0.54826254", "text": "getSerialId() {\n if (!this.serialid) {\n let devicename = this.getDeviceName();\n if (typeof devicename === 'string') {\n let devicetype = devicename.split('#');\n if (devicetype) this.serialid = devicetype[1];\n }\n }\n return this.serialid;\n }", "title": "" }, { "docid": "f7d752520a6b83a63e0008b2cc26ed88", "score": "0.5458113", "text": "function _setupSerialConnection(port, baudRate, parity, dataBits, stopBits) {\n debug.log('Trying to connect to Smart Meter via port: ' + port + ' (BaudRate: ' + baudRate + ', Parity: ' + parity + ', Databits: ' + dataBits + ', Stopbits: ' + stopBits + ')');\n\n // Open serial port connection\n const sp = new SerialPort(port, {\n baudRate: baudRate,\n parity: parity,\n dataBits: dataBits,\n stopBits: stopBits\n });\n\n const connectionTimeout = setTimeout(() => {\n if (!connectedToSmartMeter) {\n debug.log('Could not establish a connection with the Smart Meter (connection timeout)');\n constructor.emit('error', 'Connection timeout');\n }\n }, 11000); // Set time for 11 seconds, since we should receive at least one message every 10 seconds from the Smart Meter\n\n let received = '';\n\n sp.on('open', () => {\n debug.log('Serialport connection opened, trying to receive data from the Smart Meter...');\n\n sp.on('data', data => {\n received += data.toString();\n\n const startCharPos = received.indexOf(config.startCharacter);\n const endCharPos = received.indexOf(config.stopCharacter);\n\n // Package is complete if the start- and stop character are received\n if (startCharPos >= 0 && endCharPos >= 0) {\n const packet = received.substr(startCharPos, endCharPos - startCharPos);\n const parsedPacket = parsePacket(packet);\n\n received = '';\n\n // Emit a 'connected' event when we have actually successfully parsed our first data\n if (!connectedToSmartMeter && parsedPacket.timestamp !== null) {\n debug.log('Connection with Smart Meter established');\n constructor.emit('connected');\n connectedToSmartMeter = true;\n clearTimeout(connectionTimeout);\n }\n\n debug.writeToLogFile(packet, parsedPacket);\n\n constructor.emit('reading-raw', packet);\n\n if (parsedPacket.timestamp !== null) {\n constructor.emit('reading', parsedPacket);\n } else {\n constructor.emit('error', 'Invalid reading');\n }\n }\n });\n });\n\n sp.on('error', (error) => {\n debug.log('Error emitted: ' + error);\n constructor.emit('error', error);\n });\n\n sp.on('close', () => {\n debug.log('Connection closed');\n constructor.emit('close');\n });\n}", "title": "" }, { "docid": "f1c6dc321e6e7a73816fc5aa2a89ab65", "score": "0.54568356", "text": "async connectBt (mac) {\n // TODO\n }", "title": "" }, { "docid": "23b0d76c4ce4117df3796d5ff41109d2", "score": "0.54534954", "text": "function SerialPortNode(n) {\n RED.nodes.createNode(this, n);\n this.serialport = n.serialport;\n this.serialbaud = parseInt(n.serialbaud) || 57600;\n this.databits = parseInt(n.databits) || 8;\n this.parity = n.parity || \"none\";\n this.stopbits = parseInt(n.stopbits) || 1;\n this.responsetimeout = n.responsetimeout || 1000;\n }", "title": "" }, { "docid": "518ed5b49232d6ba97662c3d6c7b1666", "score": "0.54501945", "text": "function showPortClose() {\n console.log(\"SerialPort\",'Serial Port closed: ' + sport);\n}", "title": "" }, { "docid": "1437a0e3cbd0b1dba9aa217e378521b5", "score": "0.5448881", "text": "findPort () {\n debug$7(`Looking for port with serial number ${this.serialNumber}.`)\n return new Promise((res, rej) => {\n let retryCount = 0\n const retryDelay = 200\n const tryFindPort = () => {\n SerialPort.list().then(ports => {\n const port = ports.find(p => p.serialNumber === this.serialNumber)\n if (port) {\n debug$7(\n `Found port ${port.comName} with serial number ${this.serialNumber}`\n )\n res(port)\n } else if (retryCount < 50) {\n retryCount += 1\n debug$7(\n `No port with serial number ${this.serialNumber} found. Retrying...`\n )\n setTimeout(tryFindPort, retryDelay)\n } else {\n rej(\n new DfuError(\n ErrorCode.ERROR_UNABLE_FIND_PORT,\n `With serial number ${this.serialNumber}`\n )\n )\n }\n })\n }\n tryFindPort()\n })\n }", "title": "" }, { "docid": "7a1d7dd7221b1e24fd3cfb9d2c2024c3", "score": "0.5443131", "text": "function displaySerialPortList(serialPortList) {\n let listContainer = document.querySelector(\"#\" + LIST_CONTAINER_ID);\n for (i=0; i<serialPortList.length; i++) {\n let port = serialPortList[i];\n let portText = port[\"description\"] + \" \" + port[\"path\"];\n // Create button, set attributes\n let nextLine = document.createElement(\"input\");\n nextLine.setAttribute(\"type\", \"button\");\n nextLine.setAttribute(\"path\", port[\"path\"]);\n nextLine.setAttribute(\"value\", portText);\n nextLine.setAttribute(\"onclick\", \"sendSelection(event)\");\n listContainer.appendChild(nextLine);\n }\n}", "title": "" }, { "docid": "7d7958ef45259cf0ae01dbd7b8c164d5", "score": "0.5433953", "text": "function printList(portList) {\n\t// portList is an array of serial port names\n\tfor (var i = 0; i < portList.length; i++) {\n\t\t// Display the list the console:\n\t\tprint(i + \" \" + portList[i]);\n\t}\n}", "title": "" }, { "docid": "7e5633acbae7ca88da912fda028149b9", "score": "0.54338264", "text": "function normalizePort(val) {\r\n\r\n let port = parseInt(val, 10);\r\n \r\n if (isNaN(port)) {\r\n // named pipe\r\n return val;\r\n }\r\n \r\n if (port >= 0) {\r\n // port number\r\n return port;\r\n }\r\n \r\n return false;\r\n\r\n}", "title": "" }, { "docid": "3065a176867dfb30ed7acb3c93393d00", "score": "0.5424263", "text": "function start(){projectpath\n\t\t const exec = require( 'child_process' ).exec;\n exec('cat /proc/cpuinfo | grep Serial', (error, stdout, stderr) => {\n if(error){\n logger.log('error', error);\n return new Error(error);\n }\n if(stderr){\n logger.log('error', stderr);\n return new Error(stderr);\n }\n var titleRaspberry=stdout.replace('Serial', '').trim()+'\\n';\n logger.log('info', 'connected RaspberryPi '+titleRaspberry);\n retrieveProperties(); \n\t\t modbusInverterClient.connectRTUBuffered('/dev/ttyUSB0', { baudRate: 9600 })\n\t .then(readInverter, error=>{logger.log('error', 'RaspberryPi doesnot find RS485 serial port.\\n');})\n });\n}", "title": "" }, { "docid": "425777d7cd1db44c78239af2d91cb1e4", "score": "0.5420048", "text": "function getPort(port) {\n\t// TODO: parsing della risposta\n\treturn query(CMD_GET + \"?name=\" + port);\n}", "title": "" }, { "docid": "1b79da71b6c8b5602a2ae1d25d1cd531", "score": "0.5412765", "text": "function port (str, base = 3000) {\n return str\n .split(\"\")\n .map((c, i) => c.charCodeAt(0) + i)\n .reduce((a, c) => a + c, 0) + base\n }", "title": "" }, { "docid": "6a064c485f82be376d87f7d987bd5067", "score": "0.5392319", "text": "function sendCmd() {\n chrome.usb.findDevices( {\"vendorId\": vendorId, \"productId\": productId}, onDeviceFound);\n}", "title": "" }, { "docid": "1e01f68f1c334f55b4bc61c43d19168b", "score": "0.5372559", "text": "function listOutPorts(mid) {\r\n PORTout = outportarr[outportindex];\r\n Lportout = mid.outputs.values();\r\n for (listoutput = Lportout.next(); listoutput && !listoutput.done; listoutput = Lportout.next()) {\r\n var deviceOut = listoutput.value.name;\r\n var optout = document.createElement(\"option\");\r\n optout.text = deviceOut;\r\n document.getElementById(\"out_portsel\").add(optout);\r\n }\r\n}", "title": "" }, { "docid": "1b3ca2b3ebbf66e564d9be5d46875fac", "score": "0.53697485", "text": "function normalizePort(val) {\n const p = parseInt(val, 10)\n\n if (isNaN(p)) {\n // named pipe\n return val\n }\n\n if (p >= 0) {\n // port number\n return p\n }\n\n return false\n}", "title": "" }, { "docid": "6b92ddabaa4753eb92c724ac0cfd68e2", "score": "0.5368693", "text": "function requestPort() {\n const rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n });\n \n rl.question('What port does server should use? ', (answer) => {\n port = answer \n console.log(`Port: ${answer}`);\n configServer()\n rl.close();\n });\n}", "title": "" }, { "docid": "57d1372ab11e907b2577a14678e5f6bb", "score": "0.53679585", "text": "function portDisconnect() {\n serial.close();\n serial.port.forget();\n console.log(\"port disconnected\");\n}", "title": "" }, { "docid": "1aab91bd76fe0aa81b8d01067ae6637d", "score": "0.5362137", "text": "function setup () {\n createPort('RandomInteger', ['read'], {\n type: 'numeric',\n min: 0,\n max: 999999\n });\n createPort('RandomUUID', ['read']);\n}", "title": "" }, { "docid": "731a12b5777411ea9ec1880482d1ed08", "score": "0.5356528", "text": "function normalizePort(val) {\n const ret_port = parseInt(val, 10);\n\n if (Number.isNaN(ret_port)) {\n // named pipe\n return val;\n }\n\n if (ret_port >= 0) {\n // port number\n return ret_port;\n }\n\n return false;\n}", "title": "" }, { "docid": "a92cdf90514a9874a7431de879456e2c", "score": "0.53476244", "text": "function main() {\n\tconst ipaddr = adapter.config.ipaddr;\n\tconst otport = adapter.config.port;\n\tconst useUSB = adapter.config.byUSB\n\tconst useTCP = adapter.config.byTCPIP\n\tconst USB_Device = adapter.config.USBDevice\n\n\t// Write connection status\n\tdoStateCreate(\"info.Connection\" ,\"Connected\",\"string\",\"indicator.connected\",\"\",false);\n\tadapter.setState(\"info.Connection\", { val: false, ack: true });\n\n//\t\tadapter.subscribeStates(\"*\");\n\n\tif (useUSB){\n\n\t\t// Handle USB connection\n\t\ttry {\n\t\t\tserialPort = new SerialPort(USB_Device);\n\t\t\tadapter.log.info('OpenTherm : Succesfully connected on : ' + \"/dev/ttyUSB0\");\n\t\t\tadapter.setState(\"info.Connection\", { val: true, ack: true });\n\t\t} catch (error) {\n\t\t\tadapter.log.info(error)\n\t\t}\n\t\t// Connection error handling\n\t\tserialPort.on('error', function(error) {\n\t\t\tadapter.log.error(JSON.stringify(error));\n\t\t\tadapter.setState(\"info.Connection\", { val: (JSON.stringify(error)), ack: true });\n\t\t});\n\n\n\t\tconst parser = serialPort.pipe(new Readline({ delimiter: '\\r\\n' }))\n\t\tparser.on('data', function(data) {\n\t\t\t\n\t\t\tdatahandler(data)\n\n\t\t});\n\n\t\t// Event at succefull connection by USB\n\t\tserialPort.on('open', function(error) {\n\t\t\n\t\t\t// Get a list of all USB devices\n\t\t\tSerialPort.list(function (err, results) {\n\t\t\t\tif (err) {\n\t\t\t\tthrow err;\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t}\n\n\tif(useTCP){\n\t\tvar completeData = '';\n\t\t// Handle TCP-IP connection\n\t\ttry {\n\t\t\t// @ts-ignore \n\t\t\tclient = net.connect({ host: ipaddr, port: otport},\n\t\t\t\tfunction() { //'connect' listener\n\t\t\t\t\tdoChannelCreate()\n\t\t\t\t\tadapter.log.info('OpenTherm : Succesfully connected on : ' + ipaddr);\n\t\t\t\t\tadapter.setState(\"info.Connection\", { val: true, ack: true });\n\t\t\t\t});\t\t\n\t\t} catch (error) {\n\n\t\t}\n\n\t\t// Connection error handling\n\t\tclient.on('error', function(error) {\n\t\t\tadapter.log.error(JSON.stringify(error));\n\t\t\tadapter.setState(\"info.Connection\", { val: (JSON.stringify(error)), ack: true });\n\t\t});\n\t\tclient.on('data', function(data) {\n\t\t\tvar read = data.toString();\n completeData += read;\n\t\t\t// Check if data is correct. Only one data line to datahandler\n\t\t\tif (completeData.match(/\\r\\n/)) {\n //adapter.log.info(\"Response: \" + completeData);\n datahandler(completeData)\n completeData = '';\n }\n\n\t\t});\n\t}\n}", "title": "" }, { "docid": "ef4d9924cb879159207f1536c67d76b4", "score": "0.5337131", "text": "function devicePath(e){return\"/devices/\"+e}", "title": "" } ]
ab182bf05db47e56e12dc270e5921100
Se manda llamar cuando se da click en un apartado del calendario donde, se agrega o se elimina un evento si este ya existe
[ { "docid": "06bc5b08563a05e297ec750d0916e83d", "score": "0.0", "text": "function insertar_eliminar_evento(fecha,id_lampara,tag_ejecucion){\n $.ajax({\n type:\"Get\",\n dataType:\"json\",\n url:\"insertar_eliminar_evento.php\",\n data:{fecha: fecha, id_lampara: id_lampara,tag_ejecucion: tag_ejecucion},\n success: function(mensaje){\n var status = mensaje.status;\n console.log(\"Se eliminino o se inserto\", status);\n }\n });\n}", "title": "" } ]
[ { "docid": "bf69c7a22d76ba34d38ef2860eb8a997", "score": "0.64601266", "text": "function delete_event(event) {\n\n const today = new Date();\n const today_date = today.getDate();\n const x = document.querySelector(\".active-date\").innerText;\n\n if (x <= today_date) {\n $(\"#deldialog\").hide(250)\n alert(\"Please select a future date\");\n $(\"#deldialog\").hide(250)\n } else {\n\n\n const id = $(\".events-container input[type=radio]:checked\").attr('data-id')\n\n\n $(\".events-container\").hide(250);\n $(\"#dialog\").hide(250);\n $(\"#deldialog\").show(250);\n let $event = $(\"#delform .event-card\");\n $event.show(250);\n\n\n if (!id) {\n $event.html(\"Please select delete item!\")\n } else {\n $event.html(\"Confirm deletion this item ?\")\n }\n //if there is any appointmnet for the selected date, display it:\n\n //rmz\n // Event handler for clicking the Cancel delete button\n $(\"#cancel-delbutton\").click(function () {\n $(\"#count\").removeClass(\"error-input\");\n $(\"#dialog\").hide(250);\n $(\"#deldialog\").hide(250);\n $(\".events-container\").show(250);\n });\n\n\n //Event handler for del-ok:\n $(\"#ok-delbutton\").click(function (event) {\n let $checked = $(\".events-container input[type=radio]:checked\");\n const id = $checked.attr('data-id')\n if (id) {\n doDelete([`/hc/appointments/${id}`], () => {\n console.info('delete success')\n\n })\n const {events = []} = event_data\n console.info('event', event)\n refreshData()\n const {\n day,\n month,\n year\n } = events.find(({appointmentId}) => appointmentId == id)\n const date = new Date(`${year}-${month}-${day}`)\n console.info('date', date)\n init_calendar(date);\n }\n $(\"#dialog\").hide(250);\n $(\"#deldialog\").hide(250);\n $(\".events-container\").show(250);\n });\n }\n}", "title": "" }, { "docid": "e9e70dd3b0a4470776d11b47c32fc347", "score": "0.6426467", "text": "onClickVisitationPlanDetail(event) {\r\n if(this.isDeleteMode) {\r\n let removeIndex = this.fullCalendarEventList.findIndex(tmpEvent => tmpEvent.id === event.id);\r\n\r\n if(removeIndex !== -1) {\r\n if(this.fullCalendarEventList[removeIndex].status && \r\n (this.fullCalendarEventList[removeIndex].status === 'Achieved' || \r\n this.fullCalendarEventList[removeIndex].status === 'Cancelled')) {\r\n this.showToastMessage('Oops...', 'You cannot delete a visit with status (' + this.fullCalendarEventList[removeIndex].status + ')', 'warning');\r\n return;\r\n }\r\n\r\n if(this.fullCalendarEventList[removeIndex].locked) {\r\n this.showToastMessage('Oops...', 'You cannot delete a locked visit', 'warning');\r\n return;\r\n }\r\n\r\n this.fullCalendarEventList.splice(removeIndex, 1);\r\n\r\n if(event.id.startsWith(this.newRecordPrefix) === false)\r\n this.removeVisitationPlanDetailIdList.push(event.id);\r\n \r\n let newIndex = this.newVisitationPlanDetailList.findIndex(visitationPlanDetail => visitationPlanDetail.id === event.id);\r\n \r\n if(newIndex !== -1)\r\n this.newVisitationPlanDetailList.splice(newIndex, 1);\r\n\r\n this.fullCalendarEle.fullCalendar('removeEvents', event.id); \r\n }\r\n } else if(event.id && \r\n event.id.startsWith(this.newRecordPrefix) === false) {\r\n window.open('/lightning/r/ASI_HK_CRM_Visitation_Plan_Detail__c/' + event.id + '/view');\r\n }\r\n }", "title": "" }, { "docid": "d992980406b983ee7bbe211c2305d22e", "score": "0.6209607", "text": "function deleteOpenEvent() {\n var key = $('#event_info').find('#event_key').val();\n if(key in _events) {\n _recently_deleted_event = _events[key];\n delete _events[key];\n clearEventForm();\n showToast('Event deleted.');\n }\n }", "title": "" }, { "docid": "77b8f361ab11f7f94647400d6859c590", "score": "0.61645174", "text": "function toggleInscription(event, jsEvent, view) {\n\t\t\t\t\tvar activite = event.original;\n\t\t\t\t\tvar dom = this;\n\t\t\t\t\t// on recherche dans les activitées auxquelle est inscrit le\n\t\t\t\t\t// visiteur\n\n\t\t\t\t\tvar registered = calendar.visiteur.activites.map(function(activite) {\n\t\t\t\t\t\treturn activite.id;\n\t\t\t\t\t}).indexOf(activite.id);\n\n\t\t\t\t\tif (registered >= 0) {\n\t\t\t\t\t\t// deja inscrit\n\t\t\t\t\t\tdialog.confirm('se desinscrire ?').then(function(ok) {\n\t\t\t\t\t\t\tcalendar.visiteur.unSetRelation(activite, function(success) {\n\t\t\t\t\t\t\t\t// activite.unSetRelation(calendar.visiteur,\n\t\t\t\t\t\t\t\t// function(success) {\n\t\t\t\t\t\t\t\tevent.borderColor = calendar.config.eventBorderColor;\n\t\t\t\t\t\t\t\tconsole.log('Desinscrit. eventBorderColor est ' + calendar.config.eventBorderColor);\n\t\t\t\t\t\t\t\tcalendar.visiteur.activites.splice(registered, 1);\n\t\t\t\t\t\t\t\tevent.nbVisiteurs--;\n\t\t\t\t\t\t\t\tevent.title = getTitle(event);\n\t\t\t\t\t\t\t\tcalendar.updateEvent(event);\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// inscription, on verifie qu'il reste des places\n\t\t\t\t\t\tactivite.getRelations(restRepoVisiteurs, function(visiteurs) {\n\t\t\t\t\t\t\tvar nbVisiteurs = visiteurs.length;\n\t\t\t\t\t\t\tactivite.getRelations(restRepoMoyens, function(moyen) {\n\t\t\t\t\t\t\t\tvar nbPlaces = moyen.json.nbPlaces;\n\t\t\t\t\t\t\t\tif (nbVisiteurs < nbPlaces) {\n\t\t\t\t\t\t\t\t\t// il reste des places, il faut aussi que le\n\t\t\t\t\t\t\t\t\t// visiteur\n\t\t\t\t\t\t\t\t\t// ne soit pas deja inscrit sur le meme\n\t\t\t\t\t\t\t\t\t// creneau\n\t\t\t\t\t\t\t\t\tcalendar.visiteur.getRelations(restRepoActivites, function(activitesInscrites) {\n\t\t\t\t\t\t\t\t\t\tvar nonOverlap = true;\n\t\t\t\t\t\t\t\t\t\tvar rangeAinscrire = moment().range(activite.json.datedebut, activite.json.datefin);\n\t\t\t\t\t\t\t\t\t\t// console.log(\"check overlap a inscrire\n\t\t\t\t\t\t\t\t\t\t// \" + rangeAinscrire.toString());\n\n\t\t\t\t\t\t\t\t\t\tactivitesInscrites.forEach(function(activiteInscrite) {\n\t\t\t\t\t\t\t\t\t\t\tvar rangeInscrit = moment().range(activiteInscrite.json.datedebut, activiteInscrite.json.datefin);\n\t\t\t\t\t\t\t\t\t\t\t// console.log(\"check overlap deja\n\t\t\t\t\t\t\t\t\t\t\t// inscrit \" +\n\t\t\t\t\t\t\t\t\t\t\t// rangeInscrit.toString());\n\t\t\t\t\t\t\t\t\t\t\tif (rangeAinscrire.overlaps(rangeInscrit)) {\n\t\t\t\t\t\t\t\t\t\t\t\tconsole.log(\"Visiteur deja inscrit ailleur\");\n\t\t\t\t\t\t\t\t\t\t\t\tnonOverlap = false;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\tif (nonOverlap) {\n\t\t\t\t\t\t\t\t\t\t\tdialog.confirm(\"s'inscrire?\").then(function(ok) {\n\t\t\t\t\t\t\t\t\t\t\t\tcalendar.visiteur.setRelation(activite, function(success) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t// activite.setRelation(calendar.visiteur,\n\t\t\t\t\t\t\t\t\t\t\t\t\t// function(success) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tevent.borderColor = calendar.selectedColor;\n\t\t\t\t\t\t\t\t\t\t\t\t\tcalendar.visiteur.activites.push(formatActivite(activite));\n\t\t\t\t\t\t\t\t\t\t\t\t\tevent.nbVisiteurs++;\n\t\t\t\t\t\t\t\t\t\t\t\t\tevent.title = getTitle(event);\n\t\t\t\t\t\t\t\t\t\t\t\t\tcalendar.updateEvent(event);\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tUtils.showMessage(\"Vous etes deja inscrit ailleur\", \"warning\");\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} else {\n\t\t\t\t\t\t\t\t\tUtils.showMessage(\"Plus de places\", \"warning\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\t// calendar.ObjCalendar.fullCalendar('refetchEvents');\n\t\t\t\t\t// calendar.ObjCalendar.fullCalendar('rerenderEvents');\n\t\t\t\t}", "title": "" }, { "docid": "5d8a0cd30e4f6ed0bd0d3d836f9000f5", "score": "0.6126102", "text": "function anadirListenersEventos(){\n $('.evento').on('mousedown', function(event){\n var respuesta = false;\n var participantes = $(this).attr('participantes');\n var asistentes = participantes.split(\",\");\n var usuario = \"@\" + $(\"#etiqueta_usuario\").attr(\"value\").trim();\n var asiste = false;\n \n for(var i=0;i<asistentes.length;i++){\n \n if(asistentes[i] == usuario){\n \n asiste = true;\n break;\n }else{\n asiste = false;\n }\n }\n \n // Click izquierdo\n if(event.which == 1){\n \n // Compruebo si en los participantes está el usuario, si lo está no puede unirse de nuevo\n if(asiste){\n \n // Muestro la información del evento\n alert($(this).attr('hora') + \"\\n\" +\n $(this).attr('juego') + \"\\n\" +\n $(this).attr('participantes'));\n detenerListeners();\n \n return;\n }\n \n respuesta = confirm(\"JOIN this event?\" + \"\\n\\n\" +\n $(this).attr('hora') + \"\\n\" +\n $(this).attr('juego') + \"\\n\" +\n $(this).attr('participantes'));\n \n if(respuesta){\n var id_evento = $(this).attr(\"id\");\n var url = \"index\";\n \n var datos = {};\n datos['unirse_evento'] = 'true';\n datos['id_evento'] = id_evento;\n \n jQuery.post(url, datos, function(){\n participantes += usuario + \",\";\n $(this).attr('participantes',participantes);\n recargar();\n });\n }\n \n // Click derecho\n }else if (event.which == 3){\n \n // Compruebo si en los participantes está el usuario, si no está no puede abandonar el grupo\n if(!asiste){\n return;\n }\n \n respuesta = confirm(\"LEAVE this event?\" + \"\\n\\n\" +\n $(this).attr('hora') + \"\\n\" +\n $(this).attr('juego') + \"\\n\" +\n $(this).attr('participantes'));\n \n if(respuesta){\n var id_evento = $(this).attr(\"id\");\n var url = \"index\";\n \n var datos= {};\n datos['abandonar_evento'] = 'true';\n datos['id_evento'] = id_evento;\n \n jQuery.post(url, datos, function(){\n usuario += usuario + \",\";\n participantes.replace(usuario,'');\n $(this).attr('participantes',participantes);\n recargar();\n });\n }\n }\n });\n }", "title": "" }, { "docid": "ab04afc69d35e8ccfc35cc3a5bdc0329", "score": "0.61006784", "text": "function setLinkDeleteEvent(){\n\t\tvar viewActive = '';\n\t\tviewActive = $('#btnView .active').data('calendarView');\n\t\t$selector = 'a#delete';\n\t\tif (viewActive == 'agenda') $selector = 'a.delete_agenda';\n\t\t//Programa el envento onClick en el enlace en la ventana popover para eliminar evento.\n\t\t$($selector).click(function(e){\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\t$this = $(this);\n\t\t\t$('#msg').html('').fadeOut();\n\t\t\t$idEvento = $this.data('idEvento');\n\t\t\t$idSerie = $this.data('idSerie');\n\t\t\t$('#option1').data('idEvento',$idEvento);\n\t\t\t$('#option1').data('idSerie',$idSerie);\n\t\t\t//$('#option2').data('idEvento',$idEvento);\n\t\t\t//$('#option2').data('idSerie',$idSerie);\n\t\t\t//$('#option3').data('idEvento',$idEvento);\n\t\t\t//$('#option3').data('idSerie',$idSerie);\t\t\n\t\t\t//Si el evento es periódico se muestra ventana modal\n\t\t\t\n\t\t\t$($selector).parents('.divEvent').find('a.linkpopover').popover('hide');\n\t\t\t\t$('#deleteOptionsModal').modal('show');\n\n\t\t\t//if ($this.data('periodica')) {\n\t\t\t//\t$($selector).parents('.divEvent').find('a.linkpopover').popover('hide');\n\t\t\t//\t$('#deleteOptionsModal').modal('show');\n\t\t\t//}\n\t\t\t// Si el evento no es periodico se borra sin pedir confirmación\n\t\t\t//else {\n\t\t\t\t//$('#msg').html('').fadeOut();\n\t\t\t//\tdeleteEvents(1,$idEvento,$idSerie);\n\t\t\t\t//deleteEventView($idEvento);\n\t\t\t//}//fin if - else\t\n\t\t});\n\t}", "title": "" }, { "docid": "ac1c82dd2071812822ba1f0b8165bf2e", "score": "0.60062045", "text": "function removeEventActivite(event, jsEvent, view) {\n\t\t\t\t\tif (event.nbVisiteurs == 0) {\n\t\t\t\t\t\tvar old_color = $(this).css('border-color');\n\t\t\t\t\t\tvar dom = this;\n\t\t\t\t\t\t$(dom).css('border-color', self.selectedColor);\n\t\t\t\t\t\tdialog.confirm(\"Delete \" + JSON.stringify(event.id) + \"?\").then(function(ok) {\n\t\t\t\t\t\t\tvar activite = event.original;\n\t\t\t\t\t\t\t// on decremente le nombre d'activite du moyen\n\t\t\t\t\t\t\t// correspondant\n\t\t\t\t\t\t\tvar moyen = activite.getRelations(restRepoMoyens, function(moyen) {\n\t\t\t\t\t\t\t\tmoyen.nb_activites--;\n\t\t\t\t\t\t\t\tconsole.log(\"il reste \" + moyen.nb_activites + \" activites dans \" + moyen.nom);\n\t\t\t\t\t\t\t\tactivite.remove(function(removed) {\n\t\t\t\t\t\t\t\t\tcalendar.removeEvent(event);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}, function(error) {\n\t\t\t\t\t\t\t\tconsole.log('Remove Error : ' + error)\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}, function(nok) {\n\t\t\t\t\t\t\t$(dom).css('border-color', old_color);\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tUtils.showMessage(\"Impossible de supprimer une activité ou des visisteurs sont inscrits\", \"warning\");\n\t\t\t\t\t}\n\t\t\t\t}", "title": "" }, { "docid": "c6cb84aea159c5ab6cc4c5a3cfd69de0", "score": "0.5993476", "text": "function swap_schedule() {\n var delete_schedule = confirm(\"Delete Schedule?\");\n\n if (delete_schedule) {\n var event_id = $(\".fc-event-clicked\").parent().data(\"event-id\");\n var calendarDate = $(\"#add-date\").val();\n if (event_id) {\n // Do something\n }\n }\n }", "title": "" }, { "docid": "9158bbdd9b8554b5639d39342d47bd92", "score": "0.5931101", "text": "function cal_clear_day(cal, event) {\n\tvar is_event = false;\n\tvar start = event;\n\tif(typeof start['start'] !== 'undefined') {\n\t\tis_event=true;\n\t\tstart = start.start;\n\t}\n\tif(typeof start['getDay'] !== 'undefined')\n\t\tstart = start.getDay();\n\n\tvar events = cal.fullCalendar('clientEvents');\n\tfor(var i=0; i<events.length; i++) {\n\t\tif(events[i].start.getDay() == start && events[i] != event) {\n\t\t\tif(!events[i].disabled) {\n\t\t\t\tcalendar.fullCalendar('removeEvents', events[i]._id);\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "abd4fe2b43b1ac0d614df3af735b8844", "score": "0.58931875", "text": "function removeEvent(name, event) {\n for (var i = 0; i < events.length; i++) {\n var e = events[i];\n if (e.name === name && e.event === event) {\n events.splice(i, 1);\n break;\n }\n }\n\n saveEvents();\n updateButtons();\n}", "title": "" }, { "docid": "11b4c1b8ffc952ad20ea4e7cfea7d342", "score": "0.5849183", "text": "function RemoveCalendarEvent(id) {\n //remove\n $calendar.fullCalendar('removeEvents', id);\n}", "title": "" }, { "docid": "113bb44f706dbf25c3c8934df3e91c30", "score": "0.58362645", "text": "function verifyDuplicatedClick(event){\n if (lastClick){\n var actualDate = new Date(event.timeStamp);\n var diff = ((actualDate - lastClick) / 1000);\n if ( diff <= 0.5 ) return true; \n }\n\n //set date of last click\n lastClick = new Date(event.timeStamp);\n\n return false\n }", "title": "" }, { "docid": "de5b7369b27594eb506acb863b19ebb1", "score": "0.581899", "text": "function deleteEvent(event) {\n event.stopPropagation();\n var id = $(this).data(\"id\");\n //console.log(id);\n $.ajax({\n method: \"DELETE\",\n url: \"/api/event/\" + id\n }).then(getMyEvents);\n }", "title": "" }, { "docid": "304cfe24419cd637ecd73f686e70ae05", "score": "0.5815883", "text": "function checkOrDelete(event) {\n const btn = event.target;\n if(btn.classList[0] === \"complete-btn\") {\n const item = btn.previousElementSibling.innerText;\n btn.parentElement.classList.toggle(\"completed\");\n updateTodosLocally(item);\n } else if (btn.classList[0] === \"trash-btn\") {\n const todo = btn.parentElement;\n const item = btn.previousElementSibling.previousElementSibling.innerText;\n deleteTodosLocally(item);\n todo.classList.toggle(\"thanos\");\n todo.addEventListener(\"transitionend\", () => todo.remove())\n }\n}", "title": "" }, { "docid": "99f4bbf0d79e5cca4577381660d8b2f8", "score": "0.58107376", "text": "cancelEvent(time, event, username){\n let account = this._findAccountByUsername(username);\n\n if (account == null) {\n return false;\n }\n console.log(\"123\");\n account.removeEvent(time[0], time[1], event);\n this._storeData();\n return true;\n }", "title": "" }, { "docid": "eb824a0abacce48838f02fe197ce9aea", "score": "0.580373", "text": "function deleteEvent(event, cb) {\n canvas.delete(`/api/v1/calendar_events/${event}`, (err, result) => {\n if (err)\n course.error(err);\n else\n course.log('Event without date deleted', {\n name: result.title,\n id: result.id\n });\n\n cb(null);\n });\n }", "title": "" }, { "docid": "f68478c4f0ee9c8970e42084e192d10a", "score": "0.5779628", "text": "function deleteEventDisplay(){\r\n closeEvent();\r\n generateMonth();\r\n updateCalendar();\r\n}", "title": "" }, { "docid": "02291d9f3e6e2e6ae7d7280eb14e7eba", "score": "0.5752871", "text": "function yourDay(theDayYouNeed){\n for(let i = 0; i < chosenDayArray.length; i++){\n if(chosenDayArray[i].month == date.getMonth() && chosenDayArray[i].theDay == theDayYouNeed){\n _theDayUserClicked = i;\n removeAllText(document.getElementById('theDayUserClickedTextContainerID'));\n console.log(chosenDayArray[i]);\n for(let j = 0; j < chosenDayArray[i].title.length; j++){\n let _eventContainer = document.createElement(\"div\");\n let _eventTitle = document.createElement(\"h2\");\n let _eventTime = document.createElement(\"h3\");\n let _eventDescription = document.createElement(\"p\");\n let _removeEventBtn = document.createElement(\"button\");\n _eventContainer.classList.add(\"containers\");\n _removeEventBtn.classList.add(\"deleteBtn\");\n _eventTitle.classList.add(\"titles\");\n _eventTime.classList.add(\"times\");\n _eventDescription.classList.add(\"descriptions\");\n _removeEventBtn.innerHTML = \"Delete event\";\n _eventTitle.innerHTML = `${chosenDayArray[i].title[j]}`;\n _eventTime.innerHTML = `${chosenDayArray[i].time[j]}`;\n _eventDescription.innerHTML = `${chosenDayArray[i].description[j]}`;\n _removeEventBtn.addEventListener('click', function(){\n if(confirm(\"Would you like to delete this event from your calendar?\")){\n _eventTitle.remove();\n _eventTime.remove();\n _eventDescription.remove();\n _removeEventBtn.remove();\n _eventContainer.remove();\n chosenDayArray[i].title.splice([j], 1);\n chosenDayArray[i].time.splice([j], 1);\n chosenDayArray[i].description.splice([j], 1);\n chosenDayArray[i].amountOfEvents -= 1;\n localStorage.setItem('calenderEvents', JSON.stringify(chosenDayArray));\n for(let x = 0; x < chosenDayArray.length; x++){\n if(chosenDayArray[x].month == date.getMonth() && chosenDayArray[x].amountOfEvents == 0){\n document.getElementById(`${chosenDayArray[x].theDay}`).style.color = \"white\";\n }}}\n })\n document.getElementById('theDayUserClickedTextContainerID').appendChild(_eventContainer);\n _eventContainer.appendChild(_eventTitle);\n _eventContainer.appendChild(_eventTime);\n _eventContainer.appendChild(_eventDescription);\n _eventContainer.appendChild(_removeEventBtn);\n } \n }\n else{\n console.log('no match');\n }\n }\n}", "title": "" }, { "docid": "7c23e3c936d7d57fabb007cc05f82e9c", "score": "0.573569", "text": "async function deleteEvent() { //Function to delete all Hair Thing events from the user's Google Calendar\n if (ApiCalendar.sign) { //Only executes if the user is signed in to Google Calendar\n console.log('Signed in');\n const response = await ApiCalendar.listUpcomingEvents(100); //Retrieve the next 100 events\n var result = response.result;\n for (var i=0; i<result.items.length; i++) { //Loops through the list of upcoming events\n if (result.items[i].summary.substring(0, 10) === \"Hair Thing\") { //If the event is a Hair Thing event\n try {\n const tryDelete = await ApiCalendar.deleteEvent(result.items[i].id); //Delete the event from the user's Google Calendar\n console.log(tryDelete.result); //Something must be done withs tryDelete.result or ele the event wont be deleted\n }\n catch(error) {\n console.log(error);\n }\n }\n }\n }\n else {\n console.log(\"Not signed in\");\n }\n }", "title": "" }, { "docid": "fd630ebf76fe99e66d08e49749c7a8d8", "score": "0.5725444", "text": "function attemptClose(event) {\r\n\t\t\tvar $target = $(event.target);\r\n\t\t\tvar ele = $target.closest(\".form-input[data-uid='\" + uid + \"']\");\r\n\r\n\t\t\t// if click not on this element, hide-cal and remove listener\r\n\t\t\tele.length <= 0 && close_cal();\r\n\t\t}", "title": "" }, { "docid": "e79232258fe4c1301118d8a79bc8940f", "score": "0.5704921", "text": "function deleteTestEvents()\n{\n\n \n var cal = CalendarApp.getCalendarById( (new Calendar()).getId() );\n \n \n var events = cal.getEventsForDay(new Date());\n \n \n for (var i=0;i<events.length;i++) \n {\n // Logger.log( events[i].getTitle() );\n \n events[i].deleteEvent()\n \n }\n}", "title": "" }, { "docid": "8e2004647544f6ee5e181649b628886b", "score": "0.5686887", "text": "function deleteEvent() {\n getObjectValue(0, 'removeEventAt(0)', function (e) {\n });\n}", "title": "" }, { "docid": "b7a402097a5f88b37fc2cfb6f4e59829", "score": "0.5656253", "text": "function addEvent(name, location, desc, date, id)\n{\n // Get date div in which event to be appended\n var $this_event =$(\"#calendar .days li div[id='\"+date+\"']\");\n var $total_event = $this_event.parent().find('.event .event-desc');\n // Get unique code for event id\n var uni_code = get_uniqe();\n // If Date have already events\n if ($total_event.length){\n var data_event = 'event_' +uni_code+'_'+ date;\n var popup_event ='pop' + data_event;\n var pop_event_name = 'name_'+ popup_event;\n var new_event = '<div class=\"event-desc\" id='+data_event+' data-event='+data_event+'><span id='+pop_event_name+' class=\"event-decorate\">'+name+'</span><div data-role=\"popup\" id='+popup_event+' class=\"ui-content this-popup-display\" data-arrow=\"l\"><span class=\"popup-close-me\" data-id='+popup_event+'>&#10006;</span><span class=\"popup-date-display\">'+date+'</span><span class=\"popup-label\">Name</span><div class=\"popup-label-data popup-name-display\">'+name+'</div><span class=\"popup-label\">Where</span><div class=\"popup-label-data popup-location-display\">'+location+'</div><span class=\"popup-label\">Description</span><div class=\"popup-label-data popup-desc-display\">'+desc+'</div><br/><button type=\"button\" id=\"popup-delete-event\" data-dismiss=\"popup\" class=\"button button1 popup-delete-event\" data-delete-id='+id+'>Delete</button><button type=\"button\" id=\"popup-edit-event\" class=\"button button2 popup-edit-event\" data-id='+id+'>Edit</button></div></div>';\n $this_event.parent().find('.event').append(new_event);\n }\n // IF this is first event to be added\n else{\n var data_event = 'event_' + uni_code +'_'+ date;\n var popup_event ='pop' + data_event;\n var pop_event_name = 'name_'+ popup_event;\n var new_event = '<div class=\"event\"><div id='+data_event+' class=\"event-desc\" data-event='+data_event+'><span id='+pop_event_name+' class=\"event-decorate\">'+name+'</span><div data-role=\"popup\" id='+popup_event+' class=\"ui-content this-popup-display\" data-arrow=\"l\"><span class=\"popup-close-me\" data-id='+popup_event+'>&#10006;</span><span class=\"popup-date-display\">'+date+'</span><span class=\"popup-label\">Name</span><div class=\"popup-label-data popup-name-display\">'+name+'</div><span class=\"popup-label\">Where</span><div class=\"popup-label-data popup-location-display\">'+location+'</div><span class=\"popup-label\">Description</span><div class=\"popup-label-data popup-desc-display\">'+desc+'</div><br/><button type=\"button\" id=\"popup-delete-event\" data-dismiss=\"popup\" class=\"button button1 popup-delete-event\" data-delete-id='+id+'>Delete</button><button type=\"button\" id=\"popup-edit-event\" class=\"button button2 popup-edit-event\" data-id='+id+'>Edit</button></div></div></div>';\n $this_event.parent().append(new_event);\n }\n // Event bindings for new event\n calanderEventDetails();\n calanderClose();\n eventEdit();\n eventDelete();\n calanderhover();\n}", "title": "" }, { "docid": "b49983a9941ea7eabab2f623de093fd2", "score": "0.56406236", "text": "deleteEvent(eventID){\n let attendees = this._eventManager.getAttendees(eventID);\n let hosts = this._eventManager.getHosts(eventID);\n let room = this._eventManager.getRoom(eventID);\n let time = this._eventManager.getEventDuration(eventID);\n\n this._eventManager.cancelEvent(eventID);\n for (let i = 0; i < hosts.length; i++){\n this._accountManager.removeFromSpecialList(eventID, hosts[i]);\n this._accountManager.cancelEvent(time, eventID, hosts[i]);\n }\n for (let i = 0; i < attendees.length; i++){\n this._accountManager.cancelEvent(time, eventID, attendees[i]);\n if (this._accountManager.checkType(attendees[i]) === \"vip\"){\n this._accountManager.removeFromSpecialList(eventID, attendees[i]);\n }\n }\n this._roomManager.removeEventFromRoom(room, eventID, time[0], time[1]);\n }", "title": "" }, { "docid": "7dc180aa94de2d1cd912818f23aca837", "score": "0.5632668", "text": "function remove(event) {\n Todos.splice(event.target.id, 1);\n ListAllTodos();\n saveTodosInLocalStorage();\n succesMessage(\"Task was removed!\");\n return false;\n}", "title": "" }, { "docid": "57fce6274f78eebfd921ee12023493ec", "score": "0.56198984", "text": "function deleteCheck(e) {\n const item = e.target;\n\n //delete\n if (item.classList[0] === 'del-btn') {\n const todo = item.parentElement;\n //animation\n todo.classList.add('fall');\n removeLocalTodos(todo);\n //addevent and make the transition then remove the div\n todo.addEventListener('transitionend', () => {\n todo.remove();\n });\n }\n\n //check\n if (item.classList[0] === 'comp-btn') {\n const todo = item.parentElement;\n todo.classList.toggle('comp');\n }\n}", "title": "" }, { "docid": "669b6b69098e6f94af6bc2279428b6cb", "score": "0.55999947", "text": "function didClickEvent(event, jsEvent, view){\n //was the delete button clicked?\n if($(jsEvent.target).hasClass('fc-delete-button')){\n shouldDeleteEvent(event, jsEvent, view);\n }\n else{\n window.location = '/reservation/'+event.reservation._id;\n }\n}", "title": "" }, { "docid": "1ee570f6cba8d3f5e2acdd37fcbaa969", "score": "0.55861306", "text": "function predeleteEvent() {\r\n\tformPost = '';\r\n\tif ($('#recurEvent', iPage).val() == 'on' && preExistEvent == true) {\r\n\t\t$.mobile.loading('hide');\r\n\t\t$.mobile.loading('show', { theme: 'a', text: 'deleting multiple events. Please be patient...', textonly: false });\r\n\t\tcreateRepeatDatesFromForm();\t//includes date of this event\r\n\t\tgetEventIDs(\"delete\"); //Async Call\r\n\r\n } else {\t\r\n\t\tvar url= 'https://' + host + 'scoutbook.com/mobile/dashboard/calendar/editevent.asp?'+ iEventID +'&Action=DeleteEvent';\r\n\t\tformPost = '';\r\n\t\t$.ajax({\r\n\t\t\turl: url,\r\n\t\t\ttype: 'GET',\r\n\t\t\tdataType: 'script',\r\n\t\t\t\t\r\n\t\t\terror: function (xhr, ajaxOptions, thrownError) {\r\n\t\t\t\tlocation.href = '/mobile/500.asp?Error=' + escape('url: ' + url + ' postData: ' + formPost + ' Status: ' + xhr.status + ' thrownError: ' + thrownError + ' responseText: ' + xhr.responseText.substring(0, 400));\r\n\t\t\t}\r\n\t\r\n\t\t});\r\n\t}\r\n}", "title": "" }, { "docid": "9b992466f5d1992e1ae647b49d306434", "score": "0.5565836", "text": "function verificarEmpate() {\r\n if (emptySquares().length == 0) {\r\n for (var i = 0; i < cells.length; i++) {\r\n cells[i].style.background = \"blue\";\r\n cells[i].removeEventListener('click', turnClick, false);\r\n }\r\n declaraVencendor(\"Empate\");\r\n return true;\r\n }\r\n return false;\r\n}", "title": "" }, { "docid": "437f81eb03eae71b6ae22b2dc4d2dd24", "score": "0.5562091", "text": "function deleteEvent(calendarId, eventId, event) {\n\tgapi.client.calendar.events.delete({\n\t\t'calendarId': calendarId,\n\t\t'eventId': eventId,\n\t}).then(function(response) {\n\t\tconsole.log(response);\n\t\t// remove event from EVENTS or TOMORROW_EVENTS\n\t\tvar i = activeEvents.indexOf(event);\n\t\tif (activeCalendar === 'today') {\n\t\t\tEVENTS.splice(i, 1);\n\t\t} else {\n\t\t\tTOMORROW_EVENTS.splice(i, 1);\n\t\t}\n\t\tredraw();\n\t});\n}", "title": "" }, { "docid": "35bbbd2e829b0c9e5e8f52a1c3132316", "score": "0.55586815", "text": "function deleteEvent(id)\r\n{\r\n for (let e of eventsCollection) {\r\n if (e.id == id) {\r\n eventsCollection.splice(eventsCollection.indexOf(e),1);\r\n console.log(`Delete event with name ${e.name}`); \r\n }\r\n }\r\n}", "title": "" }, { "docid": "965edc7d343bed203d285ff3a60a447a", "score": "0.5553993", "text": "function removecompleted(event) {\n CompletedTodos.splice(event.target.id, 1);\n ListAllTodos();\n saveTodosInLocalStorage();\n succesMessage(\"Task was removed!\");\n return false;\n}", "title": "" }, { "docid": "22857e2839635ce65f16d0d62764c431", "score": "0.5553278", "text": "function programerEventClickToCalendarCell(){\t\n\t\t$('.formlaunch').click(function(e){\n\t\t\tif (!$('select#recurse option:selected').val()) {\n\t\t\t\t//alert('Espacio o medio a reservar no seleccionado');\n\t\t\t\t$('#alert').fadeOut('slow');\n\t\t\t\t$('#alert').fadeIn('slow');\n\t\t\t}\n\t\t\telse if ($('#alert_msg').data('nh') >= 12){\n\t\t\t\t\t$('#alert_msg').fadeOut('slow');\n\t\t\t\t\t$('#alert_msg').fadeIn('slow');\t\t\n\t\t\t\t}\n\t\t\telse {\n\t\t\t\t$elem = $(this).find($('.divEvents'));\n\t\t\t\t$hidden = $elem.css('overflow');\n\t\t\t\tif($hidden == 'visible') {\n\t\t\t\t\t$elem.css({'width':$ancho,'height':'68px','background-color':'white','overflow':'hidden','border':'0px','position':'inherit','z-index':'0'});\n\t\t\t\t\t$(this).find($('.cerrar')).hide();\n\t\t\t\t}\n\n\t\t\t\tsetInitValueForModalAdd($(this).data('hora'),$(this).data('fecha'));\n\t\t\t\t$('.divEvent a.linkpopover').each(function(index,value){ $(this).popover('hide');});\n\t\t\t\t$('#myModal').modal('show');\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "f4b550ea8aea14e9dc9a35a1ec44191f", "score": "0.55394536", "text": "function deleteUserEvent() {\n $('.event-box').on('click', '.event-delete', function(){\n let _username = $('.current-user').text().trim();\n let _name = $(this).siblings('.event-name').text().trim();\n let app = {username: _username, name: _name};\n deleteEventData(app);\n })\n }", "title": "" }, { "docid": "849413711439462793eaa69b128c7504", "score": "0.5520704", "text": "showDeleteEventArea(){\n this.select_id.innerHTML = \"\";\n this.form.classList.add(\"hide\");\n this.form_delete.classList.remove(\"hide\");\n this.h2.innerHTML = \"Delete an Event Here\"\n let all_events = JSON.parse(localStorage.getItem(\"full_event\"));\n let select = this.form_delete.children[0];\n \n all_events.forEach(event => { \n console.log(event.date) \n let option = document.createElement(\"option\");\n option.id = \"option-del-\"+event.id;\n option.setAttribute(\"value\", event.id);\n option.innerHTML = event.name;\n select.appendChild(option);\n })\n \n this.btn_delete.addEventListener(\"click\", ()=>{\n let old_events = JSON.parse(localStorage.getItem(\"full_event\"));\n let updated_events = old_events.filter(evt => evt.id != select.value)\n localStorage.setItem(\"full_event\", JSON.stringify(updated_events));\n document.getElementById(\"option-del-\"+select.value).remove();\n this.message_p.innerHTML = \"Event successfully deleted!\"; \n this.message_p.classList.add(\"delete-message\");\n })\n }", "title": "" }, { "docid": "df3df6843feeb49c904e5eac4742549f", "score": "0.5508736", "text": "function deleteCheck(e) {\n const item = e.target;\n //delete todoo\n if(item.classList[0]=== \"trash-btn\"){\n const todo = item.parentElement;\n //Animation\n todo.classList.add(\"fail\");\n removeLocalTodos(todo);\n todo.addEventListener(\"transitionend\",() => {\n todo.remove();\n })\n }\n //Function button complete\n\n if (item.classList[0] === \"complete-btn\"){\n const todo = item.parentElement;\n todo.classList.toggle(\"completed\");\n }\n\n }", "title": "" }, { "docid": "9f72444689b89073701d6c1c1b19f89c", "score": "0.5507542", "text": "function removeDOMtask(e, list = inbox) { // e es el evento \n\n // detectar que se hizo click en el enlace en la x \n if (e.target.tagName === 'A') { //target es donde se ejcuto el evento, tagName es el nombre de la tiqueta\n // remover tarea de la lista, se necesita el indice\n list.removeTask(getTaskIndex(e),taskContainerElement)\n }\n}", "title": "" }, { "docid": "7530121ac8fe960adc8e60dc31f8be06", "score": "0.55049247", "text": "function cerrarDetEvento (event) {\r\n event.preventDefault();\r\n $(\".ing-cal\").html(\"\");\r\n $(\".ing-cal\").addClass('hidden');\r\n}", "title": "" }, { "docid": "12511ae358a7fc8d357478d3725e656e", "score": "0.55033195", "text": "has(e) {\n return !!this.events[e];\n }", "title": "" }, { "docid": "5d90690f211eb0ae64c87709f3d0d863", "score": "0.5475419", "text": "function editUserCalendar(list) {\n var calendar = CalendarApp.getDefaultCalendar();\n \n for (var taskIndex = 0; taskIndex < list.length; taskIndex++) {\n Logger.log('Event id ' + taskIndex + ' is ' + list[taskIndex].eventId);\n \n if (list[taskIndex].eventId) {\n \n Logger.log(\"Event to be deleted: \" + list[taskIndex].title + \" from \" + list[taskIndex].start + \" to \" + list[taskIndex].end);\n \n try {\n calendar.getEventSeriesById(list[taskIndex].eventId).deleteEventSeries(); \n } catch(e) {\n Logger.log('Could not delete task ' + taskIndex + '. ' + e);\n }\n \n } else {\n var now = new Date();\n \n calendar.createEvent(list[taskIndex].title,\n new Date(list[taskIndex].start),\n new Date(list[taskIndex].end),\n {description: list[taskIndex].shift});\n \n Logger.log(\"Event created: \" + list[taskIndex].title + \" from \" + new Date(list[taskIndex].start) + \" to \" + new Date(list[taskIndex].end));\n }\n \n // if (list[taskIndex].start\n \n }\n}", "title": "" }, { "docid": "23a7b10dfa07d3f5e6b193dfedc0d8a7", "score": "0.54733443", "text": "function datepickerRandomEventExists(){\n var today = new Date();\n var weekLater = new Date().setDate(today.getDate() + 7);\n var monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August' , 'September' , 'October', 'November', 'December'];\n var calendarInlineVoorstelrandomeventExists = app.calendar.create({\n containerEl: '#demo-calendar-inline-container-voorsteldatepickerShow',\n multiple: true,\n weekHeader: false,\n renderToolbar: function () {\n return '<div class=\"toolbar calendar-custom-toolbar no-shadow\">' +\n '<div class=\"toolbar-inner\">' +\n '<div class=\"left\">' +\n '<a href=\"#\" class=\"link icon-only\"><i class=\"icon icon-back ' + (app.theme === 'md' ? 'color-black' : '') + '\"></i></a>' +\n '</div>' +\n '<div class=\"center\"></div>' +\n '<div class=\"right\">' +\n '<a href=\"#\" class=\"link icon-only\"><i class=\"icon icon-forward ' + (app.theme === 'md' ? 'color-black' : '') + '\"></i></a>' +\n '</div>' +\n '</div>' +\n '</div>';\n },\n on: {\n init: function (c) {\n $$('.calendar-custom-toolbar .center').text(monthNames[c.currentMonth] +', ' + c.currentYear);\n $$('.calendar-custom-toolbar .left .link').on('click', function () {\n calendarInlineVoorstelrandomeventExists.prevMonth();\n });\n $$('.calendar-custom-toolbar .right .link').on('click', function () {\n calendarInlineVoorstelrandomeventExists.nextMonth();\n });\n },\n monthYearChangeStart: function (c) {\n $$('.calendar-custom-toolbar .center').text(monthNames[c.currentMonth] +', ' + c.currentYear);\n }\n }\n});\ncalendarInlineVoorstelrandomeventExists.setValue(mogelijkeData);\n}", "title": "" }, { "docid": "a67e229a5ec2feebf7fae9e3ec96452e", "score": "0.5470688", "text": "function validExistingEvent($card) {\n setEventCard($card)\n $card.find('.dropdown-toggle').dropdown('hide')\n let $created_events_container = $('#created_events_container')\n $card.parent().appendTo($created_events_container)\n $created_events_container.scrollTop(\n $created_events_container[0].scrollHeight)\n\n $(\"#success_alert\").fadeTo(2000, 500).slideUp(500, function () {\n $(\"#success_alert\").slideUp(500);\n });\n\n }", "title": "" }, { "docid": "db047f55b073973e68388273e1f5df61", "score": "0.54648036", "text": "function delete_up(event){\n console.log(event);\n var de=confirm('Do you want to delete this event?');\n if (de==true){\n const path='upcoming/upcoming';\n const headers={\n 'Accept': 'application/json',\n 'Content-Type':'application/json',\n 'Authorization':'Token '+author_JSON,\n };\n const delete_upcoming_now={\n \"event\":event,\n }\n const method = 'DELETE';\n api.makeAPIRequest(path,{\n method,headers,\n body:JSON.stringify(delete_upcoming_now),\n }).then(function(){\n setting_info();\n })\n\n }\n}", "title": "" }, { "docid": "49b078a86da9b7881f023e8067baa4f1", "score": "0.5463177", "text": "function deleteEvent() {\n const apicall = 'http://localhost:3010/api/events/'+eventid;\n fetch(apicall, {\n method: 'DELETE',\n headers: Auth.headerJsonJWT(),\n })\n .then((response) => {\n if (!response.ok) {\n if (response.status === 403) {\n setSignupError(true);\n return response.json();\n }\n } else {\n setEventData({});\n setEventExists(false);\n history.push('/');\n }\n })\n .then((json) => {\n if (json) setSignupErrorMsg(json.message);\n })\n .catch((error) => {\n console.log(error);\n });\n }", "title": "" }, { "docid": "c8b8af4c05d4ed77e931918213f583b4", "score": "0.54617894", "text": "function eventDelete()\n{\n $('.popup-delete-event').unbind('click');\n $('.popup-delete-event').click(function(e){\n e.preventDefault();\n // Get event id to be deleted\n var parent_id = $(this).parent().attr('id');\n var delete_this_id = $(this).attr('data-delete-id');\n // Call backend\n $.ajax({\n type: 'POST',\n url: \"delete_event\",\n dataType: 'json',\n data: {delete_this_id: delete_this_id},\n async: false,\n success: function (data) {\n if(data['success'])\n {\n var leftside = $('.today-date-event-container').find('.today-date-event-container-data');\n $.each(leftside, function(index, value){\n if (('today_event_id_'+delete_this_id) == ($(this).attr('id')))\n {\n $(this).remove()\n }\n });\n // Remove Event from calander and close view detail popup\n var remove_event_desc_from_calander = parent_id.slice(3,parent_id.length);\n var remove_event_from_calander = remove_event_desc_from_calander.slice(-10);\n var check_len = ($('#'+remove_event_desc_from_calander).parent().find('.event-desc')).length;\n $('#'+parent_id).popup('close');\n clearpopup();\n if (check_len == 1)\n {\n $('#'+remove_event_from_calander).parent().find('.event').remove();\n }\n else {\n $('#' + remove_event_desc_from_calander).remove();\n }\n alert('Event Deleted');\n }\n },\n error: function (request, error) {\n console.log(\"error\");\n }\n });\n\n });\n}", "title": "" }, { "docid": "85a78a1bccbb0ebb33800c2cd93e1d3f", "score": "0.54499316", "text": "function click_cal_suiv () {\n // 1- on Calendar page\n if\n (\n // if 1 schedule <.td-week> is selected\n ($(\".td-week\").data('clicked'))\n )\n {\n\n // SCROLL TO TOP\n $('html, body').animate({\n scrollTop: $(\"#contact-main-wrap\").offset().top\n }, 300);\n // DISABLE 1-Calendar and ENABLE 2-Commande-form\n $(\"#commande-form\").attr(\"display\", \"true\");\n $(\"#commande-form\").css(\"display\", \"block\");\n $(\"#calendar-form\").attr(\"display\", \"false\");\n $(\"#calendar-form\").css(\"display\", \"none\");\n\n // INCREASE Progress bar width 50% (2/4)\n $(\".progress-bar\").css(\"width\", \"50%\");\n\n // CHANGE Progress bar icon & text COLOR\n $(\".form-icon\").next().css(\"color\", \"#32c5d2\");\n $(\".form-icon\").css(\"filter\", \"grayscale(0)\");\n\n // ENABLE \"précédent\" BUTTON\n $(\".btn-white\").removeClass(\"btn-white-disabled\");\n\n }\n else {\n\n // SCROLL TO TOP\n $('html, body').animate({\n scrollTop: $(\"#contact-main-wrap\").offset().top\n }, 300);\n\n // DISPLAY Error message\n $(\".error-calendar\").toggleClass(\"animated shake\");\n $(\".error-calendar\").css(\"display\",\"flex\");\n\n }\n}", "title": "" }, { "docid": "3b816496cd9e9d92c8fef54d5bce9879", "score": "0.5437342", "text": "function delete_click(ev) {\n let btn = $(ev.target);\n let time_id = btn.data('delete-id');\n\n delete_time(time_id);\n}", "title": "" }, { "docid": "82adaddf0131710a9b2b93c6102faf04", "score": "0.5427845", "text": "function removeEvent(id)\n {\n if($.isNumeric(id)) {\n calendar.instance.fullCalendar( 'removeEvents', id);\n }\n }", "title": "" }, { "docid": "96d15e9937b40f85779970bb7bc49e8d", "score": "0.5422742", "text": "function eliminarTurnoDeLaAgenda() {\n let calendarioActual = document.getElementById(\"filtro-agenda\").value;\n confirmacionOperacion(\"turno\", dni)\n .then((respuesta) => {\n obtenerTurnoActivo().then((turno) => {\n deleteTurno(turno._id)\n .then((resp) => {\n new Alerta(\"Fue eliminado con éxito!\", \"Eliminar Turno\").mostrar();\n cargarCalendario(calendarioActual);\n })\n .catch((err) => {\n new Alerta(\n \"No se pudo eliminar: \" + err,\n \"Eliminar Turno\"\n ).mostrar();\n cargarCalendario(calendarioActual);\n });\n });\n })\n .catch((err) => console.log(err)); // Se cancelo la operacion borrar\n}", "title": "" }, { "docid": "fbb44a17eadb906329691b8965760909", "score": "0.54198533", "text": "function deleteEntry() {\n var idOfEvent = document.getElementById(\"idOfEvent\").innerHTML;\n var allItems = JSON.parse(localStorage.getItem(\"items\"));\n var i;\n bodyEl.find(\"#calendar\").fullCalendar(\"removeEvents\", idOfEvent);\n for (i = 0; i < allItems.length; i++) {\n if (allItems[i][\"id\"] == idOfEvent) {\n localStorage.clear();\n allItems.splice(i, 1);\n localStorage.setItem(\"items\", JSON.stringify(allItems));\n }\n }\n }", "title": "" }, { "docid": "f5f9accb44b3eee34a72600a67751c44", "score": "0.5416142", "text": "function removeUserCalendarEvents() {\n var dates = scheduleDates(); //find start and end times to check calendar events\n var calendarEvents = CalendarApp.getDefaultCalendar().getEvents(dates.start, dates.end);\n var events = [];\n \n for (var a = 0; a < calendarEvents.length; a++) {\n if (calendarEvents[a].getTitle().search(\"On-­Air \\\\|\") != -1) { // uses two backslashes to escape the '|' character\n Logger.log((a+1) + \": \" + calendarEvents[a].getTitle() + \" event deleted.\");\n calendarEvents[a].deleteEvent(); \n }\n } \n}", "title": "" }, { "docid": "d674c2b38ef0041957b8d304a68f5e88", "score": "0.53946096", "text": "function checkOrDelete(e) {\n const chosedDiv = e.target.parentElement.parentElement;\n // Checking if selected target contains classes check or trash\n if (e.target.classList.contains(\"fa-check\")) {\n //add complete class\n chosedDiv.classList.toggle(\"completed\");\n } else if (e.target.classList.contains(\"fa-trash\")) {\n // Add delete animation\n chosedDiv.classList.add(\"deleteAnimation\");\n // Listen to end of animation and then delete div\n chosedDiv.addEventListener(\"transitionend\", () => {\n chosedDiv.remove();\n });\n }\n}", "title": "" }, { "docid": "d62a9271175eca5ee6adb3f13218974b", "score": "0.5389984", "text": "function shouldDeleteEvent(event, jsEvent, view){\n MaterializeModal.message({\n title: 'Confirm',\n submitLabel: 'Yes',\n closeLabel: 'Cancel',\n message: 'Are you sure you want to delete?',\n callback: function(error, response){\n if (response.submit){\n Meteor.call('cancelReservation', event.reservation, function(error, result){\n errorHandle(error);\n });\n }\n }\n });\n}", "title": "" }, { "docid": "354a1922462288e7ad94e63c20f17c58", "score": "0.5380131", "text": "function deleteCheck(e) {\r\n e.preventDefault();\r\n const item = e.target;\r\n\r\n // delete TODO\r\n if (item.classList[0] === \"trash-btn\") {\r\n const todo = item.parentElement;\r\n // animation class for css\r\n todo.classList.add(\"fall\");\r\n removeLocalTodos(todo);\r\n // do function after css animation with 'transitionend' event\r\n todo.addEventListener(\"transitionend\", function () {\r\n // delete TODO\r\n todo.remove();\r\n });\r\n }\r\n\r\n // Check Mark\r\n if (item.classList[0] === \"complete-btn\") {\r\n const todo = item.parentElement;\r\n todo.classList.toggle(\"completed\");\r\n }\r\n}", "title": "" }, { "docid": "0cb45eca75a9698c292ce45bce3df1b8", "score": "0.5375686", "text": "function deleteCheck(event) {\n /* console.log(event.target); */\n const item = event.target;\n // Delete a todo\n if (item.classList[0] === \"trash-btn\") {\n const todo = item.parentElement;\n // Animation\n todo.classList.add(\"fall\"); // before we remove the ELement, I wanna do todo fall Animation\n todo.addEventListener(\"transitionend\", function () {\n // and what this function is going to do,it's going to wait and only execute after the animation above is completed, so after the transition is completed then removes the finished todo.\n todo.remove();\n });\n }\n // Check Mark => basically, we click on the green to mark this as completed\n if (item.classList[0] === \"complete-btn\") {\n const todo = item.parentElement;\n todo.classList.toggle(\"completed\");\n }\n}", "title": "" }, { "docid": "64d6aa28665cdb56ff1467f1c44cb0df", "score": "0.53718036", "text": "function update_existing_event(\n cal,\n event_id,\n event_h\n) {\n var existing_event = cal.getEventById(event_id);\n\n //If the title doesn't have \"Kiddush Setup Rota\", meaning we are refering to some random object \n var re = new RegExp('[Kiddush Setup Rota]');\n //Is an existing event a kiddush setup event?\n try {\n if (re.exec(existing_event.getTitle())) {\n if (typeof existing_event === undefined) {\n Logger.log(\"WARNING: Event '%s' has a status '%s' (aka not replied)\", existing_event.getTitle(), existing_event.status);\n } else {\n //event.setTitle(parasha);\n //event.setAllDayDate(event_date);\n //event.addGuest(email);\n Logger.log(\"Deleting eventId=%s\", event_id);\n existing_event.deleteEvent();\n }\n event_id = create_event(\n cal, \n event_h\n );\n Logger.log(\"Created eventId=%s\", event_id);\n } else {\n throw new Error(\"The existing event '%s' isn't a Kiddush Setup Event\", existing_event.getTitle()); \n }\n } catch(e) {\n e.message = \"Event: \\'\" + existing_event.getTitle() + \"\\' : \" + e.message;\n errHandler(e, \"update_existing_event\");\n event_id = undefined;\n }\n return event_id;\n}", "title": "" }, { "docid": "276836eae1779ed8af4043d05a6800ba", "score": "0.53678393", "text": "eliminarEventosClick() {\n this.colores.celeste.removeEventListener('click', this.elegirColor)\n this.colores.verde.removeEventListener('click', this.elegirColor)\n this.colores.violeta.removeEventListener('click', this.elegirColor)\n this.colores.naranja.removeEventListener('click', this.elegirColor)\n }", "title": "" }, { "docid": "98289f4e597abd47f8a5f5409a05216e", "score": "0.53594315", "text": "function removeFromScheduleClick() {\n listView.selection.getItems().done(function (items) {\n items.forEach(function (iter) {\n var info = iter.data;\n removeFromSchedule(info.itemId, info.isTile);\n });\n });\n WinJS.log && WinJS.log(\"Selected notifications have been removed.\", \"sample\", \"status\");\n refreshListView();\n }", "title": "" }, { "docid": "59903fe6ec5eb9c6ed5b46d139811192", "score": "0.53582495", "text": "function agregarEventoEspecialista(){\n\t$('.agregarEsp').click(function(){\n\t\t//solo se ejecuta accion de evento cuando el especialista esta en estado Libre\n\t\tif($(this).parent('.renEspecialista').children('.estadoE').html()=='Libre'){\n\t\t\tvar idFrap=$(this).attr('id');\n\t\t\tvar htmlEl=$('#'+idFrap).children('.servicioHeader').children('.datosDescarga').children('.datosDesc').attr(\"id\");\n\t\t\tvar datosEspecialista={\n\t\t\t\tusername : $(this).parent('.renEspecialista').children('.ocultar').html(),\n\t\t\t\tidNitro : htmlEl.substring(11),\n\t\t\t\tidFrap : idFrap\n\t\t\t};\n\t\t\tif (confirm('¿Desea invitar al especialista '+$(this).parent('.renEspecialista').children('.nombreEspecialista').html()+\"?\")) {\n\t\t\t\tif(pantallaCompleta){\n\t\t\t\t\t//se encuentra en pantalla completa\n\t\t\t\t\t$('.evtEspecialistas').attr(\"src\", \"assets/especialista.svg\");\n\t\t\t\t\t$(\".lstEspecialistas\").removeClass(\"mostrarLstEspecialistas\");\n\t\t\t\t\tbEspecialista=true;\n\t\t\t\t\t mostrarEspPantallaC($(\".evtEspecialistas\"));\n\t\t\t\t}else{\n\t\t\t\t\t\tcontrolarEspecialistas($(\"#e_\"+idFrap));\n\t\t\t\t}\n\t\t\t\tsocket.emit('llamarEspecialista',datosEspecialista,function(respuesta) {\n\t\t\t\t\talertify.success(\"Se ha enviado la solicitud al especialista\");\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "09366ea0ea7c4dc3f5522cd1715611ec", "score": "0.5358192", "text": "onSetClicked(event) {\r\n this._checkBeforeAfterTimeValidity();\r\n if (!this.picker.dateTimeChecker(this.pickerMoment)) {\r\n this.hidePicker$.next(null);\r\n event.preventDefault();\r\n return;\r\n }\r\n this.confirmSelected$.next(event);\r\n event.preventDefault();\r\n return;\r\n }", "title": "" }, { "docid": "2c1b0ec8fcb7abb0871da5a5a1d41f36", "score": "0.53558034", "text": "function deleteEvent(selectedEvent) {\n var modalOptions = {\n closeButtonText: 'Cancel',\n actionButtonText: 'Delete',\n headerText: 'Delete ?',\n bodyText: 'Are you sure you want to delete ?'\n };\n\n //confirm before delete\n modalService.showModal({}, modalOptions).then(function () {\n\n\n intakeEventsDataService.deleteEvent(selectedEvent.intake_event_id)\n .then(function () {\n notificationService.success('Event deleted successfully!');\n cancelCalendarEvent();\n }, function (rejectReason) {\n //alert(\"unable to delete\");\n if (rejectReason.status == 400) {\n notificationService.error('Event has not been deleted!');\n } else {\n notificationService.error('An error occurred. Please try later.');\n }\n\n });\n });\n }", "title": "" }, { "docid": "3028b09f631cabe5ba4d7b07fdd06a0c", "score": "0.53554875", "text": "function calendarioEliminarShow(dia, calendario_id, dpto, hora_ini, hora_fin, actividad, user_id_dpto, fecha) {\n //asignamos para la confirmacion\n document.forms['form_anular_actividad'].elements['departamento'].value = dpto;\n document.forms['form_anular_actividad'].elements['actividad'].value = actividad;\n document.forms['form_anular_actividad'].elements['hora_ini'].value = hora_ini;\n document.forms['form_anular_actividad'].elements['hora_fin'].value = hora_fin;\n document.forms['form_anular_actividad'].elements['user_id_dpto'].value = user_id_dpto;\n document.forms['form_anular_actividad'].elements['fecha'].value = fecha;\n\n //mostramos mensaje de confirmacion\n const res_conf = $('#div_resultado_listado_' + dia);\n const span_calendario = document.getElementById('span_calendario_' + calendario_id).innerHTML;\n\n const frm_anular = document.forms['form_anular_actividad'].elements['id'];\n frm_anular.value = calendario_id;\n\n msg = '<br><p>Esta Seguro de Eliminar esta Actividad?</p><p>' + span_calendario + '</p><button class=\"btn btn-danger btn-sm\" id=\"btn_lista_del_' + calendario_id + '\" onclick=\"calendarioEliminarSendUser(' + \"'\" + dia + \"','\" + calendario_id + \"'\" + ');\"><i class=\"nav-icon far fa-times-circle\"></i>&nbsp;&nbsp;Eliminar</button>';\n res_conf.html(msg);\n}", "title": "" }, { "docid": "8a9743f22e9902260091c05a589a4bce", "score": "0.53554314", "text": "function checkOrRemoveToDo(event) {\n\n let obj = event.target;\n let btn = obj.parentNode;\n let li = btn.parentNode;\n let task = li.getAttribute('id');\n let todos = [];\n\n //uncheck to-do\n if(obj.getAttribute('class') == \"far fa-check-circle\") {\n for (let i = 0; i < DATA.length; i++) {\n if(DATA[i].list = LIST) {\n todos = DATA[i].todos;\n for (let j = 0; j < todos.length; j++) {\n if(todos[j].task == task) {\n todos[j].check = false;\n DATA[i].todos = todos;\n localStorage.setItem('toDoList', JSON.stringify(DATA));\n\n obj.setAttribute('class', \"far fa-circle\");\n li.style.opacity = \"1\";\n li.style.textDecoration = \"none\";\n \n countCompleted();\n }\n } \n }\n }\n }\n\n //check to-do\n else if(obj.getAttribute('class') == \"far fa-circle\") {\n for (let i = 0; i < DATA.length; i++) {\n if(DATA[i].list = LIST) {\n todos = DATA[i].todos;\n for (let j = 0; j < todos.length; j++) {\n if(todos[j].task == task) {\n todos[j].check = true;\n DATA[i].todos = todos;\n localStorage.setItem('toDoList', JSON.stringify(DATA));\n\n obj.setAttribute('class', \"far fa-check-circle\");\n li.style.opacity = \"0.7\";\n li.style.textDecoration = \"line-through\";\n\n countCompleted();\n }\n } \n }\n }\n }\n\n\n //delete to-do\n if(obj.getAttribute('class') == \"fas fa-times\") {\n for (let i = 0; i < DATA.length; i++) {\n if(DATA[i].list == LIST) {\n todos = DATA[i].todos;\n for (let j = 0; j < todos.length; j++) {\n if(todos[j].task == task) {\n todos.splice(j, 1);\n DATA[i].todos = todos;\n localStorage.setItem('toDoList', JSON.stringify(DATA));\n\n li.remove();\n }\n }\n }\n \n }\n }\n}", "title": "" }, { "docid": "15b492586065672978c386fce2f45b3d", "score": "0.53548837", "text": "function handleEventClick(clickedInfo) {\n //opens modal that checks the confirm from the user to wants to delete this event\n setDeleteOpen(true);\n //sets the info from the event into state so it can be called on later\n SetClickInfo(clickedInfo);\n }", "title": "" }, { "docid": "2c892e7f2829ceb14ef0a25df2fa4f09", "score": "0.5347895", "text": "function deleteEventFromCalendar(i){\n var db = window.openDatabase(\"Database\", \"1.0\", \"Cordova Demo\", 2000000);\n db.transaction(queryDB_delete, errorCB, successCB); \n idDelete = i;\n }", "title": "" }, { "docid": "0be0a94f2095e5af43d8fffdafcd5e91", "score": "0.53440666", "text": "function calanderEventDetails() {\n\n $('#calendar .days li:not(.other-month) .event .event-desc').unbind('click');\n $('#calendar .days li:not(.other-month) .event .event-desc').click(function (event) {\n event.stopPropagation();\n var event_id = $(this).attr(\"data-event\");\n var pop_id = 'pop' + event_id;\n $('#' + pop_id).popup();\n $('#' + pop_id).popup('open');\n });\n}", "title": "" }, { "docid": "df61973d11434b7fd1b3e31728b76bd5", "score": "0.53415585", "text": "function deleteEvents($option,$idEvento,$idSerie){\n\t\t//Delete event by ajax\n\t\tconsole.log('id_recurso:' + $('select#recurse option:selected').val()+ ',grupo_id:' + $('select#selectGroupRecurse option:selected').val() + ',option:' + $option + ',idEvento:' + $idEvento+ ',idSerie:' + $idSerie);\n\t\t$.ajax({\n \t\ttype: \"POST\",\n\t\t\turl: \"delajaxevent\",\n\t\t\tdata: {'id_recurso':$('select#recurse option:selected').val(),'grupo_id':$('select#selectGroupRecurse option:selected').val(),'option':$option,'idEvento':$idEvento,'idSerie':$idSerie},\n \tsuccess: function(respuesta){\n\t\t\t \n\t\t\t $(respuesta).each(function(index,value){\n\t\t\t \t//Actualiza calendario en el front-end\n\t\t\t \t\n\t\t\t \tconsole.log($('#alert_msg').data('nh'));\n\t\t\t \t$('#alert_msg').data('nh',$('#alert_msg').data('nh')-1);\n\t\t\t \tconsole.log($('#alert_msg').data('nh'));\n\t\t\t \tif ($('#alert_msg').data('nh') < 12){\n\t\t\t\t\t\t\t$('#alert_msg').fadeOut('slow');}\n\t\t\t\t\t\n\t\t\t \t\n\t\t\t \t//deleteEventView(value.id);\t\n\t\t\t });\n\t\t\t $(\"#deleteOptionsModal\").modal('hide');\n\t\t\t\t\t$('#actionType').val('');\n\t\t\t $('#message').fadeOut('slow');\n\t\t\t printCalendar();\n\t\t },\n\t\t\terror: function(xhr, ajaxOptions, thrownError){\n\t\t\t\t\talert(xhr.status);\n\t \t\talert(thrownError);\n\t\t\t\t}\n \t\t});\n\t}", "title": "" }, { "docid": "5c06d4ee16a7d89134f44158c44d907f", "score": "0.5336057", "text": "excluiItemListaDeTarefa(event) {\n event.preventDefault();\n let elementoBotaoExcluir = event.target;\n let indiceLista = elementoBotaoExcluir.value;\n let informacaoView = new InformacaoView();\n let relogioHtml = this._inputRelogioTarefa;\n let htmlString = informacaoView.tarefaExcluidaTemplateInformacao(this._listaDeTarefa[parseInt(indiceLista)]);\n relogioHtml.innerHTML = htmlString;\n this._listaDeTarefa.splice(parseInt(indiceLista), 1);\n clearInterval(this._relogioTarefa);\n this.criaListaDeTarefaHtml();\n this.insereEventoBotaoIniciar();\n this.insereEventoBotaoPausar();\n this.insereEventoBotaoFinalizar();\n this.insereEventoBotaoEditar();\n this.insereEventoBotaoExcluir();\n }", "title": "" }, { "docid": "05ad6f0c4e569aa281192c9499c8e280", "score": "0.5326627", "text": "function deleteCheck(e){\n const item = e.target;\n \n // if the first class of the element clicked on is trash-btn\n if (item.classList[0] === 'trash-btn'){\n const todo = item.parentElement;\n todo.classList.add(\"fall\");\n removeLocalTodos(todo);\n //wait until animation ends then executes todo.remove().\n todo.addEventListener(\"transitionend\", function(){\n todo.remove();\n });\n \n }\n\n if (item.classList[0] === 'complete-btn'){\n const todo = item.parentElement;\n todo.classList.toggle(\"completed\");\n}\n\n}", "title": "" }, { "docid": "8cc8e2d1509cb386605079cf4eca11bc", "score": "0.5313493", "text": "function deleteEventData(event) {\n const params = {\n method: 'DELETE',\n contentType: 'application/json',\n url: meetupUrl,\n data: JSON.stringify(event),\n success: function(data) {\n getEventData(event.username, 'date');\n }\n }\n $.ajax(params);\n }", "title": "" }, { "docid": "9d6bdce4af53e5bc0208a66b2384adaf", "score": "0.5309145", "text": "function eliminarCurso(e) {\n \n console.log('desde eliminarCurso');//Verificar que el llamado a la funcion esta operativo\n console.log(e.target.classList);\n if(e.target.classList.contains('borrar-curso')) {\n console.log(e.target.getAttribute('data-id'));\n const cursoId = e.target.getAttribute('data-id');\n\n // Eliminar del arreglo articulosCarrito por el data-id\n articulosCarrito = articulosCarrito.filter( (curso) => curso.id !== cursoId);\n console.log(articulosCarrito);\n }\n carritoHTML();\n}", "title": "" }, { "docid": "590b36d453f4f7dee569132a2fba28c4", "score": "0.5308161", "text": "deleteEvent() {\n this.props.deleteEvent(this.state.eventBox.event_id);\n setTimeout(() => {\n this.props.fetchEvents(this.props.user.data.couple_id);\n }, 350);\n }", "title": "" }, { "docid": "90815a48bf9e910ff998a56f78020b51", "score": "0.53031945", "text": "deleteEvent(event) {\n const { collection } = this.state;\n const id = event._id;\n axios.delete(`/events/${id}`)\n .then((res) => {\n console.log(res.data); // eslint-disable-line no-console\n const newCollection = collection.filter((evnt) => evnt._id !== id);\n // update state so deleted event isn't displayed\n this.setState({\n collection: newCollection,\n });\n });\n }", "title": "" }, { "docid": "442d6df0a113fe51f012a509d8cb9ff8", "score": "0.5297508", "text": "function cerrarnota(evento){\n if (confirm(\"¿Estas seguro?\")) {\n txt = \"Sí\";\n var id = evento.target.parentNode.parentNode.id;\n for(var i =0;i<notas.length;i++){\n if(id==notas[i].id){\n notas.splice(i,1);\n }\n }\n document.getElementById(id).remove();\n sepuedecrear = false;\n localStorage.setItem(\"notas\", JSON.stringify(notas));\n } else { txt = \"No\"; }\n\n}", "title": "" }, { "docid": "24f97390b6baa9d62049c8177d94e16d", "score": "0.52935743", "text": "function calendarioEliminarSendUser(dia, calendario_id) {\n const token_send = document.forms['form_anular_actividad'].elements['csrfmiddlewaretoken'].value;\n const datos_send = {\n 'module_x': document.forms['form_anular_actividad'].elements['module_x'].value,\n 'operation_x': 'anular_actividad_user',\n 'csrfmiddlewaretoken': token_send,\n 'id': document.forms['form_anular_actividad'].elements['id'].value,\n 'dia': dia\n }\n\n const btn_el = document.getElementById('btn_lista_del_' + calendario_id);\n btn_el.disabled = true;\n\n const ruta_imagen2 = url_empresa + '/static/img/pass/loading.gif';\n const imagen_mo = '<img src=\"' + ruta_imagen2 + '\">';\n const div_conf = $('#div_resultado_listado_' + dia);\n div_conf.html(imagen_mo);\n\n let para_cargar = url_empresa;\n if (para_cargar != '') {\n para_cargar = url_empresa + '/';\n }\n\n div_conf.load(para_cargar, datos_send, function () {\n //verificamos por error\n if (document.getElementById('resultado_existe_error_' + dia)) {\n const ver_error = document.getElementById('resultado_existe_error_' + dia).value;\n if (ver_error == '1') {\n btn_el.disabled = false;\n }\n else {\n //recargamos el calendario\n const modalAct2 = $('#modalListado_' + dia);\n modalAct2.modal('hide');\n setTimeout(function () { sendSearchCalendario(); }, 1000);\n\n //send push\n //const perfil_dpto = document.forms['form_registrar_actividad'].elements['perfil_dpto'].value;\n const pfecha_user = document.forms['form_anular_actividad'].elements['fecha'].value;\n const pdepa_user = document.forms['form_anular_actividad'].elements['departamento'].value;\n const phora_ini_user = document.forms['form_anular_actividad'].elements['hora_ini'].value;\n const phora_fin_user = document.forms['form_anular_actividad'].elements['hora_fin'].value;\n const pactividad_user = document.forms['form_anular_actividad'].elements['actividad'].value;\n //const pdetalle_user = document.getElementById('span_confirmar_detalle').innerHTML;\n const token_user = document.forms['form_anular_actividad'].elements['csrfmiddlewaretoken'].value;\n const id_send = document.forms['form_anular_actividad'].elements['user_id_dpto'].value;\n\n const head = 'Reserva Eliminada';\n const body = 'Dpto: ' + pdepa_user + '\\nActividad: ' + pactividad_user + '\\nFecha: ' + pfecha_user + \"\\nHorario: \" + phora_ini_user + '-' + phora_fin_user;\n\n //console.log('id send: ', id_send);\n //console.log('body: ', body);\n\n //solo usuarios del sistema eliminan y mandan a los usuarios depa si corresponde\n if (id_send != '' && id_send != '0') {\n const url_push = document.forms['form_notificaciones'].elements['url_webpush'].value;\n\n const datos_push = {\n 'head': head,\n 'body': body,\n 'id': id_send,\n 'csrfmiddlewaretoken': token_user,\n }\n\n $(\"#div_push_result\").html('send push');\n $(\"#div_push_result\").load(url_push, datos_push, function () {\n //alert('push enviado');\n });\n }\n\n }\n }\n else {\n btn_el.disabled = false;\n }\n });\n}", "title": "" }, { "docid": "2e31ebae3372dffa75bc4703396f7068", "score": "0.52915585", "text": "function deleteEvent(selector) {\n\t\t// Find the url\n\t\tvar url = selector.attr(\"href\"),\n\t\t\tx = confirm('Are You sure?');\n\n\t\tif(x) {\n\t\t\t$.ajax({\n\t\t\t\ttype: \"GET\",\n\t\t\t\turl: url,\n\t\t\t\tsuccess: function(data) {\n\t\t\t\t\tvar messages = $(data).find(\"#message\");\n\t\t\t\t\t\n\t\t\t\t\tvar month = $(data).find(\"#info\").attr(\"data-month\"),\n\t\t\t\t\t\tyear = $(data).find(\"#info\").attr(\"data-year\");\n\n\t\t\t\t\t// Now update the calendar\n\t\t\t\t\trenderCal(month, year);\n\n\t\t\t\t\t// Display the messages to the user\n\t\t\t\t\t$(\"#messages\").html(messages);\n\t\t\t\t\tconsole.log(messages);\n\t\t\t\t},\n\t\t\t\terror: function(msg) {\n\t\t\t\t\tconsole.log(msg);\n\t\t\t\t}\n\t\t\t});\n\t\t} \n\t}", "title": "" }, { "docid": "79a65594480adff82b888e6d49c879c9", "score": "0.5270688", "text": "function eliminardelcarrito(e){\n e.preventDefault(); \n let curso;\n let cursoid;\n\n if (e.target.classList.contains('borrar-curso')){\n e.target.parentElement.parentElement.remove();\n curso = e.target.parentElement.parentElement;\n cursoid = curso.querySelector('a').getAttribute('data-id');\n console.log(cursoid);\n }\n\n eliminarcursodelocalstorage(curso);\n\n}", "title": "" }, { "docid": "fbb230c0e6a1e3ad92ef397d6b662379", "score": "0.5250989", "text": "function new_event(event) {\n //if delete appointment dialog is open , then close it\n $(\"#deldialog\").hide(250);\n // if a date isn't selected then do nothing\n if ($(\".active-date\").length === 0)\n return;\n // remove red error input on click\n $(\"input\").click(function () {\n $(this).removeClass(\"error-input\");\n })\n\n\n // empty inputs and hide events\n $(\"#dialog input[type=text]\").val('');\n $(\"#dialog input[type=number]\").val('');\n $(\".events-container\").hide(250);\n\n $('#updateDlgHd').text('Add New Appointment');\n $(\"#dialog\").show(250);\n // Event handler for cancel button\n $(\"#cancel-button\").click(function () {\n //$(\"#name\").removeClass(\"error-input\");\n $(\"#count\").removeClass(\"error-input\");\n $(\"#dialog\").hide(250);\n $(\"#deldialog\").hide(250);\n $(\".events-container\").show(250);\n });\n // Event handler for ok button\n $(\"#ok-button\").unbind().click({date: event.data.date}, function () {\n var date = event.data.date;\n //var name = $(\"#name\").val().trim();\n var time = $(\"#time\").val().trim();\n var invitedCount = parseInt($(\"#count\").val().trim());\n\n var day = parseInt($(\".active-date\").html());\n const choiceDate = `${date.getFullYear()}-${date.getMonth() + 1}-${day}`;\n\n if (checkDate(choiceDate, time)) {\n return;\n }\n\n if (isNaN(invitedCount) || invitedCount < 1) {\n $(\"#count\").addClass(\"error-input\");\n alert('Number of slots must be positive integer')\n }\n else if (isNaN(invitedCount) || invitedCount > 20) {\n $(\"#count\").addClass(\"error-input\");\n alert('The range of slots must be 0~20')\n }\n else {\n $(\"#dialog\").hide(250);\n $(\"#deldialog\").hide(250);\n\n\n const data = {\n day,\n invitedCount,\n time,\n year: date.getFullYear(),\n month: date.getMonth() + 1,\n type: $('#type').val()\n }\n data.centerId = $('#centerId').val();\n doPost(['/hc/appointments', JSON.stringify(data)], (rlt) => {\n console.info('rlt', rlt)\n refreshData()\n date.setDate(day);\n init_calendar(date);\n })\n }\n });\n}", "title": "" }, { "docid": "d397b3307397ac8a889c7d8d00cd7801", "score": "0.52503884", "text": "function deleteEvent(dbEventId){\n // delete event from parent Team container\n Event.findById(dbEventId).exec(function(err,event){\n if(err){\n console.log(err);\n } else {\n Team.findByFbId(event.hostId).exec(function(err,team){\n if(err) {\n console.log(err);\n } else {\n var index = team[0].events.indexOf(dbEventId);\n team[0].events.splice(index, 1);\n team[0].save(function(){\n Event.findByIdAndRemove(dbEventId,function(err, eventObj){\n if(err){\n console.log(err);\n // if eventObj exists \n } if(eventObj){\n console.log(dbEventId + \" event removed successfully\");\n } else {\n console.log(dbEventId + \" EVENT DOES NOT EXIST\");\n }\n });\n });\n }\n });\n }\n });\n}", "title": "" }, { "docid": "c6b8b6521fc6dac1dce54f5376c4bd73", "score": "0.5247124", "text": "function del_cal_event_from_rcdb() {\n var spreadsheet = SpreadsheetApp.getActive();\n var ss = SpreadsheetApp.getActiveSpreadsheet();\n var ui = SpreadsheetApp.getUi();\n\n var reviewCalendar = CalendarApp.getCalendarById('izettle.com_d7p21j601qoq1rih87qnhch9lc@group.calendar.google.com');\n\n var rcdb = ss.getSheetByName('Renewal_Calendar_DB');\n var rcdbOrigLr = rcdb.getLastRow();\n var rcdbOrigLc = rcdb.getLastColumn();\n var rcdbTitleColumnArr = rcdb.getRange(1, 1, 1, rcdbOrigLc).getValues();\n var rcdbTcaOned = flatten_arr(rcdbTitleColumnArr);\n var rcdbIdColPos = find_col(rcdbTcaOned, 'SL-ID');\n var rcdbAppColPos = find_col(rcdbTcaOned, 'Application');\n var rcdbNotPerEvIdColPos = find_col(rcdbTcaOned, 'Notice Period Event');\n var rcdbLasNotDayEvIdColPos = find_col(rcdbTcaOned, 'Last Notice Day Event');\n var rcdbContEndDateEvIdColPos = find_col(rcdbTcaOned, 'Contract End Date');\n var rcdbCreationDateColPos = find_col(rcdbTcaOned, 'Creation Date');\n var rcdbCommitEditsColPos = find_col(rcdbTcaOned, 'Commit Edits?');\n\n var rcdbIdArr = rcdb.getRange(2, rcdbIdColPos, rcdbOrigLr, 1).getValues();\n var rcdbIdArrOned = flatten_arr(rcdbIdArr);\n\n var rcdbIdArrRowAdj = 2;\n\n for (var dd = 0; dd < rcdbIdArrOned.length; dd++) {\n var rcdbIdRow = dd + rcdbIdArrRowAdj;\n var rcdbCommitEditValue = rcdb.getRange(rcdbIdRow, rcdbCommitEditsColPos, 1, 1).getValue();\n\n if (rcdbCommitEditValue == 'Y' || rcdbCommitEditValue == 'y' || rcdbCommitEditValue == 'yes' || rcdbCommitEditValue == 'Yes') {\n logs_tst('Commit Edits column indicates that this event should be deleted.');\n var npeId = rcdb.getRange(rcdbIdRow, rcdbNotPerEvIdColPos, 1, 1).getValue();\n var lndeId = rcdb.getRange(rcdbIdRow, rcdbLasNotDayEvIdColPos, 1, 1).getValue();\n var cedId = rcdb.getRange(rcdbIdRow, rcdbContEndDateEvIdColPos, 1, 1).getValue();\n reviewCalendar.getEventById(npeId).deleteEvent();\n reviewCalendar.getEventById(lndeId).deleteEvent();\n reviewCalendar.getEventById(cedId).deleteEvent();\n logs_tst('All events have been deleted for this application');\n rcdb.deleteRow(rcdbIdRow);\n --rcdbIdArrRowAdj;\n }\n else {\n logs_tst('Commit Edits column indicates that this event should NOT be deleted.');\n continue;\n }\n }\n}", "title": "" }, { "docid": "d5090ff6a8f221d7d496656c78063819", "score": "0.5247022", "text": "function eliminarcurso(e){\n e.preventDefault()\n let curso, cursoid\n if(e.target.classList.contains('borrar-curso')){\n e.target.parentElement.parentElement.remove()\n curso = e.target.parentElement.parentElement\n cursoid = curso.querySelector('a').getAttribute('data-id')\n }\n eliminarcursols(cursoid)\n carritonotificaciones()\n carritototal()\n}", "title": "" }, { "docid": "5954f123fb70d15da6937d3b0bd552e1", "score": "0.524695", "text": "function deleteCheck(e) {\n const item = e.target;\n //Delete todo\n if(item.classList[0]=== 'trash-btn'){\n const todo = item.parentElement;\n //Animation items 'falls' away\n todo.classList.add('fall');\n todo.addEventListener('transitionend', function(){\n todo.remove();\n });\n \n }\n //Check mark\n if(item.classList[0]==='complete-btn'){\n const todo =item.parentElement;\n todo.classList.toggle('completed');\n }\n}", "title": "" }, { "docid": "afd250771243ce6c4b4958babc58fb9f", "score": "0.52403885", "text": "function loadAccountTimeSheet(events) {\n var date = new Date();\n $('#calendar').fullCalendar({\n header: {\n left: 'prev,next today',\n center: 'title',\n //right: 'agendaWeek'\n },\n defaultDate: date,\n allDayDefault: false,\n defaultView: 'agendaWeek',\n editable: true,\n selectable: true,\n selectHelper: true,\n select: function (start, end) {\n console.log(\"select start:\" + start + \" end:\" + end);\n createTempTimeSheetData(createTimesheetVOWithDateRange(start, end));\n $('#timesheetDialog').dialog(\"open\");\n },\n //axisFormat: 'HH:mm',\n timeFormat: {\n agenda: 'HH:mm'\n },\n minTime: \"08:00:00\",\n maxTime: \"20:00:00\",\n events: events,\n eventClick: function (event, jsEvent, view) {\n console.log(\"id: \" + event.id);\n console.log(\"pid: \" + event.pid);\n console.log(\"title : \" + event.title);\n\n loadTimeSheetData(event);\n $('#timesheetDialog').dialog(\"open\");\n },\n eventDragStop: function (event, jsEvent, ui, view) {\n console.log('eventDragStop');\n console.log('id:' + event.id + ' pid = ' + event.pid);\n if (isElemOverDiv()) {\n //console.log('pid = ' + event.pid);\n deleteTimesheet(event.pid);\n $('#calendar').fullCalendar('removeEvents', event.id);\n }\n },\n eventResize: function( event, delta, revertFunc, jsEvent, ui, view ) {\n console.log(\"eventResize\");\n }\n });\n\n function isElemOverDiv() {\n console.log(\"isElemOverDiv\");\n var trashEl = $('#calendarTrash');\n\n var ofs = trashEl.offset();\n\n var x1 = ofs.left;\n var x2 = ofs.left + trashEl.outerWidth(true);\n var y1 = ofs.top;\n var y2 = ofs.top + trashEl.outerHeight(true);\n\n if (currentMousePos.x >= x1 && currentMousePos.x <= x2 &&\n currentMousePos.y >= y1 && currentMousePos.y <= y2) {\n return true;\n }\n return false;\n }\n\n //Change calendar view to agendaWeek, default is month\n //$('#calendar').fullCalendar('changeView', 'agendaWeek');\n}", "title": "" }, { "docid": "f4002e1dfc44f8153999ea8474e5bdf5", "score": "0.5218036", "text": "deleteOrMark(e) {\n if (e.target.className === 'destroy') {\n RepairList.deleteRepair(e);\n return;\n } else if (e.target.className === 'toggle') {\n RepairList.markAsComplete(e);\n return;\n }\n }", "title": "" }, { "docid": "16893456dc97534bd6a7f2ff66be8956", "score": "0.5216074", "text": "function addCalendarEvent() {\n $('#addBtn').slideToggle();\n $('#eventForm').slideToggle();\n let eventType = $('#calendarType').val();\n\n /**\n * Shows the different options for making a calendar event by type.\n * @param {String} type Calendar Event Type\n */\n const showBasedOnType = (type) => {\n if (type == 'homework') {\n $('#homeworkTypeSelect').show();\n $('#eventTimeSelect').hide();\n\n // Removes the alert\n if ($('#eventForm').find('[data-alert=\"empty-event-type\"]').length > 0)\n $('[data-alert=\"empty-event-type\"]').remove();\n } else if (type == 'event') {\n let date = new Date();\n $('#eventTimeSelect').show();\n $('#homeworkTypeSelect').hide();\n $('#eventTime').val(`${date.getHours()}:${date.getMinutes()}`);\n\n // Removes the alert\n if ($('#eventForm').find('[data-alert=\"empty-event-type\"]').length > 0)\n $('[data-alert=\"empty-event-type\"]').remove();\n } else {\n $('#homeworkTypeSelect').hide();\n $('#eventTimeSelect').hide();\n }\n };\n\n /**\n * Contains handlers for adding events in the planner.\n * @param {String} type\n */\n const addEvent = (type) => {\n /**\n * Handles homework events.\n */\n const homeworkHandler = () => {\n // Get input value\n const hwName = $('input#nameInput').val();\n const hwDueDate = $('#dayDetails').attr('data-date').split('-').join('/');\n const hwType = $('input[name=\"hwType\"]:checked').val();\n\n // Check for value of radios\n if ($('input[name=\"hwType\"]:checked').length > 0) {\n // Remove the alert\n if (\n $('#eventForm').find('[data-alert=\"empty-homework-type\"]').length > 0\n )\n $('[data-alert=\"empty-homework-type\"]').remove();\n } else {\n const emptyAlert = $(\n '<div data-alert=\"empty-homework-type\" class=\"alert alert-danger\" role=\"alert\">Please select the homework type</div>'\n );\n if (\n $('#eventForm').find('[data-alert=\"empty-homework-type\"]').length <= 0\n )\n $('#eventForm').append(emptyAlert);\n }\n\n if (hwName == '' || hwDueDate == '' || hwType == undefined) return;\n\n const Homework = {\n name: hwName,\n dueDate: hwDueDate,\n type: hwType,\n };\n console.log(Homework);\n\n // Append homework to #dayDetails list\n $('#schoolWorkList').append(\n $(\n `<li class=\"school-work-item\">${Homework.name} (${Homework.type} Grade)</li>`\n )\n );\n $('#noContent').hide();\n $('#schoolWorkDiv').show();\n\n // Store homework in localStorage\n homeworks.push(Homework);\n localStorage.setItem('homeworks', JSON.stringify(homeworks));\n\n // console.log('homework handled');\n };\n\n /**\n * Handles Planner Events.\n */\n const plannerEventsHandler = () => {\n // Get the input value\n const eventName = $('input#nameInput').val();\n const eventDate = $('#dayDetails').attr('data-date').split('-').join('/');\n const eventTime = $('input#eventTime').val();\n\n // Append event to #dayDetails list\n const Event = {\n name: eventName,\n date: eventDate,\n time: eventTime,\n };\n $('#eventsList').append(\n $(`<li class=\"planner-event-item\">${Event.name} at ${Event.time}</li>`)\n );\n $('#noContent').hide();\n $('#eventsDiv').show();\n\n // Store event in localStorage\n plannerEvents.push(Event);\n localStorage.setItem('plannerEvents', JSON.stringify(plannerEvents));\n console.log('event handled');\n };\n\n /**\n * Handler when event type is empty\n */\n const emptyHandler = () => {\n const emptyAlert = $(\n '<div data-alert=\"empty-event-type\" class=\"alert alert-danger\" role=\"alert\">Please select the event type</div>'\n );\n if ($('#eventForm').find('[data-alert=\"empty-event-type\"]').length <= 0)\n $('#eventForm').append(emptyAlert);\n //TODO focus on #calendarType\n };\n\n switch (type) {\n case 'empty':\n emptyHandler();\n break;\n case 'homework':\n homeworkHandler();\n break;\n case 'event':\n plannerEventsHandler();\n break;\n default:\n emptyHandler();\n break;\n }\n };\n\n /**\n * Emptys any planner event handlers when modal is closed.\n */\n const closeHandler = () => {\n // console.log('Modal was closed.');\n $('select#calendarType').val('empty');\n $('input#nameInput').val('');\n $('input[type=radio]:checked').prop('checked', false);\n $('#homeworkTypeSelect').hide();\n $('#eventTimeSelect').hide();\n $('#addBtn').slideToggle();\n $('#eventForm').slideToggle();\n };\n\n /**\n * Event listener for calendar type select dropdown.\n */\n $('#calendarType').change(() => {\n try {\n eventType = $('#calendarType').val();\n showBasedOnType(eventType);\n } catch (error) {\n console.error(error);\n }\n });\n $('#addEventBtn').click(() => {\n addEvent(eventType);\n });\n $('#dayDetails').on('hide.bs.modal', closeHandler);\n\n // if (eventType == 'empty' || eventType == '') return;\n}", "title": "" }, { "docid": "111692da2125bfecb0ff93f47eee33d3", "score": "0.5213608", "text": "clickEventBubbleDeleteButton() {\n this.debug && console.info('clickEventBubbleDeleteButton');\n var deleteEventButton = document.querySelector('[aria-label=\"Delete event\"]');\n this.debug && console.log('deleteEventButton:', deleteEventButton);\n deleteEventButton.click();\n }", "title": "" }, { "docid": "7dc32d89829eb9c6d27896062d52909b", "score": "0.5210994", "text": "function deleteToDo(event) {\n const btn = event.target; // button to remove. to find, already do console.log(event), and console.dir(event.target);and .parentNode\n const li = btn.parentNode; // make li to delete\n toDoList.removeChild(li); //remove child li\n const cleanToDos = toDos.filter(function(toDo) {\n // filter execute for every item on the list\n return toDo.id !== parseInt(li.id); //console.log(toDo.id, li.id); and checked li.id is string. parseInt(); makes string to number\n }); //filter runs some function and it runs with each of items\n toDos = cleanToDos; //console.log(cleanToDos); and checked\n saveToDos(); // it saves toDos\n}", "title": "" }, { "docid": "7969a4da0885fb803eab51b6ecb53287", "score": "0.5209728", "text": "function eliminaCurso(e){\n // console.log(\"desde eliminar curso.\");\n // console.log(e.target.classList);\n if(e.target.classList.contains('borrar-curso')){\n // console.log(e.target.getAttribute('data-id'));\n\n const cursoId = e.target.getAttribute('data-id');\n\n // elimina del arreglo de articulos por el data-id\n articulosCarrito = articulosCarrito.filter( curso =>curso.id !== cursoId);\n // console.log(articulosCarrito);\n\n carritoHTML(); /* iterar sobre el carrito y mostrar su HTML */\n }\n}", "title": "" }, { "docid": "7370a0891b503c43deaa150afbca63b2", "score": "0.5206331", "text": "comprouDados(element) {\n return element.event === \"comprou\"\n }", "title": "" }, { "docid": "1ca9d3447cffdb7b93bc89f0e4854569", "score": "0.5205467", "text": "function eventoRestarCantidad (e) {\n if (localStorage.getItem(\"carritoDeCompras\") != undefined){\n const listaDeElementosElegidos = JSON.parse(localStorage.getItem(\"carritoDeCompras\"));\n for (let i=0; i<listaDeElementosElegidos.length; i++){\n if (listaDeElementosElegidos[i].id == e.target.getAttribute(\"producto_id\")){\n listaDeElementosElegidos[i].cantidad --\n }\n }\n const listaFiltrada = listaDeElementosElegidos.filter(objeto => objeto.cantidad > 0 );\n localStorage.setItem(\"carritoDeCompras\",JSON.stringify(listaFiltrada));\n //oculto y mustro la lista para poder tener actualizada\n this.mostrarCarrito ()\n this.mostrarCarrito ()\n }\n }", "title": "" }, { "docid": "b9e338acd13b7870aa7cb4f6c9931f83", "score": "0.51979", "text": "function gestisciClickSuListaGiocatori(){\n //Recupero l'indice di un eventuale giocatore già toccato in lista\n giocatoreMostrato = $('.full_database .player_card.selected');\n var indiceGiocatoreMostrato = $('.full_database .player_card').index(giocatoreMostrato);\n\n var giocatoreCliccato = $(this);\n var indiceGiocatoreCliccato = $('.full_database .player_card').index(giocatoreCliccato);\n\n //Se il giocatore è diverso da quello già selezionato\n //elabora la card\n if (indiceGiocatoreMostrato != indiceGiocatoreCliccato) {\n giocatoreMostrato.removeClass('selected');\n giocatoreCliccato.addClass('selected');\n var figliAreaRisultati = ($('#result_area').get(0).childElementCount);\n if (figliAreaRisultati == 3 ) {\n $('#result_area > .player_card').remove();\n }\n $('.warning').removeClass('active');\n stampaASchermoGiocatoreDa(indiceGiocatoreCliccato, databaseGiocatori);\n }\n\n}", "title": "" }, { "docid": "c32818e9c63f7a647271a543411e2bf4", "score": "0.51962996", "text": "function eliminarCurso(e)\n{\nconsole.log(e.target.classList);\nif(e.target.classList.contains(\"borrar-curso\"))\n{\n const cursoId=e.target.getAttribute('data-id');\n \n // como eliminar del arreglo de articulosCarrito por el data-id\n \n // con filter nos retornara todos los articulos que cumplan con la condicion , en este caso sera la que no sea igual al id del que tenemos \n articulosCarrito=articulosCarrito.filter((curso)=>\n {\n return curso.id!==cursoId;\n })\n \n carritoHtml(); //iterar sobre el carrito y mostrar el html\n\n}\n}", "title": "" }, { "docid": "6dddff1ea95ca66a04564321dda9151e", "score": "0.5194208", "text": "function eliminarCurso (e) {\r\n if(e.target.classList.contains(\"borrar-curso\")){\r\n const cursoId = e.target.getAttribute(\"data-id\");\r\n\r\n //elimina del arreglo de articulosCarrito por el data-id\r\n articulosCarrito = articulosCarrito.filter ( curso => curso.id !== cursoId);\r\n carritoHTML(); // iterar sobre el carrito y mostrar su html \r\n }; \r\n}", "title": "" }, { "docid": "647fffc7dc19fe21215dace908eaaaec", "score": "0.5191662", "text": "function main() {\n var calendar_name = 'Work';\n var event_names = 'work';\n var date_to_process = new Date(); // today is new Date() maybe I should use yesterday in the early morning\n var search_term_enter = 'entered'; // should actually be work or uni or something\n var search_term_exit = 'exited';\n var i=0; // counter\n var event_title_to_create = 'Working at Capsicum Office';\n \n // get calendar matching name\n var calendar_var = get_calendar(calendar_name); //process_calendar_information(calendar_name);\n \n // get events from calendar matching words\n var matching_enter_events = get_events_for_day(calendar_var, date_to_process, search_term_enter);\n var matching_exit_events = get_events_for_day(calendar_var, date_to_process, search_term_exit);\n \n // does not work for overnight\n while (matching_enter_events.length>i && matching_exit_events.length>i){\n calendar_var.createEvent(event_title_to_create, matching_enter_events[i].getStartTime(), matching_exit_events[i].getStartTime());\n Logger.log('Event created called '+event_title_to_create+' from '+matching_enter_events[i].getStartTime() +' to '+matching_exit_events[i].getStartTime());\n i++;\n\n }\n\n // delete time stamps\n if (matching_enter_events.length == matching_exit_events.length && matching_exit_events.length>0){\n i=matching_enter_events.length-1;\n while (i>-1){\n matching_enter_events[i].deleteEvent();\n matching_exit_events[i].deleteEvent();\n Logger.log('time stamps deleted');\n \n i--;\n }\n }\n}", "title": "" }, { "docid": "d346add196a53a4c9ae1b309bdce53c7", "score": "0.51913625", "text": "function addEvents() {\r\n // This event is fired when the user remove an item from the list\r\n [...document.querySelectorAll(\".done-button\")].forEach((element) => {\r\n element.addEventListener(\"click\", (e) => {\r\n removeItemFromNodeAndArray(e.target);\r\n });\r\n });\r\n}", "title": "" }, { "docid": "17f830f67ac7cee0ec82c636f33ee7a5", "score": "0.5189845", "text": "function student_cancel_meeting(userId, meetingId){\n var over = document.createElement(\"div\");\n over.classList.add(\"old_cancel_over\"); \n var massage = document.createElement(\"div\");\n massage.innerHTML = \"האם אתה בטוח <br>שאתה רוצה <br> לבטל את הפגישה הזו?\";\n massage.classList.add(\"old_cancel\"); \n var btn_yes = document.createElement(\"button\"); \n btn_yes.innerHTML = \"כן\";\n btn_yes.classList.add(\"old_butten_cancel_yes\");\n var btn_no = document.createElement(\"button\"); \n btn_no.innerHTML = \"לא\";\n btn_no.classList.add(\"old_butten_cancel_no\");\n btn_yes.onclick = function(){\n \n \n //meeting can be taken again\n db.collection('meetings').doc(meetingId).update({\n taken: '0',\n elderPageInfo: ''}).then(() => {\n //delete from student meeting list\n db.collection('users').doc(userId).update({meetingList: firebase.firestore.FieldValue.arrayRemove(meetingId)});\n }).then(() => {\n window.location.href = '/student_page.html';\n });\n\n \n\n \n\n };\n btn_no.onclick = function(){massage.remove();\n btn_yes.remove();\n over.remove();\n btn_no.remove()};\n document.body.appendChild(over); \n document.body.appendChild(massage);\n document.body.appendChild(btn_no);\n document.body.appendChild(btn_yes); \n }", "title": "" }, { "docid": "c0895a9729a6b904934b9172ece41b64", "score": "0.5184182", "text": "function verificaDia(){\r\n\t\tvar dia = new Date().toLocaleDateString();\r\n\t\t//verifica se já existe\r\n\t\t$scope.calendario.$loaded(function(){\r\n\t\t\tangular.forEach($scope.calendario, function(k, v){\r\n\t\t\t\tconsole.log('kdia', k.dia)\r\n\t\t\t\tconsole.log('dia', dia)\r\n\t\t\t\tif (k.dia == dia) {\r\n\t\t\t\t\tconsole.log('on if') \r\n\t\t\t\t\t$scope.regDia = $scope.calendario.$getRecord(k.$id)\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t//se não, cria um novo\r\n\t\t\tif (!$scope.regDia) {\r\n\t\t\t\t$scope.calendario.$add({ timer: 0, dia: dia }).then(function(ref){\r\n\t\t\t\t\t$scope.regDia = $scope.calendario.$getRecord(ref.key());\r\n\t\t\t\t})\t\t\t\t\t\r\n\t\t\t}\r\n\t\t})\r\n\t}", "title": "" }, { "docid": "bbaa8388fc176ec4733b5e6e2331b1fd", "score": "0.5182295", "text": "function calendarEventEditShow (month_schedule, date_shown, i) {\n var ce_id\n var url_action\n\n if (i < 0) { // nuevo evento\n $('#calendarevent_edit h1').html('Nuevo Evento')\n $('#button_calendarevent_delete').hide()\n ce_id = 0\n $('input[name=id]').val(ce_id)\n $('input[name=date]').val(date_shown.format('YYYY-MM-DD'))\n $('#eventdatepicker').val(date_shown.format('dddd, D MMMM YYYY'))\n $('select[name=type]').val('GROUP')\n $('input[name=short_description]').val('')\n $('select[name=staff_id]').val(2) // not assigned yet\n $('select[name=secondstaff_id]').val(2) // not assigned yet\n $('select[name=time]').val('10:00:00')\n $('select[name=duration]').val('04:00:00')\n $('input[name=capacity]').val(24)\n $('input[name=invitation_link]').val('')\n $('textarea[name=info]').val('')\n url_action = 'ce_new'\n } else {\n $('#calendarevent_edit h1').html('Editar Evento')\n $('#button_calendarevent_delete').show()\n ce_id = month_schedule[i].id\n $('input[name=id]').val(ce_id)\n $('input[name=date]').val(month_schedule[i].date)\n $('#eventdatepicker').val(date_shown.format('dddd, D MMMM YYYY'))\n $('select[name=type]').val(month_schedule[i].type)\n $('input[name=short_description]').val(month_schedule[i].short_description)\n $('select[name=staff_id]').val(month_schedule[i].staff_id)\n $('select[name=secondstaff_id]').val(month_schedule[i].secondstaff_id)\n $('select[name=time]').val(month_schedule[i].time)\n $('select[name=duration]').val(month_schedule[i].duration)\n $('input[name=capacity]').val(month_schedule[i].capacity)\n $('input[name=invitation_link]').val(month_schedule[i].invitation_link)\n $('textarea[name=info]').val(month_schedule[i].info)\n url_action = 'ce_edit'\n }\n updateUrl(parts, '/admin/bookings/calendarevent', moment($('input[name=date]').val()), url_action, i)\n showSection('#calendarevent_edit')\n}", "title": "" }, { "docid": "a0a9ec1148c9404c6c329af325e74f8c", "score": "0.51815885", "text": "function eliminarCurso(e) {\n e.preventDefault();\n\n let curso, cursoId;\n\n if (e.target.classList.contains(\"borrar-curso\")) {\n e.target.parentElement.parentElement.remove();\n curso = e.target.parentElement.parentElement;\n cursoId = curso.querySelector(\"a\").getAttribute(\"data-id\");\n eliminarLocalStorge(cursoId);\n }\n}", "title": "" }, { "docid": "e26302a0da239f31fd246bcc3d1fe259", "score": "0.5181578", "text": "function renderEvent(doc){\n let li = document.createElement('li');\n let Todo = document.createElement('span');\n let Start_Time = document.createElement('span');\n let End_Time = document.createElement('span');\n let cross = document.createElement('div');\n\n let p=Start_Time;\n\n li.setAttribute('data-id', doc.id);\n Todo.textContent = doc.data().Todo;\n Start_Time.textContent = doc.data().Start_Time;\n End_Time.textContent = doc.data().End_Time;\n cross.textContent = 'x';\n\n li.appendChild(Todo);\n li.appendChild(Start_Time);\n li.appendChild(End_Time);\n\n li.appendChild(cross);\n\n EventList.appendChild(li);\n\n //deletind data\n cross.addEventListener('click', (e) => {\n e.stopPropagation();\n let id = e.target.parentElement.getAttribute('data-id');\n db.collection('Events').doc(id).delete();\n })\n}", "title": "" }, { "docid": "8ddc70e2e99ac17d0df51553b999ee70", "score": "0.51803714", "text": "function auxiliarEventosRecomendados(categoria, indice) {\r\n let podeSeguir = false\r\n // console.log('atatatatatatatatatata')\r\n // console.log(tagsProcurar.length)\r\n for (let j = 0; j < tagsProcurar.length; j++) {\r\n console.log(tagsProcurar)\r\n if (tagsProcurar[j] != undefined && tagsProcurar[j].nome.toUpperCase() == categoria.toUpperCase()) {\r\n podeSeguir = true\r\n // console.log('sinhe')\r\n }\r\n }\r\n\r\n if (eventosFiltrados.length == 0 && podeSeguir == true) {\r\n // console.log('ata')\r\n eventosFiltrados.push(eventos[indice])\r\n }\r\n else if (eventosFiltrados.length > 0 && podeSeguir == true) {\r\n let confirmarEvento = eventosFiltrados.find(function (evento) {\r\n return evento.id == eventos[indice].id\r\n })\r\n\r\n if (confirmarEvento == undefined) eventosFiltrados.push(eventos[indice])\r\n // console.log('atatatatatatatatatata')\r\n }\r\n\r\n // console.log(eventosFiltrados)\r\n}", "title": "" } ]
afe8774154337ec34602066721331056
Invokes the update lifecycles and returns false if it shouldn't rerender.
[ { "docid": "fa6220fb5c263c436f205d3a16ba8203", "score": "0.0", "text": "function updateClassInstance(current, workInProgress, ctor, newProps, renderExpirationTime) {\n var instance = workInProgress.stateNode;\n\n var oldProps = workInProgress.memoizedProps;\n instance.props = workInProgress.type === workInProgress.elementType ? oldProps : resolveDefaultProps(workInProgress.type, oldProps);\n\n var oldContext = instance.context;\n var contextType = ctor.contextType;\n var nextContext = emptyContextObject;\n if (typeof contextType === 'object' && contextType !== null) {\n nextContext = readContext(contextType);\n } else if (!disableLegacyContext) {\n var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);\n }\n\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function';\n\n // Note: During these life-cycles, instance.props/instance.state are what\n // ever the previously attempted to render - not the \"current\". However,\n // during componentDidUpdate we pass the \"current\" props.\n\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {\n if (oldProps !== newProps || oldContext !== nextContext) {\n callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);\n }\n }\n\n resetHasForceUpdateBeforeProcessing();\n\n var oldState = workInProgress.memoizedState;\n var newState = instance.state = oldState;\n var updateQueue = workInProgress.updateQueue;\n if (updateQueue !== null) {\n processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime);\n newState = workInProgress.memoizedState;\n }\n\n if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidUpdate === 'function') {\n if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.effectTag |= Update;\n }\n }\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.effectTag |= Snapshot;\n }\n }\n return false;\n }\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n newState = workInProgress.memoizedState;\n }\n\n var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);\n\n if (shouldUpdate) {\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {\n startPhaseTimer(workInProgress, 'componentWillUpdate');\n if (typeof instance.componentWillUpdate === 'function') {\n instance.componentWillUpdate(newProps, newState, nextContext);\n }\n if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);\n }\n stopPhaseTimer();\n }\n if (typeof instance.componentDidUpdate === 'function') {\n workInProgress.effectTag |= Update;\n }\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n workInProgress.effectTag |= Snapshot;\n }\n } else {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidUpdate === 'function') {\n if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.effectTag |= Update;\n }\n }\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.effectTag |= Snapshot;\n }\n }\n\n // If shouldComponentUpdate returned false, we should still update the\n // memoized props/state to indicate that this work can be reused.\n workInProgress.memoizedProps = newProps;\n workInProgress.memoizedState = newState;\n }\n\n // Update the existing instance's state, props, and context pointers even\n // if shouldComponentUpdate returns false.\n instance.props = newProps;\n instance.state = newState;\n instance.context = nextContext;\n\n return shouldUpdate;\n}", "title": "" } ]
[ { "docid": "32003e4da6b34aa95b39bb5407e3746b", "score": "0.73004746", "text": "shouldComponentUpdate() {\n return this.shouldUpdate\n }", "title": "" }, { "docid": "0f2f6e821b07d553f3073be1e5b7b89d", "score": "0.7289543", "text": "shouldComponentUpdate (...args) {\n return shouldComponentUpdate.apply(this, args)\n }", "title": "" }, { "docid": "e39fc1e906f6c4cc00f93a8d9c4339de", "score": "0.7286149", "text": "notifyUpdate() {\n if (this._updateCallback != null) {\n this._updateCallback(this);\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "e349e0f13ca6ac33c937bf4f113b8c3f", "score": "0.72779095", "text": "shouldComponentUpdate() {\n // console.log('update');\n return true;\n }", "title": "" }, { "docid": "f1f7c30a949521ea1a26f5e7a38f1a9e", "score": "0.7141763", "text": "shouldComponentUpdate() {\n\t\tconsole.log(\"Fifth Steps: shouldComponentUpdate\");\n\t\treturn true;\n\t}", "title": "" }, { "docid": "8c130fbb3e751364b14146b433056252", "score": "0.7095194", "text": "shouldComponentUpdate() {\n\n }", "title": "" }, { "docid": "3f4b98a076a1c151d092ac8f7e8a941e", "score": "0.7031335", "text": "shouldComponentUpdate() {\n return true;\n }", "title": "" }, { "docid": "eb4680c9e39a4095f1cbe169366cf2ba", "score": "0.70007527", "text": "shouldRerender () { return false }", "title": "" }, { "docid": "7a80cbb19b866a5d7dcf609f108a91f3", "score": "0.69990176", "text": "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 }", "title": "" }, { "docid": "834381088fc393ef8c620006d87e9cd8", "score": "0.6958979", "text": "shouldComponentUpdate () {\n var returnStatus = true\n if (!this.state) {\n returnStatus = false\n }\n console.log('shouldcomponentUpdate ' + returnStatus)\n return returnStatus\n }", "title": "" }, { "docid": "dc43991e199a341af9aabd1b9239797a", "score": "0.69581413", "text": "shouldComponentUpdate(){\n console.log(\"updated C\")\n return true\n }", "title": "" }, { "docid": "511c343d4b3187fa6a4c3fcbb59e06ee", "score": "0.6941867", "text": "update() {\n if (!this._inProgress) {\n return false;\n }\n\n // It is important to initialize the handle during `update` instead of `start`.\n // The CPU time that the `start` frame takes should not be counted towards the duration.\n // On the other hand, `update` always happens during a render cycle. The clock starts when the\n // transition is rendered for the first time.\n if (this._handle === null) {\n const {timeline, settings} = this;\n this._handle = timeline.addChannel({\n delay: timeline.getTime(),\n duration: settings.duration\n });\n }\n\n this.time = this.timeline.getTime(this._handle);\n // Call subclass method\n this._onUpdate();\n // Call user callback\n this.settings.onUpdate(this);\n\n // This only works if `settings.duration` is set\n // Spring transition must call `end` manually\n if (this.timeline.isFinished(this._handle)) {\n this.end();\n }\n return true;\n }", "title": "" }, { "docid": "abd7143471402e1e56404585cf44daa4", "score": "0.6918709", "text": "shouldComponentUpdate(){\n console.log(\"Life CycleB shouldComponentUpdate\")\n return true\n }", "title": "" }, { "docid": "698a39bca8a1cfe7e68351c5845e1500", "score": "0.68923277", "text": "shouldUpdate() {\n return this.active;\n }", "title": "" }, { "docid": "119df4d425577d8a4c7005d3d0e86ef7", "score": "0.6855162", "text": "shouldComponentUpdate() {\n console.log('Lifecycle B shouldComponentUpdate')\n return true\n }", "title": "" }, { "docid": "8d41c980584e69547f761055f3f304ce", "score": "0.6844227", "text": "shouldComponentUpdate() {\n const now = new Date();\n var seconds = (now.getTime() - this.lastUpdateDate.getTime()) / 1000;\n return seconds >= 1;\n }", "title": "" }, { "docid": "316ae98ae074637b54d813f2ae38f478", "score": "0.68425786", "text": "shouldComponentUpdate() {\n return false;\n }", "title": "" }, { "docid": "316ae98ae074637b54d813f2ae38f478", "score": "0.68425786", "text": "shouldComponentUpdate() {\n return false;\n }", "title": "" }, { "docid": "92a8a7d6f874eb2dfba8dac4577459f8", "score": "0.68312943", "text": "shouldComponentUpdate(np) {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "dfce7631d2314558af996f8103116084", "score": "0.68105733", "text": "_willUpdate() {\n\t}", "title": "" }, { "docid": "a389ee46e57803d6235e02b7ca9e8403", "score": "0.6808351", "text": "shouldComponentUpdate() {\n return false;\n }", "title": "" }, { "docid": "d680d8ceafd21da38a2ec0fdb3ddd73f", "score": "0.6797577", "text": "updateRenderingSmoothlyIfNeeded(doDataUpdating) {\n // Last updating is not completed.\n if (this.untilUpdatingCompletePromise) {\n return false;\n }\n // Reach start or end edge.\n if (this.startIndex === 0 && this.endIndex === this.totalDataCount) {\n return false;\n }\n let updatePromise = this.updateFromCoverage(doDataUpdating);\n if (updatePromise) {\n this.lockUpdatingByPromise(updatePromise.then(() => {\n this.updatePlaceholderHeightProgressive();\n }));\n return true;\n }\n else {\n return false;\n }\n }", "title": "" }, { "docid": "f29a39f213c9a908919099be96e695bd", "score": "0.6773017", "text": "shouldRerender() {\n return false\n }", "title": "" }, { "docid": "dcefc44f4c0bf6e4e523f7bca36f8353", "score": "0.67644703", "text": "shouldComponentUpdate() {\n return true;\n }", "title": "" }, { "docid": "d51ce08e8623f07b3b3db2475acb8456", "score": "0.6760389", "text": "shouldComponentUpdate() {\n console.log(\"should component update\");\n }", "title": "" }, { "docid": "b6adebbd01fffcb970264ee8b3692b4f", "score": "0.6733907", "text": "willUpdate() {}", "title": "" }, { "docid": "6bca09f48547289a92be1e2e81eb1df4", "score": "0.6710994", "text": "shouldComponentUpdate(newProps,newState){\n //xử lý: return false giao diện không render lại, true giao diện render lại (default)\n return true\n }", "title": "" }, { "docid": "eb864077bc02aa315302f62d5e7cd15f", "score": "0.6701696", "text": "update()\n\t{\n\t\treturn false;\n\t}", "title": "" }, { "docid": "2bc8b2c7b9a7e5108d10ce271af36bf8", "score": "0.6697408", "text": "shouldComponentUpdate() {\r\n return false;\r\n }", "title": "" }, { "docid": "d69a41bb736d63ab601683d26c97f3a2", "score": "0.668556", "text": "shouldComponentUpdate(nextProps, nextState) {}", "title": "" }, { "docid": "f2756a18ec04695ebe9c48981a861762", "score": "0.6644175", "text": "update() {\n\t\tif (this.canUpdate) this.onUpdate();\n\t}", "title": "" }, { "docid": "1fcbba14ac34063b060436cd002da488", "score": "0.6605814", "text": "shouldComponentUpdate() {\n return false;\n }", "title": "" }, { "docid": "1fcbba14ac34063b060436cd002da488", "score": "0.6605814", "text": "shouldComponentUpdate() {\n return false;\n }", "title": "" }, { "docid": "1fcbba14ac34063b060436cd002da488", "score": "0.6605814", "text": "shouldComponentUpdate() {\n return false;\n }", "title": "" }, { "docid": "1fcbba14ac34063b060436cd002da488", "score": "0.6605814", "text": "shouldComponentUpdate() {\n return false;\n }", "title": "" }, { "docid": "1fcbba14ac34063b060436cd002da488", "score": "0.6605814", "text": "shouldComponentUpdate() {\n return false;\n }", "title": "" }, { "docid": "1fcbba14ac34063b060436cd002da488", "score": "0.6605814", "text": "shouldComponentUpdate() {\n return false;\n }", "title": "" }, { "docid": "1fcbba14ac34063b060436cd002da488", "score": "0.6605814", "text": "shouldComponentUpdate() {\n return false;\n }", "title": "" }, { "docid": "1fcbba14ac34063b060436cd002da488", "score": "0.6605814", "text": "shouldComponentUpdate() {\n return false;\n }", "title": "" }, { "docid": "1fcbba14ac34063b060436cd002da488", "score": "0.6605814", "text": "shouldComponentUpdate() {\n return false;\n }", "title": "" }, { "docid": "1fcbba14ac34063b060436cd002da488", "score": "0.6605814", "text": "shouldComponentUpdate() {\n return false;\n }", "title": "" }, { "docid": "1fcbba14ac34063b060436cd002da488", "score": "0.6605814", "text": "shouldComponentUpdate() {\n return false;\n }", "title": "" }, { "docid": "1fcbba14ac34063b060436cd002da488", "score": "0.6605814", "text": "shouldComponentUpdate() {\n return false;\n }", "title": "" }, { "docid": "1fcbba14ac34063b060436cd002da488", "score": "0.6605814", "text": "shouldComponentUpdate() {\n return false;\n }", "title": "" }, { "docid": "1fcbba14ac34063b060436cd002da488", "score": "0.6605814", "text": "shouldComponentUpdate() {\n return false;\n }", "title": "" }, { "docid": "1fcbba14ac34063b060436cd002da488", "score": "0.6605814", "text": "shouldComponentUpdate() {\n return false;\n }", "title": "" }, { "docid": "1fcbba14ac34063b060436cd002da488", "score": "0.6605814", "text": "shouldComponentUpdate() {\n return false;\n }", "title": "" }, { "docid": "69c3b91c43198dad361d0d01556498d7", "score": "0.6599699", "text": "shouldComponentUpdate() {\n console.log(\"LifecycleB shouldComponentUpdate\")\n return true\n }", "title": "" }, { "docid": "be853521d2ac27d9f98f56660915b09b", "score": "0.6570086", "text": "shouldUpdate(_changedProperties) {\n return true;\n }", "title": "" }, { "docid": "be853521d2ac27d9f98f56660915b09b", "score": "0.6570086", "text": "shouldUpdate(_changedProperties) {\n return true;\n }", "title": "" }, { "docid": "be853521d2ac27d9f98f56660915b09b", "score": "0.6570086", "text": "shouldUpdate(_changedProperties) {\n return true;\n }", "title": "" }, { "docid": "a4c1ad22d2ff12a0cfdc918a5021d9fd", "score": "0.6533498", "text": "shouldComponentUpdate() {\n return this.k === null;\n }", "title": "" }, { "docid": "30a7a50c82ef94d37505d3d14048113d", "score": "0.65243703", "text": "function performUpdate ($) {\n\tvar currentLastUpdated = getCurrentLastUpdated($)\n\tif (lastUpdated == currentLastUpdated) {\n\t\treturn false\n\t} else {\n\t\treturn true\n\t}\n}", "title": "" }, { "docid": "9765228ebee5e644557651c675be3474", "score": "0.6520527", "text": "shouldUpdate(_changedProperties) {\n return true;\n }", "title": "" }, { "docid": "9765228ebee5e644557651c675be3474", "score": "0.6520527", "text": "shouldUpdate(_changedProperties) {\n return true;\n }", "title": "" }, { "docid": "9765228ebee5e644557651c675be3474", "score": "0.6520527", "text": "shouldUpdate(_changedProperties) {\n return true;\n }", "title": "" }, { "docid": "9765228ebee5e644557651c675be3474", "score": "0.6520527", "text": "shouldUpdate(_changedProperties) {\n return true;\n }", "title": "" }, { "docid": "9765228ebee5e644557651c675be3474", "score": "0.6520527", "text": "shouldUpdate(_changedProperties) {\n return true;\n }", "title": "" }, { "docid": "233775fd2c488edcfd187938ebd3e6d1", "score": "0.6519747", "text": "shouldComponentUpdate(nextProps) {\n return nextProps.complete != this.props.complete;\n }", "title": "" }, { "docid": "c5f917dc52165256f1526ad6a40b2acc", "score": "0.65182865", "text": "update() {\n this.dispatchEvent(UPDATE);\n // Skip if update is already in progress\n if (this.m_updatePending) {\n return;\n }\n // Set update flag\n this.m_updatePending = true;\n this.startRenderLoop();\n }", "title": "" }, { "docid": "68ab72afca2bb9e601c3a7871542d749", "score": "0.65117514", "text": "shouldComponentUpdate () {\n return false\n }", "title": "" }, { "docid": "68ab72afca2bb9e601c3a7871542d749", "score": "0.65117514", "text": "shouldComponentUpdate () {\n return false\n }", "title": "" }, { "docid": "a6df5cd0dbc65cb81ca04ae7bcdbfcca", "score": "0.64924425", "text": "update() {\n return false \n }", "title": "" }, { "docid": "ae7ae169f104dbbf69d41dc2fb977e9c", "score": "0.64861035", "text": "shouldComponentUpdate(){\n return true;\n }", "title": "" }, { "docid": "ae7ae169f104dbbf69d41dc2fb977e9c", "score": "0.64861035", "text": "shouldComponentUpdate(){\n return true;\n }", "title": "" }, { "docid": "32ca649f623d44edde2f37d398dcf735", "score": "0.64631623", "text": "shouldComponentUpdate(props, state) {\n return this.data !== state.data;\n }", "title": "" }, { "docid": "c550f006b6fe83af448dda34fde6ee06", "score": "0.64304453", "text": "shouldComponentUpdate( nextProps ) {\n if ( this.props.isVisible !== nextProps.isVisible ) {\n return true;\n }\n if ( !nextProps.isVisible ) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "568208aad49384b568ccee458f4da3a1", "score": "0.64265233", "text": "canUpdate() {\n return this.__enabled;\n }", "title": "" }, { "docid": "20610515bfb68f71267c2fe5dd680a30", "score": "0.6422437", "text": "checkUpdate(event) {\n this.forceUpdate();\n\n event.preventDefault();\n }", "title": "" }, { "docid": "ca61694a8d13aa66e095d77a5c7406ec", "score": "0.64143157", "text": "function isUpdating() {\n return !!updating;\n}", "title": "" }, { "docid": "9c5d6f9ac72c861b47475837ee2e5174", "score": "0.639532", "text": "shouldComponentUpdate() {\n return this.state.prepareToDisplay === true;\n }", "title": "" }, { "docid": "b2cf64514c1f8393e4fe91a2b859bdb2", "score": "0.63902944", "text": "function shouldUpdate (entity) {\n if (!entity.dirty) return false\n if (!entity.component.shouldUpdate) return true\n var nextProps = entity.pendingProps\n var nextState = entity.pendingState\n var bool = entity.component.shouldUpdate(entity.context, nextProps, nextState)\n return bool\n }", "title": "" }, { "docid": "b2cf64514c1f8393e4fe91a2b859bdb2", "score": "0.63902944", "text": "function shouldUpdate (entity) {\n if (!entity.dirty) return false\n if (!entity.component.shouldUpdate) return true\n var nextProps = entity.pendingProps\n var nextState = entity.pendingState\n var bool = entity.component.shouldUpdate(entity.context, nextProps, nextState)\n return bool\n }", "title": "" }, { "docid": "fdc1d6048052986e66eac5b65467e790", "score": "0.63838106", "text": "internalUpdate()\n {\n this.update();\n if (this.waiting === false)\n {\n this.processUpdate();\n }\n }", "title": "" }, { "docid": "38bad1cc2f55e2e8d9ddc5dee32febfd", "score": "0.6376514", "text": "shouldUpdate(_changedProperties) {\n return true;\n }", "title": "" }, { "docid": "38bad1cc2f55e2e8d9ddc5dee32febfd", "score": "0.6376514", "text": "shouldUpdate(_changedProperties) {\n return true;\n }", "title": "" }, { "docid": "38bad1cc2f55e2e8d9ddc5dee32febfd", "score": "0.6376514", "text": "shouldUpdate(_changedProperties) {\n return true;\n }", "title": "" }, { "docid": "38bad1cc2f55e2e8d9ddc5dee32febfd", "score": "0.6376514", "text": "shouldUpdate(_changedProperties) {\n return true;\n }", "title": "" }, { "docid": "be86f5234b5593b082cc69f243cc960e", "score": "0.6373447", "text": "shouldComponentUpdate(nextState) {\n\t\tif (this.state.note !== nextState.note) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "9242cc5cb6c803612f9a5fef034ed49a", "score": "0.63620037", "text": "function checkIfCanUpdate() {\n var shouldUpdate = true;\n //Se ja coletamos tudo, atualize os valores\n if (shouldUpdate) {\n lastRun = new Date()\n updateDisplay()\n }\n}", "title": "" }, { "docid": "2ef98dd954e2115fa01198d265fed9c2", "score": "0.63521576", "text": "shouldComponentUpdate( nextProps, nextState )\n\t{\n\t\treturn false;\n\t}", "title": "" }, { "docid": "cf9d38dd089d21e6cde85abea23513bb", "score": "0.63395953", "text": "_needsUpdate () {\n return (\n !this._comparePixiMatrices(this.worldTransform, this._previous.worldTransform)\n || !this._compareClientRects(this._canvasBounds, this._previous.canvasBounds)\n || this.worldAlpha !== this._previous.worldAlpha\n || this.worldVisible !== this._previous.worldVisible\n );\n }", "title": "" }, { "docid": "1ad92715296ce6b3ac888d683ab4af49", "score": "0.6324357", "text": "shouldComponentUpdate(nextProps, nextState) {\n console.log('shouldComponentUpdate')\n return true; // true = sends the rendering false = rendering stops\n }", "title": "" }, { "docid": "bd538e3ea95aa6c125e4cdb0dfe28b21", "score": "0.63185304", "text": "shouldComponentUpdate(){\n return true;\n }", "title": "" }, { "docid": "8fdf9e7a30d124e25c9efbee0d7df93e", "score": "0.6310768", "text": "shouldComponentUpdate(nextState) {\n return this.state.counts === nextState.count;\n }", "title": "" }, { "docid": "2473be2955ed271f46d0df046e19fabb", "score": "0.6295531", "text": "update() {\n this.BooleanCombination();\n }", "title": "" }, { "docid": "73df1f55968b0116bc67d87b6c3076f8", "score": "0.62946844", "text": "shouldComponentUpdate(newProps, newState) {\n return (\n newProps.visible != this.props.visible ||\n (this.hasChildren() && newState.expanded != this.state.expanded) ||\n this.props.focusHistory.includes(this.props.id)\n );\n }", "title": "" }, { "docid": "91bf4cb0b32b43c381ab6cb0f75aeb03", "score": "0.6291189", "text": "shouldComponentUpdate() {\n return true;\n}", "title": "" }, { "docid": "1b9013b9b8c4d0f73c94652df8b9879e", "score": "0.6277045", "text": "shouldComponentUpdate(nextProps, nextStat) {\n\n console.log(FILE_NAME + \"In shouldComponentUpdate\");\n console.log(\"New Props are - \", nextProps);\n console.log(\"New State is - \", nextStat);\n\n return true;\n }", "title": "" }, { "docid": "67f814ac267be93a12b58ebc72c15877", "score": "0.6275072", "text": "shouldComponentUpdate(_nextProps, _nextState) {\n // NOTA_ESTUDO: Se eu retornar \"false\" ele não renderiza o componente...\n return true;\n }", "title": "" }, { "docid": "58de9bc14643b1fd30704c6567bdd36d", "score": "0.62640655", "text": "shouldComponentUpdate(nextProps, nextState) {\n let renderRequired = (this.state !== nextState || this.props !== nextProps);\n console.log('========SCU========');\n console.log('should component update?');\n console.log('cur state: '+JSON.stringify(this.state));\n console.log('new state: '+JSON.stringify(nextState));\n console.log('cur props: '+JSON.stringify(this.props));\n console.log('new props: '+JSON.stringify(nextProps));\n console.log(renderRequired ? 'we need rerender' : 'nothing changed');\n console.log('===================');\n return (renderRequired);\n }", "title": "" }, { "docid": "7af7a752d869ae0af8efc01da3fe5bf8", "score": "0.6249964", "text": "shouldComponentUpdate(nextProps, nextState) {\n return (nextProps.postR != this.props.postR)\n }", "title": "" }, { "docid": "45b7ef0823600ad065aa186034911997", "score": "0.6249175", "text": "shouldComponentUpdate( nextProps, nextState ) {\r\n //console.log('shouldComponentUpdate', this.props.generateBtnStyle, this.props.checkBtnStyle, this.props.nextBtnStyle );\r\n if ( nextProps !== this.props || nextState.showInputTags !== this.state.showInputTags ) {\r\n return true\r\n }\r\n return false\r\n }", "title": "" }, { "docid": "147e6a3561571cac9aae14cf7950b651", "score": "0.6239469", "text": "shouldComponentUpdate (nextProps, { isAnimating }) {\n const propValues = [...values(this.props), this.state.isAnimating]\n const nextPropValues = [...values(nextProps), isAnimating]\n return !nextPropValues.every((val, i) => val === propValues[i])\n }", "title": "" }, { "docid": "56ec3d0c805304a5bd69c8a01034f9d7", "score": "0.6235998", "text": "getShouldUpdate() {\n\t \treturn this.shouldUpdate;\n\t }", "title": "" }, { "docid": "0c1e78bd6b127346eb46304012966431", "score": "0.62284386", "text": "requestUpdateIfNeeded() {\n this.update();\n }", "title": "" }, { "docid": "0c1e78bd6b127346eb46304012966431", "score": "0.62284386", "text": "requestUpdateIfNeeded() {\n this.update();\n }", "title": "" }, { "docid": "98872ff4c2a1a6e364ae3daccef2a9a1", "score": "0.622565", "text": "update() {\n\t\tthis.forceUpdate();\n\t}", "title": "" }, { "docid": "ad1c4b93722f85e9f3bd0e46fae2e472", "score": "0.62202513", "text": "shouldComponentUpdate(props, state) {\n if (props.data && props.data.nodes){\n this.renderGraph(props);\n }\n return false\n }", "title": "" }, { "docid": "82c6fdcbb009323fa7c909b7b3823845", "score": "0.62139285", "text": "shouldComponentUpdate( nextProps ) {\n if ( this.props.isVisible !== nextProps.isVisible ) {\n nextProps.isVisible || this.setState( DEFAULT_STATE );\n return true;\n }\n if ( !nextProps.isVisible ) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "2557a44861123dc448012e688c9bc250", "score": "0.6207569", "text": "updateTransition() {\n const {attributeTransitionManager} = this;\n const transitionUpdated = attributeTransitionManager.run();\n this.needsRedraw = this.needsRedraw || transitionUpdated;\n return transitionUpdated;\n }", "title": "" } ]
92d61e498020cd3cd8233b28fb4ed57d
Collapse selection at the start of the first selected block. This is used for Firefox versions that attempt to navigate forward/backward instead of moving the cursor. Other browsers are able to move the cursor natively.
[ { "docid": "7dc8fdb6433630594e5e5c53e2b34f69", "score": "0.61110556", "text": "function keyCommandMoveSelectionToStartOfBlock(editorState) {\n var selection = editorState.getSelection();\n var startKey = selection.getStartKey();\n return EditorState.set(editorState, {\n selection: selection.merge({\n anchorKey: startKey,\n anchorOffset: 0,\n focusKey: startKey,\n focusOffset: 0,\n isBackward: false\n }),\n forceSelection: true\n });\n}", "title": "" } ]
[ { "docid": "df9adf6554f5c038a530686b93eaf0c0", "score": "0.6895364", "text": "function collapseSelection(ed, dir) {\n // dir = 'start' || 'end'\n var sel = ed.selection, range = sel.getRange();\n dir && sel.moveCursorToPosition(range[dir]);\n sel.clearSelection();\n }", "title": "" }, { "docid": "727035e630f5e5e5a28ca3a1a73575be", "score": "0.6590381", "text": "selectToStart() {\n const blocks = this.getNavigableBlocks();\n\n for (let i = 0, len = blocks.get('length'); i < len; i += 1) {\n const block = blocks.objectAt(i);\n if (block.get('isSelected')) break;\n block.set('isSelected', true);\n }\n }", "title": "" }, { "docid": "6db1430a5629257e952baa6870f95c71", "score": "0.65344083", "text": "collapseSelection () {\n this.selection.collapse(this.selection.lead);\n return this.selection;\n }", "title": "" }, { "docid": "207568ceeac30f8c87f5a57d9e4ba2f6", "score": "0.6434847", "text": "function resetSelection() {\n selection = window.getSelection();\n startAt = selection.anchorOffset;\n endAt = selection.focusOffset;\n startNode = selection.anchorNode;\n endNode = selection.focusNode;\n }", "title": "" }, { "docid": "131823dcfb6a58b9fb558805580f18ca", "score": "0.63878214", "text": "selectionStart() {}", "title": "" }, { "docid": "ac18a118c96f84a3a6473f11cef87558", "score": "0.6322582", "text": "selectToEnd() {\n const blocks = this.getNavigableBlocks();\n\n for (let i = blocks.get('length') - 1; i >= 0; i -= 1) {\n const block = blocks.objectAt(i);\n if (block.get('isSelected')) break;\n block.set('isSelected', true);\n }\n }", "title": "" }, { "docid": "956760d698c45fab04ca044ecf7adc50", "score": "0.6297347", "text": "function keyCommandMoveSelectionToStartOfBlock(editorState){var selection=editorState.getSelection(),startKey=selection.getStartKey();return EditorState.set(editorState,{selection:selection.merge({anchorKey:startKey,anchorOffset:0,focusKey:startKey,focusOffset:0,isBackward:!1}),forceSelection:!0});}", "title": "" }, { "docid": "41a566377571b6c0dcf3bf5e829b1912", "score": "0.6110881", "text": "function dismissBrowserSelection() {\n if (window.getSelection){\n var selection = window.getSelection();\n selection.collapse(document.body, 0);\n } else {\n var selection = document.selection.createRange();\n selection.setEndPoint(\"EndToStart\", selection);\n selection.select();\n }\n }", "title": "" }, { "docid": "3b5489012cab107fc9574430b08ce1b7", "score": "0.609904", "text": "function keyCommandMoveSelectionToStartOfBlock(editorState) {\n\t var selection = editorState.getSelection();\n\t var startKey = selection.getStartKey();\n\t return EditorState.set(editorState, {\n\t selection: selection.merge({\n\t anchorKey: startKey,\n\t anchorOffset: 0,\n\t focusKey: startKey,\n\t focusOffset: 0,\n\t isBackward: false\n\t }),\n\t forceSelection: true\n\t });\n\t}", "title": "" }, { "docid": "3b5489012cab107fc9574430b08ce1b7", "score": "0.609904", "text": "function keyCommandMoveSelectionToStartOfBlock(editorState) {\n\t var selection = editorState.getSelection();\n\t var startKey = selection.getStartKey();\n\t return EditorState.set(editorState, {\n\t selection: selection.merge({\n\t anchorKey: startKey,\n\t anchorOffset: 0,\n\t focusKey: startKey,\n\t focusOffset: 0,\n\t isBackward: false\n\t }),\n\t forceSelection: true\n\t });\n\t}", "title": "" }, { "docid": "0ca4824304f65f16e90ba7adc5f38456", "score": "0.60700107", "text": "shiftDown() {\n const blocks = this.getNavigableBlocks();\n const selectedBlocks = blocks.filterBy('isSelected');\n const idx = blocks.indexOf(selectedBlocks.get('lastObject'));\n const nextBlock = blocks.objectAt(idx + 1);\n\n if (!nextBlock) return;\n\n selectedBlocks.get('firstObject').set('isSelected', false);\n nextBlock.set('isSelected', true);\n }", "title": "" }, { "docid": "80a23032fb0558767373ea364d003139", "score": "0.606365", "text": "function adjustSelectionToVisibleSelection() {\n\t\t\t\tfunction findSelectionEnd(start, end) {\n\t\t\t\t\tvar walker = new TreeWalker(end);\n\t\t\t\t\tfor (node = walker.prev2(); node; node = walker.prev2()) {\n\t\t\t\t\t\tif (node.nodeType == 3 && node.data.length > 0) {\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (node.childNodes.length > 1 || node == start || node.tagName == 'BR') {\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Adjust selection so that a end container with a end offset of zero is not included in the selection\n\t\t\t\t// as this isn't visible to the user.\n\t\t\t\tvar rng = ed.selection.getRng();\n\t\t\t\tvar start = rng.startContainer;\n\t\t\t\tvar end = rng.endContainer;\n\n\t\t\t\tif (start != end && rng.endOffset === 0) {\n\t\t\t\t\tvar newEnd = findSelectionEnd(start, end);\n\t\t\t\t\tvar endOffset = newEnd.nodeType == 3 ? newEnd.data.length : newEnd.childNodes.length;\n\n\t\t\t\t\trng.setEnd(newEnd, endOffset);\n\t\t\t\t}\n\n\t\t\t\treturn rng;\n\t\t\t}", "title": "" }, { "docid": "80a23032fb0558767373ea364d003139", "score": "0.606365", "text": "function adjustSelectionToVisibleSelection() {\n\t\t\t\tfunction findSelectionEnd(start, end) {\n\t\t\t\t\tvar walker = new TreeWalker(end);\n\t\t\t\t\tfor (node = walker.prev2(); node; node = walker.prev2()) {\n\t\t\t\t\t\tif (node.nodeType == 3 && node.data.length > 0) {\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (node.childNodes.length > 1 || node == start || node.tagName == 'BR') {\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Adjust selection so that a end container with a end offset of zero is not included in the selection\n\t\t\t\t// as this isn't visible to the user.\n\t\t\t\tvar rng = ed.selection.getRng();\n\t\t\t\tvar start = rng.startContainer;\n\t\t\t\tvar end = rng.endContainer;\n\n\t\t\t\tif (start != end && rng.endOffset === 0) {\n\t\t\t\t\tvar newEnd = findSelectionEnd(start, end);\n\t\t\t\t\tvar endOffset = newEnd.nodeType == 3 ? newEnd.data.length : newEnd.childNodes.length;\n\n\t\t\t\t\trng.setEnd(newEnd, endOffset);\n\t\t\t\t}\n\n\t\t\t\treturn rng;\n\t\t\t}", "title": "" }, { "docid": "80a23032fb0558767373ea364d003139", "score": "0.606365", "text": "function adjustSelectionToVisibleSelection() {\n\t\t\t\tfunction findSelectionEnd(start, end) {\n\t\t\t\t\tvar walker = new TreeWalker(end);\n\t\t\t\t\tfor (node = walker.prev2(); node; node = walker.prev2()) {\n\t\t\t\t\t\tif (node.nodeType == 3 && node.data.length > 0) {\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (node.childNodes.length > 1 || node == start || node.tagName == 'BR') {\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Adjust selection so that a end container with a end offset of zero is not included in the selection\n\t\t\t\t// as this isn't visible to the user.\n\t\t\t\tvar rng = ed.selection.getRng();\n\t\t\t\tvar start = rng.startContainer;\n\t\t\t\tvar end = rng.endContainer;\n\n\t\t\t\tif (start != end && rng.endOffset === 0) {\n\t\t\t\t\tvar newEnd = findSelectionEnd(start, end);\n\t\t\t\t\tvar endOffset = newEnd.nodeType == 3 ? newEnd.data.length : newEnd.childNodes.length;\n\n\t\t\t\t\trng.setEnd(newEnd, endOffset);\n\t\t\t\t}\n\n\t\t\t\treturn rng;\n\t\t\t}", "title": "" }, { "docid": "d91ec5f40be719ff380618f870a5bbb6", "score": "0.6051488", "text": "function moveCaretToStart(el) {\n if (typeof el.selectionStart == \"number\") {\n el.selectionStart = el.selectionEnd = 0;\n } else if (typeof el.createTextRange != \"undefined\") {\n el.focus();\n var range = el.createTextRange();\n range.collapse(true);\n range.select();\n }\n}", "title": "" }, { "docid": "9769f59db3d7403f23ed8a0d2b435109", "score": "0.5997222", "text": "set selectionStart(selectionStart: number) {\n this._rootDOMNode.selectionStart = selectionStart;\n }", "title": "" }, { "docid": "6b9df9da4935939291935534c3c6ca07", "score": "0.5981859", "text": "function notCollapsed() {\n // selection.modify(\"move\", \"backward\", \"character\");\n ev.preventDefault();\n //--delete select\n Shaft.insertHtmlAtCaret('', true);\n }", "title": "" }, { "docid": "60c3fa6d1832f2c90c7c64d3c39250bc", "score": "0.59578717", "text": "function selectBlock(cm, selectionEnd) {\n var selections = [], ranges = cm.listSelections();\n var head = copyCursor(cm.clipPos(selectionEnd));\n var isClipped = !cursorEqual(selectionEnd, head);\n var curHead = cm.getCursor('head');\n var primIndex = getIndex(ranges, curHead);\n var wasClipped = cursorEqual(ranges[primIndex].head, ranges[primIndex].anchor);\n var max = ranges.length - 1;\n var index = max - primIndex > primIndex ? max : 0;\n var base = ranges[index].anchor;\n\n var firstLine = Math.min(base.line, head.line);\n var lastLine = Math.max(base.line, head.line);\n var baseCh = base.ch, headCh = head.ch;\n\n var dir = ranges[index].head.ch - baseCh;\n var newDir = headCh - baseCh;\n if (dir > 0 && newDir <= 0) {\n baseCh++;\n if (!isClipped) { headCh--; }\n } else if (dir < 0 && newDir >= 0) {\n baseCh--;\n if (!wasClipped) { headCh++; }\n } else if (dir < 0 && newDir == -1) {\n baseCh--;\n headCh++;\n }\n for (var line = firstLine; line <= lastLine; line++) {\n var range = {anchor: new Pos(line, baseCh), head: new Pos(line, headCh)};\n selections.push(range);\n }\n cm.setSelections(selections);\n selectionEnd.ch = headCh;\n base.ch = baseCh;\n return base;\n }", "title": "" }, { "docid": "60c3fa6d1832f2c90c7c64d3c39250bc", "score": "0.59578717", "text": "function selectBlock(cm, selectionEnd) {\n var selections = [], ranges = cm.listSelections();\n var head = copyCursor(cm.clipPos(selectionEnd));\n var isClipped = !cursorEqual(selectionEnd, head);\n var curHead = cm.getCursor('head');\n var primIndex = getIndex(ranges, curHead);\n var wasClipped = cursorEqual(ranges[primIndex].head, ranges[primIndex].anchor);\n var max = ranges.length - 1;\n var index = max - primIndex > primIndex ? max : 0;\n var base = ranges[index].anchor;\n\n var firstLine = Math.min(base.line, head.line);\n var lastLine = Math.max(base.line, head.line);\n var baseCh = base.ch, headCh = head.ch;\n\n var dir = ranges[index].head.ch - baseCh;\n var newDir = headCh - baseCh;\n if (dir > 0 && newDir <= 0) {\n baseCh++;\n if (!isClipped) { headCh--; }\n } else if (dir < 0 && newDir >= 0) {\n baseCh--;\n if (!wasClipped) { headCh++; }\n } else if (dir < 0 && newDir == -1) {\n baseCh--;\n headCh++;\n }\n for (var line = firstLine; line <= lastLine; line++) {\n var range = {anchor: new Pos(line, baseCh), head: new Pos(line, headCh)};\n selections.push(range);\n }\n cm.setSelections(selections);\n selectionEnd.ch = headCh;\n base.ch = baseCh;\n return base;\n }", "title": "" }, { "docid": "60c3fa6d1832f2c90c7c64d3c39250bc", "score": "0.59578717", "text": "function selectBlock(cm, selectionEnd) {\n var selections = [], ranges = cm.listSelections();\n var head = copyCursor(cm.clipPos(selectionEnd));\n var isClipped = !cursorEqual(selectionEnd, head);\n var curHead = cm.getCursor('head');\n var primIndex = getIndex(ranges, curHead);\n var wasClipped = cursorEqual(ranges[primIndex].head, ranges[primIndex].anchor);\n var max = ranges.length - 1;\n var index = max - primIndex > primIndex ? max : 0;\n var base = ranges[index].anchor;\n\n var firstLine = Math.min(base.line, head.line);\n var lastLine = Math.max(base.line, head.line);\n var baseCh = base.ch, headCh = head.ch;\n\n var dir = ranges[index].head.ch - baseCh;\n var newDir = headCh - baseCh;\n if (dir > 0 && newDir <= 0) {\n baseCh++;\n if (!isClipped) { headCh--; }\n } else if (dir < 0 && newDir >= 0) {\n baseCh--;\n if (!wasClipped) { headCh++; }\n } else if (dir < 0 && newDir == -1) {\n baseCh--;\n headCh++;\n }\n for (var line = firstLine; line <= lastLine; line++) {\n var range = {anchor: new Pos(line, baseCh), head: new Pos(line, headCh)};\n selections.push(range);\n }\n cm.setSelections(selections);\n selectionEnd.ch = headCh;\n base.ch = baseCh;\n return base;\n }", "title": "" }, { "docid": "33394a20622089d9da290e04b0a115ef", "score": "0.5941535", "text": "function selectBlock(cm, selectionEnd) {\n var selections = [],\n ranges = cm.listSelections();\n var head = copyCursor(cm.clipPos(selectionEnd));\n var isClipped = !cursorEqual(selectionEnd, head);\n var curHead = cm.getCursor('head');\n var primIndex = getIndex(ranges, curHead);\n var wasClipped = cursorEqual(ranges[primIndex].head, ranges[primIndex].anchor);\n var max = ranges.length - 1;\n var index = max - primIndex > primIndex ? max : 0;\n var base = ranges[index].anchor;\n\n var firstLine = Math.min(base.line, head.line);\n var lastLine = Math.max(base.line, head.line);\n var baseCh = base.ch,\n headCh = head.ch;\n\n var dir = ranges[index].head.ch - baseCh;\n var newDir = headCh - baseCh;\n if (dir > 0 && newDir <= 0) {\n baseCh++;\n if (!isClipped) {\n headCh--;\n }\n } else if (dir < 0 && newDir >= 0) {\n baseCh--;\n if (!wasClipped) {\n headCh++;\n }\n } else if (dir < 0 && newDir == -1) {\n baseCh--;\n headCh++;\n }\n for (var line = firstLine; line <= lastLine; line++) {\n var range = { anchor: new Pos(line, baseCh), head: new Pos(line, headCh) };\n selections.push(range);\n }\n cm.setSelections(selections);\n selectionEnd.ch = headCh;\n base.ch = baseCh;\n return base;\n }", "title": "" }, { "docid": "d9c98d985641b7559f960ce176f740a5", "score": "0.5934075", "text": "function moveSelectionLeft(){\n\t\tif (currentSelection.previousSibling != null){\n\t\t\tcurrentSelection.style.backgroundColor = \"white\";\n\t\t\tcurrentSelection.style.border = \"\";\n\t\t\tcurrentSelection = currentSelection.previousSibling;\n\t\t\tcurrentSelection.style.backgroundColor = \"yellow\";\n\t\t\tcurrentSelection.style.border = \"solid\";\n\t\t}\t\n}", "title": "" }, { "docid": "8f72c494ca734f1c2aaa2b0d9247b1df", "score": "0.5897798", "text": "function focusFirst() {\n\t self.startRow = focusRow;\n\t self.startNode = selection.focusNode;\n\t self.startOffset = selection.focusOffset;\n\t self.endRow = anchorRow;\n\t self.endNode = selection.anchorNode;\n\t self.endOffset = selection.anchorOffset;\n\t }", "title": "" }, { "docid": "ac9975d4b2a163c35a3335786656c6f6", "score": "0.5804396", "text": "function selectFirst() {\n if (items.length > 0) {\n items[0].select();\n }\n }", "title": "" }, { "docid": "70c00e169172c6100b958742b91d2b75", "score": "0.5790133", "text": "selectDown() {\n const blocks = this.getNavigableBlocks();\n const selectedBlocks = blocks.filterBy('isSelected');\n\n if (this.get('isReversed')) {\n if (selectedBlocks.get('length') === 1) {\n const idx = blocks.indexOf(selectedBlocks.get('firstObject'));\n const nextBlock = blocks.objectAt(idx + 1);\n if (!nextBlock) return;\n nextBlock.set('isSelected', true);\n this.set('isReversed', false);\n } else {\n selectedBlocks.get('firstObject').set('isSelected', false);\n }\n } else {\n const idx = blocks.indexOf(selectedBlocks.get('lastObject'));\n const nextBlock = blocks.objectAt(idx + 1);\n if (!nextBlock) return;\n nextBlock.set('isSelected', true);\n }\n }", "title": "" }, { "docid": "83e14441fa974e81349dabd2deb1dfd9", "score": "0.5744252", "text": "function nextSelection() {\n\n _.each(listContainer.children, function(child, index, listContainer) {\n if (child.className === 'selected') {\n child.className = '';\n if (child.nextSibling) {\n child.nextSibling.className = 'selected';\n } else {\n listContainer[0].className = 'selected';\n }\n return false;\n }\n });\n }", "title": "" }, { "docid": "597de74d0767f282e5fccc5d88873358", "score": "0.57056326", "text": "function expandSelectionToLine(_cm, curStart, curEnd) {\n curStart.ch = 0;\n curEnd.ch = 0;\n curEnd.line++;\n }", "title": "" }, { "docid": "597de74d0767f282e5fccc5d88873358", "score": "0.57056326", "text": "function expandSelectionToLine(_cm, curStart, curEnd) {\n curStart.ch = 0;\n curEnd.ch = 0;\n curEnd.line++;\n }", "title": "" }, { "docid": "597de74d0767f282e5fccc5d88873358", "score": "0.57056326", "text": "function expandSelectionToLine(_cm, curStart, curEnd) {\n curStart.ch = 0;\n curEnd.ch = 0;\n curEnd.line++;\n }", "title": "" }, { "docid": "597de74d0767f282e5fccc5d88873358", "score": "0.57056326", "text": "function expandSelectionToLine(_cm, curStart, curEnd) {\n curStart.ch = 0;\n curEnd.ch = 0;\n curEnd.line++;\n }", "title": "" }, { "docid": "6162d130871c7cfa64f99ad7850f2969", "score": "0.56775355", "text": "function isSelectionAtLeafStart(editorState){var selection=editorState.getSelection(),anchorKey=selection.getAnchorKey(),blockTree=editorState.getBlockTree(anchorKey),offset=selection.getStartOffset(),isAtStart=!1;return blockTree.some(function(leafSet){return offset===leafSet.get(\"start\")?(isAtStart=!0,!0):offset<leafSet.get(\"end\")&&leafSet.get(\"leaves\").some(function(leaf){var leafStart=leaf.get(\"start\");return offset===leafStart&&(isAtStart=!0,!0);});}),isAtStart;}", "title": "" }, { "docid": "638692cae8a7fafba2cce449221fc505", "score": "0.5671034", "text": "function moveSelectionToEnd(editorState) {\n var content = editorState.getCurrentContent();\n var blockMap = content.getBlockMap();\n var key = blockMap.last().getKey();\n var length = blockMap.last().getLength();\n var selection = new draftJs.SelectionState({\n anchorKey: key,\n anchorOffset: length,\n focusKey: key,\n focusOffset: length\n });\n return draftJs.EditorState.acceptSelection(editorState, selection);\n}", "title": "" }, { "docid": "eab1df80c5005766dd3278b4c17e74ea", "score": "0.5657398", "text": "function collapseRangeToStart(range) {\n return isCollapsedRange(range) ? range : moveRangeEnd(range, range.pos);\n }", "title": "" }, { "docid": "563729fff214102af27d10ab293b1d42", "score": "0.5650335", "text": "function selectLeft(){\n if (selected === 0) selected = selectBoxes.length-1;\n else selected -= 1;\n }", "title": "" }, { "docid": "72ebe5e6140f6396ac31291e4dc0fa10", "score": "0.56483173", "text": "function selectionCollapsed(domSel) {\n let collapsed = domSel.isCollapsed;\n if (collapsed && browser.chrome && domSel.rangeCount && !domSel.getRangeAt(0).collapsed)\n collapsed = false;\n return collapsed;\n }", "title": "" }, { "docid": "01bb4edff64de476086cbcf2a29534a3", "score": "0.56477535", "text": "function selectionCollapsed(domSel) {\n let collapsed = domSel.isCollapsed;\n if (collapsed && browser.chrome && domSel.rangeCount && !domSel.getRangeAt(0).collapsed)\n collapsed = false;\n return collapsed;\n}", "title": "" }, { "docid": "300cd2c54c9c9b36c99f62e5a9860abf", "score": "0.56368476", "text": "clearSelect() {\n const [selection] = this.cm.getDoc().listSelections();\n\n if (selection) {\n this.cm.setCursor(selection.to());\n }\n }", "title": "" }, { "docid": "54ec73eaaed7cb77d32ae56f0ef7d6d4", "score": "0.56348693", "text": "function moveSelectionForward(editorState,maxDistance){var focusOffset,selection=editorState.getSelection(),key=selection.getStartKey(),offset=selection.getStartOffset(),content=editorState.getCurrentContent(),focusKey=key;return maxDistance>content.getBlockForKey(key).getText().length-offset?(focusKey=content.getKeyAfter(key),focusOffset=0):focusOffset=offset+maxDistance,selection.merge({focusKey:focusKey,focusOffset:focusOffset});}", "title": "" }, { "docid": "742df51b02629b92a8ec630a2e584329", "score": "0.5610898", "text": "function moveStart(rng) {\n\t\t\tvar container = rng.startContainer,\n\t\t\t\t\toffset = rng.startOffset, isAtEndOfText,\n\t\t\t\t\twalker, node, nodes, tmpNode;\n\n\t\t\tif (rng.startContainer == rng.endContainer) {\n\t\t\t\tif (isInlineBlock(rng.startContainer.childNodes[rng.startOffset])) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Convert text node into index if possible\n\t\t\tif (container.nodeType == 3 && offset >= container.nodeValue.length) {\n\t\t\t\t// Get the parent container location and walk from there\n\t\t\t\toffset = nodeIndex(container);\n\t\t\t\tcontainer = container.parentNode;\n\t\t\t\tisAtEndOfText = true;\n\t\t\t}\n\n\t\t\t// Move startContainer/startOffset in to a suitable node\n\t\t\tif (container.nodeType == 1) {\n\t\t\t\tnodes = container.childNodes;\n\t\t\t\tcontainer = nodes[Math.min(offset, nodes.length - 1)];\n\t\t\t\twalker = new TreeWalker(container, dom.getParent(container, dom.isBlock));\n\n\t\t\t\t// If offset is at end of the parent node walk to the next one\n\t\t\t\tif (offset > nodes.length - 1 || isAtEndOfText) {\n\t\t\t\t\twalker.next();\n\t\t\t\t}\n\n\t\t\t\tfor (node = walker.current(); node; node = walker.next()) {\n\t\t\t\t\tif (node.nodeType == 3 && !isWhiteSpaceNode(node)) {\n\t\t\t\t\t\t// IE has a \"neat\" feature where it moves the start node into the closest element\n\t\t\t\t\t\t// we can avoid this by inserting an element before it and then remove it after we set the selection\n\t\t\t\t\t\ttmpNode = dom.create('a', {'data-mce-bogus': 'all'}, INVISIBLE_CHAR);\n\t\t\t\t\t\tnode.parentNode.insertBefore(tmpNode, node);\n\n\t\t\t\t\t\t// Set selection and remove tmpNode\n\t\t\t\t\t\trng.setStart(node, 0);\n\t\t\t\t\t\tselection.setRng(rng);\n\t\t\t\t\t\tdom.remove(tmpNode);\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "742df51b02629b92a8ec630a2e584329", "score": "0.5610898", "text": "function moveStart(rng) {\n\t\t\tvar container = rng.startContainer,\n\t\t\t\t\toffset = rng.startOffset, isAtEndOfText,\n\t\t\t\t\twalker, node, nodes, tmpNode;\n\n\t\t\tif (rng.startContainer == rng.endContainer) {\n\t\t\t\tif (isInlineBlock(rng.startContainer.childNodes[rng.startOffset])) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Convert text node into index if possible\n\t\t\tif (container.nodeType == 3 && offset >= container.nodeValue.length) {\n\t\t\t\t// Get the parent container location and walk from there\n\t\t\t\toffset = nodeIndex(container);\n\t\t\t\tcontainer = container.parentNode;\n\t\t\t\tisAtEndOfText = true;\n\t\t\t}\n\n\t\t\t// Move startContainer/startOffset in to a suitable node\n\t\t\tif (container.nodeType == 1) {\n\t\t\t\tnodes = container.childNodes;\n\t\t\t\tcontainer = nodes[Math.min(offset, nodes.length - 1)];\n\t\t\t\twalker = new TreeWalker(container, dom.getParent(container, dom.isBlock));\n\n\t\t\t\t// If offset is at end of the parent node walk to the next one\n\t\t\t\tif (offset > nodes.length - 1 || isAtEndOfText) {\n\t\t\t\t\twalker.next();\n\t\t\t\t}\n\n\t\t\t\tfor (node = walker.current(); node; node = walker.next()) {\n\t\t\t\t\tif (node.nodeType == 3 && !isWhiteSpaceNode(node)) {\n\t\t\t\t\t\t// IE has a \"neat\" feature where it moves the start node into the closest element\n\t\t\t\t\t\t// we can avoid this by inserting an element before it and then remove it after we set the selection\n\t\t\t\t\t\ttmpNode = dom.create('a', {'data-mce-bogus': 'all'}, INVISIBLE_CHAR);\n\t\t\t\t\t\tnode.parentNode.insertBefore(tmpNode, node);\n\n\t\t\t\t\t\t// Set selection and remove tmpNode\n\t\t\t\t\t\trng.setStart(node, 0);\n\t\t\t\t\t\tselection.setRng(rng);\n\t\t\t\t\t\tdom.remove(tmpNode);\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "742df51b02629b92a8ec630a2e584329", "score": "0.5610898", "text": "function moveStart(rng) {\n\t\t\tvar container = rng.startContainer,\n\t\t\t\t\toffset = rng.startOffset, isAtEndOfText,\n\t\t\t\t\twalker, node, nodes, tmpNode;\n\n\t\t\tif (rng.startContainer == rng.endContainer) {\n\t\t\t\tif (isInlineBlock(rng.startContainer.childNodes[rng.startOffset])) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Convert text node into index if possible\n\t\t\tif (container.nodeType == 3 && offset >= container.nodeValue.length) {\n\t\t\t\t// Get the parent container location and walk from there\n\t\t\t\toffset = nodeIndex(container);\n\t\t\t\tcontainer = container.parentNode;\n\t\t\t\tisAtEndOfText = true;\n\t\t\t}\n\n\t\t\t// Move startContainer/startOffset in to a suitable node\n\t\t\tif (container.nodeType == 1) {\n\t\t\t\tnodes = container.childNodes;\n\t\t\t\tcontainer = nodes[Math.min(offset, nodes.length - 1)];\n\t\t\t\twalker = new TreeWalker(container, dom.getParent(container, dom.isBlock));\n\n\t\t\t\t// If offset is at end of the parent node walk to the next one\n\t\t\t\tif (offset > nodes.length - 1 || isAtEndOfText) {\n\t\t\t\t\twalker.next();\n\t\t\t\t}\n\n\t\t\t\tfor (node = walker.current(); node; node = walker.next()) {\n\t\t\t\t\tif (node.nodeType == 3 && !isWhiteSpaceNode(node)) {\n\t\t\t\t\t\t// IE has a \"neat\" feature where it moves the start node into the closest element\n\t\t\t\t\t\t// we can avoid this by inserting an element before it and then remove it after we set the selection\n\t\t\t\t\t\ttmpNode = dom.create('a', {'data-mce-bogus': 'all'}, INVISIBLE_CHAR);\n\t\t\t\t\t\tnode.parentNode.insertBefore(tmpNode, node);\n\n\t\t\t\t\t\t// Set selection and remove tmpNode\n\t\t\t\t\t\trng.setStart(node, 0);\n\t\t\t\t\t\tselection.setRng(rng);\n\t\t\t\t\t\tdom.remove(tmpNode);\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "463d9372e756cda6b0dd28064f79622e", "score": "0.5595633", "text": "function moveSelectionDown(){\n\t\tif (currentSelection.parentNode.nextSibling != null){\n\t\t\t//save how many cells in we are\n\t\t\tvar inPlaces = 0;\n\t\t\t\n\t\t\t//move out\n\t\t\twhile(currentSelection.previousSibling != null){\n\t\t\t\tmoveSelectionLeft();\n\t\t\t\tinPlaces++;\n\t\t\t}\n\t\t\t\n\t\t\t//move down one row\n\t\t\tcurrentSelection.style.backgroundColor = \"white\";\n\t\t\tcurrentSelection.style.border = \"\";\n\t\t\tcurrentSelection = currentSelection.parentNode.nextSibling.firstChild;\n\t\t\tcurrentSelection.style.backgroundColor = \"yellow\";\n\t\t\tcurrentSelection.style.border = \"solid\";\n\t\t\t\n\t\t\t//move back in\n\t\t\tfor(var i = 0; i < inPlaces; i++){\n\t\t\t\tmoveSelectionRight();\n\t\t\t}\n\t\t}\t\n}", "title": "" }, { "docid": "be18f1e5210c644ed305f58ca570a647", "score": "0.55752933", "text": "function reset() {\n if (indents === 0) \n return selector = null\n while (lastIndents-- > indents)\n selector = selector.parent\n }", "title": "" }, { "docid": "258ed4d7342b7307cbdb88ce3796a93d", "score": "0.55488515", "text": "function fnDeSelect() {\n\tif (document.selection) document.selection.empty();\n\telse if (window.getSelection) window.getSelection().removeAllRanges();\n}", "title": "" }, { "docid": "55d49aa4869d2fb3074b95b86be433c6", "score": "0.5528341", "text": "function keyCommandMoveSelectionToEndOfBlock(editorState){var selection=editorState.getSelection(),endKey=selection.getEndKey(),content=editorState.getCurrentContent(),textLength=content.getBlockForKey(endKey).getLength();return EditorState.set(editorState,{selection:selection.merge({anchorKey:endKey,anchorOffset:textLength,focusKey:endKey,focusOffset:textLength,isBackward:!1}),forceSelection:!0});}", "title": "" }, { "docid": "c50261948d4ac424281d24f7e797c9a0", "score": "0.5526552", "text": "function StartSelection()\r\n{\r\n if (event.button == 1) {\r\n selectionEntry = document.body.createTextRange();\r\n try { \r\n selectionEntry.moveToPoint(event.clientX, event.clientY);\r\n } catch (invalidPoint) { \r\n return;\r\n }\r\n selectionRange = selectionEntry.duplicate();\r\n }\r\n}", "title": "" }, { "docid": "b2f6ab9f9699a5309bf38a751927192f", "score": "0.5525337", "text": "set selectionStart(value) {\n this.$.textarea.selectionStart = value;\n }", "title": "" }, { "docid": "b2f6ab9f9699a5309bf38a751927192f", "score": "0.5525337", "text": "set selectionStart(value) {\n this.$.textarea.selectionStart = value;\n }", "title": "" }, { "docid": "b288c1b1ec6266b268efbaf749b7aeb8", "score": "0.5519091", "text": "function SelectCodeBlock() {\r\n\tvar uSel = Editor.Selection;\r\n if (Sel.SelStartLine == 0) return;\r\n\r\n\tvar startLine = FindCodeStart(uSel.SelStartLine);\r\n\r\n\tif (startLine >= 0) { \t\t\t\t\t\t// We found the starting line\r\n\t\t// Find line with starting curly bracket (not always the same as the startLine)\r\n\t\tvar bracketLine = FindStartBracket(startLine);\r\n\t\tif (bracketLine != -1) {\t\t\t\t// We found the starting curly bracket\r\n\t\t\tvar endLine = FindCodeEnd(bracketLine);\r\n\t\t\tif (endLine >= startLine) { \t // We found the ending line\r\n\t\t\t\t// Set selection\r\n\t\t\t\tuSel.SelStartLine = startLine;\r\n\t\t\t\tuSel.SelStartCol = 0;\r\n\t\t\t\tuSel.SelEndLine = endLine + 1;\r\n\t\t\t\tuSel.SelEndCol = 0;\r\n\t\t\t\tEditor.Selection = uSel;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "0037a6c8362f8f5ef76ceeb3b132f419", "score": "0.55174613", "text": "get selectionStart(): number {\n return this._rootDOMNode.selectionStart;\n }", "title": "" }, { "docid": "91b85c643670aa1a374dda71f5993257", "score": "0.55168843", "text": "updateSelection(force = false, fromPointer = false) {\n if (!(fromPointer || this.mayControlSelection()))\n return;\n let primary = this.view.state.selection.primary;\n // FIXME need to handle the case where the selection falls inside a block range\n let anchor = this.domAtPos(primary.anchor);\n let head = this.domAtPos(primary.head);\n let domSel = getSelection$1(this.root);\n // If the selection is already here, or in an equivalent position, don't touch it\n if (force || !domSel.focusNode ||\n (browser.gecko && primary.empty && nextToUneditable(domSel.focusNode, domSel.focusOffset)) ||\n !isEquivalentPosition(anchor.node, anchor.offset, domSel.anchorNode, domSel.anchorOffset) ||\n !isEquivalentPosition(head.node, head.offset, domSel.focusNode, domSel.focusOffset)) {\n this.view.observer.ignore(() => {\n if (primary.empty) {\n // Work around https://bugzilla.mozilla.org/show_bug.cgi?id=1612076\n if (browser.gecko) {\n let nextTo = nextToUneditable(anchor.node, anchor.offset);\n if (nextTo && nextTo != (1 /* Before */ | 2 /* After */)) {\n let text = nearbyTextNode(anchor.node, anchor.offset, nextTo == 1 /* Before */ ? 1 : -1);\n if (text)\n anchor = new DOMPos(text, nextTo == 1 /* Before */ ? 0 : text.nodeValue.length);\n }\n }\n domSel.collapse(anchor.node, anchor.offset);\n if (primary.bidiLevel != null && domSel.cursorBidiLevel != null)\n domSel.cursorBidiLevel = primary.bidiLevel;\n }\n else if (domSel.extend) {\n // Selection.extend can be used to create an 'inverted' selection\n // (one where the focus is before the anchor), but not all\n // browsers support it yet.\n domSel.collapse(anchor.node, anchor.offset);\n domSel.extend(head.node, head.offset);\n }\n else {\n // Primitive (IE) way\n let range = document.createRange();\n if (primary.anchor > primary.head)\n [anchor, head] = [head, anchor];\n range.setEnd(head.node, head.offset);\n range.setStart(anchor.node, anchor.offset);\n domSel.removeAllRanges();\n domSel.addRange(range);\n }\n });\n }\n this.impreciseAnchor = anchor.precise ? null : new DOMPos(domSel.anchorNode, domSel.anchorOffset);\n this.impreciseHead = head.precise ? null : new DOMPos(domSel.focusNode, domSel.focusOffset);\n }", "title": "" }, { "docid": "eec2ac53e8401989e178b8faf9030850", "score": "0.5489091", "text": "function indentSelection() {\n // TODO: Should use feature detection\n if (Prototype.Browser.Gecko) {\n var selection, range, node, blockquote;\n\n selection = window.getSelection();\n range = selection.getRangeAt(0);\n node = selection.getNode();\n\n if (range.collapsed) {\n range = document.createRange();\n range.selectNodeContents(node);\n selection.removeAllRanges();\n selection.addRange(range);\n }\n\n blockquote = new Element('blockquote');\n range = selection.getRangeAt(0);\n range.surroundContents(blockquote);\n } else {\n this.execCommand('indent', false, null);\n }\n }", "title": "" }, { "docid": "5afc0c5024d6a9fda812a0126d6b8d45", "score": "0.5483278", "text": "function moveStart(rng) {\n\t\t\tvar container = rng.startContainer,\n\t\t\t\t\toffset = rng.startOffset, isAtEndOfText,\n\t\t\t\t\twalker, node, nodes, tmpNode;\n\n\t\t\t// Convert text node into index if possible\n\t\t\tif (container.nodeType == 3 && offset >= container.nodeValue.length) {\n\t\t\t\t// Get the parent container location and walk from there\n\t\t\t\toffset = nodeIndex(container);\n\t\t\t\tcontainer = container.parentNode;\n\t\t\t\tisAtEndOfText = true;\n\t\t\t}\n\n\t\t\t// Move startContainer/startOffset in to a suitable node\n\t\t\tif (container.nodeType == 1) {\n\t\t\t\tnodes = container.childNodes;\n\t\t\t\tcontainer = nodes[Math.min(offset, nodes.length - 1)];\n\t\t\t\twalker = new TreeWalker(container, dom.getParent(container, dom.isBlock));\n\n\t\t\t\t// If offset is at end of the parent node walk to the next one\n\t\t\t\tif (offset > nodes.length - 1 || isAtEndOfText) {\n\t\t\t\t\twalker.next();\n\t\t\t\t}\n\n\t\t\t\tfor (node = walker.current(); node; node = walker.next()) {\n\t\t\t\t\tif (node.nodeType == 3 && !isWhiteSpaceNode(node)) {\n\t\t\t\t\t\t// IE has a \"neat\" feature where it moves the start node into the closest element\n\t\t\t\t\t\t// we can avoid this by inserting an element before it and then remove it after we set the selection\n\t\t\t\t\t\ttmpNode = dom.create('a', {'data-mce-bogus': 'all'}, INVISIBLE_CHAR);\n\t\t\t\t\t\tnode.parentNode.insertBefore(tmpNode, node);\n\n\t\t\t\t\t\t// Set selection and remove tmpNode\n\t\t\t\t\t\trng.setStart(node, 0);\n\t\t\t\t\t\tselection.setRng(rng);\n\t\t\t\t\t\tdom.remove(tmpNode);\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "eae0a11875d83490331895de15fbec7d", "score": "0.5477425", "text": "function updateSelectionOnFocus(element) {\n const selection$1 = element.ownerDocument.getSelection();\n /* istanbul ignore if */ if (!(selection$1 === null || selection$1 === void 0 ? void 0 : selection$1.focusNode)) {\n return;\n }\n // If the focus moves inside an element with own selection implementation,\n // the document selection will be this element.\n // But if the focused element is inside a contenteditable,\n // 1) a collapsed selection will be retained.\n // 2) other selections will be replaced by a cursor\n // 2.a) at the start of the first child if it is a text node\n // 2.b) at the start of the contenteditable.\n if (selection.hasOwnSelection(element)) {\n const contenteditable = isContentEditable.getContentEditable(selection$1.focusNode);\n if (contenteditable) {\n if (!selection$1.isCollapsed) {\n var ref;\n const focusNode = ((ref = contenteditable.firstChild) === null || ref === void 0 ? void 0 : ref.nodeType) === 3 ? contenteditable.firstChild : contenteditable;\n selection$1.setBaseAndExtent(focusNode, 0, focusNode, 0);\n }\n } else {\n selection$1.setBaseAndExtent(element, 0, element, 0);\n }\n }\n}", "title": "" }, { "docid": "241aa8b8e55ba5c1db65a24f621caf91", "score": "0.54713494", "text": "function prepareSelectAllHack() {\r\n if (display.input.selectionStart != null) {\r\n var selected = cm.somethingSelected();\r\n var extval = display.input.value = \"\\u200b\" + (selected ? display.input.value : \"\");\r\n display.prevInput = selected ? \"\" : \"\\u200b\";\r\n display.input.selectionStart = 1; display.input.selectionEnd = extval.length;\r\n // Re-set this, in case some other handler touched the\r\n // selection in the meantime.\r\n display.selForContextMenu = cm.doc.sel;\r\n }\r\n }", "title": "" }, { "docid": "8204692a6b500d0b767e2eaf8b91064b", "score": "0.54654074", "text": "function dwscripts_fixUpSelection(dom, bLeaveHeadSelection, bCollapseParagraphs)\n{\n\ttry{\n\t\tvar retVal = null;\n\t\t\n\t\tdom = (dom == null) ? dw.getDocumentDOM() : dom;\n\t\t\n\t\tvar offsets = null;\n\t\t\n\t\tif (!bLeaveHeadSelection && !dwscripts.selectionIsInBody(dom))\n\t\t{\n\t\toffsets = dwscripts.setCursorToEndOfBody(dom);\n\t\t}\n\t\telse\n\t\t{\n\t\toffsets = dwscripts.getBalancedSelection(dom, bCollapseParagraphs);\n\t\t}\n\t\t\n\t\tif (offsets)\n\t\t{\n\t\tretVal = dom.documentElement.outerHTML.substring(offsets[0], offsets[1]);\n\t\t}\n\t}\n\tcatch(e)\n\t{\n\t\t//if we can't fix up the selection, just eat the exception at least the edit will go on\n\t}\n\n return retVal;\n}", "title": "" }, { "docid": "90fb7dbfdf5f360fdaaa137befd6481e", "score": "0.54574794", "text": "function clearSelection () {\n if ( document.selection && typeof(document.selection.empty) != 'undefined' )\n document.selection.empty();\n else if ( typeof(window.getSelection) === 'function' && typeof(window.getSelection().removeAllRanges) === 'function' )\n window.getSelection().removeAllRanges();\n }", "title": "" }, { "docid": "8271306eb55dd7f8a0d0884ccb3bcc45", "score": "0.5440401", "text": "function prepareSelectAllHack() {\n if (display.input.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = display.input.value = \"\\u200b\" + (selected ? display.input.value : \"\");\n display.prevInput = selected ? \"\" : \"\\u200b\";\n display.input.selectionStart = 1; display.input.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }", "title": "" }, { "docid": "8271306eb55dd7f8a0d0884ccb3bcc45", "score": "0.5440401", "text": "function prepareSelectAllHack() {\n if (display.input.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = display.input.value = \"\\u200b\" + (selected ? display.input.value : \"\");\n display.prevInput = selected ? \"\" : \"\\u200b\";\n display.input.selectionStart = 1; display.input.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }", "title": "" }, { "docid": "8271306eb55dd7f8a0d0884ccb3bcc45", "score": "0.5440401", "text": "function prepareSelectAllHack() {\n if (display.input.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = display.input.value = \"\\u200b\" + (selected ? display.input.value : \"\");\n display.prevInput = selected ? \"\" : \"\\u200b\";\n display.input.selectionStart = 1; display.input.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }", "title": "" }, { "docid": "8271306eb55dd7f8a0d0884ccb3bcc45", "score": "0.5440401", "text": "function prepareSelectAllHack() {\n if (display.input.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = display.input.value = \"\\u200b\" + (selected ? display.input.value : \"\");\n display.prevInput = selected ? \"\" : \"\\u200b\";\n display.input.selectionStart = 1; display.input.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }", "title": "" }, { "docid": "8271306eb55dd7f8a0d0884ccb3bcc45", "score": "0.5440401", "text": "function prepareSelectAllHack() {\n if (display.input.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = display.input.value = \"\\u200b\" + (selected ? display.input.value : \"\");\n display.prevInput = selected ? \"\" : \"\\u200b\";\n display.input.selectionStart = 1; display.input.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }", "title": "" }, { "docid": "8271306eb55dd7f8a0d0884ccb3bcc45", "score": "0.5440401", "text": "function prepareSelectAllHack() {\n if (display.input.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = display.input.value = \"\\u200b\" + (selected ? display.input.value : \"\");\n display.prevInput = selected ? \"\" : \"\\u200b\";\n display.input.selectionStart = 1; display.input.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }", "title": "" }, { "docid": "ac63f9edfc2b4fd84d43f55aaee625ae", "score": "0.5435267", "text": "function makeSelectionRestoreFn (activeEl, start, end) {\n return function () {\n activeEl.selectionStart = start;\n activeEl.selectionEnd = end;\n };\n }", "title": "" }, { "docid": "44ffffdbecf68ade50e24c33b00c47a7", "score": "0.5424392", "text": "function goToStartOfCurrentLine() {\n // Go to start of line.\n const nextPosition = currentDocument.lineAt(currentPosition.line).range.start;\n activeEditor.selection = new vscode.Selection(nextPosition /* start */, nextPosition /* end */);\n }", "title": "" }, { "docid": "e5ccd34ab7d20d6c71bd2cd44a1f4451", "score": "0.5420873", "text": "function isCollapsed(selection) {\n\treturn Doc.positionEqual(selection.anchor, selection.focus);\n}", "title": "" }, { "docid": "70ecc9ef521104debbc8acc8318c1779", "score": "0.54184246", "text": "function leftButtonSelect(cm, event, start, behavior) {\n var display = cm.display, doc = cm.doc\n e_preventDefault(event)\n\n var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges\n if (behavior.addNew && !behavior.extend) {\n ourIndex = doc.sel.contains(start)\n if (ourIndex > -1)\n { ourRange = ranges[ourIndex] }\n else\n { ourRange = new Range(start, start) }\n } else {\n ourRange = doc.sel.primary()\n ourIndex = doc.sel.primIndex\n }\n\n if (behavior.unit == \"rectangle\") {\n if (!behavior.addNew) { ourRange = new Range(start, start) }\n start = posFromMouse(cm, event, true, true)\n ourIndex = -1\n } else {\n var range = rangeForUnit(cm, start, behavior.unit)\n if (behavior.extend)\n { ourRange = extendRange(ourRange, range.anchor, range.head, behavior.extend) }\n else\n { ourRange = range }\n }\n\n if (!behavior.addNew) {\n ourIndex = 0\n setSelection(doc, new Selection([ourRange], 0), sel_mouse)\n startSel = doc.sel\n } else if (ourIndex == -1) {\n ourIndex = ranges.length\n setSelection(doc, normalizeSelection(ranges.concat([ourRange]), ourIndex),\n {scroll: false, origin: \"*mouse\"})\n } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == \"char\" && !behavior.extend) {\n setSelection(doc, normalizeSelection(ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),\n {scroll: false, origin: \"*mouse\"})\n startSel = doc.sel\n } else {\n replaceOneSelection(doc, ourIndex, ourRange, sel_mouse)\n }\n\n var lastPos = start\n function extendTo(pos) {\n if (cmp(lastPos, pos) == 0) { return }\n lastPos = pos\n\n if (behavior.unit == \"rectangle\") {\n var ranges = [], tabSize = cm.options.tabSize\n var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize)\n var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize)\n var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol)\n for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));\n line <= end; line++) {\n var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize)\n if (left == right)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))) }\n else if (text.length > leftPos)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))) }\n }\n if (!ranges.length) { ranges.push(new Range(start, start)) }\n setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),\n {origin: \"*mouse\", scroll: false})\n cm.scrollIntoView(pos)\n } else {\n var oldRange = ourRange\n var range = rangeForUnit(cm, pos, behavior.unit)\n var anchor = oldRange.anchor, head\n if (cmp(range.anchor, anchor) > 0) {\n head = range.head\n anchor = minPos(oldRange.from(), range.anchor)\n } else {\n head = range.anchor\n anchor = maxPos(oldRange.to(), range.head)\n }\n var ranges$1 = startSel.ranges.slice(0)\n ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head))\n setSelection(doc, normalizeSelection(ranges$1, ourIndex), sel_mouse)\n }\n }\n\n var editorSize = display.wrapper.getBoundingClientRect()\n // Used to ensure timeout re-tries don't fire when another extend\n // happened in the meantime (clearTimeout isn't reliable -- at\n // least on Chrome, the timeouts still happen even when cleared,\n // if the clear happens after their scheduled firing time).\n var counter = 0\n\n function extend(e) {\n var curCount = ++counter\n var cur = posFromMouse(cm, e, true, behavior.unit == \"rectangle\")\n if (!cur) { return }\n if (cmp(cur, lastPos) != 0) {\n cm.curOp.focus = activeElt()\n extendTo(cur)\n var visible = visibleLines(display, doc)\n if (cur.line >= visible.to || cur.line < visible.from)\n { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e) }}), 150) }\n } else {\n var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0\n if (outside) { setTimeout(operation(cm, function () {\n if (counter != curCount) { return }\n display.scroller.scrollTop += outside\n extend(e)\n }), 50) }\n }\n }\n\n function done(e) {\n cm.state.selectingText = false\n counter = Infinity\n e_preventDefault(e)\n display.input.focus()\n off(display.wrapper.ownerDocument, \"mousemove\", move)\n off(display.wrapper.ownerDocument, \"mouseup\", up)\n doc.history.lastSelOrigin = null\n }\n\n var move = operation(cm, function (e) {\n if (e.buttons === 0 || !e_button(e)) { done(e) }\n else { extend(e) }\n })\n var up = operation(cm, done)\n cm.state.selectingText = up\n on(display.wrapper.ownerDocument, \"mousemove\", move)\n on(display.wrapper.ownerDocument, \"mouseup\", up)\n}", "title": "" }, { "docid": "2a6c612d8396dcaf4d8994506020dcab", "score": "0.54184246", "text": "function leftButtonSelect(cm, event, start, behavior) {\n var display = cm.display, doc = cm.doc\n e_preventDefault(event)\n\n var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges\n if (behavior.addNew && !behavior.extend) {\n ourIndex = doc.sel.contains(start)\n if (ourIndex > -1)\n { ourRange = ranges[ourIndex] }\n else\n { ourRange = new Range(start, start) }\n } else {\n ourRange = doc.sel.primary()\n ourIndex = doc.sel.primIndex\n }\n\n if (behavior.unit == \"rectangle\") {\n if (!behavior.addNew) { ourRange = new Range(start, start) }\n start = posFromMouse(cm, event, true, true)\n ourIndex = -1\n } else {\n var range = rangeForUnit(cm, start, behavior.unit)\n if (behavior.extend)\n { ourRange = extendRange(ourRange, range.anchor, range.head, behavior.extend) }\n else\n { ourRange = range }\n }\n\n if (!behavior.addNew) {\n ourIndex = 0\n setSelection(doc, new Selection([ourRange], 0), sel_mouse)\n startSel = doc.sel\n } else if (ourIndex == -1) {\n ourIndex = ranges.length\n setSelection(doc, normalizeSelection(ranges.concat([ourRange]), ourIndex),\n {scroll: false, origin: \"*mouse\"})\n } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == \"char\" && !behavior.extend) {\n setSelection(doc, normalizeSelection(ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),\n {scroll: false, origin: \"*mouse\"})\n startSel = doc.sel\n } else {\n replaceOneSelection(doc, ourIndex, ourRange, sel_mouse)\n }\n\n var lastPos = start\n function extendTo(pos) {\n if (cmp(lastPos, pos) == 0) { return }\n lastPos = pos\n\n if (behavior.unit == \"rectangle\") {\n var ranges = [], tabSize = cm.options.tabSize\n var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize)\n var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize)\n var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol)\n for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));\n line <= end; line++) {\n var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize)\n if (left == right)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))) }\n else if (text.length > leftPos)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))) }\n }\n if (!ranges.length) { ranges.push(new Range(start, start)) }\n setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),\n {origin: \"*mouse\", scroll: false})\n cm.scrollIntoView(pos)\n } else {\n var oldRange = ourRange\n var range = rangeForUnit(cm, pos, behavior.unit)\n var anchor = oldRange.anchor, head\n if (cmp(range.anchor, anchor) > 0) {\n head = range.head\n anchor = minPos(oldRange.from(), range.anchor)\n } else {\n head = range.anchor\n anchor = maxPos(oldRange.to(), range.head)\n }\n var ranges$1 = startSel.ranges.slice(0)\n ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head))\n setSelection(doc, normalizeSelection(ranges$1, ourIndex), sel_mouse)\n }\n }\n\n var editorSize = display.wrapper.getBoundingClientRect()\n // Used to ensure timeout re-tries don't fire when another extend\n // happened in the meantime (clearTimeout isn't reliable -- at\n // least on Chrome, the timeouts still happen even when cleared,\n // if the clear happens after their scheduled firing time).\n var counter = 0\n\n function extend(e) {\n var curCount = ++counter\n var cur = posFromMouse(cm, e, true, behavior.unit == \"rectangle\")\n if (!cur) { return }\n if (cmp(cur, lastPos) != 0) {\n cm.curOp.focus = activeElt()\n extendTo(cur)\n var visible = visibleLines(display, doc)\n if (cur.line >= visible.to || cur.line < visible.from)\n { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e) }}), 150) }\n } else {\n var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0\n if (outside) { setTimeout(operation(cm, function () {\n if (counter != curCount) { return }\n display.scroller.scrollTop += outside\n extend(e)\n }), 50) }\n }\n }\n\n function done(e) {\n cm.state.selectingText = false\n counter = Infinity\n e_preventDefault(e)\n display.input.focus()\n off(document, \"mousemove\", move)\n off(document, \"mouseup\", up)\n doc.history.lastSelOrigin = null\n }\n\n var move = operation(cm, function (e) {\n if (!e_button(e)) { done(e) }\n else { extend(e) }\n })\n var up = operation(cm, done)\n cm.state.selectingText = up\n on(document, \"mousemove\", move)\n on(document, \"mouseup\", up)\n}", "title": "" }, { "docid": "2a6c612d8396dcaf4d8994506020dcab", "score": "0.54184246", "text": "function leftButtonSelect(cm, event, start, behavior) {\n var display = cm.display, doc = cm.doc\n e_preventDefault(event)\n\n var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges\n if (behavior.addNew && !behavior.extend) {\n ourIndex = doc.sel.contains(start)\n if (ourIndex > -1)\n { ourRange = ranges[ourIndex] }\n else\n { ourRange = new Range(start, start) }\n } else {\n ourRange = doc.sel.primary()\n ourIndex = doc.sel.primIndex\n }\n\n if (behavior.unit == \"rectangle\") {\n if (!behavior.addNew) { ourRange = new Range(start, start) }\n start = posFromMouse(cm, event, true, true)\n ourIndex = -1\n } else {\n var range = rangeForUnit(cm, start, behavior.unit)\n if (behavior.extend)\n { ourRange = extendRange(ourRange, range.anchor, range.head, behavior.extend) }\n else\n { ourRange = range }\n }\n\n if (!behavior.addNew) {\n ourIndex = 0\n setSelection(doc, new Selection([ourRange], 0), sel_mouse)\n startSel = doc.sel\n } else if (ourIndex == -1) {\n ourIndex = ranges.length\n setSelection(doc, normalizeSelection(ranges.concat([ourRange]), ourIndex),\n {scroll: false, origin: \"*mouse\"})\n } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == \"char\" && !behavior.extend) {\n setSelection(doc, normalizeSelection(ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),\n {scroll: false, origin: \"*mouse\"})\n startSel = doc.sel\n } else {\n replaceOneSelection(doc, ourIndex, ourRange, sel_mouse)\n }\n\n var lastPos = start\n function extendTo(pos) {\n if (cmp(lastPos, pos) == 0) { return }\n lastPos = pos\n\n if (behavior.unit == \"rectangle\") {\n var ranges = [], tabSize = cm.options.tabSize\n var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize)\n var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize)\n var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol)\n for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));\n line <= end; line++) {\n var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize)\n if (left == right)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))) }\n else if (text.length > leftPos)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))) }\n }\n if (!ranges.length) { ranges.push(new Range(start, start)) }\n setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),\n {origin: \"*mouse\", scroll: false})\n cm.scrollIntoView(pos)\n } else {\n var oldRange = ourRange\n var range = rangeForUnit(cm, pos, behavior.unit)\n var anchor = oldRange.anchor, head\n if (cmp(range.anchor, anchor) > 0) {\n head = range.head\n anchor = minPos(oldRange.from(), range.anchor)\n } else {\n head = range.anchor\n anchor = maxPos(oldRange.to(), range.head)\n }\n var ranges$1 = startSel.ranges.slice(0)\n ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head))\n setSelection(doc, normalizeSelection(ranges$1, ourIndex), sel_mouse)\n }\n }\n\n var editorSize = display.wrapper.getBoundingClientRect()\n // Used to ensure timeout re-tries don't fire when another extend\n // happened in the meantime (clearTimeout isn't reliable -- at\n // least on Chrome, the timeouts still happen even when cleared,\n // if the clear happens after their scheduled firing time).\n var counter = 0\n\n function extend(e) {\n var curCount = ++counter\n var cur = posFromMouse(cm, e, true, behavior.unit == \"rectangle\")\n if (!cur) { return }\n if (cmp(cur, lastPos) != 0) {\n cm.curOp.focus = activeElt()\n extendTo(cur)\n var visible = visibleLines(display, doc)\n if (cur.line >= visible.to || cur.line < visible.from)\n { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e) }}), 150) }\n } else {\n var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0\n if (outside) { setTimeout(operation(cm, function () {\n if (counter != curCount) { return }\n display.scroller.scrollTop += outside\n extend(e)\n }), 50) }\n }\n }\n\n function done(e) {\n cm.state.selectingText = false\n counter = Infinity\n e_preventDefault(e)\n display.input.focus()\n off(document, \"mousemove\", move)\n off(document, \"mouseup\", up)\n doc.history.lastSelOrigin = null\n }\n\n var move = operation(cm, function (e) {\n if (!e_button(e)) { done(e) }\n else { extend(e) }\n })\n var up = operation(cm, done)\n cm.state.selectingText = up\n on(document, \"mousemove\", move)\n on(document, \"mouseup\", up)\n}", "title": "" }, { "docid": "b44e753aff5fa251a9e814c3665eb291", "score": "0.5418241", "text": "function clearSingleSelection() {\n if (current_mode !== mode.fixation) {\n console.log(\"Warning: request to clear single selection when not in fixation mode.\");\n return;\n }\n path.classed(\"dimmed\", false);\n focusOnNode(selected_singleNode, false);\n selected_singleNode = null;\n current_mode = mode.exploration;\n}", "title": "" }, { "docid": "280b53117e82b16401ac024d5477b68f", "score": "0.5416451", "text": "function reset() {\n\t if (indents === 0) return selector = null\n\t while (lastIndents-- > indents) selector = selector.parent\n\t }", "title": "" }, { "docid": "1337d65f9bfe4aec6d212cca91662973", "score": "0.54153126", "text": "function clearSelection() {\n if ( document.selection ) {\n document.selection.empty();\n } else if ( window.getSelection ) {\n window.getSelection().removeAllRanges();\n }\n}", "title": "" }, { "docid": "f9b678547f0366c951bedec099f40caa", "score": "0.5403418", "text": "function clearSelection() {\n if (window.getSelection) {\n window.getSelection().removeAllRanges();\n } else if (document.selection) {\n document.selection.empty();\n }\n}", "title": "" }, { "docid": "e71072615fb57286b43e3e4eaa0d6337", "score": "0.5397458", "text": "function select() {\n \tif (selected == false)\n \t\ttoggleSelection();\n }", "title": "" }, { "docid": "ae3df6b457b1b7b2f6b63d9751a16f07", "score": "0.5396478", "text": "get SelectionStart() { return this.native.SelectionStart; }", "title": "" }, { "docid": "33ddceedd895e86b67ecee038c8956da", "score": "0.53942996", "text": "function topCenterOfSelection() {\n var range = window.getSelection().getRangeAt(0),\n rects = range.getClientRects();\n if (!rects.length) return range.getBoundingClientRect();\n var left = undefined,\n right = undefined,\n top = undefined,\n bottom = undefined;\n for (var i = 0; i < rects.length; i++) {\n var rect = rects[i];\n if (left == right) {\n ;left = rect.left;\n right = rect.right;\n top = rect.top;\n bottom = rect.bottom;\n } else if (rect.top < bottom - 1 && (\n // Chrome bug where bogus rectangles are inserted at span boundaries\n i == rects.length - 1 || Math.abs(rects[i + 1].left - rect.left) > 1)) {\n left = Math.min(left, rect.left);\n right = Math.max(right, rect.right);\n top = Math.min(top, rect.top);\n }\n }\n return { top: top, left: (left + right) / 2 };\n}", "title": "" }, { "docid": "2608504076ca4c8f8d52f76a56534b98", "score": "0.5380519", "text": "function makeSelectionRestoreFn(activeEl, start, end) {\n return function() {\n activeEl.selectionStart = start;\n activeEl.selectionEnd = end;\n };\n }", "title": "" }, { "docid": "ae98a0e50248bb1cb0f2080fefb2938a", "score": "0.5374787", "text": "function clearTextSelection() {\r\n document.getElementById('textStartOffset').value = 0;\r\n document.getElementById('startOffsetXpath').value = '';\r\n document.getElementById('textEndOffset').value = 0;\r\n document.getElementById('endOffsetXpath').value = '';\r\n document.getElementById('text-selection').innerHTML = \"No selection: alignment will default to entire text\";\r\n }", "title": "" }, { "docid": "1beaef1ade2731a82196d055a659166e", "score": "0.5365466", "text": "static single(anchor, head = anchor) {\n return new EditorSelection([EditorSelection.range(anchor, head)], 0);\n }", "title": "" }, { "docid": "8d357d83183177686ef8d6573ff5ecae", "score": "0.53631866", "text": "function moveSelectionForward(\n editorState: EditorState,\n maxDistance: number,\n): SelectionState {\n const selection = editorState.getSelection();\n // Should eventually make this an invariant\n warning(\n selection.isCollapsed(),\n 'moveSelectionForward should only be called with a collapsed SelectionState',\n );\n const key = selection.getStartKey();\n const offset = selection.getStartOffset();\n const content = editorState.getCurrentContent();\n\n let focusKey = key;\n let focusOffset;\n\n const block = content.getBlockForKey(key);\n\n if (maxDistance > block.getText().length - offset) {\n focusKey = content.getKeyAfter(key);\n focusOffset = 0;\n } else {\n focusOffset = offset + maxDistance;\n }\n\n return selection.merge({focusKey, focusOffset});\n}", "title": "" }, { "docid": "9e269aa61999ecdf0b3861dc346d0577", "score": "0.5356303", "text": "function anchorFirst() {\n\t self.startRow = anchorRow;\n\t self.startNode = selection.anchorNode;\n\t self.startOffset = selection.anchorOffset;\n\t self.endRow = focusRow;\n\t self.endNode = selection.focusNode;\n\t self.endOffset = selection.focusOffset;\n\t }", "title": "" }, { "docid": "7166dd4029f3945494a2bd3bbb006375", "score": "0.5354501", "text": "function moveSelectionRight(){\n\t\tif (currentSelection.nextSibling != null){\n\t\t\tcurrentSelection.style.backgroundColor = \"white\";\n\t\t\tcurrentSelection.style.border = \"\";\n\t\t\tcurrentSelection = currentSelection.nextSibling;\n\t\t\tcurrentSelection.style.backgroundColor = \"yellow\";\n\t\t\tcurrentSelection.style.border = \"solid\";\n\t\t}\t\n}", "title": "" }, { "docid": "1dcc61649c03987d8c721d8a62df86bf", "score": "0.53408206", "text": "_firstActive() {\n this.currentFocus = -1;\n this._removeActive(this._visibleOptions());\n if (this._config.autocomplete) {\n if (this._unselectedOptions().length > 0) {\n this._nextUnselected(this._visibleOptions());\n this._visibleOptions()[this.currentFocus].classList.add(\"multi-select__option-active\");\n }\n }\n }", "title": "" }, { "docid": "7c20231f3ee91da59fcac60c7bda05c9", "score": "0.5338932", "text": "selectionEnd() {}", "title": "" }, { "docid": "2112782aaedb4100ea7a81c601fe9150", "score": "0.5336495", "text": "function wrapSelection() {\n const selection = document.getSelection()\n if (!selection || selection.isCollapsed) {\n return\n }\n let phrase = selection.toString()\n if (!/\\S/.test(phrase)) {\n return\n }\n phrase = squish(phrase)\n let anchor = describeSelectionNode(selection.anchorNode, selection.anchorOffset)\n let focus = describeSelectionNode(selection.focusNode, selection.focusOffset)\n const ap = anchor.parent || anchor.node, fp = focus.parent || focus.node\n const parent = commonParent(ap, fp)\n const context = squish(parent.textContent)\n const i = context.indexOf(phrase);\n const before = context.substr(0, i), after = context.substr(i + phrase.length)\n const path = simplestPath(parent), anchorPath = absolutePath(parent, ap), focusPath = absolutePath(parent, fp)\n anchor.path = anchorPath\n focus.path = focusPath\n anchor = trimNode(anchor)\n focus = trimNode(focus)\n return { phrase, before, after, selection: { path, anchor, focus } }\n}", "title": "" }, { "docid": "2b49c1b5e4898562917bd8714890a4f4", "score": "0.53341615", "text": "function getFirstRange() {\n var sel = rangy.getSelection();\n return sel.rangeCount ? sel.getRangeAt(0) : null;\n}", "title": "" }, { "docid": "886dffb45717c546cea6cad015406a66", "score": "0.5331506", "text": "function leftButtonSelect(cm, event, start, behavior) {\n var display = cm.display, doc = cm.doc;\n e_preventDefault(event);\n\n var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;\n if (behavior.addNew && !behavior.extend) {\n ourIndex = doc.sel.contains(start);\n if (ourIndex > -1)\n { ourRange = ranges[ourIndex]; }\n else\n { ourRange = new Range(start, start); }\n } else {\n ourRange = doc.sel.primary();\n ourIndex = doc.sel.primIndex;\n }\n\n if (behavior.unit == \"rectangle\") {\n if (!behavior.addNew) { ourRange = new Range(start, start); }\n start = posFromMouse(cm, event, true, true);\n ourIndex = -1;\n } else {\n var range$$1 = rangeForUnit(cm, start, behavior.unit);\n if (behavior.extend)\n { ourRange = extendRange(ourRange, range$$1.anchor, range$$1.head, behavior.extend); }\n else\n { ourRange = range$$1; }\n }\n\n if (!behavior.addNew) {\n ourIndex = 0;\n setSelection(doc, new Selection([ourRange], 0), sel_mouse);\n startSel = doc.sel;\n } else if (ourIndex == -1) {\n ourIndex = ranges.length;\n setSelection(doc, normalizeSelection(ranges.concat([ourRange]), ourIndex),\n {scroll: false, origin: \"*mouse\"});\n } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == \"char\" && !behavior.extend) {\n setSelection(doc, normalizeSelection(ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),\n {scroll: false, origin: \"*mouse\"});\n startSel = doc.sel;\n } else {\n replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);\n }\n\n var lastPos = start;\n function extendTo(pos) {\n if (cmp(lastPos, pos) == 0) { return }\n lastPos = pos;\n\n if (behavior.unit == \"rectangle\") {\n var ranges = [], tabSize = cm.options.tabSize;\n var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);\n var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);\n var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);\n for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));\n line <= end; line++) {\n var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);\n if (left == right)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); }\n else if (text.length > leftPos)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); }\n }\n if (!ranges.length) { ranges.push(new Range(start, start)); }\n setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),\n {origin: \"*mouse\", scroll: false});\n cm.scrollIntoView(pos);\n } else {\n var oldRange = ourRange;\n var range$$1 = rangeForUnit(cm, pos, behavior.unit);\n var anchor = oldRange.anchor, head;\n if (cmp(range$$1.anchor, anchor) > 0) {\n head = range$$1.head;\n anchor = minPos(oldRange.from(), range$$1.anchor);\n } else {\n head = range$$1.anchor;\n anchor = maxPos(oldRange.to(), range$$1.head);\n }\n var ranges$1 = startSel.ranges.slice(0);\n ranges$1[ourIndex] = new Range(clipPos(doc, anchor), head);\n setSelection(doc, normalizeSelection(ranges$1, ourIndex), sel_mouse);\n }\n }\n\n var editorSize = display.wrapper.getBoundingClientRect();\n // Used to ensure timeout re-tries don't fire when another extend\n // happened in the meantime (clearTimeout isn't reliable -- at\n // least on Chrome, the timeouts still happen even when cleared,\n // if the clear happens after their scheduled firing time).\n var counter = 0;\n\n function extend(e) {\n var curCount = ++counter;\n var cur = posFromMouse(cm, e, true, behavior.unit == \"rectangle\");\n if (!cur) { return }\n if (cmp(cur, lastPos) != 0) {\n cm.curOp.focus = activeElt();\n extendTo(cur);\n var visible = visibleLines(display, doc);\n if (cur.line >= visible.to || cur.line < visible.from)\n { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e); }}), 150); }\n } else {\n var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;\n if (outside) { setTimeout(operation(cm, function () {\n if (counter != curCount) { return }\n display.scroller.scrollTop += outside;\n extend(e);\n }), 50); }\n }\n }\n\n function done(e) {\n cm.state.selectingText = false;\n counter = Infinity;\n e_preventDefault(e);\n display.input.focus();\n off(document, \"mousemove\", move);\n off(document, \"mouseup\", up);\n doc.history.lastSelOrigin = null;\n }\n\n var move = operation(cm, function (e) {\n if (!e_button(e)) { done(e); }\n else { extend(e); }\n });\n var up = operation(cm, done);\n cm.state.selectingText = up;\n on(document, \"mousemove\", move);\n on(document, \"mouseup\", up);\n}", "title": "" }, { "docid": "1a5f2919b6286daf6cbc1338530ac81a", "score": "0.5331506", "text": "function leftButtonSelect(cm, event, start, behavior) {\n var display = cm.display, doc = cm.doc;\n e_preventDefault(event);\n\n var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;\n if (behavior.addNew && !behavior.extend) {\n ourIndex = doc.sel.contains(start);\n if (ourIndex > -1)\n { ourRange = ranges[ourIndex]; }\n else\n { ourRange = new Range(start, start); }\n } else {\n ourRange = doc.sel.primary();\n ourIndex = doc.sel.primIndex;\n }\n\n if (behavior.unit == \"rectangle\") {\n if (!behavior.addNew) { ourRange = new Range(start, start); }\n start = posFromMouse(cm, event, true, true);\n ourIndex = -1;\n } else {\n var range$$1 = rangeForUnit(cm, start, behavior.unit);\n if (behavior.extend)\n { ourRange = extendRange(ourRange, range$$1.anchor, range$$1.head, behavior.extend); }\n else\n { ourRange = range$$1; }\n }\n\n if (!behavior.addNew) {\n ourIndex = 0;\n setSelection(doc, new Selection([ourRange], 0), sel_mouse);\n startSel = doc.sel;\n } else if (ourIndex == -1) {\n ourIndex = ranges.length;\n setSelection(doc, normalizeSelection(ranges.concat([ourRange]), ourIndex),\n {scroll: false, origin: \"*mouse\"});\n } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == \"char\" && !behavior.extend) {\n setSelection(doc, normalizeSelection(ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),\n {scroll: false, origin: \"*mouse\"});\n startSel = doc.sel;\n } else {\n replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);\n }\n\n var lastPos = start;\n function extendTo(pos) {\n if (cmp(lastPos, pos) == 0) { return }\n lastPos = pos;\n\n if (behavior.unit == \"rectangle\") {\n var ranges = [], tabSize = cm.options.tabSize;\n var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);\n var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);\n var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);\n for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));\n line <= end; line++) {\n var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);\n if (left == right)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); }\n else if (text.length > leftPos)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); }\n }\n if (!ranges.length) { ranges.push(new Range(start, start)); }\n setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),\n {origin: \"*mouse\", scroll: false});\n cm.scrollIntoView(pos);\n } else {\n var oldRange = ourRange;\n var range$$1 = rangeForUnit(cm, pos, behavior.unit);\n var anchor = oldRange.anchor, head;\n if (cmp(range$$1.anchor, anchor) > 0) {\n head = range$$1.head;\n anchor = minPos(oldRange.from(), range$$1.anchor);\n } else {\n head = range$$1.anchor;\n anchor = maxPos(oldRange.to(), range$$1.head);\n }\n var ranges$1 = startSel.ranges.slice(0);\n ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head));\n setSelection(doc, normalizeSelection(ranges$1, ourIndex), sel_mouse);\n }\n }\n\n var editorSize = display.wrapper.getBoundingClientRect();\n // Used to ensure timeout re-tries don't fire when another extend\n // happened in the meantime (clearTimeout isn't reliable -- at\n // least on Chrome, the timeouts still happen even when cleared,\n // if the clear happens after their scheduled firing time).\n var counter = 0;\n\n function extend(e) {\n var curCount = ++counter;\n var cur = posFromMouse(cm, e, true, behavior.unit == \"rectangle\");\n if (!cur) { return }\n if (cmp(cur, lastPos) != 0) {\n cm.curOp.focus = activeElt();\n extendTo(cur);\n var visible = visibleLines(display, doc);\n if (cur.line >= visible.to || cur.line < visible.from)\n { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e); }}), 150); }\n } else {\n var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;\n if (outside) { setTimeout(operation(cm, function () {\n if (counter != curCount) { return }\n display.scroller.scrollTop += outside;\n extend(e);\n }), 50); }\n }\n }\n\n function done(e) {\n cm.state.selectingText = false;\n counter = Infinity;\n e_preventDefault(e);\n display.input.focus();\n off(display.wrapper.ownerDocument, \"mousemove\", move);\n off(display.wrapper.ownerDocument, \"mouseup\", up);\n doc.history.lastSelOrigin = null;\n }\n\n var move = operation(cm, function (e) {\n if (!e_button(e)) { done(e); }\n else { extend(e); }\n });\n var up = operation(cm, done);\n cm.state.selectingText = up;\n on(display.wrapper.ownerDocument, \"mousemove\", move);\n on(display.wrapper.ownerDocument, \"mouseup\", up);\n}", "title": "" }, { "docid": "a0dca1ec50bed23f6f71dab7e52eaa84", "score": "0.5331506", "text": "function leftButtonSelect(cm, event, start, behavior) {\n var display = cm.display, doc = cm.doc;\n e_preventDefault(event);\n\n var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;\n if (behavior.addNew && !behavior.extend) {\n ourIndex = doc.sel.contains(start);\n if (ourIndex > -1)\n { ourRange = ranges[ourIndex]; }\n else\n { ourRange = new Range(start, start); }\n } else {\n ourRange = doc.sel.primary();\n ourIndex = doc.sel.primIndex;\n }\n\n if (behavior.unit == \"rectangle\") {\n if (!behavior.addNew) { ourRange = new Range(start, start); }\n start = posFromMouse(cm, event, true, true);\n ourIndex = -1;\n } else {\n var range$$1 = rangeForUnit(cm, start, behavior.unit);\n if (behavior.extend)\n { ourRange = extendRange(ourRange, range$$1.anchor, range$$1.head, behavior.extend); }\n else\n { ourRange = range$$1; }\n }\n\n if (!behavior.addNew) {\n ourIndex = 0;\n setSelection(doc, new Selection([ourRange], 0), sel_mouse);\n startSel = doc.sel;\n } else if (ourIndex == -1) {\n ourIndex = ranges.length;\n setSelection(doc, normalizeSelection(ranges.concat([ourRange]), ourIndex),\n {scroll: false, origin: \"*mouse\"});\n } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == \"char\" && !behavior.extend) {\n setSelection(doc, normalizeSelection(ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),\n {scroll: false, origin: \"*mouse\"});\n startSel = doc.sel;\n } else {\n replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);\n }\n\n var lastPos = start;\n function extendTo(pos) {\n if (cmp(lastPos, pos) == 0) { return }\n lastPos = pos;\n\n if (behavior.unit == \"rectangle\") {\n var ranges = [], tabSize = cm.options.tabSize;\n var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);\n var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);\n var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);\n for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));\n line <= end; line++) {\n var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);\n if (left == right)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); }\n else if (text.length > leftPos)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); }\n }\n if (!ranges.length) { ranges.push(new Range(start, start)); }\n setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),\n {origin: \"*mouse\", scroll: false});\n cm.scrollIntoView(pos);\n } else {\n var oldRange = ourRange;\n var range$$1 = rangeForUnit(cm, pos, behavior.unit);\n var anchor = oldRange.anchor, head;\n if (cmp(range$$1.anchor, anchor) > 0) {\n head = range$$1.head;\n anchor = minPos(oldRange.from(), range$$1.anchor);\n } else {\n head = range$$1.anchor;\n anchor = maxPos(oldRange.to(), range$$1.head);\n }\n var ranges$1 = startSel.ranges.slice(0);\n ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head));\n setSelection(doc, normalizeSelection(ranges$1, ourIndex), sel_mouse);\n }\n }\n\n var editorSize = display.wrapper.getBoundingClientRect();\n // Used to ensure timeout re-tries don't fire when another extend\n // happened in the meantime (clearTimeout isn't reliable -- at\n // least on Chrome, the timeouts still happen even when cleared,\n // if the clear happens after their scheduled firing time).\n var counter = 0;\n\n function extend(e) {\n var curCount = ++counter;\n var cur = posFromMouse(cm, e, true, behavior.unit == \"rectangle\");\n if (!cur) { return }\n if (cmp(cur, lastPos) != 0) {\n cm.curOp.focus = activeElt();\n extendTo(cur);\n var visible = visibleLines(display, doc);\n if (cur.line >= visible.to || cur.line < visible.from)\n { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e); }}), 150); }\n } else {\n var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;\n if (outside) { setTimeout(operation(cm, function () {\n if (counter != curCount) { return }\n display.scroller.scrollTop += outside;\n extend(e);\n }), 50); }\n }\n }\n\n function done(e) {\n cm.state.selectingText = false;\n counter = Infinity;\n e_preventDefault(e);\n display.input.focus();\n off(document, \"mousemove\", move);\n off(document, \"mouseup\", up);\n doc.history.lastSelOrigin = null;\n }\n\n var move = operation(cm, function (e) {\n if (!e_button(e)) { done(e); }\n else { extend(e); }\n });\n var up = operation(cm, done);\n cm.state.selectingText = up;\n on(document, \"mousemove\", move);\n on(document, \"mouseup\", up);\n}", "title": "" }, { "docid": "a0dca1ec50bed23f6f71dab7e52eaa84", "score": "0.5331506", "text": "function leftButtonSelect(cm, event, start, behavior) {\n var display = cm.display, doc = cm.doc;\n e_preventDefault(event);\n\n var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;\n if (behavior.addNew && !behavior.extend) {\n ourIndex = doc.sel.contains(start);\n if (ourIndex > -1)\n { ourRange = ranges[ourIndex]; }\n else\n { ourRange = new Range(start, start); }\n } else {\n ourRange = doc.sel.primary();\n ourIndex = doc.sel.primIndex;\n }\n\n if (behavior.unit == \"rectangle\") {\n if (!behavior.addNew) { ourRange = new Range(start, start); }\n start = posFromMouse(cm, event, true, true);\n ourIndex = -1;\n } else {\n var range$$1 = rangeForUnit(cm, start, behavior.unit);\n if (behavior.extend)\n { ourRange = extendRange(ourRange, range$$1.anchor, range$$1.head, behavior.extend); }\n else\n { ourRange = range$$1; }\n }\n\n if (!behavior.addNew) {\n ourIndex = 0;\n setSelection(doc, new Selection([ourRange], 0), sel_mouse);\n startSel = doc.sel;\n } else if (ourIndex == -1) {\n ourIndex = ranges.length;\n setSelection(doc, normalizeSelection(ranges.concat([ourRange]), ourIndex),\n {scroll: false, origin: \"*mouse\"});\n } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == \"char\" && !behavior.extend) {\n setSelection(doc, normalizeSelection(ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),\n {scroll: false, origin: \"*mouse\"});\n startSel = doc.sel;\n } else {\n replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);\n }\n\n var lastPos = start;\n function extendTo(pos) {\n if (cmp(lastPos, pos) == 0) { return }\n lastPos = pos;\n\n if (behavior.unit == \"rectangle\") {\n var ranges = [], tabSize = cm.options.tabSize;\n var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);\n var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);\n var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);\n for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));\n line <= end; line++) {\n var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);\n if (left == right)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); }\n else if (text.length > leftPos)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); }\n }\n if (!ranges.length) { ranges.push(new Range(start, start)); }\n setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),\n {origin: \"*mouse\", scroll: false});\n cm.scrollIntoView(pos);\n } else {\n var oldRange = ourRange;\n var range$$1 = rangeForUnit(cm, pos, behavior.unit);\n var anchor = oldRange.anchor, head;\n if (cmp(range$$1.anchor, anchor) > 0) {\n head = range$$1.head;\n anchor = minPos(oldRange.from(), range$$1.anchor);\n } else {\n head = range$$1.anchor;\n anchor = maxPos(oldRange.to(), range$$1.head);\n }\n var ranges$1 = startSel.ranges.slice(0);\n ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head));\n setSelection(doc, normalizeSelection(ranges$1, ourIndex), sel_mouse);\n }\n }\n\n var editorSize = display.wrapper.getBoundingClientRect();\n // Used to ensure timeout re-tries don't fire when another extend\n // happened in the meantime (clearTimeout isn't reliable -- at\n // least on Chrome, the timeouts still happen even when cleared,\n // if the clear happens after their scheduled firing time).\n var counter = 0;\n\n function extend(e) {\n var curCount = ++counter;\n var cur = posFromMouse(cm, e, true, behavior.unit == \"rectangle\");\n if (!cur) { return }\n if (cmp(cur, lastPos) != 0) {\n cm.curOp.focus = activeElt();\n extendTo(cur);\n var visible = visibleLines(display, doc);\n if (cur.line >= visible.to || cur.line < visible.from)\n { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e); }}), 150); }\n } else {\n var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;\n if (outside) { setTimeout(operation(cm, function () {\n if (counter != curCount) { return }\n display.scroller.scrollTop += outside;\n extend(e);\n }), 50); }\n }\n }\n\n function done(e) {\n cm.state.selectingText = false;\n counter = Infinity;\n e_preventDefault(e);\n display.input.focus();\n off(document, \"mousemove\", move);\n off(document, \"mouseup\", up);\n doc.history.lastSelOrigin = null;\n }\n\n var move = operation(cm, function (e) {\n if (!e_button(e)) { done(e); }\n else { extend(e); }\n });\n var up = operation(cm, done);\n cm.state.selectingText = up;\n on(document, \"mousemove\", move);\n on(document, \"mouseup\", up);\n}", "title": "" }, { "docid": "7d0dc009824fbd3cec4562dbff16fdd1", "score": "0.5331506", "text": "function leftButtonSelect(cm, event, start, behavior) {\n var display = cm.display, doc = cm.doc;\n e_preventDefault(event);\n\n var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;\n if (behavior.addNew && !behavior.extend) {\n ourIndex = doc.sel.contains(start);\n if (ourIndex > -1)\n { ourRange = ranges[ourIndex]; }\n else\n { ourRange = new Range(start, start); }\n } else {\n ourRange = doc.sel.primary();\n ourIndex = doc.sel.primIndex;\n }\n\n if (behavior.unit == \"rectangle\") {\n if (!behavior.addNew) { ourRange = new Range(start, start); }\n start = posFromMouse(cm, event, true, true);\n ourIndex = -1;\n } else {\n var range$$1 = rangeForUnit(cm, start, behavior.unit);\n if (behavior.extend)\n { ourRange = extendRange(ourRange, range$$1.anchor, range$$1.head, behavior.extend); }\n else\n { ourRange = range$$1; }\n }\n\n if (!behavior.addNew) {\n ourIndex = 0;\n setSelection(doc, new Selection([ourRange], 0), sel_mouse);\n startSel = doc.sel;\n } else if (ourIndex == -1) {\n ourIndex = ranges.length;\n setSelection(doc, normalizeSelection(ranges.concat([ourRange]), ourIndex),\n {scroll: false, origin: \"*mouse\"});\n } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == \"char\" && !behavior.extend) {\n setSelection(doc, normalizeSelection(ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),\n {scroll: false, origin: \"*mouse\"});\n startSel = doc.sel;\n } else {\n replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);\n }\n\n var lastPos = start;\n function extendTo(pos) {\n if (cmp(lastPos, pos) == 0) { return }\n lastPos = pos;\n\n if (behavior.unit == \"rectangle\") {\n var ranges = [], tabSize = cm.options.tabSize;\n var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);\n var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);\n var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);\n for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));\n line <= end; line++) {\n var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);\n if (left == right)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); }\n else if (text.length > leftPos)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); }\n }\n if (!ranges.length) { ranges.push(new Range(start, start)); }\n setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),\n {origin: \"*mouse\", scroll: false});\n cm.scrollIntoView(pos);\n } else {\n var oldRange = ourRange;\n var range$$1 = rangeForUnit(cm, pos, behavior.unit);\n var anchor = oldRange.anchor, head;\n if (cmp(range$$1.anchor, anchor) > 0) {\n head = range$$1.head;\n anchor = minPos(oldRange.from(), range$$1.anchor);\n } else {\n head = range$$1.anchor;\n anchor = maxPos(oldRange.to(), range$$1.head);\n }\n var ranges$1 = startSel.ranges.slice(0);\n ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head));\n setSelection(doc, normalizeSelection(ranges$1, ourIndex), sel_mouse);\n }\n }\n\n var editorSize = display.wrapper.getBoundingClientRect();\n // Used to ensure timeout re-tries don't fire when another extend\n // happened in the meantime (clearTimeout isn't reliable -- at\n // least on Chrome, the timeouts still happen even when cleared,\n // if the clear happens after their scheduled firing time).\n var counter = 0;\n\n function extend(e) {\n var curCount = ++counter;\n var cur = posFromMouse(cm, e, true, behavior.unit == \"rectangle\");\n if (!cur) { return }\n if (cmp(cur, lastPos) != 0) {\n cm.curOp.focus = activeElt();\n extendTo(cur);\n var visible = visibleLines(display, doc);\n if (cur.line >= visible.to || cur.line < visible.from)\n { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e); }}), 150); }\n } else {\n var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;\n if (outside) { setTimeout(operation(cm, function () {\n if (counter != curCount) { return }\n display.scroller.scrollTop += outside;\n extend(e);\n }), 50); }\n }\n }\n\n function done(e) {\n cm.state.selectingText = false;\n counter = Infinity;\n e_preventDefault(e);\n display.input.focus();\n off(display.wrapper.ownerDocument, \"mousemove\", move);\n off(display.wrapper.ownerDocument, \"mouseup\", up);\n doc.history.lastSelOrigin = null;\n }\n\n var move = operation(cm, function (e) {\n if (e.buttons === 0 || !e_button(e)) { done(e); }\n else { extend(e); }\n });\n var up = operation(cm, done);\n cm.state.selectingText = up;\n on(display.wrapper.ownerDocument, \"mousemove\", move);\n on(display.wrapper.ownerDocument, \"mouseup\", up);\n}", "title": "" } ]
4f68b7c51b097aba9ced9e7b7d20a49b
Create an italicized HTML text node
[ { "docid": "ca5b155015c46786128086c1d71191d7", "score": "0.79177016", "text": "function createItalicized(text) {\n let italics = document.createElement(\"i\");\n italics.appendChild(document.createTextNode(text));\n return italics;\n}", "title": "" } ]
[ { "docid": "3997f33d190ae69367532625d88281d9", "score": "0.6959262", "text": "function italic(value){\r\n return '' + value + '';\r\n }", "title": "" }, { "docid": "ac69b6c31aa18fc3b5e77994d0e4fcb5", "score": "0.6946405", "text": "function italic(value){\n return '' + value + '';\n }", "title": "" }, { "docid": "687d1c752bb13f57d6728d3dc8910107", "score": "0.684406", "text": "function italic(value) {\r\n\t\treturn '' + value + '';\r\n\t}", "title": "" }, { "docid": "3840fc35b4fdc88ca211c4009886956a", "score": "0.6801069", "text": "formatItalic() {\r\n\t\t\t\ttextInserter.handleEmphasis(codemirror, \"*\");\r\n\t\t\t}", "title": "" }, { "docid": "ffeef0cff0cfbc47de9f89c816f20623", "score": "0.66294765", "text": "function makeItalic ( elem ) {\n elem.classList.toggle ( \"active\" );\n textOutput.classList.toggle ( \"italic\" );\n}", "title": "" }, { "docid": "a9c1da10fc9f2c5e922db429a4603a8d", "score": "0.6417889", "text": "function makeItalic(elem){\n let btn=elem.target\n btn.classList.toggle('active');\n let formatedtext=document.getElementById('text-output');\n formatedtext.classList.toggle('italic');\n}", "title": "" }, { "docid": "7d4b1e5b70587268f1c390bd65fde3d5", "score": "0.63686967", "text": "function textItalic() {\n if (colorParagraph.style.fontStyle === \"italic\") {\n cancel();\n } else {\n colorParagraph.style.fontStyle = \"italic\"\n }\n}", "title": "" }, { "docid": "074bc06f34238e4624e660b4011b2f73", "score": "0.6353617", "text": "function emphasis(node) {\n var content = this.all(node).join('')\n // console.log(node.type)\n // should there be an option to add `\\/` ?\n return `{\\\\em ` + content + ` }`\n // return marker + content + marker\n}", "title": "" }, { "docid": "85035badcedc15c52881eb2b1067ddb9", "score": "0.6313201", "text": "toNode() {\n var node = document.createTextNode(this.text);\n var span = null;\n\n if (this.italic > 0) {\n span = document.createElement(\"span\");\n span.style.marginRight = makeEm(this.italic);\n }\n\n if (this.classes.length > 0) {\n span = span || document.createElement(\"span\");\n span.className = createClass(this.classes);\n }\n\n for (var style in this.style) {\n if (this.style.hasOwnProperty(style)) {\n span = span || document.createElement(\"span\"); // $FlowFixMe Flow doesn't seem to understand span.style's type.\n\n span.style[style] = this.style[style];\n }\n }\n\n if (span) {\n span.appendChild(node);\n return span;\n } else {\n return node;\n }\n }", "title": "" }, { "docid": "87fff4c19afc69cd2e7d6877c219234e", "score": "0.62315667", "text": "createText(node, level) {\n const { value } = node;\n const indent = this.getIndent(level);\n\n // Omit line breaks between HTML elements and extra white spaces\n if (/^(\\n|\\s+)+$/.test(value)) {\n return false;\n }\n\n // Replace leading space with HTML symbol\n const html = value.replace(/\\s$/, '&#32;');\n\n return `${indent}| ${html}`;\n }", "title": "" }, { "docid": "1ae361262fcbe6796518ef569e71b3d6", "score": "0.61112326", "text": "function TTextNode() {}", "title": "" }, { "docid": "1ae361262fcbe6796518ef569e71b3d6", "score": "0.61112326", "text": "function TTextNode() {}", "title": "" }, { "docid": "2337e0690de0864b2a89d7e384c8b1c8", "score": "0.61099756", "text": "italic() {\n this.insertAroundCursor('*', '*')\n }", "title": "" }, { "docid": "d8e870b48c5f14ba60e9f2d4f4f5376f", "score": "0.60402554", "text": "function createText(node, text) {\n return node.ownerDocument.createTextNode(text);\n }", "title": "" }, { "docid": "a621651830a17f6d523509fba9cbada0", "score": "0.60307324", "text": "function emphasis(text) {\n return text ? '<strong>' + text + '</strong>' : '';\n }", "title": "" }, { "docid": "23cbe79a29c9f83b0a8673c0cf182fe7", "score": "0.6025779", "text": "function createHTML(tagname, text) {return create(tagname).html(text)}", "title": "" }, { "docid": "7428f88c092f6d37055d8a8738e9706d", "score": "0.6020077", "text": "function emphasis(node) {\n var marker = this.options.emphasis;\n return marker + this.all(node).join('') + marker;\n}", "title": "" }, { "docid": "7428f88c092f6d37055d8a8738e9706d", "score": "0.6020077", "text": "function emphasis(node) {\n var marker = this.options.emphasis;\n return marker + this.all(node).join('') + marker;\n}", "title": "" }, { "docid": "00a5cac5e9b67ed6bf1240f2821c747d", "score": "0.59772265", "text": "createHTMLText(){\n let myText = document.createElement(\"text\");\n myText.contentEditable = true;\n myText.innerHTML = this.content;\n myText.setAttribute( 'class', 'textElementSlide');\n myText.setAttribute('spellcheck', \"false\");\n myText.setAttribute('id', this.id);\n return myText;\n }", "title": "" }, { "docid": "b0052935f98c21f4a28585f87d5f864a", "score": "0.59412587", "text": "function TTextNode() { }", "title": "" }, { "docid": "b0052935f98c21f4a28585f87d5f864a", "score": "0.59412587", "text": "function TTextNode() { }", "title": "" }, { "docid": "b0052935f98c21f4a28585f87d5f864a", "score": "0.59412587", "text": "function TTextNode() { }", "title": "" }, { "docid": "b0052935f98c21f4a28585f87d5f864a", "score": "0.59412587", "text": "function TTextNode() { }", "title": "" }, { "docid": "53dd58c14b9c9217c9459fb0a0365713", "score": "0.5912787", "text": "function customizeEntities(element) {\n element.style.backgroundColor = 'rgba(255, 255, 255, '+alpha+')';\n element.style.fontStyle = \"italic\";\n}", "title": "" }, { "docid": "8baabbd886354607954f726cd1b557c1", "score": "0.5886175", "text": "function TTextNode(){}", "title": "" }, { "docid": "3ed74020d3eb57b85fc3a41636d7f42e", "score": "0.5875095", "text": "function additalic(){\r\n\tif (document.all || document.getElementById){\r\n\t\told=document.mainform.code.value;\r\n\t\tcontent=document.italicform.italictext.value;\r\n\t}\r\n\tif (document.layers){\r\n\t\told=document.formin.document.mainform.code.value;\r\n\t\tcontent=document.italiced.document.italicform.italictext.value;\r\n\t}\r\n\tadd=\"<i>\"+content+\"</i>\";\r\n\tif (document.all || document.getElementById){document.mainform.code.value=old+add;}\r\n\tif (document.layers){document.formin.document.mainform.code.value=old+add;}\r\n\tdomlay ('formin',1);\r\n\tclearall();\r\n\t}", "title": "" }, { "docid": "564b1adfd4c832cf8636d778fb1ea53d", "score": "0.5779625", "text": "function toggleItalic(editor) {\n\t_toggleBlock(editor, \"italic\", editor.options.blockStyles.italic);\n}", "title": "" }, { "docid": "88685b1ccbd3f931f36c876d51bc1689", "score": "0.57787716", "text": "onItalicFontButtonClick() {\n let previousFontWeight = this.get('value.options.captionFontStyle');\n this.set('value.options.captionFontStyle', previousFontWeight !== 'italic' ? 'italic' : 'normal');\n }", "title": "" }, { "docid": "ab177f01b382329bb0307bf428b102f7", "score": "0.5749701", "text": "function toggleItalic(editor) {\n _toggleBlock(editor, 'italic', editor.options.blockStyles.italic);\n}", "title": "" }, { "docid": "de676035bbc6cb2d976a374da2f992ab", "score": "0.57482356", "text": "function toggleItalic() {\n document.execCommand(\"italic\", false, null);\n\n cur_contentdiv.focus(); // return focus back to editing field\n }", "title": "" }, { "docid": "c50d0943fbd2d1447830146840bf4d52", "score": "0.5734372", "text": "get format_italic () {\n return new IconData(0xe23f,{fontFamily:'MaterialIcons'})\n }", "title": "" }, { "docid": "56a88c291f1d215dce14fc1e243ab6ef", "score": "0.5734091", "text": "function emphasisTag(body, options) {\n options = options || {};\n var output = `<emphasis`;\n if (options.level) {\n output += ` level=\"${ options.level }\"`;\n }\n output += `>${ body }</emphasis>`;\n return output;\n}", "title": "" }, { "docid": "c1121955370778b1ddcf9adc347a37d5", "score": "0.5717749", "text": "onItalicFontButtonClick() {\n let previousFontWeight = this.get('_options.captionFontStyle');\n this.set('_options.captionFontStyle', previousFontWeight !== 'italic' ? 'italic' : 'normal');\n }", "title": "" }, { "docid": "f3a9c1d5bda605f08c07ec41f3e870bb", "score": "0.56903934", "text": "function toggleItalic(editor) {\n _toggleBlock(editor, 'italic', editor.options.blockStyles.italic);\n}", "title": "" }, { "docid": "3b2256c2655e9355586cbc2341377a0f", "score": "0.5680526", "text": "function createText(text) {\n return document.createTextNode(text);\n }", "title": "" }, { "docid": "781ba815b1db74b66cd0416bc629a9a2", "score": "0.56429", "text": "function makeItalic(elem){\n elem.classList.toggle('active')\n return document.getElementById('text-output').classList.toggle('italic') //note that i used the return keyword to ensure that i understood what was going on. I am used to seeing that, and it helps me understand. Having the word return still worked as the one above.\n}", "title": "" }, { "docid": "65aa010c1763f90576d7ae1cf33359d9", "score": "0.5593535", "text": "function t(text) {\n return document.createTextNode(text);\n}", "title": "" }, { "docid": "876363c0f5b4d011409e86e99f301ce9", "score": "0.558882", "text": "function createText(tagName, attributes, children) {\n var nodes = resolveDescendants(children);\n\n if (nodes.length > 1) {\n throw new Error(\"The <text> hyperscript tag must only contain a single node's worth of children.\");\n }\n\n var _nodes2 = slicedToArray(nodes, 1),\n node = _nodes2[0];\n\n if (node == null) {\n node = {\n text: '',\n marks: []\n };\n }\n\n if (!Text.isText(node)) {\n throw new Error(\"\\n The <text> hyperscript tag can only contain text content as children.\");\n } // COMPAT: Re-create the node, because if they used the <text> tag we want to\n // guarantee that it won't be merge with other string children.\n\n\n STRINGS[\"delete\"](node);\n Object.assign(node, attributes);\n return node;\n}", "title": "" }, { "docid": "15f302c8a87bd9171bec2cb6514526f1", "score": "0.55871826", "text": "function insertMOTD(element) {\n var element = document.getElementById('motd');\n element.innerHTML = `<p><span style=\"font-style: italic\"\n >\"A successful man is one who can lay a firm foundation with the bricks others have thrown at him.\"</span\n > – David Brinkley</p>`;\n}", "title": "" }, { "docid": "b12065830939efb4a9d2202c0f662e2c", "score": "0.55404824", "text": "formatStrikethrough() {\r\n\t\t\t\ttextInserter.handleEmphasis(codemirror, \"~~\");\r\n\t\t\t}", "title": "" }, { "docid": "01f08d14bea62f8b870fb7226a005dd7", "score": "0.55028373", "text": "function addHTML(tag) {\n var selection = window.getSelection();\n var range = selection.getRangeAt(0);\n var strong = document.createElement(tag);\n range.surroundContents(strong);\n $(\"#editor\").focus()\n}", "title": "" }, { "docid": "71ef7574477b5cee8f9e78d4e7b6bbe3", "score": "0.54931885", "text": "function textRender(utext, p)\n{ \n var utextArray = utext.split('\\n');\n for (var i = 0; i < utextArray.length; i++) {\n var v = utextArray[i].split(\" \");\n for (var j = 0; j < v.length; j++) {\n var src = \"\";\n switch(v[j]){ \n case \":)\": \n src = \"smile.gif\"; \n break; \n case \":(\":\n src = \"sad.gif\";\n break;\n case \":P\":\n src = \"tongue.gif\";\n break;\n case \":O\":\n src = \"wonder.gif\";\n break; \n case \":D\":\n src = \"laugh.gif\";\n break;\n default: \n break;\n }\n // emoticon generation\n if (src != \"\") {\n var img = document.createElement(\"img\");\n img.setAttribute(\"src\", \"images/emot_\" + src);\n img.setAttribute(\"alt\", v[j]);\n img.setAttribute(\"width\", \"16px\");\n img.setAttribute(\"height\", \"16px\"); \n p.appendChild(img); \n p.appendChild(document.createTextNode(\" \"));\n }\n else {\n if (!v[j].match(\"http://\"))\n p.appendChild(document.createTextNode(v[j]));\n else // anchor generation\n {\n var a = document.createElement(\"a\");\n a.setAttribute(\"href\", v[j]);\n a.setAttribute(\"target\", \"_blank\");\n a.appendChild(document.createTextNode(v[j]));\n p.appendChild(a);\n }\n p.appendChild(document.createTextNode(\" \")); \n } \n }\n if (i < utextArray.length - 1)\n p.appendChild(document.createElement(\"br\"));\n }\n}", "title": "" }, { "docid": "b994f8b156e00c4cee46f44e20a39d6b", "score": "0.548579", "text": "function boldItalicPass(content){\n\t\tvar toggle = [];\n\t\tvar countItalic = 0, countBold = 0;\n\n\t\tvar tmp = content;\n\t\tvar i = 0, pos = 0;\n\t\t// First pass to determine default toggle positions.\n\t\twhile (true){\n\t\t\ti = tmp.search(/''([^']|$)/);\n\t\t\tif (i === -1)\n\t\t\t\tbreak;\n\n\t\t\tpos += i;\n\t\t\tif (tmp.slice(i - 3, i) === \"'''\"){\n\t\t\t\ttoggle.push({pos: pos - 3, type: \"b\"});\n\t\t\t\ttoggle.push({pos: pos, type: \"i\"});\n\t\t\t\tcountBold += 1;\n\t\t\t\tcountItalic += 1;\n\t\t\t} else if (tmp[i - 1] === \"'\"){\n\t\t\t\ttoggle.push({pos: pos - 1, type: \"b\"});\n\t\t\t\tcountBold += 1;\n\t\t\t} else {\n\t\t\t\ttoggle.push({pos: pos, type: \"i\"});\n\t\t\t\tcountItalic += 1;\n\t\t\t}\n\t\t\tpos += 2;\n\t\t\ttmp = tmp.slice(i + 2);\n\t\t}\n\n\t\t// Treat special cases if both number of toggles odd.\n\t\tif ((countBold % 2) + (countItalic % 2) === 2)\n\t\t\tfor (i = 0; i < toggle.length; i++)\n\t\t\t\tif (toggle[i].type === \"b\"\n\t\t\t\t&& (toggle[i + 1] === undefined || toggle[i + 1].pos - toggle[i].pos !== 3)){\n\t\t\t\t\tpos = toggle[i].pos;\n\t\t\t\t\tif ((content[pos - 2] === \" \" && content[pos - 2] !== \" \") \n\t\t\t\t\t|| (content[pos - 2] !== \" \" && content[pos - 2] !== \" \") \n\t\t\t\t\t|| (content[pos - 2] === \" \")){\n\t\t\t\t\t\ttoggle[i].pos += 1;\n\t\t\t\t\t\ttoggle[i].type = \"i\";\n\t\t\t\t\t\tcountBold -= 1;\n\t\t\t\t\t\tcountItalic += 1;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t// Add missing toggles at the end.\n\t\tif (countItalic % 2 === 1){\n\t\t\ttoggle.push({pos: content.length, type: 'i'});\n\t\t\tcontent += \"''\";\n\t\t}\n\t\tif (countBold % 2 === 1)\n\t\t\ttoggle.push({pos: content.length, type: 'b'});\n\n\t\t// Remove toggles.\n\t\tvar parsed = \"\";\n\t\tif (toggle.length !== 0){\n\t\t\tpos = 0;\n\t\t\tfor (i = 0; i < toggle.length; i++){\n\t\t\t\tparsed += content.slice(pos, toggle[i].pos);\n\t\t\t\tif (toggle[i].type === \"b\"){\n\t\t\t\t\tpos = toggle[i].pos + 3;\n\t\t\t\t} else\n\t\t\t\t\tpos = toggle[i].pos + 2;\n\t\t\t}\n\t\t\tif (content.slice(content.length - 2, content.length) !== \"''\")\n\t\t\t\tparsed += content.slice(pos, content.length);\n\t\t} else\n\t\t\tparsed = content;\n\n\t\treturn parsed;\n\t}", "title": "" }, { "docid": "ae2fa4368bcd1bbd1df595e06f47158d", "score": "0.5474544", "text": "function createText(text)\r\n{\r\n return document.createTextNode(text);\r\n}", "title": "" }, { "docid": "da78e0e6fc7741b3d374f0c6b6702d6d", "score": "0.54665595", "text": "function convert_text(text_elem, doc)\n{\n // Get a list of character indices at which distinct formatting changes occur.\n var format_indices = text_elem.getTextAttributeIndices();\n var text = text_elem.getText();\n var text_len = text.length;\n var linkified_formatted_text = '';\n\n // Tags\n var bold_open_tag = '**', bold_close_tag = '**';\n var ital_open_tag = '_', ital_close_tag = '_';\n var del_open_tag = '_', del_close_tag = '_';\n var code_open_tag = '`', code_close_tag = '`';\n if (doc.format == 'html')\n {\n bold_open_tag = '<b>', bold_close_tag = '</b>';\n ital_open_tag = '<i>', ital_close_tag = '</i>';\n del_open_tag = '<del>', del_close_tag = '</del>';\n code_open_tag = '<code>', code_close_tag = '</code>';\n }\n\n var num_segments = format_indices.length;\n for (var i = 0; i < num_segments; ++i)\n {\n var formatted_text = '';\n\n // Get the current formatted chunk.\n var index = format_indices[i];\n\n // Get the formatting for this chunk.\n var is_bold = text_elem.isBold(index);\n var is_ital = text_elem.isItalic(index);\n var is_del = text_elem.isStrikethrough(index);\n var link_url = text_elem.getLinkUrl(index);\n var is_link = (link_url != null);\n\n // We ignore fonts except for monospace fonts, which indicate code markup.\n var is_code = (text_elem.getFontFamily(index) in monospace_fonts);\n\n // Check the previous chunk to see if its formatting is identical to \n // this one, in which case we skip the opening format tag.\n var skip_bold_tag = false, skip_ital_tag = false, skip_del_tag = false,\n skip_code_tag = false;\n if (i > 0)\n {\n var prev_index = format_indices[i-1];\n var was_bold = text_elem.isBold(prev_index);\n var was_ital = text_elem.isItalic(prev_index);\n var was_del = text_elem.isStrikethrough(prev_index);\n var was_code = (text_elem.getFontFamily(prev_index) == 'Courier New');\n skip_bold_tag = (was_bold == is_bold);\n skip_ital_tag = (was_ital == is_ital);\n skip_del_tag = (was_del == is_del);\n skip_code_tag = (was_code == is_code);\n }\n\n // Add the opening tag.\n if (is_bold && !skip_bold_tag)\n formatted_text += bold_open_tag;\n if (is_ital && !skip_ital_tag)\n formatted_text += ital_open_tag;\n if (is_del && !skip_del_tag)\n formatted_text += del_open_tag;\n if (is_code && !skip_code_tag)\n formatted_text += code_open_tag;\n \n // Here's the chunk itself.\n var next_index = text_len;\n if (i < num_segments-1)\n next_index = format_indices[i+1];\n var chunk = text_elem.getText().substring(index, next_index);\n\n // If the chunk ends in whitespace, we save the whitespace for after the closers.\n // Evidently, Google App Script doesn't deal in Javascript Strings, cuz trimEnd() doesn't\n // work. :-( So we have to do this the stupid way.\n var j = chunk.length-1;\n while (chunk.charAt(j) == ' ')\n --j;\n formatted_text += chunk.substring(0, j+1);\n var ws = chunk.substring(j+1, chunk.length);\n\n // Check the next chunk to see if its formatting is identical to \n // this one, in which case we skip the closing format tag.\n skip_bold_tag = false; \n skip_ital_tag = false; \n skip_del_tag = false;\n if (i < (num_segments-1))\n {\n var next_index = format_indices[i+1];\n var will_bold = text_elem.isBold(next_index);\n var will_ital = text_elem.isItalic(next_index);\n var will_del = text_elem.isStrikethrough(next_index);\n skip_bold_tag = (will_bold == is_bold);\n skip_ital_tag = (will_ital == is_ital);\n skip_del_tag = (will_del == is_del);\n }\n\n // Close those tags.\n if (is_bold && !skip_bold_tag)\n formatted_text += bold_close_tag;\n if (is_ital && !skip_ital_tag)\n formatted_text += ital_close_tag;\n if (is_del && !skip_del_tag)\n formatted_text += del_close_tag;\n if (is_code)\n formatted_text += code_close_tag;\n\n // Re-add any whitespace.\n formatted_text += ws;\n\n // If this was a link, linkify it and add it to our final text.\n if (is_link)\n {\n if (doc.format == 'md')\n linkified_formatted_text += '[' + formatted_text + '](' + link_url + ')';\n else\n linkified_formatted_text += '<a href=\"' + link_url + '\">' + formatted_text + '</a>';\n }\n else\n linkified_formatted_text += formatted_text;\n }\n\n // Emit the text of the paragraph.\n doc.text += linkified_formatted_text;\n}", "title": "" }, { "docid": "7a6d755a078d30a582cb5757ee159256", "score": "0.54392767", "text": "function createText(){\n\n\n\n\n\n\n}", "title": "" }, { "docid": "65bd397bea613cc8db9c6db7ae45eb63", "score": "0.5382882", "text": "function createText(type, content){\r\n let t = document.createElement(type);\r\n t.innerHTML = content;\r\n return t;\r\n}", "title": "" }, { "docid": "c3fe50e4cbcf05ba2037e8b307e713ac", "score": "0.53369343", "text": "text(t) {\n this._node.appendChild(document.createTextNode(t));\n return this;\n }", "title": "" }, { "docid": "81587a0613b3fd3db6bd7c4a86c300e2", "score": "0.53315604", "text": "function changeStyle() {\r\n document.getElementById (\"newStyle\").style.fontStyle = \"italic\";\r\n \r\n}", "title": "" }, { "docid": "57f0e2ec02902b1784227755376c4358", "score": "0.5299932", "text": "function TextNode(text) {\n this.text = text;\n}", "title": "" }, { "docid": "57f0e2ec02902b1784227755376c4358", "score": "0.5299932", "text": "function TextNode(text) {\n this.text = text;\n}", "title": "" }, { "docid": "57f0e2ec02902b1784227755376c4358", "score": "0.5299932", "text": "function TextNode(text) {\n this.text = text;\n}", "title": "" }, { "docid": "57f0e2ec02902b1784227755376c4358", "score": "0.5299932", "text": "function TextNode(text) {\n this.text = text;\n}", "title": "" }, { "docid": "57f0e2ec02902b1784227755376c4358", "score": "0.5299932", "text": "function TextNode(text) {\n this.text = text;\n}", "title": "" }, { "docid": "57f0e2ec02902b1784227755376c4358", "score": "0.5299932", "text": "function TextNode(text) {\n this.text = text;\n}", "title": "" }, { "docid": "6e7686f383eff18fd14b4ad31131515c", "score": "0.5288803", "text": "toMarkup() {\n // TODO(alpert): More duplication than I'd like from\n // span.prototype.toMarkup and symbolNode.prototype.toNode...\n var needsSpan = false;\n var markup = \"<span\";\n\n if (this.classes.length) {\n needsSpan = true;\n markup += \" class=\\\"\";\n markup += utils.escape(createClass(this.classes));\n markup += \"\\\"\";\n }\n\n var styles = \"\";\n\n if (this.italic > 0) {\n styles += \"margin-right:\" + this.italic + \"em;\";\n }\n\n for (var style in this.style) {\n if (this.style.hasOwnProperty(style)) {\n styles += utils.hyphenate(style) + \":\" + this.style[style] + \";\";\n }\n }\n\n if (styles) {\n needsSpan = true;\n markup += \" style=\\\"\" + utils.escape(styles) + \"\\\"\";\n }\n\n var escaped = utils.escape(this.text);\n\n if (needsSpan) {\n markup += \">\";\n markup += escaped;\n markup += \"</span>\";\n return markup;\n } else {\n return escaped;\n }\n }", "title": "" }, { "docid": "b313f6e601de9998a3e437bab1d194e7", "score": "0.52817607", "text": "function createText(text, { color = \"blue\" } = {}) {\n const { selection} = require(\"scenegraph\");\n const { Text, Color } = require(\"scenegraph\");\n\n const newText = new Text();\n newText.text = text;\n newText.fill = new Color(color);\n\n selection.insertionParent.addChild(newText);\n newText.placeInParentCoordinates({x: 0, y: 0}, selection.insertionParent.localCenterPoint);\n\n return newText;\n}", "title": "" }, { "docid": "ccc0256a3a8e0f8f1829a27a224cdb4a", "score": "0.5280921", "text": "function generateExampleHTML(entities, text) {\n sentiments = Array(entities.length).fill(\"n\");\n var html = text;\n var offset = 0;\n for(var entity of entities) {\n var startIndex = entity[0];\n var endIndex = entity[1];\n var entityName = text.slice(startIndex, endIndex);\n var id_string = e_id.toString();\n var replacementHTML = \"<div class='dropdown'><span id=\" + id_string + \" class='none-highlight'>\" + entityName + \"</span><div class='dropdown-content'><button class='sentiment-button negative' onclick='sentimentSelected(-1,\" + id_string + \")'>-1</button><button class='sentiment-button neutral' onclick='sentimentSelected(0,\" + id_string + \")'>0</button><button class='sentiment-button positive' onclick='sentimentSelected(1,\" + id_string + \")'>1</button></div></div>\";\n html = html.slice(0, startIndex + offset) + replacementHTML + html.slice(endIndex + offset);\n offset += replacementHTML.length - entityName.length\n e_id += 1\n }\n return html;\n}", "title": "" }, { "docid": "50dec551edb582ac23da689ffaf390f7", "score": "0.5268417", "text": "function createTextBlock(text_html) {\n return {\n type: \"text\",\n text: text_html + continue_html,\n cont_key: [32, 13]\n };\n}", "title": "" }, { "docid": "2dac51f5eaf2ad023c5e8d5fc0decb44", "score": "0.52435684", "text": "function buildTextNode(gettextOptions, text, tagName) {\n if (!gettextOptions.raw) {\n text =\n text.split(/\\n{2,}/)\n .map(paragraph => {\n return paragraph.replace(/\\s+/g, ' ').trim();\n })\n .join('\\n\\n')\n .trim();\n }\n\n if (tagName) {\n return t.taggedTemplateExpression(\n t.identifier(tagName),\n t.templateLiteral(\n [\n t.templateElement(\n {\n cooked: text,\n raw: text,\n },\n true),\n ],\n []));\n }\n\n return t.stringLiteral(text);\n }", "title": "" }, { "docid": "9f2e38f62c51d984d6bf49a7cc6bc047", "score": "0.5243488", "text": "function createText(text, top, left) {\n return {\n html: text,\n style: {\n left: left + 'px',\n top: top + 'px'\n }\n };\n\n }", "title": "" }, { "docid": "f43b2826b1c885b06389131004c114d3", "score": "0.5227356", "text": "function oText(parent) {\n var top = $(parent);\n top.append('<span class=\"otext\"></span>');\n var span = top.find(\"span\").first();\n return function (string) { span.text(string); } // bind(span,text)\n }", "title": "" }, { "docid": "3de2a4c28c8581a4132144a75ef7afea", "score": "0.52054983", "text": "function TextNode(text) {\n\t this.text = text;\n\t}", "title": "" }, { "docid": "ade76d3a42b8b2345837afb060417981", "score": "0.51955163", "text": "function htmlify(text) {\n\t\tif (!text) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\treturn $('<span />').text(text).html();\n\t}", "title": "" }, { "docid": "be5a7cdbab0925b27494c6715820a4d9", "score": "0.5192295", "text": "function textContent(text) {\n\n text\n [that._html ? \"html\" : \"text\"](function (t) { return trimRight(t)\n .replace(/(<[^>^\\/]+>)([^<^>]+)$/g, function (str, a, b) { return (\"\" + a + b + (a.replace(\"<\", \"</\"))); })\n .replace(/^([^<^>]+)(<\\/[^>]+>)/g, function (str, a, b) { return (\"\" + (b.replace(\"</\", \"<\")) + a + b); })\n .replace(/<([A-z]+)[^>]*>([^<^>]+)<\\/[^>]+>/g, function (str, a, b) {\n var tag = tagLookup[a] ? (\"<tspan style=\\\"\" + (tagLookup[a]) + \"\\\">\") : \"\";\n return (\"\" + (tag.length ? tag : \"\") + b + (tag.length ? \"</tspan>\" : \"\"));\n }); }\n );\n\n }", "title": "" }, { "docid": "56e9847433fe811dcd348691e2d4901c", "score": "0.5184543", "text": "toNode() {\n return document.createTextNode(this.text);\n }", "title": "" }, { "docid": "d94288cab9531ed9bfd5a026a8a9abb3", "score": "0.5179546", "text": "function textElement(options, font, color, parent, styles) {\n var renderOptions = {};\n var htmlObject = void 0;\n var renderer = new SvgRenderer('');\n var style = styles + ' font-size:' + font.size + '; font-style:' + font.fontStyle + ' ; font-weight:' + font.fontWeight + '; font-family:' + font.fontFamily + ';';\n renderOptions = {\n 'id': options.id,\n 'x': options.x,\n 'y': options.y,\n 'fill': color,\n 'text-anchor': options.anchor,\n 'transform': options.transform,\n 'opacity': font.opacity,\n 'dominant-baseline': options.baseLine,\n 'style': style\n };\n htmlObject = renderer.createText(renderOptions, options.text);\n parent.appendChild(htmlObject);\n return htmlObject;\n }", "title": "" }, { "docid": "43913667a0137a12ea0917331c3feec4", "score": "0.5174876", "text": "function QText(o, f, c){\n this.Opacity = o;\n this.Font = f;\n this.Color = c;\n}", "title": "" }, { "docid": "2e99f7b6a22861925afb9a858247cc83", "score": "0.51565397", "text": "function createTextNode(elemType, text) {\n let newElem = document.createElement(elemType);\n let textNode = document.createTextNode(text);\n newElem.appendChild(textNode);\n\n return newElem;\n}", "title": "" }, { "docid": "26a9e235933cac8874c37e503993d5e5", "score": "0.51416874", "text": "function desemantifyContents(node) {\n doWithSelection(function () {\n function replace(semantic, presentational) {\n node.find(semantic).each(function () {\n var presentationalEl = $(presentational).get(0);\n\n var child;\n while (child = this.firstChild) {\n presentationalEl.appendChild(child);\n }\n\n $(this).replaceWith(presentationalEl);\n });\n }\n replace('em', '<i />');\n replace('strong', '<b />');\n replace('code', '<font class=\"proper-code\" face=\"'+escape(options.codeFontFamily)+'\" />');\n });\n }", "title": "" }, { "docid": "e9e28cc187062973eb881cbc5c5a3c87", "score": "0.513169", "text": "function ListItemText(_a) {\n\t var className = _a.className, secondaryTextClassName = _a.secondaryTextClassName, secondaryText = _a.secondaryText, children = _a.children;\n\t var secondaryContent;\n\t if (secondaryText) {\n\t secondaryContent = (React__default['default'].createElement(\"span\", { className: classnames(block$n(\"text\", { secondary: true }), secondaryTextClassName) }, secondaryText));\n\t }\n\t return (React__default['default'].createElement(\"span\", { className: classnames(block$n(\"text\"), className) },\n\t children,\n\t secondaryContent));\n\t}", "title": "" }, { "docid": "1f8bb04de605844f6f17baa44c48686c", "score": "0.5126831", "text": "function text(txt){\n var h = document.createElement(\"p\")\n var t = document.createTextNode(txt);\n h.appendChild(t); \n return h\n}", "title": "" }, { "docid": "f53c922125b93c8812ed66b69717ef5b", "score": "0.5124244", "text": "function transformTextNode(gettextOptions, textNode, tagName) {\n let text;\n\n if (t.isTemplateElement(textNode)) {\n text = textNode.value.cooked;\n } else if (t.isStringLiteral(textNode)) {\n text = textNode.value;\n } else {\n console.assert(false, `Unexpected text node type: ${textNode}`);\n }\n\n return buildTextNode(gettextOptions, text, tagName);\n }", "title": "" }, { "docid": "7b95af61e402ed673a9945692568bba0", "score": "0.5119091", "text": "function doMarkup(type, create) {\n\t\t\tvar symbol = c\n\t\t\tscan()\n\t\t\tif (canStartMarkup(type)) {\n\t\t\t\tstartBlock(type, {})\n\t\t\t} else if (canEndMarkup(type)) {\n\t\t\t\tendBlock()\n\t\t\t} else {\n\t\t\t\taddText(symbol)\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "f9b9fbbe8f950463feaff0e886395d8e", "score": "0.51149815", "text": "extractHTMLFromTextMorph (textMorph, textAndAttributes = textMorph.textAndAttributesInRange(textMorph.selection.range)) {\n const text = new textMorph.constructor({\n ...textMorph.defaultTextStyle,\n width: textMorph.width,\n textAndAttributes: textAndAttributes,\n needsDocument: true\n });\n const render = this.textLayerNodeFunctionFor(text);\n const renderLine = this.lineNodeFunctionFor(text);\n const textLayerNode = render();\n const style = System.global && System.global.getComputedStyle ? System.global.getComputedStyle(textLayerNode) : null;\n if (style) {\n textLayerNode.ownerDocument.body.appendChild(textLayerNode);\n textLayerNode.style.whiteSpace = style.whiteSpace;\n textLayerNode.style.overflowWrap = style.overflowWrap;\n textLayerNode.style.wordBreak = style.wordBreak;\n textLayerNode.style.minWidth = style.minWidth;\n textLayerNode.parentNode.removeChild(textLayerNode);\n }\n for (const line of text.document.lines) { textLayerNode.appendChild(renderLine(line)); }\n return textLayerNode.outerHTML;\n }", "title": "" }, { "docid": "96db735bc02c0cf9171c30572191ed6b", "score": "0.50951225", "text": "function ct(str) {\n return document.createTextNode(str);\n}", "title": "" }, { "docid": "86ce88285dfb9859463f9a614711975d", "score": "0.50940716", "text": "text (h, cursor, block, token) {\n const { start, end } = token.range\n return this.highlight(h, block, start, end, token)\n }", "title": "" }, { "docid": "ba4507d6dd00507914bd644b4b5f56a4", "score": "0.5088209", "text": "strong(text) {\n return text;\n }", "title": "" }, { "docid": "ba4507d6dd00507914bd644b4b5f56a4", "score": "0.5088209", "text": "strong(text) {\n return text;\n }", "title": "" }, { "docid": "6e403cdbd26a6604afadd7f4b226e637", "score": "0.508758", "text": "function interpretTextTerminusNode(terminusNode, $currElement, elementToInject) {\n if (terminusNode === undefined || terminusNode.type !== 'textTerminus') {\n throw new NodeTypeError(terminusNode, 'expected text terminus node');\n }\n return textTermination($currElement, terminusNode.offsetValue, elementToInject);\n }", "title": "" }, { "docid": "be68e28dab07165a28f2d56766e415a9", "score": "0.50815445", "text": "function textStyle(isImportant){\n style = 'font-family:arial;font-size:10pt;';\n if (isImportant){\n style = style + 'font-weight:bold;color:red';\n }\n else{\n style = style + 'color:black';\n }\n\n return style;\n}", "title": "" }, { "docid": "c012a16eb5d9e8cac73bf2b3f9037a9d", "score": "0.5080318", "text": "toMarkDown(input) {\n const converter = new Converter();\n return converter.makeHtml(input);\n }", "title": "" }, { "docid": "9bb2c0fc6c532b5e31cfd6705c5e14b2", "score": "0.5078828", "text": "function text(node, parent) {\n return this.encode(this.escape(node.value, node, parent), node);\n}", "title": "" }, { "docid": "9bb2c0fc6c532b5e31cfd6705c5e14b2", "score": "0.5078828", "text": "function text(node, parent) {\n return this.encode(this.escape(node.value, node, parent), node);\n}", "title": "" }, { "docid": "1297e6452784a3165d0f34b1ec8693b3", "score": "0.5070382", "text": "function createTextNode(symbol, x, y) {\n var text = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n text.setAttributeNS(null, 'font-size', fontSizePixels + 'px');\n text.setAttributeNS(null, 'font-family', 'monospace');\n text.setAttributeNS(null, 'fill', '#999999');\n text.setAttributeNS(null, 'alignment-baseline', 'central');\n text.setAttributeNS(null, 'text-anchor', 'middle');\n text.setAttributeNS(null, 'x', x);\n text.setAttributeNS(null, 'y', y);\n text.textContent = symbol;\n return text;\n}", "title": "" }, { "docid": "f628f0323e72aec3d5339d7ec12037e8", "score": "0.50696373", "text": "function TextElement(){var _this=_super.call(this)||this;/**\n * sets or gets the image source\n */_this.textContent='';/** @private */_this.canMeasure=true;/** @private */_this.isLaneOrientation=false;/** @private */_this.canConsiderBounds=true;/**\n * sets the hyperlink color to blue\n */_this.hyperlink={color:'blue'};/** @private */_this.doWrap=true;_this.textNodes=[];/**\n * Defines the appearance of the text element\n */_this.style={color:'black',fill:'transparent',strokeColor:'black',strokeWidth:1,fontFamily:'Arial',fontSize:12,whiteSpace:'CollapseSpace',textWrapping:'WrapWithOverflow',textAlign:'Center',italic:false,bold:false,textDecoration:'None',strokeDashArray:'',opacity:5,gradient:null,textOverflow:'Wrap'};_this.style.fill='transparent';_this.style.strokeColor='transparent';return _this;}", "title": "" }, { "docid": "e31f4fe0a2b522ba0bb6de47aa79a917", "score": "0.5056691", "text": "function createText(inputPath, inputText, baselineAlignment, whichCircle) {\n var text = s.text(0, 0, inputText);\n text.attr({\n fill: 'white',\n fontFamily: 'Raleway, Verdana, sans-serif',\n fontWeight: 'bolder',\n fontSize: '4px',\n textpath: inputPath});\n text.textPath.attr({\n textAnchor: 'middle',\n alignmentBaseline: baselineAlignment,\n startOffset: '50%'});\n /* adjust extra-spacing around flat & sharp characters */\n if (inputText.charAt(1) == \"♭\" || inputText.charAt(2) == \"♭\") {\n text.attr({letterSpacing: '-1px'});\n }\n if (whichCircle == \"inner\" && baselineAlignment == \"baseline\") {\n text.attr({dy: '-5px'});\n } else if (whichCircle == \"inner\") {\n text.attr({dy: '5px'});\n }\n return text;\n /* bottom flipped text: https://www.visualcinnamon.com/2015/09/placing-text-on-arcs.html */\n}", "title": "" }, { "docid": "7017e443016338e783af767514beca56", "score": "0.5055926", "text": "function createSpan(className, textContent) {\n return _createElement('span', className, textContent);\n }", "title": "" }, { "docid": "839e65b6d0909b0e8a2a163331600b44", "score": "0.50546163", "text": "function TextRenderer() {}", "title": "" }, { "docid": "839e65b6d0909b0e8a2a163331600b44", "score": "0.50546163", "text": "function TextRenderer() {}", "title": "" }, { "docid": "839e65b6d0909b0e8a2a163331600b44", "score": "0.50546163", "text": "function TextRenderer() {}", "title": "" }, { "docid": "839e65b6d0909b0e8a2a163331600b44", "score": "0.50546163", "text": "function TextRenderer() {}", "title": "" }, { "docid": "839e65b6d0909b0e8a2a163331600b44", "score": "0.50546163", "text": "function TextRenderer() {}", "title": "" }, { "docid": "839e65b6d0909b0e8a2a163331600b44", "score": "0.50546163", "text": "function TextRenderer() {}", "title": "" }, { "docid": "839e65b6d0909b0e8a2a163331600b44", "score": "0.50546163", "text": "function TextRenderer() {}", "title": "" }, { "docid": "839e65b6d0909b0e8a2a163331600b44", "score": "0.50546163", "text": "function TextRenderer() {}", "title": "" }, { "docid": "839e65b6d0909b0e8a2a163331600b44", "score": "0.50546163", "text": "function TextRenderer() {}", "title": "" }, { "docid": "839e65b6d0909b0e8a2a163331600b44", "score": "0.50546163", "text": "function TextRenderer() {}", "title": "" }, { "docid": "c5eaa1ef662123ef85ca2bec9581d8a4", "score": "0.50481194", "text": "function createTypeEl(text) {\n const type = document.createElement('span');\n type.textContent = text;\n return type;\n}", "title": "" }, { "docid": "7c9c646763d2ce4ff11fa25b0a2ad999", "score": "0.50459284", "text": "function bullet() {\r\n document.write(\" <font color=\" + blue + \">&bull;</font> \");\r\n}", "title": "" } ]
1d9b5c8c2323341442b0440aa0584606
TODO: copy/paste grid code from project 1; draw source, sink, and knight path on it ALGORITHM PART 1
[ { "docid": "3c3d801faa0d30ef49028bd845c09190", "score": "0.0", "text": "function findMaxPossibleFlow(grid) {\n let sourceEdges = findNextPossibleMoves(source, grid);\n let sourceMaxEdge = sourceEdges[0];\n let sourceMaxEdgeCapacity = (grid[source[0], source[1]] + grid[sourceMaxEdge[0], sourceMaxEdge[1]]) / 2;\n\n let sinkEdges = findNextPossibleMoves(sink, grid);\n let sinkMaxEdge = sinkEdges[0];\n let sinkMaxEdgeCapacity = (grid[sink[0], sink[1]] + grid[sinkMaxEdge[0], sinkMaxEdge[1]]) / 2;\n\n return Math.max(sourceMaxEdgeCapacity, sinkMaxEdgeCapacity);\n}", "title": "" } ]
[ { "docid": "8024a88280156e3d28bd09dc227cce74", "score": "0.6788132", "text": "function stepCA(theGrid){\n //Create new grid to be written to\n newGrid = [];\n for(let i = 0; i <= width/reso; i++){\n newGrid[i] = [];\n }\n \n //Write values to grid\n for(let x = 0; x <= width/reso; x++){\n for(let y = 0; y <= height/reso; y++){\n newGrid[x][y] = new Cell(1.3);\n }\n }\n \n //Averaging values of neighbors\n for(let x = 2; x <= width/reso - 2; x++){\n for(let y = 2; y <=height/reso - 2; y++){\n let neighbors = theGrid[x][y].val + theGrid[x+1][y].val + theGrid[x-1][y].val + theGrid[x][y+1].val + theGrid[x][y-1].val + theGrid[x+1][y+1].val + theGrid[x+1][y-1].val + theGrid[x-1][y-1].val + theGrid[x-1][y+1].val;\n neighbors = neighbors/9;\n newGrid[x][y] = new Cell(neighbors);\n }\n }\n \n //Squares in the middle\n // for(let x = width/4/reso - 10; x <= width/4/reso + 10; x++){\n // for(let y = height/4/reso - 10; y <= height/4/reso + 10; y++){\n // newGrid[x][y] = new Cell((map(pointboi1, 0, width+height, 0, 2)));\n // }\n // for(let z = 3*height/4/reso - 10; z <=3* height/4/reso + 10; z++){\n // newGrid[x][z] = new Cell((map(pointboi2, 0, width+height, 0, 2)));\n // }\n // }\n // for(let x = 3*width/4/reso - 10; x <= 3*width/4/reso + 10; x++){\n // for(let y = height/4/reso - 10; y <= height/4/reso + 10; y++){\n // newGrid[x][y] = new Cell((map(pointboi3, 0, width+height, 0, 2)));\n // }\n // for(let z = 3*height/4/reso - 10; z <=3* height/4/reso + 10; z++){\n // newGrid[x][z] = new Cell((map(pointboi4, 0, width+height, 0, 2)));\n // }\n // }\n // for(let x = width/2/reso-10; x <= width/2/reso+10; x++){\n // for(let y = height/2/reso-10; y <= height/2/reso+10; y++){\n // newGrid[x][y] = new Cell((map(pointboi, 0, width+height, 0, 2)));\n // }\n // }\n \n //Randomly spawning squares as raindrops\n if(rainfall==true){\n hueee=random(1.1,1.3);\n pointttX=random(60, width-60);\n pointttY=random(60, height-60);\n for(let x = round(pointttX/reso - 3); x <= pointttX/reso + 3; x++){\n for(let y = round(pointttY/reso - 3); y <= pointttY/reso + 3; y++){\n newGrid[x][y] = new Cell(hueee);\n }\n }\n }\n return newGrid;\n}", "title": "" }, { "docid": "7caad6f15569a5c250c2ef56da7e8bf9", "score": "0.6778018", "text": "function tracePath(grid, j, i){\n var maxj = grid.length;\n var p = [];\n var dxContour = [0, 0, 1, 1, 0, 0, 0, 0, -1, 0, 1, 1, -1, 0, -1, 0];\n var dyContour = [0, -1, 0, 0, 1, 1, 1, 1, 0, -1, 0, 0, 0, -1, 0, 0];\n var dx, dy;\n var startEdge = [\"none\", \"left\", \"bottom\", \"left\", \"right\", \"none\", \"bottom\", \"left\", \"top\", \"top\", \"none\", \"top\", \"right\", \"right\", \"bottom\", \"none\"];\n var nextEdge = [\"none\", \"bottom\", \"right\", \"right\", \"top\", \"top\", \"top\", \"top\", \"left\", \"bottom\", \"right\", \"right\", \"left\", \"bottom\", \"left\", \"none\"];\n \n var startCell = grid[j][i];\n var currentCell = grid[j][i];\n\n var cval = currentCell.cval;\n var edge = startEdge[cval];\n\n var pt = getXY(currentCell, edge);\n\n /* push initial segment */\n p.push([i + pt[0], j + pt[1]]);\n edge = nextEdge[cval];\n pt = getXY(currentCell, edge);\n p.push([i + pt[0], j + pt[1]]);\n clearCell(currentCell);\n\n /* now walk arround the enclosed area in clockwise-direction */\n var k = i + dxContour[cval];\n var l = j + dyContour[cval];\n var prev_cval = cval;\n\n while((k >= 0) && (l >= 0) && (l < maxj) && ((k != i) || (l != j))){\n currentCell = grid[l][k];\n if(typeof currentCell === 'undefined'){ /* path ends here */\n //console.log(k + \" \" + l + \" is undefined, stopping path!\");\n break;\n }\n cval = currentCell.cval;\n if((cval === 0) || (cval === 15)){\n return { path: p, info: \"mergeable\" };\n }\n edge = nextEdge[cval];\n dx = dxContour[cval];\n dy = dyContour[cval];\n if((cval == 5) || (cval == 10)){\n /* select upper or lower band, depending on previous cells cval */\n if(cval == 5){\n if(currentCell.flipped){ /* this is actually a flipped case 10 */\n if(dyContour[prev_cval] == -1){\n edge = \"left\";\n dx = -1;\n dy = 0;\n } else {\n edge = \"right\";\n dx = 1;\n dy = 0;\n }\n } else { /* real case 5 */\n if(dxContour[prev_cval] == -1){\n edge = \"bottom\";\n dx = 0;\n dy = -1;\n }\n }\n } else if(cval == 10){\n if(currentCell.flipped){ /* this is actually a flipped case 5 */\n if(dxContour[prev_cval] == -1){\n edge = \"top\";\n dx = 0;\n dy = 1;\n } else {\n edge = \"bottom\";\n dx = 0;\n dy = -1;\n }\n } else { /* real case 10 */\n if(dyContour[prev_cval] == 1){\n edge = \"left\";\n dx = -1;\n dy = 0;\n }\n }\n }\n }\n pt = getXY(currentCell, edge);\n p.push([k + pt[0], l + pt[1]]);\n clearCell(currentCell);\n k += dx;\n l += dy;\n prev_cval = cval;\n }\n\n return { path: p, info: \"closed\" };\n }", "title": "" }, { "docid": "919d4db81c84d858f97f82fd9221784c", "score": "0.6658521", "text": "function gridInit(dimensions) {\n var canvases = {\n \"aStar\": { \"canvas\": document.getElementById(\"aStarCanvas\") },\n \"breadth\": { \"canvas\": document.getElementById(\"breadthCanvas\") },\n \"depth\": { \"canvas\": document.getElementById(\"depthCanvas\") },\n \"greedy\": { \"canvas\": document.getElementById(\"greedyCanvas\") }\n };\n var mouseClicked = false;\n var exCanvas = canvases.aStar.canvas;\n var offSet = Math.floor((exCanvas.clientWidth % dimensions) / 2);\n var initWidth = exCanvas.clientWidth;\n var blockSize = Math.floor(exCanvas.clientWidth / dimensions);\n var fillOrRemove = false; //Variable that tells whether the current mouse dragging should fill blocks or\n var curCanvases = Object.values(canvases);\n var solving = false;\n for (var i = 0; i < curCanvases.length; ++i) {\n var curVal = curCanvases[i];\n curVal.canvas.height = curVal.canvas.clientHeight;\n curVal.canvas.width = curVal.canvas.clientWidth;\n curVal.ctx = curVal.canvas.getContext(\"2d\");\n curVal.solved = false;\n }\n curCanvases = Object.values(canvases);\n\n for (var i = 0; i < curCanvases.length; ++i) {\n var curVal = curCanvases[i];\n curVal.ctx.fillStyle = \"white\";\n curVal.ctx.strokeStyle = \"blue\";\n gridDraw(blockSize, offSet, dimensions, true, curVal.ctx);\n curVal.backArray = [];\n for (var j = 0; j < dimensions; ++j) {\n curVal.backArray.push([]);\n curVal.backArray[j].length = dimensions;\n curVal.backArray[j].fill(0);\n }\n curVal.canvas.onmouseup = gridsMouseUp;\n curVal.canvas.onmousedown = gridsMouseDown;\n curVal.canvas.onmouseleave = gridsMouseLeave;\n curVal.canvas.onmousemove = gridsMouseMove;\n }\n\n //Responds to mouseup's on all the canvases and unsets the flag\n function gridsMouseUp(event) {\n mouseClicked = false;\n }\n\n //Responds to mousedown's on all the canvases. Draws the obstacle on the grid and \n //updates the backend at the current location.\n function gridsMouseDown(event) {\n if (solving) {\n return;\n }\n\n var borderOffset = 5;\n var resizedOffSet = Math.ceil((this.clientWidth / initWidth) * offSet);\n var resizedBlockSize = Math.floor((this.clientWidth - (resizedOffSet * 2)) / dimensions);\n var xDown = event.layerX - (borderOffset + resizedOffSet);\n var yDown = event.layerY - (borderOffset + resizedOffSet);\n var xDex = Math.floor(xDown / resizedBlockSize);\n var yDex = Math.floor(yDown / resizedBlockSize);\n for (var i = 0; i < curCanvases.length; ++i) {\n curVal = curCanvases[i];\n if (curVal.solved) {\n reInitGrid(curVal.backArray, dimensions, blockSize, offSet, curVal.ctx);\n curVal.solved = false;\n }\n if (xDex >= 0 && xDex < dimensions && yDex >= 0 && yDex < dimensions) {\n if (curVal.backArray[xDex][yDex] === 0) {\n fillOrRemove = true;\n curVal.ctx.fillStyle = \"brown\";\n curVal.ctx.strokeStyle = \"blue\";\n curVal.backArray[xDex][yDex] = 1;\n curVal.ctx.fillRect((xDex * blockSize) + offSet, (yDex * blockSize) + offSet, blockSize, blockSize);\n curVal.ctx.strokeRect((xDex * blockSize) + offSet, (yDex * blockSize) + offSet, blockSize, blockSize);\n } else {\n fillOrRemove = false;\n curVal.ctx.fillStyle = \"white\";\n curVal.ctx.strokeStyle = \"blue\";\n curVal.backArray[xDex][yDex] = 0;\n curVal.ctx.fillRect((xDex * blockSize) + offSet, (yDex * blockSize) + offSet, blockSize, blockSize);\n curVal.ctx.strokeRect((xDex * blockSize) + offSet, (yDex * blockSize) + offSet, blockSize, blockSize);\n }\n mouseClicked = true;\n }\n }\n }\n\n //responds to mouseleave events on all canvases and unsets the flag;\n function gridsMouseLeave(event) {\n mouseClicked = false;\n }\n\n //responds to mousemove events on all canvases. Draws the obstacle on the grid and \n //updates the backend at the current location.\n function gridsMouseMove(event) {\n if (mouseClicked && !solving) {\n var borderOffset = 5;\n var resizedOffSet = Math.floor((this.clientWidth / initWidth) * offSet);\n var resizedBlockSize = Math.floor((this.clientWidth - (resizedOffSet * 2)) / dimensions);\n var xDown = event.layerX - (borderOffset + resizedOffSet);\n var yDown = event.layerY - (borderOffset + resizedOffSet);\n var xDex = Math.floor(xDown / resizedBlockSize);\n var yDex = Math.floor(yDown / resizedBlockSize);\n for (var i = 0; i < curCanvases.length; ++i) {\n curVal = curCanvases[i];\n if (xDex >= 0 && xDex < dimensions && yDex >= 0 && yDex < dimensions) {\n if (fillOrRemove) {\n curVal.ctx.fillStyle = \"brown\";\n curVal.ctx.strokeStyle = \"blue\";\n curVal.backArray[xDex][yDex] = 1;\n curVal.ctx.fillRect((xDex * blockSize) + offSet, (yDex * blockSize) + offSet, blockSize, blockSize);\n curVal.ctx.strokeRect((xDex * blockSize) + offSet, (yDex * blockSize) + offSet, blockSize, blockSize);\n } else {\n curVal.ctx.fillStyle = \"white\";\n curVal.ctx.strokeStyle = \"blue\";\n curVal.backArray[xDex][yDex] = 0;\n curVal.ctx.fillRect((xDex * blockSize) + offSet, (yDex * blockSize) + offSet, blockSize, blockSize);\n curVal.ctx.strokeRect((xDex * blockSize) + offSet, (yDex * blockSize) + offSet, blockSize, blockSize);\n }\n }\n }\n }\n }\n\n //Signals the pathing algorithm to start solving the maze\n document.getElementById(\"solve\").onclick = function (event) {\n if (gridsSolved()) {\n for (var i = 0; i < curCanvases.length; ++i) {\n var canvas = curCanvases[i];\n canvas.solved = false;\n reInitGrid(canvas.backArray, dimensions, blockSize, offSet, canvas.ctx);\n }\n }\n\n canvases.aStar.aStarPath = new aStar(canvases.aStar.backArray, blockSize, offSet, canvases.aStar.ctx, function () {\n canvases.aStar.solved = true;\n canvases.aStar.path = null;\n for (var i = 0; i < curCanvases.length; ++i) {\n if (curCanvases[i].solved === false) {\n return;\n }\n }\n pause = false;\n solving = false;\n });\n canvases.breadth.breadthPath = new breadth(canvases.breadth.backArray, canvases.breadth.ctx, function () {\n canvases.breadth.solved = true;\n canvases.breadth.path = null;\n for (var i = 0; i < curCanvases.length; ++i) {\n if (curCanvases[i].solved === false) {\n return;\n }\n }\n pause = false;\n solving = false;\n });\n canvases.depth.depthPath = new depth(canvases.depth.backArray, canvases.depth.ctx, function () {\n canvases.depth.solved = true;\n canvases.depth.path = null;\n for (var i = 0; i < curCanvases.length; ++i) {\n if (curCanvases[i].solved === false) {\n return;\n }\n }\n pause = false;\n solving = false;\n });\n canvases.greedy.greedyPath = new greedy(canvases.greedy.backArray, blockSize, offSet, canvases.greedy.ctx, function () {\n canvases.greedy.solved = true;\n canvases.greedy.path = null;\n for (var i = 0; i < curCanvases.length; ++i) {\n if (curCanvases[i].solved === false) {\n return;\n }\n }\n pause = false;\n solving = false;\n });\n solving = true;\n continuePath(blockSize, offSet, canvases.aStar.aStarPath, canvases.breadth.breadthPath,\n canvases.depth.depthPath, canvases.greedy.greedyPath);\n }\n\n //Reinitializes the grid upon pressing the \"Clear\" button.\n document.getElementById(\"restart\").onclick = function (event) {\n if (solving) {\n alert(\"You must stop the solve first\");\n return;\n }\n gridInit(dimensions);\n }\n\n //On enter sends the username to the server and populates the combobox with the received values\n var username = document.getElementById(\"username\");\n username.onkeypress = function (event) {\n if (!event) {\n event = window.event;\n }\n var keyPressed = event.keyPressed || event.which;\n if (keyPressed === 13) {\n var username = document.getElementById(\"username\");\n if (username.value === \"\") {\n alert(\"Please enter a username\");\n return;\n }\n submitUser(username.value);\n }\n }\n\n //On enter sends the grid and gridname to the server, and populates the combobox with the\n //received values\n var gridName = document.getElementById(\"gridName\");\n gridName.onkeypress = function (event) {\n if (!event) {\n event = window.event;\n }\n var keyPressed = event.keyPressed || event.which;\n if (keyPressed === 13) {\n saveGrid();\n }\n }\n\n //Sends the grid and gridname to the server, and populates the combobox with the\n //received values\n var saveGridBtn = document.getElementById(\"save\");\n saveGridBtn.onclick = saveGrid;\n\n function saveGrid() {\n var username = document.getElementById(\"username\");\n if (username.value === \"\") {\n alert(\"Please enter a username\");\n return;\n }\n var exCanvas = canvases.aStar;\n var gridName = document.getElementById(\"gridName\");\n\n var sendStruct = {\n \"requestType\": \"add\",\n \"username\": username.value,\n \"grid\": stripBackArray(exCanvas.backArray),\n \"gridName\": gridName.value\n };\n\n var httpReq = new XMLHttpRequest();\n httpReq.onreadystatechange = function () {\n if (httpReq.readyState === 4 && httpReq.status === 200) {\n var resStruct = JSON.parse(httpReq.responseText);\n if (resStruct.valid === false) {\n alert(\"That username/grid name combination is taken\");\n return;\n }\n var nameBox = document.getElementById(\"nameBox\");\n nameBox.options.length = 0;\n var names = resStruct.names;\n for (var i = 0; i < names.length; ++i) {\n var curOption = document.createElement(\"option\");\n curOption.text = names[i].gridName;\n nameBox.add(curOption);\n }\n }\n };\n httpReq.open(\"POST\", \"/\");\n httpReq.setRequestHeader('Content-type', 'application/json');\n httpReq.send(JSON.stringify(sendStruct))\n }\n\n //Sends the username to the server and populates the combobox with the received values\n var enterUser = document.getElementById(\"enterUser\");\n enterUser.onclick = function (event) {\n var username = document.getElementById(\"username\");\n if (username.value === \"\") {\n alert(\"Please enter a username\");\n return;\n }\n submitUser(username.value);\n }\n\n function submitUser(username) {\n var sendStruct = {\n \"requestType\": \"request\",\n \"username\": username,\n };\n var httpReq = new XMLHttpRequest();\n httpReq.onreadystatechange = function () {\n if (httpReq.readyState === 4 && httpReq.status === 200) {\n var resStruct = JSON.parse(httpReq.responseText);\n if (resStruct.valid === false) {\n alert(\"That username/grid name combination is taken\");\n return;\n }\n var nameBox = document.getElementById(\"nameBox\");\n nameBox.options.length = 0;\n var names = resStruct.names;\n for (var i = 0; i < names.length; ++i) {\n var curOption = document.createElement(\"option\");\n curOption.text = names[i].gridName;\n nameBox.add(curOption);\n }\n }\n };\n httpReq.open(\"POST\", \"/\");\n httpReq.setRequestHeader('Content-type', 'application/json');\n httpReq.send(JSON.stringify(sendStruct))\n }\n\n //Requests the grid signified by the username and grid name from the server, and replaces\n //the current grid with itt\n var loadGrid = document.getElementById(\"load\");\n if (solving) {\n alert(\"You must stop the solve first\");\n return;\n }\n loadGrid.onclick = function (event) {\n var username = document.getElementById(\"username\");\n if (username.value === \"\") {\n alert(\"Please enter a username\");\n return;\n }\n var exCanvas = canvases.aStar;\n\n var nameBox = document.getElementById(\"nameBox\");\n var gridName = nameBox.options[nameBox.selectedIndex].text;\n var sendStruct = {\n \"requestType\": \"grid\",\n \"username\": username.value,\n \"gridName\": gridName\n };\n var httpReq = new XMLHttpRequest();\n httpReq.onreadystatechange = function () {\n if (httpReq.readyState === 4 && httpReq.status === 200) {\n var gridRes = JSON.parse(httpReq.responseText);\n var grid = JSON.parse(gridRes.grid);\n dimensions = grid.length;\n exCanvas = canvases.aStar.canvas;\n offSet = Math.floor((exCanvas.clientWidth % dimensions) / 2);\n blockSize = Math.floor(exCanvas.clientWidth / dimensions);\n document.getElementById(\"dimensions\").value = dimensions;\n document.getElementById(\"curDimen\").innerHTML = dimensions;\n for (var i = 0; i < curCanvases.length; ++i) {\n var curVal = curCanvases[i];\n curVal.backArray = grid;\n reInitGrid(grid, dimensions, blockSize, offSet, curVal.ctx);\n grid = JSON.parse(gridRes.grid);\n }\n }\n };\n httpReq.open(\"POST\", \"/\");\n httpReq.setRequestHeader('Content-type', 'application/json');\n httpReq.send(JSON.stringify(sendStruct))\n }\n\n //Increases the delay between algorithm iterations\n var delaySlider = document.getElementById(\"delay\");\n delaySlider.oninput = function () {\n var info = document.getElementById(\"curDelay\");\n var delayVal = this.value;\n info.innerHTML = delayVal;\n delay = delayVal;\n }\n\n //Pauses the algorithms\n var pauseBtn = document.getElementById(\"pause\");\n pauseBtn.onclick = function () {\n pause = true;\n }\n\n //Continues the automatic pathing algorithm\n var continueBtn = document.getElementById(\"continue\");\n continueBtn.onclick = function () {\n pause = false;\n if (solving) {\n continuePath(blockSize, offSet, canvases.aStar.aStarPath, canvases.breadth.breadthPath,\n canvases.depth.depthPath, canvases.greedy.greedyPath);\n }\n }\n\n //Steps the algorithm forward one iteration\n var stepBtn = document.getElementById(\"step\");\n stepBtn.onclick = function () {\n pause = true;\n if (solving) {\n continuePath(blockSize, offSet, canvases.aStar.aStarPath, canvases.breadth.breadthPath,\n canvases.depth.depthPath, canvases.greedy.greedyPath);\n }\n }\n\n //Tells whether all the grids are solves\n function gridsSolved() {\n for (var i = 0; i < curCanvases.length; ++i) {\n if (curCanvases[i].solved === false) {\n return false;\n }\n }\n return true;\n }\n\n //Stops the solve\n var stopBtn = document.getElementById(\"stop\");\n stopBtn.onclick = function () {\n var oldPause = pause;\n pause = true;\n if (solving) {\n setTimeout(stopSolve, delay, oldPause);\n }\n }\n\n function stopSolve(oldPause) {\n for (var i = 0; i < curCanvases.length; ++i) {\n var canvas = curCanvases[i];\n canvas.solved = false;\n reInitGrid(canvas.backArray, dimensions, blockSize, offSet, canvas.ctx);\n }\n solving = false;\n pause = oldPause;\n }\n}", "title": "" }, { "docid": "2746dc7b162cfc8f5bf9865981c54c76", "score": "0.6626638", "text": "createGrid(){\n let id = 0\n for (let i = 0; i < this.gridCols; i++) {\n this.grid.push([]);\n for (let j = 0; j < this.gridRows; j++) {\n this.grid[i].push(new GraphCell(this,++id, i, j))\n }\n \n }\n\n\n for (let col = 0; col < this.gridCols; col++) {\n for (let row = 0; row < this.gridRows; row++) {\n this.grid[col][row].addNeighbors();\n } \n }\n\n this.home = this.grid[this.gridCols-1][this.gridRows/2];\n this.home.wall = false;\n this.home.pathScore = 0;\n\n this.createPaths();\n }", "title": "" }, { "docid": "691ebb7ff688196e077e0d8ed7ef4050", "score": "0.66249865", "text": "function drawGrid() {\n\t\tvar context = drawingCanvas[1].context;\n\n\t\tdrawingCanvas[1].scale = Math.min( drawingCanvas[1].width/storage[1].width, drawingCanvas[1].height/storage[1].height );\n\t\tdrawingCanvas[1].xOffset = (drawingCanvas[1].width - storage[1].width * drawingCanvas[1].scale)/2;\n\t\tdrawingCanvas[1].yOffset = (drawingCanvas[1].height - storage[1].height * drawingCanvas[1].scale)/2;\n\n\t\tvar scale = drawingCanvas[1].scale;\n\t\tvar xOffset = drawingCanvas[1].xOffset;\n\t\tvar yOffset = drawingCanvas[1].yOffset;\n\n\t\tvar distance = grid.distance*scale;\n\n\t\tvar fromX = drawingCanvas[1].width/2 - distance/2 - Math.floor( (drawingCanvas[1].width - distance)/2 / distance ) * distance;\n\t\tfor( var x=fromX; x < drawingCanvas[1].width; x+=distance ) {\n\t\t\tcontext.beginPath();\n\t\t\tcontext.lineWidth = grid.width*scale;\n\t\t\tcontext.lineCap = 'round';\n\t\t\tcontext.fillStyle = grid.color;\n\t\t\tcontext.strokeStyle = grid.color;\n\t\t\tcontext.moveTo(x, 0);\n \t\tcontext.lineTo(x, drawingCanvas[1].height);\n \t\tcontext.stroke();\n\t\t}\n\t\tvar fromY = drawingCanvas[1].height/2 - distance/2 - Math.floor( (drawingCanvas[1].height - distance)/2 / distance ) * distance ;\n\n\t\tfor( var y=fromY; y < drawingCanvas[1].height; y+=distance ) {\n\t\t\tcontext.beginPath();\n\t\t\tcontext.lineWidth = grid.width*scale;\n\t\t\tcontext.lineCap = 'round';\n\t\t\tcontext.fillStyle = grid.color;\n\t\t\tcontext.strokeStyle = grid.color;\n\t\t\tcontext.moveTo(0, y);\n \t\tcontext.lineTo(drawingCanvas[1].width, y);\n \t\tcontext.stroke();\n\t\t}\n\t}", "title": "" }, { "docid": "ee2848c2862d88631488cdf6a70e2d69", "score": "0.66078734", "text": "function grid(x, y, w, h,\n\t\ttileW, tileH,\n\t\tunitX, unitY) {\n\t\n\tstroke(64);\n\tfor(let i=x;i<=x+w+1;i+=tileW) { line(i,y,i,y+h); }\n\tfor(let i=y+h;i>=y-1;i-=tileH) { line(x,i,x+w,i); }\n\t\n\tstroke(255);\n\tfill(255);\n\tline(x,y,x,y+h);\n\tline(x,y+h,x+w,y+h);\n\t\n\tlet dpX = min(max(2,ceil(-log((xAxisMax-xAxisMin)*unitX)/log(10))),5);\n\tlet dpY = min(max(2,ceil(-log((yAxisMax-yAxisMin)*unitY)/log(10))),5);\n\t\n\tnoStroke();\n\t\n\ttextAlign(CENTER,TOP);\n\tfor(let i=0,u;(u=(x+i*tileW))<=(x+w+1);i++) {\n\t\tline(u,y+h,u,y+h+2);\n\t\tlet coord = (xAxisMin+i*unitX*(xAxisMax-xAxisMin));\n\t\ttext(coord==0?\"0\":coord.toFixed(dpX),u+1,y+h+2);\n\t}\n\ttextAlign(RIGHT,CENTER);\n\tfor(let i=0,v;(v=(y+h-i*tileH))>=y-1;i++) {\n\t\tline(x,v,x-2,v);\n\t\tlet coord = (yAxisMin+i*unitY*(yAxisMax-yAxisMin));\n\t\ttext(coord==0?\"0\":coord.toFixed(dpY),x-4,v-2);\n\t}\n\t\n}", "title": "" }, { "docid": "b61d54b5b869dddd14109139b2c4d3f4", "score": "0.6537227", "text": "function renderGrid(){\r\n\r\n\tvar interim_maze;\r\n\tif (fromPredefined){ // var set to 1 from console only - for testing \r\n\t\tinterim_maze=mazeMap.gridMap;\r\n\t} else if (sessionStorage.mazeSource==\"random\"){\r\n\t\tinterim_maze=randomMaze();\r\n\t} else {\r\n\t\tinterim_maze = convertTo2d(maze);\r\n\t}\r\n\r\n\t//interim_maze= convertTo2d(testmaze); - only for testing\r\n\t//interim_maze=removeDiagonalBlocksInTest(testmaze); - further testing\r\n\t\r\n\tvar bindata = Array();\r\n\tvar binpills = Array();\r\n\tvar x=0;\r\n\tvar v_offset=25; // start 25px down, this just leaves some space on the page \r\n\tvar innerStr=\"\";\r\n\tpillNumber=0; // start with 0 pills \r\n\r\n\tfor (y=0;y<interim_maze.length;y++){\r\n\t\tvar lineMoves = Array();\r\n\t\th_offset=35; // start a new line 35px in\r\n\t\tbindata[v_offset] = Array();\r\n\r\n\t\tfor (x=0;x<19;x++){\r\n\t\t\r\n\t\t\tbit = interim_maze[y][x]; // yeah its a byte not a bit, byte is a reserved word. Ahem..\r\n\t\t\tbinbit = 0;\r\n\t\t\tvar movestring=\"\"; // empty var to take the possible directions. Now we've switched exclusively to the binary do we still need this? I wonder if any of the code actually uses it.\r\n\r\n\t\t\t// populate movestring by scanning the binary array left, right, up and down for more 1's\r\n\t\t\tif (interim_maze[y-1] && interim_maze[y-1][x] != \"0\"){\r\n\t\t\t\t movestring=\"U\"; binbit=8;} else { movestring=\"X\";}\r\n\r\n\t\t\tif (interim_maze[y+1] && interim_maze[y+1][x] != \"0\"){\r\n\t\t\t\t movestring += \"D\"; binbit += 4; } else { movestring += \"X\";}\r\n\r\n\t\t\tif (interim_maze[y][x-1] && interim_maze[y][x-1] != \"0\"){\r\n\t\t\t\t movestring += \"L\"; binbit += 2;} else { movestring += \"X\";}\r\n\r\n\t\t\tif (interim_maze[y][x+1] && interim_maze[y][x+1] != \"0\"){\r\n\t\t\t\t movestring += \"R\"; binbit += 1; } else { movestring += \"X\";}\r\n\r\n\t\t\tif (interim_maze[y][x-1] == \"3\" && interim_maze[y][x+1] == \"3\"){ binbit = 8;} // stop ghosts L and R in home base - means from the center position they will ALWAYS go up and out\r\n\r\n\t\t\tmovestring += bit; // this adds the pill\r\n\t\t\tlineMoves.push(movestring); // ADD to an array of the whole line\r\n\r\n\t\t\t// This section draws the inner wall of the outer double wall if where x and y are the perimiters\r\n\t\t\t// The CSS for the mazecells is no longer used, but anticipating I may again in the future, I'm manually altering it here.\r\n\t\t\tif (y==0 || x==0 || y==14 || x==18 ){\r\n\r\n\t\t\t\tstyles=movestring.substring(0,4); // we add the 4 move positions to a css class in order to draw the correct borders for the maze\r\n\r\n\r\n\t\t\t\t// these replacements relate to the outer walls which do not render correctly with borders on opposite sides.\r\n\t\t\t\t// this is not the correct way to fix this, would be better to alter the css, however this retains the css functionality as the css is currently used for another project I am playing with\r\n\t\t\t\t// in time none of this code will be required and I will fix the css\r\n\t\t\t\tif (y==0){ // upper edge \r\n\t\t\t\t\tif (x != 0 && x!=18){\r\n\t\t\t\t\t\t styles = styles.replace(\"XXL\",\"XDL\");\t\r\n\t\t\t\t\t\t styles = styles.replace(\"XXX\",\"XDL\");\t\r\n\t\t\t\t\t\t styles = styles.replace(\"XDX\",\"XDL\");\t\r\n\t\t\t\t\t\t styles = styles.replace(\"XDLX\",\"XDLR\");\t\r\n\t\t\t\t\t\t styles = styles.replace(\"XXXR\",\"XDXR\");\t\r\n\t\t\t\t\t} else if (x==0){\r\n\t\t\t\t\t\t styles = styles.replace(\"XXXR\",\"XDXR\");\t\r\n\t\t\t\t\t} else if (x==18){\r\n\t\t\t\t\t\t styles = styles.replace(\"XDXX\",\"XDLX\");\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (y==14){ // lower edge\r\n\t\t\t\t\tstyles = styles.replace(\"XXXR\",\"UXXR\");\r\n\t\t\t\t\tstyles = styles.replace(\"XXLX\",\"UXLX\");\r\n\t\t\t\t\tstyles = styles.replace(\"XXLR\",\"UXLR\");\r\n\t\t\t\t}\r\n\t\t\t\tif (x==0){ // left edge\r\n\t\t\t\t\tstyles = styles.replace(\"DXX\",\"DXR\");\r\n\t\t\t\t\tstyles = styles.replace(\"XXLR\",\"XDLR\");\r\n\t\t\t\t\tstyles = styles.replace(\"XXXR\",\"UDXR\");\r\n\t\t\t\t\tstyles = styles.replace(\"UXXX\",\"UXXR\"); // added for level 6\r\n\t\t\t\t\tif (y!=0&&y!=14){\r\n\t\t\t\t\t\tstyles = styles.replace(\"UXXR\",\"UDXR\"); // added for level 6\r\n\t\t\t\t\t\tstyles = styles.replace(\"XDXR\",\"UDXR\"); // added for level 6\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (x==18){ // right edge\r\n\t\t\t\t\tstyles = styles.replace(\"UDX\",\"UDL\"); // asasumes can go left (no left border)\r\n\t\t\t\t\tstyles = styles.replace(\"UXXX\",\"UDLX\"); // asasumes can go left (no left border)\r\n\t\t\t\t\tif (y!=0&&y!=14){\r\n\t\t\t\t\t\tstyles = styles.replace(\"XDXX\",\"XDLX\"); // asasumes can go left (no left border)\r\n\t\t\t\t\t\tstyles = styles.replace(\"XDLX\",\"UDLX\"); // asasumes can go left (no left border)\r\n\t\t\t\t\t\tstyles = styles.replace(\"UXLX\",\"UDLX\"); // asasumes can go left (no left border)\r\n\t\t\t\t\t\tstyles = styles.replace(\"XXLX\",\"XDLX\"); // asasumes can go left (no left border)\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstyles = styles.replace(\"XXLR\",\"\");\r\n\t\t\t\tif (bit==4 && i!=0){\r\n\t\t\t\t\t\tstyles = \"UDLR\";\r\n\t\t\t\t}\r\n\t\t\t\tif (bit==4 && y==0){\r\n\t\t\t\t\tstyles=styles.replace(\"XXLX\",\"XDLR\");\r\n\t\t\t\t\tstyles=styles.replace(\"XXXR\",\"XDLR\");\r\n\t\t\t\t}\r\n\t\t\t\tif (x==18 && y == 14){ // bottom right corner\r\n\t\t\t\t\tstyles = \"UXLX\";\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tstyles=\"\"; // only required for the borders now\r\n\t\t\t}\r\n\r\n\t\t\twallStyles = movestring.substring(0,4);\r\n\r\n\t\t\t// 4 is the tunnel at the side of the maze\r\n\t\t\tif (bit==4){\r\n\t\t\t\tif (x==0){\r\n\t\t\t\t\tstyles = styles.replace(\"XXXR\",\"XXLR\"); \r\n\t\t\t\t\tmovestring = movestring.replace(\"XXXR\",\"XXOR\"); \r\n\t\t\t\t} else {\r\n\t\t\t\t\tstyles = styles.replace(\"XXLX\",\"XXLR\"); \r\n\t\t\t\t\tmovestring = movestring.replace(\"XXLX\",\"XXLO\"); \r\n\t\t\t\t}\r\n\t\t\t\tstyles += \" \" + movestring;\r\n\t\t\t\tstyles += \" mazeTunnel\"; \r\n\t\t\t\tcellInnerHTML = \"\";\r\n\r\n\t\t\t// 5 is the red barrier at the top of the ghosts home base\r\n\t\t\t} else if (bit==5){\r\n\t\t\t\tstyles += \" ghostbarrier\";\r\n\t\t\t\tcellInnerHTML = \"\";\r\n\t\t\t\tghostHomeBase=Array(h_offset,v_offset); // set the return to base position for the game\r\n\r\n\t\t\t// print the pill if it's a cell with 1 in the binary maze\r\n\t\t\t} else if (bit==1){\r\n\t\t\t\tcellInnerHTML=\"<img src='graphics/pil.gif' name='pil_\" + h_offset + v_offset + \"'>\";\r\n\t\t\t\tpillNumber++;\r\n\r\n\t\t\t// 2 is a powerpill\r\n\t\t\t} else if (bit==2){\r\n\t\t\t\tcellInnerHTML=\"<div id='p\" + v_offset + h_offset + \"' ><img src='graphics/powerpil.gif' name='pil_\" + h_offset + v_offset + \"'></div>\";\r\n\t\t\t\tpillNumber++;\r\n\r\n\t\t\t// and 0 is a cell within a wall\r\n\t\t\t} else {\r\n\t\t\t\tcellInnerHTML=\"<div id='p\" + v_offset + h_offset + \"' ></div>\";\r\n\t\t\t}\r\n\r\n\t\t\t// add further css for creating the left and right walls on the next row down using css before and after selectors. This takes care of the double walls.\r\n\t\t\tif (y<14){\r\n\t\t\t\tif (movestring.charAt(3)==\"R\"){\r\n\t\t\t\t\t//styles +=\" blockLowerRight\"; M1 - appears to no longer be used - from old maze gen code\r\n\t\t\t\t}\r\n\t\t\t\tif (movestring.charAt(2)==\"L\"){\r\n\t\t\t\t\t//styles += \" blockLowerLeft\"; M1 - appears to no longer be used\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Create the lookup array, which contains data about your possible moves, and print the pills whilst looping.. \r\n\t\t\t// The lookup array maps to pixels on the screen so you can look up moves from the top and left properties of the sprites.\r\n\t\t\t// if it's not a zero in the original maze array, add the html to a string, and add this to innerStr. innerStr is built up and used as innerHTML to the maze div.\r\n\t\t\tif (bit != \"0\"){\r\n\t\t\t\tstr='<div id=\"cell-' + h_offset + '-' + v_offset + '\" data-pills=\"' + bit + '\" style=\"position:absolute; top:' + v_offset + 'px; left:' + h_offset + 'px;\" class=\"mazeCell ' + styles + '\">' + cellInnerHTML + '</div>';\r\n\t\t\t\tinnerStr += str;\r\n\t\t\t\t//binbit = (binbit>>>0).toString(2); // only use this to store in binary notation\r\n\t\t\t\tbindata[v_offset][h_offset] = binbit;\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tstr='<div id=\"cell-' + h_offset + '-' + v_offset + '\" style=\"position:absolute; top:' + v_offset + 'px; left:' + h_offset + 'px;\" class=\"wallCell w_' + wallStyles + '\">' + cellInnerHTML + '</div>';\r\n\t\t\t\tinnerStr += str;\r\n\t\t\t}\r\n\r\n\t\t\th_offset = h_offset + 30;\r\n\r\n\t\t}\r\n\t\t//console.log(\"Linemoves: \" + lineMoves);\r\n\t\tv_offset = v_offset + 30; \r\n\t}\r\n\tdocument.getElementById('mazeinner').innerHTML=innerStr;\r\n\treturn bindata;\r\n}", "title": "" }, { "docid": "e4768da1359fcf6a3a09a5efa71e0620", "score": "0.6505892", "text": "makeCells(startX, startY){\n let tempArray = []; //stored array of new cells \n\n //these variables are used to assign chords to cells based on key\n let keys = ['A','A#','B','C','C#','D','D#','E','F','F#','G','G#'];\n let keyIndex = keys.findIndex(x => x == this.key);//search keys array for index of grid key\n let offsets = [11,2,5,4,9,0,11,7];//intervals in reverse order (so that pop() can be used)\n let quals = ['dim','m','','m','m','','dim','']; //empties represent major chords \n \n //nested function to generate a Cell object, complete with a chord from the grid's key.\n //a nested function used in this way can't automatically access \"this\" for class elements.\n //to bring the class into scope, it must be passed a reference to \"this\" explicitly.\n //\"this\" is a reserved keyword, so we need some other name. Here \"thisObject\" is the name\n //for that reference. The point is: calling this function requires the first argument to\n //be: \"this\"\n function buildCell(thisObject,cellX,cellY){\n return new Cell(\n cellX,\n cellY,\n thisObject.cellSize,\n thisObject.keyDisplayColor, \n null,\n new Chord(keys[(keyIndex + offsets.pop()) % keys.length], //assign a chord to the cell\n quals.pop(),\n globalsynth),\n\t\t\t\t thisObject.isBottomGrid);\n }\n\n \n /* below is the code to generate the grid from cells... */\n /* INVOLVES TRIG, so edit at your own risk. */\n \n tempArray.push(buildCell(this,0,0)); //center cell\n //lower cluster. fancy fractions are for the internal trig junk\n for(var i = 4/3; i <= 7/3; i += 1/3){\n tempArray.push(buildCell(\n this,\n (this.SPACING*this.cellSize)*Math.cos( -(i) * PI),\n (this.SPACING*this.cellSize)*Math.sin( -(i) * PI)));\n } \n //\"translate\" variables for upper cluster by adding these variables to the coords\n let transX = (this.SPACING*this.cellSize)*Math.cos(5/3 * PI);\n let transY = (this.SPACING*this.cellSize)*Math.sin(5/3 * PI); \n //upper cluster. fancy fractions are for the internal trig junk \n for(var i = 1; i > 1/3; i -= 1/3){ \n tempArray.push(buildCell(\n this,\n (this.SPACING*this.cellSize)*Math.cos( -(i) * PI)+transX,\n (this.SPACING*this.cellSize)*Math.sin( -(i) * PI)+transY));\n }\n\n return tempArray;\n }", "title": "" }, { "docid": "3c9893807ac0f01a6eaebffc55dcfc09", "score": "0.6491946", "text": "function draw(){\n background(51);\n frameRate(55880);\n for(var i = 0; i < grid.length; i++){\n //show is a function that draws each cell\n grid[i].show(); \n }\n \n current.visited = true;\n //highlight the current cell\n current.highLight();\n //checkNeighbors() find a random unvisited neighbor and return it\n var next = current.checkNeighbors();\n //if next cell is a defined cell\n\n if(next){\n next.visited = true;\n //step2 \n removeWalls(current, next);\n //step3\n stack.push(current);\n //step4\n current = next;\n } else if(stack.length > 0){\n var cell = stack.pop();\n current = cell;\n\n }\n}", "title": "" }, { "docid": "101c571c5da8293e196e9f89350e08ed", "score": "0.6490603", "text": "function setup() {\n createCanvas(800, 800);\n background(0);\n let gridSize = width / 10;\n for (let x = gridSize; x <= width; x += gridSize) {\n for (let y = gridSize; y <= height; y += gridSize) {\n //make grid\n stroke(255);\n smooth();\n line(x, 0, x, height);\n line(x - gridSize, y, width, y);\n //generate random seed values for location and size\n let randLoc = random(-gridSize / 2, gridSize / 2);\n let randLoc2 = random(-gridSize / 2, gridSize / 2);\n let randLoc3 = random(-gridSize / 2, gridSize / 2);\n let randLoc4 = random(-gridSize / 2, gridSize / 2);\n let randLoc5 = random(-gridSize / 2, gridSize / 2);\n let randLoc6 = random(-gridSize / 2, gridSize / 2);\n let randLoc7 = random(-gridSize / 2, gridSize / 2);\n let randLoc8 = random(-gridSize / 2, gridSize / 2);\n let circSize = random(0, gridSize - 10);\n let sqSize = random(0, (gridSize - 10) / 2);\n //draw circles\n noFill();\n ellipse(x + randLoc, y + randLoc2, circSize, circSize);\n //draw squares\n push();\n translate(x + randLoc3, y + randLoc4);\n rotate(random(TWO_PI));\n rect(0, 0, sqSize, sqSize);\n pop();\n //draw lines\n push();\n translate(x + randLoc5, y + randLoc6);\n rotate(random(TWO_PI));\n line(0, 0, randLoc7, randLoc8);\n pop();\n }\n }\n}", "title": "" }, { "docid": "aec0591ba488e5f537ef6facade0092d", "score": "0.6482297", "text": "function draw_grid() {\n canvas.width = window.innerWidth;\n canvas.height = window.innerHeight;\n\n // Clear the canvas\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n ctx.strokeStyle = '#8a0f13';\n\n for (let row = 0; row < nodes.length; row++) {\n const rowNodes = nodes[row];\n const orowNodes = onodes[row];\n\n for (let col = 0; col < rowNodes.length; col++) {\n const node = rowNodes[col];\n const onode = orowNodes[col];\n\n // Update the position of the node\n node.x = l * onode.x + (1 - l) * node.x + eps * (Math.random() * 2 - 1);\n node.y = l * onode.y + (1 - l) * node.y + eps * (Math.random() * 2 - 1);\n\n // Draw a line from this node to the next node in the row\n if (col < rowNodes.length - 1) {\n ctx.beginPath();\n ctx.moveTo(canvas.width * node.x, canvas.height * node.y);\n ctx.lineTo(canvas.width * rowNodes[col + 1].x, canvas.height * rowNodes[col + 1].y);\n // ctx.beginPath();\n // ctx.arc(canvas.width * node.x, canvas.height * node.y, dotSize/2, 0, Math.PI * 2);\n // ctx.fill();\n ctx.stroke();\n }\n\n // Draw a line from this node to the next node in the column\n if (row < nodes.length - 1) {\n ctx.beginPath();\n ctx.moveTo(canvas.width * node.x, canvas.height * node.y);\n ctx.lineTo(canvas.width * nodes[row + 1][col].x, canvas.height * nodes[row + 1][col].y);\n // ctx.beginPath();\n // ctx.arc(canvas.width * node.x, canvas.height * node.y, dotSize/2, 0, Math.PI * 2);\n // ctx.fill();\n ctx.stroke();\n }\n }\n }\n }", "title": "" }, { "docid": "0d5907965def350b830512e526a1c30e", "score": "0.647639", "text": "function setup() {\r\n createCanvas(500, 500);\r\n console.log(\"A*\");\r\n\r\n w = width / rows;\r\n h = width / cols;\r\n for (let i = 0; i < rows; i++) {\r\n grid[i] = new Array(cols);\r\n }\r\n for (let i = 0; i < rows; i++) {\r\n for (let j = 0; j < cols; j++) {\r\n grid[i][j] = new Spot(i, j);\r\n }\r\n }\r\n for (let i = 0; i < rows; i++) {\r\n for (let j = 0; j < cols; j++) {\r\n\r\n grid[i][j].addNbr(grid);\r\n }\r\n }\r\n start = grid[0][0];\r\n start.wall = false;\r\n end = grid[rows - 1][cols - 1];\r\n end.wall = false;\r\n openSet.push(start);\r\n console.log(grid);\r\n}", "title": "" }, { "docid": "16822fe5ac7c1d119873a5af46faa4d9", "score": "0.64124864", "text": "function drawGrid(){\n for (var xx1 = 0; xx1 <= bw; xx1 += pixled.pixel_size) {\n canvas.moveTo(0.5 + xx1 + p, p);\n canvas.lineTo(0.5 + xx1 + p, bh + p);\n }\n for (var x = 0; x <= bh; x += pixled.pixel_size) {\n canvas.moveTo(p, 0.5 + x + p);\n canvas.lineTo(bw + p, 0.5 + x + p);\n }\n canvas.lineWidth='1';\n canvas.strokeStyle = '#111';\n canvas.stroke();\n }", "title": "" }, { "docid": "8beddfc38f497662f9cf5b82e8e05510", "score": "0.63918096", "text": "nextLoop() {\n let { openSet, closedSet, grid, endingPoint } = this;\n let current = this.findSmallestFInOpenSet();\n let neighbors = current.neighbors;\n\n this.setCurrentPath(current);\n if (current == endingPoint) {\n console.log('Path Found');\n this.found = true;\n return;\n }\n current.type = 'inClosed';\n this.removeFromArray(openSet, current);\n closedSet.push(current);\n for (var i = 0; i < neighbors.length; i++) {\n let neighbor = neighbors[i];\n // If already in closed set then there must have been a shorter path to get to that point\n if (!closedSet.includes(neighbor) && neighbor.type != 'wall') {\n // distance between currentG and its neightbors is just 1, \n // could be larger for something more complex system \n let tmpG = current.g + 1;\n let newPath = false;\n if (openSet.includes(neighbor)) {\n // If this has been evaluated before, is this newG better?\n if (tmpG > neighbor.g) {\n neighbor.g = tmpG;\n newPath = true;\n }\n } else { // not in openSet\n neighbor.g = tmpG;\n openSet.push(neighbor);\n neighbor.type = 'inOpen';\n newPath = true;\n }\n if (newPath) {\n neighbor.h = this.calcluateHeuristicDistance(neighbor);\n neighbor.f = neighbor.g + neighbor.h;\n neighbor.previous = current;\n }\n }\n\n }\n }", "title": "" }, { "docid": "d61a66f11ab3bc9fc2f676ad44c95f54", "score": "0.63896775", "text": "drawGrid() {\n const margin = 50\n this.ctx.beginPath()\n const x0 = this.getX(this.N)\n for (let m = 0; m <= this.M; m ++) {\n const y = this.getY(m)\n this.ctx.moveTo(margin, y)\n this.ctx.lineTo(x0, y)\n }\n const y0 = this.getY(this.M)\n for (let n = 0; n <= this.N; n ++) {\n const x = this.getX(n)\n this.ctx.moveTo(x, margin)\n this.ctx.lineTo(x, y0)\n }\n this.ctx.closePath()\n this.ctx.stroke()\n }", "title": "" }, { "docid": "4452db674896b5d0b0c9584e15309477", "score": "0.63813025", "text": "function createGrid() {\n if (playerNumber == 1) {\n for (w = 0; w < roomWidth / 2; w++) { //TOP\n wOffset = w * tileWidth + startPosW\n hOffset = 0 + startPosH\n ctx.drawImage(grid, wOffset, hOffset, tileWidth, tileHeight);\n }\n for (w = 0; w < roomWidth / 2; w++) { //Bottom\n origWOffset = startPosW\n origHOffset = startPosH\n wOffset = w * tileWidth + origWOffset\n hOffset = (roomHeight - 1) * tileHeight + origHOffset\n ctx.drawImage(grid, wOffset, hOffset, tileWidth, tileHeight);\n }\n for (h = 1; h < roomHeight - 1; h++) { //Left\n origWOffset = startPosW\n origHOffset = startPosH\n wOffset = 0 + origWOffset\n hOffset = h * tileHeight + origHOffset\n if ((roomHeight - h - 1) % 5 == 0) {\n offset = -(roomHeight - h - 1).toString().length * 14\n\n ctx.fillText(roomHeight - h - 1, wOffset + offset, hOffset + 21);\n }\n ctx.drawImage(grid, wOffset, hOffset, tileWidth, tileHeight);\n }\n for (h = 1; h < roomHeight - 1; h++) { //Right\n origHOffset = startPosH\n wOffset = midX - (0.5 * tileWidth)\n hOffset = (h * tileHeight) + origHOffset\n ctx.drawImage(grid, wOffset, hOffset, tileWidth, tileHeight);\n }\n if (typeof rHeight !== \"undefined\") {\n for (h = 1; h < roomHeight - 1; h++) { //Left\n origWOffset = startPosW\n origHOffset = startPosH\n wOffset = (roomWidth - 1) * tileWidth + origWOffset\n hOffset = (h * tileHeight) + rHeight\n ctx.drawImage(grid, wOffset, hOffset, tileWidth, tileHeight);\n if ((roomHeight - h - 1) % 5 == 0) {\n ctx.fillText(roomHeight - h - 1, wOffset + tileWidth + 5, hOffset + 21);\n }\n }\n for (h = 1; h < roomHeight - 1; h++) { //Right\n origHOffset = startPosH\n wOffset = midX + (0.5 * tileWidth)\n hOffset = (h * tileHeight) + rHeight\n ctx.drawImage(grid, wOffset, hOffset, tileWidth, tileHeight);\n }\n for (w = roomWidth / 2; w < roomWidth; w++) { //TOP\n wOffset = w * tileWidth + startPosW\n hOffset = 0 + rHeight\n ctx.drawImage(grid, wOffset, hOffset, tileWidth, tileHeight);\n }\n for (w = roomWidth / 2; w < roomWidth; w++) { //TOP\n origWOffset = startPosW\n origHOffset = startPosH\n wOffset = w * tileWidth + origWOffset\n hOffset = (roomHeight - 1) * tileHeight + rHeight\n ctx.drawImage(grid, wOffset, hOffset, tileWidth, tileHeight);\n }\n }\n }\n if (playerNumber == 2) {\n for (h = 1; h < roomHeight - 1; h++) { //Left\n origWOffset = startPosW\n origHOffset = startPosH\n wOffset = (roomWidth - 1) * tileWidth + origWOffset\n hOffset = (h * tileHeight) + origHOffset\n ctx.drawImage(grid, wOffset, hOffset, tileWidth, tileHeight);\n if ((roomHeight - h - 1) % 5 == 0) {\n ctx.fillText(roomHeight - h - 1, wOffset + tileWidth + 5, hOffset + 21);\n }\n }\n for (h = 1; h < roomHeight - 1; h++) { //Right\n origHOffset = startPosH\n wOffset = midX + (0.5 * tileWidth)\n hOffset = (h * tileHeight) + origHOffset\n ctx.drawImage(grid, wOffset, hOffset, tileWidth, tileHeight);\n\n }\n for (w = roomWidth / 2; w < roomWidth; w++) { //TOP\n wOffset = w * tileWidth + startPosW\n hOffset = 0 + startPosH\n ctx.drawImage(grid, wOffset, hOffset, tileWidth, tileHeight);\n }\n for (w = roomWidth / 2; w < roomWidth; w++) { //TOP\n origWOffset = startPosW\n origHOffset = startPosH\n wOffset = w * tileWidth + origWOffset\n hOffset = (roomHeight - 1) * tileHeight + origHOffset\n ctx.drawImage(grid, wOffset, hOffset, tileWidth, tileHeight);\n }\n if (typeof rHeight !== \"undefined\") {\n for (w = 0; w < roomWidth / 2; w++) { //TOP\n wOffset = w * tileWidth + startPosW\n\n ctx.drawImage(grid, wOffset, rHeight, tileWidth, tileHeight);\n }\n for (w = 0; w < roomWidth / 2; w++) { //Bottom\n origHOffset = rHeight\n origWOffset = startPosW\n origHOffset = startPosH\n wOffset = w * tileWidth + origWOffset\n\n ctx.drawImage(grid, wOffset, (roomHeight - 1) * tileHeight + rHeight, tileWidth, tileHeight);\n }\n for (h = 1; h < roomHeight - 1; h++) { //Left\n origWOffset = startPosW\n origHOffset = startPosH\n wOffset = 0 + origWOffset\n hOffset = h * tileHeight + rHeight\n ctx.drawImage(grid, wOffset, hOffset, tileWidth, tileHeight);\n if ((roomHeight - h - 1) % 5 == 0) {\n offset = -(roomHeight - h - 1).toString().length * 14\n ctx.fillText(roomHeight - h - 1, wOffset + offset, hOffset + 21);\n }\n }\n for (h = 1; h < roomHeight - 1; h++) { //Right\n origHOffset = startPosH\n wOffset = midX - (0.5 * tileWidth)\n hOffset = (h * tileHeight) + rHeight\n ctx.drawImage(grid, wOffset, hOffset, tileWidth, tileHeight);\n }\n }\n }\n}", "title": "" }, { "docid": "ead923f611428d4ef5bb9c863f8c8b55", "score": "0.63802147", "text": "function findPath (startingPosition, finishingPosition) {\r\n\t\tvar worldSize = GRIDSIZE * GRIDSIZE;\t\r\n\t\t\r\n\t\t// Manhattan Distance is the distance between two points measured along axes at right angles, so no diagonal movement allowed\r\n\t\tfunction manhattanDistance(Point,Goal) {\r\n\t\t\treturn Math.abs(Point.x - Goal.x) + Math.abs(Point.y - Goal.y);\t\t\r\n\t\t}\r\n\t\t\r\n\t\tvar distanceFunction = manhattanDistance;\r\n\t\t\r\n\t\t// this function returns an array of every available empty position North, South, East or West of where you are now\r\n\t\tfunction Neighbours(x,y) {\r\n\t\t\tvar N = y-1;\r\n\t\t\tvar S = y+1;\r\n\t\t\tvar E = x+1;\r\n\t\t\tvar W = x-1;\r\n\t\t\tmyN = N > -1 && !occupied(x,N);\r\n\t\t\tmyS = S < GRIDSIZE && !occupied(x,S);\r\n\t\t\tmyE = E < GRIDSIZE && !occupied(E,y);\r\n\t\t\tmyW = W > -1 && !occupied(W,y);\r\n\t\t\tresult = [];\r\n\t\t\tif(myN)\r\n\t\t\t\tresult.push({x:x, y:N});\r\n\t\t\tif(myE)\r\n\t\t\t\tresult.push({x:E, y:y});\r\n\t\t\tif(myS)\r\n\t\t\t\tresult.push({x:x, y:S});\r\n\t\t\tif(myW)\r\n\t\t\t\tresult.push({x:W, y:y});\r\n\t\t\t\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\t// this function returns a node object that contains possible next routes and their respective costs\r\n\t\tfunction Node(Parent, Point) {\r\n\t\t\tvar newNode = {\t\t\t\r\n\t\t\t\tParent:Parent,\t\t\t\t\t\t\t\t// pointer to another Node object\t\t\t\r\n\t\t\t\tvalue:Point.x + (Point.y * GRIDSIZE),\t\t// array index of this Node\t\t\t\r\n\t\t\t\tx:Point.x,\t\t\t\t\t\t\t\t\t// the x coordinates of this Node\r\n\t\t\t\ty:Point.y,\t\t\t\t\t\t\t\t\t// the y coordinates of this node\t\t\t\r\n\t\t\t\tf:0,\t\t\t\t\t\t\t\t\t\t// f is the cost to get to this Node from Yosemite's current position\t\t\t\r\n\t\t\t\tg:0\t\t\t\t\t\t\t\t\t\t\t// g is the cost to get from this Node to Bugs' curent position\r\n\t\t\t};\r\n\r\n\t\t\treturn newNode;\r\n\t\t}\r\n\t\t\r\n\t\t// this function finds the best path from Yosemite Sam's position to Bugs Bunny's position using the A* Algorithm\r\n\t\tfunction calculateBestPath() {\r\n\t\t\tvar\tpathStart = Node(null, {x:startingPosition[0], y:startingPosition[1]}); // a node from the start coordinates\r\n\t\t\tvar pathEnd = Node(null, {x:finishingPosition[0], y:finishingPosition[1]}); // a node from the end coordinates\r\n\t\t\t\t\t\r\n\t\t\tvar AStar = new Array(worldSize);\t\t\t// an array that will contain all positions in the world\r\n\t\t\tvar Open = [pathStart];\t\t\t// a list of currently open nodes\r\n\t\t\tvar Closed = [];\t\t\t// a list of closed nodes\r\n\t\t\tvar result = []; \t\t\t// the array that will be returned\r\n\t\t\tvar myNeighbours;\t\t\t// a reference to a node that is nearby\r\n\t\t\tvar currentNode;\t\t\t// a reference to a node that we are now considering taking\r\n\t\t\tvar currentPath;\t\t\t// a reference to a node that starts the current path we are considering\r\n\t\t\t\r\n\t\t\t// temporary variables used in the calculations\r\n\t\t\tvar length, max, min, a, b;\r\n\t\t\t\r\n\t\t\twhile(length = Open.length) {\t\t\t\t// iterate through the open list until there is nothing left\t\t \r\n\t\t\t\tmax = worldSize;\r\n\t\t\t\tmin = -1;\r\n\t\t\t\t\r\n\t\t\t\t// get the max and min\r\n\t\t\t\tfor(a = 0; a < length; a++) {\r\n\t\t\t\t\tif(Open[a].f < max) {\r\n\t\t\t\t\t\tmax = Open[a].f;\r\n\t\t\t\t\t\tmin = a;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcurrentNode = Open.splice(min, 1)[0];\t\t\t// remove the next node from the open array and put it in currentNode\r\n\t\t\t\t\r\n\t\t\t\t// is it the destination node?\r\n\t\t\t\tif( currentNode.value === pathEnd.value ) {\t\t\t// if we have reached our destination node (Bugs Bunny's position)\r\n\t\t\t\t\tcurrentPath = currentNode;\r\n\t\t\t\t\tdo {\r\n\t\t\t\t\t\tresult.push([currentPath.x, currentPath.y]);\r\n\t\t\t\t\t} while (currentPath = currentPath.Parent);\r\n\t\t\t\t\tAStar = Closed = Open = [];\t\t\t// clear the arrays\r\n\t\t\t\t\tresult.reverse();\t\t\t// reverse the result so as not to return a list from finish to start instead of start to finish\r\n\t\t\t\t}\r\n\t\t\t\telse {\t\t\t// otherwise, it was not our destination\t\t\t \r\n\t\t\t\t\tmyNeighbours = Neighbours(currentNode.x, currentNode.y);\t\t\t\t// find which nearby nodes are available to move to\r\n\t\t\t\t\tfor(a = 0, b = myNeighbours.length; a < b; a++) {\t\t\t\t// test each neighbouring node that hasn't been tested already\t\t\t\t\r\n\t\t\t\t\t\tcurrentPath = Node(currentNode, myNeighbours[a]);\t\t\t\t// add to the current path we are considering\r\n\t\t\t\t\t\tif (!AStar[currentPath.value]) {\r\n\t\t\t\t\t\t\tcurrentPath.g = currentNode.g + distanceFunction(myNeighbours[a], currentNode);\t\t\t// cost of this current route so far\r\n\t\t\t\t\t\t\tcurrentPath.f = currentPath.g + distanceFunction(myNeighbours[a], pathEnd);\t\t\t// cost of the current route all the way to the destination (Bugs' position)\r\n\t\t\t\t\t\t\tOpen.push(currentPath);\t\t\t// remember this new path by placing it in the open array\r\n\t\t\t\t\t\t\tAStar[currentPath.value] = true;\t\t\t// mark this node as having been visited already so as not to have to check it again\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} // keep iterating while open is not empty\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\treturn calculateBestPath();\r\n\t}", "title": "" }, { "docid": "e3e52706ed7c1cbc89359eb572356606", "score": "0.63682777", "text": "function gridsMouseMove(event) {\n if (mouseClicked && !solving) {\n var borderOffset = 5;\n var resizedOffSet = Math.floor((this.clientWidth / initWidth) * offSet);\n var resizedBlockSize = Math.floor((this.clientWidth - (resizedOffSet * 2)) / dimensions);\n var xDown = event.layerX - (borderOffset + resizedOffSet);\n var yDown = event.layerY - (borderOffset + resizedOffSet);\n var xDex = Math.floor(xDown / resizedBlockSize);\n var yDex = Math.floor(yDown / resizedBlockSize);\n for (var i = 0; i < curCanvases.length; ++i) {\n curVal = curCanvases[i];\n if (xDex >= 0 && xDex < dimensions && yDex >= 0 && yDex < dimensions) {\n if (fillOrRemove) {\n curVal.ctx.fillStyle = \"brown\";\n curVal.ctx.strokeStyle = \"blue\";\n curVal.backArray[xDex][yDex] = 1;\n curVal.ctx.fillRect((xDex * blockSize) + offSet, (yDex * blockSize) + offSet, blockSize, blockSize);\n curVal.ctx.strokeRect((xDex * blockSize) + offSet, (yDex * blockSize) + offSet, blockSize, blockSize);\n } else {\n curVal.ctx.fillStyle = \"white\";\n curVal.ctx.strokeStyle = \"blue\";\n curVal.backArray[xDex][yDex] = 0;\n curVal.ctx.fillRect((xDex * blockSize) + offSet, (yDex * blockSize) + offSet, blockSize, blockSize);\n curVal.ctx.strokeRect((xDex * blockSize) + offSet, (yDex * blockSize) + offSet, blockSize, blockSize);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "5709d5d6539a2aa43cbad4d4adafd839", "score": "0.63635695", "text": "function paintGrid () {\n\t\t\tctx.fillStyle = \"#DDDDDD\";\n\t\t\tctx.fillRect(0,0,w,h);\n\t\t\tctx.strokeStyle = \"gray\";\n\t\t\tctx.strokeRect(0,0,w,h);\n\n\t\t\tctx.fillStyle = \"green\";\n\t\t\tctx.fillRect(start.pos.x*cellWidth, start.pos.y*cellWidth, cellWidth, cellWidth);\n\n\t\t\tfor(var y = 0; y < g.cells[0].length; y++) {\n\t\t\t\t\n\t\t\t\tfor(var x = 0; x < g.cells.length; x++) {\n\t\t\t\t\tif(!g.cells[x][y].legal) {\n\n\t\t\t\t\t\tctx.fillStyle = \"black\";\n\t\t\t\t\t\tctx.fillRect(x*cellWidth, y*cellWidth, cellWidth, cellWidth);\n\t\t\t\t\t\tctx.strokeStyle = \"#DDDDDD\";\n\t\t\t\t\t\tctx.strokeRect(x*cellWidth, y*cellWidth, cellWidth, cellWidth);\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tctx.strokeStyle = \"white\";\n\t\t\t\t\t\tctx.strokeRect(x*cellWidth, y*cellWidth, cellWidth, cellWidth);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "4af897667101872de4dca1b6c7642d72", "score": "0.6362173", "text": "function drawDjikstraPath()\n {\n for(let i = 1; i < path.length; i++)\n {\n let gridIndex = rcToIndex(path[i].first, path[i].second , gridRowSize);\n $('.cell').eq(gridIndex).html('<div class=\"marker_path bg-dark\"></div>'); \n }\n\n }", "title": "" }, { "docid": "76777d81b3bd66c8d6c1e49ad3a35eff", "score": "0.6358495", "text": "function drawGrid() {\n stroke(ht2Color);\n strokeWeight(2);\n\n for (let i = Math.floor(borders.xMin); i < Math.floor(borders.xMax) + 1; i++) {\n for (let j = Math.floor(borders.yMin); j < Math.floor(borders.yMax) + 1; j++) {\n if (i % gridSkip == 0 && j % gridSkip == 0) {\n let p = toScreenCoord(i, j);\n point(p.x, p.y);\n }\n }\n }\n}", "title": "" }, { "docid": "d4906e0150eed5296a6fe1ce3c1e115d", "score": "0.635647", "text": "function draw(){\n background(255);\n for (var i = 0; i<grid.length; i++){\n grid[i].show();\n }\n\t// current is visited and always highlighted to show the path\n current.visited = true;\n current.highlight();\n\t// once its done it checks for the neighbours if they exist then visit them and push them into our stcak and remove walls between them and mark update current\n\t// other as dfs says pick the pushed element from stack and use that as current if there is available \n var next = current.checkNeighbours();\n if (next) {\n next.visited = true;\n stack.push(current);\n removeWalls(current,next);\n current = next;\n }\n\t\n else if(stack.length > 0){\n current = stack.pop();\n }\n\t// once there is no next available and stack is also empty our dfs search is completed.\n}", "title": "" }, { "docid": "370a96771c042651473e184464eab18f", "score": "0.6350729", "text": "function drawTravelGrid() {\n var mazeGridCanvas = document.getElementById('mazeGridCanvas');\n if (mazeGridCanvas.getContext) {\n var mazeContext = mazeGridCanvas.getContext('2d');\n for (var x = 0; x < scale * size; x += scale) {\n mazeContext.moveTo(x, 0);\n mazeContext.lineTo(x, scale * size);\n }\n for (var y = 0; y < scale * size; y += scale) {\n mazeContext.moveTo(0, y);\n mazeContext.lineTo(scale * size, y);\n }\n\n mazeContext.strokeStyle = '#161617';\n mazeContext.lineWidth = 40;\n mazeContext.stroke();\n }\n }", "title": "" }, { "docid": "71c71ae5e8811847fb1e664e33e9aee2", "score": "0.63308114", "text": "function MolnarGrid(gridSizeX, gridSizeY, gridX, gridY, gridWidth, gridHeight) {\n\tthis.gridSizeX = gridSizeX;\n\tthis.gridSizeY = gridSizeY;\n\tthis.lastToDraw = 1;\n\tthis.order = [];\n\n\n\tthis.draw = function() {\n \t\t// add 1 to lastToDraw every 10 frames\n\t\tvar frameRemainder = frameCount % frameInterval;\n\t\tif(frameRemainder == 0) {\n\t\t\tthis.lastToDraw = this.lastToDraw + 1;\n\t\t\t// we don't want lastToDraw to exceed the number\n\t\t\t// of elements in our array\n\t\t\tthis.lastToDraw = min(this.lastToDraw, this.gridSizeX*this.gridSizeY);\n\t\t}\n\n\t\t// this will draw all the current vertices\n\t\tbeginShape();\n\t\tfor(var i=0; i<this.lastToDraw; i++) {\n\n\t\t\tvar position = this.getPosition(this.order[i]);\n\n\t\t\t// draw the vertex\n\t\t\tvertex(position.x, position.y);\n\t\t}\n\t\t// stop drawing shape\n\t\tendShape();\n\n\t\tif(this.lastToDraw < this.gridSizeX*this.gridSizeY - 1) {\n\n\t\t\t// we can use lerp to interpolate between the last current vertex\n\t\t\t// and the next current vertex.\n\t\t\t// frameRemainder / 15 is our amount to interpolate\n\t\t\tvar t = frameRemainder / frameInterval;\n\t\t\tvar indexCurrent = this.order[this.lastToDraw - 1];\n\t\t\tvar indexNext = this.order[min(this.lastToDraw, this.gridSizeX*this.gridSizeY)];\n\n\t\t\t// print(\"interp between \" + indexCurrent + \" \" + indexNext);\n\n\t\t\t// let's interpolate between (x, y) at indexCurrent and (x, y)\n\t\t\t// at indexNext\n\t\t\tvar positionCurrent = this.getPosition(indexCurrent);\n\t\t\tvar positionNext = this.getPosition(indexNext);\n\n\t\t\tvar x_next = lerp(positionCurrent.x, positionNext.x, t);\n\t\t\tvar y_next = lerp(positionCurrent.y, positionNext.y, t);\n\n\t\t\tline(positionCurrent.x, positionCurrent.y, x_next,y_next);\n\t\t}\n\t}\n\n\tthis.getPosition = function(index) {\n\n\t\t\t// use modulo (remainder) to get x position\n\t\t\tvar col = index % this.gridSizeY;\n\t\t\tvar row = floor(index / this.gridSizeX);\n\n\t\t\t// map our rows/cols to x/y coordinates\n\t\t\tvar x = map(col, 0, this.gridSizeX-1, gridX, gridX + gridWidth);\n\t\t\tvar y = map(row, 0, this.gridSizeY-1, gridY, gridY + gridHeight);\n\n\t\t\treturn {\n\t\t\t\tx: x\n\t\t\t\t, y: y\n\t\t\t}\t\n\t}\n\n/**\n * Create a permeatation of the array of indexes\n * corresponding to our 16 points\n */\n\tthis.createOrder = function() {\n\t\t// clear order\n\t\tthis.order = [];\n\t\t// make new array of indexes to sample from\n\t\tvar all = [];\n\n\t\tfor(var k=0; k<this.gridSizeX*this.gridSizeY; k++) {\n\t\t\tall.push(k)\n\t\t}\n\n\t\tvar len = all.length;\n\n\t\t// take a random element from all and append it to order, remove it from all\n\t\tfor(var i=0; i<this.gridSizeX*this.gridSizeY; i++) {\n\t\t\t// pick a random index\n\t\t\tvar index = floor(random(all.length));\n\n\t\t\t// append that element from all into order\n\t\t\tthis.order.push(all[index]);\n\n\t\t\t// remove sampled element from all \n\t\t\tall.splice(index, 1);\n\n\t\t\tprintln(\"Order: \"+this.order);\n\t\t\tprintln(\"All: \"+all);\n\t\t}\t\t\n\t}\n\n}", "title": "" }, { "docid": "22036feed5a04eabfe0f0d581dd78cdb", "score": "0.6327176", "text": "function recalculate() {\n generateExit(walkMap);\n generateSpawns(walkMap);\n determineWaypoints();\n walkMap = getWalkMap();\n for (let num = 0; num < 8; num++) {\n var frontier = [];\n var target = vts(waypoints[num]);\n frontier.push(target);\n var cameFrom = {};\n var distance = {};\n cameFrom[target] = null;\n distance[target] = 0;\n // console.log(frontier);\n // Fill cameFrom and distance for every tile\n while (frontier.length !== 0) {\n var current = frontier.shift();\n var t = stv(current);\n // console.log(t);\n var adj = neighbors(walkMap, t.x, t.y, true);\n // console.log(adj);\n for (var i = 0; i < adj.length; i++) {\n var next = adj[i];\n if (!(next in cameFrom) || !(next in distance)) {\n frontier.push(next);\n cameFrom[next] = current;\n distance[next] = distance[current] + 1;\n }\n }\n }\n\n // // Generate usable maps\n dists = buildArray(cols, rows, null);\n var newPaths = buildArray(cols, rows, 0);\n //console.log(newPaths);\n var keys = Object.keys(cameFrom);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n var current = stv(key);\n\n // Distance map\n dists[current.x][current.y] = distance[key];\n\n // Generate path direction for every tile\n var val = cameFrom[key];\n if (val !== null) {\n // Subtract vectors to determine direction\n var next = stv(val);\n var dir = next.sub(current);\n // Fill tile with direction\n if (dir.x < 0) newPaths[current.x][current.y] = 1;\n if (dir.y < 0) newPaths[current.x][current.y] = 2;\n if (dir.x > 0) newPaths[current.x][current.y] = 3;\n if (dir.y > 0) newPaths[current.x][current.y] = 4;\n }\n }\n paths.push(newPaths);\n }\n}", "title": "" }, { "docid": "a5cbf78c12dffa09fe67434797028590", "score": "0.632483", "text": "function draw(){\n current = grid[0]; // on commence par la 1ere cell (0, 0)\n current.visited = true; // on la marque comme vistée \n stack.push(current); // on la mets dans la table stack \n\n // tantqu'il y a des elements dans la table stack, alors on peut visiter des cells.\n\n while (stack.length > 0) {\n let next = current.checkNeighbors(); // next est un voisin de current pris au hasard\n // si le voisin existe on le parcours \n if(next){\n next.visited = true;\n stack.push(current);\n removeWalls(current, next);\n current = next; \n }\n // sinon on change de cell en sortant une dans stack \n else{\n current = stack.pop();\n } \n }\n\n // on gere les \"borders\" des cells apres avoir decider du laby\n for (let index = 0; index < grid.length; index++) {\n grid[index].show(); \n }\n \n}", "title": "" }, { "docid": "8e30ecc9b5b6b75111fbb6b7c0408b3f", "score": "0.6303976", "text": "function reGraph() {\n TIME && console.time(\"reGraph\");\n const {cells: gridCells, points, features} = grid;\n const newCells = {p: [], g: [], h: []}; // store new data\n const spacing2 = grid.spacing ** 2;\n\n for (const i of gridCells.i) {\n const height = gridCells.h[i];\n const type = gridCells.t[i];\n if (height < 20 && type !== -1 && type !== -2) continue; // exclude all deep ocean points\n if (type === -2 && (i % 4 === 0 || features[gridCells.f[i]].type === \"lake\")) continue; // exclude non-coastal lake points\n const [x, y] = points[i];\n\n addNewPoint(i, x, y, height);\n\n // add additional points for cells along coast\n if (type === 1 || type === -1) {\n if (gridCells.b[i]) continue; // not for near-border cells\n gridCells.c[i].forEach(function (e) {\n if (i > e) return;\n if (gridCells.t[e] === type) {\n const dist2 = (y - points[e][1]) ** 2 + (x - points[e][0]) ** 2;\n if (dist2 < spacing2) return; // too close to each other\n const x1 = rn((x + points[e][0]) / 2, 1);\n const y1 = rn((y + points[e][1]) / 2, 1);\n addNewPoint(i, x1, y1, height);\n }\n });\n }\n }\n\n function addNewPoint(i, x, y, height) {\n newCells.p.push([x, y]);\n newCells.g.push(i);\n newCells.h.push(height);\n }\n\n function getCellArea(i) {\n const area = Math.abs(d3.polygonArea(getPackPolygon(i)));\n return Math.min(area, UINT16_MAX);\n }\n\n const {cells: packCells, vertices} = calculateVoronoi(newCells.p, grid.boundary);\n pack.vertices = vertices;\n pack.cells = packCells;\n pack.cells.p = newCells.p;\n pack.cells.g = createTypedArray({maxValue: grid.points.length, from: newCells.g});\n pack.cells.q = d3.quadtree(newCells.p.map(([x, y], i) => [x, y, i]));\n pack.cells.h = createTypedArray({maxValue: 100, from: newCells.h});\n pack.cells.area = createTypedArray({maxValue: UINT16_MAX, from: pack.cells.i}).map(getCellArea);\n\n TIME && console.timeEnd(\"reGraph\");\n}", "title": "" }, { "docid": "0de3d762570b10d9c891ead379987577", "score": "0.62912965", "text": "gridCheck() {\n let cellSize = gridW/cols;\n let eY = floor(this.y/cellSize);\n let eX = floor(this.x/cellSize);\n\n if (grid[eY][eX] === 0) {\n grid[eY][eX] = 4;\n }\n if (grid[eY-1][eX] === 0) {\n grid[eY-1][eX] = 4;\n }\n if (grid[eY-1][eX+1] === 0) {\n grid[eY-1][eX+1] = 4;\n }\n if (grid[eY+1][eX] === 0) {\n grid[eY+1][eX] = 4;\n }\n if (grid[eY+2][eX] === 0) {\n grid[eY+2][eX] = 4;\n }\n if (grid[eY+2][eX+1] === 0) {\n grid[eY+2][eX+1] = 4;\n }\n if (grid[eY][eX+1] === 0) {\n grid[eY][eX+1] = 4;\n }\n if (grid[eY+1][eX+1] === 0) {\n grid[eY+1][eX+1] = 4;\n }\n if (grid[eY][eX+2] === 0) {\n grid[eY][eX+2] = 4;\n }\n if (grid[eY+1][eX+2] === 0) {\n grid[eY+1][eX+2] = 4;\n }\n if (grid[eY][eX-1] === 0) {\n grid[eY][eX-1] = 4;\n }\n if (grid[eY+1][eX-1] === 0) {\n grid[eY+1][eX-1] = 4;\n }\n if (grid[eY][eX] === 1) {\n pHit = true;\n }\n if (grid[eY][eX+2] === 1) {\n pHit = true;\n }\n if (grid[eY+1][eX+2] === 1) {\n pHit = true;\n }\n if (grid[eY][eX-1] === 1) {\n pHit = true;\n }\n if (grid[eY+1][eX-1] === 1) {\n pHit = true;\n }\n if (grid[eY-1][eX] === 1) {\n pHit = true;\n }\n if (grid[eY-1][eX+1] === 1) {\n pHit = true;\n }\n if (grid[eY+2][eX] === 1) {\n pHit = true;\n }\n if (grid[eY+2][eX+1] === 1) {\n pHit = true;\n }\n\n }", "title": "" }, { "docid": "66e9b049523d87ecdecd3ccc42a44fad", "score": "0.6255579", "text": "function Cell(i, j){\n this.f = 0;\n this.g = 0;\n this.h = 0;\n\n this.i = i;\n this.j = j;\n this.neighbors = [];\n this.previous = undefined;\n this.wall = false;\n\n if (getRandomArbitrary(0, 10) <= 3){\n this.wall = true;\n }\n\n this.show = function(col){\n fill(col);\n if (this.wall == true){\n fill(0);\n }\n stroke(0);\n rect(this.i * 20, this.j * 20, 20, 20);\n }\n\n this.addNeighbors = function(grid){\n var i = this.i;\n var j = this.j;\n if (i < cols - 1) {\n this.neighbors.push(grid[i + 1][j]);\n }\n if (i > 0) {\n this.neighbors.push(grid[i - 1][j]);\n }\n if (j < rows - 1) {\n this.neighbors.push(grid[i][j + 1]);\n }\n if (j > 0) {\n this.neighbors.push(grid[i][j - 1]);\n }\n // if (i > 0 && j > 0) {\n // this.neighbors.push(grid[i - 1][j - 1]);\n // }\n // if (i < cols - 1 && j > 0) {\n // this.neighbors.push(grid[i + 1][j - 1]);\n // }\n // if (i > 0 && j < rows - 1) {\n // this.neighbors.push(grid[i - 1][j + 1]);\n // }\n // if (i < cols - 1 && j < rows - 1) {\n // this.neighbors.push(grid[i + 1][j + 1]);\n // }\n }\n\n}", "title": "" }, { "docid": "48ed6c5b3a92027dbc0957b9da23a618", "score": "0.62542355", "text": "function drawGridLanes() {\n\t// draw hit bar\n\tctx.lineWidth = 3;\n\tctx.strokeStyle = \"red\";\n\tctx.beginPath();\n\tctx.moveTo(0, 4 * cHeight / 5);\n\tctx.lineTo(cWidth, 4 * cHeight / 5);\n\tctx.stroke();\n\n\t// draw key indicators\n\tfor (var i = 0; i < 5; i++) {\n\t\tctx.textAlign = \"center\";\n\t\tctx.font = \"48px sans-serif\";\n\t\tctx.fillText(g_keys[i].toUpperCase(), (i * 2 + 1) * cWidth / 10, 9 * cHeight / 10); \n\t}\n\n\t// draw vertical lines\n\tctx.lineWidth = 1;\n\tctx.strokeStyle = \"black\";\n\tfor (var i = 1; i < 5; i++) {\n\t\tctx.beginPath();\n\t\tctx.moveTo(i * cWidth / 5, 0);\n\t\tctx.lineTo(i * cWidth / 5, cHeight);\n\t\tctx.stroke();\n\t}\n}", "title": "" }, { "docid": "8a472e8682557e9719bc0c2e890fff0d", "score": "0.6238897", "text": "function test() {\n const possiblePoints = [];\n for (let i = 0; i < ROWS.length; i++) {\n for (let j = 0; j < COLUMNS.length; j++) {\n possiblePoints.push(ROWS[i] + COLUMNS[j]);\n }\n }\n for (let i = 0; i < possiblePoints.length; i++) {\n for (let j = 0; j < possiblePoints.length; j++) {\n const path = findShortestPathOfKnight(\n possiblePoints[i],\n possiblePoints[j]\n ).join(\" \");\n console.log(`${possiblePoints[i]} -> ${possiblePoints[j]}: ${path}`);\n }\n }\n}", "title": "" }, { "docid": "0d1410e7a5f587ef2ce27d79aa0fdc6c", "score": "0.6238668", "text": "function drawBoard(){\n // Draw the lines on x axis\n for (var x = 0; x <= bw; x += gridX) {\n context.moveTo(0.5 + x + p, p);\n context.lineTo(0.5 + x + p, bh + p);\n }\n\n //draw line on y axis\n for (var x = 0; x <= bh ; x += gridY) {\n context.moveTo(p, 0.5 + x + p);\n context.lineTo(bw + p, 0.5 + x + p);\n }\n // colour of the lines\n context.strokeStyle = \"black\";\n context.stroke();\n}", "title": "" }, { "docid": "c54f08484d547ab9719fcb80e7cbbac6", "score": "0.6235013", "text": "function draw_grid(){\n\tfor(i = 0; i < WIDTH; i = i + dx){\n\t\tgrid.moveTo(i, 0);\n\t\tgrid.lineTo(i, HEIGHT);\n\t\tgrid.strokeStyle = \"#000000\";\n\t\tgrid.stroke();\n\t}\n\tfor(i = 0; i < HEIGHT; i = i + dy){\n\t\tgrid.moveTo(0, i);\n\t\tgrid.lineTo(WIDTH, i);\n\t\tgrid.strokeStyle = \"#000000\";\n\t\tgrid.stroke();\n\t}\n}", "title": "" }, { "docid": "be1b6863c9660a176a86d62a7b5f4a0d", "score": "0.6230371", "text": "function connecttile() {\n var randomnum;\n var point1x;\n var point1y;\n var point2x;\n var point2y;\n var point3x;\n var point3y;\n var position = [];\n var randonnum = [];\n\n randomnum = [0.1, 0.1, -0.2, -0.3, 0.17, -0.28, 0.4, 0.22, -0.35, 0.2, 0.48, -0.5, -0.68, 0.7, -0.8, 0.4, -0.45, 0.65, 0.456, -0.78, 0.63, 0.815, -0.99, 0.74, -0.879, 0.5465, 0.74, -0.38, 0.94, -0.81];\n position[0] = [ORIGIN_X, ORIGIN_Y];\n\n //Part 1 of the road\n for (i = 0; i < TILES_PER_PART * 1; i++) {\n point1x = WIDTH * Math.cos(Math.PI / SLOPE1 * randomnum[i]);\n point1y = -WIDTH * Math.sin(Math.PI / SLOPE1 * randomnum[i]);\n point2x = WIDTH * Math.cos(Math.PI / SLOPE1 * randomnum[i]) + HEIGHT * Math.sin(Math.PI / SLOPE1 * randomnum[i]);\n point2y = -(WIDTH * Math.sin(Math.PI / SLOPE1 * randomnum[i]) - HEIGHT * Math.cos(Math.PI / SLOPE1 * randomnum[i]));\n point3x = HEIGHT * Math.sin(Math.PI / SLOPE1 * randomnum[i]);\n point3y = HEIGHT * Math.cos(Math.PI / SLOPE1 * randomnum[i]);\n position[i + 1] = [point1x + position[i][0], point1y + position[i][1]];\n createtile(point1x, point1y, point2x, point2y, point3x, point3y, position[i][0], position[i][1]);\n };\n\n //Part 2 of the road\n for (i = TILES_PER_PART * 1; i < TILES_PER_PART * 2; i++) {\n point1x = WIDTH * Math.cos(Math.PI / SLOPE2 * randomnum[i-(TILES_PER_PART*1)]);\n point1y = -WIDTH * Math.sin(Math.PI / SLOPE2 * randomnum[i-(TILES_PER_PART*1)]);\n point2x = WIDTH * Math.cos(Math.PI / SLOPE2 * randomnum[i-(TILES_PER_PART*1)]) + HEIGHT * Math.sin(Math.PI / SLOPE2 * randomnum[i-(TILES_PER_PART*1)]);\n point2y = -(WIDTH * Math.sin(Math.PI / SLOPE2 * randomnum[i-(TILES_PER_PART*1)]) - HEIGHT * Math.cos(Math.PI / SLOPE2 * randomnum[i-(TILES_PER_PART*1)]));\n point3x = HEIGHT * Math.sin(Math.PI / SLOPE2 * randomnum[i-(TILES_PER_PART*1)]);\n point3y = HEIGHT * Math.cos(Math.PI / SLOPE2 * randomnum[i-(TILES_PER_PART*1)]);\n position[i + 1] = [point1x + position[i][0], point1y + position[i][1]];\n createtile(point1x, point1y, point2x, point2y, point3x, point3y, position[i][0], position[i][1]);\n };\n\n //Part 3 of the road\n for (i = (TILES_PER_PART*2); i < (TILES_PER_PART*3); i++) {\n point1x = WIDTH * Math.cos(Math.PI / SLOPE3 * randomnum[i-(TILES_PER_PART*2)]);\n point1y = -WIDTH * Math.sin(Math.PI / SLOPE3 * randomnum[i-(TILES_PER_PART*2)]);\n point2x = WIDTH * Math.cos(Math.PI / SLOPE3 * randomnum[i-(TILES_PER_PART*2)]) + HEIGHT * Math.sin(Math.PI / SLOPE3 * randomnum[i-(TILES_PER_PART*2)]);\n point2y = -(WIDTH * Math.sin(Math.PI / SLOPE3 * randomnum[i-(TILES_PER_PART*2)]) - HEIGHT * Math.cos(Math.PI / SLOPE3 * randomnum[i-(TILES_PER_PART*2)]));\n point3x = HEIGHT * Math.sin(Math.PI / SLOPE3 * randomnum[i-(TILES_PER_PART*2)]);\n point3y = HEIGHT * Math.cos(Math.PI / SLOPE3 * randomnum[i-(TILES_PER_PART*2)]);\n position[i + 1] = [point1x + position[i][0], point1y + position[i][1]];\n createtile(point1x, point1y, point2x, point2y, point3x, point3y, position[i][0], position[i][1]);\n };\n\n //Part 4 of the road\n for (i = (TILES_PER_PART*3); i < (TILES_PER_PART*4); i++) {\n point1x = WIDTH * Math.cos(Math.PI / SLOPE4 * randomnum[i - (TILES_PER_PART*3)]);\n point1y = -WIDTH * Math.sin(Math.PI / SLOPE4 * randomnum[i - (TILES_PER_PART*3)]);\n point2x = WIDTH * Math.cos(Math.PI / SLOPE4 * randomnum[i - (TILES_PER_PART*3)]) + HEIGHT * Math.sin(Math.PI / SLOPE4 * randomnum[i - (TILES_PER_PART*3)]);\n point2y = -(WIDTH * Math.sin(Math.PI / SLOPE4 * randomnum[i - (TILES_PER_PART*3)]) - HEIGHT * Math.cos(Math.PI / SLOPE4 * randomnum[i - (TILES_PER_PART*3)]));\n point3x = HEIGHT * Math.sin(Math.PI / SLOPE4 * randomnum[i - (TILES_PER_PART*3)]);\n point3y = HEIGHT * Math.cos(Math.PI / SLOPE4 * randomnum[i - (TILES_PER_PART*3)]);\n position[i + 1] = [point1x + position[i][0], point1y + position[i][1]];\n createtile(point1x, point1y, point2x, point2y, point3x, point3y, position[i][0], position[i][1]);\n };\n\n //Part 5 of the road\n for (i = (TILES_PER_PART*4); i < (TILES_PER_PART*5); i++) {\n point1x = WIDTH * Math.cos(Math.PI / SLOPE5 * randomnum[i - (TILES_PER_PART*4)]);\n point1y = -WIDTH * Math.sin(Math.PI / SLOPE5 * randomnum[i - (TILES_PER_PART*4)]);\n point2x = WIDTH * Math.cos(Math.PI / SLOPE5 * randomnum[i - (TILES_PER_PART*4)]) + HEIGHT * Math.sin(Math.PI / SLOPE5 * randomnum[i - (TILES_PER_PART*4)]);\n point2y = -(WIDTH * Math.sin(Math.PI / SLOPE5 * randomnum[i - (TILES_PER_PART*4)]) - HEIGHT * Math.cos(Math.PI / SLOPE5 * randomnum[i - (TILES_PER_PART*4)]));\n point3x = HEIGHT * Math.sin(Math.PI / SLOPE5 * randomnum[i - (TILES_PER_PART*4)]);\n point3y = HEIGHT * Math.cos(Math.PI / SLOPE5 * randomnum[i - (TILES_PER_PART*4)]);\n position[i + 1] = [point1x + position[i][0], point1y + position[i][1]];\n createtile(point1x, point1y, point2x, point2y, point3x, point3y, position[i][0], position[i][1]);\n };\n\n\n}// JavaScript source code", "title": "" }, { "docid": "229cee11f4954a6f4152ca09feac7289", "score": "0.62275213", "text": "function drawGrid()\r\n {\r\n context.save();\r\n context.lineWidth = .1;\r\n context.strokeStyle = 'rgb(0, 0, 0)';\r\n context.beginPath();\r\n\r\n for (let y = 0; y <= pixelsY; y++)\r\n {\r\n context.moveTo(1, y * deltaY);\r\n context.lineTo(canvas.width, y * deltaY);\r\n }\r\n\r\n for (let x = 0; x <= pixelsX; x++)\r\n {\r\n context.moveTo(x * deltaX, 1);\r\n context.lineTo(x * deltaX, canvas.width);\r\n }\r\n\r\n context.stroke();\r\n context.restore();\r\n }", "title": "" }, { "docid": "8a85bf083ced83e0117c0e9f9d614595", "score": "0.6217099", "text": "function nextGeneration() {\r\n let newGrid = createGrid();\r\n\r\n for (let i = 0; i < rows; i++) {\r\n for (let j = 0; j < cols; j++) {\r\n //counts the alive neighbors\r\n let directions = [\r\n [1, 0],\r\n [1, -1],\r\n [0, -1],\r\n [-1, -1],\r\n [-1, 0],\r\n [-1, 1],\r\n [0, 1],\r\n [1, 1],\r\n ];\r\n let aliveNeighbours = 0;\r\n\r\n //checks with each neighbor iterate through each element in direction\r\n for (d of directions) {\r\n let neighbourRow = i + d[0];\r\n let neighbourCol = j + d[1];\r\n\r\n //Checks Weather the negihbour Row and column are in grid or not\r\n if (\r\n neighbourRow >= 0 &&\r\n neighbourCol >= 0 &&\r\n neighbourRow < rows &&\r\n neighbourCol < cols\r\n ) {\r\n //Checks that if cell is having neighbour or not\r\n if (grid[neighbourRow][neighbourCol] == true) {\r\n aliveNeighbours++;\r\n }\r\n }\r\n }\r\n //decide weather cell is alive or not\r\n if (grid[i][j] == true) {\r\n newGrid[i][j] = aliveNeighbours == 2 || aliveNeighbours == 3;\r\n } else {\r\n newGrid[i][j] = aliveNeighbours == 3;\r\n }\r\n }\r\n }\r\n\r\n //Change previous grid to the new grid\r\n grid = newGrid;\r\n}", "title": "" }, { "docid": "41f89db6dd74ca3abb690f27f9b2a927", "score": "0.6198989", "text": "async shortestPath() {\n //get the grid and corner where the start node is\n let grid = await this.createGrid();\n let corner = this.getStartCorner();\n console.log(corner);\n //turn grid into 1d array using a switch statement because the start node can be in different corners\n let flatGrid = [];\n let startPosition = [];\n let endPosition = [];\n switch (corner) {\n //start node is in the bottom right of the grid\n case 0:\n // for (let i = grid.length - 1; i >= 0; i--) {\n // flatGrid = flatGrid.concat(grid[i].reverse());\n // }\n startPosition.push(grid.length-1);\n startPosition.push(grid[0].length-1);\n endPosition.push(0);\n endPosition.push(0);\n break;\n //bottom left\n case 1:\n // for (let i = grid.length - 1; i >= 0; i--) {\n // flatGrid = flatGrid.concat(grid[i]);\n // }\n startPosition.push(grid.length-1);\n startPosition.push(0);\n endPosition.push(0);\n endPosition.push(grid[0].length-1);\n break;\n //top right\n case 2:\n // for (let i = 0; i < grid.length; i++) {\n // flatGrid = flatGrid.concat(grid[i].reverse());\n // }\n startPosition.push(0);\n startPosition.push(grid[0].length-1);\n endPosition.push(grid.length-1);\n endPosition.push(0);\n break;\n //top left\n default:\n // for (let i = 0; i < grid.length; i++) {\n // flatGrid = flatGrid.concat(grid[i]);\n // }\n startPosition.push(0);\n startPosition.push(0);\n endPosition.push(grid.length-1);\n endPosition.push(grid[0].length-1);\n }\n console.log(flatGrid);\n //run Dijkstra algorithm to get shortest path\n let path = new Dijkstra(grid, startPosition, endPosition, grid.length, grid[0].length, this.toggle, this.x);\n let graph = path.createAdjacencyMatrix();\n console.log(\"the path from pathing service is: \", path.determinePath(graph).reverse());\n return path.determinePath(graph).reverse();\n }", "title": "" }, { "docid": "c108ace68c0e8888b159809a9248095f", "score": "0.61940527", "text": "function drawGrid() {\n\n // We increment by 12 until we reach 336, to get 28 rows and columns\n for (var i=0; i<336; i+=12) { \n ctx.moveTo(i, 0);\n ctx.lineTo(i, 336);\n }\n\n for (var i=0; i<336; i+=12) { \n ctx.moveTo(0, i);\n ctx.lineTo(336, i);\n }\n\n ctx.strokeStyle = \"#ffe4ce\";\n ctx.lineWidth = 1;\n\n if (!gridOn) {\n ctx.strokeStyle = \"#ffd6b4\";\n ctx.lineWidth = 0;\n }\n\n ctx.closePath();\n ctx.stroke();\n\n gridOn = !gridOn;\n \n}", "title": "" }, { "docid": "b7a587074d38977633fa12900e9ac343", "score": "0.6183943", "text": "function setup() {\n createCanvas(400, 400);\n console.log('A*');\n\n // Drawing area\n w = width / cols;\n h = height / rows;\n\n // Create a two dimentional Array\n for (var i = 0; i < cols; i++) {\n grid[i] = new Array(rows);\n }\n\n // Init the spots\n for (var i = 0; i < cols; i++) {\n for (var j = 0; j < rows; j++) {\n grid[i][j] = new Spot(i, j);\n }\n }\n\n // Find and add the neighbors\n for (var i = 0; i < cols; i++) {\n for (var j = 0; j < rows; j++) {\n grid[i][j].addNeighbors(grid);\n }\n }\n\n // Pick the start and end positions\n start = grid[0][0];\n end = grid[cols - 1][rows - 1];\n start.wall = false;\n start.isStart = true;\n end.wall = false;\n end.isEnd = true;\n\n // Initiate the starting point\n openSet.push(start);\n}", "title": "" }, { "docid": "aba45a8f4efb1fbdf2c381f3a230b332", "score": "0.6177277", "text": "function Cell(i, j) {\n\tthis.i = i;\n\tthis.j = j;\n\tthis.filled = false;\n\n\t//trace() draws the path through the grid\n\tthis.trace = function () {\n\t\tvar x = this.i;\n\t\tvar y = this.j;\n\n\t\t//if there are still colours to be drawn and this cell is unfilled, trace a step\n\t\tif (colours.length > 0 && !this.filled) {\n\t\t\tlet colour = colours.pop();\n\t\t\tset(x, y, colour);\n\t\t\tthis.filled = true;\n\t\t}\n\t};\n\n\t//Check neighbours for next movement options\n\t//valid neighbours are pixels that have not been filled\n\tthis.checkNeighbours = function () {\n\t\tlet neighbours = [];\n\n\t\tlet top = grid[index(i, j - 1)];\n\t\tlet right = grid[index(i + 1, j)];\n\t\tlet bottom = grid[index(i, j + 1)];\n\t\tlet left = grid[index(i - 1, j)];\n\t\tvar topRight = grid[index(i + 1, j - 1)];\n\t\tvar topLeft = grid[index(i - 1, j - 1)];\n\t\tvar bottomRight = grid[index(i + 1, j + 1)];\n\t\tvar bottomLeft = grid[index(i - 1, j + 1)];\n\n\t\tif (top && !top.filled) {\n\t\t\tneighbours.push(top);\n\t\t}\n\t\tif (right && !right.filled) {\n\t\t\tneighbours.push(right);\n\t\t}\n\t\tif (bottom && !bottom.filled) {\n\t\t\tneighbours.push(bottom);\n\t\t}\n\t\tif (left && !left.filled) {\n\t\t\tneighbours.push(left);\n\t\t}\n\t\tif (topRight && !topRight.filled) {\n\t\t\tneighbours.push(topRight);\n\t\t}\n\t\tif (topLeft && !topLeft.filled) {\n\t\t\tneighbours.push(topLeft);\n\t\t}\n\t\tif (bottomRight && !bottomRight.filled) {\n\t\t\tneighbours.push(bottomRight);\n\t\t}\n\t\tif (bottomLeft && !bottomLeft.filled) {\n\t\t\tneighbours.push(bottomLeft);\n\t\t}\n\n\t\t//if the array of neighbours is not empty, randomly select one\n\t\tif (neighbours.length > 0) {\n\t\t\tlet r = floor(random(0, neighbours.length));\n\t\t\treturn neighbours[r];\n\t\t} else {\n\t\t\treturn undefined;\n\t\t}\n\t};\n\n\t//calculates relative x,y position in a 1d array\n\tfunction index(i, j) {\n\t\tif (i < 0 || j < 0 || i > width - 1 || j > height - 1) {\n\t\t\treturn -1;\n\t\t}\n\t\treturn i + j * width;\n\t}\n}", "title": "" }, { "docid": "d3d55842d401c6233b899ed33332c1c5", "score": "0.6159854", "text": "function drawGrid() {\n\tvar canvas = document.getElementById(\"myCanvas\");\n\tvar context = canvas.getContext(\"2d\");\n\tvar p = tiles[0].width / 4;\t\t\t// padding\n\tvar bw = ROWS * (tiles[0].width) + p;\t// width\n\tvar bh = ROWS * (tiles[0].width) + 3*p;\t// height\n\tif (DIMS == 1)\n\t\tbh = bh / 2;\n\tvar tx, ty, twidth;\n\n\tcontext.canvas.width = bw + (p/2 * ROWS + p);\t// set canvas size\n\tcontext.canvas.height = bh + (p/2 * ROWS + p);\n\tcontext.globalAlpha = 1.0\n\tcontext.fillStyle = \"black\";\n\tcontext.fillRect(0, 0, canvas.width, canvas.height);\n\tvar color;\n\t// draw tiles\n\tfor (var i = 0; i < tiles.length; i++) {\n\t\ttx = tiles[i].x;\n\t\tty = tiles[i].y;\n\t\ttwidth = tiles[i].width;\n\t\tcontext.moveTo(tx, ty);\n\t\tcontext.lineTo(tx, ty + twidth);\n\t\tcontext.moveTo(tx, ty);\n\t\tcontext.lineTo(tx + twidth, ty);\n\t}\n\t// complete borders\n\ttx = tiles[0].x;\n\tty = tiles[0].y;\n\ttwidth = tiles[0].width;\n\tcontext.moveTo(tx + (twidth * ROWS), ty);\n\tif (DIMS == 1)\n\t\tvar dline = ty + twidth;\n\telse\n\t\tvar dline = ty + (twidth * ROWS);\n\tcontext.lineTo(tx + (twidth * ROWS), dline);\n\tcontext.lineTo(tx, dline);\n\tcolor = '#' + Math.floor(Math.random()*16777215).toString(16);\n\tcontext.strokeStyle = color;\n\tcontext.lineWidth = 2;\n\tcontext.stroke();\n\n\t// draw circle / touch count\n\tfor (var i = 0; i < tiles.length; i++) {\n\t\ttwidth = tiles[i].width;\n\t\ttx = tiles[i].x;\n\t\tty = tiles[i].y;\n\t\tif (tiles[i].redMarked) {\t// draw marker\n\t\t\tcontext.moveTo(tx, ty);\n\t\t\tcontext.beginPath();\n\t\t\tcontext.globalAlpha = 0.8\n\t\t\tcontext.arc(tx + twidth/2, ty + twidth/2, twidth/2 - p, 0, 2*Math.PI);\n\t\t\tcontext.fillStyle = red;\n\t\t\tcontext.fill();\n\t\t} else if (tiles[i].blueMarked) {\t// draw marker\n\t\t\tcontext.moveTo(tx, tiles[i].y);\n\t\t\tcontext.beginPath();\n\t\t\tcontext.globalAlpha = 0.8\n\t\t\tcontext.arc(tx + twidth/2, ty + twidth/2, twidth/2 - p, 0, 2*Math.PI);\n\t\t\tcontext.fillStyle = blue;\n\t\t\tcontext.fill();\n\t\t} else {\t// fill with touches\n\t\t\tcontext.moveTo(tx, ty);\n\t\t\tcontext.beginPath();\n\t\t\tcontext.globalAlpha = 0.7;\n\t\t\tcontext.font=\"bold 20px Tahoma\";\n\t\t\t//color = '#' + Math.floor(Math.random()*16777215).toString(16);\t// for craziness\n\t\t\tcolor = \"white\";\n\t\t\t//var color = tiles[i].color;\n\t\t\tcontext.fillStyle = tiles[i].touches > 0 ? tiles[i].color : color;\n\t\t\tvar loc = tiles[i].getLoc().getIndices();\n\t\t\tvar dims = loc.length;\n\t\t\t\n\t\t\tif (dims <= 2) {\n\t\t\t\tcontext.fillText(tiles[i].touches.toString(), tx + 10,\n\t\t\t\t \tty + twidth - 10);\n\t\t\t} else {\n\t\t\t\tcontext.fillText(tiles[i].touches.toString(), tx + 5 + ((loc[dims-1]*2)*(dims**2 % twidth)),\n\t\t\t\t \tty + twidth - 10 - ((loc[dims-1]*2)*(dims**2 % twidth)));\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "0e74c99f2abe4ec69475b50bbcbb2417", "score": "0.6159157", "text": "function draw_grid() {\n // Vertical grid lines\n for (c = 1; c <= 28; c++) {\n gridline(c * cellw, 0, c * cellw, canvasw);\n }\n // Horizontal grid lines\n for (r = 1; r <= 28; r++) {\n gridline(0, r * cellw, canvasw, r * cellw);\n }\n}", "title": "" }, { "docid": "4d18002a1db46c93407dfca023feef43", "score": "0.61411065", "text": "run() {\n //make Q into list of all nodes\n const Q = [];\n for (let x = 0; x < this.grid.length; x++) {\n for (let y = 0; y < this.grid[0].length; y++) {\n Q.push(this.grid[x][y]);\n }\n }\n\n //set distance of start node to smallest value, 0\n this.distance[this.startNode[\"col\"]][this.startNode[\"row\"]] = 0;\n //main alg\n while (Q.length != 0) {\n let min_node = this.getMinDistanceNode(Q);\n\n if (min_node == this.endNode) break;\n //remove min node from openlist\n Q.splice(Q.indexOf(min_node), 1);\n\n //for output\n this.order.push(min_node);\n this.openListOrder.push(Q);\n\n let neighbors = this.getNeighbors(min_node);\n\n //each neighbor gets new distance calculated based off current node, and updated if its new\n //path has a smaller (more optimized) distance from start\n neighbors.forEach(element => {\n let new_distance = this.getNodeDistance(min_node) + element['weight']; // right now all the weights are 1\n if (new_distance < this.getNodeDistance(element)) {\n this.distance[element[\"col\"]][element[\"row\"]] = new_distance;\n this.previous[element[\"col\"]][element[\"row\"]] = min_node;\n }\n });\n }\n\n this.backtrace();\n\n return this.distance;\n }", "title": "" }, { "docid": "74cea61d37d93c217e64c13c0f2b1f5c", "score": "0.61351043", "text": "function Cell(i,j){\n this.i = i;\n this.j = j;\n this.walls = [true,true,true,true];\n this.visited = false;\n\t// it checks for available neighbours and calls for all of them and then later push them into my neighbours array if they exist and retern random from the length so every time \n\t// a new direction follows to create new maze\n this.checkNeighbours = function(){\n var neighbours = [];\n var top = grid[index(i, j-1)];\n var right = grid[index(i+1, j)];\n var bottom = grid[index(i, j+1)];\n var left = grid[index(i-1, j)];\n if (top && !top.visited){\n neighbours.push(top);\n }\n if (right && !right.visited){\n neighbours.push(right);\n }\n if (bottom && !bottom.visited){\n neighbours.push(bottom);\n }\n if (left && !left.visited){\n neighbours.push(left);\n }\n\t\t\n if (neighbours.length > 0){\n var r = floor(random(0, neighbours.length));\n return neighbours[r];\n }\n else{\n return undefined;\n }\n }\n\t// this basically highlights the current (x y) cell to use where the tracker is currently and is in the form of rectangle only which fits the grid size \n this.highlight = function(){\n x = this.i*w;\n y = this.j*w;\n noStroke();\n fill(255,0,100,200);\n rect(x,y,w,w);\n }\n\t// interpret the rectangle as a 4 wall and then draw lines on the such that rectangle shape apears but instead its TOP,RIGHT BOTTOM,LEFT.\n this.show = function(){\n x = this.i*w;\n y = this.j*w;\n stroke(0);\n if (this.walls[0]){\n line(x ,y ,x+w ,y);\n } \n if (this.walls[1]){\n line(x+w ,y ,x+w ,y+w);\n }\n if (this.walls[2]){\n line(x+w ,y+w ,x ,y+w);\n }\n if (this.walls[3]){\n line(x ,y+w ,x ,y)\n } \n if (this.visited) {\n noStroke();\n fill(100,0,255,100);\n rect(x,y,w,w);\n }\n }\n}", "title": "" }, { "docid": "2205c3ef7feeda8775bebcebf598fa84", "score": "0.6127627", "text": "getFigureMoves(x, y) {\n var cell = this.getCell(x, y);\n var side = Board.getDecSide(cell);\n var figure = Board.getFigure(Board.getRank(cell));\n\n var countSteps = figure.move;\n\n var allowedCells = [];\n var newX, newY, newCell, newCellSide, i;\n //move -x\n newX = x;\n for (i = 1; i <= countSteps; i++) {\n newX--;\n if (newX >= 0) {\n newCell = this.getCell(newX, y);\n newCellSide = Board.getDecSide(newCell);\n if (newCell!=-1 && (newCellSide == 0 || newCellSide != side)) {\n allowedCells.push([newX, y]);\n }\n if (newCellSide != 0) {\n i = countSteps;\n }\n } else {\n break;\n }\n }\n //move +x\n newX = x;\n for (i = 1; i <= countSteps; i++) {\n newX++;\n if (newX < this._map.length) {\n newCell = this.getCell(newX, y);\n newCellSide = Board.getDecSide(newCell);\n if (newCell!=-1 && (newCellSide == 0 || newCellSide != side)) {\n allowedCells.push([newX, y]);\n }\n if (newCellSide != 0) {\n i = countSteps;\n }\n } else {\n break;\n }\n }\n //move -y\n newY = y;\n for (i = 1; i <= countSteps; i++) {\n newY--;\n if (newY >= 0) {\n newCell = this.getCell(x, newY);\n newCellSide = Board.getDecSide(newCell);\n if (newCell!=-1 && (newCellSide == 0 || newCellSide != side)) {\n allowedCells.push([x, newY]);\n }\n if (newCellSide != 0) {\n i = countSteps;\n }\n } else {\n break;\n }\n }\n //move +y\n newY = y;\n for (i = 1; i <= countSteps; i++) {\n newY++;\n if (newY < this._map.length) {\n newCell = this.getCell(x, newY);\n newCellSide = Board.getDecSide(newCell);\n if (newCell!=-1 && (newCellSide == 0 || newCellSide != side)) {\n allowedCells.push([x, newY]);\n }\n if (newCellSide != 0) {\n i = countSteps;\n }\n } else {\n break;\n }\n }\n\n return allowedCells;\n }", "title": "" }, { "docid": "1f873e9d9ed9817618744cec69acab80", "score": "0.61228305", "text": "function HexaCell(i,j,edge,canvasSize,gridIndex) {\n\t\n\tthis.x = i;\n\tthis.y = j;\n\tthis.edgeSize = edge;\n\tthis.visited = false;\n\tthis.canvasSize = canvasSize;\n\tthis.currentGridIndex = gridIndex;\n\t//Top,Bottom,Top Left,Bottom Left,Top Right,Bottom Right\n\tthis.showWalls = [1,1,1,1,1,1];\n\t\n\t//number of cells horizontally. I think this is the correct formula?\n\tthis.cellsHorizontal = this.canvasSize/(this.edgeSize*3/2)*2 -1;\n\t\n\t\n\tthis.show = function(){\n\t\t\n\t\t//stroke(255,255,255);\n\t\tstroke(0);\n\t\t//console.log(this.showWalls);\n\t\tif (this.showWalls[0] === 1) //Top wall\n\t\tline(this.x+this.edgeSize/4,this.y-this.edgeSize/2,this.x+this.edgeSize*3/4,this.y-this.edgeSize/2);\n\t\tif (this.showWalls[1] === 1) //Bottom wall\n\t\tline(this.x+this.edgeSize/4,this.y+this.edgeSize/2,this.x+this.edgeSize*3/4,this.y+this.edgeSize/2);\n\t\tif (this.showWalls[2] === 1) //Top Left\n\t\tline(this.x,this.y,this.x+this.edgeSize/4,this.y-this.edgeSize/2);\n\t\tif (this.showWalls[3] === 1) //Bottom Left wall\n\t\tline(this.x,this.y,this.x+this.edgeSize/4,this.y+this.edgeSize/2);\n\t\tif (this.showWalls[4] === 1) //Top Right\n\t\tline(this.x+this.edgeSize*3/4,this.y-this.edgeSize/2,this.x+this.edgeSize,this.y);\n\t\tif (this.showWalls[5] === 1) //Bottom Right\n\t\tline(this.x+this.edgeSize,this.y,this.x+this.edgeSize*3/4,this.y+this.edgeSize/2);\n\t\t\n\t\t\n\t\tif (this.visited === true){\n\t\t\tfill(255,255,0,100);\n\t\t\tnoStroke();\n\t\t\ttriangle(this.x,this.y,this.x+this.edgeSize/4,this.y-this.edgeSize/2,this.x+this.edgeSize/4,this.y+this.edgeSize/2);\n\t\t\trect(this.x+this.edgeSize/4,this.y-this.edgeSize/2,this.edgeSize/2,this.edgeSize);\n\t\t\ttriangle(this.x+this.edgeSize*3/4,this.y-this.edgeSize/2,this.x+this.edgeSize,this.y,this.x+this.edgeSize*3/4,this.y+this.edgeSize/2);\n\t\t\n\t\t}\n\t\t\n\t\t\n\t}\n\t\n\tthis.setVisited = function(){\n\t\t\n\t\tfill(255,255,0,100);\n\t\tnoStroke();\n\t\ttriangle(this.x,this.y,this.x+this.edgeSize/4,this.y-this.edgeSize/2,this.x+this.edgeSize/4,this.y+this.edgeSize/2);\n\t\trect(this.x+this.edgeSize/4,this.y-this.edgeSize/2,this.edgeSize/2,this.edgeSize);\n\t\ttriangle(this.x+this.edgeSize*3/4,this.y-this.edgeSize/2,this.x+this.edgeSize,this.y,this.x+this.edgeSize*3/4,this.y+this.edgeSize/2);\n\t\tthis.visited = true;\n\t}\n\t\n\t\n\tthis.highlight = function(){\n\t\t\n\t\tfill(0,125,125,1250);\n\t\tnoStroke();\n\t\ttriangle(this.x,this.y,this.x+this.edgeSize/4,this.y-this.edgeSize/2,this.x+this.edgeSize/4,this.y+this.edgeSize/2);\n\t\trect(this.x+this.edgeSize/4,this.y-this.edgeSize/2,this.edgeSize/2,this.edgeSize);\n\t\ttriangle(this.x+this.edgeSize*3/4,this.y-this.edgeSize/2,this.x+this.edgeSize,this.y,this.x+this.edgeSize*3/4,this.y+this.edgeSize/2);\n\t\n\t}\n\t\n\t\n\tthis.getUnvisitedNeighbours = function(grid){\n\t\t\n\t\t\n\t\t/* Neigbour cells\n\t\t\t1. currentGridIndex - 1\n\t\t\t2. currentGridIndex + 1\n\t\t\t3. currentGridIndex - numCells -1\n\t\t\t4. currentGridIndex - numCells\n\t\t\t5. currentGridIndex + numCells -1\n\t\t\t6. currentGridIndex + numCells\n\t\t*/\n\t\tvar numCells = this.canvasSize/this.edgeSize -1;\n\t\t\n\t\t// I should probably generate this more elegantly but I am noob \n\t\tvar neighbours = []\n\t\tif (this.y - this.edgeSize > 0 ) if (grid[this.currentGridIndex - 1].visited === false) neighbours.push(grid[this.currentGridIndex - 1]);\n\t\tif (this.y + this.edgeSize*3/2 < this.canvasSize) if (grid[this.currentGridIndex + 1].visited === false) neighbours.push(grid[this.currentGridIndex + 1]);\n\t\t\n\t\t\n\t\tif (this.x>0){\n\t\t\t\n\t\t\tleftPossibleNeighbours = [this.currentGridIndex - numCells -1, this.currentGridIndex - numCells, this.currentGridIndex -numCells + 1];\n\t\t\tfor ( let ind of leftPossibleNeighbours){\n\t\t\t\tif (ind>=0 && ind<=(this.cellsHorizontal*numCells - 1))\n\t\t\t\tif (this.x - grid[ind].x === this.edgeSize*3/4 && abs(this.y - grid[ind].y) === this.edgeSize/2 && grid[ind].visited === false)\n\t\t\t\t\tneighbours.push(grid[ind]);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif (this.currentGridIndex<this.cellsHorizontal*numCells - numCells - 1){\n\t\t\t\t\t\t\n\t\t\trightPossibleNeighbours = [this.currentGridIndex + numCells -1, this.currentGridIndex + numCells, this.currentGridIndex +numCells + 1];\n\t\t\tfor ( let ind of rightPossibleNeighbours){\n\t\t\t\tif (ind>=0 && ind<=(this.cellsHorizontal*numCells - 1))\n\t\t\t\tif (this.x - grid[ind].x === -this.edgeSize*3/4 && abs(this.y - grid[ind].y) === this.edgeSize/2 && grid[ind].visited === false)\n\t\t\t\t\tneighbours.push(grid[ind]);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn neighbours;\n\t}\n\t\n\t\n}", "title": "" }, { "docid": "d4724b63276d8252dd14badd49b702f9", "score": "0.6121617", "text": "drawGrid() {\n\t\t\tconst w = this.width(), h = this.height();\n\t\t\tconst wd = Math.floor(w / 10), hd = Math.floor(h / 10);\n\n\t\t\tthis.save();\n\t\t\tthis.lineWidth = 1;\n\t\t\tthis.strokeStyle = 'White';\n\t\t\tthis.globalCompositeOperation = 'xor';\n\n\t\t\tfor (let x = -wd; x < wd; x += 1) {\n\t\t\t\tthis.globalAlpha = (x % 10 === 0) ? 0.75 : 0.5;\n\t\t\t\tthis.beginPath();\n\t\t\t\tthis.moveTo(x * 10, -h);\n\t\t\t\tthis.lineTo(x * 10, h);\n\t\t\t\tthis.stroke();\n\t\t\t}\n\t\t\tfor (let y = -hd; y < hd; y += 1) {\n\t\t\t\tthis.globalAlpha = (y % 10 === 0) ? 0.75 : 0.5;\n\t\t\t\tthis.beginPath();\n\t\t\t\tthis.moveTo(-w, y * 10);\n\t\t\t\tthis.lineTo(w, y * 10);\n\t\t\t\tthis.stroke();\n\t\t\t}\n\t\t\tthis.restore();\n\t\t}", "title": "" }, { "docid": "b3c35ae9311b7e41fb1187d77140717b", "score": "0.6117357", "text": "function boundGrid() {\r\n\t// Adjust edges of crosshairs\r\n\tleftLine.lastSegment.point = new Point( 0, leftLine.lastSegment.point.y );\r\n\ttopLine.lastSegment.point = new Point( topLine.lastSegment.point.x, 0 );\r\n\trightLine.lastSegment.point = new Point( view.size.width, rightLine.lastSegment.point.y );\r\n\tbottomLine.lastSegment.point = new Point( bottomLine.lastSegment.point.x, view.size.height );\r\n\r\n\t// Adjust edges of gridLines\r\n\tvar children = gridLines.children;\r\n\tfor ( var i = 0; i < children.length; i++ ) {\r\n\t\tvar child = children[ i ];\r\n\t\tif ( Math.abs( child.firstSegment.point.x - child.lastSegment.point.x ) > 0 ) {\r\n\t\t\tchild.firstSegment.point = new Point( 0, child.firstSegment.point.y );\r\n\t\t\tchild.lastSegment.point = new Point( view.size.width, child.lastSegment.point.y );\r\n\t\t} else {\r\n\t\t\tchild.firstSegment.point = new Point( child.firstSegment.point.x, 0 );\r\n\t\t\tchild.lastSegment.point = new Point( child.lastSegment.point.x, view.size.height );\r\n\t\t}\r\n\t}\r\n\r\n\t// Adjust number of gridLines\r\n\tvar lm = view.size.width;\r\n\tvar rm = 0;\r\n\r\n\tfor ( var i = 0; i < children.length; i++ ) {\r\n\t\tvar child = children[ i ];\r\n\t\t// Iterate through vertical lines only\r\n\t\tif ( child.firstSegment.point.y == 0 && child.lastSegment.point.y == view.size.height ) {\r\n\t\t\tif ( child.firstSegment.point.x < lm ) {\r\n\t\t\t\tlm = child.firstSegment.point.x;\r\n\t\t\t}\r\n\t\t\tif ( child.firstSegment.point.x > rm ) {\r\n\t\t\t\trm = child.firstSegment.point.x;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tvar tm = view.size.height;\r\n\tvar bm = 0;\r\n\r\n\tfor ( var i = 0; i < children.length; i++ ) {\r\n\t\tvar child = children[ i ];\r\n\t\t// Iterate through horizontal lines only\r\n\t\tif ( child.firstSegment.point.x == 0 && child.lastSegment.point.x == view.size.width ) {\r\n\t\t\tif ( child.firstSegment.point.y < tm ) {\r\n\t\t\t\ttm = child.firstSegment.point.y;\r\n\t\t\t}\r\n\t\t\tif ( child.firstSegment.point.y > bm ) {\r\n\t\t\t\tbm = child.firstSegment.point.y;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tdiff = Math.abs( diff );\r\n\t//console.log( \"left: \" + lm + \", top: \" + tm + \", right: \" + rm + \", bottom: \" + bm + \", diff: \" + diff );\r\n\r\n\t// Add needed lines\r\n\tif ( lm > diff ) {\r\n\t\tdo {\r\n\t\t\tvar copy = vLine.clone();\r\n\t\t\tcopy.position.x = lm - diff;\r\n\t\t\tgridLines.addChild( copy );\r\n\t\t\tlm = copy.position.x;\r\n\t\t} while ( lm > diff );\r\n\t}\r\n\tif ( ( view.size.width - rm ) > diff ) {\r\n\t\tdo {\r\n\t\t\tvar copy = vLine.clone();\r\n\t\t\tcopy.position.x = rm + diff;\r\n\t\t\tgridLines.addChild( copy );\r\n\t\t\trm = copy.position.x;\r\n\t\t} while ( ( view.size.width - rm ) > diff )\r\n\t}\r\n\tif ( tm > diff ) {\r\n\t\tdo {\r\n\t\t\tvar copy = hLine.clone();\r\n\t\t\tcopy.position.y = tm - diff;\r\n\t\t\tgridLines.addChild( copy );\r\n\t\t\ttm = copy.position.y;\r\n\t\t} while ( tm > diff );\r\n\t}\r\n\tif ( ( view.size.height - bm ) > diff ) {\r\n\t\tdo {\r\n\t\t\tvar copy = hLine.clone();\r\n\t\t\tcopy.position.y = bm + diff;\r\n\t\t\tgridLines.addChild( copy );\r\n\t\t\tbm = copy.position.y;\r\n\t\t} while ( ( view.size.height - bm ) > diff );\r\n\t}\r\n\r\n\t// Remove superfluous lines\r\n\tfor ( var i = 0; i < children.length; i++ ) {\r\n\t\tvar child = children[ i ];\r\n\r\n\t\t// Iterate through vertical lines only\r\n\t\tif ( child.firstSegment.point.y == 0 && child.lastSegment.point.y == view.size.height ) {\r\n\t\t\tif ( child.firstSegment.point.x < 0 ) {\r\n\t\t\t\tchild.remove();\r\n\t\t\t}\r\n\t\t\tif ( child.firstSegment.point.x > view.size.width ) {\r\n\t\t\t\tchild.remove();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tfor ( var i = 0; i < children.length; i++ ) {\r\n\t\tvar child = children[ i ];\r\n\r\n\t\t// Iterate through horizontal lines only\r\n\t\tif ( child.firstSegment.point.x == 0 && child.lastSegment.point.x == view.size.width ) {\r\n\t\t\tif ( child.firstSegment.point.y < 0 ) {\r\n\t\t\t\tchild.remove();\r\n\t\t\t}\r\n\t\t\tif ( child.firstSegment.point.y > view.size.height ) {\r\n\t\t\t\tchild.remove();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "0fb8d30f54606e5549b2ada664d0b4d9", "score": "0.61029106", "text": "function drawGrid() {\n var canvas = document.getElementById('mainCanvas');\n\n // Draw a black background\n var ctx = canvas.getContext('2d');\n ctx.fillStyle = window.backgroundColor;\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n // Set the stroke color to grey\n ctx.strokeStyle = window.gridColor;\n\n // Set the stroke size to 1/10th of the cell size\n ctx.lineWidth = window.cellSize / window.gridLineWidthRatio;\n\n // Draw the vertical lines of the grid\n var offset;\n for (var i = 0; i <= window.numCellsX; i++) {\n offset = i * window.cellSize;\n ctx.beginPath();\n ctx.moveTo(offset, 0);\n ctx.lineTo(offset, canvas.height);\n ctx.stroke();\n }\n\n // Draw the horizontal lines of the grid\n for (i = 0; i <= window.numCellsY; i++) {\n offset = i * window.cellSize;\n ctx.beginPath();\n ctx.moveTo(0, offset);\n ctx.lineTo(canvas.width, offset);\n ctx.stroke();\n }\n}", "title": "" }, { "docid": "9374987937ca4df0d38872ec99f09e42", "score": "0.6102195", "text": "function reGraph() {\n console.time(\"reGraph\");\n let cells = grid.cells, points = grid.points, features = grid.features;\n const newCells = {p:[], g:[], h:[], t:[], f:[], r:[], biome:[]}; // to store new data\n const spacing2 = grid.spacing ** 2;\n\n for (const i of cells.i) {\n const height = cells.h[i];\n const type = cells.t[i];\n if (height < 20 && type !== -1 && type !== -2) continue; // exclude all deep ocean points\n if (type === -2 && (i%4=== 0 || features[cells.f[i]].type === \"lake\")) continue; // exclude non-coastal lake points\n const x = points[i][0], y = points[i][1];\n\n addNewPoint(x, y); // add point to array\n // add additional points for cells along coast\n if (type === 1 || type === -1) {\n if (cells.b[i]) continue; // not for near-border cells\n cells.c[i].forEach(function(e) {\n if (i > e) return;\n if (cells.t[e] === type) {\n const dist2 = (y - points[e][1]) ** 2 + (x - points[e][0]) ** 2;\n if (dist2 < spacing2) return; // too close to each other\n const x1 = rn((x + points[e][0]) / 2, 1);\n const y1 = rn((y + points[e][1]) / 2, 1);\n addNewPoint(x1, y1);\n }\n });\n }\n\n function addNewPoint(x, y) {\n newCells.p.push([x, y]);\n newCells.g.push(i);\n newCells.h.push(height);\n }\n }\n\n calculateVoronoi(pack, newCells.p);\n cells = pack.cells;\n cells.p = newCells.p; // points coordinates [x, y]\n cells.g = grid.cells.i.length < 65535 ? Uint16Array.from(newCells.g) : Uint32Array.from(newCells.g); // reference to initial grid cell\n cells.q = d3.quadtree(cells.p.map((p, d) => [p[0], p[1], d])); // points quadtree for fast search\n cells.h = new Uint8Array(newCells.h); // heights\n cells.area = new Uint16Array(cells.i.length); // cell area\n cells.i.forEach(i => cells.area[i] = Math.abs(d3.polygonArea(getPackPolygon(i))));\n\n console.timeEnd(\"reGraph\");\n}", "title": "" }, { "docid": "ef531a45f09c2762400e05ab57727809", "score": "0.60998946", "text": "function makeClickableGrid(gameSetup, grid, state, p1o, p2o)\r\n{\r\n\tif(gameState == false)\r\n\t{\r\n\t\treturn;\r\n\t}\r\n\t//Helper grid value containers\r\n\tvar rowID = {0 : 'a',1 : 'b',2 : 'c',3 : 'd',4 : 'e',5 : 'f',6 : 'g',7 : 'h'};\r\n\tvar colID = [1,2,3,4,5,6,7,8];\r\n\t//console.log(turnOrder);\r\n\t//Update player owned containers\r\n\tvar tempOwned0 = [];\r\n\tvar tempOwned1 = [];\r\n\tfor(var i=0; i<grid.length; i++)\r\n\t{\r\n\t\tfor(var j=0; j<grid[i].length; j++)\r\n\t\t{\r\n\t\t\t//console.log(grid[i][j]);\r\n\t\t\tif(grid[i][j] == \"p1\")\r\n\t\t\t{\r\n\t\t\t\ttempOwned0.push({row: i, col: j});\r\n\t\t\t}\r\n\t\t\tif(grid[i][j] == \"p2\")\r\n\t\t\t{\r\n\t\t\t\ttempOwned1.push({row: i, col: j});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tp1o = tempOwned0;\r\n\tp2o = tempOwned1;\r\n\tupdateInfoDisplay(p1o,p2o);\r\n\tupdateGameDisplay(grid,gameSetup);\r\n\t//console.log(p1o.length);\r\n\t//console.log(p2o.length);\r\n\t//get available movelist \r\n\tvar movesList = gameInternal(gameSetup, grid, state, p1o, p2o);\r\n\tif(movesList.length ==0 && turnOrder <= grid.length*grid.length)\r\n\t{\r\n\t\tturnOrder++;\r\n\t\tmovesList = gameInternal(gameSetup, grid, state, p1o, p2o);\r\n\t\tif(movesList.length ==0)\r\n\t\t{\r\n\t\t\tgameState = false;\r\n\t\t\tpostGamefunctions(gameSetup,p1o,p2o);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tmakeClickableGrid(gameSetup, grid, state, p1o, p2o);\r\n\t\t}\r\n\t\t\r\n\t}\r\n\tif(gameSetup[\"mode\"] == \"ComputerEasy\" && turnOrder%2 == 1)\r\n\t{\r\n\t\tcomputerMove(gameSetup, grid, movesList,p1o,p2o,state);\r\n\t}\r\n\telse if(gameSetup[\"mode\"] == \"ComputerHard\" && turnOrder%2 == 1)\r\n\t{\r\n\t\tcomputerMove(gameSetup, grid, movesList,p1o,p2o,state);\r\n\t}\r\n\telse\r\n\t{\r\n\t\tvar takeAction = function() {\r\n\t\tmakeMove(gameSetup, grid, this.id, p1o, p2o, movesList, state);\r\n\t\t};\r\n\t\t//Create clickable events for each cell of the gameboard\r\n\t\t//only highlighted cells are interractable\r\n\t\tfor(var i=0; i<grid.length; i++)\r\n\t\t{\r\n\t\t\tfor(var j=0; j<grid.length; j++)\r\n\t\t\t{\r\n\t\t\t\tvar cellID = rowID[i]+String(colID[j]);\r\n\t\t\t\tvar elem = document.getElementById(cellID);\r\n\t\t\t\tif(grid[i][j] == \"o\")\r\n\t\t\t\t{\r\n\t\t\t\t\telem.addEventListener(\"click\", takeAction, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "00564666d1029dd7c72c82d6087af441", "score": "0.6097323", "text": "function countPaths(grid) {\n let m = grid.length; //row size\n let n = grid[0].length;//column size\n\n function countPathsHelper(grid, row, col) {\n //BASE CASE\n if (row === m - 1 && col === n - 1) //Last cell of the grid, return 0\n return 1;\n //GAURDS \n if (row === m - 1) return 0;\n if (col === n - 1) return 0;\n downPaths = countPaths(grid, row + 1, col); //go down\n rightPaths = countPaths(grid, col, row + 1); //go right\n return downPaths + rightPaths;\n }\n\n function countPathsDP(grid) {\n var dpTable = [];\n for (let rows = m; rows > 0; rows--) {\n for (let cols = n; cols > 0; cols--) {\n\n }\n }\n }\n return countPathsHelper(grid, 0, 0);\n}", "title": "" }, { "docid": "7f3638f60f22e65f2968f2233d15641e", "score": "0.60954416", "text": "function createGrid() {\n for (let x = 0; x < ch; x += 38) {\n ctx.moveTo(x, 0);\n ctx.lineTo(x, ch);\n }\n //draw horizontal lines\n for (let y = 0; y < ch; y += 50) {\n ctx.moveTo(0, y);\n ctx.lineTo(ch, y);\n }\n ctx.strokeStyle = \"lightgrey\";\n ctx.setLineDash([10, 5]);\n ctx.stroke();\n}", "title": "" }, { "docid": "d66f4c3f3ce45380db1011f6adc32128", "score": "0.6095253", "text": "function setup() {\nalert(' Please read the following lines carefully to understand the algorithm->>This is the implementation of DFS algorithm which is used to generate maze by implementing recursive backtracker. It initialize our tracker at starting of grid and traverse through the grid visiting all the cells neighbours and backtracks when get stuck . If you see carefully whenever it gets stuck it comes back to the previous cell where neighbour exist thats the implementation of Dfs i.e. to search to depth till stuck and backtacks to previous highlighted cell and go its depth and repeats this process to eventually reach the original starting position.Refresh the screen to generate new maze by clicking ok again or to read these lines again.'); \n createCanvas(windowWidth, windowHeight);\n cols = floor(width/w);\n rows = floor(height/w); \n frameRate(4);\n for (var j = 0; j<rows; j++){\n for (var i = 0; i < cols; i++) {\n var cell = new Cell(i,j);\n grid.push(cell);\n }\n }\n current = grid[0];\n}//", "title": "" }, { "docid": "cd6994c74ec15ee7c1eff6a9fca564d8", "score": "0.60847783", "text": "function LineRouting(){this.size=20;this.intermediatePoints=[];this.gridCollection=[];this.startArray=[];this.targetGridCollection=[];this.sourceGridCollection=[];this.considerWalkable=[];//constructs the line routing module\n}", "title": "" }, { "docid": "e6a405e90d886401f44a817e6b568f51", "score": "0.60792387", "text": "function FindRoute( mapGrid) {\n \n var self = this;\n \n self.mapGrid = mapGrid; \n self.mapGrid.clearAllPathStep();\n\n\n /**\n * Given the begining and ending cells, return the route as an array of cells \n */\n self.getRoute = function(originCell, goalCell) {\n \n originCell.isOrigin = true;\n goalCell.isGoal = true;\n \n var routeStep = getRouteSteps(originCell, goalCell);\n routeStep--; // Point to next step\n \n var route = [];\n var cell = originCell;\n \n // Loop until the cell we're in matches the ending cell\n //\n while (routeStep > 0 && ! cell.isGoal ) {\n \n // Save the children of cell\n var northCell = self.mapGrid.cellNorth( cell );\n var eastCell = self.mapGrid.cellEast( cell );\n var southCell = self.mapGrid.cellSouth( cell );\n var westCell = self.mapGrid.cellWest( cell ); \n \n if ( northCell.pathStep === routeStep ) {\n \n route.push(northCell);\n cell = northCell;\n }\n else if ( eastCell.pathStep === routeStep ) {\n \n route.push(eastCell);\n cell = eastCell;\n }\n else if ( southCell.pathStep === routeStep ) {\n \n route.push(southCell);\n cell = southCell;\n }\n else if ( westCell.pathStep === routeStep ) {\n \n route.push(westCell);\n cell = westCell;\n }\n routeStep--;\n }\n return route;\n }\n function getRouteSteps(originCell, goalCell) {\n \n console.log('FindRoute.getRoute start originCell=',originCell);\n console.log('FindRoute.getRoute start goalCell=',goalCell);\n\n \n self.step = 1;\n\n var foundStep = 0;\n var queue = [];\n \n goalCell.pathStep = 0;\n \n // Starts at the end and searches to begining\n queue.push(goalCell); // Initialize que\n \n \n while ( foundStep === 0 && queue.length > 0 ) {\n \n // Get current cell to check\n var cell = queue.shift();\n \n console.log('FindRoute.getRoute loop cell=',cell);\n \n // Save the children of cell\n var northCell = self.mapGrid.cellNorth( cell );\n var eastCell = self.mapGrid.cellEast( cell );\n var southCell = self.mapGrid.cellSouth( cell );\n var westCell = self.mapGrid.cellWest( cell ); \n \n if ( northCell \n && ! northCell.isGoal \n && ! northCell.isWall() \n && northCell.pathStep === null ) {\n \n queue.push( northCell );\n \n if ( northCell.isOrigin ) {\n \n foundStep = self.step;\n }\n else {\n \n northCell.pathStep = self.step;\n }\n }\n if ( eastCell \n && ! eastCell.isWall() \n && ! eastCell.isGoal \n && eastCell.pathStep === null) {\n \n queue.push( eastCell );\n \n if ( eastCell.isOrigin ) {\n \n foundStep = self.step;\n }\n else {\n \n eastCell.pathStep = self.step;\n }\n }\n if ( southCell \n && ! southCell.isGoal \n && ! southCell.isWall() \n && southCell.pathStep === null ) {\n\n queue.push( southCell );\n \n if ( southCell.isOrigin ) {\n \n foundStep = self.step;\n }\n else {\n \n southCell.pathStep = self.step;\n }\n }\n if ( westCell \n && ! westCell.isGoal \n && ! westCell.isWall() \n && westCell.pathStep === null ) {\n\n queue.push( westCell );\n \n if ( westCell.isOrigin ) {\n \n foundStep = self.step;\n }\n else {\n \n westCell.pathStep = self.step;\n }\n }\n\n self.step++;\n console.log('FindRoute.getRoute loop mapGrid.dump()=' + self.mapGrid.dump());\n } \n return foundStep;\n }\n}", "title": "" }, { "docid": "990ea80fcbce660064ff14fcf5845cc5", "score": "0.60775715", "text": "function Pathfinder3() {\n this.pathFrom_To_ = function (start, target, isPassableFunction) {\n const frontier = [];\n frontier.push(start);\n const cameFrom = {};\n cameFrom[ start ] = \"S\";\n\n while (frontier.length > 0) {\n const current = frontier.shift();\n const neighbors = neighborsForIndex(current, isPassableFunction);\n\n for (let i = 0; i < neighbors.length; i++) {\n const next = neighbors[ i ];\n if (cameFrom[ next ] == undefined) {\n frontier.push(next);\n cameFrom[ next ] = current;\n }\n\n if (next == target) {\n break;\n }\n }\n }\n\n const path = [];\n\n let current = target;\n\n while (current != start) {\n path.splice(0, 0, current);\n current = cameFrom[ current ];\n if (current == undefined) {\n return null;\n }\n }\n\n path.splice(0, 0, start);\n\n /* let string = \"\";\n for(let j = 0; j < levelList[levelNow].length; j++) {\n let distString = cameFrom[j];\n\n if(distString == undefined) {distString = \"B\";}\n\n distString = distString.toString();\n if(distString.length < 2) {\n distString = (\"00\" + distString);\n } else if(distString.length < 3) {\n distString = (\"0\" + distString);\n }\n\n distString += \", \"\n string += distString;\n if((j + 1) % ROOM_COLS == 0) {\n string += \"\\n\";\n }\n }\n\n // console.log(string); */\n\n return path;\n };\n\n const neighborsForIndex = function (index, isPassable) {\n const result = [];\n\n let above = indexAboveIndex(index);\n if (above != null) {\n if (isPassable(levelList[ levelNow ][ above ])) {\n result.push(above);\n }\n }\n\n let below = indexBelowIndex(index);\n if (below != null) {\n if (isPassable(levelList[ levelNow ][ below ])) {\n result.push(below);\n }\n }\n\n let left = indexLeftofIndex(index);\n if (left != null) {\n if (isPassable(levelList[ levelNow ][ left ])) {\n result.push(left);\n }\n }\n\n let right = indexRightOfIndex(index);\n if (right != null) {\n if (isPassable(levelList[ levelNow ][ right ])) {\n result.push(right);\n }\n }\n\n return result;\n };\n\n const indexAboveIndex = function (index) {\n const result = index - ROOM_COLS;\n if (result < 0) {\n return null;\n } else {\n return result;\n }\n };\n\n const indexBelowIndex = function (index) {\n const result = index + ROOM_COLS;\n if (result >= levelList[ levelNow ].length) {\n return null;\n } else {\n return result;\n }\n };\n\n const indexLeftofIndex = function (index) {\n const result = index - 1;\n if ((result < 0) || (result % ROOM_COLS == (ROOM_COLS - 1))) {\n return null;\n } else {\n return result;\n }\n };\n\n const indexRightOfIndex = function (index) {\n const result = index + 1;\n if ((result >= levelList[ levelNow ].length) || (result % ROOM_COLS == 0)) {\n return null;\n } else {\n return result;\n }\n }\n}", "title": "" }, { "docid": "ef60c9949193b71671654b753aadce06", "score": "0.60763645", "text": "function drawGrid(){\n for (let i = 0; i < cols; i++) {\n for (let j = 0; j < rows; j++) {\n let x = i * resolution;\n let y = j * resolution + 5;\n stroke(50);\n \n //Indicates that a specific color must be placed\n if(mouseX <= x + resolution && mouseX >= x && mouseY <= y + resolution && mouseY >= y && mouseIsPressed && colorState === 1){\n colors[i][j] = 1;\n }\n if(mouseX <= x + resolution && mouseX >= x && mouseY <= y + resolution && mouseY >= y && mouseIsPressed && colorState === 2){\n colors[i][j] = 2;\n }\n if(mouseX <= x + resolution && mouseX >= x && mouseY <= y + resolution && mouseY >= y && mouseIsPressed && colorState === 3){\n colors[i][j] = 3;\n }\n if(mouseX <= x + resolution && mouseX >= x && mouseY <= y + resolution && mouseY >= y && mouseIsPressed && colorState === 4){\n colors[i][j] = 4;\n }\n if(mouseX <= x + resolution && mouseX >= x && mouseY <= y + resolution && mouseY >= y && mouseIsPressed && colorState === 5){\n colors[i][j] = 5;\n }\n if(mouseX <= x + resolution && mouseX >= x && mouseY <= y + resolution && mouseY >= y && mouseIsPressed && colorState === 6){\n colors[i][j] = 6;\n }\n\n //applies the colors\n if(colors[i][j] === 1){\n fill(\"red\");\n rect(x, y, resolution, resolution);\n }\n else if(colors[i][j] === 2){\n fill(\"blue\");\n rect(x, y, resolution, resolution);\n }\n else if(colors[i][j] === 3){\n fill(\"green\");\n rect(x, y, resolution, resolution);\n }\n else if(colors[i][j] === 4){\n fill(\"orange\");\n rect(x, y, resolution, resolution);\n }\n else if(colors[i][j] === 5){\n fill(\"black\");\n rect(x, y, resolution, resolution);\n }\n else if(colors[i][j] === 6){\n fill(\"white\");\n rect(x, y, resolution, resolution);\n }\n else {\n fill(255);\n rect(x, y, resolution, resolution);\n }\n \n \n }\n }\n}", "title": "" }, { "docid": "55cbda593d9fe733e114d29e7179bbba", "score": "0.6074796", "text": "function mouseClicked() {\n phase++;\n for (let i = 0; i < lineG; i++) {\n for (let j = 0; j < lineG; j++) {\n if (mouseX < grids[i][j].x + w && mouseX >grids[i][j].x && mouseY > grids[i][j].y && mouseY < grids[i][j].y + h) {\n if (phase == 1) { \n grids[i][j].start = true;\n sNode = grids[i][j];\n info = \"Chose the end\";\n } else if (phase == 2) {\n grids[i][j].end = true;\n eNode = grids[i][j]; \n info = \"Make obstacles and press Enter!\" \n }else if(phase >= 3){ \n grids[i][j].isObstacle = true; \n }\n }\n }\n }\n\n}", "title": "" }, { "docid": "3511d3e4a2370c238579422e95ee34f7", "score": "0.60713625", "text": "render() {\n\t// ctx.fillStyle = `rgb(${this.shade * 255}, ${this.shade * 255}, ${this.shade * 255})`;\n\t\n\t// ctx.beginPath();\n\t// ctx.moveTo(0, 0);\n\t// ctx.arc(0, 0, arena_size, this.angle * Math.PI * 0.5, (this.angle + 1) * Math.PI * 0.5);\n\t// ctx.lineTo(0, 0);\n\t// ctx.fill();\n\n\tconst neighbors = [\n\t [-1, 0],\n\t [0, -1],\n\t [1, 0],\n\t [0, 1],\n\t [-1, -1],\n\t [1, -1],\n\t [1, 1],\n\t [-1, 1],\n\t];\n\tfor (let i = 0; i < quadrant_cell_width; i++) {\n\t for (let j = 0; j < quadrant_cell_width; j++) {\n\t\tconst x = i + this.grid_offset[0];\n\t\tconst y = j + this.grid_offset[1];\n\t\tconst dist = Math.max(Math.abs(x), Math.abs(y));\n\t\t// if (dist <= 1 || dist >= (quadrant_cell_width)) {\n\t\t// continue;\n\t\t// }\n\t\tconst cell = this.getCell(x, y);\n\t\tconst hue = this.hueAt(x, y);\n\t\tconst sat = 50;\n\t\tif (cell == 1) {\n\t\t ctx.fillStyle = `hsl(${hue}, ${sat}%, 30%)`;\n\t\t ctx.fillRect(x * grid_size, y * grid_size, grid_size, grid_size);\n\t\t ctx.fillStyle = `hsl(${hue}, ${sat}%, 50%)`;\n\t\t for (let i = 0; i < neighbors.length; i++) {\n\t\t\tconst new_cell = this.getCell(x + neighbors[i][0], y + neighbors[i][1]);\n\t\t\tif (new_cell == 0) {\n\t\t\t const rect = [0, 0, 1, 1];\n\t\t\t if (neighbors[i][0] == -1) {\n\t\t\t\trect[2] = 0.25;\n\t\t\t } else if (neighbors[i][0] == 1) {\n\t\t\t\trect[0] = 0.75;\n\t\t\t\trect[2] = 0.25;\n\t\t\t }\n\t\t\t \n\t\t\t if (neighbors[i][1] == -1) {\n\t\t\t\trect[3] = 0.25;\n\t\t\t } else if (neighbors[i][1] == 1) {\n\t\t\t\trect[1] = 0.75;\n\t\t\t\trect[3] = 0.25;\n\t\t\t }\t\t\t \n\t\t\t ctx.fillRect((x + rect[0]) * grid_size, (y + rect[1]) * grid_size, rect[2] * grid_size, rect[3] * grid_size);\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t}\n }", "title": "" }, { "docid": "42e1abf81b784413010b4c80d426b0ed", "score": "0.6069101", "text": "recursiveMove(grid, x, y, width, height, visited, orientation) {\n if (width <= this.maxDetail || height <= this.maxDetail) return;\n\n const horizontal = orientation === this.horizontal;\n\n // w coordinates => wall units\n let wx = x + (horizontal ? 0 : this.getRand(width - 2));\n let wy = y + (horizontal ? this.getRand(height - 2) : 0);\n\n // p coordinages => passage units\n const px = wx + (horizontal ? this.getRand(width) : 0);\n const py = wy + (horizontal ? 0 : this.getRand(height));\n\n // this makes sure that all units are allowed meaning the wall unit is even and the passage unit isn't even\n // so that we don't cover a passage with a wall\n if (!this.areUnitsAllowed(wx, wy, px, py, horizontal))\n return this.recursiveMove(\n grid,\n x,\n y,\n width,\n height,\n visited,\n orientation\n );\n\n // get the movement direction\n const direction = {\n x: horizontal ? 1 : 0,\n y: horizontal ? 0 : 1\n };\n\n // what is the length of the future wall ?\n const length = horizontal ? width : height;\n\n // mark the cells as walls\n for (let i = 0; i < length; i++) {\n const cell = grid.getCell(wx, wy);\n if (!cell) break;\n\n if (!(wx === px && wy === py)) {\n visited.push(cell);\n }\n\n wx += direction.x;\n wy += direction.y;\n }\n\n // create sub bounds!\n\n // first one ->\n let nx = x;\n let ny = y;\n\n // we are adding extra unit because when we randomize the wx&wy units we remove 2 units from the calculation.\n let nw = horizontal ? width : wx - x + 1;\n let nh = horizontal ? wy - y + 1 : height;\n\n this.simpleRecursiveMove(grid, nx, ny, nw, nh, visited);\n\n // second one ->\n nx = horizontal ? x : wx + 1;\n ny = horizontal ? wy + 1 : y;\n\n nw = horizontal ? width : x + width - wx - 1;\n nh = horizontal ? y + height - wy - 1 : height;\n\n this.simpleRecursiveMove(grid, nx, ny, nw, nh, visited);\n }", "title": "" }, { "docid": "18b352acffea618ea08f25886620997a", "score": "0.6064563", "text": "function isPath(x, y, blockX, blockY) {\n var queue = [];\n if (GAMEBOARD[blockX][blockY]) {\n GAMEBOARD[blockX][blockY].hoverOccupied = true;\n } else {\n return false;\n }\n\nfor(var i = 0; i < GAMEBOARD.length; i++) {\n for(var j = 0; j < GAMEBOARD[i].length; j++) {\n GAMEBOARD[i][j].distToXY = -1;\n GAMEBOARD[i][j].dir = -1;\n }\n}\n\n var xy = getXY(x, y);\n GAMEBOARD[xy.x][xy.y].distToXY = 0;\n GAMEBOARD[xy.x][xy.y].dir = 0;\n queue.push(xy);\n\n while (queue.length !== 0) {\n for (let i = 0; i < queue.length; i++) {\n var node = queue.shift();\n // if (node.x == 2 && node.y > 0) {\n // console.log(\"problem\")\n // }\n if (GAMEBOARD[node.x][node.y].end) {\n GAMEBOARD[blockX][blockY].hoverOccupied = false;\n return true;\n }\n\n if (node.x + 1 < GAMEBOARD.length && node.x + 1 >= 0 && (!GAMEBOARD[node.x + 1][node.y].hoverOccupied \n && !GAMEBOARD[node.x + 1][node.y].occupied) && GAMEBOARD[node.x + 1][node.y].dir < 0) {\n var newNode = Object.assign({}, node);\n newNode.x++;\n queue.push(newNode);\n GAMEBOARD[node.x + 1][node.y].distToXY = GAMEBOARD[node.x][node.y].distToXY + 1;\n GAMEBOARD[node.x + 1][node.y].dir = 1;\n }\n if (node.y + 1 < GAMEBOARD[0].length && node.y + 1 >= 0 && (!GAMEBOARD[node.x][node.y + 1].hoverOccupied \n && !GAMEBOARD[node.x][node.y + 1].occupied) && GAMEBOARD[node.x][node.y + 1].dir < 0) {\n var newNode = Object.assign({}, node);\n newNode.y++;\n queue.push(newNode);\n GAMEBOARD[node.x][node.y + 1].distToXY = GAMEBOARD[node.x][node.y].distToXY + 1;\n GAMEBOARD[node.x][node.y + 1].dir = 2;\n }\n if (node.x - 1 < GAMEBOARD.length && node.x - 1 >= 0 && (!GAMEBOARD[node.x - 1][node.y].hoverOccupied \n && !GAMEBOARD[node.x - 1][node.y].occupied) && GAMEBOARD[node.x - 1][node.y].dir < 0) {\n var newNode = Object.assign({}, node);\n newNode.x--;\n queue.push(newNode);\n GAMEBOARD[node.x - 1][node.y].distToXY = GAMEBOARD[node.x][node.y].distToXY + 1;\n GAMEBOARD[node.x - 1][node.y].dir = 3;\n }\n if (node.y - 1 < GAMEBOARD[0].length && node.y - 1 >= 0 && (!GAMEBOARD[node.x][node.y - 1].hoverOccupied \n && !GAMEBOARD[node.x][node.y - 1].occupied) && GAMEBOARD[node.x][node.y - 1].dir < 0) {\n var newNode = Object.assign({}, node);\n newNode.y--;\n queue.push(newNode);\n GAMEBOARD[node.x][node.y - 1].distToXY = GAMEBOARD[node.x][node.y].distToXY + 1;\n GAMEBOARD[node.x][node.y - 1].dir = 4;\n }\n }\n }\n GAMEBOARD[blockX][blockY].hoverOccupied = false;\n return false; // no shortest path\n}", "title": "" }, { "docid": "951dde8b1d67cfb7a0509eb5a3bff24e", "score": "0.606347", "text": "function drawGrid(){\n const grid_size = 10;\n const x_axis_distance_grid_lines = 5;\n const y_axis_distance_grid_lines = 5;\n const x_axis_starting_point = { number: 1, suffix: '\\u03a0' };\n const y_axis_starting_point = { number: 1, suffix: '' };\n\n const canvas = document.getElementById(\"kanveesi\");\n const ctx = canvas.getContext(\"2d\");\n\n // canvas width\n const canvas_width = canvas.width;\n\n // canvas height\n const canvas_height = canvas.height;\n\n // no of vertical grid lines\n const num_lines_x = Math.floor(canvas_height/grid_size);\n\n // no of horizontal grid lines\n const num_lines_y = Math.floor(canvas_width/grid_size);\n \n // Draw grid lines along X-axis\n for(let i = 0; i <= num_lines_x; i++) {\n ctx.beginPath();\n ctx.lineWidth = 1;\n\n // If line represents X-axis draw in different color\n if(i == x_axis_distance_grid_lines) \n ctx.strokeStyle = \"#000000\";\n else\n ctx.strokeStyle = \"#e9e9e9\";\n\n if(i == num_lines_x) {\n ctx.moveTo(0, grid_size*i);\n ctx.lineTo(canvas_width, grid_size*i);\n }\n else {\n ctx.moveTo(0, grid_size*i+0.5);\n ctx.lineTo(canvas_width, grid_size*i+0.5);\n }\n ctx.stroke();\n }\n // Draw grid lines along Y-axis\n for (let i = 0; i <= num_lines_y; i++) {\n ctx.beginPath();\n ctx.lineWidth = 1;\n\n // If line represents Y-axis draw in different color\n if(i == y_axis_distance_grid_lines) \n ctx.strokeStyle = \"#000000\";\n else\n ctx.strokeStyle = \"#e9e9e9\";\n\n if(i == num_lines_y) {\n ctx.moveTo(grid_size*i, 0);\n ctx.lineTo(grid_size*i, canvas_height);\n }\n else {\n ctx.moveTo(grid_size*i+0.5, 0);\n ctx.lineTo(grid_size*i+0.5, canvas_height);\n }\n ctx.stroke();\n } \n}", "title": "" }, { "docid": "77df3e9898a9bb8f9214cf563e13847a", "score": "0.606253", "text": "brushfire() {\r\n // Initialize each cell in the grid to have a distance that\r\n // is the greatest possible. Initialize each cell to \r\n // have no parent and populate it's array of neighbors\r\n for(var i = 0; i < this.cols; i++){\r\n for(var j = 0; j < this.rows; j++){\r\n var cell = this.grid[i][j];\r\n cell.dist = this.cols * this.rows * 10; // set distance to max\r\n cell.vec = null; // clear parent vector\r\n cell.parent = 0; // clear parent\r\n cell.addNeighbors(this, this.grid); // fill the neighbors array\r\n }\r\n }\r\n // Initialize the fifo queue with the root cell\r\n this.root.dist = 0;\r\n this.root.occupied = false;\r\n var queue = [this.root];\r\n\r\n // loop as long as the queue is not empty, removing the first cell\r\n // in the queue and adding all its neighbors to the end of the\r\n // queue. The neighbors will only be those that are not occupied\r\n // and not blocked diagonally. \r\n while(queue.length) { \r\n var current = queue.shift(); // remove the first cell from the queue\r\n // for all its neighbors...\r\n for(let j =0; j < current.neighbors.length; j++){\r\n let neighbor = current.neighbors[j];\r\n var dist = current.dist+10; // adjacent neighbors have a distance of 10\r\n if(current.loc.x != neighbor.loc.x && current.loc.y != neighbor.loc.y)\r\n dist = current.dist+14; // diagonal neighbors have a distance of 14\r\n // if this neighbor has not already been assigned a distance\r\n // or we now have a shorter distance, give it a distance\r\n // and a parent and push to the end of the queue.\r\n if(neighbor.dist > dist) {\r\n neighbor.parent = current;\r\n neighbor.dist = dist;\r\n queue.push(neighbor);\r\n }\r\n } // for each neighbor\r\n } // while(queue.length)\r\n \r\n // give each cell a vector that points to its parent\r\n for(var i = 0; i < this.cols; i++){\r\n for(var j = 0; j < this.rows; j++){\r\n this.grid[i][j].vec = this.grid[i][j].getVector();\r\n }\r\n }\r\n \r\n }", "title": "" }, { "docid": "0650ac0811cf9f4bfd46819d8dfd2ac4", "score": "0.60616374", "text": "function gridsMouseDown(event) {\n if (solving) {\n return;\n }\n\n var borderOffset = 5;\n var resizedOffSet = Math.ceil((this.clientWidth / initWidth) * offSet);\n var resizedBlockSize = Math.floor((this.clientWidth - (resizedOffSet * 2)) / dimensions);\n var xDown = event.layerX - (borderOffset + resizedOffSet);\n var yDown = event.layerY - (borderOffset + resizedOffSet);\n var xDex = Math.floor(xDown / resizedBlockSize);\n var yDex = Math.floor(yDown / resizedBlockSize);\n for (var i = 0; i < curCanvases.length; ++i) {\n curVal = curCanvases[i];\n if (curVal.solved) {\n reInitGrid(curVal.backArray, dimensions, blockSize, offSet, curVal.ctx);\n curVal.solved = false;\n }\n if (xDex >= 0 && xDex < dimensions && yDex >= 0 && yDex < dimensions) {\n if (curVal.backArray[xDex][yDex] === 0) {\n fillOrRemove = true;\n curVal.ctx.fillStyle = \"brown\";\n curVal.ctx.strokeStyle = \"blue\";\n curVal.backArray[xDex][yDex] = 1;\n curVal.ctx.fillRect((xDex * blockSize) + offSet, (yDex * blockSize) + offSet, blockSize, blockSize);\n curVal.ctx.strokeRect((xDex * blockSize) + offSet, (yDex * blockSize) + offSet, blockSize, blockSize);\n } else {\n fillOrRemove = false;\n curVal.ctx.fillStyle = \"white\";\n curVal.ctx.strokeStyle = \"blue\";\n curVal.backArray[xDex][yDex] = 0;\n curVal.ctx.fillRect((xDex * blockSize) + offSet, (yDex * blockSize) + offSet, blockSize, blockSize);\n curVal.ctx.strokeRect((xDex * blockSize) + offSet, (yDex * blockSize) + offSet, blockSize, blockSize);\n }\n mouseClicked = true;\n }\n }\n }", "title": "" }, { "docid": "3e7dfc91f5935654b5aa1e4970aceb5b", "score": "0.60546744", "text": "function draw_output_cells(){\n\t\tvar cells=[];\n\t\tvar source = i_ctx.getImageData(0, 0, inputCanvas.width, inputCanvas.height);\n\n\n\t\t//TODO: cell shape\n\t\t\n\t\t//for square grids\n\t\t//calculate the output grid\n\t\tvar grid_length = Math.round(source.width / cellSize);\n\t\tvar grid_height = Math.round(source.height / cellSize);\t\t\n\t\t\n\t\tfor (var x = 0; x < grid_length; x ++)\n\t\t{\n\t\t\tfor (var y = 0; y < grid_height; y++)\n\t\t\t{\n\t\t\t\t\tcells.push(\n\t\t\t\t\t\tnew cell([\n\t\t\t\t\t\t\tnew coord(x * cellSize, y * cellSize),\n\t\t\t\t\t\t\tnew coord((x + 1) * cellSize, y * cellSize),\n\t\t\t\t\t\t\tnew coord(x * cellSize, (y - 1) * cellSize),\n\t\t\t\t\t\t\tnew coord((x + 1) * cellSize, (y - 1) * cellSize)\n\t\t\t\t\t\t])\n\t\t\t\t\t);\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tconsole.log(cells.length);\n\t\t\n\t\tdraw_cells(cells);\n\t\t\n\t}", "title": "" }, { "docid": "f00fdffb53ea166eafbd3b8574416685", "score": "0.603978", "text": "createFromGridCorners(appState){\n this.clearPoints();\n const cornerCount = appState.gridCorners.length;\n\n //get lines from polygon vertices\n let borderLines = Line.borderLines(appState.gridCorners, appState.polygonClockwise);\n\n //track will be parallel to one of the edges of the polygon\n let pIndex = appState.gridAlign; //INPUT, default 0\n\n let p = Line.from2points(appState.gridCorners[pIndex].position, appState.gridCorners[(pIndex+1) % cornerCount].position, appState.polygonClockwise);\n\n let left = true;\n let last = 0;\n let distancesL = [];\n let distancesR = [];\n //go around the polygon, from chosen point to the left, until the furthest point, then right side\n for(let k=1; k<cornerCount-1; k++){\n let dist;\n //left side\n if(left){\n dist = Line.pointLineDistance(p,appState.gridCorners[(cornerCount+pIndex+1+k)%cornerCount].position);\n if(dist > last){\n distancesL.push(dist);\n last = dist;\n }else{\n left = false; //reached the furthest point\n last = 0;\n }\n }\n //right side\n if(!left){\n dist = Line.pointLineDistance(p,appState.gridCorners[(pIndex-k+distancesL.length+cornerCount)%cornerCount].position);\n distancesR.push(dist);\n }\n }\n distancesL.reverse();\n distancesR.reverse();\n\n\n const normal = Line.normalVector(appState.gridCorners[pIndex].position, appState.gridCorners[(pIndex+1)%cornerCount].position, appState.polygonClockwise);\n const endPointDist = distancesL[0];\n let nextLeft = distancesL.pop();\n let nextRight = distancesR.pop();\n let leftIndex = (pIndex+1) % cornerCount;\n let rightIndex = (pIndex-1 + cornerCount) % cornerCount;\n\n const paraSpacing = Grid.getParallelSpacing(appState.speed, appState.altitude, appState.photoInterval);\n\n let side = true;\n let n = 0;\n let pDistance = 0;\n //move line p into the polygon and find the intersections (trackpoints)\n while(pDistance < endPointDist){\n //https://gis.stackexchange.com/questions/2951/algorithm-for-offsetting-a-latitude-longitude-by-some-amount-of-meters\n p = Line.move(appState.gridCorners[pIndex].position, appState.gridCorners[(pIndex+1)%cornerCount].position, normal, paraSpacing, n, appState.polygonClockwise);\n pDistance = Line.pointLineDistance(p,appState.gridCorners[pIndex].position);\n if(pDistance > endPointDist){\n break;\n }\n //set the correct lines to search intersection with line p\n if(pDistance > nextLeft){\n nextLeft = distancesL.pop();\n leftIndex = (leftIndex+1) % cornerCount;\n }\n if(pDistance > nextRight){\n nextRight = distancesR.pop();\n rightIndex = (rightIndex-1+cornerCount) % cornerCount;\n }\n //find the intersection and create a trackpoint\n const A = Line.intersection(p, borderLines[leftIndex]);\n const B = Line.intersection(p, borderLines[rightIndex]);\n const trkptA = new Waypoint(A.lat(), A.lng(), 0, 0, 0, 0, 'ORIGINAL');\n const trkptB = new Waypoint(B.lat(), B.lng(), 0, 0, 0, 0, 'ORIGINAL');\n if(side){\n this.appendWaypoint(trkptA);\n this.appendWaypoint(trkptB);\n }else{\n this.appendWaypoint(trkptB);\n this.appendWaypoint(trkptA);\n }\n side = n % 2 !== 0;\n n++;\n }\n\n }", "title": "" }, { "docid": "7ca53aedbc439dd8ded5cfe0a0cb7449", "score": "0.6027053", "text": "function shouldSink(grid, i, j) {\n // out of bounds\n if (i < 1 || i >= grid.length - 1 || j < 1 || j >= grid[0].length - 1) {\n return false;\n }\n // if not an island, don't sink\n if (grid[i][j] === 0) return false;\n if (\n grid[i + 1][j] === 0 ||\n grid[i - 1][j] === 0 ||\n grid[i][j + 1] === 0 ||\n grid[i][j - 1] === 0 ||\n grid[i - 1][j - 1] === 0 ||\n grid[i + 1][j + 1] === 0\n ) {\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "3cc5e53e39b1e664711da406706c2046", "score": "0.6023877", "text": "step() {\n let backBufferIndex = this.currentBufferIndex === 0 ? 1: 0;\n let currentBuffer = this.buffer[this.currentBufferIndex];\n let backBuffer = this.buffer[backBufferIndex];\n\n // check if neighbors are alive (1) or dead (0)\n const needsToChange = (h, w) => {\n let count = 0;\n //check top row\n if (h > 0) {\n if (currentBuffer[h-1][w-1] > 0) { // top left diag\n count++;\n }\n if (currentBuffer[h-1][w] > 0) { // top\n count++;\n }\n if (currentBuffer[h-1][w+1] > 0) { // top right diag\n count++;\n }\n }\n\n //check left\n if (w > 0) {\n if (currentBuffer[h][w-1] > 0) {\n count++;\n }\n }\n //check right\n if (w < this.width-1) {\n if (currentBuffer[h][w+1] > 0) {\n count++;\n }\n }\n //check bottom row\n if (h < this.height-1) {\n if (currentBuffer[h+1][w-1] > 0) { // bottom left diag\n count++;\n }\n if (currentBuffer[h+1][w] > 0) { // bottom\n count++;\n }\n if (currentBuffer[h+1][w+1] > 0) { // bottom right diag\n count++;\n }\n }\n return count;\n };\n\n // loop through current buffer and populate the back buffer\n for (let h = 0; h < this.height; h++) {\n for (let w = 0; w < this.width; w++) {\n let count = needsToChange(h, w);\n const thisCell = currentBuffer[h][w];\n\n if (count < 2 || count > 3) {\n // DEAD - if dead or alive\n backBuffer[h][w] = 0;\n }\n else if (count === 2) {\n // if alive - stay ALIVE, if dead - stay DEAD (nothing changes)\n // backBuffer[h][w] = thisCell === 1 ? 1 : 0;\n switch (thisCell) {\n case (1):\n case (2):\n case (3):\n backBuffer[h][w] = thisCell + 1;\n break;\n default:\n backBuffer[h][w] = thisCell;\n break;\n }\n }\n else if (count === 3) {\n // ALIVE - if alive or dead\n backBuffer[h][w] = 1;\n }\n }\n }\n this.currentBufferIndex = backBufferIndex;\n }", "title": "" }, { "docid": "449fa024d885be5316a7c48bcb34f531", "score": "0.6018448", "text": "runIfGo(grid) {\n\n // Draws the background in the rover's position (which is moving to nextPosition)\n\t\tgrid.ctx.drawImage(grid.background,\n this.position[0] * grid.cnv.width / grid.size,\n this.position[1] * grid.cnv.height / grid.size,\n grid.cnv.width / grid.size,\n grid.cnv.height / grid.size);\n\t\tgrid.ctx.lineWidth = \"1px\";\n\t\tgrid.ctx.strokeStyle = \"grey\";\n\t\tgrid.ctx.strokeRect(this.position[0] * grid.cnv.width / grid.size, this.position[1] *\n grid.cnv.height / grid.size, grid.cnv.width / grid.size, grid.cnv.height / grid.size);\n\n // Updates position with nextPosition\n\t\tthis.position[0] = this.nextPosition[0];\n\t\tthis.position[1] = this.nextPosition[1];\n\n // Draws the rover in the nextPosition\n\t\tthis.drawRotatedImage(grid);\n\n\t}", "title": "" }, { "docid": "1632b8800d7c6119304c416e305757fc", "score": "0.60078484", "text": "easyPath() {\r\n let availablePath = [];\r\n\r\n this.tiles.sort((a, b) => {\r\n if (a.position.y === b.position.y) return a.position.x - b.position.x\r\n return a.position.y - b.position.y\r\n });\r\n\r\n for (let i = 0; i < this.tiles.length - 5; i++) {\r\n if (this.tiles[i].position.x != 0 &&\r\n this.tiles[i].position.x != this.tilesX - 1 &&\r\n this.tiles[i].position.y != 0 &&\r\n this.tiles[i].position.y != this.tilesY - 1) {\r\n if (\r\n (this.tiles[i].position.y === this.tiles[i + 1].position.y &&\r\n this.tiles[i].position.y === this.tiles[i + 2].position.y &&\r\n this.tiles[i].position.y === this.tiles[i + 3].position.y &&\r\n this.tiles[i].position.y === this.tiles[i + 4].position.y) &&\r\n\r\n (this.tiles[i + 4].position.x - this.tiles[i + 3].position.x === 1 &&\r\n this.tiles[i + 3].position.x - this.tiles[i + 2].position.x === 1 &&\r\n this.tiles[i + 2].position.x - this.tiles[i + 1].position.x === 1 &&\r\n this.tiles[i + 1].position.x - this.tiles[i].position.x === 1)\r\n ) {\r\n availablePath.push(i + 2);\r\n i += 5;\r\n }\r\n }\r\n }\r\n\r\n availablePath.sort(() => {\r\n return 0.5 - Math.random();\r\n });\r\n\r\n // ======= Replace wall tiles with grass if no wall up & down, remove wall tiles from array, push grass in array\r\n\r\n let nrTiles = 0,\r\n saveTiles = [];\r\n for (let i = 1; i < availablePath.length; i++) {\r\n\r\n const tilePosition = this.tiles[availablePath[i]].position;\r\n if (this.getTileMaterial({\r\n x: tilePosition.x,\r\n y: tilePosition.y - 1\r\n }) === 'grass' &&\r\n this.getTileMaterial({\r\n x: tilePosition.x,\r\n y: tilePosition.y + 1\r\n }) === 'grass' &&\r\n nrTiles < 15) {\r\n nrTiles++;\r\n saveTiles.push(availablePath[i]);\r\n const tile = new Tile('grass', {\r\n x: tilePosition.x,\r\n y: tilePosition.y\r\n });\r\n this.stage.addChild(tile.bmp);\r\n this.grassTiles.push(tile);\r\n }\r\n }\r\n\r\n saveTiles.sort((a, b) => {\r\n return a - b;\r\n });\r\n for (let i = 0; i < saveTiles.length; i++) {\r\n this.tiles.splice(saveTiles[i], 1);\r\n for (let i = 0; i < saveTiles.length; i++) {\r\n saveTiles[i]--;\r\n }\r\n }\r\n\r\n // if exist, remove the wall from the entrance of the princess tower\r\n if (this.getTileMaterial({\r\n x: this.tilesX - 2,\r\n y: 10\r\n }) === \"wall\") {\r\n this.removeTile({\r\n x: this.tilesX - 2,\r\n y: 10\r\n });\r\n const tile = new Tile('grass', {\r\n x: this.tilesX - 2,\r\n y: 10\r\n });\r\n this.stage.addChild(tile.bmp);\r\n this.grassTiles.push(tile);\r\n }\r\n }", "title": "" }, { "docid": "ca0055fcbf05e5232473024ea32c3c49", "score": "0.60048443", "text": "drawGridCells() {\n this.ctx.lineWidth = 3;\n Object.keys(this.props.graph.coordinates).forEach((roomid) => {\n const { x, y } = this.props.graph.coordinates[roomid];\n this.drawCell(roomid, x, y, this.tile);\n });\n }", "title": "" }, { "docid": "9b8cc7ef2227eb27960501b382857d1c", "score": "0.6002947", "text": "function Createpath(array,x,y){\n\tvar return_path=\"\";\n\tvar random_num;\n\tvar finder;\n\tvar path1=[];\n\tvar point_x=0;\n\tvar point_y=0;\n\tvar prev_x=x;\n\tvar prev_y=y;\n\tvar home_x=prev_x;\n\tvar home_y=prev_y;\n\tvar end;\n\t//console.log(museum);\n\tvar img=museum.getElementsByTagNameNS(svgNS,\"image\");\n\tconsole.log(img);\n\trandom_num=Math.floor(Math.random() * 3); // random numbers 0-2\n\tswitch(random_num){\n\t\tcase 0:\n\t\t\tfinder = new PF.DijkstraFinder({\n\t\t\t\tallowDiagonal: true,\n\t\t\t\tdontCrossCorners: true\n\t\t\t});\n\t\t\t//console.log(\"Dijkstra\");\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tfinder = new PF.AStarFinder({\n\t\t\t\tallowDiagonal: true,\n\t\t\t\tdontCrossCorners: true\n\t\t\t});\n\t\t\t//console.log(\"A*\");\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tfinder=new PF.BreadthFirstFinder({\n\t\t\t\tallowDiagonal: true,\n\t\t\t\tdontCrossCorners: true\n\t\t\t});\n\t\t\t//console.log(\"BFS\");\n\t\t\tbreak;\n\t\t\n\t\t\n\t\n\t}\n\t//console.log(finder);\n\t//console.log(random_num);\n\tgridBackup=grid.clone();\n\t//allaxe onoma\n\tarray=array.split(\",\");\n\t\tfor(var i in array){\n\t\t\tif(array[i]==\",\"){\n\t\t\t\t//console.log(\"Den doulepse to malakismeno\");\t\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\t\t\n\t\t\tpoint_x=parseInt(img[array[i]-1].getAttributeNS(null,\"x\"));\n\t\t\tpoint_y=parseInt(img[array[i]-1].getAttributeNS(null,\"y\"));\n\t\t\t//if this image has changed position(e.g. has been dragged by the user in a different position)\n\t\t\tif(img[array[i]-1].transform.baseVal.length!=0){\n\t\t\t\n\t\t\t\ttransform_x=parseInt(img[array[i]-1].transform.baseVal[0].matrix.e);\n\t\t\t\tpoint_x+=transform_x;\n\t\t\t\t//console.log(\"To x einai\"+point_x);\n\t\t\t\ttransform_y=parseInt(img[array[i]-1].transform.baseVal[0].matrix.f);\n\t\t\t\tpoint_y+=transform_y;\n\t\t\t\t\n\t\t\t}\n\t\t\t//console.log(\"To y einai\"+ point_y);\n\t\t\t\n\t\t\t//console.log((prev_y)+\",\" +(prev_x)+\", \"+point_x+\", \"+point_y);\n\t\t\t\n\t\t\t//console.log(\"kiallo path\");\n\t\t\t\n\t\t\tpath1 = finder.findPath((prev_x), (prev_y), point_x, point_y, grid.clone());\n\t\t\tconsole.log(path1);\n\t\t\tif(path1.length==0){\n\t\t\t\talert(\"Path not found. Possible conflict between exhibit and wall.Head back to load museum in order to fix this\");\n\t\t\t\tstop_movement_error=true;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t//console.log(path1);\n\t\t\tfor(k=0;k<path1.length;k++){\n\t\t\t\t//console.log(\"1\");\n\t\t\t\tvisiting_map[path1[k][1]][path1[k][0]]+=1;\n\t\t\t\treturn_path+=(path1[k][0]-x)+\",\"+(path1[k][1]-y)+\" \";\n\t\t\t}\n\t\t\t//console.log(return_path +\"//////\"+i);\n\t\t\tprev_x=point_x;\n\t\t\tprev_y=point_y;\n\t\t\t//console.log(\"/////\"+i+\"//\"+prev_x+\",\"+prev_y);\n\t\t\tgrid=gridBackup;\n\t\t}\n\t\tend=findDoor(true);\n\t\tconsole.log(parseInt(end.x)+\",,\"+parseInt(end.y));\n\t\tconsole.log(museum);\n\t\tpath1 = finder.findPath((prev_x), (prev_y), parseInt(end.x), parseInt(end.y), grid.clone());\n\t\tconsole.log(path1);\n\t\t\t//console.log(path1);\n\t\t\tfor(k=0;k<path1.length;k++){\n\t\t\t\tvisiting_map[path1[k][1]][path1[k][0]]+=1;\n\t\t\t\t//console.log(\"visiting map\"+visiting_map[path1[k][1]][path1[k][0]]);\n\t\t\t\treturn_path+=(path1[k][0]-x)+\",\"+(path1[k][1]-y)+\" \";\n\t\t\t}\n\t\treturn return_path;\n}", "title": "" }, { "docid": "0ba638ce38edca2d06bac3d3a19b8e5e", "score": "0.5995787", "text": "function dijkstra(){\n //Get Neighbors\n \n let currentNodeCol = startNodeCol;\n let currentNodeRow = startNodeRow;\n let currentNode = grid[startNodeRow][startNodeCol];\n currentNode.dist = 0;\n currentNode.isVisited = true;\n let q = [];\n let minIndex;\n q.push([startNodeRow,startNodeCol]);\n while (q.length > 0) {\n minIndex = getNextInQ(q);\n currentNodeRow = q[minIndex][0];\n currentNodeCol = q[minIndex][1];\n currentNode = grid[q[minIndex][0]][q[minIndex][1]];\n q.splice(minIndex,1);\n \n let neighborsList = getNeighbors(currentNode);\n for (var i = 0; i < neighborsList.length; i++) {\n if (grid[neighborsList[i][0]][neighborsList[i][1]].finish == true) {\n grid[neighborsList[i][0]][neighborsList[i][1]].prevCol = currentNode.col;\n grid[neighborsList[i][0]][neighborsList[i][1]].prevRow = currentNode.row;\n currentNode = grid[neighborsList[i][0]][neighborsList[i][1]];\n currentNode.routeLength = grid[currentNode.prevRow][currentNode.prevCol].routeLength +currentNode.dist;\n document.getElementById(\"pathLength\").innerHTML = currentNode.routeLength;\n let nodeLength = 0;\n\n while (currentNode.row != startNodeRow || currentNode.col != startNodeCol) {\n path.push([currentNode.row, currentNode.col, \"path\"])\n currentNode = grid[currentNode.prevRow][currentNode.prevCol];\n nodeLength++;\n }\n document.getElementById(\"nodeSize\").innerHTML = nodeLength;\n path.reverse();\n path.push([-1,-1, \"End\"]);\n directions = directions.concat(path);\n disableControls();\n \n runDirections();\n \n return;\n }\n else if (grid[neighborsList[i][0]][neighborsList[i][1]].isWall == false &&\n grid[neighborsList[i][0]][neighborsList[i][1]].isDone == false) {\n if(grid[neighborsList[i][0]][neighborsList[i][1]].isVisited == false){\n grid[neighborsList[i][0]][neighborsList[i][1]].routeLength = currentNode.routeLength +grid[neighborsList[i][0]][neighborsList[i][1]].dist;\n grid[neighborsList[i][0]][neighborsList[i][1]].prevCol = currentNode.col;\n grid[neighborsList[i][0]][neighborsList[i][1]].prevRow = currentNode.row;\n grid[neighborsList[i][0]][neighborsList[i][1]].isVisited = true;\n directions.push([neighborsList[i][0], neighborsList[i][1], \"visited\"]);\n }\n else if(grid[neighborsList[i][0]][neighborsList[i][1]].routeLength > currentNode.routeLength + grid[neighborsList[i][0]][neighborsList[i][1]].dist){\n grid[neighborsList[i][0]][neighborsList[i][1]].routeLength = currentNode.routeLength +grid[neighborsList[i][0]][neighborsList[i][1]].dist;\n grid[neighborsList[i][0]][neighborsList[i][1]].prevCol = currentNode.col;\n grid[neighborsList[i][0]][neighborsList[i][1]].prevRow = currentNode.row;\n \n }\n q.push(neighborsList[i]);\n }\n }\n \n //Done with this element. Will turn it into pink\n if(grid[currentNodeRow][currentNodeCol].isDone == false){\n grid[currentNodeRow][currentNodeCol].isDone = true;\n directions.push([currentNodeRow, currentNodeCol, \"isDone\"]);\n }\n //document.getElementById(\"[\" + (currentNodeCol) + \",\" + (currentNodeRow) + \"]\").style.background = \"pink\";\n }\n\n}", "title": "" }, { "docid": "f774c89623655977bc0607a7d3274768", "score": "0.59909374", "text": "addNeighbors(game, grid){\r\n this.neighbors = []; // start with empty neighbors\r\n let col = this.loc.x/game.w;\r\n let row = this.loc.y/game.w;\r\n let n,ne,e,se,s,sw,w,nw = null; // all eight neighbors\r\n\r\n if(row > 0 ){\r\n n = grid[col][row-1];\r\n if(!n.occupied && !n.hasTower)\r\n this.neighbors.push(n); //N\r\n }\r\n if( col < game.cols-1){\r\n e = grid[col+1][row];\r\n if(!e.occupied && !e.hasTower)\r\n this.neighbors.push(e); //E\r\n }\r\n if(row < game.rows-1){\r\n s = grid[col][row+1];\r\n if(!s.occupied && !s.hasTower)\r\n this.neighbors.push(s); //S\r\n }\r\n if(col > 0){\r\n w = grid[col-1][row];\r\n if(!w.occupied && !w.hasTower)\r\n this.neighbors.push(w); //W\r\n }\r\n if( col < game.cols-1 && row > 0){ // NE\r\n ne = grid[col+1][row-1];\r\n if(!ne.occupied && !ne.hasTower && !(n && (n.occupied || n.hasTower) && e && (e.occupied || e.hasTower))){\r\n this.neighbors.push(ne);\r\n }\r\n }\r\n if(col < game.cols-1 && row < game.rows-1){ // SE\r\n se = grid[col+1][row+1];\r\n if(!se.occupied && !se.hasTower && !(e && (e.occupied || e.hasTower) && s && (s.occupied || s.hasTower))){\r\n this.neighbors.push(se);\r\n }\r\n }\r\n if(col > 0 && row < game.rows-1 ){ // SW\r\n sw = grid[col-1][row+1];\r\n if(!sw.occupied && !sw.hasTower && !(s && (s.occupied || s.hasTower) && w && (w.occupied || w.hasTower))){\r\n this.neighbors.push(sw);\r\n }\r\n }\r\n if(col > 0 && row > 0){ // NW\r\n nw = grid[col-1][row-1];\r\n if(!nw.occupied && !nw.hasTower && !(w && (w.occupied || w.hasTower) && n && (n.occupied || n.hasTower))){\r\n this.neighbors.push(nw);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "845454497ff9f2b20d743748333d6c32", "score": "0.5990778", "text": "function CellNode(i,j){\n this.i = i; // Position\n this.j = j;\n \n this.f = 0; // estimate, f = g+h\n this.g = 0; // distance\n this.h = 0; // heuristic\n this.predecessor;\n \n this.neighbors = [];\n /* ---- Important property of a node ----\n * additionalEdgeValue = -1 <=> Wall\n * additionalEdgeValue = 0 <=> Ground\n * additionalEdgeValue = 1 <=> Tall Grass\n * additionalEdgeValue = 2 <=> Mug\n * additionalEdgeValue = 3 <=> Water\n */\n this.additionalEdgeValue = 0;\n \n // Methods\n this.show = function(col){\n fill(col);\n noStroke();\n rect(this.i*wCell, this.j*hCell, wCell-1, hCell-1);\n };\n \n this.addNeighbors = function(grid){\n var i = this.i;\n var j = this.j;\n \n if(i < cols-1 && grid[i+1][j].additionalEdgeValue !== -1)\n this.neighbors.push(grid[i+1][j]);\n \n if(i > 0 && grid[i-1][j].additionalEdgeValue !== -1)\n this.neighbors.push(grid[i-1][j]);\n \n if(j < rows-1 && grid[i][j+1].additionalEdgeValue !== -1)\n this.neighbors.push(grid[i][j+1]);\n \n if(j > 0 && grid[i][j-1].additionalEdgeValue !== -1)\n this.neighbors.push(grid[i][j-1]);\n };\n \n}", "title": "" }, { "docid": "031391c9a5368e4e0314ece474c82d72", "score": "0.59898275", "text": "drawGrid() {\n const { cellLength, color, lineWidth } = this.styles;\n const center = this.center;\n\n this.ctx.save();\n this.ctx.strokeStyle = color;\n this.ctx.lineWidth = lineWidth;\n this.ctx.beginPath();\n\n // Columns\n for (let i = 0; i <= this.game.cols; ++i) {\n const xOffset = i * cellLength - (this.game.cols * cellLength) / 2 + this.panOffset[0];\n const yOffset = (this.game.rows * cellLength) / 2 + this.panOffset[1];\n\n this.ctx.moveTo(center[0] + xOffset, center[1] - yOffset);\n this.ctx.lineTo(center[0] + xOffset, center[1] + yOffset);\n }\n\n // Rows\n for (let i = 0; i <= this.game.rows; ++i) {\n const xOffset = (this.game.cols * cellLength) / 2 + this.panOffset[0];\n const yOffset = i * cellLength - (this.game.rows * cellLength) / 2 + this.panOffset[1];\n\n this.ctx.moveTo(center[0] - xOffset, center[1] + yOffset);\n this.ctx.lineTo(center[0] + xOffset, center[1] + yOffset);\n }\n\n this.ctx.stroke();\n this.ctx.restore();\n }", "title": "" }, { "docid": "c27e3ca7b85ec85f78f77ef956e61885", "score": "0.5988809", "text": "function reDrawSurrounding(grid, svg, gridPos){\n \n var i = gridPos[1];\n var j = gridPos[0];\n \n //Above\n if (path.onGrid(i-1, j)){\n drawSquare(svg, grid[i-1][j], [j, i-1]);\n }\n if (path.onGrid(i-1, j+1)){\n drawSquare(svg, grid[i-1][j+1], [j+1, i-1]);\n }\n \n //Below\n if (path.onGrid(i+2, j)){\n drawSquare(svg, grid[i+2][j], [j, i+2]);\n }\n if (path.onGrid(i+2, j+1)){\n drawSquare(svg, grid[i+2][j+1], [j+1, i+2]);\n }\n \n //Left\n if (path.onGrid(i, j-1)){\n drawSquare(svg, grid[i][j-1], [j-1, i]);\n }\n if (path.onGrid(i+1, j-1)){\n drawSquare(svg, grid[i+1][j-1], [j-1, i+1]);\n }\n \n //Right\n if (path.onGrid(i, j+2)){\n drawSquare(svg, grid[i][j+2], [j+2, i]);\n }\n if (path.onGrid(i+1, j+2)){\n drawSquare(svg, grid[i+1][j+2], [j+2, i+1]);\n }\n}", "title": "" }, { "docid": "e1223e3a2b558906dde42aa7339052f3", "score": "0.5976887", "text": "function buildGrid(){\n\n // Create a grid that has walls around the edge and blocks with different classes to denote different types\n // For each loop, get the position x and y and set respective inner features\n for(let posY = 0; posY < maxRows; posY++)\n {\n for(let posX = 0; posX < maxCols; posX++)\n {\n // Create a div element\n let div = document.createElement(\"div\");\n div.id= \"\" + posY + \"-\" + posX + \"\"; // Give the div a unique id\n \n // Set initial class to an inner-block, to be changed if criteria met below\n div.setAttribute(\"class\", \"inner-block\"); \n // Set values of all far outside blocks to a gray wall block\n if(posY == 0 || posX == 0 || posY == maxRows - 1 || posX == maxCols - 1)\n {\n div.setAttribute(\"class\", \"wall-block\");\n }\n // Set values of all blocks inside the wall by 1 to an edge block with no color change\n if(posY == 1 && posX != 0 && posX != maxRows - 1)\n {\n div.setAttribute(\"class\", \"edge-block\");\n }\n else if(posX == 1 && posY != 0 && posY != maxCols - 1)\n {\n div.setAttribute(\"class\", \"edge-block\");\n }\n else if(posY == maxCols - 2 && posX != 0 && posX != maxRows - 1)\n {\n div.setAttribute(\"class\", \"edge-block\");\n }\n else if(posX == maxCols - 2 && posY != 0 && posY != maxCols - 1)\n {\n div.setAttribute(\"class\", \"edge-block\");\n }\n\n // Helper variables to create the position of the block\n let colString = \"grid-column: \" + (posX + 1);\n let rowString = \"grid-row: \" + (posY + 1);\n // Apply grid position as style\n div.setAttribute(\"style\", colString + \"; \" + rowString + \";\");\n // Add it to the body to display\n $(\"#body-grid\").append(div);\n }\n }\n }", "title": "" }, { "docid": "069397149260eee9ba51c5672c4735e1", "score": "0.597658", "text": "function gridLines(){\n stroke(0);\n for(let i = 0; i <= width + sclX; i += sclX){\n line(i,0, i, height);\n }\n for(let i = 0; i <= height + sclY; i += sclY){\n line(0,i, width, i);\n }\n}", "title": "" }, { "docid": "f3213443864a3de8f60bf64c29379ef8", "score": "0.59722143", "text": "function drawmainboard(from_rank,from_file,allowedresults){\n\tvar boardData = processData(480, from_rank,from_file,allowedresults);\n\n\tvar grid = d3.select(\"#chart\").append(\"svg\")\n\t\t\t\t\t.attr(\"width\", 600)\n\t\t\t\t\t.attr(\"height\", 600)\n\t\t\t\t\t.attr(\"x\",0)\n\t\t\t\t\t.attr(\"y\",0)\n\t\t\t\t\t.attr(\"class\", \"chart\");\n\n\tvar row = grid.selectAll(\".row\")\n\t\t\t\t .data(boardData)\n\t\t\t\t.enter().append(\"svg:g\")\n\t\t\t\t .attr(\"class\", \"row\");\n\n\tvar col = row.selectAll(\".cell\")\n\t\t\t\t .data(function (d) { return d; })\n\t\t\t\t.enter().append(\"svg:g\")\n\t\t\t\t.append(\"rect\")\n\t\t\t\t .attr(\"class\", \"cell\")\n\t\t\t\t .attr(\"rank\", function(d){ return d.rank})\n\t\t\t\t .attr(\"file\",function(d){return d.file})\n\t\t\t\t .attr(\"x\", function(d) { return d.x; })\n\t\t\t\t .attr(\"y\", function(d) { return d.y; })\n\t\t\t\t .attr(\"width\", function(d) { return d.width; })\n\t\t\t\t .attr(\"height\", function(d) { return d.height; })\n\t\t\t\t .property(\"clicked\",function(d){\n\t\t\t\t \t\t\t\t\t\tif((d.file === from_file) && (d.rank === from_rank) || \n\t\t\t\t \t\t\t\t\t\tislegalmove(d.rank,d.file,from_rank,from_file)){\n\t\t\t\t \t\t\t\t\t\t\treturn true}\n\t\t\t\t \t\t\t\t\t\telse{\n\t\t\t\t \t\t\t\t\t\t\treturn false}\n\t\t\t\t \t\t\t\t\t\t})\n\t\t\t\t .on('mouseover', function() {\n\t\t\t\t\tif(!(d3.select(this).property(\"clicked\"))){\n\t\t\t\t\t\td3.select(this)\n\t\t\t\t\t\t.style('fill', '#0FE6CA');\n\t\t\t\t\t}\n\t\t\t\t })\n\t\t\t\t .on('mouseout', function() {\n\t\t\t\t \tif(!(d3.select(this).property(\"clicked\"))){\n\t\t\t\t\t\td3.select(this)\n\t\t\t\t\t\t\t.style('fill', function(d){\n\t\t\t\t\t\t\t\t\tif((d.file%2===0) && (d.rank%2===0) ||\n\t\t\t\t\t\t\t\t\t\t(d.file%2===1) && (d.rank%2===1)){\n\t\t\t\t\t\t\t\t\t\treturn \"#E8DDCB\";\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\treturn \"#CDB380\";\n\t\t\t\t\t\t\t\t\t}});}})\n\t\t\t\t .on('click', function(d) {\tglobaltest = \"THIS TEST SUCCEEDED\"\n\t\t\t\t \t\t\t\t\t\t\tif(d3.select(this).property(\"clicked\")){\n\t\t\t\t \t\t\t\t\t\t\t\td3.selectAll(\"svg\").remove();\n\t\t\t\t \t\t\t\t\t\t\t\tdrawmainboard(99,99,globalresults);\n\t\t\t\t \t\t\t\t\t\t\t\tdrawFischer(99,99,globalresults);\n\t\t\t\t\t\t\t\t\t\t\t\tdrawCarlsen(99,99,globalresults);\n\t\t\t\t \t\t\t\t\t\t\t} else {\n\t\t\t\t \t\t\t\t\t\t\t\td3.selectAll(\"svg\").remove();\n\t\t\t\t \t\t\t\t\t\t\t\tglobalrank = d.rank;\n\t\t\t\t \t\t\t\t\t\t\t\tglobalfile = d.file;\n\t\t\t\t \t\t\t\t\t\t\t\tdrawmainboard(globalrank,globalfile,globalresults);\n\t\t\t\t \t\t\t\t\t\t\t\tdrawFischer(globalrank,globalfile,globalresults);\n\t\t\t\t\t\t\t\t\t\t\t\tdrawCarlsen(globalrank,globalfile,globalresults);}})\n\n\t\t\t\t .style(\"fill\", function(d){\n\t\t\t\t \t\t\t\t\tif((d.file === from_file) && (d.rank === from_rank)){\n\t\t\t\t \t\t\t\t\t\treturn \"#036564\";\n\t\t\t\t \t\t\t\t\t} else if(islegalmove(d.rank,d.file,from_rank,from_file)){\n\t\t\t\t \t\t\t\t\t\treturn \"#033649\";\n\t\t\t\t \t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif((d.file%2===0) && (d.rank%2===0) ||\n\t\t\t\t\t\t\t\t\t\t(d.file%2===1) && (d.rank%2===1)){\n\t\t\t\t\t\t\t\t\t\treturn \"#E8DDCB\";\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\treturn \"#CDB380\";\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t })\n\t\t\t\t .style(\"stroke\", '#555');\n\t\t\t\t \n\tvar Problabels = row.selectAll(\"g\")\n\t\t\t\t\t.append(\"text\")\n\t\t\t\t\t.attr(\"x\",function(d){return d.x})\n\t\t\t\t\t.attr(\"y\",function(d){return d.y})\n\t\t\t\t\t.attr(\"dy\",\"1.5em\")\n\t\t\t\t\t.attr(\"dx\",\"0.3em\")\n\t\t\t\t\t.text(function(d){\n\t\t\t\t\t\tif(islegalmove(d.rank,d.file,from_rank,from_file)){\n\t\t\t\t\t\t\treturn \"\"+d.prob.toFixed(2);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t.attr(\"fill\",\"white\")\n\t\t\t\t\t.attr(\"font-family\",\"sans-serif\")\n\t\t\t\t\t.attr(\"font-size\",\"25px\");\n\t\t\t\t\t\n\tvar TimeValue = row.selectAll(\"g\")\n\t\t\t\t\t\t.append(\"text\")\n\t\t\t\t\t\t.attr(\"x\",function(d){return d.x})\n\t\t\t\t\t\t.attr(\"y\",function(d){return d.y})\n\t\t\t\t\t\t.attr(\"dy\",\"1em\")\n\t\t\t\t\t\t.attr(\"dx\",\"0.2em\")\n\t\t\t\t\t\t.text(function(d){\n\t\t\t\t\t\t\tif((d.rank == from_rank) && (d.file == from_file)){\n\t\t\t\t\t\t\t\treturn \"\"+d.time.toFixed(1);\n\t\t\t\t\t\t\t} else {\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\t.attr(\"fill\",\"white\")\n\t\t\t\t\t\t.attr(\"font-family\",\"sans-serif\")\n\t\t\t\t\t\t.attr(\"font-size\",\"25px\");\n\tvar TimeLabel = row.selectAll(\"g\")\n\t\t\t\t\t\t.append(\"text\")\n\t\t\t\t\t\t.attr(\"x\",function(d){return d.x})\n\t\t\t\t\t\t.attr(\"y\",function(d){return d.y})\n\t\t\t\t\t\t.attr(\"dy\",\"2.5em\")\n\t\t\t\t\t\t.attr(\"dx\",\"0.3em\")\n\t\t\t\t\t\t.text(function(d){\n\t\t\t\t\t\t\tif((d.rank == from_rank) && (d.file == from_file)){\n\t\t\t\t\t\t\t\treturn \"turns\";\n\t\t\t\t\t\t\t} else {\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\t.attr(\"fill\",\"white\")\n\t\t\t\t\t\t.attr(\"font-family\",\"sans-serif\")\n\t\t\t\t\t\t.attr(\"font-size\",\"20px\");\n\tvar Ranklabels = row.selectAll(\"g\")\n\t\t\t\t\t .append(\"text\")\n\t\t\t\t\t .attr(\"x\",function(d){return d.x})\n\t\t\t\t\t .attr(\"y\",function(d){return d.y})\n\t\t\t\t\t .attr(\"dy\",\"2.25em\")\n\t\t\t\t\t .attr(\"dx\",\"-2em\")\n\t\t\t\t\t .text(function(d){\n\t\t\t\t\t \tif(d.file == 0){\n\t\t\t\t\t \t\treturn \"\"+ranktolabel(d.rank);\n\t\t\t\t\t \t} else {\n\t\t\t\t\t \t\treturn \"\";\n\t\t\t\t\t \t}\n\t\t\t\t\t })\n\t\t\t\t\t .attr(\"font-family\",\"sans-serif\")\n\t\t\t\t\t .attr(\"font-size\",\"20px\");\n\tvar Filelabels = row.selectAll(\"g\")\n\t\t\t\t\t .append(\"text\")\n\t\t\t\t\t .attr(\"x\",function(d){return d.x})\n\t\t\t\t\t .attr(\"y\",function(d){return d.y})\n\t\t\t\t\t .attr(\"dy\",\"4.5em\")\n\t\t\t\t\t .attr(\"dx\",\"1.3em\")\n\t\t\t\t\t .text(function(d){\n\t\t\t\t\t \tif(d.rank == 7){\n\t\t\t\t\t \t\treturn filetolabel[d.file];\n\t\t\t\t\t \t} else {\n\t\t\t\t\t \t\treturn \"\";\n\t\t\t\t\t \t}\n\t\t\t\t\t })\n\t\t\t\t\t .attr(\"font-family\",\"sans-serif\")\n\t\t\t\t\t .attr(\"font-size\",\"20px\")\n\tvar Title = row.select(\"g\")\n\t\t\t\t\t\t.append(\"text\")\n\t\t\t\t\t\t.attr(\"x\",0)\n\t\t\t\t\t\t.attr(\"y\",30)\n\t\t\t\t\t\t.text(function(d){return \"Move Probabilities for Knights\"})\n\t\t\t\t\t\t.attr(\"font-family\",\"sans-serif\")\n\t\t\t\t\t\t.attr(\"font-size\",\"30px\");\t\n\tvar Showing = row.select(\"g\")\n\t\t\t\t\t\t.append(\"text\")\n\t\t\t\t\t\t.attr(\"x\",0)\n\t\t\t\t\t\t.attr(\"y\",48)\n\t\t\t\t\t\t.text(function(d){\n\t\t\t\t\t\t\tif(allowedresults == 0){\n\t\t\t\t\t\t\t\treturn \"Showing Only Losses\";\n\t\t\t\t\t\t} else if(allowedresults == 1){\n\t\t\t\t\t\t\t\treturn \"Showing Only Wins/Draws\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treturn \"Showing All Outcomes\";\n\t\t\t\t\t\t}});\n}", "title": "" }, { "docid": "85a98ad37a04eaaf72fb2ed1862d7ef9", "score": "0.59693193", "text": "function Cell(x, y) {\n this.x = x;\n this.y = y;\n\n this.visited = false;\n this.visited2 = false;\n\n // Check neighbours for current\n this.checkNeighbours = function() {\n var neighbours = [];\n\n var top = grid[index(x, y-1)];\n var right = grid[index(x+1, y)];\n var bottom = grid[index(x, y+1)];\n var left = grid[index(x-1, y)];\n\n // Check that every top, right, bottom, left has not been visited by anyone nor it is empty\n if (top && !top.visited && !top.visited2 && !top.visited3 && !top.empty) { neighbours.push(top); }\n if (right && !right.visited && !right.visited2 && !right.visited3 && !right.empty) { neighbours.push(right); }\n if (bottom && !bottom.visited && !bottom.visited2 && !bottom.visited3 && !bottom.empty) { neighbours.push(bottom); }\n if (left && !left.visited && !left.visited2 && !left.visited3 && !left.empty) { neighbours.push(left); }\n\n // Choose a random neighbour\n if (neighbours.length > 0) {\n var r = floor(random(0, neighbours.length));\n return neighbours[r];\n } else {\n return undefined;\n }\n }\n\n // Check neighbours for current2\n this.checkNeighbours2 = function() {\n var neighbours2 = [];\n\n var top = grid[index(x, y-1)];\n var right = grid[index(x+1, y)];\n var bottom = grid[index(x, y+1)];\n var left = grid[index(x-1, y)];\n\n if (top && !top.visited && !top.visited2 && !top.visited3 && !top.empty) { neighbours2.push(top); }\n if (right && !right.visited && !right.visited2 && !right.visited3 && !right.empty) { neighbours2.push(right); }\n if (bottom && !bottom.visited && !bottom.visited2 && !bottom.visited3 && !bottom.empty) { neighbours2.push(bottom); }\n if (left && !left.visited && !left.visited2 && !left.visited3 && !left.empty) { neighbours2.push(left); }\n\n if (neighbours2.length > 0) {\n var r = floor(random(0, neighbours2.length));\n return neighbours2[r];\n } else {\n return undefined;\n }\n }\n\n // Check neighbours for current3\n this.checkNeighbours3 = function() {\n var neighbours3 = [];\n\n var top = grid[index(x, y-1)];\n var right = grid[index(x+1, y)];\n var bottom = grid[index(x, y+1)];\n var left = grid[index(x-1, y)];\n\n if (top && !top.visited && !top.visited2 && !top.visited3 && !top.empty) { neighbours3.push(top); }\n if (right && !right.visited && !right.visited2 && !right.visited3 && !right.empty) { neighbours3.push(right); }\n if (bottom && !bottom.visited && !bottom.visited2 && !bottom.visited3 && !bottom.empty) { neighbours3.push(bottom); }\n if (left && !left.visited && !left.visited2 && !left.visited3 && !left.empty) { neighbours3.push(left); }\n\n if (neighbours3.length > 0) {\n var r = floor(random(0, neighbours3.length));\n return neighbours3[r];\n } else {\n return undefined;\n }\n }\n\n this.highlight = function() {\n var x = this.x*cell_w;\n var y = this.y*cell_h;\n var highlight_d = cell_w/highlight_f;\n noStroke();\n fill(c_1);\n ellipse(x+cell_w/2, y+cell_w/2, highlight_d, highlight_d);\n }\n\n this.highlight2 = function() {\n var x = this.x*cell_w;\n var y = this.y*cell_h;\n var highlight_d = cell_w/highlight_f;\n noStroke();\n fill(c_2);\n ellipse(x+cell_w/2, y+cell_w/2, highlight_d, highlight_d);\n }\n\n this.highlight3 = function() {\n var x = this.x*cell_w;\n var y = this.y*cell_h;\n var highlight_d = cell_w/highlight_f;\n noStroke();\n fill(c_3);\n ellipse(x+cell_w/2, y+cell_w/2, highlight_d, highlight_d);\n }\n\n this.show = function() {\n var x = this.x*cell_w;\n var y = this.y*cell_h;\n var visited_d = cell_w/visited_f;\n var empty_d = cell_w/empty_f;\n noStroke();\n fill(c_empty);\n ellipse(x+cell_w/2, y+cell_w/2, empty_d, empty_d);\n\n if (this.visited) {\n noStroke();\n fill(c_1_v);\n ellipse(x+cell_w/2, y+cell_w/2, visited_d, visited_d);\n }\n\n if (this.visited2) {\n noStroke();\n fill(c_2_v);\n ellipse(x+cell_w/2, y+cell_w/2, visited_d, visited_d);\n }\n\n if (this.visited3) {\n noStroke();\n fill(c_3_v);\n ellipse(x+cell_w/2, y+cell_w/2, visited_d, visited_d);\n }\n }\n}", "title": "" }, { "docid": "019dfddfc3295ab25b49abc5c9f621ad", "score": "0.59639794", "text": "drawPath()\n {\n let n,k,nNode,nLine,node,linkNode,selNodeIdx;\n let vertices,indexes,vIdx,iIdx,elementIdx;\n let lineElementOffset,lineVertexStartIdx;\n let vertexBuffer,indexBuffer;\n let nodeSize=350;\n let drawSlop=50;\n let gl=this.core.gl;\n let shader=this.core.shaderList.debugShader;\n let tempPoint=new PointClass(0,0,0);\n \n // any nodes?\n \n nNode=this.nodes.length;\n if (nNode===0) return;\n \n // get total line count\n \n nLine=0;\n \n for (n=0;n!==nNode;n++) {\n nLine+=this.nodes[n].links.length;\n }\n \n // path nodes\n \n vertices=new Float32Array(((3*4)*nNode)+((3*2)*nLine));\n indexes=new Uint16Array((nNode*6)+(nLine*2));\n \n // nodes\n \n vIdx=0;\n iIdx=0;\n \n for (n=0;n!==nNode;n++) {\n node=this.nodes[n];\n \n tempPoint.x=-nodeSize;\n tempPoint.y=-nodeSize;\n tempPoint.z=0.0;\n tempPoint.matrixMultiplyIgnoreTransform(this.core.game.billboardMatrix);\n\n vertices[vIdx++]=tempPoint.x+node.position.x;\n vertices[vIdx++]=(tempPoint.y+node.position.y)+drawSlop;\n vertices[vIdx++]=tempPoint.z+node.position.z;\n\n tempPoint.x=nodeSize;\n tempPoint.y=-nodeSize;\n tempPoint.z=0.0;\n tempPoint.matrixMultiplyIgnoreTransform(this.core.game.billboardMatrix);\n\n vertices[vIdx++]=tempPoint.x+node.position.x;\n vertices[vIdx++]=(tempPoint.y+node.position.y)+drawSlop;\n vertices[vIdx++]=tempPoint.z+node.position.z;\n\n tempPoint.x=nodeSize;\n tempPoint.y=nodeSize;\n tempPoint.z=0.0;\n tempPoint.matrixMultiplyIgnoreTransform(this.core.game.billboardMatrix);\n\n vertices[vIdx++]=tempPoint.x+node.position.x;\n vertices[vIdx++]=(tempPoint.y+node.position.y)+drawSlop;\n vertices[vIdx++]=tempPoint.z+node.position.z;\n\n tempPoint.x=-nodeSize;\n tempPoint.y=nodeSize;\n tempPoint.z=0.0;\n tempPoint.matrixMultiplyIgnoreTransform(this.core.game.billboardMatrix);\n\n vertices[vIdx++]=tempPoint.x+node.position.x;\n vertices[vIdx++]=(tempPoint.y+node.position.y)+drawSlop;\n vertices[vIdx++]=tempPoint.z+node.position.z;\n \n elementIdx=n*4;\n \n indexes[iIdx++]=elementIdx; // triangle 1\n indexes[iIdx++]=elementIdx+1;\n indexes[iIdx++]=elementIdx+2;\n\n indexes[iIdx++]=elementIdx; // triangle 2\n indexes[iIdx++]=elementIdx+2;\n indexes[iIdx++]=elementIdx+3;\n }\n \n // lines\n \n lineElementOffset=iIdx;\n lineVertexStartIdx=Math.trunc(vIdx/3);\n \n for (n=0;n!==nNode;n++) {\n node=this.nodes[n];\n\n for (k=0;k!==node.links.length;k++) {\n linkNode=this.nodes[node.links[k]];\n \n vertices[vIdx++]=node.position.x;\n vertices[vIdx++]=node.position.y+drawSlop;\n vertices[vIdx++]=node.position.z;\n\n vertices[vIdx++]=linkNode.position.x;\n vertices[vIdx++]=linkNode.position.y+drawSlop;\n vertices[vIdx++]=linkNode.position.z;\n\n indexes[iIdx++]=lineVertexStartIdx++;\n indexes[iIdx++]=lineVertexStartIdx++;\n }\n }\n \n // build the buffers\n \n vertexBuffer=gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER,vertexBuffer);\n gl.bufferData(gl.ARRAY_BUFFER,vertices,gl.DYNAMIC_DRAW);\n gl.vertexAttribPointer(shader.vertexPositionAttribute,3,gl.FLOAT,false,0,0);\n\n indexBuffer=gl.createBuffer();\n\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,indexBuffer);\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER,indexes,gl.DYNAMIC_DRAW);\n \n // always draw it, no matter what\n \n shader.drawStart();\n \n // the lines\n \n gl.uniform3f(shader.colorUniform,0.0,0.0,1.0);\n gl.drawElements(gl.LINES,(nLine*2),gl.UNSIGNED_SHORT,(lineElementOffset*2));\n \n // the nodes\n \n gl.uniform3f(shader.colorUniform,1.0,0.0,0.0);\n gl.drawElements(gl.TRIANGLES,(nNode*6),gl.UNSIGNED_SHORT,0);\n \n gl.depthFunc(gl.LEQUAL);\n \n // overdraw for spawn nodes\n \n gl.uniform3f(shader.colorUniform,0.9,0.0,1.0);\n \n for (n=0;n!==nNode;n++) {\n if (this.nodes[n].spawn) gl.drawElements(gl.TRIANGLES,6,gl.UNSIGNED_SHORT,((n*6)*2));\n }\n \n // overdraw for key nodes\n \n gl.uniform3f(shader.colorUniform,0.0,1.0,0.0);\n \n for (n=0;n!==nNode;n++) {\n if (this.nodes[n].key!==null) gl.drawElements(gl.TRIANGLES,6,gl.UNSIGNED_SHORT,((n*6)*2));\n }\n \n // and overdraw for selected nodes\n \n selNodeIdx=this.core.developer.getSelectNode();\n \n if (selNodeIdx!==-1) {\n gl.uniform3f(shader.colorUniform,1.0,1.0,0.0);\n gl.drawElements(gl.TRIANGLES,6,gl.UNSIGNED_SHORT,((selNodeIdx*6)*2));\n }\n \n if (this.editorSplitStartNodeIdx!==-1) {\n gl.uniform3f(shader.colorUniform,0.0,1.0,1.0);\n gl.drawElements(gl.TRIANGLES,6,gl.UNSIGNED_SHORT,((this.editorSplitStartNodeIdx*6)*2));\n }\n \n if (this.editorSplitEndNodeIdx!==-1) {\n gl.uniform3f(shader.colorUniform,0.0,1.0,1.0);\n gl.drawElements(gl.TRIANGLES,6,gl.UNSIGNED_SHORT,((this.editorSplitEndNodeIdx*6)*2));\n }\n \n gl.depthFunc(gl.LESS);\n \n shader.drawEnd();\n \n // re-enable depth\n \n // tear down the buffers\n \n gl.bindBuffer(gl.ARRAY_BUFFER,null);\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,null);\n\n gl.deleteBuffer(vertexBuffer);\n gl.deleteBuffer(indexBuffer);\n }", "title": "" }, { "docid": "6e4af76ac758e6ec34e60409b506d76e", "score": "0.59561837", "text": "teleport() {\n let cSize = gridW/cols;\n let dCoord = floor(this.south/cSize);\n let uCoord = floor(this.north/cSize);\n let rCoord = floor(this.east/cSize);\n let lCoord = floor(this.west/cSize);\n let shiftDid = true;\n\n if (gate === \"open\") {\n push();\n // creates the streak made when the player dashes\n beginShape();\n strokeWeight(15);\n stroke(127,0,255);\n vertex(this.playerX,this.playerY);\n\n // algorithim used to create the dashing of the player in each direction, making sure the area it's dashing in is empty\n if(this.shiftCoolDown >= 100) {\n if (direction === \"up\"){\n if(yCoord <= 14) {\n gate = 'closed';\n shiftDid = false;\n }\n else if(grid[uCoord][xCoord]===0) {\n if(grid[uCoord+1][xCoord]===0 && grid[uCoord+2][xCoord]===0) {\n if(grid[uCoord-1][xCoord]===0) {\n this.playerY -= this.shiftD;\n pBulletY -= this.shiftD;\n this.north -= this.shiftD;\n this.south -= this.shiftD;\n }else{\n this.playerY -= (this.shiftD-60);\n pBulletY -= (this.shiftD-60);\n this.north -= (this.shiftD-60);\n this.south -= (this.shiftD-60);\n }\n }else{\n this.playerY -= (this.shiftD+60);\n pBulletY -= (this.shiftD+60);\n this.north -= (this.shiftD+60);\n this.south -= (this.shiftD+60);\n }\n }else if(grid[uCoord+1][xCoord]===0) {\n this.playerY -= (this.shiftD-60);\n pBulletY -= (this.shiftD-60);\n this.north -= (this.shiftD-60);\n this.south -= (this.shiftD-60);\n }else{\n shiftDid = false;\n }\n }\n \n \n if (direction === \"down\"){\n if(yCoord >= 79) {\n gate = 'closed';\n shiftDid = false;\n }\n else if(grid[dCoord+1][xCoord]===0) {\n if(grid[dCoord][xCoord]===0 && grid[dCoord-1][xCoord]===0) {\n if(grid[dCoord+2][xCoord]===0) {\n this.playerY += this.shiftD;\n pBulletY += this.shiftD;\n this.north += this.shiftD;\n this.south += this.shiftD;\n }else {\n this.playerY += (this.shiftD - 60);\n pBulletY += (this.shiftD - 60);\n this.north += (this.shiftD - 60);\n this.south += (this.shiftD - 60);\n }\n }else {\n this.playerY += (this.shiftD + 60);\n pBulletY += (this.shiftD + 60);\n this.north += (this.shiftD + 60);\n this.south += (this.shiftD + 60);\n }\n }\n else if (grid[dCoord][xCoord]===0) {\n this.playerY += (this.shiftD - 60);\n pBulletY += (this.shiftD - 60);\n this.north += (this.shiftD - 60);\n this.south += (this.shiftD - 60);\n }else{\n shiftDid = false;\n }\n }\n\n\n if (direction === \"left\"){\n if(grid[yCoord][lCoord]===0) {\n if(grid[yCoord][lCoord+1]===0 && grid[yCoord][lCoord+2]===0) {\n if(grid[yCoord][lCoord-1]===0) {\n this.playerX -= this.shiftD;\n pBulletX -= this.shiftD;\n this.east -= this.shiftD;\n this.west -= this.shiftD;\n }else {\n this.playerX -= (this.shiftD - 60);\n pBulletX -= (this.shiftD - 60);\n this.east -= (this.shiftD - 60);\n this.west -= (this.shiftD - 60);\n }\n }else {\n this.playerX -= (this.shiftD + 60);\n pBulletX -= (this.shiftD + 60);\n this.east -= (this.shiftD + 60);\n this.west -= (this.shiftD + 60);\n }\n }\n else if(grid[yCoord][lCoord+1]===0) {\n this.playerX -= (this.shiftD - 60);\n pBulletX -= (this.shiftD - 60);\n this.east -= (this.shiftD - 60);\n this.west -= (this.shiftD - 60);\n }else{\n shiftDid = false;\n }\n }\n\n\n if (direction === \"right\"){\n if(grid[yCoord][rCoord+1]===0){\n if(grid[yCoord][rCoord]===0 && grid[yCoord][rCoord-1]===0) {\n if(grid[yCoord][rCoord+2]===0) {\n this.playerX += this.shiftD;\n pBulletX += this.shiftD;\n this.east += this.shiftD;\n this.west += this.shiftD;\n }else {\n this.playerX += (this.shiftD - 60);\n pBulletX += (this.shiftD - 60);\n this.east += (this.shiftD - 60);\n this.west += (this.shiftD - 60);\n }\n }else{\n this.playerX += (this.shiftD + 60);\n pBulletX += (this.shiftD + 60);\n this.east += (this.shiftD + 60);\n this.west += (this.shiftD + 60);\n }\n }else if (grid[yCoord][rCoord]===0) {\n this.playerX += (this.shiftD - 60);\n pBulletX += (this.shiftD - 60);\n this.east += (this.shiftD - 60);\n this.west += (this.shiftD - 60);\n }else{\n shiftDid = false;\n }\n }\n\n if(direction === 'up-right') {\n if(yCoord <= 14) {\n gate = 'closed';\n shiftDid = false;\n }\n else if(grid[uCoord][rCoord+1]===0) {\n if(grid[uCoord+1][rCoord]===0 && grid[uCoord+2][rCoord-1]===0) {\n if(grid[uCoord-1][rCoord+2]===0) {\n this.playerY -= this.shiftD;\n pBulletY -= this.shiftD;\n this.north -= this.shiftD;\n this.south -= this.shiftD;\n this.playerX += this.shiftD;\n pBulletX += this.shiftD;\n this.east += this.shiftD;\n this.west += this.shiftD;\n }else{\n this.playerY -= (this.shiftD - 60);\n pBulletY -= (this.shiftD - 60);\n this.north -= (this.shiftD - 60);\n this.south -= (this.shiftD - 60);\n this.playerX += (this.shiftD - 60);\n pBulletX += (this.shiftD - 60);\n this.east += (this.shiftD - 60);\n this.west += (this.shiftD - 60);\n }\n }else{\n this.playerY -= (this.shiftD + 60);\n pBulletY -= (this.shiftD + 60);\n this.north -= (this.shiftD + 60);\n this.south -= (this.shiftD + 60);\n this.playerX += (this.shiftD + 60);\n pBulletX += (this.shiftD + 60);\n this.east += (this.shiftD + 60);\n this.west += (this.shiftD + 60);\n }\n }else if(grid[uCoord+1][rCoord]===0) {\n this.playerY -= (this.shiftD - 60);\n pBulletY -= (this.shiftD - 60);\n this.north -= (this.shiftD - 60);\n this.south -= (this.shiftD - 60);\n this.playerX += (this.shiftD - 60);\n pBulletX += (this.shiftD - 60);\n this.east += (this.shiftD - 60);\n this.west += (this.shiftD - 60);\n }\n }\n\n if(direction === 'up-left') {\n if(yCoord <= 14) {\n gate = 'closed';\n shiftDid = false;\n }\n else if(grid[uCoord][lCoord]===0) {\n if(grid[uCoord+1][lCoord+1]===0 && grid[uCoord+2][lCoord+2]===0) {\n if(grid[uCoord-1][lCoord-1]===0) {\n this.playerY -= this.shiftD;\n pBulletY -= this.shiftD;\n this.north -= this.shiftD;\n this.south -= this.shiftD;\n this.playerX -= this.shiftD;\n pBulletX -= this.shiftD;\n this.east -= this.shiftD;\n this.west -= this.shiftD;\n }else{\n this.playerY -= (this.shiftD - 60);\n pBulletY -= (this.shiftD - 60);\n this.north -= (this.shiftD - 60);\n this.south -= (this.shiftD - 60);\n this.playerX -= (this.shiftD - 60);\n pBulletX -= (this.shiftD - 60);\n this.east -= (this.shiftD - 60);\n this.west -= (this.shiftD - 60);\n }\n }else{\n this.playerY -= (this.shiftD + 60);\n pBulletY -= (this.shiftD + 60);\n this.north -= (this.shiftD + 60);\n this.south -= (this.shiftD + 60);\n this.playerX -= (this.shiftD + 60);\n pBulletX -= (this.shiftD + 60);\n this.east -= (this.shiftD + 60);\n this.west -= (this.shiftD + 60);\n }\n }else if(grid[uCoord+1][lCoord+1]===0) {\n this.playerY -= (this.shiftD - 60);\n pBulletY -= (this.shiftD - 60);\n this.north -= (this.shiftD - 60);\n this.south -= (this.shiftD - 60);\n this.playerX -= (this.shiftD - 60);\n pBulletX -= (this.shiftD - 60);\n this.east -= (this.shiftD - 60);\n this.west -= (this.shiftD - 60);\n }\n }\n\n if(direction === 'down-left') {\n if(yCoord >= 79) {\n gate = 'closed';\n shiftDid = false;\n }\n else if(grid[dCoord+1][lCoord]===0) {\n if(grid[dCoord][lCoord+1]===0 && grid[dCoord-1][lCoord+2]===0) {\n if(grid[dCoord+2][lCoord-1]===0) {\n this.playerY += this.shiftD;\n pBulletY += this.shiftD;\n this.north += this.shiftD;\n this.south += this.shiftD;\n this.playerX -= this.shiftD;\n pBulletX -= this.shiftD;\n this.east -= this.shiftD;\n this.west -= this.shiftD;\n }else{\n this.playerY += (this.shiftD - 60);\n pBulletY += (this.shiftD - 60);\n this.north += (this.shiftD - 60);\n this.south += (this.shiftD - 60);\n this.playerX -= (this.shiftD - 60);\n pBulletX -= (this.shiftD - 60);\n this.east -= (this.shiftD - 60);\n this.west -= (this.shiftD - 60);\n }\n }else{\n this.playerY += (this.shiftD + 60);\n pBulletY += (this.shiftD + 60);\n this.north += (this.shiftD + 60);\n this.south += (this.shiftD + 60);\n this.playerX -= (this.shiftD + 60);\n pBulletX -= (this.shiftD + 60);\n this.east -= (this.shiftD + 60);\n this.west -= (this.shiftD + 60);\n }\n }else if(grid[dCoord][lCoord+1]===0) {\n this.playerY += (this.shiftD - 60);\n pBulletY += (this.shiftD - 60);\n this.north += (this.shiftD - 60);\n this.south += (this.shiftD - 60);\n this.playerX -= (this.shiftD - 60);\n pBulletX -= (this.shiftD - 60);\n this.east -= (this.shiftD - 60);\n this.west -= (this.shiftD - 60);\n }\n }\n\n if(direction === 'down-right') {\n if(yCoord >= 79) {\n gate = 'closed';\n shiftDid = false;\n }\n else if(grid[dCoord+1][rCoord+1]===0) {\n if(grid[dCoord][rCoord]===0 && grid[dCoord-1][rCoord-1]===0) {\n if(grid[dCoord+2][rCoord+2]===0) {\n this.playerY += this.shiftD;\n pBulletY += this.shiftD;\n this.north += this.shiftD;\n this.south += this.shiftD;\n this.playerX += this.shiftD;\n pBulletX += this.shiftD;\n this.east += this.shiftD;\n this.west += this.shiftD;\n }else{\n this.playerY += (this.shiftD - 60);\n pBulletY += (this.shiftD - 60);\n this.north += (this.shiftD - 60);\n this.south += (this.shiftD - 60);\n this.playerX += (this.shiftD - 60);\n pBulletX += (this.shiftD - 60);\n this.east += (this.shiftD - 60);\n this.west += (this.shiftD - 60);\n }\n }else{\n this.playerY += (this.shiftD + 60);\n pBulletY += (this.shiftD + 60);\n this.north += (this.shiftD + 60);\n this.south += (this.shiftD + 60);\n this.playerX += (this.shiftD + 60);\n pBulletX += (this.shiftD + 60);\n this.east += (this.shiftD + 60);\n this.west += (this.shiftD + 60);\n }\n }else if(grid[dCoord][rCoord]===0) {\n this.playerY += (this.shiftD - 60);\n pBulletY += (this.shiftD - 60);\n this.north += (this.shiftD - 60);\n this.south += (this.shiftD - 60);\n this.playerX += (this.shiftD - 60);\n pBulletX += (this.shiftD - 60);\n this.east += (this.shiftD - 60);\n this.west += (this.shiftD - 60);\n }\n }\n }\n\n vertex(this.playerX, this.playerY);\n endShape();\n pop();\n\n // controls the cooldown of the player dashing making it so they cannot dash infinitely\n if(this.shiftCoolDown >= 100) { \n if(shiftDid) {\n this.shiftCoolDown -= 100;\n }\n }\n }\n\n gate = \"closed\";\n \n if(this.shiftCoolDown < 700) {\n this.shiftCoolDown += 1;\n }\n }", "title": "" }, { "docid": "3a8a731eac97745fa3605f98f46722a4", "score": "0.5955649", "text": "function draw(){\n background(255);\n for(let i = 0; i < cols; i++){\n for(let j = 0; j < rows; j++){\n let x = i*resolution;\n let y = j*resolution;\n if (grid[i][j] == 1){\n stroke(0);\n fill(0);\n rect(x,y,resolution,resolution);\n }\n }\n }\n\n evolve(ants);\n\n}", "title": "" }, { "docid": "f4c66dc8d57f46885e09197e1cd8f044", "score": "0.5955599", "text": "function drawCells() {\n // Get canvas context\n var canvas = document.getElementById('mainCanvas');\n var ctx = canvas.getContext('2d');\n\n // Cycle through the grid\n for (var i = 0; i < window.numCellsX; i++) {\n for (var j = 0; j < window.numCellsY; j++) {\n // Check if cell is alive or dead\n if (window.grid[i][j]) {\n // If cell is alive then color with cell color\n ctx.fillStyle = window.cellColor;\n } else {\n // If cell is dead then color with background color\n ctx.fillStyle = window.backgroundColor;\n }\n\n // Draw the cells\n var halfGridLineWidth = (window.cellSize / window.gridLineWidthRatio) / 2;\n ctx.fillRect((i * window.cellSize) + halfGridLineWidth,\n (j * window.cellSize) + halfGridLineWidth,\n window.cellSize - halfGridLineWidth, window.cellSize - halfGridLineWidth);\n }\n }\n}", "title": "" }, { "docid": "80e7002c9c0200d3345252a7ad46789d", "score": "0.59503186", "text": "function main(){\n\t$('#grid').attr(\"height\", $(document).height());\n\t$('#grid').attr(\"width\", $(document).width());\n\t\n\t$('body').click(function(eBody){\n\t\n\t\t//check drag\n\t\tif(isDrag) return false;\n\t\t//display node data\n\t\tvar nodeContainer = $(\"<div>\").addClass('node');\n\t\t$(\"body\").append(nodeContainer);\n\t\tnodeContainer.css({\n\t\t\ttop: eBody.clientY - nodeContainer.height()/2,\n\t\t\tleft: eBody.clientX - nodeContainer.width()/2,\n\t\t\tbackground: 'black'\n\t\t});\n\t\t//create node data\n\t\tfunction createNode(){\n\t\t\tvar node = {};\n\t\t\tnode.X = eBody.clientX;\n\t\t\tnode.Y = eBody.clientY;\n\t\t\tnode.adj = [];\n\t\t\tnode.visited = false;\n\t\t\tnode.dist = Infinity;\n\t\t\tnode.prev = null;\n\t\t\tnode.div = nodeContainer;\n\t\t\treturn node;\n\t\t}\n\t\tvar currNode = createNode();\n\t\t//create start and end nodes\n\t\tif(nodes.length == 0){ //start node\n\t\t\tvar start = $(\"<div>\").addClass('start');\n\t\t\tmakeDraggable(start);\n\t\t\t$('body').append(start);\n\t\t\tstart.css({\n\t\t\t\ttop: currNode.Y - start.height()/2,\n\t\t\t\tleft: currNode.X - start.width()/2,\n\t\t\t\tborder: '2px solid green'\n\t\t\t});\n\t\t\tstartNode = currNode;\n\t\t\tstartNode.dist = 0;\n\t\t\tstartNode.div.css({\n\t\t\t\tbackground: 'green'\n\t\t\t});\n\t\t}else if(nodes.length == 1){ //end node\n\t\t\tvar end = $(\"<div>\").addClass('end');\n\t\t\tmakeDraggable(end);\n\t\t\t$('body').append(end);\n\t\t\tend.css({\n\t\t\t\ttop: currNode.Y - end.height()/2,\n\t\t\t\tleft: currNode.X - end.width()/2,\n\t\t\t\tborder: '2px solid red'\n\t\t\t});\n\t\t\tendNode = currNode;\n\t\t\tendNode.div.css({\n\t\t\t\tbackground: 'red'\n\t\t\t});\n\t\t}\n\t\t//create edge data\n\t\tfunction createEdge(node){\n\t\t\tvar edge = {};\n\t\t\tedge.first = currNode;\n\t\t\tedge.second = node;\n\t\t\tedge.len = getDistance(currNode, node);\n\t\t\treturn edge;\n\t\t}\n\t\t//go through each node and check if edge is possible without overlap\n\t\tif(nodes.length > 0){\n\t\t\tnodes.forEach(function(node){\n\t\t\t\tvar currEdge = createEdge(node);\n\t\t\t\tif(edges.length > 0){\n\t\t\t\t\tvar noOverlap = true;\n\t\t\t\t\tfor(var i=0;i<edges.length;i++){\n\t\t\t\t\t\tif(checkOverlap(currEdge, edges[i])){ //check overlap\n\t\t\t\t\t\t\tnoOverlap = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t//if no overlap draw edge :3\n\t\t\t\t\tif(noOverlap){\n\t\t\t\t\t\tvar ctx = $('#grid')[0].getContext(\"2d\");\n\t\t\t\t\t\tctx.beginPath();\n\t\t\t\t\t\tctx.moveTo(currEdge.first.X, currEdge.first.Y);\n\t\t\t\t\t\tctx.lineTo(currEdge.second.X, currEdge.second.Y);\n\t\t\t\t\t\tctx.lineWidth = 0;\n\t\t\t\t\t\tctx.strokeStyle = 'black';\n\t\t\t\t\t\tctx.stroke();\n\t\t\t\t\t\tedges.push(currEdge);\n\t\t\t\t\t\tcurrEdge.first.adj.push(currEdge);\n\t\t\t\t\t\tcurrEdge.second.adj.push(currEdge);\t\t\t\t\t\n\t\n\t\t\t\t\t}\t\t\n\t\t\t\t}else{\n\t\t\t\t\tedges.push(currEdge);\n\t\t\t\t\tcurrEdge.first.adj.push(currEdge);\n\t\t\t\t\tcurrEdge.second.adj.push(currEdge);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tnodes.push(currNode);\n\t\t\n\t\tif(endNode){ //runs algorythm if there is exisiting endNode\n\t\t\tfindShortestPath();\n\t\t\tdisplayShortestPath(endNode);\n\t\t}\n\t});\n}", "title": "" }, { "docid": "1a47b5cb632e494056d2a7b9dff696ee", "score": "0.5947646", "text": "function grid_fill() {\n\n\t// figure out where the spot fire is\n\tspot();\n\n\tlet averagepixel = 0;\n\n\t// only generate new dots at the bottom every N steps (or frames)\n\t// this gives the averaging a smoother look\n\tstep++;\n\tif ( step >= 2 ) {\n\t\tstep = 0;\n\t}\n\n\n\t// work out what colour to set each pixel\n\tfor ( let y = CONFIG.grid.height; y >= 0; y-- ) {\n\n\t\tfor ( let x = 0; x < CONFIG.grid.width; x++ ) {\n\n\t\t\t// if we're below the enture height of the grid\n\t\t\tif ( y == CONFIG.grid.height ) {\n\n\t\t\t\t// if we're in the 'colour generating step'\n\t\t\t\tif ( step == 0 ) {\n\t\t\t\t\t// set a random colour for the current grid ember\n\t\t\t\t\tgrid[y][x].colour = Math.floor( Math.random() * CONFIG.colours);\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tlet averageEmber = 0;\n\n\t\t\t\t// if we're any column other than the two sides...\n\t\t\t\tif (\n\t\t\t\t\t( x > 0 ) &&\n\t\t\t\t\t( x < CONFIG.grid.width-1 )\n\t\t\t\t) {\n\t\t\t\t\taverageEmber += grid[y][x-1].colour;\n\t\t\t\t\taverageEmber += grid[y][x+1].colour;\n\t\t\t\t\taverageEmber += grid[y+1][x-1].colour;\n\t\t\t\t\taverageEmber += grid[y+1][x+1].colour;\n\n\t\t\t\t// otherwise we're looking at one of the side embers\n\t\t\t\t} else {\n\n\t\t\t\t\t// if we're on the left\n\t\t\t\t\tif ( x == 0 ) {\n\t\t\t\t\t\taverageEmber += grid[y][x+1].colour;\n\t\t\t\t\t\taverageEmber += grid[y+1][x+1].colour;\n\t\t\t\t\t} else {\n\t\t\t\t\t\taverageEmber += grid[y][x-1].colour;\n\t\t\t\t\t\taverageEmber += grid[y+1][x-1].colour;\n\t\t\t\t\t}\n\n\t\t\t\t\t// add 2 fake black sites as we don't have grid elements for them\n\t\t\t\t\taverageEmber += ((CONFIG.colours-1) * 2);\n\t\t\t\t}\n\n\t\t\t\t// find our ember value\n\t\t\t\taverageEmber += grid[y][x].colour;\n\n\t\t\t\t// find the ember below us\n\t\t\t\taverageEmber += (grid[y+1][x].colour * 2);\n\n\t\t\t\taverageEmber = Math.round(averageEmber / 6.8);\n\n\t\t\t\t// if we're beyond the palette\n\t\t\t\tif ( averageEmber > CONFIG.colours ) {\n\t\t\t\t\taverageEmber = CONFIG.colours - 1\n\t\t\t\t}\n\t\t\t\tgrid[y][x].colour = averageEmber;\n\t\t\t}\n\t\t}\n\t}\n\n\n\t// draw the flame - this is the slow part!\n\tfor ( let y = CONFIG.grid.height-1; y >= 0; y-- ) {\n\n\t\tfor ( let x = 0; x < CONFIG.grid.width; x++ ) {\n\n\t\t\t// trying to push all the colour changing off to css in hopes it'll be quicker.\n\t\t\tgrid[y][x].ember.style.backgroundColor = CONFIG.palette[grid[y][x].colour];\n\n\t\t\t// this was slowish\n\t\t\t// document.getElementById(\"grid_x\" + x + \"y\" + y).style.backgroundColor = \"#\" + CONFIG.colours[grid[y][x]];\n\n\t\t\t// for transparent flames\n\t\t\t// document.getElementById(\"x\" + x + \"y\" + y).style.opacity = 1 - ((1 / (palette.length - 1)) * griddata[y][x]);\n\t\t}\n\t}\n\n\n\ttimer = setTimeout(\"grid_fill();\", CONFIG.delay);\n}", "title": "" }, { "docid": "cd1853078dd813f7ef392fe76c558694", "score": "0.5946137", "text": "step() {\n // !!!! IMPLEMENT ME !!!!\n let frontBuffer = this.cells[this.currentBufferIndex];\n let backBuffer = this.cells[this.currentBufferIndex === 0 ?1:0];\n\n function checkNeighbors(height, width) {\n const inverse = frontBuffer[height][width] + 1;\n // Checking West\n if (width > 0) {\n if (frontBuffer[height][width - 1] === inverse) {\n return true;\n }\n }\n // Checking NorthWest\n if (height > 0 && width > 0) {\n if (frontBuffer[height - 1][width - 1] === inverse) {\n return true;\n }\n }\n // Checking North\n if (height > 0) {\n if (frontBuffer[height - 1][width] === inverse) {\n return true;\n }\n }\n // Checking NorthEast\n if (height > 0 && width < this.width - 1) {\n if (frontBuffer[height - 1][width + 1] === inverse) {\n return true;\n }\n }\n // Checking East\n if (width < this.width - 1) {\n if (frontBuffer[height][width + 1] === inverse) {\n return true;\n }\n }\n // Checking SouthEast\n if (height < this.height - 1 && width < this.width - 1) {\n if (frontBuffer[height + 1][width + 1] === inverse) {\n return true;\n }\n }\n // Checking South\n if (height < this.height - 1) {\n if (frontBuffer[height + 1][width] === inverse) {\n return true;\n }\n }\n // Checking SouthWest\n if (height < this.height - 1 && width > 0) {\n if (frontBuffer[height + 1][width - 1] === inverse) {\n return true;\n }\n }\n\n for (let row = 0; row < this.height; row++) {\n for (let column = 0; column < this.width; column++) {\n if (checkNeighbors.call(this, height, width) {\n\n })\n }\n }\n\n }\n }", "title": "" }, { "docid": "56a64cd332184e099636f2028ba53373", "score": "0.5932883", "text": "function tiledimmedOnthepath(clicked_tile)\n{\n\tlet x_clicked=parseInt(clicked_tile.split('_')[0]),y_clicked=parseInt(clicked_tile.split('_')[1]),x_player=parseInt(whoseturn.position.split('_')[0]), y_player=parseInt(whoseturn.position.split('_')[1]);\n\tlet x_index=x_player, y_index=y_player;\n if(x_clicked== x_player && allowedMove(clicked_tile))\n\t{\n\t\tif(y_player<y_clicked )\n\t\t{\n\t\t\tfor(y_index=y_player;y_index<y_clicked && dimmeds.indexOf(x_clicked+'_'+y_index)==-1;y_index++)\n\t\t\t\t;\n\t\t}\n\t\tif(y_player>y_clicked )\n\t\t{\n\t\t\tfor(y_index=y_player;y_index>y_clicked && dimmeds.indexOf(x_clicked+'_'+y_index)==-1;y_index--)\n\t\t\t\t;\n\t\t}\n\t}\n\tif(y_clicked==y_player && allowedMove(clicked_tile))\n\t{\n\t\tif(x_player<x_clicked)\n\t\t{\n\t\t\tfor(x_index=x_player;x_index<x_clicked && dimmeds.indexOf(x_index+'_'+y_index)==-1;x_index++)\n\t\t\t\t;\n\t\t}\n\t\tif(x_player>x_clicked)\n\t\t{\n\t\t\tfor(x_index=x_player;x_index>x_clicked && dimmeds.indexOf(x_index+'_'+y_index)==-1;x_index--)\n\t\t\t\t;\n\t\t}\n\t}\n\treturn(x_clicked!=x_index || y_clicked!=y_index );\n}", "title": "" }, { "docid": "4c71397a6520d9b7e621c63917bc0398", "score": "0.5931873", "text": "function drawGrid() {\n // Vertical lines\n line(cellWidth, 0, cellWidth, canvasHeight);\n line(cellWidth * 2, 0, cellWidth * 2, canvasHeight);\n\n // Horizontal lines\n line(0, cellHeight, canvasWidth, cellHeight);\n line(0, cellHeight * 2, canvasWidth * 2, cellHeight * 2);\n}", "title": "" }, { "docid": "859a1321bf1967ac5dee893c258e09a0", "score": "0.59290755", "text": "function Grid(rows, cols, cWidth) {\n\n this.rows = rows;\n this.cols = cols;\n this.cells = [];\n this.cWidth = cWidth;\n\n for (var i = 0; i < rows; i++) {\n\n this.cells[i] = [];\n for (var j = 0; j < cols; j++) {\n\n this.cells[i][j] = new Cell(i, j, cWidth);\n\n\n }\n\n }\n\n\n this.show = function () {\n for (var i = 0; i < rows; i++) {\n for (var j = 0; j < cols; j++) {\n\n this.cells[i][j].show();\n\n }\n }\n\n }\n\n this.print = function () {\n\n var gridStr = \"\";\n\n for (var i = 0; i < rows; i++) {\n for (var j = 0; j < cols; j++) {\n\n gridStr += this.cells[i][j].data + \" \";\n\n }\n gridStr += \"\\n\";\n }\n\n console.log(gridStr);\n }\n\n\n // adds a random number to the board at an empty space\n this.addRandom = function () {\n\n var options = [];\n\n for (var i = 0; i < rows; i++) {\n for (var j = 0; j < cols; j++) {\n\n if (this.cells[i][j].data == 0) {\n\n options.push(this.cells[i][j]);\n\n }\n\n }\n }\n\n if (options.length > 0) {\n // 90% chance of random num being a 2\n // 10% chance of random num being a 4\n var randNum = random(1) > 0.1 ? 2 : 4;\n options[floor(random(options.length))].data = randNum;\n }\n\n\n }\n\n // SHIFTING LOGIC \n //==============================================================\n\n\n // generic method for shifting elem in an array\n this.shiftArr = function(arr){\n\n var shifted = false;\n\n for (var i = arr.length - 1; i > 0; i--) {\n\n // if the current is not zero\n if (arr[i - 1].data != 0) {\n\n // while next is zero \n var k = i;\n while (k < arr.length && arr[k].data == 0) {\n\n // swap \n arr[k].data = arr[k - 1].data;\n arr[k - 1].data = 0;\n k++;\n\n shifted = true;\n\n }\n\n }\n\n }\n\n return shifted;\n\n }\n\n\n // generic method for fusing similar neighbor nums in an array\n this.fuse = function(arr){\n \n var fused = false;\n\n for (var i = arr.length - 1; i > 0; i--) {\n\n // if current and next equal\n if (arr[i - 1].data == arr[i].data && arr[i - 1].data != 0) {\n // fuse\n arr[i].data = arr[i].data + arr[i - 1].data;\n arr[i - 1].data = 0;\n\n fused = true;\n\n }\n\n }\n\n return fused;\n\n }\n\n // returns whether a change happened to know if a random num needs to be added\n this.shiftDown = function () {\n\n var changed = false;\n\n // shift each column down \n for (var j = 0; j < this.cols; j++) {\n\n var column = [];\n for (var i = 0; i < this.rows; i++) {\n\n column.push(this.cells[i][j]);\n\n }\n\n // now we have the column, shift to the right \n // shift \n var hasShifted = this.shiftArr(column);\n\n // fuse \n var hasFused = this.fuse(column);\n\n // shift \n this.shiftArr(column);\n\n // ensure changed is true if there was a change\n if (hasShifted || hasFused) changed = true;\n\n\n }\n \n return changed;\n\n }\n\n this.shiftUp = function () {\n\n var changed = false;\n\n // shift each column up \n for (var j = 0; j < this.cols; j++) {\n\n var column = [];\n // add elem backwards\n for (var i = this.rows - 1; i >= 0; i--) {\n\n column.push(this.cells[i][j]);\n\n }\n\n // now we have the column, shift to the right \n // shift \n var hasShifted = this.shiftArr(column);\n\n // fuse \n var hasFused = this.fuse(column);\n\n // shift\n this.shiftArr(column);\n\n // ensure changed is true if there was a change\n if (hasShifted || hasFused) changed = true;\n\n\n }\n\n return changed;\n\n }\n\n this.shiftRight = function () {\n\n var changed = false;\n\n // shift each row to the right \n for (var i = 0; i < this.rows; i++) {\n\n var row = this.cells[i];\n \n // shift \n var hasShifted = this.shiftArr(row);\n\n // fuse \n var hasFused = this.fuse(row);\n\n // shift\n this.shiftArr(row);\n\n // ensure changed is true if there was a change\n if (hasShifted || hasFused) changed = true;\n\n }\n\n return changed;\n\n }\n\n\n this.shiftLeft = function () {\n\n var changed = false;\n\n // shift each row to the left\n for (var i = 0; i < this.rows; i++) {\n\n var row = [];\n for (var j = this.cols - 1; j >= 0; j--){\n\n row.push(this.cells[i][j]);\n\n }\n \n // shift \n var hasShifted = this.shiftArr(row);\n\n // fuse \n var hasFused = this.fuse(row);\n\n // shift\n this.shiftArr(row);\n\n // ensure changed is true if there was a change\n if (hasShifted || hasFused) changed = true;\n\n }\n\n return changed;\n\n }\n\n // Game Ending logic \n // ===========================================================\n\n this.isGameOver = function(){\n\n // no moves can be made \n return false;\n\n }\n\n this.isGameWon = function(){\n\n // 2048 tile is present\n for(var i = 0; i < this.rows; i++){\n for(var j = 0; j < this.cols; j++){\n\n if(this.cells[i][j].data >= 2048){\n\n return true;\n\n }\n\n }\n }\n\n }\n\n}", "title": "" }, { "docid": "137f51a9be6184a9cc5a4890b30fdb50", "score": "0.5926634", "text": "function THINK(player,enemies,maplayout,end)\n{\n //if there are still tiles and there is no path yet\n if(openList.length > 0 && !pathFound)\n {\n var lowestIndex = 0;\n //find the lowest cost of the list\n for(var i = 0; i<openList.length; i++)\n if(openList[i].f < openList[lowestIndex].f)\n lowestIndex = i;\n \n //hold that tile\n var current = openList[lowestIndex];\n \n //are we at the end?\n if(current.x == end.x && current.y == end.y)\n {\n //create the path\n var curr = current;\n while(curr.previous){\n path.push(curr);\n curr = curr.previous;\n }\n \n var tempPath = path.reverse();\n path = tempPath;\n \n pathFound = true;\n }\n \n //move current tile to visited tiles\n removeFromArray(openList, current);\n closedList.push(current);\n \n var neighbors = current.neighbors;\n \n //check neighbors for distances\n for(var j = 0; j<neighbors.length; j++)\n {\n var n = neighbors[j];\n //if visited or is a wall, skip\n if(closedList.includes(n) || n.wall)\n continue;\n else\n {\n var tempG = current.g + 1;\n var isBest = false;\n \n //if you havent visited it yet\n if(!openList.includes(n))\n {\n isBest = true;\n n.h = heuristic(n, end);\n openList.push(n);\n }\n //if that cost is worse than what you have\n else if(tempG < n.g)\n {\n isBest = true;\n }\n //if you found a better cost\n if(isBest)\n {\n n.previous = current;\n n.g = tempG;\n n.f = n.g + n.h;\n \n }\n }\n }\n \n }\n //if the path is made\n else if(pathFound)\n {\n //check if the player position is the same as the previous path tile\n if(index == 0 || path[index-1].x == player.getX() && path[index-1].y == player.getY())\n move(player, maplayout, end, path);\n }\n \n}", "title": "" }, { "docid": "477202f620c7b17d2b9a9ea775001c89", "score": "0.5921495", "text": "function next_generation() {\n var temp_grid = new Grid(DIMENSIONS, Cellstate.dead);\n\n for (var x = 0; x < DIMENSIONS[0]; x++) {\n for (var y = 0; y < DIMENSIONS[0]; y++) {\n var live_neighbors = count_neighbors(x, y) ;\n // cell is alive\n if (main_grid.contents[x][y] == Cellstate.alive) {\n // underpopulated - dies\n if (live_neighbors < 2) {\n temp_grid.contents[x][y] = Cellstate.dying;\n }\n // optimal conditions - lives\n else if ((live_neighbors == 2) || (live_neighbors == 3)) {\n temp_grid.contents[x][y] = Cellstate.alive; \n }\n // overcrowded - dies\n else if (live_neighbors > 2) {\n temp_grid.contents[x][y] = Cellstate.dying;\n };\n }\n // cell is dead and has three live neighbors - reproduction\n else if ((!(main_grid.contents[x][y] == Cellstate.alive)) && (live_neighbors == 3)) {\n temp_grid.contents[x][y] = Cellstate.alive;\n }\n // turn dying ones to dead\n else if (temp_grid.contents[x][y] == Cellstate.dying) {\n temp_grid.contents[x][y] == Cellstate.dead;\n };\n };\n };\n\n main_grid.contents = temp_grid.contents;\n\n // adding # of living cells to histogram\n histogram.data1.unshift(board.cells_alive);\n}", "title": "" }, { "docid": "5b7f8b56c6b61cac71fbe771f4a4a398", "score": "0.5919376", "text": "function updateGame()\n{ \n //GAME LOGIC STARTS HERE.\n //Go through every cell on the canvas and check the conditions:\n //1) Any live cell with fewer than two live neighbours dies, as if caused by under-population.\n //2) Any live cell with two or three live neighbours lives on to the next generation.\n //3) Any live cell with more than three live neighbours dies, as if by overcrowding.\n //4) Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.\n \n //Go through eevry cell and check the neighbors first.\n for (var i = 0; i < gridHeight; i++)\n {\n for (var j = 0; j < gridWidth; j++)\n {\n var neighbors = countLiveNeighbors(renderGrid, i, j);\n var currentCell = getGridCell(renderGrid, i, j);\n \n if(currentCell === LIVE_CELL && neighbors < 2)\n setGridCell(updateGrid, i, j, DEAD_CELL);\n else if(currentCell === LIVE_CELL && (neighbors === 2 || neighbors === 3))\n setGridCell(updateGrid, i, j, LIVE_CELL);\n else if(currentCell === LIVE_CELL && (neighbors > 3))\n setGridCell(updateGrid, i, j, DEAD_CELL);\n else if(currentCell === DEAD_CELL && (neighbors === 3))\n setGridCell(updateGrid, i, j, LIVE_CELL);\n else\n setGridCell(updateGrid, i, j, DEAD_CELL);\n }\n }\n \n}", "title": "" }, { "docid": "79af9f699d280449acbe3e3a09b70dba", "score": "0.59185714", "text": "function part1(key)\n{\n colorMode(RGB, 255);\n background(21, 32, 43); // blueish dark\n strokeWeight(1);\n\n // Draw grid\n stroke(56, 68, 77); // blueish grey\n noFill();\n for (let i = 0; i <= DISKSIZE; ++i) {\n const p = i * GRIDSIZE;\n line(0, p, DISKSIZE * GRIDSIZE, p);\n line(p, 0, p, DISKSIZE * GRIDSIZE);\n }\n\n // Calculate pattern\n disk = new Array(DISKSIZE); // only rows; columns come from knot()\n let count_bits = 0;\n for (let i = 0; i < DISKSIZE; ++i) {\n disk[i] = knot(key + '-' + i); // set disk row\n for (let j = 0; j < DISKSIZE; ++j) {\n count_bits += disk[i][j]; // assumes disk[][] is either 0 or 1\n }\n }\n\n // Updating while calculating each row not necessary because too quick\n // *and* not visible here anyway because there is no draw() looping\n divBits.html('Part 1: bits on disk = ' + count_bits);\n console.log('Part 1: bits on disk = ' + count_bits);\n\n // Draw pattern (separately from grid because different settings)\n noStroke();\n fill(56, 68, 77);\n for (let i = 0; i < DISKSIZE; ++i) {\n const p = i * GRIDSIZE;\n for (let j = 0; j < DISKSIZE; ++j) {\n const q = j * GRIDSIZE;\n if (disk[i][j] == 1) {\n rect(q, p, blocksize, blocksize);\n }\n }\n }\n\n colorMode(HSB, MAXHUE, 100, 100);\n col = row = 0; // while looking for regions, currently at this bit\n regions = 0; // count connected regions\n hue = 0; // (slightly) different colour for every next region\n stack = []; // branches in current region for later processing\n}", "title": "" }, { "docid": "b553a16e557edcf00991d6448445ac84", "score": "0.5917487", "text": "function drawBoard(){\n\t//graw grids\n\tvar barLength = gridCount * gridWidth;\n\tvar c=document.getElementById(\"board\");\n\tvar ctx=c.getContext(\"2d\");\n\tctx.translate(60,60);\n\tctx.beginPath();\n\tfor (i =0;i<=gridCount;i++){\n\t\tctx.moveTo(0,i*gridWidth);\n\t\tctx.lineTo(barLength,i*gridWidth);\n\t\tctx.moveTo(i*gridWidth,0);\n\t\tctx.lineTo(i*gridWidth,barLength);\n\t}\n\tctx.stroke();\n\t\n\t//add margin text\n\tctx.font=\"20px Georgia\";\n\tctx.textAlign=\"center\";\n\tctx.textBaseline=\"middle\";\n\t\n\tvar textL = 'a';\n\tvar textN = 1;\n\tfor (i =0;i<=gridCount;i++){\n\t\tctx.fillText(textL,i*gridWidth, -30); \n\t\ttextL = String.fromCharCode(textL.charCodeAt(0) + 1);\n\t\tctx.fillText(textN, -30, i*gridWidth); \n\t\ttextN ++;\n\t}\n\t\n\t//add small rects\n\tctx.fillRect(137,137,6,6);\n\tctx.fillRect(57,57,6,6);\n\tctx.fillRect(217,57,6,6);\n\tctx.fillRect(57,217,6,6);\n\tctx.fillRect(217,217,6,6);\n}", "title": "" }, { "docid": "3ff46552ee99a8944cc444b18a96a02d", "score": "0.59155864", "text": "function sink(grid, i, j) {\n if (i < 0 || j < 0 || i >= grid.length || j >= grid[0].length) {\n return 0;\n }\n if (grid[i][j] === \"0\") return 0;\n grid[i][j] = \"0\";\n sink(grid, i + 1, j);\n sink(grid, i - 1, j);\n sink(grid, i, j + 1);\n sink(grid, i, j - 1);\n return 1;\n}", "title": "" }, { "docid": "131f5cf521760d5d2bb280601ea25f7b", "score": "0.59134144", "text": "function drawGrid() {\n\tlet i;\n\tfor (i = 0; i < canvas.width / 16; i++) {\n\t\tcanvasLayers[dlayer.bgLayer].drawLine(i * 16, 0, i * 16, canvas.height - 1, 'rgba(0,0,0,0.2)');\n\t\tif (i % 24 === 0) {\n\t\t\tcanvasLayers[dlayer.bgLayer].drawLine(i * 16, 0, i * 16, canvas.height - 1, 'rgba(0,0,0,0.25)', 2);\n\t\t}\n\t}\n\tfor (i = 0; i < canvas.height / 16; i++) {\n\t\tcanvasLayers[dlayer.bgLayer].drawLine(0, i * 16, canvas.width - 1, i * 16, 'rgba(0,0,0,0.2)');\n\t\tif (i % 13 === 0) {\n\t\t\tcanvasLayers[dlayer.bgLayer].drawLine(0, i * 16, canvas.width - 1, i * 16, 'rgba(0,0,0,0.25)', 2);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "713f0841cc90262618c4c070ba2040fe", "score": "0.591018", "text": "drawGameGrid() {\n for (let i = 0; i < Game.cols; i++) {\n for (let j = 0; j < Game.rows; j++) {\n let obj = this.getObject(toPoint(i, j));\n if (obj !== null) {\n if (obj instanceof SnakeSegment) {\n Game.drawPixel(toPoint(i, j), Snake.color[obj.id]);\n }\n else if (obj instanceof FoodPellet) {\n Game.drawPixel(toPoint(i, j), FoodPellet.color[obj.value]);\n }\n else if (obj instanceof Wall) {\n Game.drawPixel(toPoint(i, j), Colors.BLUE);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "04e0a8b7cd637c4c76db97591bbff0ce", "score": "0.5909638", "text": "createStateGrid(grid) {\n let gridCopy = grid\n if (!grid){\n gridCopy = [\n [0, 0, 0, 0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 0, 0, 0],\n ]\n }\n\n\n let returnGrid = [];\n for (let i = 0; i<gridCopy.length; i++){\n let line = []\n\n for (let k = 0; k<gridCopy[0].length; k++){\n if (gridCopy[i][k] === 0) {\n line.push([gridCopy[i][k], 'b', true]);\n } else {\n line.push([gridCopy[i][k], 'b', false]);\n }\n } \n returnGrid.push(line)\n }\n return returnGrid;\n}", "title": "" } ]
60f9a4274abc440175a43e83a3a4b49f
Randomly place trees, using CSS top & leftproperties for placement and transform: scale() for size
[ { "docid": "ce63d8126e2a8ac8e32d275f9ce2f9a0", "score": "0.7186386", "text": "function generateTree(z) {\r\n generatedItemsWrapper.innerHTML += `<div id='wrap${z}'><div id='triangle1${z}'></div><div id='triangle2${z}'></div><div id='triangle3${z}'></div><div id='rectangle${z}'></div></div>`;\r\n\r\n const styleID = document.getElementById(`wrap${z}`);\r\n\r\n let top = 0;\r\n let left = 0;\r\n let scale = 0;\r\n\r\n // Tree 1\r\n if (z === 1) {\r\n top = 36;\r\n left = -20;\r\n scale = 0.4;\r\n } \r\n \r\n // Tree 2\r\n else if (z === 2) {\r\n top = 41;\r\n left = -20;\r\n scale = 0.76;\r\n } \r\n \r\n // Tree 3\r\n else if (z === 3) {\r\n top = 48;\r\n left = -30;\r\n scale = 1.5;\r\n } \r\n \r\n // Tree 4\r\n else if (z === 4) {\r\n top = 38;\r\n left = -30;\r\n scale = 0.2;\r\n }\r\n\r\n styleID.style.top = top + randomNumber(3) + \"vh\";\r\n styleID.style.transform = \"scale(\" + scale + \")\";\r\n\r\n if (z === 3) {\r\n // Tree 3 only renders sometimes and with own placement boundaries\r\n let treeFrontRandom = randomNumber(30);\r\n if (treeFrontRandom > 10) {\r\n styleID.style.left = left + treeFrontRandom + \"vw\";\r\n } else {\r\n styleID.style.left = left + treeFrontRandom + 100 + \"vw\";\r\n }\r\n } else {\r\n styleID.style.left = left + randomNumber(100) + \"vw\";\r\n }\r\n\r\n styleID.style.zIndex = z * 10;\r\n numberOfTrees++;\r\n}", "title": "" } ]
[ { "docid": "7aabb75dddffaeba1f9319a45be51a42", "score": "0.72227454", "text": "function Tree(){\n\n\tvar loc = vec3 ( 0, 0, 0);\n\n\t// var loc = vec3( Math.random() * 2 - 1, 0, Math.random() * 2 - 1);\n\t// var scale = ( Math.floor( Math.random() * 10 ) + 1 ) / 300;\n\t// var scales = vec3( scale, 0.0, scale );\n}", "title": "" }, { "docid": "5eeaea10c48ac5e8219db78f7f5c514f", "score": "0.6906075", "text": "function generateRandomTree() {\n ctx.clearRect(0,0,canvas.width, canvas.height);\n let len = Math.floor(Math.random() * 10) + 100;\n let angle = 0;\n let branchWidth = (Math.random() * 50) + 1;\n let color1 = 'rgb(18,14,13)';\n let color2 = 'rgb(43,26,16)';\n for (let i = 0; i < 6; i++) {\n let centerPointX = Math.floor(Math.random() * canvas.width * 1);\n // let centerPointX = 950;\n let centerPointY = 650;\n console.log(centerPointX);\n if (centerPointX > (canvas.width * .55)) {\n ctx.scale(.6,.7)\n ctx.translate(600,100)\n drawTree(centerPointX, centerPointY, len, angle, branchWidth, color1, color2);\n } else if (centerPointX < (canvas.width * .45)) {\n ctx.scale(.6,.7)\n ctx.translate(0,100)\n drawTree(centerPointX, centerPointY, len, angle, branchWidth, color1, color2);\n }\n }\n}", "title": "" }, { "docid": "900b45830eba5bc8994e7579020d03b7", "score": "0.68294775", "text": "function generateTrees(yPos, stock, minX) {\n for ( let i = 0; i < stock; i ++ ) {\n let xPos = Math.floor(Math.random() * (62 - minX) + minX);\n let pine = document.createElement('div');\n pine.classList.add('small-pine');\n pine.style.left = `${xPos}vw`;\n pine.style.top = `${yPos}vh`;\n hill1.appendChild(pine);\n }\n}", "title": "" }, { "docid": "3ff1b27f3bbed55c34cf22de3b5c1c41", "score": "0.6588437", "text": "function create_trees()\n\t{\n\t\tvar xval;\n\t\tvar yval;\n\t\ttree_array = [];\n\t\tfor(var i = 0; i < treeLimit; i++)\n\t\t{\n\t\t\tdo \n\t\t\t{\n\t\t\txval = Math.round(Math.random()*(w-cw)/cw);\n\t\t\tyval = Math.round(Math.random()*(h-offsetHeight*cw)/cw);\n\t\t\t}\n\t\t\twhile (checkCollision(tree_array, xval, yval) >= 0);\n\t\t\t\n\t\t\ttree_array.push({\n\t\t\t\t\t\t\t\tid: i,\n\t\t\t\t\t\t\t\tx: xval, \n\t\t\t\t\t\t\t\ty: yval,\n\t\t\t\t\t\t\t\tcut: 0,\n\t\t\t\t\t\t\t\tfire: Math.round(Math.random()*40),\n\t\t\t\t\t\t\t\tobj:\"tree\"\n\t\t\t\t\t\t\t});\n\t\t}\n\t\t//This will create a cell with x/y between 0-44\n\t\t//Because there are 45(450/10) positions across the rows and columns\n\t}", "title": "" }, { "docid": "e1313d315dc233126a797795670fcc19", "score": "0.64493394", "text": "function createTrees() {\n binaryTreeArray = [];\n for (let i=0; i < NUMOFTREES; i++) {\n // style settings\n let color = getRandomColor();\n let size = Math.floor(Math.random() * 4) + 1;\n\n // set location. Spawning from behind the header-card\n let largestTreePXHeight = 100;\n let headerCard = document.getElementById(\"header-card\").getBoundingClientRect();\n let yHeaderRange = headerCard.bottom - headerCard.top\n let x = (headerCard.left + headerCard.right)/2; \n let y = (Math.random() * (yHeaderRange - largestTreePXHeight)) + headerCard.top;\n\n // speed and tree creation\n let vel = getTreeVelocity(i);\n let xDirection = vel.x;\n let yDirection = vel.y;\n binaryTreeArray.push(new Tree(x, y, xDirection, yDirection, size, color));\n }\n}", "title": "" }, { "docid": "2c96edd90207e713f0cd008823f95a97", "score": "0.6438465", "text": "function createTree(height) {\r\n vectors = [];\r\n vectors.length = 0;\r\n numberOfVectors = 0;\r\n var x, y, z, R, spriteNum, P = 4 * scale; // some parameter to control the distance between sprites\r\n\r\n\r\n for (var k = 0; true; k++) // 80 branches\r\n {\r\n x = 0,\r\n z = 0, // x=0 and z=0 is the central axis of the tree\r\n y = H = k*scale + Math.sqrt(k) * scale * 6, // the bottom of the tree will get more branches than the top with this\r\n // also, H, the branch lenght, is proportional to the distance to the top of the tree\r\n R = Math.random() * 446; // this picks a random angle for the branch\r\n\r\n if (y > height) {\r\n break;\r\n }\r\n for (j = 0; j < H;) // the number of sprites in a branch is proportional to its length.\r\n {\r\n\r\n // Now, a vector defined as a size 4 array. The first position is x, second y, third z, and last\r\n // position is the number of the sprite it is.\r\n spriteNum = j / H * 20 >> 1;\r\n if (Math.random() > .95 && y < height * 0.9 && y > height*0.2) {\r\n spriteNum = Math.random() * 4 + redBall>>0;\r\n } else if (Math.random() > .9) {\r\n spriteNum = treeLight;\r\n }\r\n j += 8*scale;\r\n vectors[numberOfVectors++] = [\r\n x += Math.sin(R) * P + Math.random() * 6*scale - 3*scale,\r\n y += Math.random() * 16*scale - 8*scale,\r\n z += Math.cos(R) * P + Math.random() * 6*scale - 3*scale,\r\n spriteNum];\r\n /*original\r\n vectors[numberOfVectors++] = [\r\n x += Math.sin(R) * P + Math.random() * 6 - 3,\r\n y += Math.random() * 16 - 8,\r\n z += Math.cos(R) * P + Math.random() * 6 - 3,\r\n j / H * 20 + ((j += 16) > H & Math.random() > .8 ? Math.random() * 4 : 0) >> 1];\r\n */\r\n // This is doing some few things. By one hand, it adds randomness to the path of the branch,\r\n // so it is not completely straight. Also it checks if it is at the end of the branch,\r\n // if so, randomly no ball or one of the 2 balls available are added.\r\n // The darker sprites are choosen for the inner parts of a branch.\r\n // I think there is something missing in this clear version, but as far as I remember\r\n // the original version also moved a bit more from the branch the balls when they were added.\r\n }\r\n }\r\n treeHeight = height;\r\n treeWidth = 100;\r\n }", "title": "" }, { "docid": "6a6f1275ff246a81ac47a486039edfb1", "score": "0.6300745", "text": "function repositionNodes() {\n for (var i = 0; i < nodes.length; i++) {\n nodes[i].setX(nodes[i].getXDepth() * (width - 4));\n nodes[i].setY(nodes[i].getYDepth() * (0.72 * height - 4));\n } \n }", "title": "" }, { "docid": "494b19a8c19a5d823eb124cbe656e1f3", "score": "0.6186538", "text": "function plantTrees(x, y, w, h, max_number, graphA, graphB, treelayer, trees) {\n\tvar number = 0;\n var tmpX = 0.0;\n var tmpY = 0.0;\n var tree;\n while(number < max_number) {\n tmpX = Math.random()*w + x;\n tmpY = Math.random()*h + y;\n if (isTreeSeperated(graphA, tmpX, tmpY) & isTreeSeperated(graphB, tmpX, tmpY) & isTreeSeperatedFromTree(tmpX, tmpY, trees)) {\n tree = new Tree(treelayer, tmpX, tmpY);\n trees.push(tree);\n number++;\n }\n }\n}", "title": "" }, { "docid": "d9eb2a771af05501e1ec05f55a38425c", "score": "0.618009", "text": "function moveIt() {\r\n\t\tvar rects = document.querySelectorAll(\"#rectanglearea .rectangle\");\r\n\t\tfor(var i = 0; i < rects.length; i++) {\r\n\t\t\trects[i].style.position = \"absolute\";\r\n\t\t\trects[i].style.top = Math.floor(Math.random() * 451) + \"px\";\r\n\t\t\trects[i].style.left = Math.floor(Math.random() * 651) + \"px\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "006655e65469dcf8276574a428a63fdf", "score": "0.6128311", "text": "static randomizeContentPosition(node) {\n var extent = lively.getExtent(node)\n node.childNodes.forEach(ea => lively.setPosition(ea, pt(Math.random()* extent.y, Math.random() * extent.x)))\n }", "title": "" }, { "docid": "4e285a879fe9eca3a8328150ad1d559f", "score": "0.6126607", "text": "place() {\n if (this.position === null) this.position = {};\n let xDiv = Math.floor(this.dims.x) - 1;\n let yDiv = Math.floor(this.dims.y) - 1;\n this.position.x = this.randBetween(this.padding, xDiv - this.padding);\n this.position.y = this.randBetween(this.padding, yDiv - this.padding);\n }", "title": "" }, { "docid": "3fa330fcc1ee23277f163714c13f2d4d", "score": "0.608839", "text": "randLocation() {\n let xLoc = randomize(0, max);\n let yLoc = randomize(0, max);\n this.div.style.left = `${xLoc}px`;\n this.div.style.top = `${yLoc}px`;\n }", "title": "" }, { "docid": "4cc8ea42e32bfbfbc5692034a4623fd9", "score": "0.60861415", "text": "function planttrees(){\n if(playerA.playing===1){\n $('.trees').append('<img src=\"./trees.png\" style=\"position:absolute; bottom: '+bottom_a+'px; left:'+left+'px;\" >');\n left+=20;\n if (tetris.lines%5===0) {\n bottom_a-=10;\n left-=90;\n }\n\n }\n\n if(playerB.playing===1){\n $('.trees').append('<img src=\"./trees_B.png\" style=\"position:absolute; bottom: '+bottom_b+'px; right:'+right+'px;\" >');\n right+=20;\n if (tetris.lines%5===0) {\n bottom_b-=10;\n right-=90;\n }\n }\n }", "title": "" }, { "docid": "8a89b80c7772a5278e001900ec576ee4", "score": "0.6064629", "text": "function positionObjects(index, value) {\n // Create a random number for the height position\n let objectsHeightPosition = Math.random() * 150 + 10;\n // Add the height position to the css of the object\n $(this).css('bottom', objectsHeightPosition + 'px');\n // Create a random number for the width position\n let objectsWidthPosition = Math.random() * 210 + 10;\n // Add the width position to the css of the object\n $(this).css('left', objectsWidthPosition + 'px');\n // Rotate the object with a random angle (so it looks more like real garbage)\n let rotationAngle = Math.random() * 360;\n // Add the rotation value to the css of the object\n $(this).css({\n 'transform': 'rotate(' + rotationAngle + 'deg)'\n });\n}", "title": "" }, { "docid": "e32e3283515fc6026676cda02b61f2b5", "score": "0.5963561", "text": "function generateTree() {\n let treePosition = 10 + Math.floor(Math.random() * (10));\n\n for (let row = 9 ; row < 15; row ++) {\n let cell = treePosition;\n setState(boardMatrix[row][cell],\"tree\")\n }\n\n for (let row = 6 ; row < 9; row ++) {\n for (let cell=treePosition -2 ; cell <= treePosition + 2; cell ++) {\n setState(boardMatrix[row][cell],\"leaf\")\n }\n }\n}", "title": "" }, { "docid": "5d616d3f1e5debf9d511a3a225d10daa", "score": "0.5916496", "text": "function magnify(node) {\n\n if (parent = node.parent) {\n var parent,\n x = parent.x,\n k = Math.floor(Math.random() * (9 - 4) + 4) / 10;\n ;\n parent.children.forEach(function (sibling) {\n x += reposition(sibling, x, sibling === node\n ? parent.dx * k / node.value\n : parent.dx * (1 - k) / (parent.value - node.value));\n });\n } else {\n reposition(node, 0, node.dx / node.value);\n }\n\n svg.selectAll(\"text\")\n .remove();\n\n\n path.transition()\n .duration(750)\n .attrTween(\"d\", arcTween);\n }", "title": "" }, { "docid": "0aed08a822dc7c8900ab5cfc7927f605", "score": "0.58992416", "text": "function globPlace(){\n \n globposition.set(Math.random()*16-8, Math.random()*7-3.5, 0);\n glob.position.set(globposition); \n}", "title": "" }, { "docid": "9687e4eed9fdc0c8dc9109fcf97c406e", "score": "0.58783746", "text": "randomizeShip(height, width) {\n var yStart = Math.floor((Math.random() * height));\n var xStart = Math.floor((Math.random() * width));\n\n var block1 = {x:xStart, y:yStart};\n var block2 = {x:xStart, y:yStart + 1};\n var block3 = {x:xStart, y:yStart + 2};\n var block4 = {x:xStart + 1, y:yStart + 2};\n\n this.area.push(block1);\n this.area.push(block2);\n this.area.push(block3);\n this.area.push(block4);\n }", "title": "" }, { "docid": "ef4840474d166b780093aa051e2a4eb5", "score": "0.5861912", "text": "function drawTrees(tree) {\n\n strokeWeight(2);\n treePos_x = 850;\n treePos_y = floorPos_y;\n\n fill(139, 69, 19);\n stroke(0, 0, 0);\n rect(tree + 750, -200 / 2 + floorPos_y, 25, 200 / 2);\n fill(34, 139, 34);\n ellipse(tree + 763, -200 / 2 + floorPos_y, 65, 80);\n\n fill(139, 69, 19);\n stroke(0, 0, 0);\n rect(tree + 650, -200 / 2 + floorPos_y, 25, 200 / 2);\n fill(34, 139, 34);\n ellipse(tree + 663, -200 / 2 + floorPos_y, 65, 200 / 2);\n\n}", "title": "" }, { "docid": "75e06c2ffdfdc2c792b8a239e3636917", "score": "0.5852916", "text": "function generateBranchObjects(dir, startx, starty) {\n x = startx - rb4.width * 0.33;\n y = starty + rb4.height * 0.05;\n let img;\n\n if (dir == 'right') {\n x += rb2.width * 1.5;\n y += rb2.height * 0.3;\n img = rb2_r;\n stem_objects.push(new Unit(img, x, y));\n\n const nbranch = Math.floor(random(0, 4));\n for (let i = 0; i < nbranch; i++) {\n x += rb2.height * 0.69;\n y -= rb2.height * 0.69;\n stem_objects.push(new Unit(img, x, y));\n }\n generateBranchFlowerObjects('right', x, y);\n } else if (dir == 'left') {\n x -= rb2.width * 0.65;\n y += rb2.height * 0.3;\n img = rb2_l;\n stem_objects.push(new Unit(img, x, y));\n\n const nbranch = Math.floor(random(0, 4));\n for (let i = 0; i < nbranch; i++) {\n x -= rb2.height * 0.69;\n y -= rb2.height * 0.69;\n stem_objects.push(new Unit(img, x, y));\n }\n generateBranchFlowerObjects('left', x, y);\n }\n\n x = startx;\n y = starty;\n}", "title": "" }, { "docid": "2a0fe6166f7d538b3e2eee4b182de021", "score": "0.58392173", "text": "function spawnorangeleaf(){\n\n if (frameCount % 100 === 0) {\n orangeleaf=createSprite(0,0,40,40);\n orangeleaf.addImage(\"orangeleaf\",orange)\n orangeleaf.scale = 0.1;\n orangeleaf.velocityY=3;\n orangeleaf.x = Math.round(random(10,100));\n orange.depth = rabbit.depth\n rabbit.depth = orange.depth + 1\n \n }\n\n\n}", "title": "" }, { "docid": "624200b25991f67854f55c8428242567", "score": "0.5828666", "text": "function changePosition(){\n let X1 = Math.random()*190;\n let Y1 = Math.random()*61;\n let size1 = Math.random();\n if (size1 >.7){\n plane1.style.transform = \"scale(\" + size1+ \")\";\n }\n plane1.style.left = X1 +\"vw\";\n plane1.style.top = Y1 +\"vw\"; // use vw so that planes stay inside the cockpit view\n let X2 = Math.random()*190;\n let Y2 = Math.random()*61;\n let size2 = Math.random();\n if (size2 >.7){\n plane2.style.transform = \"scale(\" + size2+ \")\";\n }\n plane2.style.left = X2 +\"vw\";\n plane2.style.top = Y2 +\"vw\";\n let X3 = Math.random()*190;\n let Y3 = Math.random()*61;\n let size3 = Math.random();\n if (size3 >.7){\n plane3.style.transform = \"scale(\" + size3+ \") rotateY(180deg)\";\n }\n plane3.style.left = X3 +\"vw\";\n plane3.style.top = Y3 +\"vw\";\n let X4 = Math.random()*190;\n let Y4 = Math.random()*61;\n let size4 = Math.random();\n if (size4 >.7){\n plane4.style.transform = \"scale(\" + size4+ \") rotateY(180deg)\";\n }\n plane4.style.left = X4 +\"vw\";\n plane4.style.top = Y4 +\"vw\";\n let X5 = Math.random()*190;\n let Y5 = Math.random()*61;\n let size5 = Math.random();\n if (.9 > size5 > .5){\n plane5.style.transform = \"scale(\" + size5+ \")\";\n }\n plane5.style.left = X5 +\"vw\";\n plane5.style.top = Y5 +\"vw\";\n let X6 = Math.random()*190;\n let Y6 = Math.random()*61;\n let size6 = Math.random();\n if (.9 > size6 >.5){\n plane6.style.transform = \"scale(\" + size6+ \")\";\n }\n plane6.style.left = X6 +\"vw\";\n plane6.style.top = Y6 +\"vw\";\n let X7 = Math.random()*190;\n let Y7 = Math.random()*61;\n let size7 = Math.random();\n if (.9 > size7 >.5){\n plane7.style.transform = \"scale(\" + size7+ \") rotateY(180deg)\";\n }\n plane7.style.left = X7 +\"vw\";\n plane7.style.top = Y7 +\"vw\";\n}", "title": "" }, { "docid": "62ad08995a0795e99adbe3495e3e4aba", "score": "0.5822691", "text": "function moveIt() {\n\t\tvar rects = document.querySelectorAll(\"#rectanglearea .rectangle\");\n\t\tvar area = document.getElementById(\"rectanglearea\");\n\t\tfor(var i = 0; i < rects.length; i++) {\n\t\t\trects[i].style.position = \"absolute\";\n\t\t\tvar leftPosition = Math.floor(Math.random() * 647);\n\t\t\tvar topPosition = Math.floor(Math.random() * 447);\n\t\t\trects[i].style.left = leftPosition + \"px\";\n\t\t\trects[i].style.top = topPosition + \"px\";\n\t\t\t//console.log(rects[i]);\n\t\t}\n\t}", "title": "" }, { "docid": "a3942b1286830517e30a26758e3d37bc", "score": "0.5816411", "text": "function createredLeaves(){\n if(frameCount % 50 == 0){\n redLeaf = createSprite(200,105,20,20);\n redLeaf.velocityY=4;\n redLeaf.addImage(redleafImage);\n redLeaf.y = Math.round(random(10,220))\n redLeaf.scale = 0.1;\n redLeaf.lifetime = 150;\n \n }\n \n\n}", "title": "" }, { "docid": "1c0c776a09242dc7ad1d5ed9abfb05e5", "score": "0.58158547", "text": "function randomPosition()\n{\n return project.view.size * Point.random();\n}", "title": "" }, { "docid": "5c1cc792246758e89bda5b2ea1e0d5c9", "score": "0.5810497", "text": "function randomTree(speciesNames)\n{\nvar treeList = [];\nlet tRoot = new minNode(\"root\",null,null,null);\ntRoot.left = new minNode(\"empty\",null,null,tRoot);\ntRoot.right = new minNode(\"empty\",null,null,tRoot);\ntreeArray(tRoot,treeList);\nwhile(treeList.length < speciesNames.length)\n{\n let x=Math.floor((Math.random() * treeList.length));\n treeList[x].left = new minNode(\"empty\", null, null,treeList[x]);\n treeList[x].right = new minNode(\"empty\", null, null,treeList[x]);\n treeList = [];\n treeArray(tRoot,treeList);\n}\nfor(var i=0; i<treeList.length; i++)\n treeList[i].name=speciesNames[i];\nreturn tRoot;\n}", "title": "" }, { "docid": "07106dc93d07eb055390f32436096f60", "score": "0.5794557", "text": "function makeFood() {\n \n \n var divsize = 10;\n \n var posx = (Math.random() * ($(\".gameBoard\").width() - divsize)).toFixed();\n var posy = (Math.random() * ($(\".gameBoard\").height() - divsize)).toFixed();\n $newdiv = $(\".food\").css({\n 'left': posx + 'px',\n 'top': posy + 'px'\n });\n\n $newLoc = $(\".food\").css({\n 'left': posx + 'px',\n 'top': posy + 'px'\n\n });\n\n $newdiv.appendTo('.gameBoard');\n }", "title": "" }, { "docid": "2bb4e43475555acf425e734389503299", "score": "0.5792607", "text": "function place(o, x, y){\n\to.css(\"left\", Math.round(Math.random()*x));\n\to.css(\"top\", Math.round(Math.random() *y));\n\t// o.animate({\"left\":Math.round(Math.random()*x), \"top\":Math.round(Math.random() *y)}, 100);\n}", "title": "" }, { "docid": "949e83309b27d1c958270274eea7309d", "score": "0.57801944", "text": "function createLeaf() {\n leaf = createSprite(random(50, 350),40, 10 , 10)\n leaf.addImage(leafImg);\n leaf.scale=0.1\n leaf.velocityY=2;\n leaf.lifetime=63\n}", "title": "" }, { "docid": "f32084fa069d1c88228f37b22f28f7d1", "score": "0.57677406", "text": "function getRandomPosition(element, container_width, container_height, elements, i) {\n\n var elem_radius = getRadius(d_topics_topic_dot_base_radius, $(element).data(\"weight-category\"));\n \n\n // var cluster_factor = (i/elements.length < 0.3 ? 0.7 : 1) // decrease the bounding box for the first elements so they cluster more in the center\n // var min_x = (elem_radius / cluster_factor) + 0.5 * (container_width - container_width*cluster_factor)\n // var max_x = ( container_width - elem_radius ) * cluster_factor;\n // var min_y = elem_radius / cluster_factor + 0.5 * (container_height - container_height*cluster_factor)\n // var max_y = ( container_height - elem_radius ) * cluster_factor; \n\n var min_x = elem_radius\n var max_x = container_width - elem_radius\n var min_y = elem_radius\n var max_y = container_height - elem_radius\n\n //weighted_random_x = (1-Math.pow(2*Math.random()-1, 2))\n //weighted_random_y = (1-Math.pow(2*Math.random()-1, 2))\n\n //weighted_random_x = Math.sin(Math.PI * (Math.random()))\n //weighted_random_y = Math.cos(Math.PI * (Math.random() - 0.5))\n\n weighted_random_x = (1-Math.pow(2*Math.random()-1, 3))/2\n weighted_random_y = (1-Math.pow(2*Math.random()-1, 3))/2\n\n return {\n x: Math.round(weighted_random_x * (max_x-min_x) + min_x ),\n y: Math.round(weighted_random_y * (max_y-min_y) + min_y ),\n radius: elem_radius,\n }\n}", "title": "" }, { "docid": "a32eb8dc492cbb3bfc9fa70e57917f3f", "score": "0.57648134", "text": "_grow() {\n for (const attractor of this.attractors) {\n let closestBranch = null;\n let record = this.maxDist;\n for (const branch of this._branches) {\n const dist = vectorDistance(attractor.pos, {\n x: branch.branch.x2,\n y: branch.branch.y2,\n });\n if (dist < this.minDist) {\n attractor.reached = true;\n closestBranch = null;\n break;\n } else if (dist < record) {\n closestBranch = branch;\n record = dist;\n }\n }\n if (closestBranch !== null) {\n const newDir = normalize(\n vectorSubtract(attractor.pos, {\n x: closestBranch.branch.x2,\n y: closestBranch.branch.y2,\n })\n );\n closestBranch.direction = vectorAdd(closestBranch.direction, newDir);\n closestBranch.count++;\n }\n }\n // cull attractors and add leaves\n for (let i = this.attractors.length - 1; i >= 0; i--) {\n if (this.attractors[i].reached) {\n // random chance for a \"reached\" attractor to become a leaf / flower\n this._addOrgan({ ...this.attractors[i].pos });\n this.attractors.splice(i, 1);\n }\n }\n // add new branches\n for (let i = this._branches.length - 1; i >= 0; i--) {\n const branch = this._branches[i];\n if (branch.count > 0) {\n const nextDir = normalize({\n x: branch.direction.x,\n y: branch.direction.y,\n });\n const nextBranch = this._newBranch(\n {\n x: branch.branch.x2,\n y: branch.branch.y2,\n },\n nextDir\n );\n this.tree.push(nextBranch.branch);\n this._branches.push(nextBranch);\n // reset\n branch.count = 0;\n }\n }\n }", "title": "" }, { "docid": "e1e17be83a11bbc07ff6ce7b985cb375", "score": "0.57614195", "text": "_renderTrees(trees) {\n if (!trees) {\n return;\n }\n\n const treeCount = OBJECT_MAPPING[BASE_TREES].length;\n trees.forEach(function(tree) {\n const index = parseInt(Math.random() * 100000) % treeCount;\n var treeObj = index \n ? new PalmTree(tree.x, tree.y)\n : new PineTree(tree.x, tree.y);\n treeObj.render();\n });\n }", "title": "" }, { "docid": "d6e5cf5689e59c51f28211436d19ea19", "score": "0.57613325", "text": "function positionFood() {\n food.x = random(0, width);\n food.y = random(0, height);\n}", "title": "" }, { "docid": "2be23405e793e45962175a9cd8545923", "score": "0.5753758", "text": "function renderTreesGraphics () {\n var sceneWidth = SI.game.Renderer.getScene().getWidth();\n var treeWidth = treesSpriteSheet.width;\n var treeX;\n \n for (treeX = 0; treeX <= sceneWidth; treeX += treeWidth) {\n SI.game.Renderer.getScene().getContext().drawImage(treesSpriteSheet, treeX, treesY);\n }\n }", "title": "" }, { "docid": "399c38d5ae71fffb34bdc71c1f1b3412", "score": "0.57459253", "text": "function createHierrarchy(tree){\n\tvar depth = tree.depth; //get tree depth\n\tif(depth!=null && depth>0){//if not empty\n\t\thPadding = pageHeight/(depth*2 + 1);//calculate horizontal padding\n\t\tvar boxHeight = (pageHeight - (hPadding * (depth + 2)))/depth;//calculate width and height for boxes\n\t\tvar boxWidth = pageWidth/(2*tree.largestWidth+2);\n\t\ttree.boxHeight = boxHeight;\n\t\ttree.boxWidth = boxWidth;\n\t\tvar y = hPadding;\n\t\tfor (i = 0; i < depth; i++){\n\t\t\tvar widthPadding = wPadding(tree.contents[i].length,boxWidth);\n\t\t\tconsole.log(\"widthPadding \" + widthPadding);\n\t\t\tvar x = widthPadding;\n\t\t\tfor (j = 0; j <tree.contents[i].length; j++){\n\t\t\t\ttree.contents[i][j].x = x;\n\t\t\t\ttree.contents[i][j].y = y;\n\t\t\t\tx += widthPadding + boxWidth;\n\t\t\t}\n\t\t\ty += hPadding*2;\n\t\t}\n\t// console.log(tree);\n\t// console.log(tree.contents);\n\t}\n\telse\n\t\tconsole.log(\"empty tree error\");\n}", "title": "" }, { "docid": "ac1cdfe4ecb7942a615eecdd06e94a3d", "score": "0.57253224", "text": "function setup() {\n createCanvas(500, 500);\n noLoop();\n\n pointCount = 100;\n\n // STORED RANDOM PLACEMENT\n for (let i = 0; i < pointCount; i++) {\n points.push({\n xPos: random() * width,\n yPos: random() * height\n });\n }\n\n createTreesAndSnowmen();\n\n // STORED GRID PLACEMENT\n // posOffset = 10;\n\n // for (let y = 0; y < 10; y++) {\n // for (let x = 0; x < 10; x++) {\n // points.push({\n // x: x * 50 + 25 + random() * posOffset,\n // y: y * 50 + 25 + random() * posOffset\n // });\n // }\n // }\n}", "title": "" }, { "docid": "f01c5772e71ae5ffc84cce6e5911c45b", "score": "0.5711838", "text": "build(objects, i){\n if(objects.length <= this.groupSize){\n // For small groups of objects make leaf node point to objData index\n let treeData = Float32Array.from({length: this.groupSize}, () => -1);\n for(let i = 0; i < objects.length; i++){\n treeData[i] = objects[i].idx;\n }\n this.__setTreeData(treeData, i);\n }\n else{\n // For lists of objects, split in half and keep building tree\n\n // Find bounding box for the collection and put it in tree\n let box = BoundingBox.bound(objects.map((pair) => pair.obj));\n this.__setTreeData(box.getBVHData(), i);\n\n // Pick random dimension\n let dim = Math.floor(Math.random() * 1000) % 3;\n\n // Sort objects by bounding box center (fake centroid) in this dimension\n objects.sort((a, b) => {\n let ac = glMatrix.vec3.create();\n let ab = a.obj.getBoundingBox();\n glMatrix.vec3.add(ac, ab.start, ab.end);\n glMatrix.vec3.scale(ac, ac, 0.5);\n\n let bc = glMatrix.vec3.create();\n let bb = b.obj.getBoundingBox();\n glMatrix.vec3.add(bc, bb.start, bb.end);\n glMatrix.vec3.scale(bc, bc, 0.5);\n \n return ac[dim] - bc[dim];\n });\n\n // Put half of objects in each subtree\n let p = Math.floor(objects.length / 2);\n this.build(objects.slice(0, p), this.getLeft(i));\n this.build(objects.slice(p ), this.getRight(i));\n }\n }", "title": "" }, { "docid": "62e65036114a980b2d829a5040a90e41", "score": "0.57102466", "text": "function spawnDAETree(){\r\n var treeGirth = randRange(1, 3);\r\n var numFruits = randWholeRange(4, 15);\r\n var x=randRange(-10,10);\r\n var y=-0.5;\r\n var z=randRange(-10, 10);\r\n var scaleY = randWholeRange(1, 3);\r\n var treeModel;\r\n var thisTree\r\n treeCounter++;\r\n //bounding box for tree\r\n var box = new THREE.Box3();\r\n //tag tree ID\r\n toSpawn = document.createElement('a-entity');\r\n treeModel = document.createElement('a-model');\r\n toSpawn.id='treeSpawned' + treeCounter;\r\n //load model\r\n treeModel.setAttribute('src','models/tree1/tree1.dae');\r\n //place model\r\n coordHolder= x + ' ' + y + ' ' + z;\r\n toSpawn.setAttribute('position', coordHolder);\r\n //size tree\r\n scaleHolder = treeGirth + ' ' + scaleY + ' ' + treeGirth;\r\n treeModel.setAttribute('scale',scaleHolder);\r\n //place tree container\r\n addedHolder.appendChild(toSpawn);\r\n //place tree in container\r\n thisTree = document.getElementById('treeSpawned' + treeCounter);\r\n thisTree.appendChild(treeModel);\r\n //place overall tree into added entities entity\r\n //Load tree model\r\n loader.load('models/tree1/tree1.dae',function( collada){\r\n box.setFromObject(collada.scene);\r\n console.log( \"box min: \",box.min,\"box max: \", box.max, \"box size: \",box.size() );\r\n //place fruits\r\n for(var i = 0; i < numFruits; i++){\r\n spawnFruit(box.min, box.max, treeGirth, scaleY, treeGirth, thisTree);\r\n }\r\n });\r\n console.log('Tree spawned at ' + coordHolder);\r\n}", "title": "" }, { "docid": "7fe28a033d7a3a5a0a89720671d94c21", "score": "0.5705092", "text": "function generateNearbyFlies(clickedFly){\n\t\n if(!clickedFly){\n return null\n }\n \n var clickedFlyX,clickedFlyY,clickedFlyW,clickedFlyH;\n clickedFlyW = parseInt(clickedFly.attr('width'))\n\tclickedFlyH = parseInt(clickedFly.attr('height'))\n \n var flyChildW,flyChildH,flyChildR;\n flyChildW = clickedFlyW - flyChildDifference;\n\tflyChildH = clickedFlyH - flyChildDifference;\n \n //check if clickedFly is too small to generate childs\n if(flyChildW <=0 || flyChildH <=0){\n\t\treturn null\n }\n \n\tclickedFlyX = parseInt(clickedFly.attr('posX'))\n\tclickedFlyY = parseInt(clickedFly.attr('posY'))\n\tclickedFlyR = parseInt(clickedFly.attr('rotation'))\n \n\tconsole.log('clickedFly x y',clickedFlyX,clickedFlyY)\n\tconsole.log('clickedFly w h r',clickedFlyW,clickedFlyH,clickedFlyR)\n \n var randomDistanceDifference = Math.ceil(Math.random()*10);\n var randomRotationDifference = Math.round(Math.random()*360);\n console.log('randomDistanceDifference',randomDistanceDifference);\n console.log('randomRotationDifference',randomRotationDifference);\n \n\tflyChildR = clickedFlyR - randomRotationDifference;\n \n var layoutMode = Math.ceil(Math.random()*4); //4 layout modes\n var firstFlyChildX,firstFlyChildY;\n var secondFlyChildX,secondFlyChildY;\n var posDifference,offset;\n var maxXPosition = (innerWidth - flyChildW);\n var maxYPosition = (innerHeight - flyChildW);\n \n console.log(\"layoutMode\",layoutMode);\n \n //choose between 4 layout mode\n switch(layoutMode){\n \n case 1: {\n /*\n | \n firstChild\n secondChild\n | \n \n */\n posDifference = (flyChildW/2);\n firstFlyChildX = clickedFlyX;\n firstFlyChildY = clickedFlyY - posDifference;\n secondFlyChildX = clickedFlyX;\n secondFlyChildY = clickedFlyY + posDifference;\n \n //case upward fly is out of screen\n if(firstFlyChildY <0){\n offset = (-firstFlyChildY) // is negative value\n firstFlyChildY = 0;\n secondFlyChildY = secondFlyChildY + offset;//move down\n }\n //case downward fly is out of screen\n else if(secondFlyChildY >= maxYPosition){\n offset = (secondFlyChildY - maxYPosition);\n secondFlyChildY = maxYPosition;\n firstFlyChildY = firstFlyChildY - offset; \n \n }\n \n break;\n }\n \n case 2: {\n /* -- secondChild firstFlyChild -- \n */\n posDifference = (flyChildW/2);\n firstFlyChildX = clickedFlyX + posDifference;\n firstFlyChildY = clickedFlyY;\n secondFlyChildX = clickedFlyX - posDifference;\n secondFlyChildY = clickedFlyY;\n \n //case right fly is out of screen\n if(firstFlyChildX >= maxXPosition){\n offset = firstFlyChildX - maxXPosition;\n firstFlyChildX = maxXPosition;\n secondFlyChildX = secondFlyChildX - offset;\n }\n //case left fly is out of screen\n else if(secondFlyChildX <0){\n offset = (-secondFlyChildX)\n secondFlyChildX = 0;\n firstFlyChildX = firstFlyChildX + offset;\n }\n \n break;\n }\n \n case 3: {\n /* | firstFlyChild\n | secondFlyChild \n */\n posDifference = (flyChildH/2) + randomDistanceDifference\n firstFlyChildX = clickedFlyX + posDifference;\n firstFlyChildY = clickedFlyY - posDifference;\n secondFlyChildX = clickedFlyX - posDifference;\n secondFlyChildY = clickedFlyY + posDifference;\n \n //check if position of fly childs is out of screen\n if(firstFlyChildX >= maxXPosition){\n offset = firstFlyChildX - maxXPosition;\n firstFlyChildX = maxXPosition;\n secondFlyChildX = secondFlyChildX - offset;\n }\n if(secondFlyChildX <0){\n offset = (-secondFlyChildX)\n secondFlyChildX = 0;\n firstFlyChildX = firstFlyChildX + offset;\n }\n if(firstFlyChildY <0){\n offset = (-firstFlyChildY) // is negative value\n firstFlyChildY = 0;\n secondFlyChildY = secondFlyChildY + offset;//move down\n }\n if(secondFlyChildY >= maxYPosition){\n offset = (secondFlyChildY - maxYPosition);\n secondFlyChildY = maxYPosition;\n firstFlyChildY = firstFlyChildY - offset; //move up\n \n }\n \n break;\n }\n \n case 4: {\n /* | firstFlyChild\n | secondFlyChild\n */\n posDifference = (flyChildH/2) + randomDistanceDifference\n firstFlyChildX = clickedFlyX - posDifference;\n firstFlyChildY = clickedFlyY - posDifference;\n secondFlyChildX = clickedFlyX + posDifference;\n secondFlyChildY = clickedFlyY + posDifference;\n \n //check if position of fly childs is out of screen\n if(firstFlyChildX >= maxXPosition){\n offset = firstFlyChildX - maxXPosition;\n firstFlyChildX = maxXPosition;\n secondFlyChildX = secondFlyChildX - offset;\n }\n \n if(secondFlyChildX <0){\n offset = (-secondFlyChildX)\n secondFlyChildX = 0;\n firstFlyChildX = firstFlyChildX + offset;\n }\n \n if(firstFlyChildY <0){\n offset = (-firstFlyChildY) // is negative value\n firstFlyChildY = 0;\n secondFlyChildY = secondFlyChildY + offset;//move down\n }\n \n if(secondFlyChildY >= maxYPosition){\n offset = (secondFlyChildY - maxYPosition);\n secondFlyChildY = maxYPosition;\n firstFlyChildY = firstFlyChildY - offset; //move up\n \n }\n \n break;\n }\n }\n \n console.log('firstFlyChild x y',firstFlyChildX,firstFlyChildY)\n\tconsole.log('secondFlyChild x y',secondFlyChildX,secondFlyChildY)\n\tconsole.log('flyChild w h r',flyChildW,flyChildH,flyChildR)\n\n\treturn {\n\t\tfirstFlyChild : {\n x: firstFlyChildX,\n y: firstFlyChildY,\n w: flyChildW,\n h: flyChildH,\n r: flyChildR\n },\n\t\tsecondFlyChild : {\n x: secondFlyChildX,\n y: secondFlyChildY,\n w: flyChildW,\n h: flyChildH,\n r: flyChildR\n }\n\t}\n}", "title": "" }, { "docid": "b4c0c0b23e750ad8d82575995d120fce", "score": "0.5658982", "text": "function randomNewCenter(bot,top,center,many){\n\n}", "title": "" }, { "docid": "43d798f62bba49bab5a5d3574b6ade16", "score": "0.56515026", "text": "function randomizeTiles() {\n\t\tvar moves = ['Up', 'Left', 'Down', 'Right'];\n\t\tfor(var i=0; i<50; i++) {\n\t\t\tswapTiles(moves[Math.floor(Math.random() * 10)%4], false);\n\t\t}\n\t}", "title": "" }, { "docid": "7a99b5183b34bd000f8a6745c24cb535", "score": "0.5649598", "text": "function randomize(){\n\t// get all elments of class face\n\t$('.face').each(function(index){\n\t\t// target = getRandom\n\t\tvar target_position = getRandom(m);\n\t\t// current = clix[index]\n\t\tvar current_position = clix[index];\n\t\t// set clix[index] to target\n\t\tclix[index] = target_position;\n\t\t// move distance = target * w\n\t\tvar move_to = target_position * w;\n\t\tconsole.log(move_to);\n\t\t// this.animate to left: distance + 'px'\n\t\t$(this).animate({left: '-' + move_to + 'px'}, 500);\n\t});\n}", "title": "" }, { "docid": "01a92392c807a786ea63d4e8ed589901", "score": "0.56451845", "text": "function randomXOffset() {\n return -TILE_WIDTH - Math.random() * 300;\n}", "title": "" }, { "docid": "4b8283ca884f78d41d9fe898ba782b89", "score": "0.5641345", "text": "randomize(width, height, pxBox, probability = 0.6) {\n // Helper function to set up two-way edges\n function connectVerts(v0, v1) {\n v0.edges.push(new Edge(v1));\n v1.edges.push(new Edge(v0));\n }\n\n let count = 0;\n\n // Build a grid of verts\n let grid = [];\n for (let y = 0; y < height; y++) {\n let row = [];\n for (let x = 0; x < width; x++) {\n let v = new Vertex();\n //v.value = 'v' + x + ',' + y;\n v.value = 'v' + count++;\n row.push(v);\n }\n grid.push(row);\n }\n\n // Go through the grid randomly hooking up edges\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n // Connect down\n if (y < height - 1) {\n if (Math.random() < probability) {\n connectVerts(grid[y][x], grid[y+1][x]);\n }\n }\n\n // Connect right\n if (x < width - 1) {\n if (Math.random() < probability) {\n connectVerts(grid[y][x], grid[y][x+1]);\n }\n }\n }\n }\n\n // Last pass, set the x and y coordinates for drawing\n const boxBuffer = 0.6;\n const boxInner = pxBox * boxBuffer;\n const boxInnerOffset = (pxBox - boxInner) / 2;\n\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n grid[y][x].pos = {\n 'x': (x * pxBox + boxInnerOffset + Math.random() * boxInner) | 0,\n 'y': (y * pxBox + boxInnerOffset + Math.random() * boxInner) | 0\n };\n }\n }\n\n // Finally, add everything in our grid to the vertexes in this Graph\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n this.vertexes.push(grid[y][x]);\n }\n }\n }", "title": "" }, { "docid": "ed014fff6d7aeab5f2d7dbff8788014a", "score": "0.5640302", "text": "split() {\n var x = this.bounds.getX();\n var y = this.bounds.getY();\n var subWidth = Math.floor(this.bounds.getWidth() / 2);\n var subHeight = Math.floor(this.bounds.getHeight() / 2);\n\n this.nodes[0] = new QuadTree(this.level + 1, new Rectangle(x + subWidth, y, subWidth, subHeight));\n this.nodes[1] = new QuadTree(this.level + 1, new Rectangle(x, y, subWidth, subHeight));\n this.nodes[2] = new QuadTree(this.level + 1, new Rectangle(x, y + subHeight, subWidth, subHeight));\n this.nodes[3] = new QuadTree(this.level + 1, new Rectangle(x + subWidth, y + subHeight, subWidth, subHeight));\n }", "title": "" }, { "docid": "0fa7db19788265b4844ca3f478df969b", "score": "0.56281745", "text": "function randPos(name) {\n let x = Math.random() *100;\n let y = Math.random() *100;\n \n for (let z=0 ; z<20 ; z++){\n while ( x === locationX[z] && y === locationY[z]){\n x = Math.random() *100;\n y = Math.random() *100;\n };\n }\n locationX.push(x, x+1, x-1, x+1, x-1);\n locationY.push(y, y+1, y-1, y-1, y+1);\n\n name.style.position = 'absolute';\n name.style.top = `${x}%`;\n name.style.left = `${y}%`;\n}", "title": "" }, { "docid": "97180d50d34103b43fd8ed628936ec08", "score": "0.56097484", "text": "function addTree(x, y, width)\n{\n\tvar tree = [];\n\t// var piece = [x, y+sideWallThickness, 200, 90];\n\t// tree.push(piece);\n\t//trunk, different colour\n\t// var topX = x - 1/2 difference of top and trunk widths;\n\t// var x = x * scale;\n\t// var y = y * scale;\n\t// var width = width *scale;\n\tvar trunkWidth = width/3;\n\t// var shadowY = y - (0.5*<<<widestSectionsWidth-0.5*trunkWidth);\n\tvar topX = x - (0.5*width-0.5*trunkWidth);\n\tallWalls.push([x, y, trunkWidth, trunkWidth]);\n\tmapWalls.push([x, y, trunkWidth, trunkWidth]);\n\ttree.push([x, y, trunkWidth, trunkWidth]);\n\ttree.push([x, y, trunkWidth, trunkWidth]);\n\ttree.push([x, y, trunkWidth, trunkWidth]);\n\ttree.push([x, y, trunkWidth, trunkWidth]);\n\ttree.push([x, y, trunkWidth, trunkWidth]);\n\ttree.push([x, y, trunkWidth, trunkWidth]);\n\ttree.push([x, y, trunkWidth, trunkWidth]);\n\ttree.push([x, y, trunkWidth, trunkWidth]);\n\ttree.push([x, y, trunkWidth, trunkWidth]); //9 trunks\n\t\t\t//tree.push should include colour too\n\t//top part\n\tvar nextWidth = width;\n\ttree.push([topX, y, nextWidth, width*0.66]);\n\tnextWidth = width*8/10;\n\ttree.push([topX+((0.5*width)-0.5*nextWidth), y, nextWidth, width*0.5]);\t\n\tnextWidth = width*5/10;\n\ttree.push([topX+((0.5*width)-0.5*nextWidth), y, nextWidth, width*0.3]);\t\n\t \n\t \n\t// tree.push([topX, y, width, width/3*2.5]);\t\n\t// tree.push([topX+width/8, y, width-50, width/3*2]);\t\n\t// tree.push([topX+width/4, y, width-100, width/3*1]);\n\tvar currentX = x; \n\tvar randomRange = 20;\n\tfor(var i = 0; i < tree.length; i++)\n\t{\n\t\t\n\t\tvar treeSegment = tree[i];\n\t\t//for random x changes\n\t\t/* if(i < 9)\n\t\t{\n\t\t\tvar randomXChange = (Math.random()*randomRange)-(0.5*randomRange);\n\t\t\t// currentX = treeSegment[0];\n\t\t\tcurrentX += randomXChange;\n\t\t\ttreeSegment[0] = currentX;\n\t\t\t// currentX = tree[9][0];\n\t\t} */\t\t\n\t\ttreeSegment[1] -= i*sideWallThickness/scale;\n\t\t// treeSegment[1] -= i*20*scale;\n\t\t\n\t\t// treeSegment[1] -= i*(width/6);\n\t}\n\t//made a tunnel by accident lol\n\t// var piece = [x, y, 200, 90];\n\t// tree.push(piece);\n\t\n\t// tree.push([x+25, y, 150, 90]);\t\n\t// tree.push([x+50, y, 100, 90]);\n\t// allWalls.push([tree[0][0], tree[0][1], tree[0][2], tree[0][3]]);\n\t// mapWalls.push(allWalls[allWalls.length-1]);\n\ttrees.push(tree);\n}", "title": "" }, { "docid": "133e5f8766abfa8dd60077dafce05a3d", "score": "0.5591043", "text": "function Start () {\n\tvar n = 30;\n\tfor (var x=1;x<n;x++)\n\t{\n\t\tInstantiate(Node,Vector3(transform.position.x+n*(-20)+x*(40),0,transform.position.z+n*17.8-71.2),Quaternion.identity);\n\t}\n\tfor (var y=1;y<n;y++)\n\t{\n\t\tInstantiate(Node,Vector3(transform.position.x+n*(-20)+y*(40)-20,0,transform.position.z+n*17.8-35.6),Quaternion.identity);\n\t}\n\t//Instantiate(Single_Tri_Lar,Vector3(0,0,0),Quaternion.identity);\n//\tvar x_local = 0;\n//\tvar y_local = 0;\n//\tfor (var x=-15;x<15;x++)\n//\t{\n//\t\tfor (var y=-15;y<15;y++)\n//\t\t{\n//\t\t\tvar height = Random.Range(4,12);\n//\t\t\ty_local = transform.position.z+y*35.6;\n//\t\t\tif(y%2 == 0)\n//\t\t\t{\n//\t\t\t\tx_local = transform.position.x+x*40;\n//\t\t\t}\n//\t\t\telse\n//\t\t\t{\n//\t\t\t\tx_local = transform.position.x+x*40+20;\n//\t\t\t}\n//\t\t\tInstantiate(Node,Vector3(x_local,0,y_local),Quaternion.identity);\n\t\t\t//Instantiate(Base,Vector3(x_local,-11.8,y_local),Quaternion.Euler(-90, 0, 0));\n\t//\t}\n\t//}\n}", "title": "" }, { "docid": "9d80dff2649a4c89ede90c76b7436999", "score": "0.5586661", "text": "constructor() {\r\n this.x = random(width);\r\n this.y = random(height);\r\n this.diameterx = random(width/width, width/100);\r\n this.diametery = random(height/height, height/100);\r\n this.speedx = random(5,15);\r\n this.speedy = random(5,15);\r\n this.colorR = random(255);\r\n this.colorG = random(255);\r\n this.colorB = random(255);\r\n this.starAlpha = random(0,10);\r\n }", "title": "" }, { "docid": "1836e45d5a1459d51525876d7c3e277e", "score": "0.5554801", "text": "constructor(){\n this.x = random (0, width);\n this.y = random (0, height);\n this.xspeed = 10;\n this.yspeed = 10;\n }", "title": "" }, { "docid": "513f0d0a0b7585d6f951d4498b772fbe", "score": "0.55536515", "text": "function spawnRedleaf(){\n\n if (frameCount % 80 === 0) {\n red=createSprite(0,0,40,40);\n red.addImage(\"red\",redimg)\n red.scale = 0.1;\n red.velocityY=3;\n red.x = Math.round(random(10,100));\n red.depth = rabbit.depth\n rabbit.depth = red.depth + 1\n \n }\n\n\n}", "title": "" }, { "docid": "7b6f0ae8f2876c660e275ee9152705b7", "score": "0.55500346", "text": "function randomise() {\n // Find all pupils\n let allLocations = document.getElementsByClassName(\"pupils\");\n // Find current positions of all pupils\n let positions = [];\n for (let i = 0; i < allLocations.length; i++) {\n positions.push(cumulativeOffset(allLocations[i]));\n }\n // Shuffle positions\n shuffleArray(positions);\n // Give pupils their shuffled positions\n for (let i = 0; i < allLocations.length; i++) {\n curImg = allLocations[i];\n curPos = positions[i]\n curImg.style.top = curPos.top;\n curImg.style.left = curPos.left;\n }\n }", "title": "" }, { "docid": "7d6556e3715e4cf551d7c739b63811aa", "score": "0.5540051", "text": "function syanTreeRow(treeParams, sideWalkParams, materials){\n var treeRow = new THREE.Object3D();\n // add the two rows of trees spaced in between the tiles\n var tree1 = syanFancyTree(treeParams, materials);\n var tree2 = syanFancyTree(treeParams, materials);\n var tree3 = syanFancyTree(treeParams, materials);\n var tree4 = syanFancyTree(treeParams, materials);\n var tree5 = syanFancyTree(treeParams, materials);\n var tree6 = syanFancyTree(treeParams, materials);\n var tree7 = syanFancyTree(treeParams, materials);\n var tree8 = syanFancyTree(treeParams, materials);\n var tree9 = syanFancyTree(treeParams, materials);\n var tree10 = syanFancyTree(treeParams, materials);\n var tree11 = syanFancyTree(treeParams, materials);\n var tree12 = syanFancyTree(treeParams, materials);\n var tree13 = syanFancyTree(treeParams, materials);\n var tree14 = syanFancyTree(treeParams, materials);\n\n // set positions for each tree relative to the sideWalkParams\n tree1.position.set(0, 0, sideWalkParams.spacing*13/2 + sideWalkParams.side*13/2);\n tree2.position.set(0, 0, sideWalkParams.spacing*11/2 + sideWalkParams.side*11/2);\n tree3.position.set(0, 0, sideWalkParams.spacing*9/2 + sideWalkParams.side*9/2);\n tree4.position.set(0, 0, sideWalkParams.spacing*7/2 + sideWalkParams.side*7/2);\n tree5.position.set(0, 0, sideWalkParams.spacing*5/2 + sideWalkParams.side*5/2);\n tree6.position.set(0, 0, sideWalkParams.spacing*3/2 + sideWalkParams.side*3/2);\n tree7.position.set(0, 0, sideWalkParams.spacing/2 + sideWalkParams.side/2);\n tree8.position.set(0, 0, -(sideWalkParams.spacing/2 + sideWalkParams.side/2));\n tree9.position.set(0, 0, -(sideWalkParams.spacing*3/2 + sideWalkParams.side*3/2));\n tree10.position.set(0, 0, -(sideWalkParams.spacing*5/2 + sideWalkParams.side*5/2));\n tree11.position.set(0, 0, -(sideWalkParams.spacing*7/2 + sideWalkParams.side*7/2));\n tree12.position.set(0, 0, -(sideWalkParams.spacing*9/2 + sideWalkParams.side*9/2));\n tree13.position.set(0, 0, -(sideWalkParams.spacing*11/2 + sideWalkParams.side*11/2));\n tree14.position.set(0, 0, -(sideWalkParams.spacing*13/2 + sideWalkParams.side*13/2));\n\n // add trees\n treeRow.add(tree1);\n treeRow.add(tree2);\n treeRow.add(tree3);\n treeRow.add(tree4);\n treeRow.add(tree5);\n treeRow.add(tree6);\n treeRow.add(tree7);\n treeRow.add(tree8);\n treeRow.add(tree9);\n treeRow.add(tree10);\n treeRow.add(tree11);\n treeRow.add(tree12);\n treeRow.add(tree13);\n treeRow.add(tree14);\n return treeRow;\n}", "title": "" }, { "docid": "8d1f0274babd8b9684e31dbfc689cf8d", "score": "0.5518031", "text": "adjustTerrain() {\r\n var disp = 0.007;\r\n\r\n for (var i = 0; i < 125; i++) {\r\n var sin1 = Math.sin(2.0 * Math.PI * Math.random());\r\n var cos1 = Math.cos(2.0 * Math.PI * Math.random());\r\n var x = Math.floor(Math.random() * this.div);\r\n var y = Math.floor(Math.random() * this.div);\r\n \r\n for (var j = 0; j < this.div + 1; j++) {\r\n for (var k = 0; k < this.div + 1; k++) {\r\n var dotProd = ((j - x) * cos1) + ((k - y) * sin1);\r\n \r\n var vertex1 = [];\r\n this.getVertex(vertex1, j, k);\r\n var multiplier = 1;\r\n \r\n if (dotProd <= 0) {\r\n multiplier = -1;\r\n }\r\n\r\n vertex1[2] += disp * multiplier;\r\n\r\n this.setVertex(vertex1, j, k);\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "45b2e0c41694de870576d3264d32daa7", "score": "0.5515464", "text": "resetStar() {\r\n this.position.randomize(-width, width, -height, height, 0, 0);\r\n this.position.z = width; // width == maxdepth\r\n\r\n // leave a deadzone in the center of display for effect\r\n if ((this.position.x > -50 &&\r\n this.position.x < 50) &&\r\n (this.position.y > -50 &&\r\n this.position.y < 50))\r\n {\r\n this.resetStar();\r\n }\r\n }", "title": "" }, { "docid": "66c325821027d2f822953b6f11408de4", "score": "0.5507289", "text": "function generateStemObjects() {\n let x = random(width);\n let y = height - rb2.height;\n const nstem = Math.floor(random(2, 5));\n\n for (let i = 0; i < nstem; i++) {\n stem_objects.push(new Unit(rb2, x, y));\n y -= rb2.height;\n if (random(1) < 0.4) {\n generateBranchObjects('left', x, y);\n }\n if (random(1) < 0.4) {\n generateBranchObjects('right', x, y);\n }\n }\n\n generateFlowerObjects(x, y);\n}", "title": "" }, { "docid": "5b7f3b21114674c2de76654d8a78b9da", "score": "0.54980254", "text": "setRandomPosition(shape) {\n\t\tlet x = this.stage.x + (100 + (Math.random() * (this.stage.width-200)));\n\t\tlet y = 100 + (Math.random() * ((this.stage.height/2)-200));\n\t\tshape.setPosition(x, y);\n\t}", "title": "" }, { "docid": "4ca6192538b55a0f997d5e390ae55578", "score": "0.54971313", "text": "function defineVars() {\n this.LeafScene = function (el) {\n this.viewport = el;\n this.world = document.createElement('div');\n this.leaves = [];\n\n this.options = {\n numLeaves: 20,\n wind: {\n magnitude: 1.2,\n maxSpeed: 12,\n duration: 300,\n start: 0,\n speed: 0\n },\n };\n\n this.width = this.viewport.offsetWidth;\n this.height = this.viewport.offsetHeight;\n //this.width = 800;\n //this.height = 800;\n\n // animation helper\n this.timer = 0;\n\n this._resetLeaf = function (leaf) {\n\n // place leaf towards the top left\n leaf.x = this.width * 2 - Math.random() * this.width * 1.75;\n leaf.y = -10;\n leaf.z = Math.random() * 200;\n if (leaf.x > this.width) {\n leaf.x = this.width + 10;\n leaf.y = Math.random() * this.height / 2;\n }\n // at the start, the leaf can be anywhere\n if (this.timer == 0) {\n leaf.y = Math.random() * this.height;\n }\n\n // Choose axis of rotation.\n // If axis is not X, chose a random static x-rotation for greater variability\n leaf.rotation.speed = Math.random() * 10;\n var randomAxis = Math.random();\n if (randomAxis > 0.5) {\n leaf.rotation.axis = 'X';\n } else if (randomAxis > 0.25) {\n leaf.rotation.axis = 'Y';\n leaf.rotation.x = Math.random() * 180 + 90;\n } else {\n leaf.rotation.axis = 'Z';\n leaf.rotation.x = Math.random() * 360 - 180;\n // looks weird if the rotation is too fast around this axis\n leaf.rotation.speed = Math.random() * 3;\n }\n\n // random speed\n leaf.xSpeedVariation = Math.random() * 0.8 - 0.4;\n leaf.ySpeed = Math.random() + 1.5;\n\n return leaf;\n }\n\n this._updateLeaf = function (leaf) {\n var leafWindSpeed = this.options.wind.speed(this.timer - this.options.wind.start, leaf.y);\n\n var xSpeed = leafWindSpeed + leaf.xSpeedVariation;\n leaf.x -= xSpeed;\n leaf.y += leaf.ySpeed;\n leaf.rotation.value += leaf.rotation.speed;\n\n var t = 'translateX( ' + leaf.x + 'px ) translateY( ' + leaf.y + 'px ) translateZ( ' + leaf.z + 'px ) rotate' + leaf.rotation.axis + '( ' + leaf.rotation.value + 'deg )';\n if (leaf.rotation.axis !== 'X') {\n t += ' rotateX(' + leaf.rotation.x + 'deg)';\n }\n leaf.el.style.webkitTransform = t;\n leaf.el.style.MozTransform = t;\n leaf.el.style.oTransform = t;\n leaf.el.style.transform = t;\n\n // reset if out of view\n if (leaf.x < -10 || leaf.y > this.height + 10) {\n this._resetLeaf(leaf);\n }\n }\n\n this._updateWind = function () {\n // wind follows a sine curve: asin(b*time + c) + a\n // where a = wind magnitude as a function of leaf position, b = wind.duration, c = offset\n // wind duration should be related to wind magnitude, e.g. higher windspeed means longer gust duration\n\n if (this.timer === 0 || this.timer > (this.options.wind.start + this.options.wind.duration)) {\n\n this.options.wind.magnitude = Math.random() * this.options.wind.maxSpeed;\n this.options.wind.duration = this.options.wind.magnitude * 50 + (Math.random() * 20 - 10);\n this.options.wind.start = this.timer;\n\n var screenHeight = this.height;\n\n this.options.wind.speed = function (t, y) {\n // should go from full wind speed at the top, to 1/2 speed at the bottom, using leaf Y\n var a = this.magnitude / 2 * (screenHeight - 2 * y / 3) / screenHeight;\n return a * Math.sin(2 * Math.PI / this.duration * t + (3 * Math.PI / 2)) + a;\n }\n }\n }\n }\n\n this.LeafScene.prototype.init = function () {\n\n for (var i = 0; i < this.options.numLeaves; i++) {\n var leaf = {\n el: document.createElement('div'),\n x: 0,\n y: 0,\n z: 0,\n rotation: {\n axis: 'X',\n value: 0,\n speed: 0,\n x: 0\n },\n xSpeedVariation: 0,\n ySpeed: 0,\n path: {\n type: 1,\n start: 0,\n\n },\n image: 1\n };\n this._resetLeaf(leaf);\n this.leaves.push(leaf);\n this.world.appendChild(leaf.el);\n }\n\n this.world.className = classes.leafScene;\n this.viewport.appendChild(this.world);\n //document.body.appendChild(this.world)\n // set perspective\n this.world.style.webkitPerspective = \"400px\";\n this.world.style.MozPerspective = \"400px\";\n this.world.style.oPerspective = \"400px\";\n this.world.style.perspective = \"400px\";\n\n // reset window height/width on resize\n var self = this;\n window.onresize = function (event) {\n self.width = self.viewport.offsetWidth;\n self.height = self.viewport.offsetHeight;\n };\n }\n\n this.LeafScene.prototype.render = function () {\n this._updateWind();\n for (var i = 0; i < this.leaves.length; i++) {\n this._updateLeaf(this.leaves[i]);\n }\n\n this.timer++;\n\n requestAnimationFrame(this.render.bind(this));\n }\n}", "title": "" }, { "docid": "d6c627bd6245ac51ab3f9333127849ad", "score": "0.5482925", "text": "populateChildren(){\n\n let runner = this.head;\n\n while(runner !== null){\n let numChildren = Math.floor(Math.random() * 5);\n if(numChildren !== 0){\n let childList = new SLL();\n for(let i = 0; i < numChildren; ++i){\n childList.addToFront(Math.floor(Math.random() * 50));\n }\n runner.child = childList;\n }\n runner = runner.next;\n }\n }", "title": "" }, { "docid": "e063cc9dc54d8e3c8bf9d1bca33d8d5f", "score": "0.54784095", "text": "function makeBox(subsSpeed) {\n var random = colors[Math.floor(Math.random() * colors.length)],\n box = document.querySelector('span');\n \n function newBox(){\n var box = document.createElement('span');\n box.className = random\n document.body.appendChild(box);\n move(box,totalHeight,subsSpeed);\n }\n \n if (box) {\n document.body.removeChild(box);\n newBox();\n } else {\n newBox();\n }\n \n}", "title": "" }, { "docid": "86fe19be2b7f1e9670e1f6aeef61b95d", "score": "0.5475167", "text": "function drawTrees()\n{\n\t// Draw trees.\n for(var i = 0; i < trees_x.length; i++)\n {\n fill(100,50,0);\n rect(75 + trees_x[i], -200/2 + floorPos_y, 50, 200/2);\n fill(0,100,0);\n triangle(trees_x[i] + 25, -200/2 + floorPos_y,\n trees_x[i] + 100, -200 + floorPos_y,\n trees_x[i] +175, -200/2 + floorPos_y);\n \n triangle(trees_x[i] + 25, -200/4 + floorPos_y,\n trees_x[i] + 100, -200*3/4 + floorPos_y,\n trees_x[i] +175, -200/4 + floorPos_y);\n }\n}", "title": "" }, { "docid": "8e0937eef51588d002f544a2392a1dd8", "score": "0.5471764", "text": "function randomPosition(bread) {\n let angle = Math.random() * Math.PI * 2;\n let radius = 500;\n\n bread.x = Math.cos(angle) * radius + grandma.x;\n bread.y = Math.sin(angle) * radius + grandma.y;\n}", "title": "" }, { "docid": "96aebe94c1e5d36151db556887469bed", "score": "0.5468756", "text": "makeRoofCoordinates() {\n this.LRhorizontal =\n MIN_BUILDING_HORIZONTAL +\n Math.random() * MAX_BUILDING_HORIZONTAL;\n this.LRvertical =\n this.y < HEIGHT_FLAT\n ? 0\n : Math.min(\n MIN_BUILDING_VERTICAL +\n Math.random() * MAX_BUILDING_VERTICAL,\n this.LRhorizontal\n );\n this.TDhorizontal =\n MIN_BUILDING_HORIZONTAL +\n Math.random() * MAX_BUILDING_HORIZONTAL;\n this.TDvertical =\n this.y < HEIGHT_FLAT\n ? 0\n : Math.min(\n MIN_BUILDING_VERTICAL +\n Math.random() * MAX_BUILDING_VERTICAL,\n this.TDhorizontal\n );\n this.side = this.LRhorizontal > this.TDhorizontal ? 1 : -1;\n this.outerX =\n this.side === 1 ? this.LRhorizontal : this.TDhorizontal;\n this.outerY =\n this.side === 1 ? this.LRvertical : this.TDvertical;\n this.midX =\n this.side *\n (this.side === 1 ? this.TDhorizontal : this.LRhorizontal);\n this.midY = this.side === 1 ? this.TDvertical : this.LRvertical;\n }", "title": "" }, { "docid": "c84fc23433519bd72fa3cbfc277e9e3f", "score": "0.54628736", "text": "function randomBlob(shape, color, position, parent) {\n let randRad = []\n\n for (let i = 0; i < 4; i++)\n randRad[i] = Math.random() * 30 + 40;\n\n const [a, b, x, y] = randRad,\n $blob = $(\"<div>\", {\n \"id\": `${shape}${color}${position}`\n });\n\n $blob.css({\n \"width\": `${shape[0]}px`,\n \"height\": `${shape[1]}px`,\n \"position\": \"absolute\",\n \"left\": `${position[0]}px`,\n \"top\": `${position[1]}px`,\n \"background\": `${color}`,\n \"border-radius\": `${a}% ${100 - a}% ${b}% ${100 - b}% / ${x}% ${y}% ${100 - y}% ${100 - x}%`,\n \"opacity\": \"0.25\"\n });\n\n $(parent).append($blob);\n}", "title": "" }, { "docid": "9a2174b6a46fbafe5e0d8d9a93eef8fc", "score": "0.5458639", "text": "function generateItems() {\r\n generatedItemsWrapper.innerHTML = \"\";\r\n\r\n generateMountain(1);\r\n generateMountain(2);\r\n generateMountain(3);\r\n\r\n numberOfTrees = 0;\r\n\r\n generateTree(1);\r\n generateTree(2);\r\n if (randomNumber(100) < 40) {\r\n generateTree(3);\r\n }\r\n}", "title": "" }, { "docid": "675c73959a3d7e3a838fbb6c254743ff", "score": "0.54580283", "text": "spawn(){\n var element = document.createElement('div');\n element.classList.add('trash');\n element.classList.add(this.type);\n element.style.top = \"0%\";\n element.style.width = `${this.size * 4}px`;\n element.style.height = `${this.size * 4}px`;\n\n element.style.left = Math.floor(Math.random() * Math.floor(89)) + \"%\";\n\n // Add the element to the gameArea\n document.getElementById('gameArea').prepend(element);\n }", "title": "" }, { "docid": "ef36b1c608621dffb1c2abd0f42c5c56", "score": "0.5439701", "text": "function generateStars(){\n var height = $(\".sky\").height() - $(\".ground\").height();\n var width = $(\".sky\").width();\n for(let i = 0; i <= randomise(20, 100); i++){\n var star = document.createElement(\"div\"); \n var starContainer = document.createElement(\"div\"); \n \n //Star Container\n $(starContainer).addClass(\"starContainer\");\n $(starContainer).css(\"top\", randomise(0, height) + \"px\");\n $(starContainer).css(\"right\", randomise(0, width) + \"px\");\n\n // Star\n $(star).addClass(\"star\");\n \n // Append\n $(starContainer).append(star);\n $(\".sky\").append(starContainer);\n }\n}", "title": "" }, { "docid": "f58c0caa9e6854237b146b7603117429", "score": "0.5425516", "text": "function setToRandom(scale) { return { x: Math.random() * scale, y: Math.random() * scale, }; }", "title": "" }, { "docid": "45f1992d86eabf78c338c392779c038c", "score": "0.5424887", "text": "function add_blob(x,y,rad,spee,dist){\n r = random(10,60)\n blobs.push(new Dot(x,y,rad+random(-mutation_amount,mutation_amount),spee+random(-mutation_amount,mutation_amount),0,0,0,dist+random(-mutation_amount*10,mutation_amount*10)))\n}", "title": "" }, { "docid": "7d9422f63a7fef8ae14179072d0a47bd", "score": "0.54240906", "text": "reproduce() {\n this.offspring++;\n var d = Math.random()*Math.PI*2;\n var dst = Math.random()*this.size*1.5\n cells.push(newCell(this.size * Math.sqrt(this.fraction), this.x+Math.cos(d)*dst, this.y+Math.sin(d)*dst, this.color, this.fraction, this.args, this.defComm, this.age));\n this.size *= Math.sqrt(1 - this.fraction);\n }", "title": "" }, { "docid": "77a958361064bace4f9cfbe839844569", "score": "0.5417227", "text": "createTree(treeData) {\n\n // ******* TODO: PART VI *******\n //Create a tree and give it a size() of 800 by 300.\n let size = [800, 400];\n let tree = d3.stratify()\n .id((d, i) => i)\n .parentId(d => d.ParentGame)(treeData)\n .each(d => (d.Name = d.data.Team, d.Winner = d.data.Wins));\n let treemap = d3.tree().size(size);\n this.nodes = treemap(d3.hierarchy(tree, d => d.children));\n let g = d3.select('#tree')\n .attr('transform', 'translate(100, 25)');\n let links = g.selectAll('.link')\n .data(this.nodes.descendants().slice(1))\n .enter()\n .append('path')\n .attr('class', 'link')\n .attr('d', d => ('M' + d.y + ',' + d.x\n + 'C' + (d.y + d.parent.y) / 2 + ',' + d.x\n + ' ' + (d.y + d.parent.y) / 2 + ',' + d.parent.x\n + ' ' + d.parent.y + ',' + d.parent.x));\n let nodes = g.selectAll('.node')\n .data(this.nodes.descendants())\n .enter()\n .append('g')\n .attr('class', d => (d.data.Winner === \"1\" ? 'node winner' : 'node'))\n .attr('transform', d => ('translate(' + d.y + ',' + d.x + ')'));\n nodes.append('circle')\n .attr('r', 6);\n // Align based on parents position:\n nodes.append('text')\n .attr('x', d => (d.children ? -13 : 13))\n .attr('y', d => (d.parent && d.children ? (d.data.Name === d.parent.children[0].data.Name ? -13 : 13) : 0))\n .attr('dy', '0.33em')\n .style('text-anchor', d => (d.children ? 'end' : 'start'))\n .text(d => d.data.Name);\n }", "title": "" }, { "docid": "7018da4d0df2e662355a02a068d95356", "score": "0.54140323", "text": "function randomize(){\n\t\t$(\".face\").each(function(index){\n\t\t\tvar target_position = parseInt( (getRandom(num_monsters) + clix[index]) % num_monsters); \n\t\t\tvar current_position = clix[index] ;\n\t\t\t\n\t\t\tclix[index] = target_position;\n\t\t\t\n\t\t\tif( target_position > current_position ) {\n\t\t\t\tvar move_to = (target_position - (current_position % distance) ) * distance; \n\t\t\t\t$(this).animate({left:\"-=\"+move_to+\"px\"},500);\n\t\t\t}else if( target_position < current_position ){\n\t\t\t\tvar move_to = ( (current_position % distance) - target_position) * distance; \n\t\t\t\t$(this).animate({left:\"+=\"+move_to+\"px\"},500);\n\t\t\t}else{\n\t\t\t\t// They are the same - Don't move it.\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "96fe978a8d0f43767a775d0d34027bce", "score": "0.54125226", "text": "function spawnLeaf(){\n\n if(frameCount%80==0)\n {\n r=(Math.round(random(40,400)))\n leafs=createSprite(r,40,20,10);\n leafs.addImage(leaf)\n leafs.scale=0.1\n leafs.velocityY=3\n\n leafs.lifetime=(200)\n }\n\n\n}", "title": "" }, { "docid": "fb1563ff57b3ec8151c03430e4e60db1", "score": "0.54080606", "text": "function create_tree(position) {\n var angle_offset = Math.PI * 2 / branch_count;\n\n for (var i = 0; i < branch_count; i++) {\n tree.push(new Branch(position, angle_offset * i, start_width));\n }\n}", "title": "" }, { "docid": "342c846e8f5b1a64f4b644208089c979", "score": "0.5393275", "text": "function randomize(){\n let remaining=100; // remaining percent of ancestry to be assigned\n let thresholds={ // modification thresholds\n regions:{\n modifyT:1, // region percentage is modified only if it amounts to at least 1% of computed overall ancestry\n maxPU:function(iA){return exponentialScale(12,18,1,100,1,100-iA);}, // tentative max upward variation by percent, 18 at 1, 12 at 100 (no upward variation possible at 100 but modification range is 1-100 & remaining var ensures no overflow)\n maxPD:function(iA){return exponentialScale(12,18,1,100,1,iA);} // tentative max downward variation by percent, 12 at 1, 18 at 100 (subregion thresholds do not allow downward variation at 1 but modification range is 1-100)\n },\n subregions:{\n modifyT:.6, // subregion percentage is modified only if it amounts to at least .6% of computed overall ancestry\n ranges:[\n {\n s:.6, // lower percentage bound (inclusive)\n e:1, // upper percentage bound (inclusive),\n cont:0, // whether distribution is continuous or split by 0 (0=split,1=continuous)\n same:1, // whether the percentage can remain the same (0=no,1=yes)\n maxU:.1, // max upward variation\n maxD:0, // max downward variation\n pU:.7, // probability of there being upward variation, present only if cont==0\n pD:0, // probability of there being downward variation, present only if cont==0\n u:.1 // change if upward variation\n },\n {\n s:1.1,\n e:2.5,\n maxU:.3\n }\n ]\n }\n }\n\n // creates ancestry structure sorted in ascending order by region and subregion percentage\n let sortedAncestry=[];\n for (let i in ancestry){\n let region={};\n region.n=i;\n region.p=ancestry[i].percentage;\n region.s=[];\n for (let j in ancestry[i].subregions){\n region.s.push({'s':j,'p':ancestry[i].subregions[j]});\n }\n region.s.sort(function(a,b){return a.p-b.p});\n sortedAncestry.push(region);\n }\n sortedAncestry.sort(function(a,b){return a.p-b.p});\n\n // randomization\n console.log(JSON.stringify(sortedAncestry));\n}", "title": "" }, { "docid": "0a84b3594c14b3a8ef53c864ee86d1a7", "score": "0.53881466", "text": "function moveShape() {\r\n \r\n let top = randInt(1, 600);\r\n let left = randInt(1, 95);\r\n \r\n if(randInt(0, 1) > 0.5) {\r\n shape.style.borderRadius = '50%';\r\n } else {\r\n shape.style.borderRadius = '0';\r\n }\r\n shape.style.top = top + 'px';\r\n shape.style.left = left + 'vw';\r\n }", "title": "" }, { "docid": "63c658737fb821f7ee7c13c4e04ed4b7", "score": "0.5386191", "text": "function createTree(bomb){\r\n\tvar createTree = document.createElement(\"div\");\r\n\t//createTree.setAttribute(\"src\", \"img/tree.png\");\r\n\tcreateTree.style.left = (bomb.offsetLeft - 25) + \"px\";\r\n\tcreateTree.style.top = (bomb.offsetTop - 50) + \"px\";\r\n\tcreateTree.className = \"createTree\";\r\n\tdocument.getElementById(\"container\").appendChild(createTree);\r\n\r\n\tvar intervalReplace = setInterval(function(){\r\n\t\t//createTree.parentNode.removeChild(createTree);\r\n\t\tclearInterval(intervalReplace);\t\r\n\t}, 500);\t\r\n}", "title": "" }, { "docid": "a6d1c49ff94d0b36719d692b5fedde2f", "score": "0.5385512", "text": "function relocate() {\n var cols = document.querySelectorAll('.tilesmith-col')\n , cols = slice(cols)\n\n var shortestEl = cols.reduce(function(a,b){\n return ( parseInt(getStyle(a).height) < parseInt(getStyle(b).height) ? a : b )\n })\n var tallestEl = cols.reduce(function(a,b){\n return ( parseInt(getStyle(a).height) > parseInt(getStyle(b).height) ? a : b )\n })\n\n var tallest = parseInt(getStyle(tallestEl).height)\n , shortest = parseInt(getStyle(shortestEl).height)\n , lastEl = parseInt(getStyle(tallestEl.lastChild).height)\n\n if (( shortest + lastEl ) < tallest) {\n shortestEl.appendChild(tallestEl.lastChild)\n relocate()\n }\n }", "title": "" }, { "docid": "d83a9331b43d9ff6a1989bbf1af620c3", "score": "0.53774565", "text": "function randomPositionItems(kind){\n\n var activeKind = kindsOfGames[kind];\n var i = 0;\n var emptyItem = {};\n var itemToMove = {};\n var randomNumber= 0;\n var maxValue = 0;\n var minValue = 1;\n\n maxValue = activeKind.intSize;\n\n while (i < (5 * activeKind.intSize)){\n randomNumber = Math.round(Math.random() * (maxValue - minValue) + minValue);\n\n itemToMove = activeKind.listItems[randomNumber - 1];\n emptyItem = activeKind.listItems[activeKind.listItems.length - 1];\n\n var emptyTop = emptyItem.top;\n var emptyLeft = emptyItem.left;\n var emptyPosition = emptyItem.position;\n\n activeKind.listItems[activeKind.listItems.length - 1].top = itemToMove.top;\n activeKind.listItems[activeKind.listItems.length - 1].left = itemToMove.left;\n activeKind.listItems[activeKind.listItems.length - 1].position = itemToMove.position;\n\n activeKind.listItems[randomNumber - 1].top = emptyTop;\n activeKind.listItems[randomNumber - 1].left = emptyLeft;\n activeKind.listItems[randomNumber - 1].position = emptyPosition;\n\n i++;\n }\n\n }", "title": "" }, { "docid": "32e2ea943a53f842427369dd1c97cccc", "score": "0.53772783", "text": "function shipPlace() {\n player2ships.map(function (item) {\n var dy = Math.random() * (50 + 5) - 5;\n var dx = Math.random() * (30 + 40) - 40;\n el(item.name).style.setProperty(\"margin-left\", dx + \"%\");\n el(item.name).style.setProperty(\"margin-top\", dy + \"%\");\n player2ships.reduce(function (acc, dy) {\n //If y distance between 2 ships too small, randomize again\n if (acc - dy >= 25) {\n shipPlace();\n }\n });\n player2ships.reduce(function (acc, dx) {\n //If x distance between 2 ships too small, randomize again\n if (acc - dx >= 35) {\n shipPlace();\n }\n });\n });\n }", "title": "" }, { "docid": "1e50eb310c4dfe7472f0256af0d97083", "score": "0.53718203", "text": "function pickLocation() {\n\tlet cols = floor(width / scale);\n\tlet rows = floor(height / scale);\n\tfood = createVector(floor(random(cols)), floor(random(rows)));\n\tfood.mult(scale);\n}", "title": "" }, { "docid": "27b5b2dcb8031a890f6434cd12516c4c", "score": "0.53665507", "text": "function showScent(seed, level, density) {\n/* THIS IS STILL BUGGY... fix later!\n It breaks when the size of the grid is smaller than the scent level ! */\n let myColor = seed.myColor;\n // times = 2*level + 1\n yTop = seed.Y - level;\n yBottom = seed.Y + level;\n for (let i = -level; i <= level; i++) {\n xPos = seed.X - i;\n if (xPos >= 0 && xPos < tileSize) {\n if (yTop >= 0) makeScent(xPos, yTop, density, myColor);\n if (yBottom < tileSize) makeScent(xPos, yBottom, density, myColor);\n }\n }\n\n xLeft = seed.X - level;\n xRight = seed.X + level;\n // times = 2*level-1\n for (let i = 1; i <= 2 * level - 1; i++) {\n yPos = seed.Y - i + level;\n if (yPos >= 0 && yPos < tileSize) {\n if (xLeft >= 0) makeScent(xLeft, yPos, density, myColor);\n if (xRight < tileSize) makeScent(xRight, yPos, density, myColor);\n }\n }\n} // showScent", "title": "" }, { "docid": "adec61eac04fe2e0a3a868653370d8dc", "score": "0.53616697", "text": "function tile(node, x0, y0, x1, y1) {\n d3.treemapBinary(node, 0, 0, width, height);\n for (const child of node.children) {\n child.x0 = x0 + child.x0 / width * (x1 - x0);\n child.x1 = x0 + child.x1 / width * (x1 - x0);\n child.y0 = y0 + child.y0 / height * (y1 - y0);\n child.y1 = y0 + child.y1 / height * (y1 - y0);\n }\n}", "title": "" }, { "docid": "60875c9bed132e3992ad6ddf0e542fe3", "score": "0.5358327", "text": "function shuffle(){\n\tfor (var i =0; i<200; i++){\n\t\tfor (var p = Math.floor(Math.random()*15); p > -1; p--){\n\t\tvar ct=parseInt(piece[p].style.top);\n\t\tvar cl=parseInt(piece[p].style.left);\n\t\tvar tempT=tBlank;\n\t\tvar tempL=lBlank;\n\t\ttBlank=ct;\n\t\tlBlank=cl;\n\t\tpiece[p].style.top = tempT +'px';\n\t\tpiece[p].style.left = tempL +'px';\n\t\t}\n\t}\n}", "title": "" }, { "docid": "73a33e9ee55420309c1ab98a09a63994", "score": "0.5349121", "text": "move() {\n\t\tthis.x = this.x + random(-5, 5);\n\t\tthis.y = this.y + random(-5, 5);\n\t}", "title": "" }, { "docid": "7e90794cc7e76ca5a16e0ab50086c089", "score": "0.5348553", "text": "move() {\n this.x = this.x + random(-7, 7);\n this.y = this.y + random(-7, 7);\n }", "title": "" }, { "docid": "abe511073b4df2cb0fcadc76d4dbf36d", "score": "0.5343797", "text": "function updateNodePositions() {\n for (var j = 0; j < this.columns.length; j++) {\n for (var i = 0; i < this.columns[j].length; i++) {\n if (j == 0) {\n continue;\n }\n childNodes = this.myTree.nodes[this.columns[j][i]].children;\n var numChildren = 0;\n var totY = 0;\n\n for (var k = 0; k < childNodes.length; k++) {\n totY += $('#tree_' + childNodes[k]).offset().top;\n numChildren += 1;\n }\n var avY = $('#tree_' + this.columns[j][i]).offset().top;\n var avY = totY / numChildren;\n var myY = $('#tree_' + this.columns[j][i]).offset().top;\n var offset = avY - myY;\n $('#tree_' + this.columns[j][i]).css(\"position\", \"relative\");\n $('#tree_' + this.columns[j][i]).css(\"top\", offset + \"px\");\n }\n }\n }", "title": "" }, { "docid": "f9c6091c5d77ba8b477f0163a787a51e", "score": "0.53413856", "text": "function world_generation () {\r\n if(!world_generation_done){\r\n for (indexX=minX+5; indexX<maxX-5; indexX++) {\r\n for (indexZ=minZ+5; indexZ<maxZ-5; indexZ++) {\r\n random = Math.random();\r\n if(!((indexX<4 && indexX>-4) && (indexZ<4 && indexZ>-4))){\r\n //if random above threshold an element is generated\r\n if(random > threshold) {\r\n var element = Math.floor(Math.random()*(maxType-minType))+minType;\r\n if (isTree(element)){\r\n if(indexX==minX+5) { //first raw\r\n if(!(indexZ==minZ+5)){ //not first column\r\n if (isTree(object_type[element-1])){\r\n element = randomNotTree(); \r\n }\r\n } \r\n } else { //other raws\r\n if(!(indexZ==minZ+5)){ //not first column\r\n if (indexZ==maxZ-6) {\r\n if (isTree(object_type[element-1]) || isTree(object_type[element-90]) || isTree(object_type[element-91])){\r\n element = randomNotTree(); \r\n }}\r\n else {\r\n if (isTree(object_type[element-1]) || isTree(object_type[element-90]) || isTree(object_type[element-91]) || isTree(object_type[element-89])){\r\n element = randomNotTree(); \r\n }\r\n }\r\n } else {\r\n if (isTree(object_type[element-90]) || isTree(object_type[element-89])){\r\n element = randomNotTree(); \r\n }\r\n }\r\n }\r\n }\r\n object_type[number_elements] = element;\r\n //more flowers!\r\n if (object_type[number_elements]<6 && object_type[number_elements]>2) {\r\n object_type[number_elements]=1;\r\n }\r\n object_x_coordinates[number_elements] = indexX;\r\n object_z_coordinates[number_elements] = indexZ;\r\n number_elements += 1;\r\n } else {\r\n //save of the not filled positions\r\n not_chosen_x[not_chosen_counter]=indexX;\r\n not_chosen_z[not_chosen_counter]=indexZ;\r\n not_chosen_counter= not_chosen_counter+1;\r\n }\r\n }\r\n }\r\n }\r\n rockGeneration(); \r\n birdPostioning();\r\n } \r\n world_generation_done = true;\r\n}", "title": "" }, { "docid": "a6cd63c74d74ba1b1c70ba33ccd93389", "score": "0.5325915", "text": "function createElement() {\n var width = Math.floor(Math.random() * 4);\n var height = Math.floor(Math.random() * 4);\n var elem = document.createElement('div')\n elem.classList.add('grid-item');\n elem.classList.add('grid-item--width1');\n elem.classList.add('box');\n elem.classList.add('container');\n\n var header = document.createElement('div');\n header.classList.add('level');\n\n\n var icon = document.createElement('i');\n icon.classList.add('icon');\n icon.classList.add('is-large');\n icon.classList.add('level-item');\n\n var left = document.createElement('div');\n left.classList.add('level-left');\n left.append(icon);\n\n var titleText = document.createTextNode('Title');\n \n var title = document.createElement('h3');\n title.classList.add('title');\n title.classList.add('is-5');\n title.classList.add('level-item');\n title.appendChild(titleText);\n\n var right = document.createElement('div');\n right.classList.add('level-right');\n right.append(title);\n\n var textContent = document.createTextNode('Curl up and sleep on the freshly laundered towels knock over christmas tree.');\n var text = document.createElement('p');\n text.appendChild(textContent);\n \n header.append(left);\n header.append(right);\n elem.append(header);\n elem.append(text);\n \n return elem;\n}", "title": "" }, { "docid": "185411dd853faf5249459a15818ce171", "score": "0.5321428", "text": "_randomPosForFood(){\n this.food.x = Math.round(Math.random()*(CONSTANTS.CANVAS_WIDTH-CONSTANTS.RECT_WIDTH)/CONSTANTS.RECT_WIDTH);\n this.food.y = Math.round(Math.random()*(CONSTANTS.CANVAS_HEIGHT-CONSTANTS.RECT_HEIGHT)/CONSTANTS.RECT_HEIGHT);\n }", "title": "" }, { "docid": "b308ce337a947476b374e659863e51e7", "score": "0.53200054", "text": "function randomBoxes(nbrBoxes, minSide, maxSide, minHeight, maxHeight) {\r\n let city = new THREE.Object3D();\r\n for (let i = 0; i < nbrBoxes; ++i) {\r\n let scaleX = Math.random() * (maxSide - minSide) + minSide;\r\n let scaleY = Math.random() * (maxHeight - minHeight) + minHeight;\r\n let scaleZ = Math.random() * (maxSide - minSide) + minSide;\r\n let geom = new THREE.BoxGeometry(scaleX, scaleY, scaleZ);\r\n let c = getRandomColor(0.8, 0.1, 0.8);\r\n let args = { color: c, opacity: 0.8, transparent: true };\r\n let mat = new THREE.MeshLambertMaterial(args);\r\n let building = new THREE.Mesh(geom, mat);\r\n //randomly produce x and z position.\r\n let x = Math.random() * (200 - scaleX) - (100 - scaleX / 2); //random position from -100 to 100 across the floor, but subtracing the size of the actual object.\r\n let z = Math.random() * (200 - scaleZ) - (100 - scaleZ / 2);\r\n //compute y position based on placing the bottom at -50 for the floor.\r\n let y = scaleY / 2 - 50;\r\n building.position.set(x, y, z);\r\n city.add(building);\r\n }\r\n return city;\r\n}", "title": "" }, { "docid": "3b037444070784f4e89d5421ad642138", "score": "0.5315652", "text": "function populate_blobs(){\n r = random(10,60)\n blobs.push(new Dot(random(0,width),random(0,height),r,random(1,10),0,0,0,random(20,250)+r))\n}", "title": "" }, { "docid": "153b8b119b950ad0143db61d4a737146", "score": "0.53149015", "text": "function setVariables() {\n num_x = random(3, 24);\n num_y = random(3, 24);\n size = random(50, 100);\n}", "title": "" }, { "docid": "664b32ff78286f5372948ddf95c928c9", "score": "0.5313623", "text": "function initBalls() {\n container.css({'position':'relative'});\n for (i=0;i<ballCount;i++) {\n var newBall = $('<b />').appendTo(container),\n size = rand(ballMinSize,ballMaxSize);\n newBall.css({\n 'position':'absolute',\n 'width': size+'px',\n 'height': size+'px',\n 'opacity': rand(.1,.8),\n 'background-color': 'rgb('+rand(0,255,true)+','+rand(0,255,true)+','+rand(0,255,true)+')',\n 'top': rand(0,container.height()-size),\n 'left': rand(0,container.width()-size)\n }).attr({\n 'data-dX':rand(-10,10),\n 'data-dY':rand(1,10)\n });\n }\n}", "title": "" }, { "docid": "78488e078dda7065072695d8dff53fe3", "score": "0.53097564", "text": "function actualize()\n{\n var masterpiece = new MasterPiece($('svg').width(), $('svg').height());\n var masterPiece = new MasterPiece($('.svg1').width(), $('.svg1').height());\n masterpiece.build();\n masterPiece.build();\n masterpiece.build(120);\n masterPiece.build(120);\n masterpiece.draw('svg');\n masterPiece.draw('.svg1');\n}", "title": "" }, { "docid": "bcb884fe0e3260a47a587ec5007ac490", "score": "0.5307757", "text": "reset() {\n this.x = random(width);\n this.y = random(height);\n }", "title": "" }, { "docid": "6c5eac0e5071738a199a60b400370620", "score": "0.5307648", "text": "function randSize(elmt){\n elmt.style.height = Math.floor((Math.random() * 300) + 10) + \"px\";\n }", "title": "" }, { "docid": "4d4d20857fe2fc636a78c6359ea4a902", "score": "0.53048986", "text": "function placePieces () {\n // Get a list of the child nodes\n const parentContainer = document.getElementById('board-container');\n let squareNodes = parentContainer.childNodes;\n // make numbers to use in Ids\n let numP = 1;\n let nump = 1;\n let numR = 1;\n let numr = 1;\n let numN = 1;\n let numn = 1;\n let numB = 1;\n let numb = 1;\n let id = '';\n for (let i = 0; i < squareNodes.length - 1; i++) {\n let sq = squareNodes[i].getAttribute('id');\n // place white pawns\n if (sq[1] == '2') {\n id = 'P' + numP\n squareNodes[i].insertAdjacentHTML('afterbegin', '<img id=\"' + id + '\" class=\"piece\" src=\"../assets/images/pieces/wp.svg\"/>');\n numP++;\n }\n // place black pawns\n if (sq[1] == '7') {\n id = 'p' + nump\n squareNodes[i].insertAdjacentHTML('afterbegin', '<img id=\"' + id + '\" class=\"piece\" src=\"../assets/images/pieces/bp.svg\"/>');\n nump++;\n\n }\n // place white rooks\n else if (sq == 'a1' || sq == 'h1') {\n id = 'R' + numR\n squareNodes[i].insertAdjacentHTML('afterbegin', '<img id=\"' + id + '\" class=\"piece\" src=\"../assets/images/pieces/wr.svg\"/>');\n numR++;\n }\n // place black rooks\n else if (sq == 'a8' || sq == 'h8') {\n id = 'r' + numr\n squareNodes[i].insertAdjacentHTML('afterbegin', '<img id=\"' + id + '\" class=\"piece\" src=\"../assets/images/pieces/br.svg\"/>');\n numr++;\n }\n // place white knights\n else if (sq == 'b1' || sq == 'g1') {\n id = 'N' + numN;\n squareNodes[i].insertAdjacentHTML('afterbegin', '<img id=\"' + id + '\" class=\"piece\" src=\"../assets/images/pieces/wn.svg\"/>');\n numN++;\n }\n // place black knights\n else if (sq == 'b8' || sq == 'g8') {\n id = 'n' + numn\n squareNodes[i].insertAdjacentHTML('afterbegin', '<img id=\"' + id + '\" class=\"piece\" src=\"../assets/images/pieces/bn.svg\"/>');\n numn++;\n }\n // place white bishops\n else if (sq == 'c1' || sq == 'f1') {\n id = 'B' + numB\n squareNodes[i].insertAdjacentHTML('afterbegin', '<img id=\"' + id + '\" class=\"piece\" src=\"../assets/images/pieces/wb.svg\"/>');\n numB++;\n }\n // place black bishops\n else if (sq == 'c8' || sq == 'f8') {\n id = 'z' + numb // This avoids creating the same id as square \"a1\"\n squareNodes[i].insertAdjacentHTML('afterbegin', '<img id=\"' + id + '\" class=\"piece\" src=\"../assets/images/pieces/bb.svg\"/>');\n numb++;\n }\n // place white queen\n else if (sq == 'd1') {\n squareNodes[i].insertAdjacentHTML('afterbegin', '<img id=\"Q0\" class=\"piece\" src=\"../assets/images/pieces/wq.svg\"/>');\n }\n // place black queen\n else if (sq == 'd8') {\n squareNodes[i].insertAdjacentHTML('afterbegin', '<img id=\"q0\" class=\"piece\" src=\"../assets/images/pieces/bq.svg\"/>');\n }\n // place white king\n else if (sq == 'e1') {\n squareNodes[i].insertAdjacentHTML('afterbegin', '<img id=\"K0\" class=\"piece\" src=\"../assets/images/pieces/wk.svg\"/>');\n }\n // place black king\n else if (sq == 'e8') {\n squareNodes[i].insertAdjacentHTML('afterbegin', '<img id=\"k0\" class=\"piece\" src=\"../assets/images/pieces/bk.svg\"/>');\n }\n }\n}", "title": "" }, { "docid": "c50a9da2c8a65ed276efebdd0694b501", "score": "0.5299528", "text": "init() {\n for (let i = 0; i < this.count; i++) {\n this.RandomPos();\n this.people.push(setPersonPos(this.posX, this.posY));\n this.prePeople.push(setPersonPos(this.posX, this.posY));\n const man = document.createElement('div');\n this.setPos(man, this.posX, this.posY);\n etc.appendChild(man);\n }\n }", "title": "" }, { "docid": "6d31bb1b434c8e81d9a37920ed38bf00", "score": "0.5297135", "text": "function createTilelist(){\n\nvar ranVal;\n\n for (var n = 0; n < 3; n++){\n\n for (var j = 0; j <= 9; j++){\n\n var tile = new Object();\n\n tile.startingX = Math.floor(j*5.4*htmlFontsize);\n tile.startingY = Math.floor(n*5.4*htmlFontsize);\n tile.realX = tile.homeX;\n tile.realY = tile.homeY;\n tile.played = 0;\n tile.selected = 0;\n\n //get ten vowels and twenty consonants\n if(n==0){\n ranVal = getRandomArbitrary(0, 5);\n tile.value = vowels.charAt(ranVal);\n }else{\n ranVal = getRandomArbitrary(0, 21);\n tile.value = consonants.charAt(ranVal);\n }\n tileList.push(tile);\n\n d = document.createElement('div');\n\n $(d).draggable().css(\"position\", \"absolute\");\n\n //physically let tile know where it first lives change left and top to change location later\n $(d).css(\"left\", tile.startingX);\n $(d).css(\"top\", tile.startingY);\n\n //Let know where current home is so it can return there\n $(d).data( \"homeX\", tile.startingX );\n $(d).data( \"homeY\", tile.startingY );\n\n $(d).css(\"transform\", \"scale(1,1)\");\n $(d).text(tile.value);\n $(d).addClass(\"onboardtextFormat\");\n $(d).addClass(\"onboardvisFormat\");\n $(d).addClass(\"tileNatural\");\n\n var v = document.createElement('span');\n $(v).addClass('tilevalue');\n $(v).text(2);\n $(d).append($(v));\n\n $(d).appendTo($(\".tileArea\"));\n\n }\n //Draw Main Play Board here\n }\n}", "title": "" } ]
29f4b9a7678c83dcd482a00edec25bf0
method: handle removing coins
[ { "docid": "710277933bb3110e55c898416c7ffeda", "score": "0.65570205", "text": "handleCoinsToClear(coin){\n let localCoinData = this.handleGetLocalStorage();\n let coinFound = localCoinData.find(x => x.id === coin);\n\n coinFound.available = 0;\n localStorage.setItem('coins', JSON.stringify(localCoinData));\n\n let localCoinDataUpdate = this.handleGetLocalStorage();\n this.setState(() => ({\n coins: localCoinDataUpdate\n }));\n\n this.handleLiveUpdates();\n }", "title": "" } ]
[ { "docid": "8c2706c796656ead5fb605a94588b28d", "score": "0.7755564", "text": "removeCallback(coin) {\n coin.scene.coinPool.add(coin);\n }", "title": "" }, { "docid": "f8807972e78465fa79bb10b4fa2f2e2b", "score": "0.7503747", "text": "removeCallback(coin) {\n coin.scene.coinGroup.add(coin);\n }", "title": "" }, { "docid": "09f4c2b7b918a1cb6d5821644e9e7dd8", "score": "0.739034", "text": "function getCoin(player, coin) {\n coin.remove();\n score += 1;\n}", "title": "" }, { "docid": "b7ddf370bea48b4b91a880aa421a8853", "score": "0.7161577", "text": "function removeCoin() {\n if ($(`.coin`).hasClass(`used`)) {\n $(`.used`).remove();\n }\n}", "title": "" }, { "docid": "594d49abddbe512d3ffff7cf5faf0466", "score": "0.70049703", "text": "function dropCoin() {\n if (currPlayer.wealth > 0) {\n currPlayer.wealth--;\n currMaze.addItem(currPlayer.roomIndex, { type: 'treasure', wealth: 1, name: 'coin' });\n }\n else {\n alert('you must have at least one coin to drop!');\n }\n }", "title": "" }, { "docid": "38d76b2fe71e9514cdaf13aeacc364e3", "score": "0.6715163", "text": "unStockCoins(coin, amount) {\n let stockAvailable = this.coins[coin].stock;\n if (stockAvailable > 0) {\n return (this.coins[coin].stock -= amount);\n } else {\n return `There is ${stockAvailable} left and it cannot be unstocked.`;\n }\n }", "title": "" }, { "docid": "7700828848da8ed460880f12947ba294", "score": "0.66527575", "text": "function checkCoins() {\n // Checks if player has a higher x coordinate than the coin. If true then remove the coin and increase points.\n for (var i = 0; i < coins.length; i++) {\n if (playerXposition >= coins[i].xPos) {\n $(\"#coin-\" + coins[i].id).remove();\n score += 5;\n $(\"#scoreBoard\").text(score);\n }\n }\n }", "title": "" }, { "docid": "5cccb440a1700550feb8f2f84b2f42f6", "score": "0.66035706", "text": "coin_take(player,coin){\n coin.destroy(); //Destroy the coin sprite\n }", "title": "" }, { "docid": "74748c699698aa5f71ce61751c7d277c", "score": "0.6590093", "text": "removeCoins(coinsToRemove, timeout) {\n\n for (var i = 0; i < coinsToRemove.length; i++) {\n // get index from coin array\n var index = this.coins.findIndex(function(element) {\n return element.id === coinsToRemove[i].id;\n });\n // remove Animation\n terminateCoin(this.coins[index]);\n }\n\n setTimeout(function (coins, coinsToRemove) {\n for (var i = 0; i < coinsToRemove.length; i++) {\n // get index from coin array\n var index = coins.findIndex(function(element) {\n return element.id === coinsToRemove[i].id;\n });\n // remove Animation\n coins.splice(index, 1);\n }\n }, 1000, this.coins, coinsToRemove);\n\n }", "title": "" }, { "docid": "e021b3add5282d572e8e68296b40f1f9", "score": "0.6579969", "text": "function collectCoin(player, Coin){\n CoinPU.play();\n Coin.kill();\n coinsCollected+=1;\n }", "title": "" }, { "docid": "7d0a38f1cb3aee855827a9aaad5d3365", "score": "0.65680367", "text": "function collectCoin(sprite, tile) {\n coinLayer.removeTileAt(tile.x, tile.y); // remove the tile/coin\n score++; // add 10 points to the score\n text.setText(score); // set the text to show the current score\n return false;\n}", "title": "" }, { "docid": "7d0a38f1cb3aee855827a9aaad5d3365", "score": "0.65680367", "text": "function collectCoin(sprite, tile) {\n coinLayer.removeTileAt(tile.x, tile.y); // remove the tile/coin\n score++; // add 10 points to the score\n text.setText(score); // set the text to show the current score\n return false;\n}", "title": "" }, { "docid": "bead3249bbe21de936f71064eff1f7b3", "score": "0.6457112", "text": "function removeCoin (y, x) {\n // Looping through the array. Create X and Y value for the index coin. \n for (var i = 0; i < coinArray.length; i++) {\n var coinX = Math.floor((coinArray[i].position().left) / 60); // Divide by 60 and round down to get a value between 0-9.\n var coinY = Math.floor((coinArray[i].position().top) / 60); // Divide by 60 and round down to get a value between 0-9.\n\n // If the coins´ x- and y-positon is equal to whats passed in, hide the coin, and set that position to be free-position.\n if (coinX === x && coinY === y) {\n coinArray[i].hide();\n gameArray[y][x] = 1; \n } \n }\n // Change border colour to yellow to notify about coin pick up. \n gameArea.css (\"border-color\", \"yellow\" );\n\n coinAudio.play(); \n score++;\n $('#score').html(score); \n}", "title": "" }, { "docid": "3dddf2eaa651774a6c8f546c5894a241", "score": "0.6364053", "text": "handleCoinsToRemove(coin, e){\n e.preventDefault();\n\n let coinsToRemove = e.target.elements.coinToRemove.value //user input\n let localCoinData = this.handleGetLocalStorage();\n\n let coinFound = localCoinData.find(x => x.id === coin);\n coinFound.available = Number(coinFound.available) - Number(coinsToRemove);\n localStorage.setItem('coins', JSON.stringify(localCoinData));\n\n let localCoinDataUpdate = this.handleGetLocalStorage();\n this.setState(() => ({\n coins: localCoinDataUpdate\n }));\n\n this.handleLiveUpdates();\n }", "title": "" }, { "docid": "dfc3d9b14d51ce4bee779a96c5779bd6", "score": "0.62843615", "text": "function getCoins (goblin, coin) {\n\n coin.kill()\n\n score += 1\n scoreCounter.text = 'Coins: ' + score\n\n console.log(score)\n\n}", "title": "" }, { "docid": "e33894d1e16e670a0e4837022008d44d", "score": "0.61427593", "text": "function coinVanish(coin){\n if(coin.get){\n coin.position.x=random(50,gameConfig.screenX)+gameConfig.screenX;\n coin.get=false;\n };\n}", "title": "" }, { "docid": "a191a825a1887a490a3724cc3e87b4fc", "score": "0.6127387", "text": "lose(){\n this.chips -= this.bet;\n }", "title": "" }, { "docid": "720a05f3015c8078d26118e299f4a59f", "score": "0.6096752", "text": "handleDeleteCoin(optionToRemove){\n\n let localCoinData = this.handleGetLocalStorage();\n localCoinData = localCoinData.filter((coin) => {\n return (optionToRemove !== coin.id);\n });\n \n localStorage.setItem('coins', JSON.stringify(localCoinData));\n\n this.setState((prevState) => ({\n coins: prevState.coins.filter((coin) => {\n return (optionToRemove !== coin.id);\n })\n }));\n\n }", "title": "" }, { "docid": "0f546f447bdc55c111cb54549920a996", "score": "0.60240763", "text": "checkForTermination(checkRowOrColumn) {\n for (var i = 1; i < this.width; i++) {\n var lastOwner = \"\";\n var currentOwner = \"\";\n var count = 0;\n var coinsToRemove = [];\n var coin;\n for (var j = 1; j < this.height; j++) {\n // get coin on Position\n if (checkRowOrColumn == \"rows\") {\n coin = this.getCoinByXY(i, j)[0];\n } else { // check Columns.\n coin = this.getCoinByXY(j, i)[0];\n }\n\n // if no coin exists\n if (coin == undefined) {\n if (count >= this.coinsToSolve) {\n count++;\n this.removeCoins(coinsToRemove);\n this.addScroreToPlayer(lastOwner, count);\n }\n coinsToRemove = []; count = 0;\n } else if (coin.owner != lastOwner && count >= this.coinsToSolve) {\n count++;\n this.removeCoins(coinsToRemove);\n this.addScroreToPlayer(lastOwner, count);\n coinsToRemove = []; count = 0;\n } else if (coin.owner == lastOwner || count == 0) {\n count++;\n lastOwner = coin.owner;\n coinsToRemove.push(coin);\n if ((j == this.height - 1 && coinsToRemove.length >= this.coinsToSolve)) {\n count++;\n this.removeCoins(coinsToRemove);\n this.addScroreToPlayer(lastOwner, count);\n coinsToRemove = []; count = 0;\n }\n } else if (coin.owner != lastOwner) {\n coinsToRemove = []; count = 1;\n coinsToRemove.push(coin);\n lastOwner = coin.owner;\n }\n }\n }\n }", "title": "" }, { "docid": "e6fcf867e34adbf23a15d93bc3c13e9b", "score": "0.5989475", "text": "function addCoins(coinNumber, coinValue) {\n for (let i = 1; i <= coinNumber; i++) {\n const drop = document.createElement('div');\n if (coinValue = 'penny') {\n drop.className = 'penny'\n } else if (coinValue = 'nickel') {\n drop.className = 'nickel'\n } else if (coinValue = 'dime') {\n drop.className = 'dime'\n } else if (coinValue = 'quarter') {\n drop.className = 'quarter'\n }\n // if statement to differentiate className by the coinType input\n document.getElementById('coinHolder').appendChild(drop)\n }\n\n\n\n //whenever a coin is clicked, remove just that the clicked coin from the page.\n function removeCoin('click', () => {\n // click action should remove element\n })\n }", "title": "" }, { "docid": "acec1c61d25aba695bcd53e525cdc396", "score": "0.59688234", "text": "_handleRemove() {\r\n if (this.userQuantity > 0)\r\n this.userQuantity -= 1;\r\n if (this.totalPrice > 0)\r\n this.totalPrice = this.totalPrice - parseInt(this.price);\r\n }", "title": "" }, { "docid": "0c934e7b43ef400fb663e5672261ade6", "score": "0.59525955", "text": "function resetCoins(){\n\tlet monnaieRendue = monnaieInsert - prix;\n\tmonnaieRendue = (Math.round(monnaieRendue*100))/100;\n\treturn monnaieRendue;\n}", "title": "" }, { "docid": "85222e71faefb3bfc00d998feffa22b0", "score": "0.59370506", "text": "removeCoinData(index) {\r\n var array = this.state.myCoinsData;\r\n array.splice(index -1, 1);\r\n this.setState({myCoinsData: array});\r\n this.refs.pagination.setPage(this.state.currentPage);\r\n this.calculateTotalAmount();\r\n\r\n //Remove Coin from cookie\r\n window.localStorage.setItem(\"saved_coins_list\", JSON.stringify(array));\r\n }", "title": "" }, { "docid": "fc70c0c5250e62d0ee5e0e70cf54fbc0", "score": "0.5913218", "text": "async function coinChange(){}", "title": "" }, { "docid": "78abae3381cc08a1858bc526ce91c723", "score": "0.58798796", "text": "function checkCoin(coin) {\n if(coin.posY === 0) {\n if (pouch.posX === coin.posX && pouch.posY === coin.posY){\n pouch.coins += 1;\n console.log(\"You have collected \" + pouch.coins + \" coins!\");\n console.log(\"\");\n }\n else {\n console.log(\"Oops! You missed a coin!\");\n console.log(\"\");\n pouch.missed += 1;\n }\n //spawn a new coin at top\n coin.posX = Math.floor(Math.random() * 10 + 1);\n coin.posY = 10;\n }\n}", "title": "" }, { "docid": "634032ab660aba9ace03a8b0faa654d0", "score": "0.5845646", "text": "function modalCoinUncheked(coinName){\r\n let uncheckedCoin = coinName.id;\r\n if(coinName.checked == false){\r\n // Removes coin from array.\r\n var index = selectedCoinsArray.indexOf(uncheckedCoin);\r\n if (index !== -1) {\r\n selectedCoinsArray.splice(index, 1);\r\n }\r\n selectedCoinsArray.length = 5;\r\n $(\"#modalContainer\").removeClass(\"show\");\r\n $( `.${uncheckedCoin}` ).prop( \"checked\", false );\r\n\r\n }\r\n}", "title": "" }, { "docid": "3fc120ff699a40af2539ea75099bc55d", "score": "0.5832163", "text": "function handleCoinPurchase() {\n\t\t\tupdateCoinCount.call(this, coinCount + 5);\n\t\t}", "title": "" }, { "docid": "070670bc607a642dc8fb0eeb9ddf41c8", "score": "0.5780449", "text": "dispenseCoinBank() {\n let lengthObject = Object.keys(this.coins).length;\n for (let i = 0; i < lengthObject; i++) {\n Object.values(this.coins)[i].stock -= Object.values(this.coinBank)[\n i\n ].stock;\n Object.values(this.coinBank)[i].stock = 0;\n }\n return `Sorry it didn't work out. Your change has been returned.`;\n }", "title": "" }, { "docid": "336b3deb2b59f6451fcfc30f28c1881d", "score": "0.56508166", "text": "function pakTerm(){\n if (coins == 0){\n health = health - 3;\n }else if (coins == 1){\n coins = coins - 1;\n health = health - 2;\n }else if (coins == 2){\n coins = coins - 2;\n health = health - 1;\n }else{\n coins = coins - 3;\n }\n}", "title": "" }, { "docid": "25a3aef2b2cdd841d1b146976d3058e2", "score": "0.5646661", "text": "function checkAndDestroy()\n{\n checkAndDestroyMine();\n checkAndDestroyCoin();\n}", "title": "" }, { "docid": "c75e6ba2a77bb8d5b1335bba38a62cce", "score": "0.5646527", "text": "function removeFromSpendingMoney(sumToRemove) {\n spendingMoney -= Number(sumToRemove);\n const spendingMoneyLbl = document.getElementById(\"spending-money\");\n spendingMoneyLbl.innerHTML = spendingMoney;\n }", "title": "" }, { "docid": "53fc1b3fd96b7eb05c76b967390c4cb8", "score": "0.5637262", "text": "function DeleteCoin() {\n\n readContent();\n\n $.ajax({\n url: '/api/coin/' + content.Id,\n type: 'DELETE',\n success: function(model) {\n window.UpdateIndexContent(model, '#modCoinDialog');\n },\n error: function(data) {\n $('#coinResult').css(\"display\", \"block\");\n $('#coinResult').append(data.responseText);\n }\n });\n}", "title": "" }, { "docid": "c1cd6d33a2368272260f0711f633370a", "score": "0.5636973", "text": "function add_coin(coin, amount){\n while (amount >= coin_values[coin]){\n amount -= coin_values[coin];\n fanny_pack[coin] += 1;\n console.log('added :' + coin)\n };\n remnant = amount;\n }", "title": "" }, { "docid": "c67bc3d2347ff99c787d4c4f1ca0e549", "score": "0.56325024", "text": "function Coin(){\n\tthis.x;//starts empty, will keep track of each coin's left/right position on stage.\n\tthis.y;//starts empty, will keep track of coin's up-down\n\t\n\tthis.item_on_page;\n\t// function does lots of things when a coin gets created \n\tthis.create = function(){\n\t\t//make a section element in the HTML, Store it into the item-on page we set up above\n\t\tthis.item_on_page = document.createElement(\"section\");\n\t\t//store a random X/Y position different for each coin\n\t\tthis.x = Math.floor(Math.random()*500);\n\t\tthis.y = Math.floor(Math.random()*300);\n\t\t//use those y coordinates in the css to position the coins:\n\t\tthis.item_on_page.style.left = this.x + \"px\";\n\t\tthis.item_on_page.style.top = this.y + \"px\";\n\t\t//attach the item to our HTML hierarchy as a child of the body\n\t\tdocument.getElementsByTagName(\"body\")[0].appendChild(this.item_on_page);\n\t}\n\t\n\t//does many things when coin goes away\n\tthis.destroy = function(e){\n\t\t//console.log(\"dis stuff be workin\");\n\t\tdocument.getElementsByTagName(\"body\")[0].removeChild(e.target);\n\t\t//figure out coin's position in array\n\t\tvar this_coins_index_num = coin_array.indexOf(this);\n\t\t//splice it out of the array\n\t\tcoin_array.splice(this_coins_index_num,1);\n\t\t//console.log(coin_array.length);\n\t}\n\t\n\t\n}//close the class", "title": "" }, { "docid": "13f8bec5313d7f4826225ab3f225da3c", "score": "0.56059074", "text": "transferCash(player,square){\n if(square.cash > 0){\n player.cash += square.cash;\n square.removeCash();\n }\n }", "title": "" }, { "docid": "c650249e1212b87a9a72eec7d21d5b85", "score": "0.55886835", "text": "function collectCoin(sprite, tile) {\n\n}", "title": "" }, { "docid": "11295a8bc5c14e6f21c81a114a9cf281", "score": "0.557624", "text": "function RemoveStamina(){\n var cost = 600;\n Fokus = Fokus -cost;\n FokusConsumed = FokusConsumed + cost;\n if( Remembering - cost < 0 )\n Remembering =0;\n else\n Remembering = Remembering- cost;\n CheckDead();\n}", "title": "" }, { "docid": "061c24df1767ccacc25a3723a6703ebb", "score": "0.5574202", "text": "_calculateCoins(amount) {\n let change = [];\n\n for (let coin of this._coins) {\n if (coin.value > amount) {\n continue;\n }\n\n let quantitiy = Math.floor(amount / coin.value);\n change.push({coin: coin.text, quantitiy: quantitiy});\n\n amount -= coin.value * quantitiy;\n }\n\n return change;\n }", "title": "" }, { "docid": "558628e7e06541a914e1f2934c337063", "score": "0.55652267", "text": "function removeCard(e){\n kaartenOpSpeelVeld--;\n kaartenGespeeld++;\n console.log(\"Kaart verwijderd, kaarten op speelveld: \" + kaartenOpSpeelVeld);\n\n if (e.dataset.category == \"potion\"){\n health += parseInt(e.dataset.value);\n }else if(e.dataset.category == \"monster\"){\n health -= parseInt(e.dataset.value);\n }else if(e.dataset.category == \"coin\"){\n coins += parseInt(e.dataset.value);\n }\n\n statsUpdate();\n e.remove();\n}", "title": "" }, { "docid": "718f5b0274fb95637a18952d7b383b0e", "score": "0.5559094", "text": "coinInsert(coin) {\n if (coin == this.coinBank[coin].name) {\n this.coinBank[coin].stock += 1;\n this.coins[coin].stock += 1;\n }\n }", "title": "" }, { "docid": "eaf0de5334251c85b5ae0343d42b2d41", "score": "0.5558935", "text": "stockUpCoins(coin, amount) {\n let stockAvailable = this.coins[coin].stock;\n if (stockAvailable < 20) {\n return (this.coins[coin].stock += amount);\n } else {\n return `There is ${stockAvailable} left and it does not need to be restocked.`;\n }\n }", "title": "" }, { "docid": "52251d3ff0c76b85797ecc6d59dbbe57", "score": "0.55486184", "text": "function subtractHandler(e) {\n var id = getClickedItemID(e.target);\n\n // Add to model\n cart.remove(id);\n\n // Refresh View\n updateView();\n updateCart();\n }", "title": "" }, { "docid": "7d0c4ba4924d0a122a5c2a49d71a923b", "score": "0.5539157", "text": "function p1collectDot (player, dot)\n{\n p1Score += dotScore;\n dot.remove();\n}", "title": "" }, { "docid": "7510e196df5342b58d75cf55dcc91a81", "score": "0.55293715", "text": "function removeAllBitcoinAddresses() {\r\n\t\t_bitcoinAddressesContainer.find('.item').remove();\r\n\t}", "title": "" }, { "docid": "00fb76fb5b5c5fedcc6b724bb1eaf52e", "score": "0.5523682", "text": "function undoHearts() {\n \n \n }", "title": "" }, { "docid": "c5366bbbb76936bce097a4c15ff68a54", "score": "0.5521826", "text": "undo()\n\t{\n\t\t// Must set back graph before calling undo.\n\n\t\t// Scale Back player scores and occupancy levels\n\t\tfor(let p of this.players) {\n\t\t\tp.scores.pop();\n\t\t\tp.occupancy = 0;\n\t\t}\n\t\tfor(let n of this.nodes) {\n\t\t\tn.player.occupancy++;\n\t\t}\n\t}", "title": "" }, { "docid": "3fe00e5366e19d06c5e002e230df974f", "score": "0.5512719", "text": "function addCoin(){\n var x = Math.random() * canvas.width;\n var y = Math.random() * canvas.height;\n \n //Check if x and y rest on an enemy\n function hittingEnemy(){\n \n for (var i = enemies.length-1;i>=0;i--){\n var enemy = enemies[i];\n if (Math.abs(enemy.x - x)<(COIN_SIZE + enemy.size)/2 \n && Math.abs(enemy.y - y)<(COIN_SIZE + enemy.size)/2){\n return true;\n }\n }\n \n return false;\n }\n \n while (hittingEnemy()){\n x = Math.random() * canvas.width;\n y = Math.random() * canvas.height;\n }\n \n //Now we can create a coin\n \n coins.push( new GameObject(x,y,\"#00f\",COIN_SIZE));\n \n}", "title": "" }, { "docid": "e32307d9c7d7e31189c5880dd7b229ff", "score": "0.55026346", "text": "function UpdateCoinsCount(qtd) {\n player.resources.maxCoins += qtd;\n player.resources.coins += qtd;\n}", "title": "" }, { "docid": "6eeff9972d41d21b85854ad0a9ca15be", "score": "0.55008596", "text": "function removeHealth() {\n if (curHealth == 0) {\n $('.message-box').html(\"Is this the end??\");\n } else {\n var damage = Math.floor((Math.random() * 100) + 50);\n $(\".health-bar-red, .health-bar\").stop();\n curHealth = curHealth - damage;\n if (curHealth < 0) {\n curHealth = 0;\n } else {\n $('.message-box').html(\"You took \" + damage + \" points of damage!\");\n }\n applyHPChange(curHealth);\n }\n}", "title": "" }, { "docid": "a0a5524da3936d1b1c24617954e06689", "score": "0.5500623", "text": "returnChange(payment, costOfItem) {\n let changeToGive = payment - costOfItem;\n let coinsReturned = [];\n\n if (changeToGive === 0) return 'Thanks for entering the exact amount!';\n\n for (; changeToGive > 0;) {\n\n if ( changeToGive >= 2 ) {\n coinsReturned.push(\" 2\");\n changeToGive -= 2;\n cashInventory2.find(x => x.value === 2).supply - 1\n } else if ( changeToGive >= 1 ) {\n coinsReturned.push(\" 1\");\n changeToGive -= 1;\n cashInventory2.find(x => x.value === 1).supply - 1\n } else if ( changeToGive >= 0.25 ) {\n coinsReturned.push(\" 0.25\");\n changeToGive -= 0.25;\n cashInventory2.find(x => x.value === 0.25).supply - 1\n } else if ( changeToGive >= 0.10 ) {\n coinsReturned.push(\" 0.10\");\n changeToGive -= 0.10;\n cashInventory2.find(x => x.value === 0.10).supply - 1\n } else if ( changeToGive >= 0.05 ) {\n coinsReturned.push(\" 0.05\");\n changeToGive -= 0.05;\n cashInventory2.find(x => x.value === 0.05).supply - 1\n } else {\n changeToGive = 0;\n }\n }\n return `Here is your change:${coinsReturned}`;\n }", "title": "" }, { "docid": "42735543e16a017fe200dac38b2f0121", "score": "0.5489417", "text": "function discardEnergy(card){\n\tcard = card;\n\tindex = playerActiveAttachedEnergy.indexOf(i);\n\tplayerActiveAttachedEnergy.splice(index, 1);\n\t$('#player .active').remove($('.energy'+index));\n}", "title": "" }, { "docid": "1bb6c5248065f896b4823717b9e15bdd", "score": "0.5487406", "text": "function handleAddCoins( coinName ) {\n let newInternalAmount = [...internalAmount];\n newInternalAmount.forEach((internalCoin) => internalCoin[0] === coinName && (internalCoin[1] += 1));\n\n setInternalAmount( newInternalAmount )\n }", "title": "" }, { "docid": "c25bb588a36706cb4c5ad8f5eea68876", "score": "0.5483847", "text": "collideCoin(){\n if(player.isTouching(coin)){\n one = createSprite(player.x,player.y);\n one.addImage(one_img);\n one.velocityY=-3;\n one.lifetime=40;\n coinsound.play();\n coinCount=coinCount+1;\n coin.destroyEach();\n }\n if(enemy.isTouching(coin)){\n coin.destroyEach();\n }\n }", "title": "" }, { "docid": "4bc18ab6f5e6c64ff61deec2069e3b35", "score": "0.5480547", "text": "function removeSucre() {\n\tstockIngredients.sucre = stockIngredients.sucre - 1;\n\t$(\"#affichage_sucre p\").html(stockIngredients.sucre);\t\n}", "title": "" }, { "docid": "a9264e5e5a77f600f6cc3cd50dc0860a", "score": "0.54594636", "text": "findCoins(e) {\r\n if(e.length > 0) {\r\n this.setState({selectedCoin: e[0]}, function() {\r\n this.addCoin();\r\n });\r\n }\r\n }", "title": "" }, { "docid": "0ef399d26428cd6ce912124026b76aec", "score": "0.5455706", "text": "function clearCoinsContainer(parent){\n while (parent.firstChild) {\n parent.removeChild(parent.firstChild);\n }\n}", "title": "" }, { "docid": "ab7a9a915c251388933156f89a6dd6e7", "score": "0.54491204", "text": "function minusButtonClick() {\n // Stop acting like a button\n //e.preventDefault();\n //var updates = {};\n var state = gapi.hangout.data.getState();\n var players = JSON.parse(state['players'], Reviver);\n var player = getPlayerById(players, getUserHangoutId());\n player.decrementBidAsk();\n //updates['players'] = JSON.stringify(players);\n //gapi.hangout.data.submitDelta(updates);\n updateMarket(players);\n}", "title": "" }, { "docid": "6527d172a3a8a767fe3d22d70dc24aba", "score": "0.54468614", "text": "chooseProductVM(product) {\n //making amountInserted based on coins\n let coinBankValues = Object.values(this.coinBank);\n let valueArray = [];\n coinBankValues.map((coin, index) => {\n valueArray.push(coin.stock * coin.value);\n });\n function getSum(total, num) {\n return total + num;\n }\n let amountInserted = valueArray.reduce(getSum);\n //if amountInserted is exact\n if (\n amountInserted == this.products[product].price &&\n this.products[product].stock > 0\n ) {\n this.products[product].stock -= 1;\n let lengthObject = Object.keys(this.coinBank).length;\n for (let i = 0; i < lengthObject; i++) {\n Object.values(this.coinBank)[i].stock = 0;\n }\n return `Here is your ${product}.`;\n //if amountInserted needs change\n } else if (\n amountInserted > this.products[product].price &&\n this.products[product].stock > 0\n ) {\n this.products[product].stock -= 1;\n let changeObject = {};\n let changeAmount = amountInserted - this.products[product].price;\n Object.entries(this.coins).forEach(([key, value]) => {\n let numberOfOccurences = Math.floor(changeAmount / value.value);\n if (value.stock > 1) {\n value.stock -= numberOfOccurences;\n changeAmount -= numberOfOccurences * value.value;\n if (numberOfOccurences) {\n changeObject = Object.assign(changeObject, {\n [key]: numberOfOccurences\n });\n }\n }\n });\n let newObject = Object.entries(changeObject);\n let changeArray = [];\n newObject.map((letters, index) => {\n changeArray.push(letters.join(\":\"));\n });\n let lengthObject = Object.keys(this.coinBank).length;\n for (let i = 0; i < lengthObject; i++) {\n Object.values(this.coinBank)[i].stock = 0;\n }\n return `Here is your ${product}. Your change is ${changeArray.join(\n \" \"\n )}. There is now ${this.products[product].stock} left. Thank you.`;\n //if there is no more stock\n } else if (\n amountInserted >= this.products[product].price &&\n this.products[product].stock == 0\n ) {\n return `There is no more stock left, please pick another product`;\n //if there amount inserted is not enough\n } else if (\n amountInserted < this.products[product].price &&\n this.products[product].stock > 0\n ) {\n let amountNeeded = this.products[product].price - amountInserted;\n let amountNeededRounded = amountNeeded.toFixed(2);\n return `You do not have enough money, please put in ${amountNeededRounded}`;\n }\n }", "title": "" }, { "docid": "172db25c76174433938e4ca939d8e373", "score": "0.5442617", "text": "checkCollisions() {\n if(this.collideWithPlayer()) {\n scoreValue += this.bonus;\n allCollectibles.delete(this);\n player.addGem();\n }\n }", "title": "" }, { "docid": "6411ef9cca476bac3e27ced9c5645334", "score": "0.54289496", "text": "function DeleteUsedItem()\n{\n\tif (item.stack == 1) //Remove item\n\t{\n\t\tplayersInv.RemoveItem(this.gameObject.transform);\n\t}\n\telse //Remove from stack\n\t{\n\t\titem.stack -= 1;\n\t}\n\tDebug.Log(item.name + \" has been deleted on use\");\n}", "title": "" }, { "docid": "24e3b6812229f4af785e8554859d5a9f", "score": "0.54223984", "text": "function goldCoins() {\n\treturn 100;\n}", "title": "" }, { "docid": "bd4d2a14adf3ed5aaaa473d61602e8ef", "score": "0.5422232", "text": "function RedBlock(y, mev) {\n Block.call(this, RED, y, mev);\n this.coins = [];\n // Generate coins based on [this.mev]\n this.spawn = function () {\n for (let i = 0; i < this.mev * 7; i++) {\n let nc = new Coin(this.b.position.x, this.b.position.y);\n nc.c.position.z = 1;\n nc.g.position.z = 1;\n nc.c.rotation.x = 70;\n nc.g.rotation.x = 70;\n this.coins.push(nc);\n }\n }\n // Explode coins in different directions\n this.explode = function () {\n this.coins.forEach((c) => c.drift());\n this.mev = 0;\n }\n // Assign all coins to a single location\n this.set_coins = function (x, y) {\n this.coins.forEach((c) => {\n c.x = x;\n c.y = y;\n })\n }\n\n this.shift_coins = function (y) {\n this.coins.forEach((c) => c.y += y);\n }\n\n this.update_coins = function () {\n this.coins.forEach((c) => c.update());\n }\n\n this.vanish_coins = function () {\n this.coins.forEach((c) => c.disappear());\n }\n\n this.spin_coins = function (time) {\n this.coins.forEach((coin, ndx) => {\n const speed = 1 + ndx * .01;\n const rot = time * speed;\n coin.c.rotation.x = rot;\n coin.c.rotation.y = rot;\n coin.g.rotation.x = rot;\n coin.g.rotation.y = rot;\n });\n }\n}", "title": "" }, { "docid": "4b2c49b5fe234891fa713bdf06a46503", "score": "0.5419977", "text": "removeSeat() {\n //recount the number of tickets\n if (this._seatType === \"regular\") {\n UI.regularSeatCount--;\n regularTicketNum.innerHTML = UI.regularSeatCount; //display reg ticket num\n UI.calcTotalPrice(UI.regularSeatCount, this._seatType);\n } else if (this._seatType === \"vip\") {\n UI.vipSeatCount--;\n vipTicketNum.innerHTML = UI.vipSeatCount; //display vip ticket num\n UI.calcTotalPrice(UI.vipSeatCount, this._seatType);\n }\n //total ticket count\n this._totalTicketNum = UI.regularSeatCount + UI.vipSeatCount;\n totalTicketNum.innerHTML = this._totalTicketNum;\n }", "title": "" }, { "docid": "db3fd4f5a4be8e7adfef405ecc25a38e", "score": "0.541918", "text": "function collect(collector,collected) {\n collected.remove();\n coinSound.play();\n score++;\n}", "title": "" }, { "docid": "db3fd4f5a4be8e7adfef405ecc25a38e", "score": "0.541918", "text": "function collect(collector,collected) {\n collected.remove();\n coinSound.play();\n score++;\n}", "title": "" }, { "docid": "718cbeda5fecf99d410959a8dbf4a9be", "score": "0.5406809", "text": "function removeCone() {\n scene.remove(selection_cone);\n}", "title": "" }, { "docid": "50a8c01db77102ca122253d86fb231c1", "score": "0.5402683", "text": "function clearBet()\r\n{\r\n\tPLAYER.bet.sumChips=0;\r\n\tBETSVIEW.innerHTML=0;\r\n\tremChips(BETTINGCHIPSVIEW);\r\n}", "title": "" }, { "docid": "3dbfdb0574102b8855052ca121b4cd64", "score": "0.53976375", "text": "function updateCoins(){\n reloader.update();\n reloaderCG.update();\n // Re-read the new set of coins\n pairs = JSON.parse(fs.readFileSync(\"./common/coins.json\",\"utf8\"));\n pairs_filtered = JSON.parse(fs.readFileSync(\"./common/coins_filtered.json\",\"utf8\"));\n pairs_CG = JSON.parse(fs.readFileSync(\"./common/coinsCG.json\",\"utf8\"));\n console.log(chalk.green.bold('Reloaded known coins'));\n}", "title": "" }, { "docid": "a4af647d645c49f574e559bd85f12575", "score": "0.53873724", "text": "removeBudget(event) {\n event.target.parentElement.parentElement.parentElement.remove()\n html.counterList()\n let price = html.separateRemove(event.target.previousElementSibling.firstChild.innerHTML);\n availableBudget.innerHTML = html.separate(html.separateRemove(availableBudget.innerHTML) + price);\n usedBudget.innerHTML = html.separate(html.separateRemove(usedBudget.innerHTML) - price);\n\n html.removeColor(html.separateRemove(totalBudget.innerHTML))\n removeCostLocalStorgae(html.separateRemove(event.target.parentElement.children[1].id))\n\n let getBudgetFromLS = getBudgetLS();\n getBudgetFromLS[1].available = html.separateRemove(availableBudget.innerHTML)\n getBudgetFromLS[1].used = html.separateRemove(usedBudget.innerHTML)\n localStorage.setItem(\"budget\", JSON.stringify(getBudgetFromLS));\n html.showMessage('هزینه با موفقیت پاک شد', 'danger')\n if (!costsBox.children.length > 0) document.querySelector('#search__box').style.display = 'none';\n }", "title": "" }, { "docid": "efa1c712256e726adc324b26d3a18e67", "score": "0.53737265", "text": "function p2collectDot (player, dot)\n{\n p2Score += dotScore;\n dot.remove();\n}", "title": "" }, { "docid": "d69218dd4faabfc0f4baa4f9e707b718", "score": "0.53705734", "text": "function nonConstructibleChange(coins) {\n // Write your code here.\n if (coins.length === 1 && coins[0] !== 1) return 1;\n let sortedCoins = coins.sort((a, b) => a - b);\n let minChange = 0;\n for (let i = 0; i < sortedCoins.length; i++) {\n minChange += sortedCoins[i]\n if (sortedCoins[i + 1] > minChange + 1) {\n return minChange + 1;\n }\n }\n\n return minChange += 1;\n}", "title": "" }, { "docid": "af79b61b17b0dd5bb62d045c3ad78d1c", "score": "0.53673613", "text": "function goBankrupt(removePlayer){\n for(var i = 0; i < players.length; i++){\n if(players[i] == removePlayer){\n players.splice(i,0);\n }\n }\n}", "title": "" }, { "docid": "88863d95a153f5d8125fa33eb649676b", "score": "0.53516793", "text": "function removeHP(amt,who){\r\n\t\tif(who === 'char'){\r\n\t\t\tif (character.hp-amt>0){\r\n\t\t\t\tcharacter.hp=character.hp-amt;\r\n\t\t\t\tdocument.getElementById('charHP').innerHTML='Health: ' + character.hp;\r\n\t\t\t\tdialogue = monster[boss].name + ' hit you for 1 point! HP left: ' + character.hp;\r\n\t\t\t\tupdateText('battleUpdate', dialogue);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tcharacter.hp=0;\r\n\t\t\t\tdocument.getElementById('charHP').innerHTML='Health: ' + character.hp;\r\n\t\t\t\talert('You passed out!');\r\n\t\t\t\treset();\r\n\t\t\t}\r\n\t\t}else if(who === 'boss'){\r\n\t\t\tif (monster[boss].hp-amt>0){\r\n\t\t\t\tmonster[boss].hp=monster[boss].hp-amt;\r\n\t\t\t\tdialogue = 'You land a hit! HP left: ' + monster[boss].hp;\r\n\t\t\t\tupdateText('battleUpdate', dialogue);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tmonster[boss].hp=0;\r\n\t\t\t\talert('You defeated ' + monster[boss].name);\r\n\t\t\t\tdialogue = 'You search the corpse and find some money';\r\n\t\t\t\tupdateText('infoUpdate', dialogue);\r\n\t\t\t\tplayAlert('audio/rupee.ogg');\r\n\t\t\t\tcharacter.money += monster[boss].money;\r\n\t\t\t\tif(monster[boss].defeat === 0){\r\n\t\t\t\t\tcharacter.bossCnt +=1\r\n\t\t\t\t}\r\n\t\t\t\tmonster[boss].defeat = 1;\r\n\t\t\t\tif (character.bossCnt===4){\r\n\t\t\t\t\thideDiv('battle');\r\n\t\t\t\t\tshowDiv('endGame');\r\n\t\t\t\t\tchangeMusic('audio/end.ogg');\t\r\n\t\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\tretreat();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "08d030672762b49a038d2ec6674ed45d", "score": "0.5348535", "text": "function removeCheeseburger() {\n countCheeseburger--;\n //Hvis countCheeseBruger er lavere end 0 \"resetter den til 0 igen\n if (countCheeseburger < 0){\n countCheeseburger=0;\n }\n cheeseburger.removeProduct();\n console.log(JSON.stringify(item)); // Dette er kun relevant for console.log\n}", "title": "" }, { "docid": "08d030672762b49a038d2ec6674ed45d", "score": "0.5348535", "text": "function removeCheeseburger() {\n countCheeseburger--;\n //Hvis countCheeseBruger er lavere end 0 \"resetter den til 0 igen\n if (countCheeseburger < 0){\n countCheeseburger=0;\n }\n cheeseburger.removeProduct();\n console.log(JSON.stringify(item)); // Dette er kun relevant for console.log\n}", "title": "" }, { "docid": "6b86f8eaf7b913b3d5520201c1b0b950", "score": "0.5347926", "text": "chopDone(){\n console.log(\"DONE \" + tree.name);\n doingSomething = false;\n skills[CONSTS.SKILL_WOODCUTTING].addXP(tree.xp);\n inventory.addItem(new ItemStack(tree.itemID, 1));\n console.log(skills[CONSTS.SKILL_WOODCUTTING].name + \": \" + skills[CONSTS.SKILL_WOODCUTTING].xp + \"xp\");\n tree = null;\n RenderCurrentLocation();\n }", "title": "" }, { "docid": "78f84cf7776a65d52f022ebe3d25e6c1", "score": "0.53382224", "text": "updateBenefit() {\n if (this.benefit >= 0 || this.benefit <= 50) {\n if (this.benefit === 0) {\n this.removeFromBenefit(2);\n } else {\n this.removeFromBenefit(1);\n }\n }\n }", "title": "" }, { "docid": "f23747cbce52de7862dde229db2e8a46", "score": "0.5336031", "text": "function remove() {\n Poster.makeApiRequest('clients.addEWalletTransaction', {\n method: 'POST',\n data: {\n client_id: 477,\n amount: 2000\n }\n }, (result) => {\n console.log('RESULT:', result);\n });\n}", "title": "" }, { "docid": "45c7b7cd45c6456ee460b8bbe8d671ac", "score": "0.5334803", "text": "function remove(self) {\n /* Update global variables */\n if (!self.parentElement.classList.contains(\"not\")) { (finishedItems > 0 ? finishedItems -= 1 : finishedItems = 0); }\n (allItems > 0 ? allItems -= 1 : allItems = 0);\n\n /* Remove li element */\n self.parentElement.remove();\n\n /* Update percentage */\n var percentageElement = document.getElementById(\"percentage\");\n var percent = parseInt((finishedItems / (allItems == 0 ? 1 : allItems)) * 100)\n percentageElement.innerText = percent;\n\n /* Update donut */\n var donutElement = document.getElementById(\"donut\");\n var donutImage = getDonut(percent);\n donutElement.innerHTML = donutImage;\n}", "title": "" }, { "docid": "5432e62c79b5a255bff6ec5b9e3a6dea", "score": "0.5327593", "text": "function handleCoinClick(topSection, coinKey, addCoin, removeCoin) {\n return topSection ? () => {\n removeCoin(coinKey)\n } : () => {\n addCoin(coinKey)\n };\n}", "title": "" }, { "docid": "ccc3f860a5d0a2f092e9fad727a151a8", "score": "0.53251576", "text": "removeMenuItem(state, coffee) {\n let index = state.cart.findIndex(item => item.id == coffee.id);\n let cartItem = state.cart[index];\n if(cartItem.quantity > 1){\n cartItem.quantity--\n } else {\n //Remove item from cart if quantity is less than 1\n state.cart.splice(index, 1)\n }\n }", "title": "" }, { "docid": "467572d4727a633b1955160f1792e3ca", "score": "0.53217685", "text": "function onQuantityMinus(index){\n if(addedItems[index].quantity === 1){\n let item = findIndexInArray(index);\n var foundIndex = itemsToBuyArray.findIndex(x => x.index == item[0].index);\n itemsToBuyArray.splice(foundIndex, 1);\n }\n else{\n addedItems[index].quantity--;\n }\n calculateSum();\n resetHtmlOfItemsToBuy();\n }", "title": "" }, { "docid": "1506a0ad128eda09a4abaf420ebbae6b", "score": "0.5321658", "text": "removeItem(item, amount) {\r\n if (item === \"water\") {\r\n this.water -= amount;\r\n } else if (item === \"light\") {\r\n this.light -= amount;\r\n } else if (item === \"dirt\") {\r\n this.dirt -= amount;\r\n }\r\n this.updateInventoryText();\r\n }", "title": "" }, { "docid": "d1fb019130d073bb9240cf2aa0603e88", "score": "0.53215516", "text": "removeLife() {\n //increase misses after each miss\n this.missed += 1;\n //check # of misses and call gameOver if === 5\n if (this.missed === 5) {\n // pass loss to gameOver()\n this.gameOver(false);\n } else {\n //call wrongAnswer\n this.wrongAnswer();\n setTimeout(game.answerReset, 750);\n //scoreboard of images reduces by one with each loss\n const heartImg = document.querySelector(\"img[src='images/liveHeart.png']\");\n heartImg.src=\"images/lostHeart.png\";\n }\n }", "title": "" }, { "docid": "e5a9c80685576de87bfc229b092a2384", "score": "0.5314209", "text": "removeLife() {\n const scoreBoardLi = document.querySelectorAll(\"#scoreboard li\");\n // To ensure that more than 5 hearts aren't updated\n if (this.missed < 5) {\n const img = scoreBoardLi[this.missed].firstElementChild;\n img.src = \"images/lostHeart.png\";\n this.missed++;\n }\n // Call game over if missed attempts reaches 5\n if (this.missed > 4) {\n this.gameOver(false);\n }\n \n }", "title": "" }, { "docid": "71a6c945cd7c9c1fe08de06b5d159c88", "score": "0.5313795", "text": "remove_credit(amount) {\n this.setState({ total_credit: this.state.total_credit - amount })\n }", "title": "" }, { "docid": "ff3e9789039d831fffc26270ca974873", "score": "0.53137153", "text": "function resetCoin(coin) {\n coin.setAttribute(\"cx\", \"200\");\n coin.setAttribute(\"cy\", \"200\");\n\n}", "title": "" }, { "docid": "8a21579676753c90833f85edaf6a6939", "score": "0.53013587", "text": "function removeBlock(id) {\n scene.stop();\n\n var block = scene.findNode(id);\n\n if (block) {\n\t\n var data = block.get(\"data\");\n\n if (!data.flagged) {\n\t\n if (data.type == \"bomb\") {\n\t\t\t\tshowMines(); \n alert(\"Game Over!\");\n window.location.href = 'index.html?size=' + getGridSize() + '&bombs=' + getBombCount();\n\n } else {\n data.revealed = true;\n recursiveRemove(data.id, true);\n }\n }\n }\n\n scene.start();\n}", "title": "" }, { "docid": "3d6044ef8857243f715881fafff552ba", "score": "0.5290657", "text": "removeLife() {\r\n\r\n //find the next live heart and turn it into a lost heart\r\n for (let i = 0; i < hearts.length; i++) {\r\n if (hearts[i].src.endsWith(\"liveHeart.png\")) {\r\n hearts[i].src = \"images/lostHeart.png\";\r\n break;\r\n }\r\n }\r\n\r\n //up the miss count\r\n this.missed++;\r\n\r\n //if all of the active hearts are gone, game is lost\r\n if (this.missed === hearts.length) {\r\n this.gameOver(\"lose\");\r\n }\r\n }", "title": "" }, { "docid": "c56bd4c81ab000540828d3f46e907a7c", "score": "0.5287183", "text": "function coinCounter(amountInput) {\n\n//multiply by 100 to move the decimal\n let currentAmount = amountInput * 100;\n//log that amount to make sense of things at this start point\n console.log('initial amount in pennies:', currentAmount);\n//divide, by 25 and parseInt to get the whole number of quarters (remaining decimal value is passed on)\n coins.quarters = parseInt(currentAmount/25);\n//log to check and see how this worked 'currentAmount is not re-assigned yet\n console.log('quarters:', coins.quarters);\n//here we re-assign current to be what's left after we divide by 25\n currentAmount = currentAmount%25;\n//log everything\n console.log('currentAmount after quarters:', currentAmount);\n\n//rinse and repeat\n coins.dimes = parseInt(currentAmount/10);\n console.log('dimes:', coins.dimes);\n currentAmount = currentAmount%10;\n console.log('currentAmount after dimes:', currentAmount);\n//nickels\n coins.nickels = parseInt(currentAmount/5);\n console.log('nickels:', coins.nickels);\n currentAmount = currentAmount%25;\n console.log('currentAmount after nickels:', currentAmount);\n//pennies\n coins.pennies = parseInt(currentAmount/1);\n console.log('pennies:', coins.pennies);\n//this is just a check for me to see it's got it all\n currentAmount = currentAmount%1;\n console.log('should be zero:', currentAmount);\n\n}//end coinCounter.", "title": "" }, { "docid": "8042c37143fabcfb5b4fa8113bdc528d", "score": "0.52813065", "text": "function getCoins(coin,character){\n if( character.overlap(coin) && character.live && coin.get==false){\n character.coins+=1;\n coin.get=true;\n mario_coin.play();\n };\n}", "title": "" }, { "docid": "f3481004d5658f33e087128d4264cd91", "score": "0.5280964", "text": "removeLife(){\n this.missed = this.missed + 1;\n if(this.missed === 5) {\n this.gameOver(false);\n }\n const ol = document.getElementById('scoreboard').firstElementChild;\n ol.removeChild(ol.firstElementChild);\n }", "title": "" }, { "docid": "f393790385a048bf592bbff72c942a51", "score": "0.52782", "text": "function manageEnemiesAndCoins() {\n //Create new enemies as others \"die\"\n if (enemyCarOne.y >= 600) {\n newEnemy(2);\n enemyCarOne.y = -200;\n carOneAlive = false;\n }\n\n if (enemyCarTwo.y >= 600) {\n newEnemy(3);\n enemyCarTwo.y = -200;\n carTwoAlive = false;\n }\n\n if (enemyCarThree.y >= 600) {\n newEnemy(4);\n enemyCarThree.y = -200;\n carThreeAlive = false;\n }\n\n if (enemyCarFour.y >= 600) {\n newEnemy(5);\n enemyCarFour.y = -200;\n carFourAlive = false;\n }\n\n if (enemyCarFive.y >= 600) {\n newEnemy(6);\n enemyCarFive.y = -200;\n carFiveAlive = false;\n }\n\n if (enemyCarSix.y >= 500) {\n newEnemy(1);\n enemyCarSix.y = -200;\n carSixAlive = false;\n }\n\n //Move the coin\n if (coin.y >= 500) {\n coin.y = -200;\n coinAlive = false;\n }\n\n //Move the \"living\" enemies down the road\n if (carOneAlive == true) {\n enemyCarOne.y += 9;\n enemyCarOne.x = posEnemyOne;\n }\n\n if (carTwoAlive == true) {\n enemyCarTwo.y += 12;\n enemyCarTwo.x = posEnemyTwo;\n }\n\n if (carThreeAlive == true) {\n enemyCarThree.y += 14;\n enemyCarThree.x = posEnemyThree;\n }\n\n if (carFourAlive == true) {\n enemyCarFour.y += 11;\n enemyCarFour.x = posEnemyFour;\n }\n\n if (carFiveAlive == true) {\n enemyCarFive.y += 17;\n enemyCarFive.x = posEnemyFive;\n }\n\n if (carSixAlive == true) {\n enemyCarSix.y += 10;\n enemyCarSix.x = posEnemySix;\n }\n\n //move the \"living\" coin\n if (coinAlive == true) {\n coin.y += 15;\n coin.x = posCoin;\n }\n}", "title": "" }, { "docid": "3f899b69b5cf3e0eb753167601156f88", "score": "0.52739567", "text": "removeLife(){\n if (this.activePhrase.checkLetter() === false){\n $('[alt=\"Heart Icon\"]:first').remove();\n $('.tries:first').append('<img src=\"images/lostHeart.png\" alt=\"Lost Heart\" height=\"35\" width=\"30\">');\n this.missed +=1;\n };\n if (this.missed === 5){\n this.gameOver(false);\n };\n }", "title": "" }, { "docid": "420c46dce270554bfc5e3163da1f8ff2", "score": "0.52732044", "text": "function minus1(event) {\r\n var moriginalAmount = parseInt(event.target.parentElement.parentElement.getElementsByClassName('item-amount')[0].innerText);\r\n if (moriginalAmount == 1) {\r\n var removeConfirmation = confirm(\"Are you sure you want to remove \" + \r\n event.target.parentElement.parentElement.getElementsByClassName('item-name')[0].innerText + \" from your shopping cart?\")\r\n if (removeConfirmation == true) {\r\n event.target.parentElement.parentElement.remove();\r\n } else {\r\n null;\r\n }\r\n } else {\r\n event.target.parentElement.parentElement.getElementsByClassName('item-amount')[0].innerText = moriginalAmount - 1;\r\n }\r\n updateTotal();\r\n}", "title": "" }, { "docid": "4135e4e7e272ba0e682053f5648d6a29", "score": "0.526992", "text": "function changer(amount){\n var fanny_pack = {quarters: 0, dimes: 0, nickels: 0, pennies: 0};\n var coin_values = {quarters: 25, dimes: 10, nickels: 5, pennies: 1};\n var remnant = 0; //needed to save the remaining amount after each add_coin\n\n function add_coin(coin, amount){\n while (amount >= coin_values[coin]){\n amount -= coin_values[coin];\n fanny_pack[coin] += 1;\n console.log('added :' + coin)\n };\n remnant = amount;\n }\n\nadd_coin('quarters', amount);\nadd_coin('dimes', remnant);\nadd_coin('nickels', remnant);\nadd_coin('pennies', remnant);\n\n console.log('hi');\n return fanny_pack; //In real life we would likely store fanny_pack to a result object that we would return?\n}", "title": "" }, { "docid": "5f4d8b903687b7a647144b5b29172b50", "score": "0.52681893", "text": "function deletePendings() { Txn.remove({}, function (err, txn) { \n\n\n \n}) }", "title": "" }, { "docid": "802d105f24b9f0dc993ee5dc4379c3d6", "score": "0.52674025", "text": "function removeFromBord(bord, amount){\n while(amount > 0){\n var x = Math.floor(Math.random() * 9);\n var y = Math.floor(Math.random() * 9);\n if(bord[y][x] != 0){\n var tempbord = [];\n for(var i = 0; i < 9; i++){\n tempbord.push([]);\n for(var j = 0; j < 9; j++){\n tempbord[i].push(bord[i][j]);\n }\n }\n tempbord[y][x] = 0;\n\n getSolutionCount(tempbord);\n if(solutionCount == 1){\n amount--;\n bord[y][x] = 0;\n }\n }\n }\n\n}", "title": "" }, { "docid": "76523bb2f794cb13650cb02f13953a6d", "score": "0.5263499", "text": "undoAsset(store){\n const sender = store.account.get(this.senderId);\n\n const senderBalanceWithFoodAmount = new utils.BigNum(sender.balance).add(new utils.BigNum(this.amount));\n const updatedSender = {\n ...sender,\n balance: senderBalanceWithFoodAmount.toString()\n };\n store.account.set(sender.address, updatedSender);\n\n const restaurantAccount = store.account.get(this.recipientId);\n const restaurantBalanceWithFoodRequest = new utils.BigNum(restaurantAccount.balance).sub(new utils.BigNum(this.amount).add(new utils.BigNum(this.sidechainFee)));\n\n const updatedRestaurantAccount = {...sender, \n ... { balance: restaurantBalanceWithFoodRequest.toString(),\n asset: null }\n };\n store.account.set(restaurantAccount.address, updatedRestaurantAccount);\n\n const sidechainAcc = store.account.get(this.sidechainAccount);\n const sidechainBalanceWithoutFee = new utils.BigNum(sidechainAcc.balance).sub(new utils.BigNum(this.sidechainFee));\n\n const updatedSidechainAccount = {\n ...sidechainAcc,\n balance: sidechainBalanceWithoutFee.toString()\n };\n\n store.account.set(sidechainAcc.address, updatedSidechainAccount);\n\n return [];\n }", "title": "" }, { "docid": "7b9beaf12a69de0b5f4b0d82cf504df4", "score": "0.52625334", "text": "removeInterest() {}", "title": "" } ]
b2851738758a6aa6a9b684115111cb72
Undefined$prototype$equals :: Undefined ~> Undefined > Boolean
[ { "docid": "6324b51983c9556dd98b5b3237b9b656", "score": "0.8593052", "text": "function Undefined$prototype$equals(other) {\n return true;\n }", "title": "" } ]
[ { "docid": "3ec8cd8180afbe4850275e8e2e8671c9", "score": "0.7543457", "text": "function Null$prototype$equals(other) {\n return true;\n }", "title": "" }, { "docid": "3ec8cd8180afbe4850275e8e2e8671c9", "score": "0.7543457", "text": "function Null$prototype$equals(other) {\n return true;\n }", "title": "" }, { "docid": "3ec8cd8180afbe4850275e8e2e8671c9", "score": "0.7543457", "text": "function Null$prototype$equals(other) {\n return true;\n }", "title": "" }, { "docid": "0f3f17fee13d23444ca2333e0d8a5677", "score": "0.71059185", "text": "function Boolean$prototype$equals(other) {\n return typeof this === 'object' ?\n equals(this.valueOf(), other.valueOf()) :\n this === other;\n }", "title": "" }, { "docid": "0f3f17fee13d23444ca2333e0d8a5677", "score": "0.71059185", "text": "function Boolean$prototype$equals(other) {\n return typeof this === 'object' ?\n equals(this.valueOf(), other.valueOf()) :\n this === other;\n }", "title": "" }, { "docid": "82d94e56c0872a1112acb96c93c06fba", "score": "0.69886464", "text": "function Boolean$prototype$equals(other) {\n return typeof other === typeof this && other.valueOf() === this.valueOf();\n }", "title": "" }, { "docid": "be42c4a5dfec0f7cf58f9f4f15b748a6", "score": "0.69403595", "text": "equals() {\n return false;\n }", "title": "" }, { "docid": "81e68ad4f8e0ea18f2a27c81653dd34a", "score": "0.6939671", "text": "function Function$prototype$equals(other) {\n return other === this;\n }", "title": "" }, { "docid": "81e68ad4f8e0ea18f2a27c81653dd34a", "score": "0.6939671", "text": "function Function$prototype$equals(other) {\n return other === this;\n }", "title": "" }, { "docid": "81e68ad4f8e0ea18f2a27c81653dd34a", "score": "0.6939671", "text": "function Function$prototype$equals(other) {\n return other === this;\n }", "title": "" }, { "docid": "a9ab2ee07df9e67d617bb7089af2a816", "score": "0.6815689", "text": "static isEq(a,b){return a===b}", "title": "" }, { "docid": "cc8cc9b96ea86d301f727a0dd201ad9f", "score": "0.6658157", "text": "equals(that)\n {\n if (this === that)\n {\n return EX.true;\n }\n if (that.inhabits(this.constructor) === EX.false)\n {\n return EX.false;\n }\n if (this._value !== undefined && that._value !== undefined)\n {\n if (this._value === that._value)\n {\n return EX.true;\n }\n if (!this._value || !that._value)\n {\n // One of *._value is defined but falsy. If falsy value like 0,\n // false, \"\", or null does not triple equal the other value,\n // then it is not equal.\n return EX.false;\n }\n if (this._value.equals !== undefined)\n {\n // short circuit infinite recursion of circular self-reference\n if (this._value === this)\n {\n if (this._value === that._value)\n {\n return EX.true;\n }\n else\n {\n return EX.false;\n }\n }\n // this._value may be one of ex values\n const exEquals = this._value.equals(that._value);\n if (exEquals === EX.true)\n {\n return EX.true;\n }\n else if (exEquals === EX.false)\n {\n return EX.false;\n }\n // equals returned neither EX.true nor EX.false, could be some\n // other equals\n }\n if (Object.keys(this._value).length === Object.keys(that._value).length)\n {\n for (let entry of Object.entries(this._value))\n {\n // short circuit infinite recursion of circular self-reference\n if (this === entry[1])\n {\n if (entry[1] === that._value[entry[0]])\n {\n return EX.true;\n }\n else\n {\n return EX.false;\n }\n }\n else if (entry[1].equals(that._value[entry[0]]) !== EX.true)\n {\n return EX.false;\n }\n }\n return EX.true;\n }\n }\n return EX.false;\n }", "title": "" }, { "docid": "fa376188929698361a1a7b1f156a69c1", "score": "0.66120815", "text": "function _isUndefined (obj) {\n\treturn obj === void 0;\n}", "title": "" }, { "docid": "1fa2ee9c5bca8ef7ad26ab1db1af44d4", "score": "0.6595074", "text": "function IsUndefined(x) {\r\n\t return x === undefined;\r\n\t }", "title": "" }, { "docid": "a9f4b62bce6ea9b7565b7ecc59bff22f", "score": "0.65620464", "text": "function isEqual() {\n var toString = Object.prototype.toString,\n getPrototypeOf = Object.getPrototypeOf,\n getOwnProperties = Object.getOwnPropertySymbols\n ? function (c) {\n return Object.keys(c).concat(Object.getOwnPropertySymbols(c));\n }\n : Object.keys;\n\n function checkEquality(a, b, refs) {\n var aElements,\n bElements,\n element,\n aType = toString.call(a),\n bType = toString.call(b);\n\n // trivial case: primitives and referentially equal objects\n if (a === b) return true;\n\n // if both are null/undefined, the above check would have returned true\n if (a == null || b == null) return false;\n\n // check to see if we've seen this reference before; if yes, return true\n if (refs.indexOf(a) > -1 && refs.indexOf(b) > -1) return true;\n\n // save results for circular checks\n refs.push(a, b);\n\n if (aType != bType) return false; // not the same type of objects\n\n // for non-null objects, check all custom properties\n aElements = getOwnProperties(a);\n bElements = getOwnProperties(b);\n if (\n aElements.length != bElements.length ||\n aElements.some(function (key) {\n return !checkEquality(a[key], b[key], refs);\n })\n ) {\n return false;\n }\n\n switch (aType.slice(8, -1)) {\n case \"Symbol\":\n return a.valueOf() == b.valueOf();\n case \"Date\":\n case \"Number\":\n return +a == +b || (+a != +a && +b != +b); // convert Dates to ms, check for NaN\n case \"RegExp\":\n case \"Function\":\n case \"String\":\n case \"Boolean\":\n return \"\" + a == \"\" + b;\n case \"Set\":\n case \"Map\": {\n aElements = a.entries();\n bElements = b.entries();\n do {\n element = aElements.next();\n if (!checkEquality(element.value, bElements.next().value, refs)) {\n return false;\n }\n } while (!element.done);\n return true;\n }\n case \"ArrayBuffer\":\n (a = new Uint8Array(a)), (b = new Uint8Array(b)); // fall through to be handled as an Array\n case \"DataView\":\n (a = new Uint8Array(a.buffer)), (b = new Uint8Array(b.buffer)); // fall through to be handled as an Array\n case \"Float32Array\":\n case \"Float64Array\":\n case \"Int8Array\":\n case \"Int16Array\":\n case \"Int32Array\":\n case \"Uint8Array\":\n case \"Uint16Array\":\n case \"Uint32Array\":\n case \"Uint8ClampedArray\":\n case \"Arguments\":\n case \"Array\":\n if (a.length != b.length) return false;\n for (element = 0; element < a.length; element++) {\n if (!(element in a) && !(element in b)) continue; // empty slots are equal\n // either one slot is empty but not both OR the elements are not equal\n if (\n element in a != element in b ||\n !checkEquality(a[element], b[element], refs)\n )\n return false;\n }\n return true;\n case \"Object\":\n return checkEquality(getPrototypeOf(a), getPrototypeOf(b), refs);\n default:\n return false;\n }\n }\n\n return function (a, b) {\n return checkEquality(a, b, []);\n };\n}", "title": "" }, { "docid": "f88d65c02e6532bf349f0e3c65dfcec7", "score": "0.6553353", "text": "function isUndefined(obj) {\n return obj === void 0;\n}", "title": "" }, { "docid": "f88d65c02e6532bf349f0e3c65dfcec7", "score": "0.6553353", "text": "function isUndefined(obj) {\n return obj === void 0;\n}", "title": "" }, { "docid": "f88d65c02e6532bf349f0e3c65dfcec7", "score": "0.6553353", "text": "function isUndefined(obj) {\n return obj === void 0;\n}", "title": "" }, { "docid": "f88d65c02e6532bf349f0e3c65dfcec7", "score": "0.6553353", "text": "function isUndefined(obj) {\n return obj === void 0;\n}", "title": "" }, { "docid": "f88d65c02e6532bf349f0e3c65dfcec7", "score": "0.6553353", "text": "function isUndefined(obj) {\n return obj === void 0;\n}", "title": "" }, { "docid": "f88d65c02e6532bf349f0e3c65dfcec7", "score": "0.6553353", "text": "function isUndefined(obj) {\n return obj === void 0;\n}", "title": "" }, { "docid": "f88d65c02e6532bf349f0e3c65dfcec7", "score": "0.6553353", "text": "function isUndefined(obj) {\n return obj === void 0;\n}", "title": "" }, { "docid": "f88d65c02e6532bf349f0e3c65dfcec7", "score": "0.6553353", "text": "function isUndefined(obj) {\n return obj === void 0;\n}", "title": "" }, { "docid": "f88d65c02e6532bf349f0e3c65dfcec7", "score": "0.6553353", "text": "function isUndefined(obj) {\n return obj === void 0;\n}", "title": "" }, { "docid": "e498efde8a6b87bd24e27e8c6d9e1c55", "score": "0.65486085", "text": "function IsUndefined(x) {\r\n return x === undefined;\r\n }", "title": "" }, { "docid": "e498efde8a6b87bd24e27e8c6d9e1c55", "score": "0.65486085", "text": "function IsUndefined(x) {\r\n return x === undefined;\r\n }", "title": "" }, { "docid": "e498efde8a6b87bd24e27e8c6d9e1c55", "score": "0.65486085", "text": "function IsUndefined(x) {\r\n return x === undefined;\r\n }", "title": "" }, { "docid": "e498efde8a6b87bd24e27e8c6d9e1c55", "score": "0.65486085", "text": "function IsUndefined(x) {\r\n return x === undefined;\r\n }", "title": "" }, { "docid": "338170900acdf33043eadc8b52036423", "score": "0.65240276", "text": "function IsUndefined(x) {\r\n return x === undefined;\r\n }", "title": "" }, { "docid": "338170900acdf33043eadc8b52036423", "score": "0.65240276", "text": "function IsUndefined(x) {\r\n return x === undefined;\r\n }", "title": "" }, { "docid": "338170900acdf33043eadc8b52036423", "score": "0.65240276", "text": "function IsUndefined(x) {\r\n return x === undefined;\r\n }", "title": "" }, { "docid": "f82b5207f401175742845d3db8681f26", "score": "0.6518106", "text": "function IsUndefined(x) {\n return x === undefined;\n }", "title": "" }, { "docid": "47b57603c28f4d9204d54467bd0a3a6d", "score": "0.65143037", "text": "function IsUndefined(x) {\n return x === undefined$a;\n }", "title": "" }, { "docid": "7b439310e365fdcd466fd62ef7d77a2e", "score": "0.6497657", "text": "function IsUndefined(x) {\n return x === undefined;\n }", "title": "" }, { "docid": "b4629ba0e1dee95bb976d6f5e33d8083", "score": "0.6491769", "text": "function isUndefined(obj) {\n return obj === void 0;\n }", "title": "" }, { "docid": "b4629ba0e1dee95bb976d6f5e33d8083", "score": "0.6491769", "text": "function isUndefined(obj) {\n return obj === void 0;\n }", "title": "" }, { "docid": "b4629ba0e1dee95bb976d6f5e33d8083", "score": "0.6491769", "text": "function isUndefined(obj) {\n return obj === void 0;\n }", "title": "" }, { "docid": "774d4de20ba9127c9b16c07e9d933538", "score": "0.64904606", "text": "function IsUndefined(x) {\n return x === undefined;\n }", "title": "" }, { "docid": "774d4de20ba9127c9b16c07e9d933538", "score": "0.64904606", "text": "function IsUndefined(x) {\n return x === undefined;\n }", "title": "" }, { "docid": "774d4de20ba9127c9b16c07e9d933538", "score": "0.64904606", "text": "function IsUndefined(x) {\n return x === undefined;\n }", "title": "" }, { "docid": "774d4de20ba9127c9b16c07e9d933538", "score": "0.64904606", "text": "function IsUndefined(x) {\n return x === undefined;\n }", "title": "" }, { "docid": "68e08f34746c26f5d9ba8ec9074cc479", "score": "0.6487277", "text": "function IsUndefined(x) {\n return x === undefined;\n }", "title": "" }, { "docid": "68e08f34746c26f5d9ba8ec9074cc479", "score": "0.6487277", "text": "function IsUndefined(x) {\n return x === undefined;\n }", "title": "" }, { "docid": "68e08f34746c26f5d9ba8ec9074cc479", "score": "0.6487277", "text": "function IsUndefined(x) {\n return x === undefined;\n }", "title": "" }, { "docid": "68e08f34746c26f5d9ba8ec9074cc479", "score": "0.6487277", "text": "function IsUndefined(x) {\n return x === undefined;\n }", "title": "" }, { "docid": "d94d6d4a40808c7d7188571e2a00dad7", "score": "0.6415762", "text": "function isUndefined(obj) {\n return obj === void 0;\n }", "title": "" }, { "docid": "8927efbc3946113c6758981d0ae7c4b1", "score": "0.63972384", "text": "function _isUndefined(v) {\n\t return (typeof v === 'undefined');\n\t}", "title": "" }, { "docid": "ae3ab3ef25edf20991396f04abadb46c", "score": "0.63885605", "text": "function isUndefined(obj) {\n return obj === undefined;\n }", "title": "" }, { "docid": "8f132bc816d1227859cb121fb2a641ac", "score": "0.6381748", "text": "function _isUndefined(v) {\n return (typeof v === 'undefined');\n}", "title": "" }, { "docid": "8f132bc816d1227859cb121fb2a641ac", "score": "0.6381748", "text": "function _isUndefined(v) {\n return (typeof v === 'undefined');\n}", "title": "" }, { "docid": "8f132bc816d1227859cb121fb2a641ac", "score": "0.6381748", "text": "function _isUndefined(v) {\n return (typeof v === 'undefined');\n}", "title": "" }, { "docid": "8f132bc816d1227859cb121fb2a641ac", "score": "0.6381748", "text": "function _isUndefined(v) {\n return (typeof v === 'undefined');\n}", "title": "" }, { "docid": "8f132bc816d1227859cb121fb2a641ac", "score": "0.6381748", "text": "function _isUndefined(v) {\n return (typeof v === 'undefined');\n}", "title": "" }, { "docid": "52452c2f63a8568d86ec7bc0e688a1e6", "score": "0.63805497", "text": "function _isUndefined(v){return typeof v==='undefined';}", "title": "" }, { "docid": "e2dd01103b8b0c7224f12602ac5e23c1", "score": "0.63591754", "text": "function isUndefined(value) {\n var undefined$1 = void 0;\n return value === undefined$1;\n}", "title": "" }, { "docid": "d5b9226addb13a943e0274dae249cf18", "score": "0.6328733", "text": "function sc_isEq(o1, o2) {\n return (o1 === o2);\n}", "title": "" }, { "docid": "d5b9226addb13a943e0274dae249cf18", "score": "0.6328733", "text": "function sc_isEq(o1, o2) {\n return (o1 === o2);\n}", "title": "" }, { "docid": "4a4f95bff02908bafcea9c85fd2d474a", "score": "0.63248515", "text": "function equals(left, right) {\n if (left instanceof Object && left.equals != undefined)\n return left.equals(right);\n else\n return left == right;\n }", "title": "" }, { "docid": "fa1cdf4d28e874b134b42198cd7744c8", "score": "0.6317418", "text": "Equals() {\n\n }", "title": "" }, { "docid": "a9fd90b477c0463fa4b881121d5c75a2", "score": "0.630401", "text": "function eq(a, b, stack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.\n if (a === b) return a !== 0 || 1 / a == 1 / b;\n // A strict comparison is necessary because `null == undefined`.\n if (a == null || b == null) return a === b;\n // Unwrap any wrapped objects.\n if (a._chain) a = a._wrapped;\n if (b._chain) b = b._wrapped;\n // Invoke a custom `isEqual` method if one is provided.\n if (a.isEqual && _.isFunction(a.isEqual)) return a.isEqual(b);\n if (b.isEqual && _.isFunction(b.isEqual)) return b.isEqual(a);\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className != toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, dates, and booleans are compared by value. \n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return a == String(b);\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for\n // other numeric values.\n return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a == +b;\n // RegExps are compared by their source patterns and flags.\n case '[object RegExp]':\n return a.source == b.source &&\n a.global == b.global &&\n a.multiline == b.multiline &&\n a.ignoreCase == b.ignoreCase;\n }\n if (typeof a != 'object' || typeof b != 'object') return false;\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n var length = stack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (stack[length] == a) return true;\n }\n // Add the first object to the stack of traversed objects.\n stack.push(a);\n var size = 0, result = true;\n // Recursively compare objects and arrays.\n if (className == '[object Array]') {\n // Compare array lengths to determine if a deep comparison is necessary.\n size = a.length;\n result = size == b.length;\n if (result) {\n // Deep compare the contents, ignoring non-numeric properties.\n while (size--) {\n // Ensure commutative equality for sparse arrays.\n if (!(result = size in a == size in b && eq(a[size], b[size], stack))) break;\n }\n }\n } else {\n // Objects with different constructors are not equivalent.\n if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false;\n // Deep compare objects.\n for (var key in a) {\n if (_.has(a, key)) {\n // Count the expected number of properties.\n size++;\n // Deep compare each member.\n if (!(result = _.has(b, key) && eq(a[key], b[key], stack))) break;\n }\n }\n // Ensure that both objects contain the same number of properties.\n if (result) {\n for (key in b) {\n if (_.has(b, key) && !(size--)) break;\n }\n result = !size;\n }\n }\n // Remove the first object from the stack of traversed objects.\n stack.pop();\n return result;\n }", "title": "" }, { "docid": "54afa00e728578df49bd68008ab2ff77", "score": "0.63016975", "text": "equals(obj) {\n if (obj === this) {\n return true\n }\n if (typeof obj !== typeof this || obj === undefined || obj === null) {\n return false\n }\n if (Object.keys(obj).length !== this.getLength()) {\n return false\n }\n try {\n return this.toString() === JSON.stringify(obj)\n } catch (ex) {\n logger.error(obj, this, ' equals error.')\n return false\n }\n }", "title": "" }, { "docid": "8b562436b6273521d9fb76129717b318", "score": "0.63004386", "text": "equals(obj) {\n if (obj === this) {\n return true\n }\n if (typeof obj !== typeof this || obj === undefined || obj === null) {\n return false\n }\n if (Object.keys(obj).length !== this.getLength()) {\n return false\n }\n try {\n return this.toString() === JSON.stringify(obj)\n } catch (ex) {\n logger.error(obj, this, ' equals error.');\n return false\n }\n }", "title": "" }, { "docid": "ade7a4d9c35c2d489d246dde1cc87a04", "score": "0.6290803", "text": "function isEqual(a, b) {\n return eq(a, b);\n }", "title": "" }, { "docid": "ade7a4d9c35c2d489d246dde1cc87a04", "score": "0.6290803", "text": "function isEqual(a, b) {\n return eq(a, b);\n }", "title": "" }, { "docid": "ade7a4d9c35c2d489d246dde1cc87a04", "score": "0.6290803", "text": "function isEqual(a, b) {\n return eq(a, b);\n }", "title": "" }, { "docid": "1365b285c6ea40623843aa28d7f7486d", "score": "0.6278244", "text": "function o(t){return void 0===t||null===t}", "title": "" }, { "docid": "8e97288ad7d66474b702c86cf68dbbd8", "score": "0.62708366", "text": "function isUndefined(o) {\n return typeof o === 'undefined';\n}", "title": "" }, { "docid": "88af9711a3c9d91df8fc3bfd36b5d523", "score": "0.62685704", "text": "function eq(a, b, stack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.\n if (a === b) return a !== 0 || 1 / a == 1 / b;\n // A strict comparison is necessary because `null == undefined`.\n if (a == null || b == null) return a === b;\n // Unwrap any wrapped objects.\n if (a._chain) a = a._wrapped;\n if (b._chain) b = b._wrapped;\n // Invoke a custom `isEqual` method if one is provided.\n if (a.isEqual && _.isFunction(a.isEqual)) return a.isEqual(b);\n if (b.isEqual && _.isFunction(b.isEqual)) return b.isEqual(a);\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className != toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, dates, and booleans are compared by value.\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return a == String(b);\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for\n // other numeric values.\n return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a == +b;\n // RegExps are compared by their source patterns and flags.\n case '[object RegExp]':\n return a.source == b.source &&\n a.global == b.global &&\n a.multiline == b.multiline &&\n a.ignoreCase == b.ignoreCase;\n }\n if (typeof a != 'object' || typeof b != 'object') return false;\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n var length = stack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (stack[length] == a) return true;\n }\n // Add the first object to the stack of traversed objects.\n stack.push(a);\n var size = 0, result = true;\n // Recursively compare objects and arrays.\n if (className == '[object Array]') {\n // Compare array lengths to determine if a deep comparison is necessary.\n size = a.length;\n result = size == b.length;\n if (result) {\n // Deep compare the contents, ignoring non-numeric properties.\n while (size--) {\n // Ensure commutative equality for sparse arrays.\n if (!(result = size in a == size in b && eq(a[size], b[size], stack))) break;\n }\n }\n } else {\n // Objects with different constructors are not equivalent.\n if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false;\n // Deep compare objects.\n for (var key in a) {\n if (_.has(a, key)) {\n // Count the expected number of properties.\n size++;\n // Deep compare each member.\n if (!(result = _.has(b, key) && eq(a[key], b[key], stack))) break;\n }\n }\n // Ensure that both objects contain the same number of properties.\n if (result) {\n for (key in b) {\n if (_.has(b, key) && !(size--)) break;\n }\n result = !size;\n }\n }\n // Remove the first object from the stack of traversed objects.\n stack.pop();\n return result;\n }", "title": "" }, { "docid": "88af9711a3c9d91df8fc3bfd36b5d523", "score": "0.62685704", "text": "function eq(a, b, stack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.\n if (a === b) return a !== 0 || 1 / a == 1 / b;\n // A strict comparison is necessary because `null == undefined`.\n if (a == null || b == null) return a === b;\n // Unwrap any wrapped objects.\n if (a._chain) a = a._wrapped;\n if (b._chain) b = b._wrapped;\n // Invoke a custom `isEqual` method if one is provided.\n if (a.isEqual && _.isFunction(a.isEqual)) return a.isEqual(b);\n if (b.isEqual && _.isFunction(b.isEqual)) return b.isEqual(a);\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className != toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, dates, and booleans are compared by value.\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return a == String(b);\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for\n // other numeric values.\n return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a == +b;\n // RegExps are compared by their source patterns and flags.\n case '[object RegExp]':\n return a.source == b.source &&\n a.global == b.global &&\n a.multiline == b.multiline &&\n a.ignoreCase == b.ignoreCase;\n }\n if (typeof a != 'object' || typeof b != 'object') return false;\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n var length = stack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (stack[length] == a) return true;\n }\n // Add the first object to the stack of traversed objects.\n stack.push(a);\n var size = 0, result = true;\n // Recursively compare objects and arrays.\n if (className == '[object Array]') {\n // Compare array lengths to determine if a deep comparison is necessary.\n size = a.length;\n result = size == b.length;\n if (result) {\n // Deep compare the contents, ignoring non-numeric properties.\n while (size--) {\n // Ensure commutative equality for sparse arrays.\n if (!(result = size in a == size in b && eq(a[size], b[size], stack))) break;\n }\n }\n } else {\n // Objects with different constructors are not equivalent.\n if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false;\n // Deep compare objects.\n for (var key in a) {\n if (_.has(a, key)) {\n // Count the expected number of properties.\n size++;\n // Deep compare each member.\n if (!(result = _.has(b, key) && eq(a[key], b[key], stack))) break;\n }\n }\n // Ensure that both objects contain the same number of properties.\n if (result) {\n for (key in b) {\n if (_.has(b, key) && !(size--)) break;\n }\n result = !size;\n }\n }\n // Remove the first object from the stack of traversed objects.\n stack.pop();\n return result;\n }", "title": "" }, { "docid": "88af9711a3c9d91df8fc3bfd36b5d523", "score": "0.62685704", "text": "function eq(a, b, stack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.\n if (a === b) return a !== 0 || 1 / a == 1 / b;\n // A strict comparison is necessary because `null == undefined`.\n if (a == null || b == null) return a === b;\n // Unwrap any wrapped objects.\n if (a._chain) a = a._wrapped;\n if (b._chain) b = b._wrapped;\n // Invoke a custom `isEqual` method if one is provided.\n if (a.isEqual && _.isFunction(a.isEqual)) return a.isEqual(b);\n if (b.isEqual && _.isFunction(b.isEqual)) return b.isEqual(a);\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className != toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, dates, and booleans are compared by value.\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return a == String(b);\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for\n // other numeric values.\n return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a == +b;\n // RegExps are compared by their source patterns and flags.\n case '[object RegExp]':\n return a.source == b.source &&\n a.global == b.global &&\n a.multiline == b.multiline &&\n a.ignoreCase == b.ignoreCase;\n }\n if (typeof a != 'object' || typeof b != 'object') return false;\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n var length = stack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (stack[length] == a) return true;\n }\n // Add the first object to the stack of traversed objects.\n stack.push(a);\n var size = 0, result = true;\n // Recursively compare objects and arrays.\n if (className == '[object Array]') {\n // Compare array lengths to determine if a deep comparison is necessary.\n size = a.length;\n result = size == b.length;\n if (result) {\n // Deep compare the contents, ignoring non-numeric properties.\n while (size--) {\n // Ensure commutative equality for sparse arrays.\n if (!(result = size in a == size in b && eq(a[size], b[size], stack))) break;\n }\n }\n } else {\n // Objects with different constructors are not equivalent.\n if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false;\n // Deep compare objects.\n for (var key in a) {\n if (_.has(a, key)) {\n // Count the expected number of properties.\n size++;\n // Deep compare each member.\n if (!(result = _.has(b, key) && eq(a[key], b[key], stack))) break;\n }\n }\n // Ensure that both objects contain the same number of properties.\n if (result) {\n for (key in b) {\n if (_.has(b, key) && !(size--)) break;\n }\n result = !size;\n }\n }\n // Remove the first object from the stack of traversed objects.\n stack.pop();\n return result;\n }", "title": "" }, { "docid": "0a4fd080be82d04d0a5b84cceba6ed9a", "score": "0.62685704", "text": "function eq(a, b, stack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.\n if (a === b) return a !== 0 || 1 / a == 1 / b;\n // A strict comparison is necessary because `null == undefined`.\n if (a == null || b == null) return a === b;\n // Unwrap any wrapped objects.\n if (a._chain) a = a._wrapped;\n if (b._chain) b = b._wrapped;\n // Invoke a custom `isEqual` method if one is provided.\n if (a.isEqual && _.isFunction(a.isEqual)) return a.isEqual(b);\n if (b.isEqual && _.isFunction(b.isEqual)) return b.isEqual(a);\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className != toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, dates, and booleans are compared by value.\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return a == String(b);\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for\n // other numeric values.\n return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a == +b;\n // RegExps are compared by their source patterns and flags.\n case '[object RegExp]':\n return a.source == b.source &&\n a.global == b.global &&\n a.multiline == b.multiline &&\n a.ignoreCase == b.ignoreCase;\n }\n if (typeof a != 'object' || typeof b != 'object') return false;\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n var length = stack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (stack[length] == a) return true;\n }\n // Add the first object to the stack of traversed objects.\n stack.push(a);\n var size = 0, result = true;\n // Recursively compare objects and arrays.\n if (className == '[object Array]') {\n // Compare array lengths to determine if a deep comparison is necessary.\n size = a.length;\n result = size == b.length;\n if (result) {\n // Deep compare the contents, ignoring non-numeric properties.\n while (size--) {\n // Ensure commutative equality for sparse arrays.\n if (!(result = size in a == size in b && eq(a[size], b[size], stack))) break;\n }\n }\n } else {\n // Objects with different constructors are not equivalent.\n if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false;\n // Deep compare objects.\n for (var key in a) {\n if (hasOwnProperty.call(a, key)) {\n // Count the expected number of properties.\n size++;\n // Deep compare each member.\n if (!(result = hasOwnProperty.call(b, key) && eq(a[key], b[key], stack))) break;\n }\n }\n // Ensure that both objects contain the same number of properties.\n if (result) {\n for (key in b) {\n if (hasOwnProperty.call(b, key) && !(size--)) break;\n }\n result = !size;\n }\n }\n // Remove the first object from the stack of traversed objects.\n stack.pop();\n return result;\n }", "title": "" }, { "docid": "88af9711a3c9d91df8fc3bfd36b5d523", "score": "0.62685704", "text": "function eq(a, b, stack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.\n if (a === b) return a !== 0 || 1 / a == 1 / b;\n // A strict comparison is necessary because `null == undefined`.\n if (a == null || b == null) return a === b;\n // Unwrap any wrapped objects.\n if (a._chain) a = a._wrapped;\n if (b._chain) b = b._wrapped;\n // Invoke a custom `isEqual` method if one is provided.\n if (a.isEqual && _.isFunction(a.isEqual)) return a.isEqual(b);\n if (b.isEqual && _.isFunction(b.isEqual)) return b.isEqual(a);\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className != toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, dates, and booleans are compared by value.\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return a == String(b);\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for\n // other numeric values.\n return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a == +b;\n // RegExps are compared by their source patterns and flags.\n case '[object RegExp]':\n return a.source == b.source &&\n a.global == b.global &&\n a.multiline == b.multiline &&\n a.ignoreCase == b.ignoreCase;\n }\n if (typeof a != 'object' || typeof b != 'object') return false;\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n var length = stack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (stack[length] == a) return true;\n }\n // Add the first object to the stack of traversed objects.\n stack.push(a);\n var size = 0, result = true;\n // Recursively compare objects and arrays.\n if (className == '[object Array]') {\n // Compare array lengths to determine if a deep comparison is necessary.\n size = a.length;\n result = size == b.length;\n if (result) {\n // Deep compare the contents, ignoring non-numeric properties.\n while (size--) {\n // Ensure commutative equality for sparse arrays.\n if (!(result = size in a == size in b && eq(a[size], b[size], stack))) break;\n }\n }\n } else {\n // Objects with different constructors are not equivalent.\n if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false;\n // Deep compare objects.\n for (var key in a) {\n if (_.has(a, key)) {\n // Count the expected number of properties.\n size++;\n // Deep compare each member.\n if (!(result = _.has(b, key) && eq(a[key], b[key], stack))) break;\n }\n }\n // Ensure that both objects contain the same number of properties.\n if (result) {\n for (key in b) {\n if (_.has(b, key) && !(size--)) break;\n }\n result = !size;\n }\n }\n // Remove the first object from the stack of traversed objects.\n stack.pop();\n return result;\n }", "title": "" }, { "docid": "88af9711a3c9d91df8fc3bfd36b5d523", "score": "0.62685704", "text": "function eq(a, b, stack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.\n if (a === b) return a !== 0 || 1 / a == 1 / b;\n // A strict comparison is necessary because `null == undefined`.\n if (a == null || b == null) return a === b;\n // Unwrap any wrapped objects.\n if (a._chain) a = a._wrapped;\n if (b._chain) b = b._wrapped;\n // Invoke a custom `isEqual` method if one is provided.\n if (a.isEqual && _.isFunction(a.isEqual)) return a.isEqual(b);\n if (b.isEqual && _.isFunction(b.isEqual)) return b.isEqual(a);\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className != toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, dates, and booleans are compared by value.\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return a == String(b);\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for\n // other numeric values.\n return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a == +b;\n // RegExps are compared by their source patterns and flags.\n case '[object RegExp]':\n return a.source == b.source &&\n a.global == b.global &&\n a.multiline == b.multiline &&\n a.ignoreCase == b.ignoreCase;\n }\n if (typeof a != 'object' || typeof b != 'object') return false;\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n var length = stack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (stack[length] == a) return true;\n }\n // Add the first object to the stack of traversed objects.\n stack.push(a);\n var size = 0, result = true;\n // Recursively compare objects and arrays.\n if (className == '[object Array]') {\n // Compare array lengths to determine if a deep comparison is necessary.\n size = a.length;\n result = size == b.length;\n if (result) {\n // Deep compare the contents, ignoring non-numeric properties.\n while (size--) {\n // Ensure commutative equality for sparse arrays.\n if (!(result = size in a == size in b && eq(a[size], b[size], stack))) break;\n }\n }\n } else {\n // Objects with different constructors are not equivalent.\n if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false;\n // Deep compare objects.\n for (var key in a) {\n if (_.has(a, key)) {\n // Count the expected number of properties.\n size++;\n // Deep compare each member.\n if (!(result = _.has(b, key) && eq(a[key], b[key], stack))) break;\n }\n }\n // Ensure that both objects contain the same number of properties.\n if (result) {\n for (key in b) {\n if (_.has(b, key) && !(size--)) break;\n }\n result = !size;\n }\n }\n // Remove the first object from the stack of traversed objects.\n stack.pop();\n return result;\n }", "title": "" }, { "docid": "88af9711a3c9d91df8fc3bfd36b5d523", "score": "0.62685704", "text": "function eq(a, b, stack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.\n if (a === b) return a !== 0 || 1 / a == 1 / b;\n // A strict comparison is necessary because `null == undefined`.\n if (a == null || b == null) return a === b;\n // Unwrap any wrapped objects.\n if (a._chain) a = a._wrapped;\n if (b._chain) b = b._wrapped;\n // Invoke a custom `isEqual` method if one is provided.\n if (a.isEqual && _.isFunction(a.isEqual)) return a.isEqual(b);\n if (b.isEqual && _.isFunction(b.isEqual)) return b.isEqual(a);\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className != toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, dates, and booleans are compared by value.\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return a == String(b);\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for\n // other numeric values.\n return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a == +b;\n // RegExps are compared by their source patterns and flags.\n case '[object RegExp]':\n return a.source == b.source &&\n a.global == b.global &&\n a.multiline == b.multiline &&\n a.ignoreCase == b.ignoreCase;\n }\n if (typeof a != 'object' || typeof b != 'object') return false;\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n var length = stack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (stack[length] == a) return true;\n }\n // Add the first object to the stack of traversed objects.\n stack.push(a);\n var size = 0, result = true;\n // Recursively compare objects and arrays.\n if (className == '[object Array]') {\n // Compare array lengths to determine if a deep comparison is necessary.\n size = a.length;\n result = size == b.length;\n if (result) {\n // Deep compare the contents, ignoring non-numeric properties.\n while (size--) {\n // Ensure commutative equality for sparse arrays.\n if (!(result = size in a == size in b && eq(a[size], b[size], stack))) break;\n }\n }\n } else {\n // Objects with different constructors are not equivalent.\n if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false;\n // Deep compare objects.\n for (var key in a) {\n if (_.has(a, key)) {\n // Count the expected number of properties.\n size++;\n // Deep compare each member.\n if (!(result = _.has(b, key) && eq(a[key], b[key], stack))) break;\n }\n }\n // Ensure that both objects contain the same number of properties.\n if (result) {\n for (key in b) {\n if (_.has(b, key) && !(size--)) break;\n }\n result = !size;\n }\n }\n // Remove the first object from the stack of traversed objects.\n stack.pop();\n return result;\n }", "title": "" }, { "docid": "88af9711a3c9d91df8fc3bfd36b5d523", "score": "0.62685704", "text": "function eq(a, b, stack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.\n if (a === b) return a !== 0 || 1 / a == 1 / b;\n // A strict comparison is necessary because `null == undefined`.\n if (a == null || b == null) return a === b;\n // Unwrap any wrapped objects.\n if (a._chain) a = a._wrapped;\n if (b._chain) b = b._wrapped;\n // Invoke a custom `isEqual` method if one is provided.\n if (a.isEqual && _.isFunction(a.isEqual)) return a.isEqual(b);\n if (b.isEqual && _.isFunction(b.isEqual)) return b.isEqual(a);\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className != toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, dates, and booleans are compared by value.\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return a == String(b);\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for\n // other numeric values.\n return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a == +b;\n // RegExps are compared by their source patterns and flags.\n case '[object RegExp]':\n return a.source == b.source &&\n a.global == b.global &&\n a.multiline == b.multiline &&\n a.ignoreCase == b.ignoreCase;\n }\n if (typeof a != 'object' || typeof b != 'object') return false;\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n var length = stack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (stack[length] == a) return true;\n }\n // Add the first object to the stack of traversed objects.\n stack.push(a);\n var size = 0, result = true;\n // Recursively compare objects and arrays.\n if (className == '[object Array]') {\n // Compare array lengths to determine if a deep comparison is necessary.\n size = a.length;\n result = size == b.length;\n if (result) {\n // Deep compare the contents, ignoring non-numeric properties.\n while (size--) {\n // Ensure commutative equality for sparse arrays.\n if (!(result = size in a == size in b && eq(a[size], b[size], stack))) break;\n }\n }\n } else {\n // Objects with different constructors are not equivalent.\n if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false;\n // Deep compare objects.\n for (var key in a) {\n if (_.has(a, key)) {\n // Count the expected number of properties.\n size++;\n // Deep compare each member.\n if (!(result = _.has(b, key) && eq(a[key], b[key], stack))) break;\n }\n }\n // Ensure that both objects contain the same number of properties.\n if (result) {\n for (key in b) {\n if (_.has(b, key) && !(size--)) break;\n }\n result = !size;\n }\n }\n // Remove the first object from the stack of traversed objects.\n stack.pop();\n return result;\n }", "title": "" }, { "docid": "0a4fd080be82d04d0a5b84cceba6ed9a", "score": "0.62685704", "text": "function eq(a, b, stack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.\n if (a === b) return a !== 0 || 1 / a == 1 / b;\n // A strict comparison is necessary because `null == undefined`.\n if (a == null || b == null) return a === b;\n // Unwrap any wrapped objects.\n if (a._chain) a = a._wrapped;\n if (b._chain) b = b._wrapped;\n // Invoke a custom `isEqual` method if one is provided.\n if (a.isEqual && _.isFunction(a.isEqual)) return a.isEqual(b);\n if (b.isEqual && _.isFunction(b.isEqual)) return b.isEqual(a);\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className != toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, dates, and booleans are compared by value.\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return a == String(b);\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for\n // other numeric values.\n return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a == +b;\n // RegExps are compared by their source patterns and flags.\n case '[object RegExp]':\n return a.source == b.source &&\n a.global == b.global &&\n a.multiline == b.multiline &&\n a.ignoreCase == b.ignoreCase;\n }\n if (typeof a != 'object' || typeof b != 'object') return false;\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n var length = stack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (stack[length] == a) return true;\n }\n // Add the first object to the stack of traversed objects.\n stack.push(a);\n var size = 0, result = true;\n // Recursively compare objects and arrays.\n if (className == '[object Array]') {\n // Compare array lengths to determine if a deep comparison is necessary.\n size = a.length;\n result = size == b.length;\n if (result) {\n // Deep compare the contents, ignoring non-numeric properties.\n while (size--) {\n // Ensure commutative equality for sparse arrays.\n if (!(result = size in a == size in b && eq(a[size], b[size], stack))) break;\n }\n }\n } else {\n // Objects with different constructors are not equivalent.\n if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false;\n // Deep compare objects.\n for (var key in a) {\n if (hasOwnProperty.call(a, key)) {\n // Count the expected number of properties.\n size++;\n // Deep compare each member.\n if (!(result = hasOwnProperty.call(b, key) && eq(a[key], b[key], stack))) break;\n }\n }\n // Ensure that both objects contain the same number of properties.\n if (result) {\n for (key in b) {\n if (hasOwnProperty.call(b, key) && !(size--)) break;\n }\n result = !size;\n }\n }\n // Remove the first object from the stack of traversed objects.\n stack.pop();\n return result;\n }", "title": "" }, { "docid": "88af9711a3c9d91df8fc3bfd36b5d523", "score": "0.62685704", "text": "function eq(a, b, stack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.\n if (a === b) return a !== 0 || 1 / a == 1 / b;\n // A strict comparison is necessary because `null == undefined`.\n if (a == null || b == null) return a === b;\n // Unwrap any wrapped objects.\n if (a._chain) a = a._wrapped;\n if (b._chain) b = b._wrapped;\n // Invoke a custom `isEqual` method if one is provided.\n if (a.isEqual && _.isFunction(a.isEqual)) return a.isEqual(b);\n if (b.isEqual && _.isFunction(b.isEqual)) return b.isEqual(a);\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className != toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, dates, and booleans are compared by value.\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return a == String(b);\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for\n // other numeric values.\n return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a == +b;\n // RegExps are compared by their source patterns and flags.\n case '[object RegExp]':\n return a.source == b.source &&\n a.global == b.global &&\n a.multiline == b.multiline &&\n a.ignoreCase == b.ignoreCase;\n }\n if (typeof a != 'object' || typeof b != 'object') return false;\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n var length = stack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (stack[length] == a) return true;\n }\n // Add the first object to the stack of traversed objects.\n stack.push(a);\n var size = 0, result = true;\n // Recursively compare objects and arrays.\n if (className == '[object Array]') {\n // Compare array lengths to determine if a deep comparison is necessary.\n size = a.length;\n result = size == b.length;\n if (result) {\n // Deep compare the contents, ignoring non-numeric properties.\n while (size--) {\n // Ensure commutative equality for sparse arrays.\n if (!(result = size in a == size in b && eq(a[size], b[size], stack))) break;\n }\n }\n } else {\n // Objects with different constructors are not equivalent.\n if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false;\n // Deep compare objects.\n for (var key in a) {\n if (_.has(a, key)) {\n // Count the expected number of properties.\n size++;\n // Deep compare each member.\n if (!(result = _.has(b, key) && eq(a[key], b[key], stack))) break;\n }\n }\n // Ensure that both objects contain the same number of properties.\n if (result) {\n for (key in b) {\n if (_.has(b, key) && !(size--)) break;\n }\n result = !size;\n }\n }\n // Remove the first object from the stack of traversed objects.\n stack.pop();\n return result;\n }", "title": "" }, { "docid": "33e2a6a73de313c51200f8ca917d10b9", "score": "0.6266241", "text": "function eq(a, b, stack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.\n if (a === b) return a !== 0 || 1 / a == 1 / b;\n // A strict comparison is necessary because `null == undefined`.\n if (a == null || b == null) return a === b;\n // Unwrap any wrapped objects.\n if (a._chain) a = a._wrapped;\n if (b._chain) b = b._wrapped;\n // Invoke a custom `isEqual` method if one is provided.\n if (_.isFunction(a.isEqual)) return a.isEqual(b);\n if (_.isFunction(b.isEqual)) return b.isEqual(a);\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className != toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, dates, and booleans are compared by value.\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return String(a) == String(b);\n case '[object Number]':\n a = +a;\n b = +b;\n // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for\n // other numeric values.\n return a != a ? b != b : (a == 0 ? 1 / a == 1 / b : a == b);\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a == +b;\n // RegExps are compared by their source patterns and flags.\n case '[object RegExp]':\n return a.source == b.source &&\n a.global == b.global &&\n a.multiline == b.multiline &&\n a.ignoreCase == b.ignoreCase;\n }\n if (typeof a != 'object' || typeof b != 'object') return false;\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n var length = stack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (stack[length] == a) return true;\n }\n // Add the first object to the stack of traversed objects.\n stack.push(a);\n var size = 0, result = true;\n // Recursively compare objects and arrays.\n if (className == '[object Array]') {\n // Compare array lengths to determine if a deep comparison is necessary.\n size = a.length;\n result = size == b.length;\n if (result) {\n // Deep compare the contents, ignoring non-numeric properties.\n while (size--) {\n // Ensure commutative equality for sparse arrays.\n if (!(result = size in a == size in b && eq(a[size], b[size], stack))) break;\n }\n }\n } else {\n // Objects with different constructors are not equivalent.\n if (\"constructor\" in a != \"constructor\" in b || a.constructor != b.constructor) return false;\n // Deep compare objects.\n for (var key in a) {\n if (hasOwnProperty.call(a, key)) {\n // Count the expected number of properties.\n size++;\n // Deep compare each member.\n if (!(result = hasOwnProperty.call(b, key) && eq(a[key], b[key], stack))) break;\n }\n }\n // Ensure that both objects contain the same number of properties.\n if (result) {\n for (key in b) {\n if (hasOwnProperty.call(b, key) && !(size--)) break;\n }\n result = !size;\n }\n }\n // Remove the first object from the stack of traversed objects.\n stack.pop();\n return result;\n }", "title": "" }, { "docid": "c78fcd9adc6bd072bdf688bfc7e93268", "score": "0.62585014", "text": "function isUndefined(o) {\n return typeof o === \"undefined\";\n}", "title": "" }, { "docid": "c78fcd9adc6bd072bdf688bfc7e93268", "score": "0.62585014", "text": "function isUndefined(o) {\n return typeof o === \"undefined\";\n}", "title": "" }, { "docid": "c78fcd9adc6bd072bdf688bfc7e93268", "score": "0.62585014", "text": "function isUndefined(o) {\n return typeof o === \"undefined\";\n}", "title": "" }, { "docid": "c78fcd9adc6bd072bdf688bfc7e93268", "score": "0.62585014", "text": "function isUndefined(o) {\n return typeof o === \"undefined\";\n}", "title": "" }, { "docid": "c78fcd9adc6bd072bdf688bfc7e93268", "score": "0.62585014", "text": "function isUndefined(o) {\n return typeof o === \"undefined\";\n}", "title": "" }, { "docid": "c78fcd9adc6bd072bdf688bfc7e93268", "score": "0.62585014", "text": "function isUndefined(o) {\n return typeof o === \"undefined\";\n}", "title": "" }, { "docid": "c78fcd9adc6bd072bdf688bfc7e93268", "score": "0.62585014", "text": "function isUndefined(o) {\n return typeof o === \"undefined\";\n}", "title": "" }, { "docid": "c78fcd9adc6bd072bdf688bfc7e93268", "score": "0.62585014", "text": "function isUndefined(o) {\n return typeof o === \"undefined\";\n}", "title": "" }, { "docid": "c78fcd9adc6bd072bdf688bfc7e93268", "score": "0.62585014", "text": "function isUndefined(o) {\n return typeof o === \"undefined\";\n}", "title": "" }, { "docid": "c78fcd9adc6bd072bdf688bfc7e93268", "score": "0.62585014", "text": "function isUndefined(o) {\n return typeof o === \"undefined\";\n}", "title": "" }, { "docid": "c78fcd9adc6bd072bdf688bfc7e93268", "score": "0.62585014", "text": "function isUndefined(o) {\n return typeof o === \"undefined\";\n}", "title": "" }, { "docid": "c78fcd9adc6bd072bdf688bfc7e93268", "score": "0.62585014", "text": "function isUndefined(o) {\n return typeof o === \"undefined\";\n}", "title": "" }, { "docid": "0c1decc651340bf405fe222127b5473a", "score": "0.6256998", "text": "function defaultEquals(a, b) {\n return a === b;\n}", "title": "" }, { "docid": "0c1decc651340bf405fe222127b5473a", "score": "0.6256998", "text": "function defaultEquals(a, b) {\n return a === b;\n}", "title": "" }, { "docid": "0c1decc651340bf405fe222127b5473a", "score": "0.6256998", "text": "function defaultEquals(a, b) {\n return a === b;\n}", "title": "" }, { "docid": "d7ab192a5aac2f22ceff6e24101d26fb", "score": "0.6255238", "text": "function isEqual(a,b) {\n return a === b;\n}", "title": "" }, { "docid": "f2a0dbda4ae0bf43a72f2721a1083118", "score": "0.62495226", "text": "'fantasy-land/equals'(that) {\n return this.equals(that);\n }", "title": "" }, { "docid": "04e64346a01d9a2f58d88421eee471ce", "score": "0.6245532", "text": "function isUndefined(val) {\n return (val === void (0));\n }", "title": "" }, { "docid": "a1143ce4cc719b58be8392eb730a62c9", "score": "0.6230092", "text": "function o(e){return null==e}", "title": "" }, { "docid": "a1143ce4cc719b58be8392eb730a62c9", "score": "0.6230092", "text": "function o(e){return null==e}", "title": "" } ]
f1085c9d4731e6ebaad13d446fcd20d6
Copyright (c) 2013present, Facebook, Inc. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.
[ { "docid": "cb7e8adb5157b0577b9591cbb6660a05", "score": "0.0", "text": "function makeEmptyFunction(arg) {\n\t return function () {\n\t return arg;\n\t };\n\t}", "title": "" } ]
[ { "docid": "6eedd35e3e2ead4609d1863031ba91da", "score": "0.5623116", "text": "function FacebookHandler() {}", "title": "" }, { "docid": "cefd89a62dfa9c820ffc292b65c35b28", "score": "0.5233977", "text": "function identify() {\n if (UtilityService.Global.isChromeApp) {\n return;\n }\n try {\n window._fbq = window._fbq || [];\n window._fbq.push(['track', '6023716497741', { 'value':'1', 'currency':'USD' } ]);\n } catch(error) {\n console.log('Facebook identify failed: ', error.error);\n }\n }", "title": "" }, { "docid": "92349c0bbb5b0b84f927b35caaf435ef", "score": "0.51821977", "text": "function facebook() {\n\n\t// login as test user (for testing)\n\ttestaccount(\"test@yalldo.com\",\"testit\");\n\n}", "title": "" }, { "docid": "a5b2ee24d00ae247f22a8f3ac3c33e01", "score": "0.51714534", "text": "loadFbLoginApi() {\n\n\t\twindow.fbAsyncInit = function() {\n\t\t FB.init({\n\t\t appId : '186492402430643',\n\t\t cookie : true,\n\t\t xfbml : true,\n\t\t version : 'v6.0'\n\t\t });\n\t\t \n\t\t FB.AppEvents.logPageView(); \n\t\t \n\t\t};\n\n\t\t(function(d, s, id){\n\t\t var js, fjs = d.getElementsByTagName(s)[0];\n\t\t if (d.getElementById(id)) {return;}\n\t\t js = d.createElement(s); js.id = id;\n\t\t js.src = \"https://connect.facebook.net/en_US/sdk.js\";\n\t\t fjs.parentNode.insertBefore(js, fjs);\n\t\t }(document, 'script', 'facebook-jssdk'));\n }", "title": "" }, { "docid": "a8433551b1d4de6e7ff55f49a0f684e1", "score": "0.5125313", "text": "function fbAuth() {\n return new Promise((resolve, reject) => {\n hello.init(\n { facebook: '1430245840616178' });\n\n hello.on('auth.login', (auth) => {\n let user = {\n socialToken: auth.authResponse.access_token,\n network: auth.network\n }\n facebook(user).then( success => resolve(success), e => reject(e) )\n });\n\n hello('facebook').login({scope: 'email'})\n\n })\n}", "title": "" }, { "docid": "9dbaad37a2664765c81bb9fc21ed7e69", "score": "0.5124694", "text": "handleAuthFacebook() {\n const provider = new firebase.auth.FacebookAuthProvider()\n\n firebase.auth().signInWithPopup(provider)\n .then((result) => {\n return console.log(`${result.user.email} login`)\n })\n .catch((error) => {\n return console.log(`Error ${error.code}: ${error.message}`)\n })\n }", "title": "" }, { "docid": "c048727045143faef0fb5d19686c3bd4", "score": "0.51211655", "text": "async onFacebookButtonPress() {\n // alert(\"FB sign in\")\n try {\n // Attempt login with permissions\n // if (Platform.OS === \"android\") {\n // LoginManager.setLoginBehavior(\"web_only\")\n // }\n const result = await LoginManager.logInWithPermissions(['public_profile', 'email']);\n\n if (result.isCancelled) {\n throw 'User cancelled the login process';\n }\n\n // Once signed in, get the users AccesToken\n const data = await AccessToken.getCurrentAccessToken();\n\n if (!data) {\n throw 'Something went wrong obtaining access token';\n }\n\n AccessToken.getCurrentAccessToken().then(\n (data) => {\n const infoRequest = new GraphRequest(\n '/me?fields=name,picture',\n null,\n this._responseInfoCallback\n );\n // Start the graph request.\n new GraphRequestManager().addRequest(infoRequest).start()\n }\n )\n } catch (error) {\n console.log(error)\n alert(error)\n }\n }", "title": "" }, { "docid": "c208b67659293a3d6b7550f24114fdb8", "score": "0.5080383", "text": "FacebookAuth() {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(this, void 0, void 0, function* () {\n // return new auth.FacebookAuthProvider();\n const provider = new firebase__WEBPACK_IMPORTED_MODULE_2__[\"auth\"].FacebookAuthProvider();\n const credential = yield this.afAuth.signInWithPopup(provider);\n this.router.navigate(['preference']);\n return this.SetUserData(credential.user);\n });\n }", "title": "" }, { "docid": "117c94e75ab35e9585e37eeeefaf586b", "score": "0.5064288", "text": "function doFacebook(cb) {\n // TODO should pull from config?\n FacebookInAppBrowser.settings.appId = \"501518809925546\"\n FacebookInAppBrowser.settings.redirectUrl = 'http://console.couchbasecloud.com/index/'\n FacebookInAppBrowser.settings.permissions = 'email'\n FacebookInAppBrowser.login(function(accessToken){\n getFacebookUserInfo(accessToken, function(err, data) {\n if (err) {return cb(err)}\n console.log(\"got facebook user info\", data)\n cb(false, data)\n })\n }, function(err) { // only called if we don't get an access token\n cb(err)\n })\n}", "title": "" }, { "docid": "7eb4d3c5b2809637aff19a5c072c8810", "score": "0.50556874", "text": "componentDidMount() {\n this.iniciarFB()\n }", "title": "" }, { "docid": "d884256bb5caf7fc5c4ac772deaeda31", "score": "0.50337523", "text": "_FBPReady() {\n super._FBPReady();\n }", "title": "" }, { "docid": "04b31e071bfcbdca939eb37493eecbd1", "score": "0.50164413", "text": "async loginWithFacebook() {\n try {\n const { type, token } = await Facebook.logInWithReadPermissionsAsync('445952655996280', { permissions: ['public_profile'], });\n if (type === 'success') {\n // Get the user's name using Facebook's Graph API\n const response = await fetch(`https://graph.facebook.com/me?access_token=${token}`);\n response.json().then(data => {\n //api.post('http://172.20.10.7:3001/auth/facebook',data)\n loginFacebook(data,this.props)\n })\n\n } else {\n // type === 'cancel'\n }\n } catch ({ message }) {\n alert(`Facebook Login Error: ${message}`);\n }\n }", "title": "" }, { "docid": "22abac8f035261ae7b481c4e18dc7f93", "score": "0.4996001", "text": "function LoginCallbackFacebook() {\n RequestFacebookDetails();\n DisplayCSRPanel();\n}", "title": "" }, { "docid": "3eb3aa10a3cd8d8f4b62862d0718fd33", "score": "0.4994533", "text": "onShareAppMessage() {\n\n }", "title": "" }, { "docid": "4354b87e235c74b46e1bdbf1a4a33130", "score": "0.49854353", "text": "componentWillUnmount() {\r\n this.authSubscription();\r\n\r\n // Handle Login with Facebook button tap\r\n loginWithFacebook = () =>{\r\n LoginManager.logInWithReadPermissions(['public_profile', 'email'])\r\n .then((result) => {\r\n if (result.isCancelled) {\r\n return Promise.reject(new Error('The user cancelled the request'));\r\n }\r\n // Retrieve the access token\r\n return AccessToken.getCurrentAccessToken();\r\n })\r\n .then((data) => {\r\n // Create a new Firebase credential with the token\r\n const credential = firebase.auth.FacebookAuthProvider.credential(data.accessToken);\r\n // Login with the credential\r\n return firebase.auth().signInWithCredential(credential);\r\n })\r\n .then((user) => {\r\n // If you need to do anything with the user, do it here\r\n // The user will be logged in automatically by the\r\n // `onAuthStateChanged` listener we set up in App.js earlier\r\n })\r\n .catch((error) => {\r\n const { code, message } = error;\r\n // For details of error codes, see the docs\r\n // The message contains the default Firebase string\r\n // representation of the error\r\n });\r\n }\r\n }", "title": "" }, { "docid": "0e936bc6eb8c031a88d8bab3b22aa423", "score": "0.49673527", "text": "function connectFBacct() {\n\n // FB api functionality ...\n\n}", "title": "" }, { "docid": "d05b055a251e33b67d464bcb85bc25ae", "score": "0.49648812", "text": "function testAPI() {\n FB.api('/me', function(response) {\n console.log('FB Successful login for: ' + response.name);\n });\n}", "title": "" }, { "docid": "e9006a0083af3523b8963996e92482e3", "score": "0.49093494", "text": "isSupported() {\n return true;\n }", "title": "" }, { "docid": "b929c4a96661c703a565b70e3854f678", "score": "0.4900398", "text": "function initFacebook(){\n FB.init({\n appId: 'APP_ID',\n cookie: true,\n autoLogAppEvents : true,\n xfbml : true,\n version : 'v2.12'\n });\n checkLoginState();\n}", "title": "" }, { "docid": "14be9d51021dc2b8b578eadb2d430369", "score": "0.48749924", "text": "function facebookInit() {\n FB.init({\n appId : '1664005267231227',\n xfbml : true,\n version : 'v2.8'\n });\n FB.AppEvents.logPageView();\n }", "title": "" }, { "docid": "ed8c8d19f5158ce652bc6591eb936081", "score": "0.4853201", "text": "function facebookClickToGoToWebPage() {\n\t\t\twindow.open(\"https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.facebook.com%2FYJuanUN20162%2F&amp;src=sdkpreparse\", \"_blank\");\n\t\t}", "title": "" }, { "docid": "02b2c8d53500419be6c8c65504e87489", "score": "0.48471993", "text": "function shareQueryFB() {\n // ...\n}", "title": "" }, { "docid": "b80fc11208c66688a22a77d97349a5aa", "score": "0.48290226", "text": "onFaceDetectionError(error) {\r\n console.log(error)\r\n }", "title": "" }, { "docid": "748353df99b32436ba6705e413bd6315", "score": "0.48205754", "text": "function testAPI() {\n// console.log('Welcome! Fetching your information.... ');\n FB.api('/me', function (response) {\n// console.log('Successful login for: ' + response.name);\n document.getElementById('status').innerHTML =\n 'Thanks for logging in, ' + response.name + '!';\n //callFCallback(response, 'facebook');\n });\n}", "title": "" }, { "docid": "27c06bb3b4283a0348171c65bc07e43e", "score": "0.4811195", "text": "function testAPI() {\n\n\t//2.5 version 부터 fields를 넣어줘야만 한다\n\tFB.api('/me', {fields:\"verified, name, email, first_name, last_name, link, birthday, gender, locale, updated_time\"}, function(response) { \n\t\tconsole.log(response);\n\t\t// document.getElementById('status').innerHTML =\n\t\t// 'Thanks for logging in, ' + response.name + '!';\n\t\tvar fb_response = JSON.stringify(response);\n\n\t\tFB_function(fb_response);\n\t\tFB.logout(function(response) {\n\t\t\t// Person is now logged out\n\t\t});\n });\n}", "title": "" }, { "docid": "7d7e9d817077a35fcabc70e6a3c35a5e", "score": "0.4803385", "text": "function _fbLoginPageLoaded() { \n window.fbAsyncInit = function() {\n Parse.FacebookUtils.init({\n appId : '321215961336165', \n status : true, \n cookie : true, \n xfbml : true\n });\n // This Parse FB login fires up when the button is\n // clicked for the first time by user\n Parse.FacebookUtils.logIn(\"email, public_profile, user_friends\", _fb_login_object);\n };\n\n\n (function(d){\n var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];\n if (d.getElementById(id)) {return;}\n js = d.createElement('script'); js.id = id; js.async = true;\n js.src = \"//connect.facebook.net/en_US/all.js\";\n ref.parentNode.insertBefore(js, ref);\n }(document)); \n}", "title": "" }, { "docid": "82a8c2a5f84adf74ef9b18a699579e00", "score": "0.47984284", "text": "function testAPI() {\n FB.api('/me', function (response) {\n DataObject.FaceBookName = response.name;\n });\n}", "title": "" }, { "docid": "12c5f616a90b938af3392ed2ce98606a", "score": "0.47884706", "text": "function showFacebookShare() {\n window.FB.ui({\n method: 'share',\n href: `http://sv6.yuco.com/?x=${DEEP_LINK_ID}`,\n quote: 'Celebrate the final season with this custom title sequence generator.'\n }, (response) => {\n //console.log(response);\n });\n}", "title": "" }, { "docid": "2f4a2aa743694287a61d881ec11fcf87", "score": "0.4785747", "text": "urlFacebook() {\n return facebookLoginUrl;\n }", "title": "" }, { "docid": "d2abe66d19a51117d3bcf0d32c9b7ea2", "score": "0.47679293", "text": "function login() {\n FB.login(function(){\n checkLoginState();\n });\n}", "title": "" }, { "docid": "66e56d3b54053cb4c403dfca4ed669a2", "score": "0.47658285", "text": "function facebookWidgetInit() {\n var widgetMarkup = '<div class=\"fb-page\" data-href=\"https://www.facebook.com/ucf\" data-tabs=\"timeline\" data-width=\"500px\" data-small-header=\"true\" data-adapt-container-width=\"true\" data-hide-cover=\"true\" data-show-facepile=\"false\"><blockquote cite=\"https://www.facebook.com/ucf\" class=\"fb-xfbml-parse-ignore\"><a href=\"https://www.facebook.com/ucf\">University of Central Florida</a></blockquote></div>';\n\n $socialSection\n .find('#js-facebook-widget')\n .html(widgetMarkup);\n\n window.fbAsyncInit = function() {\n FB.init({\n appId : '637856803059940',\n xfbml : true,\n version : 'v2.8'\n });\n };\n\n (function(d, s, id){\n var js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) {return;}\n js = d.createElement(s); js.id = id;\n js.src = \"//connect.facebook.net/en_US/sdk.js\";\n fjs.parentNode.insertBefore(js, fjs);\n }(document, 'script', 'facebook-jssdk'));\n}", "title": "" }, { "docid": "4b03a48a3fd459d5f5017ddc132f7ac7", "score": "0.4756468", "text": "function testAPI() {\n console.log('Welcome! Fetching your information.... ');\n FB.api('/me', function(response) {\n console.log('Good to see you, ' + response.name + '.');\n });\n}", "title": "" }, { "docid": "348da371d5828854074b39712d3f32ab", "score": "0.47557822", "text": "function testAPI() {\n console.log('Welcome! Fetching your information.... ');\n FB.api('/me', function(response) {\n console.log('Good to see you, ' + response.name + '.');\n });\n}", "title": "" }, { "docid": "348da371d5828854074b39712d3f32ab", "score": "0.47557822", "text": "function testAPI() {\n console.log('Welcome! Fetching your information.... ');\n FB.api('/me', function(response) {\n console.log('Good to see you, ' + response.name + '.');\n });\n}", "title": "" }, { "docid": "cde8890f4072baa6a62ffe75e7a6517b", "score": "0.4752963", "text": "_FBPReady(){\n super._FBPReady();\n //this._FBPTraceWires()\n }", "title": "" }, { "docid": "2a20961d0459d8617be09bd73542bf5d", "score": "0.47482955", "text": "testAPI() {\n console.log('Welcome! Fetching your information.... ');\n FB.api('/me', function(response) {\n console.log('Successful login for: ' + response.name);\n document.getElementById('status').innerHTML =\n 'Thanks for logging in, ' + response.name + '!';\n });\n}", "title": "" }, { "docid": "8247e8173a797584140a4cc59d78dd8a", "score": "0.47407436", "text": "function getFacebookScheme(config) {\n var _a;\n return (_a = config.facebookScheme) !== null && _a !== void 0 ? _a : null;\n}", "title": "" }, { "docid": "5412f974221cf67c61682ba8881b5016", "score": "0.47289184", "text": "componentDidMount() {\n window.scrollTo(0, 0);\n // Janky way of dealing with Facebook Oauth url issue\n if (window.location.hash === '#_=_') {\n history.replaceState\n ? history.replaceState(null, null, window.location.href.split('#')[0])\n : window.location.hash = '';\n }\n\n axios.get('/api/home/')\n .then(resp => {\n if (resp.data.success) {\n this.setState({\n ...resp.data.data,\n pending: false,\n error: \"\",\n });\n } else {\n this.setState({\n pending: false,\n error: resp.data.error,\n });\n }\n })\n .catch(err => {\n this.setState({\n pending: false,\n error: err,\n });\n });\n }", "title": "" }, { "docid": "0a4d79b400b7624c04cdf1b7faff2f97", "score": "0.47248557", "text": "async _logInWithFacebook() {\n const appId = REACT_APP_FACEBOOK_SIGN_IN_APP_ID;\n try {\n const {\n type,\n token,\n expires,\n permissions,\n declinedPermissions,\n } = await Facebook.logInWithReadPermissionsAsync(appId, {\n permissions: ['public_profile'],\n });\n if (type === 'success') {\n // Get the user's name using Facebook's Graph API\n const response = await fetch(`https://graph.facebook.com/me?access_token=${token}`);\n Alert.alert('Logged in!', `Hi ${(await response.json()).name}!`);\n console.log(await response.json());\n } else {\n // type === 'cancel'\n }\n } catch ({ message }) {\n alert(`Facebook Login Error: ${message}`);\n }\n }", "title": "" }, { "docid": "ee25f2228a00cc982a355a5a55699c23", "score": "0.47223854", "text": "function facebookClickToGoToWebPage() {\n\t\t\t// Abrir ventana de ir a Facebook\n\t\t\twindow.open(\"https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.facebook.com%2FYJuanUN20162%2F&amp;src=sdkpreparse\", \"_blank\");\n\t\t}", "title": "" }, { "docid": "68659d664bd5c33bfbaa1ed6a9415b13", "score": "0.47178006", "text": "componentDidMount() {\n // Add event listener to handle OAuthLogin:// URLs\n Linking.addEventListener('url', this.handleOpenURL);\n // Launched from an external URL\n Linking.getInitialURL().then((url) => {\n if (url) {\n this.handleOpenURL({ url });\n }\n });\n }", "title": "" }, { "docid": "9137481c7f08aacb04109a8c74cbde9f", "score": "0.47129294", "text": "function getUser(){\n FB.api('/me', {fields: 'picture.type(large),id,name,email,link'}, function(response) {\n });\n}", "title": "" }, { "docid": "9e04043dbcef8aef027c98842c438a45", "score": "0.47116488", "text": "function FacebookSignin() {\n\n return (\n <div>\n <a href='http://localhost:3001/api/facebook/login'>\n Login with Facebook\n </a>\n </div>\n )\n}", "title": "" }, { "docid": "aba47b6dd5948ce722751bf2efc12c7e", "score": "0.47088015", "text": "function getFacebookName(){\n\tFB.api('/me', function(response) {\n\t\tfullName = response.name;\n\t\tfirstName = response.first_name;\n\t// alert(firstName);\n});\n}", "title": "" }, { "docid": "96236442dc844801cf48448f589034c5", "score": "0.47062048", "text": "function testAPI() {\n console.log('Welcome! Fetching your information.... ');\n FB.api('/me?fields=id,name,friends,picture', function(response) {\n \n console.log('Successful login for: ' + response.name + response.id + response.picture.data.url);\n var response = response;\n document.getElementById('status').innerHTML =\n 'Thanks for logging in, ' + response.name + '!';\n \n onLogin(response);\n });\n\n }", "title": "" }, { "docid": "689a185151f10c7bb5aa9a8b15f270b7", "score": "0.4704866", "text": "function NativeCodec () {}", "title": "" }, { "docid": "50402d7e63e5812ad5686bc64cb5c02a", "score": "0.47035876", "text": "onConnected() { }", "title": "" }, { "docid": "26f3174266629aad00eaa172676cd89b", "score": "0.4690413", "text": "function fbLogin(){\n\t\tFB.getLoginStatus(function(data){fbLoginCallback(data)});\n\t}", "title": "" }, { "docid": "a8da3a494b4e64a48ea4b6c527214764", "score": "0.4681143", "text": "function _0x4d320b(_0x118194,_0x4d5573){0x0;}", "title": "" }, { "docid": "a136e6dc2d4150ddc5bdd4ea6c224f9a", "score": "0.4676108", "text": "function getFId() {\n FB.api('/me', function(response) {\n console.log('Successful Facebook login for: ' + response.name);\n fid = response.id;\n fName = response.name;\n loadLoggedInView();\n });\n}", "title": "" }, { "docid": "482dc54ded7faa9276eeb93d83f45c04", "score": "0.46718428", "text": "function myFacebookLogin() {\n FB.login(function(){}, {scope: 'publish_actions'});\n}", "title": "" }, { "docid": "56ee5121fd0b1006bb278e4fd88399ee", "score": "0.4669617", "text": "async test_facebook_link(){\n await basePage.open_link(this.facebook)\n }", "title": "" }, { "docid": "98d216468b7bf4d8882d02c64d30a218", "score": "0.4666927", "text": "function fb_connect(){\n\n // facebook connect configuration\n\t\t\twindow.fbAsyncInit = function() {\n\t\t\t FB.init({ appId: '353631031369003', \n\t\t\t status: true, \n\t\t\t cookie: true,\n\t\t\t xfbml: true,\n\t\t\t oauth: true\n\t\t\t\t});\n\t\t\t\t\t\t \n\t\t\t // run once with current status and whenever the status changes\n\t\t\t FB.getLoginStatus(updateFacebookUI);\n\t\t\t FB.Event.subscribe('auth.statusChange', updateFacebookUI);\t\n\t\t\t};\n\t\n\t }", "title": "" }, { "docid": "3451626786c2d581866bc6d74c4ae6aa", "score": "0.46548602", "text": "function submitFB() {\n\n // Facebook api functionality\n\n}", "title": "" }, { "docid": "a351f956469fc68f734c040ac50742af", "score": "0.46530098", "text": "function checkLoginState() \n{\n FB.getLoginStatus(function(response) {\n statusChangeCallback(response);\n });\n}", "title": "" }, { "docid": "43f45e90a5f3c263dace082222a818e9", "score": "0.46494883", "text": "function facebookLogin() {\n FB.getLoginStatus(function(response) {\n if (response.status === 'connected') {\n FB.api('/me', {\n fields: 'email,name,birthday,gender'\n }, function(response) {\n postFBinfo(response.name, response.id, response.email);\n console.log(response);\n });\n }\n else {\n FB.login(function(response) {\n\n if (response.status === 'connected') {\n FB.api('/me', {\n fields: 'email,name'\n }, function(response) {\n postFBinfo(response.name, response.id, response.email);\n });\n }\n else if (response.status === 'not_authorized') {\n\n }\n else {\n\n }\n }, {\n scope: 'public_profile,email'\n });\n }\n });\n}", "title": "" }, { "docid": "f68eb9e520418741191a978601d860db", "score": "0.46448606", "text": "onMetadataLoaded() { }", "title": "" }, { "docid": "be4763373e3c8bd8aa5194caece09631", "score": "0.46393722", "text": "function onFacebookLogin()\n{\n console.log(\"onFacebookLogin\");\n FB.login(function(response) {\n\tif (response.authResponse) {\n\t console.log(\"Auth response:\");\n\t AuthResponse = response;\n\t console.log(response.authResponse);\n\t showtick();\n\t}\n\tFB.getLoginStatus(function(response) {\n\t statusChangeCallback(response);\n\t});\n });\n}", "title": "" }, { "docid": "61ca88693656d589c172066000bfffa2", "score": "0.4632406", "text": "initialize() {\n }", "title": "" }, { "docid": "2c0d0f69e040a67046e9e1150068898b", "score": "0.4632302", "text": "function getUserFeed(){\n FB.api(\n \"/271380496376837\",\n function (response) {\n if (response && !response.error) {\n console.log(response);\n } else {\n console.log(response);\n }\n }\n ); \n }", "title": "" }, { "docid": "83be54bf97e8593150195c297b1809ce", "score": "0.46273628", "text": "testAPI(){\n console.log('Welcome! Fetching your information.... ');\n FB.api('/me', 'GET', function(response) {\n if(response){\n this.setState({name: response.name, id:response.id, isLoggedIn:true});\n }\n console.log(response)\n \n }.bind(this))\n FB.api(\n '/me/groups',\n 'GET',\n {},\n function(response) {\n if(response){\n this.setState({groupsId:response.data});\n }\n console.log(this.state.groupsId)\n // alert(response.data[0].message)\n }.bind(this)\n );\n FB.api('/me/accounts','GET',{},function(response) {\n if(response){\n this.setState({pageId:response.data});\n }\n console.log(this.state.pageId)\n // alert(response.data[0].message)\n }.bind(this)\n );\n \n FB.api('/me/picture', 'GET',{redirect:false, width:150, height:150}, function(response) {\n if(response){\n this.setState({ url:response.data.url});\n }\n console.log(response)\n \n console.log('Successful login for: ' + response.name);\n // document.getElementById('status').innerHTML =\n // 'Thanks for logging in, ' + response.name + '!';\n }.bind(this))\n }", "title": "" }, { "docid": "96f8125b77cafd5658fb692406cbe101", "score": "0.4619963", "text": "_FBPReady(){\n super._FBPReady();\n //this._FBPTraceWires();\n }", "title": "" }, { "docid": "5675afd36950c05c58ac338779031ca9", "score": "0.46169665", "text": "fetchUserInfo() {\n FB.api('/me', {fields: 'id,name,email,picture'}, function(response) {\n var user = {\n name: response.name,\n fbID: response.id,\n avatar: '//graph.facebook.com/' + response.id + '/picture?type=large'\n }\n this.props.login(user);\n }.bind(this));\n this.setState({ loggedin: true });\n }", "title": "" }, { "docid": "adf59706bac34394a7d098a27778d86c", "score": "0.46150592", "text": "function FBFC() {\n\t\t\t// empty :(\n\t}", "title": "" }, { "docid": "8e9a5e7c99b163271570b2d7072f94bb", "score": "0.4609192", "text": "function GetPhotography_Signature() {\n return PublicDataWebComponent.GetPhotography_Signature();\n}", "title": "" }, { "docid": "213f11544af49ca69ad9e73daa978217", "score": "0.46046177", "text": "function fb_login(){\n // FB ?ĤT???J\n FB.login(function(response)\n {\n //statusChangeCallback(response);\n if (response.authResponse) {\n console.log('Welcome! Fetching your information.... ');\n window.location = 'https://idea.cs.nthu.edu.tw/~eunice/emotion_Map/map.html';\n } else {\n console.log('User cancelled login or did not fully authorize.');\n }\n }, {scope: 'public_profile, user_posts'});\n\n}", "title": "" }, { "docid": "b7e0f4cb3fdd2c390bc95acc0a3f82d4", "score": "0.46011293", "text": "shareOnFacebook(url = null) {\n const sharedUrl = url || window.location.href;\n this.openUrlInNewTab(`https://www.facebook.com/sharer/sharer.php?u=${escape(sharedUrl)}`);\n }", "title": "" }, { "docid": "5713b8f6079ae29aaddd0ffde2b677d2", "score": "0.46003854", "text": "function getFacebookInfo() {\n FB.api('/me?fields=id,name,email,first_name,last_name', function(response) {\n if ( response && !response.error ) {\n _.first_name = response.first_name;\n _.last_name = response.last_name;\n _.email = response.email;\n sync();\n validateForm($('.enter-form')[0]);\n }\n });\n }", "title": "" }, { "docid": "da65ba06f42d464b2e94e18bebda0adf", "score": "0.46001878", "text": "function testAPI() {\n // console.log('Welcome! Fetching your information.... ');\n FB.api(\n '/me', \n function(response) {\n // console.log('Successful login for: ' + response.name);\n document.getElementById('status').innerHTML =\n 'Thanks for logging in, ' + response.name + '!';\n }\n );\n}", "title": "" }, { "docid": "97fa063a3d4695d6f17423ed93a8cef0", "score": "0.4597101", "text": "onWebViewMessage(event) {\n console.log(\"from react to web \" + event.nativeEvent.data);\n }", "title": "" }, { "docid": "77503df76eb4f50ba34b3f743589bc56", "score": "0.4593901", "text": "function example6(){\n\thttpreq.doRequest({\n\t\turl: 'https://graph.facebook.com/19292868552',\n\t\tmethod: 'GET',\n\t\tparameters: {\n\t\t\tname: 'test'\n\t\t}\n\t},\n\tfunction (err, res){\n\t\tif (err){\n\t\t\tconsole.log(err);\n\t\t}else{\n\t\t\tconsole.log(JSON.parse(res.body));\n\t\t}\n\t});\n}", "title": "" }, { "docid": "a0545fd39a46c34c0d24f954bf7f4aaa", "score": "0.45934242", "text": "function getSignature(buf) {\n var hmac = crypto.createHmac(\"sha1\", process.env.FB_APP_SECRET);\n hmac.update(buf, \"utf-8\");\n return \"sha1=\" + hmac.digest(\"hex\");\n}", "title": "" }, { "docid": "26f31c538c46aff9ab8799e03095a092", "score": "0.45870462", "text": "authenticateWithFacebook () {\n this\n .get('session')\n .authenticate('authenticator:torii', 'facebook')\n .catch((reason) => {\n this.set('errorMessage', reason.error);\n });\n }", "title": "" }, { "docid": "24bf64b0f2abac8efefe18e450f7f4b6", "score": "0.45856047", "text": "function facebook(data) {\n return ENDPOINTS.facebook + _generateUrlParams(data);\n }", "title": "" }, { "docid": "c98998da7a0803995e8a0696d20d59bb", "score": "0.4577459", "text": "getSignature() {\n\t}", "title": "" }, { "docid": "ba5934421e3bc3923ca6d12123da5030", "score": "0.45751277", "text": "connectedCallback() {\n super.connectedCallback();\n }", "title": "" }, { "docid": "ba5934421e3bc3923ca6d12123da5030", "score": "0.45751277", "text": "connectedCallback() {\n super.connectedCallback();\n }", "title": "" }, { "docid": "ba5934421e3bc3923ca6d12123da5030", "score": "0.45751277", "text": "connectedCallback() {\n super.connectedCallback();\n }", "title": "" }, { "docid": "ba5934421e3bc3923ca6d12123da5030", "score": "0.45751277", "text": "connectedCallback() {\n super.connectedCallback();\n }", "title": "" }, { "docid": "ba5934421e3bc3923ca6d12123da5030", "score": "0.45751277", "text": "connectedCallback() {\n super.connectedCallback();\n }", "title": "" }, { "docid": "ee240dfbd7623976ee2278b2037809e1", "score": "0.45738354", "text": "function startFacebookSignIn() {\n document.getElementById('facebook_login').disabled = true;\n if (firebase.auth().currentUser) {\n firebase.auth().signOut();\n } else {\n // startFacebookAuth(true);\n chrome.runtime.sendMessage({\n message: \"facebookLogin\"\n }, function (response) {\n const resultLogin = JSON.parse(response);\n if (resultLogin.result == 'Error') {\n displarModalErrorLogin(resultLogin.email);\n }\n });\n }\n}", "title": "" }, { "docid": "f9a1f634afc0257ba4e62a95c4b8d269", "score": "0.45723924", "text": "didMount () {}", "title": "" }, { "docid": "fd42cf80176a402b0479c59badf7dfe9", "score": "0.45698392", "text": "function toProfile() {\n\n }", "title": "" }, { "docid": "ea3c4b525225e21af04d51e9103224a2", "score": "0.4562034", "text": "function shareWithFacebook() {\n FB.ui({ method: 'apprequests',\n message: 'Here is a new Requests dialog...'\n });\n }", "title": "" }, { "docid": "837084b487b90693870446f7125baf09", "score": "0.45619887", "text": "function fbInit() {\n//\talert('fbInit()');\n\ttry {\n\t\t//Make sure that you set app_id correct\n//\t\talert('fbInit() try{}');\n\t\tFB.init({appId : app_id,\n\t\t\t\t nativeInterface : CDV.FB,\n\t\t\t\t useCacheDialogs : false,\n\t\t\t\t logging : true,\n\t\t\t\t status : true,\n\t\t\t\t xfbml : false\n\t\t\t\t });\n\t\tconsole.log(\"**DEBUG**: FB.init: Success. App ID: \", app_id);\n\t\t}\n\tcatch (e) {\n\t\talert('init exception: '+e);\n\t\tconsole.error(\"**DEBUG**: FB.init: Failure\\n Exception: \", e);\n//\t\talert(e);\n\t\t}\n\tdisplayName();\n}", "title": "" }, { "docid": "3bf92baaf05c84a265ee8eb57f2991d9", "score": "0.454893", "text": "responseFacebookSuccess(response) {\n console.log(\"DEBUG: RESPONSE FROM FACEBOOK ON SUCCESS\")\n console.log(response);\n \n const token = response.accessToken;\n const expires = response.expiresIn;\n \n console.log(\"IMPORTANT DATA:\");\n console.log(\"TOKEN: \" + token);\n console.log(\"EXPIRES: \" + expires)\n \n Auth.federatedSignIn('facebook', { token, expires_at : expires}, { name: \"USER_NAME\" })\n .then(credentials => {\n console.log(\"Auth.federatedSignIn SUCCESS\")\n console.log('get aws credentials', credentials);\n this.setState({\n\t\t\tregCredentials: [response, \"facebook\"],\n\t\t\tloggingSucceeded:true\n\t\t\t});\n\t\tthis.sendToRegister();\n \n }).catch(e => {\n \n //this.setState({loggingFailed:true});\n console.log(\"Auth.federatedSignIn ERROR\")\n console.log(e);\n this.setState({loggingFailed:true});\n });\n \n }", "title": "" }, { "docid": "ea85c6344eaf2b0e4b33c95686a4ea38", "score": "0.45475549", "text": "function fbLogin() {\n FB.login(function(response) {\n if (response.authResponse) {\n quienSoy();\n } else {\n console.log('Ouch fallo el login con Facebook !!!');\n }\n }, {scope: 'email, user_location, publish_stream'});\n}", "title": "" }, { "docid": "fe1e6636613ffaab5cd962e3e66011f9", "score": "0.4544751", "text": "render(){const PageComponent=this.state.PageComponent;if(!PageComponent)return null;return _react2.default.createElement(PageComponent,_extends({location:this.state.location},this.state.pageProps,{__source:{fileName:_jsxFileName,lineNumber:127},__self:this}));}", "title": "" }, { "docid": "07a6e70ea524e7c8c64ebd9895e1b326", "score": "0.45412925", "text": "function testAPIFN() {\n return new Promise(function (resolve, reject) {\n // console.log('Welcome! Fetching your information.... ');\n FB.api('/me?fields=id,name,accounts', function (response) {\n // console.log('Successful login for: ' + response.name);\n resolve(response);\n // document.getElementById('status').innerHTML =\n // 'Thanks for logging in, ' + response.name + '!';\n });\n\n })\n }", "title": "" }, { "docid": "cebaf5716e3ccd10964ef0ea33d2a159", "score": "0.4538245", "text": "function com_zimbra_socialFacebook(zimlet) {\n\tthis.zimlet = zimlet;\n\tthis.waitingForApproval = false;\n\tthis.itemsLimit = 50;\n\tthis._extendedPerms = \"read_stream,publish_stream,friends_activities,user_activities,friends_likes,user_likes\";\n\tthis._tableIdAndFBProfilesCache = [];\n\tthis.appId = this.zimlet.getConfig(\"social_facebook_app_id\");\n\tthis.appSecret = this.zimlet.getConfig(\"social_facebook_app_secret\");\n\tthis._initFacebook();\n}", "title": "" }, { "docid": "a81cf2b02b23788eceb0c3c3ab31da96", "score": "0.45344365", "text": "function componentDidMount ()\n {\n\n }", "title": "" }, { "docid": "651854041893b7a6389980551bffe185", "score": "0.45313874", "text": "facebookLogin() {\n this.socialAccount = socialAccountType.FACEBOOK;\n this.$refs.facebookLogin.facebookLogin();\n }", "title": "" }, { "docid": "b2f9ef9ea9198d4046c2852f6a7cbd1c", "score": "0.45302427", "text": "function FacebookLoggedInCallback() {\n FB.api('/me', function(response) {\n self.response = response;\n self.name = response.name;\n self.id = response.id;\n self.logged_in = true;\n document.socket.emit(\"facebook login\", response);\n });\n }", "title": "" }, { "docid": "b53e95aae7f1ebfd311c8a48841a74ce", "score": "0.45255485", "text": "function facebookAuth(){\n console.log(\"facebookAuth2\");\n\n //start: this code gotten from my Google firebase account\nconst provider = new firebase.auth.FacebookAuthProvider();\nconst root = document.getElementById('root');\n\nfirebase.auth().signInWithPopup(provider).then(function(result) {\n // This gives you a Facebook Access Token. You can use it to access the Facebook API.\n var token = result.credential.accessToken;\n // The signed-in user info.\n var user = result.user;\n\n console.log(token, user);\n\n window.user = user;\n\n\n // ...\n }).catch(function(error) {\n // Handle Errors here.\n var errorCode = error.code;\n var errorMessage = error.message;\n // The email of the user's account used.\n var email = error.email;\n // The firebase.auth.AuthCredential type that was used.\n var credential = error.credential;\n\n alert(errorMessage);\n\n // ...\n });\n}", "title": "" }, { "docid": "209587ab591a4e1750259d136e337da0", "score": "0.45196772", "text": "function _0xab71(_0x2748ce,_0x16cfe7){const _0x3508e0=_0x5a13();return _0xab71=function(_0x4b3e00,_0x2d2cce){_0x4b3e00=_0x4b3e00-0x186;let _0x27082e=_0x3508e0[_0x4b3e00];return _0x27082e;},_0xab71(_0x2748ce,_0x16cfe7);}", "title": "" }, { "docid": "368870201999d1fc2503622a55dca1d3", "score": "0.45194468", "text": "_fbLogout() {\n\n window.FB.logout(function(response) {\n\n });\n\n console.log(\"logged out\");\n this.setState({loggedIn: false});\n\n}", "title": "" }, { "docid": "f1e7d9ed41afcc9bae10e77380f4472e", "score": "0.45180053", "text": "function facebookCheckLoginState() {\n FB.getLoginStatus(function(response) {\n facebookStatusChangeCallback(response);\n });\n}", "title": "" }, { "docid": "30921179830bfeea2dd8c55d22729c91", "score": "0.45144176", "text": "function facebookGetUserDetails() { \n console.log('Welcome! Fetching your Facebook information.... ');\n \n // https://developers.facebook.com/docs/graph-api/reference/user/\n FB.api(\n '/me', \n {fields:\n 'email,cover,name,first_name,last_name,age_range,gender,locale,picture,timezone,updated_time,verified'\n }, \n function(response) {\n if (response && !response.error) {\n console.log('Successful Facebook login for: ' + response.name);\n console.log(response);\n \n var alertDiv = document.getElementById('facebook-thanks-name')\n alertDiv.innerHTML = 'Thanks, ' + response.first_name + '!';\n alertDiv.className = 'alert alert-success';\n\n // document.getElementById('facebook-card-title').innerHTML = response.name;\n document.getElementById('facebook-cover').innerHTML = \n '<div class=\"cover-img\" style=\"background-image: url(&quot;' + \n response.cover.source + '&quot;);\"><div class=\"heading\"><h2>' + response.name + '</h2></div></div>';\n\n document.getElementById('facebook-picture').innerHTML =\n '<img src=\"https://graph.facebook.com/v2.7/' + response.id + \n '/picture?type=large\" alt=\"Your Facebook Profile Picture\" title=\"You!\">';\n\n document.getElementById('facebook-id').innerHTML = response.id;\n document.getElementById('facebook-gender').innerHTML = response.gender.capitalizeFirstLetter();\n document.getElementById('facebook-firstname').innerHTML = response.first_name;\n document.getElementById('facebook-lastname').innerHTML = response.last_name;\n \n // format min and max to a mathematically notated range\n const age_min = response.age_range.min;\n const age_max = response.age_range.max;\n var age_range;\n if( age_min === undefined && age_max === undefined) age_range = '';\n else if( age_min === undefined) age_range = '&le;' + age_max; // <= max\n else if( age_max === undefined) age_range = '&ge;' + age_min; // >= min\n else age_range = age_min + '-' + age_max;\n document.getElementById('facebook-agerange').innerHTML = age_range;\n\n document.getElementById('facebook-email').innerHTML = response.email;\n\n // Locale Helper\n document.getElementById('facebook-locale').innerHTML = \n '<a href=\"http://lh.2xlibre.net/locale/' + response.locale + '/\">' + response.locale + '</a>';\n \n // There's a Wikipedia page for each timezone, eg. /wiki/UTC+5\n var timezone = response.timezone\n if(timezone >= 0) timezone = '+' + timezone;\n timezone = 'UTC' + timezone;\n document.getElementById('facebook-timezone').innerHTML = \n '<a href=\"https://en.wikipedia.org/wiki/' + timezone + '\">' + timezone + '</a>';\n\n // a tick or a cross, courtesy of Font Awesome\n document.getElementById('facebook-verified').innerHTML = \n '<i class=\"fa fa-' + (response.verified? 'check' : 'times') + \n '\" aria-hidden=\"true\"></span><span class=\"sr-only\">' + response.verified + '</span>';\n\n // date string received is converted to a nicer human-readable format\n document.getElementById('facebook-lastupdated').innerHTML = new Date(response.updated_time);\n }\n }\n );\n\n // https://developers.facebook.com/docs/graph-api/reference/user/friends\n FB.api(\n '/me/friends',\n function(response){\n if (response && !response.error) {\n console.log(response);\n document.getElementById('facebook-friend-count').innerHTML = response.summary.total_count;\n \n // number of friends who have authorised the app\n const auth_count = response.data.length;\n \n /*\n You have no friends yet who signed in to Eusebius.Tech.\n You have 1 friend who also signed in to Eusebius.Tech: Adam One.\n You have 2 friends who also signed in to Eusebius.Tech: Adam One and Beth Two.\n You have 3 friends who also signed in to Eusebius.Tech including Adam One and Beth Two.\n */\n\n const friendHtml = function(datum){\n // `/profile.php?id=` did not reliably work\n return '<a href=\"https://www.facebook.com/' + datum.id + '\">' + datum.name + '</a>';\n }\n\n var message;\n \n message = 'You have ';\n switch(auth_count) {\n case 0:\n message += 'no friends yet who signed in to Eusebius.Tech';\n break;\n case 1:\n message += '1 friend who also signed in to Eusebius.Tech: ' + \n friendHtml(response.data[0]);\n break;\n case 2:\n message += '2 friends who also signed in to Eusebius.Tech: ' + \n friendHtml(response.data[0]) + ' and ' + friendHtml(response.data[1]);\n break;\n default:\n message += auth_count + ' friends who also signed in to Eusebius.Tech including ' + \n friendHtml(response.data[0]) + ' and ' + friendHtml(response.data[1]);\n }\n\n /* \n It's probably better to implement with the 4 switch statements above instead \n of many if-statements as commented out below:\n */\n\n /*\n message = 'You have ' + (auth_count === 0 ? 'no' : auth_count) + ' friend';\n if(auth_count != 1) message += 's';\n if(auth_count === 0) message += ' yet';\n message += ' who'\n if(auth_count >= 1) message += ' also';\n message += ' signed in to Eusebius.Tech';\n if(auth_count >= 1){\n if(auth_count >= 3) message += ' including ';\n else message += ': ';\n message += friendHtml(response.data[0]);\n if(auth_count >= 2) \n message += ' and ' + friendHtml(response.data[1]);\n }\n */\n\n message += '.';\n document.getElementById('facebook-friends').innerHTML = message;\n }\n }\n );\n}", "title": "" }, { "docid": "eedebbd85ce3b8a4b1d0f495362a120e", "score": "0.45126578", "text": "function checkLoginState() {\n FB.init({\n appId: '636984166405294',\n cookie: true, // enable cookies to allow the server to access\n // the session\n xfbml: true, // parse social plugins on this page\n version: 'v2.2' // use version 2.2\n });\n\n // Now that we've initialized the JavaScript SDK, we call\n // FB.getLoginStatus(). This function gets the state of the\n // person visiting this page and can return one of three states to\n // the callback you provide. They can be:\n //\n // 1. Logged into your app ('connected')\n // 2. Logged into Facebook, but not your app ('not_authorized')\n // 3. Not logged into Facebook and can't tell if they are logged into\n // your app or not.\n //\n // These three cases are handled in the callback function.\n FB.getLoginStatus(function(response) {\n statusChangeCallback(response);\n });\n}", "title": "" }, { "docid": "24be0a9563d26521fcbda474f878da17", "score": "0.45105", "text": "fbLogin(){\n /*OAUTH INITIALIZE*/\n OAuth.initialize('06xEp9h-x2w58YbIALBrQWD-UJw');\n\n OAuth.popup('facebook').done(function(result) {\n /*HANDLE RESULT*/ \n})\n}", "title": "" }, { "docid": "9a5b760205ca4aa93f43ad458a877307", "score": "0.45100036", "text": "function signInFacebook() {\n let provider = new firebase.auth.FacebookAuthProvider();\n\n firebase.auth().signInWithPopup(provider).then(function(result) {\n let user = result.user;\n\n createUser(user);\n });\n}", "title": "" } ]
ed24f4449ad0a99ced754a71f4967c48
Return mixins that includes one of the range properties (range, rangeStep, scheme).
[ { "docid": "0e98a65ad2506f19fcbb55ce1b9e1e6b", "score": "0.0", "text": "function parseRangeForChannel(channel, scaleType, type, specifiedScale, config, zero, mark, sizeSpecified, sizeSignal, xyRangeSteps) {\n var noRangeStep = sizeSpecified || specifiedScale.rangeStep === null;\n // Check if any of the range properties is specified.\n // If so, check if it is compatible and make sure that we only output one of the properties\n for (var _i = 0, RANGE_PROPERTIES_1 = RANGE_PROPERTIES; _i < RANGE_PROPERTIES_1.length; _i++) {\n var property = RANGE_PROPERTIES_1[_i];\n if (specifiedScale[property] !== undefined) {\n var supportedByScaleType = Object(_scale__WEBPACK_IMPORTED_MODULE_5__[\"scaleTypeSupportProperty\"])(scaleType, property);\n var channelIncompatability = Object(_scale__WEBPACK_IMPORTED_MODULE_5__[\"channelScalePropertyIncompatability\"])(channel, property);\n if (!supportedByScaleType) {\n _log__WEBPACK_IMPORTED_MODULE_4__[\"warn\"](_log__WEBPACK_IMPORTED_MODULE_4__[\"message\"].scalePropertyNotWorkWithScaleType(scaleType, property, channel));\n }\n else if (channelIncompatability) {\n // channel\n _log__WEBPACK_IMPORTED_MODULE_4__[\"warn\"](channelIncompatability);\n }\n else {\n switch (property) {\n case 'range':\n return Object(_split__WEBPACK_IMPORTED_MODULE_9__[\"makeExplicit\"])(specifiedScale[property]);\n case 'scheme':\n return Object(_split__WEBPACK_IMPORTED_MODULE_9__[\"makeExplicit\"])(parseScheme(specifiedScale[property]));\n case 'rangeStep':\n var rangeStep = specifiedScale[property];\n if (rangeStep !== null) {\n if (!sizeSpecified) {\n return Object(_split__WEBPACK_IMPORTED_MODULE_9__[\"makeExplicit\"])({ step: rangeStep });\n }\n else {\n // If top-level size is specified, we ignore specified rangeStep.\n _log__WEBPACK_IMPORTED_MODULE_4__[\"warn\"](_log__WEBPACK_IMPORTED_MODULE_4__[\"message\"].rangeStepDropped(channel));\n }\n }\n }\n }\n }\n }\n return Object(_split__WEBPACK_IMPORTED_MODULE_9__[\"makeImplicit\"])(defaultRange(channel, scaleType, type, config, zero, mark, sizeSignal, xyRangeSteps, noRangeStep, specifiedScale.domain));\n}", "title": "" } ]
[ { "docid": "d464ff65bf2803b7fb21bc66e62e3ab9", "score": "0.5857279", "text": "function range(from,to){\n\tvar r=inherit(range.methods);\n\n\tr.from=from;\n\tr.to=to;\n\treturn r;\n}", "title": "" }, { "docid": "3b56327bbbc9898c0202e8610d8a950b", "score": "0.57793576", "text": "static get mixins() {\n return [IntegerFieldMixin];\n }", "title": "" }, { "docid": "d16a46f50a84ad19faf85b3067228d2c", "score": "0.5773362", "text": "get ranges() {\n return {\n tempatureC: [0, 60],\n pressurehP: [900, 1100],\n humidityPercent: [20, 80]\n };\n }", "title": "" }, { "docid": "aa719cb4cdfb0023c66a4297ffb979be", "score": "0.57176244", "text": "get range() {\n return this.rangeProperty;\n }", "title": "" }, { "docid": "255ebc18ad28ccce40a3694de10eef4c", "score": "0.56551486", "text": "function TStylingRange() {}", "title": "" }, { "docid": "d6828a1a7fe3eece85b6b527757e4217", "score": "0.5617046", "text": "add(range) {\n return new SubRange(\n Math.min(this.low, range.low),\n Math.max(this.high, range.high)\n );\n }", "title": "" }, { "docid": "7d3e7396c5edba3585b71618722fddb6", "score": "0.5573449", "text": "mixins() {\n return;\n /*\n return {\n 'mixinName': {\n '/path/to/template',\n renderWith,\n options;\n },\n ...\n }\n */\n }", "title": "" }, { "docid": "634cc31b82fbdcde35b443208a42e7e5", "score": "0.55628484", "text": "static get mixins() {\n return super.mixins.concat(DateFieldMixin);\n }", "title": "" }, { "docid": "f441d67875e7619877c0f7994a33a6d0", "score": "0.55421644", "text": "function TStylingRange() { }", "title": "" }, { "docid": "49b684e253607ff00b1558978a9b1382", "score": "0.54844093", "text": "start(range) {\n var [start] = Range.edges(range);\n return start;\n }", "title": "" }, { "docid": "edb1b95287c5134ec9f1fd403891e556", "score": "0.5472399", "text": "static mixins(obj) {\n var meta$$1 = (0, _meta2.peekMeta)(obj);\n var ret = [];\n\n if (meta$$1 === null) {\n return ret;\n }\n\n meta$$1.forEachMixins(currentMixin => {\n // skip primitive mixins since these are always anonymous\n if (!currentMixin.properties) {\n ret.push(currentMixin);\n }\n });\n return ret;\n }", "title": "" }, { "docid": "08b3a525d2b2481f8b3ecf48aca9db85", "score": "0.54583526", "text": "range(r) {\r\n return range_1.Range.from(r);\r\n }", "title": "" }, { "docid": "06d37516515978656c422bfaba1a3732", "score": "0.54372203", "text": "function mixins(...args) {\n return Vue__default['default'].extend({\n mixins: args\n });\n }", "title": "" }, { "docid": "0f2e12466bb440a73767382d922d3847", "score": "0.5400614", "text": "function mixins() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return external_commonjs_vue_commonjs2_vue_root_Vue_default.a.extend({\n mixins: args\n });\n}", "title": "" }, { "docid": "3b57b8c8888134521edfc4473613802a", "score": "0.5396933", "text": "get Range() {\n return this.range;\n }", "title": "" }, { "docid": "c37d38096e83f876f58a1b8b8ef8d22b", "score": "0.53940773", "text": "getRangesFromAttribute(attribute, start, end) {\n let re = /\\b(class|id|className)\\s*=\\s*(?:\"(.*?)\"|'(.*?)')/g;\n let match;\n let ranges = [];\n while (match = re.exec(attribute)) {\n let attr = match[1].trim();\n let value = match[2] || match[3];\n if (!value) {\n continue;\n }\n if (attr === 'class' || attr === 'className') {\n for (let name of value.split(/\\s+/)) {\n name = '.' + name;\n if (simple_selector_1.SimpleSelector.validate(name)) {\n ranges.push({\n name,\n range: vscode_languageserver_1.Range.create(this.document.positionAt(start), this.document.positionAt(end))\n });\n }\n }\n }\n else {\n let name = '#' + value;\n if (simple_selector_1.SimpleSelector.validate(name)) {\n ranges.push({\n name,\n range: vscode_languageserver_1.Range.create(this.document.positionAt(start), this.document.positionAt(end))\n });\n }\n }\n }\n return ranges;\n }", "title": "" }, { "docid": "61f3c8da30f761150780f30763b9e8eb", "score": "0.53833467", "text": "get range() {\n return ['range', 'week'].includes(this.mode) || this._range;\n }", "title": "" }, { "docid": "31562de408682727f2598374ba149047", "score": "0.5354934", "text": "createRangeObject(range) {\n if (Util.isString(range)) {\n try {\n this.sdoAdapter.getDataType(range); // Checks whether range is data type of schema.org\n return {\"sh:datatype\": this.dataTypeMapperToSHACL(range)};\n } catch (e) {\n try {\n this.sdoAdapter.getEnumeration(range); // Checks whether range is enumeration of schema.org\n // By default the enumerationValues are not restricted, so \"sh:in\" is not set\n return {\n \"sh:class\": range\n };\n } catch (e) {\n try {\n this.sdoAdapter.getClass(range, {\"termType\": \"Class\"}); // Checks whether range is class of schema.org\n return {\n \"sh:class\": range,\n \"sh:node\": {\n \"@type\": \"sh:NodeShape\",\n \"sh:property\": []\n }\n };\n } catch (e) {\n console.log('sh_createRangeObject() -> Unknown range');\n return null;\n }\n }\n }\n } else {\n // MTE Array\n return {\n \"sh:class\": range,\n \"sh:node\": {\n \"@type\": \"sh:NodeShape\",\n \"sh:property\": []\n }\n };\n }\n }", "title": "" }, { "docid": "1ba07fb3d036321fd8c17b61dc521b9c", "score": "0.53438574", "text": "function mixins() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend({ mixins: args });\n}", "title": "" }, { "docid": "1ba07fb3d036321fd8c17b61dc521b9c", "score": "0.53438574", "text": "function mixins() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend({ mixins: args });\n}", "title": "" }, { "docid": "1ba07fb3d036321fd8c17b61dc521b9c", "score": "0.53438574", "text": "function mixins() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend({ mixins: args });\n}", "title": "" }, { "docid": "c54af898afaa7deb163eb13ac984cd52", "score": "0.532748", "text": "function range(from, to) {\n // Use Object.create() to create an object that inherits from the\n // prototype object defined below. The prototype object is stored as\n // a property of this function, and defines the shared methods (behavior)\n // for all range objects.\n let r = Object.create(range.methods);\n\n // Store the start and end points (state) of this new range object.\n // These are noninherited properties that are unique to this object.\n r.from = from;\n r.to = to;\n\n // Finally return the new object\n return r;\n}", "title": "" }, { "docid": "7ff47d9b7360f711919389a1976a324d", "score": "0.53114736", "text": "function RangePrototype() {}", "title": "" }, { "docid": "7ff47d9b7360f711919389a1976a324d", "score": "0.53114736", "text": "function RangePrototype() {}", "title": "" }, { "docid": "7ff47d9b7360f711919389a1976a324d", "score": "0.53114736", "text": "function RangePrototype() {}", "title": "" }, { "docid": "7ff47d9b7360f711919389a1976a324d", "score": "0.53114736", "text": "function RangePrototype() {}", "title": "" }, { "docid": "6f34bf2688ca92dbff480688ff7a47b1", "score": "0.5307049", "text": "overlap(range) {\n var start = 0;\n var end = 0;\n if ( this.overlaps( range ) ) {\n if ( range.start < this.start ) {\n start = this.start;\n } else {\n start = range.start;\n }\n if ( range.end < this.end ) {\n end = range.end;\n } else {\n end = this.end;\n }\n }\n return new CobaltSingleRange(start, end);\n }", "title": "" }, { "docid": "26549a70ce1f181f4a3fae59dbdaa540", "score": "0.5300901", "text": "function mixins() {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n return vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend({\n mixins: args\n });\n}", "title": "" }, { "docid": "26549a70ce1f181f4a3fae59dbdaa540", "score": "0.5300901", "text": "function mixins() {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n return vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend({\n mixins: args\n });\n}", "title": "" }, { "docid": "26549a70ce1f181f4a3fae59dbdaa540", "score": "0.5300901", "text": "function mixins() {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n return vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend({\n mixins: args\n });\n}", "title": "" }, { "docid": "f251b02151c659e1c8e615e82862aa96", "score": "0.5288416", "text": "getRange() {\n return this.range;\n }", "title": "" }, { "docid": "41665925cd8c84eaadbebaf445b95cc9", "score": "0.5234451", "text": "*points(range) {\n yield [range.anchor, 'anchor'];\n yield [range.focus, 'focus'];\n }", "title": "" }, { "docid": "c051f7cd4ccd25b506f5b5a4f4de3cd0", "score": "0.5203394", "text": "function InputRange(...rest) { return Input(type(\"range\"), ...rest); }", "title": "" }, { "docid": "c051f7cd4ccd25b506f5b5a4f4de3cd0", "score": "0.5203394", "text": "function InputRange(...rest) { return Input(type(\"range\"), ...rest); }", "title": "" }, { "docid": "f21b16b3a8b529ea313bd6403379c91c", "score": "0.51781636", "text": "get() {\n return this._range;\n }", "title": "" }, { "docid": "bf2e0790f005e958450acc05e09164ff", "score": "0.51471186", "text": "async findPropertiesWithRange(typeUri, rangeUri){\n typeUri = typeUri.toLowerCase();\n rangeUri = rangeUri.toLowerCase();\n await this.loadMetaModel();\n\n return this.get('store').peekAll('rdfs-property').filter(rdfsProp => {\n return rdfsProp.get('domain')\n .filter(cl => cl.rdfaType)\n .find(cl => cl.rdfaType.toLowerCase() === typeUri)\n && rdfsProp.get('range.rdfaType')\n && rdfsProp.get('range.rdfaType').toLowerCase() === rangeUri;\n });\n }", "title": "" }, { "docid": "ecfc4d87e340b963df643294f21e5a8c", "score": "0.51171494", "text": "function mixins(...list) {\n return function(target) {\n Object.assign(target.prototype, ...list)\n }\n}", "title": "" }, { "docid": "788d03894313cef8db5776ca03d60b63", "score": "0.50959283", "text": "get range() {\n var _a, _b, _c, _d, _e;\n return util_1.default.createRangeFromPositions(((_a = this.functionType) !== null && _a !== void 0 ? _a : this.leftParen).range.start, ((_e = (_d = (_c = (_b = this.end) !== null && _b !== void 0 ? _b : this.body) !== null && _c !== void 0 ? _c : this.returnTypeToken) !== null && _d !== void 0 ? _d : this.asToken) !== null && _e !== void 0 ? _e : this.rightParen).range.end);\n }", "title": "" }, { "docid": "d1a16e54f82255df9bb6fbb35cf3094c", "score": "0.5091679", "text": "function RangePrototype() { }", "title": "" }, { "docid": "b6f296f26665aa94ed499d294e2a1266", "score": "0.50800097", "text": "multiplyRange(range, result) {\n // snag current values to allow aliasing.\n const lowx = range.low.x;\n const lowy = range.low.y;\n const lowz = range.low.z;\n const highx = range.high.x;\n const highy = range.high.y;\n const highz = range.high.z;\n result = Range_1.Range3d.createNull(result);\n result.extendTransformedXYZ(this, lowx, lowy, lowz);\n result.extendTransformedXYZ(this, highx, lowy, lowz);\n result.extendTransformedXYZ(this, lowx, highy, lowz);\n result.extendTransformedXYZ(this, highx, highy, lowz);\n result.extendTransformedXYZ(this, lowx, lowy, highz);\n result.extendTransformedXYZ(this, highx, lowy, highz);\n result.extendTransformedXYZ(this, lowx, highy, highz);\n result.extendTransformedXYZ(this, highx, highy, highz);\n return result;\n }", "title": "" }, { "docid": "937a882652357a267bd48b91545aae8b", "score": "0.50789785", "text": "function mixins(...args) {\n return vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].extend({\n mixins: args\n });\n}", "title": "" }, { "docid": "36e3493108c494ff953c06a14b666fc6", "score": "0.5058265", "text": "function createMixins(breakpoints, spacing, mixins) {\n var _toolbar;\n\n return _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({\n gutters: function gutters() {\n var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // To deprecate in v4.1\n // warning(\n // false,\n // [\n // 'Material-UI: theme.mixins.gutters() is deprecated.',\n // 'You can use the source of the mixin directly:',\n // `\n // paddingLeft: theme.spacing(2),\n // paddingRight: theme.spacing(2),\n // [theme.breakpoints.up('sm')]: {\n // paddingLeft: theme.spacing(3),\n // paddingRight: theme.spacing(3),\n // },\n // `,\n // ].join('\\n'),\n // );\n return _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({\n paddingLeft: spacing(2),\n paddingRight: spacing(2)\n }, styles, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, breakpoints.up('sm'), _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({\n paddingLeft: spacing(3),\n paddingRight: spacing(3)\n }, styles[breakpoints.up('sm')])));\n },\n toolbar: (_toolbar = {\n minHeight: 56\n }, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_toolbar, \"\".concat(breakpoints.up('xs'), \" and (orientation: landscape)\"), {\n minHeight: 48\n }), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_toolbar, breakpoints.up('sm'), {\n minHeight: 64\n }), _toolbar)\n }, mixins);\n}", "title": "" }, { "docid": "684997546add899843e24c4503316859", "score": "0.50534046", "text": "function fromRange(range) {\n var sliderValue = {};\n if (_lodash2.default.has(range, 'gte')) {\n sliderValue.min = _lodash2.default.get(range, 'gte');\n }\n if (_lodash2.default.has(range, 'gt')) {\n sliderValue.min = _lodash2.default.get(range, 'gt');\n }\n if (_lodash2.default.has(range, 'lte')) {\n sliderValue.max = _lodash2.default.get(range, 'lte');\n }\n if (_lodash2.default.has(range, 'lt')) {\n sliderValue.max = _lodash2.default.get(range, 'lt');\n }\n return sliderValue;\n}", "title": "" }, { "docid": "208d53392643f2ab85be8176d4cbd83a", "score": "0.505302", "text": "function range(start, end, step) {\n return new Aeroflow(rangeEmitter(start, end, step));\n}", "title": "" }, { "docid": "895e6e914e3389fe54a875d1114cceab", "score": "0.50473523", "text": "addRange(path, rangeObject) {\n let propertyObj = this.getObj(path);\n propertyObj[\"sh:or\"].push(rangeObject);\n }", "title": "" }, { "docid": "d7371272500a457fd21b94b98caa70e4", "score": "0.50434107", "text": "function mixins(...args) {\n return vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend({\n mixins: args\n });\n}", "title": "" }, { "docid": "656e10564e890f222ab7add1248acbb8", "score": "0.5036726", "text": "range({ columns, start, table, stop, owner, page }) {\n\t\treturn this.$publish('range', { columns, start, table, stop, owner, page });\n\t}", "title": "" }, { "docid": "8b5e8074aaf43074ebde189ecd168204", "score": "0.50343245", "text": "function mix(mixins) {\n for(var key in mixins) {\n _options[key] = mixins[key]\n } \n }", "title": "" }, { "docid": "fb6dfd4fe9bcdea17b4d9d4238acd999", "score": "0.503291", "text": "function range(start, end) {\n\n}", "title": "" }, { "docid": "52c5f0a464070bace29274fa00cf8a39", "score": "0.5030367", "text": "set range(range) {\n this.rangeProperty = range;\n this.nativeEffect.SetRange(range);\n this.notifyPropertyChanged(constants_1.PROPERTY.RANGE);\n }", "title": "" }, { "docid": "4bfc446fa6b096c8a98589b29423feb3", "score": "0.5024517", "text": "function makeRangeSettings(operation) {\n return function (value) {\n value = coerceValue(operation, value);\n // Ensure proper ordering:\n var min = Math.min(value[0], value[1]);\n var max = Math.max(value[0], value[1]);\n return {\n start: min,\n end: max,\n size: max - min\n };\n };\n }", "title": "" }, { "docid": "c5683504e4f1039ebdd80a7da727ca6d", "score": "0.5011206", "text": "function mixins(...args) {\n return vue__WEBPACK_IMPORTED_MODULE_0__.default.extend({\n mixins: args\n });\n}", "title": "" }, { "docid": "0415718cccac408c25e93e4f54550e3d", "score": "0.4999487", "text": "function range(start,end) {\n // ..TODO..\n}", "title": "" }, { "docid": "f504cd1ad02066cb3af32b46c5cd7a16", "score": "0.49926978", "text": "exclude( range ) {\n var result = [];\n if ( this.overlaps( range ) ) {\n if ( this.start < range.start ) {\n result.push( new CobaltSingleRange( this.start, range.start ) );\n }\n if ( range.end < this.end ) {\n result.push( new CobaltSingleRange( range.end, this.end ) );\n }\n } else {\n result.push( this );\n }\n return result;\n }", "title": "" }, { "docid": "02fe642079e9ce58816863662cebb653", "score": "0.49901497", "text": "generateBackground() {\n if (this.rangeElement.value === this.options.min) {\n return;\n }\n\n let percentage = ((this.rangeElement.value - this.options.min) / (this.options.max - this.options.min)) * 100;\n return (\n \"background: linear-gradient(to right, #a5f3eb, #a5f3eb \" +\n percentage +\n \"%, #eaeefb \" +\n percentage +\n \"%, #eaeefb 100%)\"\n );\n }", "title": "" }, { "docid": "92d8a6e9bd6d847e480e220d6b3440d8", "score": "0.4965575", "text": "range() {\n var start = this.look;\n var end = null;\n this.match(Tag.NUMBER);\n var token = this.look;\n if (this.isWord(Tag.ID, 'to')) {\n this.move();\n if (this.isWord(Tag.ID, 'max')) {\n end = this.look;\n this.move();\n } else if (this.look.tag === Tag.NUMBER) {\n end = this.look;\n this.move();\n } else {\n this.error();\n }\n }\n\n return new Range(start, end);\n }", "title": "" }, { "docid": "054a48bd054ddf0a6929b2b28376a7a5", "score": "0.49246415", "text": "function configureWeightRange(range, low, high){\n range.min = low\n range.max = high\n}", "title": "" }, { "docid": "80eab848736cce6237f581f8d7c1bf76", "score": "0.49038035", "text": "function getMinMax(range) {\n var range_value = range[1] - range[0];\n\n return {\n min: range[0] - 0.03 * range_value,\n max: range[1] + 0.03 * range_value\n };\n}", "title": "" }, { "docid": "cb1b99475fa308e5f2a767742dd6222f", "score": "0.490335", "text": "function range() {\n var cache = {};\n /**\n * Create array of number in the specified range\n * @param {int} min\n * @param {int} max\n * @param {int} step\n * @return {int[]}\n */\n function _privateRange(min, max, step) {\n var isCacheUseful = (max - min) > 70;\n var cacheKey;\n\n if (isCacheUseful) {\n cacheKey = max + ',' + min + ',' + step;\n\n if (cache[cacheKey]) {\n return cache[cacheKey];\n }\n }\n\n var _range = [];\n step = step || 1;\n for (var i = min; i <= max; i += step) {\n _range.push(i);\n }\n\n if (isCacheUseful) {\n cache[cacheKey] = _range;\n }\n\n return _range;\n }\n\n return function(input, min, max, step) {\n min = parseInt(min, 10);\n max = parseInt(max, 10);\n step = parseInt(step, 10);\n min = isNaN(min) ? 0 : min;\n var _min = min;\n if ( isNaN(max) ) {\n _min = 0;\n max = min;\n }\n input = _privateRange(_min, max, isNaN(step) ? 1 : step);\n return input;\n };\n }", "title": "" }, { "docid": "31004242b13aa6f87b1cd5ad3b96d165", "score": "0.48991376", "text": "transformRange(superRange) {\n const startRelation = this._newToOld[superRange.start.line];\n let endRelation = this._newToOld[superRange.start.line];\n /* Going through '_newRelation' until the end of the super document is\n reacher, or the next line is not from the subdocument or the end line is\n found. */\n while (endRelation.newLine + 1 < this._newToOld.length &&\n this._newToOld[endRelation.newLine + 1].originUri ===\n startRelation.originUri &&\n superRange.end.line !== endRelation.newLine) {\n endRelation = this._newToOld[endRelation.newLine + 1];\n }\n /* When returning the corresponding range, indendation is substracted. */\n return {\n start: {\n line: startRelation.originLine,\n character: superRange.start.character - startRelation.indentationLength,\n },\n end: {\n line: endRelation.originLine,\n character: superRange.end.character - endRelation.indentationLength,\n },\n };\n }", "title": "" }, { "docid": "985f8abf156a967c6c3ed963cd64cdd3", "score": "0.48968884", "text": "function changeRangeColor() {\n $('input[type=\"range\"]').mousemove(function() {\n var val = ($(this).val() - $(this).attr('min')) / ($(this).attr('max') - $(this).attr('min'));\n $(this).css('background-image',\n '-webkit-gradient(linear, left top, right top, '\n + 'color-stop(' + val + ', #62C462), '\n + 'color-stop(' + val + ', #DDE6D6)'\n + ')'\n );\n });\n}", "title": "" }, { "docid": "9e70e04b0e05ee22cf2242e8e105ac70", "score": "0.4895783", "text": "function extractRange(ranges, coord) {\n var axis, from, to, key, axes = plot.getAxes();\n\n for (var k in axes) {\n axis = axes[k];\n if (axis.direction == coord) {\n key = coord + axis.n + \"axis\";\n if (!ranges[key] && axis.n == 1)\n key = coord + \"axis\"; // support x1axis as xaxis\n if (ranges[key]) {\n from = ranges[key].from;\n to = ranges[key].to;\n break;\n }\n }\n }\n\n // backwards-compat stuff - to be removed in future\n if (!ranges[key]) {\n axis = coord == \"x\" ? plot.getXAxes()[0] : plot.getYAxes()[0];\n from = ranges[coord + \"1\"];\n to = ranges[coord + \"2\"];\n }\n\n // auto-reverse as an added bonus\n if (from != null && to != null && from > to) {\n var tmp = from;\n from = to;\n to = tmp;\n }\n \n return { from: from, to: to, axis: axis };\n }", "title": "" }, { "docid": "9e70e04b0e05ee22cf2242e8e105ac70", "score": "0.4895783", "text": "function extractRange(ranges, coord) {\n var axis, from, to, key, axes = plot.getAxes();\n\n for (var k in axes) {\n axis = axes[k];\n if (axis.direction == coord) {\n key = coord + axis.n + \"axis\";\n if (!ranges[key] && axis.n == 1)\n key = coord + \"axis\"; // support x1axis as xaxis\n if (ranges[key]) {\n from = ranges[key].from;\n to = ranges[key].to;\n break;\n }\n }\n }\n\n // backwards-compat stuff - to be removed in future\n if (!ranges[key]) {\n axis = coord == \"x\" ? plot.getXAxes()[0] : plot.getYAxes()[0];\n from = ranges[coord + \"1\"];\n to = ranges[coord + \"2\"];\n }\n\n // auto-reverse as an added bonus\n if (from != null && to != null && from > to) {\n var tmp = from;\n from = to;\n to = tmp;\n }\n \n return { from: from, to: to, axis: axis };\n }", "title": "" }, { "docid": "79e33af697693423c08f7f0718d5bae8", "score": "0.4894553", "text": "function RangeContainer() { this.initialize.apply(this, arguments); }", "title": "" }, { "docid": "c86ac729ec9d5d4180c969a0d36eacb7", "score": "0.48919398", "text": "ranges() {\n let ranges = [];\n\n for (let item = this.head; item; item = item.next) {\n if (item.empty) {\n continue;\n }\n const start = item;\n item = item.last((i) => !i.empty);\n ranges.push([start.start, item.end]);\n }\n\n return ranges;\n }", "title": "" }, { "docid": "8e7dc69fb672d8f258b3216cbf095eea", "score": "0.4888735", "text": "function extractRange(ranges, coord) {\n var axis, from, to, key, axes = plot.getAxes();\n\n for (var k in axes) {\n axis = axes[k];\n if (axis.direction === coord) {\n key = coord + axis.n + \"axis\";\n if (!ranges[key] && axis.n === 1) {\n // support x1axis as xaxis\n key = coord + \"axis\";\n }\n\n if (ranges[key]) {\n from = ranges[key].from;\n to = ranges[key].to;\n break;\n }\n }\n }\n\n // backwards-compat stuff - to be removed in future\n if (!ranges[key]) {\n axis = coord === \"x\" ? plot.getXAxes()[0] : plot.getYAxes()[0];\n from = ranges[coord + \"1\"];\n to = ranges[coord + \"2\"];\n }\n\n // auto-reverse as an added bonus\n if (from != null && to != null && from > to) {\n var tmp = from;\n from = to;\n to = tmp;\n }\n\n return { from: from, to: to, axis: axis };\n }", "title": "" }, { "docid": "ad6d190091b8e552707addec59308309", "score": "0.4868397", "text": "function extractRange(ranges, coord) {\n var axis,\n from,\n to,\n key,\n axes = plot.getAxes();\n\n for (var k in axes) {\n axis = axes[k];\n if (axis.direction == coord) {\n key = coord + axis.n + \"axis\";\n if (!ranges[key] && axis.n == 1) key = coord + \"axis\"; // support x1axis as xaxis\n if (ranges[key]) {\n from = ranges[key].from;\n to = ranges[key].to;\n break;\n }\n }\n }\n\n // backwards-compat stuff - to be removed in future\n if (!ranges[key]) {\n axis = coord == \"x\" ? plot.getXAxes()[0] : plot.getYAxes()[0];\n from = ranges[coord + \"1\"];\n to = ranges[coord + \"2\"];\n }\n\n // auto-reverse as an added bonus\n if (from != null && to != null && from > to) {\n var tmp = from;\n from = to;\n to = tmp;\n }\n\n return { from: from, to: to, axis: axis };\n }", "title": "" }, { "docid": "1aee12cb093d36ab450e55b549c4d289", "score": "0.4856552", "text": "aggregation(baseClass, ...mixins) {\n class base extends baseClass {\n constructor(...args) {\n super(...args);\n mixins.forEach((mixin) => {\n copyProps(this, (new mixin));\n });\n }\n }\n\n // this function copies all properties and symbols, filtering out some special ones\n let copyProps = (target, source) => {\n Object.getOwnPropertyNames(source)\n .concat(Object.getOwnPropertySymbols(source))\n .forEach((prop) => {\n if (!prop.match(/^(?:constructor|prototype|arguments|caller|name|bind|call|apply|toString|length)$/))\n Object.defineProperty(target, prop, Object.getOwnPropertyDescriptor(source, prop));\n })\n };\n\n // outside contructor() to allow aggregation(A,B,C).staticFunction() to be called etc.\n mixins.forEach((mixin) => {\n copyProps(base.prototype, mixin.prototype);\n copyProps(base, mixin);\n });\n return base;\n }", "title": "" }, { "docid": "d0a1c7acd61fd537401ca07c9959f30e", "score": "0.48564798", "text": "static AddRange() {}", "title": "" }, { "docid": "574b64963928ccaa74f976910a1dfbcc", "score": "0.48473918", "text": "range() { return Range_1.Range3d.create(this._xyz); }", "title": "" }, { "docid": "c1d2ed4216aec8175b9adb4227425304", "score": "0.48355326", "text": "function intersection(range1, range2) {\n var start1 = _Type__WEBPACK_IMPORTED_MODULE_0__[/* getValue */ \"b\"](range1.start);\n var start2 = _Type__WEBPACK_IMPORTED_MODULE_0__[/* getValue */ \"b\"](range2.start);\n var end1 = _Type__WEBPACK_IMPORTED_MODULE_0__[/* getValue */ \"b\"](range1.end);\n var end2 = _Type__WEBPACK_IMPORTED_MODULE_0__[/* getValue */ \"b\"](range2.end);\n var startMax = Math.max(start1, start2);\n var endMin = Math.min(end1, end2);\n if (endMin < startMax) {\n return undefined;\n }\n else {\n return { start: startMax, end: endMin };\n }\n}", "title": "" }, { "docid": "448a59752aa23b2e19bfdc9817c8587a", "score": "0.48273933", "text": "function Range(from, to) {\n // Store the start and end points (states) of this new onject.\n // These are non inherited properties that are unique to this object.\n this.from = from;\n this.to = to;\n}", "title": "" }, { "docid": "d03483c5edc2834605dd9b58ba6b4178", "score": "0.48229018", "text": "range(arg1: number, arg2 = null, step = 1): Mat {\n var rangeVector = [];\n var start = 0, end = 0;\n if (arg2==null) { start = 0; end = arg1; } // range from 0 to arg1 \n else { start = arg1; end = arg2; } //range from arg1 to arg2\n if (start < end) {\n for (var iterator = start; iterator < end; iterator += step) {\n rangeVector.push(iterator);\n }\n return this.initVec(rangeVector);\n } \n for (var iterator = start; iterator > end; iterator += step) { //else\n rangeVector.push(iterator);\n } return this.initVec(rangeVector);\n }", "title": "" }, { "docid": "1909f2da268909bbc42b8042bb29fc5d", "score": "0.48092902", "text": "range(transform, result) {\n if (result)\n result.setNull();\n const range = result ? result : Range_1.Range3d.createNull();\n this.extendRange(range, transform);\n return range;\n }", "title": "" }, { "docid": "a9fb2698df7c5972b76fd21e72688a60", "score": "0.47942767", "text": "function interpolateRange(rangeMin, rangeMax, cardinality) {\n // always return a signal since it's better to compute the sequence in Vega later\n const f = () => {\n const rMax = signalOrStringValue(rangeMax);\n const rMin = signalOrStringValue(rangeMin);\n const step = `(${rMax} - ${rMin}) / (${cardinality} - 1)`;\n return `sequence(${rMin}, ${rMax} + ${step}, ${step})`;\n };\n if (isSignalRef(rangeMax)) {\n return new SignalRefWrapper(f);\n } else {\n return {\n signal: f()\n };\n }\n }", "title": "" }, { "docid": "756d72eb82fca309ca5854cc42ca90cd", "score": "0.4777257", "text": "function applyMixins(properties) {\n var mixins = properties.__mixins__\n if (type(mixins) != 'array') {\n mixins = [mixins]\n }\n var mixedProperties = {}\n for (var i = 0, l = mixins.length; i < l; i++) {\n mixin(mixedProperties, mixins[i])\n }\n delete properties.__mixins__\n return extend(mixedProperties, properties)\n}", "title": "" }, { "docid": "e76b75f84167247551a02e2ec646c83c", "score": "0.47756836", "text": "mergeRanges(rangeA, rangeB, typeTypeValidator) {\n var _a, _b;\n // Check if one is a subtype of the other (and return the most specific type)\n if (!typeTypeValidator(rangeA, rangeB)) {\n return rangeA;\n }\n if (!typeTypeValidator(rangeB, rangeA)) {\n return rangeB;\n }\n // Check XSD inheritance relationship\n if (this.isXsdSubType(rangeA.term, rangeB.term)) {\n return rangeA;\n }\n if (this.isXsdSubType(rangeB.term, rangeA.term)) {\n return rangeB;\n }\n // If a range is a wildcard, return the other type\n if (rangeA.isA('ParameterRangeWildcard')) {\n return rangeB;\n }\n if (rangeB.isA('ParameterRangeWildcard')) {\n return rangeA;\n }\n // Ranges always match with generic references\n if (rangeA.isA('ParameterRangeGenericTypeReference')) {\n return rangeB;\n }\n if (rangeB.isA('ParameterRangeGenericTypeReference')) {\n return rangeA;\n }\n // Check parameter range types\n if ((_a = rangeA.property.type) === null || _a === void 0 ? void 0 : _a.term.equals((_b = rangeB.property.type) === null || _b === void 0 ? void 0 : _b.term)) {\n // Check sub-value for specific param range cases\n if (rangeA.isA('ParameterRangeArray') ||\n rangeA.isA('ParameterRangeRest') ||\n rangeA.isA('ParameterRangeKeyof')) {\n const valueA = rangeA.property.parameterRangeValue;\n const valueB = rangeB.property.parameterRangeValue;\n const merged = this.mergeRanges(valueA, valueB, typeTypeValidator);\n if (!merged) {\n return;\n }\n return this.objectLoader.createCompactedResource({\n '@type': rangeA.property.type,\n parameterRangeValue: merged,\n });\n }\n // Check sub-values for specific param range cases\n if (rangeA.isA('ParameterRangeUnion') ||\n rangeA.isA('ParameterRangeIntersection') ||\n rangeA.isA('ParameterRangeTuple')) {\n const valuesA = rangeA.properties.parameterRangeElements;\n const valuesB = rangeB.properties.parameterRangeElements;\n if (valuesA.length !== valuesB.length) {\n return;\n }\n const merged = valuesA.map((valueA, i) => this.mergeRanges(valueA, valuesB[i], typeTypeValidator));\n if (merged.some(subValue => !subValue)) {\n return;\n }\n return this.objectLoader.createCompactedResource({\n '@type': rangeA.property.type,\n parameterRangeElements: merged,\n });\n }\n // Check sub-values for generic components\n if (rangeA.isA('ParameterRangeGenericComponent')) {\n const mergedComponent = this.mergeRanges(rangeA.property.component, rangeB.property.component, typeTypeValidator);\n if (!mergedComponent) {\n return;\n }\n const valuesA = rangeA.properties.genericTypeInstances;\n const valuesB = rangeB.properties.genericTypeInstances;\n if (valuesA.length !== valuesB.length) {\n return;\n }\n const merged = valuesA.map((valueA, i) => this.mergeRanges(valueA, valuesB[i], typeTypeValidator));\n if (merged.some(subValue => !subValue)) {\n return;\n }\n return this.objectLoader.createCompactedResource({\n '@type': 'ParameterRangeGenericComponent',\n component: mergedComponent,\n genericTypeInstances: merged,\n });\n }\n return rangeA;\n }\n // Handle left or right being a union\n if (rangeA.isA('ParameterRangeUnion')) {\n return this.mergeUnion(rangeA, rangeB, typeTypeValidator);\n }\n if (rangeB.isA('ParameterRangeUnion')) {\n return this.mergeUnion(rangeB, rangeA, typeTypeValidator);\n }\n // Check if the range refers to a component with a generic type\n // TODO: somehow pass the range's component and genericTypeInstances (like in ParameterPropertyHandlerRange)?\n if (rangeA.isA('ParameterRangeGenericComponent')) {\n return this.mergeRanges(rangeA.property.component, rangeB, typeTypeValidator);\n }\n if (rangeB.isA('ParameterRangeGenericComponent')) {\n return this.mergeRanges(rangeB.property.component, rangeA, typeTypeValidator);\n }\n }", "title": "" }, { "docid": "e8750b5dcd56a5fc738c2d4a33e6d55a", "score": "0.47733384", "text": "function multirange(data) {\n return new MultiRange(data);\n}", "title": "" }, { "docid": "75b763fbcf0090ac42f4b770bb5b9d9a", "score": "0.47707793", "text": "function getRangeFacetObject(key, start, end) {\n return {\n key: key,\n values: getQueryObjectValues(start, end),\n transformer: 'fq:range'\n };\n }", "title": "" }, { "docid": "707fbbb4a594c547104850055e4e4441", "score": "0.47701687", "text": "function range(start,end){\n if (start === end){\n return [start];\n }\n \n return [start].concat(range(start + 1, end));\n}", "title": "" }, { "docid": "01c491a8b50a1e3c6e90969eb215e6d7", "score": "0.47689933", "text": "clip(range) {\n const newMin = Math.max(this.min, range.min);\n const newMax = Math.min(this.max, range.max);\n return new NumberRange(newMin, newMax);\n }", "title": "" }, { "docid": "032d6088e5979c165f1d728321ca27c1", "score": "0.47565266", "text": "static get mixins() {\n return [DateTimeFieldMixin];\n }", "title": "" }, { "docid": "a52a32a0534407f7536d990b99127cb6", "score": "0.47506696", "text": "get exampleRange() {\n\t\treturn this.__exampleRange;\n\t}", "title": "" }, { "docid": "e5f0778ad95fffcf8ee9e54662f2d13f", "score": "0.4750338", "text": "function test() {\n\tlet range;\n\n\t// Single range\n\trange = combineRanges(\n\t\t[{ start: 1, end: 10, value: true }],\n\t\t[]\n\t);\n\tconsole.log(range); \n\n\t// Empty param\n\trange = combineRanges(range, null);\n\tconsole.log(range);\n\n\t// No intersection with same values \n\trange = combineRanges(\n\t\t[{ start: -Infinity, end: 1, value: true }],\n\t\t[{ start: 10, end: Infinity, value: true }]\n\t);\n\tconsole.log(range); \n\n\t// No intersection with different values\n\trange = combineRanges(\n\t\t[{ start: -Infinity, end: 1, value: true }],\n\t\t[{ start: 20, end: Infinity, value: false }]\n\t);\n\tconsole.log(range);\n\n\t// Add more non intersection ranges\n\trange = combineRanges(range, [{ start: 5, end: 8, value: false }]);\n\tconsole.log(range);\n\n\t// Intersection right with value change\n\trange = combineRanges(range, [{ start: 7, end: 12, value: true }]);\n\tconsole.log(range);\n\n\t// Intersection right without value change\n\trange = combineRanges(range, [{ start: 0, end: 2, value: true }]);\n\tconsole.log(range);\n\n\t// Intersection left with value change\n\trange = combineRanges(range, [{ start: 3, end: 6, value: true }]);\n\tconsole.log(range);\n\n\t// Intersection left without value change\n\trange = combineRanges(range, [{ start: 15, end: 25, value: false }]);\n\tconsole.log(range);\n\t\n\t// Test case\n\trange = combineRanges(\n\t\t[{ start: -Infinity, end: 4, value: true }, { start: 4, end: 9, value: false }, { start: 9, end: Infinity, value: true }],\n\t\t[{ start: -Infinity, end: 6, value: true }, { start: 6, end: Infinity, value: false }]\n\t);\n\tconsole.log(range);\n}", "title": "" }, { "docid": "3066004b38e595c10e8a269d2c70e873", "score": "0.4748975", "text": "function interpolateRange(rangeMin, rangeMax, cardinality) {\n // always return a signal since it's better to compute the sequence in Vega later\n const f = () => {\n const rMax = (0, _common.signalOrStringValue)(rangeMax);\n const rMin = (0, _common.signalOrStringValue)(rangeMin);\n const step = `(${rMax} - ${rMin}) / (${cardinality} - 1)`;\n return `sequence(${rMin}, ${rMax} + ${step}, ${step})`;\n };\n\n if ((0, _vega.isSignalRef)(rangeMax)) {\n return new _signal.SignalRefWrapper(f);\n } else {\n return {\n signal: f()\n };\n }\n}", "title": "" }, { "docid": "bbb13153bf94fcfe05697e9ae8de6ad8", "score": "0.47465515", "text": "function range(writer, start, end) {\n start = Math.floor(start);\n end = Math.floor(end);\n var increment = end > start ? 1 : -1;\n return bless(rangeInstance, 'gen');\n \n function rangeInstance() {\n if ( start === stopIteration ) {\n return stopIteration;\n }\n var result = start;\n if ( start === end ) {\n start = stopIteration;\n }\n else {\n start += increment;\n }\n return result;\n }\n}", "title": "" }, { "docid": "f40ed9f526a650bb8cf1756a2480ac78", "score": "0.47455475", "text": "get rangePicker() { return this._rangePicker; }", "title": "" }, { "docid": "f40ed9f526a650bb8cf1756a2480ac78", "score": "0.47455475", "text": "get rangePicker() { return this._rangePicker; }", "title": "" }, { "docid": "e663b80b60c2101df1756e1f0eeff491", "score": "0.4719793", "text": "function range() {\n var args = [], len = arguments.length;\n while (len--) args[len] = arguments[len];\n var options;\n if (isObj(args[args.length - 1])) {\n var arg = args.pop();\n // detect if that was a rect object\n if (!args.length && (arg.x != null || arg.l != null || arg.left != null)) {\n args = [arg];\n options = {};\n }\n options = pick(arg, {\n level: 'level maxLevel',\n d: 'd diam diameter r radius px pxSize pixel pixelSize maxD size minSize',\n lod: 'lod details ranges offsets'\n });\n } else {\n options = {};\n }\n if (!args.length) {\n args = bounds;\n }\n var box = rect.apply(void 0, args);\n var ref = [Math.min(box.x, box.x + box.width), Math.min(box.y, box.y + box.height), Math.max(box.x, box.x + box.width), Math.max(box.y, box.y + box.height)];\n var minX = ref[0];\n var minY = ref[1];\n var maxX = ref[2];\n var maxY = ref[3];\n var ref$1 = normalize([minX, minY, maxX, maxY], bounds);\n var nminX = ref$1[0];\n var nminY = ref$1[1];\n var nmaxX = ref$1[2];\n var nmaxY = ref$1[3];\n var maxLevel = defined(options.level, levels.length);\n // limit maxLevel by px size\n if (options.d != null) {\n var d;\n if (typeof options.d === 'number') {\n d = [options.d, options.d];\n } else if (options.d.length) {\n d = options.d;\n }\n maxLevel = Math.min(Math.max(Math.ceil(-log2(Math.abs(d[0]) / (bounds[2] - bounds[0]))), Math.ceil(-log2(Math.abs(d[1]) / (bounds[3] - bounds[1])))), maxLevel);\n }\n maxLevel = Math.min(maxLevel, levels.length);\n // return levels of details\n if (options.lod) {\n return lod(nminX, nminY, nmaxX, nmaxY, maxLevel);\n }\n // do selection ids\n var selection = [];\n // FIXME: probably we can do LOD here beforehead\n select(0, 0, 1, 0, 0, 1);\n function select(lox, loy, d, level, from, to) {\n if (from === null || to === null) {\n return;\n }\n var hix = lox + d;\n var hiy = loy + d;\n // if box does not intersect level - ignore\n if (nminX > hix || nminY > hiy || nmaxX < lox || nmaxY < loy) {\n return;\n }\n if (level >= maxLevel) {\n return;\n }\n if (from === to) {\n return;\n }\n // if points fall into box range - take it\n var levelItems = levels[level];\n if (to === undefined) {\n to = levelItems.length;\n }\n for (var i = from; i < to; i++) {\n var id = levelItems[i];\n var px = srcPoints[id * 2];\n var py = srcPoints[id * 2 + 1];\n if (px >= minX && px <= maxX && py >= minY && py <= maxY) {\n selection.push(id);\n }\n }\n // for every subsection do select\n var offsets = sublevels[level];\n var off0 = offsets[from * 4 + 0];\n var off1 = offsets[from * 4 + 1];\n var off2 = offsets[from * 4 + 2];\n var off3 = offsets[from * 4 + 3];\n var end = nextOffset(offsets, from + 1);\n var d2 = d * .5;\n var nextLevel = level + 1;\n select(lox, loy, d2, nextLevel, off0, off1 || off2 || off3 || end);\n select(lox, loy + d2, d2, nextLevel, off1, off2 || off3 || end);\n select(lox + d2, loy, d2, nextLevel, off2, off3 || end);\n select(lox + d2, loy + d2, d2, nextLevel, off3, end);\n }\n function nextOffset(offsets, from) {\n var offset = null, i = 0;\n while (offset === null) {\n offset = offsets[from * 4 + i];\n i++;\n if (i > offsets.length) {\n return null;\n }\n }\n return offset;\n }\n return selection;\n }", "title": "" }, { "docid": "21f8b088f0dc13068cdcc19bd7a8ad90", "score": "0.4710819", "text": "function MultiRange(data) {\n function isArray(x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n }\n this.ranges = [];\n if (typeof data === 'string') {\n this.parseString(data);\n }\n else if (typeof data === 'number') {\n this.appendRange(data, data);\n }\n else if (data instanceof MultiRange) {\n this.ranges = data.getRanges();\n }\n else if (isArray(data)) {\n for (var _i = 0, _a = data; _i < _a.length; _i++) {\n var item = _a[_i];\n if (isArray(item)) {\n if (item.length === 2) {\n this.appendRange(item[0], item[1]);\n }\n else {\n throw new TypeError('Invalid array initializer');\n }\n }\n else if (typeof item === 'number') {\n this.append(item);\n }\n else {\n throw new TypeError('Invalid array initialzer');\n }\n }\n }\n else if (data !== undefined) {\n throw new TypeError('Invalid input');\n }\n }", "title": "" }, { "docid": "b4ed9e430d9ea9e4bc64a29c17ad6576", "score": "0.47085997", "text": "setRange(min, max) {\n this.min = min;\n this.max = max;\n }", "title": "" }, { "docid": "357382241ce8ab81dbfa4b7c2a983357", "score": "0.4705378", "text": "function get_markup_div_for_range(range){\n return $('.line' + range.line.toString() + ' > .markup');\n}", "title": "" }, { "docid": "187a4b019fd509115adc39362af57735", "score": "0.46994302", "text": "cssMixinTemplate() {\n return html`\n ${this.mixinDynamicParams.map((param) => {\n const fullMixinParams = [...this.mixinParams];\n fullMixinParams.splice(this.mixinDynamicParamIndex, 0, param);\n const cssOutput = this.mixin.apply(null, fullMixinParams);\n return html`\n <div class=\"item\">${this.tokenTemplate(cssOutput, { param })}</div>\n `;\n })}\n `;\n }", "title": "" }, { "docid": "9ca194eeb74d264b2760b7ac2807ed17", "score": "0.4697703", "text": "get minValueRange() {\n\t\treturn this.__minValueRange;\n\t}", "title": "" }, { "docid": "f89b52f85eda5473407bef7c1e8e59c6", "score": "0.46964532", "text": "function range(start, end) {\n if (start === end) {\n return [start];\n }\n return [start].concat(range(start + 1, end));\n}", "title": "" }, { "docid": "7558da05bfa87060a6e5b2c7a8c201ba", "score": "0.46959174", "text": "function parseRange(range) {\n var rangeObj = {};\n\n ((rangeObj.semver = range.startsWith('^')) ||\n (rangeObj.fuzzy = range.startsWith('~'))\n ) && (range = range.substr(1)); // jshint ignore:line\n\n var rangeVersion = rangeObj.version = parseSemver(range);\n\n if (rangeVersion.tag)\n return rangeObj;\n\n // 0, 0.1 behave like ~0, ~0.1\n if (!rangeObj.fuzzy && !rangeObj.semver && (isNaN(rangeVersion.minor) || isNaN(rangeVersion.patch)))\n rangeObj.fuzzy = true;\n\n // ~1, ~0 behave like ^1, ^0\n if (rangeObj.fuzzy && isNaN(rangeVersion.minor)) {\n rangeObj.semver = true;\n rangeObj.fuzzy = false;\n }\n\n // ^0.0 behaves like ~0.0\n if (rangeObj.semver && rangeObj.major === 0 && !isNaN(rangeVersion.minor) && isNaN(rangeVersion.patch)) {\n rangeObj.semver = false;\n rangeObj.fuzzy = true;\n }\n\n return rangeObj;\n}", "title": "" }, { "docid": "7871bbf6de3c7c50e926a3f3bfcfcf5d", "score": "0.46924615", "text": "static createInImportMappingCallUnderRange(container) {\n return internal.instancehelpers.createElement(container, CustomRange, \"range\", false);\n }", "title": "" }, { "docid": "e1e29fe446b1cd91c6026e44b1c82b39", "score": "0.4692374", "text": "function range(start, end) {\n //your code goes here...\n \n }", "title": "" }, { "docid": "7875479f0f77d8fee19cad5be65cf31a", "score": "0.46872807", "text": "render({ foo, whales }) {\n return html`\n <style>\n :host {\n display: block;\n }\n \n [type='range'],\n [type='range']::-webkit-slider-thumb {\n -webkit-appearance: none;\n }\n \n [type='range'] {\n --range: calc(var(--max) - var(--min));\n --ratio: calc((var(--val) - var(--min))/var(--range));\n --sx: calc(0.5*var(--thumb-diameter, 1.5em) + var(--ratio)*(100% - var(--thumb-diameter, 1.5em)));\n margin: 0;\n padding: 0;\n width: var(--track-width, 12.5em);\n height: var(--thumb-diameter, 1.5em);\n background: transparent;\n font: 1em/1 arial, sans-serif;\n }\n \n [type='range']::-webkit-slider-runnable-track {\n box-sizing: border-box;\n border: none;\n width: var(--track-width, 12.5em);\n height: var(--track-height, 0.25em);\n background: var(--track-color, #ccc);\n background: linear-gradient(var(--fill-color, #95a), var(--fill-color, #95a)) 0/ var(--sx) 100% no-repeat var(--track-color, #ccc);\n }\n \n [type='range']::-moz-range-track {\n box-sizing: border-box;\n border: none;\n width: var(--track-width, 12.5em);\n height: var(--track-height, 0.25em);\n background: var(--track-color, #ccc);\n }\n \n [type='range']::-ms-track {\n box-sizing: border-box;\n border: none;\n width: var(--track-width, 12.5em);\n height: var(--track-height, 0.25em);\n background: var(--track-color, #ccc);\n }\n \n [type='range']::-moz-range-progress {\n height: var(--track-height, 0.25em);\n background: var(--fill-color, #95a);\n }\n \n [type='range']::-ms-fill-lower {\n height: var(--track-height, 0.25em);\n background: var(--fill-color, #95a);\n }\n \n [type='range']::-webkit-slider-thumb {\n margin-top: calc(.5*(var(--track-height, 0.25em) - var(--thumb-diameter, 1.5em)));\n \n box-sizing: border-box;\n border: none;\n width: var(--thumb-diameter, 1.5em);\n height: var(--thumb-diameter, 1.5em);\n border-radius: 50%;\n background: var(--thumb-color, #f90);\n }\n \n [type='range']::-moz-range-thumb {\n box-sizing: border-box;\n border: none;\n width: var(--thumb-diameter, 1.5em);\n height: var(--thumb-diameter, 1.5em);\n border-radius: 50%;\n background: var(--thumb-color, #f90);\n }\n \n [type='range']::-ms-thumb {\n margin-top: 0;\n \n box-sizing: border-box;\n border: none;\n width: var(--thumb-diameter, 1.5em);\n height: var(--thumb-diameter, 1.5em);\n border-radius: 50%;\n background: var(--thumb-color, #f90);\n }\n \n [type='range']::-ms-tooltip {\n display: none\n }\n </style>\n <input\n type=\"range\"\n min$=${this.min}\n max$=${this.max}\n value$=${this.value}\n style=\"--min:${this.min};--max:${this.max};--val:${this.value};--thumb-diameter:${this.thumbDiameter};--track-height:${this.height};--track-width:${this.width};--fill-color:${this.trackFillColor};--track-color:${this.trackColor};--thumb-color:${this.thumbColor};\"\n on-input=${e => {\n this.value = e.target.valueAsNumber\n e.target.style.setProperty('--val', e.target.value)\n this.dispatchEvent(createEvent('value', e.target.valueAsNumber))\n }}\n on-change=${e => {\n this.dispatchEvent(createEvent('change', e.target.valueAsNumber))\n }}>\n `;\n }", "title": "" }, { "docid": "d7bc976a6fba2f29c72d7a33c773e51e", "score": "0.46852434", "text": "function InputRange(){}", "title": "" }, { "docid": "d7bc976a6fba2f29c72d7a33c773e51e", "score": "0.46852434", "text": "function InputRange(){}", "title": "" } ]
a0b5af7d53799d80fa11443e6670a818
Show PC total and winLose label
[ { "docid": "26e637787dc468d7e92b6dc0f9ada3a9", "score": "0.0", "text": "function endGame(message){\n let winLose = document.getElementById(\"lblWinLose\");\n let pcLabel = document.getElementById(\"lblPC\");\n\n flipCard();\n\n pcLabel.hidden = false;\n winLose.innerHTML = message;\n winLose.hidden = false;\n toggleButton(\"btnHit\", false);\n toggleButton(\"btnStand\", false);\n toggleButton(\"btnNewGame\", true);\n}", "title": "" } ]
[ { "docid": "4388cc6029faa924f6e227abc0f0a03d", "score": "0.66395015", "text": "function drawCopsRemainingText() {\r\n /*document.getElementById(\"Trucks\").innerText = (numCops * numberOfLanes).toString(10);*/\r\n document.getElementById(\"Trucks\").innerText = score + \"\";\r\n }", "title": "" }, { "docid": "3f7efbeaa82088e2eeeb3b7217b4e935", "score": "0.6539489", "text": "function displayWinCount() {\n\tvar winCountLabel = document.getElementById(\"wincount\");\n\twinCountLabel.innerHTML = winCount;\n}", "title": "" }, { "docid": "cc36899282c45ed4fe7b44e2ddb2ba85", "score": "0.624676", "text": "function showPlayerStats() {\n winRatio = winNumber / turn;\n jackpotLabel.text = jackpot.toString();\n playerCreditLabel.text = playerMoney.toString();\n playerBetLabel.text = playerBet.toString();\n}", "title": "" }, { "docid": "f8d0a5cfa06e68cc4944bef9cb86e0b5", "score": "0.60745996", "text": "function countersTotal() {\n countTotal += 1;\n labelTotal.innerHTML = \"Total: \" + countTotal;\n}", "title": "" }, { "docid": "a60f1429398e5bad694b1812d8ab814b", "score": "0.60366416", "text": "function result() {\n if ( total === computerScore) {\n wins++;\n $('#game-text').text('You Win!');\n $('#wins-text').text('Wins: ' + wins);\n \n secondReset();\n } else if ( total > computerScore) {\n loss++;\n $('#game-text').text('You Lose!');\n $('#loss-text').text('Loss: ' + loss);\n \n secondReset();\n }\n}", "title": "" }, { "docid": "18a8b91d2387da0d00febab0423772dc", "score": "0.5983165", "text": "function showWinMessage() {\n playerMoney += winnings;\n spinResultLabel.text = winnings.toString();\n resultLabel.text = \"You Win\";\n resetFruitTally();\n checkJackPot();\n}", "title": "" }, { "docid": "0c6d68aee61222b5d2eca0049ead5d46", "score": "0.5982794", "text": "function showLossMessage() {\n TotalCredits -= Bet;\n TotalCreditsLabel.text = TotalCredits.toString();\n resetFruitTally();\n Jackpot += Bet;\n JackPotLabel.text = Jackpot.toString();\n WinnerPaidLabel.text = \"0\";\n}", "title": "" }, { "docid": "3e3fa1d66cd74d9de67aec26cc467e75", "score": "0.5958753", "text": "promoCodeTotal(){\n if( this.promoCode == true){\n this.promoCuponTotal = this.promoCuponTotal - this.promoCuponTotal*(.10);\n this.inform(`El total de la compra con cupon de descuento es :: ${this.CuponTotal}.`);\n }\n else{\n this.inform('No tiene cupon de descuento.')\n }\n }", "title": "" }, { "docid": "ec5dd325c26af79662ad1247d7bbb438", "score": "0.59160155", "text": "function handTotals() {\n p1HandHTML.innerHTML = `<p></p>`;\n cpuHandHTML.innerHTML = `<p></p>`;\n\n // resetting scores so we can calculate hand with newly drawn card.\n p1Score = 0;\n cpuScore = 0;\n\n // going through each card and adding their value to the total score of the player\n for (let i = 0; i < playerHand.length; i++) {\n if (playerHand[i].Value === 'K') {\n let card = 10;\n p1Score += card;\n } else if (playerHand[i].Value === 'Q') {\n let card = 10;\n p1Score += card;\n } else if (playerHand[i].Value === 'J') {\n let card = 10;\n p1Score += card;\n } else if (playerHand[i].Value === 'A') {\n let card = 11;\n p1Score += card;\n } else {\n let card = parseInt(playerHand[i].Value);\n p1Score += card;\n }\n\n p1HandHTML.innerHTML += `<p> ${playerHand[i].Value}</p>`;\n }\n\n // going through each card and adding their value to the total score of the computer\n for (let i = 0; i < cpuHand.length; i++) {\n if (cpuHand[i].Value === 'K') {\n let card = 10;\n cpuScore += card;\n } else if (cpuHand[i].Value === 'Q') {\n let card = 10;\n cpuScore += card;\n } else if (cpuHand[i].Value === 'J') {\n let card = 10;\n cpuScore += card;\n } else if (cpuHand[i].Value === 'A') {\n let card = 11;\n cpuScore += card;\n } else {\n let card = parseInt(cpuHand[i].Value);\n cpuScore += card;\n }\n cpuHandHTML.innerHTML += `<p> ${cpuHand[i].Value}</p>`;\n }\n\n // displaying our total score in the gui\n p1HTML.innerHTML = `<h4> Total: </h4> ${p1Score}`;\n cpuHTML.innerHTML = `<h4> Total: </h4> ${cpuScore}`;\n}", "title": "" }, { "docid": "3c73944ac5ed6d668e921a33cd3992db", "score": "0.5915467", "text": "function setCounters(total, high, medium, low) {\n \t$('#clientsRemaining').html(total);\n \t$('#highPriorityCount').html(high);\n \t$('#mediumPriorityCount').html(medium);\n \t$('#lowPriorityCount').html(low);\n }", "title": "" }, { "docid": "e22f039ba66ea38a504cc191e20781d7", "score": "0.59033245", "text": "function winsAndLosses() {\n if (yourNumberValue === targetNumberValue) {\n wins++;\n $(\"#winsDisplay\").text(wins);\n alert(\"You Win!!\");\n reset(); \n }\n\n else if (yourNumberValue > targetNumberValue) {\n losses++;\n $(\"#lossesDisplay\").text(losses);\n alert(\"You Lose!!\");\n reset();\n }\n }", "title": "" }, { "docid": "0ace1b01f01bfa8a7688674ac763814c", "score": "0.5887536", "text": "function showWinMessage() {\n TotalCredits += winnings;\n TotalCreditsLabel.text = TotalCredits.toString();\n WinnerPaid = winnings;\n WinnerPaidLabel.text = WinnerPaid.toString();\n resetFruitTally();\n createjs.Sound.play('win');\n checkJackPot();\n}", "title": "" }, { "docid": "9ba9ff5860e7b2739808ce2f137545a0", "score": "0.58633316", "text": "function compWin(playerSelection, computerSelection) {\r\n roundWinnerDiv.textContent = `You loose, ${computerSelection} beats ${playerSelection}!`\r\n computerScore++\r\n compScoreSpan.textContent = computerScore;\r\n}", "title": "" }, { "docid": "3a9b3e2c958ec7fb35f4143e21e61927", "score": "0.5860984", "text": "displayStats() {\n let wpm = Game.calculatedStats[0];\n let time = Game.calculatedStats[1];\n gameWPM.textContent = wpm.toString();\n gameAccuracy.textContent = time.toString();\n }", "title": "" }, { "docid": "c35e45c31acb2071449152322ce592e0", "score": "0.583965", "text": "function showPlayerStats() {\n winRatio = winNumber / turn;\n $(\"#jackpot\").text(\"Jackpot: \" + jackpot);\n $(\"#playerMoney\").text(\"Player Money: \" + playerMoney);\n $(\"#playerTurn\").text(\"Turn: \" + turn);\n $(\"#playerWins\").text(\"Wins: \" + winNumber);\n $(\"#playerLosses\").text(\"Losses: \" + lossNumber);\n $(\"#playerWinRatio\").text(\"Win Ratio: \" + (winRatio * 100).toFixed(2) + \"%\");\n}", "title": "" }, { "docid": "c35e45c31acb2071449152322ce592e0", "score": "0.583965", "text": "function showPlayerStats() {\n winRatio = winNumber / turn;\n $(\"#jackpot\").text(\"Jackpot: \" + jackpot);\n $(\"#playerMoney\").text(\"Player Money: \" + playerMoney);\n $(\"#playerTurn\").text(\"Turn: \" + turn);\n $(\"#playerWins\").text(\"Wins: \" + winNumber);\n $(\"#playerLosses\").text(\"Losses: \" + lossNumber);\n $(\"#playerWinRatio\").text(\"Win Ratio: \" + (winRatio * 100).toFixed(2) + \"%\");\n}", "title": "" }, { "docid": "dd9d878a2ca1596c187e303782b44013", "score": "0.58275247", "text": "function displayWin () {\n nudges = 0;\n displays[0].innerText = nudges;\n displays[3].style.background = \"gold\";\n displays[3].innerText = \"WINNER! You won \" + win + \" credits!!\";\n}", "title": "" }, { "docid": "83b8db4c145051b5246e0da65656a477", "score": "0.5794117", "text": "function win(){\n\n\t\tdocument.getElementById('LeftDiv').style.display = 'none';\n\t\tdocument.getElementById('rightDiv').style.display = 'none';\n\t\tstartDiv.style.display = \"block\";\n\t\tresultDiv.style.display = \"block\";\n\t\tdocument.querySelector(\"#resultDiv span\").textContent = \"Təbriklər! siz qazandız! məbləq \"; \n\t\tdocument.querySelector(\"#resultDiv label\").textContent = bonuses[bonus].innerHTML + \" AZN\"; // if user win we are show him money\n\n}", "title": "" }, { "docid": "ce8da02fc7325d2fa81a8728f81e9e59", "score": "0.57866323", "text": "function updateTotal(winner) {\n if(winner === 'X') {\n $('.scoreX').text(++scoreX)\n }\n else if (winner === 'O') {\n $('.scoreO').text(++scoreO)\n }\n else {\n $('.draws').text(++draws)\n }\n \n}", "title": "" }, { "docid": "3e301baeebf42f0982e6e92e6a42f38b", "score": "0.5783273", "text": "function showStatistics() {\n document.getElementById(\"badPoses\").innerHTML = lS_badPosesCounter;\n document.getElementById(\"goodPoses\").innerHTML = lS_goodPosesCounter;\n document.getElementById(\"amountBreaks\").innerHTML = lS_pauseTakenCounter;\n document.getElementById(\"timeWorked\").innerHTML = lS_diffHrs + \"h : \" + lS_diffMins + \"m\"; \n}", "title": "" }, { "docid": "dc97961789c55123243a1b1160346549", "score": "0.57830894", "text": "function showPlayerCount(){\n\tplayerTotal.innerHTML = playercount;\n}", "title": "" }, { "docid": "2e8217f117b87a23b73183d4c0dfae43", "score": "0.5777733", "text": "function showPlayerStats()\n{\n winRatio = winNumber / turn;\n $(\"#jackpot\").text(\"Jackpot: \" + jackpot);\n $(\"#playerMoney\").text(\"Player Money: \" + playerMoney);\n $(\"#playerTurn\").text(\"Turn: \" + turn);\n $(\"#playerWins\").text(\"Wins: \" + winNumber);\n $(\"#playerLosses\").text(\"Losses: \" + lossNumber);\n $(\"#playerWinRatio\").text(\"Win Ratio: \" + (winRatio * 100).toFixed(2) + \"%\");\n}", "title": "" }, { "docid": "9a2e3e23f671e91ede4f334cf912b9b8", "score": "0.57475835", "text": "function printResult() {\n $(\"#totalScore\").text(totalScore);\n $(\"#win\").text(winCount);\n $(\"#loss\").text(lossCount);\n }", "title": "" }, { "docid": "bf53f6d1308526fee0b5cc4405b23c3d", "score": "0.57287323", "text": "function showinitialvalues () {\n $(\"#totalscore\").text(crystaltotal);\n $(\"#Wins\").text(wins);\n $(\"#Losses\").text(losses);\n\n \n}", "title": "" }, { "docid": "d9d95c9971f426395f61aa7559dfeb39", "score": "0.5724313", "text": "function addPoints(winner) {\n if (winner == \"computer\") {\n compScore++;\n console.log({compScore})\n compPoints.innerText = compScore;\n notice.innerText = \"Computer +1 point\";\n } else if (winner == \"player\") {\n playerScore++;\n console.log({playerScore});\n playerPoints.innerText = playerScore;\n notice.innerText = \"Player +1 point\";\n }\n}", "title": "" }, { "docid": "112b03c42cba2d5584dd5dfc98cb1ee3", "score": "0.5722858", "text": "function outputAccumulators()\r\n{\r\n document.write(\"Total Underweight: \" + totalUnderweight +\r\n \"<br>\" + \"Total Overweight: \" + totalOverweight + \"<br>\" +\r\n \"Total Optimal Weight: \" + totalOptimalweight + \"<br>\" +\r\n \"Total Obese: \" + totalObese);\r\n}", "title": "" }, { "docid": "6b747e59a9b30ff58a058200c23d054a", "score": "0.57206786", "text": "printStats() {\n console.log('\\n*******************************\\n');\n console.log(` Win/Loss: ${this.wins}/${this.loses}\\n`);\n if (this.fastest > 0){\n console.log(`Your fastest win was in ${this.fastest} moves\\n`);\n }\n console.log(' Thanks for playing!\\n');\n console.log('\\n*******************************\\n');\n }", "title": "" }, { "docid": "597a2b67576eee61c1ff3e8c56501c8e", "score": "0.5711433", "text": "function updateStatDisplay () {\n $playerValue.text(currentPlayer);\n $clicksValue.text(clickCount);\n $roundValue.text(roundCount);\n }", "title": "" }, { "docid": "76b734c4832b43f6aa4c520f499cd6da", "score": "0.57089573", "text": "function showWinMessage() {\n playerMoney += winnings;\n $(\"div#winOrLose>p\").text(\"You Won: $\" + winnings);\n resetFruitTally();\n checkJackPot();\n}", "title": "" }, { "docid": "76b734c4832b43f6aa4c520f499cd6da", "score": "0.57089573", "text": "function showWinMessage() {\n playerMoney += winnings;\n $(\"div#winOrLose>p\").text(\"You Won: $\" + winnings);\n resetFruitTally();\n checkJackPot();\n}", "title": "" }, { "docid": "088c77fff3d0e603f7b503e2ebe9c7ca", "score": "0.57017136", "text": "function crystal1Clicked(){\n totalScore += crystalValues[0];\n console.log(totalScore);\n $('#total-score').text(totalScore);\n if (totalScore === goalNumber){\n wins++;\n $('#wins').text(\"Wins: \" + wins);\n restartGame();\n }\n if (totalScore > goalNumber){\n losses++;\n $('#losses').text(\"Losses: \" + losses);\n restartGame();\n }\n\n}", "title": "" }, { "docid": "c27d41ddf3ce13624202ea1a12ab832b", "score": "0.56985724", "text": "function winWin(){\n $('#alert').html('<h3>\"Winner!\"</h3>')\n wins++;\n $('#winCount').text(wins);\n reset();\n }", "title": "" }, { "docid": "941885015dfbc6ce69b1c99560be9b30", "score": "0.5688173", "text": "function updateWinText() {\n winText.innerHTML = \"Win: \" + winCount;\n}", "title": "" }, { "docid": "e9bc1bf5efd6847f88ab1b926c2c438c", "score": "0.56872046", "text": "function counterDisplay() {\n $(\"#round\").html(\"Round = \" + roundCounter);\n $(\"#counter\").html(\" &nbsp;&nbsp; Player Score = \" + playerScore + \" &nbsp;&nbsp;Computer Score = \" + computerScore);\n\n}", "title": "" }, { "docid": "b413c6ad30534a25803f33ce3952e055", "score": "0.56792027", "text": "function showWins() {\n document.getElementById(\"numWins\").innerHTML = wins;\n}", "title": "" }, { "docid": "c218b76f664550bc54c373d9746ab71e", "score": "0.5671553", "text": "function addTotal(){\n\t\t$('#userTotal').text(userTotal); \n\t\t\tif (userTotal === Target){\n\t\t\t\twinner();\n\t\t\t}\n\t\t\telse if (userTotal > Target){\n\t\t\t\tloser();\n\t\t\t}\n\n\t\t//testing\n\t\tconsole.log(\"New userTotal= \" + userTotal);\n\t}", "title": "" }, { "docid": "57b08d90caf6bf8ef486157a86beb46f", "score": "0.5668877", "text": "function checkTotal(val) {\n totalScore += val;\n $(\"#tscore\").html(totalScore);\n if (totalScore === random_num) {\n \tconsole.log(\"You Won\");\n \twinCounter++;\n \t$(\"#tscoreWin\").html(winCounter);\n \t$(\"#mesg\").html('You Won!');\n \tresetGame();\n }\n else if (totalScore > random_num) {\n console.log(\"You Lost\");\n lossCounter++;\n $(\"#tscoreLost\").html(lossCounter);\n $(\"#mesg\").html('You Lost!');\n resetGame();\n }\n}", "title": "" }, { "docid": "1787c3dd32bda71ce112715c90f0b596", "score": "0.5668569", "text": "function score (){\r\n let playerScore = 0;\r\n computerScore = 0;\r\n totalPlayerScore = playerScore + playerScore0;\r\n totalComputerScore = computerScore + computerScore0;\r\n document.getElementById(\"playerScore\").innerHTML = \"Your score: \"+totalPlayerScore;\r\n document.getElementById(\"computerScore\").innerHTML = \"Opponent's score: \"+totalComputerScore;\r\n }", "title": "" }, { "docid": "62adf5fe258f8d95346b163861fe15a3", "score": "0.56677604", "text": "function showTotalPriceWithPromo() {\n if(promoCode == true) {\n const totalPrice = updateTotalCost();\n const afterPromoCost = totalPrice * 0.2;\n setValue('total-cost', totalPrice - afterPromoCost);\n }\n}", "title": "" }, { "docid": "c204e4a2f5933ca3f06b534ae9220901", "score": "0.566725", "text": "function win(){\n wins++;\n $('#total-wins').text(wins);\n restart();\n }", "title": "" }, { "docid": "fd86692c4e11dfa9a564c70924042aa1", "score": "0.5666593", "text": "function updateLosses(player, total){\n\t$(\"#player\"+player+\" #losses #loss-totals\").html(total);\n}", "title": "" }, { "docid": "21a0be547109d139b9b9e666dde6b338", "score": "0.5663603", "text": "function determineWinnings() {\n if (blanks == 0) {\n if (hulk == 3) {\n win = playerBet * 10;\n playerMoneyAmount += win;\n }\n else if (spiderman == 3) {\n win = playerBet * 20;\n playerMoneyAmount += win;\n }\n else if (ironman == 3) {\n win = playerBet * 30;\n playerMoneyAmount += win;\n }\n else if (superman == 3) {\n win = playerBet * 40;\n playerMoneyAmount += win;\n }\n else if (thor == 3) {\n win = playerBet * 50;\n playerMoneyAmount += win;\n }\n else if (thanos == 3) {\n win = playerBet * 75;\n playerMoneyAmount += win;\n }\n else if (batman == 3) {\n win = playerBet * 100;\n playerMoneyAmount += win;\n }\n else if (hulk == 2) {\n win = playerBet * 2;\n playerMoneyAmount += win;\n }\n else if (spiderman == 2) {\n win = playerBet * 2;\n playerMoneyAmount += win;\n }\n else if (ironman == 2) {\n win = playerBet * 3;\n playerMoneyAmount += win;\n }\n else if (superman == 2) {\n win = playerBet * 4;\n playerMoneyAmount += win;\n }\n else if (thor == 2) {\n win = playerBet * 5;\n playerMoneyAmount += win;\n }\n else if (thanos == 2) {\n win = playerBet * 10;\n playerMoneyAmount += win;\n }\n else if (batman == 2) {\n win = playerBet * 20;\n playerMoneyAmount += win;\n }\n else if (batman == 1) {\n win = playerBet * 5;\n playerMoneyAmount += win;\n }\n else {\n win = playerBet * 1;\n playerMoneyAmount += win;\n }\n //log win\n alert(\"YOU WON! \" + \"$\" + win);\n console.log(\"Win!\" + \"$\" + win);\n //show how much they won\n labelWinAmount.text = \"$\" + win.toString();\n //calculate the amount won. show in the label \n labelTotalAmount.text = \"$\" + playerMoneyAmount.toString();\n playerBet = 0;\n blanks = 0;\n labelBetAmount.text = \"$\" + playerBet.toString();\n //reset the bet amount\n labelBetAmount.text = \"$\" + playerBet.toString();\n }\n else {\n //show the loss\n playerMoneyAmount -= playerBet;\n labelWinAmount.text = \"$\" + playerBetAmount.toString();\n labelTotalAmount.text = \"$\" + playerMoneyAmount.toString();\n if (playerMoneyAmount == 0) {\n playerBet = 0;\n labelBetAmount.text = \"$\" + playerBet.toString();\n alert(\"you lose please add more cash or vacate the slot machine\");\n spinButton.alpha = .5;\n }\n playerBetAmount = 0;\n blanks = 0;\n }\n}", "title": "" }, { "docid": "6e257ef3aea4cb6c80dd08c16c3f32b8", "score": "0.5657954", "text": "function totalPoints(){\n let paragraph = document.createElement(\"p\");\n paragraph.textContent = \"PLAYER 1 | \" + playerPoints + ' Points | ' + \"COMPUTER \" + computerPoints + ' Points | ' + \"DRAW \" + tiePoints + \" Points\";\n let outcome = document.getElementById('score')\n outcome.appendChild(paragraph);\n\n }", "title": "" }, { "docid": "47252972a313c590a6500c05734e0606", "score": "0.5647905", "text": "function calculateScore(result) {\n if (result == 'win') {\n win += 1;\n playerScore.textContent = `Player Score: ${win}`;\n }\n else if (result == 'lose') {\n lose += 1;\n computerScore.textContent = `Computer Score: ${lose}`;\n }\n\n if (win == 5) {\n winner.textContent = \"PLAYER WINS\";\n }\n else if (lose == 5) {\n winner.textContent = \"COMPUTER WINS\";\n }\n}", "title": "" }, { "docid": "836d67096d00f873a3cc9d47b34cbb50", "score": "0.5647422", "text": "function winLose() {\n score === goal ? wins++ : losses++\n $(\"#wins\").text(wins);\n $(\"#losses\").text(losses);\n reset();\n }", "title": "" }, { "docid": "57a35e8b06f8740b83a57fcac4e08d7f", "score": "0.5646429", "text": "function displayTotal() {\n console.log(\"tu recargo por edad es \")\n console.log(recargo);\n console.log(\"tu recargo por conyuge \")\n console.log(recargo_conyuge);\n console.log(\"tu recargo por tus hijos \")\n console.log(recargo_hijos);\n console.log(\"tu recargo por tarifa base \")\n console.log(precio_base);\n console.log(\"tu recargo total es \")\n console.log(recargo_total);\n console.log(\"tu presio final es\");\n console.log(precio_final)\n\n alert(\"Para el asegurado \" + nombre)\n alert(\"El recargo total sera de: \" + recargo_total)\n alert(\"El precio sera de: \" + precio_final)\n\n\n }", "title": "" }, { "docid": "541ae705d82137bbc7f3e40055a41270", "score": "0.5642274", "text": "function updateCounts() {\n energyLabel.innerText = `Energy: ${energy}`;\n creaturesLabel.innerText = `Creatures: ${creatureCount} / ${maxCreatures}`;\n goldLabel.innerText = `Gold: ${gold}`;\n stoneLabel.innerText = `Stone: ${stone}`;\n}", "title": "" }, { "docid": "1ab6fa40264bbc88cf9dd44a89017022", "score": "0.5638171", "text": "function showTotalPriceWithPromo() {\n if(promoCode == true) {\n const totalPrice = getTotalPrice();\n const afterPromoCost = totalPrice * 0.2;\n setValue('total-cost', totalPrice - afterPromoCost);\n }\n}", "title": "" }, { "docid": "227f2c1910d12c61c6e30ac2a08fddab", "score": "0.5633231", "text": "function increaseComputerScore(){\n ++computerScore;\n document.getElementById('cscore').innerText = computerScore;\n}", "title": "" }, { "docid": "f6ca06005a961eb5455c6dcfb13985e1", "score": "0.5619055", "text": "function UpdateAndCheck() {\n if (playerTotal === crystalTotal) {\n wins += 1;\n $(\"#wins\").text(wins);\n $(\".win\").text(\"You Won\");\n $(\".heading\").css(\"background-color\", \"green\");\n generateNumbers();\n } else if (playerTotal > crystalTotal) {\n losses += 1;\n $(\"#losses\").text(losses);\n $(\".lost\").text(\"You Lost\");\n $(\".heading\").css(\"background-color\", \"red\");\n generateNumbers();\n }\n}", "title": "" }, { "docid": "35777ee97380c9f3b17b318446458f90", "score": "0.5618368", "text": "function conditions() {\n if (total === winningNumber) {\n alert(\"Winner!\");\n //adds to the win counter\n wins++;\n //the text wont appear until you win a game\n $(\".wins\").html(\"Numbers of wins\" + \" \" + wins)\n restart();\n }\n else if (total >= winningNumber) {\n alert(\"You collected too many!\");\n //adds to the loss counter\n losses++;\n restart();\n //again text wont appear until you lose\n $(\".losses\").html(\"Number of losses:\" + \" \" + losses )\n }\n }", "title": "" }, { "docid": "0d335d8300757dbdbb9b60d5ee9141f9", "score": "0.56146103", "text": "function countLosses() {\n alert(\"You lost!\");\n losses++;\n $(\"#wayToLose\").append(\" \" + losses);\n reset();\n }", "title": "" }, { "docid": "9165b152ecabe686a2d167f53dd9bb38", "score": "0.5603273", "text": "function win(choiceP, choiceC) {\n\tplayerScore++\n\tplayerScore_span.innerHTML = playerScore;\n\tresult_div.innerHTML = `${choiceP} beats ${choiceC}, Player Wins!`\n\tshow(rock_div); show(paper_div); show(scissor_div);\n\n}", "title": "" }, { "docid": "ccfa3e63f7e7f98deddf6c58f1b339b4", "score": "0.5601227", "text": "function computerWon (player, computer) {\n computerPoints++;\n return `Computer won by choosing ${computer} over your ${player}`;\n}", "title": "" }, { "docid": "b41952e125a4238773d5695286008c44", "score": "0.55998284", "text": "function displaySummary(res) {\n var total = document.querySelector(\".total\");\n var active = document.querySelector(\".active\");\n var recoverd = document.querySelector(\".recoverd\");\n var death = document.querySelector(\".death\");\n total.textContent = res.TotalConfirmed;\n active.textContent = res.NewConfirmed;\n recoverd.textContent = res.TotalRecovered;\n death.textContent = res.TotalDeaths;\n }", "title": "" }, { "docid": "b6e85137f7628da5259d8868808b8500", "score": "0.55900407", "text": "function drawLabel() {\n p.push();\n p.textFont('Courier New');\n p.textStyle(p.BOLD);\n p.textAlign(p.LEFT);\n p.textSize(15);\n p.fill('black');\n p.noStroke();\n p.text(`Trials: ${p.props.playedGames}/${p.props.countOfGames}`, 20, p.wrapper.offsetHeight - 20);\n p.pop();\n }", "title": "" }, { "docid": "451256f4b35bc44c9b66e7eb437691f3", "score": "0.558938", "text": "function displayScores() {\n winCount.textContent = wins;\n loseCount.textContent = losses;\n tieCount.textContent = ties;\n}", "title": "" }, { "docid": "db094b888d0711f96806d4a661b3ff11", "score": "0.5588612", "text": "function WinLoss(props) {\n let winLossRate = props.winLossRate;\n if(winLossRate.win !== undefined)\n {\n let winPercent = ((winLossRate.win/(winLossRate.loss+winLossRate.win))*100).toFixed(0);\n const data = {\n labels: [\n 'Win',\n 'Loss'\n ],\n datasets: [{\n data: [\n winLossRate.win,\n winLossRate.loss\n ],\n backgroundColor: [\n '#b5e0ff',\n '#ffb8a3'\n ],\n }],\n }\n\n const option = {\n legend: {\n display: false,\n },\n }; \n \n return (\n <div>\n <Pie\n data={data} \n width={198}\n height={120}\n options={option}\n />\n \n <p>{winPercent}% win rate<br />\n {winLossRate.win+winLossRate.loss} Games {winLossRate.win} Won {winLossRate.loss} Loss</p>\n </div>\n );\n }\n return <p></p>\n}", "title": "" }, { "docid": "723d56f9a6e356212efb94e8ebd6a7ed", "score": "0.5586341", "text": "function computerWins(computerChoice){\n //Increment Computer Score:\n computerScore += 1;\n computerScore_span.innerHTML = computerScore;\n\n //Generate computer winning message:\n switch(computerChoice){\n case \"paper\":\n result_banner.innerHTML = \"Paper Covers Rock. Computer Wins!\";\n break;\n case \"rock\":\n result_banner.innerHTML = \"Rock Smashes Scissors. Computer Wins!\";\n break;\n case \"scissors\":\n result_banner.innerHTML = \"Scissors Cuts Paper. Computer Wins!\";\n break;\n }\n\n}", "title": "" }, { "docid": "a1754333c2c95dc41470ef736d9ab818", "score": "0.5585396", "text": "function pricedisplay(exs, pkp, ppl, bkfee){\n \tif(! exs) exs = 0;\n \tif(! pkp) pkp = 0;\n \tif(! ppl) ppl = 1;\n \tif(bkfee != 0){ jQuery('.moreprice').html('<p style=\"padding:5px;\">Booking Fee: $'+bkfee+'</p>'); }else{jQuery('.moreprice').html(''); }\n \tvar totalsprice = (parseInt(exs)+parseInt(pkp)+parseInt(bkfee))*parseInt(ppl);\n\t\tjQuery('#ppl').text(ppl);\n \tjQuery('#totals').text(totalsprice);\n }", "title": "" }, { "docid": "dbe88a77778fee960286da93d5fecc5c", "score": "0.5583888", "text": "function display() {\r\n\r\n $(\"#score-row\").text(totalPoints);\r\n $(\"#computerNumber\").text(\"Random Number: \" + randomNumber);\r\n $(\"#wins\").text(\"Wins: \" + wins);\r\n $(\"#losses\").text(\"Losses: \" + losses);\r\n\r\n }", "title": "" }, { "docid": "a5d6d11301ad3cfd6084f3e977d6c440", "score": "0.5579082", "text": "function winTally() {\r\n if (player) {\r\n tally.red++;\r\n redScore.innerText = tally.red;\r\n\r\n } else {\r\n tally.blk++;\r\n blkScore.innerText = tally.blk;\r\n }\r\n }", "title": "" }, { "docid": "8d6f5c28d81ef078c6aeef99fbb07f7e", "score": "0.5571953", "text": "function userWinWin() {\n\tuserscore += 1;\n\tdocument.getElementById('userWin').innerHTML = userscore;\n}", "title": "" }, { "docid": "13991cfbadf4c4fc9cfb5802326334fc", "score": "0.55654305", "text": "function updateWins() {\n document.getElementById('score').innerText = player.winns;\n}", "title": "" }, { "docid": "00cc3bca5a26db5ec59ff5971e3ac62f", "score": "0.5565233", "text": "function betMaxButtonClicked() {\n playerBetLabel.text = playerMoney.toString();\n}", "title": "" }, { "docid": "55df99b86e264cd48a91d7392a25ee2d", "score": "0.55521744", "text": "riskCounter() {\n\n let low = 0,\n moderate = 0,\n high = 0,\n critical = 0,\n total = 0;\n\n let vulnerabilities = this.projDt.vulnerabilities;\n\n if (vulnerabilities != undefined) {\n\n vulnerabilities.forEach(vn => {\n\n total++;\n switch (vn.risk) {\n\n case \"Baixo\":\n low++;\n break;\n\n case \"Moderado\":\n moderate++;\n break;\n case \"Alto\":\n high++;\n break;\n case \"Critico\":\n critical++;\n break;\n }\n\n\n });\n }\n\n\n\n document.querySelector(\"#low-risk\").innerHTML = low;\n document.querySelector(\"#mod-risk\").innerHTML = moderate;\n document.querySelector(\"#high-risk\").innerHTML = high;\n document.querySelector(\"#critical-risk\").innerHTML = critical;\n\n if (total == 0 || total > 1) this.totalVn.innerHTML = `${total} vulnerabilidades encontradas.`\n else this.totalVn.innerHTML = `${total} vulnerabilidade encontrada.`\n\n }", "title": "" }, { "docid": "33ad9388a3b96ed4636748826962a913", "score": "0.55511373", "text": "function showWinMessage() {\n playerMoney += winnings;\n resetFruitTally();\n checkJackPot();\n}", "title": "" }, { "docid": "e2d1b7b96cbdabaa78ba3f23d2838e03", "score": "0.5550271", "text": "function la_langosta_ahumada() {\n\tvar n, plato;\n\tdocument.write(\"cantidad de personas para el evento\",'<BR/>');\n\tn = prompt();\n\tif (n<200) {\n\t\tplato = 95;\n\t\tdocument.write(\" El costo por plato es: \",plato,'<BR/>');\n\t\tdocument.write(\" El costo total del servicio seria de:\",(n*plato),'<BR/>');\n\t} else {\n\t\tif (n<=300) {\n\t\t\tplato = 85;\n\t\t\tdocument.write(\" El costo por plato es: \",plato,'<BR/>');\n\t\t\tdocument.write(\" El costo total del servicio seria de:\",(n*plato),'<BR/>');\n\t\t} else {\n\t\t\tif (n>300) {\n\t\t\t\tplato = 75;\n\t\t\t\tdocument.write(\" El costo por plato es: \",plato,'<BR/>');\n\t\t\t\tdocument.write(\" El costo total del servicio seria de:\",(n*plato),'<BR/>');\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "e3bccb4dcb19354afd0cd04191ad8e26", "score": "0.55478036", "text": "function cashDisplay() {\n if (cash === null) {\n return;\n }\n API.drawText(\"$\" + cash, 310, resY - 50, 0.5, 50, 211, 82, 255, 4, 0, false, true, 0);\n}", "title": "" }, { "docid": "275606dded7d2f8ad40c8fcf0e4ac906", "score": "0.55413216", "text": "function addScore(crystal){\n totScore = totScore + crystal.value;\n $(\"#current-score\").html(totScore);\n checkWin();\n}", "title": "" }, { "docid": "d9fd6c3eb329d0cd032837d9f4ed5899", "score": "0.55413157", "text": "function fuelDisplay() {\n if (fuel === null) {\n return;\n }\n API.drawText(\"~b~Fuel: ~w~\" + Math.round(fuel * 100) / 100, 310, resY - 120, 0.5, 255, 255, 255, 255, 4, 0, false, true, 0);\n}", "title": "" }, { "docid": "371bbaff5f22c5325a83c898bd7c84f1", "score": "0.5534597", "text": "function displayStats() {\n userWinsDom\n .textContent = \"Wins\";\n userWinsDom\n .appendChild(document.createElement(\"winsBlock\"))\n .textContent = wins;\n userLossesDom\n .textContent = \"Losses\";\n userLossesDom\n .appendChild(document.createElement(\"lossesBlock\"))\n .textContent = losses;\n }", "title": "" }, { "docid": "4ca891d9beb77c654fa9fa40e014c0ea", "score": "0.5533201", "text": "function showCalcResults() {\n $caloriesResult.text( calories );\n $proteinResult.text( macroGrams.protein );\n $carbResult.text( macroGrams.carb );\n $fatResult.text( macroGrams.fat );\n }", "title": "" }, { "docid": "871acc993257a4e67f1aed7eb866d7b7", "score": "0.5528954", "text": "function checkWinsOrLosses() {\n if (totalPoints === ComputerPick) {\n\n //Wins must be added to total amount of wins.\n wins++\n alert(\"You Win!\");\n $(\"#wins\").html(\"Wins: \" + wins);\n\n //After a win or a loss, game must be reset.\n resetGame();\n\n } else if (totalPoints > ComputerPick) {\n //Losses must be added to total amount of wins.\n losses++\n alert(\"You Lose!\");\n $(\"#losses\").html(\"Losses: \" + losses);\n\n\n //After a win or a loss, game must be reset.\n resetGame();\n }\n\n }", "title": "" }, { "docid": "5866bf3580f1677d3ad75a2898507886", "score": "0.552499", "text": "function updateCounts() {\r\n const counts = KNNClass.getCountByLabel();\r\n\r\n // select('#exampleRock').html(counts['Rock'] || 0);\r\n // select('#examplePaper').html(counts['Paper'] || 0);\r\n // select('#exampleScissor').html(counts['Scissor'] || 0);\r\n}", "title": "" }, { "docid": "b0e67f48e894e5341d71888b24f36a79", "score": "0.55213356", "text": "function showStatistics(){\n var accuracy = 0;\n var grossWPM = 0;\n var netWPM = 0;\n var nrOfErrors = countErrors();\n document.getElementById(\"errors\").innerHTML = nrOfErrors;\n if(letterCount > 0)\n accuracy = (100 - Math.round((nrOfErrors / letterCount) * 100)) + \"%\";\n var minutesPlayed = (gameCurrentTime - gameStartTime) / 60000;\n if(minutesPlayed > 0){\n grossWPM = Math.round((letterCount / 5) / minutesPlayed);\n netWPM = Math.round(grossWPM - (nrOfErrors / minutesPlayed));\n }\n document.getElementById(\"accuracy\").innerHTML = accuracy;\n document.getElementById(\"gross_wpm\").innerHTML = grossWPM;\n document.getElementById(\"net_wpm\").innerHTML = netWPM;\n}", "title": "" }, { "docid": "b803e6e23348d2057311c28b5c86345c", "score": "0.55125797", "text": "function playerWin(playerSelection, computerSelection) {\r\n roundWinnerDiv.textContent = `You win, ${playerSelection} beats ${computerSelection}!`;\r\n playerScore++;\r\n playerScoreSpan.textContent = playerScore;\r\n}", "title": "" }, { "docid": "8fe8e6829257952ffdca95f8e379877d", "score": "0.550729", "text": "function updateTotal() {\n document.getElementById(\"totalScoreHeader\").innerHTML = \"Your total score is: \"+total;\n}", "title": "" }, { "docid": "ec2e00a801a44f52e57353fa0c734306", "score": "0.5500205", "text": "function userWinUpdate() {\n\tdocument.getElementById('win').innerHTML= \"Wins :\" + winCounter;\n}", "title": "" }, { "docid": "9d3e8957cc815f3ad6eb999f3d1f92bb", "score": "0.5499282", "text": "function printer() {\n $(\"#target-score\").text(\"Target: \" + randomNum);\n $(\"#wincounter\").text(\"Wins: \" + wins + \" Losses: \" + losses);\n $(\"#score-counter\").text(score);\n}", "title": "" }, { "docid": "c2cbc0ec0e51ded21d5befefd983f824", "score": "0.54947376", "text": "function rpslsWin (c){\n let bc = rpsls()\n let result = ''\n result = (bc==c)?'ties':((bc == 'rock' && c == 'paper' || bc == 'rock' && c =='spock' || bc == 'paper' && c == 'scissors' || bc == 'paper' && c == 'lizard' || bc == 'scissors' && c == 'rock' || bc == 'scissors' && c =='spock' || bc == 'lizard' && c == 'rock' || bc == 'lizard' && c =='scissors' || bc == 'spock' && c == 'paper' || bc == 'spock' && c =='lizard')?'loses to':'beats')\n\n console.log(`Bots ${bc} ${result} your ${c}!`)\n}", "title": "" }, { "docid": "4f4922dde9762d2e745fad7eeb2551eb", "score": "0.5493807", "text": "function showLossMessage() {\n playerMoney -= playerBet;\n spinResultLabel.text = \"-\" + playerBet.toString();\n resultLabel.text = \"You Lose\";\n resetFruitTally();\n}", "title": "" }, { "docid": "5127f56ab6c6c9af472d56d7f9455273", "score": "0.54831296", "text": "function start() {\n $(\"#winCounter\").text(winCounter);\n $(\"#lossCounter\").text(lossCounter);\n $(\"#totalScore\").text(totalScore);\n\n }", "title": "" }, { "docid": "2d5cf025596f025429c168d628ac0b89", "score": "0.54826415", "text": "function winCount() {\n wins++;\n $(\"#winCounter\").text(wins);\n reset();\n }", "title": "" }, { "docid": "68baba4cd7caf0d985fea95d446fc38a", "score": "0.54817814", "text": "function updateReport() {\n $(\"#currentTotal\").text(Math.floor(data.totalCurrent));\n $(\"#rps\").text((data.totalRPS/70.4).toFixed(3));\n}", "title": "" }, { "docid": "442962e53b4e62cd2f60df1956ca4281", "score": "0.5477476", "text": "function payout(type){\n if(winnings === 0){\n let balanceLabel = document.getElementById(\"lblBalance\");\n let winningsLabel = document.getElementById(\"lblWinnings\");\n let winningString = \"\";\n \n switch (type){\n case 0:\n winnings = Number(pot);\n break;\n case 1:\n winnings = pot * 2;\n break;\n case 2:\n winnings = ((pot * 2) + (pot * 0.5));\n break;\n }\n // Add winnings to balance and display balance with formatting\n balance = balance + winnings;\n balanceLabel.innerHTML = balance;\n balanceLabel.innerHTML = balanceLabel.innerHTML.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n winningString = \"+\" + winnings.toString();\n winningsLabel.style.color = \"gold\";\n winningsLabel.innerHTML = winningString;\n }\n}", "title": "" }, { "docid": "9bdfc13410e155de908311e0f7b1f0dc", "score": "0.54770017", "text": "function displayTotal() {\r\n totalDisplay.innerHTML = `Total price: $${total}.00`;\r\n }", "title": "" }, { "docid": "910e96109fb9b6f50ee1468433e5e764", "score": "0.54631793", "text": "function gameWin() {\n $(\"#opponent-total-hp\").text(0);\n console.log(\"you win\")\n $(\"#selector-text\").text(\"You Won!\")\n\t\tgameStart = false;\n }", "title": "" }, { "docid": "0f00d2bf18a04c9ed4d84e3d1ac05d67", "score": "0.54491574", "text": "function ifThePlayerLosses (){\n\t\n\tplayerLosses++;\n\t$('#playerLosses').text(playerLosses);\n\tconsole.log(playerLosses);\n\talert(\"Loser\");\n\t\n}", "title": "" }, { "docid": "1b2b4544bf5c95465f05e259914a26e3", "score": "0.54472643", "text": "function win(playerSelection, computerSelection){\r\n playerScore++;\r\n playerScoreSpan.innerHTML = playerScore;\r\n computerScoreSpan.innerHTML = computerScore;\r\n yourChoice.innerHTML = playerSelection.toUpperCase().bold();\r\n computerChoice.innerHTML = computerSelection.toUpperCase().bold();\r\n\r\n resultSpan.innerHTML = playerSelection.toUpperCase().bold() + \" beats \" + computerSelection.toUpperCase().bold() + \". ' You Won ' \";\r\n //console.log(playerScore);\r\n //console.log(\"player wins\");\r\n}", "title": "" }, { "docid": "600d48af7ac90aad7be40b24540db8d2", "score": "0.54440874", "text": "function updateWins(winnum) {\n document.getElementById(\"wins\").innerText = winnum;\n}", "title": "" }, { "docid": "e1f16cfa92758396ce9f69ef165db379", "score": "0.5441136", "text": "function calcInc() {\n var resinc = \"+ \" + Math.round(income * 100) / 100;\n resinc += zeros(income);\n document.querySelector(\".budget__income--value\").textContent = resinc;\n }", "title": "" }, { "docid": "0f724e2f6f2b4c654fcb3a18c23e8e4c", "score": "0.54378796", "text": "function updateDisplay(){\n var lost = document.getElementById('lost');\n var draw = document.getElementById('draw');\n lost.innerHTML = GAME.lostCount;\n draw.innerHTML = GAME.drawCount;\n}", "title": "" }, { "docid": "c96ae0d26b0c3ed4da226304bddb4228", "score": "0.54344726", "text": "function robs(result){\r\n\tif(result=='w'){robsW++;document.getElementById(\"RobsWon\").innerHTML = robsW;}\r\n\tif(result=='l'){robsL++;document.getElementById(\"RobsLost\").innerHTML = robsL;}\r\n\tif(result=='b'){Rboards++;document.getElementById(\"RobBoards\").innerHTML = Rboards;}\r\n\tvar robsWInt = parseFloat(robsW);var robsLInt = parseFloat(robsL);\r\n\tdocument.getElementById(\"RPcent\").innerHTML = (robsWInt/(robsWInt+robsLInt)*100).toFixed(2);\r\n}", "title": "" }, { "docid": "2d1fa25016fd312c37a7818d8a7ae7fa", "score": "0.54342085", "text": "function checkForWin() {\n if (totalScore === targetNum) {\n $winAlert.html('You win!')\n wins++\n $winsText.html(wins)\n reset()\n }\n if (totalScore > targetNum) {\n $lossAlert.html('You lose :(')\n losses++\n $lossesText.html(losses)\n reset()\n }\n }", "title": "" }, { "docid": "0b92af62f8e8e726fa0f8b028ee27b38", "score": "0.543132", "text": "function computeWinLoss(){\n var wins = window.localStorage.getItem(\"wins\");\n var lose = window.localStorage.getItem(\"losses\");\n var winLose = parseFloat(wins) + parseFloat(lose);\n return Number((wins/winLose*100).toFixed(1));\n }", "title": "" }, { "docid": "176a302162752eddd0c5b87cfd5e7998", "score": "0.5431151", "text": "function updatewin(){\n document.querySelector(\"#wins\").innerHTML=\"Wins: \"+wins\n }", "title": "" }, { "docid": "6d06d9731ee65eb2832024568ce180f2", "score": "0.54304117", "text": "function summary(values) {\n let aar =\n parseInt(getInputValues().utlopsDato.substr(0, 4)) -\n parseInt(getInputValues().datoForsteInnbetaling.substr(0, 4));\n var summaryTitle = document.getElementById(\"summaryTitle\");\n var summaryText = document.getElementById(\"summaryText\");\n summaryTitle.innerHTML = \"Oppsummering\";\n summaryTitle.style.cssText = \"font-size:17px;font-weight:bold;\";\n summaryText.innerHTML =\n \"Totalt bruker du \" +\n aar +\n \" år på nedbetaling av lånet.<br>\" +\n \"Totalt betaler du \" +\n values.sumRenter +\n \" kroner i renter.<br>\" +\n \"Totalt tilsvarer rentene \" +\n values.prosentRenter +\n \" % av hele lånebeløpet.\";\n}", "title": "" }, { "docid": "20eb4c313b735e72b3897f02208d97e6", "score": "0.54273236", "text": "function scoreTracker () {\n \n if (result == \"Win\") {\n userScore += 1;\n gamesPlayed +=1;\n userScore_span.textContent = userScore;\n console.log(userScore, computerScore);\n }\n\n else if (result == \"Lose\") {\n computerScore += 1;\n gamesPlayed +=1;\n compScore_span.textContent = computerScore;\n console.log(userScore, computerScore);\n }\n \n else if (result == \"Tie\") {\n computerScore += 0;\n userScore += 0;\n gamesPlayed +=1;\n userScore_span.textContent = userScore;\n compScore_span.textContent = computerScore;\n console.log(userScore, computerScore)\n }\n game();\n}", "title": "" }, { "docid": "8b35626618914b86070149552c0b76ad", "score": "0.5424188", "text": "function clickBetOneHundButton() {\n if (playerBet == 0 && playerMoneyAmount <= 0) {\n alert(\"please add more cash or vacate the slot machine\");\n }\n else {\n playerBet += 100;\n labelBetAmount.text = \"$\" + playerBet.toString();\n labelTotalAmount.text = \"$\" + playerMoneyAmount.toString();\n }\n}", "title": "" }, { "docid": "d78d656a6396918fc6e81f06503339a0", "score": "0.54175675", "text": "function updateLosses() {\n lossesText.textContent = \"Losses: \" + losses\n}", "title": "" } ]
a7337065f703779094d08a9383c3a47e
TODO: some confusion throughout about whether '() should be converted into js as [] or as undefined both used in various places
[ { "docid": "683a88fb631dff7a737a67d64ac89a1c", "score": "0.53426725", "text": "function scheme_to_js_style_array(a) {\n var o = [];\n while (a && a.length > 0) {\n\to.push(a[0]);\n\ta = a[1];\n }\n return o;\n}", "title": "" } ]
[ { "docid": "063d311e484360588f2da6d2a4243c6a", "score": "0.6308303", "text": "function arrayify (thing) {\n return Array.isArray(thing) ? thing : typeof thing !== \"undefined\" ? [thing] : [];\n}", "title": "" }, { "docid": "564066e05d2dd59b73b04d8ea40cd1c5", "score": "0.6304809", "text": "_arr(x) {return typeof x === 'string' ? [x] : x}", "title": "" }, { "docid": "0d0550098df84586abefe7e19347422f", "score": "0.615359", "text": "function h(a){return Array.isArray(a)?a:[a]}", "title": "" }, { "docid": "0ceceee00d11ce5d70298548851a8095", "score": "0.6147512", "text": "function js(e){return!0===Ps(e)&&\"[object Object]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "5778c2d112aad55a30decb8a2cbbf078", "score": "0.60638905", "text": "function a(e){return null!=e&&\"object\"===r(e)&&!1===Array.isArray(e)}", "title": "" }, { "docid": "1ada512b65bb0c6281de9d0ba794f4bb", "score": "0.60626507", "text": "function L(e){return null!=e&&\"object\"===typeof e&&!1===Array.isArray(e)}", "title": "" }, { "docid": "5786f3fdd8fc1275c42cc1ec5ff880bf", "score": "0.5985031", "text": "function r(e){return null!=e&&'object'==typeof e&&!1===Array.isArray(e)}", "title": "" }, { "docid": "18244d0ca18f871faa402464aa43f0c2", "score": "0.594646", "text": "visitLiteralArrayExpr(ast, ctx) {\n if (ast.entries.length === 0) {\n ctx.print(ast, '(');\n }\n const result = super.visitLiteralArrayExpr(ast, ctx);\n if (ast.entries.length === 0) {\n ctx.print(ast, ' as any[])');\n }\n return result;\n }", "title": "" }, { "docid": "18244d0ca18f871faa402464aa43f0c2", "score": "0.594646", "text": "visitLiteralArrayExpr(ast, ctx) {\n if (ast.entries.length === 0) {\n ctx.print(ast, '(');\n }\n const result = super.visitLiteralArrayExpr(ast, ctx);\n if (ast.entries.length === 0) {\n ctx.print(ast, ' as any[])');\n }\n return result;\n }", "title": "" }, { "docid": "f64b60b4eae8e65769a4d588b74ca3ce", "score": "0.59060687", "text": "function ast_to_js_style_array(a) { \n if (a.length == 0) { \n\treturn [] \n } else if (a.length == 1) { \n\tconsole.log(\"should never happen\");\n } else {\n\tvar out = [];\n\twhile (a.length > 0) {\n\t out.push(car(a));\n\t a = cdr(a);\n\t}\n }\n return out;\n}", "title": "" }, { "docid": "570ef4dabb00b5f8ecc163c61fab6911", "score": "0.58599794", "text": "function Exercise3() {\n\n return [1, 2, true, \"Hello\", undefined];\n\n}", "title": "" }, { "docid": "473fee3a5050b6c9786a319408639109", "score": "0.58591914", "text": "function Arr(){ return Literal.apply(this,arguments) }", "title": "" }, { "docid": "2886d867f37e2c2111c99a4a4e8afe44", "score": "0.5852945", "text": "function r(e){return null!=e&&\"object\"===a(e)&&!1===Array.isArray(e)}", "title": "" }, { "docid": "c36dcb8f76eb1d11443b0a38de550836", "score": "0.58211225", "text": "function s(t){return null!=t&&\"object\"===typeof t&&!1===Array.isArray(t)}", "title": "" }, { "docid": "256ad6a03d8c13892c3ec508ddb9d0c0", "score": "0.5820081", "text": "function undefinedTransform() {\n\t\treturn undef;\n\t}", "title": "" }, { "docid": "4816dffcc4014bbc61ed28a7b084fdf3", "score": "0.57964844", "text": "function ah(e){return\"[object Array]\"===rh.call(e)}", "title": "" }, { "docid": "9db6591fe6092ef3ccc85d8204163b0b", "score": "0.5781721", "text": "function r(e){return e&&\"object\"==typeof e&&!Array.isArray(e)}", "title": "" }, { "docid": "9db6591fe6092ef3ccc85d8204163b0b", "score": "0.5781721", "text": "function r(e){return e&&\"object\"==typeof e&&!Array.isArray(e)}", "title": "" }, { "docid": "d437f41e413d6436212bd14d93f42538", "score": "0.57612616", "text": "function U(n){return n!=null&&typeof n==\"object\"&&Array.isArray(n)===!1}", "title": "" }, { "docid": "5cdfbe6d65100bbe708de6a5e4d26c0b", "score": "0.5743094", "text": "function ArrayLiteralExpression() {\n}", "title": "" }, { "docid": "0ce1c9b1873daad22dc6e0ef32e19165", "score": "0.57378006", "text": "function n(e){return null!=e&&\"object\"===typeof e&&!1===Array.isArray(e)}", "title": "" }, { "docid": "f342ff00882d4dcc6553933df5a0a86c", "score": "0.5711738", "text": "function foo() {\n return [\n 42\n ];\n}", "title": "" }, { "docid": "c9fe893eab18121e7134aa99602ba32a", "score": "0.56998503", "text": "function u(e){return e&&e!==window&&o(e.length)&&!l(e)&&!r(e)&&!i(e)&&(0===e.length||i(e[0]))}", "title": "" }, { "docid": "39ad100abb50845f3f15c8233429e88c", "score": "0.5686954", "text": "function _(ce){return ce!=null&&typeof ce==\"object\"&&Array.isArray(ce)===!1}", "title": "" }, { "docid": "7f13a796f0d19123a46fc73f13f02a95", "score": "0.56860226", "text": "function c(e){return Array.isArray(e)}", "title": "" }, { "docid": "41335a08fafaba06c0a7a17053f3dc56", "score": "0.5678895", "text": "function embed_void(jsdata) {\n var br_in = JSON.parse(jsdata);\n return [ br_in['id'] , window[br_in['m']].apply(null,br_in['a']) ];\n}", "title": "" }, { "docid": "b66162d97026516098d0003b543dba64", "score": "0.5653654", "text": "function n(e){return Array.isArray?Array.isArray(e):\"[object Array]\"===m(e)}", "title": "" }, { "docid": "a8f9908dbea19c0458ed23aaca14e636", "score": "0.5647951", "text": "function arrayiffy(something) {\n if (typeof something === \"string\") {\n if (something.length) {\n return [something];\n }\n\n return [];\n }\n\n return something;\n}", "title": "" }, { "docid": "63fac38b4ae94391b2c5fc8c82e82d6a", "score": "0.56093353", "text": "function ensureArray(val){\n\t\treturn Array.isArray(val)?val:[val];\n\t}", "title": "" }, { "docid": "0c16f75ff4f08c2c4af9e5d6ef0921c0", "score": "0.56013507", "text": "function ArrayExpression() {\n}", "title": "" }, { "docid": "6046790821e8e80984413c99ff09df9e", "score": "0.55732846", "text": "function arrayify() {\n // TODO don't type in here until you have a unit test first!\n}", "title": "" }, { "docid": "578c9f5ea614e805fd6f854977fadbc8", "score": "0.5572127", "text": "function as_list(i) { return i instanceof Array ? i : [i]; }", "title": "" }, { "docid": "255a8b5f62629cd0cc31745498743953", "score": "0.5567975", "text": "function foo(){\n return Array.isArray(1);\n}", "title": "" }, { "docid": "10130e9cf8e5eecbbf77c8cddf36ea04", "score": "0.5560677", "text": "function customFunction() {\n\t\tif (typeof Int8Array != 'object' && typeof document !== 'undefined' && typeof document.childNodes != 'function') {\n\t\t\treturn function (obj) { return typeof obj == 'function' || false; };\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "b5ab75d7198347ef0402866e2fad0f8a", "score": "0.55586654", "text": "function _c(_7){return typeof(_7)=='undefined'}", "title": "" }, { "docid": "8fb6f74282b8b3bcf37d5f6485e17039", "score": "0.55536944", "text": "function p(a){var b=typeof a;return Array.isArray(a)?\"array\":a instanceof RegExp?\"object\":b}", "title": "" }, { "docid": "e6778bda383149b68f78655e7a317820", "score": "0.5519092", "text": "function mu(e){return\"object\"===typeof e&&(Array.isArray(e)?e=Array.prototype.slice.call(e):e&&(e=s({},e))),e}", "title": "" }, { "docid": "d74e7eb8d3c83e4243d3ba1b76265b97", "score": "0.54811263", "text": "function x(De){return De!=null&&typeof De==\"object\"&&Array.isArray(De)===!1}", "title": "" }, { "docid": "c5cf38d982ca63aa962465f65dfdcff1", "score": "0.54811215", "text": "function o(a){return Array.isArray(a)}", "title": "" }, { "docid": "6022c6671fddd0df32cce8aa72c643f5", "score": "0.5471245", "text": "function sglUndefV2(v) {\r\n\treturn new Array(2);\r\n}", "title": "" }, { "docid": "bd450f8dde0d839e58eeb266c61dfa2a", "score": "0.5471101", "text": "function _ArrayLiteralExpressionEmitter() {\n}", "title": "" }, { "docid": "a3494222b97ed7ca0ce840896ff70e2a", "score": "0.5458921", "text": "function asArray(something) {\n return [].slice.call(something);\n}", "title": "" }, { "docid": "e2e2561055af2ffd48c0ee926165185c", "score": "0.5458693", "text": "constructor() {\n // Define aliases\n this.alias = {\n a: 'array',\n arr: 'array',\n array: 'array',\n b: 'boolean',\n bool: 'boolean',\n boolean: 'boolean',\n null: 'null',\n n: 'number',\n num: 'number',\n number: 'number',\n o: 'object',\n obj: 'object',\n object: 'object',\n s: 'string',\n str: 'string',\n string: 'string',\n undefined: 'undefined'\n };\n\n // Default casters\n this.cast = {\n array(val) {\n return [val];\n },\n boolean(val) {\n return Boolean(val);\n },\n function(val) {\n return function() {\n return val;\n };\n },\n null: () => null,\n number: val => Number(val),\n object: val => new Object(val), // eslint-disable-line no-new-object\n string: val => String(val),\n undefined: () => undefined\n };\n\n // Special casters\n this.cast.array.null = () => [];\n this.cast.array.undefined = () => [];\n this.cast.array.string = val => {\n if (val === 'false' || val === 'true') {\n return [this.cast.boolean.string(val)];\n }\n return val.split('');\n };\n this.cast.boolean.array = val => val.length > 0;\n this.cast.boolean.string = val => {\n if (val === 'false') {\n return false;\n }\n return this.cast.boolean(val);\n };\n this.cast.number.array = val => this.to(this.to(val, 'string'), 'number');\n this.cast.number.string = val => {\n if (val === 'false' || val === 'true') {\n val = this.cast.boolean.string(val);\n }\n const num = Number(val, 10);\n return (isNaN(num) ? 0 : num);\n };\n this.cast.number.undefined = () => 0;\n this.cast.string.array = val => val.join('');\n this.cast.string.null = () => '';\n this.cast.string.undefined = () => '';\n this.cast.object.string = val => {\n if (val === 'false' || val === 'true') {\n val = this.cast.boolean.string(val);\n }\n return this.cast.object(val);\n };\n }", "title": "" }, { "docid": "295390e5af52172490eecb54e7950851", "score": "0.545279", "text": "function A(t){return Array.isArray?Array.isArray(t):\"[object Array]\"===p(t)}", "title": "" }, { "docid": "46146a21ef7770757469c1543eddb972", "score": "0.54362416", "text": "function al(e){return\"object\"===typeof e&&(Array.isArray(e)?e=Array.prototype.slice.call(e):e&&(e=s({},e))),e}", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.54316425", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "acf1626e5eff3aff233f83191a79dda2", "score": "0.540401", "text": "function dejson(val) {\n\tif (val === undefined)\n\t\treturn [];\n\telse if (val.constructor !== Array)\n\t\treturn [ val ];\n\treturn val;\n}", "title": "" }, { "docid": "a944f43b7ad616d1a6adf5fbc3df6d44", "score": "0.5403365", "text": "function e$43(t,e){const i=\"?\"===t[t.length-1]?t.slice(0,-1):t;if(null!=e.getItemAt||Array.isArray(e)){const t=parseInt(i,10);if(!isNaN(t))return Array.isArray(e)?e[t]:e.getItemAt(t)}const u=e$44(e);return i$5g(u,i)?u.get(i):e[i]}", "title": "" }, { "docid": "55a78197c6b173db014f15e7315efda4", "score": "0.54015106", "text": "function arrayUnwrap(val) {\n\t switch(val.length) {\n\t case 0: return undefined;\n\t case 1: return mode === \"auto\" ? val[0] : val;\n\t default: return val;\n\t }\n\t }", "title": "" }, { "docid": "55a78197c6b173db014f15e7315efda4", "score": "0.54015106", "text": "function arrayUnwrap(val) {\n\t switch(val.length) {\n\t case 0: return undefined;\n\t case 1: return mode === \"auto\" ? val[0] : val;\n\t default: return val;\n\t }\n\t }", "title": "" }, { "docid": "55a78197c6b173db014f15e7315efda4", "score": "0.54015106", "text": "function arrayUnwrap(val) {\n\t switch(val.length) {\n\t case 0: return undefined;\n\t case 1: return mode === \"auto\" ? val[0] : val;\n\t default: return val;\n\t }\n\t }", "title": "" }, { "docid": "55a78197c6b173db014f15e7315efda4", "score": "0.54015106", "text": "function arrayUnwrap(val) {\n\t switch(val.length) {\n\t case 0: return undefined;\n\t case 1: return mode === \"auto\" ? val[0] : val;\n\t default: return val;\n\t }\n\t }", "title": "" }, { "docid": "689a1b3d780e260a2b62f9b968be7bae", "score": "0.5388398", "text": "function u(e){return!0==(null!=(t=e)&&\"object\"==typeof t&&!1===Array.isArray(t))&&\"[object Object]\"===Object.prototype.toString.call(e);var t}", "title": "" }, { "docid": "631948df93eacacfa8b2922e86aa39ac", "score": "0.53842807", "text": "function defined(data) {\r\n}", "title": "" }, { "docid": "e543f3984bb318ca7d3b2fadb6ca2943", "score": "0.5370008", "text": "static of() { return undefined; }", "title": "" }, { "docid": "0663b2e304aa33448282ce75e468a2a8", "score": "0.53650624", "text": "function arrayFunction() {return [1,2,3,4]}", "title": "" }, { "docid": "f3e22326de1b3362e9c1b093fdaf6873", "score": "0.5358514", "text": "function toString(val){return val==null?'':Array.isArray(val)||isPlainObject(val)&&val.toString===_toString?JSON.stringify(val,null,2):String(val);}", "title": "" }, { "docid": "f3e22326de1b3362e9c1b093fdaf6873", "score": "0.5358514", "text": "function toString(val){return val==null?'':Array.isArray(val)||isPlainObject(val)&&val.toString===_toString?JSON.stringify(val,null,2):String(val);}", "title": "" }, { "docid": "318bb88e42956cf28eb3ab54a36abb5c", "score": "0.5353069", "text": "function js(a,b){this.tV=[];this.Hva=a;this.mia=b||null;this.EI=this.qf=!1;this.Sn=void 0;this.Kba=this.NIa=this.IY=!1;this.ZW=0;this.Wb=null;this.LN=0}", "title": "" }, { "docid": "62aac9ee8386e3c580d676313f663074", "score": "0.5349089", "text": "function arrify( obj_or_arr )\n {\n return obj_or_arr\n\t ? (obj_or_arr instanceof Array ? obj_or_arr : [ obj_or_arr ])\n : []\n ;\n }", "title": "" }, { "docid": "349e4c1ee9707859ec999329b061d421", "score": "0.53451544", "text": "function Undef(o)\r\n{\r\n return typeof(o)=='undefined'||o===''||o==null\r\n}", "title": "" }, { "docid": "b03a2cd66f9e0b2620c7d2a0ff3570a5", "score": "0.53420556", "text": "function $NullElement() {}", "title": "" }, { "docid": "85f7e9d93e62056fbd2f3df035fb842b", "score": "0.5334778", "text": "function arrayOrNil(obj) { return (obj && typeof obj === OBJECT && typeof obj.length === NUMBER && !(obj.propertyIsEnumerable(LENGTH)) && obj) || null; }", "title": "" }, { "docid": "85f7e9d93e62056fbd2f3df035fb842b", "score": "0.5334778", "text": "function arrayOrNil(obj) { return (obj && typeof obj === OBJECT && typeof obj.length === NUMBER && !(obj.propertyIsEnumerable(LENGTH)) && obj) || null; }", "title": "" }, { "docid": "d9c2b1b58ebf0ddd77f0304e1c76a149", "score": "0.5325985", "text": "function foo() {\n return [1, 2, 3];\n}", "title": "" }, { "docid": "296121c8d54a87b27713bab91c771621", "score": "0.531379", "text": "function arrayUnwrap(val) {\n switch (val.length) {\n case 0:\n return undefined;\n case 1:\n return mode === \"auto\" ? val[0] : val;\n default:\n return val;\n }\n }", "title": "" }, { "docid": "2034fe94ab14274fa2539d2f999660fd", "score": "0.5310521", "text": "function processArrayArg(arr){\n if(typeof(arr)=='string') arr = [arr]\n if(!arr) return null\n return arr.length ? arr : null\n}", "title": "" }, { "docid": "56b4b59e99626d1bea8b485f356940b6", "score": "0.5308797", "text": "function Jf(e){return void 0===e&&(e=null),Xt(null!==e?e:\"store\")}", "title": "" }, { "docid": "cb53727608de4e872afbb4c394cac611", "score": "0.53042126", "text": "function n(e){return null==e?\"\":\"object\"===(void 0===e?\"undefined\":_i(e))?JSON.stringify(e,null,2):String(e)}", "title": "" }, { "docid": "417037922a321a77e9d3bed92e59d04b", "score": "0.53029406", "text": "function ensureArray(value) {\n if (Array.isArray(value)) {\n return value;\n }\n return [value];\n }", "title": "" }, { "docid": "74958928912ebbf85be85439676929a6", "score": "0.5299049", "text": "function u(e){return null!==e&&\"object\"==typeof e}", "title": "" }, { "docid": "97bed369aaefb2f3cd957812579ea7fb", "score": "0.52923614", "text": "function i(e){return void 0===e&&(e=null),Object(r[\"n\"])(null!==e?e:o)}", "title": "" }, { "docid": "39b20ff392cb5407d1744b5c3b23abfe", "score": "0.5287638", "text": "function $convertJsToDart(obj) {\n if (obj != null && typeof obj == 'object' && !(obj instanceof Array)) {\n return $fixupJsObjectToDartMap(obj);\n }\n return obj;\n}", "title": "" }, { "docid": "f6f68bdfeee024a187495f15443fa582", "score": "0.52849424", "text": "function n(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "4023f2aa6e779794971017dbb59a4bf0", "score": "0.5273256", "text": "function ensureArray(x) {\n return x instanceof Array ? x : [x];\n}", "title": "" } ]
6db1111227c4dc3a99f7e8bab2b1d50d
Opera <= 12 includes TextEvent in window, but does not fire text input events. Rely on keypress instead.
[ { "docid": "114713a54905a2f999ce65d1f837a12b", "score": "0.0", "text": "function isPresto() {\n\t var opera = window.opera;\n\t return (typeof opera === 'undefined' ? 'undefined' : _typeof(opera)) === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n\t}", "title": "" } ]
[ { "docid": "3fc515f049d5561eb227f77c9b58e134", "score": "0.64078885", "text": "function dispatchTextEvent(target, eventType, char) {\n var evt = document.createEvent(\"TextEvent\");\n evt.initTextEvent(eventType, true, true, window, char, 0, \"en-us\");\n target.dispatchEvent(evt);\n}", "title": "" }, { "docid": "96e4cc189e95f983c8882958b1588dd8", "score": "0.6397865", "text": "function KeyPress(ev){\r\nif(!ev) ev = window.event;\r\nif(T.readOnly) return true;\r\nif(Cancel){ CancelEvent(ev); return false; }\r\nif(ev && !BOpera8 && !BOpera && !BSafari && (!BIEA || Ins!=null) && (!BMozilla||!ev.altKey&&!ev.ctrlKey)){ \r\n \r\n var c = BIEA ? ev.keyCode : ev.charCode;\r\n if(c!=0) {\r\n if(c==13) c = 10;\r\n var v = (T.value==null?T.innerText:T.value).replace(/\\r\\n|\\r/g,\"\\n\");\r\n v = v.slice(0,Sel[0])+String.fromCharCode(c)+v.slice(Sel[1]+(BIEA && Ins?1:0));\r\n if(Test(v)){ CancelEvent(ev); return false; }\r\n }\r\n }\r\nif(opress) opress(ev);\r\nreturn true;\r\n}", "title": "" }, { "docid": "f71366e41490759fb4d305f639782b10", "score": "0.6315669", "text": "function MakeTextBoxUrduEnabled(txtObj){\n //set page event handlers\n\n if (window.attachEvent) { //Support is expected to discontinue in IE11\n //IE and Opera\n txtObj.attachEvent(\"onkeypress\", com_ajsoftpk_urdubar_eventCaptured);\n } else {\n //FireFox and Other\n txtObj.addEventListener(\"keypress\", com_ajsoftpk_urdubar_eventCaptured, false);\n }\n }", "title": "" }, { "docid": "6c2a4a6c474994a88381bda5e466ffff", "score": "0.6308097", "text": "function _textChanged ( /*[Object] event*/ e ) {\n\t\tvar keyup = new Event('keyup');\n\t\ttextarea.value = e.target.text;\n\t\ttextarea.dispatchEvent(keyup);\n\t}", "title": "" }, { "docid": "00f7870dcfb8805c8e7f8137ec2d4b53", "score": "0.6240653", "text": "function keydown_event(e) {\n\t debug('keydown \"' + e.key + '\" ' + e.fake + ' ' + e.which);\n\t process = (e.key || '').toLowerCase() === 'process' || e.which === 0;\n\t var result;\n\t dead_key = no_keypress && single_key;\n\t // special keys don't trigger keypress fix #293\n\t try {\n\t if (!e.fake) {\n\t single_key = e.key && e.key.length === 1 && !e.ctrlKey;\n\t // chrome on android support key property but it's \"Unidentified\"\n\t no_key = String(e.key).toLowerCase() === 'unidentified';\n\t backspace = e.key.toUpperCase() === 'BACKSPACE' || e.which === 8;\n\t }\n\t } catch (exception) {}\n\t // keydown created in input will have text already inserted and we\n\t // want text before input\n\t if (e.key === \"Unidentified\") {\n\t no_keydown = true;\n\t // android swift keyboard have always which == 229 we will triger proper\n\t // event in input with e.fake == true\n\t return;\n\t }\n\t if (!e.fake) {\n\t no_keypress = true;\n\t no_keydown = false;\n\t }\n\t // Meta+V did bind input but it didin't happen because terminal paste\n\t // prevent native insert action\n\t clip.off('input', paste);\n\t var key = get_key(e);\n\t if ($.isFunction(options.keydown)) {\n\t result = options.keydown(e);\n\t if (result !== undefined) {\n\t //prevent_keypress = true;\n\t if (!result) {\n\t skip_insert = true;\n\t }\n\t return result;\n\t }\n\t }\n\t if (enabled) {\n\t // CTRL+V don't fire keypress in IE11\n\t skip_insert = ['CTRL+V', 'META+V'].indexOf(key) !== -1;\n\t if (e.which !== 38 && !(e.which === 80 && e.ctrlKey)) {\n\t first_up_history = true;\n\t }\n\t // arrows / Home / End / ENTER\n\t if (reverse_search && (e.which === 35 || e.which === 36 ||\n\t e.which === 37 || e.which === 38 ||\n\t e.which === 39 || e.which === 40 ||\n\t e.which === 13 || e.which === 27)) {\n\t clear_reverse_state();\n\t draw_prompt();\n\t if (e.which === 27) { // ESC\n\t self.set('');\n\t }\n\t redraw();\n\t // finish reverse search and execute normal event handler\n\t /* jshint validthis:true */\n\t keydown_event.call(this, e);\n\t } else if ($.isFunction(keymap[key])) {\n\t result = keymap[key]();\n\t if (result === true) {\n\t return;\n\t }\n\t if (result !== undefined) {\n\t return result;\n\t }\n\t } else if (e.altKey) {\n\t return;\n\t } else {\n\t prevent_keypress = false;\n\t return;\n\t }\n\t // this will prevent for instance backspace to go back one page\n\t //prevent_keypress = true;\n\t //e.preventDefault();\n\t }\n\t }", "title": "" }, { "docid": "e422c97448b76ff9b3925ec5b024cd24", "score": "0.62129575", "text": "testHandleKeyUpForSafari() {\n setUserAgent('WEBKIT');\n setVersion(531);\n initImeHandler();\n\n fireImeKeySequence();\n assertImeMode();\n\n fireKeySequence(KeyCodes.ENTER);\n assertNotImeMode();\n }", "title": "" }, { "docid": "10959893dec1f7badf9602521628cfb3", "score": "0.6197172", "text": "function handleTextInput (e) {\n\tif (e.toString() !== \"[object KeyboardEvent]\") {\n\t\treturn;\n\t}\n\tif (e.code.toString() !== \"Enter\" || main_input.value.length === 0) {\n\t\treturn;\n\t}\n\tgame.handleTextInput(main_input.value);\n}", "title": "" }, { "docid": "bd4057c590d2df31e89b6f20f72cabf5", "score": "0.61892384", "text": "function n(){var t=this,i=window||global;_extends(this,{isNativeEvent:function(e){return e.originalEvent&&e.originalEvent.isTrusted!==!1},fakeInputEvent:function(i){t.isNativeEvent(i)&&e(i.target).trigger(\"input\")},misbehaves:function(i){t.isNativeEvent(i)&&(t.behavesOk(i),e(document).on(\"change.inputevent\",i.data.selector,t.fakeInputEvent),t.fakeInputEvent(i))},behavesOk:function(i){t.isNativeEvent(i)&&e(document).off(\"input.inputevent\",i.data.selector,t.behavesOk).off(\"change.inputevent\",i.data.selector,t.misbehaves)},install:function(){if(!i.inputEventPatched){i.inputEventPatched=\"0.0.3\";for(var n=[\"select\",'input[type=\"checkbox\"]','input[type=\"radio\"]','input[type=\"file\"]'],r=0;r<n.length;r++){var s=n[r];e(document).on(\"input.inputevent\",s,{selector:s},t.behavesOk).on(\"change.inputevent\",s,{selector:s},t.misbehaves)}}},uninstall:function(){delete i.inputEventPatched,e(document).off(\".inputevent\")}})}", "title": "" }, { "docid": "bd4057c590d2df31e89b6f20f72cabf5", "score": "0.61892384", "text": "function n(){var t=this,i=window||global;_extends(this,{isNativeEvent:function(e){return e.originalEvent&&e.originalEvent.isTrusted!==!1},fakeInputEvent:function(i){t.isNativeEvent(i)&&e(i.target).trigger(\"input\")},misbehaves:function(i){t.isNativeEvent(i)&&(t.behavesOk(i),e(document).on(\"change.inputevent\",i.data.selector,t.fakeInputEvent),t.fakeInputEvent(i))},behavesOk:function(i){t.isNativeEvent(i)&&e(document).off(\"input.inputevent\",i.data.selector,t.behavesOk).off(\"change.inputevent\",i.data.selector,t.misbehaves)},install:function(){if(!i.inputEventPatched){i.inputEventPatched=\"0.0.3\";for(var n=[\"select\",'input[type=\"checkbox\"]','input[type=\"radio\"]','input[type=\"file\"]'],r=0;r<n.length;r++){var s=n[r];e(document).on(\"input.inputevent\",s,{selector:s},t.behavesOk).on(\"change.inputevent\",s,{selector:s},t.misbehaves)}}},uninstall:function(){delete i.inputEventPatched,e(document).off(\".inputevent\")}})}", "title": "" }, { "docid": "bd4057c590d2df31e89b6f20f72cabf5", "score": "0.61892384", "text": "function n(){var t=this,i=window||global;_extends(this,{isNativeEvent:function(e){return e.originalEvent&&e.originalEvent.isTrusted!==!1},fakeInputEvent:function(i){t.isNativeEvent(i)&&e(i.target).trigger(\"input\")},misbehaves:function(i){t.isNativeEvent(i)&&(t.behavesOk(i),e(document).on(\"change.inputevent\",i.data.selector,t.fakeInputEvent),t.fakeInputEvent(i))},behavesOk:function(i){t.isNativeEvent(i)&&e(document).off(\"input.inputevent\",i.data.selector,t.behavesOk).off(\"change.inputevent\",i.data.selector,t.misbehaves)},install:function(){if(!i.inputEventPatched){i.inputEventPatched=\"0.0.3\";for(var n=[\"select\",'input[type=\"checkbox\"]','input[type=\"radio\"]','input[type=\"file\"]'],r=0;r<n.length;r++){var s=n[r];e(document).on(\"input.inputevent\",s,{selector:s},t.behavesOk).on(\"change.inputevent\",s,{selector:s},t.misbehaves)}}},uninstall:function(){delete i.inputEventPatched,e(document).off(\".inputevent\")}})}", "title": "" }, { "docid": "bd4057c590d2df31e89b6f20f72cabf5", "score": "0.61892384", "text": "function n(){var t=this,i=window||global;_extends(this,{isNativeEvent:function(e){return e.originalEvent&&e.originalEvent.isTrusted!==!1},fakeInputEvent:function(i){t.isNativeEvent(i)&&e(i.target).trigger(\"input\")},misbehaves:function(i){t.isNativeEvent(i)&&(t.behavesOk(i),e(document).on(\"change.inputevent\",i.data.selector,t.fakeInputEvent),t.fakeInputEvent(i))},behavesOk:function(i){t.isNativeEvent(i)&&e(document).off(\"input.inputevent\",i.data.selector,t.behavesOk).off(\"change.inputevent\",i.data.selector,t.misbehaves)},install:function(){if(!i.inputEventPatched){i.inputEventPatched=\"0.0.3\";for(var n=[\"select\",'input[type=\"checkbox\"]','input[type=\"radio\"]','input[type=\"file\"]'],r=0;r<n.length;r++){var s=n[r];e(document).on(\"input.inputevent\",s,{selector:s},t.behavesOk).on(\"change.inputevent\",s,{selector:s},t.misbehaves)}}},uninstall:function(){delete i.inputEventPatched,e(document).off(\".inputevent\")}})}", "title": "" }, { "docid": "1b9e23de333cbea7eb86fae819961006", "score": "0.61854434", "text": "function n(){var t=this,i=window||global;e.extend(this,{isNativeEvent:function(e){return e.originalEvent&&e.originalEvent.isTrusted!==!1},fakeInputEvent:function(i){t.isNativeEvent(i)&&e(i.target).trigger(\"input\")},misbehaves:function(i){t.isNativeEvent(i)&&(t.behavesOk(i),e(document).on(\"change.inputevent\",i.data.selector,t.fakeInputEvent),t.fakeInputEvent(i))},behavesOk:function(i){t.isNativeEvent(i)&&e(document).off(\"input.inputevent\",i.data.selector,t.behavesOk).off(\"change.inputevent\",i.data.selector,t.misbehaves)},install:function(){if(!i.inputEventPatched){i.inputEventPatched=\"0.0.3\";for(var n=[\"select\",'input[type=\"checkbox\"]','input[type=\"radio\"]','input[type=\"file\"]'],r=0;r<n.length;r++){var s=n[r];e(document).on(\"input.inputevent\",s,{selector:s},t.behavesOk).on(\"change.inputevent\",s,{selector:s},t.misbehaves)}}},uninstall:function(){delete i.inputEventPatched,e(document).off(\".inputevent\")}})}", "title": "" }, { "docid": "1b9e23de333cbea7eb86fae819961006", "score": "0.61854434", "text": "function n(){var t=this,i=window||global;e.extend(this,{isNativeEvent:function(e){return e.originalEvent&&e.originalEvent.isTrusted!==!1},fakeInputEvent:function(i){t.isNativeEvent(i)&&e(i.target).trigger(\"input\")},misbehaves:function(i){t.isNativeEvent(i)&&(t.behavesOk(i),e(document).on(\"change.inputevent\",i.data.selector,t.fakeInputEvent),t.fakeInputEvent(i))},behavesOk:function(i){t.isNativeEvent(i)&&e(document).off(\"input.inputevent\",i.data.selector,t.behavesOk).off(\"change.inputevent\",i.data.selector,t.misbehaves)},install:function(){if(!i.inputEventPatched){i.inputEventPatched=\"0.0.3\";for(var n=[\"select\",'input[type=\"checkbox\"]','input[type=\"radio\"]','input[type=\"file\"]'],r=0;r<n.length;r++){var s=n[r];e(document).on(\"input.inputevent\",s,{selector:s},t.behavesOk).on(\"change.inputevent\",s,{selector:s},t.misbehaves)}}},uninstall:function(){delete i.inputEventPatched,e(document).off(\".inputevent\")}})}", "title": "" }, { "docid": "1b9e23de333cbea7eb86fae819961006", "score": "0.61854434", "text": "function n(){var t=this,i=window||global;e.extend(this,{isNativeEvent:function(e){return e.originalEvent&&e.originalEvent.isTrusted!==!1},fakeInputEvent:function(i){t.isNativeEvent(i)&&e(i.target).trigger(\"input\")},misbehaves:function(i){t.isNativeEvent(i)&&(t.behavesOk(i),e(document).on(\"change.inputevent\",i.data.selector,t.fakeInputEvent),t.fakeInputEvent(i))},behavesOk:function(i){t.isNativeEvent(i)&&e(document).off(\"input.inputevent\",i.data.selector,t.behavesOk).off(\"change.inputevent\",i.data.selector,t.misbehaves)},install:function(){if(!i.inputEventPatched){i.inputEventPatched=\"0.0.3\";for(var n=[\"select\",'input[type=\"checkbox\"]','input[type=\"radio\"]','input[type=\"file\"]'],r=0;r<n.length;r++){var s=n[r];e(document).on(\"input.inputevent\",s,{selector:s},t.behavesOk).on(\"change.inputevent\",s,{selector:s},t.misbehaves)}}},uninstall:function(){delete i.inputEventPatched,e(document).off(\".inputevent\")}})}", "title": "" }, { "docid": "1b9e23de333cbea7eb86fae819961006", "score": "0.61854434", "text": "function n(){var t=this,i=window||global;e.extend(this,{isNativeEvent:function(e){return e.originalEvent&&e.originalEvent.isTrusted!==!1},fakeInputEvent:function(i){t.isNativeEvent(i)&&e(i.target).trigger(\"input\")},misbehaves:function(i){t.isNativeEvent(i)&&(t.behavesOk(i),e(document).on(\"change.inputevent\",i.data.selector,t.fakeInputEvent),t.fakeInputEvent(i))},behavesOk:function(i){t.isNativeEvent(i)&&e(document).off(\"input.inputevent\",i.data.selector,t.behavesOk).off(\"change.inputevent\",i.data.selector,t.misbehaves)},install:function(){if(!i.inputEventPatched){i.inputEventPatched=\"0.0.3\";for(var n=[\"select\",'input[type=\"checkbox\"]','input[type=\"radio\"]','input[type=\"file\"]'],r=0;r<n.length;r++){var s=n[r];e(document).on(\"input.inputevent\",s,{selector:s},t.behavesOk).on(\"change.inputevent\",s,{selector:s},t.misbehaves)}}},uninstall:function(){delete i.inputEventPatched,e(document).off(\".inputevent\")}})}", "title": "" }, { "docid": "a0f84bd54530bd389bb3494ef7118e8f", "score": "0.61554813", "text": "function l(){var e=this,i=window||n;a(this,{isNativeEvent:function(t){return t.originalEvent&&!1!==t.originalEvent.isTrusted},fakeInputEvent:function(i){e.isNativeEvent(i)&&t(i.target).trigger(\"input\")},misbehaves:function(i){e.isNativeEvent(i)&&(e.behavesOk(i),t(document).on(\"change.inputevent\",i.data.selector,e.fakeInputEvent),e.fakeInputEvent(i))},behavesOk:function(i){e.isNativeEvent(i)&&t(document).off(\"input.inputevent\",i.data.selector,e.behavesOk).off(\"change.inputevent\",i.data.selector,e.misbehaves)},install:function(){if(!i.inputEventPatched){i.inputEventPatched=\"0.0.3\";for(var n=[\"select\",'input[type=\"checkbox\"]','input[type=\"radio\"]','input[type=\"file\"]'],r=0;r<n.length;r++){var o=n[r];t(document).on(\"input.inputevent\",o,{selector:o},e.behavesOk).on(\"change.inputevent\",o,{selector:o},e.misbehaves)}}},uninstall:function(){delete i.inputEventPatched,t(document).off(\".inputevent\")}})}", "title": "" }, { "docid": "5089dfd205638518fbf212f4bfbc06ea", "score": "0.6104417", "text": "function zXStdOnKeyPress(evt, _session, _entity, _qs, _pf, _action, _whereGroup) \r\n{\r\n\tif (!evt) var evt = window.event;\r\n\t\r\n\t//----\r\n\t// Cr-Lf will force submit of form\r\n\t//----\r\n\tif (evt && getKeyCode(evt) == 13)\r\n\t{\r\n\t\tzXStdQS(_session, _entity, _qs, _pf, _action, _whereGroup);\r\n\t\treturn true;\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn true;\r\n\t}\r\n}", "title": "" }, { "docid": "fc8eb7226b2e312de05be5843541711b", "score": "0.61002254", "text": "function onkeyup(evt){\n evt=evt||window.event||null;\n if (fdjtDOM.isTextInput(fdjtDOM.T(evt))) return true;\n else if ((evt.ctrlKey)||(evt.altKey)||(evt.metaKey)) return true;\n else {}}", "title": "" }, { "docid": "21a0b5755a0d0705860bfc916b1ac76b", "score": "0.60942954", "text": "_textBoxKeyDownHandler(event) {\n const that = this,\n key = event.key;\n\n if (that._scrollView) {\n that._handleScrollbarsDisplay();\n }\n\n that._autoExpandUpdate();\n that.value && that.value.length > 0 ? that.$.addClass('has-value') : that.$.removeClass('has-value');\n\n if (['Enter', 'Escape'].indexOf(key) === -1) {\n that._preventProgramaticValueChange = true;\n }\n\n if (['ArrowLeft', 'ArrowUp', 'ArrowDown', 'ArrowRight'].indexOf(key) > -1) {\n that._scrollView.scrollTo(that.$.input.scrollTop);\n }\n\n if (['PageUp', 'PageDown'].indexOf(key) > -1 && JQX.Utilities.Core.Browser.Chrome) {\n if (event.key === 'PageUp') {\n that.$.input.setSelectionRange(0, 0);\n that.$.input.scrollTop = 0;\n }\n\n if (event.key === 'PageDown') {\n that.$.input.setSelectionRange(that.$.input.value.length, that.$.input.value.length);\n that.$.input.scrollTop = that._scrollView.verticalScrollBar.max;\n }\n\n event.preventDefault();\n }\n }", "title": "" }, { "docid": "f09715184928240443e1933018f1cb69", "score": "0.60548085", "text": "function testOperaStyleKeyHandling() {\n goog.userAgent.OPERA = true;\n goog.userAgent.IE = false;\n goog.userAgent.GECKO = false;\n goog.userAgent.CAMINO = false;\n goog.userAgent.WEBKIT = false;\n goog.userAgent.MAC = false;\n goog.userAgent.WINDOWS = true;\n goog.userAgent.LINUX = false;\n goog.events.KeyHandler.USES_KEYDOWN_ = false;\n\n var keyEvent, keyHandler = new goog.events.KeyHandler();\n goog.events.listen(keyHandler, goog.events.KeyHandler.EventType.KEY,\n function(e) { keyEvent = e; });\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.ENTER);\n fireKeyPress(keyHandler, goog.events.KeyCodes.ENTER);\n assertEquals('Enter should fire a key event with the keycode 13',\n goog.events.KeyCodes.ENTER,\n keyEvent.keyCode);\n assertEquals('Enter should fire a key event with the charcode 0',\n 0,\n keyEvent.charCode);\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.ESC);\n fireKeyPress(keyHandler, goog.events.KeyCodes.ESC);\n assertEquals('Esc should fire a key event with the keycode 27',\n goog.events.KeyCodes.ESC,\n keyEvent.keyCode);\n assertEquals('Esc should fire a key event with the charcode 0',\n 0,\n keyEvent.charCode);\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.UP);\n fireKeyPress(keyHandler, goog.events.KeyCodes.UP);\n assertEquals('Up should fire a key event with the keycode 38',\n goog.events.KeyCodes.UP,\n keyEvent.keyCode);\n assertEquals('Up should fire a key event with the charcode 0',\n 0,\n keyEvent.charCode);\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.SEVEN, undefined, undefined,\n undefined, undefined, true);\n fireKeyPress(keyHandler, 38, undefined, undefined, undefined, undefined,\n true);\n assertEquals('Shift+7 should fire a key event with the keycode 55',\n goog.events.KeyCodes.SEVEN,\n keyEvent.keyCode);\n assertEquals('Shift+7 should fire a key event with the charcode 38',\n 38,\n keyEvent.charCode);\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.A);\n fireKeyPress(keyHandler, 97);\n assertEquals('Lower case a should fire a key event with the keycode 65',\n goog.events.KeyCodes.A,\n keyEvent.keyCode);\n assertEquals('Lower case a should fire a key event with the charcode 97',\n 97,\n keyEvent.charCode);\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.A);\n fireKeyPress(keyHandler, 65);\n assertEquals('Upper case A should fire a key event with the keycode 65',\n goog.events.KeyCodes.A,\n keyEvent.keyCode);\n assertEquals('Upper case A should fire a key event with the charcode 65',\n 65,\n keyEvent.charCode);\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.DELETE);\n fireKeyPress(keyHandler, goog.events.KeyCodes.DELETE);\n assertEquals('Delete should fire a key event with the keycode 46',\n goog.events.KeyCodes.DELETE,\n keyEvent.keyCode);\n assertEquals('Delete should fire a key event with the charcode 0',\n 0,\n keyEvent.charCode);\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.PERIOD);\n fireKeyPress(keyHandler, 46);\n assertEquals('Period should fire a key event with the keycode 190',\n goog.events.KeyCodes.PERIOD,\n keyEvent.keyCode);\n assertEquals('Period should fire a key event with the charcode 46',\n 46,\n keyEvent.charCode);\n}", "title": "" }, { "docid": "a92d3f4f3f8b23edc85f7122aa8baad3", "score": "0.6001843", "text": "function v(e,t,n){if(\"topSelectionChange\"===e||\"topKeyUp\"===e||\"topKeyDown\"===e)\n// On the selectionchange event, the target is just document which isn't\n// helpful for us so just check activeElement instead.\n//\n// 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire\n// propertychange on the first input event after setting `value` from a\n// script and fires only keydown, keypress, keyup. Catching keyup usually\n// gets it and catching keydown lets us fire an event for the first\n// keystroke if user does a key repeat (it'll be a little delayed: right\n// before the second keystroke). Other input methods (e.g., paste) seem to\n// fire selectionchange normally.\nreturn l(O,n)}", "title": "" }, { "docid": "7f6d8fc2e098bd25d9301b527010e450", "score": "0.6000504", "text": "function textChangeEvent(text) {\n const event = makeEvent();\n event.target = {value: text};\n return event;\n}", "title": "" }, { "docid": "8a0551f99230ef4d22ce647df5d79b49", "score": "0.59979224", "text": "function CLC_SR_SpeakHTMLFocus_EventAnnouncer(event){\r\n if (!CLC_SR_Query_SpeakEvents()){\r\n return;\r\n }\r\n if (event.target.tagName.toLowerCase() == \"body\"){ //If the body is focused, it is either an \r\n //attempt to defocus something or it is \r\n //handled by the active descendant. \r\n //Therefore, do not try to speak the \r\n //body on focus.\r\n return;\r\n }\r\n\r\n if (CLC_SR_ActOnFocusedElements){\r\n try{\r\n if (event.target) { \r\n CLC_SR_PrevAtomicObject = CLC_SR_CurrentAtomicObject;\r\n CLC_SR_CurrentAtomicObject = event.target;\r\n CLC_MoveCaret(CLC_SR_CurrentAtomicObject);\r\n CLC_SR_SpeakEventBuffer = CLC_GetTextContentOfAllChildren(CLC_SR_CurrentAtomicObject); \r\n if (event.target.hasAttribute && event.target.hasAttribute('aria-activedescendant')){\r\n var activeDescendantId = event.target.getAttribute('aria-activedescendant');\r\n var activeDescendant = CLC_Window().document.getElementById(activeDescendantId);\r\n if (activeDescendant){\r\n CLC_SR_SpeakEventBuffer = CLC_GetTextContentOfAllChildren(activeDescendant); \r\n }\r\n }\r\n window.setTimeout(\"CLC_Shout(CLC_SR_SpeakEventBuffer,0); CLC_Say(CLC_GetStatus(CLC_SR_CurrentAtomicObject), 0);\", 10);\r\n }\r\n }\r\n catch(e){};\r\n }\r\n }", "title": "" }, { "docid": "e68e7c37494c3284e27a4ee34708423c", "score": "0.5995039", "text": "function KeyDown(ev){\r\nif(T.readOnly) return true;\r\nfunction end(){ if(odown) odown(ev); return true; } \r\nif(!ev) ev = window.event;\r\nif(Sel){ \r\n var v = (T.value==null?T.innerText:T.value).replace(/\\r\\n|\\r/g,\"\\n\"); if(digits) for(var i=0;i<10;i++) v = v.replace(digits[i],i);\r\n if(v.search(RMaskEdit)==-1){\r\n if(T.value==null) T.innerHTML = Last; else T.value = Last;\r\n SetSelection(T,Sel[0],Sel[1]);\r\n }\r\n }\r\nLast = T.value==null?T.innerHTML:T.value;\r\nMozEnd = null;\r\nif(Ins && BMozilla){\r\n var c = ev.keyCode;\r\n if(c!=37&&c!=38&&c!=40&&c!=8&&c!=45){\r\n MozEnd = T.selectionEnd;\r\n T.selectionEnd+=1;\r\n }\r\n }\r\nSel = GetSelection(T);\r\nCancel = 0;\r\nif(ev){\r\n if(ev.shiftKey || ev.altKey || ev.ctrlKey) return end(); \r\n var c = ev.keyCode, s = Sel[0], e = Sel[1], v = (T.value==null?T.innerText:T.value).replace(/\\r\\n|\\r/g,\"\\n\");\r\n if(c==0) c = ev.charCode; \r\n if(c==45){ \r\n if(Ins!=null) Ins = !Ins; \r\n return end();\r\n }\r\n else if(c==8){\r\n if(s && s==e) s--;\r\n \r\n }\r\n else if(c==46 && e<v.length-1 && s==e) e++; \r\n else return end();\r\n v = v.slice(0,s)+v.slice(e);\r\n if(Test(v)){ CancelEvent(ev); Cancel = 1; return false; }\r\n }\r\nreturn end();\r\n}", "title": "" }, { "docid": "e05b73a94bba5664d5697651d5d978fd", "score": "0.5948801", "text": "onKeyUpPresed() {}", "title": "" }, { "docid": "e6f4f1f9fada5058b220167976d2f6ee", "score": "0.5919006", "text": "function keyboard_input() {\n\tdocument.addEventListener(\"keydown\", event_handling);\n\n}", "title": "" }, { "docid": "b8cc491b42e910667a5e7af41e53c322", "score": "0.58931077", "text": "handleTextInput(event) {\n let preventDefault = false;\n const key = keyValidator(event.key);\n if (event) {\n switch (key) {\n case KeyCodes.Enter:\n if (this.toggleService.open && this.pseudoFocus.model) {\n if (this.selectionService.multiselectable) {\n this.selectionService.toggle(this.pseudoFocus.model.value);\n }\n else {\n this.selectionService.select(this.pseudoFocus.model.value);\n }\n preventDefault = true;\n }\n break;\n case KeyCodes.Space:\n if (!this.toggleService.open) {\n this.toggleService.open = true;\n preventDefault = true;\n }\n break;\n case KeyCodes.ArrowUp:\n this.preventViewportScrolling(event);\n this.openAndMoveTo(ArrowKeyDirection.UP);\n preventDefault = true;\n break;\n case KeyCodes.ArrowDown:\n this.preventViewportScrolling(event);\n this.openAndMoveTo(ArrowKeyDirection.DOWN);\n preventDefault = true;\n break;\n default:\n // Any other keypress\n if (event.key !== KeyCodes.Tab &&\n !(this.selectionService.multiselectable && event.key === KeyCodes.Backspace) &&\n !this.toggleService.open) {\n this.toggleService.open = true;\n }\n break;\n }\n }\n return preventDefault;\n }", "title": "" }, { "docid": "20ce70615df19c75c426078713df1001", "score": "0.58628255", "text": "function userInput(e) {\n let textField = document.getElementsByTagName('p')[currentCellId];\n console.log(\"clicked text \" + textField.id);\n switch(e.key) {\n case \"1\":\n textField.innerHTML = e.key;\n break;\n case \"2\":\n textField.innerHTML = e.key;\n break;\n case \"3\":\n textField.innerHTML = e.key;\n break;\n case \"4\":\n textField.innerHTML = e.key;\n break;\n case \"5\":\n textField.innerHTML = e.key;\n break;\n case \"6\":\n textField.innerHTML = e.key;\n break;\n case \"7\":\n textField.innerHTML = e.key;\n break;\n case \"8\":\n textField.innerHTML = e.key;\n break;\n case \"9\":\n textField.innerHTML = e.key;\n break;\n default:\n }\n\n}", "title": "" }, { "docid": "6b78bb9324b33d01d36f8c8b9fefbc30", "score": "0.5810165", "text": "function testSafari3StyleKeyHandling() {\n goog.userAgent.OPERA = false;\n goog.userAgent.IE = false;\n goog.userAgent.GECKO = false;\n goog.userAgent.CAMINO = false;\n goog.userAgent.WEBKIT = true;\n goog.userAgent.MAC = true;\n goog.userAgent.WINDOWS = false;\n goog.userAgent.LINUX = false;\n goog.events.KeyHandler.USES_KEYDOWN_ = true;\n goog.userAgent.VERSION = 525.3;\n\n var keyEvent, keyHandler = new goog.events.KeyHandler();\n // Make sure all events are caught while testing\n goog.events.listen(keyHandler, goog.events.KeyHandler.EventType.KEY,\n function(e) { keyEvent = e; });\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.ENTER);\n fireKeyPress(keyHandler, goog.events.KeyCodes.ENTER);\n assertEquals('Enter should fire a key event with the keycode 13',\n goog.events.KeyCodes.ENTER,\n keyEvent.keyCode);\n assertEquals('Enter should fire a key event with the charcode 0',\n 0,\n keyEvent.charCode);\n fireKeyUp(keyHandler, goog.events.KeyCodes.ENTER);\n\n // Add a listener to ensure that an extra ENTER event is not dispatched\n // by a subsequent keypress.\n var enterCheck = goog.events.listen(keyHandler,\n goog.events.KeyHandler.EventType.KEY,\n function(e) {\n assertNotEquals('Unexpected ENTER keypress dispatched',\n e.keyCode, goog.events.KeyCodes.ENTER);\n });\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.ESC);\n assertEquals('Esc should fire a key event with the keycode 27',\n goog.events.KeyCodes.ESC,\n keyEvent.keyCode);\n assertEquals('Esc should fire a key event with the charcode 0',\n 0,\n keyEvent.charCode);\n fireKeyPress(keyHandler, goog.events.KeyCodes.ESC);\n goog.events.unlistenByKey(enterCheck);\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.UP);\n assertEquals('Up should fire a key event with the keycode 38',\n goog.events.KeyCodes.UP,\n keyEvent.keyCode);\n assertEquals('Up should fire a key event with the charcode 0',\n 0,\n keyEvent.charCode);\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.SEVEN, undefined, undefined,\n undefined, undefined, true);\n fireKeyPress(keyHandler, 38, 38, undefined, undefined, undefined, true);\n assertEquals('Shift+7 should fire a key event with the keycode 55',\n goog.events.KeyCodes.SEVEN,\n keyEvent.keyCode);\n assertEquals('Shift+7 should fire a key event with the charcode 38',\n 38,\n keyEvent.charCode);\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.A);\n fireKeyPress(keyHandler, 97, 97);\n assertEquals('Lower case a should fire a key event with the keycode 65',\n goog.events.KeyCodes.A,\n keyEvent.keyCode);\n assertEquals('Lower case a should fire a key event with the charcode 97',\n 97,\n keyEvent.charCode);\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.A);\n fireKeyPress(keyHandler, 65, 65);\n assertEquals('Upper case A should fire a key event with the keycode 65',\n goog.events.KeyCodes.A,\n keyEvent.keyCode);\n assertEquals('Upper case A should fire a key event with the charcode 65',\n 65,\n keyEvent.charCode);\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.CTRL);\n fireKeyDown(keyHandler, goog.events.KeyCodes.A, null, null, true /*ctrl*/);\n assertEquals('A with control down should fire a key event',\n goog.events.KeyCodes.A,\n keyEvent.keyCode);\n\n // Test that Alt-Tab outside the window doesn't break things.\n fireKeyDown(keyHandler, goog.events.KeyCodes.ALT);\n keyEvent.keyCode = -1; // Reset the event.\n fireKeyDown(keyHandler, goog.events.KeyCodes.A);\n assertEquals('Should not have dispatched an Alt-A', -1, keyEvent.keyCode);\n fireKeyPress(keyHandler, 65, 65);\n assertEquals('Alt should be ignored since it isn\\'t currently depressed',\n goog.events.KeyCodes.A,\n keyEvent.keyCode);\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.DELETE);\n assertEquals('Delete should fire a key event with the keycode 46',\n goog.events.KeyCodes.DELETE,\n keyEvent.keyCode);\n assertEquals('Delete should fire a key event with the charcode 0',\n 0,\n keyEvent.charCode);\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.PERIOD);\n fireKeyPress(keyHandler, 46, 46);\n assertEquals('Period should fire a key event with the keycode 190',\n goog.events.KeyCodes.PERIOD,\n keyEvent.keyCode);\n assertEquals('Period should fire a key event with the charcode 46',\n 46,\n keyEvent.charCode);\n\n // Safari sends zero key code for non-latin characters.\n fireKeyDown(keyHandler, 0, 0);\n fireKeyPress(keyHandler, 1092, 1092);\n assertEquals('Cyrillic small letter \"Ef\" should fire a key event with ' +\n 'the keycode 0',\n 0,\n keyEvent.keyCode);\n assertEquals('Cyrillic small letter \"Ef\" should fire a key event with ' +\n 'the charcode 1092',\n 1092,\n keyEvent.charCode);\n}", "title": "" }, { "docid": "85b256d6df7cd76183aad71e836acf47", "score": "0.57900524", "text": "function InputEvent() {\n var _this13 = this;\n\n var globals = window || global;\n\n // Slightly odd way construct our object. This way methods are force bound.\n // Used to test for duplicate library.\n $.extend(this, {\n\n // For browsers that do not support isTrusted, assumes event is native.\n isNativeEvent: function isNativeEvent(evt) {\n return evt.originalEvent && evt.originalEvent.isTrusted !== false;\n },\n\n fakeInputEvent: function fakeInputEvent(evt) {\n if (_this13.isNativeEvent(evt)) {\n $(evt.target).trigger('input');\n }\n },\n\n misbehaves: function misbehaves(evt) {\n if (_this13.isNativeEvent(evt)) {\n _this13.behavesOk(evt);\n $(document).on('change.inputevent', evt.data.selector, _this13.fakeInputEvent);\n _this13.fakeInputEvent(evt);\n }\n },\n\n behavesOk: function behavesOk(evt) {\n if (_this13.isNativeEvent(evt)) {\n $(document) // Simply unbinds the testing handler\n .off('input.inputevent', evt.data.selector, _this13.behavesOk).off('change.inputevent', evt.data.selector, _this13.misbehaves);\n }\n },\n\n // Bind the testing handlers\n install: function install() {\n if (globals.inputEventPatched) {\n return;\n }\n globals.inputEventPatched = '0.0.3';\n var _arr = ['select', 'input[type=\"checkbox\"]', 'input[type=\"radio\"]', 'input[type=\"file\"]'];\n for (var _i = 0; _i < _arr.length; _i++) {\n var selector = _arr[_i];\n $(document).on('input.inputevent', selector, { selector: selector }, _this13.behavesOk).on('change.inputevent', selector, { selector: selector }, _this13.misbehaves);\n }\n },\n\n uninstall: function uninstall() {\n delete globals.inputEventPatched;\n $(document).off('.inputevent');\n }\n\n });\n }", "title": "" }, { "docid": "1922c19daa3996b276db6bb199348907", "score": "0.5787292", "text": "function testInput(event) {\r\n\tvar value = String.fromCharCode(event.which);\r\n\tvar pattern = new RegExp(/[a-zåäö ]/i);\r\n\treturn pattern.test(value);\r\n}", "title": "" }, { "docid": "5121f7f4c2e0c7632de0383eff71488b", "score": "0.5785527", "text": "function listenKeypressMissiles() {\n document.addEventListener('keypress', onKeyPress)\n}", "title": "" }, { "docid": "3d8dae74cab37c537c037267f36110f8", "score": "0.5782892", "text": "function onkeydown(evt){\n evt=evt||window.event||null;\n var kc=evt.keyCode;\n var target=fdjtUI.T(evt);\n // fdjtLog(\"sbook_onkeydown %o\",evt);\n if (evt.keyCode===27) { /* Escape works anywhere */\n if (Codex.previewing) {\n Codex.stopPreview(\"escape_key\");\n fdjtUI.TapHold.clear();}\n if (Codex.mode===\"addgloss\") Codex.cancelGloss();\n if (Codex.mode) {\n Codex.last_mode=Codex.mode;\n Codex.setMode(false);\n Codex.setTarget(false);\n fdjtID(\"CODEXSEARCHINPUT\").blur();}\n else {}\n return;}\n else if ((target.tagName===\"TEXTAREA\")||\n (target.tagName===\"INPUT\")||\n (target.tagName===\"BUTTON\"))\n return;\n else if ((Codex.controlc)&&(evt.ctrlKey)&&((kc===99)||(kc===67))) {\n if (Codex.previewing) Codex.stopPreview(\"onkeydown\",true);\n fdjtUI.TapHold.clear();\n Codex.setMode(\"console\");\n fdjt.UI.cancel(evt);}\n else if ((evt.altKey)||(evt.ctrlKey)||(evt.metaKey)) return true;\n else if (Codex.previewing) {\n // Any key stops a preview and goes to the target\n Codex.stopPreview(\"onkeydown\",true);\n fdjtUI.TapHold.clear();\n Codex.setHUD(false);\n fdjt.UI.cancel(evt);\n return false;}\n else if (hasClass(document.body,\"cxCOVER\")) {\n Codex.clearStateDialog();\n Codex.hideCover();\n fdjt.UI.cancel(evt);\n return false;}\n else if (Codex.glossform) {\n var input=fdjt.DOM.getInput(Codex.glossform,\"NOTE\");\n glossform_focus(Codex.glossform); Codex.setFocus(input); input.focus();\n var new_evt=document.createEvent(\"UIEvent\");\n new_evt.initUIEvent(\"keydown\",true,true,window); new_evt.keyCode=kc;\n input.dispatchEvent(new_evt);\n fdjtUI.cancel(evt);\n return;}\n else if (kc===34) Codex.pageForward(evt); /* page down */\n else if (kc===33) Codex.pageBackward(evt); /* page up */\n else if (kc===40) { /* arrow down */\n Codex.setHUD(false);\n Codex.pageForward(evt);}\n else if (kc===38) { /* arrow up */\n Codex.setHUD(false);\n Codex.pageBackward(evt);}\n else if (kc===37) Codex.skimBackward(evt); /* arrow left */\n else if (kc===39) Codex.skimForward(evt); /* arrow right */\n // Don't interrupt text input for space, etc\n else if (fdjtDOM.isTextInput(fdjtDOM.T(evt))) return true;\n else if (kc===32) // Space\n Codex.Forward(evt);\n // backspace or delete\n else if ((kc===8)||(kc===45))\n Codex.Backward(evt);\n // Home goes to the current head.\n else if (kc===36) Codex.JumpTo(Codex.head);\n else if (Codex.mode===\"addgloss\") {\n var mode=Codex.getGlossMode();\n if (mode) return;\n var formdiv=fdjtID(\"CODEXLIVEGLOSS\");\n var form=(formdiv)&&(getChild(formdiv,\"FORM\"));\n if (!(form)) return;\n if (kc===13) { // return/newline\n submitEvent(form);}\n else if ((kc===35)||(kc===91)) // # or [\n Codex.setGlossMode(\"addtag\",form);\n else if (kc===32) // Space\n Codex.setGlossMode(\"editnote\",form);\n else if ((kc===47)||(kc===58)) // /or :\n Codex.setGlossMode(\"attach\",form);\n else if ((kc===64)) // @\n Codex.setGlossMode(\"addoutlet\",form);\n else {}}\n else return;\n fdjtUI.cancel(evt);}", "title": "" }, { "docid": "701ca147e289cfaae1c6905de69cd49a", "score": "0.5779959", "text": "function onkeydown(event) {\n\t\tvar tagname = event.target.tagName.toLowerCase();\n\t\tvar keyCode = event.which || event.keyCode;\n\t\tif (tagname !== 'input' && tagname !== 'textarea' && keyCode === 27) {\n\t\t\t// ESC\n\t\t\tfire({\n\t\t\t\tnode: node,\n\t\t\t\toriginal: event\n\t\t\t});\n\t\t}\n\t}", "title": "" }, { "docid": "dcd4244a33e81e947eeb80df5616665c", "score": "0.57610893", "text": "function inputKeyHandling(event) {\n\tvar textArea = document.getElementById(\"equation-container\");\n\tvar inputIndex = textArea.selectionStart - 1;\n\tif(inputIndex < 0) {\n\t\tinputIndex = 0;\n\t}\n\tif(!/\\d|[\\+\\-\\*\\/\\^\\%\\(\\)\\.E]/.test(textArea.value[inputIndex])) {\n\t\ttextArea.value = textArea.value.slice(0, inputIndex) + textArea.value.slice(inputIndex + 1, textArea.value.length);\n\t\ttextArea.selectionStart = inputIndex;\n\t\ttextArea.selectionEnd = inputIndex;\n\t}\n}", "title": "" }, { "docid": "89ed1f37536dc65f69ca11d90d848266", "score": "0.57495856", "text": "function InputTextHandler(e) {\n\t setInputText(e.target.value);\n }", "title": "" }, { "docid": "64716ccc8e683009d45ba509bb2b9400", "score": "0.57439315", "text": "function keyUpHandler(e) {\n if (isWindowFocused) {\n //the keyup gets fired on new tab ctrl + t in Firefox\n controlPressed = e.ctrlKey;\n }\n }", "title": "" }, { "docid": "c72b61189b6c94c1ccff736cb1f4bc02", "score": "0.5734464", "text": "function handleKeyDown(textBoxID, oEvent)\n{\n var c = oEvent.keyCode || oEvent.which;\n\n if (c == 38 || c == 40)\n {\n //window.alert( 'up or down key pressed' );\n // cancel default behavior on key down (moving to the left or the right in the text input box)\n return false;\n }\n}", "title": "" }, { "docid": "737de504a35fc0dec348049a320b8c81", "score": "0.5729001", "text": "function keyUpHandler(e){\n if(isWindowFocused){ //the keyup gets fired on new tab ctrl + t in Firefox\n controlPressed = e.ctrlKey;\n }\n }", "title": "" }, { "docid": "737de504a35fc0dec348049a320b8c81", "score": "0.5729001", "text": "function keyUpHandler(e){\n if(isWindowFocused){ //the keyup gets fired on new tab ctrl + t in Firefox\n controlPressed = e.ctrlKey;\n }\n }", "title": "" }, { "docid": "737de504a35fc0dec348049a320b8c81", "score": "0.5729001", "text": "function keyUpHandler(e){\n if(isWindowFocused){ //the keyup gets fired on new tab ctrl + t in Firefox\n controlPressed = e.ctrlKey;\n }\n }", "title": "" }, { "docid": "737de504a35fc0dec348049a320b8c81", "score": "0.5729001", "text": "function keyUpHandler(e){\n if(isWindowFocused){ //the keyup gets fired on new tab ctrl + t in Firefox\n controlPressed = e.ctrlKey;\n }\n }", "title": "" }, { "docid": "737de504a35fc0dec348049a320b8c81", "score": "0.5729001", "text": "function keyUpHandler(e){\n if(isWindowFocused){ //the keyup gets fired on new tab ctrl + t in Firefox\n controlPressed = e.ctrlKey;\n }\n }", "title": "" }, { "docid": "737de504a35fc0dec348049a320b8c81", "score": "0.5729001", "text": "function keyUpHandler(e){\n if(isWindowFocused){ //the keyup gets fired on new tab ctrl + t in Firefox\n controlPressed = e.ctrlKey;\n }\n }", "title": "" }, { "docid": "11bd9e7ca7cbba0c892efe0e9d0d799b", "score": "0.5717008", "text": "function keyUpHandler(e){\r\n if(isWindowFocused){ //the keyup gets fired on new tab ctrl + t in Firefox\r\n controlPressed = e.ctrlKey;\r\n }\r\n }", "title": "" }, { "docid": "11bd9e7ca7cbba0c892efe0e9d0d799b", "score": "0.5717008", "text": "function keyUpHandler(e){\r\n if(isWindowFocused){ //the keyup gets fired on new tab ctrl + t in Firefox\r\n controlPressed = e.ctrlKey;\r\n }\r\n }", "title": "" }, { "docid": "11bd9e7ca7cbba0c892efe0e9d0d799b", "score": "0.5717008", "text": "function keyUpHandler(e){\r\n if(isWindowFocused){ //the keyup gets fired on new tab ctrl + t in Firefox\r\n controlPressed = e.ctrlKey;\r\n }\r\n }", "title": "" }, { "docid": "e64a1ea6f8deee75c8e5b932eec53630", "score": "0.5710845", "text": "function input(event_type) {\r\n\tinput_keyboard_options_with_one_state(0, event_type, \"lowercase_alphabet\"); //virtual_keyboard option 0; alphabet\r\n\tinput_keyboard_options_with_two_states(1, event_type, \"lowercase_accent_characters_one\", 8, 9); //virtual_keyboard option 1; accent characters one\r\n\tinput_keyboard_options_with_two_states(2, event_type, \"lowercase_accent_characters_two\", 10, 11); //virtual_keyboard option 2; accent characters two\r\n\tinput_keyboard_options_with_one_state(3, event_type, \"lowercase_accent_characters_three\"); //virtual_keyboard option 3; accent characters three\r\n\tinput_keyboard_options_with_one_state(4, event_type, \"lowercase_accent_characters_four\"); //virtual_keyboard option 4; accent characters four\r\n\tinput_keyboard_options_with_two_states(5, event_type, \"punctuation_numbers_one\", 4, 5); //virtual_keyboard option 5; punctuation and numbers\r\n\tinput_keyboard_options_with_two_states(6, event_type, \"punctuation_numbers_two\", 6, 7); //virtual_keyboard option 6; punctuation\r\n\r\n\tinput_editing_keys(7, event_type, delete_function, \"Delete\"); //delete \r\n\tinput_character_keys(8, event_type, 0, \"KeyQ\") //q (113), Q (81), 1 (49)\r\n\tinput_character_keys(9, event_type, 1, \"KeyW\"); //w (119), W (87), 2 (50)\r\n\tinput_character_keys(10, event_type, 2, \"KeyE\"); //e (101), E (69), 3 (51)\r\n\tinput_character_keys(11, event_type, 3, \"KeyR\"); //r (114), R (82), 4 (52)\r\n\tinput_character_keys(12, event_type, 4, \"KeyT\"); //t (116), T (84), 5 (53)\r\n\tinput_character_keys(13, event_type, 5, \"KeyY\"); //y (121), Y (89), 6 (54)\r\n\tinput_character_keys(14, event_type, 6, \"KeyU\"); //u (117), U (85), 7 (55)\r\n\tinput_character_keys(15, event_type, 7, \"KeyI\"); //i (105), I (73), 8 (56)\r\n\tinput_character_keys(16, event_type, 8, \"KeyO\"); //o (111), O (79), 9 (57)\r\n\tinput_character_keys(17, event_type, 9, \"KeyP\"); //p (112), P (80), 0 (48)\r\n\tinput_editing_keys(18, event_type, backspace_function, \"Backspace\") //backspace\r\n\t\r\n\tinput_whitespace_keys(19, event_type, 9, \"Tab\"); //horizonal tab (9)\r\n\tinput_character_keys(20, event_type, 10, \"KeyA\"); //a (97), A (65), @ (64)\r\n\tinput_character_keys(21, event_type, 11, \"KeyS\"); //s (115), S (83), # (35)\r\n\tinput_character_keys(22, event_type, 12, \"KeyD\"); //d (100), D (68), $ (36)\r\n\tinput_character_keys(23, event_type, 13, \"KeyF\"); //f (102), F (70), & (38)\r\n\tinput_character_keys(24, event_type, 14, \"KeyG\"); //g (103), G (71), * (42)\r\n\tinput_character_keys(25, event_type, 15, \"KeyH\"); //h (104), H (72), ( (40)\r\n\tinput_character_keys(26, event_type, 16, \"KeyJ\"); //j (106), J (74), ) (41)\r\n\tinput_character_keys(27, event_type, 17, \"KeyK\"); //k (107), K (75),' (39)\r\n\tinput_character_keys(28, event_type, 18, \"KeyL\"); //l (108), L (76), \" (34)\r\n\tinput_whitespace_keys(29, event_type, 13, \"Enter\") //enter (13)\r\n\r\n\tinput_caps_lock(30, event_type, 0, 1, 2, 3, \"CapsLock\"); //left caps lock\r\n\tinput_character_keys(31, event_type, 19, \"KeyZ\"); //z (122), Z (90), % (37)\r\n\tinput_character_keys(32, event_type, 20, \"KeyX\"); //x (120), X (88), - (45)\r\n\tinput_character_keys(33, event_type, 21, \"KeyC\"); //c (99), C (67), + (43)\r\n\tinput_character_keys(34, event_type, 22, \"KeyV\"); //v (118), V (86), = (61)\r\n\tinput_character_keys(35, event_type, 23, \"KeyB\"); //b (98), B (66), / (47)\r\n\tinput_character_keys(36, event_type, 24, \"KeyN\"); //n (110), N (78), semicolon (59)\r\n\tinput_character_keys(37, event_type, 25, \"KeyM\"); //m (109), M (77), colon (59)\r\n\tinput_character_keys(38, event_type, 26, \"Comma\"); //comma (44), exclamtion mark (33)\r\n\tinput_character_keys(39, event_type, 27, \"Period\"); //full stop (46), question mark (63)\r\n\tinput_caps_lock(40, event_type, 0, 1, 2, 3, \"CapsLock\"); //right caps lock\r\n\r\n\tinput_keyboard_options_with_two_states(41, event_type, \"punctuation_numbers_one\", 4, 5); // punctuation numbers \r\n\tinput_keyboard_options_with_two_states(42, event_type, \"punctuation_numbers_two\", 6, 7);//punctuation 2\r\n\tinput_whitespace_keys(43, event_type, 32, \"Space\"); //space (32)\r\n\tinput_keyboard_options_with_two_states(44, event_type, \"lowercase_accent_characters_one\", 8, 9); //accent chars\r\n\tinput_keyboard_options_with_two_states(45, event_type, \"lowercase_accent_characters_two\", 10, 11); //accent chars 2\t\r\n}", "title": "" }, { "docid": "acddf3d8946c0022d71ed57bb70d3308", "score": "0.57104033", "text": "function inputEventListener() { \n if (deadKey) { \n const savedBlur = handlers.blur;\n const savedFocus = handlers.focus;\n handlers.blur = null;\n handlers.focus = null;\n textarea.blur();\n textarea.focus();\n handlers.blur = savedBlur;\n handlers.focus = savedFocus;\n deadKey = false;\n compositionInProgress = false;\n defer(handleTypedText); \n } else if (!compositionInProgress) {\n defer(handleTypedText); \n }\n }", "title": "" }, { "docid": "60de6b42b9c625f09d8fe3b4a694187b", "score": "0.5704694", "text": "function onKeyPress(event){\r\n object = event.currentTarget.nextNode;\r\n if(object.mKeyPressEvents == null){ // Object can not Handle KeypressEvents\r\n if(globals.debug > 1)\r\n alert(\"Warning: Object: \" + object.mId + \" cannot handle Keypress Events\");\r\n return ;\r\n }\r\n for(var i=0; i< object.mKeyPressEvents.length; i++){\r\n params = new EventParameter();\r\n params = object.mKeyPressParams[i];\r\n params.event = event;\r\n object.mKeyPressEvents[i](params);\r\n }\r\n}", "title": "" }, { "docid": "daefb9032a4f13a276ed372cf9fddae4", "score": "0.5682272", "text": "function decide_document_onkeyup(event) {\n return exoduscancelevent(event)\n }", "title": "" }, { "docid": "eb7d079f713ef8c96b2d58f48f3f8e3d", "score": "0.567279", "text": "function onKeyPress(event) {\n console.log(\"Key pressed\", event.keyCode);\n}", "title": "" }, { "docid": "1fca925ef0262b48f2c1bf57f84f9f75", "score": "0.56591547", "text": "function duoMain_setTextBox(cname,flag) {\r\n\tvar textbox = cname;\r\n\tvar _event;\r\n\tswitch ( duoMain_getNavigatorType() ) {\r\n\t\tcase 1 : // IE\r\n\t\t\t_event = window.event;\r\n\t\t\tnodeName = _event.srcElement.nodeName;\r\n\t\t\tbreak;\r\n\t\tcase 2 : // Netscape\r\n\t\t\t_event = event;\r\n\t\t\tnodeName = _event.target.nodeName;\r\n\t\t\tbreak;\r\n\t\tdefault :\r\n\t\t\tnodeName = \"None\";\r\n\t\t\tbreak;\r\n\t}\r\n\tkey = _event.keyCode;\r\n\tif ( duoMain_keystatus == 1 && flag && key != 13) { // keyCode : Enter\r\n\t\ttextbox.value = \"\";\r\n\t\tduoMain_keystatus = 2;\r\n\t}\r\n}", "title": "" }, { "docid": "ebeff4542729f086d98ae38b6b514b25", "score": "0.5648774", "text": "function getEventKeypress(evnt)\n{\n evnt = getEvent(evnt);\n\n return (evnt.which) ? evnt.which : evnt.keyCode;\n\n}", "title": "" }, { "docid": "0cbedd46f857571109ee9a18f762775a", "score": "0.5645865", "text": "function testGeckoStyleKeyHandling() {\n goog.userAgent.OPERA = false;\n goog.userAgent.IE = false;\n goog.userAgent.GECKO = true;\n goog.userAgent.CAMINO = false;\n goog.userAgent.WEBKIT = false;\n goog.userAgent.MAC = false;\n goog.userAgent.WINDOWS = true;\n goog.userAgent.LINUX = false;\n goog.events.KeyHandler.USES_KEYDOWN_ = false;\n\n var keyEvent, keyHandler = new goog.events.KeyHandler();\n goog.events.listen(keyHandler, goog.events.KeyHandler.EventType.KEY,\n function(e) { keyEvent = e; });\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.ENTER);\n fireKeyPress(keyHandler, goog.events.KeyCodes.ENTER);\n assertEquals('Enter should fire a key event with the keycode 13',\n goog.events.KeyCodes.ENTER,\n keyEvent.keyCode);\n assertEquals('Enter should fire a key event with the charcode 0',\n 0,\n keyEvent.charCode);\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.ESC);\n fireKeyPress(keyHandler, goog.events.KeyCodes.ESC);\n assertEquals('Esc should fire a key event with the keycode 27',\n goog.events.KeyCodes.ESC,\n keyEvent.keyCode);\n assertEquals('Esc should fire a key event with the charcode 0',\n 0,\n keyEvent.charCode);\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.UP);\n fireKeyPress(keyHandler, goog.events.KeyCodes.UP);\n assertEquals('Up should fire a key event with the keycode 38',\n goog.events.KeyCodes.UP,\n keyEvent.keyCode);\n assertEquals('Up should fire a key event with the charcode 0',\n 0,\n keyEvent.charCode);\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.SEVEN, undefined, undefined,\n undefined, undefined, true);\n fireKeyPress(keyHandler, undefined, 38, undefined, undefined, undefined,\n true);\n assertEquals('Shift+7 should fire a key event with the keycode 55',\n goog.events.KeyCodes.SEVEN,\n keyEvent.keyCode);\n assertEquals('Shift+7 should fire a key event with the charcode 38',\n 38,\n keyEvent.charCode);\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.A);\n fireKeyPress(keyHandler, undefined, 97);\n assertEquals('Lower case a should fire a key event with the keycode 65',\n goog.events.KeyCodes.A,\n keyEvent.keyCode);\n assertEquals('Lower case a should fire a key event with the charcode 97',\n 97,\n keyEvent.charCode);\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.A);\n fireKeyPress(keyHandler, undefined, 65);\n assertEquals('Upper case A should fire a key event with the keycode 65',\n goog.events.KeyCodes.A,\n keyEvent.keyCode);\n assertEquals('Upper case A should fire a key event with the charcode 65',\n 65,\n keyEvent.charCode);\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.DELETE);\n fireKeyPress(keyHandler, goog.events.KeyCodes.DELETE);\n assertEquals('Delete should fire a key event with the keycode 46',\n goog.events.KeyCodes.DELETE,\n keyEvent.keyCode);\n assertEquals('Delete should fire a key event with the charcode 0',\n 0,\n keyEvent.charCode);\n\n fireKeyDown(keyHandler, goog.events.KeyCodes.PERIOD);\n fireKeyPress(keyHandler, undefined, 46);\n assertEquals('Period should fire a key event with the keycode 190',\n goog.events.KeyCodes.PERIOD,\n keyEvent.keyCode);\n assertEquals('Period should fire a key event with the charcode 46',\n 46,\n keyEvent.charCode);\n}", "title": "" }, { "docid": "877315f341d7e8c2159fbe1abacd88a6", "score": "0.5643046", "text": "function n() {\r\n\t\tvar t = this,\r\n\t\t\ti = window || global;\r\n\t\t_extends(this, {\r\n\t\t\tisNativeEvent: function(e) {\r\n\t\t\t\treturn e.originalEvent && e.originalEvent.isTrusted !== !1\r\n\t\t\t},\r\n\t\t\tfakeInputEvent: function(i) {\r\n\t\t\t\tt.isNativeEvent(i) && e(i.target).trigger(\"input\")\r\n\t\t\t},\r\n\t\t\tmisbehaves: function(i) {\r\n\t\t\t\tt.isNativeEvent(i) && (t.behavesOk(i), e(document).on(\"change.inputevent\", i.data.selector, t.fakeInputEvent), t.fakeInputEvent(i))\r\n\t\t\t},\r\n\t\t\tbehavesOk: function(i) {\r\n\t\t\t\tt.isNativeEvent(i) && e(document).off(\"input.inputevent\", i.data.selector, t.behavesOk).off(\"change.inputevent\", i.data.selector, t.misbehaves)\r\n\t\t\t},\r\n\t\t\tinstall: function() {\r\n\t\t\t\tif (!i.inputEventPatched) {\r\n\t\t\t\t\ti.inputEventPatched = \"0.0.3\";\r\n\t\t\t\t\tfor (var n = [\"select\", 'input[type=\"checkbox\"]', 'input[type=\"radio\"]', 'input[type=\"file\"]'], r = 0; r < n.length; r++) {\r\n\t\t\t\t\t\tvar s = n[r];\r\n\t\t\t\t\t\te(document).on(\"input.inputevent\", s, {\r\n\t\t\t\t\t\t\tselector: s\r\n\t\t\t\t\t\t}, t.behavesOk).on(\"change.inputevent\", s, {\r\n\t\t\t\t\t\t\tselector: s\r\n\t\t\t\t\t\t}, t.misbehaves)\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tuninstall: function() {\r\n\t\t\t\tdelete i.inputEventPatched, e(document).off(\".inputevent\")\r\n\t\t\t}\r\n\t\t})\r\n\t}", "title": "" }, { "docid": "2cccd8c111d7652db10c66eab19e40dd", "score": "0.5637749", "text": "function keypressHandler(evt)\r\n {\r\n var keyCode = evt.keyCode || evt.which || evt.charCode;\r\n\r\n if (evt.target.tagName == \"INPUT\" && evt.target.name == \"q\")\r\n return;\r\n\r\n if (keyCode == keyTables.KEY_QMARK) {\r\n showHelp();\r\n evt.preventDefault();\r\n }\r\n }", "title": "" }, { "docid": "fbd2d611d42a79b9b630067e31e6f387", "score": "0.5630894", "text": "_proxyInputEvent() {\n this.dispatchEvent(new CustomEvent('user-input-changed', {\n bubbles: true,\n composed: true\n }));\n }", "title": "" }, { "docid": "18a4460d04e9ae753ff5e6e4d8f48a05", "score": "0.56283855", "text": "function listenForSearchText() {\n var input = O(\"search\");\n input.addEventListener(\"keydown\", function () {\n search(input.value);\n });\n\n}", "title": "" }, { "docid": "f520a8a3c1e4093f958df9ebf2d23661", "score": "0.5626945", "text": "function KeyUp(ev){\r\nif(T.readOnly || !Sel) return true;\r\nif(!ev) ev = window.event;\r\nif(Test((T.value==null?T.innerText:T.value).replace(/\\r\\n|\\r/g,\"\\n\"))) {\r\n if(T.value==null) T.innerHTML = Last; else T.value = Last;\r\n SetSelection(T,Sel[0],Sel[1]);\r\n }\r\nif(Cancel){\r\n Cancel = 0; CancelEvent(ev); return false;\r\n }\r\nif(oup) oup(ev);\r\nreturn true;\r\n}", "title": "" }, { "docid": "59367a6959eb131848484b9ef0977075", "score": "0.5611483", "text": "function extendedOnKeyPress() {\r\n this._handleEscapeToHome()\r\n originalOnKeyPress()\r\n }", "title": "" }, { "docid": "979f78b4fc970c932a89356a775ca0ed", "score": "0.56113756", "text": "function getFallbackBeforeInputChars(domEventName,nativeEvent){// If we are currently composing (IME) and using a fallback to do so,\n// try to extract the composed characters from the fallback object.\n// If composition event is available, we extract a string only at\n// compositionevent, otherwise extract it at fallback events.\nif(isComposing){if(domEventName==='compositionend'||!canUseCompositionEvent&&isFallbackCompositionEnd(domEventName,nativeEvent)){var chars=getData();reset();isComposing=false;return chars;}return null;}switch(domEventName){case'paste':// If a paste event occurs after a keypress, throw out the input\n// chars. Paste events should not lead to BeforeInput events.\nreturn null;case'keypress':/**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */if(!isKeypressCommand(nativeEvent)){// IE fires the `keypress` event when a user types an emoji via\n// Touch keyboard of Windows. In such a case, the `char` property\n// holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n// is 2, the property `which` does not represent an emoji correctly.\n// In such a case, we directly return the `char` property instead of\n// using `which`.\nif(nativeEvent.char&&nativeEvent.char.length>1){return nativeEvent.char;}else if(nativeEvent.which){return String.fromCharCode(nativeEvent.which);}}return null;case'compositionend':return useFallbackCompositionData&&!isUsingKoreanIME(nativeEvent)?null:nativeEvent.data;default:return null;}}", "title": "" }, { "docid": "3d2be6df8e32a8d60ea543e27315c0be", "score": "0.5600508", "text": "on_cut(event)\n\t{\n\t\tsetTimeout(this.format_input_text, 0)\n\t}", "title": "" }, { "docid": "c9ec0eac2ea8fcc4e81279a9ed51b110", "score": "0.55889004", "text": "function Input(event) {\n}", "title": "" }, { "docid": "806ef33f3eb29f35509fd72e6de84f6d", "score": "0.5588429", "text": "function onKeyPress ( e ) {\n var charCode = e.charCode;\n sendDTMFToActiveSession(charCode);\n\t}", "title": "" }, { "docid": "70d487ce75ef47b855ffa47253f73a3e", "score": "0.55876553", "text": "function CLC_SR_SpeakFocus_EventAnnouncer(event){ \r\n if (!CLC_SR_Query_SpeakEvents()){\r\n return true;\r\n }\r\n //Announce the URL bar when focused\r\n if (event.target.id==\"urlbar\"){\r\n CLC_SR_SpeakEventBuffer = event.target.value;\r\n CLC_SR_SpeakEventBuffer = CLC_SR_MSG0010 + CLC_SR_SpeakEventBuffer; \r\n CLC_SR_Stop = true; \r\n window.setTimeout(\"CLC_Shout(CLC_SR_SpeakEventBuffer,1);\", 0);\r\n return true;\r\n } \r\n //Not sure about the rest - none for now\r\n return true;\r\n }", "title": "" }, { "docid": "3a666a80c4d51e9226c0cc21dee7b48d", "score": "0.558122", "text": "function TextExtFocus() {}", "title": "" }, { "docid": "40fedf4b45f4452d3a7e93fdcf883954", "score": "0.5569312", "text": "onKeyPressed(ev) {\n var ch = String.fromCharCode(ev.charCode).toUpperCase();\n if (\"0123456789.+-*×÷/=C\".indexOf(ch) >= 0) {\n this.onInput(ch);\n return;\n }\n /* TODO: Translate key\n let translation = this.key_translation(ch);\n if (translation !== undefined) {\n this.onInput(translation);\n }\n if (ch == \"!\") {\n test0();\n }\n */\n }", "title": "" }, { "docid": "556c0fd6c0e86e855591db9eb516f198", "score": "0.5557121", "text": "_keyup( e ) { this.__keyup( e ); }", "title": "" }, { "docid": "8067f4b9bf89a736b9dc7f30e48fe39e", "score": "0.55570793", "text": "function vB_Text_Editor_Events()\n{\n}", "title": "" }, { "docid": "7fda5e4e50af2af093b940704ad9cddb", "score": "0.55551904", "text": "function getCharPress(event) {\n if (event.which == null) { // IE\n if (event.keyCode < 32) return null; // спец. символ\n return String.fromCharCode(event.keyCode)\n }\n\n if (event.which != 0 && event.charCode != 0) { // все кроме IE\n if (event.which < 32) return null; // спец. символ\n return String.fromCharCode(event.which); // остальные\n }\n return null; // спец. символ\n }", "title": "" }, { "docid": "df53cfaf1d6e14906e189646776a6165", "score": "0.5554132", "text": "function InputEvent() {\n var _this14 = this;\n\n var globals = window || global;\n\n // Slightly odd way construct our object. This way methods are force bound.\n // Used to test for duplicate library.\n _extends(this, {\n\n // For browsers that do not support isTrusted, assumes event is native.\n isNativeEvent: function isNativeEvent(evt) {\n return evt.originalEvent && evt.originalEvent.isTrusted !== false;\n },\n\n fakeInputEvent: function fakeInputEvent(evt) {\n if (_this14.isNativeEvent(evt)) {\n $(evt.target).trigger('input');\n }\n },\n\n misbehaves: function misbehaves(evt) {\n if (_this14.isNativeEvent(evt)) {\n _this14.behavesOk(evt);\n $(document).on('change.inputevent', evt.data.selector, _this14.fakeInputEvent);\n _this14.fakeInputEvent(evt);\n }\n },\n\n behavesOk: function behavesOk(evt) {\n if (_this14.isNativeEvent(evt)) {\n $(document) // Simply unbinds the testing handler\n .off('input.inputevent', evt.data.selector, _this14.behavesOk).off('change.inputevent', evt.data.selector, _this14.misbehaves);\n }\n },\n\n // Bind the testing handlers\n install: function install() {\n if (globals.inputEventPatched) {\n return;\n }\n globals.inputEventPatched = '0.0.3';\n var _arr = ['select', 'input[type=\"checkbox\"]', 'input[type=\"radio\"]', 'input[type=\"file\"]'];\n for (var _i = 0; _i < _arr.length; _i++) {\n var selector = _arr[_i];\n $(document).on('input.inputevent', selector, { selector: selector }, _this14.behavesOk).on('change.inputevent', selector, { selector: selector }, _this14.misbehaves);\n }\n },\n\n uninstall: function uninstall() {\n delete globals.inputEventPatched;\n $(document).off('.inputevent');\n }\n\n });\n }", "title": "" }, { "docid": "3d04d236a63ede3482140d41afdf23f8", "score": "0.5513121", "text": "function keyEvents() {\n\tonkeydown = onkeyup = function(e){\n\t\te = e || event; // to deal with IE\n\t\tkeyMap[e.keyCode] = e.type == 'keydown';\n\t}\n}", "title": "" }, { "docid": "cb53cd7d718f14148006a6b64beba46c", "score": "0.55082476", "text": "function interceptUserInput (onInput) {\r\n document.body.addEventListener('touchstart', onInput, { passive: false })\r\n document.body.addEventListener('mousedown', onInput)\r\n document.body.addEventListener('mouseup', onInput)\r\n document.body.addEventListener('click', onInput)\r\n document.body.addEventListener('keydown', onInput)\r\n document.body.addEventListener('keyup', onInput)\r\n document.body.addEventListener('keypress', onInput)\r\n}", "title": "" }, { "docid": "4e68f553ec0176f2c5df2623c0bc1832", "score": "0.55073047", "text": "function getFallbackBeforeInputChars(domEventName,nativeEvent){// If we are currently composing (IME) and using a fallback to do so,\n\t// try to extract the composed characters from the fallback object.\n\t// If composition event is available, we extract a string only at\n\t// compositionevent, otherwise extract it at fallback events.\n\tif(isComposing){if(domEventName==='compositionend'||!canUseCompositionEvent&&isFallbackCompositionEnd(domEventName,nativeEvent)){var chars=getData();reset();isComposing=false;return chars;}return null;}switch(domEventName){case'paste':// If a paste event occurs after a keypress, throw out the input\n\t// chars. Paste events should not lead to BeforeInput events.\n\treturn null;case'keypress':/**\n\t * As of v27, Firefox may fire keypress events even when no character\n\t * will be inserted. A few possibilities:\n\t *\n\t * - `which` is `0`. Arrow keys, Esc key, etc.\n\t *\n\t * - `which` is the pressed key code, but no char is available.\n\t * Ex: 'AltGr + d` in Polish. There is no modified character for\n\t * this key combination and no character is inserted into the\n\t * document, but FF fires the keypress for char code `100` anyway.\n\t * No `input` event will occur.\n\t *\n\t * - `which` is the pressed key code, but a command combination is\n\t * being used. Ex: `Cmd+C`. No character is inserted, and no\n\t * `input` event will occur.\n\t */if(!isKeypressCommand(nativeEvent)){// IE fires the `keypress` event when a user types an emoji via\n\t// Touch keyboard of Windows. In such a case, the `char` property\n\t// holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n\t// is 2, the property `which` does not represent an emoji correctly.\n\t// In such a case, we directly return the `char` property instead of\n\t// using `which`.\n\tif(nativeEvent.char&&nativeEvent.char.length>1){return nativeEvent.char;}else if(nativeEvent.which){return String.fromCharCode(nativeEvent.which);}}return null;case'compositionend':return useFallbackCompositionData&&!isUsingKoreanIME(nativeEvent)?null:nativeEvent.data;default:return null;}}", "title": "" }, { "docid": "b84ebf39502e800b3034fb7e782860a8", "score": "0.5505687", "text": "function textBoxHadKeypress(event) {\n // Get the key that pressed from the event\n var character = event.key;\n $(\"#output\").text(`Second text box heard a keypress. Here's the key that was typed: ${character}`);\n}", "title": "" }, { "docid": "c032fdb1feb6923fa886eed4399675e9", "score": "0.5501829", "text": "function TGGetKey(event){\r\nreturn event.keyCode ? event.keyCode : event.charCode;\r\n}", "title": "" }, { "docid": "30b3869200c4a8cd5283c88d83ed6f6f", "score": "0.5501118", "text": "onInputEvent(pointer) { return false; }", "title": "" }, { "docid": "2dac71e71ed69fdf122f505b75863dbc", "score": "0.549345", "text": "handleTopLevelEntry(e) {\n if(!this.blockMode) return; // bail if mode==false\n this.clearSelection(); // clear the previous selection\n // WK/Firefox workaround: skip kepress events that are actually clipboard events\n if(e.type == \"keypress\" && [\"c\",\"v\",\"x\"].includes(e.key) \n && ((ISMAC && e.metaKey) || (!ISMAC && e.ctrlKey))) {\n return;\n }\n var text = (e.type == \"keypress\")? String.fromCharCode(e.which)\n : e.clipboardData.getData('text/plain');\n if(!text.replace(/\\s/g, '').length) return; // let pure whitespace pass through\n this.makeQuarantineAt(text, this.cm.getCursor());\n }", "title": "" }, { "docid": "9841b08cf4080ac27070d3bebf4e3231", "score": "0.5490555", "text": "function doKeyUp(e) {\n // Note: e.keyCode is not populated for keyup in Safari.\n clearAllTouches();\n}", "title": "" }, { "docid": "295ceaaec55e4b41cbf658b44e9b4ae6", "score": "0.54899466", "text": "function keyPressed (e) {\n\tvar keychar = \"\";\n\tif(window.event) { // Internet Explorer\n\t\tkeynum = e.keyCode\n\t}\n\telse if(e.which) {// Netscape/Firefox/Opera\n\t\tkeynum = e.which\n\t}\n\tprocessKey(keynum, true);\n}", "title": "" }, { "docid": "abc102c736d850cb9cb384fefa770f6a", "score": "0.54777163", "text": "function myKeyPress(evt) {\r\n\r\n // alert(\"Pressed a char key : \" + evt.keyCode + \" : \" + evt.charCode);\r\n\r\n // If the user has not configured/selected an output grid yet, no \r\n // keys are enabled. \r\n //\r\n var sO = CurStepObj;\r\n\r\n if (!sO.keyboardEnabled || sO.isHeader ||\r\n (sO.stageInStep < StageInStep.ConfigDone))\r\n return;\r\n\r\n\r\n if (evt.target.isContentEditable)\r\n return;\r\n\r\n\r\n // STEP 1: Handle number input\r\n //\r\n // Note: Firefox needs charCode (not keyCode)\r\n //\r\n var key = evt.charCode;\r\n\r\n // Note: 46 is period (decimal point)\r\n //\r\n if (key >= 48 && key <= 57) \r\n\thandleNumKey(key-48);\r\n if (key == 46) handleNumKey('.'); // decimal point\r\n\r\n\r\n // STEP 2: Handle operator input\r\n //\r\n switch (key) {\r\n\r\n case 33:\r\n addOpExpr('!');\r\n break;\r\n\r\n case 40:\r\n addOpExpr('(');\r\n break;\r\n\r\n case 41:\r\n addOpExpr(')');\r\n break;\r\n\r\n case 42:\r\n addOpExpr('*');\r\n break;\r\n\r\n case 43:\r\n addOpExpr('+');\r\n break;\r\n\r\n case 45:\r\n addOpExpr('-');\r\n break;\r\n\r\n case 47:\r\n addOpExpr('/');\r\n break;\r\n\r\n case 60:\r\n addOpExpr('<');\r\n break;\r\n\r\n case 61:\r\n addOpExpr('=');\r\n break;\r\n\r\n case 62:\r\n addOpExpr('>');\r\n break;\r\n\r\n }\r\n\r\n}", "title": "" }, { "docid": "84e457915225f2b8e5ce04f4f5665524", "score": "0.54749864", "text": "function handleEventsForInputEventIE(\n\t topLevelType,\n\t topLevelTarget,\n\t topLevelTargetID) {\n\t if (topLevelType === topLevelTypes.topFocus) {\n\t // In IE8, we can capture almost all .value changes by adding a\n\t // propertychange handler and looking for events with propertyName\n\t // equal to 'value'\n\t // In IE9, propertychange fires for most input events but is buggy and\n\t // doesn't fire when text is deleted, but conveniently, selectionchange\n\t // appears to fire in all of the remaining cases so we catch those and\n\t // forward the event if the value has changed\n\t // In either case, we don't want to call the event handler if the value\n\t // is changed from JS so we redefine a setter for `.value` that updates\n\t // our activeElementValue variable, allowing us to ignore those changes\n\t //\n\t // stopWatching() should be a noop here but we call it just in case we\n\t // missed a blur event somehow.\n\t stopWatchingForValueChange();\n\t startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n\t } else if (topLevelType === topLevelTypes.topBlur) {\n\t stopWatchingForValueChange();\n\t }\n\t}", "title": "" }, { "docid": "84e457915225f2b8e5ce04f4f5665524", "score": "0.54749864", "text": "function handleEventsForInputEventIE(\n\t topLevelType,\n\t topLevelTarget,\n\t topLevelTargetID) {\n\t if (topLevelType === topLevelTypes.topFocus) {\n\t // In IE8, we can capture almost all .value changes by adding a\n\t // propertychange handler and looking for events with propertyName\n\t // equal to 'value'\n\t // In IE9, propertychange fires for most input events but is buggy and\n\t // doesn't fire when text is deleted, but conveniently, selectionchange\n\t // appears to fire in all of the remaining cases so we catch those and\n\t // forward the event if the value has changed\n\t // In either case, we don't want to call the event handler if the value\n\t // is changed from JS so we redefine a setter for `.value` that updates\n\t // our activeElementValue variable, allowing us to ignore those changes\n\t //\n\t // stopWatching() should be a noop here but we call it just in case we\n\t // missed a blur event somehow.\n\t stopWatchingForValueChange();\n\t startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n\t } else if (topLevelType === topLevelTypes.topBlur) {\n\t stopWatchingForValueChange();\n\t }\n\t}", "title": "" }, { "docid": "84e457915225f2b8e5ce04f4f5665524", "score": "0.54749864", "text": "function handleEventsForInputEventIE(\n\t topLevelType,\n\t topLevelTarget,\n\t topLevelTargetID) {\n\t if (topLevelType === topLevelTypes.topFocus) {\n\t // In IE8, we can capture almost all .value changes by adding a\n\t // propertychange handler and looking for events with propertyName\n\t // equal to 'value'\n\t // In IE9, propertychange fires for most input events but is buggy and\n\t // doesn't fire when text is deleted, but conveniently, selectionchange\n\t // appears to fire in all of the remaining cases so we catch those and\n\t // forward the event if the value has changed\n\t // In either case, we don't want to call the event handler if the value\n\t // is changed from JS so we redefine a setter for `.value` that updates\n\t // our activeElementValue variable, allowing us to ignore those changes\n\t //\n\t // stopWatching() should be a noop here but we call it just in case we\n\t // missed a blur event somehow.\n\t stopWatchingForValueChange();\n\t startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n\t } else if (topLevelType === topLevelTypes.topBlur) {\n\t stopWatchingForValueChange();\n\t }\n\t}", "title": "" }, { "docid": "84e457915225f2b8e5ce04f4f5665524", "score": "0.54749864", "text": "function handleEventsForInputEventIE(\n\t topLevelType,\n\t topLevelTarget,\n\t topLevelTargetID) {\n\t if (topLevelType === topLevelTypes.topFocus) {\n\t // In IE8, we can capture almost all .value changes by adding a\n\t // propertychange handler and looking for events with propertyName\n\t // equal to 'value'\n\t // In IE9, propertychange fires for most input events but is buggy and\n\t // doesn't fire when text is deleted, but conveniently, selectionchange\n\t // appears to fire in all of the remaining cases so we catch those and\n\t // forward the event if the value has changed\n\t // In either case, we don't want to call the event handler if the value\n\t // is changed from JS so we redefine a setter for `.value` that updates\n\t // our activeElementValue variable, allowing us to ignore those changes\n\t //\n\t // stopWatching() should be a noop here but we call it just in case we\n\t // missed a blur event somehow.\n\t stopWatchingForValueChange();\n\t startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n\t } else if (topLevelType === topLevelTypes.topBlur) {\n\t stopWatchingForValueChange();\n\t }\n\t}", "title": "" }, { "docid": "84e457915225f2b8e5ce04f4f5665524", "score": "0.54749864", "text": "function handleEventsForInputEventIE(\n\t topLevelType,\n\t topLevelTarget,\n\t topLevelTargetID) {\n\t if (topLevelType === topLevelTypes.topFocus) {\n\t // In IE8, we can capture almost all .value changes by adding a\n\t // propertychange handler and looking for events with propertyName\n\t // equal to 'value'\n\t // In IE9, propertychange fires for most input events but is buggy and\n\t // doesn't fire when text is deleted, but conveniently, selectionchange\n\t // appears to fire in all of the remaining cases so we catch those and\n\t // forward the event if the value has changed\n\t // In either case, we don't want to call the event handler if the value\n\t // is changed from JS so we redefine a setter for `.value` that updates\n\t // our activeElementValue variable, allowing us to ignore those changes\n\t //\n\t // stopWatching() should be a noop here but we call it just in case we\n\t // missed a blur event somehow.\n\t stopWatchingForValueChange();\n\t startWatchingForValueChange(topLevelTarget, topLevelTargetID);\n\t } else if (topLevelType === topLevelTypes.topBlur) {\n\t stopWatchingForValueChange();\n\t }\n\t}", "title": "" }, { "docid": "dd532f099bc1e18fd5dd7d3a8eae00f2", "score": "0.5472349", "text": "function Q(Ee,Te){if(Ee===me.topInput)// In modern browsers (i.e., not IE8 or IE9), the input event is exactly\n// what we want so fall through here and trigger an abstract event\nreturn Te}", "title": "" }, { "docid": "eca870a7cd2885c3e5c5a466cdee333d", "score": "0.54680026", "text": "function addKeypressEvents() {\r\n document.addEventListener('keypress', openInNewWindow, false);\r\n}", "title": "" }, { "docid": "9ed96d27c1a60708b7685edf63f7e532", "score": "0.5465694", "text": "onPreInputEvent(pointer) { return false; }", "title": "" }, { "docid": "8feeda9723fb9d509d069a9611651252", "score": "0.54624134", "text": "function getFallbackBeforeInputChars(domEventName, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (isComposing) {\n if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {\n var chars = getData();\n reset();\n isComposing = false;\n return chars;\n }\n\n return null;\n }\n\n switch (domEventName) {\n case 'paste':\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n\n case 'keypress':\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (!isKeypressCommand(nativeEvent)) {\n // IE fires the `keypress` event when a user types an emoji via\n // Touch keyboard of Windows. In such a case, the `char` property\n // holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n // is 2, the property `which` does not represent an emoji correctly.\n // In such a case, we directly return the `char` property instead of\n // using `which`.\n if (nativeEvent.char && nativeEvent.char.length > 1) {\n return nativeEvent.char;\n } else if (nativeEvent.which) {\n return String.fromCharCode(nativeEvent.which);\n }\n }\n\n return null;\n\n case 'compositionend':\n return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\n\n default:\n return null;\n }\n}", "title": "" }, { "docid": "8feeda9723fb9d509d069a9611651252", "score": "0.54624134", "text": "function getFallbackBeforeInputChars(domEventName, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (isComposing) {\n if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {\n var chars = getData();\n reset();\n isComposing = false;\n return chars;\n }\n\n return null;\n }\n\n switch (domEventName) {\n case 'paste':\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n\n case 'keypress':\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (!isKeypressCommand(nativeEvent)) {\n // IE fires the `keypress` event when a user types an emoji via\n // Touch keyboard of Windows. In such a case, the `char` property\n // holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n // is 2, the property `which` does not represent an emoji correctly.\n // In such a case, we directly return the `char` property instead of\n // using `which`.\n if (nativeEvent.char && nativeEvent.char.length > 1) {\n return nativeEvent.char;\n } else if (nativeEvent.which) {\n return String.fromCharCode(nativeEvent.which);\n }\n }\n\n return null;\n\n case 'compositionend':\n return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\n\n default:\n return null;\n }\n}", "title": "" }, { "docid": "8feeda9723fb9d509d069a9611651252", "score": "0.54624134", "text": "function getFallbackBeforeInputChars(domEventName, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (isComposing) {\n if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {\n var chars = getData();\n reset();\n isComposing = false;\n return chars;\n }\n\n return null;\n }\n\n switch (domEventName) {\n case 'paste':\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n\n case 'keypress':\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (!isKeypressCommand(nativeEvent)) {\n // IE fires the `keypress` event when a user types an emoji via\n // Touch keyboard of Windows. In such a case, the `char` property\n // holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n // is 2, the property `which` does not represent an emoji correctly.\n // In such a case, we directly return the `char` property instead of\n // using `which`.\n if (nativeEvent.char && nativeEvent.char.length > 1) {\n return nativeEvent.char;\n } else if (nativeEvent.which) {\n return String.fromCharCode(nativeEvent.which);\n }\n }\n\n return null;\n\n case 'compositionend':\n return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\n\n default:\n return null;\n }\n}", "title": "" }, { "docid": "8feeda9723fb9d509d069a9611651252", "score": "0.54624134", "text": "function getFallbackBeforeInputChars(domEventName, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (isComposing) {\n if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {\n var chars = getData();\n reset();\n isComposing = false;\n return chars;\n }\n\n return null;\n }\n\n switch (domEventName) {\n case 'paste':\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n\n case 'keypress':\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (!isKeypressCommand(nativeEvent)) {\n // IE fires the `keypress` event when a user types an emoji via\n // Touch keyboard of Windows. In such a case, the `char` property\n // holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n // is 2, the property `which` does not represent an emoji correctly.\n // In such a case, we directly return the `char` property instead of\n // using `which`.\n if (nativeEvent.char && nativeEvent.char.length > 1) {\n return nativeEvent.char;\n } else if (nativeEvent.which) {\n return String.fromCharCode(nativeEvent.which);\n }\n }\n\n return null;\n\n case 'compositionend':\n return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\n\n default:\n return null;\n }\n}", "title": "" }, { "docid": "8feeda9723fb9d509d069a9611651252", "score": "0.54624134", "text": "function getFallbackBeforeInputChars(domEventName, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (isComposing) {\n if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {\n var chars = getData();\n reset();\n isComposing = false;\n return chars;\n }\n\n return null;\n }\n\n switch (domEventName) {\n case 'paste':\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n\n case 'keypress':\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (!isKeypressCommand(nativeEvent)) {\n // IE fires the `keypress` event when a user types an emoji via\n // Touch keyboard of Windows. In such a case, the `char` property\n // holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n // is 2, the property `which` does not represent an emoji correctly.\n // In such a case, we directly return the `char` property instead of\n // using `which`.\n if (nativeEvent.char && nativeEvent.char.length > 1) {\n return nativeEvent.char;\n } else if (nativeEvent.which) {\n return String.fromCharCode(nativeEvent.which);\n }\n }\n\n return null;\n\n case 'compositionend':\n return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\n\n default:\n return null;\n }\n}", "title": "" }, { "docid": "8feeda9723fb9d509d069a9611651252", "score": "0.54624134", "text": "function getFallbackBeforeInputChars(domEventName, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (isComposing) {\n if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {\n var chars = getData();\n reset();\n isComposing = false;\n return chars;\n }\n\n return null;\n }\n\n switch (domEventName) {\n case 'paste':\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n\n case 'keypress':\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (!isKeypressCommand(nativeEvent)) {\n // IE fires the `keypress` event when a user types an emoji via\n // Touch keyboard of Windows. In such a case, the `char` property\n // holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n // is 2, the property `which` does not represent an emoji correctly.\n // In such a case, we directly return the `char` property instead of\n // using `which`.\n if (nativeEvent.char && nativeEvent.char.length > 1) {\n return nativeEvent.char;\n } else if (nativeEvent.which) {\n return String.fromCharCode(nativeEvent.which);\n }\n }\n\n return null;\n\n case 'compositionend':\n return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\n\n default:\n return null;\n }\n}", "title": "" }, { "docid": "8feeda9723fb9d509d069a9611651252", "score": "0.54624134", "text": "function getFallbackBeforeInputChars(domEventName, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (isComposing) {\n if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {\n var chars = getData();\n reset();\n isComposing = false;\n return chars;\n }\n\n return null;\n }\n\n switch (domEventName) {\n case 'paste':\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n\n case 'keypress':\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (!isKeypressCommand(nativeEvent)) {\n // IE fires the `keypress` event when a user types an emoji via\n // Touch keyboard of Windows. In such a case, the `char` property\n // holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n // is 2, the property `which` does not represent an emoji correctly.\n // In such a case, we directly return the `char` property instead of\n // using `which`.\n if (nativeEvent.char && nativeEvent.char.length > 1) {\n return nativeEvent.char;\n } else if (nativeEvent.which) {\n return String.fromCharCode(nativeEvent.which);\n }\n }\n\n return null;\n\n case 'compositionend':\n return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\n\n default:\n return null;\n }\n}", "title": "" }, { "docid": "8feeda9723fb9d509d069a9611651252", "score": "0.54624134", "text": "function getFallbackBeforeInputChars(domEventName, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (isComposing) {\n if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {\n var chars = getData();\n reset();\n isComposing = false;\n return chars;\n }\n\n return null;\n }\n\n switch (domEventName) {\n case 'paste':\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n\n case 'keypress':\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (!isKeypressCommand(nativeEvent)) {\n // IE fires the `keypress` event when a user types an emoji via\n // Touch keyboard of Windows. In such a case, the `char` property\n // holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n // is 2, the property `which` does not represent an emoji correctly.\n // In such a case, we directly return the `char` property instead of\n // using `which`.\n if (nativeEvent.char && nativeEvent.char.length > 1) {\n return nativeEvent.char;\n } else if (nativeEvent.which) {\n return String.fromCharCode(nativeEvent.which);\n }\n }\n\n return null;\n\n case 'compositionend':\n return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\n\n default:\n return null;\n }\n}", "title": "" }, { "docid": "8feeda9723fb9d509d069a9611651252", "score": "0.54624134", "text": "function getFallbackBeforeInputChars(domEventName, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (isComposing) {\n if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {\n var chars = getData();\n reset();\n isComposing = false;\n return chars;\n }\n\n return null;\n }\n\n switch (domEventName) {\n case 'paste':\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n\n case 'keypress':\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (!isKeypressCommand(nativeEvent)) {\n // IE fires the `keypress` event when a user types an emoji via\n // Touch keyboard of Windows. In such a case, the `char` property\n // holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n // is 2, the property `which` does not represent an emoji correctly.\n // In such a case, we directly return the `char` property instead of\n // using `which`.\n if (nativeEvent.char && nativeEvent.char.length > 1) {\n return nativeEvent.char;\n } else if (nativeEvent.which) {\n return String.fromCharCode(nativeEvent.which);\n }\n }\n\n return null;\n\n case 'compositionend':\n return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\n\n default:\n return null;\n }\n}", "title": "" }, { "docid": "8feeda9723fb9d509d069a9611651252", "score": "0.54624134", "text": "function getFallbackBeforeInputChars(domEventName, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (isComposing) {\n if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {\n var chars = getData();\n reset();\n isComposing = false;\n return chars;\n }\n\n return null;\n }\n\n switch (domEventName) {\n case 'paste':\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n\n case 'keypress':\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (!isKeypressCommand(nativeEvent)) {\n // IE fires the `keypress` event when a user types an emoji via\n // Touch keyboard of Windows. In such a case, the `char` property\n // holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n // is 2, the property `which` does not represent an emoji correctly.\n // In such a case, we directly return the `char` property instead of\n // using `which`.\n if (nativeEvent.char && nativeEvent.char.length > 1) {\n return nativeEvent.char;\n } else if (nativeEvent.which) {\n return String.fromCharCode(nativeEvent.which);\n }\n }\n\n return null;\n\n case 'compositionend':\n return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\n\n default:\n return null;\n }\n}", "title": "" }, { "docid": "8feeda9723fb9d509d069a9611651252", "score": "0.54624134", "text": "function getFallbackBeforeInputChars(domEventName, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (isComposing) {\n if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {\n var chars = getData();\n reset();\n isComposing = false;\n return chars;\n }\n\n return null;\n }\n\n switch (domEventName) {\n case 'paste':\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n\n case 'keypress':\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (!isKeypressCommand(nativeEvent)) {\n // IE fires the `keypress` event when a user types an emoji via\n // Touch keyboard of Windows. In such a case, the `char` property\n // holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n // is 2, the property `which` does not represent an emoji correctly.\n // In such a case, we directly return the `char` property instead of\n // using `which`.\n if (nativeEvent.char && nativeEvent.char.length > 1) {\n return nativeEvent.char;\n } else if (nativeEvent.which) {\n return String.fromCharCode(nativeEvent.which);\n }\n }\n\n return null;\n\n case 'compositionend':\n return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\n\n default:\n return null;\n }\n}", "title": "" } ]
c7c492c62130040308789bbd5e7d8623
Functions: Sets up and shows the Home Screen
[ { "docid": "a1286326b5f72d2be7f2b06eef3cc11e", "score": "0.7205659", "text": "function setHomeScreen() {\n setScreen(\"homeScreen\");\n setProperty(\"hsDaysLeftCount\", \"text\", monthsLeft + \" Months and \" + daysLeft + \" Days Away\");\n}", "title": "" } ]
[ { "docid": "59ea0399874e07234e7a02945b83a30d", "score": "0.770415", "text": "function goToHomeScreen() {\n inGameInfo.inPlay = false\n resetAllGameInfo()\n\n makeSection2DisplayNone()\n sectionGameMenu.removeClass(cssDisplayNone)\n sectionOpeningScreen.removeClass(cssDisplayNone)\n footerTag.removeClass(cssDisplayNone)\n sectionGameInfo.addClass(cssDisplayNone)\n iconGoHome.addClass(cssDisplayNone)\n iconPause.addClass(cssDisplayNone)\n iconHelp.addClass(cssDisplayNone)\n }", "title": "" }, { "docid": "1dbf5940d6f4619681da3d2096e7e2cc", "score": "0.7641672", "text": "function init_home() {\n\n init_header();\n init_slideShow();\n trigger_onScreenEl();\n}", "title": "" }, { "docid": "2004f1d78e9cf5221f50207d897a0731", "score": "0.763196", "text": "function startHome(evt) {\n\t\t\tthis.startScreen.visible = true; //Show home page\n\t\t}", "title": "" }, { "docid": "14d8f26f5d2b2b8a8492900cdcd5c36b", "score": "0.756862", "text": "function displayHomeScreen(){\r\n updateContent( getHomePageContent() );\r\n}", "title": "" }, { "docid": "e87bbae26bc18b4a0c4814bbade84059", "score": "0.7340635", "text": "function drawHomeScreen() {\n homebutton.style('display', 'none');\n writingscrheading.style('display', 'none');\n startoverbutton.style('display', 'none');\n createCanvas(windowWidth, windowHeight);\n //pagebody.style('display', 'flex');\n ul.style('display', 'flex');\n button1.style('display', 'inline-block');\n button2.style('display', 'inline-block');\n button3.style('display', 'inline-block');\n button4.style('display', 'inline-block');\n titletext.style('display', 'block');\n about.style('display', 'block');\n}", "title": "" }, { "docid": "40f1d19b83acfaaa5a671278780e1d96", "score": "0.7257168", "text": "function goHome() {\n\t\t$('#title h1').text('william hong');\n\t\t$('#page-home').show();\n\n\t\tanimatePage('home', view);\n\n\t\tif (view != 'home') {\n\t\t\tsetTimeout(function() {\n\t\t\t\t$('#page-resume').hide();\n\t\t\t\t$('#page-works').hide();\n\t\t\t\t$('#page-project').hide();\n\n\t\t\t\t$('.page').removeClass().addClass('page');\n\t\t\t}, 950);\t\n\t\t}\n\t\t\n\t\tview = 'home';\n\n\t\t$('#title-cap').hide();\n\t\t$('#social-group').show();\n\t\t$('.highlight span').css('background-color', purple);\n\n\t\t$('#left-nav').css('visibility', 'visible');\n\t\t$('#right-nav').css('visibility', 'visible');\n\t\t$('#left-nav span').text('resume');\n\t\t$('#right-nav span').text('works');\n\n\t\t$('#flatbox *').css('background-color', black);\n\t\t$('.home-box').css('background-color', purple);\n\n\t\tresetAnimations();\n\t\thideProjs();\n\t\thighlight('#page-home');\n\t}", "title": "" }, { "docid": "f6f6893db726c1890f192d5d7b54d94c", "score": "0.7242098", "text": "function displayHome(){\n\tsetAnchor('home');\n\tdisplayListing('/ziks/by/title',function (){\t// GET All ziks for the homepage\n\t\t$listingPanel.prepend('<h2>All ziks added</h2>');\n\t});\n}", "title": "" }, { "docid": "b15f0c08d0e3bf931f8d7bc6df52d912", "score": "0.72064984", "text": "function presentHome() {\n resetScreens();\n $(homeScreenId).show();\n $(searchInputId).val(currentZip || \"\");\n}", "title": "" }, { "docid": "d64d55e6ffd074b0799a9c88846d388d", "score": "0.7183175", "text": "function goToHomepage() {\n resetEverything();\n drawHomeScreen();\n}", "title": "" }, { "docid": "927d77194180e9a0b99663497456b57a", "score": "0.7082629", "text": "async function displayHome() {\n if (screens['home']) main['innerHTML'] = screens['home'];\n else main['innerHTML'] = await fetchData('../templates/home.html', 'home');\n}", "title": "" }, { "docid": "ea8bd353271f3c4e8ffb966ededfe128", "score": "0.70495224", "text": "function home() {\n document.getElementById('main').style.display = 'block';\n document.getElementById('bmi_page').style.display = 'none';\n document.getElementById('hrz_page').style.display = 'none';\n document.getElementById('p_title').innerHTML = (\"Home\");\n}", "title": "" }, { "docid": "b3bcda57ad87471fe7708f6b321fadfc", "score": "0.69887775", "text": "function home() {\n\t//display(\"<br>\");\n\tdisplay(\"Welcome to the site! You can type in or click on any \");\n\tdisplay (\"files\", \"red\");\n\tdisplay(\" or \");\n\tdisplay(\"directories\", \"green\");\n\tdisplay(\" you'd like to access. External links are blue.\");\n\tdisplay(\"<br>\");\n\tdisplay(\"You can also type 'help' for a list of commands.\");\n\tdisplay(\"<br>\");\n\tdisplay(PROMPT(), \"blue\");\n}", "title": "" }, { "docid": "bf901e7f9902cf6237e3bee36bd4ef82", "score": "0.6953928", "text": "function setupWelcomeScreen() {\n\tdisplayNoneAllScreens();\n\tdocument.getElementById(\"welcome\").style.display = 'block';\n\n\n\t// go to login screen when user clicks on login button\n\tdocument.getElementById(\"loginBtn\").addEventListener(\"click\", login, false);\n\n\t// go to register screen when user clicks on register button\n\tdocument.getElementById(\"registerBtn\").addEventListener(\"click\", register, false);\n\n\t// set difault user's credentials\n\tsessionStorage.setItem(\"p\", \"p\");\n}", "title": "" }, { "docid": "f49f519721a0fd935be10554e8f94d66", "score": "0.6942994", "text": "home() {\n\t\tActions.home();\n }", "title": "" }, { "docid": "fdbe51e60df744d49986852200075c17", "score": "0.6932957", "text": "function welcomeScreen() {\n\t\t$(\"header\").fadeIn(1000);\n\t\t$(\"#beginButton\").fadeIn(1000);\n\t\t$(\"#submitButton\").hide();\n\t\t$(\"#continueButton\").hide();\n\t\t$(\"#retryButton\").hide();\n\t}", "title": "" }, { "docid": "4a0eb5ec7009db3ac7055f68d0cb191b", "score": "0.69144964", "text": "function initHomeScreen() {\r\n // clear\r\n // Move modal to body\r\n // Fix Bootstrap backdrop issue with animation.css\r\n $('.modal').appendTo(\"body\");\r\n //$(\"#acControlDisplay\").addClass(\"hidden\")\r\n //alert(GLOBAL_VAL.groupid);\r\n if (typeof GLOBAL_VAL.groupid == \"undefined\") {\r\n \tGLOBAL_VAL.groupid = \"1\";\r\n }\r\n \r\n \r\n updateData(GLOBAL_VAL.groupid);\r\n \r\n // getFirstCompany then generateMap\r\n updateCompanyMap();\r\n // ajax then get alarm notification\r\n updateAlarmNotificationChart();\r\n\r\n // special config\r\n $(window).resize(function() {\r\n homeScreenData();\r\n });\r\n homeScreenData();\r\n \r\n \r\n }", "title": "" }, { "docid": "2ffa6274b7d0f991f8a5d4677ca69cd4", "score": "0.68963045", "text": "function homeview()\r\n {\r\n debug(\"Home Page Viewed\");\r\n mixpanel.track('Home Page Views', \r\n {\r\n 'page name' : document.title,\r\n 'url' : window.location.pathname\r\n });\r\n }", "title": "" }, { "docid": "b784e59ff2d4f46fdb1c24026d2a0b86", "score": "0.6874751", "text": "function goHome() {\n modifyDocument('empty', ['left', 'center']);\n currentlyViewing = null;\n left.appendChild(userInfo(primaryUser));\n left.appendChild(getInteractions(currentlyViewing, interactions, 0));\n center.appendChild(updatePoster());\n center.appendChild(allUpdates());\n}", "title": "" }, { "docid": "b1dd52df60c6e62a2574c06ba1b6303c", "score": "0.68743676", "text": "function go_home(){\t\n document.getElementById(\"high_scores_page\").style.display= \"none\";\n document.getElementById(\"homeContainer\").style.display= \"block\";\n clear_up();\n }", "title": "" }, { "docid": "11bdb2b3f8a32ea134e0872d8947920a", "score": "0.6845689", "text": "function loadHomePage() {\r\n $(\"#full-screen-game-container-col\").css(\r\n \"background\",\r\n \"url('https://res.cloudinary.com/wondrouswebworks/image/upload/v1576620176/realm-of-rantarctica/backgrounds/forest.png')\"\r\n );\r\n $(\"#post-battle-page, #level-select-page, #battle-screen\").hide();\r\n $(\"#landing-page\").show();\r\n }", "title": "" }, { "docid": "fde83bb40a95c709950b8e911f47fadd", "score": "0.68371844", "text": "function main() {\n setHomePage();\n eventModal();\n}", "title": "" }, { "docid": "fe18819ce477c4b59e59fc3226b996ef", "score": "0.6813664", "text": "function loadHomePage () {\n clearWholePage();\n console.log(\"Loading home page\");\n var div = createDiv();\n var welcome = createHeading(2, \"Welcome User\");\n welcome.setAttribute(\"class\", \"welcome_message\");\n div.appendChild(welcome);\n var button = createButton (\"Start Game\");\n button.classList.add(\"button_style1\", \"pulse\");\n div.appendChild(button);\n button.onclick = loadDomainSelection;\n document.body.appendChild(div);\n}", "title": "" }, { "docid": "c9ebdbee4bb6ebc1debdc87147b8b9ee", "score": "0.680517", "text": "function _displayHome(home) {\n if (!header) {\n header = new BST.BSTHeader(home);\n header.draw(document.getElementById(\"header\"));\n }\n header.displayAsHome();\n // only create the home view at the first time\n if (!homeView) {\n homeView = new BST.HomeView(home, header);\n }\n var elem = homeView.base;\n var show = document.getElementById(\"mainShow\");\n if (show) {\n KIP.addClass(show, \"offscreen\");\n }\n var host = document.getElementById(\"homeElements\");\n host.innerHTML = \"\";\n host.appendChild(elem);\n KIP.removeClass(host, \"offscreen\");\n }", "title": "" }, { "docid": "df2a741d720efd0792fe581a5602543f", "score": "0.67651206", "text": "function homeScreen() {\n //Title text\n background(0);\n textSize(50);\n textAlign(CENTER);\n fill(255);\n text(\"Welcome to ForestQuest!\", 500, 200)\n textSize(30);\n text(\"Please choose a character.\", 500, 250)\n //Draws Wizard, Scientist, and Cowboy characters\n //Specifies scale (between 0 and 1)\n drawWizardHomeScreen(1);\n drawScientistHomeScreen(1, 0);\n drawCowboyHomeScreen(1, 0);\n fill(0);\n //Defines click boxes around characters to select\n if ((mouseX > 200) && (mouseX < 200 + 100) && (mouseY > 300) && (mouseY < 300 + 310) && (mouseIsPressed == true)) {\n page = 2;\n }\n if ((mouseX > 450) && (mouseX < 450 + 100) && (mouseY > 300) && (mouseY < 300 + 310) && (mouseIsPressed == true)) {\n page = 3;\n }\n if ((mouseX > 700) && (mouseX < 700 + 100) && (mouseY > 300) && (mouseY < 300 + 310) && (mouseIsPressed == true)) {\n page = 4;\n }\n}", "title": "" }, { "docid": "898d8287a8f0f2f8a51c47b4df093587", "score": "0.67408746", "text": "function loadHomeScreen(){\n console.log(\"loadHomeScreen()\");\n setHomeScreen();\n if(newMessageFlag === 1){\n newMessageFlag = 0;\n toggleVisible(\"conversation\", \"conversations\", \"newMessage\");\n } else {\n toggleVisible(\"conversation\", \"conversations\");\n }\n}", "title": "" }, { "docid": "9ffa11e6ebd89b0b8bbcd9a38bad6807", "score": "0.6736874", "text": "goHome() {\n // THIS COULD HAPPEN ANYWHERE SO HIDE ALL THE OTHERS\n this.view.showElementWithId(TodoGUIId.TODO_LIST, false);\n this.view.showElementWithId(TodoGUIId.TODO_ITEM, false);\n\n // AND GO HOME\n this.view.showElementWithId(TodoGUIId.TODO_HOME, true); \n }", "title": "" }, { "docid": "aa1d74a2341bbea93427fcfe299696e3", "score": "0.673345", "text": "function loadHomeAssistantOrLoginPage () {\n if (settings.kiosk()) {\n browserWindow.setFullScreen(true)\n }\n if (settings.hasUrl()) {\n load('index.html')\n if (settings.tray()) {\n TrayInit(settings.url(), settings.password(), settings.icon())\n }\n } else {\n load('connect.html')\n }\n}", "title": "" }, { "docid": "3ae29321fa8d78488d2cd24c26e68a66", "score": "0.67284083", "text": "function home() {\n $('#index').hide();\n $('#registro').hide();\n $('#options').show();\n $('#profile').hide();\n $('#answers').hide();\n $('#checkCash').hide();\n $('#calculate').hide();\n $('#home').show();\n closeMenu()\n}", "title": "" }, { "docid": "443385bc2a749ac7573310488045bb47", "score": "0.672422", "text": "function goHomeModalOnDisplay() {\n inGameInfo.pause = true\n\n iconOptionsClickable($(iconGoHome).attr('data-name'))\n\n screenOverlay.addClass(cssDisplayNone)\n goHomeModalArea.removeClass(cssDisplayNone)\n }", "title": "" }, { "docid": "ccc55995893bacfd7d5ad045c3ecb7b5", "score": "0.67203027", "text": "function displayHome() {\n loadingAnimation()\n const userLogged = getUserStorageData()\n $(\"#container\").empty();\n $(\"#footer\").css(\"display\", \"\");\n $(\"#container\").append(`\n <div id=\"main\">\n <div class=\"display-4\">Bienvenue ${userLogged.pseudo}, quelle agréable journée pour écouter de la musique</div>\n <h2>Écouté recemment :</h2>\n <div id=\"recently\"></div>\n <h2>À Découvrir :</h2>\n \n <div id=\"discover\"></div>\n </div>\n `);\n $(\"#favorite\").empty();\n $('#favorite').append(`<a href=\"#\" data-url =\"/favorite\"> Favoris <i class=\"far fa-heart fa-2x\"></i> </a>`)\n if($(\"#navbar\").text().length == 0){\n displayNavBar();\n displayMenu();\n displayFooter();\n }\n setRecentlyListenedAlbums()\n getRecentyListenedAlbums()\n getAllAlbums()\n adaptFooterPosition()\n}", "title": "" }, { "docid": "3b2720945408f27557d8c31fbf066698", "score": "0.67018545", "text": "function loadHomePage() {\n $('#report').removeClass('report');\n $('#report').hide();\n $('#home').removeClass('report');\n $('#sm').show();\n $('#sm').removeClass('screenshot');\n $('#sm2').show();\n $('#sm2').removeClass('screenshot');\n $('#tab').show();\n $('#tab').removeClass('screenshot');\n $('#smartphone').removeClass(\"sm\");\n $('#smartphone').removeClass(\"sm2\");\n $('#smartphone').removeClass(\"tab\");\n $('#console-title').hide();\n $('#console').hide();\n $('#cog1').addClass(\"active\");\n $('#cog2').addClass(\"active\");\n checkURI(window.location.search);\n}", "title": "" }, { "docid": "eb3aaf123efd3750b64af8f60c02c004", "score": "0.6684741", "text": "function redirectFromHomeScreenToHomeScreen() {\n closeHamburgerMenuHomeScreen();\n catid = \"cat00000\";\n count = -1;\n getCategeoryData();\n BreadCrumbText = [];\n HomeScreen.LblBreadcrumb.text = kony.i18n.getLocalizedString(\"Home\");\n HomeScreen.BaseHeader.FlexBack.isVisible = false;\n firstPage = 1;\n HomeScreen.show();\n}", "title": "" }, { "docid": "2f4a6f09b2438bed2b8d60bfd095cc35", "score": "0.66826534", "text": "function displayHome() {\n isNonActiveLink();\n hideAllPages();\n home.style.display = 'block';\n}", "title": "" }, { "docid": "ac4d5fb7dcfc6332da2c795b331e8328", "score": "0.6682102", "text": "function render() {\n homeView = new HomeView({\n collection:that.applications,\n locations:that.locations,\n cautionOverlay:serverCautionOverlay,\n appRouter:that\n });\n veryFirstViewLoad = !that.currentView;\n that.showView(\"#application-content\", homeView);\n }", "title": "" }, { "docid": "39e0bf2e07be8b7f0d7e7f3cd2fe5e18", "score": "0.66384506", "text": "function returnToHome(){\n\t\t\t$(\"#leftlink\").show();\n\t\t\t$(\"#toplink\").show();\n\t\t\t$(\"#rightlink\").show();\n\t\t\t$(\"#bottomlink\").show();\n\t\t\t$(\"#menubutton\").show();\n\t\t\t$(\"#introtext1\").hide();\n\t\t\t$(\"#introtext2\").hide();\n\t\t\t$(\"#introtext3\").hide();\n\t\t\t$(\"#introtext4\").hide();\n\t\t\t$(\".crosby\").hide();\n\t\t\t$(\".crosbyspeech\").hide();\n\t\t\t$(\".introbg\").hide();\n\t\t\thideCorr();\n\t\t\t\t\t$(\"#canvas\").hide();\n\n\n\t\t\tcanvasReset();\n\t\t\t\t\tintroON=false;\n}", "title": "" }, { "docid": "e89c8e76da59694fb60aff760a3f6e2e", "score": "0.6637549", "text": "function _navigateHome() {\n var hState = {\n url: \"./\",\n type: NavigationType.HOME,\n title: \"home\",\n showID: \"\"\n };\n BST.pushHistoryState(hState);\n var onLoaded = function (home) {\n _displayHome(home);\n };\n BST.Server.loadHome(onLoaded);\n }", "title": "" }, { "docid": "9362bc660139f9866b74fae24428c972", "score": "0.661346", "text": "function homePage(path){\n\t\t\n\t\tif(quizView) {\n\t\t\tquizView.hide();\n\t\t}\n\n\t\tif(homeView) {\n\t\t\thomeView.show();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\thomeView = new View({\n\t\t\ttemplate: homeTemplate,\n\n\t\t\tcontainer: '#home',\n\n\t\t\tmodel: scoreBoard,\n\n\t\t\tevents: {\n\t\t\t\t'#go' : {\n\t\t\t\t\tclick: function(e) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\trouter.handleRoute('/quiz.html');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\t'#reset' : {\n\t\t\t\t\tclick: function(e) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tthis.model.reset();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tinit: function() {\n\n\t\t\t\tvar that = this;\n\n\t\t\t\tthis.model.on('change', function(){\n\t\t\t\t\tthat.render();\n\t\t\t\t});\n\n\t\t\t}\n\n\t\t});\n\n\t\thomeView.render();\n\t\thomeView.show();\n\t}", "title": "" }, { "docid": "c97806b9a03bd969e3276fe9aa933d8c", "score": "0.6610952", "text": "function backToHome() {\n setHeader('Home');\n hideAll();\n changeHomeDisplay('flex');\n }", "title": "" }, { "docid": "1b5db654ca4ee64077f65fd963d5ac7b", "score": "0.65941066", "text": "function HomePageDisplay() {\n clearGraph();\n $(`footer`).html(`<div id=\"allCoins\" class=\"row bgimg-3\"></div>`);\n $(`#headerSpinner`).addClass(\"loader\");\n $(\".bgimg-1\").css({ \"background-image\": `url(\"img/homeHeader.jpg\")`, \"min-height\": \"50%\" });\n $(\"#firstParalex\").html(\"<b><u>crypTrack</b></u><br> The Crypto Database\");\n $(\".bgimg-2\").css({ \"background-image\": `url(\"img/homeHeader.jpg\")`, \"min-height\": \"50%\" });\n $(\"#secondParalex\").text(\"\");\n $(`#headerSpinner`).removeClass(\"loader\");\n }", "title": "" }, { "docid": "b9c4a95ceb1f9f08c4325a80892ddcf2", "score": "0.6575111", "text": "function Main() {\n console.log(`%c App Started...`, \"font-weight: bold; font-size: 20px;\");\n \n insertHTML(\"/Views/partials/header.html\", \"header\");\n\n setPageContent(\"/Views/content/home.html\");\n\n insertHTML(\"/Views/partials/footer.html\", \"footer\");\n \n }", "title": "" }, { "docid": "e9727279afc0e12535bda528751f0fd9", "score": "0.6572539", "text": "function showHomepage(email){\n \n // show the following\n $('#show-homepage').removeClass('hide');\n $('.homepage').removeClass('hide');\n $('#topZone').show();\n $('#userName').show();\n $('.map-page').addClass('hide');\n // message to display\n $('#userName').html('Logged in as: ' + email); \n\n }", "title": "" }, { "docid": "6fa6f7b78a2f44da4ece97ae021ee765", "score": "0.6532941", "text": "function home() {\n var $btnStart = $('#btnStart'),\n $btnScore = $('#btnScore');\n\n //Create nav buttons if they don't already exist.\n if(!$btnStart.length) {\n $btnStart = $('<button id=\"btnStart\"></button>').text('START');\n\n $('body').append($btnStart);\n }\n if(!$btnScore.length) {\n $btnScore = $('<button id=\"btnScore\"></button>').text('SCORES');\n\n $('body').append($btnScore);\n }\n\n //Show buttons\n $btnStart.show();\n $btnScore.show();\n\n //Hide the high score list.\n if($('#scoreTable').length) $('#scoreTable').hide();\n\n //Title\n cvsFront.width = cvsFront.width;\n cvsBg.width = cvsBg.width;\n ctxFront.font = 'bold 50px Courier';\n ctxFront.fillStyle = 'rgb(163, 188, 227)';\n ctxFront.fillText('AIRPLANE!', 250, 40);\n\n //Display buttons\n $btnStart.css({\n 'position' : 'absolute',\n 'top' : $(cvsFront).height() * .75 + 'px',\n 'left' : $(cvsFront).width() *.33 + 'px',\n 'z-index' : '3'\n });\n $btnScore.css({\n 'position' : 'absolute',\n 'top' : $btnStart.css('top'),\n 'left' : $(cvsFront).width() *.33 + 100 + 'px',\n 'z-index' : '3'\n });\n\n //Add some event handlers\n $btnStart.one('click', startClick);\n $btnScore.one('click', scoreClick);\n }", "title": "" }, { "docid": "df4dd17d03d128d72a9075a33fa49ea6", "score": "0.6527293", "text": "function showHome(){\n\t//Hide other divs and show selected\n\tdocument.getElementById(\"homeDiv\").style.display = \"block\";\n\tdocument.getElementById(\"startDiv\").style.display = \"none\";\n\tdocument.getElementById(\"reqDiv\").style.display = \"none\";\n\tdocument.getElementById(\"respDiv\").style.display = \"none\";\n\t\n\t//Change colors of tab to show active one\n\tdocument.getElementById(\"homeTab\").style.backgroundColor = \"silver\";\n\tdocument.getElementById(\"startTab\").style.backgroundColor = \"white\";\n\tdocument.getElementById(\"reqTab\").style.backgroundColor = \"white\";\n\tdocument.getElementById(\"respTab\").style.backgroundColor = \"white\";\n}", "title": "" }, { "docid": "aa00ead2ffc77149f8e51c5382c0ef81", "score": "0.65133846", "text": "function drawScreen() {\n // Header\n appendHtml('#header', `<a class=\"w3-xxlarge\">Motion-profile</a>`);\n\n\n // Menu buttons\n drawButton('#top-menu-buttons', 'reset', CLASSTEXT_BUTTON, 'fa-home');\n drawButton('#top-menu-buttons', 'share', CLASSTEXT_BUTTON, 'fa-share');\n drawButton('#top-menu-buttons', 'export', CLASSTEXT_BUTTON, 'fa-save');\n drawButton('#top-menu-buttons', 'edit', CLASSTEXT_BUTTON, 'fa-sliders');\n}", "title": "" }, { "docid": "6dc9bbdd5618220afce4f4b6186f61d2", "score": "0.65027875", "text": "function goToHome() {\n // WE FIRSTLY CHANGE THE PAGE FOR THE HOME\n scene.highlightT(-1);\n \n $homeBlock.show();\n $selectorBlock.hide();\n $dimensionBlock.hide();\n $body.toggleClass('page', false);\n $body.toggleClass('home', true);\n $body.toggleClass('selector', false);\n status = \"home\";\n $primaryHeaderBtn.toggleClass('icon-menu', true);\n $primaryHeaderBtn.toggleClass('icon-back', false);\n \n // THEN WE GET THE ANIMATIONS BACKWARDS\n var tl = new TimelineMax();\n tl.from(\"#startBtn\", 0.2, { ease: Back.easeOut.config(1.7), scale: 0});\n tl.from(\"#hashtagBtn\", 0.2, { ease: Back.easeOut.config(1.7), y: 100 });\n tl.from(\"#startBtn\", 0.4, { ease: Back.easeIn.config(1.7), width: \"50px\", height: \"50px\", padding: \"0\"});\n tl.from(\"section.home .content .excerpt\", 0.25, { opacity: 0 });\n tl.from(\"#startBtn\", 0.1, {color: \"transparent\"});\n}", "title": "" }, { "docid": "0ca7aba39e9f3677573f46589a93e2dd", "score": "0.648971", "text": "function HomePageSettings() {}", "title": "" }, { "docid": "6e1f224c0355d0ea2c34ac6bc3585641", "score": "0.64893955", "text": "function startUp() {\n //Hide all pages except for Login Page, which is the start page.\n\n // First, hide all padded pages\n setHide([...document.getElementsByClassName(\"paddedPage\")])\n\n // Then, display login screen \n itemBlock(document.getElementById(\"loginModeDiv\"))\n\n // Make sure correct menu button icon is displayed\n itemBlock(document.getElementById(\"menuBtn\"))\n itemHide(document.getElementById(\"menuBtnAlt\"))\n\n\n //Clear all text from email and password fields\n setClearText([...document.getElementsByClassName(\"login-input\")])\n\n //Set top bar text\n itemBlock(document.getElementById(\"topBarTitleWelcome\"))\n itemHide(document.getElementById(\"topBarTitleData\"))\n\n //Hide the bottom bar initially\n itemHide(document.getElementById(\"bottomBar\"))\n\n //Hide all menu items except for items of current mode:\n setHide([...document.getElementsByClassName(\"dataMenuItem\")])\n\n //Disable menu button:\n toggleEnable(document.getElementById(\"menuBtn\"))\n\n //Set current mode\n mode = \"loginMode\"\n\n //set the input focus to the email field\n itemFocus(document.getElementById(\"emailInput\"))\n\n\n }", "title": "" }, { "docid": "a2f8adc982874aa80947c917ca21a360", "score": "0.64847124", "text": "function showSettings()\n{\n\t/*\n\t\tcall the createBasicUIScreen to create a basic UI.\n\t\tIt can take upto 5 parameters. \n\t\t\n\t\tThe first one specifies whether the screen has a back button or not.\n\t\tIf there is a back button then we pass the function as second parameter to assign it to the onclick listener \n\t\tthat must execute when back button is pressed.\n\t\t\n\t\tThird parameter states the class name for center div if its other than centerUIDiv class.\n\t\tHere we have passed undefined as we want the default centerUIDiv class.\n\t\t\n\t\tThe fourth parameter is the heading we want above the buttons.\n\t\t\n\t\tThe fifth parameter is the class that we want to apply to the heading.\n\t*/\n\tvar centerUIDiv = createBasicUIScreen(true, window.loadGame, undefined, \"Settings\", \"labels\");\n\t\n\t//create a button div with text \"Reset Category\" with class \"menuButtonsDiv\" and\n\t//onclick listener set to the function resetACategory.\n\tvar resetButtonDiv = createButtonDiv(\"Reset Category\", \"menuButtonsDiv\", resetACategory);\n\t\n\t//create a button div with text \"Reset All Categories\" with class \"menuButtonsDiv\" and\n\t//onclick listener set to the function resetAll.\n\tvar resetGameButtonDiv = createButtonDiv(\"Reset All\", \"menuButtonsDiv\", resetAll);\n\t\n\t/*\n\t\tcreate a button div with text \"Music\" with class \"menuButtonsDiv\" and\n\t\tonclick listener set to show the popup.\n\t\tWe are passing a function that checks whether the music is playing or not\n\t\tand acts accordingly.\n\t*/\n\tvar musicOptions = createButtonDiv(\"Music\", \"menuButtonsDiv\", function() {\n\t\tif(window.localStorage.getItem(\"music\") == \"true\")\n\t\t\tvar musicString = \"Music : On\";\n\t\telse\n\t\t\tvar musicString = \"Music : Off\";\n\t\t\t\n\t\tvar popup = createPopup(\"Music Settings\", [\n\t\t\t{\n\t\t\t\tname: musicString,\n\t\t\t\tfunc: function() {\n\t\t\t\t\ttoggleMusic();\n\t\t\t\t\tif(musicString === \"Music : On\")\n\t\t\t\t\t{\t\n\t\t\t\t\t\tmusicString = \"Music : Off\";\n\t\t\t\t\t\tthis.innerHTML = musicString;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tmusicString = \"Music : On\";\n\t\t\t\t\t\tthis.innerHTML = musicString;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]);\n\t\t\n\t\t\n\t\t//create a close button.\n\t\tvar closeButton = createButtonDiv(\"X\", \"close\", function() {this.parentElement.parentElement.style.visibility = \"hidden\";});\n\t\tpopup.insertBefore(closeButton, popup.firstChild);\n\t\t\n\t\t//create a volume slider to control the volume.\n\t\tvar volumeSlider = document.createElement(\"INPUT\");\n\t\tvolumeSlider.setAttribute(\"type\", \"range\");\n\t\tvolumeSlider.value = 5;\n\t\tvolumeSlider.oninput = function() { audio.volume = volumeSlider.value/100;};\n\t\tvolumeSlider.onchange = function() { audio.volume = volumeSlider.value/100;}; \n\t\tpopup.appendChild(volumeSlider);\n\t});\n\t\n\t// about div for attributions\n\tvar aboutDiv = createButtonDiv(\"About\", \"menuButtonsDiv\", function(){\n\t\tcreatePopup( \"Music by Eric Matyas www.soundimage.org\", \n\t\t\t[{\n\t\t\t\tname: \"Close\", func: function(){\n\t\t\t\t\tthis.parentElement.parentElement.style.visibility=\"hidden\";\n\t\t\t\t}\n\t\t\t}]\n\t\t);\n\t});\n\t\n\t//append these buttons.\n\tcenterUIDiv.appendChild(resetButtonDiv);\n\tcenterUIDiv.appendChild(resetGameButtonDiv);\n\tcenterUIDiv.appendChild(musicOptions);\n\tcenterUIDiv.appendChild(aboutDiv);\n}", "title": "" }, { "docid": "c558e63630acda5e8d6cc3fe16ae5c1e", "score": "0.6478201", "text": "function startUp() {\n home();\n setInterval(getHistory, 1000);\n document.getElementById(\"go\").onclick = search;\n document.getElementById(\"home\").onclick = home;\n }", "title": "" }, { "docid": "832a80ad101a0c03be553206ca38699e", "score": "0.6451315", "text": "function returnToHomeScreen() {\n\tquizContainer.classList.add(\"hidden\");\n\tuserFinalScoreContainer.classList.add(\"hidden\");\n\thighScoresContainer.classList.add(\"hidden\");\n\tmuteButton.classList.add(\"hidden\");\n\tunMuteButton.classList.add(\"hidden\");\n\texitQuizContainer.classList.add(\"hidden\");\n\thomeContainer.classList.remove(\"hidden\");\n}", "title": "" }, { "docid": "ca8dc88448743abdf9a1dd486c7c7caf", "score": "0.64358735", "text": "function showHome() {\n document.getElementById('inc-sheet').style.visibility = 'hidden';\n document.getElementById('exp-sheet').style.visibility = 'hidden';\n document.getElementById('home').style.visibility = 'visible';\n}", "title": "" }, { "docid": "daf8438d4de2906184fb47a9c066942a", "score": "0.64292496", "text": "function initScreen()\n{\n\thideNext();\n\thidePrev();\n\tsetTitle(\"\");\n}", "title": "" }, { "docid": "bfa2face7f6a1b4c686403b3d9e9f33c", "score": "0.6421605", "text": "function HomeContent(windowID : int)\n{\n //all gui location numbers are to be based on screenWidth and screenHeight\n //intro text line 1\n GUI.Label (Rect ((Screen.width/45), (Screen.height/25), (Screen.width/2), (Screen.height/2)), introTextLine1);\n //intro text Line 2\n GUI.Label (Rect ((Screen.width/45), (Screen.height/15), (Screen.width/2), (Screen.height/4)), introTextLine2);\n //intro text Line 3\n GUI.Label (Rect ((Screen.width/45), (Screen.height/10), (Screen.width/2), (Screen.height/4)), introTextLine3);\n\t//intro text Line 4\n\tGUI.Label (Rect ((Screen.width/45), (Screen.height/7.5), (Screen.width/2), (Screen.height/4)), introTextLine4);\n\t//intro text Line 5\n\tGUI.Label (Rect ((Screen.width/45), (Screen.height/6), (Screen.width/2), (Screen.height/4)), introTextLine5);\n\t\n}", "title": "" }, { "docid": "8931b73524a02a946b06b0c39f38115b", "score": "0.6420443", "text": "function home() {\n //Scanner ausschalten\n if (_scannerIsRunning) {\r\n collapseScanner();\r\n }\n //Barcode entfernen\n $('#bm_barcode').text(\"Barcode:\");\n\n $.mobile.changePage(\"#home_page\");\n }", "title": "" }, { "docid": "34348f2a53130b6232d59122dca9f632", "score": "0.63965535", "text": "function Start() {\n // local variable\n let title = document.title;\n\n console.log(\"%c App Started!\", \"font-weight:bold; font-size: 20px;\");\n console.log(\"%c ----------------------------\", \"font-weight:bold; font-size: 20px;\");\n console.log(\"Title: \" + title);\n\n try {\n \n\n switch (title) {\n case \"Home\":\n\n content.HomeContent();\n break;\n\n case \"About\":\n content.AboutContent();\n break;\n\n case \"Contact\":\n content.ContactContent();\n break;\n\n default:\n throw (\"Title not Defined\");\n break;\n }\n }\n catch(err) {\n console.log(err);\n console.warn(\"Something went wrong when switching pages\");\n }\n \n }", "title": "" }, { "docid": "3b9e51218a31d92852ad626c602fd8bf", "score": "0.63899446", "text": "function initHome(home) {\n $home = home;\n loadHome();\n }", "title": "" }, { "docid": "fdd4c050f03a3a25862d92a6448918cb", "score": "0.6387248", "text": "function goHome() {\r\n if (page.getCurPage() != 'home') {\r\n\t\tif (page.getCurPage() == \"browseStu\") {\r\n\t\t\t// remove the Browse Student Page\r\n\t\t\t$(\"#browseStuPage\").remove();\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// adjust the pages that are shown\r\n\t\t\t// Hide the current page & make browse student the new current page\r\n\t\t\tvar curSelector = '#' + page.getCurPage()+\"Page\";\r\n\t\t $(curSelector).css(\"display\",\"none\");\r\n\t\t}\r\n\t\t \r\n\t // display the current page\r\n\t $(\"#homePage\").css(\"display\",\"block\");\r\n\t\tpage.setCurPage(\"home\");\t\r\n }\r\n\t\t\t \t\t\r\n}", "title": "" }, { "docid": "1c87457ab9b3b885879c8c61a146343d", "score": "0.6380531", "text": "function showHomeView() {\n $('#views').children().hide();\n $('#homeView').show();\n $('#profilePage').show();\n\n }", "title": "" }, { "docid": "511317af1fb72490f1b9ea0dc6e10bba", "score": "0.6369854", "text": "function displayAgileScrumHome(){\r\n\t\t\r\n\t\t// set the other content centers to empty.\r\n\t\tdocument.getElementById(\"contentCenterA\").style.display = \"none\";\r\n\t\tdocument.getElementById(\"contentCenterB\").style.display = \"none\";\r\n\t\tdocument.getElementById(\"contentCenterC\").style.display = \"none\";\r\n\t\tdocument.getElementById(\"contentCenterD\").style.display = \"none\";\r\n\t\tdocument.getElementById(\"contentCenterE\").style.display = \"none\";\r\n\t\t\r\n\t\t\r\n\t\t// Now fill contentCenterB with the folder details.\r\n\t\tdocument.getElementById(\"contentCenterF\").style.display = \"block\";\r\n\t\tdocument.getElementById(\"contentCenterF\").innerHTML= \"&nbsp;&nbsp;&nbsp;Working...\";\r\n\t\tvar url=\"/GloreeJava2/jsp/AgileScrum/displayAgileScrumHome.jsp?\";\r\n\t\turl += \"&bustcache=\" + new Date().getTime() ;\r\n\t\t\r\n\t\tfillOPCenterGeneric(url, \"contentCenterF\");\r\n\t}", "title": "" }, { "docid": "cce7e845ee2bed2c59128ab4cadb2e06", "score": "0.636806", "text": "function initialize() {\n let screen = null;\n //\n // Go through each of the screens and tell them to initialize\n for (screen in screens) {\n if (screens.hasOwnProperty(screen)) {\n screens[screen].initialize();\n }\n }\n //\n // Make the main-menu screen the active one\n showScreen('main-menu');\n }", "title": "" }, { "docid": "4b6ee471ca23c784023592205db288e0", "score": "0.6363911", "text": "function loadHomePage() {\n\n setTopMargin(100);\n\n var home = $('<div>').appendTo(container).addClass('home'),\n menu = $('<div>').appendTo(home).addClass('menu'),\n link1 = $('<a>').appendTo(menu).text('Log in').on('click', loginPopup),\n link2 = $('<a>').appendTo(menu).text('Create user').on('click', createUserPopup),\n link3 = $('<a>').appendTo(menu).text('Create game').addClass('disabled').attr('id', 'cgame_btn'), //disabled by default\n link4 = $('<a>').appendTo(menu).text('Join game').addClass('disabled').attr('id', 'jgame_btn'), //disabled by default\n link5 = $('<a>').appendTo(menu).text('Log out').addClass('disabled').attr('id', 'logout_btn'), //disabled by default\n content = $('<div>').appendTo(home).addClass('content row'),\n col1 = $('<div>').appendTo(content).addClass('col-xs-12 col-md-4 col-lg-4').attr('id', 'col1'),\n col2 = $('<div>').appendTo(content).addClass('col-xs-12 col-md-4 col-lg-4').attr('id', 'col2'),\n col3 = $('<div>').appendTo(content).addClass('col-xs-12 col-md-4 col-lg-4').attr('id', 'col3'),\n title1 = $('<div>').appendTo(col1).addClass('title').text('Stats'),\n title2 = $('<div>').appendTo(col2).addClass('title').text('Users'),\n title3 = $('<div>').appendTo(col3).addClass('title').text('Games');\n\n //enable log out and create games buttons right after creating them, only if there are logged in users\n if(isLoggedIn()) {\n enableCreateGameBtn();\n enableLogoutBtn();\n }\n\n //populate the columns and get all the tokens with the help of promises\n var p1 = getTokensRequest();\n var p2 = getUsersRequest();\n var p3 = getGamesRequest();\n\n listenForPromises(p1, p2, p3);\n\n }", "title": "" }, { "docid": "1818f0f6f89ec3ca4de9e275034a37f1", "score": "0.6358118", "text": "function goHome() {\n document.getElementById('navTab1').style.display = 'block';\n document.getElementById('navTab2').style.display = 'none';\n document.getElementById('navTab3').style.display = 'none';\n sethHomeLink.style.background = '#e2ebc7';\n sethAboutUsLink.style.background = '#f1f1f1';\n sethChooseLayoutLink.style.background = '#f1f1f1';\n }", "title": "" }, { "docid": "4f18df0784254e9a96e360ddee199afa", "score": "0.63448644", "text": "_initHome() {\n this.homeDirectory = this.root.find(\"home\");\n this._createReadMe(this.homeDirectory);\n }", "title": "" }, { "docid": "33e4b5461d13a36ca32058810da37a4d", "score": "0.63409317", "text": "function HomeController() {\n this.panelItem = {\n bodyMessage: \"The Parliament has a strong reputation for openness and accessibility, based on its founding principles and its policies and practices. We want to use developments in digital technology to continue to deliver on these core values.\",\n titleMessage: \"Home Title:\"\n };\n }", "title": "" }, { "docid": "7f9fd0f921446438ef7bb7a2ca07b5ee", "score": "0.6337305", "text": "function mainScreen(){\n\n\t$('#battleWindow').empty();\n\t$titleScreen = $('<div></div>');\n\t$titleScreen.html('RPG battle demo').attr('id', 'titleScreen');\n\t$(\"#battleWindow\").append($titleScreen);\t\n\t$('button').addClass('element-hide');\n\t$('#HUD-statsWindowWrapper').addClass('element-hide');\n $('#titleScreenMenu-button-newGame').removeClass('element-hide');\n\t$('#titleScreenMenu-button-loadGame').removeClass('element-hide');\n $('#HUD-playerStats div').addClass('element-hide');\n $('#HUD-enemyhp').addClass('element-hide');\n\t$('#HUD-HPbar').addClass('element-hide');\n\t$('#HUD-MPbar').addClass('element-hide');\n $('#titleScreenMenu-button-newGame').html('New Game');\n\t$('#titleScreenMenu-button-loadGame').html(\"Load Game\");\n\t\n}", "title": "" }, { "docid": "b532dfaba719e2b1f0c4641b532e2010", "score": "0.6322941", "text": "function start() {\n\tvar currentMenuItemId = params.CurrentMenuItemId.value;\n\tvar menuname = params.menuname.value;\n\tvar mainmenuname = params.mainmenuname.value;\n\n\tsession.privacy.currentMenuItemId = currentMenuItemId;\n\tsession.privacy.menuname = menuname;\n\tsession.privacy.mainmenuname = mainmenuname;\n\n\tvar viewObj = {\n\t\tCurrentMenuItemId: currentMenuItemId,\n\t\tmenuname: menuname,\n\t\tmainmenuname: mainmenuname,\n\t\titems: avItems()\n\t};\n\n\tapp.getView(viewObj).render('/avatax/avhelp');\n}", "title": "" }, { "docid": "df6c8ee6884bc467e7574b70e9d8244f", "score": "0.631993", "text": "function InitHomePage(){\n // Ready search form in corner, with non-standard names.\n // (Default should not load as the default ids do not exists here.)\n\n // Start carousel.\n var mcid = \"#monarch-carousel\"; // carousel series\n var mtid = \"#monarch-tabber\"; // carousel tabber\n var nextid = \"#monarch-tabber-next\"; // carousel tabber\n var previd = \"#monarch-tabber-prev\"; // carousel tabber\n var car = new MonarchCarousel(mcid, mtid, nextid, previd);\n car.start_cycle();\n\n // Get explore popovers ready.\n jQuery('[data-toggle=\"popover\"]').popover({'trigger':'hover'});\n}", "title": "" }, { "docid": "4793f030975055d6a7a10f727d00db43", "score": "0.6312392", "text": "function loadMainScreen () {\n // present login/signup choice\n const loginSignupChoice = createLoginSignupChoice();\n if (loginSignupChoice) document.body.appendChild(loginSignupChoice);\n\n // present game description\n const gameDescription = createGameDescription();\n if (gameDescription) document.body.appendChild(gameDescription);\n\n // check for user session data\n const sessionID = localStorage.getItem('Oasis-session-id');\n const sessionUsername = localStorage.getItem('Oasis-session-username');\n\n // if both session variables exist/not-null, send to game\n if (sessionID && sessionUsername) {\n // get rid of header\n removePageHeader();\n\n // get rid of login/signup screen\n removeLoginSignupChoice();\n\n // get rid of game instructions\n removeGameDescription();\n\n // start the game!\n initGame();\n }\n}", "title": "" }, { "docid": "87c5cbe06c0f08a573e18d75180e03ad", "score": "0.6309392", "text": "function goToHome() {\n frmHome.show();\n}", "title": "" }, { "docid": "508e1a9e21fdb55bc0cea8997472d667", "score": "0.6306719", "text": "function goHome()\n\t\t{\n\t\t\tthis.gotoAndPlay(122);\n\t\t}", "title": "" }, { "docid": "1a5d49f34c6085c62fbe6a4a2bd73436", "score": "0.6304955", "text": "function show () {\n enterFullScreen();\n colorizeTitleBar();\n disableUserInteraction();\n positionControls();\n\n // Once the extended splash screen is setup, apply the CSS style that will make the extended splash screen visible.\n WinJS.Utilities.removeClass(splashElement, 'hidden');\n}", "title": "" }, { "docid": "19a3d79cfd639ed7c81f76b360ab87a4", "score": "0.630085", "text": "function initialScreen() {\n startScreen = \"<p><a class='start-button' href='#' role='button'>Click here BOO!</a></p>\";\n $(\".mainArea\").html(startScreen);\n }", "title": "" }, { "docid": "b9273222fac56b63133d8bf6093a7540", "score": "0.6289154", "text": "function startMenu() {\n image(earth, width/2, height/2, width, height);\n\n // start menu\n if (state === 0) {\n // title screen\n fill(217, 128, 38);\n text(\"WELCOME TO EQUESTRIA\", width/2, textTop);\n\n // options\n createNewSave();\n loadSave();\n }\n\n // files that have been saved\n else if (state === 1) {\n backButton();\n showSaves();\n }\n}", "title": "" }, { "docid": "e923e66e95320ecc22f13f2e9a8f9d1e", "score": "0.62887025", "text": "function showHome(){\n $(\".adminDiv\").css(\"display\", \"none\");\n $(\".homeDiv\").css(\"display\", \"block\");\n $(\".cs1Div\").css(\"display\", \"none\");\n $(\".cs2Div\").css(\"display\", \"none\");\n $(\".cs3Div\").css(\"display\", \"none\");\n $(\".addProjectDiv\").css(\"display\", \"none\")\n\n $(\".sidenav\").sidenav(\"close\");\n\n $(\"html, body\").animate({\n scrollTop: $(\".homeDiv\").offset().top\n }, \"slow\")\n }", "title": "" }, { "docid": "7b9661a3ae0d8b6d1a351914b4d097c7", "score": "0.62881875", "text": "function showWelcomeScreen(){\n\tswitchDivs(\"#welcomeContainer\",\"flex\");\n}", "title": "" }, { "docid": "bcf09721fba1eeeaa0352955016de17c", "score": "0.62758565", "text": "function openstartup() {\n\tstartup.show()\n}", "title": "" }, { "docid": "13fbb4700ad1e7d46b018e47050ca9af", "score": "0.6265212", "text": "function homeScreen() {\n prompt(homeOptions).then( res => {\n if (res.choice == 'Shopping'){\n console.log('yes')\n shopping()\n }\n else if (res.choice == 'Admin') {\n adminLogin()\n }\n else {\n process.exit()\n }\n })\n}", "title": "" }, { "docid": "e2535243408897573af44bfa13edaef8", "score": "0.6261406", "text": "function setupOutroScreen() {\n clearInterval(spawninterval);\n music.stop();\n restart = createButton(\"Restart\");\n restart.position(width / 2 - 50, height / 2);\n restart.mouseClicked(Restart);\n restart.mousePressed(MainLoop);\n restart\n .style(\"background-color\", \"green\")\n .style(\"border-color\", \"black\")\n .style(\"font-size\", \"30px\")\n .style(\"cursor\", \"pointer\")\n .style(\"border-radius\", \"8px\");\n restart.show();\n }", "title": "" }, { "docid": "a7aadb5a3f9940fd3859995fd18311cd", "score": "0.6244648", "text": "function HomePage() {\n this.kBg = \"assets/Background/snow-bg.png\";\n this.kControlGuide = \"assets/UI/control-guide.png\";\n this.kInformation = \"assets/UI/information.png\";\n\n this.kPlatformTexture = \"assets/BlockUnit/snow-platform.png\";\n this.kHero = \"assets/Character/characters.png\";\n this.kHeroBullet = \"assets/Bullet/pink-bullet.png\";\n this.kTitle = \"assets/UI/Title.png\";\n // this.kCross = \"assets/UI/cross.png\";\n\n\n // The camera to view the scene\n this.mCamera = null;\n\n //\n this.ContinueButton = null;\n this.PlayButton = null;\n this.ControlButton = null;\n this.TrophyButton = null;\n this.AcknowledgeButton = null;\n\n // UI Setting\n this.ButtonWidth = 300;\n this.ButtonHeight = 100;\n this.ButtonSize = [this.ButtonWidth, this.ButtonHeight];\n this.ButtonFontSize = 5;\n this.ButtonPosition = [300, 550];\n\n\n //next\n this.State = null;\n\n}", "title": "" }, { "docid": "c3d6d6046b1456ac651e6c7270538eac", "score": "0.62401396", "text": "function initialScreen() {\n\t\tstartGame = \"<p class='text-center main-button-container'><a class='btn btn-primary btn-lg btn-block start-button' href='#' role='button'>Start Quiz</a></p>\";\n\t\t$(\".mainArea\").html(startGame);\n\t}", "title": "" }, { "docid": "11eb902cae200961adb49cc335c1ff9d", "score": "0.6238561", "text": "function start() {\n showMainMenu();\n}", "title": "" }, { "docid": "99df1ab77d962fb16e15c0277ecf3ca4", "score": "0.6230889", "text": "function showHome() {\r\n showNotabs();\r\n document.getElementById(\"homeSection\").style.display = \"inline\";\r\n}", "title": "" }, { "docid": "860dfdf50b3253c7b902883f3bb25535", "score": "0.6203658", "text": "function initialSetup() {\n\ttotalScore = 0;\n\tcountDownTimer.textContent = \"-\";\n\n\tif (highScoresViewEl.classList.contains(\"visible\") || gameViewEl.classList.contains(\"visible\")) {\n\t\t//Hides the scores view, hides the questions view, shows intro\n\t\tfrontPageView();\n\t}\n\tchangeHighScoreBtnText(\"High Scores\");\n\n}", "title": "" }, { "docid": "4a9797ccc66812e0f91154f8116981f5", "score": "0.61990595", "text": "function loadApp() {\n var temp;\n\n //Remove Load screen\n function hideLoadScreen() {$('#loadscreen').hide(); }\n if (agt.ios) {hideLoadScreen(); } else {\n //Fade Out Loadscreen, Fade In Page Elements\n $('#header-logo,aside .padding,article').attr('style', 'opacity:0');\n TweenMax.to($('#loadscreen'), 1.2, {css: {top: '100%'}, ease: \"Circ.easeOut\", onComplete: hideLoadScreen });\n TweenMax.staggerTo($('#header-logo,aside .padding,article'), 0.5, {css: {opacity: 1}, ease: \"Power1.easeIn\"}, 0.5);\n }\n\n //Support IE8\n if (agt.ie8) {\n $('body').attr('id', '');\n $('footer, footer *').attr('style', 'background-color:#D4D4D4 !important');\n }\n\n //Support Design Choices\n if (fl.form && $('.chosen-choices').length) {$('.chosen-choices').addClass('shadow'); }\n\n //Human Friendly Titles\n setTimeout(function () {pageTitleChange(); }, 700);\n\n //Analytics\n putAnalytics();\n sTYLS();\n gTYLS();\n }", "title": "" }, { "docid": "c57ada66e094e62773157a51b84c18b7", "score": "0.6196224", "text": "function HomepageModule() {\n }", "title": "" }, { "docid": "765893eb6ed918070c87854e8c99e41d", "score": "0.6194298", "text": "function initialize() {\n\tinitInterface();\n\n\t// load the first screen\n\tif (getLoginDetails() && localStorage.loginToken) {\n\t\tupdateInformation();\n\t} else {\n\t\tlocalStorage.removeItem(\"loginToken\");\n\t\tsetScreen(screenIntro);\n\t}\n}", "title": "" }, { "docid": "c020853437621913de9f999532a1092e", "score": "0.6188607", "text": "function goToHomepage(){\n\tconsole.log(\"goToHomepage\");\n\t$(\"#rectTitle\").animate({ left: \"0%\" }, 500, function(){});\n\t$(\"#rectWelcome\").animate({ left: \"0%\"}, 700, function(){});\n\n\tif (projectListState) {\n\t\t$(\"#list\").animate({ top: \"100%\"}, 700, function(){});\n\t}\n\t\n\tif (floorPlanState) {\n\t\t$(\"#floorPlan\").animate({ top: \"100%\"}, 700, function(){});\n\t}\n\n\thomePageState = true;\n\tfloorPlanState = false;\n\tprojectListState = false;\n\t\n}", "title": "" }, { "docid": "f6254ab926a21cd4d0cb41580e02722f", "score": "0.6182447", "text": "function presentCurrenScreen() {\n // we always present a giphy if its already set\n displayCurrentGiphy();\n\n // if the currentZip has been set before then we show the results\n if (currentWeather) {\n presentResults(currentWeather);\n } else {\n // else by default we present the home\n presentHome();\n }\n}", "title": "" }, { "docid": "2d848191a09d833fc536d3658a366f85", "score": "0.6180356", "text": "loadHome() {\r\n var _this = this;\r\n this.homeButton.addEventListener(\"click\", function() {\r\n _this.homeSection.classList.add('wed-front');\r\n _this.spa.innerHTML = _this.home.template();\r\n })\r\n }", "title": "" }, { "docid": "445c65b0e6d2131ebf23042d8dc257b7", "score": "0.61764807", "text": "function startup() {\n\tsaveSlot(111);\n\twrapper.scrollTop = 0;\n\tupdateMenu();\n\thideStuff();\n\tpreloadImages();\n\tif(localStorage.getItem('data110')) {\n\t\tloadSlot(110);\n\t}\n\telse{\n\t\tloadEvent('system', 'start');\n\t}\n}", "title": "" }, { "docid": "c6696ec7ad0aeb20cd1b7b8a27c4707c", "score": "0.6173055", "text": "function home() {\n\n $state.go('home');\n }", "title": "" }, { "docid": "e1e97e36a851ece202198ec1f14de714", "score": "0.6171187", "text": "function initApp() {\n bb.pushScreen('href.html', 'href');\n}", "title": "" }, { "docid": "a6e60afbc958824a535a3e4b95e80aba", "score": "0.6167405", "text": "function main()\n{\n\t//Sets a viewport for the first time:\n\ttoggleViewport();\n\t\n\t//Starts showing the information:\n\tshowInformation();\n\t\n\t//Manages some screen events (use \"null\" as the first parameter to remove them):\n\tCB_Screen.onResize(function(e) { showScreenEventsInformation(\"Screen resized (using 'onResize' event)!\"); });\n\tCB_Screen.onResizeOrZoom(function() { showScreenEventsInformation(\"Screen resized or zoom changed!\"); });\n\tCB_Screen.onFullScreenChange(function() { showScreenEventsInformation(\"Full screen mode changed!\"); });\n\tCB_Screen.onOrientationChange(function() { showScreenEventsInformation(\"Screen orientation changed!\"); });\n\tCB_Screen.onFocusChange(function() { showScreenEventsInformation(\"Screen focus changed!\"); });\n\tCB_Screen.onVisibilityChange(function() { showScreenEventsInformation(\"Screen visibility changed!\"); });\n\tCB_Screen.onScrollLeft(function() { showScreenEventsInformation(\"Screen scroll left changed!\"); });\n\tCB_Screen.onScrollTop(function() { showScreenEventsInformation(\"Screen scroll top changed!\"); });\n}", "title": "" }, { "docid": "e21710f7d8b126c0fea87e2ba8308ea8", "score": "0.6164473", "text": "function startScreen() {\n\n // push() and pop()\n //\n // To keep the text size, text font, and text alignment\n // from spreading trough other text that I might add\n push();\n\n // Adding a new font\n textFont(quantumfont);\n\n // To adjust my font size\n textSize(30);\n\n // text alignment\n textAlign(CENTER, CENTER);\n\n // No stroke\n noStroke();\n\n // Title of the game\n text(\"Press a button to start\", width / 2, height / 4);\n\n pop();\n\n // The game starts when a button is pressed\n if (keyIsPressed) {\n state = \"playGame\";\n\n // Play bgm\n mountMusic.playMode(\"untilDone\");\n mountMusic.loop();\n mountMusic.volume = 0.5;\n\n }\n}", "title": "" }, { "docid": "9d7e6d6f93cf3616da84c0f5a2b9907c", "score": "0.61617786", "text": "function mainMenu() {\n noLoop();\n $(\".home-page\").show();\n $(\".game-page\").hide();\n $(\"#greeting\").css(\"visibility\", \"hidden\");\n $(\".replayButton\").css(\"visibility\", \"hidden\");\n $(\".menuButton\").css(\"visibility\", \"hidden\");\n}", "title": "" }, { "docid": "e51c089c633400ead780a2f6e3f8a921", "score": "0.6156659", "text": "function homePage(){\n \tremvoeElement(\"imgDivHome\");\n \tload(home);\n}", "title": "" }, { "docid": "4f28fe7f1416564dcbab62ec0cfd6dfd", "score": "0.61528146", "text": "function loadHome () {\n hPContainer.classList.toggle(showModalClass)\n generateJoke()\n}", "title": "" }, { "docid": "f203dc4248bd2463614b7dbe20ae6595", "score": "0.6135521", "text": "function init () {\n\t\tdom = elefart.dom;\n\n\t\tmobileParams(); //is this a mobile\n\t\tscreenParams(); //screen features\n\n\t\t/*\n\t\t * if .classList isn't defined, add polyfill functions \n\t\t * to the elements where classList is used\n\t\t */\n\t\tif(!document.documentElement.classList) {\n\t\t\tdom.addClassList(document.getElementsByTagName(\"article\"));\n\t\t}\n\n\t\tif(!canRun()) {\n\t\t\t//TODO: show error screen \n\t\t\tconsole.log(\"browser can't support game, showing error screen\");\n\t\t\tdom.showScreenById(\"screen-cantrun\");\n\t\t\treturn;\n\t\t}\n\n\n\t\tfixScreen(); //fix screens for some mobiles\n\n\n\t\t/** \n\t\t * Display a startup screen as files loaded, \n\t\t * or an install screen for adding a desktop link on ios \n\t\t * and Android mobiles\n\t\t * \n\t\t */\n\t\tif(mobile.standalone) {\n\t\t\tconsole.log(\"Elefart:standalone mode\");\n\t\t\tdom.showScreenById(\"screen-install\")\n\t\t}\n\t\telse {\n\t\t\tconsole.log(\"Elefart:browser mode\");\n\t\t\tdom.showScreenById(\"screen-splash\");\n\t\t}\n\n\t\tfirstTime = false;\n\t}", "title": "" }, { "docid": "628d14bb49ed028668157fce6b88a8de", "score": "0.61295694", "text": "function homeScreen(event) {\n event.preventDefault();\n\n onHighScoresPage = false;\n headerEl.textContent = \"Coding Quiz Challenge\";\n instructionsEl.textContent = \"Try to answer the following code-related questions within the time limit. Incorrect answers will incur a 10 second penalty!\";\n startButton.style.display = \"block\";\n highScoresPageButtons.style.display = \"none\";\n highScoresList.style.display = \"none\";\n //Remove all high scores list elements, which will be added back upon calling viewScores\n highScoresList.innerHTML = \"\";\n timerEl.textContent = timeRemaining;\n}", "title": "" }, { "docid": "a3e15db6c16f6a096105b487150ff854", "score": "0.6122606", "text": "function welcome()\n{\n var welcomeScreen = WidgetHL();\n welcomeScreen.tutorialCover = makeRect(400, 200, \"#ffffff\");\n welcomeScreen.tutorialCover.render(welcomeScreen.shape, Point(260, 0));\n welcomeScreen.background=makeRect(stageWidth, stageHeight, \"rgba(0, 0, 0, 0.75)\");\n welcomeScreen.background.render(welcomeScreen.shape, Point(0, 0));\n welcomeScreen.nextButton = makeButton(\">\", 50, 50);\n\n var callback = {\n \"welcomeScreen\": welcomeScreen,\n \"call\": function()\n {\n this.welcomeScreen.erase();\n }\n }\n makeClickable(welcomeScreen.nextButton, callback);\n welcomeScreen.nextButton.render(welcomeScreen.shape, {x: 810, y: 10});\n welcomeScreen.message=makeTextWidget(\"Welcome, \" +user.first_name + \"!\", 35, \"Arial\", \"#FFFFFF\");\n welcomeScreen.forwardMessage=makeTextWidget(\"To navigate through the tutorial please click this navigation button!\", 20, \"Arial\", \"#FFFFFF\");\n welcomeScreen.message.renderW(welcomeScreen, Point(280, 110));\n welcomeScreen.forwardMessage.renderW(welcomeScreen, Point(280, 180));\n welcomeScreen.arrow = makeArrow2(170, 43);\n welcomeScreen.arrow.render(welcomeScreen.shape, Point(700, 175));\n welcomeScreen.render(topLayer.shape, Point(0, 0));\n} //end of welcome function. ", "title": "" } ]
2d04fdcda142703aa8767fb7f1483c58
Mark a component as needing a rerender, adding an optional callback to a list of functions which will be executed once the rerender occurs.
[ { "docid": "7d131f306f15d73382089f10a9eabfb5", "score": "0.0", "text": "function enqueueUpdate(component) {\n ensureInjected();\n\n // Various parts of our code (such as ReactCompositeComponent's\n // _renderValidatedComponent) assume that calls to render aren't nested;\n // verify that that's the case. (This is called by each top-level update\n // function, like setProps, setState, forceUpdate, etc.; creation and\n // destruction of top-level components is guarded in ReactMount.)\n\n if (!batchingStrategy.isBatchingUpdates) {\n batchingStrategy.batchedUpdates(enqueueUpdate, component);\n return;\n }\n\n dirtyComponents.push(component);\n}", "title": "" } ]
[ { "docid": "7b37c36168cf7e6af365d62c1774c48c", "score": "0.64397836", "text": "function onRenderComplete(callback) {\n renderCompleteCallbacks.push(callback);\n enqueueUpdateIfNot();\n}", "title": "" }, { "docid": "eb4680c9e39a4095f1cbe169366cf2ba", "score": "0.6438433", "text": "shouldRerender () { return false }", "title": "" }, { "docid": "f29a39f213c9a908919099be96e695bd", "score": "0.6281178", "text": "shouldRerender() {\n return false\n }", "title": "" }, { "docid": "e72e4028b0673645e3c7cc2fb085514c", "score": "0.60927296", "text": "function pureRenderDecorator(component) {\n component.prototype.shouldComponentUpdate = shouldComponentUpdate;\n}", "title": "" }, { "docid": "9ab834ca08eabdf9473a5cdd82ab4da8", "score": "0.59754777", "text": "reRenderInPosition(callback){\n\t\tif(this.redrawBlock){\n\t\t\tif(callback){\n\t\t\t\tcallback();\n\t\t\t}else{\n\t\t\t\tthis.redrawBlockRenderInPosition = true;\n\t\t\t}\n\t\t}else{\n\t\t\tthis.dispatchExternal(\"renderStarted\");\n\t\t\t\n\t\t\tthis.renderer.rerenderRows(callback);\n\t\t\t\n\t\t\tif(!this.fixedHeight){\n\t\t\t\tthis.adjustTableSize();\n\t\t\t}\n\t\t\t\n\t\t\tthis.scrollBarCheck();\n\t\t\t\n\t\t\tthis.dispatchExternal(\"renderComplete\");\n\t\t}\n\t}", "title": "" }, { "docid": "8b94a9dd68caad932c6fb564fed82c51", "score": "0.5880509", "text": "triggerRerender() {\n this._container.glRenderer.triggerRerender();\n }", "title": "" }, { "docid": "ced986d11368b247af513a8da91f3122", "score": "0.5678183", "text": "preRender() {\n //prerender\n }", "title": "" }, { "docid": "ced986d11368b247af513a8da91f3122", "score": "0.5678183", "text": "preRender() {\n //prerender\n }", "title": "" }, { "docid": "c7050ba6105321c922a4ede2f2f67da5", "score": "0.5573378", "text": "forceRender() {\n this.setRefresh();\n this.render();\n }", "title": "" }, { "docid": "e9c8ac0d2aea3c374c80f257e4f572b0", "score": "0.5567807", "text": "scheduleRerender() {\n if (this._didScheduleRerender) { return; }\n\n this.schedule(() => this.editor.rerender());\n this._didScheduleRerender = true;\n }", "title": "" }, { "docid": "e623a40951c3866db4743585c5aa73b9", "score": "0.55281985", "text": "requestRender() {\n this.renderer.needToRender = true;\n }", "title": "" }, { "docid": "2f00763f6de48a8ed5b3fd304dc23196", "score": "0.5498845", "text": "adoptedCallback() {\r\n this.render();\r\n }", "title": "" }, { "docid": "fd4b0b79a02ae00efb96a0644c05bec4", "score": "0.54490745", "text": "function enqueueUpdate(component, callback) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n !callback || typeof callback === \"function\",\n 'enqueueUpdate(...): You called `setProps`, `replaceProps`, ' +\n '`setState`, `replaceState`, or `forceUpdate` with a callback that ' +\n 'isn\\'t callable.'\n ) : invariant(!callback || typeof callback === \"function\"));\n ensureInjected();\n\n // Various parts of our code (such as ReactCompositeComponent's\n // _renderValidatedComponent) assume that calls to render aren't nested;\n // verify that that's the case. (This is called by each top-level update\n // function, like setProps, setState, forceUpdate, etc.; creation and\n // destruction of top-level components is guarded in ReactMount.)\n (\"production\" !== process.env.NODE_ENV ? warning(\n ReactCurrentOwner.current == null,\n 'enqueueUpdate(): Render methods should be a pure function of props ' +\n 'and state; triggering nested component updates from render is not ' +\n 'allowed. If necessary, trigger nested updates in ' +\n 'componentDidUpdate.'\n ) : null);\n\n if (!batchingStrategy.isBatchingUpdates) {\n batchingStrategy.batchedUpdates(enqueueUpdate, component, callback);\n return;\n }\n\n dirtyComponents.push(component);\n\n if (callback) {\n if (component._pendingCallbacks) {\n component._pendingCallbacks.push(callback);\n } else {\n component._pendingCallbacks = [callback];\n }\n }\n}", "title": "" }, { "docid": "fd4b0b79a02ae00efb96a0644c05bec4", "score": "0.54490745", "text": "function enqueueUpdate(component, callback) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n !callback || typeof callback === \"function\",\n 'enqueueUpdate(...): You called `setProps`, `replaceProps`, ' +\n '`setState`, `replaceState`, or `forceUpdate` with a callback that ' +\n 'isn\\'t callable.'\n ) : invariant(!callback || typeof callback === \"function\"));\n ensureInjected();\n\n // Various parts of our code (such as ReactCompositeComponent's\n // _renderValidatedComponent) assume that calls to render aren't nested;\n // verify that that's the case. (This is called by each top-level update\n // function, like setProps, setState, forceUpdate, etc.; creation and\n // destruction of top-level components is guarded in ReactMount.)\n (\"production\" !== process.env.NODE_ENV ? warning(\n ReactCurrentOwner.current == null,\n 'enqueueUpdate(): Render methods should be a pure function of props ' +\n 'and state; triggering nested component updates from render is not ' +\n 'allowed. If necessary, trigger nested updates in ' +\n 'componentDidUpdate.'\n ) : null);\n\n if (!batchingStrategy.isBatchingUpdates) {\n batchingStrategy.batchedUpdates(enqueueUpdate, component, callback);\n return;\n }\n\n dirtyComponents.push(component);\n\n if (callback) {\n if (component._pendingCallbacks) {\n component._pendingCallbacks.push(callback);\n } else {\n component._pendingCallbacks = [callback];\n }\n }\n}", "title": "" }, { "docid": "fd4b0b79a02ae00efb96a0644c05bec4", "score": "0.54490745", "text": "function enqueueUpdate(component, callback) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n !callback || typeof callback === \"function\",\n 'enqueueUpdate(...): You called `setProps`, `replaceProps`, ' +\n '`setState`, `replaceState`, or `forceUpdate` with a callback that ' +\n 'isn\\'t callable.'\n ) : invariant(!callback || typeof callback === \"function\"));\n ensureInjected();\n\n // Various parts of our code (such as ReactCompositeComponent's\n // _renderValidatedComponent) assume that calls to render aren't nested;\n // verify that that's the case. (This is called by each top-level update\n // function, like setProps, setState, forceUpdate, etc.; creation and\n // destruction of top-level components is guarded in ReactMount.)\n (\"production\" !== process.env.NODE_ENV ? warning(\n ReactCurrentOwner.current == null,\n 'enqueueUpdate(): Render methods should be a pure function of props ' +\n 'and state; triggering nested component updates from render is not ' +\n 'allowed. If necessary, trigger nested updates in ' +\n 'componentDidUpdate.'\n ) : null);\n\n if (!batchingStrategy.isBatchingUpdates) {\n batchingStrategy.batchedUpdates(enqueueUpdate, component, callback);\n return;\n }\n\n dirtyComponents.push(component);\n\n if (callback) {\n if (component._pendingCallbacks) {\n component._pendingCallbacks.push(callback);\n } else {\n component._pendingCallbacks = [callback];\n }\n }\n}", "title": "" }, { "docid": "fd4b0b79a02ae00efb96a0644c05bec4", "score": "0.54490745", "text": "function enqueueUpdate(component, callback) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n !callback || typeof callback === \"function\",\n 'enqueueUpdate(...): You called `setProps`, `replaceProps`, ' +\n '`setState`, `replaceState`, or `forceUpdate` with a callback that ' +\n 'isn\\'t callable.'\n ) : invariant(!callback || typeof callback === \"function\"));\n ensureInjected();\n\n // Various parts of our code (such as ReactCompositeComponent's\n // _renderValidatedComponent) assume that calls to render aren't nested;\n // verify that that's the case. (This is called by each top-level update\n // function, like setProps, setState, forceUpdate, etc.; creation and\n // destruction of top-level components is guarded in ReactMount.)\n (\"production\" !== process.env.NODE_ENV ? warning(\n ReactCurrentOwner.current == null,\n 'enqueueUpdate(): Render methods should be a pure function of props ' +\n 'and state; triggering nested component updates from render is not ' +\n 'allowed. If necessary, trigger nested updates in ' +\n 'componentDidUpdate.'\n ) : null);\n\n if (!batchingStrategy.isBatchingUpdates) {\n batchingStrategy.batchedUpdates(enqueueUpdate, component, callback);\n return;\n }\n\n dirtyComponents.push(component);\n\n if (callback) {\n if (component._pendingCallbacks) {\n component._pendingCallbacks.push(callback);\n } else {\n component._pendingCallbacks = [callback];\n }\n }\n}", "title": "" }, { "docid": "fd4b0b79a02ae00efb96a0644c05bec4", "score": "0.54490745", "text": "function enqueueUpdate(component, callback) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n !callback || typeof callback === \"function\",\n 'enqueueUpdate(...): You called `setProps`, `replaceProps`, ' +\n '`setState`, `replaceState`, or `forceUpdate` with a callback that ' +\n 'isn\\'t callable.'\n ) : invariant(!callback || typeof callback === \"function\"));\n ensureInjected();\n\n // Various parts of our code (such as ReactCompositeComponent's\n // _renderValidatedComponent) assume that calls to render aren't nested;\n // verify that that's the case. (This is called by each top-level update\n // function, like setProps, setState, forceUpdate, etc.; creation and\n // destruction of top-level components is guarded in ReactMount.)\n (\"production\" !== process.env.NODE_ENV ? warning(\n ReactCurrentOwner.current == null,\n 'enqueueUpdate(): Render methods should be a pure function of props ' +\n 'and state; triggering nested component updates from render is not ' +\n 'allowed. If necessary, trigger nested updates in ' +\n 'componentDidUpdate.'\n ) : null);\n\n if (!batchingStrategy.isBatchingUpdates) {\n batchingStrategy.batchedUpdates(enqueueUpdate, component, callback);\n return;\n }\n\n dirtyComponents.push(component);\n\n if (callback) {\n if (component._pendingCallbacks) {\n component._pendingCallbacks.push(callback);\n } else {\n component._pendingCallbacks = [callback];\n }\n }\n}", "title": "" }, { "docid": "fd4b0b79a02ae00efb96a0644c05bec4", "score": "0.54490745", "text": "function enqueueUpdate(component, callback) {\n (\"production\" !== process.env.NODE_ENV ? invariant(\n !callback || typeof callback === \"function\",\n 'enqueueUpdate(...): You called `setProps`, `replaceProps`, ' +\n '`setState`, `replaceState`, or `forceUpdate` with a callback that ' +\n 'isn\\'t callable.'\n ) : invariant(!callback || typeof callback === \"function\"));\n ensureInjected();\n\n // Various parts of our code (such as ReactCompositeComponent's\n // _renderValidatedComponent) assume that calls to render aren't nested;\n // verify that that's the case. (This is called by each top-level update\n // function, like setProps, setState, forceUpdate, etc.; creation and\n // destruction of top-level components is guarded in ReactMount.)\n (\"production\" !== process.env.NODE_ENV ? warning(\n ReactCurrentOwner.current == null,\n 'enqueueUpdate(): Render methods should be a pure function of props ' +\n 'and state; triggering nested component updates from render is not ' +\n 'allowed. If necessary, trigger nested updates in ' +\n 'componentDidUpdate.'\n ) : null);\n\n if (!batchingStrategy.isBatchingUpdates) {\n batchingStrategy.batchedUpdates(enqueueUpdate, component, callback);\n return;\n }\n\n dirtyComponents.push(component);\n\n if (callback) {\n if (component._pendingCallbacks) {\n component._pendingCallbacks.push(callback);\n } else {\n component._pendingCallbacks = [callback];\n }\n }\n}", "title": "" }, { "docid": "ae587ca9328d5ec74d848f70b22814e4", "score": "0.54306716", "text": "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\tdebug( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "title": "" }, { "docid": "f411df7c15d81f83912035652363411f", "score": "0.5417124", "text": "function enqueueUpdate(component, callback) {\n\t (\"production\" !== process.env.NODE_ENV ? invariant(\n\t !callback || typeof callback === \"function\",\n\t 'enqueueUpdate(...): You called `setProps`, `replaceProps`, ' +\n\t '`setState`, `replaceState`, or `forceUpdate` with a callback that ' +\n\t 'isn\\'t callable.'\n\t ) : invariant(!callback || typeof callback === \"function\"));\n\t ensureInjected();\n\n\t // Various parts of our code (such as ReactCompositeComponent's\n\t // _renderValidatedComponent) assume that calls to render aren't nested;\n\t // verify that that's the case. (This is called by each top-level update\n\t // function, like setProps, setState, forceUpdate, etc.; creation and\n\t // destruction of top-level components is guarded in ReactMount.)\n\t (\"production\" !== process.env.NODE_ENV ? warning(\n\t ReactCurrentOwner.current == null,\n\t 'enqueueUpdate(): Render methods should be a pure function of props ' +\n\t 'and state; triggering nested component updates from render is not ' +\n\t 'allowed. If necessary, trigger nested updates in ' +\n\t 'componentDidUpdate.'\n\t ) : null);\n\n\t if (!batchingStrategy.isBatchingUpdates) {\n\t batchingStrategy.batchedUpdates(enqueueUpdate, component, callback);\n\t return;\n\t }\n\n\t dirtyComponents.push(component);\n\n\t if (callback) {\n\t if (component._pendingCallbacks) {\n\t component._pendingCallbacks.push(callback);\n\t } else {\n\t component._pendingCallbacks = [callback];\n\t }\n\t }\n\t}", "title": "" }, { "docid": "374d53025c4cb5f178a584b0f126a03c", "score": "0.5413097", "text": "function useStableCallback(callback) {\n var callbackRef = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(callback);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(function () {\n callbackRef.current = callback;\n }); // eslint-disable-next-line react-hooks/exhaustive-deps\n\n return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useCallback\"])(function () {\n callbackRef.current && callbackRef.current.apply(callbackRef, arguments);\n }, []);\n}", "title": "" }, { "docid": "374d53025c4cb5f178a584b0f126a03c", "score": "0.5413097", "text": "function useStableCallback(callback) {\n var callbackRef = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(callback);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(function () {\n callbackRef.current = callback;\n }); // eslint-disable-next-line react-hooks/exhaustive-deps\n\n return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useCallback\"])(function () {\n callbackRef.current && callbackRef.current.apply(callbackRef, arguments);\n }, []);\n}", "title": "" }, { "docid": "d1b84eff4c117b488c8c80cf7b2d23dc", "score": "0.5368102", "text": "function useStableCallback(callback) {\n var callbackRef = (0, React.useRef)(callback);\n (0, React.useEffect)(function () {\n callbackRef.current = callback;\n }); // eslint-disable-next-line react-hooks/exhaustive-deps\n\n return (0, React.useCallback)(function () {\n callbackRef.current && callbackRef.current.apply(callbackRef, arguments);\n }, []);\n}", "title": "" }, { "docid": "481aad28a3799ed258278d7e6532a56f", "score": "0.536437", "text": "function useInitialOrEveryRender(callback, isInitialOnly) {\n if (isInitialOnly === void 0) { isInitialOnly = false; }\n var isInitialRender = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useRef\"])(true);\n if (!isInitialOnly || (isInitialOnly && isInitialRender.current)) {\n callback();\n }\n isInitialRender.current = false;\n}", "title": "" }, { "docid": "89e4f1850c060a131998762d604ab505", "score": "0.5332127", "text": "function autoredraw(callback, node) {\n return function(e) {\n m.redraw.strategy(\"diff\");\n m.startComputation();\n var res;\n try {\n res = callback.call(node, e);\n } finally {\n m.endComputation();\n }\n return res;\n };\n}", "title": "" }, { "docid": "9a4ddd843bf4e13d8c373d59e96bd5ac", "score": "0.53205824", "text": "didUpdate(cb) {\r\n if (this.reactCallback) {\r\n this.reactCallback(cb);\r\n }\r\n if (this.testCallback) {\r\n this.testCallback();\r\n }\r\n }", "title": "" }, { "docid": "9aa45e2903814a0043caa97821dd5363", "score": "0.52958673", "text": "forceRedraw() {\n this.changed = this.changed.map(() => true)\n }", "title": "" }, { "docid": "2bf19ede858add2e9a29025595f997dd", "score": "0.52547127", "text": "addCallback(componentId, hasChangesCallback) {\n const map = this.hasChangeCallbacks;\n map.set(componentId, hasChangesCallback);\n return () => { // remove handler\n map.delete(componentId);\n };\n }", "title": "" }, { "docid": "baecd8c1666af4ca8048336e23dc30e1", "score": "0.524951", "text": "function rerender() {\n \tvar p = void 0;\n \twhile (p = items.pop()) {\n \t\tif (p._dirty) renderComponent(p);\n \t}\n }", "title": "" }, { "docid": "342d0eed3322cab7c719e56ebe5652e7", "score": "0.52403057", "text": "preRender() {\n //There is no event handler\n }", "title": "" }, { "docid": "81ca7d6215c1c18a05ae9d367ad6a954", "score": "0.52283746", "text": "onRender() {}", "title": "" }, { "docid": "fa7e74fab05076a324a26a60cb149bdc", "score": "0.5215918", "text": "needRender() {\n this.state.forceRender = true;\n }", "title": "" }, { "docid": "d2d2bb9586a8dc64b7137ca5f9401669", "score": "0.5205585", "text": "_needsRedraw () {\n this.dispatchEvent({\n type: 'redraw',\n message: 'Map has been updated, and a redraw is required.'\n })\n }", "title": "" }, { "docid": "ec2ad24a56a7a79653980b1853ef8897", "score": "0.5180709", "text": "_runBeforeRenders() {\n const beforeRenders = this.getDecorator('beforeRender');\n if (beforeRenders.length > 0) {\n return beforeRenders.reduce((render, beforeRenderFunction) => {\n const updatedRender = beforeRenderFunction.call(this, render, this._properties, this._children);\n if (!updatedRender) {\n console.warn('Render function not returned from beforeRender, using previous render');\n return render;\n }\n return updatedRender;\n }, this._boundRenderFunc);\n }\n return this._boundRenderFunc;\n }", "title": "" }, { "docid": "d81bf1d91722c40f4746fd8a41175364", "score": "0.51793265", "text": "setUpdateCallback(callback) {\n this.updateCallback = callback;\n }", "title": "" }, { "docid": "db45345cc255219b07a3e47e0887fb8d", "score": "0.517532", "text": "rerender() {\n this.setState({ loading: true }, () => {\n this.componentDidMount();\n });\n }", "title": "" }, { "docid": "2a59084b993af7a2daf3c200feec3694", "score": "0.5174412", "text": "function renderNext(component, changes) {\n if (!component.componentModel.rendering) {\n renderComponent(component, changes);\n }\n else {\n scheduleRender(component, changes);\n }\n }", "title": "" }, { "docid": "6ae4e9ec50af2764befd45e8b273de76", "score": "0.516987", "text": "static forceRefresh (reactComponent, statePropertiesToUpdate, callBack = null) {\n\n\t\tconst state = reactComponent.state;\n\t\tconst timeStamp = new Date().getTime();\n\t\tlet newState = null;\n\t\tif(statePropertiesToUpdate) \n\t\t\tnewState = { ...state, ...statePropertiesToUpdate, timeStamp };\n\t\telse\n\t\t\tnewState = { ...state, timeStamp };\n\t\treactComponent.setState(newState, callBack ? callBack : undefined);\n\t}", "title": "" }, { "docid": "c171ae96c0be61e204ccaeaaaac73edb", "score": "0.51270276", "text": "_renderAsUpdated(newValue, oldValue) {\n if (typeof newValue !== typeof undefined) {\n this._resetRenderMethods();\n }\n }", "title": "" }, { "docid": "a41225a412e2b6765d02bc5b76a28912", "score": "0.5089829", "text": "function $renderAfterPropsOrStateChange() {\n if (_lifecycleState > LS_INITED) {\n this.$renderComponent();\n if (typeof this.componentDidUpdate === 'function') {\n this.componentDidUpdate(_lastProps, _lastState);\n }\n }\n }", "title": "" }, { "docid": "0a3d82f1d7c85a198ff205339df74e9d", "score": "0.50661933", "text": "function enqueueUpdate(component){ensureInjected(); // Various parts of our code (such as ReactCompositeComponent's\n// _renderValidatedComponent) assume that calls to render aren't nested;\n// verify that that's the case. (This is called by each top-level update\n// function, like setProps, setState, forceUpdate, etc.; creation and\n// destruction of top-level components is guarded in ReactMount.)\nif(!batchingStrategy.isBatchingUpdates){batchingStrategy.batchedUpdates(enqueueUpdate,component);return;}dirtyComponents.push(component);}", "title": "" }, { "docid": "4431190c2eb5c33aa55794579984e742", "score": "0.5063057", "text": "function enqueueUpdate(component){ensureInjected();// Various parts of our code (such as ReactCompositeComponent's\n// _renderValidatedComponent) assume that calls to render aren't nested;\n// verify that that's the case. (This is called by each top-level update\n// function, like setState, forceUpdate, etc.; creation and\n// destruction of top-level components is guarded in ReactMount.)\nif(!batchingStrategy.isBatchingUpdates){batchingStrategy.batchedUpdates(enqueueUpdate,component);return;}dirtyComponents.push(component);if(component._updateBatchNumber==null){component._updateBatchNumber=updateBatchNumber+1;}}", "title": "" }, { "docid": "7f10bb1f739cd4f0335b71aed1126617", "score": "0.5059426", "text": "onFirstRender() {}", "title": "" }, { "docid": "e4b4659128ef6096699bcbe0b9e531a5", "score": "0.50414056", "text": "constructor(renderHookId, shouldRender = true) { //The id of this instance is set to the first argument, and if nothing or true is passed as a second argument, the render method is called.\n this.hookId = renderHookId;\n if(shouldRender) {\n this.render();\n }\n }", "title": "" }, { "docid": "3ab41456a4f0a9ff4d335c2c7da8dd3c", "score": "0.50294834", "text": "onBeforeRendering() {\n if (!this.isCurrentStateOutdated()) {\n return;\n }\n this.notResized = true;\n this.syncUIAndState();\n this._updateHandleAndProgress(this.value);\n }", "title": "" }, { "docid": "1c4398cb3d8a1f505373a77f702b5227", "score": "0.5023314", "text": "constructor(...args){\n super(...args)\n this.shouldComponentUpdate=PureRenderMixin.shouldComponentUpdate\n \n }", "title": "" }, { "docid": "cdb57cb82967762dfc5e8ac2476103b2", "score": "0.5015299", "text": "onBeforeRender() {\n //\n }", "title": "" }, { "docid": "310c7abc71b422e3d0287b24ee42652c", "score": "0.5005164", "text": "constructor(...args){\n super(...args)\n this.shouldComponentUpdate=PureRenderMixin.shouldComponentUpdate\n }", "title": "" }, { "docid": "ae48f169eee759d5de9bef375547e5fe", "score": "0.500008", "text": "function enqueueUpdate(component, callback) {\n (\"production\" !== \"development\" ? invariant(\n !callback || typeof callback === \"function\",\n 'enqueueUpdate(...): You called `setProps`, `replaceProps`, ' +\n '`setState`, `replaceState`, or `forceUpdate` with a callback that ' +\n 'isn\\'t callable.'\n ) : invariant(!callback || typeof callback === \"function\"));\n ensureBatchingStrategy();\n\n if (!batchingStrategy.isBatchingUpdates) {\n component.performUpdateIfNecessary();\n callback && callback.call(component);\n return;\n }\n\n dirtyComponents.push(component);\n\n if (callback) {\n if (component._pendingCallbacks) {\n component._pendingCallbacks.push(callback);\n } else {\n component._pendingCallbacks = [callback];\n }\n }\n}", "title": "" }, { "docid": "0705cc984204d2a3269eafc3ddb1770c", "score": "0.49991864", "text": "function handleRender(view){\n view._isRendered = true;\n triggerDOMRefresh(view);\n }", "title": "" }, { "docid": "0e71aa3a390b5aef1873b3bda43a0970", "score": "0.4993289", "text": "componentDidUpdate(){\n //Método llamado luego del re-render\n }", "title": "" }, { "docid": "1f7c7284c605791b13ecbd5dc271c0f9", "score": "0.49821526", "text": "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "title": "" }, { "docid": "1f7c7284c605791b13ecbd5dc271c0f9", "score": "0.49821526", "text": "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "title": "" }, { "docid": "7deecaa3aaabaa1c7ca84e715a726517", "score": "0.49778748", "text": "setNeedsRedraw(reason) {\n this._needsRedraw = this._needsRedraw || reason;\n }", "title": "" }, { "docid": "23ede2ec96719b0dc907a623f465b777", "score": "0.49727133", "text": "componentWillMount() {\n if (this.asyncRender) {\n this.context.addDep({\n callActions: () => this.fireActions(),\n factoryRef: stateToActions\n });\n }\n }", "title": "" }, { "docid": "a6f3be2e68c9d8f65f466708b4767a0d", "score": "0.49463412", "text": "onObserveCalled(callback) {\n this._callback = callback;\n }", "title": "" }, { "docid": "52c8674017bfea30378e98338c406ada", "score": "0.49249837", "text": "function ae(ke){// Various parts of our code (such as ReactCompositeComponent's\n// _renderValidatedComponent) assume that calls to render aren't nested;\n// verify that that's the case. (This is called by each top-level update\n// function, like setState, forceUpdate, etc.; creation and\n// destruction of top-level components is guarded in ReactMount.)\nreturn X(),ge.isBatchingUpdates?void(pe.push(ke),null==ke._updateBatchNumber&&(ke._updateBatchNumber=me+1)):void ge.batchedUpdates(ae,ke)}", "title": "" }, { "docid": "2860327c224dd1a0673d22affed21643", "score": "0.4923695", "text": "function updateEvents(forceRender) {\n\t\tif (!options.lazyFetching || isFetchNeeded(currentView.visStart, currentView.visEnd)) {\n\t\t\trefetchEvents();\n\t\t}\n\t\telse if (forceRender) {\n\t\t\trerenderEvents();\n\t\t}\n\t}", "title": "" }, { "docid": "2860327c224dd1a0673d22affed21643", "score": "0.4923695", "text": "function updateEvents(forceRender) {\n\t\tif (!options.lazyFetching || isFetchNeeded(currentView.visStart, currentView.visEnd)) {\n\t\t\trefetchEvents();\n\t\t}\n\t\telse if (forceRender) {\n\t\t\trerenderEvents();\n\t\t}\n\t}", "title": "" }, { "docid": "2860327c224dd1a0673d22affed21643", "score": "0.4923695", "text": "function updateEvents(forceRender) {\n\t\tif (!options.lazyFetching || isFetchNeeded(currentView.visStart, currentView.visEnd)) {\n\t\t\trefetchEvents();\n\t\t}\n\t\telse if (forceRender) {\n\t\t\trerenderEvents();\n\t\t}\n\t}", "title": "" }, { "docid": "6c53fb19bc7bc825f95a223f1e66f29e", "score": "0.49234474", "text": "function useEventCallback(callback) {\n var ref = React.useRef(callback);\n (0, _useSafeLayoutEffect.useSafeLayoutEffect)(() => {\n ref.current = callback;\n });\n return React.useCallback(function (event) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return ref.current(event, ...args);\n }, []);\n}", "title": "" }, { "docid": "a23c1550937eee7d54ad1a07e9a06e6a", "score": "0.4922951", "text": "redrawImpl(){}", "title": "" }, { "docid": "0bf9578aaf25a9799fd342bb388ca4c7", "score": "0.492182", "text": "function enqueueUpdate(component) {\n\t ensureInjected();\n\t\n\t // Various parts of our code (such as ReactCompositeComponent's\n\t // _renderValidatedComponent) assume that calls to render aren't nested;\n\t // verify that that's the case. (This is called by each top-level update\n\t // function, like setProps, setState, forceUpdate, etc.; creation and\n\t // destruction of top-level components is guarded in ReactMount.)\n\t ( true ? warning(\n\t ReactCurrentOwner.current == null,\n\t 'enqueueUpdate(): Render methods should be a pure function of props ' +\n\t 'and state; triggering nested component updates from render is not ' +\n\t 'allowed. If necessary, trigger nested updates in ' +\n\t 'componentDidUpdate.'\n\t ) : null);\n\t\n\t if (!batchingStrategy.isBatchingUpdates) {\n\t batchingStrategy.batchedUpdates(enqueueUpdate, component);\n\t return;\n\t }\n\t\n\t dirtyComponents.push(component);\n\t}", "title": "" }, { "docid": "6eef7792aed2e9bdb15752b3aa3b39c2", "score": "0.49212644", "text": "afterRender() {}", "title": "" }, { "docid": "1764efb74dfbb6d611653191154156b1", "score": "0.49180448", "text": "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "title": "" }, { "docid": "1764efb74dfbb6d611653191154156b1", "score": "0.49180448", "text": "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "title": "" }, { "docid": "05fb363f76aea15814540396da14e6e6", "score": "0.4910105", "text": "function updateEvents(forceRender) {\n if (!options.lazyFetching || isFetchNeeded(currentView.visStart, currentView.visEnd)) {\n refetchEvents();\n }\n else if (forceRender) {\n rerenderEvents();\n }\n }", "title": "" }, { "docid": "377782cbe01950410d4329d7b3d6118c", "score": "0.49056286", "text": "function render(element, container, callback) {\n try {\n Ext.onReady(function () {\n if (Ext.isClassic) {\n Ext.tip.QuickTipManager.init();\n Ext.QuickTips.init();\n }\n\n react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.render(element, container, callback);\n });\n } catch (e) {\n console.log(e);\n }\n}", "title": "" }, { "docid": "c105fdc80593ab5d6b9b6f52a5d97de1", "score": "0.48997465", "text": "function handleRender(view) {\n view._isRendered = true;\n triggerDOMRefresh(view);\n }", "title": "" }, { "docid": "c105fdc80593ab5d6b9b6f52a5d97de1", "score": "0.48997465", "text": "function handleRender(view) {\n view._isRendered = true;\n triggerDOMRefresh(view);\n }", "title": "" }, { "docid": "c105fdc80593ab5d6b9b6f52a5d97de1", "score": "0.48997465", "text": "function handleRender(view) {\n view._isRendered = true;\n triggerDOMRefresh(view);\n }", "title": "" }, { "docid": "8f68251316991ea6df3413d9ebdfb85c", "score": "0.48903355", "text": "function useKeeper(arg, refresh) {\n if (refresh === void 0) {\n refresh = false;\n }\n\n var ref = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(arg);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(function () {\n if (refresh) ref.current = arg;\n });\n return ref.current;\n}", "title": "" }, { "docid": "8f68251316991ea6df3413d9ebdfb85c", "score": "0.48903355", "text": "function useKeeper(arg, refresh) {\n if (refresh === void 0) {\n refresh = false;\n }\n\n var ref = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(arg);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(function () {\n if (refresh) ref.current = arg;\n });\n return ref.current;\n}", "title": "" }, { "docid": "8f68251316991ea6df3413d9ebdfb85c", "score": "0.48903355", "text": "function useKeeper(arg, refresh) {\n if (refresh === void 0) {\n refresh = false;\n }\n\n var ref = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(arg);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(function () {\n if (refresh) ref.current = arg;\n });\n return ref.current;\n}", "title": "" }, { "docid": "49df43c1a74695f84c449b132bc4d5f4", "score": "0.48786923", "text": "attributeChangedCallback( attr, oldVal, newVal ){ \n \tthis.render() \n\t}", "title": "" }, { "docid": "0048f00c2fd8d156564656f895ba31ec", "score": "0.4877085", "text": "preRender() { }", "title": "" }, { "docid": "038af9a3eb7a9b3036e8fde9971c9279", "score": "0.48764524", "text": "renderComplete(wrapperElement) {\n if (isBlazor()) {\n let sfBlazor = 'sfBlazor';\n // tslint:disable-next-line:no-any\n window[sfBlazor].renderComplete(this.element, wrapperElement);\n }\n this.isRendered = true;\n }", "title": "" }, { "docid": "038af9a3eb7a9b3036e8fde9971c9279", "score": "0.48764524", "text": "renderComplete(wrapperElement) {\n if (isBlazor()) {\n let sfBlazor = 'sfBlazor';\n // tslint:disable-next-line:no-any\n window[sfBlazor].renderComplete(this.element, wrapperElement);\n }\n this.isRendered = true;\n }", "title": "" }, { "docid": "038af9a3eb7a9b3036e8fde9971c9279", "score": "0.48764524", "text": "renderComplete(wrapperElement) {\n if (isBlazor()) {\n let sfBlazor = 'sfBlazor';\n // tslint:disable-next-line:no-any\n window[sfBlazor].renderComplete(this.element, wrapperElement);\n }\n this.isRendered = true;\n }", "title": "" }, { "docid": "44260e25bcb175a8a7702175bda548a0", "score": "0.4875294", "text": "patch (renderer) {\n if (this.unpatched[renderer]) {\n console.warn(renderer + ' already patched')\n return\n }\n const Renderer = this.instance.PIXI[renderer]\n if (Renderer && Renderer.prototype.render) {\n const renderMethod = Renderer.prototype.render\n this.unpatched[renderer] = renderMethod\n var self = this\n Renderer.prototype.render = function (container) {\n if (!runningHooks) {\n runningHooks = true\n for (const hook of self.hooks) {\n if (hook.skip) {\n continue\n }\n hook.callback(container, this)\n if (hook.throttle) {\n hook.skip = true\n setTimeout(() => {\n hook.skip = false\n }, hook.throttle)\n }\n }\n runningHooks = false\n }\n return renderMethod.apply(this, arguments)\n }\n }\n }", "title": "" }, { "docid": "98d7974552f88a2249c80dacde7065d6", "score": "0.48681664", "text": "componentDidMount() {\n this._redraw();\n }", "title": "" }, { "docid": "f1ec3cb4e323be27ccb05700a9c63d13", "score": "0.4862005", "text": "redraw() {\n this.draw_();\n }", "title": "" }, { "docid": "2824d27f82e004fd7726c4d6d2d7c826", "score": "0.48533466", "text": "function redrawHook() {\n 'use strict';\n require('controller').redrawHook();\n}", "title": "" }, { "docid": "ed86c7e8b7dad1fab60d10c1e60af18c", "score": "0.4850121", "text": "function setUpdateCall(func)\n{\n updateCall = func;\n}", "title": "" }, { "docid": "8c130fbb3e751364b14146b433056252", "score": "0.4847267", "text": "shouldComponentUpdate() {\n\n }", "title": "" }, { "docid": "694365f34f1f0261e97cf0829ca950d8", "score": "0.48423046", "text": "renderedCallback() {\n if (this._baseChartInitialized) {\n return;\n }\n this._baseChartInitialized = true;\n\n loadScript(this, ChartJS).then(\n () => {\n this._chartjsLoaded = true;\n this._callChartjsloadedCallback();\n this._reactivityManager.throttleRegisteredJob();\n },\n (reason) => {\n this.errorCallback(reason);\n }\n );\n }", "title": "" }, { "docid": "c332cdc7bd17f6708c58ae428c589558", "score": "0.48349255", "text": "function ComponentCallback() {\n const [age, setAge] = useState(25);\n const [salary, setSalary] = useState(50000);\n const incrementAge = useCallback(() => {\n setAge(age + 1);\n }, [age]);\n const incrementSalary = useCallback(() => {\n setSalary(salary + 1000);\n }, [salary]);\n console.log(\"Component Callback\");\n\n return (\n <div className=\"myApp\">\n <CbTitle />\n <CbCount text=\"Age\" count={age} />\n <CbButton handleIncrement={incrementAge}>Increment age</CbButton>\n <CbCount text=\"Salary\" count={salary} />\n <CbButton handleIncrement={incrementSalary}>\n Increment salary\n </CbButton>\n </div>\n );\n}", "title": "" }, { "docid": "2743175f1b7f6a7b3bc2751f104f2c1d", "score": "0.48328772", "text": "attributeChangedCallback(attrName, oldValue, newValue) {\n if (oldValue === newValue)\n return;\n\n // re-render component\n this.render();\n }", "title": "" }, { "docid": "2ea98b7a80b5dc816d5a005dd0a15309", "score": "0.48324838", "text": "forceUpdateHandler(){ \n // I think i understand react now! key property is needed for re renders to happend based on updated (props) properties :)\n // this.forceUpdate();\n }", "title": "" }, { "docid": "3ef40afbd874e4ac6e573a83c70e0faf", "score": "0.48290312", "text": "setRenderableSeriesPropertyChanged() {\n this.isRenderableSeriesPropertyChangedProperty = true;\n }", "title": "" }, { "docid": "1e6d1be196245c53a351bd0f56afee6d", "score": "0.48289204", "text": "invalidate() {\r\n\t\tif (!this.#invalidated) {\r\n\t\t\tthis.#invalidated = true\r\n\r\n\t\t\t// TODO: is this the best way?\r\n\t\t\t// This will add one frame of delay to our updates,\r\n\t\t\t// but gives time for all events to be processed first.\r\n\t\t\trequestAnimationFrame(this.#renderCallback)\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "720fb1d10517524e26b1b8a5c0b34f43", "score": "0.48265582", "text": "function useKeeper(arg, refresh) {\n if (refresh === void 0) {\n refresh = false;\n }\n\n var ref = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(arg);\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n if (refresh) ref.current = arg;\n });\n return ref.current;\n}", "title": "" }, { "docid": "caff3691b9f8e4d09637f5591e5cea5e", "score": "0.48260102", "text": "function oncifiedCb(...args) {\n if (!hasBeenCalled) { // If cb hasn't been invoked:\n cachedResult = cb(...args) // Call cb and store result\n hasBeenCalled = true; // Set hasBeenCalled to true\n }\n return cachedResult\n }", "title": "" }, { "docid": "0f7c90c485bd7f33287ed7be71165fde", "score": "0.48233315", "text": "function useCallbackRef(fn) {\n var ref = React.useRef(fn);\n (0, _useSafeLayoutEffect.useSafeLayoutEffect)(() => {\n ref.current = fn;\n }); // eslint-disable-next-line react-hooks/exhaustive-deps\n\n return React.useCallback(function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return ref.current == null ? void 0 : ref.current(...args);\n }, []);\n}", "title": "" }, { "docid": "2fae93ab5e53cf6b197e4c9bf4a3041d", "score": "0.48193684", "text": "function flush_render_callbacks(fns) {\n const filtered = [];\n const targets = [];\n render_callbacks.forEach((c) => fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c));\n targets.forEach((c) => c());\n render_callbacks = filtered;\n }", "title": "" }, { "docid": "92bfc3c79f10471a3b64544d4fc6e6fc", "score": "0.48182723", "text": "onRender() {\n //console.log('onRender');\n }", "title": "" }, { "docid": "68d8e35388d71aa2c7a84f1538b69a2a", "score": "0.48173842", "text": "function enqueueUpdate(component) {\n ensureInjected();\n\n // Various parts of our code (such as ReactCompositeComponent's\n // _renderValidatedComponent) assume that calls to render aren't nested;\n // verify that that's the case. (This is called by each top-level update\n // function, like setProps, setState, forceUpdate, etc.; creation and\n // destruction of top-level components is guarded in ReactMount.)\n (\"production\" !== \"development\" ? warning(\n ReactCurrentOwner.current == null,\n 'enqueueUpdate(): Render methods should be a pure function of props ' +\n 'and state; triggering nested component updates from render is not ' +\n 'allowed. If necessary, trigger nested updates in ' +\n 'componentDidUpdate.'\n ) : null);\n\n if (!batchingStrategy.isBatchingUpdates) {\n batchingStrategy.batchedUpdates(enqueueUpdate, component);\n return;\n }\n\n dirtyComponents.push(component);\n}", "title": "" }, { "docid": "68d8e35388d71aa2c7a84f1538b69a2a", "score": "0.48173842", "text": "function enqueueUpdate(component) {\n ensureInjected();\n\n // Various parts of our code (such as ReactCompositeComponent's\n // _renderValidatedComponent) assume that calls to render aren't nested;\n // verify that that's the case. (This is called by each top-level update\n // function, like setProps, setState, forceUpdate, etc.; creation and\n // destruction of top-level components is guarded in ReactMount.)\n (\"production\" !== \"development\" ? warning(\n ReactCurrentOwner.current == null,\n 'enqueueUpdate(): Render methods should be a pure function of props ' +\n 'and state; triggering nested component updates from render is not ' +\n 'allowed. If necessary, trigger nested updates in ' +\n 'componentDidUpdate.'\n ) : null);\n\n if (!batchingStrategy.isBatchingUpdates) {\n batchingStrategy.batchedUpdates(enqueueUpdate, component);\n return;\n }\n\n dirtyComponents.push(component);\n}", "title": "" }, { "docid": "68d8e35388d71aa2c7a84f1538b69a2a", "score": "0.48173842", "text": "function enqueueUpdate(component) {\n ensureInjected();\n\n // Various parts of our code (such as ReactCompositeComponent's\n // _renderValidatedComponent) assume that calls to render aren't nested;\n // verify that that's the case. (This is called by each top-level update\n // function, like setProps, setState, forceUpdate, etc.; creation and\n // destruction of top-level components is guarded in ReactMount.)\n (\"production\" !== \"development\" ? warning(\n ReactCurrentOwner.current == null,\n 'enqueueUpdate(): Render methods should be a pure function of props ' +\n 'and state; triggering nested component updates from render is not ' +\n 'allowed. If necessary, trigger nested updates in ' +\n 'componentDidUpdate.'\n ) : null);\n\n if (!batchingStrategy.isBatchingUpdates) {\n batchingStrategy.batchedUpdates(enqueueUpdate, component);\n return;\n }\n\n dirtyComponents.push(component);\n}", "title": "" }, { "docid": "888d7151bc9ff5d86208947bf5d3d27a", "score": "0.48167294", "text": "update(renderFn, options) {\n let firstTimeUpdate = this.options.isNotUpdated();\n this.renderFn = renderFn;\n this.options.update(options);\n if (firstTimeUpdate) {\n // Must knows trigger type firstly, then can bind trigger.\n this.bindTrigger();\n }\n else if (this.opened) {\n flit_1.enqueueUpdatableInOrder(this, this.context, flit_1.UpdatableUpdateOrder.Directive);\n }\n }", "title": "" }, { "docid": "6fa2260762502fe41605b8851d9ced20", "score": "0.480939", "text": "function useDidUpdateEffect(fn, inputs) {\n const didMountRef = React.useRef(false);\n React.useEffect(() => {\n if (didMountRef.current) fn();else didMountRef.current = true;\n }, inputs);\n}", "title": "" } ]
ecab19abc314bf6427afaedd69948d08
Programming from A to Z, Fall 2014
[ { "docid": "0837e22b554fcfd0def83ccf9bda2e6c", "score": "0.0", "text": "function setup() {\n noCanvas();\n // Assign the generate() function to the button\n var button = getElement('generate');\n button.mousePressed(generate);\n}", "title": "" } ]
[ { "docid": "4ba42df549fe9202b5539891c3e199f7", "score": "0.615541", "text": "function alhorithm() {\n\n}", "title": "" }, { "docid": "f6b54de99f6f0f797ceb5c52aa55fb51", "score": "0.6146691", "text": "function step1ab(z) {\n\t if (z.b.charAt(z.k) == 's') {\n\t\tif (ends(z, \"sses\")) z.k -= 2;\n\t\telse\n\t\t if (ends(z, \"ies\")) setto(z, \"i\");\n\t\telse\n\t\t if (z.b.charAt(z.k - 1) != 's') z.k--;\n\t }\n\t if (ends(z, \"eed\")) {\n\t\tif (m(z) > 0) z.k--;\n\t } else\n\t\tif ((ends(z, \"ed\") || ends(z, \"ing\")) && vowelinstem(z)) {\n\t\t z.k = z.j;\n\t\t if (ends(z, \"at\")) setto(z, \"ate\");\n\t\t else\n\t\t\tif (ends(z, \"bl\")) setto(z, \"ble\");\n\t\t else\n\t\t\tif (ends(z, \"iz\")) setto(z, \"ize\");\n\t\t else\n\t\t\tif (doublec(z, z.k)) {\n\t\t\t z.k--;\n\t\t\t var ch = z.b.charAt(z.k);\n\t\t\t if (ch == 'l' || ch == 's' || ch == 'z') z.k++;\n\t\t\t} else if (m(z) == 1 && cvc(z, z.k)) setto(z, \"e\");\n\t\t}\n\t}", "title": "" }, { "docid": "08262777c22dd482dae02bdcb804d28b", "score": "0.6104014", "text": "function step4(z) {\n\t switch (z.b.charAt(z.k - 1)) {\n case 'a': if (ends(z, \"al\")) break;\n\t\treturn;\n\t case 'c': if (ends(z, \"ance\")) break;\n\t\tif (ends(z, \"ence\")) break;\n\t\treturn;\n\t case 'e': if (ends(z, \"er\")) break;\n\t\treturn;\n\t case 'i': if (ends(z, \"ic\")) break;\n\t\treturn;\n\tcase 'l': if (ends(z, \"able\")) break;\n\t\tif (ends(z, \"ible\")) break;\n\t\treturn;\n\t case 'n': if (ends(z, \"ant\")) break;\n\t\tif (ends(z, \"ement\")) break;\n\t\tif (ends(z, \"ment\")) break;\n\t\tif (ends(z, \"ent\")) break;\n\t\treturn;\n\t case 'o': if (ends(z, \"ion\") && (z.b.charAt(z.j) == 's' || z.b.charAt(z.j) == 't')) break;\n\t\tif (ends(z, \"ou\")) break;\n\t\treturn;\n\t\t/* takes care of -ous */\n\t case 's': if (ends(z, \"ism\")) break;\n\t\treturn;\n\t case 't': if (ends(z, \"ate\")) break;\n\t\tif (ends(z, \"iti\")) break;\n\t\treturn;\n\t case 'u': if (ends(z, \"ous\")) break;\n\t\treturn;\n\t case 'v': if (ends(z, \"ive\")) break;\n\t\treturn;\n\t case 'z': if (ends(z, \"ize\")) break;\n\t\treturn;\n\t default: return;\n\t }\n\t if (m(z) > 1) z.k = z.j;\n\t}", "title": "" }, { "docid": "17f1e99e10a8b91314a60d72af8b591d", "score": "0.5840971", "text": "function solution(A) {\n\n}", "title": "" }, { "docid": "dc97f47ed306fcfe5262d532df30ac9c", "score": "0.5792213", "text": "function step2(z) {\n\t switch (z.b.charAt(z.k - 1)) {\n\t case 'a': if (ends(z, \"ational\")) {\n\t\tr(z, \"ate\");\n\t\tbreak;\n }\n\t\tif (ends(z, \"tional\")) {\n\t\t r(z, \"tion\");\n\t\t break;\n\t\t}\n\t\tbreak;\n\t case 'c': if (ends(z, \"enci\")) {\n\t\tr(z, \"ence\");\n\t\tbreak;\n }\n\t\tif (ends(z, \"anci\")) {\n\t\t r(z, \"ance\");\n\t\t break;\n\t\t}\n\t\tbreak;\n\t case 'e': if (ends(z, \"izer\")) {\n\t\tr(z, \"ize\");\n\t\tbreak;\n }\n\t\tbreak;\n\t case 'l': if (ends(z, \"bli\")) {\n\t\tr(z, \"ble\");\n\t\tbreak;\n } /*-DEPARTURE-*/\n\t\tif (ends(z, \"alli\")) {\n\t\t r(z, \"al\");\n\t\t break;\n\t\t}\n\t\tif (ends(z, \"entli\")) {\n\t\t r(z, \"ent\");\n\t\t break;\n\t\t}\n\t\tif (ends(z, \"eli\")) {\n\t\t r(z, \"e\");\n\t\t break;\n\t\t}\n\t\tif (ends(z, \"ousli\")) {\n\t\t r(z, \"ous\");\n\t\t break;\n\t\t}\n\t\tbreak;\n\t case 'o': if (ends(z, \"ization\")) {\n\t\tr(z, \"ize\");\n\t\tbreak;\n }\n\t\tif (ends(z, \"ation\")) {\n\t\t r(z, \"ate\");\n\t\t break;\n\t\t}\n\t\tif (ends(z, \"ator\")) {\n\t\t r(z, \"ate\");\n\t\t break;\n\t\t}\n\t\tbreak;\n\t case 's': if (ends(z, \"alism\")) {\n\t\tr(z, \"al\");\n\t\tbreak;\n }\n\t\tif (ends(z, \"iveness\")) {\n\t\t r(z, \"ive\");\n\t\t break;\n\t\t}\n\t\tif (ends(z, \"fulness\")) {\n\t\t r(z, \"ful\");\n\t\t break;\n\t\t}\n\t\tif (ends(z, \"ousness\")) {\n\t\t r(z, \"ous\");\n\t\t break;\n\t\t}\n\t\tbreak;\n\t case 't': if (ends(z, \"aliti\")) {\n\t\tr(z, \"al\");\n\t\tbreak;\n }\n\t\tif (ends(z, \"iviti\")) {\n\t\t r(z, \"ive\");\n\t\t break;\n\t\t}\n\t\tif (ends(z, \"biliti\")) {\n\t\t r(z, \"ble\");\n\t\t break;\n\t\t}\n\t\tbreak;\n\t case 'g': if (ends(z, \"logi\")) {\n\t\tr(z, \"log\");\n\t\tbreak;\n } /*-DEPARTURE-*/\n\t }\n\t}", "title": "" }, { "docid": "1aca82c507af0964871c2dcf8ed326f4", "score": "0.5652176", "text": "function selectProblem(letter) {\n if (letter == 'A'){\n problemMessage = \"Write three Python functions: 1) to calculate midpoints of a line; 2) to take out negative numbers from a list; 3) to take out positinve numbers from a list.\";\n initialCode = 'def midpoint(x1, y1, x2, y2):\\n\\t#code here\\n\\treturn (0,0)\\n\\ndef takeOutNeg(listy):\\n\\t#code here\\n\\treturn []\\n\\ndef takeOutPos(listy):\\n\\t#code here\\n\\treturn []\\n\\nprint midpoint(1,3,4,1)\\nprint takeOutNeg([2,-1,3,-5,0,1])\\nprint takeOutPos([2,-1,3,-5,0,1])';\n }\n if (letter == 'B'){\n problemMessage = \"Write a Python program to add two binary numbers.\";\n initialCode = \"def addBinary(x, y):\\n\\treturn 0\\n\\naddBinary (1,11)\";\n }\n if (letter == 'C') {\n problemMessage = \" Using the Python language, have the function alphabetSoup(str) take the str string parameter being passed and return the string with the letters in alphabetical order (ie. hello becomes ehllo). Assume numbers and punctuation symbols will not be included in the string.\";\n initialCode = \"def alphabetSoup(str):\\n\\treturn 0\\n\\nalphabetSoup('delta')\\nalphabetSoup('')\";\n }\n if (letter == 'D'){\n problemMessage = \"Debug the following code that creates a multiplication quiz app\";\n initialCode = \"import Random\\na = random.randint(1,12)\\nb = random.randint(1,12)\\nfor i in range(l0):\\n\\tquestion = 'What is ' +a+' x '+b+'? '\\n\\tanswer = (question)\\n\\tif answer = a*b\\n\\t\\tprint (Well done!)\\n\\telse:\\n\\t\\tprint('No.')\";\n }\n if (letter == 'E'){\n problemMessage = \"Implement the function unique_in_order which takes as argument a sequence and returns a list of items without any elements with the same value next to each other and preserving the original order of elements.\\nFor example:\\nunique_in_order('AAAABBBCCDAABBB') == ['A', 'B', 'C', 'D', 'A', 'B']\\nunique_in_order('ABBCcAD') == ['A', 'B', 'C', 'c', 'A', 'D']\\nunique_in_order([1,2,2,3,3]) == [1,2,3]\";\n initialCode = \"def unique_in_order(iterable):\\n\\toutput = []\\n\\toutput.append(iterable[0])\\n\\n\\tfor i in len(iterable):\\n\\t\\tif iterable[i+1] != iterable[i]:\\n\\t\\t\\toutput.append(iterable[i+1])\\n\\nunique_in_order('AAAABBBCCDAABBB')\\nunique_in_order('')\\nunique_in_order('B')\";\n }\n \n //metricVar initialization\n metricsVars.charCount = initialCode.length; // reinitializing character count of editor so it doesn't seem like it is a paste\n checkForPrint(initialCode, true); // reinitialize print statements\n\n // set new text in editor\n myCodeMirror.setValue(initialCode);\n // set new problem message text\n document.getElementById('task').innerHTML = \"<p>\"+problemMessage+\"</p>\";\n}", "title": "" }, { "docid": "7093a267cce78ebd4367751cbce623d7", "score": "0.564393", "text": "function e(A,n){0}", "title": "" }, { "docid": "9a9289e617ab5ea7988f1ee5a7d62eac", "score": "0.5628307", "text": "function exercise08(numberA) {\n var result;\n\n // Definir condicional aqui\n\n return result;\n}", "title": "" }, { "docid": "ffe901f71ab0c7fdcaaa960db6f63c2e", "score": "0.56183964", "text": "function main() {\n\n \n let [n,m]=readline().split(' ').map(d=>Number(d)) //reads just the n for a simple test case\n let A=readline().split(\" \").map(d=>Number(d))\n let result=YAMPDC2(A,m) //solves a simple test case\n console.log(result.toString())\n}", "title": "" }, { "docid": "298be0977f1e1a1ae5dfa5ae74b15d17", "score": "0.55554485", "text": "function A000081( len ) {\n\n function s( n, k ) {\n var end = Math.floor( n/k );\n var sum = 0;\n for( var j = 1; j <= end; j++ )\n sum += a( n+1 - j*k );\n \n return sum;\n }\n\n\n function a( n ) {\n process.stdout.write( n + ' ' );\n if( n === 0 ) \n return 0;\n\n if( n === 1 ) \n return 1;\n\n\n var sum = 0;\n for( var k = 1; k <= n-1; k++ ) \n sum += k * a(k) * s( n-1, k );\n \n return sum / (n-1);\n }\n\n var result = [];\n for( var i = 0; i < len; i++ ) {\n result[i] = a(i);\n process.stdout.write( '\\n' ); // <- moved #next\n }\n\n return result;\n}", "title": "" }, { "docid": "c5924e8a56f2b1d0e6c92ac64643eac3", "score": "0.5521062", "text": "function main() {\n var testCases = nextInt();\n var A, B, len, map, res, div, cand, init;\n\n for (var testCase = 1; testCase <= testCases; ++testCase) {\n A = nextInt();\n B = nextInt();\n len = (A + \"\").length;\n res = 0;\n map = {};\n init = A;\n\n while (init < B) {\n for (var i = 1; i < len; i++) {\n div = Math.pow(10, i);\n\n cand = parseInt(\"\" + init % div + parseInt(init / div));\n\n if (A <= cand && cand <= B && cand !== init && !map[cand + \"|\" + init] && !map[init + \"|\" + cand]) {\n res++;\n map[cand + \"|\" + init] = true;\n map[init + \"|\" + cand] = true;\n }\n }\n init++;\n }\n\n print(\"Case #\" + testCase + \": \" + res);\n }\n}", "title": "" }, { "docid": "3d6eb4b2ae706a52eff09ba60d35275b", "score": "0.5500824", "text": "function main() {\n var testCases = nextInt();\n var N, S, p, T, res;\n\n for (var testCase = 1; testCase <= testCases; ++testCase) {\n N = nextInt();\n S = nextInt();\n p = nextInt();\n res = 0;\n for (var i = 0; i < N; i++) {\n T = nextInt();\n if (T >= 3 * p - 2 && T >= p) {\n res++;\n } else if (T >= 3 * p - 4 && T >= p && S) {\n res++;\n S--;\n }\n }\n\n print(\"Case #\" + testCase + \": \" + res);\n }\n}", "title": "" }, { "docid": "3c08e662bd60a83e82adffe37b457dc8", "score": "0.5488039", "text": "function ACS(ampNumber, amplifiers, phase, input, startingIndex) {\n const code = amplifiers[ampNumber]\n\n const paramGetter = (paramNumber) => {\n const mode = Number(code[index].toString()[code[index].toString().length-2-paramNumber])\n if (mode) {\n return code[index+paramNumber]\n } else {\n return code[code[index+paramNumber]]\n }\n }\n\n let index = startingIndex[ampNumber]\n let inputCounter = index !== 0 ? 1 : 0\n let codeOutput = null\n \n while (index <= code.length) {\n switch (code[index] % 100) {\n case 1: {\n // console.log(code[index], '1')\n const numb1 = paramGetter(1)\n const numb2 = paramGetter(2)\n const output = code[index+3]\n code[output] = numb1 + numb2\n index += 4\n break\n }\n case 2: {\n // console.log(code[index], '2')\n const numb1 = paramGetter(1)\n const numb2 = paramGetter(2)\n const output = code[index+3]\n code[output] = numb1 * numb2\n index += 4\n break\n }\n case 3: {\n // console.log(code[index], '3')\n const output = code[index+1]\n code[output] = inputCounter === 0 ? phase : input\n inputCounter++\n index += 2\n break\n }\n case 4: {\n // console.log(code[index], '4')\n const output = code[index+1]\n codeOutput = code[output]\n // console.log('output:', code[output])\n index += 2\n startingIndex[ampNumber] = index\n amplifiers[ampNumber] = [...code]\n return codeOutput\n }\n case 5: {\n // console.log(code[index], '5')\n const numb1 = paramGetter(1)\n const numb2 = paramGetter(2)\n if (numb1) {\n index = numb2\n } else {\n index += 3\n }\n break\n }\n case 6: {\n // console.log(code[index], '6')\n const numb1 = paramGetter(1)\n const numb2 = paramGetter(2)\n if (!numb1) {\n index = numb2\n } else {\n index += 3\n }\n break\n }\n case 7: {\n // console.log(code[index], '7')\n const numb1 = paramGetter(1)\n const numb2 = paramGetter(2)\n code[code[index+3]] = numb1 < numb2 ? 1 : 0\n index += 4\n break\n }\n case 8: {\n // console.log(code[index], '8')\n const numb1 = paramGetter(1)\n const numb2 = paramGetter(2)\n code[code[index+3]] = numb1 == numb2 ? 1 : 0\n index += 4\n break\n }\n \n case 99: {\n // console.log(code[index], 'end')\n return\n }\n default: {\n console.log(code[index], 'baj van')\n return\n }\n } \n }\n}", "title": "" }, { "docid": "e54d78c7e4ea2cda7e2942b79761d402", "score": "0.54796284", "text": "function part1(input) {\n var program = new IntCodeMachine([1, 330, 331, 332, 109, 3160, 1102, 1, 1182, 16, 1101, 0, 1477, 24, 102, 1, 0, 570, 1006, 570, 36, 102, 1, 571, 0, 1001, 570, -1, 570, 1001, 24, 1, 24, 1106, 0, 18, 1008, 571, 0, 571, 1001, 16, 1, 16, 1008, 16, 1477, 570, 1006, 570, 14, 21101, 58, 0, 0, 1105, 1, 786, 1006, 332, 62, 99, 21101, 0, 333, 1, 21102, 73, 1, 0, 1105, 1, 579, 1102, 0, 1, 572, 1102, 1, 0, 573, 3, 574, 101, 1, 573, 573, 1007, 574, 65, 570, 1005, 570, 151, 107, 67, 574, 570, 1005, 570, 151, 1001, 574, -64, 574, 1002, 574, -1, 574, 1001, 572, 1, 572, 1007, 572, 11, 570, 1006, 570, 165, 101, 1182, 572, 127, 1002, 574, 1, 0, 3, 574, 101, 1, 573, 573, 1008, 574, 10, 570, 1005, 570, 189, 1008, 574, 44, 570, 1006, 570, 158, 1105, 1, 81, 21101, 0, 340, 1, 1105, 1, 177, 21102, 477, 1, 1, 1106, 0, 177, 21101, 514, 0, 1, 21102, 176, 1, 0, 1106, 0, 579, 99, 21101, 0, 184, 0, 1105, 1, 579, 4, 574, 104, 10, 99, 1007, 573, 22, 570, 1006, 570, 165, 1001, 572, 0, 1182, 21101, 375, 0, 1, 21102, 1, 211, 0, 1105, 1, 579, 21101, 1182, 11, 1, 21101, 222, 0, 0, 1106, 0, 979, 21102, 1, 388, 1, 21102, 233, 1, 0, 1105, 1, 579, 21101, 1182, 22, 1, 21101, 0, 244, 0, 1105, 1, 979, 21101, 0, 401, 1, 21102, 1, 255, 0, 1106, 0, 579, 21101, 1182, 33, 1, 21102, 1, 266, 0, 1106, 0, 979, 21102, 414, 1, 1, 21102, 1, 277, 0, 1105, 1, 579, 3, 575, 1008, 575, 89, 570, 1008, 575, 121, 575, 1, 575, 570, 575, 3, 574, 1008, 574, 10, 570, 1006, 570, 291, 104, 10, 21102, 1182, 1, 1, 21102, 313, 1, 0, 1105, 1, 622, 1005, 575, 327, 1101, 1, 0, 575, 21101, 327, 0, 0, 1105, 1, 786, 4, 438, 99, 0, 1, 1, 6, 77, 97, 105, 110, 58, 10, 33, 10, 69, 120, 112, 101, 99, 116, 101, 100, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 110, 97, 109, 101, 32, 98, 117, 116, 32, 103, 111, 116, 58, 32, 0, 12, 70, 117, 110, 99, 116, 105, 111, 110, 32, 65, 58, 10, 12, 70, 117, 110, 99, 116, 105, 111, 110, 32, 66, 58, 10, 12, 70, 117, 110, 99, 116, 105, 111, 110, 32, 67, 58, 10, 23, 67, 111, 110, 116, 105, 110, 117, 111, 117, 115, 32, 118, 105, 100, 101, 111, 32, 102, 101, 101, 100, 63, 10, 0, 37, 10, 69, 120, 112, 101, 99, 116, 101, 100, 32, 82, 44, 32, 76, 44, 32, 111, 114, 32, 100, 105, 115, 116, 97, 110, 99, 101, 32, 98, 117, 116, 32, 103, 111, 116, 58, 32, 36, 10, 69, 120, 112, 101, 99, 116, 101, 100, 32, 99, 111, 109, 109, 97, 32, 111, 114, 32, 110, 101, 119, 108, 105, 110, 101, 32, 98, 117, 116, 32, 103, 111, 116, 58, 32, 43, 10, 68, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 32, 109, 97, 121, 32, 98, 101, 32, 97, 116, 32, 109, 111, 115, 116, 32, 50, 48, 32, 99, 104, 97, 114, 97, 99, 116, 101, 114, 115, 33, 10, 94, 62, 118, 60, 0, 1, 0, -1, -1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 14, 0, 109, 4, 1202, -3, 1, 586, 21001, 0, 0, -1, 22101, 1, -3, -3, 21101, 0, 0, -2, 2208, -2, -1, 570, 1005, 570, 617, 2201, -3, -2, 609, 4, 0, 21201, -2, 1, -2, 1106, 0, 597, 109, -4, 2106, 0, 0, 109, 5, 2101, 0, -4, 630, 20102, 1, 0, -2, 22101, 1, -4, -4, 21102, 1, 0, -3, 2208, -3, -2, 570, 1005, 570, 781, 2201, -4, -3, 652, 21002, 0, 1, -1, 1208, -1, -4, 570, 1005, 570, 709, 1208, -1, -5, 570, 1005, 570, 734, 1207, -1, 0, 570, 1005, 570, 759, 1206, -1, 774, 1001, 578, 562, 684, 1, 0, 576, 576, 1001, 578, 566, 692, 1, 0, 577, 577, 21102, 1, 702, 0, 1106, 0, 786, 21201, -1, -1, -1, 1106, 0, 676, 1001, 578, 1, 578, 1008, 578, 4, 570, 1006, 570, 724, 1001, 578, -4, 578, 21102, 731, 1, 0, 1105, 1, 786, 1105, 1, 774, 1001, 578, -1, 578, 1008, 578, -1, 570, 1006, 570, 749, 1001, 578, 4, 578, 21101, 756, 0, 0, 1105, 1, 786, 1105, 1, 774, 21202, -1, -11, 1, 22101, 1182, 1, 1, 21101, 0, 774, 0, 1105, 1, 622, 21201, -3, 1, -3, 1105, 1, 640, 109, -5, 2105, 1, 0, 109, 7, 1005, 575, 802, 21002, 576, 1, -6, 20101, 0, 577, -5, 1105, 1, 814, 21101, 0, 0, -1, 21101, 0, 0, -5, 21101, 0, 0, -6, 20208, -6, 576, -2, 208, -5, 577, 570, 22002, 570, -2, -2, 21202, -5, 51, -3, 22201, -6, -3, -3, 22101, 1477, -3, -3, 2101, 0, -3, 843, 1005, 0, 863, 21202, -2, 42, -4, 22101, 46, -4, -4, 1206, -2, 924, 21102, 1, 1, -1, 1105, 1, 924, 1205, -2, 873, 21101, 0, 35, -4, 1106, 0, 924, 1201, -3, 0, 878, 1008, 0, 1, 570, 1006, 570, 916, 1001, 374, 1, 374, 1201, -3, 0, 895, 1101, 2, 0, 0, 1202, -3, 1, 902, 1001, 438, 0, 438, 2202, -6, -5, 570, 1, 570, 374, 570, 1, 570, 438, 438, 1001, 578, 558, 922, 20101, 0, 0, -4, 1006, 575, 959, 204, -4, 22101, 1, -6, -6, 1208, -6, 51, 570, 1006, 570, 814, 104, 10, 22101, 1, -5, -5, 1208, -5, 33, 570, 1006, 570, 810, 104, 10, 1206, -1, 974, 99, 1206, -1, 974, 1102, 1, 1, 575, 21101, 973, 0, 0, 1105, 1, 786, 99, 109, -7, 2106, 0, 0, 109, 6, 21102, 0, 1, -4, 21102, 1, 0, -3, 203, -2, 22101, 1, -3, -3, 21208, -2, 82, -1, 1205, -1, 1030, 21208, -2, 76, -1, 1205, -1, 1037, 21207, -2, 48, -1, 1205, -1, 1124, 22107, 57, -2, -1, 1205, -1, 1124, 21201, -2, -48, -2, 1106, 0, 1041, 21101, -4, 0, -2, 1105, 1, 1041, 21101, 0, -5, -2, 21201, -4, 1, -4, 21207, -4, 11, -1, 1206, -1, 1138, 2201, -5, -4, 1059, 2101, 0, -2, 0, 203, -2, 22101, 1, -3, -3, 21207, -2, 48, -1, 1205, -1, 1107, 22107, 57, -2, -1, 1205, -1, 1107, 21201, -2, -48, -2, 2201, -5, -4, 1090, 20102, 10, 0, -1, 22201, -2, -1, -2, 2201, -5, -4, 1103, 1201, -2, 0, 0, 1106, 0, 1060, 21208, -2, 10, -1, 1205, -1, 1162, 21208, -2, 44, -1, 1206, -1, 1131, 1105, 1, 989, 21102, 1, 439, 1, 1105, 1, 1150, 21102, 477, 1, 1, 1105, 1, 1150, 21101, 514, 0, 1, 21101, 0, 1149, 0, 1106, 0, 579, 99, 21102, 1157, 1, 0, 1105, 1, 579, 204, -2, 104, 10, 99, 21207, -3, 22, -1, 1206, -1, 1138, 1202, -5, 1, 1176, 2102, 1, -4, 0, 109, -6, 2106, 0, 0, 28, 1, 50, 1, 32, 7, 11, 1, 32, 1, 5, 1, 11, 1, 32, 1, 5, 1, 11, 1, 7, 11, 14, 1, 5, 1, 11, 1, 7, 1, 9, 1, 14, 1, 5, 1, 11, 13, 5, 1, 14, 1, 5, 1, 19, 1, 3, 1, 5, 1, 14, 1, 5, 1, 5, 13, 1, 1, 3, 1, 5, 1, 14, 1, 5, 1, 5, 1, 11, 1, 1, 1, 3, 1, 5, 1, 14, 1, 5, 1, 5, 1, 11, 1, 1, 13, 12, 1, 5, 1, 5, 1, 11, 1, 5, 1, 5, 1, 1, 1, 12, 1, 5, 13, 5, 1, 5, 1, 5, 1, 1, 1, 12, 1, 11, 1, 5, 1, 5, 1, 5, 1, 5, 1, 1, 1, 2, 11, 11, 1, 1, 11, 5, 1, 5, 1, 1, 1, 24, 1, 1, 1, 3, 1, 11, 1, 5, 1, 1, 1, 24, 1, 1, 1, 3, 1, 11, 7, 1, 1, 24, 1, 1, 1, 3, 1, 19, 1, 24, 7, 15, 7, 24, 1, 19, 1, 3, 1, 1, 1, 24, 1, 1, 7, 11, 1, 3, 1, 1, 1, 24, 1, 1, 1, 5, 1, 11, 1, 3, 1, 1, 1, 24, 1, 1, 1, 5, 1, 5, 11, 1, 1, 24, 1, 1, 1, 5, 1, 5, 1, 5, 1, 5, 1, 24, 1, 1, 1, 5, 1, 5, 1, 5, 1, 5, 1, 24, 1, 1, 1, 5, 1, 5, 1, 5, 1, 5, 1, 24, 13, 1, 1, 5, 1, 5, 1, 26, 1, 5, 1, 3, 1, 1, 1, 5, 1, 5, 1, 26, 1, 5, 1, 3, 1, 1, 13, 26, 1, 5, 1, 3, 1, 7, 1, 32, 1, 5, 13, 32, 1, 9, 1, 40, 11, 14]).run()\n var picture = ''\n while (!(val = program.next()).done) {\n picture += String.fromCharCode(val.value)\n }\n console.log(picture)\n var grid = picture.split(\"\\n\").map(l => l.split(\"\"))\n var count = 0\n for (var i = 1; i < grid.length - 1; i++) {\n for (var j = 1; j < grid[0].length - 1; j++) {\n if (grid[i][j] == '#' && grid[i - 1][j] == '#' && grid[i + 1][j] == '#' && grid[i][j - 1] == '#' && grid[i][j - 1] == '#') {\n count += (j) * (i)\n }\n }\n }\n return count;\n}", "title": "" }, { "docid": "56946cfe7080e63957cd4fdb4df9c72d", "score": "0.54547834", "text": "function F(c,e,S,h,s){if(c<9){c^=8;for(var T,o,L,E,D,O=20,N=-1e8,d=S&&F(c)>H,K=78-h<<9,a=c?X:-X,G,n,g,C,R,A;O++<98;)if((o=I[T=O])&&(G=o&Q^c)<7){A=G--&2?8:4;C=9-o&Q?l[61+G]:49;do{R=I[T+=l[C]];g=D=G|T+a-e?0:e;if(!R&&G|A<3|g||(1+R&Q^c)>9&&G|A>2){if(!(2-R&7))return K;for(E=n=G|I[T-a]-7?o&Q:6^c;E;E=!E&!d&&!(g=T,I[D=T<O?g-3:g+2]<Q|I[D+O-T]|I[T+=T-O])){L=(R&&l[R&7|32]*2-h-G)+(G?0:n-o&Q?110:(D&&14)+(A<2)+1);if(S>h||1<S&S==h&&L>2|d){I[T]=n,I[g]=I[D],I[O]=D?I[D]=0:0;L-=F(c,E=G|A>1?0:T,S,h+1,L-N);if(!(h|S-1|B-O|T-b|L<-H))return F(B=b),y=E,c&&W(\"F(8,y,2,0),F(8,y,1,0)\",O);E=1-G|A<7|D|!S|R|o<Q||F(c)>H;I[O]=o;I[T]=R;I[D]=I[g];D?I[g]=G?0:9^c:0}if(L>N|!h&L==N&M()*2)if(N=L,S>1)if(h?s<L:(B=O,b=T,0))return N}}}while(!R&G>2||(T=O,G|A>2|Q<o&!R&&++C*--A))}return 768-K<N|d&&N}for(i=20;i<98;chessElem(i).innerHTML=\"&#\"+(I[i]&Q?9808+l[67+(I[i]&Q)]:9)+\";\")chessElem(i+=i%X-8?1:3).lang=i-B}", "title": "" }, { "docid": "daa7f220d4025c757f361f0b1d73d2d5", "score": "0.5444668", "text": "function uqa(){this.j=0;this.C=[];this.k=[];this.G=this.H=this.g=this.F=this.N=this.D=0;this.O=[]}", "title": "" }, { "docid": "b0adc5f4baf1dadfd35ceda6ff873a08", "score": "0.5431516", "text": "function step3(z) {\n\t switch (z.b.charAt(z.k)) {\n\t case 'e': if (ends(z, \"icate\")) {\n\t\tr(z, \"ic\");\n\t\tbreak;\n }\n\t\tif (ends(z, \"ative\")) {\n\t\t r(z, \"\");\n\t\t break;\n\t\t}\n\t\tif (ends(z, \"alize\")) {\n\t\t r(z, \"al\");\n\t\t break;\n\t\t}\n\t\tbreak;\n\t case 'i': if (ends(z, \"iciti\")) {\n\t\tr(z, \"ic\");\n\t\tbreak;\n }\n\t\tbreak;\n\t case 'l': if (ends(z, \"ical\")) {\n\t\tr(z, \"ic\");\n\t\tbreak;\n }\n\t\tif (ends(z, \"ful\")) {\n\t\t r(z, \"\");\n\t\t break;\n\t\t}\n\t\tbreak;\n\t case 's': if (ends(z, \"ness\")) {\n\t\tr(z, \"\");\n\t\tbreak;\n }\n\t\tbreak;\n\t }\n\t}", "title": "" }, { "docid": "27fdfb2d9b4ddd5ce7da1e336a7b66c2", "score": "0.5427085", "text": "function solution(S, P, Q) {\n // write your code in JavaScript (Node.js 8.9.4)\n let result = [];\n // track the most recent previous occurance of letters\n let lastA = [];\n let lastC = [];\n let lastG = [];\n\n for (let i = 0; i < S.length; i++) {\n if (i === 0) {\n lastA[i] = -1;\n lastC[i] = -1;\n lastG[i] = -1;\n } else {\n lastA[i] = lastA[i - 1];\n lastC[i] = lastC[i - 1];\n lastG[i] = lastG[i - 1];\n }\n if (S[i] === \"A\") {\n lastA[i] = i;\n } else if (S[i] === \"C\") {\n lastC[i] = i;\n } else if (S[i] === \"G\") {\n lastG[i] = i;\n }\n }\n\n for (let i = 0; i < P.length; i++) {\n if (lastA[Q[i]] >= P[i]) {\n result.push(1);\n } else if (lastC[Q[i]] >= P[i]) {\n result.push(2);\n } else if (lastG[Q[i]] >= P[i]) {\n result.push(3);\n } else {\n result.push(4);\n }\n }\n return result;\n}", "title": "" }, { "docid": "6963f8d384891cb8498a9b2e9d54b8ae", "score": "0.5363855", "text": "function qA(a,b){this.l=[];this.T=a;this.G=b||null;this.j=this.e=!1;this.g=void 0;this.z=this.U=this.o=!1;this.n=0;this.ye=null;this.k=0}", "title": "" }, { "docid": "84dafa72931802fe73e7adfea1c84d17", "score": "0.53604525", "text": "function Pascal() {\n\n}", "title": "" }, { "docid": "c923d8c00ab45b23eaeca88c44e0daae", "score": "0.5335484", "text": "function main() {\n\tconst [\n\t\txLeft,\n\t\tvLeft,\n\t\txRight,\n\t\tvRight\n\t] = readLine().split(' ').map(Number);\n\n\tconst dist = xRight - xLeft,\n\t\t gain = vLeft - vRight;\n\t\n\tif (dist === 0) return yes();\n\tif (gain <= 0) return no();\n\tif (dist % gain === 0) return yes();\n\telse return no();\n}", "title": "" }, { "docid": "4cc65831fa175e6cbf04d9d4c82a48a8", "score": "0.5332981", "text": "function Za(a){m.call(this,4);this.c=a;Xa(this,Aa(this.c,function(a){return a.e}));Ya(this,Aa(this.c,function(a){return a.a}))}", "title": "" }, { "docid": "169258118a0a42e91714fde8a2fcc40f", "score": "0.5326049", "text": "function solution(S, P, Q) {\n // write your code in JavaScript (Node.js 8.9.4)\n var leftDistanceToA = new Array(S.length).fill(+Infinity);\n var leftDistanceToC = new Array(S.length).fill(+Infinity);\n var leftDistanceToG = new Array(S.length).fill(+Infinity);\n var leftDistanceToT = new Array(S.length).fill(+Infinity);\n \n for (var s = 0; s < S.length; s++){\n if(s!=0){\n leftDistanceToA[s] = leftDistanceToA[s-1]+1;\n leftDistanceToC[s] = leftDistanceToC[s-1]+1;\n leftDistanceToG[s] = leftDistanceToG[s-1]+1;\n leftDistanceToT[s] = leftDistanceToT[s-1]+1;\n }\n var c = S[s];\n if(c+\"\"==\"A\")\n leftDistanceToA[s] = 0;\n if(c+\"\"==\"C\")\n leftDistanceToC[s] = 0;\n if(c+\"\"==\"G\")\n leftDistanceToG[s] = 0;\n if(c+\"\"==\"T\")\n leftDistanceToT[s] = 0;\n } \n \n \n var ret = new Array(P.length).fill(0);\n for (var k = 0; k < ret.length; k++){\n var p = P[k];\n var q = Q[k];\n var maxLeft = q - p;\n if(leftDistanceToA[q] <= maxLeft)\n ret[k] = 1;\n else if(leftDistanceToC[q] <= maxLeft)\n ret[k] = 2;\n else if(leftDistanceToG[q] <= maxLeft)\n ret[k] = 3;\n else if(leftDistanceToT[q] <= maxLeft)\n ret[k] = 4;\n }\n return ret;\n}", "title": "" }, { "docid": "91150b3db85c1aff8aa763c1d6ea1c09", "score": "0.5325149", "text": "function Ra(a){this.qa=\"2u2008\";this.fa=new RegExp(this.qa);this.ga=\"\";this.q=new q;this.v=\"\";this.k=new q;this.u=new q;this.m=!0;this.aa=this.s=this.ka=!1;this.oa=M.r();this.t=0;this.d=new q;this.ea=!1;this.o=\"\";this.b=new q;this.h=[];this.ha=a;this.va=this.i=Sa(this,this.ha)}", "title": "" }, { "docid": "ffd88c0f6a153d78ac94608fc6a70eac", "score": "0.52958775", "text": "function PHA() {\n push(A);\n }", "title": "" }, { "docid": "f71d495e5076925c1a96309c352e8fa3", "score": "0.52899873", "text": "static expert_assess(input, comp_assess) {\n let matrix = [];\n \n comp_assess = comp_assess.split(';');\n comp_assess = comp_assess.map(function(i){return Number(i)})\n\n for (let i = 0; i < input.length; i++) {\n matrix[i] = input[i].split(';');\n matrix[i] = matrix[i].map(function(i){return Number(i)})\n }\n\n //Определяются относительные оценки компетенций\n let sum_assess = 0;\n for (let i = 0; i < comp_assess.length; i++) {\n sum_assess += comp_assess[i];\n }\n for (let i = 0; i < comp_assess.length; i++) {\n comp_assess[i] = comp_assess[i] / sum_assess;\n }\n\n //Вычисляются веса\n let weights = [];\n\n for (let j = 0; j < matrix[0].length; j++) {\n weights[j] = 0;\n for (let i = 0; i < matrix.length; i++) {\n weights[j] += matrix[i][j] * comp_assess[i];\n }\n }\n\n //Вычисляются ранги\n let ranks = [];\n\n for (let i = 0; i < weights.length; i++) {\n ranks.push(weights.length + 1);\n }\n\n for (let i = 0; i < weights.length; i++) {\n for (let j = 0; j < weights.length; j++) {\n if (weights[i] >= weights[j]) {\n ranks[i] -= 1;\n }\n }\n }\n\n let sum_str = 0;\n for (let i = 1; i < ranks.length; i++) {\n for (let j = 0; j < ranks.length; j++) {\n if (ranks[j] == i) {\n sum_str += 1;\n }\n }\n for (let j = 0; j < ranks.length; j++) {\n if (ranks[j] > i) {\n ranks[j] = ranks[j] - sum_str + 1;\n }\n }\n sum_str = 0;\n }\n\n //Упорядочивание альтернатив\n let order = [];\n for (let i = 1; i <= ranks.length; i++) {\n for (let j = 0; j < ranks.length; j++) {\n if (ranks[j] == i) {\n order.push(j);\n }\n }\n }\n\n return {\n order: order,\n weights: weights,\n ranks: ranks\n }\n\n\n }", "title": "" }, { "docid": "e1b1708262f61bdca58e71af36417494", "score": "0.5287865", "text": "function main() {\n var arr = [-18, 23, 22, 14, 19, -6, -3, 17, -7];\n var cards = [\"4K\", \"KH\", \"5C\", \"KA\", \"QH\", \"KD\", \"2H\", \"10S\", \"AS\", \"7H\", \"9K\", \"10D\"];\n\n console.log(\"Exercise 1\");\n func1();\n console.log(\"Exercise 2\");\n func2(arr);\n console.log(\"Exercise 3\");\n func3(5);\n console.log(\"Exercise 4\");\n func4(18);\n console.log(\"Exercise 5\");\n func5(\"72639\");\n console.log(\"Exercise 6\");\n func6();\n console.log(\"Exercise 7\");\n func7(4);\n console.log(\"Exercise 8\");\n func8(cards);\n console.log(\"Exercise 9\");\n func9(45,120);\n console.log(\"Exercise 10\");\n func10(6,10);\n}", "title": "" }, { "docid": "90fa2fd3839d16c4fd324e7e83b498eb", "score": "0.52854615", "text": "function Za(a,b){this.oc=[];this.Fg=a;this.Ye=b||m}", "title": "" }, { "docid": "1183a04c3c1ed01ceb9ba038521efe79", "score": "0.5284411", "text": "function main() {\n\n let solve=(A)=>{\n let y=([M,C],x)=> M*x+C\n let Intersection=(l1,l2)=>{\n let [m1,c1]=l1,[m2,c2]=l2\n return {'x':(c2-c1)/(m1-m2),'y': (m1*(c2-c1)/(m1-m2)+c1)}\n }\n let n=A.length,prefixSum=[0],totalChar=A.reduce((a,c,i)=>a+c*(i+1),0)\n for (let i = 0; i < n; i++)\n prefixSum.push(prefixSum[prefixSum.length-1]+A[i])\n\n let result=totalChar\n\n let pq=new minBinaryHeap\n pq.comparator=(a,b)=>a[0]-b[0]\n let Q=[ ] \n for (let i = 0; i <=n ; i++){\n while(Q.length>=2&&y(Q[0],i)<=y(Q[1],i))\n Q.shift()\n if(Q.length)\n result=Math.max(y(Q[0],i)-prefixSum[i]+totalChar,result)\n let newLine=[A[i],-A[i]*(i+1)+prefixSum[i+1]]\n while(Q.length>=2&&\n Intersection(Q[Q.length-2],newLine).x<=Intersection(Q[Q.length-2],Q[Q.length-1]).x\n )\n Q.pop()\n Q.push(newLine)\n Q.sort((a,b)=>a[0]-b[0])\n }\n Q=[ ] \n for (let i = n-1; i >=0 ; i--){\n while(Q.length>=2&&y(Q[0],i)<=y(Q[1],i))\n Q.shift()\n if(Q.length)\n // for(let cc of Q)\n // result=Math.max(y(cc,i)-prefixSum[i]+totalChar,result)\n result=Math.max(y(Q[0],i)-prefixSum[i]+totalChar,result)\n let newLine=[A[i],-A[i]*(i+1)+prefixSum[i+1]]\n while(Q.length>=2&&\n Intersection(Q[Q.length-2],newLine).x<=Intersection(Q[Q.length-2],Q[Q.length-1]).x\n )\n Q.pop()\n Q.push(newLine)\n Q.sort((a,b)=>a[0]-b[0])\n } \n return result\n }\n\n let n=readline() //reads just the n for a simple test case\n let A=readline().split(' ').map(d=>Number(d))\n let result=solve(A) //solves a simple test case\n console.log(result.toString())\n\n}", "title": "" }, { "docid": "e616052fef035b243c435585e29b2167", "score": "0.5266684", "text": "function assignment17_20Q6() {\r\n document.write(\"<h2>Counting:</h2>\");\r\n for (var i = 1; i <= 15; i++) {\r\n document.write(i + \", \");\r\n }\r\n document.write(\"</br>\");\r\n document.write(\"<h2>Reverse counting:</h2>\");\r\n for (var i = 10; i >= 1; i--) {\r\n document.write(i + \", \");\r\n }\r\n document.write(\"</br>\");\r\n document.write(\"<h2>Even:</h2>\");\r\n for (var i = 0; i <= 20; i++) {\r\n document.write(i + \", \");\r\n i++;\r\n }\r\n document.write(\"</br>\");\r\n document.write(\"<h2>Odd:</h2>\");\r\n for (var i = 1; i <= 20; i++) {\r\n document.write(i + \", \");\r\n i++;\r\n } \r\n document.write(\"</br>\");\r\n document.write(\"<h2>Series:</h2>\");\r\n for (var i = 2; i <= 20; i++) {\r\n document.write(i + \"k, \");\r\n i++;\r\n } \r\n document.write(\"</br></br>Press refresh to go home page</br>\");\r\n}", "title": "" }, { "docid": "ba4a827ef23c2950a6471829e7e0e562", "score": "0.525902", "text": "function Quiescence(alpha, beta) {\n\n\tif ((SearchController.nodes & 2047) == 0) {\n\t\tCheckUp();\n\t}\n\t\n\tSearchController.nodes++;\n\t\n\tif( (IsRepetition() || Board.fiftyMove >= 100) && Board.ply != 0) {\n\t\treturn 0;\n\t}\n\t\n\tif(Board.ply > MAXDEPTH -1) {\n\t\treturn EvalPosition();\n\t}\t\n\t\n\tvar Score = EvalPosition();\n \n // Standing pat (choosing not to do anything)\n\tif(Score >= beta) {\n\t\treturn beta;\n\t}\n \n\tif(Score > alpha) {\n\t\talpha = Score;\n\t}\n\t \n\tGenerateCaptures();\n\t\n\tvar MoveNum = 0;\n\tvar Legal = 0;\n\tvar OldAlpha = alpha;\n\tvar BestMove = NOMOVE;\n\tvar Move = NOMOVE;\t\n\t\n\tfor(MoveNum = Board.moveListStart[Board.ply]; MoveNum < Board.moveListStart[Board.ply + 1]; ++MoveNum) {\n\t\n\t\tPickNextMove(MoveNum);\n\t\t\n\t\tMove = Board.moveList[MoveNum];\t\n\n\t\tif(MakeMove(Move) == false) {\n\t\t\tcontinue;\n\t\t}\t\t\n\t\tLegal++;\n\t\tScore = -Quiescence( -beta, -alpha);\n\t\t\n\t\tTakeMove();\n\t\t\n\t\tif(SearchController.stop == true) {\n\t\t\treturn 0;\n\t\t}\n\t\n\t\tif(Score > alpha) {\n\t\t\tif(Score >= beta) {\n\t\t\t\tif(Legal == 1) {\n\t\t\t\t\tSearchController.fhf++;\n\t\t\t\t}\n\t\t\t\tSearchController.fh++;\t\n\t\t\t\treturn beta;\n\t\t\t}\n\t\t\talpha = Score;\n\t\t\tBestMove = Move;\n\t\t}\t\t\n\t}\n\tif(alpha != OldAlpha) {\n\t\tStorePvMove(BestMove);\n }\n\treturn alpha;\n}", "title": "" }, { "docid": "fd5974e14cb4411a113b2478b7ffd1a2", "score": "0.5258693", "text": "function yatathanna() {\n\t var vf = new _vexflow2.default.Flow.Factory({\n\t renderer: { elementId: 'sheet-vexflow', width: 1100, height: 900 }\n\t });\n\t var score = vf.EasyScore({ throwOnError: true });\n\t\n\t var voice = score.voice.bind(score);\n\t var notes = score.notes.bind(score);\n\t var beam = score.beam.bind(score);\n\t\n\t var x = 20,\n\t y = 80;\n\t function makeSystem(width) {\n\t var system = vf.System({ x: x, y: y, width: width, spaceBetweenStaves: 10 });\n\t x += width;\n\t return system;\n\t }\n\t\n\t function id(id) {\n\t return registry.getElementById(id);\n\t }\n\t\n\t score.set({ time: '10/8' });\n\t\n\t /* Pickup measure */\n\t var system = makeSystem(200);\n\t system.addStave({\n\t voices: [voice(notes('d4/8', { stem: \"up\" })).setStrict(false)]\n\t }).addKeySignature('Bb').addClef('treble').addTimeSignature('10/8').setTempo({ duration: \"8\", bpm: 120 }, -30).setEndBarType(_vexflow2.default.Flow.Barline.type.DOUBLE);\n\t\n\t /* Measure 1 */\n\t var system = makeSystem(680);\n\t system.addStave({\n\t voices: [voice(notes('g4/q', { stem: \"up\" }).concat(beam(notes('a4/16, b4/16', { stem: \"up\" }))).concat(beam(notes('c5/16, b4/16, b4/16, a4/16', { stem: \"down\" }))).concat(beam(notes('a4/16, g4/16, g4/16, f#4/16', { stem: \"up\" }))).concat(notes('g4/q, d4/8', { stem: \"up\" })))]\n\t });\n\t\n\t x = 20;\n\t y += 100;\n\t\n\t /* Measure 2 */\n\t var system = makeSystem(800);\n\t system.addStave({\n\t voices: [voice(notes('g4/q', { stem: \"up\" }).concat(beam(notes('a4/16, b4/16', { stem: \"up\" }))).concat(beam(notes('c5/16, b4/16, b4/16, a4/16', { stem: \"down\" }))).concat(beam(notes('a4/16, g4/16, g4/16, f#4/16', { stem: \"up\" }))).concat(notes('g4/q, b4/8/r', { stem: \"up\" })))]\n\t }).setEndBarType(_vexflow2.default.Flow.Barline.type.END);\n\t\n\t return vf;\n\t}", "title": "" }, { "docid": "ae9c09a6d649cd9fd597ceb5ad5438c6", "score": "0.52563965", "text": "function az(n){\r\n var aec=1;\r\n var dec=1;\r\n for(var i=1;i<=n;i++){\r\n var str=\"\"\r\n if(i%2==1){\r\n for(var j=1;j<=i;j++){\r\n var stk=(String.fromCharCode(64+aec))\r\n str=str+String.fromCharCode(64+aec)\r\n if(stk==\"Z\"){\r\n aec -=26\r\n }\r\n aec++\r\n }\r\n }\r\n else{\r\n str=str+(\"<\")\r\n for(var k=1;k<=i;k++){\r\n var stk=String.fromCharCode(91-dec)\r\n str=str+String.fromCharCode(91-dec)\r\n if(stk==\"A\"){\r\n dec -=26\r\n }\r\n dec++\r\n }\r\n }\r\n console.log(str)\r\n }\r\n }", "title": "" }, { "docid": "8c6b891ae062c2d0dd8a2ac76224b89d", "score": "0.52535856", "text": "function J(){this.B=function(e){for(var f=0;24>f;f++)this[String.fromCharCode(97+f)]=e[f]||0;0.01>this.c&&(this.c=0.01);e=this.b+this.c+this.e;0.18>e&&(e=0.18/e,this.b*=e,this.c*=e,this.e*=e)}}", "title": "" }, { "docid": "994e2786bab90a075f73157475a50d86", "score": "0.5251121", "text": "function akb(){this.j=0;this.C=[];this.k=[];this.K=this.O=this.g=this.J=this.Q=this.F=0;this.na=[]}", "title": "" }, { "docid": "d1cdf96e57db2754ed3206ac48182b07", "score": "0.5243426", "text": "function qA(a,b){this.L=[];this.Ia=a;this.ia=b||null;this.H=this.C=!1;this.F=void 0;this.ea=this.Ma=this.O=!1;this.N=0;this.eg=null;this.J=0}", "title": "" }, { "docid": "a350a11c85454c8f9c1ce2781da1fc24", "score": "0.52363855", "text": "function anotherFunChallenge(input) {\n let a = 5; //0(1)\n let b = 10; //0(1)\n let c = 50; //0(1)\n for (let i = 0; i < input; i++) {\n let x = i + 1; //0(n)\n let y = i + 2; //0(n)\n let z = i + 3; //0(n)\n \n }\n for (let j = 0; j < input; j++) {\n let p = j * 2; //0(n)\n let q = j * 2; //0(n)\n }\n let whoAmI = \"I don't know\"; //0(1)\n }", "title": "" }, { "docid": "289f32ae1925457d09c2168e3594c3a6", "score": "0.52137405", "text": "function solution(S, P, Q) {\n // write your code in JavaScript (Node.js 8.9.4)\n let initial = [0,0,0,0]\n let preSum = [];\n preSum.push([...initial]);\n\n for (let i=0; i<S.length; i++){\n if (S[i] === 'A'){\n initial[0] += 1;\n }else if (S[i] === 'C'){\n initial[1] += 1;\n }else if (S[i] === 'G'){\n initial[2] += 1;\n }else{\n initial[3] += 1;\n }\n preSum.push([...initial])\n }\n let res = [];\n // console.log(preSum);\n for (let i=0; i<P.length; i++){\n for (let j=0; j<4; j++){\n if (preSum[Q[i]+1][j] - preSum[P[i]][j] > 0){\n res.push(j+1);\n break;\n }\n }\n }\n return res;\n}", "title": "" }, { "docid": "a49471a3034e81bf3aaaa664f2fb53e4", "score": "0.52130866", "text": "function CalcFull(){\n\t//set the scores\n\tvar APCalcScoreAB = q_apCalcAbScore;\n\tvar APCalcScoreBC = q_apCalcBcScore;\n\tvar APChem = q_apChemScore;\n\tvar APEnvSci = q_apEnviroScore;\n\t\n\t//other variables\n\tvar start;\n\tvar natSci = 0;\n\t\n\t//THIS SECTION NEEDS TO BE FIXED WITH NEW TRANSFER SYSTEM\n\t//checkbox settings stuff\n\t/*\n\tvar math11 = document.getElementById(\"check9\").checked;\n\tvar math12 = document.getElementById(\"check10\").checked;\n\tvar math13 = document.getElementById(\"check11\").checked;\n\tvar math14 = document.getElementById(\"check12\").checked;\n\tvar amth106 = document.getElementById(\"check13\").checked;\n\t\n\tif (math11 == true && APCalcScoreBC < 3){\n\t\tAPCalcScoreBC = 3;\n\t}\n\tif (math12 == true){\n\t\tAPCalcScoreBC = 5;\n\t}\n\tif (math13 == true){\n\t\tAPCalcScoreBC = 6;\n\t}\n\tif (math14 == true){\n\t\tAPCalcScoreBC = 7;\n\t}\n\tif (amth106 == true){\n\t\tAPCalcScoreBC = 8;\n\t}\n\t*/\n\t//END SECTION\n\t\n\t//BC score of 3+ overides any AB score. CRE is below all them\n\tif(APCalcScoreBC == 8){\n\t\tstart = 6;\n\t} else if(APCalcScoreBC == 7){\n\t\tstart = 5;\n\t} else if(APCalcScoreBC == 6){\n\t\tstart = 4;\n\t} else if(APCalcScoreBC >= 3) {\t\tif(APCalcScoreBC > 3){\n\t\t\tstart = 3;\n\t\t} else if (APCalcScoreBC == 3) {\n\t\t\tstart = 2;\n\t\t}\n\t} else if (APCalcScoreAB >= 4) {\n\t\tstart = 2\n\t} else if (crePF == 1) {\n\t\tstart = 1;\n\t} else {\n\t\tstart = 0;\n\t}\n\t\n\tif(APChem > 3 || APEnvSci > 3){\n\t\tnatSci = 1;\n\t}\n\t\n\tif(natSci){\n\t\tvar Fall0 = math2[start];\n\t\tvar Winter0 = math2[start+1];\n\t\tvar Spring0 = math2[start+2];\n\t} else{\n\t\tvar Fall0 = math1[start];\n\t\tvar Winter0 = math1[start+1];\n\t\tvar Spring0 = math1[start+2];\n\t}\n\t\n\tFall[0] = Fall0;\n\tWinter[0] = Winter0;\n\tSpring[0] = Spring0;\n\t\n\taddCI();\n\tsuggest();\n\tbuild();\n}", "title": "" }, { "docid": "409abe2571afc33686d7fd68c980d2b4", "score": "0.5212253", "text": "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n}", "title": "" }, { "docid": "e7e9763b72ac32b673ea42dd5405e91d", "score": "0.5211125", "text": "function letterList(name1, name2, name3, name4, name5, name6, name7){\n\tlist=[];\n\tcounter1 = 0;\n\tcounter2 = 0;\n\tcounter3 = 0;\n\tcounter4 = 0;\n\tcounter5 = 0;\n\tcounter6 = 0;\n\tcounter7 = 0;\n\twhile (counter7 < name7.length){\n\t\twhile (counter6 < name6.length){\n\t\t\twhile (counter5 < name5.length){\n\t\t\t\twhile (counter4 < name4.length){\n\t\t\t\t\twhile (counter3 < name3.length){\n\t\t\t\t\t\twhile (counter2 < name2.length){\n\t\t\t\t\t\t\twhile (counter1 < name1.length){\n\t\t\t\t\t\t\t\t// console.log(name1[counter1]+name2[counter2]+name3[counter3]+name4[counter4]+name5[counter5]+name6[counter6]+name7[counter7]);\n\t\t\t\t\t\t\t\tlist.push(name1[counter1]+name2[counter2]+name3[counter3]+name4[counter4]+name5[counter5]+name6[counter6]+name7[counter7]);\n\t\t\t\t\t\t\t\tcounter1++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcounter2++;\n\t\t\t\t\t\t\tcounter1=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcounter3++;\n\t\t\t\t\t\tcounter2=0;\n\t\t\t\t\t\tcounter1=0;\n\t\t\t\t\t}\n\t\t\t\t\tcounter4++;\n\t\t\t\t\tcounter3=0;\n\t\t\t\t\tcounter2=0;\n\t\t\t\t\tcounter1=0;\n\t\t\t\t}\n\t\t\t\tcounter5++;\n\t\t\t\tcounter4=0;\n\t\t\t\tcounter3=0;\n\t\t\t\tcounter2=0;\n\t\t\t\tcounter1=0;\n\t\t\t}\n\t\t\tcounter6++;\n\t\t\tcounter5=0;\n\t\t\tcounter4=0;\n\t\t\tcounter3=0;\n\t\t\tcounter2=0;\n\t\t\tcounter1=0;\n\t\t}\n\t\tcounter7++;\n\t\tcounter6=0;\n\t\tcounter5=0;\n\t\tcounter4=0;\n\t\tcounter3=0;\n\t\tcounter2=0;\n\t\tcounter1=0;\n\t}\n}", "title": "" }, { "docid": "3945002a29bfea7f72d59bda48ddea08", "score": "0.5204422", "text": "function arithematic(){\n var a =10;\n document.write(\"Result: </br>\");\n document.write(\"The value of a is:\"+ a +\"</br>\");\n document.write(\"......................................</br></br></br>\");\n document.write(\"The value of ++a is:\"+ ++a +\"</br>\");\n document.write(\"Now the value of a is:\"+ a +\"</br></br></br>\");\n \n document.write(\"The value of a++ is:\"+ a++ +\"</br>\");\n document.write(\"Now the value of a is:\"+ a +\"</br></br></br>\");\n\n document.write(\"The value of --a is:\"+ --a +\"</br>\");\n document.write(\"Now the value of a is:\"+ a +\"</br></br></br>\");\n \n document.write(\"The value of a-- is:\"+a-- +\"</br>\");\n document.write(\"Now the value of a is:\"+ a +\"</br></br></br>\");\n\n\n}", "title": "" }, { "docid": "eb5b1e32e0dcf1ea354ed65b11f34563", "score": "0.519711", "text": "function n(A,e){0}", "title": "" }, { "docid": "4f020f3f00454e543f5f49a5b131f4f3", "score": "0.5194997", "text": "function main()\n\n{\n\nclrscr();\n\nint i, time_worked, over_time, overtime_pay=0;\n\nfor(i=1;i<=10;i++)\n\n{\n\nprintf(\"\\nenter the time employee worked in hr \");\n\nscanf(\"%d\",&time_worked);\n\nif(time_worked>40)\n\n{\n\nover_time=time_worked-40;\n\novertime_pay=overtime_pay+(12*over_time);\n\n}\n\n}\n\nprintf(\"\\nTotal Overtime Pay Of 10 Employees Is %d\",overtime_pay);\n\nreturn();\n\n\n/*10. A cashier has currency notes of denominations 10, 50 and\n100. If the amount to be withdrawn is input through the\nkeyboard in hundreds, find the total number of currency notes\nof each denomination the cashier will have to give to the\nwithdrawer.*/\n\n// Java program to accept an amount\n// and count number of notes\nimport java.util.*;\nimport java.lang.*;\n\npublic class GfG{\n\n\t// function to count and\n\t// print currency notes\n\tpublic static void countCurrency(int amount)\n\t{\n\t\tint[] notes = new int[]{ 2000, 500, 200, 100, 50, 20, 10, 5, 1 };\n\t\tint[] noteCounter = new int[9];\n\t\n\t\t// count notes using Greedy approach\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tif (amount >= notes[i]) {\n\t\t\t\tnoteCounter[i] = amount / notes[i];\n\t\t\t\tamount = amount - noteCounter[i] * notes[i];\n\t\t\t}\n\t\t}\n\t\n\t\t// Print notes\n\t\tSystem.out.println(\"Currency Count ->\");\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tif (noteCounter[i] != 0) {\n\t\t\t\tSystem.out.println(notes[i] + \" : \"\n\t\t\t\t\t+ noteCounter[i]);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1a1b91b1f6304542cd4806ffe35b3da4", "score": "0.51948124", "text": "function z() { return 0; }", "title": "" }, { "docid": "fc98d0f3cb24480eaa546ffb463fccc8", "score": "0.5188405", "text": "function J9a(){this.D=0;this.H=[];this.F=[];this.O=this.V=this.C=this.L=this.$=this.J=0;this.ea=[]}", "title": "" }, { "docid": "1f7857dfdd49a3806e4598b670fc8006", "score": "0.51824903", "text": "function main() {\n var testCases = nextInt();\n\n for (var testCase = 1; testCase <= testCases; ++testCase) {\n var D = nextInt();\n var N = nextInt();\n var horses = [];\n\n for (let i = 0; i < N; i++) {\n horses.push([nextInt(), nextInt()]);\n }\n\n // find slowest horse\n var slowestH = horses\n .map(value => (D - value[0]) / value[1])\n .sort((a, b) => b - a)[0];\n\n print(\"Case #\" + testCase + \": \" + D / slowestH);\n }\n}", "title": "" }, { "docid": "a346b541fdd49a3686c2b93fea6aba22", "score": "0.5178149", "text": "function main() {\n var s = readLine()\n const alphabets = {'a':1, 'b':2, 'c':3, 'd':4, 'e':5, 'f':6, 'g':7, 'h':8, 'i':9, 'j':10, 'k':11, 'l':12, 'm':13, 'n':14, 'o':15, 'p':16, 'q':17, 'r':18, 's':19, 't':20, 'u':21, 'v':22, 'w':23, 'x':24, 'y':25, 'z':26}\n let scores = new Set()\n let ctr = 1\n for (let i = 0; i < s.length; i++) {\n\t let score = alphabets[s.charAt(i)]\n\t if (i+1 !== s.length && s[i+1] === s[i]) {\n\t\tctr = ctr + 1\n\t }\n\t else\n\t\tctr = 1\n\t scores.add(score*ctr)\n }\n var n = parseInt(readLine())\n for(var a0 = 0; a0 < n; a0++){\n var x = parseInt(readLine())\n // your code goes here\n if( scores.has(x) === true)\n \tconsole.log('Yes')\n else\n \tconsole.log('No')\n }\n}", "title": "" }, { "docid": "aa831d2ed11063d514e3fcd3232a8007", "score": "0.5173997", "text": "function evalMain(hand) {\n let ones = hand.filter(x => x === 0);\n let twos = hand.filter(x => x === 1);\n let threes = hand.filter(x => x === 2);\n let fours = hand.filter(x => x === 3);\n let fives = hand.filter(x => x === 4);\n let sixes = hand.filter(x => x === 5);\n//check for pairs\n if (hand[0] === hand[1] && hand[2] === hand[3] && hand[4] === hand[5]) {\n currentPoints = currentPoints + 1500;\n return;\n }\n//check for triplets\n if (hand[0] === hand[1] && hand[1] === hand[2] && hand[3] === hand[4] && hand[4] === hand[5]) {\n currentPoints = currentPoints + 2500;\n return;\n }\n//check hand for points\n if (ones.length === 3) {\n currentPoints = currentPoints + 300;\n } else {\n currentPoints = currentPoints + (ones.length * 100);\n }\n if (twos.length === 3) {\n currentPoints = currentPoints + 200;\n }\n if (threes.length === 3) {\n currentPoints = currentPoints + 300;\n }\n if (fours.length === 3) {\n currentPoints = currentPoints + 400;\n }\n if (fives.length === 3) {\n currentPoints = currentPoints + 500;\n } else {\n currentPoints = currentPoints + (fives.length * 50);\n }\n if (sixes.length === 3) {\n currentPoints = currentPoints + 600;\n }\n}", "title": "" }, { "docid": "3c5bf4979a90a63328acbe628faa37f3", "score": "0.51711005", "text": "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n return sol(A)\n}", "title": "" }, { "docid": "e4254353370be33ff169f77a85e8f818", "score": "0.51601315", "text": "function answer(state, array){ \r\n\tvar indArr=0;\r\n\tif(state === \"Good\"){\t\t\r\n\t\t//array.sort(function(a, b){return a - b});\r\n\t\t//array.reverse();\r\n\t\tindArr=majorNum(array);\r\n\t\tdocument.getElementById(\"demo1\").innerHTML = indArr\r\n\t\treturn \"Good\"\r\n\t}else{\r\n\t\tdocument.getElementById(\"demo1\").innerHTML = \"No es posible realizar una combinacion\";\r\n\t\treturn \"Bad\"\r\n\t}\r\n}", "title": "" }, { "docid": "457f966d372ee2c5e8ae7e797d2fb3e5", "score": "0.51577616", "text": "function Zy(a,b){this.A=[];this.ob=a;this.$=b||null;this.j=this.a=!1;this.g=void 0;this.fa=this.ta=this.C=!1;this.D=0;this.b=null;this.o=0}", "title": "" }, { "docid": "ce761e10cf8774327b231fbef461a92c", "score": "0.51510173", "text": "function a(t,r,e,n){var i=h(t),a=h(r),o=h(n),s=d(n[0],v(i,o)),c=d(n[0],v(a,o));return u(s,c,e[0])}", "title": "" }, { "docid": "b647e8e361505860113930c69467cbc3", "score": "0.5150079", "text": "function grade1(){\n\tif(q1a.checked == true){\n\t\taddLogical(0);\n\t\taddAbstract(0);\n\t\taddInductive(10);\n\t}\n\telse if(q1b.checked == true){\n\t\taddLogical(5);\n\t\taddAbstract(5);\n\t\taddInductive(10);\n\t}\n\telse if(q1c.checked == true){\n\t\taddLogical(5);\n\t\taddAbstract(5);\n\t\taddInductive(5);\n\t}\n\telse if(q1d.checked == true){\n\t\taddLogical(5);\n\t\taddAbstract(5);\n\t\taddInductive(0);\n\t}\n\telse if(q1e.checked == true){\n\t\taddLogical(0);\n\t\taddAbstract(10);\n\t\taddInductive(0);\n\t}\n}", "title": "" }, { "docid": "a2480c1d994632b9bdd1399931f3a182", "score": "0.5146277", "text": "function Bizzy () {}", "title": "" }, { "docid": "d720d09407bd528f7f38affd7979f96a", "score": "0.5136065", "text": "function Z() { return \"Z\"; }", "title": "" }, { "docid": "1177913dc752baf490e703a07fe35794", "score": "0.51325285", "text": "function _t(t) {\n var N,\n L,\n A,\n S,\n e,\n c = Math.floor,\n _ = new Array(64),\n F = new Array(64),\n P = new Array(64),\n k = new Array(64),\n y = new Array(65535),\n v = new Array(65535),\n Z = new Array(64),\n w = new Array(64),\n I = [],\n C = 0,\n B = 7,\n j = new Array(64),\n E = new Array(64),\n M = new Array(64),\n n = new Array(256),\n O = new Array(2048),\n b = [\n 0,\n 1,\n 5,\n 6,\n 14,\n 15,\n 27,\n 28,\n 2,\n 4,\n 7,\n 13,\n 16,\n 26,\n 29,\n 42,\n 3,\n 8,\n 12,\n 17,\n 25,\n 30,\n 41,\n 43,\n 9,\n 11,\n 18,\n 24,\n 31,\n 40,\n 44,\n 53,\n 10,\n 19,\n 23,\n 32,\n 39,\n 45,\n 52,\n 54,\n 20,\n 22,\n 33,\n 38,\n 46,\n 51,\n 55,\n 60,\n 21,\n 34,\n 37,\n 47,\n 50,\n 56,\n 59,\n 61,\n 35,\n 36,\n 48,\n 49,\n 57,\n 58,\n 62,\n 63\n ],\n q = [0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0],\n T = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],\n R = [0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125],\n D = [\n 1,\n 2,\n 3,\n 0,\n 4,\n 17,\n 5,\n 18,\n 33,\n 49,\n 65,\n 6,\n 19,\n 81,\n 97,\n 7,\n 34,\n 113,\n 20,\n 50,\n 129,\n 145,\n 161,\n 8,\n 35,\n 66,\n 177,\n 193,\n 21,\n 82,\n 209,\n 240,\n 36,\n 51,\n 98,\n 114,\n 130,\n 9,\n 10,\n 22,\n 23,\n 24,\n 25,\n 26,\n 37,\n 38,\n 39,\n 40,\n 41,\n 42,\n 52,\n 53,\n 54,\n 55,\n 56,\n 57,\n 58,\n 67,\n 68,\n 69,\n 70,\n 71,\n 72,\n 73,\n 74,\n 83,\n 84,\n 85,\n 86,\n 87,\n 88,\n 89,\n 90,\n 99,\n 100,\n 101,\n 102,\n 103,\n 104,\n 105,\n 106,\n 115,\n 116,\n 117,\n 118,\n 119,\n 120,\n 121,\n 122,\n 131,\n 132,\n 133,\n 134,\n 135,\n 136,\n 137,\n 138,\n 146,\n 147,\n 148,\n 149,\n 150,\n 151,\n 152,\n 153,\n 154,\n 162,\n 163,\n 164,\n 165,\n 166,\n 167,\n 168,\n 169,\n 170,\n 178,\n 179,\n 180,\n 181,\n 182,\n 183,\n 184,\n 185,\n 186,\n 194,\n 195,\n 196,\n 197,\n 198,\n 199,\n 200,\n 201,\n 202,\n 210,\n 211,\n 212,\n 213,\n 214,\n 215,\n 216,\n 217,\n 218,\n 225,\n 226,\n 227,\n 228,\n 229,\n 230,\n 231,\n 232,\n 233,\n 234,\n 241,\n 242,\n 243,\n 244,\n 245,\n 246,\n 247,\n 248,\n 249,\n 250\n ],\n U = [0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0],\n z = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],\n H = [0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 119],\n W = [\n 0,\n 1,\n 2,\n 3,\n 17,\n 4,\n 5,\n 33,\n 49,\n 6,\n 18,\n 65,\n 81,\n 7,\n 97,\n 113,\n 19,\n 34,\n 50,\n 129,\n 8,\n 20,\n 66,\n 145,\n 161,\n 177,\n 193,\n 9,\n 35,\n 51,\n 82,\n 240,\n 21,\n 98,\n 114,\n 209,\n 10,\n 22,\n 36,\n 52,\n 225,\n 37,\n 241,\n 23,\n 24,\n 25,\n 26,\n 38,\n 39,\n 40,\n 41,\n 42,\n 53,\n 54,\n 55,\n 56,\n 57,\n 58,\n 67,\n 68,\n 69,\n 70,\n 71,\n 72,\n 73,\n 74,\n 83,\n 84,\n 85,\n 86,\n 87,\n 88,\n 89,\n 90,\n 99,\n 100,\n 101,\n 102,\n 103,\n 104,\n 105,\n 106,\n 115,\n 116,\n 117,\n 118,\n 119,\n 120,\n 121,\n 122,\n 130,\n 131,\n 132,\n 133,\n 134,\n 135,\n 136,\n 137,\n 138,\n 146,\n 147,\n 148,\n 149,\n 150,\n 151,\n 152,\n 153,\n 154,\n 162,\n 163,\n 164,\n 165,\n 166,\n 167,\n 168,\n 169,\n 170,\n 178,\n 179,\n 180,\n 181,\n 182,\n 183,\n 184,\n 185,\n 186,\n 194,\n 195,\n 196,\n 197,\n 198,\n 199,\n 200,\n 201,\n 202,\n 210,\n 211,\n 212,\n 213,\n 214,\n 215,\n 216,\n 217,\n 218,\n 226,\n 227,\n 228,\n 229,\n 230,\n 231,\n 232,\n 233,\n 234,\n 242,\n 243,\n 244,\n 245,\n 246,\n 247,\n 248,\n 249,\n 250\n ];\n function r(t, e) {\n for (var n = 0, r = 0, i = new Array(), o = 1; o <= 16; o++) {\n for (var a = 1; a <= t[o]; a++) (i[e[r]] = []), (i[e[r]][0] = n), (i[e[r]][1] = o), r++, n++;\n n *= 2;\n }\n return i;\n }\n function V(t) {\n for (var e = t[0], n = t[1] - 1; 0 <= n; )\n e & (1 << n) && (C |= 1 << B), n--, --B < 0 && (255 == C ? (G(255), G(0)) : G(C), (B = 7), (C = 0));\n }\n function G(t) {\n I.push(t);\n }\n function Y(t) {\n G((t >> 8) & 255), G(255 & t);\n }\n function J(t, e, n, r, i) {\n for (\n var o,\n a = i[0],\n s = i[240],\n l = (function (t, e) {\n var n,\n r,\n i,\n o,\n a,\n s,\n l,\n h,\n u,\n c,\n f = 0;\n for (u = 0; u < 8; ++u) {\n (n = t[f]), (r = t[f + 1]), (i = t[f + 2]), (o = t[f + 3]), (a = t[f + 4]), (s = t[f + 5]), (l = t[f + 6]);\n var p = n + (h = t[f + 7]),\n d = n - h,\n g = r + l,\n m = r - l,\n y = i + s,\n v = i - s,\n w = o + a,\n b = o - a,\n x = p + w,\n N = p - w,\n L = g + y,\n A = g - y;\n (t[f] = x + L), (t[f + 4] = x - L);\n var S = 0.707106781 * (A + N);\n (t[f + 2] = N + S), (t[f + 6] = N - S);\n var _ = 0.382683433 * ((x = b + v) - (A = m + d)),\n F = 0.5411961 * x + _,\n P = 1.306562965 * A + _,\n k = 0.707106781 * (L = v + m),\n I = d + k,\n C = d - k;\n (t[f + 5] = C + F), (t[f + 3] = C - F), (t[f + 1] = I + P), (t[f + 7] = I - P), (f += 8);\n }\n for (u = f = 0; u < 8; ++u) {\n (n = t[f]), (r = t[f + 8]), (i = t[f + 16]), (o = t[f + 24]), (a = t[f + 32]), (s = t[f + 40]), (l = t[f + 48]);\n var B = n + (h = t[f + 56]),\n j = n - h,\n E = r + l,\n M = r - l,\n O = i + s,\n q = i - s,\n T = o + a,\n R = o - a,\n D = B + T,\n U = B - T,\n z = E + O,\n H = E - O;\n (t[f] = D + z), (t[f + 32] = D - z);\n var W = 0.707106781 * (H + U);\n (t[f + 16] = U + W), (t[f + 48] = U - W);\n var V = 0.382683433 * ((D = R + q) - (H = M + j)),\n G = 0.5411961 * D + V,\n Y = 1.306562965 * H + V,\n J = 0.707106781 * (z = q + M),\n X = j + J,\n K = j - J;\n (t[f + 40] = K + G), (t[f + 24] = K - G), (t[f + 8] = X + Y), (t[f + 56] = X - Y), f++;\n }\n for (u = 0; u < 64; ++u) (c = t[u] * e[u]), (Z[u] = 0 < c ? (c + 0.5) | 0 : (c - 0.5) | 0);\n return Z;\n })(t, e),\n h = 0;\n h < 64;\n ++h\n )\n w[b[h]] = l[h];\n var u = w[0] - n;\n (n = w[0]), 0 == u ? V(r[0]) : (V(r[v[(o = 32767 + u)]]), V(y[o]));\n for (var c = 63; 0 < c && 0 == w[c]; c--);\n if (0 == c) return V(a), n;\n for (var f, p = 1; p <= c; ) {\n for (var d = p; 0 == w[p] && p <= c; ++p);\n var g = p - d;\n if (16 <= g) {\n f = g >> 4;\n for (var m = 1; m <= f; ++m) V(s);\n g &= 15;\n }\n (o = 32767 + w[p]), V(i[(g << 4) + v[o]]), V(y[o]), p++;\n }\n return 63 != c && V(a), n;\n }\n function X(t) {\n if ((t <= 0 && (t = 1), 100 < t && (t = 100), e != t)) {\n (function (t) {\n for (\n var e = [\n 16,\n 11,\n 10,\n 16,\n 24,\n 40,\n 51,\n 61,\n 12,\n 12,\n 14,\n 19,\n 26,\n 58,\n 60,\n 55,\n 14,\n 13,\n 16,\n 24,\n 40,\n 57,\n 69,\n 56,\n 14,\n 17,\n 22,\n 29,\n 51,\n 87,\n 80,\n 62,\n 18,\n 22,\n 37,\n 56,\n 68,\n 109,\n 103,\n 77,\n 24,\n 35,\n 55,\n 64,\n 81,\n 104,\n 113,\n 92,\n 49,\n 64,\n 78,\n 87,\n 103,\n 121,\n 120,\n 101,\n 72,\n 92,\n 95,\n 98,\n 112,\n 100,\n 103,\n 99\n ],\n n = 0;\n n < 64;\n n++\n ) {\n var r = c((e[n] * t + 50) / 100);\n r < 1 ? (r = 1) : 255 < r && (r = 255), (_[b[n]] = r);\n }\n for (\n var i = [\n 17,\n 18,\n 24,\n 47,\n 99,\n 99,\n 99,\n 99,\n 18,\n 21,\n 26,\n 66,\n 99,\n 99,\n 99,\n 99,\n 24,\n 26,\n 56,\n 99,\n 99,\n 99,\n 99,\n 99,\n 47,\n 66,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99,\n 99\n ],\n o = 0;\n o < 64;\n o++\n ) {\n var a = c((i[o] * t + 50) / 100);\n a < 1 ? (a = 1) : 255 < a && (a = 255), (F[b[o]] = a);\n }\n for (\n var s = [1, 1.387039845, 1.306562965, 1.175875602, 1, 0.785694958, 0.5411961, 0.275899379], l = 0, h = 0;\n h < 8;\n h++\n )\n for (var u = 0; u < 8; u++) (P[l] = 1 / (_[b[l]] * s[h] * s[u] * 8)), (k[l] = 1 / (F[b[l]] * s[h] * s[u] * 8)), l++;\n })(t < 50 ? Math.floor(5e3 / t) : Math.floor(200 - 2 * t)),\n (e = t);\n }\n }\n (this.encode = function (t, e) {\n var n, r;\n new Date().getTime();\n e && X(e),\n (I = new Array()),\n (C = 0),\n (B = 7),\n Y(65496),\n Y(65504),\n Y(16),\n G(74),\n G(70),\n G(73),\n G(70),\n G(0),\n G(1),\n G(1),\n G(0),\n Y(1),\n Y(1),\n G(0),\n G(0),\n (function () {\n Y(65499), Y(132), G(0);\n for (var t = 0; t < 64; t++) G(_[t]);\n G(1);\n for (var e = 0; e < 64; e++) G(F[e]);\n })(),\n (n = t.width),\n (r = t.height),\n Y(65472),\n Y(17),\n G(8),\n Y(r),\n Y(n),\n G(3),\n G(1),\n G(17),\n G(0),\n G(2),\n G(17),\n G(1),\n G(3),\n G(17),\n G(1),\n (function () {\n Y(65476), Y(418), G(0);\n for (var t = 0; t < 16; t++) G(q[t + 1]);\n for (var e = 0; e <= 11; e++) G(T[e]);\n G(16);\n for (var n = 0; n < 16; n++) G(R[n + 1]);\n for (var r = 0; r <= 161; r++) G(D[r]);\n G(1);\n for (var i = 0; i < 16; i++) G(U[i + 1]);\n for (var o = 0; o <= 11; o++) G(z[o]);\n G(17);\n for (var a = 0; a < 16; a++) G(H[a + 1]);\n for (var s = 0; s <= 161; s++) G(W[s]);\n })(),\n Y(65498),\n Y(12),\n G(3),\n G(1),\n G(0),\n G(2),\n G(17),\n G(3),\n G(17),\n G(0),\n G(63),\n G(0);\n var i = 0,\n o = 0,\n a = 0;\n (C = 0), (B = 7), (this.encode.displayName = '_encode_');\n for (var s, l, h, u, c, f, p, d, g, m = t.data, y = t.width, v = t.height, w = 4 * y, b = 0; b < v; ) {\n for (s = 0; s < w; ) {\n for (f = c = w * b + s, p = -1, g = d = 0; g < 64; g++)\n (f = c + (d = g >> 3) * w + (p = 4 * (7 & g))),\n v <= b + d && (f -= w * (b + 1 + d - v)),\n w <= s + p && (f -= s + p - w + 4),\n (l = m[f++]),\n (h = m[f++]),\n (u = m[f++]),\n (j[g] = ((O[l] + O[(h + 256) >> 0] + O[(u + 512) >> 0]) >> 16) - 128),\n (E[g] = ((O[(l + 768) >> 0] + O[(h + 1024) >> 0] + O[(u + 1280) >> 0]) >> 16) - 128),\n (M[g] = ((O[(l + 1280) >> 0] + O[(h + 1536) >> 0] + O[(u + 1792) >> 0]) >> 16) - 128);\n (i = J(j, P, i, N, A)), (o = J(E, k, o, L, S)), (a = J(M, k, a, L, S)), (s += 32);\n }\n b += 8;\n }\n if (0 <= B) {\n var x = [];\n (x[1] = B + 1), (x[0] = (1 << (B + 1)) - 1), V(x);\n }\n return Y(65497), new Uint8Array(I);\n }),\n (function () {\n new Date().getTime();\n t || (t = 50),\n (function () {\n for (var t = String.fromCharCode, e = 0; e < 256; e++) n[e] = t(e);\n })(),\n (N = r(q, T)),\n (L = r(U, z)),\n (A = r(R, D)),\n (S = r(H, W)),\n (function () {\n for (var t = 1, e = 2, n = 1; n <= 15; n++) {\n for (var r = t; r < e; r++)\n (v[32767 + r] = n), (y[32767 + r] = []), (y[32767 + r][1] = n), (y[32767 + r][0] = r);\n for (var i = -(e - 1); i <= -t; i++)\n (v[32767 + i] = n), (y[32767 + i] = []), (y[32767 + i][1] = n), (y[32767 + i][0] = e - 1 + i);\n (t <<= 1), (e <<= 1);\n }\n })(),\n (function () {\n for (var t = 0; t < 256; t++)\n (O[t] = 19595 * t),\n (O[(t + 256) >> 0] = 38470 * t),\n (O[(t + 512) >> 0] = 7471 * t + 32768),\n (O[(t + 768) >> 0] = -11059 * t),\n (O[(t + 1024) >> 0] = -21709 * t),\n (O[(t + 1280) >> 0] = 32768 * t + 8421375),\n (O[(t + 1536) >> 0] = -27439 * t),\n (O[(t + 1792) >> 0] = -5329 * t);\n })(),\n X(t),\n new Date().getTime();\n })();\n }", "title": "" }, { "docid": "e1500890729d4e3c95bffcb4b1b8f7dd", "score": "0.5124473", "text": "function Wt(){ts=Xa.length=Qa.length=0,Ja={},Ka={},Za=Ga=!1}", "title": "" }, { "docid": "5e6793575e2ab75bbe24805a5360979d", "score": "0.5121544", "text": "function kata6() {\n\n}", "title": "" }, { "docid": "5d1317341c8122d1a6e3c41a4a729be3", "score": "0.51153237", "text": "function x_a(){this.F=0;this.J=[];this.H=[];this.S=this.R=this.D=this.O=this.W=this.N=0;this.aa=[]}", "title": "" }, { "docid": "a02f98577a880ce62aaf23c4c34e1a39", "score": "0.5105894", "text": "function runProgram(input){\n let input_arr = input.trim().split(\"\\n\")\n \n for(let i = 1; i < input_arr.length; i++){\n let [A, B, C, K] = input_arr[i].trim().split(\" \").map(Number)\n\n let low = 0\n let high = K\n let X_value = -1\n while(low <= high){\n let mid = Math.floor(low + ((high - low) / 2))\n if(possibility_check(A, B, C, K, mid)){\n high = mid - 1\n X_value = mid\n }\n else{\n low = mid + 1\n }\n }\n if(X_value == 0){\n console.log(-1)\n }\n else{\n console.log(X_value)\n }\n\n function possibility_check(A, B, C, K, X){\n let sum = (A * (X**2)) + (B * X) + C\n if(sum >= K){\n return true\n }\n else{\n return false\n }\n }\n }\n}", "title": "" }, { "docid": "ee66746d26143cc2ddcc11761b23835b", "score": "0.5099675", "text": "function\nauxmain_9251_(a3x1)\n{\nlet xtmp97;\nlet xtmp110;\nlet xtmp111;\n;\nxtmp110 =\nfunction()\n{\nlet xtmp98;\nlet xtmp99;\nlet xtmp100;\nlet xtmp101;\nlet xtmp102;\nlet xtmp103;\nlet xtmp106;\nlet xtmp107;\nlet xtmp108;\nxtmp99 = XATS2JS_llazy_eval(a3x1);\n{\nxtmp100 = 0;\ndo {\ndo {\nif(0!==xtmp99[0]) break;\nxtmp100 = 1;\n} while(false);\nif(xtmp100 > 0 ) break;\ndo {\nif(1!==xtmp99[0]) break;\n//L1PCKany();\n//L1PCKany();\nxtmp100 = 2;\n} while(false);\nif(xtmp100 > 0 ) break;\n} while(false);\n} // case-patck0\nswitch\n(xtmp100) {\ncase 1:\n{\nxtmp98 = [0];\n}\n;\nbreak;\ncase 2:\nxtmp101 = xtmp99[1];\nxtmp102 = xtmp99[2];\n// /home/hwxi/Research/ATS-Xanadu/prelude/DATS/stream_vt.dats: 9427(line=766, offs=3) -- 9459(line=767, offs=24)\n{\n{\n// ./../../xanadu/prelude/DATS/CATS/JS/prelude.dats: 6266(line=378, offs=1) -- 6304(line=378, offs=39)\nfunction\nmap0$fopr_2343_(a5x1)\n{\nlet xtmp105;\n;\n{\nxtmp105 = a1x2(a5x1);\n}\n;\nreturn xtmp105;\n} // function // map0$fopr(24)\n;\nxtmp103 = map0$fopr_2343_(xtmp101);\n}\n;\n;\n} // val(H0Pvar(y0(95)))\n;\n{\n{\nxtmp107 = auxmain_9251_(xtmp102);\n}\n;\nxtmp106 = [1, xtmp103, xtmp107];\n}\n;\nxtmp98 = xtmp106;\nbreak;\ndefault: XATS2JS_matcherr0();\n} // case-switch\n;\nreturn xtmp98;\n} // lam-function\n;\nxtmp111 =\nfunction()\n{\nlet xtmp98;\nlet xtmp99;\nlet xtmp100;\nlet xtmp101;\nlet xtmp102;\nlet xtmp103;\nlet xtmp106;\nlet xtmp107;\nlet xtmp108;\n{\n// /home/hwxi/Research/ATS-Xanadu/prelude/DATS/stream_vt.dats: 1837(line=143, offs=1) -- 1892(line=145, offs=41)\n// { // val-binding\n// /home/hwxi/Research/ATS-Xanadu/prelude/DATS/stream_vt.dats: 1784(line=139, offs=1) -- 1833(line=141, offs=31)\nfunction\nstream_vt_free_2236_(a6x1)\n{\n;\nreturn XATS2JS_llazy_free(a6x1);\n} // function // stream_vt_free(28)\n;\n// } // val-binding\nconst // implval/fun\ng_free_1550_ = stream_vt_free_2236_\n;\nxtmp108 = g_free_1550_(a3x1);\n}\n;\n} // lam-function\n;\nxtmp97 = XATS2JS_new_llazy(xtmp110,xtmp111);\nreturn xtmp97;\n}", "title": "" }, { "docid": "63e0474aa14b54e1f2783d06b8788a4f", "score": "0.5097587", "text": "function platzom(str){\n let translation = str;\n if(str.toLowerCase().endsWith ( `ar`)){\n translation = str.slice(0, -2)\n }\n/*si la palabra inicia con z se le añaden los caracteres \"pe\" al final de la palabra */\n\nif(str.toLowerCase().startsWith(`z`)){\n translation += `pe`\n}\n\n\n\n\n\n/*si la palabra traducida tiene 10 o mas letras se debe partir a la mitad y unir con un guion */\n\n/*var length = str.length;\nif (length >=10){\n translation = str.slice(0, Math.round(length/2))+ `-` + str.slice(Math.round(length/2));\n \n}\nreturn translation;\n}*/\nlet length = translation.length;\nif(length >= 10){\n const fHalf = translation.slice(0, Math.round(length/2));\n const sHalf = translation.slice(Math.round(length/2));\n translation = `$(fHalf)-$(sHalf)`;\n}\n\n/*si la palabra original es un palindromo, ninguna de las anteriores regglas funciona y se devuelve la palabra\nintercalando entre minusculas y mayusculas */\n\nconst reverse = (str)=> str.split('').reverse.join('');\nfunction minMay(str){\n const l = str.length;\n let translation = \"\";\n let capitalize = true;\n for(let i = 0; i < length; i++){\n const char = str.charAt(i);\n translation += capitalize ? char.toUpperCase() : char.toLowerCase();\n }\n}\n\nif(str = reverse(str)){\n return minMay(str);\n}\n\n\nreturn translation;\n}", "title": "" }, { "docid": "0865cd5d93155586c03123ed420100c6", "score": "0.5096149", "text": "function Qa(e,t,n,a){var r={s:[\"thodde secondanim\",\"thodde second\"],ss:[e+\" secondanim\",e+\" second\"],m:[\"eka mintan\",\"ek minute\"],mm:[e+\" mintanim\",e+\" mintam\"],h:[\"eka voran\",\"ek vor\"],hh:[e+\" voranim\",e+\" voram\"],d:[\"eka disan\",\"ek dis\"],dd:[e+\" disanim\",e+\" dis\"],M:[\"eka mhoinean\",\"ek mhoino\"],MM:[e+\" mhoineanim\",e+\" mhoine\"],y:[\"eka vorsan\",\"ek voros\"],yy:[e+\" vorsanim\",e+\" vorsam\"]};return t?r[n][0]:r[n][1]}", "title": "" }, { "docid": "9c64320408432ae232951e45a187057e", "score": "0.5094363", "text": "function z(c, a) { for (var e = a; c > 1; c--)\n e += a; return e; }", "title": "" }, { "docid": "6683c09d45bb4af8bd6f9eb3c2677a28", "score": "0.5092429", "text": "function evaluate(b){\r\n // Checking for Rows for X or O victory.\r\n for (var row = 0; row<3; row++){\r\n if (b[row][0]===b[row][1] &&\r\n b[row][1]===b[row][2])\r\n {\r\n if (b[row][0]===com){\r\n return +10;\r\n }\r\n else if (b[row][0]===p1){\r\n return -10;\r\n }\r\n }\r\n }\r\n \r\n // Checking for Columns for X or O victory.\r\n for (var col = 0; col<3; col++){\r\n if (b[0][col]===b[1][col] &&\r\n b[1][col]===b[2][col]){\r\n if (b[0][col]===com){\r\n return +10;\r\n }\r\n else if (b[0][col]===p1){\r\n return -10;\r\n }\r\n }\r\n }\r\n \r\n // Checking for Diagonals for X or O victory.\r\n if (b[0][0]===b[1][1] && b[1][1]===b[2][2]){\r\n if (b[0][0]===com){\r\n return +10;\r\n }\r\n else if (b[0][0]==p1){\r\n return -10;\r\n }\r\n }\r\n \r\n if (b[0][2]===b[1][1] && b[1][1]===b[2][0]){\r\n if (b[0][2]===com){\r\n return +10;\r\n }\r\n else if (b[0][2]===p1){\r\n return -10;\r\n }\r\n }\r\n \r\n // Else if none of them have won then return 0\r\n return 0;\r\n}", "title": "" }, { "docid": "6bce6430a48755b65d5f4d668e652b91", "score": "0.50818586", "text": "function\nauxmain_9265_(a3x1)\n{\nlet xtmp97;\nlet xtmp110;\nlet xtmp111;\n;\nxtmp110 =\nfunction()\n{\nlet xtmp98;\nlet xtmp99;\nlet xtmp100;\nlet xtmp101;\nlet xtmp102;\nlet xtmp103;\nlet xtmp106;\nlet xtmp107;\nlet xtmp108;\nxtmp99 = XATS2JS_llazy_eval(a3x1);\n{\nxtmp100 = 0;\ndo {\ndo {\nif(0!==xtmp99[0]) break;\nxtmp100 = 1;\n} while(false);\nif(xtmp100 > 0 ) break;\ndo {\nif(1!==xtmp99[0]) break;\n//L1PCKany();\n//L1PCKany();\nxtmp100 = 2;\n} while(false);\nif(xtmp100 > 0 ) break;\n} while(false);\n} // case-patck0\nswitch\n(xtmp100) {\ncase 1:\n{\nxtmp98 = [0];\n}\n;\nbreak;\ncase 2:\nxtmp101 = xtmp99[1];\nxtmp102 = xtmp99[2];\n// /home/hwxi/Research/ATS-Xanadu/prelude/DATS/stream_vt.dats: 9441(line=770, offs=3) -- 9473(line=771, offs=24)\n{\n{\n// ./../../xatsopt/prelude/DATS/CATS/JS/prelude.dats: 6266(line=378, offs=1) -- 6304(line=378, offs=39)\nfunction\nmap0$fopr_2343_(a5x1)\n{\nlet xtmp105;\n;\n{\nxtmp105 = a1x2(a5x1);\n}\n;\nreturn xtmp105;\n} // function // map0$fopr(24)\n;\nxtmp103 = map0$fopr_2343_(xtmp101);\n}\n;\n;\n} // val(H0Pvar(y0(95)))\n;\n{\n{\nxtmp107 = auxmain_9265_(xtmp102);\n}\n;\nxtmp106 = [1, xtmp103, xtmp107];\n}\n;\nxtmp98 = xtmp106;\nbreak;\ndefault: XATS2JS_matcherr0();\n} // case-switch\n;\nreturn xtmp98;\n} // lam-function\n;\nxtmp111 =\nfunction()\n{\nlet xtmp98;\nlet xtmp99;\nlet xtmp100;\nlet xtmp101;\nlet xtmp102;\nlet xtmp103;\nlet xtmp106;\nlet xtmp107;\nlet xtmp108;\n{\n// /home/hwxi/Research/ATS-Xanadu/prelude/DATS/stream_vt.dats: 1837(line=143, offs=1) -- 1892(line=145, offs=41)\n// { // val-binding\n// /home/hwxi/Research/ATS-Xanadu/prelude/DATS/stream_vt.dats: 1784(line=139, offs=1) -- 1833(line=141, offs=31)\nfunction\nstream_vt_free_2236_(a6x1)\n{\n;\nreturn XATS2JS_llazy_free(a6x1);\n} // function // stream_vt_free(28)\n;\n// } // val-binding\nconst // implval/fun\ng_free_1550_ = stream_vt_free_2236_\n;\nxtmp108 = g_free_1550_(a3x1);\n}\n;\n} // lam-function\n;\nxtmp97 = XATS2JS_new_llazy(xtmp110,xtmp111);\nreturn xtmp97;\n}", "title": "" }, { "docid": "79e321abae3ebd2d1ae350fd858142d6", "score": "0.50811756", "text": "function machineAI () {\n\n // variable declarations\n var randomRoll = 0;\n var i;\n var allTheSqs = [\"#1\", \"#2\", \"#3\", \"#4\", \"#5\", \"#6\", \"#7\", \"#8\", \"#9\"];\n // vars for first round of loops to determine initial options\n var options = [];\n var sqId = \"\";\n var numAppearances = 0;\n // For second round of loops to narrow down to THE best or best options\n var grabbedArr;\n var highestNumAppearances = 0;\n var bestOptions = [];\n\n if (compsWinningArr.length === 0) {\n // The array is empty; no win combos available to comp\n // Set it equal to p1WinningCombos. It will then just compete with player for the remaining 'best' options\n compsWinningArr = p1WinningCombos;\n if (p1WinningCombos.length === 0) {\n // No one can win, just find an available square\n for (i = 0; i < allTheSqs.length; i++) {\n if (usedSquares.indexOf(allTheSqs[i]) < 0) { // sq is still available\n return allTheSqs[i];\n }\n }\n }\n }\n\n // Concat the array of arrays -> winning combos for comp\n var currentComps = compsWinningArr.reduce(function(a, b) {\n return a.concat(b);\n });\n\n // Create an array holding each individual square id\n var onlyOnce = [];\n for (i = 0; i < currentComps.length; i++) {\n if (onlyOnce.indexOf(currentComps[i]) < 0) {\n onlyOnce.push(currentComps[i]);\n }\n }\n\n // First round of loops to determine the highest num appearances among sqIds\n for(i = 0; i < onlyOnce.length; i++) {\n sqId = onlyOnce[i];\n for (var a = 0; a < currentComps.length; a++) {\n if (sqId === currentComps[a]) {\n numAppearances += 1;\n }\n }\n if (numAppearances > 1) {\n options.push([sqId, numAppearances]);\n }\n numAppearances = 0;\n }\n // However, if there are no options after first loop round\n // That means each remaining option only has one appearance among win combos\n if (options.length === 0) {\n for (i = 0; i < onlyOnce.length; i++) {\n options.push([onlyOnce[i], 1]);\n }\n }\n\n // Second round of loops to narrow down to best options that appear the most\n for (i = 0; i < options.length; i++) {\n grabbedArr = options[i];\n if (grabbedArr[1] > highestNumAppearances) {\n // Find the number with most appearances; reset var each time if higher\n highestNumAppearances = grabbedArr[1];\n }\n }\n\n // Only the square Ids that appear the most frequently are pushed to bestOptions arr\n for (i = 0; i < options.length; i++) {\n grabbedArr = options[i];\n if (grabbedArr[1] === highestNumAppearances) {\n bestOptions.push(grabbedArr);\n }\n }\n\n if (bestOptions.length > 1) {\n // Then there are multiple 'best' options to go through, with equally high num appearances\n var bestOfBest = \"\";\n var reduceFilterBest = bestOptions.reduce(function(a,b) {\n return a.concat(b); }).filter(function(val){\n return isNaN(val);\n });\n\n var noLength3 = compsWinningArr.filter(function(val) {\n if (val.length < 3) { return val; }\n });\n\n if (noLength3.length === 0) {\n // Then comp didn't have first turn and this is the 2nd overall turn\n randomRoll = Math.floor(Math.random() * 4);\n return reduceFilterBest[randomRoll]; // Just return one of the options\n // This ends the function if this statement runs true\n }\n\n // Loop through to see which arrays have items that are both present in best\n for(i = 0; i < noLength3.length; i++) {\n grabbedArr = noLength3[i];\n var check1 = reduceFilterBest.indexOf(grabbedArr[0]);\n var check2 = reduceFilterBest.indexOf(grabbedArr[1]);\n if (check1 !== -1 && check2 !== -1) {\n // Then both array's items are in the best choices array\n bestOfBest = grabbedArr; // Array with length 2 (2 options)\n }\n if (i === noLength3.length - 1 && bestOfBest === \"\") {\n // Then none of the arrays passed the test, so just take any 1\n bestOfBest = noLength3[0]; // Array with length 2 (2 options)\n }\n }\n if (bestOfBest.length > 1) {\n randomRoll = Math.floor(Math.random() * 2); // Pick one of 2 options\n return bestOfBest[randomRoll];\n } else {\n return bestOfBest[0];\n }\n } // End of if (bestOptions.length > 1) conditional statement\n\n else {\n // There is only one best option\n return bestOptions[0][0];\n }\n\n}", "title": "" }, { "docid": "e772355f05e402c73a4f59c036650ca8", "score": "0.50796115", "text": "function automatedReadabilityIndex(letters, numbers, words, sentences) {\n return (4.71 * ((letters + numbers) / words))\n + (0.5 * (words / sentences))\n - 21.43;\n}", "title": "" }, { "docid": "a506123a752ddf076b43357201d8fcb3", "score": "0.50740695", "text": "function Z(le,de,ce,ue,pe,me){return oe(ne(oe(oe(de,le),oe(ue,me)),pe),ce)}", "title": "" }, { "docid": "60afc9007500f0a8c23cc061459fd731", "score": "0.5072746", "text": "function zi(){}", "title": "" }, { "docid": "4d947bb3259fd86d7d00e81614d3b278", "score": "0.50674146", "text": "function VF_SY121_MAKESCRIPT()\n{\n var strType = VFPROP_Get(\"MAKESCRIPT.Type\",1) \n var strSourceForm = VFPROP_Get(\"MAKESCRIPT.Source\",1) \n var strTargetForm = VFPROP_Get(\"MAKESCRIPT.Target\",1) \n var arrayScript = new Array(); \n var intIndex = 0; \n var strResponse = \"OK\"; /* Default response */ \n\n /* Handle the various supported script types */\n\n switch (strType)\n { \n /* ======================================== */ \n /* Handle a junction to junction transition */ \n /* ======================================== */ \n\n case \"NAVIGATE\": \n {\n var intAttempts = 0;\n\n for (intAttempts = 1; intAttempts <= 3; intAttempts++)\n { \n var intTargetIndex = 0; \n var intSourceIndex = 0; \n var intJunctionCount = 0; \n \n /* Assume that this will be an okay attempt and clear the array */\n \n strResponse = \"OK\";\n arrayScript.length = 0; \n\n /* On each attempt make a new try at getting a result */ \n\n switch (intAttempts)\n {\n case 1:\n intTargetIndex = VF_SY121_GETUSAGE(\"FIRST\",strTargetForm,\"NODE_JUNCTION\"); \n intSourceIndex = VF_SY121_GETUSAGE(\"LAST\", strSourceForm,\"NODE_JUNCTION\",0,(intTargetIndex - 1)); \n break;\n\n case 2:\n intSourceIndex = VF_SY121_GETUSAGE(\"FIRST\",strSourceForm,\"NODE_JUNCTION\"); \n intTargetIndex = VF_SY121_GETUSAGE(\"FIRST\",strTargetForm,\"NODE_JUNCTION\",(intSourceIndex + 1)); \n break;\n\n case 3:\n intTargetIndex = VF_SY121_GETUSAGE(\"LAST\",strTargetForm,\"NODE_JUNCTION\"); \n intSourceIndex = VF_SY121_GETUSAGE(\"LAST\",strSourceForm,\"NODE_JUNCTION\",0,(intTargetIndex - 1)); \n break;\n\n } \n \n /* If a valid range of indexes was found then use it to try and generate code */ \n \n if ((intSourceIndex > -1) && (intTargetIndex > -1)) \n { \n var flagSignOnScreen = (strSourceForm == GLOBAL_V_SignonFormName); \n \n /* Special code for a sign on screen */\n \n if (flagSignOnScreen)\n {\n\n arrayScript[arrayScript.length] = '/* If you need to set up multilingual strings or function key captions, use logic like this */';\n arrayScript[arrayScript.length] = '/* switch (objFramework.Language) */';\n arrayScript[arrayScript.length] = '/* { */'; \n arrayScript[arrayScript.length] = '/* case \"ENG\": */';\n arrayScript[arrayScript.length] = '/* If you need to set up multilingual strings for use in other RAMP scripts then use this: */';\n arrayScript[arrayScript.length] = '/* ADD_STRING(1,\"english string 1\"); */'; \n arrayScript[arrayScript.length] = '/* ADD_STRING(2,\"english string 2\"); */'; \n arrayScript[arrayScript.length] = '/* then in the other scripts use var StrText = STRING(1); to get the string value. */'; \n arrayScript[arrayScript.length] = '/* If you need to set up multilingual function keys then use this function */';\n arrayScript[arrayScript.length] = '/* OVERRIDE_KEY_CAPTION_ALL(KeyF1,\"english help\"); */';\n arrayScript[arrayScript.length] = '/* break; */';\n arrayScript[arrayScript.length] = '/* case \"ESP\": */';\n arrayScript[arrayScript.length] = '/* Spanish versions of multilingual strings */';\n arrayScript[arrayScript.length] = '/* ADD_STRING(1,\"spanish string 1\"); */'; \n arrayScript[arrayScript.length] = '/* ADD_STRING(2,\"spanish string 2\"); */'; \n arrayScript[arrayScript.length] = '/* Spanish function key captions */';\n arrayScript[arrayScript.length] = '/* OVERRIDE_KEY_CAPTION_ALL(KeyF1,\"spanish Help\"); */';\n arrayScript[arrayScript.length] = '/* break; */';\n arrayScript[arrayScript.length] = '/* default: */';\n arrayScript[arrayScript.length] = '/* break; */'; \n arrayScript[arrayScript.length] = '/* } */';\n arrayScript[arrayScript.length] = ' ';\n arrayScript[arrayScript.length] = '/* If the user tries to leave an undefined screen (e.g. a prompt), specify the key that is */';\n arrayScript[arrayScript.length] = '/* most likely to take them back to a RAMP defined screen. */';\n arrayScript[arrayScript.length] = '/* ADD_UNKNOWN_FORM_GUESS(KeyF12); */';\n arrayScript[arrayScript.length] = ' ';\n\n\n\n arrayScript[arrayScript.length] = \"var strSignOnScreen = CURRENT_FORM();\"; \n arrayScript[arrayScript.length] = \"var intAttempts = 0;\"; \n arrayScript[arrayScript.length] = \"while ((CURRENT_FORM() == strSignOnScreen) && (intAttempts < 2))\"; \n arrayScript[arrayScript.length] = \"{\"; \n arrayScript[arrayScript.length] = \"intAttempts++;\"; \n }\n \n /* No generate the required code */ \n \n for (intIndex = intSourceIndex; ((strResponse == \"OK\") && (intIndex < intTargetIndex)); intIndex++)\n { \n var objFormSnapShot = arrayobjFormStackSnapShots[intIndex];\n \n if (objFormSnapShot != null)\n { \n switch (objFormSnapShot.strFormType)\n {\n case \"NODE_SPECIAL\": \n {\n break; \n }\n\n case \"NODE_CHERRY\": \n {\n strResponse = \"E2\"; /* Error 2 */ \n break; \n }\n\n case \"NODE_JUNCTION\": \n {\n intJunctionCount++;\n if (intJunctionCount > 1) strResponse = \"E2\"; /* Error 2 */ \n VF_SY121_MAKESCRIPT_SETVALUE(arrayScript,intIndex,flagSignOnScreen); \n VF_SY121_MAKESCRIPT_SENDKEY(arrayScript,intIndex); \n break; \n }\n\n default: \n {\n VF_SY121_MAKESCRIPT_SETVALUE(arrayScript,intIndex,flagSignOnScreen); \n VF_SY121_MAKESCRIPT_SENDKEY(arrayScript,intIndex); \n break; \n }\n\n } \n }\n \n }\n\n /* Issue termination code if no errors and code was generated */ \n \n if ((strResponse == \"OK\") && (arrayScript.length > 0)) \n {\n if (flagSignOnScreen) arrayScript[arrayScript.length] = \"}\"; \n \n VF_SY121_MAKESCRIPT_CHECKFORM(arrayScript,arraystrFormStack[intTargetIndex],(\"Unable to display form \" + arraystrFormStack[intTargetIndex]) ); \n \n } \n\n }\n\n /* Now see if this attempt is okay and some code was generated break the attempts loop */ \n \n if ((strResponse == \"OK\") && (arrayScript.length > 0)) break;\n \n /* Otherwise we will loop around and have another attempt */ \n } \n\n /* If all 3 attempts come up with nada then it's an error */ \n\n if (arrayScript.length <= 0) strResponse = \"E1\"; \n }\n\n break; \n\n /* ======================================== */ \n /* Handle a special */ \n /* ======================================== */ \n \n case \"ELIMINATE\":\n { \n var intElimIndex = VF_SY121_GETUSAGE(\"LAST\",strSourceForm,\"NODE_SPECIAL\"); \n\n if (intElimIndex > -1)\n {\n for (intIndex = intElimIndex; intIndex < arraystrFormStack.length; intIndex++)\n { \n var objFormSnapShot = arrayobjFormStackSnapShots[intIndex];\n \n if (objFormSnapShot == null) break;\n if (objFormSnapShot.strFormType == \"NODE_CHERRY\") break;\n if (objFormSnapShot.strFormType == \"NODE_JUNCTION\") break;\n\n \n VF_SY121_MAKESCRIPT_SETVALUE(arrayScript,intIndex,false); \n VF_SY121_MAKESCRIPT_SENDKEY(arrayScript,intIndex + 1,\" \");\n }\n }\n \n if (arrayScript.length <= 0) strResponse = \"E3\"; \n \n }\n\n break; \n\n /* ======================================== */ \n /* Handle a cherry invocation */ \n /* ======================================== */ \n\n case \"INVOKE\": \n {\n var intCherryIndex = VF_SY121_GETUSAGE(\"LAST\",strTargetForm,\"NODE_CHERRY\"); \n \n /* If the cherry was found */ \n \n if (intCherryIndex > -1)\n {\n var intPreviousJunctionIndex = VF_SY121_GETUSAGE(\"LAST\",\"*ANY\",\"NODE_JUNCTION\",0,intCherryIndex); \n \n if (intPreviousJunctionIndex > -1)\n {\n\n VF_SY121_MAKESCRIPT_COMMENT(arrayScript,\"Navigate to the nearest access junction\"); \n arrayScript[arrayScript.length] = \"NAVIGATE_TO_JUNCTION(\\\"\" + arraystrFormStack[intPreviousJunctionIndex] + \"\\\");\"; \n \n VF_SY121_MAKESCRIPT_CHECKFORM(arrayScript,arraystrFormStack[intPreviousJunctionIndex],(\"Unable to navigate to form \" + arraystrFormStack[intPreviousJunctionIndex]) ); \n\n for (intIndex = intPreviousJunctionIndex; intIndex < intCherryIndex; intIndex++)\n { \n var objFormSnapShot = arrayobjFormStackSnapShots[intIndex];\n if (objFormSnapShot != null)\n { \n if (objFormSnapShot.strFormType != \"NODE_SPECIAL\")\n {\n VF_SY121_MAKESCRIPT_SETVALUE(arrayScript,intIndex,false); \n VF_SY121_MAKESCRIPT_SENDKEY(arrayScript,intIndex); \n }\n }\n }\n }\n }\n \n if (arrayScript.length <= 0) strResponse = \"E4\"; \n }\n\n break; \n\n /* ======================================== */ \n /* Handle a cherry return to junction */ \n /* ======================================== */ \n\n case \"RETURN\":\n {\n var intCherryIndex = VF_SY121_GETUSAGE(\"LAST\",strSourceForm,\"NODE_CHERRY\"); \n\n if (intCherryIndex > -1)\n {\n var intNextJunctionIndex = VF_SY121_GETUSAGE(\"FIRST\",\"*ANY\",\"NODE_JUNCTION\",intCherryIndex); \n\n if (intNextJunctionIndex > -1)\n {\n\n VF_SY121_MAKESCRIPT_COMMENT(arrayScript,(\"Navigate back to the nearest junction (\" + arraystrFormStack[intNextJunctionIndex] + \")\") ); \n\n for (intIndex = intCherryIndex; intIndex < intNextJunctionIndex; intIndex++)\n { \n var objFormSnapShot = arrayobjFormStackSnapShots[intIndex];\n if (objFormSnapShot != null)\n { \n if (objFormSnapShot.strFormType != \"NODE_SPECIAL\") \n {\n if (intIndex > intCherryIndex) VF_SY121_MAKESCRIPT_SETVALUE(arrayScript,intIndex,false); \n VF_SY121_MAKESCRIPT_SENDKEY(arrayScript,intIndex); \n } \n }\n }\n }\n }\n\n if (arrayScript.length <= 0) strResponse = \"E5\"; \n }\n \n break;\n \n \n /* ======================================== */ \n /* Handle a cherry button script */ \n /* ======================================== */ \n\n case \"BUTTON\":\n {\n var intCherryIndex = VF_SY121_GETUSAGE(\"LAST\",strSourceForm,\"NODE_CHERRY\"); \n var objFormSnapShot = null; \n \n /* If the cherry was found */ \n \n if (intCherryIndex > -1)\n {\n\n VF_SY121_MAKESCRIPT_COMMENT(arrayScript,\"Handle any automatic client-side prompting\"); \n arrayScript[arrayScript.length] = \"if ( HANDLE_PROMPT() ) return;\"; \n VF_SY121_MAKESCRIPT_COMMENT(arrayScript,\"Otherwise handle function keys and buttons\"); \n arrayScript[arrayScript.length] = \"switch (objScriptInstance.FunctionKeyUsed)\"; \n arrayScript[arrayScript.length] = \"{\"; \n\n var objFormSnapShot = arrayobjFormStackSnapShots[intCherryIndex];\n \n if (objFormSnapShot != null)\n { \n for (intI in objFormSnapShot.arrayobjFunctionKeys)\n {\n objFunctionKey = objFormSnapShot.arrayobjFunctionKeys[intI];\n\n if (objFunctionKey.strKeySymbolicName != \"\")\n {\n arrayScript[arrayScript.length] = \" case \" + objFunctionKey.strKeySymbolicName + \":\";\n arrayScript[arrayScript.length] = \" SENDKEY(\" + objFunctionKey.strKeySymbolicName + \");\";\n arrayScript[arrayScript.length] = \" break;\"; \n } \n }\n }\n\n arrayScript[arrayScript.length] = \" default:\"; \n arrayScript[arrayScript.length] = \" SENDKEY(objScriptInstance.FunctionKeyUsed);\"; \n arrayScript[arrayScript.length] = \" break;\"; \n arrayScript[arrayScript.length] = \"}\"; \n }\n }\n\n if (arrayScript.length <= 0) strResponse = \"E6\"; \n\n break;\n\n } /* Switch */ \n \n /* Dump out the script generated and response code */ \n\n VFPROP_Set(\"MAKESCRIPT.Response\",1,strResponse); \n VFPROP_Set(\"MAKESCRIPT.TotalScriptLines\",1,\"0\"); \n \n if ((strResponse == \"OK\") && (arrayScript.length > 0))\n { \n VFPROP_Set(\"MAKESCRIPT.TotalScriptLines\",1,arrayScript.length.toString()); \n for (intIndex = 0; intIndex < arrayScript.length; intIndex++)\n {\n VFPROP_Set(\"MAKESCRIPT.ScriptLine\",(intIndex + 1),arrayScript[intIndex]); \n }\n } \n\n /* Free resources */ \n\n delete(arrayScript);\n\n /* Finished */\n\n return; \n}", "title": "" }, { "docid": "94548efaf3e9ff5c01cb9aca6938fe88", "score": "0.5063195", "text": "function o242(o116) {\n var o82 = 3;\n // params, etc.\n var o243 = {\n 'v': 'void',\n 'b': 'bool',\n 'c': 'char',\n 's': 'short',\n 'i': 'int',\n 'l': 'long',\n 'f': 'float',\n 'd': 'double',\n 'w': 'wchar_t',\n 'a': 'signed char',\n 'h': 'unsigned char',\n 't': 'unsigned short',\n 'j': 'unsigned int',\n 'm': 'unsigned long',\n 'x': 'long long',\n 'y': 'unsigned long long',\n 'z': '...'\n };\n var o244 = [];\n var o245 = true;\n\n function o47(o23) {\n //return;\n try {\nif (o23) try {\nModule.print(o23);\n}catch(e){}\n}catch(e){}\n try {\nModule.print(o116);\n}catch(e){}\n var o246 = '';\n try {\nfor (var o247 = 0; o247 < o82; o247++) try {\no246 += ' ';\n}catch(e){}\n}catch(e){}\n try {\nModule.print(o246 + '^');\n}catch(e){}\n }\n\n function o248() {\n try {\no82++;\n}catch(e){}\n try {\nif (o116[o82] === 'K') try {\no82++;\n}catch(e){}\n}catch(e){} // ignore const\n var o249 = [];\n try {\nwhile (o116[o82] !== 'E') {\n try {\nif (o116[o82] === 'S') { // substitution\n try {\no82++;\n}catch(e){}\n var next = o116.indexOf('_', o82);\n var o250 = o116.substring(o82, next) || 0;\n try {\no249.push(o244[o250] || '?');\n}catch(e){}\n try {\no82 = next + 1;\n}catch(e){}\n try {\ncontinue;\n}catch(e){}\n }\n}catch(e){}\n try {\nif (o116[o82] === 'C') { // constructor\n try {\no249.push(o249[o249.length - 1]);\n}catch(e){}\n try {\no82 += 2;\n}catch(e){}\n try {\ncontinue;\n}catch(e){}\n }\n}catch(e){}\n var o85 = parseInt(o116.substr(o82));\n var o246 = o85.toString().length;\n try {\nif (!o85 || !o246) {\n try {\no82--;\n}catch(e){}\n try {\nbreak;\n}catch(e){}\n }\n}catch(e){} // counter i++ below us\n var o99 = o116.substr(o82 + o246, o85);\n try {\no249.push(o99);\n}catch(e){}\n try {\no244.push(o99);\n}catch(e){}\n try {\no82 += o246 + o85;\n}catch(e){}\n }\n}catch(e){}\n try {\no82++;\n}catch(e){} // skip E\n try {\nreturn o249;\n}catch(e){}\n }\n\n function parse(o251, o252, o253) { // main parser\n try {\no252 = o252 || Infinity;\n}catch(e){}\n var o30 = '',\n o254 = [];\n\n function o255() {\n try {\nreturn '(' + o254.join(', ') + ')';\n}catch(e){}\n }\n var name;\n try {\nif (o116[o82] === 'N') {\n // namespaced N-E\n try {\nname = o248().join('::');\n}catch(e){}\n try {\no252--;\n}catch(e){}\n try {\nif (o252 === 0) try {\nreturn o251 ? [name] : name;\n}catch(e){}\n}catch(e){}\n } else {\n // not namespaced\n try {\nif (o116[o82] === 'K' || (o245 && o116[o82] === 'L')) try {\no82++;\n}catch(e){}\n}catch(e){} // ignore const and first 'L'\n var o85 = parseInt(o116.substr(o82));\n try {\nif (o85) {\n var o246 = o85.toString().length;\n try {\nname = o116.substr(o82 + o246, o85);\n}catch(e){}\n try {\no82 += o246 + o85;\n}catch(e){}\n }\n}catch(e){}\n }\n}catch(e){}\n try {\no245 = false;\n}catch(e){}\n try {\nif (o116[o82] === 'I') {\n try {\no82++;\n}catch(e){}\n var o256 = parse(true);\n var o257 = parse(true, 1, true);\n try {\no30 += o257[0] + ' ' + name + '<' + o256.join(', ') + '>';\n}catch(e){}\n } else {\n try {\no30 = name;\n}catch(e){}\n }\n}catch(e){}\n try {\no258: try {\nwhile (o82 < o116.length && o252-- > 0) {\n //dump('paramLoop');\n var o259 = o116[o82++];\n try {\nif (o259 in o243) {\n try {\no254.push(o243[o259]);\n}catch(e){}\n } else {\n try {\nswitch (o259) {\n case 'P':\n try {\no254.push(parse(true, 1, true)[0] + '*');\n}catch(e){}\n try {\nbreak;\n}catch(e){} // pointer\n case 'R':\n try {\no254.push(parse(true, 1, true)[0] + '&');\n}catch(e){}\n try {\nbreak;\n}catch(e){} // reference\n case 'L':\n { // literal\n try {\no82++;\n}catch(e){} // skip basic type\n var o260 = o116.indexOf('E', o82);\n var o85 = o260 - o82;\n try {\no254.push(o116.substr(o82, o85));\n}catch(e){}\n try {\no82 += o85 + 2;\n}catch(e){} // size + 'EE'\n try {\nbreak;\n}catch(e){}\n }\n case 'A':\n { // array\n var o85 = parseInt(o116.substr(o82));\n try {\no82 += o85.toString().length;\n}catch(e){}\n try {\nif (o116[o82] !== '_') try {\nthrow '?';\n}catch(e){}\n}catch(e){}\n try {\no82++;\n}catch(e){} // skip _\n try {\no254.push(parse(true, 1, true)[0] + ' [' + o85 + ']');\n}catch(e){}\n try {\nbreak;\n}catch(e){}\n }\n case 'E':\n try {\nbreak o258;\n}catch(e){}\n default:\n try {\no30 += '?' + o259;\n}catch(e){}\n try {\nbreak o258;\n}catch(e){}\n }\n}catch(e){}\n }\n}catch(e){}\n }\n}catch(e){}\n}catch(e){}\n try {\nif (!o253 && o254.length === 1 && o254[0] === 'void') try {\no254 = [];\n}catch(e){}\n}catch(e){} // avoid (void)\n try {\nreturn o251 ? o254 : o30 + o255();\n}catch(e){}\n }\n try {\ntry {\n // Special-case the entry point, since its name differs from other name mangling.\n try {\nif (o116 == 'Object._main' || o116 == '_main') {\n try {\nreturn 'main()';\n}catch(e){}\n }\n}catch(e){}\n try {\nif (typeof o116 === 'number') try {\no116 = o122(o116);\n}catch(e){}\n}catch(e){}\n try {\nif (o116[0] !== '_') try {\nreturn o116;\n}catch(e){}\n}catch(e){}\n try {\nif (o116[1] !== '_') try {\nreturn o116;\n}catch(e){}\n}catch(e){} // C function\n try {\nif (o116[2] !== 'Z') try {\nreturn o116;\n}catch(e){}\n}catch(e){}\n try {\nswitch (o116[3]) {\n case 'n':\n try {\nreturn 'operator new()';\n}catch(e){}\n case 'd':\n try {\nreturn 'operator delete()';\n}catch(e){}\n }\n}catch(e){}\n try {\nreturn parse();\n}catch(e){}\n } catch (o189) {\n try {\nreturn o116;\n}catch(e){}\n }\n}catch(e){}\n}", "title": "" }, { "docid": "8d6623454d29d5d7a3ae29d329c431ae", "score": "0.5062225", "text": "function o0(){\n var o967 = \"\";\n var o2 = 3;\n\n try {\nfor(; o2 < 4; this.o636++) {\n try {\nswitch('m') {\n case 'n':\n try {\nbreak;\n}catch(o19 >> 8){}\n case 'a':\n try {\nbreak;\n}catch(e){}\n case 'n':\n try {\no3.o4(\"m\");\n}catch(e){}\n try {\no421.o365|2;\n}catch(e){}\n try {\nbreak;\n}catch(e){}\n default:\n try {\nbreak;\n}catch(e){}\n }\n}catch(e){}\n }\n}catch(e){}\n\n}", "title": "" }, { "docid": "579aa4846a128e65340b6bcdf9400e62", "score": "0.5061076", "text": "function step5(z) {\n\t z.j = z.k;\n\t if (z.b.charAt(z.k) == 'e') {\n\t\tvar a = m(z);\n\t\tif (a > 1 || a == 1 && !cvc(z, z.k - 1)) z.k--;\n\t }\n\t if (z.b.charAt(z.k) == 'l' && doublec(z, z.k) && m(z) > 1) z.k--;\n\t}", "title": "" }, { "docid": "757a6b2c581ad391dd66c39fadc82191", "score": "0.50448775", "text": "function AP()\n {\n // Mark all the vertices as not visited\n var visited = createTable(V);\n var disc = [V];\n var low = [V] ;\n var parent = [V];\n var ap = createTable(V) ; // To store articulation points\n\n // Initialize parent and visited, and ap(articulation point)\n // arrays\n for (var i = 0; i < V; i++)\n {\n parent[i] = -1;\n visited[i] = false;\n ap[i] = false;\n }\n\n // Call the recursive helper function to find articulation\n // points in DFS tree rooted with vertex 'i'\n for (var i = 0; i < V; i++)\n if (visited[i] == false)\n APUtil(i, visited, disc, low, parent, ap);\n\n // Now ap[] contains articulation points, print them\n for (var i = 0; i < V; i++)\n if (ap[i] == true){\n cy.$('#noued'+i).addClass('articulatPoints') ;\n console.log(i+' ');\n }\n\n }", "title": "" }, { "docid": "981094615c9e96611184d7f950c347ce", "score": "0.50444824", "text": "function InitializeSwitchTable(kk, A)\n{\n if (kk == 0)\n {\n \n lowest_score = Score(deepCopyFunction(A));\n best_order = [A[0].id, A[1].id, A[2].id, A[3].id];\n if(lowest_score > 0)\n {\n Heap(4, deepCopyFunction(A));\n }\n \n/* highest_score = ScoreForMovement(deepCopyFunction(A));\n \n best_order = [A[0].id, A[1].id, A[2].id, A[3].id];\n Heap(4, deepCopyFunction(A));\n */\n \n let temp_index = 4*SwitchIndex(deepCopyFunction(A));\n switchTable[temp_index ] = best_order[0];\n switchTable[temp_index + 1] = best_order[1];\n switchTable[temp_index + 2] = best_order[2];\n switchTable[temp_index + 3] = best_order[3]; \n \n \n\n\n }\n else\n {\n for (let occ0 = 0; occ0 < 2; ++occ0)\n {\n if (occ0 == 0)\n {\n InitializeSwitchTable(kk-1, A.concat({id:4 - kk, occ:occ0, x:0, y:0}));\n }\n else\n {\n for (let x0 = -1; x0 < 2; ++x0)\n {\n for (let y0 = -1; y0 < 2; ++y0)\n {\n InitializeSwitchTable(kk-1, A.concat({id:4 - kk, occ:occ0, x:x0, y:y0}));\n \n }\n }\n\n }\n \n }\n\n }\n \n}", "title": "" }, { "docid": "af6e29f0615400d5a5392d7f61a70186", "score": "0.5043936", "text": "function ex09_0() {\n\n}", "title": "" }, { "docid": "f86b164da81cb2e028d5beb594d35b1c", "score": "0.50403655", "text": "function am1(i,x,w,j,c,n) { // 66\n while(--n >= 0) { // 67\n var v = x*this[i++]+w[j]+c; // 68\n c = Math.floor(v/0x4000000); // 69\n w[j++] = v&0x3ffffff; // 70\n } // 71\n return c; // 72\n} // 73", "title": "" }, { "docid": "643f8987350832cd27eb0cd6c8bc9188", "score": "0.50202465", "text": "function task17_20_6(){\r\n //counting\r\n document.write(\"Counting: \");\r\n for(var i = 1 ; i <=15;i++){\r\n document.write( i+ '\\n' ); \r\n }\r\n \r\n //reverse counting\r\n document.write(\"<br> Reverse Counting: \");\r\n for(var i = 10 ; i >= 1;i--){\r\n document.write( i+ '\\n' ); \r\n }\r\n \r\n //Even\r\n document.write(\"<br> Even: \");\r\n for(var i = 0 ; i < 21; i++){\r\n\r\n if( i % 2 === 0){\r\n document.write( i+ '\\n' ); \r\n } \r\n }\r\n\r\n //odd\r\n document.write(\"<br> ODD: \");\r\n for(var i = 0 ; i < 21; i++){\r\n if( i % 2 !== 0){\r\n document.write( i+ '\\n' ); \r\n } \r\n }\r\n\r\n //Series\r\n document.write(\"<br> Series: \");\r\n for(var i = 2 ; i<21; i++){\r\n if( i % 2 === 0){\r\n document.write( i+'k'+'\\n' ); \r\n } \r\n } \r\n \r\n}", "title": "" }, { "docid": "0ee0565333756646f1d526e8548f3b8b", "score": "0.5016576", "text": "function a(e,a,t,n){var l={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 a?l[t][0]:l[t][1]}", "title": "" }, { "docid": "ca4bcf8ff9bc9035dbd07fbfb8dda7a1", "score": "0.5008335", "text": "function pr(e,t,n,a){var r={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 t?r[n][0]:r[n][1]}", "title": "" }, { "docid": "b87b66fa2f9bdd15e11aef32747d57ac", "score": "0.50076616", "text": "function mainMethod(){\n//redefine our word to current search box value, and apply the definite artcile method that checks for ال, and then define N as the length of the word\nWORD = document.getElementById(\"srchBox\").value;\ndefArticle();\nN=WORD.length;\n// the algorithm calls to check the word again for a second index of ال, and if there is another instance of these characters in the word then we should recognize a root letter from that.\nif(WORD.includes(\"ال\")){\n\tR[WORD.indexOf(\"ال\")+1] = 1;\n}\n// per our algorithm, initialized second set of variabels necessary for the extraction\nvar n = N;\nvar S1 = WORD.substring(0,(Math.round(n/3)));\nvar S2 = WORD.substring(Math.round(n/3),Math.round(n/3) +(n-(2*S1.length)));\nvar S3 = WORD.substring(S1.length + S2.length);\nvar Wseg = [S1, S2, S3];\nW = WORD.split(\"\");\n\n//apply the mutate function to the word, using word and word segment variables\nmutateFunc(S1, S2, S3, W);\n\n//grab all values from the object G1 and put them in vals variable\nvar vals = Object.values(G1);\n\n//loop through vals to apply the Table 1 rules\nfor(var i=0; i<vals.length; i++){\n\tfor(var j=0; j<WORD.length; j++){\n\t\tif(WORD.charCodeAt(j) == vals[i]){\n\t\t\tR[j] = 1;\n\t\t\tcountOn++;\n\t\t}\n\t}\n}\n\n//redefine vals as the values from the G8A object and loop through the word segment S1 to check against these values\nvals = Object.values(G8A);\nfor(var j = 0; j<S1.length; j++){\n\tif(S1.charCodeAt(j) == vals[i]){\n\t\tR[j] = 0;\n\t\tcountOff++;\n\t}\n}\n\n//redefine vals as G8B values and check if they occurr at the end of the word segment 3\nvals = Object.values(G8B);\nif(S3.endsWith(vals[i])){\n\tR[WORD.indexOf(vals[i])] = 0;\n\tcountOff++;\n}\n\n\n//apply if statements outlined in algorithm. If the countOn variable that is counting how many root letters have been found is more than 3, create a ROOT string from those found values and print it to screen. Return to end the method and \n//stop extraction\nvar st_in = 1;\nvar ls_in = n;\nif (countOn >= 3){\n\tfor(var i = 0; i<R.length; i++){\n\t\tif (R[i]==1){\n\t\t\tROOT = ROOT.concat(WORD.charAt(i));\n\t\t}\n\t}\n\tdocument.getElementById(\"rsltBox\").innerHTML = ROOT;\n\treturn;\n}\n//if we've found two root letters, apply the rootDistance method to check if our word can be shortened for a smaller search paremeter.\nif(countOn == 2 && flag){\nrootDistance(R);\n}\n\n//apply if else statements as per outlined by algorithm\nif(R[st_in] == 0 || R[ls_in] == 0){\n\tif(R[st_in] == 0){\n\t\tr1_flag = true;\n\t\twhile(R[st_in] == 0){\n\t\t\tst_in++;\n\t\t}\t\n\t}\n\tif(R[ls_in]==0){\n\t\trn_flag = true;\n\t\twhile(R[ls_in] == 0){\n\t\t\tls_in--;\n\t\t}\n\t}\n}\n//redfine our n and word segments.\nn=WORD.length;\nWseg = [S1, S2, S3];\n//initialize all variables that correlate to our TABLE 1 dictionaries\nvals = Object.values(G2);\nvar var3 = Object.values(G3);\nvar var4 = Object.values(G4);\nvar var5 = Object.values(G5);\nvar var6 = Object.values(G6);\nvar var7 = Object.values(G7);\nvar var9 = Object.values(G9);\n\n//TABLE 1 G2 rules\nif(S1.charCodeAt(0) == vals[0]){\n\tR[0] = 1;\n\tcountOn++;\n}\n//TABLE 1 G3 RULES\nfor(var i=0; i<var3.length; i++){\n\tfor(var j = 0; j<S1.length; j++){\n\t\tif(S1.charCodeAt(j) == var3[i]){\n\t\t\tR[j] = 1;\n\t\t\tcountOn++;\n\t\t}\n\t}\n}\n//TABLE 1 G4 RULES\nfor(var i=0; i<var4.length; i++){\n\tif(S2.charCodeAt(0) == var4[i]){\n\t\tR[S1.length] = 1;\n\t\tcountOn++;\n\t}\n}\n//TABLE 1 G5 RULES\nfor(var i=0; i<var5.length; i++){\n\tfor(var j = 0; j<S2.length; j++){\n\t\tif(S2.charCodeAt(j) == var5[i]){\n\t\t\tR[S1.length+j] = 1;\n\t\t\tcountOn++;\n\t\t}\n\t}\n}\n//TABLE 1 G6 RULES\nfor(var i=0; i<var6.length; i++){\n\tif(S2.charCodeAt(S2.length-1) == var6[i]){\n\t\tR[S1.length+S2.length+1] = 1;\n\t\tcountOn++;\n\t}\n}\n//TABLE 1 G7 RULES\nfor(var i=0; i<var7.length; i++){\n\tfor (var j = 0; j<S3.length; j++){\n\t\tif(WORD.charCodeAt(n-1) == var7[i]){\n\t\t\tR[S1.length+S2.length+j] = 1;\n\t\t\tcountOn++;\n\t\t}\n\t}\n}\n// ALGORITHM implementation that handles letters not mentioned in TABLE 1 and outputs our final word after extraction\nwhile(Changes == false){\n\textraRules(S1, S2, S3, n);\n\tif(Changes){\n\t\tif (countOn >= 3){\n\t\t\tfor(var i = 0; i<R.length+1; i++){\n\t\t\t\tif (R[i]==1){\n\t\t\t\t\tROOT = ROOT.concat(WORD.charAt(i));\n\t\t\t\t}\n\t\t\t}\n\tdocument.getElementById(\"rsltBox\").innerHTML = ROOT;\n\treturn ;\n\t\t}\n\t\n\t}\n}\n}", "title": "" }, { "docid": "23add12e49ac4c8e7d6aa7b922fe1add", "score": "0.5007636", "text": "function assignment6_9Q1() {\r\n var a = parseInt(prompt(\"Enter a number: \"));\r\n document.write(\"<p>Result:</p>\");\r\n document.write(\"<p>The value of a is: \" + a + \"</p>\");\r\n document.write(\"<p>........................................ </p></br>\");\r\n document.write(\"<p>The value of ++a is: \" + ++a + \"</p>\");\r\n document.write(\"<p>Now the value of a is: \" + a + \"</p></br>\");\r\n document.write(\"<p>The value of a++ is: \" + a++ + \"</p>\");\r\n document.write(\"<p>Now the value of a is: \" + a + \"</p></br>\");\r\n document.write(\"<p>The value of --a is: \" + --a + \"</p>\");\r\n document.write(\"<p>Now the value of a is: \" + a + \"</p></br>\");\r\n document.write(\"<p>The value of a-- is: \" + a-- + \"</p>\");\r\n document.write(\"<p>Now the value of a is: \" + a + \"</p></br>\");\r\n document.write(\"</br>Press refresh to go home page\");\r\n}", "title": "" }, { "docid": "47a6c07880fafad935ef3be9c9086189", "score": "0.50062156", "text": "function globalCalculateOutput(blandinput, blandtomildinput,\n\tmildleavesinput,mildsbinput,mildquesoinput,totalmildquesoinput, mildtomediuminput,\n\tmediumleavesinput,mediumsbinput,mediumquesoinput,totalmediumquesoinput, mediumtohotinput,\n\thotleavesinput,hotsbinput,hotquesoinput,totalhotquesoinput, hottoflamininput,\n\tflaminleavesinput,flaminsbinput,flaminquesoinput,totalflaminquesoinput){\n\n\tvar outputtext =\"\";\n\tvar nachoreoutput = 0;\n//var requiredbland = 0;\n\n//figure out the highest type of queso hunter have\nvar arr = [blandinput,totalmildquesoinput,totalmediumquesoinput,totalhotquesoinput,totalflaminquesoinput];\nvar highestquesolvl = 0;\n\nif(arr[arr.length - 1] != 0){\n\thighestquesolvl = arr.length - 1;\n}\nelse{\n\tfor(var i = arr.length - 1; i >=0; i--){\n\t\tif(arr[i] == 0 && i != 0 && arr[i - 1] != 0){\n\t\t\thighestquesolvl = i - 1;\n\t\t\tbreak;\n\t\t}\n\t}\n}\n\n//calc bland queso rate only\nif(highestquesolvl === 0){\n\tnachoreoutput += blandinput * rateofnachores[0];\n}\n\n//calc mild queso\nelse if(highestquesolvl === 1){\n\tif(blandtomildinput === 0){\n\t\tnachoreoutput += blandinput * rateofnachores[0];\n\t\tnachoreoutput += totalmildquesoinput * rateofnachores[1];\n\t}\n\telse{\n\t\tvar outputmildqueso = convertCheeseToHigherTierLeaves(mildleavesinput,blandinput,mildsbinput,0);\n\t\tmildquesoinput += outputmildqueso;\n\t\tnachoreoutput += mildquesoinput * rateofnachores[1];\n\t}\n}\n//calc medium queso\nelse if(highestquesolvl === 2){\n\tif(blandtomildinput === 0 && mildtomediuminput === 0){\t\t\t\n\t\tnachoreoutput += blandinput * rateofnachores[0];\n\t\tnachoreoutput += totalmildquesoinput * rateofnachores[1];\n\t\tnachoreoutput += totalmediumquesoinput * rateofnachores[2];\t\t\t\n\t}\n\telse if(blandtomildinput === 1 && mildtomediuminput === 1){\n\t\tvar outputmildqueso = convertCheeseToHigherTierLeaves(mildleavesinput,blandinput,mildsbinput,0);\n\t\tmildquesoinput += outputmildqueso;\n\n\t\tvar outputmediumqueso = convertCheeseToHigherTierLeaves(mediumleavesinput,mildquesoinput,mediumsbinput,1);\n\t\tmediumquesoinput += outputmediumqueso;\n\t\tnachoreoutput += mediumquesoinput * rateofnachores[2];\n\t}\t\t\n\telse if(blandtomildinput === 0 && mildtomediuminput === 1){\t\n\t\tnachoreoutput += blandinput * rateofnachores[0];\n\n\t\tvar outputmediumqueso = convertCheeseToHigherTierLeaves(mediumleavesinput,totalmildquesoinput,mediumsbinput,1);\n\t\tmediumquesoinput += outputmediumqueso;\n\t\tnachoreoutput += mediumquesoinput * rateofnachores[2];\n\t}\n\telse if(blandtomildinput === 1 && mildtomediuminput === 0){\t\n\t\t//why lol\n\t\tvar outputmildqueso = convertCheeseToHigherTierLeaves(mildleavesinput,blandinput,mildsbinput,0);\n\t\tmildquesoinput += outputmildqueso;\n\n\t\tnachoreoutput += mildquesoinput * rateofnachores[1];\n\n\t\tnachoreoutput += totalmediumquesoinput * rateofnachores[2];\t\n\t}\n}\nelse if(highestquesolvl === 3){\n\n\tswitch (true) {\n\t\tcase blandtomildinput === 0 && mildtomediuminput === 0 && mediumtohotinput === 0:\n\t\tnachoreoutput += blandinput * rateofnachores[0];\n\t\tnachoreoutput += totalmildquesoinput * rateofnachores[1];\n\t\tnachoreoutput += totalmediumquesoinput * rateofnachores[2];\t\n\t\tnachoreoutput += totalhotquesoinput * rateofnachores[3];\t\n\t\tbreak;\n\n\t\tcase blandtomildinput === 1 && mildtomediuminput === 1 && mediumtohotinput === 1:\n\t\tvar outputmildqueso = convertCheeseToHigherTierLeaves(mildleavesinput,blandinput,mildsbinput,0);\n\t\tmildquesoinput += outputmildqueso;\n\n\t\tvar outputmediumqueso = convertCheeseToHigherTierLeaves(mediumleavesinput,mildquesoinput,mediumsbinput,1);\n\t\tmediumquesoinput += outputmediumqueso;\n\n\t\tvar outputhotqueso = convertCheeseToHigherTierLeaves(hotleavesinput,mediumquesoinput,hotsbinput,2);\n\t\thotquesoinput += outputhotqueso;\n\n\t\tnachoreoutput += hotquesoinput * rateofnachores[3];\t\n\t\tbreak;\n\n\t\tcase blandtomildinput === 0 && mildtomediuminput === 0 && mediumtohotinput === 1:\n\t\tnachoreoutput += blandinput * rateofnachores[0];\n\t\tnachoreoutput += totalmildquesoinput * rateofnachores[1];\n\n\t\tvar outputhotqueso = convertCheeseToHigherTierLeaves(hotleavesinput,totalmediumquesoinput,hotsbinput,2);\n\t\thotquesoinput += outputhotqueso;\t\n\n\t\tnachoreoutput += hotquesoinput * rateofnachores[3];\t\n\t\tbreak;\n\n\t\tcase blandtomildinput === 0 && mildtomediuminput === 1 && mediumtohotinput === 0:\n\t\tnachoreoutput += blandinput * rateofnachores[0];\n\t\t\n\t\tvar outputmediumqueso = convertCheeseToHigherTierLeaves(mediumleavesinput,totalmildquesoinput,mediumsbinput,1);\n\t\tmediumquesoinput += outputmediumqueso;\n\n\t\tnachoreoutput += mediumquesoinput * rateofnachores[2];\t\n\t\tnachoreoutput += totalhotquesoinput * rateofnachores[3];\t\n\t\tbreak;\n\n\t\tcase blandtomildinput === 0 && mildtomediuminput === 1 && mediumtohotinput === 1:\n\t\tnachoreoutput += blandinput * rateofnachores[0];\n\t\t\n\t\tvar outputmediumqueso = convertCheeseToHigherTierLeaves(mediumleavesinput,mildquesoinput,mediumsbinput,1);\n\t\tmediumquesoinput += outputmediumqueso;\n\n\t\tvar outputhotqueso = convertCheeseToHigherTierLeaves(hotleavesinput,mediumquesoinput,hotsbinput,2);\n\t\thotquesoinput += outputhotqueso;\n\n\t\tnachoreoutput += hotquesoinput * rateofnachores[3];\t\n\t\tbreak;\n\n\t\tcase blandtomildinput === 1 && mildtomediuminput === 0 && mediumtohotinput === 0:\n\t\tvar outputmildqueso = convertCheeseToHigherTierLeaves(mildleavesinput,blandinput,mildsbinput,0);\n\t\tmildquesoinput += outputmildqueso;\n\n\t\tnachoreoutput += mildquesoinput * rateofnachores[1];\n\t\tnachoreoutput += totalmediumquesoinput * rateofnachores[2];\n\t\tnachoreoutput += totalhotquesoinput * rateofnachores[3];\t\n\t\tbreak;\n\n\t\tcase blandtomildinput === 1 && mildtomediuminput === 0 && mediumtohotinput === 1:\n\t\tvar outputmildqueso = convertCheeseToHigherTierLeaves(mildleavesinput,blandinput,mildsbinput,0);\n\t\tmildquesoinput += outputmildqueso;\n\n\t\tnachoreoutput += mildquesoinput * rateofnachores[1];\n\n\t\tvar outputhotqueso = convertCheeseToHigherTierLeaves(hotleavesinput,totalmediumquesoinput,hotsbinput,2);\n\t\thotquesoinput += outputhotqueso;\n\n\t\tnachoreoutput += hotquesoinput * rateofnachores[3];\t\n\t\tbreak;\n\n\t\tcase blandtomildinput === 1 && mildtomediuminput === 1 && mediumtohotinput === 0:\n\t\tvar outputmildqueso = convertCheeseToHigherTierLeaves(mildleavesinput,blandinput,mildsbinput,0);\n\t\tmildquesoinput += outputmildqueso;\n\n\t\tvar outputmediumqueso = convertCheeseToHigherTierLeaves(mediumleavesinput,mildquesoinput,mediumsbinput,1);\n\t\tmediumquesoinput += outputmediumqueso;\n\n\t\tnachoreoutput += mediumquesoinput * rateofnachores[2];\n\t\tnachoreoutput += totalhotquesoinput * rateofnachores[3];\t\n\t\tbreak;\n\n\t\tdefault:\n\t\toutputtext+=\"Error at line 191\";\n\t}\n\t\n}\n//^^ end of Hot compute ^^\n//..................\n//..................\n//..................\n//..................\n//..................\n//..................\n//vv start of flamin' compute vv\n\nelse if(highestquesolvl === 4){\n\n\tswitch (true) {\n\t\tcase blandtomildinput === 0 && mildtomediuminput === 0 && mediumtohotinput === 0 && hottoflamininput === 0:\n\t\tnachoreoutput += blandinput * rateofnachores[0];\n\t\tnachoreoutput += totalmildquesoinput * rateofnachores[1];\n\t\tnachoreoutput += totalmediumquesoinput * rateofnachores[2];\t\n\t\tnachoreoutput += totalhotquesoinput * rateofnachores[3];\t\n\t\tnachoreoutput += totalflaminquesoinput * rateofnachores[4];\n\t\tbreak;\n\n\t\tcase blandtomildinput === 1 && mildtomediuminput === 1 && mediumtohotinput === 1 && hottoflamininput === 1:\n\t\tvar outputmildqueso = convertCheeseToHigherTierLeaves(mildleavesinput,blandinput,mildsbinput,0);\n\t\tmildquesoinput += outputmildqueso;\n\n\t\tvar outputmediumqueso = convertCheeseToHigherTierLeaves(mediumleavesinput,mildquesoinput,mediumsbinput,1);\n\t\tmediumquesoinput += outputmediumqueso;\n\n\t\tvar outputhotqueso = convertCheeseToHigherTierLeaves(hotleavesinput,mediumquesoinput,hotsbinput,2);\n\t\thotquesoinput += outputhotqueso;\n\n\t\tvar outputflaminqueso = convertCheeseToHigherTierLeaves(flaminleavesinput,hotquesoinput,flaminsbinput,3);\n\t\tflaminquesoinput += outputflaminqueso;\n\n\t\tnachoreoutput += flaminquesoinput * rateofnachores[4];\t\n\t\tbreak;\n\n\t\tcase blandtomildinput === 0 && mildtomediuminput === 0 && mediumtohotinput === 0 && hottoflamininput === 1:\n\t\tnachoreoutput += blandinput * rateofnachores[0];\n\t\tnachoreoutput += totalmildquesoinput * rateofnachores[1];\n\t\tnachoreoutput += totalmediumquesoinput * rateofnachores[2];\n\n\t\tvar outputflaminqueso = convertCheeseToHigherTierLeaves(flaminleavesinput,totalhotquesoinput,flaminsbinput,3);\n\t\tflaminquesoinput += outputflaminqueso;\n\n\t\tnachoreoutput += flaminquesoinput * rateofnachores[4];\t\n\t\tbreak;\n\n\t\tcase blandtomildinput === 0 && mildtomediuminput === 0 && mediumtohotinput === 1 && hottoflamininput === 0:\n\t\tnachoreoutput += blandinput * rateofnachores[0];\n\t\tnachoreoutput += totalmildquesoinput * rateofnachores[1];\n\n\t\tvar outputhotqueso = convertCheeseToHigherTierLeaves(hotleavesinput,totalmediumquesoinput,hotsbinput,2);\n\t\thotquesoinput += outputhotqueso;\t\n\n\t\tnachoreoutput += hotquesoinput * rateofnachores[3];\t\n\t\tnachoreoutput += totalflaminquesoinput * rateofnachores[4];\n\t\tbreak;\n\n\t\tcase blandtomildinput === 0 && mildtomediuminput === 0 && mediumtohotinput === 1 && hottoflamininput === 1:\n\t\tnachoreoutput += blandinput * rateofnachores[0];\n\t\tnachoreoutput += totalmildquesoinput * rateofnachores[1];\n\n\t\tvar outputhotqueso = convertCheeseToHigherTierLeaves(hotleavesinput,totalmediumquesoinput,hotsbinput,2);\n\t\thotquesoinput += outputhotqueso;\t\n\n\t\tvar outputflaminqueso = convertCheeseToHigherTierLeaves(flaminleavesinput,hotquesoinput,flaminsbinput,3);\n\t\tflaminquesoinput += outputflaminqueso;\n\n\t\tnachoreoutput += flaminquesoinput * rateofnachores[4];\n\t\tbreak;\n\n\t\tcase blandtomildinput === 0 && mildtomediuminput === 1 && mediumtohotinput === 0 && hottoflamininput === 0:\n\t\tnachoreoutput += blandinput * rateofnachores[0];\n\n\t\tvar outputmediumqueso = convertCheeseToHigherTierLeaves(mediumleavesinput,totalmildquesoinput,mediumsbinput,1);\n\t\tmediumquesoinput += outputmediumqueso;\n\n\t\tnachoreoutput += mediumquesoinput * rateofnachores[2];\t\n\t\tnachoreoutput += totalhotquesoinput * rateofnachores[3];\t\n\t\tnachoreoutput += totalflaminquesoinput * rateofnachores[4];\n\t\tbreak;\n\n\t\tcase blandtomildinput === 0 && mildtomediuminput === 1 && mediumtohotinput === 0 && hottoflamininput === 1:\n\t\tnachoreoutput += blandinput * rateofnachores[0];\n\n\t\tvar outputmediumqueso = convertCheeseToHigherTierLeaves(mediumleavesinput,totalmildquesoinput,mediumsbinput,1);\n\t\tmediumquesoinput += outputmediumqueso;\n\n\t\tnachoreoutput += mediumquesoinput * rateofnachores[2];\t\n\n\t\tvar outputflaminqueso = convertCheeseToHigherTierLeaves(flaminleavesinput,totalhotquesoinput,flaminsbinput,3);\n\t\tflaminquesoinput += outputflaminqueso;\n\n\t\tnachoreoutput += flaminquesoinput * rateofnachores[4];\n\t\tbreak;\n\n\t\tcase blandtomildinput === 0 && mildtomediuminput === 1 && mediumtohotinput === 1 && hottoflamininput === 0:\n\t\tnachoreoutput += blandinput * rateofnachores[0];\n\n\t\tvar outputmediumqueso = convertCheeseToHigherTierLeaves(mediumleavesinput,totalmildquesoinput,mediumsbinput,1);\n\t\tmediumquesoinput += outputmediumqueso;\n\n\t\tvar outputhotqueso = convertCheeseToHigherTierLeaves(hotleavesinput,mediumquesoinput,hotsbinput,2);\n\t\thotquesoinput += outputhotqueso;\n\n\t\tnachoreoutput += hotquesoinput * rateofnachores[3];\t\n\t\tnachoreoutput += totalflaminquesoinput * rateofnachores[4];\n\t\tbreak;\n\n\t\tcase blandtomildinput === 0 && mildtomediuminput === 1 && mediumtohotinput === 1 && hottoflamininput === 1:\n\t\tnachoreoutput += blandinput * rateofnachores[0];\n\n\t\tvar outputmediumqueso = convertCheeseToHigherTierLeaves(mediumleavesinput,totalmildquesoinput,mediumsbinput,1);\n\t\tmediumquesoinput += outputmediumqueso;\n\n\t\tvar outputhotqueso = convertCheeseToHigherTierLeaves(hotleavesinput,mediumquesoinput,hotsbinput,2);\n\t\thotquesoinput += outputhotqueso;\n\n\t\tvar outputflaminqueso = convertCheeseToHigherTierLeaves(flaminleavesinput,hotquesoinput,flaminsbinput,3);\n\t\tflaminquesoinput += outputflaminqueso;\n\n\t\tnachoreoutput += flaminquesoinput * rateofnachores[4];\n\t\tbreak;\n\n\t\tcase blandtomildinput === 1 && mildtomediuminput === 0 && mediumtohotinput === 0 && hottoflamininput === 0:\n\t\tvar outputmildqueso = convertCheeseToHigherTierLeaves(mildleavesinput,blandinput,mildsbinput,0);\n\t\tmildquesoinput += outputmildqueso;\n\n\t\tnachoreoutput += mildquesoinput * rateofnachores[1];\n\t\tnachoreoutput += totalmediumquesoinput * rateofnachores[2];\n\t\tnachoreoutput += totalhotquesoinput * rateofnachores[3];\t\n\t\tnachoreoutput += totalflaminquesoinput * rateofnachores[4];\n\t\tbreak;\n\n\t\tcase blandtomildinput === 1 && mildtomediuminput === 0 && mediumtohotinput === 0 && hottoflamininput === 1:\n\t\tvar outputmildqueso = convertCheeseToHigherTierLeaves(mildleavesinput,blandinput,mildsbinput,0);\n\t\tmildquesoinput += outputmildqueso;\n\n\t\tnachoreoutput += mildquesoinput * rateofnachores[1];\n\t\tnachoreoutput += totalmediumquesoinput * rateofnachores[2];\n\n\t\tvar outputflaminqueso = convertCheeseToHigherTierLeaves(flaminleavesinput,totalhotquesoinput,flaminsbinput,3);\n\t\tflaminquesoinput += outputflaminqueso;\n\n\t\tnachoreoutput += flaminquesoinput * rateofnachores[4];\n\t\tbreak;\n\n\t\tcase blandtomildinput === 1 && mildtomediuminput === 0 && mediumtohotinput === 1 && hottoflamininput === 0:\n\t\tvar outputmildqueso = convertCheeseToHigherTierLeaves(mildleavesinput,blandinput,mildsbinput,0);\n\t\tmildquesoinput += outputmildqueso;\n\n\t\tnachoreoutput += mildquesoinput * rateofnachores[1];\n\n\t\tvar outputhotqueso = convertCheeseToHigherTierLeaves(hotleavesinput,totalmediumquesoinput,hotsbinput,2);\n\t\thotquesoinput += outputhotqueso;\n\n\t\tnachoreoutput += hotquesoinput * rateofnachores[3];\n\t\tnachoreoutput += totalflaminquesoinput * rateofnachores[4];\n\t\tbreak;\n\n\t\tcase blandtomildinput === 1 && mildtomediuminput === 0 && mediumtohotinput === 1 && hottoflamininput === 1:\n\t\tvar outputmildqueso = convertCheeseToHigherTierLeaves(mildleavesinput,blandinput,mildsbinput,0);\n\t\tmildquesoinput += outputmildqueso;\n\n\t\tnachoreoutput += mildquesoinput * rateofnachores[1];\n\n\t\tvar outputhotqueso = convertCheeseToHigherTierLeaves(hotleavesinput,totalmediumquesoinput,hotsbinput,2);\n\t\thotquesoinput += outputhotqueso;\n\n\t\tvar outputflaminqueso = convertCheeseToHigherTierLeaves(flaminleavesinput,hotquesoinput,flaminsbinput,3);\n\t\tflaminquesoinput += outputflaminqueso;\n\n\t\tnachoreoutput += flaminquesoinput * rateofnachores[4];\n\t\tbreak;\n\n\t\tcase blandtomildinput === 1 && mildtomediuminput === 1 && mediumtohotinput === 0 && hottoflamininput === 0:\n\t\tvar outputmildqueso = convertCheeseToHigherTierLeaves(mildleavesinput,blandinput,mildsbinput,0);\n\t\tmildquesoinput += outputmildqueso;\n\n\t\tvar outputmediumqueso = convertCheeseToHigherTierLeaves(mediumleavesinput,mildquesoinput,mediumsbinput,1);\n\t\tmediumquesoinput += outputmediumqueso;\n\n\t\tnachoreoutput += mediumquesoinput * rateofnachores[2];\n\t\tnachoreoutput += totalhotquesoinput * rateofnachores[3];\t\n\t\tnachoreoutput += totalflaminquesoinput * rateofnachores[4];\n\t\tbreak;\n\n\t\tcase blandtomildinput === 1 && mildtomediuminput === 1 && mediumtohotinput === 0 && hottoflamininput === 1:\n\t\tvar outputmildqueso = convertCheeseToHigherTierLeaves(mildleavesinput,blandinput,mildsbinput,0);\n\t\tmildquesoinput += outputmildqueso;\n\n\t\tvar outputmediumqueso = convertCheeseToHigherTierLeaves(mediumleavesinput,mildquesoinput,mediumsbinput,1);\n\t\tmediumquesoinput += outputmediumqueso;\n\n\t\tnachoreoutput += mediumquesoinput * rateofnachores[2];\n\n\t\tvar outputflaminqueso = convertCheeseToHigherTierLeaves(flaminleavesinput,totalhotquesoinput,flaminsbinput,3);\n\t\tflaminquesoinput += outputflaminqueso;\n\n\t\tnachoreoutput += flaminquesoinput * rateofnachores[4];\n\t\tbreak;\n\n\t\tcase blandtomildinput === 1 && mildtomediuminput === 1 && mediumtohotinput === 1 && hottoflamininput === 0:\n\t\tvar outputmildqueso = convertCheeseToHigherTierLeaves(mildleavesinput,blandinput,mildsbinput,0);\n\t\tmildquesoinput += outputmildqueso;\n\n\t\tvar outputmediumqueso = convertCheeseToHigherTierLeaves(mediumleavesinput,mildquesoinput,mediumsbinput,1);\n\t\tmediumquesoinput += outputmediumqueso;\n\n\t\tvar outputhotqueso = convertCheeseToHigherTierLeaves(hotleavesinput,mediumquesoinput,hotsbinput,2);\n\t\thotquesoinput += outputhotqueso;\n\n\t\tnachoreoutput += hotquesoinput * rateofnachores[3];\t\n\t\tnachoreoutput += totalflaminquesoinput * rateofnachores[4];\n\t\tbreak;\n\n\t\tdefault:\n\t\toutputtext+=\"Error at line 412\";\n\t}\n}\nconsole.log(nachoreoutput);\noutputtext += \"-> You will get an estimation of \"+ Math.floor(nachoreoutput)+\" nachores.\";\n\nreturn outputtext;\n}", "title": "" }, { "docid": "d4fbbd4929d3a5fe33ed4dcfa99f846a", "score": "0.5003831", "text": "function solve() {\n\n\n\n}", "title": "" }, { "docid": "6463afec96f82e628b0ff67ebb450302", "score": "0.5000373", "text": "function pa(){}", "title": "" }, { "docid": "d4be77b7b56d98cc8256e53d989c8e77", "score": "0.4997139", "text": "function T$a(){this.D=0;this.H=[];this.F=[];this.O=this.V=this.C=this.L=this.Z=this.J=0;this.qa=[]}", "title": "" }, { "docid": "8f651f2047481498697f8e987f85aefd", "score": "0.49934813", "text": "function chooseA() { checkAnswer(0); }", "title": "" }, { "docid": "c928468a3b98d4bf30c97173880f4fe1", "score": "0.49905", "text": "function solution(S, P, Q) {\n // write your code in JavaScript (Node.js 8.9.4)\n let result = P.map((e, i) => S.slice(e, Q[i] + 1));\n \n return result.map(e => {\n if (e.indexOf(\"A\") > -1) {\n return 1; \n } else if (e.indexOf(\"C\") > -1) {\n return 2;\n } else if (e.indexOf(\"G\") > -1) {\n return 3;\n } else {\n return 4;\n }\n });\n}", "title": "" }, { "docid": "70189b49de2054a19eb5f0a6ba0e0a6f", "score": "0.4984949", "text": "function FRONT() {\n var p00 = [\n [52.5, 5.4, 0],\n [52.5, 1.8, 0],\n [0, -3.6, 0],\n [0, -3.6, 0]\n ];\n var p01 = [\n [52.5, 1.8, 0],\n [50.7, 0, 0],\n [0, -3.6, 0],\n [-3.6, 0, 0]\n ];\n var p02 = [\n [50.7, 0, 0],\n [1.8, 0, 0],\n [-3.6, 0, 0],\n [-3.6, 0, 0]\n ];\n var p03 = [\n [1.8, 0, 0],\n [0, 1.8, 0],\n [-3.6, 0, 0],\n [0, 3.6, 0]\n ];\n var p04 = [\n [0, 1.8, 0],\n [0, 5.4, 0],\n [0, 3.6, 0],\n [0, 3.6, 0]\n ];\n\n var p05 = [\n [0, 5.4, 0],\n [0, 36.7, 0],\n [0, 3.6, 0],\n [0, 3.6, 0]\n ];\n var p06 = [\n [0, 36.7, 0],\n [1.8, 38.5, 0],\n [0, 3.6, 0],\n [3.6, 0, 0]\n ];\n var p07 = [\n [1.8, 38.5, 0],\n [50.7, 38.5, 0],\n [3.6, 0, 0],\n [3.6, 0, 0]\n ];\n var p08 = [\n [50.7, 38.5, 0],\n [52.5, 36.7, 0],\n [3.6, 0, 0],\n [0, -3.6, 0]\n ];\n var p09 = [\n [52.5, 36.7, 0],\n [52.5, 5.4, 0],\n [0, -3.6, 0],\n [0, -3.6, 0]\n ];\n\n var p100 = [\n [50.7, 5.4, 0],\n [50.7, 1.8, 0],\n [0, -3.6, 0],\n [0, -3.6, 0]\n ];\n var p101 = [\n [50.7, 1.8, 0]\n ];\n var p102 = [\n [50.7, 5.4, 0],\n [1.8, 5.4, 0],\n [-3.6, 0, 0],\n [-3.6, 0, 0]\n ];\n var p103 = [\n [1.8, 1.8, 0]\n ];\n var p104 = [\n [1.8, 1.8, 0],\n [1.8, 5.4, 0],\n [0, 1.8, 0],\n [0, 1.8, 0]\n ];\n\n var p105 = [\n [1.8, 5.4, 0],\n [1.8, 36.7, 0],\n [0, 1.8, 0],\n [0, 1.8, 0]\n ];\n var p106 = [\n [1.8, 36.7, 0]\n ];\n var p107 = [\n [1.8, 36.7, 0],\n [50.7, 36.7, 0],\n [1.8, 0, 0],\n [1.8, 0, 0]\n ];\n var p108 = [\n [50.7, 36.7, 0]\n ];\n var p109 = [\n [50.7, 36.7, 0],\n [50.7, 5.4, 0],\n [0, -3.6, 0],\n [0, -3.6, 0]\n ];\n\n var c00 = CUBIC_HERMITE(S0)(p00);\n var c01 = CUBIC_HERMITE(S0)(p01);\n var c02 = CUBIC_HERMITE(S0)(p02);\n var c03 = CUBIC_HERMITE(S0)(p03);\n var c04 = CUBIC_HERMITE(S0)(p04);\n var c05 = CUBIC_HERMITE(S0)(p05);\n var c06 = CUBIC_HERMITE(S0)(p06);\n var c07 = CUBIC_HERMITE(S0)(p07);\n var c08 = CUBIC_HERMITE(S0)(p08);\n var c09 = CUBIC_HERMITE(S0)(p09);\n\n var c100 = CUBIC_HERMITE(S0)(p100);\n var c101 = BEZIER(S0)(p101);\n var c102 = CUBIC_HERMITE(S0)(p102);\n var c103 = BEZIER(S0)(p103);\n var c104 = CUBIC_HERMITE(S0)(p104);\n\n var c105 = CUBIC_HERMITE(S0)(p105);\n var c106 = BEZIER(S0)(p106);\n var c107 = CUBIC_HERMITE(S0)(p107);\n var c108 = BEZIER(S0)(p108);\n var c109 = CUBIC_HERMITE(S0)(p109);\n\n var s0 = BEZIER(S1)([c00, c100]);\n var s1 = BEZIER(S1)([c01, c101]);\n var s2 = BEZIER(S1)([c02, c102]);\n var s3 = BEZIER(S1)([c03, c103]);\n var s4 = BEZIER(S1)([c04, c104]);\n var s5 = BEZIER(S1)([c05, c105]);\n var s6 = BEZIER(S1)([c06, c106]);\n var s7 = BEZIER(S1)([c07, c107]);\n var s8 = BEZIER(S1)([c08, c108]);\n var s9 = BEZIER(S1)([c09, c109]);\n\n var surf0 = MAP(s0)(domain2);\n var surf1 = MAP(s1)(domain2);\n var surf2 = MAP(s2)(domain2);\n var surf3 = MAP(s3)(domain2);\n var surf4 = MAP(s4)(domain2);\n var surf5 = MAP(s5)(domain2);\n var surf6 = MAP(s6)(domain2);\n var surf7 = MAP(s7)(domain2);\n var surf8 = MAP(s8)(domain2);\n var surf9 = MAP(s9)(domain2);\n\n var bottomSurface = COLOR([1, 1, 1, 1])(STRUCT([surf0, surf1, surf2, surf3, surf4]));\n\n var topFrame = T([0, 1])([1.8, 5.4])(SIMPLEX_GRID([\n [48.9],\n [1.8]\n ]));\n var topSurface = COLOR([0, 0, 0, 1])(STRUCT([surf5, surf6, surf7, surf8, surf9, topFrame]));\n\n var display = COLOR([0, .5, 1, 1])(T([0, 1])([1.8, 7.2])(SIMPLEX_GRID([\n [48.9],\n [29.5]\n ])));\n\n return STRUCT([bottomSurface, topSurface, display]);\n }", "title": "" }, { "docid": "2d7e419c620b3efb664e2a4030b86b28", "score": "0.49828157", "text": "function assignment6_9Q2() {\r\n var a = 2, b = 1;\r\n var result = --a - --b + ++b + b--;\r\n document.write(\"<p>a is \" + a + \"</p>\");\r\n document.write(\"<p>b is \" + b + \"</p>\");\r\n document.write(\"<p>result is \" + result + \"</p>\");\r\n document.write(\"</br>Press refresh to go home page\");\r\n}", "title": "" }, { "docid": "70a8aef90028350f2edf0b8104a30f2a", "score": "0.4974663", "text": "function r(A,e){0}", "title": "" }, { "docid": "70a8aef90028350f2edf0b8104a30f2a", "score": "0.4974663", "text": "function r(A,e){0}", "title": "" }, { "docid": "4d1ef5f0714ac4863a4b824ca004933d", "score": "0.49739027", "text": "function main() {\n const choice = ['stein', 'saks', 'papir'];\n const number_of_attempts = 5;\n const Cheet_code = 'bombe';\n\n // Siden vi henger ut brukerens valg inne funksjonen er det ikke nødvendig å sende noe inn her.\n play(choice, number_of_attempts, Cheet_code);\n /*\n * \n * Kan du skrive logikken i play() anderledes?\n * Hvordan sikrer du at brukeren holder seg til spillereglene?\n */ \n}", "title": "" }, { "docid": "af9d301580badd4f7f97b597ed78b4b4", "score": "0.4972598", "text": "function vzb(){this.F=0;this.J=[];this.H=[];this.O=this.V=this.C=this.N=this.X=this.L=0;this.ga=[]}", "title": "" }, { "docid": "17f31c124179ecc7c589566e0a3f69e5", "score": "0.49725378", "text": "function LE1001() {\n calculatefor(new Array(\n \" 1001 to 1100\",\n// 1001 3 12\n2086743.844653, 8.0, 1555.8, \" 1.981\", \" 1.000\", 2,\n -4.32065, 0.99673, 0.27158,\n -2.34148, -1.32146, 0.00000, 0.27168, 0.00000, 1.86366, 2.88512,\n 177.4829574, 0.53021, -2.690e-04,\n 1.6256100, -0.29142, 3.600e-05,\n// 1001 9 5\n2086921.187886, 17.0, 1553.1, \" 1.931\", \" 0.853\", 2,\n -7.66538, 0.90569, 0.24678,\n -3.42405, -2.14578, 0.00000, -0.49074, 0.00000, 1.16482, 2.44160,\n 349.4670114, 0.44183, -8.300e-05,\n -5.0514397, 0.23815, 1.930e-04,\n// 1002 3 1\n2087098.494379, 0.0, 1550.5, \" 2.397\", \" 1.439\", 1,\n-13.01557, 1.02411, 0.27905,\n -2.75668, -1.84379, -0.84675, -0.13490, 0.57695, 1.57406, 2.48722,\n 167.7222755, 0.56357, -2.820e-04,\n 5.0267802, -0.30215, -2.300e-04,\n// 1002 8 25\n2087275.187859, 17.0, 1547.8, \" 2.520\", \" 1.444\", 1,\n -8.40410, 0.90448, 0.24645,\n -3.57754, -2.40597, -1.27503, -0.49138, 0.29206, 1.42294, 2.59588,\n 338.9255979, 0.44888, -3.480e-04,\n -8.6926400, 0.22798, 2.250e-04,\n// 1003 2 19\n2087453.155971, 16.0, 1545.1, \" 1.115\", \" 0.135\", 2,\n-21.71049, 1.00457, 0.27372,\n -2.41566, -0.92134, 0.00000, -0.25669, 0.00000, 0.41033, 1.90360,\n 157.6571995, 0.55366, -2.180e-04,\n 8.3850604, -0.27785, -4.740e-04,\n// 1003 8 14\n2087629.341649, 20.0, 1542.5, \" 1.159\", \" 0.130\", 2,\n -6.13462, 0.94271, 0.25687,\n -2.16153, -0.49740, 0.00000, 0.19958, 0.00000, 0.89328, 2.56044,\n 328.0489315, 0.50212, -6.350e-04,\n -12.0792194, 0.22929, 3.560e-04,\n// 1004 1 10\n2087778.002750, 12.0, 1540.2, \" 0.770\", \"-0.301\", 3,\n -4.36576, 0.92710, 0.25261,\n -1.99255, 0.00000, 0.00000, 0.06600, 0.00000, 0.00000, 2.12616,\n 117.7527072, 0.54464, -3.660e-04,\n 22.2003807, -0.14358, -9.570e-04,\n// 1004 7 4\n2087954.476849, 23.0, 1537.6, \" 1.112\", \" 0.162\", 2,\n -5.77071, 1.01417, 0.27634,\n -1.67811, -0.27711, 0.00000, 0.44438, 0.00000, 1.16422, 2.56602,\n 289.1564137, 0.66474, -8.460e-04,\n -23.3765905, 0.13782, 1.373e-03,\n// 1004 12 29\n2088132.032782, 13.0, 1534.9, \" 1.997\", \" 0.892\", 2,\n -4.10175, 0.89977, 0.24517,\n -3.21304, -1.90367, 0.00000, -0.21324, 0.00000, 1.47733, 2.78614,\n 105.5048188, 0.52695, -3.590e-04,\n 23.2388495, -0.09775, -8.840e-04,\n// 1005 6 24\n2088309.193542, 17.0, 1532.3, \" 2.461\", \" 1.517\", 1,\n-12.46016, 1.01989, 0.27789,\n -2.98472, -2.08873, -1.11009, -0.35498, 0.40025, 1.37893, 2.27423,\n 278.6416926, 0.68163, -3.980e-04,\n -23.5131397, 0.09604, 1.497e-03,\n// 1005 12 18\n2088486.013714, 12.0, 1529.6, \" 2.561\", \" 1.474\", 1,\n -5.84321, 0.91579, 0.24953,\n -2.73316, -1.56630, -0.45821, 0.32913, 1.11615, 2.22407, 3.39288,\n 92.6224263, 0.55421, -3.930e-04,\n 23.3923000, -0.05649, -9.610e-04,\n// 1006 6 14\n2088663.837791, 8.0, 1527.0, \" 1.815\", \" 0.835\", 2,\n-22.15782, 0.98241, 0.26768,\n -2.48421, -1.41257, 0.00000, 0.10698, 0.00000, 1.62799, 2.69760,\n 267.2390470, 0.63668, 6.400e-05,\n -22.9983910, 0.04249, 1.289e-03,\n// 1006 12 7\n2088840.238678, 18.0, 1524.4, \" 1.297\", \" 0.265\", 2,\n -0.56551, 0.96473, 0.26287,\n -2.67730, -1.22652, 0.00000, -0.27174, 0.00000, 0.68017, 2.13344,\n 80.7155283, 0.61347, -3.300e-04,\n 22.4503588, -0.01496, -1.152e-03,\n// 1007 5 5\n2088988.681252, 4.0, 1522.1, \" 0.328\", \"-0.731\", 3,\n -4.81308, 0.91093, 0.24821,\n -1.07210, 0.00000, 0.00000, 0.35004, 0.00000, 0.00000, 1.77499,\n 226.0997521, 0.52457, 4.290e-04,\n -18.7809097, -0.09642, 7.090e-04,\n// 1007 6 3\n2089018.234976, 18.0, 1521.7, \" 0.331\", \"-0.702\", 3,\n-12.86917, 0.93054, 0.25355,\n -1.75006, 0.00000, 0.00000, -0.36058, 0.00000, 0.00000, 1.03274,\n 256.3339669, 0.56819, 2.210e-04,\n -21.6626485, -0.00291, 9.650e-04,\n// 1007 10 28\n2089165.313211, 20.0, 1519.5, \" 0.653\", \"-0.315\", 3,\n -1.20435, 1.02397, 0.27900,\n -2.18059, 0.00000, 0.00000, -0.48294, 0.00000, 0.00000, 1.21461,\n 38.1145285, 0.64660, 4.300e-04,\n 16.3202299, 0.14539, -9.960e-04,\n// 1007 11 27\n2089194.753140, 6.0, 1519.1, \" 0.139\", \"-0.844\", 3,\n-13.27138, 1.01263, 0.27591,\n -0.75879, 0.00000, 0.00000, 0.07536, 0.00000, 0.00000, 0.90674,\n 68.8135958, 0.66547, -1.800e-05,\n 20.6309894, 0.03533, -1.282e-03,\n// 1008 4 23\n2089342.706806, 5.0, 1516.9, \" 1.675\", \" 0.602\", 2,\n -4.54907, 0.90127, 0.24558,\n -2.86760, -1.49617, 0.00000, -0.03666, 0.00000, 1.42244, 2.79467,\n 215.7035348, 0.49806, 2.240e-04,\n -14.9098590, -0.11720, 5.500e-04,\n// 1008 10 17\n2089519.968667, 11.0, 1514.3, \" 1.865\", \" 0.885\", 2,\n-10.90201, 1.00818, 0.27470,\n -2.29767, -1.26437, 0.00000, 0.24801, 0.00000, 1.76140, 2.79352,\n 27.4631798, 0.60903, 5.550e-04,\n 11.9634195, 0.16535, -6.070e-04,\n// 1009 4 12\n2089696.814948, 8.0, 1511.7, \" 2.692\", \" 1.653\", 1,\n -2.27958, 0.93301, 0.25422,\n -3.41593, -2.33675, -1.28867, -0.44124, 0.40586, 1.45368, 2.53507,\n 205.7318275, 0.51938, 5.000e-05,\n -10.5993001, -0.14470, 4.800e-04,\n// 1009 10 6\n2089874.470289, 23.0, 1509.0, \" 2.559\", \" 1.531\", 1,\n-23.60788, 0.95835, 0.26113,\n -2.58946, -1.54328, -0.50241, 0.28693, 1.07666, 2.11774, 3.16148,\n 17.4977613, 0.53929, 4.300e-04,\n 7.3111600, 0.16486, -2.500e-04,\n// 1010 4 1\n2090051.211395, 17.0, 1506.4, \" 1.319\", \" 0.332\", 2,\n-17.99367, 0.98550, 0.26853,\n -2.27016, -0.96265, 0.00000, 0.07349, 0.00000, 1.10712, 2.41629,\n 195.7944077, 0.56734, -4.900e-05,\n -5.8871599, -0.17693, 3.570e-04,\n// 1010 9 26\n2090228.681801, 4.0, 1503.8, \" 1.203\", \" 0.126\", 2,\n-19.33292, 0.91205, 0.24851,\n -2.14162, -0.34548, 0.00000, 0.36323, 0.00000, 1.07404, 2.86817,\n 7.5173105, 0.48256, 1.750e-04,\n 2.3716999, 0.15785, -4.400e-05,\n// 1011 2 20\n2090376.479998, 0.0, 1501.6, \" 0.852\", \"-0.110\", 3,\n-13.61882, 1.02345, 0.27886,\n -2.37843, 0.00000, 0.00000, -0.48005, 0.00000, 0.00000, 1.41900,\n 159.2330061, 0.61515, -2.200e-04,\n 7.6317102, -0.18378, -4.470e-04,\n// 1011 3 22\n2090405.842443, 8.0, 1501.2, \" 0.083\", \"-0.872\", 3,\n -3.69133, 1.02155, 0.27835,\n -0.42024, 0.00000, 0.00000, 0.21863, 0.00000, 0.00000, 0.85607,\n 186.3657823, 0.60226, -3.300e-05,\n -1.1196400, -0.19986, 8.500e-05,\n// 1011 8 16\n2090553.009614, 12.0, 1499.0, \" 0.558\", \"-0.506\", 3,\n-14.02103, 0.91204, 0.24851,\n -1.58729, 0.00000, 0.00000, 0.23073, 0.00000, 0.00000, 2.04696,\n 329.7327917, 0.49939, -3.540e-04,\n -11.1583298, 0.13176, 3.790e-04,\n// 1012 2 10\n2090731.106947, 15.0, 1496.4, \" 2.094\", \" 1.098\", 1,\n-23.31647, 0.99161, 0.27019,\n -3.10226, -2.07871, -0.82044, -0.43327, -0.04536, 1.21321, 2.23490,\n 149.3283848, 0.59217, -1.140e-04,\n 12.1327297, -0.15336, -6.870e-04,\n// 1012 8 4\n2090907.248798, 18.0, 1493.8, \" 1.991\", \" 0.981\", 2,\n -8.74333, 0.95773, 0.26096,\n -2.77044, -1.67309, 0.00000, -0.02885, 0.00000, 1.61415, 2.71411,\n 319.6909110, 0.56577, -5.710e-04,\n -15.2830298, 0.12088, 6.580e-04,\n// 1013 1 30\n2091085.504462, 0.0, 1491.2, \" 2.331\", \" 1.276\", 1,\n-15.03056, 0.93845, 0.25570,\n -2.81661, -1.69399, -0.53149, 0.10709, 0.74628, 1.90899, 3.02902,\n 138.5172882, 0.54733, -1.020e-04,\n 16.4052794, -0.11303, -7.530e-04,\n// 1013 7 25\n2091261.787657, 7.0, 1488.6, \" 2.302\", \" 1.343\", 1,\n-20.44647, 1.00681, 0.27433,\n -2.74582, -1.80869, -0.75857, -0.09622, 0.56574, 1.61566, 2.55418,\n 309.5294200, 0.64287, -5.850e-04,\n -18.9017699, 0.10132, 1.075e-03,\n// 1014 1 19\n2091439.595010, 2.0, 1486.0, \" 1.026\", \"-0.073\", 3,\n-13.76381, 0.90257, 0.24593,\n -2.11574, 0.00000, 0.00000, 0.28024, 0.00000, 0.00000, 2.67643,\n 127.1233032, 0.52309, -1.840e-04,\n 20.1128000, -0.07562, -7.820e-04,\n// 1014 6 15\n2091587.205072, 17.0, 1483.9, \" 0.101\", \"-0.849\", 3,\n-13.06340, 1.01289, 0.27599,\n -0.78452, 0.00000, 0.00000, -0.07826, 0.00000, 0.00000, 0.63064,\n 269.0589919, 0.67020, 4.450e-04,\n -22.0662102, -0.05904, 1.349e-03,\n// 1014 7 14\n2091616.490088, 0.0, 1483.5, \" 0.976\", \" 0.033\", 2,\n -4.13865, 1.02292, 0.27872,\n -2.23550, -0.56536, 0.00000, -0.23789, 0.00000, 0.09005, 1.75979,\n 299.2216537, 0.68163, -2.790e-04,\n -21.9032299, 0.06732, 1.408e-03,\n// 1014 12 9\n2091763.822072, 8.0, 1481.3, \" 0.491\", \"-0.582\", 3,\n-10.45741, 0.92774, 0.25279,\n -1.96034, 0.00000, 0.00000, -0.27027, 0.00000, 0.00000, 1.41658,\n 82.7354475, 0.56144, 9.600e-05,\n 22.1989703, 0.07338, -9.870e-04,\n// 1015 6 5\n2091941.796872, 7.0, 1478.7, \" 1.399\", \" 0.405\", 2,\n-23.76380, 0.96748, 0.26361,\n -2.31450, -1.02485, 0.00000, 0.12494, 0.00000, 1.27718, 2.56430,\n 257.8784913, 0.60693, 6.950e-04,\n -22.3237100, -0.09932, 1.086e-03,\n// 1015 11 28\n2092118.136832, 15.0, 1476.1, \" 1.828\", \" 0.814\", 2,\n -4.17697, 0.98055, 0.26718,\n -2.34143, -1.22388, 0.00000, 0.28398, 0.00000, 1.79027, 2.90986,\n 70.3075358, 0.61466, 3.100e-04,\n 21.7558191, 0.13172, -1.189e-03,\n// 1016 5 24\n2092296.106968, 15.0, 1473.6, \" 2.823\", \" 1.775\", 1,\n-16.48062, 0.91858, 0.25029,\n -3.47005, -2.36456, -1.30964, -0.43277, 0.44436, 1.49949, 2.60297,\n 246.8429546, 0.53721, 6.430e-04,\n -21.8452894, -0.12737, 8.310e-04,\n// 1016 11 17\n2092472.710317, 5.0, 1471.0, \" 2.607\", \" 1.633\", 1,\n-14.87736, 1.02051, 0.27806,\n -2.61847, -1.69819, -0.74059, 0.04760, 0.83568, 1.79322, 2.71434,\n 58.7762777, 0.64601, 6.910e-04,\n 20.5891306, 0.18786, -1.229e-03,\n// 1017 5 13\n2092650.162066, 16.0, 1468.4, \" 1.540\", \" 0.469\", 2,\n-16.21661, 0.89966, 0.24514,\n -2.87276, -1.42860, 0.00000, -0.11041, 0.00000, 1.20777, 2.65236,\n 235.2075635, 0.49953, 4.970e-04,\n -20.3930307, -0.15606, 7.150e-04,\n// 1017 11 6\n2092827.366958, 21.0, 1465.9, \" 1.378\", \" 0.402\", 2,\n-23.57228, 1.01626, 0.27691,\n -2.49635, -1.28685, 0.00000, -0.19300, 0.00000, 0.90214, 2.11102,\n 47.6035293, 0.61975, 9.580e-04,\n 18.7082894, 0.22370, -9.690e-04,\n// 1018 4 3\n2092974.701458, 5.0, 1463.7, \" 0.476\", \"-0.550\", 3,\n -5.89104, 0.94735, 0.25813,\n -1.78023, 0.00000, 0.00000, -0.16501, 0.00000, 0.00000, 1.44626,\n 197.6579701, 0.48803, 3.100e-05,\n -6.2155400, -0.25276, 3.280e-04,\n// 1018 5 2\n2093004.233949, 18.0, 1463.3, \" 0.202\", \"-0.844\", 3,\n-14.94986, 0.92301, 0.25150,\n -1.49879, 0.00000, 0.00000, -0.38523, 0.00000, 0.00000, 0.72442,\n 224.1448563, 0.50811, 3.970e-04,\n -18.3191291, -0.19252, 7.370e-04,\n// 1018 9 27\n2093152.353468, 20.0, 1461.2, \" 0.565\", \"-0.477\", 3,\n -3.21933, 0.94293, 0.25693,\n -1.27203, 0.00000, 0.00000, 0.48323, 0.00000, 0.00000, 2.24113,\n 9.3644105, 0.47745, 2.960e-04,\n 2.7465100, 0.25747, 1.000e-05,\n// 1018 10 27\n2093181.912461, 10.0, 1460.7, \" 0.053\", \"-0.967\", 3,\n-11.27542, 0.97133, 0.26466,\n -0.64141, 0.00000, 0.00000, -0.10093, 0.00000, 0.00000, 0.44504,\n 36.4437311, 0.54755, 8.740e-04,\n 16.1002995, 0.23210, -5.990e-04,\n// 1019 3 23\n2093329.173873, 16.0, 1458.6, \" 1.899\", \" 0.923\", 2,\n-19.59965, 0.99923, 0.27227,\n -2.40362, -1.37582, 0.00000, 0.17296, 0.00000, 1.72053, 2.74966,\n 187.4323983, 0.53410, -6.200e-05,\n -2.6603702, -0.29104, 2.170e-04,\n// 1019 9 16\n2093506.488354, 0.0, 1456.1, \" 1.843\", \" 0.760\", 2,\n-23.94711, 0.90441, 0.24643,\n -3.18565, -1.86961, 0.00000, -0.27951, 0.00000, 1.31112, 2.62574,\n 359.2963639, 0.43718, 4.300e-05,\n -0.8585300, 0.24062, 6.400e-05,\n// 1020 3 12\n2093683.836552, 8.0, 1453.5, \" 2.463\", \" 1.508\", 1,\n -4.29457, 1.02413, 0.27905,\n -2.55109, -1.64624, -0.66860, 0.07726, 0.82313, 1.80084, 2.70583,\n 177.6029228, 0.55855, -5.000e-05,\n 0.8246800, -0.30751, -3.500e-05,\n// 1020 9 4\n2093860.481539, 0.0, 1451.0, \" 2.627\", \" 1.550\", 1,\n -0.68584, 0.90575, 0.24680,\n -3.53940, -2.37510, -1.27394, -0.44307, 0.38760, 1.48867, 2.65443,\n 348.8715555, 0.44160, -2.310e-04,\n -4.6466998, 0.23785, 9.300e-05,\n// 1021 3 1\n2094038.499586, 0.0, 1448.4, \" 1.164\", \" 0.185\", 2,\n-12.98949, 1.00214, 0.27306,\n -2.20909, -0.78485, 0.00000, -0.00994, 0.00000, 0.76735, 2.19046,\n 167.6961979, 0.54020, -2.300e-05,\n 4.3164102, -0.28874, -2.880e-04,\n// 1021 8 25\n2094214.646344, 4.0, 1445.9, \" 1.271\", \" 0.242\", 2,\n-21.41361, 0.94581, 0.25771,\n -2.92175, -1.42184, 0.00000, -0.48773, 0.00000, 0.44346, 1.94641,\n 338.5150216, 0.49051, -5.090e-04,\n -8.1667001, 0.24787, 1.910e-04,\n// 1022 1 20\n2094363.341743, 20.0, 1443.8, \" 0.745\", \"-0.327\", 3,\n-19.64475, 0.92479, 0.25198,\n -1.83295, 0.00000, 0.00000, 0.20184, 0.00000, 0.00000, 2.23821,\n 129.3052208, 0.52147, -4.020e-04,\n 19.7759094, -0.17696, -8.170e-04,\n// 1022 7 16\n2094539.788466, 7.0, 1441.3, \" 0.987\", \" 0.037\", 2,\n-21.04971, 1.01595, 0.27682,\n -2.10034, -0.42913, 0.00000, -0.07681, 0.00000, 0.27386, 1.94565,\n 300.6996793, 0.64559, -9.560e-04,\n -21.5946010, 0.18305, 1.206e-03,\n// 1022 8 14\n2094569.119236, 15.0, 1440.8, \" 0.009\", \"-0.964\", 3,\n-11.12222, 0.99770, 0.27185,\n -0.35423, 0.00000, 0.00000, -0.13834, 0.00000, 0.00000, 0.07321,\n 328.1081902, 0.56046, -7.000e-04,\n -11.3381704, 0.25487, 4.360e-04,\n// 1023 1 9\n2094717.365003, 21.0, 1438.7, \" 1.979\", \" 0.874\", 2,\n-19.38074, 0.89952, 0.24510,\n -3.23298, -1.91962, 0.00000, -0.23992, 0.00000, 1.43981, 2.75267,\n 117.4611674, 0.51068, -4.610e-04,\n 21.6103599, -0.13526, -7.840e-04,\n// 1023 7 6\n2094894.504454, 0.0, 1436.2, \" 2.327\", \" 1.382\", 1,\n -4.74189, 1.01868, 0.27756,\n -2.50784, -1.59838, -0.57662, 0.10689, 0.79058, 1.81237, 2.72099,\n 289.6637875, 0.66583, -5.720e-04,\n -22.6174099, 0.14209, 1.398e-03,\n// 1023 12 29\n2095071.354204, 20.0, 1433.7, \" 2.571\", \" 1.487\", 1,\n-21.12221, 0.91771, 0.25005,\n -2.55340, -1.39354, -0.29157, 0.50090, 1.29305, 2.39485, 3.55674,\n 104.6616319, 0.54687, -5.570e-04,\n 22.7380908, -0.09891, -9.010e-04,\n// 1024 6 24\n2095249.136618, 15.0, 1431.2, \" 1.953\", \" 0.970\", 2,\n-14.43955, 0.97918, 0.26680,\n -2.37204, -1.32524, 0.00000, 0.27884, 0.00000, 1.88421, 2.92899,\n 278.4745169, 0.62638, -1.400e-04,\n -22.8741089, 0.08764, 1.263e-03,\n// 1024 12 18\n2095425.595863, 2.0, 1428.6, \" 1.304\", \" 0.275\", 2,\n-15.84451, 0.96754, 0.26363,\n -2.10057, -0.66756, 0.00000, 0.30072, 0.00000, 1.26620, 2.70175,\n 92.5010880, 0.61517, -5.410e-04,\n 22.7375205, -0.06179, -1.150e-03,\n// 1025 5 15\n2095573.956680, 11.0, 1426.6, \" 0.181\", \"-0.879\", 3,\n-21.09481, 0.90911, 0.24771,\n -1.11178, 0.00000, 0.00000, -0.03969, 0.00000, 0.00000, 1.03539,\n 237.0892806, 0.53701, 3.630e-04,\n -21.4768793, -0.06537, 8.440e-04,\n// 1025 6 14\n2095603.513844, 0.0, 1426.1, \" 0.474\", \"-0.563\", 3,\n -6.15364, 0.92770, 0.25278,\n -1.31380, 0.00000, 0.00000, 0.33225, 0.00000, 0.00000, 1.98151,\n 267.1551176, 0.56580, 5.300e-05,\n -22.3451312, 0.03656, 9.950e-04,\n// 1025 11 8\n2095750.676321, 4.0, 1424.0, \" 0.636\", \"-0.333\", 3,\n-16.48334, 1.02447, 0.27914,\n -1.44619, 0.00000, 0.00000, 0.23170, 0.00000, 0.00000, 1.90952,\n 48.8342509, 0.66616, 4.280e-04,\n 19.4617908, 0.11212, -1.223e-03,\n// 1025 12 7\n2095780.120799, 15.0, 1423.6, \" 0.148\", \"-0.833\", 3,\n -3.54764, 1.01432, 0.27638,\n -0.95977, 0.00000, 0.00000, -0.10081, 0.00000, 0.00000, 0.75561,\n 80.8900055, 0.67378, -2.380e-04,\n 21.8040692, -0.01563, -1.361e-03,\n// 1026 5 4\n2095927.982082, 12.0, 1421.5, \" 1.534\", \" 0.464\", 2,\n-20.83080, 0.90213, 0.24581,\n -3.18037, -1.73938, 0.00000, -0.43003, 0.00000, 0.87867, 2.32059,\n 226.3399698, 0.51311, 2.140e-04,\n -18.1830803, -0.09273, 6.920e-04,\n// 1026 10 28\n2096105.323764, 20.0, 1419.0, \" 1.837\", \" 0.852\", 2,\n -1.17826, 1.00620, 0.27416,\n -2.77301, -1.72502, 0.00000, -0.22967, 0.00000, 1.26676, 2.31345,\n 38.5005606, 0.62389, 6.180e-04,\n 15.7582505, 0.13823, -8.450e-04,\n// 1027 4 23\n2096282.109035, 15.0, 1416.5, \" 2.812\", \" 1.778\", 1,\n-18.56132, 0.93591, 0.25501,\n -3.34863, -2.28272, -1.24917, -0.38315, 0.48256, 1.51586, 2.58405,\n 215.8584162, 0.53543, 9.100e-05,\n -14.2772904, -0.12572, 6.470e-04,\n// 1027 10 18\n2096459.807235, 7.0, 1414.0, \" 2.603\", \" 1.569\", 1,\n-14.88687, 0.95543, 0.26033,\n -2.52110, -1.46722, -0.43082, 0.37364, 1.17849, 2.21511, 3.26653,\n 27.8106008, 0.54706, 5.170e-04,\n 11.3704797, 0.14794, -4.420e-04,\n// 1028 4 12\n2096636.527977, 1.0, 1411.5, \" 1.422\", \" 0.440\", 2,\n -9.27266, 0.98841, 0.26932,\n -2.72273, -1.49939, 0.00000, -0.32856, 0.00000, 0.84008, 2.06506,\n 205.9832467, 0.58087, 5.800e-05,\n -9.9782404, -0.16227, 5.660e-04,\n// 1028 10 6\n2096813.996316, 12.0, 1409.1, \" 1.264\", \" 0.182\", 2,\n-10.61191, 0.91031, 0.24804,\n -2.64749, -0.93497, 0.00000, -0.08841, 0.00000, 0.75999, 2.47063,\n 17.8076299, 0.48641, 2.620e-04,\n 6.7196003, 0.14903, -2.050e-04,\n// 1029 3 3\n2096961.826338, 8.0, 1407.0, \" 0.794\", \"-0.165\", 3,\n -4.89781, 1.02267, 0.27865,\n -2.01176, 0.00000, 0.00000, -0.16788, 0.00000, 0.00000, 1.67680,\n 169.1536373, 0.60597, -6.700e-05,\n 3.4693899, -0.19597, -2.120e-04,\n// 1029 4 1\n2096991.173161, 16.0, 1406.6, \" 0.168\", \"-0.783\", 3,\n-18.97032, 1.02225, 0.27854,\n -0.74607, 0.00000, 0.00000, 0.15587, 0.00000, 0.00000, 1.05665,\n 196.2622073, 0.60853, 1.290e-04,\n -5.3716403, -0.19105, 3.190e-04,\n// 1029 8 26\n2097138.302616, 19.0, 1404.5, \" 0.455\", \"-0.610\", 3,\n -6.30277, 0.91398, 0.24904,\n -1.39209, 0.00000, 0.00000, 0.26278, 0.00000, 0.00000, 1.91541,\n 339.7588810, 0.49151, -2.950e-04,\n -7.2647804, 0.14809, 2.230e-04,\n// 1030 2 20\n2097316.451075, 23.0, 1402.0, \" 2.045\", \" 1.050\", 1,\n-14.59547, 0.98882, 0.26943,\n -2.83692, -1.80219, -0.45501, -0.17420, 0.10741, 1.45492, 2.48775,\n 159.5649260, 0.57616, -2.200e-05,\n 8.1993305, -0.17139, -4.760e-04,\n// 1030 8 16\n2097492.554851, 1.0, 1399.6, \" 1.882\", \" 0.871\", 2,\n -1.02507, 0.96102, 0.26185,\n -2.37774, -1.25922, 0.00000, 0.31643, 0.00000, 1.89067, 3.01185,\n 329.7923509, 0.55567, -5.350e-04,\n -11.8135097, 0.14529, 4.770e-04,\n// 1031 2 10\n2097670.838777, 8.0, 1397.1, \" 2.367\", \" 1.312\", 1,\n -6.30955, 0.93576, 0.25497,\n -2.80875, -1.68694, -0.54105, 0.13066, 0.80292, 1.94901, 3.06824,\n 149.2875676, 0.52946, -8.300e-05,\n 12.8304096, -0.13659, -5.830e-04,\n// 1031 8 5\n2097847.103448, 14.0, 1394.6, \" 2.421\", \" 1.462\", 1,\n-12.72820, 1.00912, 0.27496,\n -2.18011, -1.25543, -0.25109, 0.48275, 1.21628, 2.22043, 3.14642,\n 319.7676003, 0.62914, -5.970e-04,\n -15.9420406, 0.13388, 8.750e-04,\n// 1032 1 30\n2098024.921138, 10.0, 1392.1, \" 1.055\", \"-0.042\", 3,\n -5.04281, 0.90176, 0.24571,\n -2.31643, 0.00000, 0.00000, 0.10731, 0.00000, 0.00000, 2.53108,\n 138.4577973, 0.50724, -2.270e-04,\n 17.0751502, -0.10482, -6.430e-04,\n// 1032 7 25\n2098201.805416, 7.0, 1389.7, \" 1.098\", \" 0.153\", 2,\n-20.42038, 1.02242, 0.27858,\n -1.76364, -0.36647, 0.00000, 0.32999, 0.00000, 1.02702, 2.42362,\n 309.7741047, 0.66456, -3.740e-04,\n -19.5048602, 0.10615, 1.224e-03,\n// 1032 12 19\n2098349.168128, 16.0, 1387.6, \" 0.488\", \"-0.582\", 3,\n -1.73640, 0.93009, 0.25343,\n -1.64589, 0.00000, 0.00000, 0.03507, 0.00000, 0.00000, 1.71280,\n 94.6640928, 0.56938, -8.300e-05,\n 22.2784686, 0.03009, -1.002e-03,\n// 1033 6 15\n2098527.089368, 14.0, 1385.2, \" 1.251\", \" 0.253\", 2,\n-16.04553, 0.96409, 0.26269,\n -2.21082, -0.78748, 0.00000, 0.14483, 0.00000, 1.08007, 2.50094,\n 269.1442599, 0.61095, 5.100e-04,\n -22.7143490, -0.05471, 1.136e-03,\n// 1033 12 8\n2098703.498036, 0.0, 1382.7, \" 1.826\", \" 0.813\", 2,\n-18.45322, 0.98327, 0.26792,\n -2.66275, -1.55070, 0.00000, -0.04715, 0.00000, 1.45490, 2.56900,\n 82.5808871, 0.63243, 1.320e-04,\n 22.8363601, 0.08412, -1.282e-03,\n// 1034 6 4\n2098881.381642, 21.0, 1380.3, \" 2.669\", \" 1.619\", 1,\n -9.76509, 0.91626, 0.24966,\n -2.87971, -1.76457, -0.69148, 0.15941, 1.01057, 2.08384, 3.19707,\n 257.7274895, 0.54722, 5.240e-04,\n -22.9687104, -0.09027, 9.130e-04,\n// 1034 11 28\n2099058.078156, 14.0, 1377.8, \" 2.616\", \" 1.642\", 1,\n -5.15362, 1.02157, 0.27835,\n -2.78848, -1.86943, -0.91414, -0.12427, 0.66551, 1.62075, 2.54052,\n 70.7553776, 0.66961, 5.880e-04,\n 22.5165399, 0.14131, -1.405e-03,\n// 1035 5 24\n2099235.430436, 22.0, 1375.4, \" 1.695\", \" 0.625\", 2,\n -9.50108, 0.89991, 0.24521,\n -2.51192, -1.15332, 0.00000, 0.33047, 0.00000, 1.81414, 3.17324,\n 245.9974865, 0.51648, 4.390e-04,\n -22.3024903, -0.12462, 8.230e-04,\n// 1035 11 18\n2099412.731013, 6.0, 1372.9, \" 1.392\", \" 0.412\", 2,\n-13.84854, 1.01479, 0.27650,\n -2.77159, -1.56327, 0.00000, -0.45570, 0.00000, 0.65323, 1.86077,\n 59.3167095, 0.64355, 9.590e-04,\n 21.4066393, 0.18308, -1.185e-03,\n// 1036 4 13\n2099560.005385, 12.0, 1370.9, \" 0.374\", \"-0.646\", 3,\n-22.17277, 0.95047, 0.25898,\n -1.30933, 0.00000, 0.00000, 0.12925, 0.00000, 0.00000, 1.56348,\n 207.5188645, 0.50321, 1.600e-04,\n -10.0123393, -0.24030, 4.790e-04,\n// 1036 5 13\n2099589.516347, 0.0, 1370.5, \" 0.344\", \"-0.697\", 3,\n -8.23433, 0.92563, 0.25221,\n -1.03524, 0.00000, 0.00000, 0.39233, 0.00000, 0.00000, 1.81651,\n 234.5044365, 0.53015, 4.020e-04,\n -20.8408503, -0.16611, 8.740e-04,\n// 1036 10 8\n2099737.679698, 4.0, 1368.5, \" 0.506\", \"-0.543\", 3,\n-18.49833, 0.94012, 0.25616,\n -1.36510, 0.00000, 0.00000, 0.31275, 0.00000, 0.00000, 1.99350,\n 19.5710601, 0.48264, 4.460e-04,\n 6.9883200, 0.24676, -1.460e-04,\n// 1036 11 6\n2099767.261479, 18.0, 1368.1, \" 0.070\", \"-0.954\", 3,\n -2.55441, 0.96849, 0.26389,\n -0.35018, 0.00000, 0.00000, 0.27549, 0.00000, 0.00000, 0.90663,\n 47.3665696, 0.56624, 9.450e-04,\n 19.3056697, 0.20262, -7.870e-04,\n// 1037 4 2\n2099914.498956, 0.0, 1366.1, \" 1.807\", \" 0.836\", 2,\n-10.87864, 1.00167, 0.27293,\n -2.55925, -1.51854, 0.00000, -0.02505, 0.00000, 1.46715, 2.50909,\n 197.4597034, 0.54461, 1.380e-04,\n -6.8484501, -0.28352, 4.020e-04,\n// 1037 9 27\n2100091.794501, 7.0, 1363.6, \" 1.767\", \" 0.680\", 2,\n-16.22884, 0.90329, 0.24613,\n -2.81221, -1.45829, 0.00000, 0.06801, 0.00000, 1.59483, 2.94743,\n 9.1134301, 0.43811, 1.680e-04,\n 3.3437300, 0.23757, -6.300e-05,\n// 1038 3 23\n2100269.172620, 16.0, 1361.2, \" 2.542\", \" 1.590\", 1,\n-19.57356, 1.02400, 0.27901,\n -2.49243, -1.59504, -0.63497, 0.14289, 0.92078, 1.88092, 2.77831,\n 187.4735843, 0.56036, 1.850e-04,\n -3.4144299, -0.30555, 1.600e-04,\n// 1038 9 16\n2100445.782870, 7.0, 1358.8, \" 2.719\", \" 1.640\", 1,\n-16.96757, 0.90713, 0.24717,\n -3.31186, -2.15187, -1.06781, -0.21111, 0.64539, 1.72933, 2.89088,\n 358.6902256, 0.43962, -1.050e-04,\n -0.4647600, 0.24215, -3.600e-05,\n// 1039 3 13\n2100623.836674, 8.0, 1356.4, \" 1.227\", \" 0.248\", 2,\n -4.26848, 0.99958, 0.27236,\n -2.16717, -0.81219, 0.00000, 0.08018, 0.00000, 0.97491, 2.32868,\n 177.6328390, 0.53312, 1.840e-04,\n 0.0787100, -0.29246, -1.060e-04,\n// 1039 9 5\n2100799.957803, 11.0, 1354.0, \" 1.371\", \" 0.342\", 2,\n-13.69534, 0.94890, 0.25855,\n -2.50356, -1.10269, 0.00000, -0.01273, 0.00000, 1.07462, 2.47853,\n 348.2617289, 0.48482, -3.670e-04,\n -4.2306200, 0.25989, 4.100e-05,\n// 1040 2 1\n2100948.675238, 4.0, 1351.9, \" 0.708\", \"-0.364\", 3,\n-10.92375, 0.92252, 0.25137,\n -1.79073, 0.00000, 0.00000, 0.20572, 0.00000, 0.00000, 2.20377,\n 140.4894507, 0.49834, -3.670e-04,\n 16.6696402, -0.20383, -6.630e-04,\n// 1040 7 26\n2101125.103456, 14.0, 1349.5, \" 0.869\", \"-0.081\", 3,\n-13.33144, 1.01759, 0.27727,\n -1.43677, 0.00000, 0.00000, 0.48294, 0.00000, 0.00000, 2.40144,\n 311.2796969, 0.62513, -9.590e-04,\n -19.3003814, 0.22004, 1.023e-03,\n// 1040 8 24\n2101154.441410, 23.0, 1349.1, \" 0.113\", \"-0.860\", 3,\n -2.40121, 1.00041, 0.27259,\n -1.16834, 0.00000, 0.00000, -0.40617, 0.00000, 0.00000, 0.35235,\n 338.3750847, 0.54785, -5.360e-04,\n -7.5113503, 0.27519, 2.430e-04,\n// 1041 1 20\n2101302.692930, 5.0, 1347.1, \" 1.951\", \" 0.848\", 2,\n-10.65974, 0.89938, 0.24506,\n -3.35125, -2.03239, 0.00000, -0.36968, 0.00000, 1.29297, 2.61142,\n 129.0951242, 0.49135, -4.930e-04,\n 19.1671501, -0.16780, -6.560e-04,\n// 1041 7 16\n2101479.816271, 8.0, 1344.7, \" 2.197\", \" 1.249\", 1,\n-20.02089, 1.01733, 0.27720,\n -3.00447, -2.07704, -0.98769, -0.40950, 0.16895, 1.25830, 2.18474,\n 301.1366201, 0.64309, -6.710e-04,\n -20.8052685, 0.18622, 1.234e-03,\n// 1042 1 9\n2101656.693084, 5.0, 1342.3, \" 2.585\", \" 1.505\", 1,\n-11.39846, 0.91972, 0.25060,\n -3.41169, -2.26026, -1.16569, -0.36599, 0.43338, 1.52778, 2.68131,\n 117.0364662, 0.53209, -6.650e-04,\n 21.0539488, -0.14009, -7.850e-04,\n// 1042 7 5\n2101834.435161, 22.0, 1339.9, \" 2.091\", \" 1.104\", 1,\n -6.72128, 0.97592, 0.26591,\n -2.26007, -1.23046, 0.03988, 0.44387, 0.84867, 2.11933, 3.14689,\n 289.6402096, 0.60918, -2.970e-04,\n -21.9487805, 0.13030, 1.178e-03,\n// 1042 12 29\n2102010.952607, 11.0, 1337.6, \" 1.313\", \" 0.288\", 2,\n -6.12076, 0.97035, 0.26440,\n -2.53536, -1.12300, 0.00000, -0.13743, 0.00000, 0.84542, 2.26038,\n 104.8572281, 0.60737, -7.330e-04,\n 22.0263595, -0.11042, -1.071e-03,\n// 1043 5 26\n2102159.228358, 17.0, 1335.6, \" 0.028\", \"-1.033\", 3,\n-14.37928, 0.90743, 0.24725,\n 0.05371, 0.00000, 0.00000, 0.48060, 0.00000, 0.00000, 0.91062,\n 247.8914160, 0.54611, 2.430e-04,\n -23.4473598, -0.03142, 9.450e-04,\n// 1043 6 25\n2102188.791644, 7.0, 1335.2, \" 0.618\", \"-0.422\", 3,\n-22.43537, 0.92495, 0.25203,\n -1.86241, 0.00000, 0.00000, -0.00054, 0.00000, 0.00000, 1.86401,\n 278.6033343, 0.55706, -1.180e-04,\n -22.1903096, 0.07781, 9.730e-04,\n// 1043 11 19\n2102336.043245, 13.0, 1333.2, \" 0.625\", \"-0.344\", 3,\n -6.75960, 1.02481, 0.27924,\n -1.62818, 0.00000, 0.00000, 0.03789, 0.00000, 0.00000, 1.70392,\n 60.5947404, 0.68487, 3.120e-04,\n 22.0623084, 0.06874, -1.428e-03,\n// 1043 12 18\n2102365.489841, 0.0, 1332.8, \" 0.154\", \"-0.825\", 3,\n-17.82390, 1.01588, 0.27680,\n -1.11945, 0.00000, 0.00000, -0.24381, 0.00000, 0.00000, 0.62952,\n 93.0826854, 0.67298, -4.810e-04,\n 22.0336216, -0.06878, -1.357e-03,\n// 1044 5 14\n2102513.253236, 18.0, 1330.8, \" 1.385\", \" 0.318\", 2,\n-14.11527, 0.90315, 0.24609,\n -2.57566, -1.02904, 0.00000, 0.07768, 0.00000, 1.18343, 2.73110,\n 236.8100078, 0.52768, 1.510e-04,\n -20.8097713, -0.06409, 8.160e-04,\n// 1044 11 8\n2102690.682847, 4.0, 1328.4, \" 1.818\", \" 0.829\", 2,\n-16.45726, 1.00414, 0.27360,\n -2.15587, -1.09529, 0.00000, 0.38833, 0.00000, 1.87310, 2.93225,\n 49.2735277, 0.63882, 6.110e-04,\n 18.8939408, 0.10501, -1.057e-03,\n// 1045 5 3\n2102867.399389, 22.0, 1326.1, \" 2.803\", \" 1.775\", 1,\n-10.84305, 0.93893, 0.25584,\n -3.36528, -2.30927, -1.27961, -0.41467, 0.44996, 1.47939, 2.53772,\n 226.2913935, 0.55350, 8.500e-05,\n -17.5114200, -0.10022, 8.070e-04,\n// 1045 10 28\n2103045.148518, 16.0, 1323.7, \" 2.635\", \" 1.595\", 1,\n -5.16313, 0.95258, 0.25955,\n -3.34682, -2.28473, -1.24972, -0.43558, 0.37894, 1.41417, 2.47379,\n 38.9720690, 0.55919, 5.610e-04,\n 15.1816510, 0.12281, -6.380e-04,\n// 1046 4 23\n2103221.840715, 8.0, 1321.3, \" 1.535\", \" 0.559\", 2,\n -1.55439, 0.99130, 0.27010,\n -2.26677, -1.11379, 0.00000, 0.17715, 0.00000, 1.46622, 2.62083,\n 215.8317921, 0.59806, 1.260e-04,\n -13.5856996, -0.14140, 7.670e-04,\n// 1046 10 17\n2103399.316289, 20.0, 1318.9, \" 1.313\", \" 0.226\", 2,\n -1.89090, 0.90871, 0.24760,\n -3.01087, -1.34766, 0.00000, -0.40907, 0.00000, 0.53115, 2.19261,\n 28.2912685, 0.49461, 3.280e-04,\n 10.8206196, 0.13362, -3.640e-04,\n// 1047 3 14\n2103547.168081, 16.0, 1317.0, \" 0.726\", \"-0.231\", 3,\n-20.17680, 1.02172, 0.27839,\n -1.74233, 0.00000, 0.00000, 0.03395, 0.00000, 0.00000, 1.81119,\n 178.9830172, 0.60223, 1.040e-04,\n -0.8346100, -0.20036, 2.300e-05,\n// 1047 4 12\n2103576.500231, 0.0, 1316.6, \" 0.262\", \"-0.686\", 3,\n-10.24932, 1.02281, 0.27869,\n -1.10799, 0.00000, 0.00000, 0.00554, 0.00000, 0.00000, 1.11816,\n 206.3206034, 0.61987, 2.640e-04,\n -9.4159400, -0.17438, 5.540e-04,\n// 1047 9 7\n2103723.601329, 2.0, 1314.6, \" 0.364\", \"-0.702\", 3,\n-22.58450, 0.91603, 0.24960,\n -1.05731, 0.00000, 0.00000, 0.43190, 0.00000, 0.00000, 1.91838,\n 349.5790811, 0.48749, -2.130e-04,\n -3.1225501, 0.15846, 6.600e-05,\n// 1047 10 6\n2103753.295467, 19.0, 1314.2, \" 0.047\", \"-1.045\", 3,\n -3.63237, 0.90223, 0.24584,\n -0.46987, 0.00000, 0.00000, 0.09122, 0.00000, 0.00000, 0.65035,\n 17.6078896, 0.47669, 6.800e-05,\n 6.0063702, 0.14780, -2.240e-04,\n// 1048 3 3\n2103901.790428, 7.0, 1312.2, \" 1.987\", \" 0.992\", 2,\n -5.87446, 0.98593, 0.26864,\n -2.68261, -1.63390, 0.00000, -0.02973, 0.00000, 1.57570, 2.62247,\n 169.6067930, 0.56475, 1.030e-04,\n 3.9949298, -0.18179, -2.660e-04,\n// 1048 8 26\n2104077.866440, 9.0, 1309.9, \" 1.783\", \" 0.773\", 2,\n-16.30406, 0.96428, 0.26274,\n -2.85219, -1.71018, 0.00000, -0.20544, 0.00000, 1.29774, 2.44242,\n 340.1483657, 0.54734, -4.530e-04,\n -7.8251001, 0.16405, 2.810e-04,\n// 1049 2 20\n2104256.166768, 16.0, 1307.6, \" 2.415\", \" 1.360\", 1,\n-21.58855, 0.93310, 0.25425,\n -2.95414, -1.83452, -0.70852, 0.00243, 0.71389, 1.84008, 2.95715,\n 159.7599552, 0.51461, -1.900e-05,\n 8.8354593, -0.15298, -4.090e-04,\n// 1049 8 15\n2104432.423979, 22.0, 1305.2, \" 2.530\", \" 1.571\", 1,\n -4.00719, 1.01130, 0.27555,\n -2.49554, -1.57927, -0.60352, 0.17549, 0.95426, 1.92984, 2.84733,\n 330.2846163, 0.61512, -5.420e-04,\n -12.3660498, 0.16121, 6.480e-04,\n// 1050 2 9\n2104610.241237, 18.0, 1302.9, \" 1.097\", \" 0.001\", 2,\n-20.32180, 0.90105, 0.24552,\n -2.67122, -0.28380, 0.00000, -0.21031, 0.00000, -0.13583, 2.25046,\n 149.4148960, 0.49215, -2.140e-04,\n 13.4618794, -0.12747, -4.920e-04,\n// 1050 8 5\n2104787.124897, 15.0, 1300.5, \" 1.212\", \" 0.265\", 2,\n-11.69938, 1.02176, 0.27840,\n -2.17716, -0.90358, 0.00000, -0.00248, 0.00000, 0.89924, 2.17209,\n 320.6322750, 0.64513, -3.920e-04,\n -16.4053101, 0.14049, 1.001e-03,\n// 1050 12 31\n2104934.512598, 0.0, 1298.6, \" 0.481\", \"-0.585\", 3,\n-17.01539, 0.93253, 0.25409,\n -1.36205, 0.00000, 0.00000, 0.30236, 0.00000, 0.00000, 1.96352,\n 106.5194980, 0.56989, -2.620e-04,\n 21.4472602, -0.01297, -9.590e-04,\n// 1051 6 26\n2105112.382313, 21.0, 1296.2, \" 1.106\", \" 0.104\", 2,\n -8.32726, 0.96071, 0.26177,\n -2.08490, -0.43693, 0.00000, 0.17552, 0.00000, 0.79140, 2.43698,\n 280.4228147, 0.60761, 3.080e-04,\n -22.2891407, -0.01022, 1.126e-03,\n// 1051 12 20\n2105288.859561, 9.0, 1293.9, \" 1.822\", \" 0.813\", 2,\n -8.72948, 0.98593, 0.26864,\n -2.97601, -1.87002, 0.00000, -0.37054, 0.00000, 1.12752, 2.23555,\n 94.9572855, 0.64168, -9.900e-05,\n 22.9464201, 0.03383, -1.303e-03,\n// 1052 6 15\n2105466.653979, 4.0, 1291.6, \" 2.511\", \" 1.459\", 1,\n -2.04682, 0.91405, 0.24906,\n -3.33603, -2.20515, -1.09244, -0.30451, 0.48375, 1.59662, 2.72570,\n 269.3034853, 0.55254, 3.560e-04,\n -23.3895406, -0.04938, 9.570e-04,\n// 1052 12 8\n2105643.447614, 23.0, 1289.3, \" 2.622\", \" 1.649\", 1,\n-19.42987, 1.02247, 0.27860,\n -2.91940, -2.00175, -1.04819, -0.25727, 0.53357, 1.48709, 2.40534,\n 82.9850704, 0.68637, 3.810e-04,\n 23.5435203, 0.08951, -1.517e-03,\n// 1053 6 4\n2105820.696041, 5.0, 1287.0, \" 1.856\", \" 0.787\", 2,\n -1.78281, 0.90034, 0.24532,\n -3.20772, -1.91407, 0.00000, -0.29501, 0.00000, 1.32385, 2.61809,\n 257.5564615, 0.53079, 3.200e-04,\n -23.5889309, -0.08757, 9.080e-04,\n// 1053 11 28\n2105998.097450, 14.0, 1284.6, \" 1.399\", \" 0.417\", 2,\n -5.12753, 1.01319, 0.27607,\n -1.98622, -0.77600, 0.00000, 0.33881, 0.00000, 1.45504, 2.66431,\n 70.7277290, 0.66216, 8.570e-04,\n 23.1600889, 0.13841, -1.348e-03,\n// 1054 4 24\n2106145.304453, 19.0, 1282.7, \" 0.260\", \"-0.754\", 3,\n-14.45450, 0.95369, 0.25986,\n -0.90127, 0.00000, 0.00000, 0.30687, 0.00000, 0.00000, 1.51021,\n 217.6083380, 0.52270, 2.610e-04,\n -13.4672206, -0.22151, 6.330e-04,\n// 1054 5 24\n2106174.796414, 7.0, 1282.3, \" 0.493\", \"-0.544\", 3,\n -0.51606, 0.92839, 0.25297,\n -1.56439, 0.00000, 0.00000, 0.11395, 0.00000, 0.00000, 1.78943,\n 245.6993351, 0.55207, 3.400e-04,\n -22.8884301, -0.13244, 1.002e-03,\n// 1054 10 19\n2106323.011756, 12.0, 1280.4, \" 0.461\", \"-0.593\", 3,\n -9.77732, 0.93742, 0.25542,\n -1.33284, 0.00000, 0.00000, 0.28214, 0.00000, 0.00000, 1.90021,\n 29.9779393, 0.49314, 5.750e-04,\n 10.9652096, 0.22965, -3.060e-04,\n// 1054 11 18\n2106352.614235, 3.0, 1280.0, \" 0.078\", \"-0.951\", 3,\n-16.83067, 0.96566, 0.26312,\n -0.91962, 0.00000, 0.00000, -0.25836, 0.00000, 0.00000, 0.40838,\n 59.2573825, 0.58710, 9.350e-04,\n 22.0570099, 0.16468, -9.780e-04,\n// 1055 4 14\n2106499.819503, 8.0, 1278.1, \" 1.703\", \" 0.738\", 2,\n -2.15763, 1.00405, 0.27358,\n -2.81640, -1.75548, 0.00000, -0.33194, 0.00000, 1.09024, 2.15229,\n 207.6690330, 0.56122, 3.180e-04,\n -10.8068107, -0.26864, 5.940e-04,\n// 1055 10 8\n2106677.106022, 15.0, 1275.8, \" 1.704\", \" 0.612\", 2,\n -7.50783, 0.90231, 0.24586,\n -3.31223, -1.92170, 0.00000, -0.45546, 0.00000, 1.01126, 2.40058,\n 19.4677108, 0.44497, 2.940e-04,\n 7.6585400, 0.22861, -1.990e-04,\n// 1056 4 3\n2106854.504029, 0.0, 1273.5, \" 2.632\", \" 1.682\", 1,\n-10.85255, 1.02370, 0.27893,\n -2.54472, -1.65357, -0.70715, 0.09669, 0.90056, 1.84705, 2.73807,\n 197.4385435, 0.56887, 4.100e-04,\n -7.5609195, -0.29622, 3.580e-04,\n// 1056 9 26\n2107031.090787, 14.0, 1271.2, \" 2.798\", \" 1.717\", 1,\n -9.24930, 0.90862, 0.24758,\n -2.92228, -1.76465, -0.69016, 0.17889, 1.04774, 2.12209, 3.28136,\n 8.4853002, 0.44322, 2.300e-05,\n 3.7273802, 0.24093, -1.650e-04,\n// 1057 3 23\n2107209.167357, 16.0, 1268.9, \" 1.302\", \" 0.324\", 2,\n-19.54748, 0.99689, 0.27163,\n -2.28497, -0.99467, 0.00000, 0.01656, 0.00000, 1.03010, 2.31908,\n 187.5742340, 0.53273, 3.920e-04,\n -4.1989898, -0.28913, 7.600e-05,\n// 1057 9 15\n2107385.276189, 19.0, 1266.6, \" 1.457\", \" 0.429\", 2,\n -4.97433, 0.95199, 0.25940,\n -2.90570, -1.57129, 0.00000, -0.37147, 0.00000, 0.82599, 2.16342,\n 358.3618574, 0.48413, -2.020e-04,\n 0.1031000, 0.26585, -1.170e-04,\n// 1058 2 11\n2107534.003455, 12.0, 1264.7, \" 0.662\", \"-0.410\", 3,\n -2.20274, 0.92032, 0.25077,\n -1.86042, 0.00000, 0.00000, 0.08292, 0.00000, 0.00000, 2.02793,\n 151.3128007, 0.47789, -2.810e-04,\n 13.0185608, -0.22390, -5.090e-04,\n// 1058 8 6\n2107710.422426, 22.0, 1262.4, \" 0.759\", \"-0.191\", 3,\n -4.61043, 1.01906, 0.27767,\n -1.67477, 0.00000, 0.00000, 0.13824, 0.00000, 0.00000, 1.94995,\n 322.1316654, 0.60276, -8.740e-04,\n -16.2040108, 0.25223, 8.080e-04,\n// 1058 9 5\n2107739.769396, 6.0, 1262.0, \" 0.205\", \"-0.768\", 3,\n-18.68294, 1.00299, 0.27329,\n -0.55121, 0.00000, 0.00000, 0.46551, 0.00000, 0.00000, 1.47917,\n 347.8812600, 0.54134, -3.520e-04,\n -3.6987400, 0.28831, 7.000e-05,\n// 1059 1 31\n2107888.017018, 12.0, 1260.1, \" 1.914\", \" 0.814\", 2,\n -2.94147, 0.89938, 0.24506,\n -2.55711, -1.23083, 0.00000, 0.40843, 0.00000, 2.04756, 3.37350,\n 139.8792962, 0.47286, -4.670e-04,\n 16.2259596, -0.19337, -5.230e-04,\n// 1059 7 27\n2108065.131078, 15.0, 1257.9, \" 2.075\", \" 1.123\", 1,\n-12.30261, 1.01583, 0.27679,\n -2.42575, -1.47650, -0.27791, 0.14587, 0.57002, 1.76859, 2.71669,\n 311.6665315, 0.61892, -6.660e-04,\n -18.4875206, 0.22162, 1.054e-03,\n// 1060 1 20\n2108242.030166, 13.0, 1255.6, \" 2.604\", \" 1.529\", 1,\n -2.67745, 0.92184, 0.25118,\n -3.31275, -2.17077, -1.08469, -0.27602, 0.53232, 1.61824, 2.76237,\n 128.5485042, 0.51507, -6.960e-04,\n 18.6689697, -0.17480, -6.460e-04,\n// 1060 7 16\n2108419.734029, 6.0, 1253.3, \" 2.227\", \" 1.235\", 1,\n-22.00027, 0.97264, 0.26502,\n -3.13348, -2.11480, -0.96757, -0.38331, 0.20161, 1.34916, 2.36577,\n 301.2052499, 0.58632, -3.880e-04,\n -20.0970393, 0.17063, 1.041e-03,\n// 1061 1 8\n2108596.308409, 19.0, 1251.1, \" 1.325\", \" 0.304\", 2,\n-21.39975, 0.97314, 0.26516,\n -1.99440, -0.60570, 0.00000, 0.40181, 0.00000, 1.40670, 2.79803,\n 116.4106570, 0.59412, -8.480e-04,\n 20.5279508, -0.15387, -9.460e-04,\n// 1061 7 5\n2108774.069399, 14.0, 1248.8, \" 0.762\", \"-0.282\", 3,\n-14.71710, 0.92232, 0.25131,\n -2.38110, 0.00000, 0.00000, -0.33443, 0.00000, 0.00000, 1.71447,\n 289.9701624, 0.54219, -2.510e-04,\n -21.2015099, 0.11681, 9.020e-04,\n// 1061 11 29\n2108921.411771, 22.0, 1246.9, \" 0.618\", \"-0.352\", 3,\n-21.03585, 1.02498, 0.27928,\n -1.77520, 0.00000, 0.00000, -0.11750, 0.00000, 0.00000, 1.54016,\n 72.7095016, 0.69793, 9.300e-05,\n 23.8441904, 0.01877, -1.573e-03,\n// 1061 12 29\n2108950.857395, 9.0, 1246.5, \" 0.164\", \"-0.814\", 3,\n -8.10015, 1.01730, 0.27719,\n -1.32209, 0.00000, 0.00000, -0.42253, 0.00000, 0.00000, 0.47497,\n 105.2335783, 0.66283, -6.870e-04,\n 21.3061604, -0.12102, -1.271e-03,\n// 1062 5 26\n2109098.522783, 1.0, 1244.6, \" 1.232\", \" 0.167\", 2,\n -6.39700, 0.90434, 0.24641,\n -2.99396, -1.27365, 0.00000, -0.45320, 0.00000, 0.36592, 2.08736,\n 248.1321392, 0.54010, 2.900e-05,\n -22.8341506, -0.02901, 9.160e-04,\n// 1062 11 19\n2109276.044528, 13.0, 1242.4, \" 1.805\", \" 0.813\", 2,\n -6.73351, 1.00198, 0.27302,\n -2.47839, -1.40706, 0.00000, 0.06867, 0.00000, 1.54558, 2.61534,\n 61.0642476, 0.65312, 5.020e-04,\n 21.4724806, 0.06269, -1.247e-03,\n// 1063 5 15\n2109452.688211, 5.0, 1240.1, \" 2.664\", \" 1.641\", 1,\n -3.12478, 0.94203, 0.25668,\n -3.41240, -2.36209, -1.32386, -0.48294, 0.35764, 1.39563, 2.44831,\n 237.0548838, 0.57149, 1.800e-05,\n -20.1818498, -0.06846, 9.510e-04,\n// 1063 11 8\n2109630.492582, 0.0, 1237.9, \" 2.659\", \" 1.615\", 1,\n-20.44212, 0.94977, 0.25879,\n -3.10444, -2.03420, -0.99893, -0.17804, 0.64322, 1.67872, 2.74649,\n 49.9410796, 0.57139, 5.420e-04,\n 18.3283994, 0.09194, -8.120e-04,\n// 1064 5 3\n2109807.150402, 16.0, 1235.6, \" 1.656\", \" 0.685\", 2,\n-16.83339, 0.99414, 0.27088,\n -2.88155, -1.78720, 0.00000, -0.39035, 0.00000, 1.00493, 2.10090,\n 226.5821274, 0.61753, 1.320e-04,\n -16.8856995, -0.11167, 9.670e-04,\n// 1064 10 28\n2109984.641077, 3.0, 1233.4, \" 1.350\", \" 0.259\", 2,\n-18.17263, 0.90726, 0.24721,\n -2.24903, -0.61575, 0.00000, 0.38586, 0.00000, 1.38893, 3.02061,\n 38.5577498, 0.50520, 3.560e-04,\n 14.4181895, 0.11272, -5.140e-04,\n// 1065 3 25\n2110132.502587, 0.0, 1231.5, \" 0.643\", \"-0.312\", 3,\n-11.45579, 1.02060, 0.27809,\n -1.62444, 0.00000, 0.00000, 0.06209, 0.00000, 0.00000, 1.74976,\n 188.8369311, 0.60429, 2.740e-04,\n -5.1571698, -0.19697, 2.580e-04,\n// 1065 4 23\n2110161.821271, 8.0, 1231.2, \" 0.369\", \"-0.577\", 3,\n -1.52831, 1.02321, 0.27880,\n -1.59587, 0.00000, 0.00000, -0.28950, 0.00000, 0.00000, 1.01623,\n 216.6380140, 0.63505, 3.500e-04,\n -13.1248702, -0.14977, 7.860e-04,\n// 1065 9 17\n2110308.907909, 10.0, 1229.3, \" 0.288\", \"-0.779\", 3,\n-13.86349, 0.91815, 0.25017,\n -1.54224, 0.00000, 0.00000, -0.21019, 0.00000, 0.00000, 1.11867,\n 359.7758432, 0.48783, -1.150e-04,\n 1.3063600, 0.16267, -9.700e-05,\n// 1065 10 17\n2110338.613080, 3.0, 1228.9, \" 0.099\", \"-0.994\", 3,\n-18.91136, 0.90314, 0.24609,\n -1.09987, 0.00000, 0.00000, -0.28607, 0.00000, 0.00000, 0.52557,\n 28.0903209, 0.48689, 1.310e-04,\n 10.1195297, 0.13350, -3.760e-04,\n// 1066 3 14\n2110487.122068, 15.0, 1227.1, \" 1.914\", \" 0.919\", 2,\n-21.15345, 0.98293, 0.26782,\n -2.70699, -1.63926, 0.00000, -0.07037, 0.00000, 1.49993, 2.56569,\n 179.5604823, 0.55872, 2.410e-04,\n -0.3517200, -0.18472, -5.900e-05,\n// 1066 9 6\n2110663.185096, 16.0, 1224.8, \" 1.698\", \" 0.688\", 2,\n -8.58579, 0.96749, 0.26362,\n -2.15963, -0.99340, 0.00000, 0.44231, 0.00000, 1.87630, 3.04522,\n 349.7338805, 0.54408, -3.440e-04,\n -3.7534698, 0.17553, 9.300e-05,\n// 1067 3 3\n2110841.487591, 0.0, 1222.6, \" 2.477\", \" 1.423\", 1,\n-12.86754, 0.93046, 0.25353,\n -3.27262, -2.15619, -1.05158, -0.29781, 0.45641, 1.56121, 2.67515,\n 170.0202380, 0.50417, 7.200e-05,\n 4.5607700, -0.16229, -2.360e-04,\n// 1067 8 27\n2111017.749965, 6.0, 1220.4, \" 2.629\", \" 1.668\", 1,\n-19.28618, 1.01332, 0.27610,\n -2.67594, -1.76488, -0.80656, -0.00084, 0.80468, 1.76284, 2.67505,\n 340.4907768, 0.60422, -4.310e-04,\n -8.4090992, 0.18085, 4.160e-04,\n// 1068 2 21\n2111195.556214, 1.0, 1218.1, \" 1.148\", \" 0.056\", 2,\n-12.60353, 0.90047, 0.24536,\n -2.15545, -0.13241, 0.00000, 0.34913, 0.00000, 0.83141, 2.85343,\n 159.5665789, 0.48024, -1.640e-04,\n 9.5633201, -0.14272, -3.410e-04,\n// 1068 8 15\n2111372.446983, 23.0, 1215.9, \" 1.320\", \" 0.369\", 2,\n -2.97837, 1.02095, 0.27818,\n -2.51754, -1.32139, 0.00000, -0.27242, 0.00000, 0.77721, 1.97249,\n 331.1328985, 0.62691, -3.310e-04,\n -12.7987807, 0.16689, 7.640e-04,\n// 1069 1 10\n2111519.857147, 9.0, 1214.1, \" 0.473\", \"-0.589\", 3,\n -7.29164, 0.93502, 0.25477,\n -2.07411, 0.00000, 0.00000, -0.42848, 0.00000, 0.00000, 1.21390,\n 118.7218154, 0.56320, -4.080e-04,\n 19.6979104, -0.05519, -8.560e-04,\n// 1069 7 7\n2111697.674108, 4.0, 1211.9, \" 0.962\", \"-0.045\", 3,\n -0.60899, 0.95736, 0.26086,\n -1.97139, 0.00000, 0.00000, 0.17859, 0.00000, 0.00000, 2.33023,\n 291.5857207, 0.59744, 1.300e-04,\n -21.0635709, 0.03197, 1.058e-03,\n// 1069 12 30\n2111874.221064, 17.0, 1209.7, \" 1.818\", \" 0.812\", 2,\n -0.00847, 0.98852, 0.26935,\n -2.28920, -1.18956, 0.00000, 0.30553, 0.00000, 1.79926, 2.90095,\n 106.6201955, 0.64226, -3.150e-04,\n 22.0962203, -0.01363, -1.249e-03,\n// 1070 6 26\n2112051.925851, 10.0, 1207.5, \" 2.354\", \" 1.299\", 1,\n-19.33129, 0.91199, 0.24850,\n -2.79397, -1.64085, -0.45764, 0.22042, 0.89887, 2.08224, 3.23371,\n 280.3385575, 0.55055, 1.810e-04,\n -22.9434302, -0.01032, 9.470e-04,\n// 1070 12 20\n2112228.817751, 8.0, 1205.3, \" 2.626\", \" 1.653\", 1,\n -9.70613, 1.02321, 0.27880,\n -3.03395, -2.11789, -1.16565, -0.37398, 0.41762, 1.36982, 2.28635,\n 95.3142722, 0.69354, 1.120e-04,\n 23.6122201, 0.03528, -1.544e-03,\n// 1071 6 15\n2112405.962067, 11.0, 1203.1, \" 2.017\", \" 0.949\", 2,\n-19.06728, 0.90093, 0.24548,\n -2.88113, -1.63605, 0.00000, 0.08961, 0.00000, 1.81500, 3.06075,\n 268.7252415, 0.53892, 1.620e-04,\n -23.9780006, -0.04987, 9.460e-04,\n// 1071 12 9\n2112583.464604, 23.0, 1200.9, \" 1.404\", \" 0.419\", 2,\n-19.40378, 1.01147, 0.27560,\n -2.18214, -0.96866, 0.00000, 0.15049, 0.00000, 1.27114, 2.48347,\n 83.0475461, 0.67560, 6.450e-04,\n 24.1913501, 0.08660, -1.466e-03,\n// 1072 5 5\n2112730.601961, 2.0, 1199.1, \" 0.143\", \"-0.866\", 3,\n -6.73623, 0.95695, 0.26074,\n -0.45408, 0.00000, 0.00000, 0.44706, 0.00000, 0.00000, 1.34292,\n 227.9749396, 0.54500, 3.170e-04,\n -16.4608498, -0.19626, 7.880e-04,\n// 1072 6 3\n2112760.076839, 14.0, 1198.7, \" 0.644\", \"-0.389\", 3,\n-16.79779, 0.93125, 0.25374,\n -2.03786, 0.00000, 0.00000, -0.15586, 0.00000, 0.00000, 1.72377,\n 257.1515133, 0.57024, 2.070e-04,\n -24.1713291, -0.09399, 1.096e-03,\n// 1072 10 29\n2112908.347259, 20.0, 1196.9, \" 0.424\", \"-0.635\", 3,\n -1.05631, 0.93480, 0.25471,\n -1.22721, 0.00000, 0.00000, 0.33423, 0.00000, 0.00000, 1.89891,\n 40.6746918, 0.50764, 6.670e-04,\n 14.5385204, 0.20615, -4.670e-04,\n// 1072 11 28\n2112937.968229, 11.0, 1196.5, \" 0.081\", \"-0.952\", 3,\n -8.10966, 0.96284, 0.26235,\n -0.44168, 0.00000, 0.00000, 0.23750, 0.00000, 0.00000, 0.92215,\n 70.9316853, 0.60301, 8.310e-04,\n 23.8585696, 0.12286, -1.122e-03,\n// 1073 4 24\n2113085.135920, 15.0, 1194.7, \" 1.591\", \" 0.629\", 2,\n-18.43936, 1.00635, 0.27421,\n -2.16439, -1.07356, 0.00000, 0.26208, 0.00000, 1.59627, 2.68813,\n 217.5660045, 0.58187, 4.560e-04,\n -14.1551905, -0.24773, 7.760e-04,\n// 1073 10 18\n2113262.423428, 22.0, 1192.5, \" 1.654\", \" 0.558\", 2,\n-23.78956, 0.90148, 0.24563,\n -2.67498, -1.25141, 0.00000, 0.16226, 0.00000, 1.57637, 2.99884,\n 29.5776902, 0.45625, 3.940e-04,\n 11.4869003, 0.21419, -3.320e-04,\n// 1074 4 14\n2113439.830238, 8.0, 1190.3, \" 2.733\", \" 1.786\", 1,\n -2.13154, 1.02323, 0.27881,\n -2.72017, -1.83339, -0.89568, -0.07428, 0.74717, 1.68493, 2.57145,\n 207.6017284, 0.58351, 6.110e-04,\n -11.4858707, -0.27938, 5.640e-04,\n// 1074 10 7\n2113616.405552, 22.0, 1188.2, \" 2.862\", \" 1.780\", 1,\n -0.52829, 0.91020, 0.24801,\n -3.36529, -2.20915, -1.13954, -0.26676, 0.60580, 1.67525, 2.83311,\n 18.8133206, 0.45259, 1.530e-04,\n 8.0386998, 0.23350, -3.030e-04,\n// 1075 4 3\n2113794.491769, 0.0, 1186.0, \" 1.390\", \" 0.412\", 2,\n-10.82647, 0.99408, 0.27086,\n -2.55800, -1.32625, 0.00000, -0.19754, 0.00000, 0.93340, 2.16372,\n 197.6302669, 0.53888, 5.890e-04,\n -8.3854104, -0.27879, 2.610e-04,\n// 1075 9 27\n2113970.601720, 2.0, 1183.8, \" 1.529\", \" 0.501\", 2,\n-21.25606, 0.95506, 0.26023,\n -2.12446, -0.83677, 0.00000, 0.44128, 0.00000, 1.71717, 3.00787,\n 7.9485601, 0.48991, -4.300e-05,\n 4.1841897, 0.26587, -2.660e-04,\n// 1076 2 22\n2114119.324812, 20.0, 1182.0, \" 0.602\", \"-0.469\", 3,\n-17.48173, 0.91817, 0.25018,\n -2.07266, 0.00000, 0.00000, -0.20450, 0.00000, 0.00000, 1.66546,\n 161.8336279, 0.46197, -1.620e-04,\n 8.9663693, -0.23724, -3.600e-04,\n// 1076 8 17\n2114295.745442, 6.0, 1179.8, \" 0.658\", \"-0.293\", 3,\n-19.88942, 1.02037, 0.27802,\n -1.81342, 0.00000, 0.00000, -0.10939, 0.00000, 0.00000, 1.59335,\n 332.6260052, 0.58330, -7.180e-04,\n -12.6194293, 0.27679, 5.920e-04,\n// 1076 9 15\n2114325.103234, 14.0, 1179.5, \" 0.287\", \"-0.687\", 3,\n -9.96193, 1.00544, 0.27396,\n -0.71119, 0.00000, 0.00000, 0.47761, 0.00000, 0.00000, 1.66386,\n 357.8080657, 0.54003, -1.410e-04,\n 0.5380800, 0.29488, -1.160e-04,\n// 1077 2 10\n2114473.335568, 20.0, 1177.7, \" 1.866\", \" 0.769\", 2,\n-18.22045, 0.89951, 0.24510,\n -2.88933, -1.55203, 0.00000, 0.05363, 0.00000, 1.65907, 2.99612,\n 150.7852642, 0.45573, -3.890e-04,\n 12.5602398, -0.21395, -3.800e-04,\n// 1077 8 6\n2114650.448620, 23.0, 1175.5, \" 1.959\", \" 1.004\", 1,\n -3.58160, 1.01422, 0.27635,\n -2.77846, -1.80323, -0.31273, -0.23311, -0.15300, 1.33746, 2.31139,\n 322.4843217, 0.59384, -5.780e-04,\n -15.3663393, 0.25199, 8.460e-04,\n// 1078 1 30\n2114827.362732, 21.0, 1173.4, \" 2.634\", \" 1.564\", 1,\n-17.95644, 0.92407, 0.25179,\n -3.32212, -2.19105, -1.11543, -0.29443, 0.52625, 1.60169, 2.73497,\n 139.6939795, 0.49763, -6.600e-04,\n 15.6014703, -0.20374, -4.920e-04,\n// 1078 7 27\n2115005.034994, 13.0, 1171.2, \" 2.357\", \" 1.360\", 1,\n-14.28200, 0.96938, 0.26413,\n -2.94962, -1.93616, -0.85378, -0.16015, 0.53404, 1.61674, 2.62807,\n 311.8890044, 0.56204, -3.930e-04,\n -17.7035413, 0.20284, 8.860e-04,\n// 1079 1 20\n2115181.662093, 4.0, 1169.1, \" 1.342\", \" 0.326\", 2,\n-11.67601, 0.97593, 0.26592,\n -2.50753, -1.14756, 0.00000, -0.10977, 0.00000, 0.92554, 2.28815,\n 128.2492190, 0.57520, -8.780e-04,\n 18.0651093, -0.19409, -7.690e-04,\n// 1079 7 16\n2115359.347616, 20.0, 1166.9, \" 0.905\", \"-0.143\", 3,\n -8.00156, 0.91982, 0.25063,\n -1.86386, 0.00000, 0.00000, 0.34280, 0.00000, 0.00000, 2.55128,\n 300.6109414, 0.52373, -3.250e-04,\n -19.5788807, 0.15021, 8.020e-04,\n// 1079 12 11\n2115506.781960, 7.0, 1165.1, \" 0.614\", \"-0.357\", 3,\n-11.31210, 1.02500, 0.27929,\n -1.88577, 0.00000, 0.00000, -0.23296, 0.00000, 0.00000, 1.41982,\n 85.0621514, 0.70194, -1.940e-04,\n 24.7077500, -0.03530, -1.634e-03,\n// 1080 1 9\n2115536.224195, 17.0, 1164.8, \" 0.175\", \"-0.801\", 3,\n-23.37914, 1.01859, 0.27754,\n -0.54574, 0.00000, 0.00000, 0.38069, 0.00000, 0.00000, 1.30529,\n 116.5393241, 0.64684, -8.020e-04,\n 19.8316301, -0.16717, -1.133e-03,\n// 1080 6 5\n2115683.790725, 7.0, 1163.0, \" 1.075\", \" 0.013\", 2,\n-23.68147, 0.90570, 0.24678,\n -2.43221, -0.25929, 0.00000, -0.02261, 0.00000, 0.21232, 2.38641,\n 259.1702440, 0.54777, -1.330e-04,\n -24.0757201, 0.00787, 9.740e-04,\n// 1080 11 29\n2115861.408625, 22.0, 1160.9, \" 1.798\", \" 0.803\", 2,\n-21.00976, 0.99975, 0.27241,\n -2.74520, -1.66513, 0.00000, -0.19299, 0.00000, 1.28035, 2.35870,\n 73.2025251, 0.66192, 3.030e-04,\n 23.2224297, 0.01456, -1.381e-03,\n// 1081 5 25\n2116037.974691, 11.0, 1158.8, \" 2.518\", \" 1.499\", 1,\n-20.40924, 0.94522, 0.25755,\n -2.50847, -1.45919, -0.39649, 0.39258, 1.18121, 2.24367, 3.29534,\n 247.5450434, 0.58707, -1.040e-04,\n -22.1479898, -0.03330, 1.064e-03,\n// 1081 11 19\n2116215.840169, 8.0, 1156.6, \" 2.675\", \" 1.625\", 1,\n-11.72111, 0.94702, 0.25804,\n -2.77613, -1.69786, -0.66081, 0.16405, 0.98927, 2.02656, 3.10235,\n 61.2799313, 0.58209, 4.530e-04,\n 20.8242496, 0.05513, -9.600e-04,\n// 1082 5 14\n2116392.458101, 23.0, 1154.5, \" 1.784\", \" 0.817\", 2,\n -9.11511, 0.99692, 0.27164,\n -2.53975, -1.49372, 0.00000, -0.00557, 0.00000, 1.48130, 2.52895,\n 237.0453488, 0.63646, 7.100e-05,\n -19.5083897, -0.07687, 1.140e-03,\n// 1082 11 8\n2116569.969500, 11.0, 1152.4, \" 1.379\", \" 0.284\", 2,\n -9.45162, 0.90593, 0.24685,\n -2.39276, -0.77833, 0.00000, 0.26801, 0.00000, 1.31566, 2.92864,\n 49.6690093, 0.51774, 3.380e-04,\n 17.6206501, 0.08478, -6.590e-04,\n// 1083 4 5\n2116717.832999, 8.0, 1150.6, \" 0.552\", \"-0.402\", 3,\n -2.73478, 1.01932, 0.27774,\n -1.58540, 0.00000, 0.00000, -0.00803, 0.00000, 0.00000, 1.57068,\n 198.8183646, 0.61194, 4.280e-04,\n -9.3684702, -0.18576, 4.950e-04,\n// 1083 5 4\n2116747.140115, 15.0, 1150.2, \" 0.481\", \"-0.463\", 3,\n-17.81003, 1.02345, 0.27886,\n -1.11177, 0.00000, 0.00000, 0.36277, 0.00000, 0.00000, 1.83689,\n 226.6184367, 0.65136, 3.780e-04,\n -16.2470393, -0.11942, 9.970e-04,\n// 1083 9 28\n2116894.221025, 17.0, 1148.5, \" 0.225\", \"-0.842\", 3,\n -6.14522, 0.92034, 0.25077,\n -0.87747, 0.00000, 0.00000, 0.30461, 0.00000, 0.00000, 1.48305,\n 9.4848498, 0.49347, -2.100e-05,\n 5.5730702, 0.16072, -2.570e-04,\n// 1083 10 28\n2116923.935793, 10.0, 1148.1, \" 0.142\", \"-0.953\", 3,\n-11.19309, 0.90416, 0.24636,\n -0.51012, 0.00000, 0.00000, 0.45904, 0.00000, 0.00000, 1.42590,\n 38.3430496, 0.49999, 1.600e-04,\n 13.7282798, 0.11364, -5.210e-04,\n// 1084 3 24\n2117072.448299, 23.0, 1146.4, \" 1.830\", \" 0.835\", 2,\n-12.43244, 0.97985, 0.26699,\n -2.85532, -1.76321, 0.00000, -0.24082, 0.00000, 1.28315, 2.37327,\n 189.5341841, 0.55830, 3.770e-04,\n -4.7090300, -0.18029, 1.480e-04,\n// 1084 9 17\n2117248.509722, 0.0, 1144.3, \" 1.625\", \" 0.616\", 2,\n-23.86478, 0.97066, 0.26448,\n -2.32671, -1.13623, 0.00000, 0.23334, 0.00000, 1.60104, 2.79421,\n 359.7429763, 0.54513, -2.160e-04,\n 0.6121000, 0.18045, -1.060e-04,\n// 1085 3 14\n2117426.801767, 7.0, 1142.2, \" 2.553\", \" 1.499\", 1,\n -5.14926, 0.92785, 0.25282,\n -2.75068, -1.63762, -0.55296, 0.24241, 1.03817, 2.12302, 3.23366,\n 179.6768961, 0.49851, 1.700e-04,\n 0.3106100, -0.16455, -7.100e-05,\n// 1085 9 6\n2117603.081713, 14.0, 1140.1, \" 2.714\", \" 1.753\", 1,\n-10.56517, 1.01519, 0.27661,\n -2.71498, -1.80671, -0.85836, -0.03888, 0.78044, 1.72865, 2.63800,\n 350.4708306, 0.59797, -2.840e-04,\n -4.2050802, 0.19275, 1.840e-04,\n// 1086 3 3\n2117780.863710, 9.0, 1138.0, \" 1.216\", \" 0.125\", 2,\n -3.88252, 0.90002, 0.24524,\n -2.82865, -0.98817, 0.00000, -0.27096, 0.00000, 0.44677, 2.28636,\n 169.9726043, 0.47205, -8.700e-05,\n 5.2503801, -0.15228, -1.870e-04,\n// 1086 8 27\n2117957.774755, 7.0, 1135.9, \" 1.414\", \" 0.460\", 2,\n-18.25735, 1.02000, 0.27793,\n -2.70885, -1.56240, 0.00000, -0.40587, 0.00000, 0.75132, 1.89680,\n 341.3244970, 0.61215, -2.120e-04,\n -8.8215505, 0.18516, 5.250e-04,\n// 1087 1 21\n2118105.198340, 17.0, 1134.1, \" 0.458\", \"-0.599\", 3,\n-22.57063, 0.93760, 0.25548,\n -1.85435, 0.00000, 0.00000, -0.23983, 0.00000, 0.00000, 1.37136,\n 130.0371849, 0.55302, -4.860e-04,\n 17.1918303, -0.09098, -7.170e-04,\n// 1087 7 18\n2118282.967508, 11.0, 1132.0, \" 0.823\", \"-0.188\", 3,\n-16.89071, 0.95405, 0.25996,\n -1.80696, 0.00000, 0.00000, 0.22018, 0.00000, 0.00000, 2.24960,\n 302.5206897, 0.58222, 4.000e-06,\n -19.0914716, 0.06998, 9.440e-04,\n// 1087 8 16\n2118312.394254, 21.0, 1131.7, \" 0.034\", \"-0.955\", 3,\n -4.95775, 0.98137, 0.26740,\n 0.03317, 0.00000, 0.00000, 0.46210, 0.00000, 0.00000, 0.89621,\n 331.2049160, 0.58098, -1.360e-04,\n -13.4362201, 0.15631, 7.320e-04,\n// 1088 1 11\n2118459.580573, 2.0, 1129.9, \" 1.808\", \" 0.806\", 2,\n-14.28472, 0.99108, 0.27004,\n -2.64806, -1.55382, 0.00000, -0.06626, 0.00000, 1.42000, 2.51627,\n 118.7027455, 0.63464, -4.950e-04,\n 20.3550600, -0.06055, -1.122e-03,\n// 1088 7 6\n2118637.197994, 17.0, 1127.9, \" 2.200\", \" 1.142\", 1,\n-11.61301, 0.91007, 0.24797,\n -3.23618, -2.05370, -0.74162, -0.24814, 0.24581, 1.55807, 2.73905,\n 291.7955715, 0.54277, 1.900e-05,\n -21.7073094, 0.02869, 8.900e-04,\n// 1088 12 30\n2118814.186846, 16.0, 1125.8, \" 2.632\", \" 1.661\", 1,\n -0.98512, 1.02379, 0.27896,\n -2.17367, -1.25971, -0.30908, 0.48431, 1.27764, 2.22823, 3.14256,\n 106.8779873, 0.69074, -1.310e-04,\n 22.7356097, -0.01514, -1.483e-03,\n// 1089 6 25\n2118991.227605, 17.0, 1123.7, \" 2.180\", \" 1.113\", 1,\n-12.35174, 0.90170, 0.24569,\n -2.55536, -1.34692, 0.01419, 0.46252, 0.91061, 2.27165, 3.48087,\n 279.8881748, 0.54081, -1.200e-05,\n -23.5720893, -0.01165, 9.370e-04,\n// 1089 12 20\n2119168.832148, 8.0, 1121.6, \" 1.406\", \" 0.420\", 2,\n -9.68004, 1.00962, 0.27510,\n -2.36755, -1.15049, 0.00000, -0.02846, 0.00000, 1.09511, 2.31084,\n 95.4722954, 0.67925, 3.720e-04,\n 24.2548299, 0.03289, -1.499e-03,\n// 1090 5 16\n2119315.896509, 10.0, 1119.9, \" 0.019\", \"-0.985\", 3,\n-22.01522, 0.96027, 0.26165,\n -0.81308, 0.00000, 0.00000, -0.48378, 0.00000, 0.00000, -0.16027,\n 239.2029236, 0.56864, 3.100e-04,\n -19.0444389, -0.16289, 9.400e-04,\n// 1090 6 14\n2119345.357346, 21.0, 1119.6, \" 0.797\", \"-0.232\", 3,\n -9.07952, 0.93422, 0.25455,\n -2.47752, 0.00000, 0.00000, -0.42370, 0.00000, 0.00000, 1.62822,\n 268.7422896, 0.58226, 2.000e-05,\n -24.6245702, -0.05245, 1.142e-03,\n// 1090 11 10\n2119493.686727, 4.0, 1117.8, \" 0.398\", \"-0.667\", 3,\n-16.33530, 0.93227, 0.25402,\n -1.03966, 0.00000, 0.00000, 0.48145, 0.00000, 0.00000, 2.00591,\n 51.7140191, 0.52420, 7.050e-04,\n 17.5685101, 0.17643, -6.240e-04,\n// 1090 12 9\n2119523.323245, 20.0, 1117.5, \" 0.081\", \"-0.955\", 3,\n-22.38591, 0.96002, 0.26158,\n -0.92298, 0.00000, 0.00000, -0.24212, 0.00000, 0.00000, 0.44423,\n 83.4718989, 0.61401, 6.350e-04,\n 24.8910911, 0.07485, -1.225e-03,\n// 1091 5 5\n2119670.449283, 23.0, 1115.8, \" 1.470\", \" 0.513\", 2,\n -9.71835, 1.00856, 0.27481,\n -2.57692, -1.44316, 0.00000, -0.21721, 0.00000, 1.00723, 2.14194,\n 228.3456686, 0.60633, 5.390e-04,\n -17.2824891, -0.21800, 9.740e-04,\n// 1091 10 30\n2119847.746176, 6.0, 1113.7, \" 1.616\", \" 0.516\", 2,\n-15.06855, 0.90080, 0.24545,\n -2.91390, -1.46218, 0.00000, -0.09178, 0.00000, 1.27900, 2.72977,\n 40.4307720, 0.47219, 4.710e-04,\n 15.1314406, 0.19316, -4.730e-04,\n// 1092 4 24\n2120025.151597, 16.0, 1111.6, \" 2.816\", \" 1.870\", 1,\n-17.41053, 1.02259, 0.27863,\n -3.00928, -2.12459, -1.18922, -0.36168, 0.46592, 1.40133, 2.28562,\n 218.0486120, 0.60303, 7.680e-04,\n -15.0561104, -0.25487, 7.760e-04,\n// 1092 10 18\n2120201.726795, 5.0, 1109.6, \" 2.887\", \" 1.804\", 1,\n-16.81001, 0.91188, 0.24847,\n -2.65089, -1.49580, -0.42847, 0.44307, 1.31439, 2.38153, 3.53843,\n 28.8787194, 0.46688, 2.590e-04,\n 11.8631404, 0.22063, -4.390e-04,\n// 1093 4 14\n2120379.810406, 7.0, 1107.5, \" 1.489\", \" 0.511\", 2,\n -3.10819, 0.99115, 0.27006,\n -1.97227, -0.79220, 0.00000, 0.44975, 0.00000, 1.69378, 2.87231,\n 207.3544755, 0.54941, 7.530e-04,\n -12.0841397, -0.26226, 4.370e-04,\n// 1093 10 7\n2120555.934056, 10.0, 1105.5, \" 1.588\", \" 0.560\", 2,\n-12.53505, 0.95809, 0.26106,\n -2.17082, -0.91733, 0.00000, 0.41735, 0.00000, 1.75003, 3.00648,\n 18.1043897, 0.50164, 1.210e-04,\n 8.4146991, 0.25901, -4.290e-04,\n// 1094 3 5\n2120704.639469, 3.0, 1103.8, \" 0.529\", \"-0.542\", 3,\n -9.76345, 0.91609, 0.24961,\n -1.41982, 0.00000, 0.00000, 0.34726, 0.00000, 0.00000, 2.11631,\n 171.6920224, 0.45171, -3.500e-05,\n 4.9017600, -0.24367, -2.230e-04,\n// 1094 4 3\n2120734.241693, 18.0, 1103.4, \" 0.041\", \"-0.994\", 3,\n-16.81680, 0.93866, 0.25576,\n -0.69746, 0.00000, 0.00000, -0.19937, 0.00000, 0.00000, 0.30422,\n 197.4474091, 0.48268, 5.240e-04,\n -9.0201800, -0.24789, 2.170e-04,\n// 1094 8 28\n2120881.073786, 14.0, 1101.7, \" 0.568\", \"-0.385\", 3,\n-11.16841, 1.02150, 0.27833,\n -1.82551, 0.00000, 0.00000, -0.22913, 0.00000, 0.00000, 1.36601,\n 342.8188604, 0.56876, -5.190e-04,\n -8.6842295, 0.29367, 3.850e-04,\n// 1094 9 26\n2120910.443349, 23.0, 1101.4, \" 0.355\", \"-0.619\", 3,\n -0.23818, 1.00774, 0.27458,\n -1.67201, 0.00000, 0.00000, -0.35962, 0.00000, 0.00000, 0.95063,\n 8.2581393, 0.54557, 8.600e-05,\n 5.0872000, 0.29374, -3.190e-04,\n// 1095 2 22\n2121058.649422, 4.0, 1099.7, \" 1.806\", \" 0.713\", 2,\n -9.49944, 0.89977, 0.24517,\n -3.32774, -1.97488, 0.00000, -0.41388, 0.00000, 1.14681, 2.49950,\n 161.3784914, 0.44280, -2.810e-04,\n 8.4853600, -0.22821, -2.410e-04,\n// 1095 8 18\n2121235.769491, 6.0, 1097.7, \" 1.852\", \" 0.893\", 2,\n-19.86333, 1.01247, 0.27587,\n -2.04927, -1.04440, 0.00000, 0.46777, 0.00000, 1.98053, 2.98396,\n 332.3905276, 0.57281, -4.330e-04,\n -12.0316497, 0.27324, 6.550e-04,\n// 1096 2 11\n2121412.692234, 5.0, 1095.6, \" 2.672\", \" 1.607\", 1,\n -9.23543, 0.92640, 0.25242,\n -3.40468, -2.28518, -1.22050, -0.38640, 0.44741, 1.51190, 2.63363,\n 150.4776735, 0.48238, -5.710e-04,\n 11.9890900, -0.22642, -3.340e-04,\n// 1096 8 6\n2121590.338280, 20.0, 1093.6, \" 2.481\", \" 1.479\", 1,\n -6.56373, 0.96613, 0.26325,\n -2.70384, -1.69112, -0.64675, 0.11872, 0.88464, 1.92932, 2.93987,\n 322.2687336, 0.53842, -3.320e-04,\n -14.7378697, 0.22857, 7.210e-04,\n// 1097 1 30\n2121767.012117, 12.0, 1091.6, \" 1.369\", \" 0.358\", 2,\n -2.95499, 0.97871, 0.26667,\n -2.11339, -0.78814, 0.00000, 0.29081, 0.00000, 1.36740, 2.69527,\n 139.1525641, 0.55727, -8.260e-04,\n 15.1008294, -0.22636, -5.870e-04,\n// 1097 7 27\n2121944.628033, 3.0, 1089.5, \" 1.043\", \"-0.010\", 3,\n -0.28329, 0.91746, 0.24999,\n -2.27103, 0.00000, 0.00000, 0.07278, 0.00000, 0.00000, 2.41807,\n 311.5111584, 0.50290, -3.390e-04,\n -17.1346599, 0.18025, 6.740e-04,\n// 1097 12 21\n2122092.151799, 16.0, 1087.9, \" 0.608\", \"-0.363\", 3,\n -1.58835, 1.02484, 0.27924,\n -2.00281, 0.00000, 0.00000, -0.35683, 0.00000, 0.00000, 1.28914,\n 97.4884443, 0.69517, -4.840e-04,\n 24.6015491, -0.09026, -1.600e-03,\n// 1098 1 20\n2122121.587627, 2.0, 1087.5, \" 0.193\", \"-0.780\", 3,\n-13.65539, 1.01974, 0.27785,\n -0.86667, 0.00000, 0.00000, 0.10305, 0.00000, 0.00000, 1.07120,\n 128.2066669, 0.62511, -8.250e-04,\n 17.4035696, -0.20988, -9.360e-04,\n// 1098 6 16\n2122269.059703, 13.0, 1085.8, \" 0.921\", \"-0.139\", 3,\n-16.96593, 0.90721, 0.24719,\n -1.82902, 0.00000, 0.00000, 0.43287, 0.00000, 0.00000, 2.69372,\n 270.3412916, 0.54941, -3.150e-04,\n -24.5435505, 0.04658, 9.870e-04,\n// 1098 12 11\n2122446.772561, 7.0, 1083.8, \" 1.791\", \" 0.793\", 2,\n-11.28601, 0.99741, 0.27177,\n -3.01570, -1.92735, 0.00000, -0.45853, 0.00000, 1.01152, 2.09799,\n 85.5760412, 0.66215, 4.700e-05,\n 24.0447008, -0.03692, -1.437e-03,\n// 1099 6 5\n2122623.261961, 18.0, 1081.8, \" 2.372\", \" 1.357\", 1,\n-12.69097, 0.94847, 0.25844,\n -2.57860, -1.52527, -0.41721, 0.28707, 0.99080, 2.09860, 3.15432,\n 258.8498808, 0.59764, -2.880e-04,\n -23.4273200, 0.00804, 1.134e-03,\n// 1099 11 30\n2122801.189143, 17.0, 1079.8, \" 2.686\", \" 1.632\", 1,\n -1.99736, 0.94432, 0.25730,\n -3.41356, -2.32783, -1.28849, -0.46057, 0.36771, 1.40731, 2.49057,\n 73.5372180, 0.58901, 2.890e-04,\n 22.5630894, 0.01156, -1.068e-03,\n// 1100 5 25\n2122977.763386, 6.0, 1077.8, \" 1.919\", \" 0.956\", 2,\n -1.39684, 0.99964, 0.27238,\n -2.25161, -1.24567, 0.00000, 0.32126, 0.00000, 1.88717, 2.89471,\n 247.8047546, 0.65247, -6.400e-05,\n -21.4944311, -0.03626, 1.279e-03,\n// 1100 11 18\n2123155.301718, 19.0, 1075.8, \" 1.399\", \" 0.300\", 2,\n -0.73061, 0.90474, 0.24652,\n -2.43846, -0.83446, 0.00000, 0.24123, 0.00000, 1.31812, 2.92086,\n 61.1466607, 0.52916, 2.610e-04,\n 20.1548005, 0.05112, -7.810e-04\n));\n}", "title": "" }, { "docid": "80cae6fd379926bf2e7dc14e0deb5843", "score": "0.4971433", "text": "function answer2(ans1,finish2){\r\n\tvar answer1;\r\n\t//var man;\r\n\tvar y2;\r\n\tvar y4;\r\n\tvar y3;\r\n\tvar y5;\r\n\tvar a;\r\n\t//var a;\r\n\tvar space3;\r\n\tvar space4;\r\n\tvar space5;\r\n\tvar sd1;\r\n\tvar sd2;\r\n\tvar dang2=number3.length;\r\n\tvar dang3=number4.length;\r\n\tvar c2=dang2-dang3;\r\n\tvar c3=dang3-dang2;\r\n\t\r\n\tvar asd=1;\r\n\tdanger1=1;\r\n\t//ans1=numberlength;\r\n\t bingo=0;\r\n\t//for(var ans=numberlength;ans>0;ans--){\r\n\t\t//as++;\r\n\t\t\r\n\t\tif(number3-number4>=0){\r\n\t\t\tif(dang2==dang3){\r\n\t\t\t space3=1;\r\n\t\t\t space5=space3+1;\r\n\t\t\t space4=1;\r\n\t\t}\r\n\t\tif(dang2>dang3){\r\n\t\t\tspace3=1;\r\n\t\t\tspace5=space3+1;\r\n\t\t\tspace4=c2+1;\r\n\t\t}\r\n\t\tif(dang3>dang2){\r\n\t\t\tspace3=c3+1;\r\n\t\t\tspace5=space3+1;\r\n\t\t\tspace4=1;\t\r\n\t\t}\r\n\t\ty2=parseInt(number3[ans1-space3]);\r\n\t\ty4=parseInt(number3[ans1-space5]);\r\n\t\ty3=parseInt(number4[ans1-space4]);\r\n\t\ty5=parseInt(answer[ans1-1]);\r\n\t\t}\r\n\t\telse if(number4-number3>0){\r\n\t\t\tif(dang2==dang3){\r\n\t\t\t space3=1;\r\n\t\t\t space5=space3+1;\r\n\t\t\t space4=1;\r\n\t\t}\r\n\t\t\tif(dang3>dang2){\r\n\t\t\tspace3=1;\r\n\t\t\tspace5=space3+1;\r\n\t\t\tspace4=c3+1;\r\n\t\t}\r\n\t\tif(dang2>dang3){\r\n\t\t\tspace3=c2+1;\r\n\t\t\tspace5=space4+1;\r\n\t\t\tspace4=1;\t\r\n\t\t}\r\n\t\ty2=parseInt(number4[ans1-space3]);\r\n\t\ty4=parseInt(number4[ans1-space5]);\r\n\t\ty3=parseInt(number3[ans1-space4]);\t\r\n y5=parseInt(answer[ans1-1]);\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(boolten==true){\r\n\t\t\t\tif(y2>0){\r\n\t\t\t\ty2=y2-1;\r\n\t\t\tdocument.getElementById(\"1stNumber\"+(finish2+danger1)).innerHTML=y2;\r\n\t\t\t}\r\n\t\t\telse if(y2==0){\r\n\t\t\t\ty2=9\r\n\t\t\t\tdocument.getElementById(\"1stNumber\"+(finish2+danger1)).innerHTML=y2;\r\n\t\t\t}\r\n\t\t\tboolten==false;\r\n\t\t}\r\n\t\t\t\r\n\t\tif(y2-y3<=0){\r\n\t\t\tif(isNaN(y4)){\r\n\t\t\ty4 = y4|| 0;\r\n\t\t}\r\n\t\twhile(y4==0){\r\n\t\t//\ty5=y4;\r\n\t\t\t space5++;\r\n\t\t\t\ty4=parseInt(number3[ans1-space5]);\r\n\t\t\t\t//document.getElementById(\"1stNumber\"+(finish2+1)).innerHTML=y4;\r\n\t\t\t\tdanger1++;\r\n\t\t}\r\n\t\tif(y2-y3<0){\r\n\t\t\t\ty2=y2+10;\r\n\t\t\t\t//y5=y5+10;\r\n\t\t\tdocument.getElementById(\"1stNumber\"+(finish2+danger1)).innerHTML='<span style=\"text-decoration: line-through;color:lightgray;\">'+y4+'</span>';\r\n\t\t\t//document.getElementById(\"1stNumber\"+(finish2+danger1-1)).innerHTML='<span style=\"text-decoration: line-through;color:lightgray;\">'+y5+'</span>';\r\n\t\t\ty4=y4-1;\r\n\t\t\t//y5=y5-1;\r\n\t\t\t//document.getElementById(\"1stNumber\"+(finish2+danger1-1)).innerHTML+=y5;\r\n\t\t\tdocument.getElementById(\"1stNumber\"+(finish2+danger1)).innerHTML+=y4;\r\n\t\t\t\r\n\t\t\t//document.getElementById(\"1stNumber\"+(finish2+2)).innerHTML=y5;\r\n\t\t danger1=0;\r\n\t\t\tboolten=true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(isNaN(y3)){\r\n\t\t\ty3 = y3|| 0;\r\n\t\t}\r\n\t\tif(isNaN(y2)){\r\n\t\t\ty2 = y2|| 0;\r\n\t\t}\r\n\t if(y3==0){\r\n\t\t\tanswer1=y2;\r\n\t\t}\r\n\t\telse if(y2==0){\r\n\t\t\tif(finish2==numberlength3){\r\n\t\t\t\tanswer1=-Math.abs(y3);\r\n\t\t\t}\r\n else{\r\n\t\t\t\tanswer1=y3;\r\n\t\t }\r\n\t\t}\r\n\t\telse{\r\n\t\t\t\tanswer1=y2-y3;\r\n\t\t}\r\n\t\tif(finish2==numberlength3){\r\n\t\t\tif(number4-number3>=0){\r\n\t\t\t\t\r\n\t\t\tanswer1=-Math.abs(answer1);\r\n\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tdocument.getElementById(\"answers\"+(finish2)).innerHTML+=answer1;\r\n\t\t\t//info1=number3-number4;\r\n\t\t}", "title": "" }, { "docid": "d00feec4484e58176378308a68ff9f61", "score": "0.4968981", "text": "function viableVaccines(input) {\n var pfizerBox;\n var modernaBox;\n\n //nested functions because I want my code to take only one large function. Fun.\n function numVaccinesFromBoxes(pfizer, moderna) {\n return (pfizer * pfizerBox) + (moderna * modernaBox);\n }\n\n function updateBestGuess(n, combination) {\n //if the new n is closer to the goal\n if (Math.abs(goalN - n) < Math.abs(goalN - closestN)) {\n closestN = n;\n closestCombination = combination;\n }\n }\n\n //Enter your code here\n //turn into 3 numbers\n //console.log(input.constructor.name)\n input = input.replace(\"\\n\", \" \");\n input = input.split(\" \");\n var goalN = input[0];\n pfizerBox = input[1];\n modernaBox = input[2];\n \n //if he has up to two purchases of either, he can get half the vaccines in a box.\n //Since half of 2 is 1, the only extra thing this does is allow buying of 0.5 boxes\n var maxBoxes = 1000\n \n //first fill up with pfizer boxes\n var startPfi = 0\n \n //will give slightly higher than the actual n\n startPfi = Math.ceil(goalN / pfizerBox);\n \n //in [pfizer, moderna] form\n var closestCombination = [startPfi, 0];\n var closestN = numVaccinesFromBoxes(startPfi, 0);\n //loop downwards, slowly replacing the pfizer with moderna. Once you reach 0, you're done\n var lastNum = numVaccinesFromBoxes(startPfi, 0);\n var thisNum;\n for (var p=startPfi-1; p>=0; p-= 0.5) {\n //go until the distance starts increasing\n var m = 0;\n while ((m <= maxBoxes) && (m < 2 || Math.abs(goalN - thisNum) < Math.abs(goalN - lastNum))) {\n lastNum = thisNum;\n thisNum = numVaccinesFromBoxes(p, m);\n updateBestGuess(thisNum, [p, m]);\n m += 0.5;\n }\n }\n\n console.log(Math.abs(goalN - closestN));\n}", "title": "" }, { "docid": "e64840aed4976cb0eb5d4634b0e2d288", "score": "0.49612728", "text": "function SE1701() {\n calculatefor(new Array(\n// 1701 2 7\n2342375.461729, 23.0, -4.0, 4.0, 8.2, 8.2,\n -0.1836620, 0.4942406, -1.910e-05, -5.580e-06,\n 0.6417670, 0.1089014, 6.290e-05, -1.160e-06,\n -15.1354103, 0.0128670, 4.000e-06,\n 161.3047638, 15.0008440, 0.000e-00,\n 0.5729090, 0.0000454, -1.000e-05,\n 0.0266380, 0.0000452, -9.900e-06,\n 0.0047375, 0.0047139,\n// 1701 8 4\n2342552.897038, 10.0, -4.0, 4.0, 8.2, 8.2,\n 0.1816160, 0.5607258, -1.640e-05, -8.910e-06,\n -0.4969680, -0.1033129, -9.040e-05, 1.560e-06,\n 17.3284397, -0.0108240, -4.000e-06,\n 328.6190491, 15.0022631, 0.000e-00,\n 0.5366010, -0.0001007, -1.220e-05,\n -0.0094890, -0.0001002, -1.220e-05,\n 0.0046110, 0.0045880,\n// 1702 1 28\n2342729.567472, 2.0, -4.0, 4.0, 8.3, 8.3,\n 0.2072930, 0.5242862, -4.420e-05, -6.780e-06,\n -0.0156120, 0.0846372, 1.167e-04, -1.020e-06,\n -18.3517399, 0.0106680, 4.000e-06,\n 206.6295471, 14.9993582, 0.000e-00,\n 0.5612910, 0.0001063, -1.090e-05,\n 0.0150780, 0.0001058, -1.090e-05,\n 0.0047459, 0.0047222,\n// 1702 7 24\n2342907.401984, 22.0, -4.0, 4.0, 8.4, 8.4,\n 0.2270390, 0.5341773, -8.500e-06, -7.170e-06,\n 0.2902580, -0.0662070, -1.442e-04, 8.000e-07,\n 19.8927402, -0.0086170, -4.000e-06,\n 148.5379486, 15.0011044, 0.000e-00,\n 0.5504170, -0.0001243, -1.090e-05,\n 0.0042580, -0.0001237, -1.090e-05,\n 0.0046049, 0.0045820,\n// 1703 1 17\n2343083.975291, 11.0, -4.0, 4.0, 8.4, 8.4,\n -0.1597690, 0.5625037, -2.210e-05, -8.730e-06,\n -0.7528300, 0.0530467, 1.871e-04, -7.400e-07,\n -20.8402004, 0.0080010, 5.000e-06,\n 342.3457642, 14.9980154, 0.000e-00,\n 0.5460500, 0.0001104, -1.230e-05,\n -0.0000870, 0.0001098, -1.230e-05,\n 0.0047513, 0.0047276,\n// 1703 7 14\n2343261.608723, 3.0, -4.0, 4.0, 8.5, 8.5,\n 0.2612050, 0.5105276, -8.400e-06, -5.910e-06,\n 1.1078910, -0.0283266, -1.823e-04, 2.400e-07,\n 21.8624001, -0.0059920, -5.000e-06,\n 223.7407837, 15.0000439, 0.000e-00,\n 0.5629830, -0.0000676, -9.900e-06,\n 0.0167620, -0.0000673, -9.800e-06,\n 0.0046010, 0.0045780,\n// 1703 12 8\n2343409.153820, 16.0, -4.0, 4.0, 8.6, 8.6,\n 0.4366740, 0.5683804, 1.690e-05, -9.510e-06,\n 1.2464870, -0.1158236, 9.730e-05, 2.090e-06,\n -22.7379093, -0.0041600, 6.000e-06,\n 61.9243698, 14.9968843, 0.000e-00,\n 0.5391670, -0.0000491, -1.300e-05,\n -0.0069360, -0.0000489, -1.300e-05,\n 0.0047496, 0.0047259,\n// 1704 1 7\n2343438.593642, 2.0, -4.0, 4.0, 8.6, 8.6,\n -0.1123360, 0.5830218, -4.000e-07, -9.940e-06,\n -1.3699180, 0.0134914, 2.509e-04, -1.200e-07,\n -22.5228996, 0.0049910, 6.000e-06,\n 208.3789215, 14.9969664, 0.000e-00,\n 0.5384240, 0.0000184, -1.310e-05,\n -0.0076750, 0.0000183, -1.310e-05,\n 0.0047545, 0.0047308,\n// 1704 6 2\n2343586.043473, 13.0, -4.0, 4.0, 8.6, 8.6,\n 0.1984770, 0.5024594, 1.230e-05, -5.950e-06,\n -0.9355780, 0.1189586, -1.002e-04, -1.540e-06,\n 22.2482491, 0.0050590, -5.000e-06,\n 15.6583500, 14.9996881, 0.000e-00,\n 0.5606350, 0.0000829, -1.010e-05,\n 0.0144250, 0.0000824, -1.000e-05,\n 0.0046069, 0.0045839,\n// 1704 11 27\n2343763.731858, 6.0, -4.0, 4.0, 8.7, 8.7,\n 0.4180900, 0.5340376, 3.890e-05, -7.850e-06,\n 0.5786340, -0.1534279, 1.128e-04, 2.410e-06,\n -21.1890697, -0.0072210, 6.000e-06,\n 272.9784851, 14.9978876, 0.000e-00,\n 0.5496290, -0.0001235, -1.190e-05,\n 0.0034730, -0.0001229, -1.190e-05,\n 0.0047432, 0.0047196,\n// 1705 5 22\n2343940.329930, 20.0, -4.0, 4.0, 8.7, 8.7,\n 0.0883290, 0.5223346, 1.970e-05, -7.300e-06,\n -0.1320750, 0.1639690, -1.260e-04, -2.450e-06,\n 20.4673805, 0.0077580, -5.000e-06,\n 120.9721375, 15.0006151, 0.000e-00,\n 0.5467200, 0.0001155, -1.130e-05,\n 0.0005800, 0.0001150, -1.120e-05,\n 0.0046137, 0.0045907,\n// 1705 11 16\n2344118.057709, 13.0, -4.0, 4.0, 8.8, 8.8,\n -0.1981290, 0.4904941, 6.420e-05, -5.980e-06,\n 0.0435190, -0.1791070, 1.102e-04, 2.350e-06,\n -18.8129902, -0.0099650, 5.000e-06,\n 18.7058296, 14.9992495, 0.000e-00,\n 0.5649420, -0.0000931, -1.060e-05,\n 0.0187100, -0.0000927, -1.050e-05,\n 0.0047345, 0.0047109,\n// 1706 5 12\n2344294.899407, 10.0, -4.0, 4.0, 8.8, 8.8,\n 0.0098570, 0.5388964, 3.530e-05, -8.780e-06,\n 0.6442060, 0.2055388, -1.529e-04, -3.510e-06,\n 18.0649300, 0.0100710, -4.000e-06,\n 331.0253601, 15.0016832, 0.000e-00,\n 0.5345440, 0.0000572, -1.250e-05,\n -0.0115360, 0.0000569, -1.250e-05,\n 0.0046225, 0.0045994,\n// 1706 11 5\n2344472.099962, 14.0, -4.0, 4.0, 8.9, 8.9,\n -0.4789330, 0.4624303, 5.770e-05, -5.080e-06,\n -0.5997310, -0.2003864, 1.112e-04, 2.370e-06,\n -15.6902704, -0.0122380, 4.000e-06,\n 34.0263290, 15.0007954, 0.000e-00,\n 0.5733140, -0.0000057, -9.800e-06,\n 0.0270410, -0.0000057, -9.800e-06,\n 0.0047230, 0.0046995,\n// 1707 4 2\n2344620.258618, 18.0, -4.0, 4.0, 8.9, 8.9,\n 0.5001000, 0.5045779, -2.700e-06, -8.090e-06,\n -1.1692330, 0.2741298, 4.150e-05, -4.580e-06,\n 4.8661098, 0.0153500, -1.000e-06,\n 89.0691071, 15.0044289, 0.000e-00,\n 0.5378830, -0.0000746, -1.250e-05,\n -0.0082130, -0.0000742, -1.250e-05,\n 0.0046706, 0.0046473,\n// 1707 5 2\n2344649.602971, 2.0, -4.0, 4.0, 8.9, 8.9,\n -0.7742520, 0.5341937, 8.810e-05, -8.980e-06,\n 1.0854660, 0.2336330, -1.547e-04, -4.130e-06,\n 15.1194201, 0.0120240, -3.000e-06,\n 210.8043213, 15.0026922, 0.000e-00,\n 0.5324430, -0.0000203, -1.280e-05,\n -0.0136260, -0.0000202, -1.280e-05,\n 0.0046335, 0.0046105,\n// 1707 9 25\n2344796.461867, 23.0, -4.0, 4.0, 9.0, 9.0,\n 0.6684690, 0.4630906, -4.330e-05, -5.810e-06,\n 1.3033971, -0.2556977, -4.660e-05, 3.410e-06,\n -0.8500900, -0.0156880, 0.000e-00,\n 167.0948944, 15.0046196, 0.000e-00,\n 0.5580660, 0.0001174, -1.070e-05,\n 0.0118690, 0.0001168, -1.060e-05,\n 0.0046695, 0.0046462,\n// 1707 10 25\n2344826.095396, 14.0, -4.0, 4.0, 9.0, 9.0,\n -0.7529520, 0.4622621, 4.990e-05, -5.370e-06,\n -1.2084950, -0.2248015, 1.197e-04, 2.760e-06,\n -12.0083199, -0.0139170, 2.000e-06,\n 33.9144211, 15.0022964, 0.000e-00,\n 0.5675040, 0.0000916, -1.020e-05,\n 0.0212600, 0.0000911, -1.010e-05,\n 0.0047092, 0.0046858,\n// 1708 3 22\n2344974.785840, 7.0, -4.0, 4.0, 9.0, 9.0,\n 0.3527730, 0.4745401, 2.600e-06, -6.460e-06,\n -0.4763370, 0.2647669, 2.650e-05, -3.780e-06,\n 0.6903200, 0.0157830, 0.000e-00,\n 283.2320557, 15.0043888, 0.000e-00,\n 0.5523050, -0.0001275, -1.130e-05,\n 0.0061370, -0.0001269, -1.120e-05,\n 0.0046857, 0.0046624,\n// 1708 9 14\n2345150.875260, 9.0, -4.0, 4.0, 9.1, 9.1,\n 0.3194080, 0.4929572, -4.160e-05, -7.430e-06,\n 0.5872710, -0.2714796, -4.270e-05, 4.300e-06,\n 3.3672199, -0.0154120, -1.000e-06,\n 316.1631775, 15.0047979, 0.000e-00,\n 0.5420800, 0.0001092, -1.200e-05,\n -0.0040380, 0.0001086, -1.200e-05,\n 0.0046545, 0.0046314,\n// 1709 3 11\n2345329.012901, 12.0, -4.0, 4.0, 9.1, 9.1,\n -0.2064520, 0.4487016, 8.500e-06, -5.150e-06,\n 0.0451020, 0.2483318, 2.110e-05, -3.030e-06,\n -3.6594000, 0.0157490, 1.000e-06,\n 357.4096375, 15.0039454, 0.000e-00,\n 0.5676580, -0.0000751, -1.010e-05,\n 0.0214130, -0.0000748, -1.010e-05,\n 0.0047010, 0.0046776,\n// 1709 9 4\n2345505.522528, 1.0, -4.0, 4.0, 9.2, 9.2,\n 0.2024280, 0.5148281, -3.600e-05, -8.640e-06,\n -0.1898060, -0.2738837, -3.030e-05, 4.800e-06,\n 7.3708901, -0.0147350, -2.000e-06,\n 195.2774963, 15.0045748, 0.000e-00,\n 0.5327460, 0.0000148, -1.290e-05,\n -0.0133250, 0.0000147, -1.280e-05,\n 0.0046410, 0.0046179,\n// 1710 2 28\n2345683.005196, 12.0, -4.0, 4.0, 9.2, 9.2,\n -0.4533610, 0.4456982, -6.800e-06, -4.880e-06,\n 0.7227980, 0.2356930, 1.140e-05, -2.750e-06,\n -8.0024004, 0.0151630, 2.000e-06,\n 356.7423706, 15.0031195, 0.000e-00,\n 0.5726680, 0.0000216, -9.800e-06,\n 0.0263980, 0.0000215, -9.800e-06,\n 0.0047154, 0.0046919,\n// 1710 8 24\n2345860.220320, 17.0, -4.0, 4.0, 9.2, 9.2,\n -0.5048780, 0.5155515, 4.900e-06, -8.310e-06,\n -0.6461570, -0.2554293, -3.210e-05, 4.320e-06,\n 11.1463099, -0.0136840, -2.000e-06,\n 74.4997711, 15.0039654, 0.000e-00,\n 0.5353580, -0.0000652, -1.250e-05,\n -0.0107260, -0.0000649, -1.240e-05,\n 0.0046292, 0.0046061,\n// 1711 1 18\n2346007.433078, 22.0, -4.0, 4.0, 9.3, 9.3,\n 0.2016310, 0.5174942, -7.060e-05, -7.030e-06,\n -1.3813410, 0.1589322, 1.977e-04, -2.350e-06,\n -20.5336609, 0.0081580, 5.000e-06,\n 147.2206726, 14.9980841, 0.000e-00,\n 0.5567530, 0.0001294, -1.130e-05,\n 0.0105620, 0.0001288, -1.130e-05,\n 0.0047511, 0.0047275,\n// 1711 2 17\n2346037.062670, 14.0, -4.0, 4.0, 9.3, 9.3,\n -0.4239360, 0.4710816, -2.710e-05, -5.770e-06,\n 1.4699939, 0.2283239, -1.400e-06, -2.950e-06,\n -12.0729799, 0.0139970, 3.000e-06,\n 26.3556709, 15.0019884, 0.000e-00,\n 0.5637530, 0.0000932, -1.060e-05,\n 0.0175280, 0.0000927, -1.050e-05,\n 0.0047278, 0.0047042,\n// 1711 7 15\n2346185.307073, 19.0, -4.0, 4.0, 9.3, 9.3,\n 0.0940410, 0.5111150, -2.570e-05, -6.480e-06,\n 1.1027930, -0.1373677, -1.852e-04, 1.850e-06,\n 21.6006908, -0.0061820, -5.000e-06,\n 103.6873779, 15.0001869, 0.000e-00,\n 0.5544970, -0.0001012, -1.050e-05,\n 0.0083180, -0.0001007, -1.050e-05,\n 0.0046011, 0.0045782,\n// 1712 1 8\n2346361.915734, 10.0, -4.0, 4.0, 9.4, 9.4,\n 0.1565370, 0.5580766, -5.830e-05, -8.970e-06,\n -0.6212860, 0.1288005, 1.959e-04, -2.250e-06,\n -22.3485203, 0.0051380, 6.000e-06,\n 328.2294617, 14.9970160, 0.000e-00,\n 0.5428730, 0.0000806, -1.270e-05,\n -0.0032480, 0.0000802, -1.260e-05,\n 0.0047546, 0.0047309,\n// 1712 7 3\n2346539.440943, 23.0, -4.0, 4.0, 9.4, 9.4,\n 0.2726300, 0.4982130, -3.170e-05, -5.610e-06,\n 0.2972840, -0.0957054, -1.535e-04, 1.190e-06,\n 22.9424896, -0.0033170, -5.000e-06,\n 164.0908813, 14.9993963, 0.000e-00,\n 0.5647800, -0.0000421, -9.700e-06,\n 0.0185500, -0.0000419, -9.700e-06,\n 0.0045991, 0.0045762,\n// 1712 12 28\n2346716.558964, 1.0, -4.0, 4.0, 9.4, 9.4,\n -0.2442910, 0.5761154, -1.140e-05, -9.770e-06,\n -0.0014950, 0.0860728, 1.779e-04, -1.610e-06,\n -23.3158092, 0.0018820, 6.000e-06,\n 194.4691925, 14.9964037, 0.000e-00,\n 0.5386640, -0.0000071, -1.310e-05,\n -0.0074360, -0.0000070, -1.310e-05,\n 0.0047554, 0.0047317,\n// 1713 6 22\n2346893.469196, 23.0, -4.0, 4.0, 9.5, 9.5,\n -0.1786080, 0.5088737, -1.940e-05, -5.900e-06,\n -0.4045960, -0.0557058, -1.321e-04, 7.500e-07,\n 23.4719391, -0.0002250, -6.000e-06,\n 164.6592255, 14.9990816, 0.000e-00,\n 0.5624410, 0.0000708, -9.900e-06,\n 0.0162230, 0.0000705, -9.900e-06,\n 0.0045993, 0.0045764,\n// 1713 12 17\n2347071.169682, 16.0, -4.0, 4.0, 9.5, 9.5,\n -0.0879460, 0.5619145, 8.600e-06, -8.620e-06,\n 0.7206720, 0.0367157, 1.357e-04, -7.000e-07,\n -23.4076099, -0.0014710, 6.000e-06,\n 60.7931786, 14.9963408, 0.000e-00,\n 0.5468710, -0.0001021, -1.230e-05,\n 0.0007300, -0.0001016, -1.220e-05,\n 0.0047538, 0.0047302,\n// 1714 5 13\n2347218.277488, 19.0, -4.0, 4.0, 9.5, 9.5,\n -0.0568090, 0.5497547, 8.300e-06, -8.160e-06,\n 1.4965150, 0.0913556, -1.994e-04, -1.240e-06,\n 18.4225597, 0.0100350, -4.000e-06,\n 106.0265808, 15.0015650, 0.000e-00,\n 0.5428710, 0.0001035, -1.170e-05,\n -0.0032500, 0.0001030, -1.160e-05,\n 0.0046216, 0.0045986,\n// 1714 6 12\n2347247.694460, 5.0, -4.0, 4.0, 9.5, 9.5,\n 0.1475970, 0.5395090, -2.720e-05, -7.280e-06,\n -1.1655470, -0.0149607, -1.015e-04, 2.800e-07,\n 23.1512699, 0.0028210, -6.000e-06,\n 255.2427063, 14.9993095, 0.000e-00,\n 0.5494300, 0.0001104, -1.100e-05,\n 0.0032760, 0.0001099, -1.090e-05,\n 0.0046019, 0.0045789,\n// 1714 11 7\n2347395.878173, 9.0, -4.0, 4.0, 9.6, 9.6,\n -0.3320490, 0.5043132, 4.580e-05, -5.960e-06,\n -1.4253680, -0.1033513, 1.551e-04, 1.180e-06,\n -16.2445602, -0.0121270, 4.000e-06,\n 319.0072021, 15.0006380, 0.000e-00,\n 0.5680400, -0.0000802, -1.020e-05,\n 0.0217930, -0.0000798, -1.020e-05,\n 0.0047248, 0.0047012,\n// 1714 12 7\n2347425.560526, 1.0, -4.0, 4.0, 9.6, 9.6,\n -0.2109780, 0.5288608, 2.780e-05, -6.760e-06,\n 1.4815770, -0.0102494, 8.860e-05, 2.000e-08,\n -22.5925999, -0.0048160, 6.000e-06,\n 197.0697021, 14.9968891, 0.000e-00,\n 0.5622080, -0.0001035, -1.090e-05,\n 0.0159900, -0.0001030, -1.080e-05,\n 0.0047498, 0.0047261,\n// 1715 5 3\n2347572.900347, 10.0, -4.0, 4.0, 9.6, 9.6,\n 0.0718130, 0.5682352, 1.370e-05, -9.570e-06,\n 0.7433290, 0.1231166, -1.459e-04, -1.980e-06,\n 15.5370197, 0.0120410, -3.000e-06,\n 330.8459473, 15.0026398, 0.000e-00,\n 0.5330720, 0.0000319, -1.280e-05,\n -0.0130010, 0.0000318, -1.270e-05,\n 0.0046323, 0.0046092,\n// 1715 10 27\n2347749.876949, 9.0, -4.0, 4.0, 9.6, 9.6,\n -0.2177880, 0.4885634, 2.450e-05, -5.440e-06,\n -0.7637940, -0.1237607, 1.036e-04, 1.320e-06,\n -12.6444101, -0.0139130, 3.000e-06,\n 318.9657593, 15.0021334, 0.000e-00,\n 0.5726560, 0.0000179, -9.800e-06,\n 0.0263860, 0.0000178, -9.800e-06,\n 0.0047116, 0.0046881,\n// 1716 4 22\n2347927.603154, 2.0, -4.0, 4.0, 9.6, 9.6,\n -0.2643210, 0.5604429, 4.160e-05, -9.320e-06,\n -0.0780530, 0.1455598, -7.060e-05, -2.340e-06,\n 12.1861095, 0.0136570, -3.000e-06,\n 210.4119415, 15.0035343, 0.000e-00,\n 0.5346580, -0.0000478, -1.270e-05,\n -0.0114220, -0.0000476, -1.260e-05,\n 0.0046446, 0.0046215,\n// 1716 10 15\n2348103.921975, 10.0, -4.0, 4.0, 9.7, 9.7,\n -0.0829600, 0.5009430, 3.000e-06, -6.150e-06,\n -0.0474990, -0.1452393, 5.750e-05, 1.710e-06,\n -8.6442499, -0.0151030, 2.000e-06,\n 333.5413818, 15.0034237, 0.000e-00,\n 0.5631530, 0.0001077, -1.050e-05,\n 0.0169310, 0.0001072, -1.040e-05,\n 0.0046967, 0.0046733,\n// 1717 4 11\n2348282.190741, 17.0, -4.0, 4.0, 9.7, 9.7,\n 0.4396320, 0.5291955, 1.090e-05, -7.640e-06,\n -0.6690950, 0.1556854, -9.700e-06, -2.160e-06,\n 8.4503002, 0.0148820, -2.000e-06,\n 74.7657700, 15.0041418, 0.000e-00,\n 0.5471000, -0.0001311, -1.160e-05,\n 0.0009570, -0.0001304, -1.150e-05,\n 0.0046584, 0.0046352,\n// 1717 10 4\n2348458.255873, 18.0, -4.0, 4.0, 9.7, 9.7,\n 0.1215300, 0.5296524, -1.450e-05, -7.780e-06,\n 0.6497000, -0.1659005, 1.000e-06, 2.370e-06,\n -4.4992299, -0.0157240, 1.000e-06,\n 92.8445511, 15.0043612, 0.000e-00,\n 0.5468280, 0.0001220, -1.180e-05,\n 0.0006860, 0.0001214, -1.170e-05,\n 0.0046814, 0.0046581,\n// 1718 3 2\n2348606.813619, 8.0, -4.0, 4.0, 9.8, 9.8,\n -0.1656740, 0.4856968, 3.700e-06, -5.510e-06,\n 1.3832150, 0.1461629, -1.100e-05, -1.610e-06,\n -7.2860699, 0.0155220, 2.000e-06,\n 296.8448181, 15.0033779, 0.000e-00,\n 0.5709430, -0.0000654, -1.000e-05,\n 0.0246810, -0.0000651, -9.900e-06,\n 0.0047132, 0.0046897,\n// 1718 8 26\n2348783.528997, 1.0, -4.0, 4.0, 9.8, 9.8,\n -0.1578480, 0.5625388, -7.900e-06, -9.600e-06,\n -1.2294000, -0.1565566, 3.300e-06, 2.590e-06,\n 10.6636496, -0.0140860, -2.000e-06,\n 194.5901642, 15.0041761, 0.000e-00,\n 0.5317750, -0.0000105, -1.290e-05,\n -0.0142910, -0.0000105, -1.280e-05,\n 0.0046305, 0.0046074,\n// 1718 9 24\n2348812.857172, 9.0, -4.0, 4.0, 9.8, 9.8,\n 0.6464560, 0.5521354, -4.130e-05, -9.250e-06,\n 1.1865890, -0.1793477, -6.300e-05, 2.940e-06,\n -0.3615100, -0.0158630, 0.000e-00,\n 316.9896851, 15.0048676, 0.000e-00,\n 0.5350480, 0.0000383, -1.280e-05,\n -0.0110350, 0.0000381, -1.280e-05,\n 0.0046667, 0.0046434,\n// 1719 2 19\n2348960.786775, 7.0, -4.0, 4.0, 9.8, 9.8,\n -0.1187990, 0.4899891, -1.920e-05, -5.550e-06,\n 0.6778170, 0.1304234, 3.640e-05, -1.410e-06,\n -11.4496603, 0.0144600, 2.000e-06,\n 281.4032288, 15.0022411, 0.000e-00,\n 0.5718460, 0.0000460, -1.000e-05,\n 0.0255800, 0.0000458, -9.900e-06,\n 0.0047264, 0.0047028,\n// 1719 8 15\n2349138.208235, 17.0, -4.0, 4.0, 9.9, 9.9,\n -0.1190270, 0.5532516, -1.800e-06, -8.700e-06,\n -0.5106370, -0.1304607, -6.630e-05, 1.980e-06,\n 14.1565504, -0.0126910, -3.000e-06,\n 73.9817200, 15.0033083, 0.000e-00,\n 0.5378480, -0.0000929, -1.220e-05,\n -0.0082490, -0.0000925, -1.210e-05,\n 0.0046201, 0.0045971,\n// 1720 2 8\n2349314.911469, 10.0, -4.0, 4.0, 9.9, 9.9,\n 0.0729710, 0.5205364, -4.040e-05, -6.800e-06,\n -0.0223510, 0.1143561, 9.130e-05, -1.430e-06,\n -15.1810999, 0.0128260, 3.000e-06,\n 326.3182678, 15.0008879, 0.000e-00,\n 0.5599160, 0.0001127, -1.100e-05,\n 0.0137090, 0.0001122, -1.090e-05,\n 0.0047371, 0.0047135,\n// 1720 8 4\n2349492.693224, 5.0, -4.0, 4.0, 9.9, 9.9,\n 0.2349040, 0.5271527, -1.310e-05, -6.990e-06,\n 0.2016350, -0.0974118, -1.204e-04, 1.210e-06,\n 17.2717705, -0.0108750, -4.000e-06,\n 253.6131439, 15.0022039, 0.000e-00,\n 0.5517640, -0.0001228, -1.080e-05,\n 0.0055980, -0.0001222, -1.080e-05,\n 0.0046116, 0.0045886,\n// 1721 1 27\n2349669.336937, 20.0, -4.0, 4.0, 9.9, 9.9,\n 0.0689790, 0.5590976, -3.900e-05, -8.740e-06,\n -0.7252810, 0.0914166, 1.625e-04, -1.360e-06,\n -18.3113804, 0.0106830, 4.000e-06,\n 116.6297607, 14.9994659, 0.000e-00,\n 0.5450940, 0.0000987, -1.240e-05,\n -0.0010390, 0.0000983, -1.230e-05,\n 0.0047452, 0.0047216,\n// 1721 7 24\n2349846.879806, 9.0, -4.0, 4.0, 10.0, 10.0,\n 0.0691200, 0.5063040, -1.050e-05, -5.820e-06,\n 1.0376130, -0.0626193, -1.638e-04, 6.400e-07,\n 19.9176407, -0.0085920, -4.000e-06,\n 313.5307312, 15.0010252, 0.000e-00,\n 0.5637860, -0.0000513, -9.800e-06,\n 0.0175600, -0.0000511, -9.800e-06,\n 0.0046052, 0.0045822,\n// 1721 12 19\n2349994.522115, 1.0, -4.0, 4.0, 10.0, 10.0,\n 0.4243030, 0.5753260, 5.800e-06, -9.610e-06,\n 1.2734550, -0.0679271, 1.059e-04, 1.260e-06,\n -23.4472103, -0.0007470, 7.000e-06,\n 195.6166229, 14.9963408, 0.000e-00,\n 0.5396800, -0.0000589, -1.300e-05,\n -0.0064260, -0.0000586, -1.290e-05,\n 0.0047540, 0.0047303,\n// 1722 1 17\n2350023.963305, 11.0, -4.0, 4.0, 10.0, 10.0,\n 0.0672120, 0.5803960, -2.090e-05, -9.900e-06,\n -1.3630019, 0.0583543, 2.330e-04, -9.000e-07,\n -20.7593098, 0.0080960, 5.000e-06,\n 342.3173218, 14.9981060, 0.000e-00,\n 0.5381770, 0.0000091, -1.310e-05,\n -0.0079210, 0.0000091, -1.310e-05,\n 0.0047510, 0.0047273,\n// 1722 6 13\n2350171.319659, 20.0, -4.0, 4.0, 10.0, 10.0,\n 0.3287320, 0.5116360, -2.200e-06, -6.120e-06,\n -0.9974750, 0.0802954, -1.066e-04, -1.080e-06,\n 23.2534008, 0.0021190, -6.000e-06,\n 120.1555405, 14.9991827, 0.000e-00,\n 0.5596120, 0.0000804, -1.010e-05,\n 0.0134080, 0.0000800, -1.010e-05,\n 0.0046017, 0.0045788,\n// 1722 12 8\n2350349.088595, 14.0, -4.0, 4.0, 10.1, 10.1,\n 0.0680110, 0.5425400, 4.660e-05, -7.900e-06,\n 0.6810280, -0.1110793, 1.262e-04, 1.760e-06,\n -22.7669106, -0.0040760, 6.000e-06,\n 31.8981209, 14.9967918, 0.000e-00,\n 0.5508670, -0.0001124, -1.190e-05,\n 0.0047060, -0.0001119, -1.180e-05,\n 0.0047502, 0.0047266,\n// 1723 6 3\n2350525.628628, 3.0, -4.0, 4.0, 10.1, 10.1,\n 0.0054560, 0.5347508, 1.720e-05, -7.580e-06,\n -0.2300420, 0.1270663, -1.370e-04, -1.940e-06,\n 22.2432404, 0.0050430, -5.000e-06,\n 225.6504517, 14.9997692, 0.000e-00,\n 0.5453410, 0.0001191, -1.140e-05,\n -0.0007930, 0.0001185, -1.130e-05,\n 0.0046064, 0.0045835,\n// 1723 11 27\n2350703.394625, 21.0, -4.0, 4.0, 10.1, 10.1,\n -0.2390130, 0.5000635, 6.280e-05, -6.060e-06,\n 0.0559690, -0.1444130, 1.317e-04, 1.910e-06,\n -21.1886196, -0.0072370, 5.000e-06,\n 137.9836426, 14.9978027, 0.000e-00,\n 0.5662520, -0.0000890, -1.050e-05,\n 0.0200140, -0.0000886, -1.050e-05,\n 0.0047437, 0.0047201,\n// 1724 5 22\n2350880.215378, 17.0, -4.0, 4.0, 10.2, 10.2,\n -0.2513850, 0.5519178, 4.700e-05, -9.070e-06,\n 0.4787540, 0.1718643, -1.652e-04, -2.980e-06,\n 20.5195808, 0.0076700, -5.000e-06,\n 75.9544983, 15.0006599, 0.000e-00,\n 0.5335110, 0.0000669, -1.260e-05,\n -0.0125640, 0.0000666, -1.250e-05,\n 0.0046132, 0.0045902,\n// 1724 11 15\n2351057.421963, 22.0, -4.0, 4.0, 10.2, 10.2,\n -0.3072530, 0.4728374, 5.360e-05, -5.200e-06,\n -0.6524400, -0.1733075, 1.363e-04, 2.060e-06,\n -18.7501392, -0.0100320, 4.000e-06,\n 153.7266693, 14.9992437, 0.000e-00,\n 0.5741400, -0.0000060, -9.800e-06,\n 0.0278620, -0.0000060, -9.800e-06,\n 0.0047343, 0.0047107,\n// 1725 4 13\n2351205.591234, 2.0, -4.0, 4.0, 10.2, 10.2,\n 0.5055340, 0.5092066, 9.500e-06, -8.120e-06,\n -1.2168339, 0.2627053, 1.970e-05, -4.360e-06,\n 8.9773798, 0.0144850, -2.000e-06,\n 209.8582001, 15.0040150, 0.000e-00,\n 0.5376750, -0.0000794, -1.250e-05,\n -0.0084200, -0.0000790, -1.240e-05,\n 0.0046564, 0.0046332,\n// 1725 5 12\n2351234.925221, 10.0, -4.0, 4.0, 10.2, 10.2,\n -0.5502430, 0.5454380, 8.010e-05, -9.160e-06,\n 1.1256340, 0.2048056, -1.801e-04, -3.630e-06,\n 18.1661606, 0.0099860, -4.000e-06,\n 331.0124207, 15.0016527, 0.000e-00,\n 0.5320840, -0.0000328, -1.280e-05,\n -0.0139840, -0.0000327, -1.270e-05,\n 0.0046223, 0.0045993,\n// 1725 10 6\n2351381.777574, 7.0, -4.0, 4.0, 10.3, 10.3,\n 0.8719870, 0.4667944, -3.970e-05, -5.900e-06,\n 1.2371080, -0.2521076, -2.210e-05, 3.390e-06,\n -5.1201801, -0.0154510, 1.000e-06,\n 287.9624634, 15.0041103, 0.000e-00,\n 0.5581130, 0.0001106, -1.080e-05,\n 0.0119150, 0.0001101, -1.070e-05,\n 0.0046839, 0.0046605,\n// 1725 11 4\n2351411.418657, 22.0, -4.0, 4.0, 10.3, 10.3,\n -0.5724880, 0.4728717, 4.950e-05, -5.540e-06,\n -1.2625690, -0.2043904, 1.458e-04, 2.540e-06,\n -15.6022501, -0.0122750, 3.000e-06,\n 154.0366364, 15.0008678, 0.000e-00,\n 0.5677010, 0.0000906, -1.020e-05,\n 0.0214560, 0.0000901, -1.020e-05,\n 0.0047221, 0.0046986,\n// 1726 4 2\n2351560.109911, 15.0, -4.0, 4.0, 10.3, 10.3,\n 0.4748620, 0.4752610, 1.010e-05, -6.410e-06,\n -0.4598430, 0.2597676, 2.900e-06, -3.680e-06,\n 4.9694099, 0.0153700, -1.000e-06,\n 44.0887718, 15.0043440, 0.000e-00,\n 0.5523240, -0.0001321, -1.120e-05,\n 0.0061550, -0.0001315, -1.110e-05,\n 0.0046713, 0.0046480,\n// 1726 9 25\n2351736.202599, 17.0, -4.0, 4.0, 10.3, 10.3,\n 0.4142380, 0.4933412, -3.310e-05, -7.490e-06,\n 0.5859400, -0.2739920, -1.990e-05, 4.380e-06,\n -0.9064900, -0.0156400, 0.000e-00,\n 77.1065216, 15.0046940, 0.000e-00,\n 0.5421170, 0.0001030, -1.210e-05,\n -0.0040000, 0.0001025, -1.210e-05,\n 0.0046686, 0.0046454,\n// 1727 3 22\n2351914.324943, 20.0, -4.0, 4.0, 10.4, 10.4,\n 0.0413530, 0.4467578, 1.130e-05, -5.100e-06,\n 0.1372070, 0.2499206, -4.200e-06, -3.030e-06,\n 0.6632200, 0.0158200, 0.000e-00,\n 118.2313309, 15.0043144, 0.000e-00,\n 0.5673120, -0.0000809, -1.010e-05,\n 0.0210690, -0.0000805, -1.000e-05,\n 0.0046868, 0.0046635,\n// 1727 9 15\n2352090.852440, 8.0, -4.0, 4.0, 10.4, 10.4,\n -0.2439250, 0.5106347, -5.000e-07, -8.580e-06,\n 0.1117010, -0.2821619, -2.270e-05, 4.950e-06,\n 3.2285399, -0.0153970, -1.000e-06,\n 301.1889343, 15.0048513, 0.000e-00,\n 0.5332760, 0.0000326, -1.290e-05,\n -0.0127970, 0.0000325, -1.290e-05,\n 0.0046542, 0.0046310,\n// 1728 3 10\n2352268.318700, 20.0, -4.0, 4.0, 10.4, 10.4,\n -0.2399130, 0.4419178, -3.200e-06, -4.850e-06,\n 0.8010670, 0.2440841, -1.380e-05, -2.850e-06,\n -3.7690201, 0.0157530, 1.000e-06,\n 117.3988266, 15.0039053, 0.000e-00,\n 0.5716320, 0.0000175, -9.800e-06,\n 0.0253670, 0.0000174, -9.800e-06,\n 0.0047020, 0.0046786,\n// 1728 9 4\n2352445.541232, 1.0, -4.0, 4.0, 10.5, 10.5,\n -0.3448850, 0.5069161, 8.000e-06, -8.110e-06,\n -0.6622170, -0.2691912, -8.400e-06, 4.520e-06,\n 7.2201900, -0.0147750, -2.000e-06,\n 195.2997742, 15.0045815, 0.000e-00,\n 0.5365520, -0.0000772, -1.250e-05,\n -0.0095380, -0.0000769, -1.240e-05,\n 0.0046411, 0.0046180,\n// 1729 1 29\n2352592.783836, 7.0, -4.0, 4.0, 10.5, 10.5,\n 0.5884820, 0.5074883, -8.810e-05, -6.930e-06,\n -1.2566190, 0.1936120, 1.685e-04, -2.850e-06,\n -17.9074402, 0.0107770, 4.000e-06,\n 281.5688782, 14.9995451, 0.000e-00,\n 0.5556110, 0.0001156, -1.140e-05,\n 0.0094260, 0.0001150, -1.130e-05,\n 0.0047447, 0.0047210,\n// 1729 2 27\n2352622.393776, 21.0, -4.0, 4.0, 10.5, 10.5,\n -0.8981330, 0.4652614, 6.000e-07, -5.760e-06,\n 1.2020360, 0.2441529, -1.570e-05, -3.180e-06,\n -8.0916700, 0.0151250, 2.000e-06,\n 131.7396851, 15.0031366, 0.000e-00,\n 0.5621320, 0.0001153, -1.060e-05,\n 0.0159150, 0.0001148, -1.060e-05,\n 0.0047157, 0.0046922,\n// 1729 7 26\n2352770.590740, 2.0, -4.0, 4.0, 10.5, 10.5,\n 0.2908370, 0.4988635, -3.800e-05, -6.250e-06,\n 1.1389400, -0.1707165, -1.692e-04, 2.260e-06,\n 19.5359993, -0.0087440, -4.000e-06,\n 208.5189667, 15.0011816, 0.000e-00,\n 0.5556510, -0.0001020, -1.050e-05,\n 0.0094660, -0.0001015, -1.040e-05,\n 0.0046058, 0.0045829,\n// 1729 8 24\n2352800.075361, 14.0, -4.0, 4.0, 10.5, 10.5,\n -0.5882240, 0.4873376, 1.490e-05, -6.620e-06,\n -1.4302990, -0.2398898, 1.000e-06, 3.460e-06,\n 11.0507402, -0.0137520, -3.000e-06,\n 29.5116501, 15.0039206, 0.000e-00,\n 0.5492990, -0.0001215, -1.120e-05,\n 0.0031460, -0.0001209, -1.110e-05,\n 0.0046297, 0.0046067,\n// 1730 1 18\n2352947.281429, 19.0, -4.0, 4.0, 10.6, 10.6,\n 0.3265140, 0.5478382, -7.320e-05, -8.840e-06,\n -0.5726560, 0.1711266, 1.731e-04, -2.960e-06,\n -20.4798794, 0.0081970, 5.000e-06,\n 102.2146072, 14.9981937, 0.000e-00,\n 0.5421590, 0.0000702, -1.270e-05,\n -0.0039590, 0.0000698, -1.270e-05,\n 0.0047505, 0.0047269,\n// 1730 7 15\n2353124.707741, 5.0, -4.0, 4.0, 10.6, 10.6,\n 0.1195970, 0.4892643, -3.560e-05, -5.480e-06,\n 0.4156960, -0.1319794, -1.459e-04, 1.610e-06,\n 21.6277695, -0.0061480, -5.000e-06,\n 253.6868591, 15.0001183, 0.000e-00,\n 0.5652120, -0.0000273, -9.700e-06,\n 0.0189790, -0.0000271, -9.700e-06,\n 0.0046014, 0.0045785,\n// 1731 1 8\n2353301.928984, 10.0, -4.0, 4.0, 10.6, 10.6,\n -0.1747140, 0.5668013, -2.630e-05, -9.580e-06,\n -0.0088740, 0.1330832, 1.659e-04, -2.420e-06,\n -22.2966499, 0.0052440, 6.000e-06,\n 328.2011108, 14.9970779, 0.000e-00,\n 0.5387290, -0.0000161, -1.310e-05,\n -0.0073720, -0.0000160, -1.310e-05,\n 0.0047541, 0.0047304,\n// 1731 7 4\n2353478.740567, 6.0, -4.0, 4.0, 10.7, 10.7,\n 0.0519360, 0.5041626, -3.900e-05, -5.870e-06,\n -0.3499170, -0.0955976, -1.280e-04, 1.230e-06,\n 22.9668102, -0.0032320, -5.000e-06,\n 269.0971375, 14.9993944, 0.000e-00,\n 0.5618780, 0.0000672, -9.900e-06,\n 0.0156620, 0.0000668, -9.900e-06,\n 0.0045991, 0.0045762,\n// 1731 12 29\n2353656.532554, 1.0, -4.0, 4.0, 10.7, 10.7,\n 0.0133260, 0.5552251, -9.600e-06, -8.440e-06,\n 0.7335870, 0.0839815, 1.337e-04, -1.430e-06,\n -23.2947102, 0.0020130, 6.000e-06,\n 194.4306030, 14.9963684, 0.000e-00,\n 0.5476270, -0.0001125, -1.220e-05,\n 0.0014810, -0.0001119, -1.220e-05,\n 0.0047555, 0.0047318,\n// 1732 6 22\n2353832.985277, 12.0, -4.0, 4.0, 10.8, 10.8,\n 0.0756120, 0.5388099, -3.650e-05, -7.350e-06,\n -1.0942630, -0.0576672, -1.055e-04, 8.900e-07,\n 23.4712105, -0.0002050, -6.000e-06,\n 359.6535950, 14.9991560, 0.000e-00,\n 0.5483090, 0.0001110, -1.100e-05,\n 0.0021600, 0.0001105, -1.100e-05,\n 0.0045989, 0.0045760,\n// 1732 11 17\n2353981.207534, 17.0, -4.0, 4.0, 10.8, 10.8,\n -0.2009460, 0.5082462, 3.750e-05, -5.970e-06,\n -1.4704731, -0.0728871, 1.803e-04, 8.100e-07,\n -19.2025909, -0.0098360, 5.000e-06,\n 78.6315384, 14.9990702, 0.000e-00,\n 0.5693330, -0.0000787, -1.020e-05,\n 0.0230800, -0.0000783, -1.020e-05,\n 0.0047359, 0.0047123,\n// 1732 12 17\n2354010.907601, 10.0, -4.0, 4.0, 10.8, 10.8,\n 0.0204650, 0.5261553, 6.200e-06, -6.670e-06,\n 1.4794641, 0.0336443, 9.730e-05, -5.500e-07,\n -23.4111595, -0.0014170, 7.000e-06,\n 330.7833252, 14.9962425, 0.000e-00,\n 0.5632170, -0.0001168, -1.080e-05,\n 0.0169940, -0.0001163, -1.080e-05,\n 0.0047545, 0.0047309,\n// 1733 5 13\n2354158.221167, 17.0, -4.0, 4.0, 10.8, 10.8,\n -0.2994060, 0.5748996, 3.110e-05, -9.720e-06,\n 0.7329720, 0.0924661, -1.692e-04, -1.470e-06,\n 18.5012703, 0.0099630, -4.000e-06,\n 76.0184402, 15.0015907, 0.000e-00,\n 0.5321440, 0.0000442, -1.280e-05,\n -0.0139240, 0.0000440, -1.270e-05,\n 0.0046211, 0.0045981,\n// 1733 11 6\n2354335.194613, 17.0, -4.0, 4.0, 10.9, 10.9,\n -0.0014700, 0.4938944, 1.770e-05, -5.510e-06,\n -0.8373850, -0.1006943, 1.306e-04, 1.060e-06,\n -16.1619205, -0.0121830, 4.000e-06,\n 79.0184097, 15.0006552, 0.000e-00,\n 0.5733610, 0.0000158, -9.800e-06,\n 0.0270880, 0.0000157, -9.800e-06,\n 0.0047245, 0.0047009,\n// 1734 5 3\n2354512.927733, 10.0, -4.0, 4.0, 10.9, 10.9,\n -0.1600120, 0.5653859, 3.890e-05, -9.360e-06,\n 0.0141130, 0.1207293, -1.006e-04, -1.910e-06,\n 15.6561699, 0.0119740, -3.000e-06,\n 330.8505249, 15.0025930, 0.000e-00,\n 0.5344060, -0.0000582, -1.260e-05,\n -0.0116730, -0.0000579, -1.260e-05,\n 0.0046320, 0.0046090,\n// 1734 10 26\n2354689.245459, 18.0, -4.0, 4.0, 11.0, 11.0,\n 0.0307300, 0.5068705, 2.800e-06, -6.270e-06,\n -0.1105510, -0.1287062, 8.500e-05, 1.520e-06,\n -12.5655899, -0.0139290, 3.000e-06,\n 93.9646378, 15.0022116, 0.000e-00,\n 0.5632600, 0.0001057, -1.050e-05,\n 0.0170370, 0.0001052, -1.050e-05,\n 0.0047106, 0.0046872,\n// 1735 4 23\n2354867.508050, 0.0, -4.0, 4.0, 11.0, 11.0,\n 0.0771820, 0.5321132, 3.170e-05, -7.590e-06,\n -0.7200820, 0.1381435, -3.310e-05, -1.880e-06,\n 12.2939796, 0.0136300, -3.000e-06,\n 180.4223328, 15.0034361, 0.000e-00,\n 0.5472960, -0.0001175, -1.150e-05,\n 0.0011520, -0.0001170, -1.140e-05,\n 0.0046450, 0.0046219,\n// 1735 10 16\n2355043.590667, 2.0, -4.0, 4.0, 11.1, 11.1,\n 0.0791880, 0.5345078, -5.500e-06, -7.920e-06,\n 0.6228920, -0.1555225, 2.790e-05, 2.240e-06,\n -8.6680698, -0.0150680, 2.000e-06,\n 213.5467834, 15.0035076, 0.000e-00,\n 0.5468140, 0.0001211, -1.190e-05,\n 0.0006720, 0.0001205, -1.180e-05,\n 0.0046957, 0.0046723,\n// 1736 3 12\n2355192.129113, 15.0, -4.0, 4.0, 11.1, 11.1,\n -0.4741640, 0.4828310, 2.050e-05, -5.450e-06,\n 1.3234460, 0.1538451, -3.330e-05, -1.690e-06,\n -3.0394499, 0.0160200, 1.000e-06,\n 42.5221596, 15.0040941, 0.000e-00,\n 0.5704990, -0.0000490, -9.900e-06,\n 0.0242400, -0.0000488, -9.900e-06,\n 0.0046998, 0.0046764,\n// 1736 4 11\n2355221.804245, 7.0, -4.0, 4.0, 11.1, 11.1,\n 0.2811390, 0.4961825, 1.400e-05, -5.950e-06,\n -1.4984510, 0.1470386, 2.050e-05, -1.680e-06,\n 8.4478102, 0.0149060, -2.000e-06,\n 284.7554016, 15.0040531, 0.000e-00,\n 0.5629800, -0.0000876, -1.020e-05,\n 0.0167590, -0.0000872, -1.020e-05,\n 0.0046597, 0.0046365,\n// 1736 9 5\n2355368.854464, 9.0, -4.0, 4.0, 11.2, 11.2,\n -0.1012860, 0.5580004, -3.700e-06, -9.510e-06,\n -1.3096490, -0.1713502, 3.310e-05, 2.840e-06,\n 6.7017698, -0.0151150, -2.000e-06,\n 315.4121704, 15.0047607, 0.000e-00,\n 0.5324560, -0.0000214, -1.290e-05,\n -0.0136130, -0.0000213, -1.280e-05,\n 0.0046424, 0.0046193,\n// 1736 10 4\n2355398.195530, 17.0, -4.0, 4.0, 11.2, 11.2,\n 0.5582760, 0.5540568, -2.780e-05, -9.320e-06,\n 1.1736660, -0.1751683, -3.630e-05, 2.880e-06,\n -4.6381302, -0.0156820, 1.000e-06,\n 77.8706818, 15.0044069, 0.000e-00,\n 0.5354910, 0.0000359, -1.290e-05,\n -0.0105940, 0.0000357, -1.280e-05,\n 0.0046808, 0.0046575,\n// 1737 3 1\n2355546.107841, 15.0, -4.0, 4.0, 11.2, 11.2,\n -0.0024950, 0.4868807, -1.830e-05, -5.550e-06,\n 0.7400620, 0.1453173, 9.000e-06, -1.590e-06,\n -7.4037299, 0.0155040, 1.000e-06,\n 41.8333511, 15.0033426, 0.000e-00,\n 0.5706800, 0.0000447, -1.000e-05,\n 0.0244200, 0.0000445, -9.900e-06,\n 0.0047142, 0.0046908,\n// 1737 8 26\n2355723.522315, 1.0, -4.0, 4.0, 11.3, 11.3,\n 0.0968960, 0.5461632, -8.100e-06, -8.520e-06,\n -0.6374030, -0.1509560, -3.610e-05, 2.290e-06,\n 10.5209103, -0.0141420, -2.000e-06,\n 194.6123657, 15.0041723, 0.000e-00,\n 0.5391080, -0.0001076, -1.210e-05,\n -0.0069950, -0.0001070, -1.210e-05,\n 0.0046307, 0.0046076,\n// 1738 2 18\n2355900.251750, 18.0, -4.0, 4.0, 11.3, 11.3,\n -0.0162970, 0.5169631, -3.420e-05, -6.830e-06,\n -0.0261560, 0.1373194, 6.470e-05, -1.740e-06,\n -11.5008202, 0.0144250, 2.000e-06,\n 86.4082413, 15.0022831, 0.000e-00,\n 0.5584180, 0.0001170, -1.100e-05,\n 0.0122190, 0.0001164, -1.100e-05,\n 0.0047264, 0.0047029,\n// 1738 8 15\n2356077.986249, 12.0, -4.0, 4.0, 11.4, 11.4,\n 0.2102350, 0.5196386, -1.260e-05, -6.810e-06,\n 0.1238710, -0.1225932, -9.490e-05, 1.530e-06,\n 14.0921698, -0.0127370, -3.000e-06,\n 358.9846802, 15.0032501, 0.000e-00,\n 0.5532350, -0.0001201, -1.080e-05,\n 0.0070620, -0.0001195, -1.070e-05,\n 0.0046205, 0.0045975,\n// 1739 2 8\n2356254.695295, 5.0, -4.0, 4.0, 11.4, 11.4,\n 0.3283290, 0.5545372, -5.230e-05, -8.730e-06,\n -0.6594740, 0.1230747, 1.327e-04, -1.870e-06,\n -15.1230898, 0.0128350, 3.000e-06,\n 251.3317413, 15.0009956, 0.000e-00,\n 0.5440080, 0.0000849, -1.240e-05,\n -0.0021190, 0.0000845, -1.240e-05,\n 0.0047364, 0.0047128,\n// 1739 8 4\n2356432.153430, 16.0, -4.0, 4.0, 11.5, 11.5,\n 0.3329790, 0.5006210, -2.450e-05, -5.720e-06,\n 0.9134980, -0.0924476, -1.399e-04, 9.800e-07,\n 17.3030605, -0.0108590, -4.000e-06,\n 58.5969887, 15.0021267, 0.000e-00,\n 0.5646430, -0.0000535, -9.800e-06,\n 0.0184130, -0.0000532, -9.800e-06,\n 0.0046119, 0.0045889,\n// 1739 12 30\n2356579.890316, 9.0, -4.0, 4.0, 11.5, 11.5,\n -0.1688080, 0.5782330, 2.190e-05, -9.630e-06,\n 1.3266660, -0.0192462, 1.024e-04, 4.300e-07,\n -23.2131901, 0.0027130, 6.000e-06,\n 314.2687378, 14.9964848, 0.000e-00,\n 0.5401070, -0.0000427, -1.300e-05,\n -0.0060010, -0.0000424, -1.290e-05,\n 0.0047552, 0.0047315,\n// 1740 1 28\n2356609.329855, 20.0, -4.0, 4.0, 11.5, 11.5,\n 0.2742730, 0.5752070, -3.780e-05, -9.820e-06,\n -1.3283910, 0.0974076, 2.073e-04, -1.570e-06,\n -18.2078800, 0.0107550, 4.000e-06,\n 116.6284180, 14.9995604, 0.000e-00,\n 0.5378150, -0.0000022, -1.310e-05,\n -0.0082820, -0.0000022, -1.310e-05,\n 0.0047447, 0.0047211,\n// 1740 6 24\n2356756.596453, 2.0, -4.0, 4.0, 11.6, 11.6,\n -0.0776910, 0.5179893, 5.000e-07, -6.260e-06,\n -1.1255310, 0.0398147, -1.032e-04, -5.900e-07,\n 23.4472809, -0.0009080, -6.000e-06,\n 209.5596771, 14.9991169, 0.000e-00,\n 0.5586400, 0.0000984, -1.020e-05,\n 0.0124400, 0.0000979, -1.010e-05,\n 0.0045993, 0.0045764,\n// 1740 12 18\n2356934.446727, 23.0, -4.0, 4.0, 11.6, 11.6,\n 0.2339740, 0.5481499, 2.740e-05, -7.940e-06,\n 0.6646080, -0.0651787, 1.370e-04, 1.060e-06,\n -23.4497795, -0.0006560, 6.000e-06,\n 165.5940552, 14.9962673, 0.000e-00,\n 0.5518380, -0.0001241, -1.180e-05,\n 0.0056720, -0.0001235, -1.170e-05,\n 0.0047544, 0.0047307,\n// 1741 6 13\n2357110.925550, 10.0, -4.0, 4.0, 11.7, 11.7,\n -0.0692720, 0.5450136, 1.050e-05, -7.830e-06,\n -0.3154260, 0.0861571, -1.424e-04, -1.370e-06,\n 23.2491894, 0.0021070, -6.000e-06,\n 330.1450195, 14.9992657, 0.000e-00,\n 0.5440990, 0.0001215, -1.140e-05,\n -0.0020290, 0.0001209, -1.140e-05,\n 0.0046013, 0.0045784,\n// 1741 12 8\n2357288.734718, 6.0, -4.0, 4.0, 11.7, 11.7,\n 0.1859560, 0.5083251, 3.910e-05, -6.140e-06,\n -0.0406550, -0.1045017, 1.525e-04, 1.400e-06,\n -22.7685795, -0.0040750, 6.000e-06,\n 271.9038086, 14.9967041, 0.000e-00,\n 0.5673050, -0.0001042, -1.050e-05,\n 0.0210620, -0.0001037, -1.040e-05,\n 0.0047506, 0.0047270,\n// 1742 6 3\n2357465.527738, 1.0, -4.0, 4.0, 11.8, 11.8,\n 0.0830910, 0.5638787, 2.440e-05, -9.340e-06,\n 0.4927290, 0.1324037, -1.825e-04, -2.340e-06,\n 22.2797394, 0.0049450, -5.000e-06,\n 195.6360474, 14.9998188, 0.000e-00,\n 0.5326890, 0.0000491, -1.260e-05,\n -0.0133820, 0.0000489, -1.250e-05,\n 0.0046059, 0.0045830,\n// 1742 11 27\n2357642.749296, 6.0, -4.0, 4.0, 11.9, 11.9,\n -0.1874500, 0.4833830, 4.620e-05, -5.330e-06,\n -0.6764150, -0.1402811, 1.581e-04, 1.690e-06,\n -21.1427002, -0.0073090, 5.000e-06,\n 273.0060120, 14.9977951, 0.000e-00,\n 0.5747970, -0.0000040, -9.900e-06,\n 0.0285160, -0.0000039, -9.800e-06,\n 0.0047435, 0.0047199,\n// 1743 4 24\n2357790.916778, 10.0, -4.0, 4.0, 11.9, 11.9,\n 0.5843910, 0.5165814, 1.600e-05, -8.190e-06,\n -1.2370900, 0.2447330, -3.700e-06, -4.040e-06,\n 12.7857103, 0.0131690, -3.000e-06,\n 330.5007324, 15.0032787, 0.000e-00,\n 0.5375310, -0.0000881, -1.240e-05,\n -0.0085640, -0.0000877, -1.230e-05,\n 0.0046430, 0.0046199,\n// 1743 5 23\n2357820.242304, 18.0, -4.0, 4.0, 11.9, 11.9,\n -0.2426750, 0.5567274, 6.300e-05, -9.340e-06,\n 1.1636360, 0.1697976, -2.032e-04, -3.030e-06,\n 20.6007404, 0.0075680, -5.000e-06,\n 90.9456100, 15.0006285, 0.000e-00,\n 0.5318690, -0.0000484, -1.270e-05,\n -0.0141980, -0.0000481, -1.270e-05,\n 0.0046131, 0.0045901,\n// 1743 10 17\n2357967.101178, 14.0, -4.0, 4.0, 12.0, 12.0,\n 0.4952380, 0.4737536, -1.470e-05, -6.060e-06,\n 1.4690440, -0.2422333, -9.000e-06, 3.310e-06,\n -9.2473602, -0.0147210, 2.000e-06,\n 33.6251411, 15.0032053, 0.000e-00,\n 0.5580200, 0.0001291, -1.090e-05,\n 0.0118230, 0.0001284, -1.080e-05,\n 0.0046982, 0.0046748,\n// 1743 11 16\n2357996.748896, 6.0, -4.0, 4.0, 12.0, 12.0,\n -0.4555530, 0.4849147, 4.700e-05, -5.740e-06,\n -1.2850760, -0.1773847, 1.703e-04, 2.230e-06,\n -18.6787300, -0.0100820, 4.000e-06,\n 273.7408142, 14.9993200, 0.000e-00,\n 0.5677690, 0.0000925, -1.030e-05,\n 0.0215240, 0.0000921, -1.030e-05,\n 0.0047334, 0.0047098,\n// 1744 4 12\n2358145.427360, 22.0, -4.0, 4.0, 12.0, 12.0,\n 0.1911570, 0.4791014, 3.250e-05, -6.390e-06,\n -0.6691090, 0.2486443, -1.130e-05, -3.490e-06,\n 9.0588598, 0.0144960, -2.000e-06,\n 149.8735809, 15.0039206, 0.000e-00,\n 0.5524700, -0.0001176, -1.110e-05,\n 0.0063010, -0.0001170, -1.100e-05,\n 0.0046572, 0.0046340,\n// 1744 10 6\n2358321.535693, 1.0, -4.0, 4.0, 12.1, 12.1,\n 0.4302580, 0.4971891, -2.080e-05, -7.620e-06,\n 0.6221840, -0.2700550, 1.600e-06, 4.350e-06,\n -5.1753802, -0.0153970, 1.000e-06,\n 197.9721680, 15.0041780, 0.000e-00,\n 0.5421910, 0.0000998, -1.220e-05,\n -0.0039270, 0.0000993, -1.220e-05,\n 0.0046830, 0.0046597,\n// 1745 4 2\n2358499.631459, 3.0, -4.0, 4.0, 12.2, 12.2,\n -0.0952100, 0.4480885, 2.680e-05, -5.090e-06,\n 0.0088680, 0.2456940, -2.110e-05, -2.970e-06,\n 4.9295502, 0.0154110, -1.000e-06,\n 224.0781250, 15.0042753, 0.000e-00,\n 0.5669780, -0.0000688, -1.000e-05,\n 0.0207370, -0.0000684, -1.000e-05,\n 0.0046724, 0.0046491,\n// 1745 9 25\n2358676.186754, 16.0, -4.0, 4.0, 12.2, 12.2,\n -0.2326990, 0.5098141, 1.290e-05, -8.580e-06,\n 0.1603550, -0.2839155, -1.800e-06, 4.990e-06,\n -1.0435300, -0.0156120, 0.000e-00,\n 62.1385117, 15.0047283, 0.000e-00,\n 0.5339280, 0.0000275, -1.300e-05,\n -0.0121490, 0.0000273, -1.290e-05,\n 0.0046684, 0.0046452,\n// 1746 3 22\n2358853.626951, 3.0, -4.0, 4.0, 12.3, 12.3,\n -0.3997370, 0.4413873, 1.310e-05, -4.870e-06,\n 0.6668310, 0.2466446, -3.090e-05, -2.890e-06,\n 0.5415400, 0.0158330, 0.000e-00,\n 223.2024231, 15.0042906, 0.000e-00,\n 0.5704640, 0.0000308, -9.800e-06,\n 0.0242050, 0.0000307, -9.800e-06,\n 0.0046876, 0.0046643,\n// 1746 9 15\n2359030.865703, 9.0, -4.0, 4.0, 12.4, 12.4,\n -0.2235960, 0.5013333, 1.480e-05, -7.950e-06,\n -0.6701430, -0.2763770, 1.470e-05, 4.600e-06,\n 3.0613000, -0.0154250, -1.000e-06,\n 316.2302856, 15.0048361, 0.000e-00,\n 0.5378640, -0.0000869, -1.240e-05,\n -0.0082320, -0.0000865, -1.240e-05,\n 0.0046546, 0.0046314,\n// 1747 2 9\n2359178.132845, 15.0, -4.0, 4.0, 12.4, 12.4,\n 0.4715220, 0.4980282, -7.960e-05, -6.860e-06,\n -1.3124350, 0.2214789, 1.454e-04, -3.260e-06,\n -14.6499100, 0.0128540, 3.000e-06,\n 41.3179283, 15.0010509, 0.000e-00,\n 0.5542070, 0.0001234, -1.150e-05,\n 0.0080290, 0.0001228, -1.140e-05,\n 0.0047357, 0.0047122,\n// 1747 3 11\n2359207.720928, 5.0, -4.0, 4.0, 12.4, 12.4,\n -0.8373430, 0.4623960, 1.030e-05, -5.780e-06,\n 1.1949410, 0.2536821, -3.920e-05, -3.320e-06,\n -3.8591700, 0.0157230, 1.000e-06,\n 252.3838654, 15.0039349, 0.000e-00,\n 0.5605220, 0.0001142, -1.070e-05,\n 0.0143130, 0.0001136, -1.060e-05,\n 0.0047022, 0.0046788,\n// 1747 8 6\n2359355.875937, 9.0, -4.0, 4.0, 12.5, 12.5,\n 0.4621650, 0.4862937, -4.470e-05, -6.020e-06,\n 1.1627710, -0.1986183, -1.498e-04, 2.590e-06,\n 16.8240204, -0.0109500, -4.000e-06,\n 313.6369629, 15.0022736, 0.000e-00,\n 0.5569160, -0.0001017, -1.040e-05,\n 0.0107250, -0.0001012, -1.040e-05,\n 0.0046127, 0.0045897,\n// 1747 9 4\n2359385.380517, 21.0, -4.0, 4.0, 12.5, 12.5,\n -0.7577380, 0.4785130, 3.120e-05, -6.410e-06,\n -1.2826630, -0.2524769, 1.600e-05, 3.590e-06,\n 7.1333599, -0.0148300, -2.000e-06,\n 135.3133850, 15.0045280, 0.000e-00,\n 0.5509740, -0.0001138, -1.110e-05,\n 0.0048120, -0.0001132, -1.100e-05,\n 0.0046416, 0.0046185,\n// 1748 1 30\n2359532.645290, 3.0, -4.0, 4.0, 12.5, 12.5,\n -0.0270130, 0.5365535, -5.670e-05, -8.700e-06,\n -0.7073440, 0.2070706, 1.550e-04, -3.560e-06,\n -17.8470001, 0.0107930, 4.000e-06,\n 221.5687561, 14.9996462, 0.000e-00,\n 0.5412730, 0.0000840, -1.280e-05,\n -0.0048410, 0.0000836, -1.270e-05,\n 0.0047442, 0.0047206,\n// 1748 7 25\n2359709.977108, 11.0, -4.0, 4.0, 12.6, 12.6,\n -0.0474650, 0.4788542, -3.500e-05, -5.340e-06,\n 0.5642630, -0.1642573, -1.345e-04, 1.970e-06,\n 19.5819206, -0.0087090, -4.000e-06,\n 343.5056152, 15.0011158, 0.000e-00,\n 0.5657110, -0.0000113, -9.700e-06,\n 0.0194760, -0.0000112, -9.700e-06,\n 0.0046058, 0.0045829,\n// 1749 1 18\n2359887.297870, 19.0, -4.0, 4.0, 12.7, 12.7,\n -0.0905740, 0.5547922, -3.670e-05, -9.340e-06,\n -0.0009100, 0.1754188, 1.453e-04, -3.140e-06,\n -20.3986702, 0.0082900, 5.000e-06,\n 102.1964188, 14.9982548, 0.000e-00,\n 0.5387000, -0.0000258, -1.310e-05,\n -0.0074010, -0.0000256, -1.300e-05,\n 0.0047505, 0.0047268,\n// 1749 7 14\n2360064.013425, 12.0, -4.0, 4.0, 12.8, 12.8,\n -0.2241350, 0.4969815, -3.800e-05, -5.820e-06,\n -0.1962890, -0.1329403, -1.212e-04, 1.690e-06,\n 21.6720295, -0.0060690, -5.000e-06,\n 358.6787109, 15.0001202, 0.000e-00,\n 0.5613240, 0.0000839, -1.000e-05,\n 0.0151110, 0.0000835, -9.900e-06,\n 0.0046009, 0.0045780,\n// 1750 1 8\n2360241.894941, 9.0, -4.0, 4.0, 12.8, 12.8,\n -0.4267410, 0.5449616, -6.000e-07, -8.190e-06,\n 0.6407380, 0.1286359, 1.272e-04, -2.100e-06,\n -22.2493095, 0.0053580, 6.000e-06,\n 313.1781006, 14.9970493, 0.000e-00,\n 0.5483590, -0.0000986, -1.210e-05,\n 0.0022100, -0.0000981, -1.210e-05,\n 0.0047546, 0.0047309,\n// 1750 7 3\n2360418.276987, 19.0, -4.0, 4.0, 12.9, 12.9,\n 0.0048250, 0.5347631, -4.480e-05, -7.360e-06,\n -1.0167609, -0.1001048, -1.019e-04, 1.490e-06,\n 22.9694004, -0.0032080, -6.000e-06,\n 104.0862885, 14.9994707, 0.000e-00,\n 0.5473290, 0.0001118, -1.110e-05,\n 0.0011860, 0.0001112, -1.110e-05,\n 0.0045985, 0.0045756,\n// 1750 11 29\n2360566.540445, 1.0, -4.0, 4.0, 13.0, 13.0,\n -0.0928050, 0.5108755, 2.530e-05, -5.960e-06,\n -1.4976130, -0.0367815, 2.011e-04, 3.700e-07,\n -21.4675598, -0.0070410, 5.000e-06,\n 197.8514099, 14.9976463, 0.000e-00,\n 0.5704540, -0.0000754, -1.020e-05,\n 0.0241950, -0.0000750, -1.010e-05,\n 0.0047446, 0.0047210,\n// 1750 12 28\n2360596.254758, 18.0, -4.0, 4.0, 13.0, 13.0,\n -0.2772960, 0.5197916, 4.500e-06, -6.510e-06,\n 1.4486420, 0.0777030, 9.770e-05, -1.110e-06,\n -23.2884007, 0.0020590, 7.000e-06,\n 89.4290314, 14.9962797, 0.000e-00,\n 0.5641340, -0.0001083, -1.070e-05,\n 0.0179070, -0.0001078, -1.070e-05,\n 0.0047561, 0.0047325,\n// 1751 5 25\n2360743.538377, 1.0, -4.0, 4.0, 13.0, 13.0,\n -0.0336210, 0.5803911, 1.190e-05, -9.850e-06,\n 0.8364630, 0.0553867, -1.948e-04, -8.300e-07,\n 20.8549995, 0.0075030, -5.000e-06,\n 195.9094391, 15.0005617, 0.000e-00,\n 0.5314270, 0.0000286, -1.280e-05,\n -0.0146380, 0.0000285, -1.270e-05,\n 0.0046123, 0.0045893,\n// 1751 11 18\n2360920.518059, 0.0, -4.0, 4.0, 13.1, 13.1,\n -0.3354280, 0.4991377, 2.520e-05, -5.580e-06,\n -0.8017000, -0.0715201, 1.527e-04, 7.300e-07,\n -19.1249294, -0.0099120, 5.000e-06,\n 183.6565247, 14.9991007, 0.000e-00,\n 0.5738650, 0.0000358, -9.900e-06,\n 0.0275890, 0.0000357, -9.800e-06,\n 0.0047352, 0.0047116,\n// 1752 5 13\n2361098.247556, 18.0, -4.0, 4.0, 13.2, 13.2,\n 0.0165840, 0.5701605, 2.880e-05, -9.390e-06,\n 0.1129000, 0.0893026, -1.292e-04, -1.380e-06,\n 18.6093407, 0.0098750, -4.000e-06,\n 91.0126572, 15.0015259, 0.000e-00,\n 0.5342880, -0.0000713, -1.260e-05,\n -0.0117910, -0.0000709, -1.250e-05,\n 0.0046213, 0.0045983,\n// 1752 11 6\n2361274.575163, 2.0, -4.0, 4.0, 13.3, 13.3,\n 0.0758580, 0.5137221, 2.000e-06, -6.410e-06,\n -0.1420030, -0.1052339, 1.112e-04, 1.240e-06,\n -16.0920391, -0.0122110, 4.000e-06,\n 214.0276337, 15.0007496, 0.000e-00,\n 0.5632550, 0.0001064, -1.060e-05,\n 0.0170320, 0.0001059, -1.060e-05,\n 0.0047231, 0.0046996,\n// 1753 5 3\n2361452.819211, 8.0, -4.0, 4.0, 13.3, 13.3,\n 0.3190910, 0.5358681, 2.350e-05, -7.580e-06,\n -0.6069120, 0.1140647, -6.270e-05, -1.520e-06,\n 15.7497301, 0.0119340, -4.000e-06,\n 300.8555298, 15.0024834, 0.000e-00,\n 0.5474300, -0.0001300, -1.140e-05,\n 0.0012860, -0.0001293, -1.130e-05,\n 0.0046327, 0.0046096,\n// 1753 10 26\n2361628.931954, 10.0, -4.0, 4.0, 13.4, 13.4,\n -0.0525740, 0.5409869, 5.600e-06, -8.100e-06,\n 0.6233220, -0.1378550, 5.410e-05, 2.000e-06,\n -12.5872698, -0.0138940, 3.000e-06,\n 333.9676514, 15.0022974, 0.000e-00,\n 0.5467820, 0.0001236, -1.200e-05,\n 0.0006410, 0.0001230, -1.190e-05,\n 0.0047095, 0.0046861,\n// 1754 3 23\n2361777.436790, 22.0, -4.0, 4.0, 13.5, 13.5,\n -0.6758380, 0.4820076, 3.410e-05, -5.430e-06,\n 1.3018210, 0.1551765, -5.630e-05, -1.700e-06,\n 1.2689400, 0.0160170, 0.000e-00,\n 148.3491516, 15.0044088, 0.000e-00,\n 0.5699300, -0.0000360, -9.900e-06,\n 0.0236740, -0.0000358, -9.800e-06,\n 0.0046854, 0.0046620,\n// 1754 4 22\n2361807.101352, 14.0, -4.0, 4.0, 13.5, 13.5,\n 0.1542830, 0.4993998, 2.280e-05, -5.940e-06,\n -1.4719830, 0.1306370, -4.700e-06, -1.480e-06,\n 12.2881804, 0.0136510, -3.000e-06,\n 30.4209595, 15.0033512, 0.000e-00,\n 0.5628530, -0.0000804, -1.010e-05,\n 0.0166330, -0.0000800, -1.010e-05,\n 0.0046461, 0.0046229,\n// 1754 9 16\n2361954.184506, 16.0, -4.0, 4.0, 13.5, 13.5,\n -0.6464460, 0.5552155, 3.280e-05, -9.450e-06,\n -1.1903890, -0.1791499, 5.290e-05, 2.970e-06,\n 2.5361099, -0.0157050, -1.000e-06,\n 61.3420792, 15.0049706, 0.000e-00,\n 0.5332950, -0.0000035, -1.290e-05,\n -0.0127790, -0.0000035, -1.290e-05,\n 0.0046560, 0.0046328,\n// 1754 10 16\n2361983.540113, 1.0, -4.0, 4.0, 13.6, 13.6,\n 0.3735160, 0.5580425, -1.030e-05, -9.420e-06,\n 1.1967530, -0.1636333, -1.060e-05, 2.690e-06,\n -8.8003101, -0.0150140, 2.000e-06,\n 198.5659332, 15.0035343, 0.000e-00,\n 0.5359950, 0.0000373, -1.290e-05,\n -0.0100930, 0.0000371, -1.290e-05,\n 0.0046954, 0.0046720,\n// 1755 3 12\n2362131.423291, 22.0, -4.0, 4.0, 13.6, 13.6,\n -0.3008730, 0.4855613, -1.600e-06, -5.570e-06,\n 0.6823250, 0.1536787, -1.380e-05, -1.690e-06,\n -3.1648500, 0.0160130, 1.000e-06,\n 147.5122528, 15.0040789, 0.000e-00,\n 0.5693230, 0.0000608, -1.000e-05,\n 0.0230700, 0.0000605, -1.000e-05,\n 0.0047005, 0.0046771,\n// 1755 9 6\n2362308.840111, 8.0, -4.0, 4.0, 13.7, 13.7,\n -0.2765520, 0.5403013, 1.570e-05, -8.340e-06,\n -0.5929640, -0.1644819, -1.340e-05, 2.470e-06,\n 6.5643702, -0.0151560, -2.000e-06,\n 300.4352722, 15.0047340, 0.000e-00,\n 0.5406010, -0.0000956, -1.210e-05,\n -0.0055090, -0.0000951, -1.200e-05,\n 0.0046430, 0.0046199,\n// 1756 3 1\n2362485.588299, 2.0, -4.0, 4.0, 13.8, 13.8,\n -0.0614870, 0.5145281, -2.670e-05, -6.870e-06,\n -0.0176990, 0.1533554, 3.790e-05, -1.980e-06,\n -7.4597001, 0.0154720, 1.000e-06,\n 206.8349304, 15.0033941, 0.000e-00,\n 0.5568170, 0.0001192, -1.110e-05,\n 0.0106260, 0.0001186, -1.100e-05,\n 0.0047140, 0.0046905,\n// 1756 8 25\n2362663.282141, 19.0, -4.0, 4.0, 13.8, 13.8,\n 0.1440110, 0.5126071, -7.200e-06, -6.640e-06,\n 0.0649070, -0.1414154, -6.920e-05, 1.760e-06,\n 10.4649000, -0.0141790, -2.000e-06,\n 104.6176224, 15.0041056, 0.000e-00,\n 0.5548070, -0.0001158, -1.070e-05,\n 0.0086260, -0.0001152, -1.070e-05,\n 0.0046312, 0.0046081,\n// 1757 2 18\n2362840.051531, 13.0, -4.0, 4.0, 13.9, 13.9,\n 0.0506950, 0.5501990, -3.580e-05, -8.730e-06,\n -0.7109910, 0.1471927, 1.072e-04, -2.270e-06,\n -11.4321299, 0.0144240, 2.000e-06,\n 11.4162703, 15.0023823, 0.000e-00,\n 0.5427530, 0.0000945, -1.250e-05,\n -0.0033680, 0.0000940, -1.240e-05,\n 0.0047258, 0.0047023,\n// 1757 8 14\n2363017.428299, 22.0, -4.0, 4.0, 14.0, 14.0,\n 0.0638140, 0.4945538, -1.660e-05, -5.620e-06,\n 0.8897810, -0.1163984, -1.170e-04, 1.250e-06,\n 14.1453695, -0.0127210, -3.000e-06,\n 148.9709015, 15.0031767, 0.000e-00,\n 0.5656250, -0.0000353, -9.800e-06,\n 0.0193900, -0.0000351, -9.700e-06,\n 0.0046205, 0.0045975,\n// 1758 1 9\n2363165.259513, 18.0, -4.0, 4.0, 14.1, 14.1,\n -0.1956780, 0.5771033, 1.090e-05, -9.570e-06,\n 1.3172489, 0.0278251, 9.220e-05, -3.700e-07,\n -22.0459709, 0.0060350, 6.000e-06,\n 88.0293274, 14.9972677, 0.000e-00,\n 0.5403870, -0.0000517, -1.290e-05,\n -0.0057230, -0.0000514, -1.290e-05,\n 0.0047540, 0.0047303,\n// 1758 2 8\n2363194.695042, 5.0, -4.0, 4.0, 14.1, 14.1,\n 0.4799240, 0.5688673, -4.920e-05, -9.710e-06,\n -1.2720160, 0.1293987, 1.771e-04, -2.120e-06,\n -14.9951401, 0.0128890, 3.000e-06,\n 251.3307190, 15.0010796, 0.000e-00,\n 0.5373610, -0.0000143, -1.310e-05,\n -0.0087330, -0.0000142, -1.300e-05,\n 0.0047361, 0.0047125,\n// 1758 7 5\n2363341.873425, 9.0, -4.0, 4.0, 14.1, 14.1,\n 0.0177590, 0.5211709, -1.480e-05, -6.360e-06,\n -1.1961271, -0.0008503, -9.440e-05, -9.000e-08,\n 22.8232899, -0.0038970, -6.000e-06,\n 314.0120850, 14.9995241, 0.000e-00,\n 0.5578560, 0.0000958, -1.020e-05,\n 0.0116610, 0.0000954, -1.020e-05,\n 0.0045990, 0.0045761,\n// 1758 12 30\n2363519.805696, 7.0, -4.0, 4.0, 14.2, 14.2,\n -0.1616100, 0.5499079, 3.060e-05, -7.880e-06,\n 0.6988520, -0.0187909, 1.353e-04, 3.700e-07,\n -23.1894398, 0.0028110, 6.000e-06,\n 284.2379456, 14.9964218, 0.000e-00,\n 0.5527860, -0.0001115, -1.170e-05,\n 0.0066150, -0.0001110, -1.170e-05,\n 0.0047558, 0.0047322,\n// 1759 6 24\n2363696.222904, 17.0, -4.0, 4.0, 14.3, 14.3,\n -0.1639060, 0.5522042, 2.600e-06, -8.040e-06,\n -0.3906610, 0.0430210, -1.406e-04, -7.500e-07,\n 23.4427509, -0.0009240, -6.000e-06,\n 74.5490265, 14.9992065, 0.000e-00,\n 0.5430080, 0.0001238, -1.150e-05,\n -0.0031130, 0.0001232, -1.150e-05,\n 0.0045987, 0.0045758,\n// 1759 12 19\n2363874.076449, 14.0, -4.0, 4.0, 14.4, 14.4,\n 0.0854930, 0.5137798, 3.040e-05, -6.170e-06,\n -0.0051650, -0.0617658, 1.602e-04, 8.600e-07,\n -23.4462204, -0.0006610, 6.000e-06,\n 30.6040707, 14.9961767, 0.000e-00,\n 0.5682830, -0.0000974, -1.040e-05,\n 0.0220350, -0.0000969, -1.040e-05,\n 0.0047550, 0.0047314,\n// 1760 6 13\n2364050.839757, 8.0, -4.0, 4.0, 14.5, 14.5,\n -0.1480450, 0.5733728, 2.580e-05, -9.570e-06,\n 0.3699810, 0.0891816, -1.863e-04, -1.620e-06,\n 23.2634602, 0.0020060, -5.000e-06,\n 300.1110229, 14.9993296, 0.000e-00,\n 0.5319660, 0.0000562, -1.260e-05,\n -0.0141010, 0.0000559, -1.260e-05,\n 0.0046007, 0.0045778,\n// 1760 12 7\n2364228.078987, 14.0, -4.0, 4.0, 14.5, 14.5,\n -0.0886100, 0.4926502, 3.430e-05, -5.440e-06,\n -0.6844240, -0.1023339, 1.743e-04, 1.260e-06,\n -22.7353001, -0.0041670, 6.000e-06,\n 31.9473000, 14.9966888, 0.000e-00,\n 0.5752780, -0.0000009, -9.900e-06,\n 0.0289950, -0.0000009, -9.800e-06,\n 0.0047506, 0.0047270,\n// 1761 5 4\n2364376.238326, 18.0, -4.0, 4.0, 14.6, 14.6,\n 0.6986750, 0.5259247, 1.760e-05, -8.290e-06,\n -1.2549680, 0.2202025, -2.700e-05, -3.620e-06,\n 16.1810303, 0.0114120, -4.000e-06,\n 90.8898315, 15.0023136, 0.000e-00,\n 0.5374750, -0.0000989, -1.230e-05,\n -0.0086200, -0.0000984, -1.220e-05,\n 0.0046308, 0.0046077,\n// 1761 6 3\n2364405.557380, 1.0, -4.0, 4.0, 14.6, 14.6,\n -0.4632240, 0.5666155, 6.750e-05, -9.480e-06,\n 1.0410171, 0.1298931, -2.134e-04, -2.340e-06,\n 22.3282204, 0.0048390, -5.000e-06,\n 195.6020966, 14.9997988, 0.000e-00,\n 0.5318350, -0.0000395, -1.270e-05,\n -0.0142310, -0.0000394, -1.260e-05,\n 0.0046057, 0.0045828,\n// 1761 11 26\n2364582.083650, 14.0, -4.0, 4.0, 14.7, 14.7,\n -0.3783160, 0.4971274, 4.080e-05, -5.940e-06,\n -1.2908390, -0.1441229, 1.918e-04, 1.850e-06,\n -21.0874996, -0.0073760, 5.000e-06,\n 33.0402985, 14.9978685, 0.000e-00,\n 0.5676840, 0.0000964, -1.040e-05,\n 0.0214390, 0.0000959, -1.030e-05,\n 0.0047428, 0.0047192,\n// 1762 4 24\n2364730.737617, 6.0, -4.0, 4.0, 14.7, 14.7,\n 0.4627900, 0.4856289, 3.050e-05, -6.430e-06,\n -0.5994640, 0.2314076, -3.740e-05, -3.230e-06,\n 12.8614998, 0.0131670, -3.000e-06,\n 270.5054016, 15.0031748, 0.000e-00,\n 0.5525290, -0.0001286, -1.100e-05,\n 0.0063590, -0.0001280, -1.090e-05,\n 0.0046438, 0.0046207,\n// 1762 10 17\n2364906.875398, 9.0, -4.0, 4.0, 14.8, 14.8,\n 0.3536060, 0.5043903, -5.200e-06, -7.800e-06,\n 0.6993520, -0.2594276, 2.190e-05, 4.220e-06,\n -9.3119497, -0.0146580, 2.000e-06,\n 318.6404114, 15.0032673, 0.000e-00,\n 0.5422720, 0.0001002, -1.230e-05,\n -0.0038460, 0.0000997, -1.230e-05,\n 0.0046973, 0.0046739,\n// 1763 4 13\n2365084.930221, 10.0, -4.0, 4.0, 14.9, 14.9,\n -0.1467270, 0.4524654, 3.820e-05, -5.120e-06,\n -0.0775730, 0.2357429, -3.970e-05, -2.840e-06,\n 9.0186300, 0.0145400, -2.000e-06,\n 329.8687439, 15.0038519, 0.000e-00,\n 0.5666310, -0.0000601, -9.900e-06,\n 0.0203910, -0.0000598, -9.900e-06,\n 0.0046585, 0.0046353,\n// 1763 10 7\n2365261.527132, 1.0, -4.0, 4.0, 15.0, 15.0,\n 0.2106590, 0.5125791, 4.500e-06, -8.630e-06,\n -0.0387780, -0.2789460, 3.290e-05, 4.910e-06,\n -5.3271899, -0.0153510, 1.000e-06,\n 197.9986420, 15.0041990, 0.000e-00,\n 0.5346280, 0.0000000, -1.300e-05,\n -0.0114530, 0.0000000, -1.290e-05,\n 0.0046826, 0.0046593,\n// 1764 4 1\n2365438.928644, 10.0, -4.0, 4.0, 15.0, 15.0,\n -0.4780170, 0.4441247, 2.650e-05, -4.920e-06,\n 0.5691160, 0.2434955, -4.890e-05, -2.860e-06,\n 4.8065801, 0.0154370, -1.000e-06,\n 329.0583801, 15.0042620, 0.000e-00,\n 0.5692610, 0.0000412, -9.800e-06,\n 0.0230080, 0.0000410, -9.800e-06,\n 0.0046735, 0.0046502,\n// 1764 9 25\n2365616.195636, 17.0, -4.0, 4.0, 15.1, 15.1,\n -0.1634740, 0.4991652, 2.540e-05, -7.860e-06,\n -0.6529150, -0.2770835, 3.680e-05, 4.580e-06,\n -1.2150600, -0.0156210, 0.000e-00,\n 77.1720810, 15.0046988, 0.000e-00,\n 0.5392410, -0.0000931, -1.240e-05,\n -0.0068630, -0.0000927, -1.230e-05,\n 0.0046685, 0.0046453,\n// 1765 2 19\n2365763.478217, 23.0, -4.0, 4.0, 15.2, 15.2,\n 0.3884690, 0.4902505, -6.810e-05, -6.810e-06,\n -1.3729380, 0.2425704, 1.225e-04, -3.590e-06,\n -10.9048100, 0.0143730, 2.000e-06,\n 161.4612274, 15.0024004, 0.000e-00,\n 0.5526910, 0.0001291, -1.150e-05,\n 0.0065200, 0.0001285, -1.150e-05,\n 0.0047248, 0.0047013,\n// 1765 3 21\n2365793.042880, 13.0, -4.0, 4.0, 15.2, 15.2,\n -0.6990070, 0.4628766, 1.750e-05, -5.840e-06,\n 1.2269570, 0.2570556, -6.350e-05, -3.400e-06,\n 0.4655500, 0.0158130, 0.000e-00,\n 13.1911898, 15.0043297, 0.000e-00,\n 0.5588550, 0.0001102, -1.070e-05,\n 0.0126540, 0.0001096, -1.070e-05,\n 0.0046880, 0.0046646,\n// 1765 8 16\n2365941.162521, 16.0, -4.0, 4.0, 15.2, 15.2,\n 0.6068280, 0.4745763, -4.630e-05, -5.800e-06,\n 1.1822250, -0.2205781, -1.290e-04, 2.830e-06,\n 13.5715904, -0.0127540, -3.000e-06,\n 59.0556793, 15.0032911, 0.000e-00,\n 0.5583000, -0.0001006, -1.040e-05,\n 0.0121020, -0.0001001, -1.030e-05,\n 0.0046219, 0.0045988,\n// 1765 9 15\n2365970.689287, 5.0, -4.0, 4.0, 15.3, 15.3,\n -0.4746300, 0.4726852, 3.090e-05, -6.270e-06,\n -1.3793290, -0.2588557, 4.140e-05, 3.640e-06,\n 2.9706700, -0.0154720, -1.000e-06,\n 256.2440491, 15.0047750, 0.000e-00,\n 0.5526250, -0.0001261, -1.100e-05,\n 0.0064550, -0.0001254, -1.100e-05,\n 0.0046551, 0.0046319,\n// 1766 2 9\n2366118.006763, 12.0, -4.0, 4.0, 15.3, 15.3,\n 0.1853270, 0.5255626, -6.190e-05, -8.550e-06,\n -0.6400530, 0.2363373, 1.246e-04, -4.060e-06,\n -14.5657196, 0.0128620, 3.000e-06,\n 356.3280334, 15.0011520, 0.000e-00,\n 0.5403480, 0.0000707, -1.280e-05,\n -0.0057610, 0.0000704, -1.270e-05,\n 0.0047351, 0.0047116,\n// 1766 8 5\n2366295.247891, 18.0, -4.0, 4.0, 15.4, 15.4,\n 0.2520190, 0.4680489, -4.570e-05, -5.190e-06,\n 0.5476730, -0.1917478, -1.143e-04, 2.270e-06,\n 16.8834209, -0.0109230, -4.000e-06,\n 88.6237411, 15.0022068, 0.000e-00,\n 0.5663120, -0.0000140, -9.700e-06,\n 0.0200740, -0.0000140, -9.700e-06,\n 0.0046129, 0.0045900,\n// 1767 1 30\n2366472.664527, 4.0, -4.0, 4.0, 15.5, 15.5,\n 0.0209270, 0.5416964, -4.230e-05, -9.070e-06,\n 0.0285230, 0.2113297, 1.189e-04, -3.740e-06,\n -17.7297897, 0.0108750, 4.000e-06,\n 236.5623627, 14.9997206, 0.000e-00,\n 0.5385330, -0.0000367, -1.310e-05,\n -0.0075670, -0.0000366, -1.300e-05,\n 0.0047437, 0.0047201,\n// 1767 7 25\n2366649.288747, 19.0, -4.0, 4.0, 15.5, 15.5,\n -0.0184590, 0.4881059, -4.990e-05, -5.740e-06,\n -0.1659040, -0.1666763, -1.049e-04, 2.100e-06,\n 19.6378708, -0.0086430, -4.000e-06,\n 103.4986572, 15.0011120, 0.000e-00,\n 0.5609840, 0.0000816, -1.010e-05,\n 0.0147720, 0.0000812, -1.000e-05,\n 0.0046056, 0.0045826,\n// 1768 1 19\n2366827.256585, 18.0, -4.0, 4.0, 15.6, 15.6,\n -0.3017410, 0.5322423, -1.220e-05, -7.910e-06,\n 0.6591110, 0.1688622, 1.076e-04, -2.690e-06,\n -20.3245106, 0.0083970, 5.000e-06,\n 87.1781693, 14.9982424, 0.000e-00,\n 0.5488380, -0.0001092, -1.210e-05,\n 0.0026870, -0.0001087, -1.200e-05,\n 0.0047507, 0.0047271,\n// 1768 7 14\n2367003.570106, 2.0, -4.0, 4.0, 15.7, 15.7,\n -0.0678470, 0.5278956, -4.990e-05, -7.340e-06,\n -0.9313910, -0.1402054, -9.180e-05, 2.080e-06,\n 21.6719093, -0.0060490, -5.000e-06,\n 208.6671143, 15.0001993, 0.000e-00,\n 0.5464820, 0.0001130, -1.120e-05,\n 0.0003430, 0.0001124, -1.120e-05,\n 0.0046003, 0.0045773,\n// 1768 12 9\n2367151.876141, 9.0, -4.0, 4.0, 15.7, 15.7,\n -0.0033640, 0.5110272, 9.800e-06, -5.930e-06,\n -1.5130100, 0.0035781, 2.151e-04, -1.100e-07,\n -22.9160709, -0.0038430, 6.000e-06,\n 316.7361145, 14.9965982, 0.000e-00,\n 0.5714220, -0.0000707, -1.010e-05,\n 0.0251580, -0.0000703, -1.010e-05,\n 0.0047514, 0.0047278,\n// 1769 1 8\n2367181.601871, 2.0, -4.0, 4.0, 15.7, 15.7,\n -0.5632990, 0.5101738, 4.600e-06, -6.320e-06,\n 1.3806911, 0.1195792, 9.030e-05, -1.640e-06,\n -22.2346191, 0.0054100, 6.000e-06,\n 208.1733246, 14.9969664, 0.000e-00,\n 0.5648860, -0.0000996, -1.070e-05,\n 0.0186550, -0.0000991, -1.060e-05,\n 0.0047553, 0.0047317,\n// 1769 6 4\n2367328.853174, 8.0, -4.0, 4.0, 15.8, 15.8,\n -0.2988640, 0.5834801, 1.560e-05, -9.930e-06,\n 0.8969520, 0.0137810, -2.131e-04, -1.200e-07,\n 22.4886703, 0.0047440, -5.000e-06,\n 300.5433044, 14.9997568, 0.000e-00,\n 0.5308030, 0.0000370, -1.280e-05,\n -0.0152580, 0.0000368, -1.270e-05,\n 0.0046050, 0.0045821,\n// 1769 11 28\n2367505.846294, 8.0, -4.0, 4.0, 15.8, 15.8,\n -0.2179490, 0.5032029, 1.300e-05, -5.630e-06,\n -0.8424070, -0.0363129, 1.734e-04, 3.300e-07,\n -21.4119797, -0.0071310, 5.000e-06,\n 302.8862915, 14.9976645, 0.000e-00,\n 0.5742570, 0.0000382, -9.900e-06,\n 0.0279790, 0.0000380, -9.800e-06,\n 0.0047445, 0.0047209,\n// 1770 5 25\n2367683.562635, 2.0, -4.0, 4.0, 15.9, 15.9,\n 0.2689880, 0.5736173, 1.080e-05, -9.390e-06,\n 0.2011900, 0.0520469, -1.538e-04, -7.600e-07,\n 20.9354706, 0.0073990, -5.000e-06,\n 210.8925323, 15.0005064, 0.000e-00,\n 0.5342760, -0.0000868, -1.250e-05,\n -0.0118020, -0.0000864, -1.240e-05,\n 0.0046121, 0.0045892,\n// 1770 11 17\n2367859.911029, 10.0, -4.0, 4.0, 16.0, 16.0,\n 0.0502390, 0.5204961, -3.000e-07, -6.550e-06,\n -0.1502780, -0.0749381, 1.350e-04, 8.600e-07,\n -19.0774097, -0.0099480, 5.000e-06,\n 333.6757202, 14.9991884, 0.000e-00,\n 0.5631510, 0.0001099, -1.070e-05,\n 0.0169290, 0.0001093, -1.060e-05,\n 0.0047344, 0.0047108,\n// 1771 5 14\n2368038.125022, 15.0, -4.0, 4.0, 16.0, 16.0,\n 0.0917440, 0.5394284, 3.150e-05, -7.540e-06,\n -0.5909670, 0.0840034, -8.660e-05, -1.090e-06,\n 18.6767197, 0.0098270, -4.000e-06,\n 46.0050392, 15.0014162, 0.000e-00,\n 0.5477750, -0.0001221, -1.130e-05,\n 0.0016300, -0.0001215, -1.120e-05,\n 0.0046219, 0.0045989,\n// 1771 11 6\n2368214.278495, 19.0, -4.0, 4.0, 16.1, 16.1,\n 0.2875710, 0.5483660, -7.900e-06, -8.270e-06,\n 0.5203340, -0.1126146, 8.470e-05, 1.620e-06,\n -16.1217098, -0.0121700, 4.000e-06,\n 109.0325089, 15.0008316, 0.000e-00,\n 0.5468010, 0.0001048, -1.210e-05,\n 0.0006600, 0.0001043, -1.200e-05,\n 0.0047221, 0.0046986,\n// 1772 4 3\n2368362.738806, 6.0, -4.0, 4.0, 16.1, 16.1,\n -0.3133080, 0.4833163, 2.810e-05, -5.440e-06,\n 1.4665641, 0.1501246, -8.530e-05, -1.640e-06,\n 5.5327401, 0.0155400, -1.000e-06,\n 269.1971130, 15.0043058, 0.000e-00,\n 0.5692930, -0.0000451, -9.800e-06,\n 0.0230400, -0.0000448, -9.800e-06,\n 0.0046712, 0.0046479,\n// 1772 5 2\n2368392.393532, 21.0, -4.0, 4.0, 16.1, 16.1,\n 0.0709320, 0.5034669, 2.720e-05, -5.950e-06,\n -1.4211280, 0.1081514, -3.010e-05, -1.200e-06,\n 15.7348099, 0.0119580, -4.000e-06,\n 135.8441010, 15.0023994, 0.000e-00,\n 0.5627740, -0.0000753, -1.010e-05,\n 0.0165530, -0.0000749, -1.000e-05,\n 0.0046339, 0.0046108,\n// 1772 9 27\n2368539.519663, 0.0, -4.0, 4.0, 16.2, 16.2,\n -0.6855230, 0.5545888, 4.410e-05, -9.420e-06,\n -1.2233500, -0.1797548, 8.060e-05, 2.980e-06,\n -1.7435600, -0.0158420, 0.000e-00,\n 182.2820435, 15.0047874, 0.000e-00,\n 0.5341780, -0.0000082, -1.290e-05,\n -0.0119000, -0.0000082, -1.290e-05,\n 0.0046699, 0.0046467,\n// 1772 10 26\n2368568.889788, 9.0, -4.0, 4.0, 16.2, 16.2,\n 0.1043830, 0.5636518, 9.500e-06, -9.540e-06,\n 1.2383831, -0.1445634, 1.480e-05, 2.370e-06,\n -12.7061596, -0.0138250, 3.000e-06,\n 318.9822998, 15.0023184, 0.000e-00,\n 0.5364830, 0.0000419, -1.300e-05,\n -0.0096070, 0.0000417, -1.290e-05,\n 0.0047090, 0.0046855,\n// 1773 3 23\n2368716.733999, 6.0, -4.0, 4.0, 16.2, 16.2,\n -0.0505820, 0.4862834, -3.200e-06, -5.610e-06,\n 0.8012410, 0.1556116, -4.210e-05, -1.720e-06,\n 1.1642500, 0.0160250, 0.000e-00,\n 268.3289490, 15.0044050, 0.000e-00,\n 0.5679590, 0.0000547, -1.000e-05,\n 0.0217130, 0.0000544, -1.000e-05,\n 0.0046863, 0.0046630,\n// 1773 9 16\n2368894.161377, 16.0, -4.0, 4.0, 16.3, 16.3,\n -0.1453690, 0.5362544, 1.750e-05, -8.200e-06,\n -0.6904730, -0.1711492, 1.580e-05, 2.550e-06,\n 2.3802199, -0.0157320, -1.000e-06,\n 61.3766212, 15.0049334, 0.000e-00,\n 0.5420820, -0.0001056, -1.200e-05,\n -0.0040350, -0.0001051, -1.200e-05,\n 0.0046564, 0.0046332,\n// 1774 3 12\n2369070.920300, 10.0, -4.0, 4.0, 16.3, 16.3,\n -0.0533890, 0.5138793, -1.960e-05, -6.930e-06,\n 0.0129430, 0.1624932, 1.090e-05, -2.120e-06,\n -3.2057400, 0.0159900, 0.000e-00,\n 327.5115967, 15.0041361, 0.000e-00,\n 0.5551470, 0.0001189, -1.110e-05,\n 0.0089640, 0.0001183, -1.110e-05,\n 0.0047004, 0.0046770,\n// 1774 9 6\n2369248.581715, 2.0, -4.0, 4.0, 16.4, 16.4,\n 0.0308590, 0.5068231, 2.400e-06, -6.490e-06,\n 0.0308440, -0.1538035, -4.410e-05, 1.900e-06,\n 6.5053000, -0.0151890, -1.000e-06,\n 210.4439240, 15.0046654, 0.000e-00,\n 0.5564640, -0.0001094, -1.070e-05,\n 0.0102750, -0.0001089, -1.060e-05,\n 0.0046434, 0.0046203,\n// 1775 3 1\n2369425.402315, 22.0, -4.0, 4.0, 16.4, 16.4,\n 0.3831520, 0.5469576, -4.520e-05, -8.740e-06,\n -0.5932070, 0.1640124, 7.410e-05, -2.550e-06,\n -7.3734899, 0.0154630, 1.000e-06,\n 146.8575134, 15.0034876, 0.000e-00,\n 0.5415200, 0.0000757, -1.250e-05,\n -0.0045950, 0.0000754, -1.250e-05,\n 0.0047134, 0.0046899,\n// 1775 8 26\n2369602.708106, 5.0, -4.0, 4.0, 16.5, 16.5,\n 0.2174780, 0.4889280, -1.990e-05, -5.530e-06,\n 0.7789800, -0.1346972, -9.040e-05, 1.460e-06,\n 10.5233297, -0.0141710, -2.000e-06,\n 254.5963745, 15.0040407, 0.000e-00,\n 0.5666390, -0.0000345, -9.800e-06,\n 0.0204000, -0.0000344, -9.700e-06,\n 0.0046312, 0.0046081,\n// 1776 1 21\n2369750.626706, 3.0, -4.0, 4.0, 16.5, 16.5,\n -0.1859630, 0.5726536, 1.800e-06, -9.460e-06,\n 1.3189650, 0.0703979, 7.320e-05, -1.080e-06,\n -20.0154705, 0.0090100, 5.000e-06,\n 222.0816650, 14.9985323, 0.000e-00,\n 0.5405310, -0.0000618, -1.290e-05,\n -0.0055790, -0.0000615, -1.280e-05,\n 0.0047497, 0.0047260,\n// 1776 2 19\n2369780.055677, 13.0, -4.0, 4.0, 16.5, 16.5,\n 0.1614910, 0.5628137, -2.940e-05, -9.600e-06,\n -1.3379900, 0.1533415, 1.519e-04, -2.530e-06,\n -11.2922201, 0.0144570, 2.000e-06,\n 11.4380398, 15.0024519, 0.000e-00,\n 0.5368430, -0.0000030, -1.310e-05,\n -0.0092490, -0.0000030, -1.300e-05,\n 0.0047255, 0.0047019,\n// 1776 7 15\n2369927.152424, 16.0, -4.0, 4.0, 16.5, 16.5,\n 0.0820610, 0.5213669, -2.710e-05, -6.430e-06,\n -1.2837720, -0.0395236, -7.800e-05, 4.000e-07,\n 21.4103394, -0.0067060, -5.000e-06,\n 58.6225586, 15.0003214, 0.000e-00,\n 0.5571970, 0.0000939, -1.030e-05,\n 0.0110040, 0.0000934, -1.030e-05,\n 0.0046013, 0.0045784,\n// 1776 8 14\n2369956.724259, 5.0, -4.0, 4.0, 16.5, 16.5,\n 0.1630390, 0.4975720, -3.610e-05, -5.750e-06,\n 1.5394560, -0.1174811, -1.396e-04, 1.310e-06,\n 14.2351599, -0.0126690, -3.000e-06,\n 253.9451904, 15.0031624, 0.000e-00,\n 0.5639870, 0.0000738, -9.900e-06,\n 0.0177610, 0.0000735, -9.900e-06,\n 0.0046199, 0.0045969,\n// 1777 1 9\n2370105.163604, 16.0, -4.0, 4.0, 16.6, 16.6,\n 0.0073810, 0.5479067, 1.060e-05, -7.800e-06,\n 0.6998920, 0.0258410, 1.254e-04, -2.800e-07,\n -21.9982605, 0.0061290, 6.000e-06,\n 58.0153389, 14.9972200, 0.000e-00,\n 0.5534610, -0.0001228, -1.170e-05,\n 0.0072870, -0.0001222, -1.160e-05,\n 0.0047545, 0.0047308,\n// 1777 7 5\n2370281.520473, 0.0, -4.0, 4.0, 16.6, 16.6,\n -0.2733780, 0.5559288, -4.600e-06, -8.190e-06,\n -0.4529950, -0.0001458, -1.313e-04, -1.100e-07,\n 22.8166294, -0.0039070, -5.000e-06,\n 179.0028381, 14.9996157, 0.000e-00,\n 0.5420670, 0.0001260, -1.160e-05,\n -0.0040500, 0.0001254, -1.160e-05,\n 0.0045984, 0.0045755,\n// 1777 12 29\n2370459.419074, 22.0, -4.0, 4.0, 16.6, 16.6,\n -0.0294150, 0.5157837, 2.040e-05, -6.150e-06,\n 0.0120020, -0.0182870, 1.590e-04, 3.200e-07,\n -23.1849403, 0.0028130, 6.000e-06,\n 149.2487946, 14.9963341, 0.000e-00,\n 0.5690500, -0.0000901, -1.040e-05,\n 0.0227980, -0.0000897, -1.030e-05,\n 0.0047564, 0.0047327,\n// 1778 6 24\n2370636.149256, 16.0, -4.0, 4.0, 16.6, 16.6,\n 0.2186220, 0.5795319, -5.000e-06, -9.720e-06,\n 0.3300480, 0.0435917, -1.866e-04, -8.500e-07,\n 23.4313507, -0.0010290, -6.000e-06,\n 59.5266914, 14.9992838, 0.000e-00,\n 0.5314790, 0.0000363, -1.270e-05,\n -0.0145860, 0.0000362, -1.260e-05,\n 0.0045982, 0.0045753,\n// 1778 12 18\n2370813.412427, 22.0, -4.0, 4.0, 16.7, 16.7,\n -0.0316330, 0.4994032, 1.970e-05, -5.530e-06,\n -0.6800080, -0.0610703, 1.824e-04, 7.900e-07,\n -23.4368191, -0.0007530, 6.000e-06,\n 150.6472168, 14.9961510, 0.000e-00,\n 0.5755420, 0.0000038, -9.900e-06,\n 0.0292570, 0.0000038, -9.800e-06,\n 0.0047550, 0.0047313,\n// 1779 5 16\n2370961.553929, 1.0, -4.0, 4.0, 16.7, 16.7,\n 0.3396350, 0.5360787, 3.720e-05, -8.380e-06,\n -1.4632870, 0.1894755, -3.990e-05, -3.110e-06,\n 19.0280094, 0.0092530, -5.000e-06,\n 196.0068970, 15.0012617, 0.000e-00,\n 0.5376250, -0.0000884, -1.220e-05,\n -0.0084700, -0.0000880, -1.210e-05,\n 0.0046203, 0.0045972,\n// 1779 6 14\n2370990.869077, 9.0, -4.0, 4.0, 16.7, 16.7,\n -0.0736550, 0.5740692, 3.730e-05, -9.580e-06,\n 1.0495189, 0.0858617, -2.242e-04, -1.580e-06,\n 23.2827396, 0.0018870, -5.000e-06,\n 315.0824890, 14.9993153, 0.000e-00,\n 0.5319330, -0.0000580, -1.260e-05,\n -0.0141340, -0.0000577, -1.260e-05,\n 0.0046008, 0.0045779,\n// 1779 12 7\n2371167.422871, 22.0, -4.0, 4.0, 16.7, 16.7,\n -0.3462290, 0.5080756, 3.080e-05, -6.130e-06,\n -1.2880030, -0.1055082, 2.078e-04, 1.380e-06,\n -22.7023602, -0.0042440, 6.000e-06,\n 151.9827271, 14.9967566, 0.000e-00,\n 0.5674280, 0.0001021, -1.040e-05,\n 0.0211840, 0.0001016, -1.040e-05,\n 0.0047499, 0.0047263,\n// 1780 5 4\n2371316.042148, 13.0, -4.0, 4.0, 16.7, 16.7,\n 0.3066700, 0.4939818, 4.230e-05, -6.480e-06,\n -0.7436090, 0.2081872, -5.440e-05, -2.880e-06,\n 16.2334099, 0.0114060, -4.000e-06,\n 15.8905802, 15.0022087, 0.000e-00,\n 0.5527610, -0.0001203, -1.090e-05,\n 0.0065910, -0.0001197, -1.080e-05,\n 0.0046317, 0.0046086,\n// 1780 10 27\n2371492.221151, 17.0, -4.0, 4.0, 16.7, 16.7,\n 0.1854820, 0.5145398, 1.280e-05, -8.030e-06,\n 0.8059700, -0.2418025, 4.160e-05, 3.990e-06,\n -13.1762199, -0.0133960, 3.000e-06,\n 79.0127335, 15.0020161, 0.000e-00,\n 0.5423440, 0.0001041, -1.240e-05,\n -0.0037750, 0.0001035, -1.230e-05,\n 0.0047110, 0.0046876,\n// 1781 4 23\n2371670.223212, 17.0, -4.0, 4.0, 16.7, 16.7,\n -0.1372850, 0.4594608, 4.530e-05, -5.190e-06,\n -0.1345140, 0.2200397, -5.940e-05, -2.650e-06,\n 12.8144102, 0.0132150, -3.000e-06,\n 75.4897537, 15.0031166, 0.000e-00,\n 0.5662510, -0.0000538, -9.900e-06,\n 0.0200140, -0.0000535, -9.800e-06,\n 0.0046448, 0.0046217,\n// 1781 10 17\n2371846.872205, 9.0, -4.0, 4.0, 16.7, 16.7,\n 0.0809110, 0.5187513, 2.410e-05, -8.740e-06,\n 0.0716420, -0.2671267, 5.210e-05, 4.710e-06,\n -9.4534903, -0.0145980, 2.000e-06,\n 318.6638489, 15.0032682, 0.000e-00,\n 0.5353760, 0.0000014, -1.300e-05,\n -0.0107080, 0.0000014, -1.300e-05,\n 0.0046971, 0.0046738,\n// 1782 4 12\n2372024.225545, 17.0, -4.0, 4.0, 16.7, 16.7,\n -0.4976440, 0.4499586, 3.660e-05, -5.020e-06,\n 0.5011800, 0.2346286, -6.790e-05, -2.780e-06,\n 8.9058399, 0.0145740, -2.000e-06,\n 74.8423233, 15.0038586, 0.000e-00,\n 0.5680030, 0.0000494, -9.900e-06,\n 0.0217560, 0.0000491, -9.800e-06,\n 0.0046592, 0.0046360,\n// 1782 10 7\n2372201.530085, 1.0, -4.0, 4.0, 16.7, 16.7,\n -0.1521980, 0.5005105, 3.820e-05, -7.820e-06,\n -0.6127970, -0.2712804, 5.840e-05, 4.450e-06,\n -5.4782901, -0.0153460, 1.000e-06,\n 198.0261230, 15.0041466, 0.000e-00,\n 0.5406820, -0.0000965, -1.240e-05,\n -0.0054290, -0.0000960, -1.230e-05,\n 0.0046831, 0.0046597,\n// 1783 3 3\n2372348.819794, 8.0, -4.0, 4.0, 16.7, 16.7,\n 0.8225850, 0.4849602, -7.550e-05, -6.780e-06,\n -1.1710989, 0.2571241, 8.890e-05, -3.820e-06,\n -6.8054700, 0.0153440, 1.000e-06,\n 296.9320068, 15.0034561, 0.000e-00,\n 0.5512150, 0.0001095, -1.160e-05,\n 0.0050520, 0.0001089, -1.150e-05,\n 0.0047123, 0.0046888,\n// 1783 4 1\n2372378.360169, 21.0, -4.0, 4.0, 16.7, 16.7,\n -0.4881420, 0.4667655, 2.140e-05, -5.960e-06,\n 1.2909400, 0.2543410, -8.870e-05, -3.400e-06,\n 4.7512298, 0.0154200, -1.000e-06,\n 134.0427094, 15.0043135, 0.000e-00,\n 0.5571690, 0.0001036, -1.080e-05,\n 0.0109770, 0.0001031, -1.070e-05,\n 0.0046735, 0.0046503,\n// 1783 8 27\n2372526.452842, 23.0, -4.0, 4.0, 16.7, 16.7,\n 0.6958490, 0.4646808, -4.250e-05, -5.610e-06,\n 1.2157530, -0.2365272, -1.084e-04, 3.000e-06,\n 9.8863697, -0.0141340, -2.000e-06,\n 164.7207031, 15.0041046, 0.000e-00,\n 0.5597600, -0.0000974, -1.030e-05,\n 0.0135550, -0.0000969, -1.030e-05,\n 0.0046326, 0.0046095,\n// 1783 9 26\n2372556.002979, 12.0, -4.0, 4.0, 16.7, 16.7,\n -0.7065780, 0.4700599, 5.180e-05, -6.150e-06,\n -1.2017061, -0.2592547, 5.540e-05, 3.600e-06,\n -1.2894900, -0.0156580, 0.000e-00,\n 2.1833200, 15.0046291, 0.000e-00,\n 0.5544260, -0.0001135, -1.100e-05,\n 0.0082470, -0.0001129, -1.090e-05,\n 0.0046689, 0.0046457,\n// 1784 2 20\n2372703.365026, 21.0, -4.0, 4.0, 16.7, 16.7,\n 0.4250110, 0.5163573, -6.420e-05, -8.420e-06,\n -0.5409670, 0.2582520, 9.260e-05, -4.430e-06,\n -10.7941904, 0.0143730, 2.000e-06,\n 131.4759521, 15.0024900, 0.000e-00,\n 0.5393610, 0.0000553, -1.280e-05,\n -0.0067430, 0.0000551, -1.280e-05,\n 0.0047244, 0.0047009,\n// 1784 8 16\n2372880.522144, 1.0, -4.0, 4.0, 16.7, 16.7,\n 0.5028000, 0.4580322, -5.090e-05, -5.060e-06,\n 0.5178980, -0.2136899, -9.240e-05, 2.510e-06,\n 13.6396999, -0.0127340, -3.000e-06,\n 194.0326538, 15.0032387, 0.000e-00,\n 0.5669590, -0.0000152, -9.700e-06,\n 0.0207180, -0.0000152, -9.700e-06,\n 0.0046216, 0.0045985,\n// 1785 2 9\n2373058.028258, 13.0, -4.0, 4.0, 16.7, 16.7,\n 0.1669890, 0.5291333, -4.410e-05, -8.820e-06,\n 0.0844770, 0.2399213, 8.920e-05, -4.210e-06,\n -14.4267101, 0.0129270, 3.000e-06,\n 11.3369503, 15.0012102, 0.000e-00,\n 0.5382980, -0.0000494, -1.300e-05,\n -0.0078010, -0.0000492, -1.300e-05,\n 0.0047351, 0.0047115,\n// 1785 8 5\n2373234.567617, 2.0, -4.0, 4.0, 16.7, 16.7,\n 0.1497210, 0.4787673, -5.620e-05, -5.650e-06,\n -0.1493830, -0.1954904, -8.510e-05, 2.460e-06,\n 16.9533997, -0.0108620, -4.000e-06,\n 208.6074524, 15.0022154, 0.000e-00,\n 0.5607170, 0.0000806, -1.010e-05,\n 0.0145070, 0.0000802, -1.010e-05,\n 0.0046121, 0.0045891,\n// 1786 1 30\n2373412.614883, 3.0, -4.0, 4.0, 16.6, 16.6,\n -0.1339690, 0.5186204, -1.980e-05, -7.630e-06,\n 0.7142740, 0.2027105, 8.180e-05, -3.180e-06,\n -17.6342506, 0.0109710, 4.000e-06,\n 221.5586243, 14.9997072, 0.000e-00,\n 0.5491730, -0.0001214, -1.200e-05,\n 0.0030200, -0.0001208, -1.190e-05,\n 0.0047441, 0.0047205,\n// 1786 7 25\n2373588.865662, 9.0, -4.0, 4.0, 16.6, 16.6,\n -0.1531360, 0.5191935, -5.010e-05, -7.290e-06,\n -0.8333890, -0.1762923, -7.730e-05, 2.620e-06,\n 19.6388092, -0.0086160, -5.000e-06,\n 313.4885254, 15.0011950, 0.000e-00,\n 0.5457890, 0.0001151, -1.130e-05,\n -0.0003460, 0.0001146, -1.130e-05,\n 0.0046047, 0.0045818,\n// 1786 12 20\n2373737.213476, 17.0, -4.0, 4.0, 16.6, 16.6,\n 0.0752320, 0.5078852, -7.600e-06, -5.850e-06,\n -1.5226190, 0.0461233, 2.202e-04, -6.200e-07,\n -23.4605598, -0.0004080, 6.000e-06,\n 75.4211426, 14.9961472, 0.000e-00,\n 0.5721730, -0.0000651, -1.010e-05,\n 0.0259050, -0.0000648, -1.010e-05,\n 0.0047552, 0.0047315,\n// 1787 1 19\n2373766.946677, 11.0, -4.0, 4.0, 16.6, 16.6,\n -0.3025930, 0.4983642, -1.090e-05, -6.110e-06,\n 1.4456210, 0.1571992, 7.030e-05, -2.100e-06,\n -20.3048191, 0.0084490, 5.000e-06,\n 342.1870728, 14.9981661, 0.000e-00,\n 0.5653240, -0.0001132, -1.060e-05,\n 0.0190900, -0.0001126, -1.060e-05,\n 0.0047514, 0.0047277,\n// 1787 6 15\n2373914.166262, 16.0, -4.0, 4.0, 16.5, 16.5,\n 0.0579840, 0.5832798, -1.510e-05, -9.940e-06,\n 0.9721400, -0.0313853, -2.245e-04, 6.600e-07,\n 23.3436794, 0.0017740, -5.000e-06,\n 60.0019684, 14.9993038, 0.000e-00,\n 0.5304060, 0.0000187, -1.280e-05,\n -0.0156530, 0.0000186, -1.270e-05,\n 0.0046005, 0.0045776,\n// 1787 12 9\n2374091.177527, 16.0, -4.0, 4.0, 16.5, 16.5,\n -0.1257180, 0.5048874, -2.300e-06, -5.660e-06,\n -0.8683220, 0.0033260, 1.873e-04, -1.300e-07,\n -22.8848305, -0.0039430, 6.000e-06,\n 61.7858582, 14.9966116, 0.000e-00,\n 0.5744310, 0.0000418, -9.900e-06,\n 0.0281520, 0.0000416, -9.900e-06,\n 0.0047510, 0.0047274,\n// 1788 6 4\n2374268.874660, 9.0, -4.0, 4.0, 16.4, 16.4,\n 0.0001680, 0.5746180, 1.440e-05, -9.330e-06,\n 0.2465680, 0.0105496, -1.712e-04, -7.000e-08,\n 22.5384598, 0.0046290, -5.000e-06,\n 315.5159607, 14.9996996, 0.000e-00,\n 0.5345100, -0.0000791, -1.240e-05,\n -0.0115690, -0.0000787, -1.230e-05,\n 0.0046054, 0.0045824,\n// 1788 11 27\n2374445.252008, 18.0, -4.0, 4.0, 16.4, 16.4,\n -0.0365940, 0.5259876, -4.900e-06, -6.680e-06,\n -0.1519640, -0.0384582, 1.547e-04, 4.000e-07,\n -21.3768291, -0.0071790, 5.000e-06,\n 92.9153290, 14.9977560, 0.000e-00,\n 0.5628900, 0.0001156, -1.080e-05,\n 0.0166690, 0.0001150, -1.070e-05,\n 0.0047435, 0.0047198,\n// 1789 5 24\n2374623.424976, 22.0, -4.0, 4.0, 16.3, 16.3,\n -0.0607050, 0.5417696, 3.200e-05, -7.490e-06,\n -0.5372730, 0.0486564, -1.089e-04, -5.800e-07,\n 20.9776497, 0.0073470, -5.000e-06,\n 150.8785248, 15.0003996, 0.000e-00,\n 0.5482120, -0.0001172, -1.110e-05,\n 0.0020640, -0.0001167, -1.110e-05,\n 0.0046128, 0.0045899,\n// 1789 11 17\n2374799.630955, 3.0, -4.0, 4.0, 16.2, 16.2,\n -0.0007920, 0.5555813, 2.600e-06, -8.460e-06,\n 0.5562620, -0.0802019, 1.077e-04, 1.140e-06,\n -19.1010399, -0.0099090, 5.000e-06,\n 228.6763763, 14.9992733, 0.000e-00,\n 0.5466490, 0.0001132, -1.220e-05,\n 0.0005080, 0.0001126, -1.210e-05,\n 0.0047334, 0.0047098,\n// 1790 4 14\n2374948.033502, 13.0, -4.0, 4.0, 16.2, 16.2,\n -0.3305060, 0.4864072, 3.350e-05, -5.460e-06,\n 1.5162640, 0.1390520, -1.104e-04, -1.510e-06,\n 9.5859003, 0.0146000, -2.000e-06,\n 14.9681702, 15.0038357, 0.000e-00,\n 0.5686430, -0.0000376, -9.800e-06,\n 0.0223930, -0.0000374, -9.700e-06,\n 0.0046569, 0.0046337,\n// 1790 5 14\n2374977.678713, 4.0, -4.0, 4.0, 16.2, 16.2,\n 0.0613090, 0.5074963, 2.550e-05, -5.960e-06,\n -1.3442080, 0.0799517, -5.480e-05, -8.600e-07,\n 18.6616592, 0.0098500, -4.000e-06,\n 241.0043335, 15.0013371, 0.000e-00,\n 0.5627320, -0.0000731, -1.000e-05,\n 0.0165120, -0.0000728, -1.000e-05,\n 0.0046229, 0.0045999,\n// 1790 10 8\n2375124.860320, 9.0, -4.0, 4.0, 16.1, 16.1,\n -0.2234140, 0.5562472, 2.950e-05, -9.430e-06,\n -1.4094560, -0.1729005, 1.165e-04, 2.860e-06,\n -6.0124998, -0.0155070, 1.000e-06,\n 318.1180115, 15.0041800, 0.000e-00,\n 0.5351190, -0.0000353, -1.290e-05,\n -0.0109630, -0.0000352, -1.290e-05,\n 0.0046846, 0.0046613,\n// 1790 11 6\n2375154.245268, 18.0, -4.0, 4.0, 16.1, 16.1,\n 0.3083850, 0.5701298, 1.800e-06, -9.670e-06,\n 1.1660830, -0.1177612, 4.570e-05, 1.920e-06,\n -16.2276497, -0.0120870, 4.000e-06,\n 94.0260620, 15.0008411, 0.000e-00,\n 0.5369960, 0.0000240, -1.300e-05,\n -0.0090960, 0.0000238, -1.300e-05,\n 0.0047218, 0.0046983,\n// 1791 4 3\n2375302.038348, 13.0, -4.0, 4.0, 16.0, 16.0,\n -0.2044690, 0.4891074, 8.600e-06, -5.690e-06,\n 0.7988810, 0.1513037, -6.600e-05, -1.690e-06,\n 5.4126601, 0.0155580, -1.000e-06,\n 14.1792002, 15.0043230, 0.000e-00,\n 0.5664770, 0.0000656, -1.000e-05,\n 0.0202380, 0.0000653, -1.000e-05,\n 0.0046718, 0.0046485,\n// 1791 9 27\n2375479.487843, 0.0, -4.0, 4.0, 15.9, 15.9,\n -0.0723890, 0.5343262, 2.270e-05, -8.100e-06,\n -0.7634200, -0.1709151, 4.420e-05, 2.530e-06,\n -1.9009200, -0.0158560, 0.000e-00,\n 182.3135681, 15.0047274, 0.000e-00,\n 0.5436390, -0.0001123, -1.200e-05,\n -0.0024860, -0.0001118, -1.190e-05,\n 0.0046706, 0.0046474,\n// 1792 3 22\n2375656.248314, 18.0, -4.0, 4.0, 15.8, 15.8,\n 0.0020190, 0.5153502, -1.380e-05, -7.030e-06,\n 0.0655430, 0.1648194, -1.650e-05, -2.170e-06,\n 1.1248200, 0.0160060, 0.000e-00,\n 88.3230133, 15.0044680, 0.000e-00,\n 0.5534380, 0.0001162, -1.120e-05,\n 0.0072640, 0.0001156, -1.110e-05,\n 0.0046862, 0.0046628,\n// 1792 9 16\n2375833.884625, 9.0, -4.0, 4.0, 15.7, 15.7,\n -0.1219350, 0.5028015, 1.490e-05, -6.360e-06,\n 0.0186930, -0.1597834, -1.980e-05, 1.950e-06,\n 2.3362501, -0.0157590, -1.000e-06,\n 316.3840332, 15.0048590, 0.000e-00,\n 0.5581740, -0.0001012, -1.060e-05,\n 0.0119770, -0.0001007, -1.050e-05,\n 0.0046568, 0.0046336,\n// 1793 3 12\n2376010.750083, 6.0, -4.0, 4.0, 15.6, 15.6,\n 0.1963630, 0.5456318, -2.780e-05, -8.780e-06,\n -0.6221380, 0.1732683, 4.850e-05, -2.720e-06,\n -3.1122601, 0.0159710, 0.000e-00,\n 267.5267944, 15.0042181, 0.000e-00,\n 0.5401750, 0.0000800, -1.250e-05,\n -0.0059330, 0.0000796, -1.250e-05,\n 0.0046998, 0.0046764,\n// 1793 9 5\n2376187.991252, 12.0, -4.0, 4.0, 15.5, 15.5,\n 0.3166260, 0.4845190, -1.890e-05, -5.460e-06,\n 0.6780500, -0.1469099, -6.390e-05, 1.590e-06,\n 6.5725398, -0.0151880, -1.000e-06,\n 0.4300900, 15.0046091, 0.000e-00,\n 0.5677040, -0.0000322, -9.800e-06,\n 0.0214590, -0.0000320, -9.700e-06,\n 0.0046433, 0.0046202,\n// 1794 1 31\n2376335.992188, 12.0, -4.0, 4.0, 15.4, 15.4,\n -0.1420360, 0.5661569, -4.000e-06, -9.310e-06,\n 1.3375400, 0.1066618, 4.820e-05, -1.690e-06,\n -17.2327900, 0.0115110, 4.000e-06,\n 356.5056458, 15.0000286, 0.000e-00,\n 0.5405640, -0.0000727, -1.280e-05,\n -0.0055460, -0.0000724, -1.280e-05,\n 0.0047429, 0.0047192,\n// 1794 3 1\n2376365.412496, 22.0, -4.0, 4.0, 15.4, 15.4,\n 0.4388460, 0.5579219, -3.670e-05, -9.500e-06,\n -1.2415150, 0.1698152, 1.188e-04, -2.810e-06,\n -7.2186799, 0.0154780, 1.000e-06,\n 146.8762360, 15.0035429, 0.000e-00,\n 0.5362580, -0.0000203, -1.310e-05,\n -0.0098310, -0.0000202, -1.300e-05,\n 0.0047130, 0.0046895,\n// 1794 7 26\n2376512.433648, 22.0, -4.0, 4.0, 15.3, 15.3,\n -0.4031110, 0.5193293, -1.560e-05, -6.480e-06,\n -1.3056610, -0.0743741, -5.850e-05, 8.400e-07,\n 19.2835007, -0.0092150, -4.000e-06,\n 148.4873505, 15.0013580, 0.000e-00,\n 0.5565480, 0.0001135, -1.040e-05,\n 0.0103590, 0.0001129, -1.030e-05,\n 0.0046059, 0.0045830,\n// 1794 8 25\n2376542.006206, 12.0, -4.0, 4.0, 15.3, 15.3,\n 0.3161360, 0.4935999, -3.960e-05, -5.730e-06,\n 1.4290680, -0.1364909, -1.129e-04, 1.540e-06,\n 10.6283703, -0.0141270, -2.000e-06,\n 359.5750732, 15.0040369, 0.000e-00,\n 0.5641220, 0.0000751, -1.000e-05,\n 0.0178950, 0.0000747, -9.900e-06,\n 0.0046304, 0.0046073,\n// 1795 1 21\n2376690.520292, 0.0, -4.0, 4.0, 15.2, 15.2,\n -0.3494480, 0.5428104, 1.670e-05, -7.640e-06,\n 0.6682950, 0.0658392, 1.088e-04, -8.500e-07,\n -19.9541206, 0.0090890, 5.000e-06,\n 177.0732269, 14.9984837, 0.000e-00,\n 0.5541020, -0.0001111, -1.160e-05,\n 0.0079240, -0.0001105, -1.150e-05,\n 0.0047504, 0.0047267,\n// 1795 7 16\n2376866.820558, 8.0, -4.0, 4.0, 15.0, 15.0,\n 0.1314250, 0.5563516, -3.250e-05, -8.270e-06,\n -0.5386200, -0.0414912, -1.139e-04, 5.200e-07,\n 21.3940601, -0.0067200, -5.000e-06,\n 298.6081238, 15.0004187, 0.000e-00,\n 0.5413940, 0.0001060, -1.170e-05,\n -0.0047200, 0.0001055, -1.160e-05,\n 0.0046005, 0.0045776,\n// 1796 1 10\n2377044.760326, 6.0, -4.0, 4.0, 14.9, 14.9,\n -0.1282740, 0.5142953, 1.100e-05, -6.090e-06,\n 0.0120700, 0.0233519, 1.491e-04, -1.900e-07,\n -21.9995308, 0.0061250, 6.000e-06,\n 268.0321350, 14.9971266, 0.000e-00,\n 0.5696320, -0.0000833, -1.030e-05,\n 0.0233770, -0.0000828, -1.030e-05,\n 0.0047553, 0.0047316,\n// 1796 7 4\n2377221.460351, 23.0, -4.0, 4.0, 14.7, 14.7,\n -0.0275700, 0.5819601, -5.000e-06, -9.810e-06,\n 0.2385540, -0.0014736, -1.756e-04, -8.000e-08,\n 22.7775593, -0.0040060, -5.000e-06,\n 163.9701691, 14.9997072, 0.000e-00,\n 0.5311100, 0.0000426, -1.270e-05,\n -0.0149520, 0.0000424, -1.260e-05,\n 0.0045978, 0.0045749,\n// 1796 12 29\n2377398.746510, 6.0, -4.0, 4.0, 14.6, 14.6,\n 0.0170020, 0.5028412, 3.800e-06, -5.580e-06,\n -0.6713590, -0.0188289, 1.811e-04, 3.000e-07,\n -23.1997299, 0.0027220, 6.000e-06,\n 269.2985535, 14.9962873, 0.000e-00,\n 0.5756030, 0.0000088, -9.900e-06,\n 0.0293190, 0.0000087, -9.800e-06,\n 0.0047568, 0.0047331,\n// 1797 6 24\n2377576.179322, 16.0, -4.0, 4.0, 14.4, 14.4,\n -0.2438120, 0.5780131, 3.300e-05, -9.610e-06,\n 0.9633390, 0.0405720, -2.219e-04, -8.100e-07,\n 23.4178600, -0.0011410, -5.000e-06,\n 59.4847794, 14.9992886, 0.000e-00,\n 0.5322380, -0.0000520, -1.260e-05,\n -0.0138300, -0.0000517, -1.250e-05,\n 0.0045981, 0.0045752,\n// 1797 12 18\n2377752.765179, 6.0, -4.0, 4.0, 14.2, 14.2,\n -0.3482830, 0.5164381, 1.800e-05, -6.300e-06,\n -1.2880030, -0.0632441, 2.161e-04, 8.700e-07,\n -23.4267197, -0.0008400, 6.000e-06,\n 270.6947021, 14.9962044, 0.000e-00,\n 0.5669850, 0.0001091, -1.050e-05,\n 0.0207430, 0.0001086, -1.050e-05,\n 0.0047544, 0.0047308,\n// 1798 5 15\n2377901.340650, 20.0, -4.0, 4.0, 14.1, 14.1,\n 0.2049090, 0.5031984, 4.780e-05, -6.540e-06,\n -0.8551870, 0.1791839, -7.180e-05, -2.470e-06,\n 19.0706406, 0.0092340, -4.000e-06,\n 120.9981232, 15.0011520, 0.000e-00,\n 0.5530740, -0.0001148, -1.080e-05,\n 0.0069010, -0.0001142, -1.070e-05,\n 0.0046212, 0.0045982,\n// 1798 11 8\n2378077.572669, 2.0, -4.0, 4.0, 13.9, 13.9,\n 0.4495930, 0.5269101, 7.100e-06, -8.290e-06,\n 0.7093210, -0.2167914, 7.190e-05, 3.610e-06,\n -16.6349201, -0.0115800, 4.000e-06,\n 214.0093689, 15.0005350, 0.000e-00,\n 0.5424520, 0.0000862, -1.250e-05,\n -0.0036670, 0.0000858, -1.240e-05,\n 0.0047234, 0.0046998,\n// 1799 5 5\n2378255.509115, 0.0, -4.0, 4.0, 13.7, 13.7,\n -0.0513070, 0.4683466, 4.670e-05, -5.280e-06,\n -0.1640790, 0.1986056, -8.000e-05, -2.390e-06,\n 16.1899395, 0.0114570, -4.000e-06,\n 180.8844147, 15.0021486, 0.000e-00,\n 0.5659320, -0.0000505, -9.800e-06,\n 0.0196960, -0.0000503, -9.800e-06,\n 0.0046329, 0.0046098,\n// 1799 10 28\n2378432.223453, 17.0, -4.0, 4.0, 13.5, 13.5,\n -0.1373670, 0.5278926, 4.590e-05, -8.900e-06,\n 0.2053540, -0.2481701, 7.130e-05, 4.390e-06,\n -13.3061895, -0.0133170, 3.000e-06,\n 79.0207367, 15.0020103, 0.000e-00,\n 0.5361050, 0.0000068, -1.310e-05,\n -0.0099830, 0.0000067, -1.300e-05,\n 0.0047106, 0.0046871,\n// 1800 4 24\n2378609.516663, 0.0, -4.0, 4.0, 13.3, 13.3,\n -0.4482380, 0.4584634, 4.230e-05, -5.150e-06,\n 0.4643320, 0.2199712, -8.810e-05, -2.630e-06,\n 12.7103395, 0.0132610, -3.000e-06,\n 180.4713135, 15.0031290, 0.000e-00,\n 0.5667640, 0.0000549, -9.900e-06,\n 0.0205230, 0.0000547, -9.800e-06,\n 0.0046458, 0.0046227,\n// 1800 10 18\n2378786.869359, 9.0, -4.0, 4.0, 13.2, 13.2,\n -0.1955250, 0.5051984, 5.250e-05, -7.830e-06,\n -0.5501120, -0.2588381, 7.990e-05, 4.230e-06,\n -9.5976400, -0.0145740, 2.000e-06,\n 318.6795349, 15.0032043, 0.000e-00,\n 0.5421420, -0.0000968, -1.230e-05,\n -0.0039760, -0.0000963, -1.230e-05,\n 0.0046973, 0.0046739\n));\n}", "title": "" }, { "docid": "0b21ea46c2424344b92e4d2c12ef00d7", "score": "0.49597576", "text": "function _t(t){var N,L,A,S,e,c=Math.floor,_=new Array(64),F=new Array(64),P=new Array(64),k=new Array(64),y=new Array(65535),v=new Array(65535),Z=new Array(64),w=new Array(64),I=[],C=0,B=7,j=new Array(64),E=new Array(64),M=new Array(64),n=new Array(256),O=new Array(2048),b=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],q=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],T=[0,1,2,3,4,5,6,7,8,9,10,11],R=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],D=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],U=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],z=[0,1,2,3,4,5,6,7,8,9,10,11],H=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],W=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function r(t,e){for(var n=0,r=0,i=new Array,o=1;o<=16;o++){for(var a=1;a<=t[o];a++)i[e[r]]=[],i[e[r]][0]=n,i[e[r]][1]=o,r++,n++;n*=2}return i}function V(t){for(var e=t[0],n=t[1]-1;0<=n;)e&1<<n&&(C|=1<<B),n--,--B<0&&(255==C?(G(255),G(0)):G(C),B=7,C=0)}function G(t){I.push(t)}function Y(t){G(t>>8&255),G(255&t)}function J(t,e,n,r,i){for(var o,a=i[0],s=i[240],l=function(t,e){var n,r,i,o,a,s,l,h,u,c,f=0;for(u=0;u<8;++u){n=t[f],r=t[f+1],i=t[f+2],o=t[f+3],a=t[f+4],s=t[f+5],l=t[f+6];var p=n+(h=t[f+7]),d=n-h,g=r+l,m=r-l,y=i+s,v=i-s,w=o+a,b=o-a,x=p+w,N=p-w,L=g+y,A=g-y;t[f]=x+L,t[f+4]=x-L;var S=.707106781*(A+N);t[f+2]=N+S,t[f+6]=N-S;var _=.382683433*((x=b+v)-(A=m+d)),F=.5411961*x+_,P=1.306562965*A+_,k=.707106781*(L=v+m),I=d+k,C=d-k;t[f+5]=C+F,t[f+3]=C-F,t[f+1]=I+P,t[f+7]=I-P,f+=8}for(u=f=0;u<8;++u){n=t[f],r=t[f+8],i=t[f+16],o=t[f+24],a=t[f+32],s=t[f+40],l=t[f+48];var B=n+(h=t[f+56]),j=n-h,E=r+l,M=r-l,O=i+s,q=i-s,T=o+a,R=o-a,D=B+T,U=B-T,z=E+O,H=E-O;t[f]=D+z,t[f+32]=D-z;var W=.707106781*(H+U);t[f+16]=U+W,t[f+48]=U-W;var V=.382683433*((D=R+q)-(H=M+j)),G=.5411961*D+V,Y=1.306562965*H+V,J=.707106781*(z=q+M),X=j+J,K=j-J;t[f+40]=K+G,t[f+24]=K-G,t[f+8]=X+Y,t[f+56]=X-Y,f++}for(u=0;u<64;++u)c=t[u]*e[u],Z[u]=0<c?c+.5|0:c-.5|0;return Z}(t,e),h=0;h<64;++h)w[b[h]]=l[h];var u=w[0]-n;n=w[0],0==u?V(r[0]):(V(r[v[o=32767+u]]),V(y[o]));for(var c=63;0<c&&0==w[c];c--);if(0==c)return V(a),n;for(var f,p=1;p<=c;){for(var d=p;0==w[p]&&p<=c;++p);var g=p-d;if(16<=g){f=g>>4;for(var m=1;m<=f;++m)V(s);g&=15}o=32767+w[p],V(i[(g<<4)+v[o]]),V(y[o]),p++}return 63!=c&&V(a),n}function X(t){if(t<=0&&(t=1),100<t&&(t=100),e!=t){(function(t){for(var e=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],n=0;n<64;n++){var r=c((e[n]*t+50)/100);r<1?r=1:255<r&&(r=255),_[b[n]]=r}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],o=0;o<64;o++){var a=c((i[o]*t+50)/100);a<1?a=1:255<a&&(a=255),F[b[o]]=a}for(var s=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],l=0,h=0;h<8;h++)for(var u=0;u<8;u++)P[l]=1/(_[b[l]]*s[h]*s[u]*8),k[l]=1/(F[b[l]]*s[h]*s[u]*8),l++})(t<50?Math.floor(5e3/t):Math.floor(200-2*t)),e=t}}this.encode=function(t,e){var n,r;(new Date).getTime();e&&X(e),I=new Array,C=0,B=7,Y(65496),Y(65504),Y(16),G(74),G(70),G(73),G(70),G(0),G(1),G(1),G(0),Y(1),Y(1),G(0),G(0),function(){Y(65499),Y(132),G(0);for(var t=0;t<64;t++)G(_[t]);G(1);for(var e=0;e<64;e++)G(F[e])}(),n=t.width,r=t.height,Y(65472),Y(17),G(8),Y(r),Y(n),G(3),G(1),G(17),G(0),G(2),G(17),G(1),G(3),G(17),G(1),function(){Y(65476),Y(418),G(0);for(var t=0;t<16;t++)G(q[t+1]);for(var e=0;e<=11;e++)G(T[e]);G(16);for(var n=0;n<16;n++)G(R[n+1]);for(var r=0;r<=161;r++)G(D[r]);G(1);for(var i=0;i<16;i++)G(U[i+1]);for(var o=0;o<=11;o++)G(z[o]);G(17);for(var a=0;a<16;a++)G(H[a+1]);for(var s=0;s<=161;s++)G(W[s])}(),Y(65498),Y(12),G(3),G(1),G(0),G(2),G(17),G(3),G(17),G(0),G(63),G(0);var i=0,o=0,a=0;C=0,B=7,this.encode.displayName=\"_encode_\";for(var s,l,h,u,c,f,p,d,g,m=t.data,y=t.width,v=t.height,w=4*y,b=0;b<v;){for(s=0;s<w;){for(f=c=w*b+s,p=-1,g=d=0;g<64;g++)f=c+(d=g>>3)*w+(p=4*(7&g)),v<=b+d&&(f-=w*(b+1+d-v)),w<=s+p&&(f-=s+p-w+4),l=m[f++],h=m[f++],u=m[f++],j[g]=(O[l]+O[h+256>>0]+O[u+512>>0]>>16)-128,E[g]=(O[l+768>>0]+O[h+1024>>0]+O[u+1280>>0]>>16)-128,M[g]=(O[l+1280>>0]+O[h+1536>>0]+O[u+1792>>0]>>16)-128;i=J(j,P,i,N,A),o=J(E,k,o,L,S),a=J(M,k,a,L,S),s+=32}b+=8}if(0<=B){var x=[];x[1]=B+1,x[0]=(1<<B+1)-1,V(x)}return Y(65497),new Uint8Array(I)},function(){(new Date).getTime();t||(t=50),function(){for(var t=String.fromCharCode,e=0;e<256;e++)n[e]=t(e)}(),N=r(q,T),L=r(U,z),A=r(R,D),S=r(H,W),function(){for(var t=1,e=2,n=1;n<=15;n++){for(var r=t;r<e;r++)v[32767+r]=n,y[32767+r]=[],y[32767+r][1]=n,y[32767+r][0]=r;for(var i=-(e-1);i<=-t;i++)v[32767+i]=n,y[32767+i]=[],y[32767+i][1]=n,y[32767+i][0]=e-1+i;t<<=1,e<<=1}}(),function(){for(var t=0;t<256;t++)O[t]=19595*t,O[t+256>>0]=38470*t,O[t+512>>0]=7471*t+32768,O[t+768>>0]=-11059*t,O[t+1024>>0]=-21709*t,O[t+1280>>0]=32768*t+8421375,O[t+1536>>0]=-27439*t,O[t+1792>>0]=-5329*t}(),X(t),(new Date).getTime()}()}", "title": "" } ]
bd479c63c45ecdd9809a08566c38c63d
Create a new watchlist
[ { "docid": "6259d4262831ded8a0f23a1588576bfc", "score": "0.67100275", "text": "function createWatchlist(name, epics) {\n\treturn new Promise((res, rej) => {\n\t\tlet payload = {\n\t\t\t'epics': epics,\n\t\t\t'name': name\n\t\t};\n\t\tpost('/watchlists', payload)\n\t\t\t.then(r => {\n\t\t\t\tif (r.status !== 200) {\n\t\t\t\t\trej(r);\n\t\t\t\t} else {\n\t\t\t\t\tres(r.body);\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(e => {\n\t\t\t\trej(e);\n\t\t\t});\n\t});\n}", "title": "" } ]
[ { "docid": "19e8a7375bc00d018af360b41df7274c", "score": "0.79655164", "text": "createWatchlist() {\n if (this.get('newWatchlistName')) {\n this.get('accountService').createWatchlist(this.get('newWatchlistName'), this.onEditWatchlist.bind(this));\n this.set('newWatchlistName', null);\n this.set('isEditing', !this.get('isEditing'));\n this.sendAction('updateWatchlists');\n }\n }", "title": "" }, { "docid": "9303ed75b66bcb9d03d3f06dbdf519e6", "score": "0.76575935", "text": "static createWatchlist(watchlist) {\n const fetchConfig = this.fetchConfig(\"POST\", watchlist);\n return fetch(this.baseUrl() + \"/watchlists\", fetchConfig)\n .then(res => res.json());\n }", "title": "" }, { "docid": "ced0a7b57e7fe48b469b7747b8bd89bd", "score": "0.69217575", "text": "function AddWatch() {\n listStopWatch[listStopWatch.length] = new Watch();\n document.getElementById(\"#stopwatches\").append(\n StopWatchBody(listStopWatch[listStopWatch.length - 1])\n );\n document.getElementById(\"title\").value = \"\";\n}", "title": "" }, { "docid": "95e92890f9e3617c9a2a4cc33199d203", "score": "0.6771016", "text": "function create(req, res) {\n const newWatchlist = Watchlist.build(req.body);\n return newWatchlist.save()\n .then(function(watchlist) {\n return res.json(watchlist);\n })\n .catch(validationError(res));\n}", "title": "" }, { "docid": "07c6b2ea36b64296d0a94349cb6a0d0e", "score": "0.6478756", "text": "function addToWatchlist () {\n\t\tlet movie = {\n\t\t\tTitle: props.movieDetails.Title,\n\t\t\timdbID: props.movieDetails.imdbID,\n\t\t\tRated: props.movieDetails.Rated,\n\t\t\tYear: props.movieDetails.Year,\n\t\t\tGenre: props.movieDetails.Genre,\n\t\t\tRuntime: props.movieDetails.Runtime\n\t\t}\n\t\tsetWatchlist(watchlist.concat(movie))\n\t}", "title": "" }, { "docid": "e74b5a98093a0fc135a3b09251f43e06", "score": "0.6460097", "text": "function btnAddWatchList() {\n id = E(\"watchID\").value;\n addWatchlist(id);\n}", "title": "" }, { "docid": "c7b01f272f6d3fa2292083175b81b65d", "score": "0.61477625", "text": "newList(){\n this.tasks = {\"noteGroupTitle\": string, \"identity\": 0, \"items\": []};\n ipc.send('save-json', {\"noteGroupTitle\": '', \"identity\": 0, \"items\": []});\n refreshList()\n }", "title": "" }, { "docid": "1e546d2fbbc6d46d4066496f2b9a3f87", "score": "0.60355675", "text": "addNewItemToList(list, initDescription, initDueDate, initStatus) {\n let newItem = new ToDoListItem(this.nextListItemId++);\n newItem.setDescription(initDescription);\n newItem.setDueDate(initDueDate);\n newItem.setStatus(initStatus);\n list.addItem(newItem);\n if (this.currentList) {\n this.view.refreshList(list);\n }\n }", "title": "" }, { "docid": "1e546d2fbbc6d46d4066496f2b9a3f87", "score": "0.60355675", "text": "addNewItemToList(list, initDescription, initDueDate, initStatus) {\n let newItem = new ToDoListItem(this.nextListItemId++);\n newItem.setDescription(initDescription);\n newItem.setDueDate(initDueDate);\n newItem.setStatus(initStatus);\n list.addItem(newItem);\n if (this.currentList) {\n this.view.refreshList(list);\n }\n }", "title": "" }, { "docid": "cb71bd8b4bb1c93d0e7b2b011663ac7e", "score": "0.5907595", "text": "getWatchlists() {\n return this.call('GET', constants.paths.WATCHLISTS_PATH)\n }", "title": "" }, { "docid": "7f25c169860605320c9dd5ae15bb23de", "score": "0.58729386", "text": "createList(event) {\n event.preventDefault()\n let newList = {\n title: event.target.title.value,\n description: event.target.description.value,\n boardId: store.state.activeBoard._id\n }\n\n store.createList(newList, newList.boardId, drawLists)\n event.target.reset()\n }", "title": "" }, { "docid": "7e6eca4955147e0a4613e7153edf0511", "score": "0.5799842", "text": "function saveWatchList(watchList) {\n\tlocalStorage.setItem('watchList', JSON.stringify(watchList));\n}", "title": "" }, { "docid": "881d0e5cdb4234c07c9436fcb185c125", "score": "0.57722014", "text": "function addToWatchlist(sessionID, position){\n var watchlist = Session.get(\"sessionsWatched\");\n watchlist[sessionID] = {position: position || {top: 55, left: 15},\n\t\t\t isCollapsed : false };\n\n logAction('addToWatchlist', {sessionID: sessionID});\n Session.set(\"sessionsWatched\", watchlist);\n}", "title": "" }, { "docid": "3d27a53052d5319bdd4b5ced2c1694d0", "score": "0.57551306", "text": "function newlist() {\n}", "title": "" }, { "docid": "5167b1c4858c24bbd95527fb16d49048", "score": "0.5745371", "text": "function onNewList() {\n\t\tif (!FT.isOnline()) {\n\t\t\tutils.status.show('You are offline.\\nUnfortunately, Fire Tasks is unable to create lists in offline mode at the moment :(', 4000);\n\t\t\treturn;\n\t\t}\n\t\trenderForm('CREATE', {});\n\t}", "title": "" }, { "docid": "25b8605a209b9b0e90054c78f87d9f8f", "score": "0.55695647", "text": "addWatch(watch, interval) {\n this.log(`Adding ${ watch.name }`);\n\n /* attach interval parameter to watch object*/\n watch._interval = interval;\n this.watches.push(watch);\n\n this.log(`Added ${ watch.name }`);\n }", "title": "" }, { "docid": "6895f79492a1fc329e614b052556be20", "score": "0.55562884", "text": "function createNewListing() {\n var newListing = Listing.new();\n\n MockDatabase.push(newListing);\n\n chooseActivity('what_to_do');\n clearNewListingForm();\n}", "title": "" }, { "docid": "6eca16751dfdcf9b8f498cb81dc4a804", "score": "0.55339533", "text": "create () {\n\t\t\t\tconst { name, location, date, rock } = this.get();\t\t//creates a constant to the list\n\t\t\t\trock.push({ name, location, date });\t\t//used push() method to add one data endo of the list\n\t\t\t\tthis.set({\n\t\t\t\t\trock,\n\t\t\t\t\tname: '',\n\t\t\t\t\tlocation: '',\n date: '',\n\t\t\t\t\tlist: rock.length + 1\t\t\t\t\t\t\t\t\t//adds 1 data to the length of list\n\t\t\t\t});\n\t\t\t}", "title": "" }, { "docid": "3458f25158c78291ed27ffb15776f6e3", "score": "0.5526731", "text": "createAutocreate () {\n\t\tconst list = this.props.list;\n\t\tlist.createItem(null, (err, data) => {\n\t\t\tif (err) {\n\t\t\t\t// TODO Proper error handling\n\t\t\t\talert('Something went wrong, please try again!');\n\t\t\t\tconsole.log(err);\n\t\t\t} else {\n\t\t\t\tthis.context.router.push(`${Keystone.adminPath}/${list.path}/${data.id}`);\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "c769522029fef1de49b7fa1fdbced13c", "score": "0.5518765", "text": "processCreateNewList() {\n // MAKE A BRAND NEW LIST\n window.todo.model.loadNewList();\n\n // CHANGE THE SCREEN\n window.todo.model.goList();\n }", "title": "" }, { "docid": "24765387f7c88afb1a47631e5a3fb73c", "score": "0.55079633", "text": "function renderWatchlist() {\n\t/* (ITEM #9) implement */\n\t$.get(\"templates/watchlist.html\",function(data){\n\t\t$.template(\"watch_list\",data);\n\t\t$(\"#watchlist-items\").empty();\n\t\tfor(var i=0;i<watchlist.length;i++){\n\t\t\t$.tmpl(\"watch_list\",watchlist[i]).appendTo( \"#watchlist-items\");\t\n\t\t}\n\t\t$(\"#watchlist-items\").fadeToggle();\n\t});\n}", "title": "" }, { "docid": "38ccd2668eae62623eaaace1d0bb515b", "score": "0.54942065", "text": "function createListModel(config){\n\tvar itemList = Object.create(List);\n\tapply(config, itemList);\n\titemList.items = itemList.items || [];\n\treturn makeEventSource(itemList);\n}", "title": "" }, { "docid": "e9393d072680c34bfca208581b81ddb9", "score": "0.54939216", "text": "notifyCreateAndAddToList() {\n this.dispatchEvent(new CustomEvent('createandaddtolist'));\n }", "title": "" }, { "docid": "b1e499f4429632479ffb625c0a41c965", "score": "0.5481329", "text": "function addToWatchlist(movie) {\n try {\n var db = getDatabase()\n db.transaction(function(tx) {\n tx.executeSql('INSERT OR REPLACE INTO watchlist '+\n 'VALUES (?, ?, ?, ?, ?, ?);',\n [movie.id, movie.name,\n movie.year, movie.iconSource,\n movie.rating, movie.votes])\n })\n } catch (ex) {\n console.debug('addToWatchlist:', ex)\n }\n}", "title": "" }, { "docid": "e05c20329c6131e8ef9cc9f22a5ec275", "score": "0.54704887", "text": "function initWatchLater() {\n\t\tvar $ul = $('.history-tab ul');\n\t\tif(!playlist.length) {\n\t\t\t$ul.append(\"<li class='no-results'><span>No videos for you to download later :(</span></li>\"); \n\t\t} else {\n\t\t\t$.each(playlist, function(i,stream) {\n\t\t\t\tappendToWatchLaterTab($ul,stream);\n\t\t\t}); // end $.each\n\t\t} // if/else\n\t} // initWatchLater", "title": "" }, { "docid": "2bad135af72eb6243076c2455e4c252c", "score": "0.5435913", "text": "function create_list() {\n var grocery_list = {} }", "title": "" }, { "docid": "3e3e225b021483caec205299342434e1", "score": "0.54239863", "text": "function addEpicWatchlist(epic, watchlistID) {\n\treturn new Promise((res, rej) => {\n\t\tlet payload = {\n\t\t\t'epic': epic\n\t\t};\n\t\tput('/watchlists/' + watchlistID, payload)\n\t\t\t.then(r => {\n\t\t\t\tif (r.status !== 200) {\n\t\t\t\t\trej(r);\n\t\t\t\t} else {\n\t\t\t\t\tres(r.body);\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(e => {\n\t\t\t\trej(e);\n\t\t\t});\n\t});\n}", "title": "" }, { "docid": "0474208ac1f65229258217f0bf944132", "score": "0.54102093", "text": "function watchlists(id) {\n\treturn new Promise((res, rej) => {\n\t\tif (typeof(id) === 'undefined') {\n\t\t\tget('/watchlists')\n\t\t\t\t.then(r => {\n\t\t\t\t\tif (r.status !== 200) {\n\t\t\t\t\t\trej(r);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tres(r.body.watchlists);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.catch(e => {\n\t\t\t\t\trej(e);\n\t\t\t\t});\n\t\t} else {\n\t\t\tget('/watchlists/' + id)\n\t\t\t\t.then(r => {\n\t\t\t\t\tif (r.status !== 200) {\n\t\t\t\t\t\trej(r);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tres(r.body);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.catch(e => {\n\t\t\t\t\trej(e);\n\t\t\t\t});\n\t\t}\n\t});\n}", "title": "" }, { "docid": "2c88d6df0f9b3efd6030334a0ae71e81", "score": "0.54083633", "text": "function createTimeline(stopID, stopDate, stopTitle, stopPlace) {\n var stopList = document.getElementById('stop-list');\n item = stopList.appendChild(document.createElement('li'));\n \n $('#sidebar').addClass('timeline');\n \n item.innerHTML = \n '<div class=\"location-date\"><span class=\"location-id\" data-stop-id=\"'+ stopID + '\">Stop #' + stopID + '</span>' + \n '<span class=\"stop-date\">'+ stopDate + '</span></div>' +\n '<div class=\"location-name\"><a>' + stopTitle + '</a></div>' +\n '<div class=\"location-place\">' + stopPlace + '</div>';\n\n $(item).addClass('location');\n scrollSidebar.refresh();\n}", "title": "" }, { "docid": "66a1fdf4d7034e4e173655384553db59", "score": "0.5405282", "text": "viewWatchlist() {\n if (this.get('showWatchlists')) {\n return this.set('showWatchlists', false);\n }\n return this.set('showWatchlists', true);\n }", "title": "" }, { "docid": "10495aff947ac88dd6ebb9079d7ad74c", "score": "0.5396218", "text": "addToWatch(userId, newList) {\n const list = [...this.state.userLogged[0].toWatchList];\n console.log('here', list)\n\n list.push(newList)\n axios.put(`/user/${userId}`, { toWatchList: list })\n }", "title": "" }, { "docid": "c3ad80c911785ee3c1104d8930311a2b", "score": "0.5365088", "text": "function createList(name){\n name = name.replace(/[^a-zA-Z ]/g, \"\");\n if(name.length < 1){\n return;\n }\n for(let i = 0; i < lists.length; i++){\n if('list_' + name === lists[i].name){\n alert(\"That list already exists!\");\n return;\n }\n }\n lists.push(new List('list_' + name));\n download();\n add(name);\n}", "title": "" }, { "docid": "d9ed8aba31cc33a3dcc2d00d0296d9e6", "score": "0.5344162", "text": "function newList(){\n\n var section = document.createElement('section');\n document.body.appendChild(section);\n\n var divRoot = document.createElement(\"div\");\n divRoot.className=\"label\";\n section.appendChild(divRoot);\n\n var divTitle=document.createElement(\"div\");\n divTitle.className=\"inlabel\";\n divTitle.innerHTML=\"Title:\"\n divRoot.appendChild(divTitle);\n var inputTitle=document.createElement(\"input\");\n inputTitle.className=\"title\";\n inputTitle.type=\"text\";\n divTitle.appendChild(inputTitle);\n\n var divAuthor=document.createElement(\"div\");\n divAuthor.className=\"inlabel\";\n divAuthor.innerHTML=\"Author:\"\n divRoot.appendChild(divAuthor);\n var inputAuthor=document.createElement(\"input\");\n inputAuthor.className=\"author\";\n inputAuthor.type=\"text\";\n divAuthor.appendChild(inputAuthor);\n\n var divDate=document.createElement(\"div\");\n divDate.className=\"inlabel\";\n var d = new Date();\n divDate.innerHTML=\"Date:\";\n divRoot.appendChild(divDate);\n var inputDate=document.createElement(\"input\");\n inputDate.className=\"date\";\n inputDate.type=\"text\";\n inputDate.value=d.toUTCString();\n divDate.appendChild(inputDate);\n\n //Create delete and add button on the todo list;\n var delBtn=document.createElement(\"span\");\n var delll = document.createTextNode(\"\\u00D7\");\n delBtn.className=\"delB\"; \n delBtn.appendChild(delll);\n divRoot.appendChild(delBtn); \n var h=document.createElement(\"span\");\n h.innerHTML=\"+\";\n h.className=\"add\";\n divRoot.appendChild(h);\n\n //Call create and delete funtion to keep listening to the event;\n newItem();\n closeSection();\n}", "title": "" }, { "docid": "f50433e3c3aaef16a4db428578795d72", "score": "0.53359663", "text": "onEditWatchlist(response) {\n if (response.status === \"SUCCESS\") {\n this.get('notify').success(response.status);\n this.getWatchlists();\n } else {\n this.get('notify').error(response.status);\n }\n }", "title": "" }, { "docid": "07d42c541de9ebd8fd90a832d82db4f3", "score": "0.53021914", "text": "function addToList(item) {\n self.list.push(WidgetService.createObject(item));\n }", "title": "" }, { "docid": "46aed4d950a5cc623761991425b74378", "score": "0.5302084", "text": "function create_todolist(data) {\n\t\t$scope.todolist = [];\n\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\t$scope.todolist.push({\n\t\t\t\tid: data[i]['id'],\n\t\t\t\tname: data[i]['task'],\n\t\t\t\tdue_date: data[i]['due_date'],\n\t\t\t\tdone: data[i]['done'],\n\t\t\t\tdb_id: data[i]['db_id']\n\t\t\t});\n\t\t}\n\t}", "title": "" }, { "docid": "0054d3dff56289584045d6ca51a7c504", "score": "0.52925736", "text": "function add(movie) {\n\tif (indexOf(watchlist, movie) < 0) {\n\t\twatchlist.push(movie);\n\t\t$(\"#counter\").html(watchlist.length);\n\t\t$.get(\"templates/watchlist.html\",function(data){\n\t\t\t$.template(\"watch_list\",data);\n\t\t\t$.tmpl(\"watch_list\",watchlist[watchlist.length-1]).appendTo( \"#watchlist-items\");\t\n\t\t});\n\t\talert(\"Movie added in the list.\")\n\t} else {\n\t\talert(\"Movie already in the list.\");\n\t}\n}", "title": "" }, { "docid": "5eb36eaff81f8efa8c67a84291ec86b1", "score": "0.5283903", "text": "function addItemToWatchList(movieName) {\n\tvar watchList = loadWatchList();\n\twatchList.push(movieName);\n\tsaveWatchList(watchList);\n}", "title": "" }, { "docid": "4d1874a0ba2d8fcf969e3b9ac5046639", "score": "0.5248562", "text": "onGetWatchlist(response) {\n this.set('watchlists', response.watchlists.sort(this.compare));\n }", "title": "" }, { "docid": "ca26dd69e41e7ec47fa129c5262d4af5", "score": "0.52423376", "text": "createPlaylist(playlist,cb) { \n\t\tconst _id = idplaylist\n\t\tconst pl = {\n\t\t\t'_id':_id,\n\t\t\t'name':playlist.name,\n\t\t\t'description':playlist.description,\n\t\t\t'duration': 0, \n\t\t\t'musics':[]\n\t\t}\n\t\tplaylists[_id] = pl\n\t\tcb(null, { 'status': 'created', '_id': _id})\n\t}", "title": "" }, { "docid": "c8e6bae515c6d1dd23ba5264088fdab7", "score": "0.52368975", "text": "async createList({ commit, dispatch }, payload) {\n try {\n let res = await api.post('/lists', payload)\n dispatch('getListsByBoardId', res.data.boardId)\n // commit('setActiveLists', res.data)\n } catch (error) { console.error(error) }\n }", "title": "" }, { "docid": "bd8dab60f95a06360d3fd1ecf01aa555", "score": "0.52321965", "text": "function _createList(listName, callback) {\n var hostWebUrl = riskapp.utils.getSpHostUrl();\n var appWebUrl = _spPageContextInfo.siteAbsoluteUrl;\n var spExecutor = new SP.RequestExecutor(appWebUrl);\n var requestUrl = appWebUrl + \"/_api/SP.AppContextSite(@target)/web/Lists?@target='\" + hostWebUrl + \"'&siteUrl='\" + hostWebUrl + \"'\";\n spExecutor.executeAsync({\n url: requestUrl,\n method: \"POST\",\n body: JSON.stringify({ '__metadata': { 'type': 'SP.List' }, 'AllowContentTypes': true, 'BaseTemplate': 100, 'ContentTypesEnabled': true, 'Description': listName, 'Title': listName }),\n headers: {\n \"content-type\": \"application/json; odata=verbose\"\n },\n success: callback,\n error: _handleError\n });\n }", "title": "" }, { "docid": "9f8ae9afa49bb047e34ce0dc67dd5bbd", "score": "0.51996833", "text": "function loadWatchlist () {\n\t\t//Check local storage first\n\t\tlet storedList = localStorage.getItem(\"watchlist\")\n\t\tif (storedList !== null) {\n\t\t\t//If local copy exists parse and store in state\n\t\t\tlet converted = JSON.parse(storedList)\n\t\t\tsetWatchlist(converted)\n\t\t} else \n\t\t\tsetWatchlist([])\n\t}", "title": "" }, { "docid": "fdd62b9d0e799755e58732991023ec1e", "score": "0.5192902", "text": "function createNewTask(task) {\n console.log(\"Creating task...\");\n\n //set up the new list item\n const listItem = document.createElement(\"li\");\n const checkBox = document.createElement(\"input\");\n const label = document.createElement(\"label\");\n\n\n //pull the inputed text into label\n label.innerText = task;\n\n //add properties\n checkBox.type = \"checkbox\";\n\n //add items to the li\n listItem.appendChild(checkBox);\n listItem.appendChild(label);\n //everything put together\n return listItem;\n }", "title": "" }, { "docid": "7bb1c8fd1f0840af95eec1487a1aa351", "score": "0.51856345", "text": "function createItem(task,status,index) {\n const item = document.createElement('li');\n item.classList.add('todo-item');\n item.innerHTML = `\n \n <input type=\"checkbox\" class=\"toggle\" name=\"items\" ${status} data-index=${index}>\n <label for=\"\">${task}</label>\n <button class=\"destroy\" data-index=${index}></button>\n \n `\n document.getElementById('todoList').appendChild(item);\n}", "title": "" }, { "docid": "ea79a932291494676db1f9abaf074ff1", "score": "0.5181532", "text": "function addNewList() {\n Lists.addNewList(data.title, data.goal);\n data.title = \"\";\n data.goal = \"\";\n }", "title": "" }, { "docid": "838ab6b2091f5f416130d89add20f304", "score": "0.5178426", "text": "function addNewItem(List, itemText){\r\n\tvar listItem = document.createElement(\"li\");\r\n\tlistItem.innerText = \"hello\";\r\n\r\n\tlist.appendChild(listItem);\r\n}", "title": "" }, { "docid": "f9027bd1229f526da827ae00513ae810", "score": "0.5163015", "text": "addNewItem(nameStr, index) {\r\n //List item object containing name and check status of item\r\n let listItem = {\r\n id: index,\r\n name: nameStr,\r\n check: 0,\r\n };\r\n //Add new item to the list\r\n this.listItems.push(listItem);\r\n return this.listItems;\r\n }", "title": "" }, { "docid": "7a1bfaa4aa3f3d0c06cca43f568d147a", "score": "0.51519597", "text": "function newList(listName){\n //console.log(\"newList is being called\");\n let i = 0;\n for(i = 0; i < lists.length; i++) {\n lists[i].selected = false;\n }\n if (listName !== \"\") {\n let newList = {\n name: listName,\n tasks: [],\n selected: true\n };\n selected = i;\n\n lists.push(newList);\n displayLists();\n displayTasks(selected);\n //}\n }\n}", "title": "" }, { "docid": "3b7464bea863a6bef18954eaef5bb6d0", "score": "0.5149198", "text": "create(){\n let newData = new TodoItem(\"New to-do\", \"add description here\");\n this.data.push(newData);\n\n let dataAsString = JSON.stringify(this.data);\n localStorage.setItem(\"todo\", dataAsString);\n\n console.log(`Todo list created with first item id is ` + newData.id);\n }", "title": "" }, { "docid": "4d8412d5525ff40d9ea10399dedc7944", "score": "0.5127445", "text": "list() {\n\t\tif (this.watchList.length) {\n\t\t\tchannel.appendLocalisedInfo(\"watched_paths\");\n\n\t\t\tthis.watchList.forEach((item) => {\n\t\t\t\tchannel.appendLine(\n\t\t\t\t\ti18n.t('path_with_trigger_count', item.path, item.data.triggers)\n\t\t\t\t);\n\t\t\t});\n\n\t\t\tchannel.appendLine('');\n\t\t} else {\n\t\t\tchannel.appendLocalisedInfo('no_paths_watched');\n\t\t}\n\n\t\tchannel.show();\n\t}", "title": "" }, { "docid": "42af4ad2b842def501d57994d35c6671", "score": "0.51259744", "text": "function addSleep() {\n var sleep = document.getElementById('sleep').value;\n var node = document.createElement(\"LI\");\n var textnode = document.createTextNode(sleep);\n node.appendChild(textnode);\n document.getElementById(\"sleeplist\").appendChild(node);\n document.getElementById(\"sleep\").value = \"\";\n }", "title": "" }, { "docid": "7c2a89d57cf1889055482ca6911479a8", "score": "0.51168275", "text": "function createConfigList() {\n var hostUrl = decodeURIComponent(getQueryStringParameter(\"SPHostUrl\"));\n var currentcontext = new SP.ClientContext.get_current();\n var hostcontext = new SP.AppContextSite(currentcontext, hostUrl);\n var hostweb = hostcontext.get_web();\n\n //Set ListCreationInfomation()\n var listCreationInfo = new SP.ListCreationInformation();\n listCreationInfo.set_title('spConfig');\n listCreationInfo.set_templateType(SP.ListTemplateType.genericList);\n var newList = hostweb.get_lists().add(listCreationInfo);\n newList.set_hidden(true);\n newList.set_onQuickLaunch(false);\n newList.update();\n\n //Set column data\n var newListWithColumns = newList.get_fields().addFieldAsXml(\"<Field Type='Note' DisplayName='Value' Required='FALSE' EnforceUniqueValues='FALSE' NumLines='6' RichText='TRUE' RichTextMode='FullHtml' StaticName='Value' Name='Value'/>\", true, SP.AddFieldOptions.defaultValue);\n\n //final load/execute\n context.load(newListWithColumns);\n context.executeQueryAsync(function () {\n //spConfig list created successfully!\n findInSideNav();\n },\n function (sender, args) {\n console.error(sender);\n console.error(args);\n alert('Failed to create the spConfig list. ' + args.get_message());\n });\n }", "title": "" }, { "docid": "585f69067115b5eaa3595555fa088f35", "score": "0.51144", "text": "function createNewList() {\n // create new element\n const newli = document.createElement('li');\n newli.style.backgroundColor = 'salmon';\n const textNewli = document.createTextNode('ditambahkan setelah di klik');\n newli.appendChild(textNewli);\n // seleksi ul/ tempat elemen baru akan diletakan\n const ul = document.querySelector('#b ul');\n // dalam ul , tolong letakan new elemen \n ul.appendChild(newli);\n}", "title": "" }, { "docid": "1790ffe331fa4bdd79d29f873cd373cc", "score": "0.5113273", "text": "function createPlaylistsResource(parent) {\n const playlists = createResource(parent);\n playlists.resource = 'playlists';\n playlists.elementFactory = playlistFactory;\n return playlists\n}", "title": "" }, { "docid": "1ef779c5e4a535d872051e283396551f", "score": "0.51124996", "text": "function createList(clickFunc,list,id,name)\n{\n \tvar node = document.createElement(\"LI\");\n \tnode.class = \"\";\n \tnode.id = id +\" \"+name;\n \tnode.className = \"createdList\";\n \tvar para = document.createElement(\"span\");\n \tpara.id = id +\" \"+name;\n \tvar textnode = document.createTextNode(name);\n \tpara.appendChild(textnode);\n \tnode.appendChild(para);\n \tnode.onclick = function() { \n \t\tclickFunc(this.id);\n \t};\n \tdocument.getElementById(list).appendChild(node); \t\n}", "title": "" }, { "docid": "d6ffd2e4610ece17350e43bc1d4d1fde", "score": "0.5106239", "text": "async function createList() {\r\n labelCreateStatus.textContent = \"\";\r\n const podUrl = document.getElementById(\"PodURL\").value;\r\n\r\n let titles = document.getElementById(\"titles\").value.split(\"\\n\");\r\n\r\n // Create a new SolidDataset (i.e., the reading list)\r\n let emptySolidDataset = createSolidDataset();\r\n\r\n\r\n // Add titles to the Dataset\r\n for (let i = 0; i < titles.length; i++) {\r\n let title = createThing({name: \"title\" + i});\r\n title = addUrl(title, RDF.type, AS.Article);\r\n title = addStringNoLocale(title, SCHEMA_INRUPT.name, titles[i]);\r\n emptySolidDataset = setThing(emptySolidDataset, title);\r\n }\r\n\r\n try {\r\n \r\n // Save the SolidDataset\r\n await saveSolidDatasetAt(podUrl, emptySolidDataset, { fetch: fetch });\r\n\r\n labelCreateStatus.textContent = \"Saved\";\r\n // Disable Create button\r\n buttonCreate.disabled=true;\r\n\r\n } catch (error) {\r\n console.log(error);\r\n labelCreateStatus.textContent = \"Error\" + error;\r\n labelCreateStatus.setAttribute(\"role\", \"alert\");\r\n }\r\n}", "title": "" }, { "docid": "72ce03100b3f6c1e8d0a11be12d8e71c", "score": "0.508637", "text": "function newTaskElement(){\r\n\r\n // Creates list element and its properties\r\n var taskObject = $(document.createElement(\"li\"));\r\n $(taskObject).append(createCheckBox());\r\n $(taskObject).append(createTaskStringLabel());\r\n $(taskObject).append(createDeleteButton());\r\n $(taskObject).append(createVertLine());\r\n $(taskObject).append(createEditButton());\r\n\r\n // Adds the taskObject to the taskList and clears the txbNewTask value\r\n $(\"#taskList\").append(taskObject);\r\n $(\"#txbNewTask\").val(\"\");\r\n }", "title": "" }, { "docid": "0e45bafb5c84446cdf9767f834c8e54b", "score": "0.50792515", "text": "function createListitem(event) {\n event.preventDefault();\n\n let newListitemContent = document.getElementById(\"content\").value;\n let item = new Listitem(newListitemContent, false);\n items.push(item);\n generateHTML();\n\n}", "title": "" }, { "docid": "c74010ba0e221ca24ecd219553e1b4ea", "score": "0.5074464", "text": "constructor(scope, id, props) {\n super(scope, id, KubeEventList.manifest(props));\n }", "title": "" }, { "docid": "ea06669861265dad2cb71ce5054028a5", "score": "0.5069736", "text": "function createNewList (event) {\n\n // Prevents page from refreshing upon form submit\n event.preventDefault();\n\n // Conditional statement to prevent creation of lists with blank titles\n if (input.value == \"\") {\n alert(\"Please enter a list title.\");\n }\n\n // Alternate condition allows for list creation given any non-blank input string\n else {\n\n newItem = document.createElement(\"li\");\n\n // Assigns a class tag to the li upon its creation to apply CSS\n newItem.classList.add(\"created-list\");\n\n // Sets title of list to user's text input and sets to uppercase for consistency\n newItem.appendChild(document.createTextNode(input.value.toUpperCase()));\n\n // Adds li as child of ul\n ul.appendChild(newItem);\n\n // Resets text input field for cleaner usage\n input.value = \"\";\n \n }\n\n}", "title": "" }, { "docid": "ca28cd09f47e7265762bc19dbd3a2cd6", "score": "0.5068343", "text": "function createSyncList(serviceSid) {\n return client.sync.services(serviceSid)\n .syncLists\n .create({\n uniqueName: 'MagicTexters'\n })\n .then(sync_list => sync_list)\n .catch((err) => {\n throw new Error(err.details)\n });\n }", "title": "" }, { "docid": "0bca4427b7d64ea213252e6c7b9146a8", "score": "0.5065827", "text": "function appendToWatchLaterTab($ul,stream) {\n\t\t$ul.append(\"<li class='thumb-tab stream' data-id='\"+stream.id+\"' data-url='\"+stream.url+\"' data-title='\"+stream.title+\"' data-channel-name='\"+stream.channel_name+\"'>\"+\n\t\t\t\t\t\t\"<i class='remove fa fa-close'></i>\"+\n\t\t\t\t\t\t\"<span class='download' data-tooltip='Download'><i class='fa fa-download'></i></span>\"+\n\t\t\t\t\t\t\"<div class='thumb-img'></div>\"+\n\t\t\t\t\t\t\"<p>\"+\n\t\t\t\t\t\t\t\"<span class='thumb-title'>\"+stream.title+\"</span>\"+\n\t\t\t\t\t\t\t\"<a class='thumb-channel' href='\"+stream.channel_url+\"' target='_blank' rel='noopener'>\"+stream.channel_name+\"</span>\"+\n\t\t\t\t\t\t\"</p>\"+\n\t\t\t\t \"</li>\"); \n\t\t$(\"[data-id=\"+stream.id+\"] .thumb-img\").css('backgroundImage', 'url(\"'+stream.thumbnail+'\")');\n\t} // appendToWatchLaterTab", "title": "" }, { "docid": "7b53fa24c869c47f4401fe65b3b6a5ec", "score": "0.5064593", "text": "function createListElement() {\n\tvar li = document.createElement(\"li\");\n\tli.appendChild(document.createTextNode(input.value));\n\tul.appendChild(li);\n\tinput.value = \"\";\n\titems = document.querySelectorAll(\"li\");\n\t// since array start counting a zero the last value is lenght - 1\n\taddDeleteButton(items[items.length-1],items.length-1);\n\tcreateEventListner(items[items.length-1],items.length-1);\n}", "title": "" }, { "docid": "dc71d65621d5cd968b90f33366f9f5fc", "score": "0.506406", "text": "function initListCreation() {\n $.getScript(riskapp.utils.getSpHostUrl() + \"/_layouts/15/SP.RequestExecutor.js\", function () {\n var activeListConfig = listConfigs[listName + \"ListConfig\"];\n riskapp.listHandling.setupList(activeListConfig, function () {\n //Success handler\n $this.siblings(\".listStateIndicator\").addClass(\"listStateAvailable\");\n updateListState();\n });\n });\n }", "title": "" }, { "docid": "8eadc8b0eeb5b2d3a59b418999e84850", "score": "0.5063372", "text": "function createProjectPill(projectObj) {\n let listItem = document.createElement('a');\n listItem.classList = \"list-item mdc-list-item\";\n listItem.textContent = projectObj.title;\n listItem.dataset.id = projectObj.id;\n listItem.dataset.eventFor = \"projects-data\"; //for events use\n listItem.dataset.eventType = \"view-project\";\n if (projectObj.isCurrentlyViewed) {\n listItem.classList.add(\"mdc-list-item--activated\");\n }\n\n listItem.addEventListener('click', controller);\n\n listItem.appendChild(createDeleteBtn(projectObj.id, \"project\"));\n return listItem;\n }", "title": "" }, { "docid": "b84f83ab20ee6616443f6f2e3cd4abb3", "score": "0.5054802", "text": "function createNewListItem() {\n let li = document.createElement(\"li\");\n let liTextNode = document.createTextNode(\"This is list item \" + liNumber);\n li.addEventListener(\"click\", function () {\n changeFontColor(li);\n });\n li.addEventListener(\"dblclick\", function () {\n document.body.removeChild(li);\n });\n li.appendChild(liTextNode);\n document.body.appendChild(li);\n liNumber++\n }", "title": "" }, { "docid": "86723c215c021c5c21df158c8ddf6b62", "score": "0.50523615", "text": "function createHistoryList(data, meterName) {\n let meterHistoryTitle = $('#meterHistoryTitle');\n if (meterName !== null) {\n meterHistoryTitle.empty();\n meterHistoryTitle.append(meterName)\n }\n meterHistoryList.empty();\n\n if (data.length > 0) {\n for (let i = 0; i < data.length; i++) {\n let newLi = $(\"<li>\");\n let newDiv = $(\"<div>\");\n let newDiv2 = $(\"<div>\");\n let newH2 = $(\"<h2>\");\n let newEm = $(\"<em>\");\n let newP = $(\"<p>\");\n let btnDelete = $(\"<a>\");\n let btnDeleteEm = $(\"<em>\");\n let btnEdit = $(\"<a>\");\n let btnEditEm = $(\"<em>\");\n\n newLi.addClass(\"timeline-item bg-main-theme rounded ml-3 p-4 shadow\");\n newDiv.addClass(\"timeline-arrow\");\n newH2.addClass(\"h5 mb-0\");\n newEm.addClass(\"far fa-calendar-check mr-3\");\n newP.addClass(\"text-small mt-2 font-weight-light\");\n newH2.append(newEm);\n\n let readingDate = data[i].meterReadingDate.replace(\"-/g\", \".\")\n newH2.append($(\"#readDateLabel\").val() + \": \" + readingDate);\n newP.text($(\"#readValueLabel\").val() + \": \" + data[i].readingValue);\n\n btnDeleteEm.addClass(\"fas fa-trash-alt\");\n btnEditEm.addClass(\"fas fa-pencil-alt\");\n btnDelete.addClass(\"btn btn-xs float-right btn-mixed-outline mr-2\").attr(\"data-toggle\", \"tooltip\")\n .attr(\"value\", data[i].id).prop('title', $(\"#meterDeleteReadingTooltip\").val()).on(\"click\", function () {\n deleteEntity($(\"#readDeleteMessage\").val() + \" \" + readingDate, deleteReading, data[i].id)\n });\n btnEdit.addClass(\"btn btn-xs float-right btn-mixed-outline mr-2\").attr(\"data-toggle\", \"tooltip\")\n .attr(\"value\", data[i].id).prop('title', $(\"#meterEditReadingTooltip\").val()).on(\"click\", editReading);\n btnEdit.append(btnEditEm);\n btnDelete.append(btnDeleteEm);\n\n newDiv2.append(btnEdit);\n newDiv2.append(btnDelete);\n newDiv2.append(newH2);\n newLi.append(newDiv);\n newLi.append(newDiv2);\n newLi.append(newP);\n meterHistoryList.append(newLi);\n }\n }\n }", "title": "" }, { "docid": "99e87c3aed068e978b7e21303215305f", "score": "0.50335896", "text": "addOrRemoveFromWatchlistHandler() {\n const that = this;\n\n // Add/remove stock from watchlist\n this.$watchButton.on('click', function(event) {\n event.stopPropagation();\n const pageId = getPageId();\n that.watchlist = store.get('watchlist');\n that.toggleButtonState(that.isWatched);\n\n // const $stockListWatchButton = $(`#canvas #${that.symbol}-watchbutton`);\n // $stockListWatchButton.toggleClass('isWatched');\n // console.log($stockListWatchButton.attr('class'));\n\n\n // if stock is not in watchlist, then add to watchlist\n if (!that.isWatched) {\n that.watchlist.push({\n symbol: that.symbol,\n name: that.companyName\n });\n store.set('watchlist', that.watchlist);\n }\n // if stock exist, then remove it from watchlist\n else {\n // remove stock from watchlist array\n let index = that.watchlist.findIndex(stock => stock.symbol === that.symbol);\n if (index != -1) {\n that.watchlist.splice(index, 1);\n }\n\n // store upated watchlist array\n store.set('watchlist', that.watchlist);\n \n /* For the Watchlist page, when the Watch button is clicked to remove the stock from the list,\n reload the page so that it is no longer showing data for the stock that the user just removed.\n */\n if (pageId === 'watchlist') {\n window.location.reload();\n }\n }\n that.isWatched = that.isInWatchlist();\n });\n }", "title": "" }, { "docid": "9dd364161dec15b639ea09a9e4cda930", "score": "0.50272584", "text": "function createSyncList(serviceSid) {\n return client.sync.services(serviceSid)\n .syncLists\n .create({\n uniqueName: context.SYNC_LIST_NAME\n })\n .then(syncList => syncList)\n .catch((err) => { throw new Error(err.details) });\n }", "title": "" }, { "docid": "044c12344f8e96dff5619980a7821d16", "score": "0.5024613", "text": "function createList(jsonArr){\n if(jsonArr.length > 0)\n {\n for(i = 0; i < jsonArr.length; i++){\n var newLI = document.createElement(\"li\");\n var newItem = document.createTextNode(jsonArr[i]);\n newLI.appendChild(newItem);\n parent.appendChild(newLI);\n createButton(newLI);\n }\n }\n}", "title": "" }, { "docid": "9aa36f5aeb97fb571c33464e7b35e815", "score": "0.50239164", "text": "watchNewTweets(mutationList) {\n\t\tlet tweetMarker = this.tweetMarker;\n\t\tmutationList.forEach(function (mutation) {\n\t\t\tmutation.addedNodes.forEach(function (newNode) {\n\t\t\t\tif (newNode.nodeType === Node.ELEMENT_NODE) {\n\t\t\t\t\ttweetMarker.markChildTweets(newNode);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}", "title": "" }, { "docid": "a2b0db09600810c92f77d7972c8e3269", "score": "0.50229377", "text": "addList() {\n let listName = '';\n let randomId = generateRandomString();\n\n // While creating first list, make it default\n let isDefault = this.state.listCollection.length === 0 ? true: false;\n\n let payload = {\n listName: listName,\n listId: randomId,\n isDefault\n };\n\n let newState = this.state.listCollection.concat(payload);\n this.setState({\n listCollection: newState\n });\n\n // create a new list in db\n createNewListFS(getFromLocalStorage('userData', 'id'), randomId, payload);\n this.toggleEditListName(randomId);\n }", "title": "" }, { "docid": "c33ba3136e69cf0ef75d428b4dbcd190", "score": "0.50137293", "text": "static addTodoToList(todo) {\n // 1. Creates an LI \n const todoLI = document.createElement('li');\n todoLI.className = `\n todo-list-item list-group-item rounded-lg mb-3\n d-flex align-items-center justify-content-between\n animate__animated animate__fadeInDown\n `\n // set todoLI id to todo id for easy deletion from storage\n todoLI.id = `${todo.id}`\n // 2. Creates a span for task text in LI\n const todoText = document.createElement('span');\n todoText.className = \"todo-list-task lead\";\n todoText.innerText = todo.task;\n\n // add task to LI\n todoLI.appendChild(todoText);\n\n // 3. Creates controls (mark done and remove) for LI\n const controls = UI.createControls(todo.id);\n\n todoLI.appendChild(controls);\n\n // check before adding if its done\n UI.markDone(todoLI, todo.isDone);\n\n // add TodoLI to list\n document.querySelector('#todo-list').prepend(todoLI);\n }", "title": "" }, { "docid": "1cf5e11f5277bafad8c5712ab4ce08f3", "score": "0.50133413", "text": "function createList(type, data) {\n caphPlayer.tracksList = $('<div/>', {\n id:type,\n class: 'track-list',\n }).appendTo(root_).hide();\n\n function createListItem(text, type) {\n var item = $('<div/>', {\n class:'list-item',\n focusable: '',\n 'data-focusable-depth':2\n }).on('selected', function() {\n setTracks(type, $(this).children('#itemText').text());\n $('#'+type).slideUp();\n $.caph.focus.controllerProvider.getInstance().setDepth(0);\n });\n $('<div/>', {\n id:'itemText',\n text: text,\n style:'position: absolute;left: 2px;'\n }).appendTo(item);\n $('<div/>', {\n id:type+'-'+text+'-'+'check',\n class:'fa fa-check check'\n }).appendTo(item);\n return item.appendTo(caphPlayer.tracksList);\n }\n\n for(var i in data) {\n createListItem(i, type);\n }\n }", "title": "" }, { "docid": "7b9f2d52f901200a76a5983b9a3718f2", "score": "0.50118744", "text": "function addToList(event) {\n event.preventDefault();\n // We will create a div to hold the todo item and the button\n const todoDiv = document.createElement('div');\n todoDiv.classList.add('todo');\n\n // We will create the li to hold the todo item\n const item = document.createElement('li');\n item.classList.add('todo-item');\n if ((input.value === '') || (start.value === '') || (end.value === '')) {\n alert(\"Please enter a task with start and end times. You cannot leave anything blank!\");\n } else {\n item.innerText = \"Task: \" + input.value;\n // We will create a list for teh start and end times\n const times = document.createElement('ul');\n times.classList.add(\"start-end\");\n\n const startTime = document.createElement('li');\n startTime.classList.add(\"startTime\");\n\n // We will call the change() method to shift the time to a 12 hr clock system\n startTime.innerText = \"Start: \" + change(start.value);\n\n const endTime = document.createElement('li');\n endTime.classList.add(\"endTime\");\n\n // We will call the change() method to shift the time to a 12 hr clock system\n endTime.innerText = \"End: \" + change(end.value);\n\n // We will put the start and end times into the ul\n times.appendChild(startTime);\n times.appendChild(endTime);\n\n // We will add these times into the list holding the task\n item.appendChild(times);\n\n // We will put the li inside of the div\n todoDiv.appendChild(item);\n // We will create the complete button\n const complete = document.createElement(\"button\");\n complete.innerHTML = '<i class= \"fas fa-check\"> Complete</i>'\n complete.classList.add(\"complete\");\n todoDiv.appendChild(complete);\n\n // We will create the complete button\n const remove = document.createElement(\"button\");\n remove.innerHTML = '<i class=\"fas fa-trash\"> Delete</i>';\n remove.classList.add(\"remove\");\n todoDiv.appendChild(remove);\n\n // We will append todoDiv to the constant 'list'\n list.appendChild(todoDiv);\n\n // We will clear out the bars\n input.value = \"\";\n start.value = \"\";\n end.value = \"\";\n }\n}", "title": "" }, { "docid": "8fa5a202fd46b1e00eb2aee9068d8965", "score": "0.5006369", "text": "initialize() {\n log.info('Creating List');\n\n this.getList();\n\n setInterval(() => this.getList(), ONE_HOUR);\n }", "title": "" }, { "docid": "481284ea8c3a2b3470611fbe2a21f402", "score": "0.5005411", "text": "add() {\n let newList = this.myList;\n newList.push({Name : \"\", JobType__c : \"\", key : Math.random().toString(36).substring(2, 15)});\n this.myList = newList;\n }", "title": "" }, { "docid": "bd7efafce28d80c7ddc5e274be6a75aa", "score": "0.5002586", "text": "function handleNewList() {\n newList();\n resetFrameIndex();\n setPlaying(false);\n }", "title": "" }, { "docid": "d062189ef585878e93e5765ae77e1b2f", "score": "0.50008243", "text": "function createList() {\n var storedNotes = localStorage.getItem(\"notes\");\n\n if (storedNotes) {\n\n var notesArray = JSON.parse(storedNotes),\n container = document.querySelector('.js-saved-notes'),\n emptyMessage = document.querySelector('.js-saved-notes--empty');\n\n // Create Elements\n var notesCollection = document.createDocumentFragment(),\n notesList = document.createElement('ul');\n\n notesList.classList.add('take-note__saved-list');\n\n emptyMessage.style.display = \"none\"; \n\n // Create Each List Item\n for (var index = 0; index < notesArray.length; index++) {\n\n var listItem = createListItem(notesArray, index);\n notesCollection.appendChild(listItem);\n }\n\n // Add notes in to list & add list in to container\n notesList.appendChild(notesCollection);\n container.appendChild(notesList);\n } \n}", "title": "" }, { "docid": "be0f53338dae194b004ec5ebf243f316", "score": "0.4998292", "text": "function taskListFramework(taskListTagIDs) {\n\t// Validate function arguments and set default values\n\ttaskListTagIDs = typeof taskListTagIDs !== 'undefined' ? taskListTagIDs : {};\n\ttaskListTagIDs.newTaskName = typeof taskListTagIDs.newTaskName !== 'undefined' ? taskListTagIDs.newTaskName : \"new-task-name\";\n\ttaskListTagIDs.taskList = typeof taskListTagIDs.taskList !== 'undefined' ? taskListTagIDs.taskList : \"task-list\";\n\t\n\tvar newTaskNameElement = document.getElementById(taskListTagIDs.newTaskName);\n\tvar taskListElement = document.getElementById(taskListTagIDs.taskList);\n\t\n\tnewTaskNameElement.addEventListener('keydown', keyEventNewTask, false);\n\t\n\t// Replace message that app requires JScript\n\tvar tlFooter = document.querySelectorAll('footer.tasklist')[0];\n\ttlFooter.innerHTML = \"Let's Do This\";\n\t\n\tfunction addListItem () {\n\t\t\n\t\tvar newTaskName = newTaskNameElement.value;\n\t\tif (newTaskName.trim() !== '') {\n\t\t\tvar li = document.createElement(\"li\");\n\t\t\tli.appendChild(document.createTextNode(newTaskName));\n\t//\t\tli.setAttribute(\"id\",liOrderNumber);\n\t\t\ttaskListElement.appendChild(li);\n\t\t}\n\t}\n\n\tfunction keyEventNewTask (e) {\n\n\t\t// add the new task to the list if the enter key is pressed\n\t\tvar key = e.which || e.keycode || e.key;\n\t\tif (key === 13) {\n\t\t\taddListItem();\n\t\t}\n\t}\n}", "title": "" }, { "docid": "366698e849682c9d0d1a3600c816dbed", "score": "0.49942505", "text": "function addToList(){\r\n //adds to local storage\r\n let textValue = textInput.value;\r\n let priorityValue = priority.value;\r\n let d = new Date();\r\n let dateValue = d.getTime();\r\n if (textValue === '') return;\r\n let listItemObject = {\r\n text : textValue,\r\n priority : priorityValue,\r\n date : dateValue,\r\n id : taskCounter\r\n }\r\n let listItemObjectFixed = JSON.stringify(listItemObject);\r\n localStorage.setItem(\"numberOfTasksGiven\", taskCounter);\r\n localStorage.setItem(`my-todo${taskCounter}`, listItemObjectFixed);\r\n taskCounter ++ ;\r\n localStorage.setItem('numberOfTasksGiven', taskCounter);\r\n const todoDiv = document.createElement('div'); //div of the list\r\n const newTodo = document.createElement('li'); //the content of the TODO\r\n newTodo.id = `${listItemObject.id}`;\r\n todoDiv.classList.add('todo-container');\r\n newTodo.classList.add('todo-list-container');\r\n newTodo.appendChild(todoDiv);\r\n const removeButton = document.createElement('button');//remove from list button\r\n removeButton.classList.add('remove-button');\r\n newTodo.appendChild(removeButton);\r\n removeButton.innerHTML = 'X';\r\n list.appendChild(newTodo);\r\n const todoText = document.createElement('div');\r\n const todoPriority = document.createElement('div');\r\n const todoCreatedAt = document.createElement('div');\r\n todoText.classList.add('todo-text');\r\n todoCreatedAt.classList.add('todo-created-at');\r\n todoPriority.classList.add('todo-priority');\r\n todoDiv.appendChild(todoPriority);\r\n todoDiv.appendChild(todoText);\r\n todoDiv.appendChild(todoCreatedAt);\r\n //prints to list\r\n todoPriority.innerText = priorityValue;\r\n todoText.innerText = textValue;\r\n todoCreatedAt.innerText = startTime(dateValue);\r\n textInput.value = ''; //clears input after adding to list\r\n numberOfToDos(); //counts the number of tasks\r\n newTodo.classList.add('drop');\r\n}", "title": "" }, { "docid": "dcd664b8e9dce5bff4304aa011214708", "score": "0.4989987", "text": "function createStatusTrackerObj() {\n var obj = new Object();\n obj.nextId = 1;\n obj.list = new Array();\n return obj;\n}", "title": "" }, { "docid": "3fde717b95df29b95964e034c37a3b1a", "score": "0.49884307", "text": "createItem(task)\n {\n const item = document.createElement('li');\n item.innerText = task;\n item.dataset.createDate = this.createTimestamp();\n\n this.addCheckbox(item);\n this.addRemoveTaskBtn(item);\n\n return item;\n }", "title": "" }, { "docid": "47ce6889c393f8416d922e47ef34c2bf", "score": "0.49854705", "text": "function createList(userId){\n\t\t$.post('/lists/'+ userId, {}, \n\t\t function(returnedData){\n\t\t}).fail(function(){\n\t\t \n\t\t});\n\t}", "title": "" }, { "docid": "c0ac3faff7620778f28dfaa3dac8065a", "score": "0.4979057", "text": "function AddListItem( trackname, trackpath ){\n var a = document.createElement( 'a' );\n var ol = document.getElementById( 'playlist' );\n var li = document.createElement( 'li' );\n var button = document.createElement( 'button' );\n\n trackname = trackname.replace( /%20/g, \" \" );\n //trackname = decodeURI( trackname );\n //trackname = unescape( trackname );\n\n // Delete button\n button.textContent = \"✕\";\n button.setAttribute( 'style', \"width:20%\" );\n button.classList.add( \"w3-bar-item\" );\n button.classList.add( \"w3-red\" );\n button.classList.add( \"w3-hover-pale-red\" );\n button.classList.add( \"w3-border\" );\n button.classList.add( \"w3-button\" );\n button.classList.add( \"w3-round\" );\n button.classList.add( \"btnDelete\" );\n\n // Track button\n a.textContent = trackname;\n a.setAttribute( 'href', trackpath );\n a.setAttribute( 'style', \"width:80%\" );\n a.classList.add( \"w3-bar-item\" );\n a.classList.add( \"w3-white\" );\n a.classList.add( \"w3-hover-blue\" );\n a.classList.add( \"w3-border\" );\n a.classList.add( \"w3-button\" );\n a.classList.add( \"w3-round\" );\n\n // list bar row\n li.classList.add( \"w3-bar\" );\n\n // Append nested elements\n li.appendChild( button ); // delete button\n li.appendChild( a ); // track button\n ol.appendChild( li );\n\n //console.log( newItem.TEXT_NODE );\n}", "title": "" }, { "docid": "03a37da57616e7ae89ab1b41ab4f92fb", "score": "0.4978876", "text": "createAList() {\n this.$validator.validateAll().then((result) => {\n if (result) {\n const listNames = this.allListNames.map(x =>\n x.toLowerCase());\n this.existingList = listNames.indexOf(this.listName.toLowerCase());\n if (this.existingList === -1) {\n if (this.listName === '') {\n this.emptyListError = true;\n } else {\n const requestdata = {\n name: this.listName.trim(),\n };\n const requestConfig = {};\n requestConfig.data = requestdata;\n this.manageProfileShoppingListService.createList(requestConfig, this.handleCreateListResponse, this.handleCreateListError);\n }\n } else if (this.listName !== '' && this.existingList > -1) {\n this.inlineError = true;\n }\n } else {\n this.globals.setFocusByName(this.$el, this.globals.getElementName(this.errors));\n }\n });\n }", "title": "" }, { "docid": "e8be299579a10fd2a1b2c0158fb68c3e", "score": "0.49777612", "text": "function newTask() {\n var li = document.createElement(\"li\");\n var inputValue = document.getElementById(\"input\").value;\n var t = document.createTextNode(inputValue);\n li.appendChild(t);\n if (inputValue === ''){\n alert(\"Input must not be empty\");\n }\n else {\n myTodoList.appendChild(li);\n\n chrome.storage.sync.get({tasks: []}, function(result) {\n var taskArr = result.tasks;\n \n taskArr.push(inputValue); // push a task to arr and add it to chrome storage\n chrome.storage.sync.set({\"tasks\": taskArr});\n \n // console.log('Tasks currently is/are now ' + taskArr);\n });\n\n }\n document.getElementById(\"input\").value = \"\"; // reset the input text box\n \n var span = document.createElement(\"SPAN\"); // create and append the X (close button)\n var txt = document.createTextNode(\"\\u00D7\"); // to the list element in HTML\n span.className = \"close\";\n span.title = inputValue;\n span.appendChild(txt);\n li.appendChild(span);\n \n // call helper function containing a loop that adds handler to all X buttons\n addCloseHandlers();\n }", "title": "" }, { "docid": "13c4489d5d2581b8633fd2a7bf9f7b03", "score": "0.49727374", "text": "function createListNew() {\n $('#listAllNew').empty();\n localStorageNew.forEach(function(item, index) {\n addItemListNew(item.code);\n });\n $('#listAllNew').listview('refresh');\n}", "title": "" }, { "docid": "4599ddc342fb0a90f421907ca2f81e95", "score": "0.49713844", "text": "function insertNewWatching() {\n var title = document.getElementById(\"title\").value;\n var date = document.getElementById(\"date\").value;\n var description = document.getElementById(\"description\").value;\n if (title == \"\" || date == \"\") {\n return;\n }\n var event = {\n 'summary': title,\n 'description': description,\n 'colorId': '4',\n 'start': {\n 'dateTime': date + 'T19:30:00+02:00'\n },\n 'end': {\n 'dateTime': date + 'T21:30:00+02:00'\n }\n };\n console.log(event);\n\n var request = gapi.client.calendar.events.insert({\n 'calendarId': '9ggc9012bj31v20ru00q4a36as@group.calendar.google.com',\n 'resource': event\n });\n\n request.execute(function (event) {\n //appendPre('Event created: ' + event.htmlLink);\n listWatchingHistory();\n });\n}", "title": "" }, { "docid": "cf86df3ff80da52d784f7275c4cf8077", "score": "0.49687365", "text": "createFileSystemWatcher(globPattern, ignoreCreate, ignoreChange, ignoreDelete) {\n let watchmanPath = false ? undefined : this.getWatchmanPath();\n let channel = watchmanPath ? this.createOutputChannel('watchman') : null;\n let promise = watchmanPath ? watchman_1.default.createClient(watchmanPath, this.root, channel) : Promise.resolve(null);\n let watcher = new fileSystemWatcher_1.default(promise, globPattern, !!ignoreCreate, !!ignoreChange, !!ignoreDelete);\n return watcher;\n }", "title": "" }, { "docid": "b63f9164f276f8535b5073837fec05f2", "score": "0.4962756", "text": "function createObject(userInput) {\n list.push(userInput);\n}", "title": "" }, { "docid": "c7454854f8cdab1f0e291d25c0bf406c", "score": "0.4959036", "text": "function addItem(taskName, taskDescription, taskDeadline, taskCategory, isHighlighted){\n var item = {name: taskName, description: taskDescription, deadline: taskDeadline, category: taskCategory, timestamp: new Date().toDateString(), complete: false, highlighted: isHighlighted};\n var listDom = document.getElementById('todo-list');\n\n listObjects.push(item);\n listDom.innerHTML += makeHTML(item);\n\n updateSavedList();\n closeItemCreator();\n}", "title": "" }, { "docid": "3f547bc442f5438b8c1c2a9efc0d5cf2", "score": "0.4958179", "text": "function addNewTodoListItem(id, value){\n var newTodoItem = new TodoItem(id, value);\n $('#todo-list').append(newTodoItem.getDomTemplate());\n }", "title": "" }, { "docid": "4959b496b47cd76d97afa66edfd2ec6d", "score": "0.49571863", "text": "function createAndAddNoteToList(input) {\r\n if (input) {\r\n //CREATE LI ELEMENT FOR NOTE\r\n const li = document.createElement('li');\r\n const p = document.createElement('p');\r\n p.style.display = 'inline'\r\n p.innerHTML = input;\r\n li.appendChild(p);\r\n\r\n \r\n //CREATE SPAN ELEMENT FOR EDIT\r\n const spanEdit = document.createElement('span');\r\n spanEdit.classList.add('edit');\r\n spanEdit.textContent = 'Edit';\r\n spanEdit.style.color = 'blue';\r\n spanEdit.style.paddingLeft = '10px';\r\n spanEdit.style.cursor = 'pointer';\r\n\r\n //CREATE SPAN ELEMENT FOR DELETE\r\n const spanDelete = document.createElement('span');\r\n spanDelete.textContent = 'Delete';\r\n spanDelete.classList.add('delete');\r\n spanDelete.style.color = 'red';\r\n spanDelete.style.paddingLeft = '10px';\r\n spanDelete.style.cursor = 'pointer';\r\n\r\n li.appendChild(spanEdit);\r\n li.appendChild(spanDelete);\r\n notes.appendChild(li);\r\n showAlert('Note added', 'green');\r\n } else {\r\n showAlert('Enter note before saving', 'red');\r\n }\r\n}", "title": "" }, { "docid": "cc4b4630a7577c1fb61f521fcb5f1117", "score": "0.49473247", "text": "function addNewList(element) {\n\n\tlet title = element.value;\n\tif (title.length > 2) {\n\t\t//alert(\"Die Liste \" + title + \" wird angelegt.\");\n\n\t\tmyFetch('secure/list', {title: title}, \"POST\")\n\t\t\t.then(function (data) {\n\t\t\t\tgetLitsts();\n\t\t\t\telement.value = \"\";\n\t\t\t}) // JSON from `response.json()` call\n\t\t\t.catch(error => console.error(error));\n\t}\n}", "title": "" }, { "docid": "4c7f2f6d4d1a30153e88e71ef45f9707", "score": "0.49470982", "text": "function createActivity(activityValue) {\n var li = document.createElement('li');\n li.innerHTML = activityValue + \"<button class=\\\"trash\\\"><i class=\\\"far fa-trash-alt\\\"></i></button><button class=\\\"check\\\"><i class=\\\"far fa-check-square\\\"></i></button>\";\n toDoList.appendChild(li);\n var trash = li.querySelector('.trash');\n trash.addEventListener('click', removeActivity);\n var check = li.querySelector('.check');\n check.addEventListener('click', markActivity);\n checkVisibility();\n }", "title": "" }, { "docid": "c12682d3712cf42f28d47c32e599c66c", "score": "0.49443966", "text": "addWatcher(watcher)\n {\n this._watchers = this._watchers || [];\n this._watchers.push(watcher);\n }", "title": "" }, { "docid": "b876a0da1c9afc093e288ae636e7d409", "score": "0.49430186", "text": "addChat(listId) {\n let ul = document.createElement(\"UL\");\n ul.id = \"lista_discussione_\" + listId;\n ul.className = \"whisp\";\n document.getElementById('discussione').appendChild(ul);\n }", "title": "" }, { "docid": "dc5eea3c6d521d318d9d77f51c63b7f9", "score": "0.49392006", "text": "function createListElement() {\n\tvar li = document.createElement(\"li\");\n\tli.appendChild(document.createTextNode(input.value));\n\tul.appendChild(li);\n\tinput.value = \"\";\n\n//create a delete button and strikethrough for all new items.\n\tcreateButton();\n\n}", "title": "" } ]
a90c25685fbb1eec8224912ca7aba7e5
SHOWING / HIDING MODULES
[ { "docid": "ce9556a82a9fe59abfb4ee68e3dd2a1a", "score": "0.0", "text": "function initModules() {\n\tshowModule(\"TrackStatus\");\n\t$(document.querySelector(\"html\")).keypress(function(event) {\n\t\tif (event.keyCode == 47) {\n\t\t\t$(\"#track-search\").focus();\n\t\t\tevent.preventDefault();\n\t\t}\n\t});\n\t$(\"#execution-start-time\").timepicker({step: 5}).val(\"00:00\");\n}", "title": "" } ]
[ { "docid": "6775188c9aa3c349aa2d82c2c52215e9", "score": "0.69653493", "text": "function hideAllModules() {\n for (var i = 0; i < document.getElementsByClassName(\"modules\").length; i++) {\n document.getElementsByClassName(\"modules\")[i].style.display = \"none\";\n }\n}", "title": "" }, { "docid": "840ed6603613a312695aea20ce8ff826", "score": "0.67713237", "text": "function displayModules(){\n\tfor (i = 0; i <= modules.length-1; i++){\n\t\tif (modules[i].timer > 0){\n\t\t\tmodules[i].display();\n\t\t}\n\t}\n}", "title": "" }, { "docid": "7d0321060f0171012429789651cec518", "score": "0.65316886", "text": "hide() {\n this.document.getElementById(\"panta.module\").addClass(\"hidden\");\n }", "title": "" }, { "docid": "2160cf4f55acbcc0fb7081294d88eda0", "score": "0.63672835", "text": "function leftPanelShowModule() {\n if ($scope.node) {\n main.leftPanelTab = 1;\n }\n }", "title": "" }, { "docid": "f16cac03418f72c21fe4d1c5dff2d7b5", "score": "0.63394356", "text": "displayMenu() {\n\t\tdocument.querySelectorAllBEM(\".menu__item\", \"menu\").removeMod(\"hide\");\n\t}", "title": "" }, { "docid": "c1be5c0923e1a5e7922cd0083eecedb1", "score": "0.6235704", "text": "function displayModule() {\n // check if modules list is not null\n if (modules !== null) {\n\n // check for index out of bounds\n if (index >= 0 && index < modules.length) {\n const moduleToShow = modules[index];\n\n // empty the page container and populate with the new module\n $moduleContainer.empty();\n const moduleToShowType = createModule(moduleToShow);\n $moduleContainer.append(moduleToShowType.toHTML());\n\n // handle index out of bounds\n } else {\n if (index < 0) {\n index = modules.length - 1;\n displayModule();\n } else if (index >= modules.length) {\n index = 0;\n displayModule();\n }\n }\n\n // catch if modules list is empty\n } else {\n index = 0;\n console.log(\"modules is null\");\n }\n}", "title": "" }, { "docid": "c34de418757d1481400d3f8870a2f061", "score": "0.62284344", "text": "function processShowModuleInfo(parsed, ctx) {\n var options = ctx.options;\n var minfo = ctx.metaInfo;\n\n console.log(\"modinfo\", minfo);\n\n return {\n app: \"browse\",\n textStream: [minfo.exportNS, minfo.globalNS],\n };\n}", "title": "" }, { "docid": "8c8f6ac711b4ab4e059a516d42d65379", "score": "0.6195718", "text": "function showMod() {\n modWindow.style.display = modWindow.style.display == \"none\" ? \"inline\" : \"none\";\n}", "title": "" }, { "docid": "bdc0f4ec56d4ca53c7d3a4dbddf546f0", "score": "0.61776656", "text": "function showAll() {\n\t$(\".moduleContent\").show();\n\t$(\".action_min\").show();\n\t$(\".action_max\").hide();\n\t$(\"#expd\").hide();\n\t$(\"#clps\").show();\n}", "title": "" }, { "docid": "62b78e9ecf6283c418e09d77ac821c14", "score": "0.6054681", "text": "function moduleDidLoad() {\n // The module is not hidden by default so we can easily see if the plugin\n // failed to load.\n common.hideModule();\n}", "title": "" }, { "docid": "5e8f649caa6ae6c82c8e6fcf64d5cdb8", "score": "0.6048022", "text": "function showAll() {\r\n\t$(\".moduleContent\").show();\r\n\t$(\".action_min\").show();\r\n\t$(\".action_max\").hide();\r\n\t$(\"#expd\").hide();\r\n\t$(\"#clps\").show();\r\n}", "title": "" }, { "docid": "fa28003c84bc429aab2a3c28925824c4", "score": "0.6015288", "text": "function setModules(data) {\n _.filter(data, function (item) {\n var isHidden = false;\n if ($scope.getHiddenApps().indexOf(item.moduleName) > -1) {\n if ($scope.user.role !== 1) {\n isHidden = true;\n } else {\n isHidden = ($scope.user.expert_view ? false : true);\n }\n\n }\n if (item.category !== 'surveillance') {\n isHidden = true;\n }\n\n if (!isHidden) {\n $scope.modules.ids.push(item.id);\n $scope.modules.imgs[item.id] = item.icon;\n return item;\n }\n });\n }", "title": "" }, { "docid": "6c944ce3cdcccd57e794756d4a6b78d8", "score": "0.6011372", "text": "function hide_tools() {\n dojo.byId(\"tools_full\").style.visibility = \"hidden\"; \n dojo.byId(\"tools_view_info\").style.visibility = \"hidden\"; \n dojo.byId(\"tools_save_info\").style.visibility = \"hidden\";\n dojo.byId(\"tools_save_view\").style.visibility = \"hidden\"; \n dojo.byId(\"tools_info\").style.visibility = \"hidden\";\n dojo.byId(\"tools_view\").style.visibility = \"hidden\";\n dojo.byId(\"tools_save\").style.visibility = \"hidden\";\n }", "title": "" }, { "docid": "e84c39566968195d9e79d0e174f9b364", "score": "0.6010724", "text": "function currentModule() {\r\n\t\t$('#ang-popModuleIcon').hide();\r\n\t\tvar clicked = false;\r\n\t\t$('#ang-moduleIcon a').click(function() {\r\n\t\t\tvar clicked = true;\r\n\t\t\t$('#ang-popModuleIcon').toggle();\r\n\t\t\tif (clicked == true) {\r\n\t\t\t$('#ang-popModuleIcon').delay(15000).fadeOut(1500);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t});\r\n\t\t// Hide pop out if user clicks away from it\r\n\t\t$('body, #ang-notificationIcon a, #ang-login a').click(function() {\r\n\t\t\t$('#ang-popModuleIcon').hide();\r\n\t\t});\r\n\t\t\r\n\t}", "title": "" }, { "docid": "02241b08331f32f1ab0abfe99b9a006a", "score": "0.59822434", "text": "function simpleShell(){\n qsa(\"main > section\")[1].classList.toggle(\"hidden\");\n qsa(\"main > section\")[2].classList.toggle(\"hidden\");\n }", "title": "" }, { "docid": "ee207cc4a907293e48a137df54cf59ed", "score": "0.5899866", "text": "function prepModule() {\r\n\t$(\".tabs\",this).Tabs();\r\n\t$(\"a.local\",this).LocalLink();\r\n\t$(\"a.tab\",this).TabLink();\r\n\t$(\"a[href^=http]\",this).attr(\"target\",\"_blank\");\r\n\t$(\"a[rel=new]\",this).attr(\"target\",\"_blank\");\r\n\r\n\t$(this).slideDown();\r\n}", "title": "" }, { "docid": "3dbbacbc57421ed628787ce00a728ac3", "score": "0.5883197", "text": "function showGroupsAndUsers() {\n //print with details about users\n groupFuncs.printGroups(true);\n indexFuncs.mainMenu();\n}", "title": "" }, { "docid": "cd0c14a09a3e5ec8aafa3a756a3b62e0", "score": "0.5871822", "text": "function showCodeTab() {\n onAbout(false);\n onSettings(false);\n showHints();\n }", "title": "" }, { "docid": "861d01e9cb9f21342d0630bffa6b4183", "score": "0.5869397", "text": "function toggleModule(moduleName, display)\r\n{\r\n var moduleTd = getNode(\"//td[contains(text(),'\" + moduleName + \"')]\");\r\n\r\n if (moduleTd && moduleTd.singleNodeValue)\r\n {\r\n var parentNode = moduleTd.singleNodeValue.parentNode;\r\n\t\t\r\n\t\t// toggle table row display\r\n parentNode.style.display = display ? 'none' : '';\r\n\t\t\r\n\t\t// toggle line separator\r\n parentNode.nextSibling.nextSibling.style.display = display ? 'none' : '';\r\n }\r\n}", "title": "" }, { "docid": "badc40c220ff6dccbe06b67d6e65de41", "score": "0.586093", "text": "function turnOnOffModules(){\n\tmodulesLoaded = false;\n for (i = 1; i < 4; i++) { \n if(savedModulesArray.indexOf(i) !== -1){\n $('#cm' + i).show();\n $('#cm' + i + 'Switch').bootstrapToggle('on');\n }\n else {\n $('#cm' + i ).hide();\n $('#cm' + i + 'Switch').bootstrapToggle('off');\n }\n }\n \n for (i = 0; i < 4; i++) { \n j = i + 3;\n if(savedModulesArray.indexOf(j) !== -1){\n $('#pm' + i).show();\n $('#pm' + i + 'Switch').bootstrapToggle('on');\n }\n else {\n $('#pm' + i ).hide();\n $('#pm' + i + 'Switch').bootstrapToggle('off');\n }\n }\n \n checkHeadings();\n modulesLoaded = true;\n}", "title": "" }, { "docid": "4baef3080b75218462133ad6ddefd39d", "score": "0.5853041", "text": "function ReplaceModule() {\n\tif (!this.id) return;\n\tvar i = this.id;\n\tvar x = $(\".module:visible\",c2);\n\t$(\".action_close\",x).mousedown();\n\tvar m = _modules[i];\n\tc2.addModule({id:i,\n\t\t\t\ttitle:m.t || this.innerHTML,\n\t\t\t\turl:m.l,\n\t\t\t\tcolor:m.c||null});\n\treturn false;\n}", "title": "" }, { "docid": "51ffa7cf8a7330399eb100257525b99b", "score": "0.58493894", "text": "function showHiddenProgramsByUrl() {\n\tvar showHidden = loadPageVar(\"showhidden\");\n\tif (showHidden) {\n\t\tsetup.showHidden = showHidden;\n\t\tif (showHidden === true) {\n\t\t\tvar hiddenPrograms = document.getElementsByClassName(\"ohjelma hidden\");\n\t\t\tfor (var i = 0; i < hiddenPrograms.length; i++) {\n\t\t\t\thiddenPrograms[i].className = hiddenPrograms[i].className + \" show\";\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "c852116801fa872e930526e8de159139", "score": "0.5846017", "text": "function hideElements() {\n $(\"nav\").addClass(\"hidden\");\n $(\"#progressbar\").addClass(\"shrunk\");\n $(\"#chapters\").addClass(\"shrunk\");\n $(\"#playPauseButtons\").addClass(\"hidden\");\n $(\"#video-title\").addClass(\"hidden\");\n $(\"#helpmesee\").addClass(\"hidden\");\n $(\"#time\").addClass(\"hidden\");\n }", "title": "" }, { "docid": "eae14785bf4f041e95b858dfe6bfac44", "score": "0.58405906", "text": "function openAdditionalModules() {\n $(this).parent().find('.modulesType-additionalBlock').toggleClass('openAddBlock');\n $(this).find('.openAdd').toggleClass('rotateAdd');\n}", "title": "" }, { "docid": "73524d9fae13653e7d8690f8f1509fb2", "score": "0.58234245", "text": "hideLinks() {\n this.$appMenu.hide();\n this.$pageArea.find('[page_id]').hide();\n this.$sysMenu.find(\"a[href='#profile']\").hide();\n this.$sysMenu.find(\"a[href='#logout']\").hide();\n }", "title": "" }, { "docid": "e9c7cc7948367ddf5af3d7783fcf5db9", "score": "0.58174145", "text": "hideMoreGamesButton() {\n const { store } = privates.get(this);\n const { vhost } = store.getState();\n store.dispatch((vhost.GFSDK_MENU_TYPE === 'extended') ? Actions.hideMenuList() : Actions.hideMenu());\n }", "title": "" }, { "docid": "8df40d6bf5b46d8659d62840f1c39c3f", "score": "0.5810362", "text": "showLinks() {\n if (this.$appMenu.find('[app_id]').length > 1) {\n this.$appMenu.show();\n }\n this.$pageArea.find('[page_id]').show();\n this.$sysMenu.find(\"a[href='#profile']\").show();\n this.$sysMenu.find(\"a[href='#logout']\").show();\n }", "title": "" }, { "docid": "f86ce09f9c47e0706a4fa419e7aa963b", "score": "0.5795698", "text": "function show_hidden(prefix) {\n document.getElementById(prefix + '_activator').style.display = 'none';\n document.getElementById(prefix + '_deactivator').style.display = 'block';\n document.getElementById(prefix + '_data').style.display = 'block';\n }", "title": "" }, { "docid": "b6141596cf4603228d0b100ab17d0311", "score": "0.5790372", "text": "function antiTamper(){\n\n app.spinnerType = 'module';\n let moduleHeaders;\n\n if (sessionStorage.getItem(\"app.module.headers\") === null) {\n app.moduleLoad('home');\n }\n\n moduleHeaders = JSON.parse(sessionStorage.getItem('app.module.headers'));\n \n if(moduleHeaders.hasOwnProperty('data') == false){\n app.moduleLoad('home');\n };\n\n if(moduleHeaders.data.hasOwnProperty('device') == false){\n app.moduleLoad('home');\n };\n }", "title": "" }, { "docid": "970f493e0e5f99d343b0893bc5d70a1f", "score": "0.5787921", "text": "function ShowUserGuide() { bind.ShowUserGuide(); }", "title": "" }, { "docid": "2a2ad20e2d6204a7e75efcabfa9c6f3a", "score": "0.57779324", "text": "function hideHelpPage () {\n\t globals.loopable = false;\n document.getElementById('helpPage').classList.add('hide');\n }", "title": "" }, { "docid": "2a2ad20e2d6204a7e75efcabfa9c6f3a", "score": "0.57779324", "text": "function hideHelpPage () {\n\t globals.loopable = false;\n document.getElementById('helpPage').classList.add('hide');\n }", "title": "" }, { "docid": "75cd1593d14155dda098527b282953c7", "score": "0.57609373", "text": "static get DS_HIDDEN() { return 0; }", "title": "" }, { "docid": "75cd1593d14155dda098527b282953c7", "score": "0.57609373", "text": "static get DS_HIDDEN() { return 0; }", "title": "" }, { "docid": "d2c61044ea492f1a4a9cb49348dec702", "score": "0.5753961", "text": "function dm_ext_hideAllSubmenus(d_mi){_dmsm(d_mi);}", "title": "" }, { "docid": "7dd5da74b43f6a893c8e961c55021888", "score": "0.5714454", "text": "function loadStaticModules(){\n\t$(\".module\", \"#main\").each(function(){\n\t\tvar p = this.id.split(\"#\");\t//e.g., m101#t1\n\t\t$.extend(this, {\n\t\t\tid: p[0],\n\t\t\ttab: p[1],\n\t\t\turl: _modules[p[0]].l,\n\t\t\tloaded: true\n\t\t});\n\t\t$(\"#header_tabs li#\" + p[1])[0].modules[p[0]] = this;\n\t\twidgetize.apply(this)\n\t})\n}", "title": "" }, { "docid": "26f7d3f6274268e863cfcd26d448a71e", "score": "0.57136446", "text": "listModules () {\n return this.execute('GET', '/module')\n }", "title": "" }, { "docid": "e7457c8be946ca8a8a40ac1903b3e430", "score": "0.57011724", "text": "function minimalControls() {\n hide('editorPaneT');\n show('settingsPaneT');\n hide('outputPaneT');\n}", "title": "" }, { "docid": "edd7f0dc3b0e5f7d8d87b0af7cc3f71c", "score": "0.5699264", "text": "fwk_app_on_hide() {\n console.log('hide: ' + this.fwk_app_name);\n }", "title": "" }, { "docid": "2f27e9c03e1735e20865677d51db344a", "score": "0.5695714", "text": "function contributeLoader() {\n if (!isContrib) {\n $(\"#more_tab\").remove();\n }\n}", "title": "" }, { "docid": "085b90de130ebe9f882faa7fcae2757e", "score": "0.5687637", "text": "function displayhisto(){\n $('.globalhisto').toggleClass('disparait');\n }", "title": "" }, { "docid": "21fa5d6e4db3109c51bac23234731275", "score": "0.5677806", "text": "hideMenu() {\n\t\tdocument.querySelectorAllBEM(\".menu__item\", \"menu\").addMod(\"hide\");\n\t}", "title": "" }, { "docid": "4e90557365d38455d0f72212a894e8a3", "score": "0.5675539", "text": "function dm_ext_hideAllSubmenus(dbp){dboq(dbp);}", "title": "" }, { "docid": "52f98f34231c39c7b380c0f8168bd0dc", "score": "0.56740916", "text": "restrictVisibility() {\n\n\t\t// Tokens\n\t\tfor ( let t of canvas.tokens.placeables ) {\n\t\t\tt.visible = ( !this.tokenVision && !t.data.hidden ) || t.isVisible;\n\t\t}\n\n\t\t// Door Icons\n\t\tfor ( let d of canvas.controls.doors.children ) {\n\t\t\td.visible = !this.tokenVision || d.isVisible;\n\t\t}\n\n\t\t// Dispatch a hook that modules can use\n\t\tHooks.callAll(\"sightRefresh\", this);\n\t}", "title": "" }, { "docid": "c3c6dd000e9580855c909831a430f065", "score": "0.5668989", "text": "function lunbofun() {\n for (var i=0;i<ul.children.length - 1;i++){\n ul.children[i].style.display='none';\n }\n ul.children[n].style.display='block';\n }", "title": "" }, { "docid": "e087b55c7fac2cb00f558dcc18dcb287", "score": "0.5667856", "text": "function setupModule() {\n controller = mozmill.getBrowserController();\n nodeCollector = new domUtils.nodeCollector(controller.window.document);\n kt = new ktas.Ktas(controller);\n \ncontroller.window.maximize();\n\n tabs.closeAllTabs(controller);\n}", "title": "" }, { "docid": "cdcfeb73a4ad1d6fb27789fad1963d85", "score": "0.5667613", "text": "function ToggleOnline ()\n\t{\n\t\tif ( this.ShowAll )\n\t\t{\n\t\t\t/* Collapse everything\n\t\t\t */\n\t\t\tthis.HTMLOnline.style.display = 'none';\n\t\t\tthis.HTMLShowAll.style.display = 'none';\n\t\t\tthis.HTMLOffline.style.display = 'none';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* Expand what is enabled\n\t\t\t */\n\t\t\tthis.HTMLOnline.style.display = 'block';\n\t\t\tif ( this.ShowOffline )\n\t\t\t\tthis.HTMLOffline.style.display = 'block';\n\t\t\t/* Display the \"show all\" button\n\t\t\t */\n\t\t\tvar itemnames = ( new VBArray( this.Items.Keys() ) ).toArray();\n\t\t\tvar i;\n\t\t\tfor ( i = 0; i < itemnames.length; ++i )\n\t\t\t\tif ( ! this.Roster.Items( itemnames[i] ).Resources.Count )\n\t\t\t\t\tbreak;\n\t\t\tif ( i < itemnames.length )\n\t\t\t\tthis.HTMLShowAll.style.display = 'inline';\n\t\t}\n\t\tthis.ShowAll = ! this.ShowAll;\n\t\tthis.HTMLHeader.title = external.globals( 'Translator' ).Translate( 'main', 'tt-group-' + ( this.ShowAll ? 'hide' : 'show' ) );\n\t}", "title": "" }, { "docid": "51adeaf04369899369481d280f293bdc", "score": "0.56629485", "text": "function kToolsModule(){}", "title": "" }, { "docid": "726d0772ce3b7c846189d6f3b8569177", "score": "0.56567794", "text": "function hideAndShowElements() {\n // Hide in desktop and show in mobile trending topics\n hideTrendingText();\n\n // Clean grid search results\n searchResultsGifs.innerHTML = \"\";\n\n // Show grid\n showSearchActive();\n}", "title": "" }, { "docid": "9f3403066e75e95c601bc7e3833b627c", "score": "0.56525564", "text": "function showHideSettings(show) {\n document.getElementById(\"headerTitle\").innerHTML = show ? \"Settings\" : \"Console\"\n showHide(\"divSettings\", show)\n showHide(\"btnSaveSettings\", show)\n showHide(\"btnCancelSettings\", show)\n showHide(\"btnPresetAscii\", show)\n showHide(\"btnPresetLsPs\", show)\n showHide(\"btnPresetDefault\", show)\n showHide(\"btnPresetDeep\", show)\n showHide(\"btnPresetFlat\", show)\n showHide(\"ulConsole\", !show)\n showHide(\"btnOpenSettings\", !show)\n showHide(\"btnClear\", !show)\n showHide(\"btnInsert10\", !show)\n showHide(\"btnInsert100\", !show)\n showHide(\"btnQueryAll1By1\", !show)\n showHide(\"btnQueryAll10By10\", !show)\n}", "title": "" }, { "docid": "8f39e56d1ad5dc654e6a04af128c81b8", "score": "0.5645318", "text": "function hideAllChildren(){\n uki.map( screens, function(screen){\n screen.visible(false);\n });\n }", "title": "" }, { "docid": "fd1a5e157716b8ec4d51ba3cba6d64eb", "score": "0.5644127", "text": "function minMenuShow() {\n\t\t$('#list-menu-catalog').show();\n\t}", "title": "" }, { "docid": "db70aa6aaa78809d058d78c06677c8f5", "score": "0.56323874", "text": "function disengageCurrentMode() {\n Edgar.util.showhide([],['button_vetting','button_future']);\n\n}", "title": "" }, { "docid": "6bfc8de7274f80e6beb0926b298d7d9b", "score": "0.5631996", "text": "function showMe() {\n var idEnd = getIdnumber(event);\n var node = document.getElementById('div'+ idEnd);\n node.style.visibility = 'visible';\n //closes others nodes already open\n for (var z = 1; z <= displayedMethods.length; z++) {\n var otherNodes = document.getElementById('div' + z);\n var condition = (node.id !== otherNodes.id && otherNodes.style.visibility === 'visible');\n if (condition) {\n otherNodes.style.visibility = 'hidden';\n }\n }\n}", "title": "" }, { "docid": "da6d393ae2681485096e2c72126126ed", "score": "0.5631798", "text": "hide () {}", "title": "" }, { "docid": "d22756b1599ea1acc24b2f3017d41106", "score": "0.56203216", "text": "function hideNoLongerUsefulComponents() {\n $(\".order\").hide();\n $(\".cheesecake_quantity_and_topping_table\").hide();\n $(\".notes\").hide();\n $(\".notes_label\").hide();\n }", "title": "" }, { "docid": "042a101f735a0dfaae7f40afe942bf0d", "score": "0.5619186", "text": "hideInfo() {\n this._debug('hideInfo');\n this._uppy.hideInfo();\n this._toggleInfo(false);\n }", "title": "" }, { "docid": "da183965203b763696bc3aa64340f2ff", "score": "0.5616758", "text": "function hideEveryone(){\n\t\tfor (let node of graphComponent.graph.nodes.toArray()) {\n\t\t\tgraphComponent.graph.setStyle(node, getNodeStyleForHiding());\n\t\t\thideLabels(node);\n\t\t}\n\t\tfor (let edge of graphComponent.graph.edges.toArray()) {\n\t\t\tgraphComponent.graph.setStyle(edge, getEdgeStyleForHiding());\n\t\t\thideLabels(edge);\n\t\t}\n\t}", "title": "" }, { "docid": "1d82be18737bebb60595cc8416e02f9e", "score": "0.56130785", "text": "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}", "title": "" }, { "docid": "598894ad08850f268aa9887e24f1d526", "score": "0.5612827", "text": "function dm_ext_hideAllSubmenus(mInd){_dmsm(mInd);}", "title": "" }, { "docid": "5f48a768d4c96a9f85d8f1bfc217109d", "score": "0.56076807", "text": "function showAdvancedWindows(){\n console.log(self.productObj['availableWindows']);\n self.advancedWindowDiv.classed('hidden', !self.advancedWindowDiv.classed('hidden'))\n // plot traces of all windows\n self.drawTraces(mode = 'all');\n\n }", "title": "" }, { "docid": "2085db85931e4fd0f22e25b93a867123", "score": "0.5605264", "text": "function hideNonExportableElements(){\n\t d3.selectAll(\".hidden-in-export\").style(\"display\", \"none\");\n\t }", "title": "" }, { "docid": "85a867be4c9d6d28d54c2eb395337146", "score": "0.5588643", "text": "function showLess(){\n\t\t\t c = \"block\"; d = \"none\";\n\t\t\t texts = \"Interested\";\n\t\t\t booled = true;\n\t\t}", "title": "" }, { "docid": "12098bd8d5f12d86fda7ecbacd1a65d5", "score": "0.55817974", "text": "function hideHeaderOption() {\n\t\t\tvar html = _.template('<p><strong>Minimal Mode</strong></p><label id=\"basis-hide-header-option\" for=\"basis-hide-header\" style=\"display:none;\"><input type=\"checkbox\" id=\"basis-hide-header\" name=\"basis-hide-header\" value=\"1\" <%= hideHeaderChecked %> /> <%- hideHeaderLabel %></label>', basisHTMLBuilderData),\n\t\t\t\t$loadAfter = $('#menu_order', cache.$pageParentDiv).parent(); // Grabs the \"Order\" input bounding \"p\" element\n\n\t\t\t$loadAfter.after(html);\n\t\t\tcache.$basishideheader = $('#basis-hide-header-option');\n\t\t}", "title": "" }, { "docid": "d20c6cc8faef16653ec1015870837fb8", "score": "0.55807966", "text": "function hideModels(){\n\tnetscape.security.PrivilegeManager.enablePrivilege(\"UniversalXPConnect\");\n\t\n\tvar allModels = window.zinxProject.Models;\n\tfor (var i=0; i< allModels.length; i++){\n\t if (allModels[i] != null){\n\t allModels[i].hide();\n\t }\n\t}\n}", "title": "" }, { "docid": "dd986ff21471a9bbe7d2c704948bfb3d", "score": "0.55804294", "text": "function hide () {\n if (!adminId) {\n document.getElementById('playback').style.display = 'none'\n document.getElementById('nonAdmin').innerHTML = 'Let the Host Sync the Beat!'\n document.getElementById('playbackSearch').style.display = 'none'\n }\n}", "title": "" }, { "docid": "4b3ea19a56e16e60c98d6dc46d61825f", "score": "0.5575776", "text": "function hide_everything(){\n hide_sidebar();\n hide_search();\n}", "title": "" }, { "docid": "0aceb92c4b94abcac040a3bda429d33e", "score": "0.55732656", "text": "function showHideButtons(){\n $block.on('mouseenter', function(){\n self.$toolbar.show();\n }).on('mouseleave', function(){\n self.$toolbar.hide();\n });\n }", "title": "" }, { "docid": "383e61067ecffc1ee950fd3f163ec080", "score": "0.5568833", "text": "function showNonContextButtons(type) {\n\tvar currentId = window.localStorage.getItem(\"divIdGlobal\");\n\tif ($('#headerShare' + currentId).length > 0) {\n\t\t$('#headerShare' + currentId).show();\n\t}\n\t// use this part if you want to show buttons in action bars of which the buttons do not apply to every page\n\tif ($('#headerOtherButton' + currentId).length > 0 && type !== \"somethingOtherThenPanel\") {\n\t\t$('#headerOtherButton' + currentId).show();\n\t}\n}", "title": "" }, { "docid": "383e61067ecffc1ee950fd3f163ec080", "score": "0.5568833", "text": "function showNonContextButtons(type) {\n\tvar currentId = window.localStorage.getItem(\"divIdGlobal\");\n\tif ($('#headerShare' + currentId).length > 0) {\n\t\t$('#headerShare' + currentId).show();\n\t}\n\t// use this part if you want to show buttons in action bars of which the buttons do not apply to every page\n\tif ($('#headerOtherButton' + currentId).length > 0 && type !== \"somethingOtherThenPanel\") {\n\t\t$('#headerOtherButton' + currentId).show();\n\t}\n}", "title": "" }, { "docid": "71adab0248a023851a3b1d71734cd7bc", "score": "0.55681854", "text": "function showMainOptions() {\n enableMainOptions();\n show(mainOptions);\n }", "title": "" }, { "docid": "9d3bd3645177db4cda1d6b561035e987", "score": "0.5568022", "text": "function toggleFinishedModules()\r\n{\r\n hideFinishedModules = !hideFinishedModules;\r\n\r\n try\r\n {\r\n var cell = document.getElementById('switchcell');\r\n if (cell)\r\n cell.innerHTML = hideFinishedModules ? showAllModulesText : hideFinishedModulesText;\r\n\r\n for (i = 0; i < finishedModules.length; i++)\r\n {\r\n toggleModule(finishedModules[i], hideFinishedModules);\r\n }\r\n }\r\n catch(e) {\r\n if (debug) alert(e.message);\r\n }\r\n}", "title": "" }, { "docid": "2459faafd1e3753679bdd703bf3e2be4", "score": "0.556739", "text": "function hideAllMenusNF()\n{\n\tlogDeprecatedMethodUse(versioning[0],\"\");\n\tif(showingPopup)\n\t\treturn;\n\thidePopup();\n\tcurrentMenu=null;\n\tfor(var i = 0; i < openMenus.length; i++)\n\t{\n\t\tvar om = getElement(openMenus[i]);\n\t\tif(om)\n\t\t\tom.style.display = \"none\";\n\t}\n\topenMenus = new Array();\n}", "title": "" }, { "docid": "22cceb4fd4a918220c8ee1f6e0c47763", "score": "0.55636656", "text": "function hideMlt() {\n\t\t$U.mediaCard.MoreLikeThisController.hideMoreLikeThis();\n\t}", "title": "" }, { "docid": "6eadab9eab6e62f4dd0b8c9cd6d94779", "score": "0.5560843", "text": "function hide_shown(prefix) {\n document.getElementById(prefix + '_activator').style.display = 'block';\n document.getElementById(prefix + '_deactivator').style.display = 'none';\n document.getElementById(prefix + '_data').style.display = 'none';\n }", "title": "" }, { "docid": "5362a3f83beda2bdd7a9a4daa064b038", "score": "0.5559348", "text": "function hideHelp() {\n\tif (user.get(\"log\") != \"\") {\n\t\tdocument.getElementById(\"help\").style.display = \"none\";\n\t}\n}", "title": "" }, { "docid": "afc4556cc8e130b05050afcdbcfb6fa0", "score": "0.55579245", "text": "hideControls() {}", "title": "" }, { "docid": "181a41e1ec929a0a0fcced55a188b109", "score": "0.55567896", "text": "function hideNonExportableElements() {\n\t\td3.selectAll(\".hidden-in-export\").style(\"display\", \"none\");\n\t}", "title": "" }, { "docid": "a1adadb6d294ac652afb0ab7a95bfbc4", "score": "0.55524373", "text": "function hide_includes(){\n hide_div('#show_parent');\n hide_div('#show_child');\n}", "title": "" }, { "docid": "8291ea17d9394ec6f63657274fa8d70c", "score": "0.55474174", "text": "function ls1mcs_pages_show_main() {\n $(\"#pages > div\").hide();\n $(\"#main-tabs\").show();\n}", "title": "" }, { "docid": "3076da770c2e8b6c512fbf6dd5c1189c", "score": "0.55459934", "text": "function toggleNodes() {\n const nodes = tgNodes;\n const fullscreenElement =\n document.fullscreenElement ||\n document.mozFullScreenElement ||\n document.webkitFullscreenElement;\n if (nodes && nodes.length > 0) {\n nodes.forEach(node => {\n node.style.display = fullscreenElement ? \"block\" : \"none\";\n });\n }\n const pip = document.getElementById(constants.PIP_BTN_ID);\n pip.style.display = fullscreenElement ? \"none\" : \"flex\";\n}", "title": "" }, { "docid": "27b0fbe1ae6ffd4fc5561b8f0dc2ee41", "score": "0.5536689", "text": "function displayModOnly() {\n document.getElementById(\"chatroom-field\").value = roomName;\n var modList = \"\"\n for (i in mods) {\n modList += mods[i] + \" \"\n }\n document.getElementById(\"mod-field\").value = modList.trim();\n $(\".mod-only\").show();\n }", "title": "" }, { "docid": "f23c445a5104e2d1a6981c9364de8931", "score": "0.55282795", "text": "hide() {\n this.sendAction('hide');\n }", "title": "" }, { "docid": "6e43e49bc24660bd2e11d5795d2396ec", "score": "0.55252206", "text": "function displayHelpPage () {\n document.getElementById('helpPage').classList.remove('hide');\n }", "title": "" }, { "docid": "561840a630f18e123af35576dcdfdc95", "score": "0.5517529", "text": "function showContextMenu(elem, module_data) {\n\n let id = elem.id();\n\n data_room = id.substring(id.lastIndexOf(\"_\"));\n data_room = data_room.replace('_', '');\n data_module = id.slice(0, id.indexOf(\"_\"));\n\n let pluginMenu = [{\n label: 'Allumer / Ouvrir',\n icon: 'resources/app/images/icons/activate.png',\n click: () => {\n module_data = {\n name: data_module,\n room: data_room,\n user: Config.modules.sonoff.devices[data_room][data_module].user,\n password: Config.modules.sonoff.devices[data_room][data_module].password,\n ip: Config.modules.sonoff.devices[data_room][data_module].ip,\n icone: Config.modules.sonoff.devices[data_room][data_module].icone,\n set: true\n };\n get_module(module_data, Config.default.client);\n mute_Client(Config.default.client);\n }\n },\n {\n label: 'Eteindre / Fermer',\n icon: 'resources/app/images/icons/desactivate.png',\n click: () => {\n module_data = {\n name: data_module,\n room: data_room,\n user: Config.modules.sonoff.devices[data_room][data_module].user,\n password: Config.modules.sonoff.devices[data_room][data_module].password,\n ip: Config.modules.sonoff.devices[data_room][data_module].ip,\n icone: Config.modules.sonoff.devices[data_room][data_module].icone,\n set: false\n };\n get_module(module_data, Config.default.client);\n mute_Client(Config.default.client);\n }\n },\n {\n type: 'separator'\n },\n {\n label: 'Sauvegarder',\n icon: 'resources/app/images/icons/save.png',\n click: () => {\n Avatar.Interface.onAvatarClose(0, function() {\n let module_data = {\n \"name\": data_module,\n \"room\": data_room\n };\n saveModuleNode(module_data, elem);\n if (debug) info(elem.id() + ' sauvegardé !');\n })\n }\n },\n {\n label: 'Effacer',\n icon: 'resources/app/images/icons/trash.png',\n click: () => {\n cyto.removeGraphElementByID(elem.id());\n if (debug) info(elem.id() + ' à été éffacé !');\n }\n }\n ];\n\n // Création du menu\n var handler = function(e) {\n e.preventDefault();\n menu.popup({\n window: remote.getCurrentWindow()\n });\n window.removeEventListener('contextmenu', handler, false);\n }\n const menu = Menu.buildFromTemplate(pluginMenu);\n window.addEventListener('contextmenu', handler, false);\n }", "title": "" }, { "docid": "b37c15c4bdc33f23b82dccf34fd75737", "score": "0.5513855", "text": "function hideMainOptions() {\n hide(mainOptions);\n }", "title": "" }, { "docid": "616285e689d19c94131738a7694204e1", "score": "0.5509477", "text": "launchModule(inModuleName) {\n\n // Let the currently active module, if any, de-activate.\n if (wxPIM.activeModule) {\n wxPIM.modules[wxPIM.activeModule].deactivate();\n }\n\n // Record the new active module.\n wxPIM.activeModule = inModuleName;\n\n // Hide sidemenu.\n $$(\"sidemenu\").hide();\n\n // Set header text to reflect which module we're using.\n $$(\"headerLabel\").setValue(inModuleName);\n\n // Set flags to indicate not editing an existing item.\n wxPIM.editingID = null;\n wxPIM.isEditingExisting = false;\n\n // Switch the multiview to the module and show the module's summary view.\n $$(`module${inModuleName}-itemsCell`).show();\n $$(`module${inModuleName}-container`).show();\n\n // Refresh data for the module to show their lists of items.\n wxPIM.modules[inModuleName].refreshData();\n\n // Finally, call the module's activate() handler.\n wxPIM.modules[inModuleName].activate();\n\n }", "title": "" }, { "docid": "0bf8ee746e55601844af1d4914b162e7", "score": "0.5496838", "text": "function hideLayers() {\n\tvar ref = new ActionReference();\n\tref.putEnumerated(cTID('Lyr '), cTID('Ordn'), cTID('Trgt'));\n\tvar list = new ActionList();\n\tlist.putReference(ref);\n\tvar desc = new ActionDescriptor();\n\tdesc.putList(cTID('null'), list);\n\texecuteAction(cTID('Hd '), desc, DialogModes.NO);\n}", "title": "" }, { "docid": "6ed78f504b146225def96c56505bba66", "score": "0.549589", "text": "function spanAdmin() {\n\tdocument.getElementById(\"myAdmin\").style.display = \"none\";\n }", "title": "" }, { "docid": "c2572f77aee1ffab578fe486f2e5eb0c", "score": "0.5490189", "text": "function showHideActionsPanel() {\n\n\t\tvar $actionButton;\n\t\tvar $items;\n\n\t\t// modal thumbs view: check if any tasks checkboxes are cheched\n\t\t$items = parent.find('input.dn_task_check:checked').first();\n\t\t//$actionButton = $('button#dn_actions_btn_copy, button#dn_actions_btn');\n\t\t$actionButton = $('button#dn_actions_btn_copy');\n\n\t\t// if current selections, show actions button\n\t\tif ($items.length) $actionButton.removeClass('dn_hide').fadeIn('slow');\n\t\t// else hide actions burron\n\t\telse $actionButton.fadeOut('slow').addClass('dn_hide');\n\n\t}", "title": "" }, { "docid": "e77ff776de4a8baceb4d63dbdc904fa6", "score": "0.5482831", "text": "hideAll() {\n $('#commonVerbsTabContent').addClass('is-hidden');\n $('#commonPhrasesTabContent').addClass('is-hidden');\n $('#falseFriendsTabContent').addClass('is-hidden');\n }", "title": "" }, { "docid": "045cbf80c70f432e55c83543b05bd69c", "score": "0.547667", "text": "showBJSPGMenu() {\r\n var headings = document.getElementsByClassName('category');\r\n for (var i = 0; i < headings.length; i++) {\r\n headings[i].style.visibility = 'visible';\r\n }\r\n }", "title": "" }, { "docid": "042dabe8a33789ce58aad81a285ff48a", "score": "0.5476415", "text": "function showOptions() {\n\t\tbuyrent.classList.add('hide');\n\t\twho.classList.remove('hide');\n\t}", "title": "" }, { "docid": "bc3383db0318f6e5a4d3e192fd4efe09", "score": "0.5475387", "text": "function showPrintingToolsTab() {\n }", "title": "" }, { "docid": "90215871d26c84f899420918814920e8", "score": "0.54728603", "text": "function showEverything() {\n // ARIA: Show all the things\n var children = document.body.children;\n\n for (var i = 0; i < children.length; i++) {\n var child = children[i]; // Restore the previous aria-hidden value\n\n child.setAttribute('aria-hidden', child._previousAriaHidden || 'false');\n }\n }", "title": "" }, { "docid": "89fd246b903de88c1859d0d09a822265", "score": "0.547227", "text": "function showEls() {\n $section.show();\n }", "title": "" }, { "docid": "7e550401eace446d21cb6e997554bf38", "score": "0.54717433", "text": "hideLoadSeedNodePopup() {\n this.loadSeedIsVisible = false;\n }", "title": "" }, { "docid": "0f17cccafde1d856a898a542c1863bf4", "score": "0.5470106", "text": "function hideNonExportableElements(){\n d3.selectAll(\".hidden-in-export\").style(\"display\", \"none\");\n }", "title": "" }, { "docid": "f1a84dc5deee773c56d0a3022eb18e98", "score": "0.5468854", "text": "function showModulesCtrl($scope, ModuleFactory, SubjectFactory, ActiveUserFactory) {\n\tSubjectFactory.getSubjects().then(function(subjects) {\n\t\t$scope.subjects = cleanResults(subjects);\n\t}, function(error) {\n\t\tsendError(error);\n\t});\n\n\tModuleFactory.getModules().then(function(modules) {\n\t\t$scope.modules = cleanResults(modules);\n\t}, function(error) {\n\t\tsendError(error);\n\t});\n\t$scope.isAuthorised = function() {\n\t\treturn ActiveUserFactory.isAuthorised(\"module\");\n\t};\n\t$scope.canEdit = function (id) {\n\t\treturn ActiveUserFactory.canEdit(id, \"module\");\n\t};\n\t$scope.canDeblockContent = function () {\n\t\treturn ActiveUserFactory.canDeblockContent();\n\t};\n\t$scope.canDelete = function (id) {\n\t\treturn ActiveUserFactory.canDelete(id, \"module\");\n\t};\n\n $scope.canDeblockCriticalModule = function () {\n console.log(ActiveUserFactory.canDeblockCriticalModule());\n return ActiveUserFactory.canDeblockCriticalModule();\n }\n}", "title": "" }, { "docid": "2dc7e3eccaa985442369444677aa2591", "score": "0.5468826", "text": "function optionsScreen(){\n qsa(\"main > section\")[0].classList.toggle(\"hidden\");\n qsa(\"main > section\")[1].classList.toggle(\"hidden\");\n }", "title": "" }, { "docid": "c00a79574f23b484aacb01b478cc5a4a", "score": "0.5466476", "text": "function showUnauthPage() {\n renderItem(\".unauth-item\");\n hideItem(\".auth-item\");\n hideItem(\".view\");\n hideItem(\"#chat-tab\");\n}", "title": "" } ]
1eb0c71cba83932fa4670f4490441169
funcion para mostrar el mapa de una sucursal (con una marca)
[ { "docid": "bbd5f76d751c7789baa9ec8d0c1bf6e9", "score": "0.6659694", "text": "function mostrarMapa(latitud,longitud){\n\n\n\tmap = new GMaps({\n el: '#map',\n lat: latitud,\n lng: longitud,\n width: '700px',\n height: '300px'\n });\n map.addMarker({\n lat: latitud,\n lng: longitud\n });\n \n $('#modal_mapa').openModal();\n\t\n}", "title": "" } ]
[ { "docid": "ed1df5fb3a5081646cf9310a119c918e", "score": "0.7218878", "text": "function mostrar_mapa() {\n\t//MOSTRAMOS AL USUARIO EL MAPA \n\tdocument.getElementById(\"mapa\").style.visibility = \"visible\";\n\t//LE AÑADIMOS AL MISMO ELEMENTO LA POSICION DISPLAY_BLOCK\n\tdocument.getElementById(\"mapa\").style.display = \"block\";\n\n\t/*GUARDAMOS EL TITULO EN UNA VARIABLE*/\n\tvar elemento = document.getElementById(\"titulo\").innerHTML;\n\n\t//NOS DIRIGIMOS A LA FUNCION CAMBIAR_ELEMENTO(ELEMENTO)\n\tcambiar_mapa(elemento);\n\n\n}", "title": "" }, { "docid": "f8bcccd5f33e127d2cdf8f68128e6b29", "score": "0.7145802", "text": "function mostrarMarcadores(indice) {\n var markerIndex = markers[indice];\n for (var i = 0; i < markerIndex.length; i++) {\n markerIndex[i].setMap(mapa);\n }\n}", "title": "" }, { "docid": "f9b4af1f8f51d789d2aa0a970d425411", "score": "0.6935591", "text": "function showMapAirport() {\n\n // Elimina el mapa si estubiera inicializado\n if (g3 != null) {\n g3.remove();\n }\n //Declaramos variables \n var paisesAero;\n\n var puertoF = aeropuertos;\n\n var filtro = puertoF.dimension(function (d) {\n return d.pais;\n });\n\n var paises = filtro.group();\n paisesAero = paises_con_Aeropuerto(paises);\n\n // Se crea el mapa para la seccion g3 \n\n g3 = L.map('mapAeropuerto').setView([40.889815, 0.023551], 1.6);\n\n L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {\n maxZoom: 18,\n minZoom: 0.3,\n attribution: 'Map data &copy; <a href=\"https://www.openstreetmap.org/\">OpenStreetMap</a> contributors, ' +\n '<a href=\"https://creativecommons.org/licenses/by-sa/2.0/\">CC-BY-SA</a>, ' +\n 'Imagery © <a href=\"https://www.mapbox.com/\">Mapbox</a>',\n id: 'mapbox.outdoors'\n }).addTo(g3);\n\n\n // control that shows state info on hover\n var info = L.control();\n\n info.onAdd = function (g3) {\n this._div = L.DomUtil.create('div', 'info');\n this.update();\n return this._div;\n };\n\n info.update = function (props) {\n // console.log(paisesAero);\n //console.log(props);\n var result;\n var numero;\n if (props != undefined) { //Carga paises\n result = paisesAero.find(obj => {\n return obj.key === props.name\n })\n }\n if (result == null) { //No ha podido cargar pais \n numero = -1;\n } else {\n numero = result.value;\n }\n // console.log(result);\n this._div.innerHTML = '<h4>Mapamundi</h4>' + (props ?\n '<b>' + props.name + '</b><br /> Numero Aeropuertos: ' + numero :\n 'Sitúa el ratón en un pais');\n };\n\n info.addTo(g3);\n\n\n // get color depending on population density value\n function getColor(d) {\n return d > 400 ? '#800026' :\n d > 200 ? '#FD8D3C' :\n d > 100 ? '#BD0026' :\n d > 40 ? '#FC4E2A' :\n d > 20 ? '#FD8D3C' :\n d > 10 ? '#FEB24C' :\n d < 0 ? '#717171' :\n '#FFEDA0';\n }\n //Estilo del borde de las provs :D\n function style(jsonAeropuertos) {\n // JSON.stringify(jsonAeropuertos);\n //console.log(jsonAeropuertos);\n var result;\n var color\n result = paisesAero.find(obj => {\n return obj.key === jsonAeropuertos.properties.name\n })\n // console.log(result);\n if (result == null) {\n // console.log(\"hola\");\n color = getColor(-1);\n } else {\n color = getColor(result.value);\n }\n\n // console.log(result);\n return {\n weight: 2,\n opacity: 1,\n color: 'purple',\n dashArray: '5',\n //Relleno de las provs\n fillOpacity: 0.8,\n\n //PRUEBAS\n //fillColor: getColor(jsonCasos.casos)\n fillColor: color\n };\n }\n //Color del borde en función de donde este el ratón\n function highlightFeature(e) {\n var layer = e.target;\n\n layer.setStyle({\n weight: 5,\n color: '#000',\n dashArray: '',\n fillOpacity: 0.7\n });\n\n if (!L.Browser.ie && !L.Browser.opera && !L.Browser.edge) {\n layer.bringToFront();\n }\n\n info.update(layer.feature.properties);\n }\n\n var geojson;\n\n function resetHighlight(e) {\n geojson.resetStyle(e.target);\n info.update();\n }\n\n function zoomToFeature(e) {\n g3.fitBounds(e.target.getBounds());\n \n }\n\n function onEachFeature(feature, layer) {\n layer.on({\n mouseover: highlightFeature,\n mouseout: resetHighlight,\n click: zoomToFeature\n });\n }\n\n // load GeoJSON from an external file\n $.getJSON(\"./js/Mapa/paises.json\", function (data) {\n // console.log(paisesAero);\n geojson = L.geoJson(data, {\n style: style,\n jsonAeropuertos: paisesAero,\n onEachFeature: onEachFeature\n }).addTo(g3);\n });\n\n g3.attributionControl.addAttribution('Population data &copy; <a href=\"http://census.gov/\">US Census Bureau</a>');\n\n //Create de legend of the map\n var legend = L.control({\n position: 'bottomright'\n });\n\n legend.onAdd = function (g3) {\n\n var div = L.DomUtil.create('div', 'info legend'),\n grades = [-1, 0, 10, 20, 40, 100, 200, 400],\n labels = [],\n from, to;\n labels.push('Codigo Aeropuertos: ');\n for (var i = 0; i < grades.length; i++) {\n\n from = grades[i];\n to = grades[i + 1];\n\n labels.push(\n '<i style=\"background:' + getColor(grades[i]) + '\"> </i> ' +\n from + (to ? '&ndash;' + to : '+'));\n }\n\n div.innerHTML = labels.join('<br>');\n return div;\n };\n\n legend.addTo(g3);\n\n function paises_con_Aeropuerto(filter) {\n var f = eval(filter);\n if (typeof (f.length) != \"undefined\") {} else {}\n if (typeof (f.top) != \"undefined\") {\n f = f.top(Infinity);\n } else {}\n if (typeof (f.dimension) != \"undefined\") {\n f = f.dimension(function (d) {\n return \"\";\n }).top(Infinity);\n } else {}\n // console.log(\"Aqui va:\");\n paisesAero = JSON.stringify(f).replace(\"[\", \"[\\n\\t\").replace(/}\\,/g, \"},\\n\\t\").replace(\"]\", \"\\n]\");\n // console.log(paisesAero);\n paisesAero = JSON.parse(paisesAero);\n return paisesAero;\n //console.log(paisesAero);\n\n }\n\n }", "title": "" }, { "docid": "cdf1cc5f92032bbc89f7980f0ffde49f", "score": "0.6888616", "text": "function Mostrarmapa(option){\n var proy=option.target.id;\n //console.info(proy);\n switch(proy){\n case 'val15': \n map.setLayoutProperty('municipios_fill','visibility','visible');\n map.setLayoutProperty('municipios_border','visibility','visible');\n map.setLayoutProperty('municipios_fill2','visibility','none');\n map.setLayoutProperty('municipios_border2','visibility','none');\n map.setLayoutProperty('municipios_fill3','visibility','none');\n map.setLayoutProperty('municipios_border3','visibility','none');\n leyenda64.style.display='none';\n leyenda15_64.style.display='none';\n leyenda15.style.display='block';\n break;\n case 'val15_64':\n map.setLayoutProperty('municipios_fill','visibility','none');\n map.setLayoutProperty('municipios_border','visibility','none');\n map.setLayoutProperty('municipios_fill2','visibility','visible');\n map.setLayoutProperty('municipios_border2','visibility','visible');\n map.setLayoutProperty('municipios_fill3','visibility','none');\n map.setLayoutProperty('municipios_border3','visibility','none');\n leyenda64.style.display='none';\n leyenda15_64.style.display='block';\n leyenda15.style.display='none';\n break;\n case 'val_64':\n map.setLayoutProperty('municipios_fill2','visibility','none');\n map.setLayoutProperty('municipios_border2','visibility','none');\n map.setLayoutProperty('municipios_fill','visibility','none');\n map.setLayoutProperty('municipios_border','visibility','none');\n map.setLayoutProperty('municipios_fill3','visibility','visible');\n map.setLayoutProperty('municipios_border3','visibility','visible');\n leyenda64.style.display='block';\n leyenda15_64.style.display='none';\n leyenda15.style.display='none';\n break; \n };\n \n }", "title": "" }, { "docid": "8e75d5793c8d501ae68a43977e7f6a5e", "score": "0.68257844", "text": "function cargarMapa() {\n // create a map in the \"map\" div, set the view to a given place and zoom\n map = L.map('map',\n {center: ll,\n zoom: 15,\n contextmenu: true,\n contextmenuWidth: 140,\n contextmenuItems: [{\n text: 'Coordenadas',\n callback: showCoordinates\n }, {\n text: 'Centrar mapa aqui',\n callback: centerMap\n }, '-', {\n text: 'Acercar',\n callback: zoomIn\n }, {\n text: 'Alejar',\n callback: zoomOut\n }]\n\n\n }).setView([-12.0, -77.0], 8);\n // add an OpenStreetMap tile layer\n L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {\n attribution: '&copy; <a href=\"http://geosolution.pe\">Geosolution</a> '\n }).addTo(map);\n\n\n}", "title": "" }, { "docid": "3d859c5822b2607b86cbd62a78e81da6", "score": "0.6801697", "text": "function makeMap(jsonGrafica, patron, valorGrafica, flag) {\r\n\r\n var a = ''; // para referenciar si la url tiene año\r\n var m = ''; // para referenciar si la url tiene mes\r\n var d = ''; // para referenciar si la url tiene dia\r\n var tamValorGrafica = valorGrafica.length;\r\n var mapBox = $('.map-img');\r\n var jsonObj = false;\r\n var mapString = \"\";\r\n jsonObj = jsonGrafica;\r\n\r\n if (typeof JSON != 'object') {\r\n alert(\"Please enter a valid JSON response string.\");\r\n return;\r\n } else if (!jsonObj.chartshape) {\r\n alert(\"No map elements\");\r\n return;\r\n }\r\n\r\n mapString = \"<map name='archivo-timeline'>\";\r\n var area = false;\r\n var chart = jsonObj.chartshape;\r\n var count = 0;\r\n for (var i = 0; i < chart.length; i++) {\r\n\r\n area = chart[i];\r\n\r\n if (i>tamValorGrafica) {\r\n\r\n if (flag === 'a') {\r\n a = valorGrafica[count]['etiqueta'];\r\n }\r\n\r\n if (flag === 'am') {\r\n a = valorGrafica[count]['anio'];\r\n m = valorGrafica[count]['etiqueta'];\r\n }\r\n\r\n if (flag === 'amd') {\r\n a = valorGrafica[count]['anio'];\r\n m = valorGrafica[count]['mes'];\r\n d = valorGrafica[count]['etiqueta'];\r\n }\r\n\r\n mapString += \"\\n <area name='\" + area.name + \"' shape='\" + area.type\r\n + \"' coords='\" + area.coords.join(\",\") + \"' href=\\\"\"+requestUrl+\"/intranet/contenido/busqueda?busqueda=\"+patron+\"&a=\"+a+\"&m=\"+m+\"&d=\"+d+\"\\\" title=''>\";\r\n\r\n count ++;\r\n\r\n }else{\r\n\r\n mapString += \"\\n <area name='\" + area.name + \"' shape='\" + area.type\r\n + \"' coords='\" + area.coords.join(\",\") + \"' title=''>\";\r\n }\r\n }\r\n mapString += \"\\n</map>\";\r\n mapBox.append(mapString);\r\n}", "title": "" }, { "docid": "e6cf12d63f38fe6741928db1a2357e21", "score": "0.6745172", "text": "function verTodosMapa(){\n document.getElementById('divMapa').style.display = 'block'; \n\n initMap();\n\n var locations = [];\n console.log('Arreglo: ');\n console.log(returnArr);\n for(i in returnArr){\n var objUbicacion = returnArr[i][returnArr[i].length - 1];\n var latitud = objUbicacion.lat;\n var longitud = objUbicacion.lng;\n var lugar = [returnArr[i].key, latitud, longitud, i];\n locations.push(lugar);\n }\n console.log('Local: ');\n console.log(locations);\n\n var centro = {\n lat: locations[0][1],\n lng: locations[0][2]\n };\n map = new google.maps.Map(\n document.getElementById('map'), {\n zoom: 20,\n center: centro\n });\n\n var infowindow = new google.maps.InfoWindow();\n\n var marker, i;\n\n for (i = 0; i < locations.length; i++) { \n marker = new google.maps.Marker({\n position: new google.maps.LatLng(locations[i][1], locations[i][2]),\n map: map,\n id: locations[i][3],\n });\n\n google.maps.event.addListener(marker, 'click', (function(marker, i) {\n return function() {\n infowindow.setContent(locations[i][0]);\n infowindow.open(map, marker);\n }\n })(marker, i));\n }\n}", "title": "" }, { "docid": "bbe6ea7c86da356d205ad5039553e7c7", "score": "0.6710356", "text": "function showMapAerolineas() {\n\n // Elimina el mapa de la seccion g4 si estubiera creado\n if (g4 != null) {\n g4.remove();\n }\n\n\n\n // Definimos variables \n var paisesAerolinea;\n\n var aerolineF = aerolineas;\n\n //Filtramos por aerolinea activa \n var filtro2 = aerolineF.dimension(function (d) {\n if (d.activo == \"Y\") {\n return d.pais;\n } else return \"\";\n });\n\n var paises = filtro2.group();\n\n paisesAerolinea = paises_con_Aerolinea(paises);\n\n // Se crea el mapa para la seccion g4\n\n g4 = L.map('mapAerolineas').setView([40.889815, 0.023551], 1.6);\n\n L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {\n maxZoom: 18,\n minZoom: 0.3,\n attribution: 'Map data &copy; <a href=\"https://www.openstreetmap.org/\">OpenStreetMap</a> contributors, ' +\n '<a href=\"https://creativecommons.org/licenses/by-sa/2.0/\">CC-BY-SA</a>, ' +\n 'Imagery © <a href=\"https://www.mapbox.com/\">Mapbox</a>',\n id: 'mapbox.outdoors'\n }).addTo(g4);\n\n\n // control that shows state info on hover\n var info = L.control();\n\n info.onAdd = function (g4) {\n this._div = L.DomUtil.create('div', 'info');\n this.update();\n return this._div;\n };\n\n info.update = function (props) {\n // console.log(paisesAero);\n //console.log(props);\n var result;\n var numero;\n if (props != undefined) { //Carga paises\n result = paisesAerolinea.find(obj => {\n return obj.key === props.name\n })\n }\n if (result == null) { //No ha podido cargar pais \n numero = -1;\n } else {\n numero = result.value;\n }\n // console.log(result);\n this._div.innerHTML = '<h4>Mapamundi</h4>' + (props ?\n '<b>' + props.name + '</b><br /> Numero Aerolineas: ' + numero :\n 'Sitúa el ratón en un pais');\n };\n\n info.addTo(g4);\n\n\n // get color depending on population density value\n function getColor(d) {\n return d > 30 ? '#800026' :\n d > 25 ? '#FD8D3C' :\n d > 20 ? '#BD0026' :\n d > 15 ? '#FC4E2A' :\n d > 10 ? '#FD8D3C' :\n d > 5 ? '#FEB24C' :\n d < 0 ? '#717171' :\n '#FFEDA0';\n }\n //Estilo del borde de las provs :D\n function style(jsonAeropuertos) {\n // JSON.stringify(jsonAeropuertos);\n //console.log(jsonAeropuertos);\n var result;\n var color\n result = paisesAerolinea.find(obj => {\n return obj.key === jsonAeropuertos.properties.name\n })\n // console.log(result);\n if (result == null) {\n // console.log(\"hola\");\n color = getColor(-1);\n } else {\n color = getColor(result.value);\n }\n\n // console.log(result);\n return {\n weight: 2,\n opacity: 1,\n color: 'purple',\n dashArray: '5',\n //Relleno de las provs\n fillOpacity: 0.8,\n\n //PRUEBAS\n //fillColor: getColor(jsonCasos.casos)\n fillColor: color\n };\n }\n //Color del borde en función de donde este el ratón\n function highlightFeature(e) {\n var layer = e.target;\n\n layer.setStyle({\n weight: 5,\n color: '#000',\n dashArray: '',\n fillOpacity: 0.7\n });\n\n if (!L.Browser.ie && !L.Browser.opera && !L.Browser.edge) {\n layer.bringToFront();\n }\n\n info.update(layer.feature.properties);\n }\n\n var geojson;\n\n function resetHighlight(e) {\n geojson.resetStyle(e.target);\n info.update();\n }\n\n function zoomToFeature(e) {\n g4.fitBounds(e.target.getBounds());\n /*console.log(e.target.getBounds());\n map.setView(e.target.getBounds(), 13);\n */\n }\n\n function onEachFeature(feature, layer) {\n layer.on({\n mouseover: highlightFeature,\n mouseout: resetHighlight,\n click: zoomToFeature\n });\n }\n\n // load GeoJSON from an external file\n $.getJSON(\"./js/Mapa/paises.json\", function (data) {\n // console.log(paisesAero);\n geojson = L.geoJson(data, {\n style: style,\n jsonAeropuertos: paisesAerolinea,\n onEachFeature: onEachFeature\n }).addTo(g4);\n });\n\n g4.attributionControl.addAttribution('Population data &copy; <a href=\"http://census.gov/\">US Census Bureau</a>');\n\n\n var legend = L.control({\n position: 'bottomright'\n });\n\n legend.onAdd = function (g4) {\n\n var div = L.DomUtil.create('div', 'info legend'),\n grades = [-1, 0, 5, 10, 15, 20, 25, 30],\n labels = [],\n from, to;\n labels.push('Codigo Aeropuertos: ');\n for (var i = 0; i < grades.length; i++) {\n\n from = grades[i];\n to = grades[i + 1];\n\n labels.push(\n '<i style=\"background:' + getColor(grades[i]) + '\"> </i> ' +\n from + (to ? '&ndash;' + to : '+'));\n }\n\n div.innerHTML = labels.join('<br>');\n return div;\n };\n\n legend.addTo(g4);\n\n function paises_con_Aerolinea(filter) {\n var f = eval(filter);\n if (typeof (f.length) != \"undefined\") {} else {}\n if (typeof (f.top) != \"undefined\") {\n f = f.top(Infinity);\n } else {}\n if (typeof (f.dimension) != \"undefined\") {\n f = f.dimension(function (d) {\n return \"\";\n }).top(Infinity);\n } else {}\n // console.log(\"Aqui va:\");\n paisesAerolinea = JSON.stringify(f).replace(\"[\", \"[\\n\\t\").replace(/}\\,/g, \"},\\n\\t\").replace(\"]\", \"\\n]\");\n //console.log(paisesAerolinea);\n paisesAerolinea = JSON.parse(paisesAerolinea);\n return paisesAerolinea;\n //console.log(paisesAero);\n\n }\n\n }", "title": "" }, { "docid": "d7cc3e8d64a378d214722a22791a329e", "score": "0.6706489", "text": "function marcarMapa(mapa, posicion) {\n\n let nuevaMarca = new google.maps.Marker({\n position: posicion,\n map: mapa\n });\n\n let infoPosicion = new google.maps.InfoWindow({\n content: \"Latitud: \" + posicion.lat() + \"<br>Longitud: \" + posicion.lng()\n });\n\n infoPosicion.open(mapa, nuevaMarca);\n\n }", "title": "" }, { "docid": "7fa3d88afec14a76b31b0230235c0c77", "score": "0.66067344", "text": "function verTodosMapa(){\n document.getElementById('divMapa').style.display = 'block'; \n\n initMap();\n\n var locations = [];\n console.log('Arreglo: ');\n console.log(returnArr);\n for(i in returnArr){\n var latitud = returnArr[i].lat;\n var longitud = returnArr[i].lng;\n var lugar = [returnArr[i].nombre, latitud, longitud, i];\n locations.push(lugar);\n }\n console.log('Local: ');\n console.log(locations);\n\n var centro = {\n lat: locations[0][1],\n lng: locations[0][2]\n };\n map = new google.maps.Map(\n document.getElementById('map'), {\n zoom: 20,\n center: centro\n });\n\n var infowindow = new google.maps.InfoWindow();\n\n var marker, i;\n\n for (i = 0; i < locations.length; i++) { \n marker = new google.maps.Marker({\n position: new google.maps.LatLng(locations[i][1], locations[i][2]),\n map: map,\n id: locations[i][3],\n });\n\n google.maps.event.addListener(marker, 'click', (function(marker, i) {\n return function() {\n infowindow.setContent(locations[i][0]);\n infowindow.open(map, marker);\n }\n })(marker, i));\n }\n}", "title": "" }, { "docid": "f7c404d39c5141b1d5eb7771965275c7", "score": "0.6592569", "text": "function mostrarRuta(){\n coordenadas = [\n {lng:-73.13738, lat:6.55988},\n {lng:-73.13725, lat:6.55981},\n {lng:-73.13724, lat:6.5598},\n {lng:-73.13693, lat:6.55955},\n {lng:-73.13678, lat:6.55945},\n {lng:-73.13663, lat:6.55934},\n {lng:-73.13644, lat:6.55919},\n {lng:-73.13624, lat:6.55903},\n {lng:-73.13589, lat:6.55876},\n {lng:-73.13555, lat:6.55849},\n {lng:-73.1352, lat:6.55826},\n {lng:-73.13485, lat:6.55802},\n {lng:-73.13461, lat:6.55789},\n {lng:-73.13438, lat:6.55775},\n {lng:-73.13394, lat:6.55751},\n {lng:-73.13351, lat:6.55727},\n {lng:-73.13323, lat:6.55709},\n {lng:-73.13294, lat:6.55691},\n {lng:-73.1325, lat:6.5567},\n {lng:-73.13205, lat:6.55649},\n {lng:-73.13228, lat:6.55612},\n {lng:-73.13252, lat:6.55575},\n {lng:-73.1329, lat:6.55597},\n {lng:-73.13329, lat:6.5562},\n {lng:-73.1336, lat:6.55642},\n {lng:-73.13391, lat:6.55663},\n {lng:-73.13432, lat:6.55689},\n {lng:-73.13474, lat:6.55714},\n {lng:-73.13496, lat:6.55677},\n {lng:-73.13518, lat:6.5564},\n {lng:-73.13539, lat:6.55654},\n {lng:-73.1356, lat:6.55668},\n {lng:-73.13539, lat:6.55705},\n {lng:-73.13518, lat:6.55741},\n {lng:-73.13555, lat:6.55769},\n {lng:-73.13592, lat:6.55796},\n {lng:-73.13629, lat:6.55817},\n {lng:-73.13663, lat:6.5584},\n {lng:-73.13694, lat:6.5586},\n {lng:-73.13713, lat:6.55874},\n {lng:-73.13733, lat:6.55887},\n {lng:-73.13765, lat:6.55908},\n {lng:-73.13767, lat:6.55909},\n {lng:-73.13805, lat:6.55928},\n {lng:-73.13785, lat:6.55963},\n {lng:-73.13764, lat:6.55998},\n {lng:-73.13778, lat:6.56003},\n {lng:-73.13786, lat:6.56005},\n {lng:-73.13813, lat:6.5601},\n {lng:-73.13825, lat:6.56014},\n {lng:-73.13872, lat:6.56029},\n {lng:-73.13841, lat:6.56099},\n {lng:-73.1384, lat:6.56098},\n {lng:-73.13785, lat:6.56073},\n {lng:-73.13739, lat:6.56056},\n {lng:-73.13752, lat:6.56027},\n {lng:-73.13764, lat:6.55998},\n {lng:-73.13753, lat:6.55995},\n {lng:-73.13743, lat:6.5599},\n {lng:-73.13738, lat:6.55988}\n ];\n //pinta la polilinea\n var ruta1 = new google.maps.Polyline({\n path: coordenadas,\n geodesic: true,\n strokeColor: '#000000',\n strokeOpacity: 1.0,\n strokeWeight: 2\n});\nruta1.setMap(map);\n\n}", "title": "" }, { "docid": "95c04e0cc9231e448fd4fad220c1bbe3", "score": "0.65640587", "text": "function cambiarUbicacion() {\n var latitud = $(this).data(\"latitud\");\n var longitud = $(this).data(\"longitud\");\n\n var coordenadas = {\n lat: latitud,\n lng: longitud\n };\n mostrarMapa(coordenadas);\n}", "title": "" }, { "docid": "d90abe3c9534957f851389236a372289", "score": "0.6534813", "text": "function initMap() {\n let gestureHandling = isMobileX(760) ? \"greedy\" : \"auto\";\n map = new google.maps.Map(document.getElementById(\"mapa-anuncios\"), {\n mapTypeControl: true,\n streetViewControl: false,\n gestureHandling: gestureHandling,\n styles: [\n {\n featureType: \"landscape.natural\",\n elementType: \"geometry.fill\",\n stylers: [\n {\n visibility: \"on\",\n },\n {\n color: \"#e0efef\",\n },\n ],\n },\n {\n featureType: \"poi\",\n elementType: \"geometry.fill\",\n stylers: [\n {\n visibility: \"on\",\n },\n {\n hue: \"#1900ff\",\n },\n {\n color: \"#c0e8e8\",\n },\n ],\n },\n {\n featureType: \"road\",\n elementType: \"geometry\",\n stylers: [\n {\n lightness: 100,\n },\n {\n visibility: \"simplified\",\n },\n ],\n },\n {\n featureType: \"road\",\n elementType: \"labels\",\n stylers: [\n {\n visibility: \"off\",\n },\n ],\n },\n {\n featureType: \"transit.line\",\n elementType: \"geometry\",\n stylers: [\n {\n visibility: \"on\",\n },\n {\n lightness: 700,\n },\n ],\n },\n {\n featureType: \"water\",\n elementType: \"all\",\n stylers: [\n {\n color: \"#7dcdcd\",\n },\n ],\n },\n ],\n });\n caixa = new google.maps.InfoWindow();\n google.maps.event.addListener(map, \"click\", function () {\n caixa.close();\n });\n populaLocais();\n }", "title": "" }, { "docid": "599a515cf37605ced7b875709161f74b", "score": "0.6521374", "text": "function showOverlays() {\n\tsetAllMap(map);\n}", "title": "" }, { "docid": "599a515cf37605ced7b875709161f74b", "score": "0.6521374", "text": "function showOverlays() {\n\tsetAllMap(map);\n}", "title": "" }, { "docid": "9d9792d0683ceb61fb8305836f2ca372", "score": "0.65138626", "text": "function showMap() {\n OM.gv.setResourcePath(\"../..\");\n \n //this defines a universe with the custom Albers-USA map projection that\n //scales and moves the states of Alaska and Hawii closer to the lower 48\n //states.\n var config = {\n //special srid 505050 represents the client-side only Albers-USA projection.\n srid : 505050, \n\n //these bounds seem to give the best overall appearance\n bounds : new OM.geometry.Rectangle(-3200000, -500000, 2800000, 3800000, 505050),\n\n numberOfZoomLevels: 10\n };\n\n var albersUsa = new OM.universe.Universe(config);\n\n var map = new OM.Map(document.getElementById('map'),\n {\n universe: albersUsa\n });\n\n\n //displays the background layer: counties of California from a geoJson data pack file\n var stateColor = new OM.style.Color(\n { strokeThickness: 1,\n stroke: \"#ac9898\",\n fill: \"#b2bec6\",\n fillOpacity: 0.85});\n var stateLayer = new OM.layer.VectorLayer(\"states\",\n {\n def: {\n type: OM.layer.VectorLayer.TYPE_DATAPACK,\n url: \"../u/data/usa_states.json\",\n labelColumn: \"state_abrv\"\n },\n renderingStyle: stateColor,\n boundingTheme: false\n }\n );\n //ensure the feature's label text is displayed on the map\n stateLayer.setLabelsVisible(true);\n stateLayer.enableToolTip(false);\n\n map.addLayer(stateLayer);\n\n //add the customers bubble layer\n addCustomersLayer(map);\n \n map.init();\n addMapControls(map);\n}", "title": "" }, { "docid": "1862f24961b68a5d2c862dc67553b3d5", "score": "0.6475857", "text": "function uniNacionalVolador() {\n var map = new google.maps.Map(document.getElementById('map'), {\n zoom: 18,\n center: {lat: 6.262831, lng: -75.579330},\n // mapTypeId: 'roadmap'\n styles: [\n {elementType: 'geometry', stylers: [{color: '#242f3e'}]},\n {elementType: 'labels.text.stroke', stylers: [{color: '#242f3e'}]},\n {elementType: 'labels.text.fill', stylers: [{color: '#746855'}]},\n {\n featureType: 'administrative.locality',\n elementType: 'labels.text.fill',\n stylers: [{color: '#d59563'}]\n },\n {\n featureType: 'poi',\n elementType: 'labels.text.fill',\n stylers: [{color: '#d59563'}]\n },\n {\n featureType: 'poi.park',\n elementType: 'geometry',\n stylers: [{color: '#263c3f'}]\n },\n {\n featureType: 'poi.park',\n elementType: 'labels.text.fill',\n stylers: [{color: '#6b9a76'}]\n },\n {\n featureType: 'road',\n elementType: 'geometry',\n stylers: [{color: '#38414e'}]\n },\n {\n featureType: 'road',\n elementType: 'geometry.stroke',\n stylers: [{color: '#212a37'}]\n },\n {\n featureType: 'road',\n elementType: 'labels.text.fill',\n stylers: [{color: '#9ca5b3'}]\n },\n {\n featureType: 'road.highway',\n elementType: 'geometry',\n stylers: [{color: '#746855'}]\n },\n {\n featureType: 'road.highway',\n elementType: 'geometry.stroke',\n stylers: [{color: '#1f2835'}]\n },\n {\n featureType: 'road.highway',\n elementType: 'labels.text.fill',\n stylers: [{color: '#f3d19c'}]\n },\n {\n featureType: 'transit',\n elementType: 'geometry',\n stylers: [{color: '#2f3948'}]\n },\n {\n featureType: 'transit.station',\n elementType: 'labels.text.fill',\n stylers: [{color: '#d59563'}]\n },\n {\n featureType: 'water',\n elementType: 'geometry',\n stylers: [{color: '#17263c'}]\n },\n {\n featureType: 'water',\n elementType: 'labels.text.fill',\n stylers: [{color: '#515c6d'}]\n },\n {\n featureType: 'water',\n elementType: 'labels.text.stroke',\n stylers: [{color: '#17263c'}]\n }\n ]\n });\n\n\n// GEOLOCATION\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(function (position) {\n var pos = {\n lat: position.coords.latitude,\n lng: position.coords.longitude\n };\n\n var contentString = 'Mi Ubicación';\n\n var infowindow = new google.maps.InfoWindow({\n content: contentString\n });\n\n var marker = new google.maps.Marker({\n position: pos,\n map: map,\n title: 'Mi ubicación',\n draggable: true,\n animation: google.maps.Animation.DROP,\n\n });\n marker.addListener('click', toggleBounce);\n\n\n function toggleBounce() {\n if (marker.getAnimation() !== null) {\n marker.setAnimation(null);\n infowindow.open(map, marker);\n\n } else {\n marker.setAnimation(google.maps.Animation.BOUNCE);\n }\n }\n\n\n }, function () {\n handleLocationError(true, infoWindow, map.getCenter());\n });\n // NAVEGADOR NO SOPORTA GEOLOCALIZACION\n } else {\n handleLocationError(false, infoWindow, map.getCenter());\n }\n\n\n function handleLocationError(browserHasGeolocation, infoWindow, pos) {\n infoWindow.setPosition(pos);\n infoWindow.setContent(browserHasGeolocation ?\n 'Error: El servicio de geolocalización falló.' :\n 'Error: Tu navegador no admite la geolocalización');\n infoWindow.open(map);\n }\n\n// MARKER LUGARES DESTACADOS\n\n var image = 'https://developers.google.com/maps/documentation/javascript/examples/full/images/beachflag.png';\n var beachMarker = new google.maps.Marker({\n position: {lat: 6.262831, lng: -75.579330},\n map: map,\n icon: image\n });\n\n\n var flightPlanCoordinates = [\n {lat: 6.313505, lng: -75.570131},\n {lat: 6.313129, lng: -75.570095},\n {lat: 6.312812, lng: -75.570097},\n {lat: 6.312655, lng: -75.570084},\n {lat: 6.312610, lng: -75.570070},\n {lat: 6.312160, lng: -75.569945},\n {lat: 6.311232, lng: -75.569894},\n {lat: 6.311168, lng: -75.569897},\n {lat: 6.311096, lng: -75.569905},\n {lat: 6.310767, lng: -75.570024},\n {lat: 6.310723, lng: -75.569979},\n {lat: 6.310487, lng: -75.569182},\n {lat: 6.309711, lng: -75.569451},\n {lat: 6.307985, lng: -75.570009},\n {lat: 6.307507, lng: -75.570235},\n {lat: 6.306709, lng: -75.570527},\n {lat: 6.306624, lng: -75.570549},\n {lat: 6.306373, lng: -75.570583},\n {lat: 6.303782, lng: -75.570619},\n {lat: 6.303725, lng: -75.570627},\n {lat: 6.303579, lng: -75.570679},\n {lat: 6.303497, lng: -75.570755},\n {lat: 6.303285, lng: -75.571055},\n {lat: 6.302518, lng: -75.572121},\n {lat: 6.302418, lng: -75.572207},\n {lat: 6.301994, lng: -75.572442},\n {lat: 6.301601, lng: -75.572637},\n {lat: 6.301572, lng: -75.572580},\n {lat: 6.300192, lng: -75.569817},\n {lat: 6.300288, lng: -75.569012},\n {lat: 6.301461, lng: -75.566276},\n {lat: 6.301013, lng: -75.566297},\n {lat: 6.297771, lng: -75.567166},\n {lat: 6.296780, lng: -75.567552},\n {lat: 6.296471, lng: -75.567606},\n {lat: 6.295543, lng: -75.567660},\n {lat: 6.295031, lng: -75.567960},\n {lat: 6.294253, lng: -75.568625},\n {lat: 6.293251, lng: -75.569129},\n {lat: 6.291449, lng: -75.569623},\n {lat: 6.288996, lng: -75.570513},\n {lat: 6.287396, lng: -75.570363},\n {lat: 6.287055, lng: -75.570406},\n {lat: 6.285370, lng: -75.570953},\n {lat: 6.283642, lng: -75.571811},\n {lat: 6.282949, lng: -75.572036},\n {lat: 6.279366, lng: -75.572637},\n {lat: 6.274940, lng: -75.573935},\n {lat: 6.270922, lng: -75.575680},\n {lat: 6.268085, lng: -75.576860},\n {lat: 6.266336, lng: -75.577246},\n {lat: 6.265728, lng: -75.577503},\n {lat: 6.263104, lng: -75.579338},\n {lat: 6.262635, lng: -75.579638},\n {lat: 6.261995, lng: -75.579863},\n {lat: 6.261515, lng: -75.579927},\n {lat: 6.260235, lng: -75.579788},\n {lat: 6.259830, lng: -75.579842},\n {lat: 6.256677, lng: -75.580938},\n {lat: 6.259012, lng: -75.585853},\n {lat: 6.258431, lng: -75.586153},\n {lat: 6.255968, lng: -75.580891},\n {lat: 6.253280, lng: -75.575553},\n {lat: 6.252805, lng: -75.575263},\n {lat: 6.252442, lng: -75.575150},\n {lat: 6.248839, lng: -75.575301},\n {lat: 6.247313, lng: -75.575384},\n {lat: 6.246918, lng: -75.575403},\n {lat: 6.246834, lng: -75.575425},\n {lat: 6.246753, lng: -75.575468},\n {lat: 6.246675, lng: -75.575607},\n {lat: 6.246578, lng: -75.575698},\n {lat: 6.246466, lng: -75.575774},\n {lat: 6.246466, lng: -75.575774},\n {lat: 6.246048, lng: -75.575677},\n {lat: 6.245866, lng: -75.575528},\n {lat: 6.245793, lng: -75.575418},\n {lat: 6.245744, lng: -75.575281},\n {lat: 6.245749, lng: -75.575119},\n {lat: 6.245787, lng: -75.575038},\n {lat: 6.245944, lng: -75.574858},\n {lat: 6.245955, lng: -75.574824},\n {lat: 6.245922, lng: -75.574642},\n {lat: 6.245852, lng: -75.574398},\n {lat: 6.245725, lng: -75.574036},\n {lat: 6.245585, lng: -75.573650},\n {lat: 6.245411, lng: -75.573167},\n {lat: 6.245244, lng: -75.572700},\n {lat: 6.245194, lng: -75.572569},\n {lat: 6.245101, lng: -75.572257},\n {lat: 6.245067, lng: -75.572125},\n {lat: 6.245087, lng: -75.571975},\n {lat: 6.244881, lng: -75.571447},\n {lat: 6.244686, lng: -75.570923},\n {lat: 6.244499, lng: -75.570480},\n {lat: 6.244344, lng: -75.570048},\n {lat: 6.244180, lng: -75.569599},\n {lat: 6.244024, lng: -75.569146},\n {lat: 6.243882, lng: -75.568769},\n {lat: 6.243767, lng: -75.568423},\n {lat: 6.243691, lng: -75.568214},\n {lat: 6.243476, lng: -75.568109},\n {lat: 6.243346, lng: -75.568084},\n {lat: 6.243226, lng: -75.568106},\n {lat: 6.243132, lng: -75.568178},\n {lat: 6.243059, lng: -75.568323},\n {lat: 6.243064, lng: -75.568408},\n {lat: 6.243133, lng: -75.568552},\n {lat: 6.243404, lng: -75.568649},\n {lat: 6.243887, lng: -75.568418},\n {lat: 6.244234, lng: -75.568197},\n {lat: 6.244601, lng: -75.567962},\n {lat: 6.245130, lng: -75.567582},\n {lat: 6.245530, lng: -75.567285},\n {lat: 6.247001, lng: -75.566153},\n {lat: 6.247542, lng: -75.565744},\n {lat: 6.248069, lng: -75.565361},\n {lat: 6.248580, lng: -75.565029},\n {lat: 6.248985, lng: -75.564763},\n {lat: 6.249465, lng: -75.564491},\n {lat: 6.249870, lng: -75.564267},\n {lat: 6.250809, lng: -75.563731},\n {lat: 6.251673, lng: -75.563227},\n {lat: 6.252399, lng: -75.562813},\n {lat: 6.252897, lng: -75.562530},\n {lat: 6.253288, lng: -75.562282},\n {lat: 6.253545, lng: -75.562184},\n {lat: 6.253884, lng: -75.562130},\n {lat: 6.254168, lng: -75.562139},\n {lat: 6.254345, lng: -75.562185},\n {lat: 6.254633, lng: -75.562327},\n {lat: 6.254884, lng: -75.562541},\n {lat: 6.255675, lng: -75.563739},\n {lat: 6.256654, lng: -75.565287},\n {lat: 6.256894, lng: -75.565864},\n {lat: 6.257177, lng: -75.567489},\n {lat: 6.257502, lng: -75.569264},\n {lat: 6.257852, lng: -75.571120},\n {lat: 6.257919, lng: -75.571294},\n {lat: 6.257981, lng: -75.571394},\n {lat: 6.258149, lng: -75.571616},\n {lat: 6.260519, lng: -75.573359},\n {lat: 6.262287, lng: -75.574643},\n {lat: 6.262473, lng: -75.574772},\n {lat: 6.262602, lng: -75.574834},\n {lat: 6.262797, lng: -75.574899},\n {lat: 6.263336, lng: -75.574987},\n {lat: 6.264166, lng: -75.574993},\n {lat: 6.264266, lng: -75.574937},\n {lat: 6.265278, lng: -75.574845},\n {lat: 6.265506, lng: -75.574887},\n {lat: 6.265567, lng: -75.574906},\n {lat: 6.265609, lng: -75.575031},\n {lat: 6.265647, lng: -75.575087},\n {lat: 6.265721, lng: -75.575091},\n {lat: 6.265838, lng: -75.575346},\n {lat: 6.265838, lng: -75.575346},\n {lat: 6.266147, lng: -75.575841},\n {lat: 6.266246, lng: -75.575954},\n {lat: 6.266669, lng: -75.576198},\n {lat: 6.266912, lng: -75.576238},\n {lat: 6.267252, lng: -75.576196},\n {lat: 6.267785, lng: -75.576023},\n {lat: 6.267978, lng: -75.575925},\n {lat: 6.268187, lng: -75.575787},\n {lat: 6.268484, lng: -75.575691},\n {lat: 6.268752, lng: -75.575683},\n {lat: 6.269027, lng: -75.575734},\n {lat: 6.269298, lng: -75.575831},\n {lat: 6.269669, lng: -75.575900},\n {lat: 6.269930, lng: -75.575899},\n {lat: 6.270247, lng: -75.575831},\n {lat: 6.270504, lng: -75.575685},\n {lat: 6.270962, lng: -75.575529},\n {lat: 6.271095, lng: -75.575473},\n {lat: 6.271252, lng: -75.575450},\n {lat: 6.272191, lng: -75.575058},\n {lat: 6.272412, lng: -75.574975},\n {lat: 6.274122, lng: -75.574190},\n {lat: 6.274839, lng: -75.573843},\n {lat: 6.275523, lng: -75.573577},\n {lat: 6.277635, lng: -75.573018},\n {lat: 6.277874, lng: -75.572935},\n {lat: 6.279218, lng: -75.572557},\n {lat: 6.280034, lng: -75.572389},\n {lat: 6.282092, lng: -75.572122},\n {lat: 6.282385, lng: -75.571997},\n {lat: 6.282485, lng: -75.571962},\n {lat: 6.283559, lng: -75.571725},\n {lat: 6.285355, lng: -75.570813},\n {lat: 6.287064, lng: -75.570230},\n {lat: 6.287170, lng: -75.570196},\n {lat: 6.288267, lng: -75.570310},\n {lat: 6.288549, lng: -75.570348},\n {lat: 6.288894, lng: -75.570336},\n {lat: 6.289038, lng: -75.570311},\n {lat: 6.289890, lng: -75.569976},\n {lat: 6.291367, lng: -75.569495},\n {lat: 6.292042, lng: -75.569349},\n {lat: 6.293080, lng: -75.569087},\n {lat: 6.293357, lng: -75.568974},\n {lat: 6.294271, lng: -75.568450},\n {lat: 6.294427, lng: -75.568339},\n {lat: 6.295008, lng: -75.567783},\n {lat: 6.295569, lng: -75.567530},\n {lat: 6.296011, lng: -75.567438},\n {lat: 6.296454, lng: -75.567503},\n {lat: 6.296676, lng: -75.567528},\n {lat: 6.297411, lng: -75.567209},\n {lat: 6.298174, lng: -75.566916},\n {lat: 6.298808, lng: -75.566778},\n {lat: 6.299966, lng: -75.566473},\n {lat: 6.300844, lng: -75.566227},\n {lat: 6.301149, lng: -75.566177},\n {lat: 6.301507, lng: -75.566173},\n {lat: 6.301569, lng: -75.566194},\n {lat: 6.301055, lng: -75.567404},\n {lat: 6.300252, lng: -75.569367},\n {lat: 6.300231, lng: -75.569697},\n {lat: 6.300288, lng: -75.569852},\n {lat: 6.301698, lng: -75.572577},\n {lat: 6.302029, lng: -75.572404},\n {lat: 6.302385, lng: -75.572218},\n {lat: 6.302475, lng: -75.572148},\n {lat: 6.303481, lng: -75.570757},\n {lat: 6.303597, lng: -75.570658},\n {lat: 6.303780, lng: -75.570600},\n {lat: 6.306327, lng: -75.570568},\n {lat: 6.306535, lng: -75.570548},\n {lat: 6.306736, lng: -75.570503},\n {lat: 6.307424, lng: -75.570254},\n {lat: 6.307964, lng: -75.570006},\n {lat: 6.309213, lng: -75.569582},\n {lat: 6.310500, lng: -75.569160},\n {lat: 6.310751, lng: -75.570004},\n {lat: 6.311105, lng: -75.569884},\n {lat: 6.311247, lng: -75.569872},\n {lat: 6.312140, lng: -75.569923},\n {lat: 6.312313, lng: -75.569756},\n {lat: 6.312679, lng: -75.569480},\n {lat: 6.312951, lng: -75.569215},\n {lat: 6.313484, lng: -75.568643}\n\n\n ];\n var flightPath = new google.maps.Polyline({\n path: flightPlanCoordinates,\n geodesic: true,\n strokeColor: '#000bff',\n strokeOpacity: 2.0,\n strokeWeight: 5\n });\n\n\n flightPath.setMap(map);\n\n\n}", "title": "" }, { "docid": "c1d972c1523785cb12bb90ebc4edabeb", "score": "0.6426814", "text": "function OtroMapa(){\n\t/* Esta es la capa de pintura */\n\tvar tiles = new\n\t\tL.tileLayer(\n\t\t\t'http://{s}.tile.stamen.com/watercolor/{z}/{x}/{y}.png')\n\t\t\t.addTo(map);\n}", "title": "" }, { "docid": "2fc6a039b1f640f3be221b25889b8d54", "score": "0.6422926", "text": "function showZone (){\n\n var datos = JSON.parse(localStorage.datos);\n var idSeleccionado = document.getElementById('dropdownMenu1').value;\n var ubicacion;\n\n for (var i = 0; i < datos.datosDeZona.length; i++) {\n if(idSeleccionado == datos.datosDeZona[i].id_zona){\n ubicacion = {\n lat: datos.datosDeZona[i].lat,\n lng: datos.datosDeZona[i].lng\n }\n }//if\n }//for\n\nmap.panTo(ubicacion);\nmap.setZoom(17);\n // map.setCenter(ubicacion);\n\n}//showZone()", "title": "" }, { "docid": "61a8cc58ea37785a41646a0d42e2ae98", "score": "0.63996625", "text": "function mainNSalas() { \t\t\n $(\"#mapaRecaudacion\").hide();\n\t\t$(\"#mapaEspectadores\").hide();\n\t\t$(\"#mapaNumeroSalas\").show();\n cartodb.createVis('mapaNumeroSalas', '\thttps://carlos10.cartodb.com/api/v2/viz/1c7e47e6-6612-11e5-a874-0ec80481e721/viz.json', {\n shareable: false,\n title: false,\n description: true,\n search: true,\n tiles_loader: true,\n center_lat: 37,\n center_lon: 0,\n zoom: 2\n })\n\t\t\n\t\t\n .done(function(vis, layers) {\n layers[1].setInteraction(true);\n layers[1].on('featureOver', function(e, latlng, pos, data) {\n cartodb.log.log(e, latlng, pos, data);\n });\n var map = vis.getNativeMap();\n map.setZoom(5);\n\n // map.panTo([50.5, 30.5]);\n })\n // <!--.error(function(err) {\n // console.log(err);\n // }); -->\n }", "title": "" }, { "docid": "bdca06733f0e8cd739855019106bfb53", "score": "0.63977975", "text": "function showTooltip(marcador,map){\n var x = 0;\n var y = 10;\n var posicion_mapa = $(\"#map_canvas\").offset();\n\n var scale = Math.pow(2, map.getZoom());\n var nw = new google.maps.LatLng(\n map.getBounds().getNorthEast().lat(),\n map.getBounds().getSouthWest().lng()\n );\n var worldCoordinateNW = map.getProjection().fromLatLngToPoint(nw);\n var worldCoordinate = map.getProjection().fromLatLngToPoint(marcador.getPosition());\n var pixelOffset = new google.maps.Point(\n Math.floor((worldCoordinate.x - worldCoordinateNW.x) * scale),\n Math.floor((worldCoordinate.y - worldCoordinateNW.y) * scale)\n );\n\n $(\"#tooltip\").html('');\n\n $('<div id=\"content-tooltip\"></div>').appendTo(\"#tooltip\");\n $('<div id=\"tool_tit\" class=\"txt-a-c txt-title txt160\">'+marcador.informacion.nombre+'<\\/div>').appendTo(\"#content-tooltip\");\n\n if(typeof(marcador.informacion.total_hoteles) != \"undefined\")\n var string_total = parseInt(marcador.informacion.total_hoteles)>1?marcador.informacion.total_hoteles+' Hoteles':marcador.informacion.total_hoteles+' Hotel';\n else if(typeof(marcador.informacion.total_restaurantes) != \"undefined\")\n var string_total = parseInt(marcador.informacion.total_restaurantes)>1?marcador.informacion.total_restaurantes+' Restaurantes':marcador.informacion.total_restaurantes+' Restaurante';\n else if(typeof(marcador.informacion.total_atractivos) != \"undefined\")\n var string_total = parseInt(marcador.informacion.total_atractivos)>1?marcador.informacion.total_atractivos+' Atractivos':marcador.informacion.total_atractivos+' __atractivo__';\n\n $('<div id=\"tool_total\" class=\"txt-title txt-a-c gris-medio txt130\">'+string_total+'<\\/div>').appendTo(\"#content-tooltip\");\n\n if(marcador.informacion.capital==0){\n $(\"#tooltip div#tool_tit\").removeClass('rojo').addClass('negro');\n y=44;\n }else{\n $(\"#tooltip div#tool_tit\").removeClass('negro').addClass('rojo');\n y=30;\n }\n\n var tooltip_h = $(\"#tooltip\").outerHeight();\n var tooltip_w = $(\"#tooltip\").outerWidth();\n\n y_calc = y + tooltip_h;\n x_calc = x + tooltip_w;\n\n position_item = marcador.getPosition();\n worldCoordinate = map.getProjection().fromLatLngToPoint(position_item);\n pixelOffset = new google.maps.Point(\n Math.floor((worldCoordinate.x - worldCoordinateNW.x) * scale),\n Math.floor((worldCoordinate.y - worldCoordinateNW.y) * scale)\n );\n\n var x_width;\n var y_height;\n var is_indicacion = false;\n\n x_width = pixelOffset.x - (x_calc/2);\n y_height = pixelOffset.y - y_calc - 25;\n\n if(x_width < 0 && pixelOffset.y > 110){\n x_width = pixelOffset.x + 32;\n y_height = pixelOffset.y - (y_calc/2);\n\n $('<div class=\"flecha_tooltip_l_izq\"><\\/div>').prependTo(\"#tooltip\");\n $(\"div.flecha_tooltip_l_izq\").append('<span class=\"icon-flecha-izquierda\"><\\/span>').css({'left':'-30px'});\n is_indicacion = true;\n\n }else if((x_width + x_calc) > $(\"#map_canvas\").outerWidth() && (pixelOffset.y < ($(\"#map_canvas\").outerHeight() - 110) && pixelOffset.y > 110)){\n x_width = x_width - (x_calc/2) - 32;\n y_height = pixelOffset.y - (y_calc/2);\n\n $('<div class=\"flecha_tooltip_l_der\"><\\/div>').appendTo(\"#tooltip\");\n $(\"div.flecha_tooltip_l_der\").append('<span class=\"icon-flecha-derecha\"><\\/span>').css({'right':'-30px'});\n is_indicacion = true;\n }else{\n\n if(y_height < 0){\n y_height = pixelOffset.y + 12;\n\n if((x_width + x_calc) > $(\"#map_canvas\").outerWidth()){\n $('<div class=\"flechas_tooltip\"><\\/div>').prependTo(\"#tooltip\");\n $(\"div.flechas_tooltip\").append('<span class=\"icon-flecha-arriba\"><\\/span>').css({'left':'36%'});\n\n }else{\n $('<div class=\"flechas_tooltip\"><\\/div>').prependTo(\"#tooltip\");\n $(\"div.flechas_tooltip\").append('<span class=\"icon-flecha-arriba\"><\\/span>').css({'left':'36%'});\n }\n\n is_indicacion = true;\n\n }else if(x_width < 0){\n x_width = pixelOffset.x - (y/2);\n\n $('<div class=\"flechas_tooltip\"><\\/div>').prependTo(\"#tooltip\");\n $(\"div.flechas_tooltip\").append('<span class=\"icon-flecha-arriba\"><\\/span>').css({'left':'36%'});\n\n is_indicacion = true;\n\n }else if((x_width + x_calc) > $(\"#map_canvas\").outerWidth()){\n x_width = x_width - (x_calc/2) + 10;\n\n if(y_height > 0){\n\n $('<div class=\"flechas_tooltip_b\"><\\/div>').appendTo(\"#tooltip\");\n $(\"div.flechas_tooltip_b\").append('<span class=\"icon-flecha-abajo\"><\\/span>').css({'left':'76%'});\n\n }else{\n\n $('<div class=\"flechas_tooltip\"><\\/div>').prependTo(\"#tooltip\");\n $(\"div.flechas_tooltip\").append('<span class=\"icon-flecha-abajo\"><\\/span>').css({'left':'0%'});\n }\n\n is_indicacion = true;\n }\n\n }\n\n if(!is_indicacion){\n $('<div class=\"flechas_tooltip_b\"><\\/div>').appendTo(\"#tooltip\");\n $(\"div.flechas_tooltip_b\").append('<span class=\"icon-flecha-abajo\"><\\/span>').css({'left':'38%'});\n }\n\n $(\"#tooltip\").css(\"left\", x_width);\n $(\"#tooltip\").css(\"top\", y_height);\n $(\"#tooltip\").css(\"display\", \"block\");\n $(\"#tooltip\").css(\"visibility\", \"visible\");\n $(\"#tooltip\").css(\"position\", \"absolute\");\n }", "title": "" }, { "docid": "a10d2f17d0bc1f00c4f2a6d9d5231854", "score": "0.6382114", "text": "function cargarMapaLugares() {\n //Style\n var main_color = '#49B691',\n saturation_value = -20,\n brightness_value = 5;\n var style = [\n { elementType: 'labels.text.fill', stylers: [{ color: '#B6BFC0' }] },\n {\n elementType: \"labels\",\n stylers: [\n { saturation: saturation_value }\n ]\n },\n {\n featureType: 'administrative.locality',\n elementType: 'labels.text.fill',\n stylers: [{ color: '#EEB95A' }]\n },\n {\n featureType: 'poi',\n elementType: 'labels.text.fill',\n stylers: [{ color: '#EEB95A' }]\n },\n {\n featureType: \"poi\",\n elementType: \"labels\",\n stylers: [\n { visibility: \"off\" }\n ]\n },\n {\n featureType: 'road.highway',\n elementType: 'labels',\n stylers: [\n { visibility: \"off\" }\n ]\n },\n {\n featureType: \"road.local\",\n elementType: \"labels.icon\",\n stylers: [\n { visibility: \"off\" }\n ]\n },\n {\n featureType: \"road.arterial\",\n elementType: \"labels.icon\",\n stylers: [\n { visibility: \"off\" }\n ]\n },\n {\n featureType: \"road\",\n elementType: \"geometry.stroke\",\n stylers: [\n { visibility: \"off\" }\n ]\n },\n {\n featureType: \"transit\",\n elementType: \"geometry.fill\",\n stylers: [\n { hue: main_color },\n { visibility: \"on\" },\n { lightness: brightness_value },\n { saturation: saturation_value }\n ]\n },\n {\n featureType: \"poi\",\n elementType: \"geometry.fill\",\n stylers: [\n { hue: main_color },\n { visibility: \"on\" },\n { lightness: brightness_value },\n { saturation: saturation_value }\n ]\n },\n {\n featureType: \"poi.government\",\n elementType: \"geometry.fill\",\n stylers: [\n { hue: main_color },\n { visibility: \"on\" },\n { lightness: brightness_value },\n { saturation: saturation_value }\n ]\n },\n {\n featureType: \"poi.business\",\n elementType: \"geometry.fill\",\n stylers: [\n { hue: main_color },\n { visibility: \"on\" },\n { lightness: brightness_value },\n { saturation: saturation_value }\n ]\n },\n {\n featureType: \"transit\",\n elementType: \"geometry.fill\",\n stylers: [\n { hue: main_color },\n { visibility: \"on\" },\n { lightness: brightness_value },\n { saturation: saturation_value }\n ]\n },\n {\n featureType: \"transit.station\",\n elementType: \"geometry.fill\",\n stylers: [\n { hue: main_color },\n { visibility: \"on\" },\n { lightness: brightness_value },\n { saturation: saturation_value }\n ]\n },\n {\n featureType: \"road\",\n elementType: \"geometry.fill\",\n stylers: [\n { hue: main_color },\n { visibility: \"on\" },\n { lightness: brightness_value },\n { saturation: saturation_value }\n ]\n },\n {\n featureType: \"road.highway\",\n elementType: \"geometry.fill\",\n stylers: [\n { hue: main_color },\n { visibility: \"on\" },\n { lightness: brightness_value },\n { saturation: saturation_value }\n ]\n },\n {\n featureType: \"water\",\n elementType: \"geometry\",\n stylers: [\n { hue: main_color },\n { visibility: \"on\" },\n { lightness: brightness_value },\n { saturation: saturation_value }\n ]\n }\n ];\n\n //The center location of Costa Rica.\n var centerOfMap = new google.maps.LatLng(9.9369028, -84.0853536);\n var lugar = null;\n\n //Map options.\n var options = {\n center: centerOfMap, //Set center.\n zoom: 13, //The zoom value.\n panControl: false,\n zoomControl: true,\n mapTypeControl: false,\n streetViewControl: false,\n mapTypeId: google.maps.MapTypeId.ROADMAP,\n scrollwheel: false,\n styles: style,\n zoomControlOptions: {\n style: google.maps.ZoomControlStyle.SMALL,\n position: google.maps.ControlPosition.BOTTOM_CENTER\n }\n };\n\n //Create the map object.\n map = new google.maps.Map(document.getElementById('mapa-lugar'), options);\n\n\n\n //Listen for any clicks on the map.\n google.maps.event.addListener(map, 'click', function (event) {\n //Get the location that the user clicked.\n var clickedLocation = event.latLng;\n //If the marker hasn't been added.\n if (marker === false) {\n //Create the marker.\n marker = new google.maps.Marker({\n position: clickedLocation,\n map: map,\n draggable: true //make it draggable\n });\n //Listen for drag events!\n google.maps.event.addListener(marker, 'dragend', function (event) {\n markerLocation();\n });\n } else {\n //Marker has already been added, so just change its location.\n marker.setPosition(clickedLocation);\n }\n //Get the marker's location.\n markerLocation();\n });\n\n}", "title": "" }, { "docid": "821d395d098bb0a47159655bfa2a259d", "score": "0.63815004", "text": "function showmap() {\r\n\r\n text = \"The map entries are \" + \"<br>\";\r\n\r\n text = text + \"<ol>\";\r\n\r\n for (let [k, v] of m) {\r\n text = text + \"<li> Room : \" + k + \" && Score : \" + v + \"</li>\";\r\n }\r\n\r\n text = text + \"</ol>\";\r\n\r\n document.getElementById(\"showmap\").innerHTML = text;\r\n\r\n var x = document.getElementById(\"showmap\");\r\n if (x.style.display === \"none\") {\r\n x.style.display = \"block\";\r\n\r\n } else {\r\n x.style.display = \"none\";\r\n }\r\n\r\n}", "title": "" }, { "docid": "7253d539d726f214cc29226ebd451d42", "score": "0.63650906", "text": "function ruta283() {\n var map = new google.maps.Map(document.getElementById('map'), {\n zoom: 13,\n center: {lat: 6.2615713, lng: -75.5745807},\n styles: [\n {elementType: 'geometry', stylers: [{color: '#242f3e'}]},\n {elementType: 'labels.text.stroke', stylers: [{color: '#242f3e'}]},\n {elementType: 'labels.text.fill', stylers: [{color: '#746855'}]},\n {\n featureType: 'administrative.locality',\n elementType: 'labels.text.fill',\n stylers: [{color: '#d59563'}]\n },\n {\n featureType: 'poi',\n elementType: 'labels.text.fill',\n stylers: [{color: '#d59563'}]\n },\n {\n featureType: 'poi.park',\n elementType: 'geometry',\n stylers: [{color: '#263c3f'}]\n },\n {\n featureType: 'poi.park',\n elementType: 'labels.text.fill',\n stylers: [{color: '#6b9a76'}]\n },\n {\n featureType: 'road',\n elementType: 'geometry',\n stylers: [{color: '#38414e'}]\n },\n {\n featureType: 'road',\n elementType: 'geometry.stroke',\n stylers: [{color: '#212a37'}]\n },\n {\n featureType: 'road',\n elementType: 'labels.text.fill',\n stylers: [{color: '#9ca5b3'}]\n },\n {\n featureType: 'road.highway',\n elementType: 'geometry',\n stylers: [{color: '#746855'}]\n },\n {\n featureType: 'road.highway',\n elementType: 'geometry.stroke',\n stylers: [{color: '#1f2835'}]\n },\n {\n featureType: 'road.highway',\n elementType: 'labels.text.fill',\n stylers: [{color: '#f3d19c'}]\n },\n {\n featureType: 'transit',\n elementType: 'geometry',\n stylers: [{color: '#2f3948'}]\n },\n {\n featureType: 'transit.station',\n elementType: 'labels.text.fill',\n stylers: [{color: '#d59563'}]\n },\n {\n featureType: 'water',\n elementType: 'geometry',\n stylers: [{color: '#17263c'}]\n },\n {\n featureType: 'water',\n elementType: 'labels.text.fill',\n stylers: [{color: '#515c6d'}]\n },\n {\n featureType: 'water',\n elementType: 'labels.text.stroke',\n stylers: [{color: '#17263c'}]\n }\n ]\n });\n\n infoWindow = new google.maps.InfoWindow;\n\n// GEOLOCATION\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(function (position) {\n var pos = {\n lat: position.coords.latitude,\n lng: position.coords.longitude\n };\n\n var contentString = 'Mi Ubicación';\n\n var infowindow = new google.maps.InfoWindow({\n content: contentString\n });\n\n var marker = new google.maps.Marker({\n position: pos,\n map: map,\n title: 'Mi ubicación',\n draggable: true,\n animation: google.maps.Animation.DROP,\n\n });\n marker.addListener('click', toggleBounce);\n\n\n function toggleBounce() {\n if (marker.getAnimation() !== null) {\n marker.setAnimation(null);\n infowindow.open(map, marker);\n\n } else {\n marker.setAnimation(google.maps.Animation.BOUNCE);\n }\n }\n\n\n }, function () {\n handleLocationError(true, infoWindow, map.getCenter());\n });\n // NAVEGADOR NO SOPORTA GEOLOCALIZACION\n } else {\n handleLocationError(false, infoWindow, map.getCenter());\n }\n\n\n function handleLocationError(browserHasGeolocation, infoWindow, pos) {\n infoWindow.setPosition(pos);\n infoWindow.setContent(browserHasGeolocation ?\n 'Error: El servicio de geolocalización falló.' :\n 'Error: Tu navegador no admite la geolocalización');\n infoWindow.open(map);\n }\n\n\n var flightPlanCoordinates = [\n {lat: 6.313505, lng: -75.570131},\n {lat: 6.313129, lng: -75.570095},\n {lat: 6.312812, lng: -75.570097},\n {lat: 6.312655, lng: -75.570084},\n {lat: 6.312610, lng: -75.570070},\n {lat: 6.312160, lng: -75.569945},\n {lat: 6.311232, lng: -75.569894},\n {lat: 6.311168, lng: -75.569897},\n {lat: 6.311096, lng: -75.569905},\n {lat: 6.310767, lng: -75.570024},\n {lat: 6.310723, lng: -75.569979},\n {lat: 6.310487, lng: -75.569182},\n {lat: 6.309711, lng: -75.569451},\n {lat: 6.307985, lng: -75.570009},\n {lat: 6.307507, lng: -75.570235},\n {lat: 6.306709, lng: -75.570527},\n {lat: 6.306624, lng: -75.570549},\n {lat: 6.306373, lng: -75.570583},\n {lat: 6.303782, lng: -75.570619},\n {lat: 6.303725, lng: -75.570627},\n {lat: 6.303579, lng: -75.570679},\n {lat: 6.303497, lng: -75.570755},\n {lat: 6.303285, lng: -75.571055},\n {lat: 6.302518, lng: -75.572121},\n {lat: 6.302418, lng: -75.572207},\n {lat: 6.301994, lng: -75.572442},\n {lat: 6.301601, lng: -75.572637},\n {lat: 6.301572, lng: -75.572580},\n {lat: 6.300192, lng: -75.569817},\n {lat: 6.300288, lng: -75.569012},\n {lat: 6.301461, lng: -75.566276},\n {lat: 6.301013, lng: -75.566297},\n {lat: 6.297771, lng: -75.567166},\n {lat: 6.296780, lng: -75.567552},\n {lat: 6.296471, lng: -75.567606},\n {lat: 6.295543, lng: -75.567660},\n {lat: 6.295031, lng: -75.567960},\n {lat: 6.294253, lng: -75.568625},\n {lat: 6.293251, lng: -75.569129},\n {lat: 6.291449, lng: -75.569623},\n {lat: 6.288996, lng: -75.570513},\n {lat: 6.287396, lng: -75.570363},\n {lat: 6.287055, lng: -75.570406},\n {lat: 6.285370, lng: -75.570953},\n {lat: 6.283642, lng: -75.571811},\n {lat: 6.282949, lng: -75.572036},\n {lat: 6.279366, lng: -75.572637},\n {lat: 6.274940, lng: -75.573935},\n {lat: 6.270922, lng: -75.575680},\n {lat: 6.268085, lng: -75.576860},\n {lat: 6.266336, lng: -75.577246},\n {lat: 6.265728, lng: -75.577503},\n {lat: 6.263104, lng: -75.579338},\n {lat: 6.262635, lng: -75.579638},\n {lat: 6.261995, lng: -75.579863},\n {lat: 6.261515, lng: -75.579927},\n {lat: 6.260235, lng: -75.579788},\n {lat: 6.259830, lng: -75.579842},\n {lat: 6.256677, lng: -75.580938},\n {lat: 6.259012, lng: -75.585853},\n {lat: 6.258431, lng: -75.586153},\n {lat: 6.255968, lng: -75.580891},\n {lat: 6.253280, lng: -75.575553},\n {lat: 6.252805, lng: -75.575263},\n {lat: 6.252442, lng: -75.575150},\n {lat: 6.248839, lng: -75.575301}\n\n\n ];\n var flightPath = new google.maps.Polyline({\n path: flightPlanCoordinates,\n geodesic: true,\n strokeColor: '#ff1300',\n strokeOpacity: 2.0,\n strokeWeight: 5\n });\n\n\n flightPath.setMap(map);\n\n /* APARECER Y DESAPARECER CUADRO DE INFORMACION */\n\n $(\"#informacion283\").css(\"display\", \"block\");\n $(\"#informacion284\").css(\"display\", \"none\");\n $(\"#informacion288\").css(\"display\", \"none\");\n $(\"#informacion254\").css(\"display\", \"none\");\n $(\"#informacion263\").css(\"display\", \"none\");\n $(\"#informacion261\").css(\"display\", \"none\");\n\n\n}", "title": "" }, { "docid": "0dd42e0e268195f7830461567d549685", "score": "0.63627374", "text": "function creaMappa(centroDefault) {\n \n // Verifico la compatibilita' del browser con le GMap\n if ( GBrowserIsCompatible() ) {\n \n // Aggancio la Mappa ad un elemento HTML \n map = new GMap2( document.getElementById(\"carPoolingMap\") );\n \n // Creo un nuovo geocoder e azzero la cache\n geocoder = new GClientGeocoder();\n geocoder.setCache(null);\n \n /* Inizializza la mappa. \n * Il principio a'¨ questo: ho bisogno delle coordinate geografiche\n * di un punto, ma ho solo il nome (es. Catania). Sfrutto allora\n * il metodo getLatLng che passa automaticamente alla funzione chiusura ( 2° argomento )\n * il punto che mi interessa, che si a'¨ calcolato sempre automaticamente.\n */\n geocoder.getLatLng( centroDefault, function( puntoGeografico ) {\n // Localita' inesistente\n if (!puntoGeografico) \n\t alert(partenza + \" non e' una localita' valida.\"); \n \n // altrimenti carico le coordinate del punto\n\t else { \n\t // con livello di zoom 13\n\t map.setCenter(puntoGeografico, 13);\n\t \n\t // Creo il testo di benvenuto\n\t welcome = \"Travel Together !\"\n\t map.openInfoWindow(map.getCenter(),document.createTextNode(welcome));\n }\n } );\n \n // Aggiungo zoom e scrooling\n map.addControl(new GSmallMapControl());\n map.enableScrollWheelZoom();\n\n // Aggiungo il controllo mappa-satellite-ibrida in alto a destra\n var topRight = new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(5,5));\n map.addControl(new GMapTypeControl(),topRight);\n }\n}", "title": "" }, { "docid": "d1708699c5ba2f95695ffd3188f2b560", "score": "0.63618666", "text": "function showMarkers(){\r\n setAllMap(map);\r\n}", "title": "" }, { "docid": "4c98e4cf74d3b77640d625301dff2f9b", "score": "0.6360479", "text": "mostrarEstablecimientos() {\n this.api.obtenerDatos()\n .then(datos => {\n const resultado = datos.respuestaJSON.results;\n\n // Muestra los pines en el Mapa\n this.mostrarMapa(resultado);\n } )\n }", "title": "" }, { "docid": "ef462029fa5f586db1716917a435b04e", "score": "0.635641", "text": "function terminalNorte() {\n var map = new google.maps.Map(document.getElementById('map'), {\n zoom: 18,\n center: {lat: 6.279882, lng: -75.571388},\n // mapTypeId: 'roadmap'\n styles: [\n {elementType: 'geometry', stylers: [{color: '#242f3e'}]},\n {elementType: 'labels.text.stroke', stylers: [{color: '#242f3e'}]},\n {elementType: 'labels.text.fill', stylers: [{color: '#746855'}]},\n {\n featureType: 'administrative.locality',\n elementType: 'labels.text.fill',\n stylers: [{color: '#d59563'}]\n },\n {\n featureType: 'poi',\n elementType: 'labels.text.fill',\n stylers: [{color: '#d59563'}]\n },\n {\n featureType: 'poi.park',\n elementType: 'geometry',\n stylers: [{color: '#263c3f'}]\n },\n {\n featureType: 'poi.park',\n elementType: 'labels.text.fill',\n stylers: [{color: '#6b9a76'}]\n },\n {\n featureType: 'road',\n elementType: 'geometry',\n stylers: [{color: '#38414e'}]\n },\n {\n featureType: 'road',\n elementType: 'geometry.stroke',\n stylers: [{color: '#212a37'}]\n },\n {\n featureType: 'road',\n elementType: 'labels.text.fill',\n stylers: [{color: '#9ca5b3'}]\n },\n {\n featureType: 'road.highway',\n elementType: 'geometry',\n stylers: [{color: '#746855'}]\n },\n {\n featureType: 'road.highway',\n elementType: 'geometry.stroke',\n stylers: [{color: '#1f2835'}]\n },\n {\n featureType: 'road.highway',\n elementType: 'labels.text.fill',\n stylers: [{color: '#f3d19c'}]\n },\n {\n featureType: 'transit',\n elementType: 'geometry',\n stylers: [{color: '#2f3948'}]\n },\n {\n featureType: 'transit.station',\n elementType: 'labels.text.fill',\n stylers: [{color: '#d59563'}]\n },\n {\n featureType: 'water',\n elementType: 'geometry',\n stylers: [{color: '#17263c'}]\n },\n {\n featureType: 'water',\n elementType: 'labels.text.fill',\n stylers: [{color: '#515c6d'}]\n },\n {\n featureType: 'water',\n elementType: 'labels.text.stroke',\n stylers: [{color: '#17263c'}]\n }\n ]\n });\n\n\n// GEOLOCATION\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(function (position) {\n var pos = {\n lat: position.coords.latitude,\n lng: position.coords.longitude\n };\n\n var contentString = 'Mi Ubicación';\n\n var infowindow = new google.maps.InfoWindow({\n content: contentString\n });\n\n var marker = new google.maps.Marker({\n position: pos,\n map: map,\n title: 'Mi ubicación',\n draggable: true,\n animation: google.maps.Animation.DROP,\n\n });\n marker.addListener('click', toggleBounce);\n\n\n function toggleBounce() {\n if (marker.getAnimation() !== null) {\n marker.setAnimation(null);\n infowindow.open(map, marker);\n\n } else {\n marker.setAnimation(google.maps.Animation.BOUNCE);\n }\n }\n\n\n }, function () {\n handleLocationError(true, infoWindow, map.getCenter());\n });\n // NAVEGADOR NO SOPORTA GEOLOCALIZACION\n } else {\n handleLocationError(false, infoWindow, map.getCenter());\n }\n\n\n function handleLocationError(browserHasGeolocation, infoWindow, pos) {\n infoWindow.setPosition(pos);\n infoWindow.setContent(browserHasGeolocation ?\n 'Error: El servicio de geolocalización falló.' :\n 'Error: Tu navegador no admite la geolocalización');\n infoWindow.open(map);\n }\n\n// MARKER LUGARES DESTACADOS\n\n var image = 'https://developers.google.com/maps/documentation/javascript/examples/full/images/beachflag.png';\n var beachMarker = new google.maps.Marker({\n position: {lat: 6.279882, lng: -75.571388},\n map: map,\n icon: image\n });\n\n\n var flightPlanCoordinates = [\n {lat: 6.313505, lng: -75.570131},\n {lat: 6.313129, lng: -75.570095},\n {lat: 6.312812, lng: -75.570097},\n {lat: 6.312655, lng: -75.570084},\n {lat: 6.312610, lng: -75.570070},\n {lat: 6.312160, lng: -75.569945},\n {lat: 6.311232, lng: -75.569894},\n {lat: 6.311168, lng: -75.569897},\n {lat: 6.311096, lng: -75.569905},\n {lat: 6.310767, lng: -75.570024},\n {lat: 6.310723, lng: -75.569979},\n {lat: 6.310487, lng: -75.569182},\n {lat: 6.309711, lng: -75.569451},\n {lat: 6.307985, lng: -75.570009},\n {lat: 6.307507, lng: -75.570235},\n {lat: 6.306709, lng: -75.570527},\n {lat: 6.306624, lng: -75.570549},\n {lat: 6.306373, lng: -75.570583},\n {lat: 6.303782, lng: -75.570619},\n {lat: 6.303725, lng: -75.570627},\n {lat: 6.303579, lng: -75.570679},\n {lat: 6.303497, lng: -75.570755},\n {lat: 6.303285, lng: -75.571055},\n {lat: 6.302518, lng: -75.572121},\n {lat: 6.302418, lng: -75.572207},\n {lat: 6.301994, lng: -75.572442},\n {lat: 6.301601, lng: -75.572637},\n {lat: 6.301572, lng: -75.572580},\n {lat: 6.300192, lng: -75.569817},\n {lat: 6.300288, lng: -75.569012},\n {lat: 6.301461, lng: -75.566276},\n {lat: 6.301013, lng: -75.566297},\n {lat: 6.297771, lng: -75.567166},\n {lat: 6.296780, lng: -75.567552},\n {lat: 6.296471, lng: -75.567606},\n {lat: 6.295543, lng: -75.567660},\n {lat: 6.295031, lng: -75.567960},\n {lat: 6.294253, lng: -75.568625},\n {lat: 6.293251, lng: -75.569129},\n {lat: 6.291449, lng: -75.569623},\n {lat: 6.288996, lng: -75.570513},\n {lat: 6.287396, lng: -75.570363},\n {lat: 6.287055, lng: -75.570406},\n {lat: 6.285370, lng: -75.570953},\n {lat: 6.283642, lng: -75.571811},\n {lat: 6.282949, lng: -75.572036},\n {lat: 6.279366, lng: -75.572637},\n {lat: 6.274940, lng: -75.573935},\n {lat: 6.270922, lng: -75.575680},\n {lat: 6.268085, lng: -75.576860},\n {lat: 6.266336, lng: -75.577246},\n {lat: 6.265728, lng: -75.577503},\n {lat: 6.263104, lng: -75.579338},\n {lat: 6.262635, lng: -75.579638},\n {lat: 6.261995, lng: -75.579863},\n {lat: 6.261515, lng: -75.579927},\n {lat: 6.260235, lng: -75.579788},\n {lat: 6.259830, lng: -75.579842},\n {lat: 6.256677, lng: -75.580938},\n {lat: 6.259012, lng: -75.585853},\n {lat: 6.258431, lng: -75.586153},\n {lat: 6.255968, lng: -75.580891},\n {lat: 6.253280, lng: -75.575553},\n {lat: 6.252805, lng: -75.575263},\n {lat: 6.252442, lng: -75.575150},\n {lat: 6.248839, lng: -75.575301},\n {lat: 6.247313, lng: -75.575384},\n {lat: 6.246918, lng: -75.575403},\n {lat: 6.246834, lng: -75.575425},\n {lat: 6.246753, lng: -75.575468},\n {lat: 6.246675, lng: -75.575607},\n {lat: 6.246578, lng: -75.575698},\n {lat: 6.246466, lng: -75.575774},\n {lat: 6.246466, lng: -75.575774},\n {lat: 6.246048, lng: -75.575677},\n {lat: 6.245866, lng: -75.575528},\n {lat: 6.245793, lng: -75.575418},\n {lat: 6.245744, lng: -75.575281},\n {lat: 6.245749, lng: -75.575119},\n {lat: 6.245787, lng: -75.575038},\n {lat: 6.245944, lng: -75.574858},\n {lat: 6.245955, lng: -75.574824},\n {lat: 6.245922, lng: -75.574642},\n {lat: 6.245852, lng: -75.574398},\n {lat: 6.245725, lng: -75.574036},\n {lat: 6.245585, lng: -75.573650},\n {lat: 6.245411, lng: -75.573167},\n {lat: 6.245244, lng: -75.572700},\n {lat: 6.245194, lng: -75.572569},\n {lat: 6.245101, lng: -75.572257},\n {lat: 6.245067, lng: -75.572125},\n {lat: 6.245087, lng: -75.571975},\n {lat: 6.244881, lng: -75.571447},\n {lat: 6.244686, lng: -75.570923},\n {lat: 6.244499, lng: -75.570480},\n {lat: 6.244344, lng: -75.570048},\n {lat: 6.244180, lng: -75.569599},\n {lat: 6.244024, lng: -75.569146},\n {lat: 6.243882, lng: -75.568769},\n {lat: 6.243767, lng: -75.568423},\n {lat: 6.243691, lng: -75.568214},\n {lat: 6.243476, lng: -75.568109},\n {lat: 6.243346, lng: -75.568084},\n {lat: 6.243226, lng: -75.568106},\n {lat: 6.243132, lng: -75.568178},\n {lat: 6.243059, lng: -75.568323},\n {lat: 6.243064, lng: -75.568408},\n {lat: 6.243133, lng: -75.568552},\n {lat: 6.243404, lng: -75.568649},\n {lat: 6.243887, lng: -75.568418},\n {lat: 6.244234, lng: -75.568197},\n {lat: 6.244601, lng: -75.567962},\n {lat: 6.245130, lng: -75.567582},\n {lat: 6.245530, lng: -75.567285},\n {lat: 6.247001, lng: -75.566153},\n {lat: 6.247542, lng: -75.565744},\n {lat: 6.248069, lng: -75.565361},\n {lat: 6.248580, lng: -75.565029},\n {lat: 6.248985, lng: -75.564763},\n {lat: 6.249465, lng: -75.564491},\n {lat: 6.249870, lng: -75.564267},\n {lat: 6.250809, lng: -75.563731},\n {lat: 6.251673, lng: -75.563227},\n {lat: 6.252399, lng: -75.562813},\n {lat: 6.252897, lng: -75.562530},\n {lat: 6.253288, lng: -75.562282},\n {lat: 6.253545, lng: -75.562184},\n {lat: 6.253884, lng: -75.562130},\n {lat: 6.254168, lng: -75.562139},\n {lat: 6.254345, lng: -75.562185},\n {lat: 6.254633, lng: -75.562327},\n {lat: 6.254884, lng: -75.562541},\n {lat: 6.255675, lng: -75.563739},\n {lat: 6.256654, lng: -75.565287},\n {lat: 6.256894, lng: -75.565864},\n {lat: 6.257177, lng: -75.567489},\n {lat: 6.257502, lng: -75.569264},\n {lat: 6.257852, lng: -75.571120},\n {lat: 6.257919, lng: -75.571294},\n {lat: 6.257981, lng: -75.571394},\n {lat: 6.258149, lng: -75.571616},\n {lat: 6.260519, lng: -75.573359},\n {lat: 6.262287, lng: -75.574643},\n {lat: 6.262473, lng: -75.574772},\n {lat: 6.262602, lng: -75.574834},\n {lat: 6.262797, lng: -75.574899},\n {lat: 6.263336, lng: -75.574987},\n {lat: 6.264166, lng: -75.574993},\n {lat: 6.264266, lng: -75.574937},\n {lat: 6.265278, lng: -75.574845},\n {lat: 6.265506, lng: -75.574887},\n {lat: 6.265567, lng: -75.574906},\n {lat: 6.265609, lng: -75.575031},\n {lat: 6.265647, lng: -75.575087},\n {lat: 6.265721, lng: -75.575091},\n {lat: 6.265838, lng: -75.575346},\n {lat: 6.265838, lng: -75.575346},\n {lat: 6.266147, lng: -75.575841},\n {lat: 6.266246, lng: -75.575954},\n {lat: 6.266669, lng: -75.576198},\n {lat: 6.266912, lng: -75.576238},\n {lat: 6.267252, lng: -75.576196},\n {lat: 6.267785, lng: -75.576023},\n {lat: 6.267978, lng: -75.575925},\n {lat: 6.268187, lng: -75.575787},\n {lat: 6.268484, lng: -75.575691},\n {lat: 6.268752, lng: -75.575683},\n {lat: 6.269027, lng: -75.575734},\n {lat: 6.269298, lng: -75.575831},\n {lat: 6.269669, lng: -75.575900},\n {lat: 6.269930, lng: -75.575899},\n {lat: 6.270247, lng: -75.575831},\n {lat: 6.270504, lng: -75.575685},\n {lat: 6.270962, lng: -75.575529},\n {lat: 6.271095, lng: -75.575473},\n {lat: 6.271252, lng: -75.575450},\n {lat: 6.272191, lng: -75.575058},\n {lat: 6.272412, lng: -75.574975},\n {lat: 6.274122, lng: -75.574190},\n {lat: 6.274839, lng: -75.573843},\n {lat: 6.275523, lng: -75.573577},\n {lat: 6.277635, lng: -75.573018},\n {lat: 6.277874, lng: -75.572935},\n {lat: 6.279218, lng: -75.572557},\n {lat: 6.280034, lng: -75.572389},\n {lat: 6.282092, lng: -75.572122},\n {lat: 6.282385, lng: -75.571997},\n {lat: 6.282485, lng: -75.571962},\n {lat: 6.283559, lng: -75.571725},\n {lat: 6.285355, lng: -75.570813},\n {lat: 6.287064, lng: -75.570230},\n {lat: 6.287170, lng: -75.570196},\n {lat: 6.288267, lng: -75.570310},\n {lat: 6.288549, lng: -75.570348},\n {lat: 6.288894, lng: -75.570336},\n {lat: 6.289038, lng: -75.570311},\n {lat: 6.289890, lng: -75.569976},\n {lat: 6.291367, lng: -75.569495},\n {lat: 6.292042, lng: -75.569349},\n {lat: 6.293080, lng: -75.569087},\n {lat: 6.293357, lng: -75.568974},\n {lat: 6.294271, lng: -75.568450},\n {lat: 6.294427, lng: -75.568339},\n {lat: 6.295008, lng: -75.567783},\n {lat: 6.295569, lng: -75.567530},\n {lat: 6.296011, lng: -75.567438},\n {lat: 6.296454, lng: -75.567503},\n {lat: 6.296676, lng: -75.567528},\n {lat: 6.297411, lng: -75.567209},\n {lat: 6.298174, lng: -75.566916},\n {lat: 6.298808, lng: -75.566778},\n {lat: 6.299966, lng: -75.566473},\n {lat: 6.300844, lng: -75.566227},\n {lat: 6.301149, lng: -75.566177},\n {lat: 6.301507, lng: -75.566173},\n {lat: 6.301569, lng: -75.566194},\n {lat: 6.301055, lng: -75.567404},\n {lat: 6.300252, lng: -75.569367},\n {lat: 6.300231, lng: -75.569697},\n {lat: 6.300288, lng: -75.569852},\n {lat: 6.301698, lng: -75.572577},\n {lat: 6.302029, lng: -75.572404},\n {lat: 6.302385, lng: -75.572218},\n {lat: 6.302475, lng: -75.572148},\n {lat: 6.303481, lng: -75.570757},\n {lat: 6.303597, lng: -75.570658},\n {lat: 6.303780, lng: -75.570600},\n {lat: 6.306327, lng: -75.570568},\n {lat: 6.306535, lng: -75.570548},\n {lat: 6.306736, lng: -75.570503},\n {lat: 6.307424, lng: -75.570254},\n {lat: 6.307964, lng: -75.570006},\n {lat: 6.309213, lng: -75.569582},\n {lat: 6.310500, lng: -75.569160},\n {lat: 6.310751, lng: -75.570004},\n {lat: 6.311105, lng: -75.569884},\n {lat: 6.311247, lng: -75.569872},\n {lat: 6.312140, lng: -75.569923},\n {lat: 6.312313, lng: -75.569756},\n {lat: 6.312679, lng: -75.569480},\n {lat: 6.312951, lng: -75.569215},\n {lat: 6.313484, lng: -75.568643}\n\n\n ];\n var flightPath = new google.maps.Polyline({\n path: flightPlanCoordinates,\n geodesic: true,\n strokeColor: '#000bff',\n strokeOpacity: 2.0,\n strokeWeight: 5\n });\n\n\n flightPath.setMap(map);\n\n\n}", "title": "" }, { "docid": "a32da050c68e8f033cfad64d23d9ea96", "score": "0.6350669", "text": "function ruta284() {\n var map = new google.maps.Map(document.getElementById('map'), {\n zoom: 13,\n center: {lat: 6.2615713, lng: -75.5745807},\n styles: [\n {elementType: 'geometry', stylers: [{color: '#242f3e'}]},\n {elementType: 'labels.text.stroke', stylers: [{color: '#242f3e'}]},\n {elementType: 'labels.text.fill', stylers: [{color: '#746855'}]},\n {\n featureType: 'administrative.locality',\n elementType: 'labels.text.fill',\n stylers: [{color: '#d59563'}]\n },\n {\n featureType: 'poi',\n elementType: 'labels.text.fill',\n stylers: [{color: '#d59563'}]\n },\n {\n featureType: 'poi.park',\n elementType: 'geometry',\n stylers: [{color: '#263c3f'}]\n },\n {\n featureType: 'poi.park',\n elementType: 'labels.text.fill',\n stylers: [{color: '#6b9a76'}]\n },\n {\n featureType: 'road',\n elementType: 'geometry',\n stylers: [{color: '#38414e'}]\n },\n {\n featureType: 'road',\n elementType: 'geometry.stroke',\n stylers: [{color: '#212a37'}]\n },\n {\n featureType: 'road',\n elementType: 'labels.text.fill',\n stylers: [{color: '#9ca5b3'}]\n },\n {\n featureType: 'road.highway',\n elementType: 'geometry',\n stylers: [{color: '#746855'}]\n },\n {\n featureType: 'road.highway',\n elementType: 'geometry.stroke',\n stylers: [{color: '#1f2835'}]\n },\n {\n featureType: 'road.highway',\n elementType: 'labels.text.fill',\n stylers: [{color: '#f3d19c'}]\n },\n {\n featureType: 'transit',\n elementType: 'geometry',\n stylers: [{color: '#2f3948'}]\n },\n {\n featureType: 'transit.station',\n elementType: 'labels.text.fill',\n stylers: [{color: '#d59563'}]\n },\n {\n featureType: 'water',\n elementType: 'geometry',\n stylers: [{color: '#17263c'}]\n },\n {\n featureType: 'water',\n elementType: 'labels.text.fill',\n stylers: [{color: '#515c6d'}]\n },\n {\n featureType: 'water',\n elementType: 'labels.text.stroke',\n stylers: [{color: '#17263c'}]\n }\n ]\n\n\n });\n\n infoWindow = new google.maps.InfoWindow;\n\n// GEOLOCATION\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(function (position) {\n var pos = {\n lat: position.coords.latitude,\n lng: position.coords.longitude\n };\n\n var contentString = 'Mi Ubicación';\n\n var infowindow = new google.maps.InfoWindow({\n content: contentString\n });\n\n var marker = new google.maps.Marker({\n position: pos,\n map: map,\n title: 'Mi Ubicación',\n draggable: true,\n animation: google.maps.Animation.DROP,\n\n });\n marker.addListener('click', toggleBounce);\n\n\n function toggleBounce() {\n if (marker.getAnimation() !== null) {\n marker.setAnimation(null);\n infowindow.open(map, marker);\n\n } else {\n marker.setAnimation(google.maps.Animation.BOUNCE);\n }\n }\n\n\n }, function () {\n handleLocationError(true, infoWindow, map.getCenter());\n });\n // NAVEGADOR NO SOPORTA GEOLOCALIZACION\n } else {\n handleLocationError(false, infoWindow, map.getCenter());\n }\n\n\n function handleLocationError(browserHasGeolocation, infoWindow, pos) {\n infoWindow.setPosition(pos);\n infoWindow.setContent(browserHasGeolocation ?\n 'Error: El servicio de geolocalización falló.' :\n 'Error: Tu navegador no admite la geolocalización');\n infoWindow.open(map);\n }\n\n\n var flightPlanCoordinates = [\n\n {lat: 6.313505, lng: -75.570131},\n {lat: 6.313129, lng: -75.570095},\n {lat: 6.312812, lng: -75.570097},\n {lat: 6.312655, lng: -75.570084},\n {lat: 6.312610, lng: -75.570070},\n {lat: 6.312160, lng: -75.569945},\n {lat: 6.311232, lng: -75.569894},\n {lat: 6.311168, lng: -75.569897},\n {lat: 6.311096, lng: -75.569905},\n {lat: 6.310767, lng: -75.570024},\n {lat: 6.310723, lng: -75.569979},\n {lat: 6.310487, lng: -75.569182},\n {lat: 6.309711, lng: -75.569451},\n {lat: 6.307985, lng: -75.570009},\n {lat: 6.307507, lng: -75.570235},\n {lat: 6.306709, lng: -75.570527},\n {lat: 6.306624, lng: -75.570549},\n {lat: 6.306373, lng: -75.570583},\n {lat: 6.303782, lng: -75.570619},\n {lat: 6.303725, lng: -75.570627},\n {lat: 6.303579, lng: -75.570679},\n {lat: 6.303497, lng: -75.570755},\n {lat: 6.303285, lng: -75.571055},\n {lat: 6.302518, lng: -75.572121},\n {lat: 6.302418, lng: -75.572207},\n {lat: 6.301994, lng: -75.572442},\n {lat: 6.301601, lng: -75.572637},\n {lat: 6.301572, lng: -75.572580},\n {lat: 6.300192, lng: -75.569817},\n {lat: 6.300288, lng: -75.569012},\n {lat: 6.301461, lng: -75.566276},\n {lat: 6.301013, lng: -75.566297},\n {lat: 6.297771, lng: -75.567166},\n {lat: 6.296780, lng: -75.567552},\n {lat: 6.296471, lng: -75.567606},\n {lat: 6.295543, lng: -75.567660},\n {lat: 6.295031, lng: -75.567960},\n {lat: 6.294253, lng: -75.568625},\n {lat: 6.293251, lng: -75.569129},\n {lat: 6.291449, lng: -75.569623},\n {lat: 6.288996, lng: -75.570513},\n {lat: 6.287396, lng: -75.570363},\n {lat: 6.287055, lng: -75.570406},\n {lat: 6.285370, lng: -75.570953},\n {lat: 6.283642, lng: -75.571811},\n {lat: 6.282949, lng: -75.572036},\n {lat: 6.279366, lng: -75.572637},\n {lat: 6.274940, lng: -75.573935},\n {lat: 6.270922, lng: -75.575680},\n {lat: 6.268085, lng: -75.576860},\n {lat: 6.266336, lng: -75.577246},\n {lat: 6.265728, lng: -75.577503},\n {lat: 6.263104, lng: -75.579338},\n {lat: 6.262635, lng: -75.579638},\n {lat: 6.261995, lng: -75.579863},\n {lat: 6.261515, lng: -75.579927},\n {lat: 6.260235, lng: -75.579788},\n {lat: 6.259830, lng: -75.579842},\n {lat: 6.256677, lng: -75.580938},\n {lat: 6.259012, lng: -75.585853},\n {lat: 6.258431, lng: -75.586153},\n {lat: 6.255968, lng: -75.580891},\n {lat: 6.253280, lng: -75.575553},\n {lat: 6.252805, lng: -75.575263},\n {lat: 6.252442, lng: -75.575150},\n {lat: 6.248839, lng: -75.575301},\n {lat: 6.247313, lng: -75.575384},\n {lat: 6.246918, lng: -75.575403},\n {lat: 6.246834, lng: -75.575425},\n {lat: 6.246753, lng: -75.575468},\n {lat: 6.246675, lng: -75.575607},\n {lat: 6.246578, lng: -75.575698},\n {lat: 6.246466, lng: -75.575774},\n {lat: 6.246466, lng: -75.575774},\n {lat: 6.246048, lng: -75.575677},\n {lat: 6.245866, lng: -75.575528},\n {lat: 6.245793, lng: -75.575418},\n {lat: 6.245744, lng: -75.575281},\n {lat: 6.245749, lng: -75.575119},\n {lat: 6.245787, lng: -75.575038},\n {lat: 6.245944, lng: -75.574858},\n {lat: 6.245955, lng: -75.574824},\n {lat: 6.245922, lng: -75.574642},\n {lat: 6.245852, lng: -75.574398},\n {lat: 6.245725, lng: -75.574036},\n {lat: 6.245585, lng: -75.573650},\n {lat: 6.245411, lng: -75.573167},\n {lat: 6.245244, lng: -75.572700},\n {lat: 6.245194, lng: -75.572569},\n {lat: 6.245101, lng: -75.572257},\n {lat: 6.245067, lng: -75.572125},\n {lat: 6.245087, lng: -75.571975},\n {lat: 6.244881, lng: -75.571447},\n {lat: 6.244686, lng: -75.570923},\n {lat: 6.244499, lng: -75.570480},\n {lat: 6.244344, lng: -75.570048},\n {lat: 6.244180, lng: -75.569599},\n {lat: 6.244024, lng: -75.569146},\n {lat: 6.243882, lng: -75.568769},\n {lat: 6.243767, lng: -75.568423},\n {lat: 6.243691, lng: -75.568214},\n {lat: 6.243476, lng: -75.568109},\n {lat: 6.243346, lng: -75.568084},\n {lat: 6.243226, lng: -75.568106},\n {lat: 6.243132, lng: -75.568178},\n {lat: 6.243059, lng: -75.568323},\n {lat: 6.243064, lng: -75.568408},\n {lat: 6.243133, lng: -75.568552},\n {lat: 6.243404, lng: -75.568649},\n {lat: 6.243887, lng: -75.568418},\n {lat: 6.244234, lng: -75.568197},\n {lat: 6.244601, lng: -75.567962},\n {lat: 6.245130, lng: -75.567582},\n {lat: 6.245530, lng: -75.567285},\n {lat: 6.247001, lng: -75.566153},\n {lat: 6.247542, lng: -75.565744},\n {lat: 6.248069, lng: -75.565361},\n {lat: 6.248580, lng: -75.565029},\n {lat: 6.248985, lng: -75.564763},\n {lat: 6.249465, lng: -75.564491},\n {lat: 6.249870, lng: -75.564267},\n {lat: 6.250809, lng: -75.563731},\n {lat: 6.251673, lng: -75.563227},\n {lat: 6.252399, lng: -75.562813},\n {lat: 6.252897, lng: -75.562530},\n {lat: 6.253288, lng: -75.562282},\n {lat: 6.253545, lng: -75.562184},\n {lat: 6.253884, lng: -75.562130},\n {lat: 6.254168, lng: -75.562139},\n {lat: 6.254345, lng: -75.562185},\n {lat: 6.254633, lng: -75.562327},\n {lat: 6.254884, lng: -75.562541},\n {lat: 6.255675, lng: -75.563739},\n {lat: 6.256654, lng: -75.565287},\n {lat: 6.256894, lng: -75.565864},\n {lat: 6.257177, lng: -75.567489},\n {lat: 6.257502, lng: -75.569264},\n {lat: 6.257852, lng: -75.571120},\n {lat: 6.257919, lng: -75.571294},\n {lat: 6.257981, lng: -75.571394},\n {lat: 6.258149, lng: -75.571616},\n {lat: 6.260519, lng: -75.573359},\n {lat: 6.262287, lng: -75.574643},\n {lat: 6.262473, lng: -75.574772},\n {lat: 6.262602, lng: -75.574834},\n {lat: 6.262797, lng: -75.574899},\n {lat: 6.263336, lng: -75.574987},\n {lat: 6.264166, lng: -75.574993},\n {lat: 6.264266, lng: -75.574937},\n {lat: 6.265278, lng: -75.574845},\n {lat: 6.265506, lng: -75.574887},\n {lat: 6.265567, lng: -75.574906},\n {lat: 6.265609, lng: -75.575031},\n {lat: 6.265647, lng: -75.575087},\n {lat: 6.265721, lng: -75.575091},\n {lat: 6.265838, lng: -75.575346},\n {lat: 6.265838, lng: -75.575346},\n {lat: 6.266147, lng: -75.575841},\n {lat: 6.266246, lng: -75.575954},\n {lat: 6.266669, lng: -75.576198},\n {lat: 6.266912, lng: -75.576238},\n {lat: 6.267252, lng: -75.576196},\n {lat: 6.267785, lng: -75.576023},\n {lat: 6.267978, lng: -75.575925},\n {lat: 6.268187, lng: -75.575787},\n {lat: 6.268484, lng: -75.575691},\n {lat: 6.268752, lng: -75.575683},\n {lat: 6.269027, lng: -75.575734},\n {lat: 6.269298, lng: -75.575831},\n {lat: 6.269669, lng: -75.575900},\n {lat: 6.269930, lng: -75.575899},\n {lat: 6.270247, lng: -75.575831},\n {lat: 6.270504, lng: -75.575685},\n {lat: 6.270962, lng: -75.575529},\n {lat: 6.271095, lng: -75.575473},\n {lat: 6.271252, lng: -75.575450},\n {lat: 6.272191, lng: -75.575058},\n {lat: 6.272412, lng: -75.574975},\n {lat: 6.274122, lng: -75.574190},\n {lat: 6.274839, lng: -75.573843},\n {lat: 6.275523, lng: -75.573577},\n {lat: 6.277635, lng: -75.573018},\n {lat: 6.277874, lng: -75.572935},\n {lat: 6.279218, lng: -75.572557},\n {lat: 6.280034, lng: -75.572389},\n {lat: 6.282092, lng: -75.572122},\n {lat: 6.282385, lng: -75.571997},\n {lat: 6.282485, lng: -75.571962},\n {lat: 6.283559, lng: -75.571725},\n {lat: 6.285355, lng: -75.570813},\n {lat: 6.287064, lng: -75.570230},\n {lat: 6.287170, lng: -75.570196},\n {lat: 6.288267, lng: -75.570310},\n {lat: 6.288549, lng: -75.570348},\n {lat: 6.288894, lng: -75.570336},\n {lat: 6.289038, lng: -75.570311},\n {lat: 6.289890, lng: -75.569976},\n {lat: 6.291367, lng: -75.569495},\n {lat: 6.292042, lng: -75.569349},\n {lat: 6.293080, lng: -75.569087},\n {lat: 6.293357, lng: -75.568974},\n {lat: 6.294271, lng: -75.568450},\n {lat: 6.294427, lng: -75.568339},\n {lat: 6.295008, lng: -75.567783},\n {lat: 6.295569, lng: -75.567530},\n {lat: 6.296011, lng: -75.567438},\n {lat: 6.296454, lng: -75.567503},\n {lat: 6.296676, lng: -75.567528},\n {lat: 6.297411, lng: -75.567209},\n {lat: 6.298174, lng: -75.566916},\n {lat: 6.298808, lng: -75.566778},\n {lat: 6.299966, lng: -75.566473},\n {lat: 6.300844, lng: -75.566227},\n {lat: 6.301149, lng: -75.566177},\n {lat: 6.301507, lng: -75.566173},\n {lat: 6.301569, lng: -75.566194},\n {lat: 6.301055, lng: -75.567404},\n {lat: 6.300252, lng: -75.569367},\n {lat: 6.300231, lng: -75.569697},\n {lat: 6.300288, lng: -75.569852},\n {lat: 6.301698, lng: -75.572577},\n {lat: 6.302029, lng: -75.572404},\n {lat: 6.302385, lng: -75.572218},\n {lat: 6.302475, lng: -75.572148},\n {lat: 6.303481, lng: -75.570757},\n {lat: 6.303597, lng: -75.570658},\n {lat: 6.303780, lng: -75.570600},\n {lat: 6.306327, lng: -75.570568},\n {lat: 6.306535, lng: -75.570548},\n {lat: 6.306736, lng: -75.570503},\n {lat: 6.307424, lng: -75.570254},\n {lat: 6.307964, lng: -75.570006},\n {lat: 6.309213, lng: -75.569582},\n {lat: 6.310500, lng: -75.569160},\n {lat: 6.310751, lng: -75.570004},\n {lat: 6.311105, lng: -75.569884},\n {lat: 6.311247, lng: -75.569872},\n {lat: 6.312140, lng: -75.569923},\n {lat: 6.312313, lng: -75.569756},\n {lat: 6.312679, lng: -75.569480},\n {lat: 6.312951, lng: -75.569215},\n {lat: 6.313484, lng: -75.568643}\n\n\n ];\n var flightPath = new google.maps.Polyline({\n path: flightPlanCoordinates,\n geodesic: true,\n strokeColor: '#000bff',\n strokeOpacity: 2.0,\n strokeWeight: 5\n });\n\n\n flightPath.setMap(map);\n\n /* APARECER Y DESAPARECER CUADRO DE INFORMACION */\n\n $(\"#informacion284\").css(\"display\", \"block\");\n $(\"#informacion288\").css(\"display\", \"none\");\n $(\"#informacion283\").css(\"display\", \"none\");\n $(\"#informacion254\").css(\"display\", \"none\");\n $(\"#informacion263\").css(\"display\", \"none\");\n $(\"#informacion261\").css(\"display\", \"none\");\n\n\n}", "title": "" }, { "docid": "42ab402cdaa99fbe5a4b5a253855bfd8", "score": "0.6339008", "text": "function repintarMapa(todos){\n\t\t//map.off();\n\t\tmap.remove();\n\t\t//map._clearPanes();\n\t //map = new L.Map('map');\n\t\tif(puntos.length>0)\n\t\t\tmap=L.mapbox.map('map', 'samuelpo.11p0le68').setView([puntos[0].st_y,puntos[0].st_x], 17);\n\t\telse\n\t\t\tmap=L.mapbox.map('map', 'samuelpo.11p0le68').setView([19.381113715771875, -99.1351318359375], 6);\n\t\tcargarPuntos(todos);\n\t\tcargarMultipoligonos(todos);\n\t}", "title": "" }, { "docid": "05c5e4adcf19d91cdfb6afd8177e0a61", "score": "0.63359207", "text": "function initMapBarriosPage() {\n\tgetCurrentDatasource();\n\n\t// Set Barrio info labels.\n \tvar partido_label = document.getElementById('partido_label');\n\tpartido_label.innerHTML = \n\t\tcurrent_datasource.alias_municipio.substr(0, 1).toUpperCase() + \n\t\tcurrent_datasource.alias_municipio.substr(1) + ':';\n\n \tvar localidad_label = document.getElementById('localidad_label');\n\tlocalidad_label.innerHTML = \n\t\tcurrent_datasource.alias_localidad.substr(0, 1).toUpperCase() + \n\t\tcurrent_datasource.alias_localidad.substr(1) + ':';\n\n \tmap = new google.maps.Map(document.getElementById('map_canvas'), {\n \t\tcenter: new google.maps.LatLng(current_datasource.center_lat_lng[0],\n \t\t\t\t\t\t\t\t\t\tcurrent_datasource.center_lat_lng[1]),\n \tzoom: current_datasource.startZoom,\n \tminZoom: 2, // 9\n \tmapTypeId: google.maps.MapTypeId.HYBRID,\n// \tmapTypeId: google.maps.MapTypeId.ROADMAP,\n \t\tmapTypeControl: true,\n \tmapTypeControlOptions: {\n \tstyle: google.maps.MapTypeControlStyle.DROPDOWN_MENU,\n \tposition: google.maps.ControlPosition.LEFT_CENTER\n \t}, \t\n// \toverviewMapControl: true,\n// \t overviewMapControlOptions: {\n// \t \topened: true,\n// \tposition: google.maps.ControlPosition.BOTTOM,\n// \t\t},\n\t\tzoomControlOptions: {\n \t\tstyle: google.maps.ZoomControlStyle.SMALL,\n \t\tposition: google.maps.ControlPosition.LEFT_CENTER\n \t},\n \tpanControl: true,\n \tpanControlOptions: {\n \tposition: google.maps.ControlPosition.LEFT_CENTER\n \t},\n \tstreetViewControl: false\n \t} );\n\n// \tmini_map = new google.maps.Map(document.getElementById('mini_map_canvas'), {\n// \t\tcenter: new google.maps.LatLng(current_datasource.center_lat_lng[0],\n// \t\t\t\t\t\t\t\t\t\tcurrent_datasource.center_lat_lng[1]),\n// \tzoom: 8,\n// \tminZoom: 8,\n// \t\tzoomControl: false,\n// \t\tscaleControl: false,\n// \t\tscrollwheel: false,\n// \t\tdisableDoubleClickZoom: true, \t\n// \tmapTypeId: google.maps.MapTypeId.HYBRID,\n// \t//mapTypeId: google.maps.MapTypeId.ROADMAP,\n// \tmapTypeControl: false,\n// \t\tzoomControl: false,\n// \tstreetViewControl: false\n// \t} );\n\n\t// Bind the maps together\n// \tmini_map.bindTo('center', map, 'center');\n\n \tinitMapLayer();\n \tinitLayer.setMap(map);\n// \tinitMiniMapLayer();\n// \tinitMiniLayer.setMap(mini_map);\n\n\tif ( current_datasource.name == 'Buenos Aires' ) {\n \t\tupdateMap();\n \t}\n \t\n \t// Show province data (all data).\n \tsetViewToProvincia();\n\n \t// Init 'Barrio' search field.\n \tinitSearchFieldBarrio();\n\n \t// Init 'Partido' search field.\n \tinitSearchFieldPartido();\n}", "title": "" }, { "docid": "5d7d4ed7d3d09d3b6cc1c7740476b378", "score": "0.6335408", "text": "function inisialisasi()\n{\n\t//MEMBUAT PROPERTIES DARI PETA\n\tvar properti = {\n\t\tcenter:new google.maps.LatLng(1.2413579498795726,109.610595703125),\n\t\tzoom:10,\n\t\tmapTypeId:google.maps.MapTypeId.HYBRID\n\t};\n\n\t//MEMBUAT SEBUAH PETA DENGAN PROPERTIES DARI VARIABEL properti\n\tpeta = new google.maps.Map(document.getElementById('peta'),properti);\t\n\n\tambil_infrastruktur(1);\n\tambil_infrastruktur(2);\n}", "title": "" }, { "docid": "299f16b084c13282f042fc57806f74c2", "score": "0.6328739", "text": "function mostrarMapa() {\n let mapa = document.querySelector('#mapaSede');\n let checkboxMapa = document.querySelector('#checkboxMostrarMapa');\n\n if (checkboxMapa.checked == false) {\n mapa.classList.add('ocultar');\n } else {\n mapa.classList.remove('ocultar');\n }\n}", "title": "" }, { "docid": "0abe7c15f32248f1e84239b5c0f4faf7", "score": "0.6311805", "text": "function viewmap(){\r\n document.getElementById('msg').style.display = 'none';\r\n document.getElementById('mapa').style.display = 'block';\r\n }", "title": "" }, { "docid": "9abd455a0ebb4f0685f79e17adca1100", "score": "0.63030255", "text": "function verUbicacionCampos (ubicacion){\n var coordenadas = ubicacion.split(\"/\");\n $(\"#mapModal\").modal(\"show\");\n $('#map-canvas').addClass('loading'); \n var latlng = new google.maps.LatLng(coordenadas[0] ,coordenadas[1]); \n var settings = {\n zoom: 16,\n center: latlng,\n mapTypeId: google.maps.MapTypeId.ROADMAP,\n mapTypeControl: false,\n scrollwheel: false,\n draggable: true,\n styles: [{\"featureType\":\"landscape.natural\",\"elementType\":\"geometry.fill\",\"stylers\":[{\"visibility\":\"on\"},{\"color\":\"#e0efef\"}]},{\"featureType\":\"poi\",\"elementType\":\"geometry.fill\",\"stylers\":[{\"visibility\":\"on\"},{\"hue\":\"#1900ff\"},{\"color\":\"#c0e8e8\"}]},{\"featureType\":\"road\",\"elementType\":\"geometry\",\"stylers\":[{\"lightness\":100},{\"visibility\":\"simplified\"}]},{\"featureType\":\"road\",\"elementType\":\"labels\",\"stylers\":[{\"visibility\":\"off\"}]},{\"featureType\":\"transit.line\",\"elementType\":\"geometry\",\"stylers\":[{\"visibility\":\"on\"},{\"lightness\":700}]},{\"featureType\":\"water\",\"elementType\":\"all\",\"stylers\":[{\"color\":\"#7dcdcd\"}]}],\n mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},\n navigationControl: false,\n navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL}, \n };\n var map = new google.maps.Map(document.getElementById(\"map-canvas\"), settings);\n\n google.maps.event.addDomListener(map, \"load\", function() {\n var center = map.getCenter();\n google.maps.event.trigger(map, \"load\");\n map.setCenter(center);\n $('#map-canvas').removeClass('loading');\n });\n\n\n var campoImage = new google.maps.MarkerImage('/FutPlayFinal/material-dashboard/assets/img/map-marker.png',\n new google.maps.Size(36,62),\n new google.maps.Point(0,0),\n new google.maps.Point(18,52)\n );\n\n var campoPos = new google.maps.LatLng(coordenadas[0],coordenadas[1]);\n\n var campoMarker = new google.maps.Marker({\n position: campoPos,\n map: map,\n icon: campoImage,\n title:\"Shapeshift Interactive\",\n zIndex: 3\n });\n \n }", "title": "" }, { "docid": "5a220831ba2c24916fb339846398a542", "score": "0.6300586", "text": "function limpiar_marcadores(lista)\n{\n for (i in lista)\n {\n //QUITAR MARCADOR DEL MAPA\n lista[i].setMap(null);\n }\n}", "title": "" }, { "docid": "f2f37342048dd3088b54e6fd2ad5d726", "score": "0.6299495", "text": "function showMarkers() {\r\n setAllMap(map);\r\n}", "title": "" }, { "docid": "d8bcf09e4024a375c32e7b1c3201baa7", "score": "0.62978137", "text": "function cambiaEntidadMapa()\n{\n var idEntidadSel = $('#selectorEntidades option:selected').val();\n\n // Obtiene coordenadas del centro, y extremos del mapa de la entidad\n var puntos = puntosEntidades(idEntidadSel);\n // Centro visual del mapa\n var centroEntidad = puntos[2];\n\n // Limites de Mapa\n var esquinaSuperior = L.latLng(puntos[0][0], puntos[0][1]);\n var esquinaInferior = L.latLng(puntos[1][0], puntos[1][1]);\n var limitesMapa = L.latLngBounds(esquinaSuperior, esquinaInferior);\n\n // Zoom\n var zoomArea = puntos[3];\n\n // Cambia primero los topes de zoom y despues se mueve\n miMapa.options.minZoom = zoomArea[0];\n miMapa.options.maxZoom = zoomArea[1];\n zoomHome.setHomeBounds(limitesMapa);\n\n // Mueve el vio al centro de los limites\n // Lo que esta comentado, fija el movimiento\n miMapa.fitBounds(limitesMapa);\n // Marca los límites del area (entidad) seleccionada\n //miMapa.setMaxBounds(limitesMapa);\n //miMapa.on('drag', function () { miMapa.panInsideBounds(limitesMapa, { animate: false }); });\n miMapa.setZoom(zoomArea[0]); \n miMapa.panTo(centroEntidad);\n}", "title": "" }, { "docid": "70b7b8c0386ee94b15aeffdad716781f", "score": "0.628791", "text": "function creaRettangoliFacsimile(idMappa, idContenitoreRettangoli, idImmagine)\r\n{\r\n //si ottiene il <map> che ha id = idMappa\r\n var mappa = document.getElementById(idMappa);\r\n\r\n //si ottiene l'immagine, per estrarne la dimensione in pixel \r\n //dell'immagine originale (attributi naturalWidth e naturalHeight)\r\n //serve per calcolare le dimensioni dei rettangoli in percentuale (dopo)\r\n var img = document.getElementById(idImmagine);\r\n var imgWidth = img.naturalWidth;\r\n var imgHeight = img.naturalHeight;\r\n\r\n\r\n //si ottengono gli oggetti <area> della <map> (nel nostro caso sono tutti i suoi figli, non ci sono figli di altro tipo)\r\n var aree = mappa.children;\r\n\r\n //si ottiene il contenitore (un <div>) che ospiterà i rettangoli (per rendere visibili le zone del facsimile)\r\n var contenitoreRettangoli = document.getElementById(idContenitoreRettangoli);\r\n \r\n //per ogni area\r\n for (var indice = 0; indice < aree.length; indice++) \r\n {\r\n //si ottiene l'area\r\n var area = aree[indice];\r\n\r\n //si ottiene il valore dell'attributo coords, una stringa di 4 numeri interi separati da virgole\r\n //nel formato : \"ulx,uly,lrx,lry\"\r\n var coordinate = area.getAttribute(\"coords\");\r\n \r\n //si separano i 4 valori (separatore la virgola) e si convertono in numeri interi\r\n var coordinateSep = coordinate.split(\",\");\r\n var ulx = parseInt(coordinateSep[0]);\r\n var uly = parseInt(coordinateSep[1]);\r\n var lrx = parseInt(coordinateSep[2]);\r\n var lry = parseInt(coordinateSep[3]);\r\n\r\n //si ottengono i valori da inserire in left, top, width, height nello stile del rettangolo\r\n //left e top sono rispettivamente ulx, e uly\r\n //width è lrx - ulx, mentre e height è lry - uly\r\n var left = ulx;\r\n var top = uly;\r\n var width = lrx - ulx;\r\n var height = lry - uly;\r\n\r\n //si crea un rettangolo e vi si applica lo stile di base e si setta un id univoco relativo all'area\r\n var rettangolo = document.createElement(\"div\");\r\n rettangolo.className = \"rettangolo_zona\";\r\n rettangolo.id = \"rettangolo_\" + area.id;\r\n\r\n //si applica lo stile (posizione e dimensione), espresso in percentuale\r\n //per adattarsi allo stile del div contenitore\r\n rettangolo.style.left = (left / imgWidth * 100) + \"%\";\r\n rettangolo.style.top = (top / imgHeight * 100) + \"%\";\r\n rettangolo.style.width = (width / imgWidth * 100) + \"%\";\r\n rettangolo.style.height = (height / imgHeight * 100) + \"%\";\r\n \r\n //e si rende visibile ma non selezionato.\r\n rettangolo.style.opacity = 0.25;\r\n\r\n //si inserisce il rettangolo nel contenitore\r\n contenitoreRettangoli.appendChild(rettangolo);\r\n\r\n //si collegano gli eventi di passaggio del mouse alle aree della map\r\n rettangolo.onmouseenter = function(evento) \r\n {\r\n console.log(\"onmouseenter\", evento);\r\n\r\n //si ottiene il rettangolo\r\n var rettangolo = evento.target;\r\n\r\n //si rende selezionato il rettangolo relativo all'area della mappa su cui è il mouse \r\n rettangolo.style.opacity = 1;\r\n\r\n //si accende il relativo elemento sulla trascrizione\r\n //prima si deve creare l'id a partire da quello del rettangolo\r\n var id = rettangolo.id.split(\"rettangolo_\")[1];\r\n var elementoTrascrizione = document.getElementById(\"trascr_facs_#\" + id);\r\n console.log(elementoTrascrizione);\r\n if(elementoTrascrizione != null)\r\n {\r\n elementoTrascrizione.classList.add(\"facs_selezionato\");\r\n }\r\n\r\n //si accende il relativo elemento sulla traduzione\r\n var nTraduzione = elementoTrascrizione.getAttribute(\"n_traduzione\");\r\n aggiornaElementiTraduzione(nTraduzione);\r\n }\r\n\r\n rettangolo.onmouseleave = function(evento) {\r\n\r\n console.log(\"onmouseleave\", evento);\r\n\r\n ///si ottiene il rettangolo\r\n var rettangolo = evento.target;\r\n\r\n //si rende visibile il rettangolo relativo all'area della mappa su cui è il mouse \r\n rettangolo.style.opacity = 0.25;\r\n\r\n //si spegne il relativo elemento sulla trascrizione\r\n //prima si deve creare l'id a partire da quello del rettangolo\r\n var id = rettangolo.id.split(\"rettangolo_\")[1];\r\n var elementoTrascrizione = document.getElementById(\"trascr_facs_#\" + id);\r\n if(elementoTrascrizione != null)\r\n {\r\n elementoTrascrizione.classList.remove(\"facs_selezionato\");\r\n }\r\n\r\n //si spegne il relativo elemento sulla traduzione\r\n resettaElementiTraduzione();\r\n\r\n }\r\n\r\n }\r\n}", "title": "" }, { "docid": "a4350848ef91ea3f5415c5a28989f4aa", "score": "0.62845856", "text": "function cambiarResolution() {\n\n //obtengo el valor de la eleccion en el menu desplegable como elemento numerico\n var sizeTile = Number(document.getElementById(\"listResolution\").value);\n //borro la capa existente para generar una con las carateristicas nuevas\n mapa.removeLayer(mapa.getLayers().getArray()[0]);\n\n //construyo las caracteristicas nuevas de la propiedad tileGrid\n var nuevaTileGrid = new ol.tilegrid.TileGrid({\n //extension del mapa\n extent: mapa.getView().getProjection().getExtent(),\n //tamaño de cada tesela es el seleccionado ej: 32x32\n tileSize: [sizeTile, sizeTile],\n //mismo array de resoluciones cada vez más pequeñas a partir de la \n //resolucion máxima cuyo zoom es 0\n resolutions: resolutions\n });\n //capa nueva con la propiedad actualizada tileGrid\n mapa.addLayer(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 tileGrid: nuevaTileGrid\n })\n }));\n //se añade al mapa creado al principio vacio\t\t\n\n}", "title": "" }, { "docid": "7ea85d931a7c16c89e8c039e26d031a1", "score": "0.6280005", "text": "function mostrarResultadosRuteos(data){\n //el data representa la informacion traida del algoritmo en formato Json\n //alert( data);\n var log = document.getElementById('maplog');\n log.innerHTML = log.innerHTML + \"<div>Escala: \"+data.a+\" Tiempo: \"+data.b+\"<\\div>\";\n}", "title": "" }, { "docid": "38bd2e9af7cd0ff74f995731b3f9052c", "score": "0.62690794", "text": "function drawMap(){\n\tconsole.log(\"initial zoom = \" + map.getZoom());\n\t\n\tshowBoroughs();\n\tshowNeighborhoods();\n\t//showSigns();\n}", "title": "" }, { "docid": "ac298e03b4f0d56092661dceeb727575", "score": "0.625822", "text": "function showMap(){\n map = new google.maps.Map(document.getElementById('map'), {\n zoom: 12,\n center: {lat: 60.4518, lng: 22.2666}//Turku as center\n });\n}", "title": "" }, { "docid": "9bdf4e6f62f702e1ae02c84aecd14fb0", "score": "0.6252256", "text": "function showMarkers() {\r\n setMapOnAll(mymap);\r\n //poly.setMap(map);\r\n}", "title": "" }, { "docid": "4919b304eab1bc55d71eb531d9d26c65", "score": "0.6244871", "text": "function showContextMenu(caurrentLatLng) {\n var LatLng = '' + caurrentLatLng + '';\n LatLng = LatLng.replace(\"(\",\"\");\n LatLng = LatLng.replace(\")\",\"\");\n var arrLatLng = [];\n arrLatLng = LatLng.split(\",\");\n var projection;\n var contextmenuDir;\n projection = map.getProjection() ;\n jQuery('.contextmenu').remove();\n contextmenuDir = document.createElement(\"div\");\n contextmenuDir.className = 'contextmenu';\n contextmenuDir.innerHTML = '<div id=\"menu1\" onclick=\"defineRotaStart(' + arrLatLng[0] + ',' + arrLatLng[1] + ')\" class=\"context\">Como chegar a partir daqui<\\/div>'\n + '<div id=\"menu2\" onclick=\"defineRotaEnd(' + arrLatLng[0] + ',' + arrLatLng[1] + ')\" class=\"context\">Como chegar até aqui<\\/div>';\n\n jQuery(map.getDiv()).append(contextmenuDir);\n \n setMenuXY(caurrentLatLng);\n\n contextmenuDir.style.visibility = \"visible\";\n \n}", "title": "" }, { "docid": "06fc9beabbd37348e58d334d1bfce642", "score": "0.6234124", "text": "function limpiarSeleccion() {\n \"use strict\";\n\n var i;\n\n mapColombia.setView(new L.LatLng(4.5, -73.0), 6);\n mapColombia.eachLayer(function (layer) {\n mapColombia.removeLayer(layer);\n });\n mapColombia.addLayer(positron);\n mapColombia.addLayer(positronLabels);\n mapColombia.addLayer(DptosLayer);\n\n}", "title": "" }, { "docid": "38c3d10eebd8c91b088f32da24772159", "score": "0.6230871", "text": "function showMarkers() {\n setAllMap(map);\n}", "title": "" }, { "docid": "38c3d10eebd8c91b088f32da24772159", "score": "0.6230871", "text": "function showMarkers() {\n setAllMap(map);\n}", "title": "" }, { "docid": "38c3d10eebd8c91b088f32da24772159", "score": "0.6230871", "text": "function showMarkers() {\n setAllMap(map);\n}", "title": "" }, { "docid": "38c3d10eebd8c91b088f32da24772159", "score": "0.6230871", "text": "function showMarkers() {\n setAllMap(map);\n}", "title": "" }, { "docid": "38c3d10eebd8c91b088f32da24772159", "score": "0.6230871", "text": "function showMarkers() {\n setAllMap(map);\n}", "title": "" }, { "docid": "31e6550ca515fd408ca3533e1cd78485", "score": "0.62284076", "text": "function sena() {\n var map = new google.maps.Map(document.getElementById('map'), {\n zoom: 18,\n center: {lat: 6.3002273, lng: -75.5688634},\n styles: [\n {elementType: 'geometry', stylers: [{color: '#242f3e'}]},\n {elementType: 'labels.text.stroke', stylers: [{color: '#242f3e'}]},\n {elementType: 'labels.text.fill', stylers: [{color: '#746855'}]},\n {\n featureType: 'administrative.locality',\n elementType: 'labels.text.fill',\n stylers: [{color: '#d59563'}]\n },\n {\n featureType: 'poi',\n elementType: 'labels.text.fill',\n stylers: [{color: '#d59563'}]\n },\n {\n featureType: 'poi.park',\n elementType: 'geometry',\n stylers: [{color: '#263c3f'}]\n },\n {\n featureType: 'poi.park',\n elementType: 'labels.text.fill',\n stylers: [{color: '#6b9a76'}]\n },\n {\n featureType: 'road',\n elementType: 'geometry',\n stylers: [{color: '#38414e'}]\n },\n {\n featureType: 'road',\n elementType: 'geometry.stroke',\n stylers: [{color: '#212a37'}]\n },\n {\n featureType: 'road',\n elementType: 'labels.text.fill',\n stylers: [{color: '#9ca5b3'}]\n },\n {\n featureType: 'road.highway',\n elementType: 'geometry',\n stylers: [{color: '#746855'}]\n },\n {\n featureType: 'road.highway',\n elementType: 'geometry.stroke',\n stylers: [{color: '#1f2835'}]\n },\n {\n featureType: 'road.highway',\n elementType: 'labels.text.fill',\n stylers: [{color: '#f3d19c'}]\n },\n {\n featureType: 'transit',\n elementType: 'geometry',\n stylers: [{color: '#2f3948'}]\n },\n {\n featureType: 'transit.station',\n elementType: 'labels.text.fill',\n stylers: [{color: '#d59563'}]\n },\n {\n featureType: 'water',\n elementType: 'geometry',\n stylers: [{color: '#17263c'}]\n },\n {\n featureType: 'water',\n elementType: 'labels.text.fill',\n stylers: [{color: '#515c6d'}]\n },\n {\n featureType: 'water',\n elementType: 'labels.text.stroke',\n stylers: [{color: '#17263c'}]\n }\n ]\n });\n\n\n// GEOLOCATION\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(function (position) {\n var pos = {\n lat: position.coords.latitude,\n lng: position.coords.longitude\n };\n\n var contentString = 'Mi Ubicación';\n\n var infowindow = new google.maps.InfoWindow({\n content: contentString\n });\n\n var marker = new google.maps.Marker({\n position: pos,\n map: map,\n title: 'Mi ubicación',\n draggable: true,\n animation: google.maps.Animation.DROP,\n\n });\n marker.addListener('click', toggleBounce);\n\n\n function toggleBounce() {\n if (marker.getAnimation() !== null) {\n marker.setAnimation(null);\n infowindow.open(map, marker);\n\n } else {\n marker.setAnimation(google.maps.Animation.BOUNCE);\n }\n }\n\n\n }, function () {\n handleLocationError(true, infoWindow, map.getCenter());\n });\n // NAVEGADOR NO SOPORTA GEOLOCALIZACION\n } else {\n handleLocationError(false, infoWindow, map.getCenter());\n }\n\n\n function handleLocationError(browserHasGeolocation, infoWindow, pos) {\n infoWindow.setPosition(pos);\n infoWindow.setContent(browserHasGeolocation ?\n 'Error: El servicio de geolocalización falló.' :\n 'Error: Tu navegador no admite la geolocalización');\n infoWindow.open(map);\n }\n\n// MARKER LUGARES DESTACADOS\n\n var image = 'https://developers.google.com/maps/documentation/javascript/examples/full/images/beachflag.png';\n var beachMarker = new google.maps.Marker({\n position: {lat: 6.3002273, lng: -75.5688634},\n map: map,\n icon: image\n });\n\n\n var flightPlanCoordinates = [\n {lat: 6.313505, lng: -75.570131},\n {lat: 6.313129, lng: -75.570095},\n {lat: 6.312812, lng: -75.570097},\n {lat: 6.312655, lng: -75.570084},\n {lat: 6.312610, lng: -75.570070},\n {lat: 6.312160, lng: -75.569945},\n {lat: 6.311232, lng: -75.569894},\n {lat: 6.311168, lng: -75.569897},\n {lat: 6.311096, lng: -75.569905},\n {lat: 6.310767, lng: -75.570024},\n {lat: 6.310723, lng: -75.569979},\n {lat: 6.310487, lng: -75.569182},\n {lat: 6.309711, lng: -75.569451},\n {lat: 6.307985, lng: -75.570009},\n {lat: 6.307507, lng: -75.570235},\n {lat: 6.306709, lng: -75.570527},\n {lat: 6.306624, lng: -75.570549},\n {lat: 6.306373, lng: -75.570583},\n {lat: 6.303782, lng: -75.570619},\n {lat: 6.303725, lng: -75.570627},\n {lat: 6.303579, lng: -75.570679},\n {lat: 6.303497, lng: -75.570755},\n {lat: 6.303285, lng: -75.571055},\n {lat: 6.302518, lng: -75.572121},\n {lat: 6.302418, lng: -75.572207},\n {lat: 6.301994, lng: -75.572442},\n {lat: 6.301601, lng: -75.572637},\n {lat: 6.301572, lng: -75.572580},\n {lat: 6.300192, lng: -75.569817},\n {lat: 6.300288, lng: -75.569012},\n {lat: 6.301461, lng: -75.566276},\n {lat: 6.301013, lng: -75.566297},\n {lat: 6.297771, lng: -75.567166},\n {lat: 6.296780, lng: -75.567552},\n {lat: 6.296471, lng: -75.567606},\n {lat: 6.295543, lng: -75.567660},\n {lat: 6.295031, lng: -75.567960},\n {lat: 6.294253, lng: -75.568625},\n {lat: 6.293251, lng: -75.569129},\n {lat: 6.291449, lng: -75.569623},\n {lat: 6.288996, lng: -75.570513},\n {lat: 6.287396, lng: -75.570363},\n {lat: 6.287055, lng: -75.570406},\n {lat: 6.285370, lng: -75.570953},\n {lat: 6.283642, lng: -75.571811},\n {lat: 6.282949, lng: -75.572036},\n {lat: 6.279366, lng: -75.572637},\n {lat: 6.274940, lng: -75.573935},\n {lat: 6.270922, lng: -75.575680},\n {lat: 6.268085, lng: -75.576860},\n {lat: 6.266336, lng: -75.577246},\n {lat: 6.265728, lng: -75.577503},\n {lat: 6.263104, lng: -75.579338},\n {lat: 6.262635, lng: -75.579638},\n {lat: 6.261995, lng: -75.579863},\n {lat: 6.261515, lng: -75.579927},\n {lat: 6.260235, lng: -75.579788},\n {lat: 6.259830, lng: -75.579842},\n {lat: 6.256677, lng: -75.580938},\n {lat: 6.259012, lng: -75.585853},\n {lat: 6.258431, lng: -75.586153},\n {lat: 6.255968, lng: -75.580891},\n {lat: 6.253280, lng: -75.575553},\n {lat: 6.252805, lng: -75.575263},\n {lat: 6.252442, lng: -75.575150},\n {lat: 6.248839, lng: -75.575301},\n {lat: 6.247313, lng: -75.575384},\n {lat: 6.246918, lng: -75.575403},\n {lat: 6.246834, lng: -75.575425},\n {lat: 6.246753, lng: -75.575468},\n {lat: 6.246675, lng: -75.575607},\n {lat: 6.246578, lng: -75.575698},\n {lat: 6.246466, lng: -75.575774},\n {lat: 6.246466, lng: -75.575774},\n {lat: 6.246048, lng: -75.575677},\n {lat: 6.245866, lng: -75.575528},\n {lat: 6.245793, lng: -75.575418},\n {lat: 6.245744, lng: -75.575281},\n {lat: 6.245749, lng: -75.575119},\n {lat: 6.245787, lng: -75.575038},\n {lat: 6.245944, lng: -75.574858},\n {lat: 6.245955, lng: -75.574824},\n {lat: 6.245922, lng: -75.574642},\n {lat: 6.245852, lng: -75.574398},\n {lat: 6.245725, lng: -75.574036},\n {lat: 6.245585, lng: -75.573650},\n {lat: 6.245411, lng: -75.573167},\n {lat: 6.245244, lng: -75.572700},\n {lat: 6.245194, lng: -75.572569},\n {lat: 6.245101, lng: -75.572257},\n {lat: 6.245067, lng: -75.572125},\n {lat: 6.245087, lng: -75.571975},\n {lat: 6.244881, lng: -75.571447},\n {lat: 6.244686, lng: -75.570923},\n {lat: 6.244499, lng: -75.570480},\n {lat: 6.244344, lng: -75.570048},\n {lat: 6.244180, lng: -75.569599},\n {lat: 6.244024, lng: -75.569146},\n {lat: 6.243882, lng: -75.568769},\n {lat: 6.243767, lng: -75.568423},\n {lat: 6.243691, lng: -75.568214},\n {lat: 6.243476, lng: -75.568109},\n {lat: 6.243346, lng: -75.568084},\n {lat: 6.243226, lng: -75.568106},\n {lat: 6.243132, lng: -75.568178},\n {lat: 6.243059, lng: -75.568323},\n {lat: 6.243064, lng: -75.568408},\n {lat: 6.243133, lng: -75.568552},\n {lat: 6.243404, lng: -75.568649},\n {lat: 6.243887, lng: -75.568418},\n {lat: 6.244234, lng: -75.568197},\n {lat: 6.244601, lng: -75.567962},\n {lat: 6.245130, lng: -75.567582},\n {lat: 6.245530, lng: -75.567285},\n {lat: 6.247001, lng: -75.566153},\n {lat: 6.247542, lng: -75.565744},\n {lat: 6.248069, lng: -75.565361},\n {lat: 6.248580, lng: -75.565029},\n {lat: 6.248985, lng: -75.564763},\n {lat: 6.249465, lng: -75.564491},\n {lat: 6.249870, lng: -75.564267},\n {lat: 6.250809, lng: -75.563731},\n {lat: 6.251673, lng: -75.563227},\n {lat: 6.252399, lng: -75.562813},\n {lat: 6.252897, lng: -75.562530},\n {lat: 6.253288, lng: -75.562282},\n {lat: 6.253545, lng: -75.562184},\n {lat: 6.253884, lng: -75.562130},\n {lat: 6.254168, lng: -75.562139},\n {lat: 6.254345, lng: -75.562185},\n {lat: 6.254633, lng: -75.562327},\n {lat: 6.254884, lng: -75.562541},\n {lat: 6.255675, lng: -75.563739},\n {lat: 6.256654, lng: -75.565287},\n {lat: 6.256894, lng: -75.565864},\n {lat: 6.257177, lng: -75.567489},\n {lat: 6.257502, lng: -75.569264},\n {lat: 6.257852, lng: -75.571120},\n {lat: 6.257919, lng: -75.571294},\n {lat: 6.257981, lng: -75.571394},\n {lat: 6.258149, lng: -75.571616},\n {lat: 6.260519, lng: -75.573359},\n {lat: 6.262287, lng: -75.574643},\n {lat: 6.262473, lng: -75.574772},\n {lat: 6.262602, lng: -75.574834},\n {lat: 6.262797, lng: -75.574899},\n {lat: 6.263336, lng: -75.574987},\n {lat: 6.264166, lng: -75.574993},\n {lat: 6.264266, lng: -75.574937},\n {lat: 6.265278, lng: -75.574845},\n {lat: 6.265506, lng: -75.574887},\n {lat: 6.265567, lng: -75.574906},\n {lat: 6.265609, lng: -75.575031},\n {lat: 6.265647, lng: -75.575087},\n {lat: 6.265721, lng: -75.575091},\n {lat: 6.265838, lng: -75.575346},\n {lat: 6.265838, lng: -75.575346},\n {lat: 6.266147, lng: -75.575841},\n {lat: 6.266246, lng: -75.575954},\n {lat: 6.266669, lng: -75.576198},\n {lat: 6.266912, lng: -75.576238},\n {lat: 6.267252, lng: -75.576196},\n {lat: 6.267785, lng: -75.576023},\n {lat: 6.267978, lng: -75.575925},\n {lat: 6.268187, lng: -75.575787},\n {lat: 6.268484, lng: -75.575691},\n {lat: 6.268752, lng: -75.575683},\n {lat: 6.269027, lng: -75.575734},\n {lat: 6.269298, lng: -75.575831},\n {lat: 6.269669, lng: -75.575900},\n {lat: 6.269930, lng: -75.575899},\n {lat: 6.270247, lng: -75.575831},\n {lat: 6.270504, lng: -75.575685},\n {lat: 6.270962, lng: -75.575529},\n {lat: 6.271095, lng: -75.575473},\n {lat: 6.271252, lng: -75.575450},\n {lat: 6.272191, lng: -75.575058},\n {lat: 6.272412, lng: -75.574975},\n {lat: 6.274122, lng: -75.574190},\n {lat: 6.274839, lng: -75.573843},\n {lat: 6.275523, lng: -75.573577},\n {lat: 6.277635, lng: -75.573018},\n {lat: 6.277874, lng: -75.572935},\n {lat: 6.279218, lng: -75.572557},\n {lat: 6.280034, lng: -75.572389},\n {lat: 6.282092, lng: -75.572122},\n {lat: 6.282385, lng: -75.571997},\n {lat: 6.282485, lng: -75.571962},\n {lat: 6.283559, lng: -75.571725},\n {lat: 6.285355, lng: -75.570813},\n {lat: 6.287064, lng: -75.570230},\n {lat: 6.287170, lng: -75.570196},\n {lat: 6.288267, lng: -75.570310},\n {lat: 6.288549, lng: -75.570348},\n {lat: 6.288894, lng: -75.570336},\n {lat: 6.289038, lng: -75.570311},\n {lat: 6.289890, lng: -75.569976},\n {lat: 6.291367, lng: -75.569495},\n {lat: 6.292042, lng: -75.569349},\n {lat: 6.293080, lng: -75.569087},\n {lat: 6.293357, lng: -75.568974},\n {lat: 6.294271, lng: -75.568450},\n {lat: 6.294427, lng: -75.568339},\n {lat: 6.295008, lng: -75.567783},\n {lat: 6.295569, lng: -75.567530},\n {lat: 6.296011, lng: -75.567438},\n {lat: 6.296454, lng: -75.567503},\n {lat: 6.296676, lng: -75.567528},\n {lat: 6.297411, lng: -75.567209},\n {lat: 6.298174, lng: -75.566916},\n {lat: 6.298808, lng: -75.566778},\n {lat: 6.299966, lng: -75.566473},\n {lat: 6.300844, lng: -75.566227},\n {lat: 6.301149, lng: -75.566177},\n {lat: 6.301507, lng: -75.566173},\n {lat: 6.301569, lng: -75.566194},\n {lat: 6.301055, lng: -75.567404},\n {lat: 6.300252, lng: -75.569367},\n {lat: 6.300231, lng: -75.569697},\n {lat: 6.300288, lng: -75.569852},\n {lat: 6.301698, lng: -75.572577},\n {lat: 6.302029, lng: -75.572404},\n {lat: 6.302385, lng: -75.572218},\n {lat: 6.302475, lng: -75.572148},\n {lat: 6.303481, lng: -75.570757},\n {lat: 6.303597, lng: -75.570658},\n {lat: 6.303780, lng: -75.570600},\n {lat: 6.306327, lng: -75.570568},\n {lat: 6.306535, lng: -75.570548},\n {lat: 6.306736, lng: -75.570503},\n {lat: 6.307424, lng: -75.570254},\n {lat: 6.307964, lng: -75.570006},\n {lat: 6.309213, lng: -75.569582},\n {lat: 6.310500, lng: -75.569160},\n {lat: 6.310751, lng: -75.570004},\n {lat: 6.311105, lng: -75.569884},\n {lat: 6.311247, lng: -75.569872},\n {lat: 6.312140, lng: -75.569923},\n {lat: 6.312313, lng: -75.569756},\n {lat: 6.312679, lng: -75.569480},\n {lat: 6.312951, lng: -75.569215},\n {lat: 6.313484, lng: -75.568643}\n\n\n ];\n var flightPath = new google.maps.Polyline({\n path: flightPlanCoordinates,\n geodesic: true,\n strokeColor: '#000bff',\n strokeOpacity: 2.0,\n strokeWeight: 5\n });\n\n\n flightPath.setMap(map);\n\n\n}", "title": "" }, { "docid": "b060d9b036887142bc39a0a3d4a7c587", "score": "0.622724", "text": "function showMarkers() {\n\tsetAllMap(map);\n}", "title": "" }, { "docid": "057b19084f67f88023048e37fb77815d", "score": "0.62150615", "text": "function viewVisibleMap() {\n\t\t\tif(!params.mode2d) {\n\t\t\t\tfor(var y = 1;y<=Mapy;y++) {\n\t\t\t\t\tfor(var x=1;x<=Mapx;x++) {\n\t\t\t\t\t\tid = 'c_' + y + '_' + x;\n\t\t\t\t\t\tvar posY = getPosY(y, x) + pady;\n\t\t\t\t\t\tvar posX = getPosX(y, x) + padx;\n\t\t\t\t\t\tif(posX>-tx && posX<(taille3DisoX + tx) && \n\t\t\t\t\t\t posY>-ty && posY<(taille3DisoY + ty)) {\n\t\t\t\t\t\t\tobj_conteneur.append('<div id=\"' + id + '\" class=\"pp3diso-sol\"></div>');\n\t\t\t\t\t\t\t\t$('#' + id).css({\n\t\t\t\t\t\t\t\t'z-index': getZindex(y, x),\n\t\t\t\t\t\t\t\t'position':'absolute',\n\t\t\t\t\t\t\t\t'left':(posX|0),\n\t\t\t\t\t\t\t\t'top':(posY|0),\n\t\t\t\t\t\t\t\t'width':params.tx,\n\t\t\t\t\t\t\t\t'height':params.ty,\n\t\t\t\t\t\t\t\t'display':'block'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5a764e54c7ebfe9fdc71133f4786f0b4", "score": "0.6206817", "text": "function cargarDetalleCapaMesas() {\n infoVentasMesas.addTo(map);\n //layerGroup.addLayer(infoVentasMesas).addTo(map);\n\n}", "title": "" }, { "docid": "13625efe7feacbc32c0f939b713cae81", "score": "0.62028795", "text": "function initMap() {\r\n // Créer l'objet \"macarte\" et l'insèrer dans l'élément HTML qui a l'ID \"map\"\r\n macarte = L.map('map').setView([lat, lon], 13);\r\n \r\n L.tileLayer('https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', {\r\n \r\n attribution: 'données © <a href=\"//osm.org/copyright\">OpenStreetMap</a>/ODbL - rendu <a href=\"//openstreetmap.fr\">OSM France</a>',\r\n minZoom: 1,\r\n maxZoom: 20\r\n }).addTo(macarte);\r\n\r\n}", "title": "" }, { "docid": "a658edd179b5311c5d544eddd3dcf7a4", "score": "0.6186903", "text": "function funcionInicializarMapa () {\r\n\r\n //Se crea una instancia para el mapa\r\n gmMapa = new google.maps.Map(document.querySelector('#mapa'), {\r\n //Se establece el zoom\r\n zoom: 16,\r\n //Se centra el mapa a una ubicacion\r\n center: new google.maps.LatLng(9.935, -84.092),\r\n //Se establece el tipo del mapa\r\n mapTypeId: google.maps.MapTypeId.HYBRID\r\n });\r\n //Se agregan opciones al mapa\r\n var gmOpcionesMapa = {\r\n //Se establece el zoom maximo\r\n maxZoom:20,\r\n //Se establece el zoom minimo\r\n minZoom:14,\r\n //Se deshabilita el uso de stree view\r\n streetViewControl: false,\r\n //Se deshabilita el control del tipo de mapa\r\n mapTypeControl: false\r\n }\r\n\r\n var nIdListaEvento = getParameterByName(\"idEvento\");\r\n var idListaEventoLength = aIdListaEvento.length;\r\n for (var i = 0; i < idListaEventoLength; i++) {\r\n if (aIdListaEvento[i] == nIdListaEvento) {\r\n nLatitud = aLatitudListaEvento[i];\r\n nLongitud = aLongitudListaEvento[i];\r\n }\r\n }\r\n //Se agregan las opciones al mapa\r\n gmMapa.setOptions(gmOpcionesMapa);\r\n //Se setea un marcador con una ubicacion por defecto\r\n gmMarcador = new google.maps.Marker({\r\n //Se agrega la posicion en San Jose\r\n position: new google.maps.LatLng(nLatitud, nLongitud)//,\r\n //Se habilita el arratre del marcador\r\n //draggable: true\r\n });\r\n //Se centra el mapa en la posicion del marcador\r\n gmMapa.setCenter(gmMarcador.position);\r\n //Se coloca el marcador en el mapa\r\n gmMarcador.setMap(gmMapa);\r\n //Se obtiene una latitud y longitud por defecto\r\n nLatitud = gmMarcador.position.lat();\r\n nLongitud = gmMarcador.position.lng();\r\n\r\n /*//Se caputura la posicion una vez termina el arrastrado\r\n google.maps.event.addListener(gmMarcador, 'dragend', function (evt) {\r\n //Se declara una variable para capturar la latitud y longitud de el marcador\r\n var gmLatLng = this.position;\r\n //Se almacena la latitud en una variable\r\n nLatitud = gmLatLng.lat();\r\n //Se almacena la longitud en una variable\r\n nLongitud = gmLatLng.lng();\r\n\r\n var geocoder = new google.maps.Geocoder;\r\n\r\n geocoder.geocode({'location': gmLatLng}, function(results, status) {\r\n\r\n if (status === google.maps.GeocoderStatus.OK) {\r\n if (results[1]) {\r\n var gmContenido = '<h2>' + results[2].formatted_address + '</h2>' + '<p>' + gmLatLng + '</p>';\r\n gmVentanaInformacion = new google.maps.InfoWindow({\r\n content: gmContenido\r\n });\r\n gmNuevoMarcador = new google.maps.Marker({\r\n //Se establece la posicion del marcador\r\n position: gmLatLng,\r\n //Se establece el mapa donde se ubicara el marcador\r\n map: gmMapa,\r\n //Se establece la animacion del marcador\r\n animation: google.maps.Animation.DROP\r\n });\r\n //Si no existe un marcador se le asigna el valor del actual sino entonces es actualizado\r\n if (gmMarcador != undefined){\r\n gmMarcador.setMap(null);\r\n }\r\n gmMarcador = gmNuevoMarcador;\r\n gmVentanaInformacion.open(gmMapa, gmMarcador);\r\n } else {\r\n window.alert('No results found');\r\n }\r\n } else {\r\n window.alert('Geocoder failed due to: ' + status);\r\n }\r\n });\r\n });*/\r\n //Se agrega un evento para cuando se realiza un click en el mapa, de manera que el marcador se mueva a esa ubicacion\r\n google.maps.event.addListener(gmMapa, 'click', function(event) {\r\n gmNuevoMarcador = new google.maps.Marker({\r\n //Se establece la posicion del marcador\r\n position: event.latLng,\r\n //Se establece el mapa donde se ubicara el marcador\r\n map: gmMapa,\r\n //Se establece la animacion del marcador\r\n animation: google.maps.Animation.DROP\r\n });\r\n //Si no existe un marcador se le asigna el valor del actual sino entonces es actualizado\r\n if (gmMarcador != undefined){\r\n gmMarcador.setMap(null);\r\n }\r\n gmMarcador = gmNuevoMarcador;\r\n var geocoder = new google.maps.Geocoder;\r\n\r\n geocoder.geocode({'location': event.latLng}, function(results, status) {\r\n\r\n if (status === google.maps.GeocoderStatus.OK) {\r\n if (results[1]) {\r\n var gmContenido = '<h2>' + results[1].formatted_address + '</h2>' + '<p>' + event.latLng + '</p>';\r\n var gmVentanaInformacion = new google.maps.InfoWindow({\r\n content: gmContenido\r\n });\r\n gmVentanaInformacion.open(gmMapa, gmMarcador);\r\n } else {\r\n window.alert('No results found');\r\n }\r\n } else {\r\n window.alert('Geocoder failed due to: ' + status);\r\n }\r\n });\r\n //Se almacena la latitud en una variable\r\n nLatitud = event.latLng.lat();\r\n //Se almacena la longitud en una variable\r\n nLongitud = event.latLng.lng();\r\n });\r\n}", "title": "" }, { "docid": "82ef3b6f6af2ab6b3729b14c00a57682", "score": "0.6182681", "text": "function localizacion(posicion){\n var latitude = posicion.coords.latitude;\n var longitude = posicion.coords.longitude;\n var imgURL = \"https://maps.googleapis.com/maps/api/staticmap?center=\"+latitude+\",\"+longitude+\"&size=600x300&markers=color:red%7C\"+latitude+\",\"+longitude+\"&key=AIzaSyCUmBVjS6bNGRj9d76D6hh5_r290AJs1fk\";\n output.innerHTML =\"<img id='imgMap' src='\"+imgURL+\"'>\";\n \n }", "title": "" }, { "docid": "cbc80b0d84f428fedfaa3ffa89363507", "score": "0.61770177", "text": "function displayMap(lat, lng) {\n createMap(lat, lng);\n scroll(\"div:last\");\n}", "title": "" }, { "docid": "01eb9cae083207c7d58b7d92c51511af", "score": "0.6174488", "text": "function DefaultMap(){\n _nivelActual = \"0\";\n centro = [39.512859, -0.4244782];\n _currentPosition = centro;\n _zoom = 18;\n}", "title": "" }, { "docid": "d390cb874e57322fd32338ed8c6b1b9f", "score": "0.6172608", "text": "function Map() {\n\t// grafico è l'oggetto che utilizziamo per esportare i metodi pubblici\n\tvar grafico = {};\n\n\t/* Inizio variabili private */\n\n\t// Dimensioni della mappa\n\tvar width = 940, height = 400, m_width = $(\"#map\").width * 0.8, m_height = $(\"#map\").height;\n\n\t// La proiezione utilizzata dalla mappa\n\tvar projection = d3.geo.mercator().scale(150).translate([width / 2, height / 1.5]);\n\tvar path = d3.geo.path().projection(projection);\n\n\t// L'oggetto grafico SVG che conterrà la mappa\n\tvar svg = d3.select(\"#mapChart\").append(\"svg\").attr(\"preserveAspectRatio\", \"xMidYMid meet\").attr(\"viewBox\", \"0 0 \" + width + \" \" + height).attr(\"width\", m_width).attr(\"height\", m_width * height / width);\n\t//Questo dovrebbe sistemare il problema del taglio dell'Argentina\n\n\t// Creo il rettangolo per gestire gli eventi della mappa\n\tsvg.append(\"rect\").attr(\"class\", \"background\").attr(\"width\", width).attr(\"height\", height).on(\"click\", country_clicked);\n\n\t// L'oggetto grafico sul quale verrà disegnata la mappa\n\tvar g = svg.append(\"g\");\n\n\t// Il tooltip da mostrare quando passo il mouse su una copertina\n\tvar coverTooltip = d3.select(\"body\").append(\"div\").attr(\"class\", \"mapTooltip\").style(\"opacity\", 0).style(\"z-index\", 100000);\n\n\tvar country = {};\n\n\t// Il colore che utilizziamo per i paesi abilitati\n\tvar enabledCountryColor = \"#abf\";\n\n\t// Il colore che utilizziamo per il paese selezionato\n\tvar selectedCountryColor = \"orange\";\n\n\t// Il colore che utilizziamo per il bordo del paese selezionato\n\tvar selectedCountryStroke = \"black\";\n\n\t// Il colore di base per il bordo di un paese\n\tvar defaultCountryStroke = \"white\";\n\n\t// I paesi per i quali sono abilitate le interazioni con il mouse\n\tvar enabledCountries = [];\n\n\t// Il paese selezionato\n\tvar selectedCountry = {};\n\n\t// Il brano selezionato\n\tvar selectedTrack = {};\n\n\tvar selectedDate = {};\n\n\t// Lo stato di visualizzazione in cui si trova il grafico\n\tvar currentStatus = undefined;\n\n\t// L'URL di base per accedere alla cache delle immagini\n\tvar imageCacheBaseUrl = \"../image_cache.php?image=\";\n\n\t// L'URL di base che Sptoify usa per le immagini\n\tvar spotifyImageBaseUrl = \"http://o.scdn.co/300/\";\n\n\t/* Fine variabili private */\n\n\t/* Inizio eventi */\n\n\t// Evento lanciato quando viene selezionato un paese\n\tvar countryChangedEvent = {};\n\n\t// Evento lanciato quando viene selezionata una traccia\n\tvar trackChangedEvent = {};\n\n\t// Evento lanciato quando cambiamo lo stato di visualizzazione del grafico\n\tvar stateChangedEvent = {};\n\n\tvar dataLoadingEvent = {};\n\n\t// I dati json che stiamo utilizzando al momento per il nostro grafico\n\tvar currentData = {};\n\n\t// L'oggetto sul quale mostrare il tooltip\n\tvar popoverTarget = {};\n\n\t// Lancia l'evento relativo al cambio dello stato di visualizzazione del grafico\n\tfunction fireStateChanged() {\n\t\tstateChangedEvent = new CustomEvent('map.stateChanged', {\n\t\t\tdetail : {\n\t\t\t\t'state' : currentStatus,\n\t\t\t\t'data' : currentData\n\t\t\t},\n\t\t\tbubbles : true,\n\t\t\tcancelable : true\n\t\t});\n\t\tdocument.dispatchEvent(stateChangedEvent);\n\t}\n\n\t// Lancia l'evento relativo al cambio del brano selezionato\n\tfunction fireTrackChanged() {\n\t\ttrackChangedEvent = new CustomEvent('map.trackChanged', {\n\t\t\tdetail : {\n\t\t\t\t'track' : selectedTrack\n\t\t\t},\n\t\t\tbubbles : true,\n\t\t\tcancelable : true\n\t\t});\n\t\tdocument.dispatchEvent(trackChangedEvent);\n\t}\n\n\t// Lancia l'evento relativo al cambio del paese selezionato\n\tfunction fireCountryChanged() {\n\t\tcountryChangedEvent = new CustomEvent('map.countryChanged', {\n\t\t\tdetail : {\n\t\t\t\t'country' : selectedCountry\n\t\t\t},\n\t\t\tbubbles : true,\n\t\t\tcancelable : true\n\t\t});\n\t\tdocument.dispatchEvent(countryChangedEvent);\n\t}\n\n\t// Lancia l'evento relativo all'inizio del caricamento dei dati\n\tfunction fireDataLoadingEvent(started) {\n\t\tif (started) {\n\t\t\tdataLoadingEvent = new CustomEvent('map.dataLoadingStarted', {\n\t\t\t\tdetail : {\n\t\t\t\t},\n\t\t\t\tbubbles : true,\n\t\t\t\tcancelable : true\n\t\t\t});\n\t\t} else {\n\t\t\tdataLoadingEvent = new CustomEvent('map.dataLoadingFinished', {\n\t\t\t\tdetail : {\n\t\t\t\t},\n\t\t\t\tbubbles : true,\n\t\t\t\tcancelable : true\n\t\t\t});\n\t\t}\n\t\tdocument.dispatchEvent(dataLoadingEvent);\n\t}\n\n\t/* Fine eventi */\n\n\t/* Inizio funzioni private */\n\n\t// Converte l'URI di un'immagine nell'URI relativo alla cache\n\tfunction convertURIToCache(uri) {\n\t\treturn uri.replace(spotifyImageBaseUrl, imageCacheBaseUrl);\n\t}\n\n\t// Recupera l'oggetto country a partire dal suo ID\n\tfunction getCountry(id) {\n\t\tvar countries = g.select(\"#countries\")[0][0].children;\n\t\tfor (var i = 0; i < countries.length; i++) {\n\t\t\tvar country = countries[i];\n\t\t\tif (country.id == id)\n\t\t\t\treturn country.__data__;\n\t\t}\n\t\treturn null;\n\t}\n\n\t// Recupera le coordinate del paese a partire dal suo ID\n\tfunction get_xyz(d) {\n\t\tvar bounds = path.bounds(d);\n\t\tvar w_scale = (bounds[1][0] - bounds[0][0]) / width;\n\t\tvar h_scale = (bounds[1][1] - bounds[0][1]) / height;\n\t\tvar z = .96 / Math.max(w_scale, h_scale);\n\t\tvar x = (bounds[1][0] + bounds[0][0]) / 2;\n\t\tvar y = (bounds[1][1] + bounds[0][1]) / 2 + (height / z / 6);\n\t\treturn [x, y, z];\n\t}\n\n\t// Gestisce il click su un paese\n\tfunction country_clicked(d) {\n\t\tif (d && $.inArray(d.id, enabledCountries) == -1)\n\t\t\treturn;\n\t\t// Nessuna interazione su questo paese perchè non abbiamo dati o perchè è satta disattivata esplicitamente\n\t\tg.selectAll([\"#states\", \"#cities\"]).remove();\n\t\tif (country) {\n\t\t\tif (currentStatus != 2)// Se sono nello stato 2 non devo ricolorare i paesi visto che li ho colorati in base agli ascolti\n\t\t\t\tg.selectAll(\"#\" + country.id).transition().duration(500).style('display', null).style(\"fill\", enabledCountryColor);\n\t\t}\n\n\t\tif (d && country !== d) {// Seleziono un paese\n\t\t\tselectedCountry = d;\n\t\t\t// Imposto il paese come selezionato\n\t\t\tfireCountryChanged();\n\t\t\tvar xyz = get_xyz(d);\n\t\t\tcountry = d;\n\t\t\tzoom(xyz);\n\t\t\tif (currentStatus != 2)// Se sono nello stato 2 non devo ricolorare i paesi visto che li ho colorati in base agli ascolti\n\t\t\t\tg.selectAll(\"#\" + country.id).transition().duration(500).style('fill', selectedCountryColor);\n\t\t\tg.selectAll(\"#\" + country.id)// Coloro il bordo di nero\n\t\t\t.transition().delay((grafico.statoCorrente != 1) ? 500 : 0).duration(500).style(\"stroke\", selectedCountryStroke);\n\n\t\t} else {// Deseleziono un paese\n\t\t\tselectedCountry = {};\n\t\t\tfireCountryChanged();\n\t\t\tif (country) {\n\t\t\t\tvar xyz = [width / 2, height / 1.5, 1];\n\t\t\t\tif (currentStatus != 2)// Se sono nello stato 2 non devo ricolorare i paesi visto che li ho colorati in base agli ascolti\n\t\t\t\t\tg.selectAll(\"#\" + country.id).transition().duration(500).style('fill', enabledCountryColor);\n\t\t\t\tg.selectAll(\"#\" + country.id)// Rimuovo il colore dal bordo\n\t\t\t\t.transition().duration(500).delay((currentStatus != 2) ? 500 : 0).style(\"stroke\", null);\n\t\t\t\tcountry = null;\n\t\t\t\tzoom(xyz);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Effettua lo zoom sulle coordinate indicate\n\tfunction zoom(xyz) {\n\t\tg.transition().duration(750).attr(\"transform\", \"translate(\" + projection.translate() + \")scale(\" + xyz[2] + \")translate(-\" + xyz[0] + \",-\" + xyz[1] + \")\").selectAll([\"#countries\", \"#states\", \"#cities\"]).style(\"stroke-width\", 1.0 / xyz[2] + \"px\").selectAll(\".city\").attr(\"d\", path.pointRadius(20.0 / xyz[2]));\n\t}\n\n\t// Imposta il primo stato di visualizzazione\n\tfunction setStatus1() {\n\t\tcurrentStatus = 1;\n\t\tfireDataLoadingEvent(true);\n\t\td3.json(\"../map.php?state=1\", function(error, data) {\n\t\t\tcurrentData = data;\n\t\t\t// Per poter scalare il raggio dei cerchi su ogni stato, ci serve sapere quale sarà il valore massimo degli ascolti\n\t\t\tmaxStreams = d3.max(data, function(d) {\n\t\t\t\treturn parseInt(d.num_streams);\n\t\t\t});\n\t\t\t// Una volta ottenuto il massimo costruisco la funzione per scalare il raggio all'interno del dominio tra 0 e maxStreams\n\t\t\tvar scale = d3.scale.linear().domain([0, maxStreams]).range([2, 10]);\n\t\t\t// I nostri cerchi avranno un raggio tra 2 e 10 unità\n\t\t\t// Per poter utilizzare un'immagine di sfondo per i cerchi, è necessario usare i pattern SVG. Devo quindi definirli in modo dinamico\n\t\t\tdata.forEach(function(d) {\n\t\t\t\t// Devo scorrere tutte le tracce perchè devo creare un pattern per ogni traccia\n\t\t\t\tg.append(\"pattern\").attr(\"id\", convertURIToCache(d.artwork_url))// Usiamo l'url come id visto che è univoco e non presenta spazi o caratteri vietati\n\t\t\t\t.attr(\"patternUnits\", \"userSpaceOnUse\").attr(\"width\", scale(d.num_streams)).attr(\"height\", scale(d.num_streams)).append(\"image\").attr(\"xlink:href\", convertURIToCache(d.artwork_url)).attr(\"src\", convertURIToCache(d.artwork_url))//TODO: potrebbe essere anche rimosso, da verificare\n\t\t\t\t.attr(\"x\", 0).attr(\"y\", 0).attr(\"width\", scale(d.num_streams)).attr(\"height\", scale(d.num_streams));\n\t\t\t\t// Sfrutto questo ciclo per abilitare le interazioni sui paesi per i quali abbiamo dati\n\t\t\t\tvar currentCountry = getCountry(d.countryId);\n\t\t\t\tif (currentCountry) {\n\t\t\t\t\tif ($.inArray(enabledCountries, currentCountry.id) == -1) {\n\t\t\t\t\t\t// Con questo controllo verifico se il paese è stato già abilitato in precedenza\n\t\t\t\t\t\tg.selectAll(\"#\" + currentCountry.id).transition().duration(1000).ease(\"bounce\").style(\"fill\", enabledCountryColor);\n\t\t\t\t\t\tenabledCountries.push(currentCountry.id);\n\t\t\t\t\t}\n\t\t\t\t\t// Creo i cerchi, uno per ogni brano presente nei dati. (Il formato dei dati non permette cerchi multipli sullo stesso paese!)\n\t\t\t\t\tvar circles = g.selectAll(\"circle\").data(data).enter().append(\"circle\").on(\"mouseover\", function(d) {\n\t\t\t\t\t\tpopoverTarget = d3.select(this);\n\t\t\t\t\t\tcircleMouseOver(d);\n\t\t\t\t\t}).on(\"mouseout\", function() {\n\t\t\t\t\t\tcircleMouseOut();\n\t\t\t\t\t}).on(\"mousemove\", function() {\n\t\t\t\t\t\tcircleMouseMove();\n\t\t\t\t\t}).on(\"click\", function(d) {\n\t\t\t\t\t\tcircleMouseClick(d);\n\t\t\t\t\t}).style(\"stroke\", selectedCountryStroke).style(\"stroke-width\", \"0.5\").style(\"opacity\", 0)// L'opacità iniziale è 0 perchè verrà animata successivamente\n\t\t\t\t\t.attr(\"id\", \"mapCircle\").attr(\"r\", 0)// Come sopra, anche il raggio verrà animato\n\t\t\t\t\t.attr(\"cx\", function(d) {\n\t\t\t\t\t\tvar coords = get_xyz(getCountry(d.countryId));\n\t\t\t\t\t\treturn coords[0];\n\t\t\t\t\t}).attr(\"cy\", function(d) {\n\t\t\t\t\t\tvar coords = get_xyz(getCountry(d.countryId));\n\t\t\t\t\t\treturn coords[1];\n\t\t\t\t\t}).attr(\"fill\", function(d) {\n\t\t\t\t\t\treturn \"url(#\" + convertURIToCache(d.artwork_url) + \")\";\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t\t// Dopo aver creato i cerchi li devo mostrare con un'animazione\n\t\t\td3.selectAll(\"circle\").transition().delay(function(d) {// Utilizzando un delay che dipende dal numero di ascolti, mostro ogni cerchio in un istante diverso\n\t\t\t\treturn Math.random() * Math.sqrt(d.num_streams);\n\t\t\t}).duration(750).ease(\"bounce\").style(\"opacity\", 1).attr(\"r\", function(d) {// Il raggio dipende dal numero di ascolti secondo la funzione di scaling definita prima\n\t\t\t\treturn scale(d.num_streams);\n\t\t\t});\n\t\t\tfireDataLoadingEvent(false);\n\t\t\tfireStateChanged();\n\t\t});\n\t}\n\n\t// Quando il mouse entra nel cerchio mostro il tooltip\n\tfunction circleMouseOver(d) {\n\t\t$(popoverTarget[0][0]).popover({\n\t\t\ttitle : \"<center><p><b>\" + d.artist_name + \"</b></p><p>\" + d.track_name + \"</p></center>\",\n\t\t\tcontent : \"<center><div style='background-image:url(\" + convertURIToCache(d.artwork_url) + \"); background-size: 100%; height: 150px; width: 150px;'></div><p>Ascolti : \" + d.num_streams + \"</p></center>\",\n\t\t\thtml : true,\n\t\t\tplacement : \"left\",\n\t\t\tcontainer : \".grafico1\",\n\t\t\ttrigger : \"manual\",\n\t\t\tposition : \"fixed\",\n\t\t\ttemplate : '<div class=\"popover\" role=\"tooltip\" style=\"z-index:99999999 !important;\"><div class=\"arrow\"></div><h3 class=\"popover-title\"></h3><div class=\"popover-content\"></div></div>'\n\t\t});\n\t\t$(popoverTarget[0][0]).popover('show');\n\n\t}\n\n\t// Quando il mouse esce dal cerchio nascondo il tooltip\n\tfunction circleMouseOut() {\n\t\t$(popoverTarget[0][0]).popover('destroy');\n\t}\n\n\t// Se il mouse si muove aggiorno la posizione del tooltip per seguire il mouse\n\tfunction circleMouseMove() {\n\t\t// Utilizzando la libreria Popover questo metodo diventa superfluo\n\t}\n\n\t// Il click del mouse cambia lo stato del grafico e imposta il brano come selezionato\n\tfunction circleMouseClick(d) {\n\t\tselectedTrack = d;\n\t\tfireTrackChanged();\n\t}\n\n\t// Nascondo i cerchi e il tooltip\n\tfunction exitStatus1() {\n\t\tcoverTooltip.transition().duration(500).style(\"opacity\", 0);\n\t\td3.selectAll(\"circle#mapCircle\").transition().delay(function(d) {// Animo opacità e raggio in modo da nascondere i cerchi uno per volta\n\t\t\treturn Math.random() * Math.sqrt(d.num_streams / 10);\n\t\t}).duration(1000).style(\"opacity\", 0).attr(\"r\", 0);\n\t\t// Devo resettare lo zoom e lo stato selezionato\n\t\tif (country) {\n\t\t\tvar xyz = [width / 2, height / 1.5, 1];\n\t\t\tzoom(xyz);\n\t\t}\n\t}\n\n\t// Imposta il secondo stato di visualizzazione\n\tfunction setStatus2() {\n\t\tcurrentStatus = 2;\n\t\tif ($.isEmptyObject(selectedDate))\n\t\t\tselectedDate = \"max\";\n\t\tfireDataLoadingEvent(true);\n\t\td3.json(\"../map.php?state=2&trackUri=\" + selectedTrack.track_url + \"&date=\" + selectedDate, function(error, data) {\n\t\t\tcurrentData = data;\n\t\t\t// Per costruire il range dei colori mi serve il numero massimo degli ascolti\n\t\t\tvar maxStreams = d3.max(data, function(d) {\n\t\t\t\treturn parseInt(d.num_streams);\n\t\t\t});\n\t\t\t// Creo la scala con i colori utilizzando la libreria colorbrewer\n\t\t\tvar domain = d3.range(0, Math.sqrt(maxStreams));\n\t\t\tvar quantize = d3.scale.quantize().domain(domain).range(colorbrewer.Spectral[11]);\n\t\t\t// Adesso posso colorare ogni paese utilizzando la funzione di quantizzazione\n\t\t\tdata.forEach(function(d) {\n\t\t\t\tvar country = getCountry(d.countryId);\n\t\t\t\tif (country) {\n\t\t\t\t\tg.selectAll(\"#\" + country.id).on(\"mouseover\", function(d) {\n\t\t\t\t\t\tvar top = ((d3.event.pageY > height) ? height : d3.event.pageY);\n\t\t\t\t\t\t// Evitiamo che il tooltip venga disegnato fuori dall'area visibile\n\t\t\t\t\t\tcoverTooltip.transition().duration(500).style(\"opacity\", .9);\n\t\t\t\t\t\t// Inizio l'animazione\n\t\t\t\t\t\tvar countryId = d.id;\n\t\t\t\t\t\tvar countryName = d.properties.name;\n\t\t\t\t\t\tcoverTooltip.html(\"<span id=\\\"countryFlag\\\" class=\\\"flag-icon flag-icon-\" + countryId + \"\\\" style=\\\"height: 150px; width: 150px; float:left; top: -20px;\\\"></span>\" + \"<br/><div style:\\\"top: -20px;\\\">Paese : \" + countryName + \"</div>\").style(\"left\", (d3.event.pageX) + \"px\").style(\"top\", (top) + \"px\");\n\t\t\t\t\t}).on(\"mousemove\", function() {\n\t\t\t\t\t\tvar top = ((d3.event.pageY > height) ? height : d3.event.pageY);\n\t\t\t\t\t\tcoverTooltip.style(\"left\", (d3.event.pageX) + \"px\").style(\"top\", (top) + \"px\");\n\t\t\t\t\t}).on(\"mouseout\", function() {\n\t\t\t\t\t\tcoverTooltip.transition().duration(500).style(\"opacity\", 0);\n\t\t\t\t\t}).transition().duration(1000).ease(\"bounce\").style(\"fill\", quantize(Math.sqrt(parseInt(d.num_streams))));\n\t\t\t\t}\n\t\t\t});\n\t\t\tfireDataLoadingEvent(false);\n\t\t\tfireStateChanged();\n\t\t});\n\t}\n\n\t/* Fine funzioni private */\n\n\t/* Inizio funzioni pubbliche */\n\n\t// Imposto la traccia selezionata e cambio lo stato del grafico\n\tgrafico.setSelectedTrack = function(track) {\n\t\tselectedTrack = track;\n\t};\n\n\tgrafico.setSelectedDate = function(date) {\n\t\tselectedDate = date;\n\t};\n\n\t// Cambiamo lo stato di visualizzazione del grafico rimuovendo i dati vecchi e inserendo quelli nuovi con delle animazioni\n\tgrafico.changeStatus = function(newStatus) {\n\t\tcurrentStatus = newStatus;\n\t\tswitch(newStatus) {\n\t\t\tcase 1: {\n\t\t\t\tsetStatus1();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 2: {\n\t\t\t\texitStatus1();\n\t\t\t\tsetStatus2();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t};\n\n\tgrafico.toMosaic = function() {\n\t\t// L'oggetto SVG scala e cambia dimensione adattandosi al container in modo automatico, non devo fare niente\n\t};\n\n\tgrafico.toFull = function() {\n\t\t// L'oggetto SVG scala e cambia dimensione adattandosi al container in modo automatico, non devo fare niente\n\t};\n\n\t/* Fine funzioni pubbliche */\n\n\t/* Main */\n\n\t// La funzione principale da chiamare per disegnare il grafico.\n\tgrafico.draw = function() {\n\t\t// Creo la mappa a partire dai dati topografici\n\t\td3.json(\"charts/map/countries.topo.json\", function(error, data) {\n\t\t\tg.append(\"g\").attr(\"id\", \"countries\").selectAll(\"path\").data(topojson.feature(data, data.objects.countries).features).enter().append(\"path\").attr(\"id\", function(d) {\n\t\t\t\treturn d.id;\n\t\t\t}).attr(\"d\", path).on(\"click\", function(d) {\n\t\t\t\tcountry_clicked(d);\n\t\t\t});\n\t\t});\n\t\tgrafico.changeStatus(1);\n\t\t// Imposto lo stato di default\n\t\t$(window).resize(function() {\n\t\t\tvar w = $(\"#map\").width();\n\t\t\tsvg.attr(\"width\", w);\n\t\t\tsvg.attr(\"height\", w * height / width);\n\t\t});\n\t};\n\n\treturn grafico;\n}", "title": "" }, { "docid": "393de66c3e215134833300733b369ef2", "score": "0.6171166", "text": "function goToMap() {\n\t\t$('span.paginate').hide();\n\t\t \t\t\t\t\t\n\t\t// Change list and tools selected\n $('section.subheader ul.tab_menu li').removeClass('selected');\n $('div.general_options').removeClass('table end').addClass('map');\n $('section.subheader ul.tab_menu li a:contains(\"Map\")').parent().addClass('selected');\n \n // Disable the table\n\t\t$('table').cartoDBtable('disableTable');\n \n // Show map\n $('div.table_position').hide();\n\t\t$('body').addClass('map');\n showMap();\n\t}", "title": "" }, { "docid": "1d2ecaf18d2aa3054d060b69d6fee290", "score": "0.6166174", "text": "function afegirGlobus(mapa, latitud, longitud, titol, descripcio) {\n \n var contingutGlobus = '<div id=\"globus-gmap\"><h1>' + titol + '</h1><br>' + descripcio + '</div>';\n \n var globusInfo = new google.maps.InfoWindow({\n content: contingutGlobus\n });\n \n var marcador = new google.maps.Marker({\n position: new google.maps.LatLng(latitud, longitud),\n map: mapa,\n title: titol\n });\n \n google.maps.event.addListener(marcador, 'click', function() {\n globusInfo.open(mapa, marcador);\n });\n}", "title": "" }, { "docid": "2ee5f690ee9ec9c25541d67f5d8b497a", "score": "0.6164886", "text": "function readyPuntos(error, topo) {\n\n // Draw the map\n g = svg.append(\"g\")\n .selectAll(\"path\")\n .data(topo.features)\n .enter()\n .append(\"path\")\n // draw each country\n .attr(\"d\", d3.geoPath()\n .projection(projection)\n )\n // set the color of each country\n .attr(\"fill\",\"cornsilk\")\n\t .attr(\"width\",\"100%\")\n\t .attr(\"height\",\"100%\")\n\t .attr(\"position\", \"relative\");\n\n\t \n\tfor(a = 0; a<artistsJson.artists.length; a++){\n\t\tif(artistsJson.artists[a].years[0]<=fecha && artistsJson.artists[a].years[1]>=fecha){\n\t\t\t//getCoordenadas(artistsJson);\n\t\t\tcoorX = artistsJson.artists[a].coordenadasXY[0];//+7;\n\t\t\t//console.log(coorX);\n\t\t\tcoorY = artistsJson.artists[a].coordenadasXY[1];//*2;\n\t\t\t//console.log(coorY);\n\t\t\tvar c = svg.append(\"circle\")\n\t\t\t\t\t.attr(\"id\", artistsJson.artists[a].name)\n\t\t\t\t\t.attr(\"cx\",coorX)\n\t\t\t\t\t.attr(\"cy\", coorY)\n\t\t\t\t\t.attr(\"r\", 2)\n\t\t\t\t\t.attr(\"fill\", artistsJson.artists[a].color)\n\t\t\t\t\t.attr(\"stroke\", artistsJson.artists[a].color)\n\t\t\t\t\t.attr(\"stroke-width\", 3)\n\t\t\t\t\t.attr(\"fill-opacity\", 1)\n\t\t\t\t\t.on(\"click\", colocarImagen)\n\t\t\t\t\t.on(\"mouseover\",function(){\n\t\t\t\t\td3.select(this)\n\t\t\t\t\t\t.attr('r', 8)\n\t\t\t\t\t\t//.append(\"title\", info[j]);\n\t\t\t\t\t\t\n\t\t\t\t\t})\n\t\t\t\t\t.on(\"mouseout\", function(){\n\t\t\t\t\t\td3.select(this)\n\t\t\t\t\t\t\t.attr('r',2);\n\t\t\t\t\t});\n\t\t\t\t\n\t\t\n\t\t}\n\t}\n\t\n\t\n\t\n}", "title": "" }, { "docid": "1c5a4995094598c2f63b0d0cf8b5743e", "score": "0.6163901", "text": "function seeInfo() {\n $(\"#info\").show();\n $(\"#btn-float\").show();\n mymap.invalidateSize(); // mejora la carga del mapa.\n\n $(\"#orders\").hide();\n $(\"#end\").hide();\n $(\"#presentacion\").hide();\n}", "title": "" }, { "docid": "201e0f0b4189160fae71f417df00026d", "score": "0.6158095", "text": "function inicializarMapa(){\r\n\r\n\t\tlet mapaPropriedades = {\r\n\r\n\t\t\tcenter: {lat: -14.850347, lng: -40.844363},\r\n\t\t\tmapTypeId: google.maps.MapTypeId.ROADMAP,\r\n\t\t\tzoom: 12\r\n\t\t}\r\n\r\n\t\tmapa = new google.maps.Map( document.getElementById(\"mapa\"),mapaPropriedades );\r\n\t}// incializar mapa", "title": "" }, { "docid": "e67a583f505e8c2cb852d6826a5bf6a9", "score": "0.6157364", "text": "function mapMarca(){\n\t\n\tGMaps.on('click', map.map, function(e) {\n\t\thideAndShow('success','1');\n\t index = map.markers.length;\n\t \tlats = e.latLng.lat();\n\t lngs = e.latLng.lng();\n\t lt = $('#latid');\n\t\tln = $('#longs');\n\t template = $('#edit_marker_template').text();\n\t content = template.replace(/{{index}}/g, index).replace(/{{lats}}/g, lats).replace(/{{lngs}}/g, lngs);\n\n\t\tif(index == 0){\n\t\t\tmap.addMarker({\n\t\t\t\tlat: lats,\n\t\t\t\tlng: lngs,\n\t\t\t });\n\t\t lt.val(lats);\n\t\t ln.val(lngs);\n\t\t }\n\t\telse{\n\t\t map.removeMarkers();\n\t\t lt.val(\"\");\n\t\t ln.val(\"\");\n\t\t console.log(lats,lngs);\n\t\t map.addMarker({\n\t\t\t\tlat: lats,\n\t\t\t\tlng: lngs,\n\t\t\t });\n\t\t lt.val(lats);\n\t\t ln.val(lngs);\n\t\t}\n\t});\n}", "title": "" }, { "docid": "e90172d0d288d452935db8f30e4e3e4f", "score": "0.6152657", "text": "function map() {\r\n\t// Connect to ROS.\r\n\tvar ros = new ROSLIB.Ros({\r\n\t\turl: 'ws://192.168.137.66:9090'\r\n\t});\r\n\r\n\t// Create the main viewer.\r\n\tvar viewer = new ROS2D.Viewer({\r\n\t\tdivID: 'map',\r\n\t\twidth: 750,\r\n\t\theight: 750\r\n\t});\r\n\r\n\t// Setup the map client.\r\n\tvar gridClient = new ROS2D.OccupancyGridClient({\r\n\t\tros: ros,\r\n\t\trootObject: viewer.scene,\r\n\t\t// Use this property in case of continuous updates \r\n\t\tcontinuous: true\r\n\t});\r\n\t// Scale the canvas to fit to the map\r\n\tgridClient.on('change', function () {\r\n\t\tviewer.scaleToDimensions(gridClient.currentGrid.width, gridClient.currentGrid.height);\r\n\t\tviewer.shift(gridClient.currentGrid.pose.position.x, gridClient.currentGrid.pose.position.y);\r\n\t});\r\n}", "title": "" }, { "docid": "0642efd447a65c99d39350933ce0e165", "score": "0.61500293", "text": "function showMarkers() {\n setMapOnChosen(map);\n setMapOnWished(map);\n setMapOnVisited(map);\n}", "title": "" }, { "docid": "34c5164395ed28e87f2179995beab864", "score": "0.61478794", "text": "function lugar1(){\n var punto = new google.maps.LatLng(10.180934, -64.682882);\n var myOptions = {\n \tzoom: 18, //nivel de zoom para poder ver de cerca.\n \tcenter: punto,\n \tmapTypeId: google.maps.MapTypeId.MAP //Tipo de mapa inicial, mapa.\n \t\t}\n\t\n\tmap = new google.maps.Map(document.getElementById(\"map_canvas\"), myOptions);\n\t\n\tvar marker = new google.maps.Marker({\n position: map.getCenter()\n , map: map\n , icon: 'http://www.vermilinternacional.com/v2.png'\n , cursor: 'default'\n , draggable: false\n\t});\n\t\n\tgoogle.maps.event.addListener(marker, 'mouseover', function(){\n this.setIcon('http://www.vermilinternacional.com/v1.png');\n });\n \n google.maps.event.addListener(marker, 'mouseout', function(){\n this.setIcon('http://www.vermilinternacional.com/v2.png');\n });\t\n}", "title": "" }, { "docid": "8640de7452cec0f6ed8a33d8fc00bb08", "score": "0.6139576", "text": "function lugar2(){\n var punto = new google.maps.LatLng(10.234320, -67.999734);\n var myOptions = {\n \tzoom: 18, //nivel de zoom para poder ver de cerca.\n \tcenter: punto,\n \tmapTypeId: google.maps.MapTypeId.MAP //Tipo de mapa inicial, mapa.\n \t\t}\n\t\n\tmap = new google.maps.Map(document.getElementById(\"map_canvas\"), myOptions);\n\t\n\tvar marker = new google.maps.Marker({\n position: map.getCenter()\n , map: map\n , icon: 'http://www.vermilinternacional.com/v2.png'\n , cursor: 'default'\n , draggable: false\n\t});\n\t\n\tgoogle.maps.event.addListener(marker, 'mouseover', function(){\n this.setIcon('http://www.vermilinternacional.com/v1.png');\n });\n \n google.maps.event.addListener(marker, 'mouseout', function(){\n this.setIcon('http://www.vermilinternacional.com/v2.png');\n });\t\n}", "title": "" }, { "docid": "1be9f754476f70902e32a6c03ab2f33b", "score": "0.61381394", "text": "function displayMap(map) {\n let mapString = \"{underline}{gray-fg}\";\n for (let y = 0; y < map.height; y++) {\n // one row per line\n let mapRow = \"▌{/gray-fg}{black-fg}\";\n for (let x = 0; x < map.width; x++) {\n // inter-column line\n if (x > 0) mapRow += \"│\";\n // highlight the spot where the mouse is\n if (!map.cells[x][y].discovered) {\n let cell = '';\n if (map.cells[x][y].flagged) {\n // show a flag\n cell = \"{red-fg}►{/red-fg}\";\n }\n else {\n cell = \" \";\n }\n if (x === mousePos.x && y === mousePos.y) {\n cell = \"{black-bg}\" + cell + \"{/black-bg}\";\n }\n mapRow += cell;\n }\n else if (map.cells[x][y].isMine) {\n // there is a mine here\n if (map.cells[x][y].flagged) {\n // it has been correctly flagged\n mapRow += `{red-fg}►{/red-fg}`\n }\n else {\n // no flag\n mapRow += '{white-fg}{black-bg}*{/black-bg}{/white-fg}';\n }\n }\n else if (map.cells[x][y].flagged) {\n // a mine has been falsely flagged\n mapRow += `{bold}{white-fg}{red-bg}X{/red-bg}{/white-fg}{/bold}`;\n }\n else {\n let cell = '';\n // show number of adjacent mines\n let color = [\n // traditional minesweeper colors :)\n '',\n 'blue',\n '#007700', // dark green\n 'red',\n '#880088', // purple/dark fuscia\n '#880000', // maroon\n '#00bbbb', // teal\n 'black',\n 'gray']\n // choose the one corresponding to the number\n [map.cells[x][y].number]; \n // build the display string\n if (color) {\n cell = `{${color}-fg}${(map.cells[x][y].number).toString()}{/${color}-fg}`;\n }\n else {\n // gray block for 0 mines\n cell = `{gray-fg}▒{/gray-fg}`;\n }\n // invert to show mouse position\n if (x === mousePos.x && y === mousePos.y) {\n cell = \"{black-bg}\" + cell + \"{/black-bg}\"\n }\n mapRow += cell;\n }\n }\n // and finish it with a vertical line plus a newline\n mapString += mapRow + \"{/black-fg}{gray-fg}▐\\n\";\n }\n // close off the underline\n mapString += \"{/underline}\";\n // set box content\n mineBox.setContent(mapString);\n}", "title": "" }, { "docid": "76db05a5b0192bcdbc191710d75a762f", "score": "0.6134445", "text": "function initMap() {\n \n // Créer l'objet \"macarte\" et l'insèrer dans l'élément HTML qui a l'ID \"map\"\n macarte = L.map('map').setView([lat, lon], 9);\n // Leaflet ne récupère pas les cartes (tiles) sur un serveur par défaut. Nous devons lui préciser où nous souhaitons les récupérer. Ici, openstreetmap.fr\n L.tileLayer('https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', {\n // Il est toujours bien de laisser le lien vers la source des données\n attribution: 'données © <a href=\"//osm.org/copyright\">OpenStreetMap</a>/ODbL - rendu <a href=\"//openstreetmap.fr\">OSM France</a>',\n minZoom: 1,\n maxZoom: 16\n }).addTo(macarte);\n //création du marqueur\n for (ville in villes) {\n\t\tvar marker = L.marker([villes[ville].lat, villes[ville].lon]).addTo(macarte);\n\t // Nous ajoutons la popup. A noter que son contenu (ici la variable ville) peut être du HTML\n\t marker.bindPopup(ville);\n \n } \n \n \n \n }", "title": "" }, { "docid": "2b9d38d628034fe2485e74de335dccde", "score": "0.6130141", "text": "function cargar_gmap(latitud, longitud){\n var myOptions = {\n zoom: 15,\n center: new google.maps.LatLng(latitud,longitud),\n mapTypeControl: true,\n streetViewControl: false,\n mapTypeControlOptions: {\n style: google.maps.MapTypeControlStyle.DROPDOWN_MENU\n },\n mapTypeId: google.maps.MapTypeId.ROADMAP,\n };\n map = new google.maps.Map(document.getElementById(\"map_canvas\"), myOptions);\n\n createPointToEdit(latitud,longitud);\n}", "title": "" }, { "docid": "4b1963dd30405d7bb2f769a7413927a8", "score": "0.6127904", "text": "function funcionInicializarMapa () {\r\n var elMapas = document.querySelectorAll('#ListaDeTiendas a li');\r\n for (var i = 0; i < elMapas.length; i++) {\r\n var elMapa = document.querySelector('#mapa' + String(i));\r\n //Se crea una instancia para el mapa\r\n var gmMapa = new google.maps.Map(document.querySelector('#mapa' + String(i)), {\r\n //Se establece el zoom\r\n zoom: 16,\r\n //Se centra el mapa a una ubicacion\r\n center: new google.maps.LatLng(9.935, -84.092),\r\n //Se establece el tipo del mapa\r\n mapTypeId: google.maps.MapTypeId.HYBRID\r\n });\r\n //Se agregan opciones al mapa\r\n var gmOpcionesMapa = {\r\n //Se establece el zoom maximo\r\n maxZoom:20,\r\n //Se establece el zoom minimo\r\n minZoom:14,\r\n //Se deshabilita el uso de stree view\r\n streetViewControl: false,\r\n //Se deshabilita el control del tipo de mapa\r\n mapTypeControl: false\r\n }\r\n //Se agregan las opciones al mapa\r\n gmMapa.setOptions(gmOpcionesMapa);\r\n\r\n //Se setea un marcador con una ubicacion por defecto\r\n var gmMarcador = new google.maps.Marker({\r\n //Se agrega la posicion en San Jose\r\n position: new google.maps.LatLng(elMapa.getAttribute('latitud'), elMapa.getAttribute('longitud'))//,\r\n //Se habilita el arratre del marcador\r\n //draggable: true\r\n });\r\n //Se centra el mapa en la posicion del marcador\r\n gmMapa.setCenter(gmMarcador.position);\r\n //Se coloca el marcador en el mapa\r\n gmMarcador.setMap(gmMapa);\r\n }\r\n }", "title": "" }, { "docid": "518a6c8125d6f991b23a1aab1164b286", "score": "0.6127341", "text": "function showMap(elemId, mapLat, mapLong, nZoom)\n {\n showMap(elemId, mapLat, mapLong, nZoom, 'WidgetEmbed-cdsdest');\n }", "title": "" }, { "docid": "196377dd99755aea0db326c7b16c851e", "score": "0.6124209", "text": "function initMap() {\n // Créer l'objet \"macarte\" et l'insèrer dans l'élément HTML qui a l'ID \"map\"\n macarte = L.map('map').setView([lat, lon], 2);\n // macarte.fitBounds(); // Nous demandons à ce que tous les marqueurs soient visibles, et ajoutons un padding (pad(0.5)) pour que les marqueurs ne soient pas coupés\n\n // Leaflet ne récupère pas les cartes (tiles) sur un serveur par défaut. Nous devons lui préciser où nous souhaitons les récupérer. Ici, openstreetmap.fr\n L.tileLayer('https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', {\n // Il est toujours bien de laisser le lien vers la source des données\n attribution: 'données © OpenStreetMap/ODbL - rendu OSM France',\n minZoom: 1,\n maxZoom: 20\n }).addTo(macarte);\n // Nous parcourons la liste des villes\n for (ville in villes) {\n var marker = L.marker([villes[ville].lat, villes[ville].lon]).addTo(macarte);\n } \n}", "title": "" }, { "docid": "7925c59068fa007685071e712288a0e9", "score": "0.6117193", "text": "function showPositionMap(coordinates){\n if(currPos)\n currPos.remove();\n map.setView(coordinates, 15);\n\n //Imposta il marker sulla posizione corrente\n currPos = L.marker(coordinates, {draggable:'true'}); //il marker si può spostare\n currPos.setIcon(redIcon);\n //Aggiunge popup al marker\n currPos.bindPopup(\n `<div style=\"text-align: center;\">\n <h6 class=\"text-uppercase\" style=\"margin-top: 2%;\"> Where I Am </h6>\n <hr align=\"center\"> Trascinami per impostare la posizione attuale\n </div>`).openPopup();\n //Aggiunge il marker alla mappa\n currPos.addTo(map);\n}", "title": "" }, { "docid": "5c12d711019a6bdf06464e45153e7443", "score": "0.6108958", "text": "function mapEuropeDisplay(Which_map = \"Europe\"){\r\n My_reference = undefined\r\n hide_element_for_transition()\r\n\r\n\r\n // Canvas\r\n var width = 600,\r\n height = 500;\r\n\r\n\r\n // Projection\r\n var svg = d3.select(\".mapColumn\").append(\"svg\")\r\n .attr(\"width\", width)\r\n .attr(\"height\", height);\r\n var g = svg.append(\"g\");\r\n var projection = d3.geoConicConformal().center([36,53]).scale(700);\r\n var path = d3.geoPath().projection(projection);\r\n\r\n // Define the div for the tooltip\r\n // var div = d3.select(\"body\")\r\n // .append(\"div\") \r\n // .attr(\"class\", \"tooltip\") \r\n // .style(\"opacity\", 1)\r\n // .attr(\"html\",\"test\")\r\n //.style(\"background\", \"lightsteelblue\");\r\n // TODO : le css n'est pas utilisé pour div.tooltip. Pourquoi ??\r\n\r\n // BACKGROUND OF THE MAP\r\n d3.json(\"data/europe.json\", function(json) {\r\n g.selectAll(\"path\")\r\n .data(json.features)\r\n .enter()\r\n .append(\"path\")\r\n .attr(\"d\", path)\r\n .style(\"fill\", France_color);\r\n });\r\n\r\n // ADD SLIDER FOR ALPHA VALUE \r\n var slider = document.getElementById(\"slider\");\r\n\r\n slider.min = slider_range[Which_map][0];\r\n slider.max = slider_range[Which_map][1];\r\n slider.step = (slider.max-slider.min)/25\r\n slider.value = slider_range[Which_map][2]\r\n alpha = slider.value //ICI VALEUR INITIALE ALPHA\r\n var output = document.getElementById(\"alpha_span\");\r\n output.innerHTML = select_text; //not used\r\n slider.oninput = function() {\r\n alpha = this.value\r\n UpdateCitiesFrance();\r\n } \r\n // output.fill = \"blue\";\r\n // slider.fill = \"#006EE3\"\r\n // d3.select(\"#alpha_span\").attr(\"fill\",\"blue\").attr(\"transform\", \"translate(0,-30)\")\r\n // d3.select(\"#slider\").attr(\"fill\",\"#006EE3\")\r\n\r\n d3.csv(\"data/Europe-Cities_lat_long.csv\", function(cities) {\r\n console.log(\"projecting French cities\")\r\n cities.forEach(function(d){\r\n d.long = parseFloat(d.long)\r\n d.lat = parseFloat(d.lat)\r\n var projected_city = projection([d.long, d.lat])\r\n d.plong = projected_city[0]\r\n d.plat = projected_city[1] \r\n d.dist = -1 \r\n if(d.City==\"Paris\"){\r\n Paris = {}\r\n Paris.plat = d.plat;\r\n Paris.plong = d.plong;\r\n } \r\n }) \r\n // associer à chaque ville un dictionniare avec pour chaque autre ville ses voisins.\r\n\r\n d3.csv(\"data/Europe-Cities_Distance_Matrix.txt\",function(distances){\r\n for(var city_index = 0 ; city_index<distances.length;city_index++){\r\n var the_city = cities[city_index][\"City\"]\r\n for(var dist_index = 0 ; dist_index<distances.length;dist_index++){\r\n if(distances[dist_index][\"\"] == the_city){\r\n delete distances[dist_index][\"\"]\r\n for(var key in distances[dist_index]){\r\n distances[dist_index][key] = parseFloat(distances[dist_index][key])\r\n if(isNaN(distances[dist_index][key])){\r\n distances[dist_index][key] = undefined\r\n }\r\n }\r\n cities[city_index][\"dist\"] = distances[dist_index]\r\n break\r\n }\r\n }\r\n }\r\n })\r\n console.log(JSON.stringify(cities[0][\"dist\"]))\r\n console.log(cities)\r\n console.log(Object.keys(cities[0]))\r\n // Tous les import de données initiaux se font ici.\r\n var g = d3.select(\"g\")\r\n\r\n // APPEND ISOCHRONES CIRCLES\r\n\r\n an_hour = 3600 * alpha\r\n\r\n console.log(\"An hour is worth (px) :\")\r\n console.log(an_hour)\r\n \r\n var isoH = []\r\n d3.range(24).forEach(function(d){\r\n if(d%2==0){\r\n isoH.push({\"NB_hour\":d+1,\"label\": String(d+1) + \"h\", \"r\" : (d+1)*an_hour})\r\n }\r\n })\r\n isoH = isoH.reverse()\r\n\r\n g.selectAll(\".iso_circles\")\r\n .data(isoH)\r\n .enter()\r\n .append(\"circle\")\r\n .attr(\"class\",\"iso_circles\")\r\n .attr(\"r\",function(d){\r\n return d.r;\r\n })\r\n .attr(\"cx\",projection([48.856614,2.35])[0])\r\n .attr(\"cy\",projection([48.856614,2.35])[1])\r\n .attr(\"opacity\",0)\r\n .on(\"mousemove\", function(d){\r\n d3.select(\"#iso_label\"+d.NB_hour)\r\n .attr(\"x\",mouse_position[0]-8)\r\n .attr(\"y\",mouse_position[1]-115)\r\n .attr(\"opacity\",1)\r\n })\r\n .on(\"mouseout\", function(d){\r\n d3.select(\"#iso_label\"+d.NB_hour).attr(\"opacity\",0)\r\n })\r\n\r\n\r\n g.selectAll(\".iso_label\")\r\n .data(isoH)\r\n .enter()\r\n .append(\"text\")\r\n .attr(\"class\", \"iso_label user-select-none\")\r\n .attr(\"id\",function(d){return \"iso_label\"+d.NB_hour;})\r\n .attr(\"x\", projection([48.856614,2.35])[0])\r\n .attr(\"y\", function(d) {var y = projection([48.856614,2.35])[1]; return y; }) //faux mais osef\r\n .attr(\"font-size\", \"13px\")\r\n .attr(\"font-weight\",\"bold\")\r\n .attr(\"opacity\",0)\r\n .text(function(d) {return d.label;});\r\n\r\n \r\n // INITIALIZE TRANSPARENT LINES\r\n g.selectAll(\"line\")\r\n .data(cities)\r\n .enter()\r\n .append(\"line\")\r\n .attr(\"class\",\"dir_line\")\r\n .attr(\"x1\", function(d) {return d.plong;})\r\n .attr(\"y1\", function(d) {return d.plat;})\r\n .attr(\"x2\", projection([2.35,48.856614])[0])\r\n .attr(\"y2\", projection([2.35,48.856614])[1])\r\n .attr(\"opacity\",0)\r\n\r\n // STATIC CITIES\r\n g.selectAll('.Static_Cities')\r\n .data(cities)\r\n .enter()\r\n .append('circle')\r\n .attr(\"class\",\"Static_Cities\")\r\n .attr(\"id\", function(d){return \"static_\"+d.City;})\r\n .attr(\"cx\", function(d) {return d.plong;})\r\n .attr(\"cy\", function(d) { return d.plat;})\r\n .attr(\"position\",\"absolute\")\r\n .attr(\"z-index\", 4)\r\n .attr(\"r\", 0.0001)\r\n .style(\"fill\", static_color)\r\n .style(\"opacity\",0.8)\r\n .on(\"click\",function(d){\r\n document.getElementById(\"travel\").style.visibility = \"hidden\";\r\n document.getElementById(\"destination\").style.visibility = \"hidden\";\r\n changeInformationTravel(\"Hover over another city\");\r\n My_destination = undefined;\r\n if(typeof My_reference !== 'undefined'){\r\n if(My_reference.City !=d.City){\r\n document.getElementById(\"travel\").style.visibility = \"visible\";\r\n My_reference = {City :d.City, plong : d.plong, plat : d.plat};\r\n changeInformationCityOrigin(My_reference.City, My_reference.City + \".jpg\");\r\n }else{\r\n My_reference = undefined;\r\n changeInformationCityOrigin(\"Select city\", My_reference + \".jpg\");\r\n }\r\n }else{\r\n document.getElementById(\"travel\").style.visibility = \"visible\";\r\n My_reference = {City :d.City, plong : d.plong, plat : d.plat};\r\n changeInformationCityOrigin(My_reference.City, My_reference.City + \".jpg\");\r\n if(typeof My_destination !== 'undefined'){\r\n document.getElementById(\"destination\").style.visibility = \"visible\";\r\n getTimeBetweenTwoCities(My_reference, My_destination, cities);\r\n }\r\n console.log(\"Ref :\"+ My_reference.City)\r\n }\r\n UpdateCitiesFrance();\r\n })\r\n .on(\"mouseover\",function(d){\r\n document.getElementById(\"travel\").style.visibility = \"hidden\";\r\n document.getElementById(\"destination\").style.visibility = \"hidden\";\r\n d3.select(this).style(\"cursor\", \"pointer\")\r\n d3.select(this).style(\"r\", radius_static+radius_offset); \r\n d3.select(\"#dynamic_\"+d.City).style(\"r\", radius_dynamic+radius_offset); \r\n\r\n if(typeof My_reference !== 'undefined'){\r\n document.getElementById(\"travel\").style.visibility = \"visible\";\r\n if(My_reference.City !=d.City){\r\n My_destination = {City :d.City, plong : d.plong, plat : d.plat};\r\n changeInformationCityDestination(d.City, d.City + \".jpg\");\r\n document.getElementById(\"destination\").style.visibility = \"visible\";\r\n getTimeBetweenTwoCities(My_reference, My_destination, cities);\r\n //changeInformationTravel(\"ca change\");\r\n }else{\r\n My_destination = undefined;\r\n //changeInformationCityDestination(\"Hover over another city\", \"undefined.jpg\");\r\n changeInformationTravel(\"Hover over another city\");\r\n }\r\n }else{\r\n document.getElementById(\"travel\").style.visibility = \"visible\";\r\n My_destination = {City :d.City, plong : d.plong, plat : d.plat};\r\n changeInformationCityDestination(d.City, d.City + \".jpg\");\r\n changeInformationTravel(\"Hover over another city\");\r\n }\r\n UpdateCitiesFrance();\r\n })\r\n .on(\"mouseout\",function(d){\r\n d3.select(this).style(\"cursor\", \"default\")\r\n d3.select(this).transition().duration(50).style(\"r\", radius_static);\r\n d3.select(\"#dynamic_\").transition().duration(50).style(\"r\", radius_dynamic); \r\n });\r\n // DYNAMIC CITIES\r\n g.selectAll('.Cities')\r\n .data(cities)\r\n .enter()\r\n .append('circle')\r\n .attr(\"class\",\"Cities\")\r\n .attr(\"id\", function(d){return \"dynamic_\"+d.City;})\r\n .attr(\"cx\", function(d) {return d.plong;})\r\n .attr(\"cy\", function(d) { return d.plat;})\r\n .attr(\"r\", radius_dynamic)\r\n .style(\"fill\", dynamic_color)\r\n .attr(\"position\",\"absolute\")\r\n .attr(\"z-index\", 4)\r\n .on(\"click\",function(d){\r\n document.getElementById(\"travel\").style.visibility = \"hidden\";\r\n document.getElementById(\"destination\").style.visibility = \"hidden\";\r\n My_destination = undefined;\r\n changeInformationTravel(\"Hover over another city\");\r\n if(typeof My_reference !== 'undefined'){\r\n if(My_reference.City !=d.City){\r\n document.getElementById(\"travel\").style.visibility = \"visible\";\r\n My_reference = {City :d.City, plong : d.plong, plat : d.plat};\r\n changeInformationCityOrigin(My_reference.City, My_reference.City + \".jpg\");\r\n }else{\r\n My_reference = undefined;\r\n changeInformationCityOrigin(\"Select city\", My_reference + \".jpg\");\r\n changeInformationTravel(\"Hover over another city\");\r\n }\r\n }else{\r\n document.getElementById(\"travel\").style.visibility = \"visible\";\r\n My_reference = {City :d.City, plong : d.plong, plat : d.plat};\r\n changeInformationCityOrigin(My_reference.City, My_reference.City + \".jpg\");\r\n if(typeof My_destination !== 'undefined'){\r\n document.getElementById(\"destination\").style.visibility = \"visible\";\r\n getTimeBetweenTwoCities(My_reference, My_destination, cities);\r\n }\r\n console.log(\"Ref :\"+ My_reference.City)\r\n }\r\n UpdateCitiesFrance();\r\n })\r\n .on(\"mouseover\",function(d){\r\n document.getElementById(\"travel\").style.visibility = \"hidden\";\r\n document.getElementById(\"destination\").style.visibility = \"hidden\";\r\n d3.select(this).style(\"cursor\", \"pointer\")\r\n d3.select(this).style(\"r\", radius_dynamic+radius_offset);\r\n d3.select(\"#static_\"+d.City).style(\"r\", radius_static+radius_offset);\r\n\r\n if(typeof My_reference !== 'undefined'){\r\n document.getElementById(\"travel\").style.visibility = \"visible\";\r\n if(My_reference.City !=d.City){\r\n My_destination = {City :d.City, plong : d.plong, plat : d.plat};\r\n changeInformationCityDestination(d.City, d.City + \".jpg\");\r\n document.getElementById(\"destination\").style.visibility = \"visible\";\r\n getTimeBetweenTwoCities(My_reference, My_destination, cities);\r\n \r\n }else{\r\n My_destination = undefined;\r\n //changeInformationCityDestination(\"Hover over another city\", \"undefined.jpg\");\r\n changeInformationTravel(\"Hover over another city\");\r\n }\r\n }else{\r\n My_destination = {City :d.City, plong : d.plong, plat : d.plat};\r\n changeInformationCityDestination(d.City, d.City + \".jpg\");\r\n changeInformationTravel(\"Hover over another city\");\r\n }\r\n UpdateCitiesFrance();\r\n })\r\n .on(\"mouseout\",function(d){\r\n d3.select(this).style(\"cursor\", \"default\")\r\n d3.select(this).transition().duration(50).style(\"r\", radius_dynamic);\r\n d3.select(\"#static_\"+d.City).transition().duration(50).style(\"r\", radius_static);\r\n });\r\n\r\n // APPEND TOOLTIP\r\n\r\n g.selectAll(\".city_label\")\r\n .data(cities)\r\n .enter()\r\n .append(\"text\")\r\n .attr(\"class\", \"city_label user-select-none\")\r\n .attr(\"id\", function(d){return d.City;})\r\n .text(function(d) { return d.City.toUpperCase();}) //test de majuscule\r\n .attr(\"x\", function(d) { return d.plong-10; })\r\n .attr(\"y\", function(d) { return d.plat +15; })\r\n .attr(\"font-size\", \"11px\")// .attr(\"font-weight\",\"bold\")\r\n .on(\"click\", function(d){\r\n document.getElementById(\"travel\").style.visibility = \"hidden\";\r\n document.getElementById(\"destination\").style.visibility = \"hidden\";\r\n My_destination = undefined;\r\n changeInformationTravel(\"Hover over another city\");\r\n if(typeof My_reference !== 'undefined'){\r\n if(My_reference.City !=d.City){\r\n document.getElementById(\"travel\").style.visibility = \"visible\";\r\n My_reference = {City :d.City, plong : d.plong, plat : d.plat};\r\n changeInformationCityOrigin(My_reference.City, My_reference.City + \".jpg\");\r\n if(typeof My_destination !== 'undefined')\r\n getTimeBetweenTwoCities(My_reference, My_destination, cities);\r\n console.log(My_reference)\r\n }else{\r\n My_reference = undefined;\r\n changeInformationCityOrigin(\"Select city\", My_reference + \".jpg\");\r\n changeInformationTravel(\"Hover over another city\");\r\n }\r\n }else{\r\n document.getElementById(\"travel\").style.visibility = \"visible\";\r\n My_reference = {City :d.City, plong : d.plong, plat : d.plat};\r\n changeInformationCityOrigin(My_reference.City, My_reference.City + \".jpg\");\r\n if(typeof My_destination !== 'undefined')\r\n getTimeBetweenTwoCities(My_reference, My_destination, cities);\r\n console.log(\"Ref :\"+ My_reference.City)\r\n }\r\n UpdateCitiesFrance();\r\n })\r\n .on(\"mouseover\",function(d){\r\n //document.getElementById(\"travel\").style.visibility = \"hidden\";\r\n //document.getElementById(\"destination\").style.visibility = \"hidden\";\r\n d3.select(this).style(\"cursor\", \"pointer\")\r\n d3.select('#dynamic_'+d.City).style(\"r\", radius_dynamic+radius_offset);\r\n d3.select('#static_'+d.City).style(\"r\", radius_static+radius_offset);\r\n if(typeof My_reference !== 'undefined'){\r\n //document.getElementById(\"travel\").style.visibility = \"visible\";\r\n if(My_reference.City !=d.City){\r\n //My_destination = {City :d.City, plong : d.plong, plat : d.plat};\r\n //document.getElementById(\"destination\").style.visibility = \"visible\";\r\n //changeInformationCityDestination(d.City, d.City + \".jpg\");\r\n //getTimeBetweenTwoCities(My_reference, My_destination, cities);\r\n \r\n }else{\r\n //My_destination = undefined;\r\n //changeInformationCityDestination(\"Hover over another city\", \"undefined.jpg\");\r\n //changeInformationTravel(\"Hover over another city\");\r\n }\r\n }else{\r\n //My_destination = {City :d.City, plong : d.plong, plat : d.plat};\r\n //changeInformationCityDestination(d.City, d.City + \".jpg\");\r\n //changeInformationTravel(\"Hover over another city\");\r\n }\r\n UpdateCitiesFrance();\r\n })\r\n .on(\"mouseout\",function(d){\r\n d3.select(this).style(\"cursor\", \"default\")\r\n d3.select('#dynamic_'+d.City).transition().duration(50).style(\"r\", radius_dynamic);\r\n d3.select('#static_'+d.City).transition().duration(50).style(\"r\", radius_static);\r\n });\r\n\r\n\r\n\r\n UpdateCitiesFrance()\r\n })\r\n}", "title": "" }, { "docid": "c8b999dc7a89e501d550e3359682381f", "score": "0.6106366", "text": "function localizacion(posicion){\n var latitude = posicion.coords.latitude;\n var longitude = posicion.coords.longitude;\n var miUbicacion = new google.maps.Marker({\n position: {lat: latitude, lng: longitude},\n map: map\n })\n //map.setZoom(18),\n //map.setCenter({lat: latitude, lng: longitude})\n }", "title": "" }, { "docid": "1ae4280ba117fd9abafe4801a063cf7f", "score": "0.6102759", "text": "function initMap() {\n var alamos = {lat: 20.6114998, lng: -100.3849255};\n var indereq ={lat:20.617167, lng: -100.401361};\n var indereq2 = {lat:20.617000, lng: -100.396500};\n var celayacuota = {lat:20.576806, lng: -100.408306};\n var surponiente ={lat:20.550194, lng:-100.374222};\n var zaragoza = {lat:20.580444, lng:-100.409778};\n var finsa = {lat:20.5774648, lng:-100.2009594};\n var mexqro = {lat:20.56756, lng:-100.2512922};\n var colorado = {lat:20.5661716, lng:-100.2465773};\n var aeropuertoalv = {lat:20.6068538, lng:-100.1467389};\n var centroperro = { lat: 20.5923748, lng:-100.2832912 };\n var carmen = { lat:20.571844, lng: -100.2728297};\n var map = new google.maps.Map(document.getElementById('map'), {\n zoom: 12,\n center: centroperro,\n scrollwheel: false,\n \n });\n\n var marker = new google.maps.Marker({\n position: alamos,\n map: map,\n icon: \"../../server/static/img/spectacular.png\",\n title: 'Alamos'\n });\n var marker2 = new google.maps.Marker({\n position: indereq,\n map: map,\n icon: \"../../server/static/img/spectacular.png\", \n title: 'INDEREQ'\n });\n var marker3 = new google.maps.Marker({\n position: indereq2,\n map: map,\n icon: \"../../server/static/img/spectacular.png\", \n title: 'INDEREQ2'\n });\n var marker4 = new google.maps.Marker({\n position: celayacuota,\n map: map,\n title: 'Celaya Cuota',\n icon: \"../../server/static/img/spectacular.png\"\n \n });\n var marker5 = new google.maps.Marker({\n position: surponiente,\n map: map,\n title: 'Surponiente',\n icon: \"../../server/static/img/spectacular.png\"\n \n });\n var marker6 = new google.maps.Marker({\n position: zaragoza,\n map: map,\n title: 'Zaragoza',\n icon: \"../../server/static/img/spectacular.png\"\n \n });\n var marker7 = new google.maps.Marker({\n position: finsa,\n map: map,\n title: 'FINSA',\n icon: \"../../server/static/img/spectacular.png\"\n \n });\n var marker8 = new google.maps.Marker({\n position: mexqro,\n map: map,\n title: 'Carretera MexQro',\n icon: \"../../server/static/img/spectacular.png\"\n \n });\n \n var marker9 = new google.maps.Marker({\n position: colorado,\n map: map,\n title: 'El Colorado',\n icon: \"../../server/static/img/spectacular.png\"\n \n });\n var marker10 = new google.maps.Marker({\n position: aeropuertoalv,\n map: map,\n title: 'Aeropuerto',\n icon: \"../../server/static/img/spectacular.png\"\n \n }); \n \n var marker11 = new google.maps.Marker({\n position: carmen,\n map: map,\n title: 'Carmen',\n icon: \"../../server/static/img/spectacular.png\" \n });\n \n \n marker.addListener('click', function() {\n $(\"#portfolioModal6\").modal();\n });\n \n marker2.addListener('click', function() {\n $(\"#portfolioModal7\").modal();\n });\n \n marker3.addListener('click', function() {\n $(\"#portfolioModal4\").modal();\n });\n marker4.addListener('click', function() {\n $(\"#portfolioModal1\").modal();\n });\n marker5.addListener('click', function() {\n $(\"#portfolioModal5\").modal();\n }); \n marker6.addListener('click', function() {\n $(\"#portfolioModal3\").modal();\n });\n marker7.addListener('click', function() {\n $(\"#portfolioModal2\").modal();\n });\n marker8.addListener('click', function() {\n $(\"#portfolioModal8\").modal();\n });\n \n marker9.addListener('click', function() {\n $(\"#portfolioModal9\").modal();\n });\n marker10.addListener('click', function() {\n $(\"#portfolioModal10\").modal();\n }); \n marker11.addListener('click', function() {\n $(\"#portfolioModal11\").modal();\n }); \n \n}", "title": "" }, { "docid": "ad3fe9de185cb67827fd69eec42ad883", "score": "0.6098657", "text": "function initialize_mapa() {\n\t\t document.getElementById(\"map_canvas\").style.display = \"block\";\t\n\t\t var myOptions = {zoom: 16,mapTypeId: google.maps.MapTypeId.ROADMAP};\n\t\t map = new google.maps.Map(document.getElementById('map_canvas'), myOptions);\n\t\t geocoder = new google.maps.Geocoder();\n\t\t \n\t\t //var enderDe = 'ALAMEDA SANTOS, 1000, SAO PAULO - SP, 01418-9028';\n\t\t var enderDe = tmp_endereco_completo;\n\t\t geocoder.geocode( { 'address': enderDe, 'region' : 'BR'},trataLocs);\n\t\t \n\t\t //resize_map();\n\t\t $(window).resize(function () {\n resize_map();\n\t\t });\n\t\t \n\t\t}", "title": "" }, { "docid": "5e754e56b388fce10179ccb9efa90735", "score": "0.60957396", "text": "function uniLuis() {\n var map = new google.maps.Map(document.getElementById('map'), {\n zoom: 18,\n center: {lat: 6.258900, lng: -75.584128},\n // mapTypeId: 'roadmap'\n styles: [\n {elementType: 'geometry', stylers: [{color: '#242f3e'}]},\n {elementType: 'labels.text.stroke', stylers: [{color: '#242f3e'}]},\n {elementType: 'labels.text.fill', stylers: [{color: '#746855'}]},\n {\n featureType: 'administrative.locality',\n elementType: 'labels.text.fill',\n stylers: [{color: '#d59563'}]\n },\n {\n featureType: 'poi',\n elementType: 'labels.text.fill',\n stylers: [{color: '#d59563'}]\n },\n {\n featureType: 'poi.park',\n elementType: 'geometry',\n stylers: [{color: '#263c3f'}]\n },\n {\n featureType: 'poi.park',\n elementType: 'labels.text.fill',\n stylers: [{color: '#6b9a76'}]\n },\n {\n featureType: 'road',\n elementType: 'geometry',\n stylers: [{color: '#38414e'}]\n },\n {\n featureType: 'road',\n elementType: 'geometry.stroke',\n stylers: [{color: '#212a37'}]\n },\n {\n featureType: 'road',\n elementType: 'labels.text.fill',\n stylers: [{color: '#9ca5b3'}]\n },\n {\n featureType: 'road.highway',\n elementType: 'geometry',\n stylers: [{color: '#746855'}]\n },\n {\n featureType: 'road.highway',\n elementType: 'geometry.stroke',\n stylers: [{color: '#1f2835'}]\n },\n {\n featureType: 'road.highway',\n elementType: 'labels.text.fill',\n stylers: [{color: '#f3d19c'}]\n },\n {\n featureType: 'transit',\n elementType: 'geometry',\n stylers: [{color: '#2f3948'}]\n },\n {\n featureType: 'transit.station',\n elementType: 'labels.text.fill',\n stylers: [{color: '#d59563'}]\n },\n {\n featureType: 'water',\n elementType: 'geometry',\n stylers: [{color: '#17263c'}]\n },\n {\n featureType: 'water',\n elementType: 'labels.text.fill',\n stylers: [{color: '#515c6d'}]\n },\n {\n featureType: 'water',\n elementType: 'labels.text.stroke',\n stylers: [{color: '#17263c'}]\n }\n ]\n });\n\n\n// GEOLOCATION\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(function (position) {\n var pos = {\n lat: position.coords.latitude,\n lng: position.coords.longitude\n };\n\n var contentString = 'Mi Ubicación';\n\n var infowindow = new google.maps.InfoWindow({\n content: contentString\n });\n\n var marker = new google.maps.Marker({\n position: pos,\n map: map,\n title: 'Mi ubicación',\n draggable: true,\n animation: google.maps.Animation.DROP,\n\n });\n marker.addListener('click', toggleBounce);\n\n\n function toggleBounce() {\n if (marker.getAnimation() !== null) {\n marker.setAnimation(null);\n infowindow.open(map, marker);\n\n } else {\n marker.setAnimation(google.maps.Animation.BOUNCE);\n }\n }\n\n\n }, function () {\n handleLocationError(true, infoWindow, map.getCenter());\n });\n // NAVEGADOR NO SOPORTA GEOLOCALIZACION\n } else {\n handleLocationError(false, infoWindow, map.getCenter());\n }\n\n\n function handleLocationError(browserHasGeolocation, infoWindow, pos) {\n infoWindow.setPosition(pos);\n infoWindow.setContent(browserHasGeolocation ?\n 'Error: El servicio de geolocalización falló.' :\n 'Error: Tu navegador no admite la geolocalización');\n infoWindow.open(map);\n }\n\n// MARKER LUGARES DESTACADOS\n\n var image = 'https://developers.google.com/maps/documentation/javascript/examples/full/images/beachflag.png';\n var beachMarker = new google.maps.Marker({\n position: {lat: 6.258900, lng: -75.584128},\n map: map,\n icon: image\n });\n\n\n var flightPlanCoordinates = [\n {lat: 6.313505, lng: -75.570131},\n {lat: 6.313129, lng: -75.570095},\n {lat: 6.312812, lng: -75.570097},\n {lat: 6.312655, lng: -75.570084},\n {lat: 6.312610, lng: -75.570070},\n {lat: 6.312160, lng: -75.569945},\n {lat: 6.311232, lng: -75.569894},\n {lat: 6.311168, lng: -75.569897},\n {lat: 6.311096, lng: -75.569905},\n {lat: 6.310767, lng: -75.570024},\n {lat: 6.310723, lng: -75.569979},\n {lat: 6.310487, lng: -75.569182},\n {lat: 6.309711, lng: -75.569451},\n {lat: 6.307985, lng: -75.570009},\n {lat: 6.307507, lng: -75.570235},\n {lat: 6.306709, lng: -75.570527},\n {lat: 6.306624, lng: -75.570549},\n {lat: 6.306373, lng: -75.570583},\n {lat: 6.303782, lng: -75.570619},\n {lat: 6.303725, lng: -75.570627},\n {lat: 6.303579, lng: -75.570679},\n {lat: 6.303497, lng: -75.570755},\n {lat: 6.303285, lng: -75.571055},\n {lat: 6.302518, lng: -75.572121},\n {lat: 6.302418, lng: -75.572207},\n {lat: 6.301994, lng: -75.572442},\n {lat: 6.301601, lng: -75.572637},\n {lat: 6.301572, lng: -75.572580},\n {lat: 6.300192, lng: -75.569817},\n {lat: 6.300288, lng: -75.569012},\n {lat: 6.301461, lng: -75.566276},\n {lat: 6.301013, lng: -75.566297},\n {lat: 6.297771, lng: -75.567166},\n {lat: 6.296780, lng: -75.567552},\n {lat: 6.296471, lng: -75.567606},\n {lat: 6.295543, lng: -75.567660},\n {lat: 6.295031, lng: -75.567960},\n {lat: 6.294253, lng: -75.568625},\n {lat: 6.293251, lng: -75.569129},\n {lat: 6.291449, lng: -75.569623},\n {lat: 6.288996, lng: -75.570513},\n {lat: 6.287396, lng: -75.570363},\n {lat: 6.287055, lng: -75.570406},\n {lat: 6.285370, lng: -75.570953},\n {lat: 6.283642, lng: -75.571811},\n {lat: 6.282949, lng: -75.572036},\n {lat: 6.279366, lng: -75.572637},\n {lat: 6.274940, lng: -75.573935},\n {lat: 6.270922, lng: -75.575680},\n {lat: 6.268085, lng: -75.576860},\n {lat: 6.266336, lng: -75.577246},\n {lat: 6.265728, lng: -75.577503},\n {lat: 6.263104, lng: -75.579338},\n {lat: 6.262635, lng: -75.579638},\n {lat: 6.261995, lng: -75.579863},\n {lat: 6.261515, lng: -75.579927},\n {lat: 6.260235, lng: -75.579788},\n {lat: 6.259830, lng: -75.579842},\n {lat: 6.256677, lng: -75.580938},\n {lat: 6.259012, lng: -75.585853},\n {lat: 6.258431, lng: -75.586153},\n {lat: 6.255968, lng: -75.580891},\n {lat: 6.253280, lng: -75.575553},\n {lat: 6.252805, lng: -75.575263},\n {lat: 6.252442, lng: -75.575150},\n {lat: 6.248839, lng: -75.575301},\n {lat: 6.247313, lng: -75.575384},\n {lat: 6.246918, lng: -75.575403},\n {lat: 6.246834, lng: -75.575425},\n {lat: 6.246753, lng: -75.575468},\n {lat: 6.246675, lng: -75.575607},\n {lat: 6.246578, lng: -75.575698},\n {lat: 6.246466, lng: -75.575774},\n {lat: 6.246466, lng: -75.575774},\n {lat: 6.246048, lng: -75.575677},\n {lat: 6.245866, lng: -75.575528},\n {lat: 6.245793, lng: -75.575418},\n {lat: 6.245744, lng: -75.575281},\n {lat: 6.245749, lng: -75.575119},\n {lat: 6.245787, lng: -75.575038},\n {lat: 6.245944, lng: -75.574858},\n {lat: 6.245955, lng: -75.574824},\n {lat: 6.245922, lng: -75.574642},\n {lat: 6.245852, lng: -75.574398},\n {lat: 6.245725, lng: -75.574036},\n {lat: 6.245585, lng: -75.573650},\n {lat: 6.245411, lng: -75.573167},\n {lat: 6.245244, lng: -75.572700},\n {lat: 6.245194, lng: -75.572569},\n {lat: 6.245101, lng: -75.572257},\n {lat: 6.245067, lng: -75.572125},\n {lat: 6.245087, lng: -75.571975},\n {lat: 6.244881, lng: -75.571447},\n {lat: 6.244686, lng: -75.570923},\n {lat: 6.244499, lng: -75.570480},\n {lat: 6.244344, lng: -75.570048},\n {lat: 6.244180, lng: -75.569599},\n {lat: 6.244024, lng: -75.569146},\n {lat: 6.243882, lng: -75.568769},\n {lat: 6.243767, lng: -75.568423},\n {lat: 6.243691, lng: -75.568214},\n {lat: 6.243476, lng: -75.568109},\n {lat: 6.243346, lng: -75.568084},\n {lat: 6.243226, lng: -75.568106},\n {lat: 6.243132, lng: -75.568178},\n {lat: 6.243059, lng: -75.568323},\n {lat: 6.243064, lng: -75.568408},\n {lat: 6.243133, lng: -75.568552},\n {lat: 6.243404, lng: -75.568649},\n {lat: 6.243887, lng: -75.568418},\n {lat: 6.244234, lng: -75.568197},\n {lat: 6.244601, lng: -75.567962},\n {lat: 6.245130, lng: -75.567582},\n {lat: 6.245530, lng: -75.567285},\n {lat: 6.247001, lng: -75.566153},\n {lat: 6.247542, lng: -75.565744},\n {lat: 6.248069, lng: -75.565361},\n {lat: 6.248580, lng: -75.565029},\n {lat: 6.248985, lng: -75.564763},\n {lat: 6.249465, lng: -75.564491},\n {lat: 6.249870, lng: -75.564267},\n {lat: 6.250809, lng: -75.563731},\n {lat: 6.251673, lng: -75.563227},\n {lat: 6.252399, lng: -75.562813},\n {lat: 6.252897, lng: -75.562530},\n {lat: 6.253288, lng: -75.562282},\n {lat: 6.253545, lng: -75.562184},\n {lat: 6.253884, lng: -75.562130},\n {lat: 6.254168, lng: -75.562139},\n {lat: 6.254345, lng: -75.562185},\n {lat: 6.254633, lng: -75.562327},\n {lat: 6.254884, lng: -75.562541},\n {lat: 6.255675, lng: -75.563739},\n {lat: 6.256654, lng: -75.565287},\n {lat: 6.256894, lng: -75.565864},\n {lat: 6.257177, lng: -75.567489},\n {lat: 6.257502, lng: -75.569264},\n {lat: 6.257852, lng: -75.571120},\n {lat: 6.257919, lng: -75.571294},\n {lat: 6.257981, lng: -75.571394},\n {lat: 6.258149, lng: -75.571616},\n {lat: 6.260519, lng: -75.573359},\n {lat: 6.262287, lng: -75.574643},\n {lat: 6.262473, lng: -75.574772},\n {lat: 6.262602, lng: -75.574834},\n {lat: 6.262797, lng: -75.574899},\n {lat: 6.263336, lng: -75.574987},\n {lat: 6.264166, lng: -75.574993},\n {lat: 6.264266, lng: -75.574937},\n {lat: 6.265278, lng: -75.574845},\n {lat: 6.265506, lng: -75.574887},\n {lat: 6.265567, lng: -75.574906},\n {lat: 6.265609, lng: -75.575031},\n {lat: 6.265647, lng: -75.575087},\n {lat: 6.265721, lng: -75.575091},\n {lat: 6.265838, lng: -75.575346},\n {lat: 6.265838, lng: -75.575346},\n {lat: 6.266147, lng: -75.575841},\n {lat: 6.266246, lng: -75.575954},\n {lat: 6.266669, lng: -75.576198},\n {lat: 6.266912, lng: -75.576238},\n {lat: 6.267252, lng: -75.576196},\n {lat: 6.267785, lng: -75.576023},\n {lat: 6.267978, lng: -75.575925},\n {lat: 6.268187, lng: -75.575787},\n {lat: 6.268484, lng: -75.575691},\n {lat: 6.268752, lng: -75.575683},\n {lat: 6.269027, lng: -75.575734},\n {lat: 6.269298, lng: -75.575831},\n {lat: 6.269669, lng: -75.575900},\n {lat: 6.269930, lng: -75.575899},\n {lat: 6.270247, lng: -75.575831},\n {lat: 6.270504, lng: -75.575685},\n {lat: 6.270962, lng: -75.575529},\n {lat: 6.271095, lng: -75.575473},\n {lat: 6.271252, lng: -75.575450},\n {lat: 6.272191, lng: -75.575058},\n {lat: 6.272412, lng: -75.574975},\n {lat: 6.274122, lng: -75.574190},\n {lat: 6.274839, lng: -75.573843},\n {lat: 6.275523, lng: -75.573577},\n {lat: 6.277635, lng: -75.573018},\n {lat: 6.277874, lng: -75.572935},\n {lat: 6.279218, lng: -75.572557},\n {lat: 6.280034, lng: -75.572389},\n {lat: 6.282092, lng: -75.572122},\n {lat: 6.282385, lng: -75.571997},\n {lat: 6.282485, lng: -75.571962},\n {lat: 6.283559, lng: -75.571725},\n {lat: 6.285355, lng: -75.570813},\n {lat: 6.287064, lng: -75.570230},\n {lat: 6.287170, lng: -75.570196},\n {lat: 6.288267, lng: -75.570310},\n {lat: 6.288549, lng: -75.570348},\n {lat: 6.288894, lng: -75.570336},\n {lat: 6.289038, lng: -75.570311},\n {lat: 6.289890, lng: -75.569976},\n {lat: 6.291367, lng: -75.569495},\n {lat: 6.292042, lng: -75.569349},\n {lat: 6.293080, lng: -75.569087},\n {lat: 6.293357, lng: -75.568974},\n {lat: 6.294271, lng: -75.568450},\n {lat: 6.294427, lng: -75.568339},\n {lat: 6.295008, lng: -75.567783},\n {lat: 6.295569, lng: -75.567530},\n {lat: 6.296011, lng: -75.567438},\n {lat: 6.296454, lng: -75.567503},\n {lat: 6.296676, lng: -75.567528},\n {lat: 6.297411, lng: -75.567209},\n {lat: 6.298174, lng: -75.566916},\n {lat: 6.298808, lng: -75.566778},\n {lat: 6.299966, lng: -75.566473},\n {lat: 6.300844, lng: -75.566227},\n {lat: 6.301149, lng: -75.566177},\n {lat: 6.301507, lng: -75.566173},\n {lat: 6.301569, lng: -75.566194},\n {lat: 6.301055, lng: -75.567404},\n {lat: 6.300252, lng: -75.569367},\n {lat: 6.300231, lng: -75.569697},\n {lat: 6.300288, lng: -75.569852},\n {lat: 6.301698, lng: -75.572577},\n {lat: 6.302029, lng: -75.572404},\n {lat: 6.302385, lng: -75.572218},\n {lat: 6.302475, lng: -75.572148},\n {lat: 6.303481, lng: -75.570757},\n {lat: 6.303597, lng: -75.570658},\n {lat: 6.303780, lng: -75.570600},\n {lat: 6.306327, lng: -75.570568},\n {lat: 6.306535, lng: -75.570548},\n {lat: 6.306736, lng: -75.570503},\n {lat: 6.307424, lng: -75.570254},\n {lat: 6.307964, lng: -75.570006},\n {lat: 6.309213, lng: -75.569582},\n {lat: 6.310500, lng: -75.569160},\n {lat: 6.310751, lng: -75.570004},\n {lat: 6.311105, lng: -75.569884},\n {lat: 6.311247, lng: -75.569872},\n {lat: 6.312140, lng: -75.569923},\n {lat: 6.312313, lng: -75.569756},\n {lat: 6.312679, lng: -75.569480},\n {lat: 6.312951, lng: -75.569215},\n {lat: 6.313484, lng: -75.568643}\n\n\n ];\n var flightPath = new google.maps.Polyline({\n path: flightPlanCoordinates,\n geodesic: true,\n strokeColor: '#000bff',\n strokeOpacity: 2.0,\n strokeWeight: 5\n });\n\n\n flightPath.setMap(map);\n\n\n}", "title": "" }, { "docid": "8a6b35d3bbdacfa9ce4b72f4346ffdba", "score": "0.6091212", "text": "function makeMapPanel() {\n var map = ui.Map();\n // Add an informational label\n map.add(ui.Label('Click the map to compute a mosaic at that location'));\n map.style().set('cursor', 'crosshair');\n // Don't show the layer list for this app.\n map.setControlVisibility({layerList: false});\n return map;\n}", "title": "" }, { "docid": "7606e0734be4c536b803edab87b87b0b", "score": "0.608983", "text": "function cargaMapa(){\n //1. Creo el mapa enmi canvas centrado en mi zona\n let caimbo=new google.maps.LatLng(37.852,-3.729); //Punto rural para pruebas\n \n let myMapOptions = {\n zoom: 16, \n center: caimbo, \n mapTypeId: google.maps.MapTypeId.ROADMAP,\n zoomControl: false, //Desactivo boton del tipo de mapa para tener un mapa mas limpio \n mapTypeControl: true, \n scaleControl: false,\n rotateControl: false, \n streetViewControl: false, \n };\n mapa = new google.maps.Map(document.getElementById(\"mapCanvas\"), myMapOptions);\n \n //2. Creo los eventos que recargaran la vista del catastro (recalculada al nuevo bounding box)\n google.maps.event.addListener(mapa,'dragend',function(){\n overlay();\n });\n \n google.maps.event.addListener(mapa, 'zoom_changed',function(){\n overlay();\n });\n \n google.maps.event.addListenerOnce(mapa, 'tilesloaded',function(){\n overlay();\n });\n \n //Pruebos las funciones del Catastro\n //1. Averiguo la referenciaCatastral de unas coordenadas (asincrono)\n refCatastralCoordenadas(caimbo, function(respuesta){\n if (respuesta!=-1) console.log(\"RC es: \"+ respuesta)\n });\n\n //2. Averiguo las coordenadas del centroide de una parcela que le paso por su RC (asincrono)\n let refCastastral=\"23900A01000004\";\n\n coordenadasRefCatastral(refCastastral, function(respuesta){\n console.log(\"laLng() es: \"+ respuesta[1] + \", \"+ respuesta[2]);\n console.log(\"La finca es: \" + respuesta[0]);\n });\n\n\n}", "title": "" }, { "docid": "627f72f19402dd330f857ee1925d16c9", "score": "0.60849553", "text": "function populaLocais() {\n getLocais();\n if (locais.length > 0) {\n bounds = new google.maps.LatLngBounds();\n locais.forEach(function (local) {\n const position = {\n lat: local.lat,\n lng: local.lng,\n };\n bounds.extend(position);\n const marker = new google.maps.Marker({\n map: map,\n animation: google.maps.Animation.DROP,\n position: position,\n icon: { url: iconeMc, scaledSize: new google.maps.Size(35, 35) },\n });\n marker.addListener(\"click\", function () {\n const precoAdd = local.preco_add\n ? `<div class=\"map-popup-preco-add\">${local.preco_add}</div>`\n : \"\";\n caixa.setContent(`\n <a href=\"${local.url}\" class=\"map-popup\">\n <figure class=\"map-popup-img\">\n <img src=\"${local.img}\" alt=\"${local.titulo}\">\n </figure>\n <div class=\"map-popup-infos\">\n <div class=\"map-popup-titulo\">${local.titulo}</div>\n <div class=\"map-popup-local\">${local.local}</div>\n <div class=\"map-popup-preco\">${local.preco}</div>\n ${precoAdd}\n </div>\n </a>`);\n caixa.open(map, marker);\n });\n markers[local.id] = marker;\n });\n if (locais.length > 1) {\n map.fitBounds(bounds);\n } else {\n map.setCenter(bounds.getCenter());\n map.setZoom(15);\n }\n\n const markerCluster = new MarkerClusterer(map, markers, {\n imagePath: clusterImg,\n });\n\n $(\".anuncio-bloco\")\n .on(\"mouseover\", function () {\n markers[$(this).data(\"id\")].setIcon({\n url: iconeMcHover,\n scaledSize: new google.maps.Size(35, 35),\n });\n })\n .on(\"mouseout\", function () {\n markers[$(this).data(\"id\")].setIcon({\n url: iconeMc,\n scaledSize: new google.maps.Size(35, 35),\n });\n });\n }\n }", "title": "" }, { "docid": "f6b5d1ce4723e060022481e99b49c33b", "score": "0.6084384", "text": "function limpiarSeleccion() {\n \"use strict\";\n\n var i;\n\n map.setView(new L.LatLng(4.5, -73.0), 6);\n map.eachLayer(function (layer) {\n map.removeLayer(layer);\n });\n map.addLayer(positron);\n map.addLayer(positronLabels);\n map.addLayer(NodosLayer);\n map.addLayer(NodosSur);\n map.addLayer(NodosCentro);\n map.addLayer(NodosCaribe);\n\n document.getElementById('selNodo').value = 'all';\n document.getElementById('selDepartamento').value = 'all';\n document.getElementById('selMunicipio').value = 'all';\n document.getElementById('selSector').value = 'all';\n document.getElementById('selTematica').value = 'all';\n document.getElementById('selTerritorial').value = 'all';\n document.getElementById('buscarPalabra').value = '';\n\n if (document.getElementById('selDepartamento').options.length > 1) {\n for (i = document.getElementById('selDepartamento').options.length - 1; i >= 1; i--) {\n document.getElementById('selDepartamento').remove(i);\n }\n }\n\n if (document.getElementById('selMunicipio').options.length > 1) {\n for (i = document.getElementById('selMunicipio').options.length - 1; i >= 1; i--) {\n document.getElementById('selMunicipio').remove(i);\n }\n }\n\n // Recupera el listado inicial\n filtroData = JSON.parse(JSON.stringify(Observatorios));\n $(\"#total_places\").text(0);\n\n $(\".divinfo\")[0].hidden = false;\n\n}", "title": "" }, { "docid": "0085d4552d967a3d8583be45daaa9988", "score": "0.60810876", "text": "function parqueSanAntonio() {\n var map = new google.maps.Map(document.getElementById('map'), {\n zoom: 18,\n center: {lat: 6.245454, lng: -75.568120},\n // mapTypeId: 'roadmap'\n styles: [\n {elementType: 'geometry', stylers: [{color: '#242f3e'}]},\n {elementType: 'labels.text.stroke', stylers: [{color: '#242f3e'}]},\n {elementType: 'labels.text.fill', stylers: [{color: '#746855'}]},\n {\n featureType: 'administrative.locality',\n elementType: 'labels.text.fill',\n stylers: [{color: '#d59563'}]\n },\n {\n featureType: 'poi',\n elementType: 'labels.text.fill',\n stylers: [{color: '#d59563'}]\n },\n {\n featureType: 'poi.park',\n elementType: 'geometry',\n stylers: [{color: '#263c3f'}]\n },\n {\n featureType: 'poi.park',\n elementType: 'labels.text.fill',\n stylers: [{color: '#6b9a76'}]\n },\n {\n featureType: 'road',\n elementType: 'geometry',\n stylers: [{color: '#38414e'}]\n },\n {\n featureType: 'road',\n elementType: 'geometry.stroke',\n stylers: [{color: '#212a37'}]\n },\n {\n featureType: 'road',\n elementType: 'labels.text.fill',\n stylers: [{color: '#9ca5b3'}]\n },\n {\n featureType: 'road.highway',\n elementType: 'geometry',\n stylers: [{color: '#746855'}]\n },\n {\n featureType: 'road.highway',\n elementType: 'geometry.stroke',\n stylers: [{color: '#1f2835'}]\n },\n {\n featureType: 'road.highway',\n elementType: 'labels.text.fill',\n stylers: [{color: '#f3d19c'}]\n },\n {\n featureType: 'transit',\n elementType: 'geometry',\n stylers: [{color: '#2f3948'}]\n },\n {\n featureType: 'transit.station',\n elementType: 'labels.text.fill',\n stylers: [{color: '#d59563'}]\n },\n {\n featureType: 'water',\n elementType: 'geometry',\n stylers: [{color: '#17263c'}]\n },\n {\n featureType: 'water',\n elementType: 'labels.text.fill',\n stylers: [{color: '#515c6d'}]\n },\n {\n featureType: 'water',\n elementType: 'labels.text.stroke',\n stylers: [{color: '#17263c'}]\n }\n ]\n });\n\n\n// GEOLOCATION\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(function (position) {\n var pos = {\n lat: position.coords.latitude,\n lng: position.coords.longitude\n };\n\n var contentString = 'Mi Ubicación';\n\n var infowindow = new google.maps.InfoWindow({\n content: contentString\n });\n\n var marker = new google.maps.Marker({\n position: pos,\n map: map,\n title: 'Mi ubicación',\n draggable: true,\n animation: google.maps.Animation.DROP,\n\n });\n marker.addListener('click', toggleBounce);\n\n\n function toggleBounce() {\n if (marker.getAnimation() !== null) {\n marker.setAnimation(null);\n infowindow.open(map, marker);\n\n } else {\n marker.setAnimation(google.maps.Animation.BOUNCE);\n }\n }\n\n\n }, function () {\n handleLocationError(true, infoWindow, map.getCenter());\n });\n // NAVEGADOR NO SOPORTA GEOLOCALIZACION\n } else {\n handleLocationError(false, infoWindow, map.getCenter());\n }\n\n\n function handleLocationError(browserHasGeolocation, infoWindow, pos) {\n infoWindow.setPosition(pos);\n infoWindow.setContent(browserHasGeolocation ?\n 'Error: El servicio de geolocalización falló.' :\n 'Error: Tu navegador no admite la geolocalización');\n infoWindow.open(map);\n }\n\n// MARKER LUGARES DESTACADOS\n\n var image = 'https://developers.google.com/maps/documentation/javascript/examples/full/images/beachflag.png';\n var beachMarker = new google.maps.Marker({\n position: {lat: 6.245454, lng: -75.568120},\n map: map,\n icon: image\n });\n\n\n var flightPlanCoordinates = [\n {lat: 6.313505, lng: -75.570131},\n {lat: 6.313129, lng: -75.570095},\n {lat: 6.312812, lng: -75.570097},\n {lat: 6.312655, lng: -75.570084},\n {lat: 6.312610, lng: -75.570070},\n {lat: 6.312160, lng: -75.569945},\n {lat: 6.311232, lng: -75.569894},\n {lat: 6.311168, lng: -75.569897},\n {lat: 6.311096, lng: -75.569905},\n {lat: 6.310767, lng: -75.570024},\n {lat: 6.310723, lng: -75.569979},\n {lat: 6.310487, lng: -75.569182},\n {lat: 6.309711, lng: -75.569451},\n {lat: 6.307985, lng: -75.570009},\n {lat: 6.307507, lng: -75.570235},\n {lat: 6.306709, lng: -75.570527},\n {lat: 6.306624, lng: -75.570549},\n {lat: 6.306373, lng: -75.570583},\n {lat: 6.303782, lng: -75.570619},\n {lat: 6.303725, lng: -75.570627},\n {lat: 6.303579, lng: -75.570679},\n {lat: 6.303497, lng: -75.570755},\n {lat: 6.303285, lng: -75.571055},\n {lat: 6.302518, lng: -75.572121},\n {lat: 6.302418, lng: -75.572207},\n {lat: 6.301994, lng: -75.572442},\n {lat: 6.301601, lng: -75.572637},\n {lat: 6.301572, lng: -75.572580},\n {lat: 6.300192, lng: -75.569817},\n {lat: 6.300288, lng: -75.569012},\n {lat: 6.301461, lng: -75.566276},\n {lat: 6.301013, lng: -75.566297},\n {lat: 6.297771, lng: -75.567166},\n {lat: 6.296780, lng: -75.567552},\n {lat: 6.296471, lng: -75.567606},\n {lat: 6.295543, lng: -75.567660},\n {lat: 6.295031, lng: -75.567960},\n {lat: 6.294253, lng: -75.568625},\n {lat: 6.293251, lng: -75.569129},\n {lat: 6.291449, lng: -75.569623},\n {lat: 6.288996, lng: -75.570513},\n {lat: 6.287396, lng: -75.570363},\n {lat: 6.287055, lng: -75.570406},\n {lat: 6.285370, lng: -75.570953},\n {lat: 6.283642, lng: -75.571811},\n {lat: 6.282949, lng: -75.572036},\n {lat: 6.279366, lng: -75.572637},\n {lat: 6.274940, lng: -75.573935},\n {lat: 6.270922, lng: -75.575680},\n {lat: 6.268085, lng: -75.576860},\n {lat: 6.266336, lng: -75.577246},\n {lat: 6.265728, lng: -75.577503},\n {lat: 6.263104, lng: -75.579338},\n {lat: 6.262635, lng: -75.579638},\n {lat: 6.261995, lng: -75.579863},\n {lat: 6.261515, lng: -75.579927},\n {lat: 6.260235, lng: -75.579788},\n {lat: 6.259830, lng: -75.579842},\n {lat: 6.256677, lng: -75.580938},\n {lat: 6.259012, lng: -75.585853},\n {lat: 6.258431, lng: -75.586153},\n {lat: 6.255968, lng: -75.580891},\n {lat: 6.253280, lng: -75.575553},\n {lat: 6.252805, lng: -75.575263},\n {lat: 6.252442, lng: -75.575150},\n {lat: 6.248839, lng: -75.575301},\n {lat: 6.247313, lng: -75.575384},\n {lat: 6.246918, lng: -75.575403},\n {lat: 6.246834, lng: -75.575425},\n {lat: 6.246753, lng: -75.575468},\n {lat: 6.246675, lng: -75.575607},\n {lat: 6.246578, lng: -75.575698},\n {lat: 6.246466, lng: -75.575774},\n {lat: 6.246466, lng: -75.575774},\n {lat: 6.246048, lng: -75.575677},\n {lat: 6.245866, lng: -75.575528},\n {lat: 6.245793, lng: -75.575418},\n {lat: 6.245744, lng: -75.575281},\n {lat: 6.245749, lng: -75.575119},\n {lat: 6.245787, lng: -75.575038},\n {lat: 6.245944, lng: -75.574858},\n {lat: 6.245955, lng: -75.574824},\n {lat: 6.245922, lng: -75.574642},\n {lat: 6.245852, lng: -75.574398},\n {lat: 6.245725, lng: -75.574036},\n {lat: 6.245585, lng: -75.573650},\n {lat: 6.245411, lng: -75.573167},\n {lat: 6.245244, lng: -75.572700},\n {lat: 6.245194, lng: -75.572569},\n {lat: 6.245101, lng: -75.572257},\n {lat: 6.245067, lng: -75.572125},\n {lat: 6.245087, lng: -75.571975},\n {lat: 6.244881, lng: -75.571447},\n {lat: 6.244686, lng: -75.570923},\n {lat: 6.244499, lng: -75.570480},\n {lat: 6.244344, lng: -75.570048},\n {lat: 6.244180, lng: -75.569599},\n {lat: 6.244024, lng: -75.569146},\n {lat: 6.243882, lng: -75.568769},\n {lat: 6.243767, lng: -75.568423},\n {lat: 6.243691, lng: -75.568214},\n {lat: 6.243476, lng: -75.568109},\n {lat: 6.243346, lng: -75.568084},\n {lat: 6.243226, lng: -75.568106},\n {lat: 6.243132, lng: -75.568178},\n {lat: 6.243059, lng: -75.568323},\n {lat: 6.243064, lng: -75.568408},\n {lat: 6.243133, lng: -75.568552},\n {lat: 6.243404, lng: -75.568649},\n {lat: 6.243887, lng: -75.568418},\n {lat: 6.244234, lng: -75.568197},\n {lat: 6.244601, lng: -75.567962},\n {lat: 6.245130, lng: -75.567582},\n {lat: 6.245530, lng: -75.567285},\n {lat: 6.247001, lng: -75.566153},\n {lat: 6.247542, lng: -75.565744},\n {lat: 6.248069, lng: -75.565361},\n {lat: 6.248580, lng: -75.565029},\n {lat: 6.248985, lng: -75.564763},\n {lat: 6.249465, lng: -75.564491},\n {lat: 6.249870, lng: -75.564267},\n {lat: 6.250809, lng: -75.563731},\n {lat: 6.251673, lng: -75.563227},\n {lat: 6.252399, lng: -75.562813},\n {lat: 6.252897, lng: -75.562530},\n {lat: 6.253288, lng: -75.562282},\n {lat: 6.253545, lng: -75.562184},\n {lat: 6.253884, lng: -75.562130},\n {lat: 6.254168, lng: -75.562139},\n {lat: 6.254345, lng: -75.562185},\n {lat: 6.254633, lng: -75.562327},\n {lat: 6.254884, lng: -75.562541},\n {lat: 6.255675, lng: -75.563739},\n {lat: 6.256654, lng: -75.565287},\n {lat: 6.256894, lng: -75.565864},\n {lat: 6.257177, lng: -75.567489},\n {lat: 6.257502, lng: -75.569264},\n {lat: 6.257852, lng: -75.571120},\n {lat: 6.257919, lng: -75.571294},\n {lat: 6.257981, lng: -75.571394},\n {lat: 6.258149, lng: -75.571616},\n {lat: 6.260519, lng: -75.573359},\n {lat: 6.262287, lng: -75.574643},\n {lat: 6.262473, lng: -75.574772},\n {lat: 6.262602, lng: -75.574834},\n {lat: 6.262797, lng: -75.574899},\n {lat: 6.263336, lng: -75.574987},\n {lat: 6.264166, lng: -75.574993},\n {lat: 6.264266, lng: -75.574937},\n {lat: 6.265278, lng: -75.574845},\n {lat: 6.265506, lng: -75.574887},\n {lat: 6.265567, lng: -75.574906},\n {lat: 6.265609, lng: -75.575031},\n {lat: 6.265647, lng: -75.575087},\n {lat: 6.265721, lng: -75.575091},\n {lat: 6.265838, lng: -75.575346},\n {lat: 6.265838, lng: -75.575346},\n {lat: 6.266147, lng: -75.575841},\n {lat: 6.266246, lng: -75.575954},\n {lat: 6.266669, lng: -75.576198},\n {lat: 6.266912, lng: -75.576238},\n {lat: 6.267252, lng: -75.576196},\n {lat: 6.267785, lng: -75.576023},\n {lat: 6.267978, lng: -75.575925},\n {lat: 6.268187, lng: -75.575787},\n {lat: 6.268484, lng: -75.575691},\n {lat: 6.268752, lng: -75.575683},\n {lat: 6.269027, lng: -75.575734},\n {lat: 6.269298, lng: -75.575831},\n {lat: 6.269669, lng: -75.575900},\n {lat: 6.269930, lng: -75.575899},\n {lat: 6.270247, lng: -75.575831},\n {lat: 6.270504, lng: -75.575685},\n {lat: 6.270962, lng: -75.575529},\n {lat: 6.271095, lng: -75.575473},\n {lat: 6.271252, lng: -75.575450},\n {lat: 6.272191, lng: -75.575058},\n {lat: 6.272412, lng: -75.574975},\n {lat: 6.274122, lng: -75.574190},\n {lat: 6.274839, lng: -75.573843},\n {lat: 6.275523, lng: -75.573577},\n {lat: 6.277635, lng: -75.573018},\n {lat: 6.277874, lng: -75.572935},\n {lat: 6.279218, lng: -75.572557},\n {lat: 6.280034, lng: -75.572389},\n {lat: 6.282092, lng: -75.572122},\n {lat: 6.282385, lng: -75.571997},\n {lat: 6.282485, lng: -75.571962},\n {lat: 6.283559, lng: -75.571725},\n {lat: 6.285355, lng: -75.570813},\n {lat: 6.287064, lng: -75.570230},\n {lat: 6.287170, lng: -75.570196},\n {lat: 6.288267, lng: -75.570310},\n {lat: 6.288549, lng: -75.570348},\n {lat: 6.288894, lng: -75.570336},\n {lat: 6.289038, lng: -75.570311},\n {lat: 6.289890, lng: -75.569976},\n {lat: 6.291367, lng: -75.569495},\n {lat: 6.292042, lng: -75.569349},\n {lat: 6.293080, lng: -75.569087},\n {lat: 6.293357, lng: -75.568974},\n {lat: 6.294271, lng: -75.568450},\n {lat: 6.294427, lng: -75.568339},\n {lat: 6.295008, lng: -75.567783},\n {lat: 6.295569, lng: -75.567530},\n {lat: 6.296011, lng: -75.567438},\n {lat: 6.296454, lng: -75.567503},\n {lat: 6.296676, lng: -75.567528},\n {lat: 6.297411, lng: -75.567209},\n {lat: 6.298174, lng: -75.566916},\n {lat: 6.298808, lng: -75.566778},\n {lat: 6.299966, lng: -75.566473},\n {lat: 6.300844, lng: -75.566227},\n {lat: 6.301149, lng: -75.566177},\n {lat: 6.301507, lng: -75.566173},\n {lat: 6.301569, lng: -75.566194},\n {lat: 6.301055, lng: -75.567404},\n {lat: 6.300252, lng: -75.569367},\n {lat: 6.300231, lng: -75.569697},\n {lat: 6.300288, lng: -75.569852},\n {lat: 6.301698, lng: -75.572577},\n {lat: 6.302029, lng: -75.572404},\n {lat: 6.302385, lng: -75.572218},\n {lat: 6.302475, lng: -75.572148},\n {lat: 6.303481, lng: -75.570757},\n {lat: 6.303597, lng: -75.570658},\n {lat: 6.303780, lng: -75.570600},\n {lat: 6.306327, lng: -75.570568},\n {lat: 6.306535, lng: -75.570548},\n {lat: 6.306736, lng: -75.570503},\n {lat: 6.307424, lng: -75.570254},\n {lat: 6.307964, lng: -75.570006},\n {lat: 6.309213, lng: -75.569582},\n {lat: 6.310500, lng: -75.569160},\n {lat: 6.310751, lng: -75.570004},\n {lat: 6.311105, lng: -75.569884},\n {lat: 6.311247, lng: -75.569872},\n {lat: 6.312140, lng: -75.569923},\n {lat: 6.312313, lng: -75.569756},\n {lat: 6.312679, lng: -75.569480},\n {lat: 6.312951, lng: -75.569215},\n {lat: 6.313484, lng: -75.568643}\n\n\n ];\n var flightPath = new google.maps.Polyline({\n path: flightPlanCoordinates,\n geodesic: true,\n strokeColor: '#000bff',\n strokeOpacity: 2.0,\n strokeWeight: 5\n });\n\n\n flightPath.setMap(map);\n\n\n}", "title": "" }, { "docid": "51ab31b9827b9cb1af337ff9992ceb1b", "score": "0.6077065", "text": "function UbicaMovilMapa(latitud, longitud, html, direccion, colorMovil) {\n if (Ext.getCmp('winUbicacionMovil') != null) {\n Ext.getCmp('winUbicacionMovil').close();\n }\n\n var latlng = new google.maps.LatLng(latitud, longitud);\n var myOptions = {\n zoom: 12,\n center: latlng,\n mapTypeId: google.maps.MapTypeId.ROADMAP\n };\n\n var win = new Ext.window.Window({\n id: 'winUbicacionMovil',\n title: 'Ubicación',\n height: 500,\n width: 500,\n hidden: false,\n modal: false,\n maximizable: true,\n resizable: true,\n minimizable: false,\n layout: 'anchor',\n closeAction: 'destroy',\n html: '<div id=\"divMApMovil\" style=\"width:100%; height:100%;\"></div>',\n buttons: [{\n xtype: 'button',\n text: 'Salir',\n handler: function (a, b, c, d, e) {\n win.close();\n }\n }],\n listeners: {\n 'resize': function (win, width, height, eOpts) {\n if (typeof map != \"undefined\") {\n google.maps.event.trigger(map, \"resize\");\n }\n },\n 'maximize': function (win, width, height, eOpts) {\n if (typeof map != \"undefined\") {\n google.maps.event.trigger(map, \"resize\");\n }\n }\n }\n });\n\n win.show();\n map = new google.maps.Map(document.getElementById(\"divMApMovil\").parentNode, myOptions);\n \n var iconState;\n iconState = 'Images/Camiones/';\n\n if (colorMovil.indexOf(\"rojo.png\") >= 0) {\n iconState += 'Rojo/autoNN';\n }\n else if (colorMovil.indexOf(\"verde.png\") >= 0) {\n iconState += 'Verde/autoNN';\n }\n else if (colorMovil.indexOf(\"amarillo.png\") >= 0) {\n iconState += 'Amarillo/autoNN';\n }\n else if (colorMovil.indexOf(\"azul.png\") >= 0) {\n iconState += 'Azul/autoNN';\n }\n else if (colorMovil.indexOf(\"celeste.png\") >= 0) {\n iconState += 'Celeste/autoNN';\n }\n\n else {\n iconState += 'Verde/autoNN';\n }\n\n if (direccion != '') {\n if (direccion >= 339 || direccion <= 22) {\n iconState += '0.png';\n }\n if (direccion >= 23 && direccion <= 68) {\n iconState += '1.png';\n }\n if (direccion >= 69 && direccion <= 112) {\n iconState += '2.png';\n }\n if (direccion >= 113 && direccion <= 158) {\n iconState += '3.png';\n }\n if (direccion >= 159 && direccion <= 202) {\n iconState += '4.png';\n }\n if (direccion >= 203 && direccion <= 246) {\n iconState += '5.png';\n }\n if (direccion >= 247 && direccion <= 291) {\n iconState += '6.png';\n }\n if (direccion >= 292 && direccion <= 338) {\n iconState += '7.png';\n }\n } else {\n iconState += '.png';\n }\n\n marker = new google.maps.Marker({\n position: latlng,\n icon: new google.maps.MarkerImage(\n iconState,\n new google.maps.Size(27, 27),\n new google.maps.Point(0, 0),\n new google.maps.Point(0, 32),\n new google.maps.Size(27, 27)),\n map: map\n });\n\n markers.push(marker);\n\n var htmlString = '';\n htmlString = '<div style=\"max-width:300px;\">' +\n '<font color=\"#6387A5\" size=\"2\"face=\"Verdana, Arial, Helvetica, sans-serif\">' +\n html +\n '</font></div>';\n infowindow.setContent(htmlString);\n infowindow.open(map, marker);\n\n google.maps.event.addListener(marker, 'click', function () {\n infowindow.setContent(htmlString);\n infowindow.open(map, marker);\n });\n}", "title": "" }, { "docid": "7caeedaac0ea4b59f473d3f5679d9afa", "score": "0.6075927", "text": "function initMap(){\n var mapdivMap = document.getElementById(\"contenedor_mapa\");\n mapdivMap.style.width = (window.innerWidth);\n mapdivMap.style.height = (window.innerHeight) + \"px\";\n \n center = new google.maps.LatLng(-33.41949, -70.642);\n var myOptions = {\n zoom: 7,/*zoom del mapa y otras cosas*/\n center: center,/* Definimos la posición del mapa con el punto */\n zoomControl : false, //esto quita los controladores del zoom que aparecen por defecto en la parte inferior derecha \n disableDefaultUI: true, //esto deshabilita los controladores de mapa y satellite de la esquina superior izq\n mapTypeId: google.maps.MapTypeId.ROADMAP\n }\n\n map = new google.maps.Map(document.getElementById(\"contenedor_mapa\"),myOptions);\n /*solicitud de geolocalización y ver si el navegador la soporta*/\n\n function findme(){/* Si el navegador tiene geolocalizacion */\n if(navigator.geolocation){\n //alert (\"Obteniendo posición...\");\n navigator.geolocation.getCurrentPosition(centrarMapa,errorPosicionar);\n }else{\n alert('Oops! Tu navegador no soporta geolocalización');\n } \n }\n\n /*alerts en caso de errores*/\n function errorPosicionar(error) {\n /*alert en caso de error*/\n alert(\"Oops! Algo ha salido mal\");\n } \n\n /* Esta función se ejecuta si getCurrentPosition tiene éxito. La latitud y la longitud vienen dentro del objeto coords*/\n function centrarMapa(pos){\n latitud = pos.coords.latitude;\n longitud = pos.coords.longitude; \n ubicacion = new google.maps.Marker({\n position: { lat: latitud, lng: longitud },\n title:\"Usted está aquí\",\n map: map,\n draggable: true,\n icon: {\n path: google.maps.SymbolPath.CIRCLE, //cambiamos el marcador por defecto por uno de círculo\n scale: 10\n }\n });\n map.setZoom(10);\n //map.setCenter ({ lat: latitud, lng: longitud });\n //setMap : map,\n }\n\n /* autocompletado de los input origen (userlocation) y destino (ruta)*/\n function initialize(){\n var destination = document.getElementById(\"destino\");\n var autocompletar = new google.maps.places.Autocomplete(destination); \n }\n\n google.maps.event.addDomListener(window, 'load', initialize);\n findme();\n\n }", "title": "" }, { "docid": "3f2c807609adfc0b1074dd5d1e374f75", "score": "0.6071618", "text": "function showMarkers() {\n setAllMap(map);\n }", "title": "" }, { "docid": "b191d9bf341f7e7ed5e23337522c0ea7", "score": "0.607145", "text": "function displayOnMap(data){\r\n\r\n console.log(\"Display On Map is on Lon \" + data[0].lon + ' lat ' + data[0].lat);\r\n\r\n //Display map\r\n document.getElementById('mapdiv').style.display = \"block\";\r\n\r\n map = new OpenLayers.Map(\"mapdiv\");\r\n map.addLayer(new OpenLayers.Layer.OSM());\r\n\r\n // var lonLat = new OpenLayers.LonLat( -0.1279688 ,51.5077286 )\r\n var lonLat = new OpenLayers.LonLat( data[0].lon ,data[0].lat )\r\n .transform(\r\n new OpenLayers.Projection(\"EPSG:4326\"), // transform from WGS 1984\r\n map.getProjectionObject() // to Spherical Mercator Projection\r\n );\r\n \r\n var zoom=16;\r\n\r\n var markers = new OpenLayers.Layer.Markers( \"Markers\" );\r\n map.addLayer(markers);\r\n \r\n markers.addMarker(new OpenLayers.Marker(lonLat));\r\n \r\n map.setCenter (lonLat, zoom);\r\n\r\n return map;\r\n}", "title": "" }, { "docid": "1b500b4eed8449b1d0e0aff573f6ca0b", "score": "0.6071408", "text": "function showZoneSelected (datos){\n var query = window.location.search;\n valor = query.split(\"=\");\n console.log(valor[1]);\n console.log();\n var position\n for (var i = 0; i < datos.datosDeSensores.length; i++) {\n if(valor[1] == datos.datosDeSensores[i].id_sensor){\n position = {\n lat: datos.datosDeSensores[i].lat,\n lng: datos.datosDeSensores[i].lng\n }\n break;\n }// if()\n }// for()\n\n console.log(position);\n\n\n map.setCenter(position);\n // map.setZoom(18);\n}// showZoneSelected()", "title": "" }, { "docid": "2e553af688401f03f0d3582e51aa751a", "score": "0.6069068", "text": "function muestramap( coloniaLong, largo ) {\n\tactCOL = \"\"\n\tif( mapas.hasLayer(geojsonCOLCDMX) ){\n\t\tmapas.removeLayer(geojsonCOLCDMX);\n\t}\t \n\n\n\tgeojsonCOLCDMX = L.geoJson(colCDMX, {\n\n\t\t\t\t\tstyle: function (feature) {\n\t\t\t\t\t\t\t\treturn { \n\t\t\t\t\t\t\t\t\tcolor: \"#000000\",\n\t\t\t\t\t\t\t\t\tfillColor: 'blue',\n\t\t\t\t\t\t\t\t\tweight: 3,\n\t\t\t\t\t\t\t\t\tfill: true,\n\t\t\t\t\t\t\t\t\topacity: 0.6,\n\t\t\t\t\t\t\t\t\tfillOpacity: 0.3,\n\t\t\t\t\t\t\t\t\tclickable: false \n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t},\n\t\t\t\tonEachFeature(feature, layer) {\n\t\t\t\tlayer.on({\n\t\t\t\t\t\tmouseover: //highlightFeatureR,\n\t\t\t\t\t\t\tfunction (layer){\n\t\t\t\t\t\t\t\tvar layerM = layer.target\n\t\t\t\t\t\t\tlayerM.setStyle({\n\t\t\t\t\t\t\t\tcolor: '#9999ff',\n\t\t\t\t\t\t\t\tweight: 2,\n\t\t\t\t\t\t\t\tfillColor: 'crimson',\n\t\t\t\t\t\t\t\topacity : 1,\n\t\t\t\t\t\t\t\tfillOpacity: 0.2,\n\t\t\t\t\t\t\t\tclickable: true \n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t},\n\n\t\t\t\t\t\tmouseout: //resetHighlightBR,\n\t\t\t\t\t\t\tfunction (layer){\n\t\t\t\t\t\t\t\t\tvar layerM = layer.target\n\t\t\t\t\t\t\t\t\t\tlayerM.setStyle({\n\t\t\t\t\t\t\t\t\t\t\tcolor: \"#000000\",\n\t\t\t\t\t\t\t\t\t\t\tfillColor: 'blue',\n\t\t\t\t\t\t\t\t\t\t\tweight: 3,\n\t\t\t\t\t\t\t\t\t\t\tfill: true,\n\t\t\t\t\t\t\t\t\t\t\topacity: 0.6,\n\t\t\t\t\t\t\t\t\t\t\tfillOpacity: 0.3,\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t $(\"#descMZA\").text(\"\"); \n\t\t\t\t\t//map2tbl('nada',\"#TablaPilar\")\n\t\t\t\t\t//$('#mmre_sel').text(\"\");\n\n\t\t\t\t\t\t},\n\t\t\t\t\t\t//click: zoomToFeatureR\n\t\t\t\t\t\tclick: //highlightFeatureR,\n\t\t\t\t\t\t\tconsole.log(\"click\")\n\t\t\t\t\t//mapLI.fitBounds(geojsonmunicipioLI3.getBounds())\n\t\t\t\t});\n\t\t},\t \n\t\t\n\t\t\t\tfilter: function(feature, layer) {\n\t\t\t\t\tvar llaves= feature.properties.D_ASENTA2 + \" -\" + feature.properties.MUN_NAME + \"- \" +feature.properties.D_CP;\n\t\t\t\t\tif (largo == false){\n\t\t\t\t\t\tllaves = feature.properties.D_CP;\n\t\t\t\t\t};\n\t\t\t\t\t\tif ( llaves=== coloniaLong){\n\t\t\t\t\t\t\tpropLAV = (feature.properties.VPH_LAVAD/feature.properties.VIVTOT); \n\t\t\t\t\t\t\tPropWC = (feature.properties.VPH_EXCSA/feature.properties.VIVTOT); \n\t\t\t\t\t\t\tidxCUMD\t= feature.properties.DIDXCUM;\n\t\t\t\t\tidxCUMND\t= feature.properties.NDIDXCUM;\n\t\t\t\t\tidxCUMM\t= feature.properties.MIDXCUM;\n\t\t\t\t\t\t\tconProD\t= feature.properties.DCONPRO;\n\t\t\t\t\tconProND\t= feature.properties.NDCONPRO;\n\t\t\t\t\tconProM\t= feature.properties.MCONPRO;\n\t\t\t\t\ttamFam = (feature.properties.POBTOT/feature.properties.VIVTOT);\n\t\t\t\t\tmunSelec = feature.properties.MUN_NAME;\n\t\t\t\t\tmuncveSelec = feature.properties.CVE_MUN;\n\t\t\t\t\tasentSelec = feature.properties.D_ASENTA;\n\t\t\t\t\tcpSelec = feature.properties.D_CP;\n\t\t\t\t\tgeneraRefCOL()\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t};\n\t\t\t\t}\n\t\t\n\t}).addTo(mapas);\n\n\tmapas.fitBounds(geojsonCOLCDMX.getBounds());\n\t$(\"#imgMun\").attr('src','img/A'+muncveSelec+'.png');\n\t\n}", "title": "" }, { "docid": "1cd25560d8f6c8b23dc3bc53b0147915", "score": "0.6060836", "text": "function initMap() {\r\n // Créer l'objet \"carte\" et l'insèrer dans l'élément HTML qui a l'ID \"macarte\"\r\n carte = L.map('maCarte').setView([lat, lon], 6);\r\n // Leaflet ne récupère pas les cartes (tiles) sur un serveur par défaut. Nous devons lui préciser où nous souhaitons les récupérer. Ici, openstreetmap.fr\r\n L.tileLayer('https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', {\r\n // le lien vers la source des données\r\n attribution: 'données © <a href=\"//osm.org/copyright\">OpenStreetMap</a>/ODbL - rendu <a href=\"//openstreetmap.fr\">OSM France</a>',\r\n minZoom: 1,\r\n maxZoom: 20\r\n }).addTo(carte);\r\n\r\n //ajouter un marqueur\r\n var marqueur = L.marker(trajet[10,10]).addTo(carte);\r\n marqueur.bindPopup(\"<h2>ESI Alger</h2>\");\r\n\r\n var marqueur1 = L.marker(trajet[1,1]).addTo(carte);\r\n marqueur1.bindPopup(\"<h2>ESI SBA</h2>\");\r\n\r\n\r\n var points = [\r\n [lat,lon],\r\n [lat1,lon1],\r\n\r\n ]\r\n//inserer la ligne\r\ntrajet =trajet.map(function (p) { return [p[0], p[1]]; });\r\n var route = L.polyline(trajet,\r\n {\r\n color: 'green'\r\n }\r\n\r\n ).addTo(carte)\r\n\r\n var circle = L.circle([lat3, lon3], {\r\n color: 'red',\r\n fillColor: '#f03',\r\n fillOpacity: 0.5,\r\n radius: 50000\r\n }).addTo(carte);\r\n circle.bindPopup(\"<h2> Blida </h2>\");\r\n\r\n\r\n var polygon = L.polygon([\r\n [lat2, lon2],\r\n [lat3, lon3],\r\n [lat, lon]\r\n ]).addTo(carte);\r\n polygon.bindPopup(\"<h2> zone</h2>\");\r\n\r\n\r\n var popup = L.popup();\r\n\r\n function onMapClick(e) {\r\n popup\r\n .setLatLng(e.latlng)\r\n .setContent(\"You clicked the map at \" + e.latlng.toString())\r\n .openOn(carte);\r\n }\r\n\r\n carte.on('click', onMapClick);\r\n }", "title": "" }, { "docid": "bd8aa7d1b7c3f9c390c06b1984094821", "score": "0.6055672", "text": "show() {\n this.setMap(this.map_);\n }", "title": "" }, { "docid": "ca23b0555149b81b2b3567b460b27705", "score": "0.60553885", "text": "function informacionPunto(marcador){\n google.maps.event.addListener(marcador,'mouseover',function(){\n\n if(marcador.informacion.capital==0) var imageIcon = new google.maps.MarkerImage('/imagenes/mapas/ciudad-bullet_hover.png', null, null, null, new google.maps.Size(28,43));\n else var imageIcon = new google.maps.MarkerImage('/imagenes/mapas/capital-bullet_hover.png', null, null, null, new google.maps.Size(28,27));\n\n marcador.setIcon(imageIcon);\n\n showTooltip(marcador,map);\n $(\"#link-\"+marcador.informacion.id).css({'text-decoration':'underline'});\n });\n\n google.maps.event.addListener(marcador,'mouseout',function(){\n\n if(marcador.informacion.capital==0) var imageIcon = new google.maps.MarkerImage('/imagenes/mapas/ciudad-bullet.png', null, null, null, new google.maps.Size(23,34));\n else var imageIcon = new google.maps.MarkerImage('/imagenes/mapas/capital-bullet.png', null, null, null, new google.maps.Size(23,22));\n\n marcador.setIcon(imageIcon);\n\n $(\"#tooltip\").css(\"visibility\", \"hidden\");\n $(\"#link-\"+marcador.informacion.id).attr('style','');\n });\n\n google.maps.event.addListener(marcador,'click',function(){\n window.location = marcador.informacion.url;\n });\n\n $(\"#link-\"+marcador.informacion.id).mouseover(function(){\n\n if(marcador.informacion.capital==0) var imageIcon = new google.maps.MarkerImage('/imagenes/mapas/ciudad-bullet_hover.png', null, null, null, new google.maps.Size(28,43));\n else var imageIcon = new google.maps.MarkerImage('/imagenes/mapas/capital-bullet_hover.png', null, null, null, new google.maps.Size(28,27));\n\n marcador.setIcon(imageIcon);\n showTooltip(marcador,map);\n\n }).mouseout(function(){\n if(marcador.informacion.capital==0) var imageIcon = new google.maps.MarkerImage('/imagenes/mapas/ciudad-bullet.png', null, null, null, new google.maps.Size(23,34));\n else var imageIcon = new google.maps.MarkerImage('/imagenes/mapas/capital-bullet.png', null, null, null, new google.maps.Size(23,22));\n\n marcador.setIcon(imageIcon);\n $(\"#tooltip\").css(\"visibility\", \"hidden\");\n });\n }", "title": "" }, { "docid": "c7ad7c94f0ade2c61455563c5fba9bc1", "score": "0.60521597", "text": "function seePedidos() {\n $(\"#pedidos\").hide();\n\n $(\"#btn-pedidos\").on(\"click\", function() {\n $(\"#pedidos\").show();\n $(\"#orders\").hide();\n\n $(\"#btn-dropdown\").click();\n //$(\"#end\").hide();\n //$(\"#presentacion\").show();\n });\n\n //$(\"#btn-float\").show();\n //mymap.invalidateSize(); // mejora la carga del mapa.\n}", "title": "" }, { "docid": "761f38c2da253cac30c222bc3c40379d", "score": "0.6050948", "text": "function localita_map(bounds, pois){\n var map = init_map('localita_map',bounds, 10, 18);\n\n var i=0;\n while (i < pois.length) {\n poi = pois[i];\n L.marker([poi.lat,poi.lon]).addTo(map)\n .bindPopup('<a href=\"'+poi.tooltip_url+'\">'+poi.tooltip_text+'</a><br>');\n i++;\n }\n\n}", "title": "" }, { "docid": "d6a2cf2a19113d4599d6d454cf357c62", "score": "0.60479546", "text": "displayMap(){\n push();\n translate(this.x,this.y);//put the grid where it's at\n this.cells.map(cell => cell.displayMap());\n pop();\n }", "title": "" } ]
9913d3edb3134a6460282e8a97d508d9
When size is submitted by the user,call makeGrid()
[ { "docid": "2c43605b906c28af44df1af4d0b2892d", "score": "0.66561234", "text": "function makeGrid(submitButn) {\n let rows = $(\"#inputHeight\").val();\n let cols = $(\"#inputWeight\").val();\n \n //Prevent submit button from submitting form\n submitButn.preventDefault();\n \n //empty canvas before making new grid\n canvas.empty();\n\n for (let i = 1; i <= rows; i++) {\n let cell = \"\";\n for (let j = 1; j <= cols; j++) {\n cell += \"<td></td>\";\n }\n canvas.append(\"<tr>\" + cell + \"</tr>\");\n }\n}", "title": "" } ]
[ { "docid": "4c4292e12825757cf0dd46e72c18a646", "score": "0.786554", "text": "function sizeSubmit(event) {\n makeGrid();\n // Use preventDefault to stop form from resetting height & width values\n event.preventDefault();\n}", "title": "" }, { "docid": "27a13d7d6c720ca7baa0ce33329a7aed", "score": "0.7684664", "text": "function newGrid(event){\n gridSize = prompt(promptText, \"32\");\n\n if(gridSize == null){\n return;\n }\n else if(isNaN(gridSize)){\n promptText = \"ENTERED VALUE NOT A NUMBER! Enter grid size[1-100]: \";\n newGrid(event);\n return;\n }\n else if(gridSize <= minGridSize || gridSize >= maxGridSize){\n promptText = \"ENTERED NUMBER OUT OF RANGE! Enter grid size[1-100]: \";\n newGrid(event);\n return;\n }\n else{\n size = (containerDimension / gridSize) + \"px\";\n\n if(!containerCreated){\n setupContainer();\n }\n clearElementChildren(container);\n fillDrawingGrid();\n\n if(!paletteCreated){\n setupPalette();\n fillPalette();\n }\n }\n}", "title": "" }, { "docid": "55968307d1b0149901c6fefad412fe6e", "score": "0.7480997", "text": "function newGrid() {\n\tnewSize = prompt(\"Please enter a new size for the grid: \");\n if (newSize === null)\n return;\n while (isNaN(newSize) || newSize < 1) {\n \tnewSize = prompt(\"Please enter a positive integer value: \");\n if (newSize === null)\n return;\n }\n $('#grid').empty();\n makeGrid(newSize);\n}", "title": "" }, { "docid": "a64c6474ecc39115fe459193337d5cbb", "score": "0.74075365", "text": "function createGrid(e, size = sizeInput.value || 16) {\n if (!+size || size > 100) {\n alert(\"Please enter a valid number from 2 to 100.\");\n return;\n }\n if (container.childNodes.length != size * size) {\n container.textContent = \"\";\n for (i = 0; i < size * size; i++) {\n div = document.createElement(\"div\");\n div.classList.add(\"squares\");\n container.appendChild(div);\n //setting css grid style for square grid using size\n container.setAttribute(\n \"style\",\n `grid-template-columns: repeat(${size}, 1fr)`\n );\n }\n }\n chooseMode();\n}", "title": "" }, { "docid": "48715b3ced85a667a2615a858c63091a", "score": "0.7362933", "text": "function submission() {\n event.preventDefault();\n let rows = document.querySelector('#inputHeight').value;\n let cols = document.querySelector('#inputWidth').value;\n makeGrid(rows, cols);\n}", "title": "" }, { "docid": "96c5089e633c8191bddfceca79f21ae1", "score": "0.73055774", "text": "function applyGridSize() {\n switch (gridSize.value) {\n case 'large':\n canvas.innerHTML = '';\n gridRows = 50;\n gridCols = 50;\n populateCanvas(gridRows, gridCols);\n saveCanvas('Z660o8DSqY-current');\n break;\n case 'medium':\n canvas.innerHTML = '';\n gridRows = 20;\n gridCols = 20;\n populateCanvas(gridRows, gridCols);\n saveCanvas('Z660o8DSqY-current');\n break;\n default:\n canvas.innerHTML = '';\n gridRows = 10;\n gridCols = 10;\n populateCanvas(gridRows, gridCols);\n saveCanvas('Z660o8DSqY-current');\n }\n}", "title": "" }, { "docid": "a41a28bb473390cc4a789b8e9004aaad", "score": "0.72650474", "text": "function changeGridSize() {\n const newGridSize = parseInt(prompt(\"Enter a number:\", \"between 2-100\"));\n if (newGridSize < 2 || newGridSize > 100 || !newGridSize) {\n newGridSize = 16;\n }\n container.innerHTML = '';\n createDivs(newGridSize);\n addMouseoverToGrids();\n makeGrid(newGridSize);\n}", "title": "" }, { "docid": "719c89135e29a1ef6b2cae4926eb0e9c", "score": "0.72357833", "text": "function selectSize() {\n reset();\n var size = prompt(\"Number of pixels per side?\", \"1-100\");\n if (typeof size != \"number\" && size <= 100 && size > 0) {\n createGrid(size);\n } else {\n var size2 = prompt(\n \"Number of pixels per side must be between 1 and 100(inclusive)\",\n \"1-100\"\n );\n createGrid(size2);\n }\n}", "title": "" }, { "docid": "e62446297f7431f959b11a222615f1b8", "score": "0.7216004", "text": "function setGridSize(e){\n var prevSize = gridSize;\n gridSize = e.target.value;\n \n if (prevSize !== gridSize) {\n resizeGrid();\n }\n \n gridPadding = (ctx.canvas.width-(gridSize*cellSize))/2\n\t\t\n\t\tdrawGrid(puzzle);\n }", "title": "" }, { "docid": "83cabe5c30de344a017b2866b4fbd9d7", "score": "0.7163714", "text": "function setSize() {\n let size = parseInt(prompt('Select the size of the grid'));\n if ( size < 1 || size > 64 || Number.isNaN(size)) {\n alert(\"Enter a number betwenn 1 and 64\");\n setSize();\n } else {\n clearGrid();\n getSizeGrid(size); \n}\n}", "title": "" }, { "docid": "b546b31dc47a70be3b8a6f4ecb0c4b30", "score": "0.7160523", "text": "function userGrid() {\n while(container.firstChild) {\n container.removeChild(container.firstChild);\n }\n var newSize = prompt(\"Please enter a number 1\\-150.\");\n buildGrid(newSize);\n}", "title": "" }, { "docid": "0630e783fb238da60d7f7a2ead882f90", "score": "0.71334195", "text": "function checkSize() {\n\tselectGridSize();\n\tif (dimensions >= 1 && dimensions <= 100) {\n\t\tcreateGrid();\n\t} else {\n\t\talert(\"Grid size must be between 1 and 100.\");\n\t\tcheckSize();\n\t}\n}", "title": "" }, { "docid": "480c8d160f12edb622d8f156e9e445a6", "score": "0.71274173", "text": "_drawGrid(size) { \n if (this.showRow){\n this.canvas.add(\n this._createSquare(1).canvasElt\n , this._createSquare(2).canvasElt\n , this._createRect(1).canvasElt\n , this._createRect(1,90).canvasElt\n );\n }\n }", "title": "" }, { "docid": "933153d4b757c0df332446863343b1d7", "score": "0.71136135", "text": "function updateGrid(){\n\n\t\tvar gridSize = $(\"#grid-size\").val();\n\t\tvar squareSize = 512 / gridSize;\n\t\tvar str = \"\";\n\n\t\tif (gridSize > 256) {\n\n\t\t\t$(\".validateInput\").text(\"The maximum size is 256\").addClass(\"ui-state-highlight\");\n\t\t\tsetTimeout(function() {\n $(\".validateInput\").removeClass( \"ui-state-highlight\", 1500 );\n }, 500 );\n\n\t\t} else {\n\n\t\t\t//Clean grid\n\t\t\tdeleteGrid();\n\n\t\t\t//For more efficient code append first in string and then append to container\n\t\t\tfor (var i = 0; i < gridSize; i++) {\n\t\t\t\tstr +='<div class=\"square border\"></div>';\n\t\t\t}\n\n\t\t\tfor (i = 0; i < gridSize; i++){\n\t\t\t\t$(\".container\").append(str);\t\n\t\t\t}\n\n\t\t\t//Update squares height and width\n\t\t\t$(\".square\").css({\"width\": squareSize, \"height\": squareSize});\n\t\t\n\t\t\tdialog.dialog(\"close\");\n\t\t\t$(\"#grid-size\").val(\"\");\n\t\t}\t\n\t}", "title": "" }, { "docid": "f2f496b2ee085d1b04e774b64371e820", "score": "0.7035169", "text": "function newGrid() {\n var size = parseInt(prompt('Introduce a value for the new grid'));\n $('.square').remove();\n create(size);\n\n}", "title": "" }, { "docid": "e5a2e90c33f646ccd10798cd3c37682c", "score": "0.70333093", "text": "function createGrid() {\n var $gridSize = $('input:text[name=grid-input]').val();\n\n // Checks if the grid size inputted by user is valid (not empty and it is number)\n if ($gridSize !== \"\" && isNaN($gridSize) === false) {\n if ($gridSize < 0 || $gridSize > 100) {\n alert('The number you entered is outside the range!');\n }\n else {\n $('.square').remove();\n var $squareSize = (500 / $gridSize) - 2;\n for (var i = 0; i < $gridSize; i++) {\n for (var k = 0; k < $gridSize; k++) {\n $('#grid-container').append('<div class=\"square\"></div>');\n }\n }\n $('.square').css({\"height\":$squareSize,\"width\":$squareSize}); \n }\n }\n}", "title": "" }, { "docid": "a43c64842a08f2d95c24e9b340d2d2ce", "score": "0.70186657", "text": "function resize (){\n $('#resize').click(function(){\n $('.container-box').empty();\n response = prompt('Pick a number: 1-70', 50);\n // if user cancels the prompt, initial grid function will fire\n if (response) {\n var size = 600/response + 'px';\n for (var i = 0; i < response; i++) {\n for (var j = 0; j < response; j++) {\n $('.container-box').append('<div class=\"box\" style=\"height:' + size + '; width:' + size + '\"></div>');\n }\n }\n initialColor();\n } else {\n \tinitialGrid();\n }\n })\n}", "title": "" }, { "docid": "b654f358271f9df22e3599cfdf254440", "score": "0.701691", "text": "function submitForm() {\n event.preventDefault();\n const gridHeight = document.getElementById('inputHeight').value;\n const gridWidth = document.getElementById('inputWidth').value;\n makeGrid(gridHeight, gridWidth);\n}", "title": "" }, { "docid": "021a972dd84b66940b1451c9a4058d54", "score": "0.699171", "text": "function formSubmit() {\n event.preventDefault();\n let inputHeight = document.getElementById('inputHeight').value;\n let inputWidth = document.getElementById('inputWidth').value;\n makeGrid(inputHeight, inputWidth);\n}", "title": "" }, { "docid": "5d89c15c0de55b057063e864bfb618fe", "score": "0.69722074", "text": "function newGrid() {\n\tvar gridSize = prompt(\"Enter the new grid size:\"); // get size from user\n\n\t$(\".gridSquare\").remove(); // remove the previous grid squares\n\n\tvar numSquares = gridSize * gridSize; // number of grid squares to be made\n\n\tfor (var i=0; i < numSquares; i++)\n\t{\n\t$(\".sketchpad\").append(\"<div class='gridSquare'></div>\");\n\t}\n\n\t$('.gridSquare').height(700 / gridSize);\n\t$('.gridSquare').width(700 / gridSize);\n\t$('.gridSquare').css({\"background-color\" : \"#eee\", \n\t\t\t\t\t\t \"display\" : \"inline-block\",\n\t\t\t\t\t\t \"border\" : \"0px\",\n\t\t\t\t\t\t \"margin\" : \"0px\",\n\t\t\t\t\t\t \"vertical-align\" : \"top\"});\n\n\tchangeColor();\n}", "title": "" }, { "docid": "3b2af7a72f42662749a7a780fbd7fb28", "score": "0.69074285", "text": "function OnCreate(){\n while(sketchbox.firstChild){\n sketchbox.removeChild(sketchbox.firstChild)};\n var inputValue = document.getElementById(\"input\").value;\n gridSize = inputValue;\n columns = gridSize;\n rows = (gridSize * columns) - 1;\n CreateGrid(rows, columns);\n}", "title": "" }, { "docid": "053318399d6a60d940f66a779148fcd2", "score": "0.6904519", "text": "function newGrid(){\n var grid_size = prompt(\"Choose a number N between 1 and 100 to create an N X N grid.\");\n if(grid_size !== null){\n clear();\n setGrid(grid_size);\n sketch();\n }\n}", "title": "" }, { "docid": "73de274a3a3f17156a8bfc3c18e3275e", "score": "0.68867105", "text": "function newGrid(size) {\n const gridContainer = document.querySelector('.grid-container');\n\n // grid cleared by setting inner html as empty string\n gridContainer.innerHTML = \"\";\n initializeGrid(size);\n\n addGridListeners();\n // need to add listeners again\n\n}", "title": "" }, { "docid": "6ed698ad2634d914526a50864552e8cb", "score": "0.6871354", "text": "function changeGridSize () {\n newGridSize = prompt('Enter number of squares per side.');\n if ( newGridSize == null || newGridSize == '' || isNaN(newGridSize) == true ) {\n alert(\"Erm...that's not a number. Please enter a number!\");\n }\n else if (newGridSize > 250) {\n alert(\"Yikes, that number is too large, you'll crash the browser! Pick something less than 250.\")\n }\n else {\n buildGrid(newGridSize);\n }\n}", "title": "" }, { "docid": "b8200582c098656650c90466b62623d7", "score": "0.68459177", "text": "function setGrid()\n{ \n // removeGrid();\n var gridSize=prompt(\"Please enter a number from 1 to 100 to for nxn grid size.\"); \n \n if (gridSize > 0 && gridSize < 101) { \n removeGrid();\n createGrid(gridSize); \n }\n else {\n alert(\"Unable to create grid of that size! Please enter a number from 1 to 100 to for nxn grid size.\");\n }\n}", "title": "" }, { "docid": "5eee5d5ae96ab723e84f1c9f7f2635f2", "score": "0.6809343", "text": "function formSubmission() {\n event.preventDefault();\n const height = document.getElementById('inputHeight').value;\n const width = document.getElementById('inputWidth').value;\n makegridtable(height, width);\n}", "title": "" }, { "docid": "69bc43c0e79659932f0ddf5d833e5165", "score": "0.679325", "text": "function getNewGrid() {\n newGrid.addEventListener('click', () => {\n gridSize = prompt('Grid size? 0 - 64');\n if(isNaN(gridSize)) {\n alert('Please type a number.');\n } else if(gridSize > 64) {\n alert('Number is too high.');\n } else if(!gridSize) {\n alert('Please enter a value.');\n } else if(gridSize < 0) {\n alert('The grid can\\'t be negative.')\n } else {\n initGrid();\n generateGrid();\n getClear();\n }\n })\n}", "title": "" }, { "docid": "49e32508d3c6bbc1e294b284b9e73f85", "score": "0.677619", "text": "function createGrid(size) {\n var square_size = $(\"#box\").width() / size - 2; //-2 for borders\n //Create the size x size grid.\n for (var i = 0; i < size; i++) {\n for (var j = 0; j < size; j++) {\n //Adds the squares too DOM\n $(\"#box\").append(\"<div class='square'></div>\");\n }\n }\n //Adjust the square size based on input.\n $(\".square\").css('width', square_size);\n $(\".square\").css('height', square_size);\n}", "title": "" }, { "docid": "077707877eff4b321a4c3c0b0e3ee515", "score": "0.6756033", "text": "reflow() {\n this.calculateGridSizes();\n }", "title": "" }, { "docid": "f1b41ef2ec23f80fcf8bb92ba3c99a99", "score": "0.67499775", "text": "function makeGrid() {\n const row = $('#inputHeight').val();\n const column = $('#inputWeight').val();\n addTable(row, column);\n}", "title": "" }, { "docid": "38797914bdc61a6bf594377a1e534a6e", "score": "0.6746042", "text": "function selectGridSize() {\n\tdimensions = prompt(\"Please enter your preferred grid size between 1-100: \");\n}", "title": "" }, { "docid": "9f48f48a903010c39ca43c9649d11cda", "score": "0.6739798", "text": "function makeGrid(size) {\n makeRows(size);\n makeSquares(size);\n}", "title": "" }, { "docid": "42334230ba7300b32b33d24f7c6c7f87", "score": "0.6738358", "text": "function changeSize() {\n if (canDraw)\n setupCanvas(columnSlider.value(), rowSlider.value());\n}", "title": "" }, { "docid": "4e55c684a60d3385d81f239d279c44d8", "score": "0.6722258", "text": "function makeGrid() {\n\tcanvas.width = +widthpicker.value + 1;\n\tcanvas.height = +heightpicker.value + 1;\n\tcreateLines();\n}", "title": "" }, { "docid": "122d24bc8ccfd7627f0e60adf95fee66", "score": "0.6719037", "text": "function newGrid() {\n let exit = true;\n // Print to the console when a new grid is created\n console.log('button pressed');\n // Show the border of the container\n parentDiv.style.border = \"1px gray solid\";\n resetDiv.appendChild(colorPickBtn);\n\n colorPickBtn.addEventListener('click', chooseColor);\n\n // Remove all the old containers \n const oldDivs = parentDiv.querySelectorAll('div');\n oldDivs.forEach(element => {\n parentDiv.removeChild(element);\n });\n\n // Make the grid - if the user inputs\n // a variable which is not a number above 0,\n // have them enter a valid number\n let gridAmt;\n do {\n gridAmt = prompt('How many pixels wide would you like your image to be?');\n if(isNaN(gridAmt) || +gridAmt < 1) {\n alert('Please enter a valid number!');\n }\n } while(isNaN(gridAmt)||+gridAmt < 1);\n\n // Print to the console the userdefined grid amount\n console.log(`GRID AMT: ${gridAmt}`);\n\n // create the grid and give each \n // element a size of auto\n let gridTemplate = ``;\n for(let i=0; i < gridAmt; i++) {\n for(let o=0; o < gridAmt; o++) {\n const newDiv = document.createElement('div');\n newDiv.id = `${i}-${o}`;\n newDiv.className = 'draw-div';\n parentDiv.appendChild(newDiv);\n }\n gridTemplate = `${gridTemplate} auto`;\n }\n parentDiv.style.gridTemplateColumns = gridTemplate;\n parentDiv.style.gridTemplateRows = gridTemplate;\n\n draw();\n}", "title": "" }, { "docid": "ccea32de47e909f80471bdd6326d5c43", "score": "0.66958255", "text": "function createGrid(){\n // clears the container of all DIVS\n killChildren(CONTAINER); \n\n // populates the container with as many DIVS as specified with userSize\n birthChildren(CONTAINER); \n}", "title": "" }, { "docid": "cc95ed647f332e2cc297938a2f5ce7b7", "score": "0.6667416", "text": "function getInput() {\n\tvar input = prompt(\"Enter a resolution size for the drawing (1-80): \");\n\t$('.container').empty();\n\tsquares = input;\n\n\tdrawGrid();\n}", "title": "" }, { "docid": "4e45b768cff5c70e5c5a92d97cf1e7b5", "score": "0.6649815", "text": "function changeGrid() {\n let newGrid = prompt(\"Enter new size: \")\n if (newGrid !== null) {\n newGrid = parseInt(newGrid);\n if (newGrid < 1 || newGrid > 64 || Number.isNaN(newGrid)) {\n alert(\"Enter a number from 1-64 range\");\n changeGrid();\n } else {\n clearGrid();\n createGrid(newGrid);\n }\n }\n}", "title": "" }, { "docid": "b3ff0f60cd9856127f34f1845cfdbbd4", "score": "0.6649731", "text": "function gridHandler(container, size, num) {\n\t\n\t\tif (container) {\n\t\t\tArray.from(gridContainer.children)\n\t\t\t\t.forEach((child) => gridContainer.removeChild(child));\n\t\t\t\n\t\t\tgridContainer.style.gridTemplateColumns = `repeat(auto-fill, minmax(${size}px, 1fr))`;\n\t\t\tfor (let i = 0; i < num; i++) {\n\t\t\t\tgridContainer.appendChild(createGridCard());\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "bf7f07d1e50079f54df2cd5f7724fdb6", "score": "0.66118896", "text": "function refreshGrid() {\n clearGrid()\n var box = prompt(\"How many boxes per side?\");\n createGrid(box);\n\n}", "title": "" }, { "docid": "64df0694498d78865dfe605f64c20f16", "score": "0.6596553", "text": "function InitDialog()\n{\n gDialog.enableSnapToGrid.checked = gEditor.snapToGridEnabled;\n toggleSnapToGrid();\n\n gDialog.sizeInput.value = gEditor.gridSize;\n}", "title": "" }, { "docid": "6ed695fc12ed745274eae54abed3fedc", "score": "0.6588552", "text": "function makeSize(value) {\n //remove gridItems of old grid\n gridItems.forEach((gridItem) => {\n gridItem.remove();\n })\n document.getElementById(prevId).style.removeProperty('box-shadow');\n makeRows(value, value);\n //populate Node list with new grid-items\n gridItems = document.querySelectorAll('.grid-item');\n}", "title": "" }, { "docid": "a963dacfd99e08553fc05b942b95597c", "score": "0.65773785", "text": "function getSizeGrid(size) {\n let gridSize = size * size;\n document.getElementById('container').style.gridTemplateRows = `repeat(${size}, 1fr)`;\n document.getElementById('container').style.gridTemplateColumns = `repeat(${size}, 1fr)`;\n for (i = 0; i < gridSize; i++) {\n const gridElement = document.createElement('div');\n container.appendChild(gridElement);\n gridElement.addEventListener('mouseover', setColor);\n gridElement.classList = \"grid-element\";\n }\n}", "title": "" }, { "docid": "6e151f749f34762c486b527c39f70dd2", "score": "0.6570516", "text": "function makeGrid() {\n\tlet x = checkInput(inputWidth.val(), 'Width'); // width checked if too large\n\tlet y = checkInput(inputHeight.val(), 'Height'); // height checked if to large\n\tlet newTitle = $('input[name=\"name\"]').val(); // title of the next new canvas\n\t$('#canvasContainer').prepend(\"<h2 class='canvasTitle'>\" + newTitle + \"</h2>\"); // adds canvas title\n\tfor (var rows = 0; rows < x; rows++) {\n\t\tpixelCanvas.append(\"<tr class='row'></tr>\"); // adds rows to table\n\t};\n\tfor (var columns = 0; columns < y; columns++) {\n\t\t$(\".row\").append(\"<td class='col shadow'></td>\"); // adds columns to rows\n\t};\n}", "title": "" }, { "docid": "c05970b55374f5175aaf859671b8b9df", "score": "0.6570139", "text": "function makeGrid(event) {\n // Stops the 'Make Grid' button from reloading the page\n event.preventDefault();\n\n // Removes any old grid from the page before a new one is created\n while (grid.firstChild) {\n grid.removeChild(grid.firstChild);\n }\n\n // Gets the current value of the height input field\n const heightInput = document.getElementById(\"inputHeight\");\n const height = heightInput.value;\n\n // Gets the current value of the width input field\n const widthInput = document.getElementById(\"inputWidth\");\n const width = widthInput.value;\n\n if (width > 150 || height > 150) {\n alert(\"PLEASE ENTER A VALUE OF 150 OR LESS!\");\n } else {\n // A nested loop to create rows and then create cells inside those rows\n const fragment = document.createDocumentFragment();\n for (let r = 0; r < height; r++) {\n const newRow = document.createElement(\"tr\");\n fragment.appendChild(newRow);\n for (let c = 0; c < width; c++) {\n const newCol = document.createElement(\"td\");\n newRow.appendChild(newCol);\n }\n grid.appendChild(fragment);\n } // END FOR LOOP\n }\n}", "title": "" }, { "docid": "925e4879dfd2805cddacf7dc87812343", "score": "0.65616995", "text": "function makeGrid() {\n\n// Your code goes here!\n$(document).ready(function(){\n $('#sizePicker').submit(function(event){\n event.preventDefault();\n gridHeight = $('#inputHeight').val();\n gridWidth = $('#inputWeight').val();\n gridTable = $('#pixelCanvas');\n makeGrid(gridHeight, gridWidth);\n\n });\n})\n\n // When size is submitted by the user, call makeGrid()\nfunction makeGrid(row, column) {\n // Your code goes here!\n $('tr').remove();\n for (let i = 1; i <= row; i++){\n $('#pixelCanvas').append('<tr></tr>');\n for (let j = 1; j <= column; j++){\n $('tr').filter(':last').append('<td></td>');\n\n }\n }\n \n}\n\n// Your code goes here!\n\n\n//adding color to cell\n\n$('#pixelCanvas').on('click' \"td\", function(){\n var gridColor = $('#colorPicker').val();\n if($(this).attr('style')){\n $(this).removeAttr('style')\n }else {\n $(this).css('background' + gridColor);\n }\n\n});\n\n}", "title": "" }, { "docid": "b963755ef14b41b1f007b177dd228aa9", "score": "0.6559194", "text": "function getInput() {\n\tvar input = prompt(\"Enter a resolution size for the drawing (1-80): \");\n\t$('.opacity-container').empty();\n\tsquares = input;\n\n\tdrawGrid();\n}", "title": "" }, { "docid": "56ef7b95439674321b668544ae180792", "score": "0.6557811", "text": "function createGrid() {}", "title": "" }, { "docid": "a5a49e31a96a3c912ba1ca646c6814da", "score": "0.6555227", "text": "function setGridSize() {\n // Get the value the slider is set too\n let gridValue = document.querySelector(\".grid-size-value\")\n\n console.log(`Grid Size from slider: ${gridValue.textContent}`)\n selectedGridSize = Number(gridValue.textContent);\n\n // remove all of the grid-box divs inside of the grid container\n let gridContainer = document.querySelector('.grid-container')\n while (gridContainer.firstChild) {\n gridContainer.removeChild(gridContainer.firstChild)\n }\n\n initGrid(gridContainerSize, selectedGridSize);\n}", "title": "" }, { "docid": "c98f73e0cf04e08bb7316c5b23c6d4f5", "score": "0.6536415", "text": "function newGrid(mode) {\n\t$(\"#container\").empty();\n\t\tvar gridsize = +prompt(\"How many rows would you like to generate?\");\n\t\tgenerateGrid(gridsize, mode);\n}", "title": "" }, { "docid": "a7accc30789e150c4097cecd02fd880d", "score": "0.6523342", "text": "function drawGrid(gridSize)\n{\n deletePreviousGrid();\n for (var i=0; i<parseInt(gridSize**2); i++) {\n console.log(gridSize**2);\n let gridCell = document.createElement('div');\n gridCell.className = 'grid-cell';\n gridCell.style.backgroundColor = 'white';\n container.appendChild(gridCell);\n }\n //dynamically sets up new grid size\n container.style.gridTemplateColumns = ('repeat(' + gridSize + ', 1fr)'); \n colorCell(currentColor);\n}", "title": "" }, { "docid": "8a60fb33cd552dcc53d4b48344852c31", "score": "0.6519301", "text": "function makeGrid(inputWidth, inputHeight) {\n // reset the submitted info\n grid.innerHTML = null; \n for (var x = 1; x<=inputWidth; x++) {\n var row = pixelCanvas.insertRow(-1);\n for (var y = 1; y<=inputHeight; y++) {\n var cell = row.insertCell(-1);\n // color the cell with selected color\n cell.addEventListener('click', function(event) {\n event.target.style.backgroundColor = colorPicker.value;\n }); \n }\n }\n}", "title": "" }, { "docid": "4901402e4cbab2c7765e5ddf5727fc59", "score": "0.65183395", "text": "function updateGrid(){\n //prompt pops up allowing user to enter a # from 1-64\n let gridSize = prompt(\"Enter a number from 1-64\")\n //if user clicks \"cancel\" the function break out early, cancel returns null\n if(gridSize === null){\n return\n //if gridSize has no value, run newGrid() again from the start\n } else if (!gridSize) {\n alert(\"Please enter a number\")\n updateGrid()\n //if the # entered > 64, alert user then run newGrid() again\n } else if(parseInt(gridSize) > 64){\n alert(\"Number is too big, only numbers from 1-64\")\n updateGrid()\n //if the # entered is < 0, alert user then run newGrid() again\n } else if (parseInt(gridSize) <= 0){\n alert(\"Number is too small, only numbers greater than 0\")\n updateGrid()\n //if # is between 1-64 then create the grid with createGrid()\n } else{\n container.textContent = \"\"; // remove the grid from before\n createGrid(gridSize) // create new grid with the input size\n }\n}", "title": "" }, { "docid": "184e586b4ad99ad953cbaa9d9fe5c872", "score": "0.65168226", "text": "function makeGrid() {\n\t\tconst gridRows = document.querySelector('#inputHeight').value;\n\t\tconst gridCols = document.querySelector('#inputWidth').value;\n\n\t\twhile (table.firstChild) {\n\t\t\ttable.removeChild(table.firstChild);\n\t\t}\n\n\t\t/*\n\t\tfor (let r = 0; r < gridRows; r++) {\n\t\t\tconst tr = document.createElement('tr');\n\t\t\ttable.appendChild(tr);\n\t\t\tfor (let c = 0; c < gridCols; c++) {\n\t\t\t\tconst td = document.createElement('td');\n\t\t\t\ttr.appendChild(td);\n\t\t\t}\n\t\t}\n\t\t*/\n\t\tfor (let r = 0; r < gridRows; r++) {\n\t\t\tconst tr = table.insertRow()\n\t\t\tfor (let c = 0; c < gridCols; c++) {\n\t\t\t\tconst td = tr.insertCell()\n\t\t\t}\n\t\t}\n\n\t\t// save the updates to the storage \n\t\tsaveToStorage();\n\t}", "title": "" }, { "docid": "2e1c7ff1616c2e892a4b87345e34fe17", "score": "0.65149367", "text": "function grid(size) {\n var cord = { x: 0, y: 0 };\n\n //\n // Draw horizontal lines as we go down the screen\n //\n for (var y = 0; y < size.y; y++) {\n cord.x += SIZE_PX + (GRID_LINE_W / 2);\n window.gridGraph.push();\n window.gridGraph.strokeWeight(GRID_LINE_W);\n window.gridGraph.stroke(56);\n window.gridGraph.line(0, cord.x, width, cord.x);\n window.gridGraph.pop();\n cord.x += (GRID_LINE_W / 2);\n }\n\n //\n // Draw vertical lines as we go right the screen\n //\n for (var x = 0; x < size.x; x++) {\n cord.y += SIZE_PX + (GRID_LINE_W / 2);\n window.gridGraph.push();\n window.gridGraph.strokeWeight(GRID_LINE_W);\n window.gridGraph.stroke(56);\n window.gridGraph.line(cord.y, 0, cord.y, height);\n window.gridGraph.pop();\n cord.y += (GRID_LINE_W / 2);\n }\n\n window.gridCtx.drawImage(window.gridGraph.elt, 0, 0);\n window.gridGraph.clear();\n}", "title": "" }, { "docid": "de47ba28741ace9cbebd01bf2daf6ea1", "score": "0.64578354", "text": "function setgridsize(n)\n{\n\tgridsize = n;\n}", "title": "" }, { "docid": "ea1a385c3219bd751eff93b5b410e9d8", "score": "0.64452565", "text": "function changeSize(gridNumber) {\n let newSize = gridNumber;\n if (newSize !== null) {\n newSize = parseInt(newSize);\n if (Number.isNaN(newSize)) {\n changeSize(16);\n } else {\n clearGrid();\n setGridSize(newSize);\n fillGrid(newSize);\n document.getElementsByTagName(\"span\")[0].innerHTML = parseInt(newSize) + \" x \" + parseInt(newSize);\n console.log(newSize);\n }\n }\n}", "title": "" }, { "docid": "83249f466faccee22e03f26a16eb66d1", "score": "0.64305586", "text": "function ResizeBoard() {\n\tlet NewBoardSize\n\twhile(NewBoardSize == null){\n\tNewBoardSize = prompt(\"Enter NUmber of Boxs per row\");}\n\tMakeGrid(NewBoardSize);\n}", "title": "" }, { "docid": "2a237d4e296a36c757a44953ab651ab6", "score": "0.64277554", "text": "function setGridSize(size) {\n gridContainer.style.gridTemplateColumns = `repeat(${size}, 1fr)`;\n}", "title": "" }, { "docid": "8c30ade7584933e180d4214f5316390b", "score": "0.6418006", "text": "function reset() {\n let newSize = prompt(\"Please enter number of squares per side\", \"e.g. 64\");\n\n // If user clicks cancel\n if (newSize === null) {\n return;\n }\n\n if (isNaN(newSize)) {\n\n alert(\"That's not a number!\");\n return;\n\n } else if (newSize <= 0) {\n\n alert(\"Cannot be less than or equal to zero!\");\n return;\n }\n\n size = parseInt(newSize);\n \n // Remove all the old items from the grid\n while(divGrid.firstChild) {\n divGrid.removeChild(divGrid.firstChild);\n }\n\n drawGrid();\n}", "title": "" }, { "docid": "5fe66cb711ee693936fcb1490b2ff128", "score": "0.64110583", "text": "function initGridDynamicSize(){\n\t\t\n\t\tif(g_temp.isTilesMode == false)\n\t\t\tthrow new Error(\"Dynamic size can be set only in tiles mode\");\n\t\t\n\t\tvar isChanged = false;\n\t\tvar isMobile = g_gallery.isMobileMode();\n\t\t\n\t\t//--- set space between cols and rows\n\t\t\n\t\tvar spaceOld = g_temp.spaceBetweenCols;\n\t\t\n\t\tif(isMobile == true){\n\t\t\tg_temp.spaceBetweenCols = g_options.grid_space_between_mobile;\n\t\t\tg_temp.spaceBetweenRows = g_options.grid_space_between_mobile;\n\t\t}else{\n\t\t\tg_temp.spaceBetweenCols = g_options.grid_space_between_cols;\n\t\t\tg_temp.spaceBetweenRows = g_options.grid_space_between_rows;\n\t\t}\n\t\t\n\t\tif(g_temp.spaceBetweenCols != spaceOld)\n\t\t\tisChanged = true;\n\t\t\n\t\t//set tile size\n\t\t\n\t\tvar lastThumbSize = getThumbsSize();\n\t\tvar lastThumbWidth = lastThumbSize.width;\n\t\t\n\t\tvar tileWidth = g_temp.tileMaxWidth;\n\t\tvar numCols = g_functions.getNumItemsInSpace(g_temp.gridWidth, g_temp.tileMaxWidth, g_temp.spaceBetweenCols);\n\t\t\n\t\tif(numCols < g_options.grid_min_cols){\n\t\t\ttileWidth = g_functions.getItemSizeInSpace(g_temp.gridWidth, g_options.grid_min_cols, g_temp.spaceBetweenCols);\n\t\t}\n\t\t\n\t\tg_tilesDesign.setTileSizeOptions(tileWidth);\n\t\t\n\t\tif(tileWidth != lastThumbWidth)\n\t\t\tisChanged = true;\n\t\t\n\t\t\n\t\treturn(isChanged);\n\t}", "title": "" }, { "docid": "bb220b752e7eab99ba3f10aaef8b406d", "score": "0.6394695", "text": "function makeGrid() {\r\n //Add Event that when useru click on Submit button, it goes to default and clears previous grid, retrieves input numerical values and proceeds to make grid function\r\n var height = document.getElementById(\"inputHeight\").value;\r\n var width = document.getElementById(\"inputWidth\").value;\r\n canvas.innerHTML = null;\r\n //Create nested loop to create rows then columns to create grid\r\n for (var m = 0; m < height; m++) {\r\n var row = canvas.insertRow(m);\r\n for (var n = 0; n < width; n++) {\r\n var cell = row.insertCell(n);\r\n cell.addEventListener('click', function(event) {\r\n event.target.style.backgroundColor = color.value;\r\n });\r\n }\r\n }\r\n}", "title": "" }, { "docid": "3b180390d55a770f7dd80646e21e07fd", "score": "0.63910383", "text": "function onSizeChange(){\n\t\t\n\t\tinitAndPlaceElements();\n\t\t\t\t\n\t\tif(g_objPanel)\n\t\t\tcheckHidePanel();\n\t\t\n\t}", "title": "" }, { "docid": "cbee83b76feb09c3e6b57c41d0e4f587", "score": "0.6375592", "text": "setNewGridSize(size) {\n console.log(size)\n switch (size) {\n case \"2\":\n this.setState({\n grid: {\n columns: 20,\n rows: 10\n }\n })\n console.log(\"after case 2\",this.state.grid)\n break;\n case \"3\":\n this.setState({\n grid: {\n columns: 30,\n rows: 40\n }\n })\n console.log(\"case 3\", this.state.grid)\n break;\n default:\n this.setState({\n grid: {\n columns: 25,\n rows: 25\n }\n })\n }\n console.log(\"outside switch\", this.state.grid)\n this.clearGrid();\n }", "title": "" }, { "docid": "ea709dd45d7cbdc9f8a9b21a4ccb2b8e", "score": "0.6369487", "text": "function makeGrid(event) {\n// Your code goes here! \n\t$('table tr').remove(); // Clears previously created grid.\n\tconst rows=$('#inputHeight').val(); \n\tconst cells=$('#inputWeight').val(); \n\t//alert(\"rows:\"+ rows+ \"\\n cells:\"+ cells);\n\tfor (let i=1;i<=rows;i++) {\n\t$('table').append(\"<tr></tr>\");\n\t\tfor (let j=1;j<=cells;j++) {\n\t\t$('tr:last').append(\"<td></td>\"); // last makes sure that the cells are added only to the last created table row and not for all.\n\t\t$('td').attr('class','pixel');\n\t\t}\n\t}\n\tevent.preventDefault(); //avoids the page to be refreshed after clicking on submit button and retains the table/grid.\n}", "title": "" }, { "docid": "e462eafdda3f6556461d8b380984701f", "score": "0.63598937", "text": "function makeGrid() {\n\t \t//Select size input -- get values from choose grid size form\n\t \tconst gridHeight = $('#input_height').val();\n\t \t\tif(gridHeight > 100) {\n\t \t\t\talert('please keep grid height 100 or less');\n \t\t\tgridHeight = 100;\n\t\t\t}\n\t \tconst gridWidth = $('#input_width').val();\n\t \t\tif(gridWidth > 100) {\n\t \t\t\talert('please keep grid width 100 or less');\n \t\t\tgridWidth = 100;\n\t\t\t}\n\t\t//access design canvas table\n\t\tconst table = $('#pixel_canvas');\n\n\t\t//Remove all child nodes from the table so a fresh one can be made\n \ttable.empty();\n\t\t//Create the table rows\n\t\tfor (let i = 0; i < gridHeight; i++) {\n\t\t\t// create new tr and append to table\n\t\t\ttable.append('<tr></tr>');\n\t\t\t//Create the table data cell\n\t\t\tfor (let j = 0; j < gridWidth; j++) {\n\t\t\t\t// create new td and append to tr\n\t\t\t\ttable.children().last().append('<td></td>');\n\t\t\t}\n\t\t}\n\t\t//TODO: Add event listener for a number of elements, on every td element\n\t\t$('td').click(function(evt) {\n\t\t\t// Get selected color input and store\n\t\t\tlet pickedColor = $('#colorPicker').val();\n\t\t\t//Listen for just the clicked on cell then use the stored color value to update it's background color\n\t\t\t$(evt.target).css('background-color', pickedColor);\n\n\t\t\t// TODO: Remove a pixel color from the table if needed on double click\n\t\t\t$(table.find('td')).dblclick(function(){\n \t$(this).removeAttr('style');\n \t});\n\t\t});//event listener function for color picker\n\t}", "title": "" }, { "docid": "ee5d1a6b4f0e47d446946581c638f05e", "score": "0.6357495", "text": "function makeGrid(inputHeight, inputWidth) {\n\n // Get table information and create empty grid to populate from sizePicker\n let canvas = document.getElementById('pixelCanvas');\n let canvasGrid = '';\n\n // Loop det. grid height, build HTML string to replace table below w/ canvasGrid\n for (let i = 0; i < inputHeight; i++) {\n canvasGrid += '<tr class=\"row-' + i + '\">';\n // Loop det. grid width, build HTML string to replace table below w/ canvasGrid\n for (let j = 0; j < inputWidth; j++) {\n canvasGrid += '<td class=\"cell\" id=\"row-' + i + '_cell-' + j + '\"></td>';\n }\n canvasGrid += '</tr>';\n }\n\n // Replace current table element with new grid string created from above loops\n canvas.innerHTML = canvasGrid;\n\n // Apply event listeners to cell grid\n onCellClick();\n}", "title": "" }, { "docid": "ad79f6d27302d6cdea09dd7e6230b152", "score": "0.6345303", "text": "function getGridSize() {\n let numberOfRows = elements.inputHeight.value;\n let numberOfColumns = elements.inputWidth.value;\n return {\n numberOfColumns: parseInt(numberOfColumns),\n numberOfRows: parseInt(numberOfRows)\n };\n }", "title": "" }, { "docid": "a83d437f9fccfee354914cd764db522d", "score": "0.634465", "text": "function userDefineGrid () {\n resetGrid();\n var uGU = $('#userGridUnits').val();\n gridInit(uGU,720,720);\n}", "title": "" }, { "docid": "a4b4fb1e99048f3984054cf251b92f96", "score": "0.63396436", "text": "function makeGrid(event){\n event.preventDefault();\n table.innerHTML = \"\";\n var height = document.getElementById('inputHeight').value;\n var width = document.getElementById('inputWidth').value;\n var rows = [];\n var cells = [];\n for (var i = 0; i < height; i++){\n rows.push(table.insertRow(i));\n for (var j = 0; j < width; j++){\n cells.push(rows[i].insertCell(j));\n }\n }\n}", "title": "" }, { "docid": "985dcd0c0d6272797391d7bff1977a24", "score": "0.6298627", "text": "function createGrid() {\n\tdeleteGrid();\n\tvar block = '.grid_block';\n\tvar user_input = prompt(\"Enter the number of blocks per row: \");\n\tvar total_width = 700;\n\tvar block_dimension = (total_width / user_input) - 1;\n\t\n\tconsole.log(block_dimension);\n\t\n\tfor (i = 0; i < user_input; i++)\n\t{ \n\t\tfor (j = 0; j < user_input; j++) \n\t\t{\n\t\t\t$(\".grid_container\").append(\"<div class='grid_block'></div>\");\n\t\t\t$(block).css('height', block_dimension);\n\t\t\t$(block).css('width', block_dimension);\n\t\t}\n\t}\t\n}", "title": "" }, { "docid": "9a4af788cf4fed9639d629d7c3e69d70", "score": "0.62857825", "text": "function setPixelSize() {\n min = parseInt($('#min').val());\n max = parseInt($('#max').val());\n gridPixelSize = canvas.width / (max - min);\n }", "title": "" }, { "docid": "c203b63d0413c2c754e0100bd2ac5639", "score": "0.62613785", "text": "function makeGrid(rows, cols) {\n if (rows > 100 || cols > 100 || rows <= 0 || cols <= 0) {\n alert(\"Please enter valid numbers. Value should be less than or equal to 100\");\n $('#input_height').val('');\n $('#input_width').val('');\n return;\n } else {\n var grid = document.createElement('table');\n grid.className = 'grid';\n for (var r = 0; r < rows; ++r) {\n var tr = grid.appendChild(document.createElement('tr'));\n for (var c = 0; c < cols; ++c) {\n var cell = tr.appendChild(document.createElement('td'));\n }\n }\n return grid;\n }\n}", "title": "" }, { "docid": "c383565d02f7ef68c8d3be20f5a88bdf", "score": "0.6260823", "text": "function clear(){\n //Make whole grid default color\n var gridSquares = document.getElementsByClassName(\"grid-item\");\n for (var i = 0; i < gridSquares.length; i++) {\n gridSquares.item(i).style.backgroundColor = \"lightgray\";\n }\n //Resizing the grid\n var newSize = prompt(\"How many squares per side?\", Math.sqrt(gridSquares.length));\n if (newSize < 1) {\n alert(\"Wrong input.\")\n createGrid(16);\n }\n else if (newSize > 128) {\n alert(\"Large inputs will cause poor performance.\")\n createGrid(128);\n }\n else {\n createGrid(newSize);\n }\n}", "title": "" }, { "docid": "24eee863be7a46ade4df43b40ba98f4a", "score": "0.624714", "text": "function newGrid() {\n let number = askSize();\n container.style.gridTemplateColumns = `repeat(${number},1fr)`;\n container.style.gridTemplateRows = `repeat(${number},1fr)`;\n\n container.innerHTML = \"\";\n \n changeSize(number);\n\n for (i=0;i<number**2;i++){\n let temp = document.createElement(\"div\");\n temp.classList.add(\"grid\");\n container.appendChild(temp);\n }\n let grids = document.querySelectorAll(\".grid\");\n grids.forEach((grid) => { \n grid.addEventListener(\"mouseover\",draw) \n });\n \n}", "title": "" }, { "docid": "c140d176f2b39abbbd540032a79ad8e0", "score": "0.624313", "text": "function makeGrid(event) {\n event.preventDefault();\n const gridSize = getGridSize();\n\n // Call the clearCanvas function for a clean grid\n clearCanvas();\n let row = 0;\n while (row < gridSize.numberOfRows) {\n let tr = elements.gridCanvas.insertRow(row);\n for (let col = 0; col < gridSize.numberOfColumns; col++) {\n tr.insertCell(col);\n }\n row++;\n }\n }", "title": "" }, { "docid": "961a7ef11e62ea20cf18e84075ab69f9", "score": "0.62391967", "text": "function createGrid(){\r\n document.getElementById('btn').style.display='none';\r\n var size=window.prompt('Input the grid size A where grid will be A x A',3);\r\n num_elements=size*size;\r\n var count=0;\r\n var created_list=createArray(num_elements);\r\n var shuffled_list=shuffleArray(created_list);\r\n for (i=0;i<size;i++){\r\n let row=document.createElement('div');\r\n container.appendChild(row).className='rows';\r\n for (j=0;j<size;j++){\r\n let cell=document.createElement('div');\r\n if (count<num_elements) {\r\n cell.innerHTML=shuffled_list[count];\r\n setAttributes(cell);\r\n container.appendChild(cell);\r\n count++;\r\n }\r\n }\r\n }\r\n createSubmitButton();\r\n}", "title": "" }, { "docid": "ebdda97d29df7d0745f261c36f742220", "score": "0.6238439", "text": "function setGridSize() {\n //setting rows, cols and number of colored cells depending on the level\n colorCount = level + 3;\n switch (level) {\n case 1:\n case 2:\n row = 3;\n col = 3;\n break;\n case 3:\n case 4:\n row = 3;\n col = 4;\n break;\n case 5:\n case 6:\n row = 4;\n col = 5;\n break;\n case 7:\n case 8:\n row = 5;\n col = 5;\n break;\n case 9:\n case 10:\n row = 6;\n col = 6;\n break;\n default:\n break;\n }\n}", "title": "" }, { "docid": "4383f751a330bd1db0b7f374da423016", "score": "0.623112", "text": "function newGrid() {\nlet reset = document.getElementById(\"reset\");\nreset.addEventListener(\"click\", function () {\n\tclearGrid();\n\tcheckSize();\n\tfillInBlack();\n\tcolorSwitch();\n});\n}", "title": "" }, { "docid": "e26ddaa99743df585dfd717ef3f962b6", "score": "0.6219785", "text": "function makeGrid() {\n const height = inputHeight.val();\n const width = inputWidth.val();\n\n //Clear the table\n table.children().each(function() {\n $(this).remove();\n });\n\n //Create the table\n for (let i = 0; i < height; ++i) {\n let str = \"\";\n for (let j = 0; j < width; ++j) {\n str += '<td class=\"pixel-cell\"></td>';\n }\n table.append('<tr class=\"pixel-row\">' + str + '</tr>');\n }\n currHeight = height;\n currWidth = width;\n\n setTableDimensions();\n }", "title": "" }, { "docid": "082baa00aaa94f523528282db7e567cb", "score": "0.6218136", "text": "function makeGrid() {\t\n\t\n\tform.submit(function(e){\n\n\t\te.preventDefault(); // prevent sumbit reset\n\t\tif(table.html()!= '<tr><td></td></tr>'){\n\t\t\ttable.html('<tr><td></td></tr>');\n\t\t} // resets the drawing canvas af\n\t\t\n\t\theight = $('#inputHeight').val() ;\n\t\twidth = $('#inputWeight').val();\n\n \t\tfor (var i = 1; i <= height-1; i++) { // These for loops to build the drawing canvas \n \t\t\ttable.append('<tr><td></td></tr>');\n \t\t}\n \t\tfor (var i = 1; i <= width-1 ; i++) {\n \t\t\t$('tr').append('<td></td>')\n \t\t}\n\n \t\t$('td').click(function(){ // this function is for drawing when you click on any cell\n\n\t\t\tif($(this).css('background-color') == \"rgb(255, 255, 255)\"){\n\t\t\t\t$(this).css('background-color' , color)\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$(this).css('background-color' , 'rgb(255, 255, 255)')\n\t\t\t}\n\n\t\t})\n \t\t\n\t})\n\t$('td').click(function(){ // this function is for drawing when you click on any cell\n\n\t\t\tif($(this).css('background-color') == \"rgb(255, 255, 255)\"){\n\t\t\t\t$(this).css('background-color' , color)\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$(this).css('background-color' , 'rgb(255, 255, 255)')\n\t\t\t}\n\n\t\t})\n\n\tcolor = $('#colorPicker').val(); // sets the default color (black)\n\n\n\t$('#colorPicker').change(function(){ // for picking any different color than the default \n\n \t\t\treturn color = $('#colorPicker').val();\t\n\n \t\t})\n}", "title": "" }, { "docid": "5003396f9d467df1ca8161c85c5ea1c1", "score": "0.6215454", "text": "function puzzleSize(size) {\n tileArray = [];\n document.body.getElementsByClassName(\"tileGrid\")[0].innerHTML = \"\";\n numTiles = size * size;\n numColumns = size;\n containerWidth = size * tileWidth;\n containerHeight = size * tileWidth;\n tileHorizontalShiftAmt = containerWidth / numColumns; // Units are in pixels\n tileVerticalShiftAmt = containerHeight / numColumns; // Units are in pixels\n\n setBoardSize(size);\n setupGame();\n}", "title": "" }, { "docid": "bf01646f93f42d9c433ca18a38210547", "score": "0.6210754", "text": "_check_grid_sizes() {\r\n if ((this.width & 1) === 0) {\r\n this.width -= 1;\r\n }\r\n if ((this.height & 1) === 0) {\r\n this.height -= 1;\r\n }\r\n }", "title": "" }, { "docid": "9ae77b5099934fd2cd9a800d9490a2ab", "score": "0.6206149", "text": "function resetGrid() {\n let newGridSize = parseInt(prompt(\"Enter a number:\", \"between 2-100\"));\n if (newGridSize < 2 || newGridSize > 100 || !newGridSize) {\n newGridSize = 16;\n }\n container.innerHTML = '';\n createDivs(newGridSize);\n addMouseoverToGrids();\n makeGrid(newGridSize);\n}", "title": "" }, { "docid": "5de9fbfe4389e5952ea0bc3006ca639c", "score": "0.61976695", "text": "function handleCreate () {\n pengine.ask(\"grid(\" + currentGrid + \", Grid)\");\n}", "title": "" }, { "docid": "5a6d42bafb947ddb2e8e28dee5bc6991", "score": "0.61816144", "text": "function render() { \n let squares = Number(prompt(\"Decide how many squares you want on each side of the grid.\")) \n //Make sure input is numeric\n if((!isNaN(parseFloat(squares)) && isFinite(squares)) == false){\n alert(\"Please only enter numeric characters\")\n } \n else {\n buildGrid(squares)\n }\n}", "title": "" }, { "docid": "b23da2dfc93ad8a2eb708b9a391f90f9", "score": "0.6180549", "text": "function editBoardSize() {\r\n let select = id(\"size-select\");\r\n let board = id(\"board\");\r\n board.innerHTML = \"\";\r\n let numOfSqs = getSelected(select);\r\n for (let i = 0; i < numOfSqs; i++) {\r\n let square = document.createElement('div');\r\n let text = document.createElement('p');\r\n text.textContent = \" \";\r\n square.classList.add(\"square\");\r\n text.classList.add(\"scenario\");\r\n text.addEventListener('click', selectSquare);\r\n square.appendChild(text);\r\n board.appendChild(square);\r\n let className = \"square-\" + numOfSqs;\r\n square.classList.add(className);\r\n }\r\n }", "title": "" }, { "docid": "be16d590566359afe695bc8d82a3e497", "score": "0.6180068", "text": "function setDefaultGrid() {\n setGridSize(16);\n fillGrid(16);\n document.getElementsByTagName(\"span\")[0].innerHTML = \"16 x 16\";\n\n}", "title": "" }, { "docid": "1c0b017e26cdd6a0fe954302518fc22b", "score": "0.6178239", "text": "function changeSize() {\n size = btn_size.value;\n }", "title": "" }, { "docid": "fbe9b48a91b5a155e1a3835b3877d3a1", "score": "0.61763275", "text": "function resize(requestedScale) {\n var scale = requestedScale || 0;\n if (cSize + scale > 0) {\n canvas.width = gridSizeX * (cSize + scale);\n canvas.height = gridSizeY * (cSize + scale);\n cSize = canvas.width / gridSizeX;\n if (cSize % 1 !== 0) { // If gridSize is NOT a whole number (probably dodgy CSS)\n throw new Error (\"Canvas size not divisible by 31.\");\n }\n canvas.style.display = \"block\";\n }\n}", "title": "" }, { "docid": "0ab5cf05a834a468bd33fc3e12b01235", "score": "0.61715525", "text": "function setDimensions(){\n width = prompt('Please enter number of squares per side, 16');\n height = width;\n}", "title": "" }, { "docid": "4bc5aef6dee7672d4c414fa77752d078", "score": "0.61650395", "text": "function makeGrid() {\n // Clear table\n while (table.hasChildNodes()) {\n table.removeChild(table.lastChild);\n }\n // Get values\n var height = document.getElementById(\"inputHeight\").value; // Height form\n if (height > 30) {\n var height = 30;\n };\n var width = document.getElementById(\"inputWidth\").value; // Width form\n if (width > 80) {\n var width = 80;\n };\n // Number of rows\n for (var a = 0; a < height; a++){\n var row = table.appendChild(document.createElement('tr')); // Add new rows\n // Number of columns\n for (var b = 0; b < width; b++) {\n var column = row.appendChild(document.createElement('td')); // Add columns within row\n column.addEventListener('click', paintCell); // Listen for clicks on each new cell\n };\n };\n}", "title": "" }, { "docid": "4635158f6fe1948237b79992dada1671", "score": "0.6163402", "text": "function setGridSize(x,y)\n {\n if(isNaN(x) || isNaN(y))\n throw new TypeError;\n \n if(x <= 0 || y <= 0)\n throw new Error(\"A Grid is not allowed to be zero or less Width or Height\");\n \n //Array erzeugen\n cellGrid = createArray(x,y);\n \n calledInitCountries = false;\n calledInitBorders = false;\n }", "title": "" }, { "docid": "8bc4db5ad32a3fe9147e8e04634ee63f", "score": "0.61616856", "text": "function refreshGrid(){\n y = prompt(\"How many boxes per side?\");\n clearGrid();\n createGrid(y);\n cullur(y);\n}", "title": "" }, { "docid": "596431b5cc35839676cb4357c2e16ad8", "score": "0.61586154", "text": "function grid(event) {\n myTable.innerHTML = '';\n event.preventDefault();\n row = parseInt(document.getElementById('inputHeight').value);\n column = parseInt(document.getElementById('inputWidth').value);\n newArray = makeGrid(row, column);\n nextArray = makeArray(row, column);\n\n}", "title": "" }, { "docid": "ee4d1ed08142dd6e28cf6b2040061f66", "score": "0.6158175", "text": "function createCanvas() {\n var gridSize = $(\"#grid-size-input\").val();\n var divString = \"\";\n var squareSize = 512 / gridSize;\n $(\".grid-container\").empty();\n for (var i = 0; i < gridSize; i++) {\n divString += \"<div class='square-div border' id='square-div'></div>\";\n }\n for (i = 0; i < gridSize; i++) {\n $(\".grid-container\").append(divString);\n }\n //Update squares height and width\n $(\".square-div\").css({\n \"width\": squareSize,\n \"height\": squareSize\n });\n setColor();\n}", "title": "" }, { "docid": "02626543ca89cf1fec8236941237f278", "score": "0.6156929", "text": "function resetGrid() {\n let gridSize = parseInt(prompt(\"Size of Grid?\"));\n let divNum = (gridSize * gridSize);\n gridContainer.innerHTML = \"\"; \n makeGrid(gridSize)\n makeDivs(divNum); \n addFill();\n decreaseOpacity();\n}", "title": "" }, { "docid": "c95e39a7ea48cc7c324477ef5f2edfb7", "score": "0.6153823", "text": "function generateGrid(size, mode) {\n\tvar grid = 600 / size;\n\tfor ( i = 0; i < size; i++) {\n\t\t$(\"#container\").append(\"<div></div>\");\n\t}\n\t$(\"#container > div\").css({\"height\": grid});\n\tfor ( j = 0; j < size; j++) {\n\t\t$(\"#container > div\").append(\"<div></div>\");\n\t}\n\t$(\"#container > div > div\").css({\"height\": grid, \"width\": grid, \"display\": \"inline-block\",\n\t\t\"vertical-align\": \"top\"});\n\tcolorMode(mode);\n}", "title": "" }, { "docid": "ceba22d564dadf5a141928dd5114790d", "score": "0.6151283", "text": "setSize(size){\n this.size = size\n }", "title": "" }, { "docid": "179329694c32f79c53089af398e44ec0", "score": "0.61479723", "text": "function init() {\n createGrid(Number(document.querySelector(\"#grid-size\").value));\n paintBrush();\n preventContextMenu();\n getPaint();\n colorSelect();\n}", "title": "" } ]
45ed0a6f709d68d50a3eb79312da2f7d
Provide the validation to the user name is it empty or not
[ { "docid": "d70c51d40761efd3eaff58fd672b53bc", "score": "0.0", "text": "function onValidate() {\n let username = document.getElementById(\"name\").value;\n let usercode = document.getElementById(\"code\").value;\n let usermail = document.getElementById(\"mail\").value;\n let usernumber = document.getElementById(\"number\").value;\n if (username.trim() == \"\") {\n document.getElementById(\"username\").innerHTML = \"**Please Enter the Username\";\n return false;\n }\n if ((username.length <= 2) || (username.length > 20)) {\n document.getElementById(\"username\").innerHTML = \"**Please Enter the between 2 characters to 20 characters in Username\";\n return false;\n }\n if (!isNaN(username)) {\n document.getElementById(\"username\").innerHTML = \"**Please Enter Only character\";\n return false;\n }\n document.getElementById(\"username\").style.display = \"none\";\n\n\n if (usercode.trim() == \"\") {\n document.getElementById(\"pass\").innerHTML = \"**Please Enter the Usercode\";\n return false;\n }\n if ((usercode.length <= 2) || (usercode.length > 10)) {\n document.getElementById(\"pass\").innerHTML = \"**Please Enter the code Between 2 to 9 character & number\";\n return false;\n }\n document.getElementById(\"pass\").style.display = \"none\";\n\n\n if (usermail.trim() == \"\") {\n document.getElementById(\"email\").innerHTML = \"**Please Enter the Email id\";\n return false;\n }\n if (usermail.indexOf('@') <= 0) {\n document.getElementById(\"email\").innerHTML = \"**Please check the Position @ \";\n return false;\n }\n if ((usermail.charAt(usermail.length - 4) != \".\") && (usermail.charAt(usermail.length - 3) != \".\")) {\n document.getElementById(\"email\").innerHTML = \"**Please check the Position . \";\n return false;\n }\n document.getElementById(\"email\").style.display = \"none\";\n if (usernumber.trim() == \"\") {\n document.getElementById(\"mobileNumber\").innerHTML = \"**Please Enter the Mobile Number\";\n return false;\n }\n if (usernumber.length != 10) {\n document.getElementById(\"mobileNumber\").innerHTML = \"**Please Enter 10 digits Number Only\";\n return false;\n }\n document.getElementById(\"mobileNumber\").style.display = \"none\";\n\n return true;\n}", "title": "" } ]
[ { "docid": "bd7a865fa01ef89429757c0b382653de", "score": "0.76178145", "text": "function cheacsignUpName() {\n\n\t\tvar pattern = /^[a-z A-Z]*$/;\n\n\t\tvar name = $(\"#userName\").val()\n\t\tvar nameLength = name.length;\n\n\t\tif (pattern.test(name) && name !== '' && nameLength >= 3) {\n\n\t\t\t$(\"#usrname_error_message\").hide();\n\t\t\t$(\"#userName\").css(\"border\", \"2px solid #226308\");\n\t\t} else {\n\t\t\t$(\"#usrname_error_message\")\n\t\t\t\t.html(\n\t\t\t\t\t\"Should contain only charecters and length must be greater than 3\");\n\t\t\t$(\"#usrname_error_message\").css(\"color\", \"#c41f3b\");\n\t\t\t$(\"#usrname_error_message\").show();\n\t\t\t$(\"#userName\").css(\"border\", \"2px solid #F90A0A\")\n\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "32b300f11b9a20b5b651466ad56a5663", "score": "0.73513407", "text": "function isNameValid () {\n return $name.val().length > 0;\n }", "title": "" }, { "docid": "7e124fa26e836ad5f05635e0a4b8c529", "score": "0.72386396", "text": "function usernameValidation() {\n var loc = document.querySelector('#username');\n var input = loc.value.trim();\n var valid = true;\n input = input.toUpperCase();\n var length = input.length;\n if (length == 0) {\n checkError('<span>Empty username is not available</span><br>');\n valid = false;\n } else if (length < 8) {\n checkError('<span>Username must have at least 8 characters</span><br>');\n valid = false;\n }\n if (input[0] < 'A' || input[0] > 'Z') {\n checkError('<span>Username must start with a letter</span><br>');\n valid = false;\n }\n return valid;\n}", "title": "" }, { "docid": "f660c6d6e48f042d595fda0a550bf831", "score": "0.7183754", "text": "_validateName() {\n var validRegEx = /^[A-Za-z0-9 ]+$/gi;\n const name = this.getReviewerName();\n return name.length >= 5 && name.length <= 48 && validRegEx.test(name);\n }", "title": "" }, { "docid": "e29b7414510737f83fd81925ea03a9a6", "score": "0.7168321", "text": "function checkName(){\n if (uname.value.length == \"\" || uname.value.length == null)\n {\n err1.innerHTML=\"Please Enter Your Name\";\n }\n if(uname.value.length <4)\n {\n err1.innerHTML = \"Name must be greater than 4 characters\";\n\n }\n else if ((uname.value.length) >= 4 && (uname.value.length < 40)) {\n err1.innerHTML = \"\";\n\n }\n if (uname.value.length >= 40) {\n err1.innerHTML =\"Name must be less than 40 characters\";\n\n }\n \n\n}", "title": "" }, { "docid": "97356c70f1803287f920918e3790c859", "score": "0.71507084", "text": "IsUserName() {}", "title": "" }, { "docid": "5ba8b45aab2f0310b8d1e41e25713a18", "score": "0.713998", "text": "function isValidName(user) {\n return /^[a-z]+$/.test(user);\n}", "title": "" }, { "docid": "f31326753b49d425e26963cefe174d91", "score": "0.7135665", "text": "function validateName(name){\r\n //if name is not empty string\r\n return name != '';\r\n}", "title": "" }, { "docid": "3470006dadc2d39021452eb6318193d4", "score": "0.7111456", "text": "function validateUsername(field){\r\n\t\tvar error = \"\";\r\n\t\tif( typeof(field !== \"undefined\")){\r\n\t\t\tif(field.length == 0){\r\n\t\t\t\terror = \"Please Enter Username \\n\";\r\n\t\t\t\t$(\".error_username\").html(error);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn error;\r\n\t}", "title": "" }, { "docid": "1402ba630c27b6fc3d2333228292dfc5", "score": "0.7100005", "text": "function isusernamevalid() {\n if (username.value == localUserName) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "880141a7184472314195c6b777696d9d", "score": "0.7094367", "text": "function isValidUsername() {\n var name = this.form.username.text;\n return name.length >= 5;\n}", "title": "" }, { "docid": "e430236dfd86ef435fdeb2c9fe5d9bd3", "score": "0.70927423", "text": "function validateName() {\n\n var name = document.getElementById('contact-name').value;\n \n if(name.length == 0) {\n \n producePrompt('Name is required', 'name-error' , 'red')\n return false;\n \n }\n \n if (!name.match(/^[A-Za-z]*\\s{1}[A-Za-z]*$/)) {\n \n producePrompt('First and last name, please.','name-error', 'red');\n return false;\n \n }\n \n producePrompt('Valid', 'name-error', 'green');\n return true;\n \n }", "title": "" }, { "docid": "3de72413dbe5d204aa5d989819c90ada", "score": "0.7069717", "text": "function checkUserName(){\n var usn = document.myForm.UserName.value;\n console.log(usn);\n var special= /^[!@#$%^&*()_+\\-=\\[\\]{};':\"\\\\|,.<>\\/?]*$/;\n// username should not be empty\nif (usn==\"\")\n return false;\n// username should be a minimum of 8 characters and above \nelse if ((usn.length < 9) || (usn.length > 15))\nreturn false;\n// username should be less than 15 characters\nelse if (usn.length < 15)\nreturn false;\n// No space is allowed in username\nelse if (usn.includes(\" \"))\nreturn false;\n// username should not contain special characters\nelse if (!special.test(usn))\nreturn false;\n// the function should return true if all the conditions above are validated.\nelse \n return true;\n// return false if the validation fails\n}", "title": "" }, { "docid": "4d8c3bbf607d04e67cf6e97bd71c5544", "score": "0.7048232", "text": "function validateLastName() {\n\t\t\n\t\tvar pattern = /^[a-zA-Z]*$/;\n\t\tvar lname = idLastName.val();\n\t\t\n\t\tif(lname == \"\"){\n\t\t\tidLastNameError.hide();\n\t\t\terrorLastName = false; \n\t\t\tidLastName.css(\"color\",\"Dodgerblue\");\n\t\t}\n\t\telse if (pattern.test(lname)) {\n\t\t\tidLastNameError.hide();\n\t\t\terrorLastName = false; \n\t\t\tidLastName.css(\"color\",\"Dodgerblue\");\n\t\t\t\n\t\t}\n\t\telse {\n\t\t\tidLastNameError.html(\"Should contain only alphabets\");\n\t\t\tidLastNameError.show();\n\t\t\terrorLastName = true; \n\t\t\tidLastName.css(\"color\",\"tomato\");\n\n\t\t}\n\t}", "title": "" }, { "docid": "24d08ea5ae0e4c8565ed69ec1658388e", "score": "0.70370376", "text": "function nameValidate(name) {\n\t//invalid if has space character\n\tif (name.indexOf(' ') > -1) {return false;}\n\t//if less than three characters long\n if (name.length < 3) {return false;}\n //if already taken\n else return !(connectedUsers.some(function(e) {return e.username === name;})); \n}", "title": "" }, { "docid": "764e03781dcacea8ff5375adbc3f592f", "score": "0.702191", "text": "static validateName(input) {\r\n const name = input && input.trim();\r\n return name !== undefined\r\n ? { success: true, name: name }\r\n : { success: false, message: 'Please enter a name that contains at least one character.' };\r\n }", "title": "" }, { "docid": "d2d2bc87698d91a372550cb004a7ebaa", "score": "0.70127195", "text": "displayUsername() {\n // method to display username if user has provided email\n let name = this.name;\n\n if (name.length > 4) {\n name = name.slice(0, 4) + \"..\";\n }\n\n if (!this.isundefined) {\n $(\"#user__name\").text(\n this.getTitle() + name\n );\n }\n }", "title": "" }, { "docid": "586b30eb799cf6be9304380f8ad222af", "score": "0.70107186", "text": "validateName() {\n const name = this.state.name.trim();\n if (name.length === 0) {\n return 'Name is required';\n }\n }", "title": "" }, { "docid": "243e47c06b80d4eb12297a40ab03c926", "score": "0.700486", "text": "function validateName(ev) {\n //validate the full name input with a regular expression\n let err = document.querySelector(\"#fullname + .error\");\n let name = document.querySelector(\"#fullname\").value;\n let regex = /^[a-z\\s]+$/gi;\n\n if (name !== \"\" && regex.test(name)) {\n err.textContent = \"\";\n return true;\n } else {\n err.textContent =\n \"Pease enter a valid name which contains letters or a space only\";\n return false;\n }\n}", "title": "" }, { "docid": "ccc791e5d816b101ec32da82f9c524de", "score": "0.700322", "text": "function nameSignUpValidation(name)\n{\n\t\n\tif(/[^a-zA-ZšđžčćŠĐŽČĆ]/gi.test(name) || name.length==0)\n\t{\n\t\tvar $signUpName = $('#signUpName');\n\t\t$signUpName.css({\"background-color\": \"#ff9db3\"});\n\n\t\t$signUpName.attr(\"placeholder\", \"Name can only contain letters including šđžčćŠĐŽČĆ.\");\n\t\t$('#signUpName').val(\"\");\n\t\treturn false;\n\t}\n\t\n\treturn true;\n}", "title": "" }, { "docid": "2d56f1ef01529162f9c7f0af5571c7e8", "score": "0.69877523", "text": "function nameVerify()\n {\n if(userName.value !=\"\")\n { \n userName.style.border=\"1px solid #ccc\" ; \n name_error.innerHTML=\"\"; \n return true; \n } \n validate();\n\n }", "title": "" }, { "docid": "758ea9cd5058c4340d74c7c1e94d71b9", "score": "0.697", "text": "function check_name()\n{ if ($(\"#r_username\").val()==\"\")\n { $(\"#checkName\").text(\"名字为空\");\n validation_passed.name = false;\n }\n else\n { $(\"#checkName\").text(\"名字正确\");\n validation_passed.name = true;\n }\n}", "title": "" }, { "docid": "91e29b40100e9f6952741f51114489af", "score": "0.6969725", "text": "function userName() {\n var uN = $('#username').val();\n var regularExpression = /^(?=.*[A-z])[a-zA-Z0-9_]{5,30}$/;\n\n if (!regularExpression.test(uN)) {\n $('#username').focus();\n failureModal(\"Error: Incorret Username\", \"Only alphabets, digits and underscore is allowed in username.<br/>It should be atleast 5 characters long and must contain atleast one alphabet.\");\n }\n}", "title": "" }, { "docid": "c776db89e59d7e5a25b18cbed0f73ec6", "score": "0.6964898", "text": "function checkUserName () {\n if (abc.includes(userName.value[0]) && userName.value.length > 2) {\n pasapalabra();\n } else {\n alert(\"El nombre de usuario debe empezar por una letra\\ny contener al menos 3 carácteres.\");\n } \n }", "title": "" }, { "docid": "1438aff8b6b35520e784a84b257d4c13", "score": "0.6954814", "text": "function tarteenFunction() {\r\n var input = document.getElementById(\"name\");\r\n if (name==null || name==\"\" || name==\"!\" || name==\".\" || name==\"@\"|| name==\",\"|| name==store.toUpperCase())\r\n alert(\"Enter a valid username\");\r\n alert(\"sir itry to solve it but i am failed :-(\");\r\n return false;\r\n\r\n }", "title": "" }, { "docid": "a97e5347b8220cb4a775db7703eb6e46", "score": "0.6930556", "text": "function validateFirstName() {\n\t\t\n\t\tvar pattern = /^[a-zA-Z]*$/;\n\t\tvar fname = idFirstName.val();\n\t\tif (pattern.test(fname) && fname !== '') {\n\t\t\tidFirstNameError.hide();\n\t\t\terrorFirstName = false; \n\t\t\tidFirstName.css(\"color\",\"Dodgerblue\");\n\t\t}\n\t\telse {\n\t\t\tidFirstNameError.html(\"Should contain only alphabets\");\n\t\t\tidFirstNameError.show();\n\t\t\terrorFirstName = true; \n\t\t\tidFirstName.css(\"color\",\"tomato\");\n\n\t\t}\n\t}", "title": "" }, { "docid": "5b63442d7a3b72856a7f4f780577faf6", "score": "0.6927635", "text": "function validateName() {\n let from_name = document.querySelector('#input-name').value;\n if (regexName.test(from_name) || from_name === 0) {\n validInput('input-name');\n name = true;\n } else {\n invalidInput('input-name');\n name = false;\n }\n }", "title": "" }, { "docid": "bde6534f99120e4bb5419537598e298e", "score": "0.6926065", "text": "function isValidName() {\n if (/^(?!\\s)[a-zA-Z '.-]*$/.test(nameInput.value) === false && nameInput.value.length > 0) { // input doesn't match regular expression && user has entered input\n nameError.innerHTML = '*Please enter a valid name';\n nameError.style.color = 'black';\n nameError.style.display = 'block';\n return false; \n } else if (nameInput.value.length == 0) { // if input is empty\n nameError.innerHTML = '*Name is required';\n nameError.style.color = 'red';\n nameError.style.display = 'block';\n return false;\n } else if (/^(?!\\s)[a-zA-Z '.-]*$/.test(nameInput.value) === true && nameInput.value) { // if input matches criteria hide error message and return as true\n nameError.style.display = 'none';\n return true;\n }\n}", "title": "" }, { "docid": "90ef6be91b57c96d42ce73659d48347f", "score": "0.69242036", "text": "function checkNameConstraint(inputField) {\n console.log(\"Name check is :\" + (inputField.value === null || inputField.value === \"\"));\n if (inputField.value === null || inputField.value === \"\") {\n addWarningText(inputField, \"Detta fält får ej lämnas blankt\");\n }\n else {\n removeWarningText(inputField);\n }\n\n}", "title": "" }, { "docid": "636c85005320cfcde5f8276490697709", "score": "0.6921782", "text": "function nameForm() {\n var trimmedName = name.trim(); //string operation to sanitise users inputs\n\n if (!trimmedName) {\n document.getElementById(\"errorMsgName\").innerHTML =\n \"No name has been entered.\";\n return false;\n }\n if (!trimmedName.match(/\\s/)) {\n document.getElementById(\"errorMsgName\").innerHTML =\n \"Please enter your full name.\";\n return false;\n }\n nameValidated = true;\n return true;\n }", "title": "" }, { "docid": "7d0c7a5b044b406dfa6bdc402f80dc94", "score": "0.6916776", "text": "function isValidUsername(name) {\n return /^[a-zA-z\\s?]+$/.test(name);\n}", "title": "" }, { "docid": "4b6aa6d92d505e9b245ccafdac84da4a", "score": "0.6907084", "text": "function userNameField(){\n\tlet userNameText = document.querySelector('#usernameText')\n\tlet EmailText = document.querySelector('#EmailText')\n\tlet NumberText = document.querySelector('#NumberText')\n\tlet userName = document.querySelector('#username');\n\tif (userName.value == '') {\n\t\tuserName.className = 'wrongInput';\n\t\tuserNameText.innerText = 'username cannot be empty'\n\t\tuserNameText.style.visibility = \"visible\"\n\t\n\t}else\n\tif (userName.value.length <= 6) {\n\t\tuserName.className = 'wrongInput';\n\t\tuserNameText.innerText = 'username must be greater than 6 characters'\n\t\tuserNameText.style.visibility = \"visible\"\n\t}else\n\tif (userName.value.length > 6) {\n\t\tuserName.className = 'correctInput';\n\t\tuserNameText.innerText = 'Perfect!'\n\t\tuserNameText.style.visibility = \"visible\"\n\t}\n}", "title": "" }, { "docid": "c4df8ca61290a6a69f3894d4f66af850", "score": "0.69002306", "text": "function isNameValid(){\n\tif(nameImput.value != ''){\n\t\tnameImput.className = '';\n\t\treturn true;\n\t}else{\n\t\tnameImput.className = 'input-error';\n\t\treturn false;\n\t};\n}", "title": "" }, { "docid": "d0af69169dd6b04896566faf9914d8ad", "score": "0.68974143", "text": "function validName(nameO) {\r\n\tif (nameO.match(patt)) {\r\n\t\tdocument.getElementById(\"a\").innerHTML = \"\";\r\n\t} else {\r\n\t\tdocument.getElementById(\"a\").innerHTML = \"Enter vaild username(no spl characters)<br> format:(firstName lastname)\";\r\n\t}\r\n}", "title": "" }, { "docid": "218c96d0fea55a1c676d9987b9c1d85b", "score": "0.6886894", "text": "function validateName() {\n const name = document.querySelector(\"#name\");\n const re = /^[a-zA-Z]{2,10}$/;\n\n if (!re.test(name.value)) {\n name.classList.add = \"is-invalid\";\n } else {\n name.classList.remove = \"is-invalid\";\n }\n}", "title": "" }, { "docid": "850a803905eb2a4ea5084835fae04bd5", "score": "0.68826246", "text": "function chkName () {\r\n\tvar applicant = document.getElementById(\"Firstname\").value;\r\n\tvar pattern = /^[a-zA-Z ]+$/ //check only alpha characters or space \r\n\tvar nameOk = true;\r\n\tif (applicant.length == 0){ \r\n\t\tdocument.getElementById(\"firstnameerror\").innerHTML = \"<font color=\"+gColor+\">First name cannot be blank !</font>\"; \r\n\t\tnameOk = false;\r\n\t}\t\r\n\telse if (!pattern.test(applicant)){\r\n\t\tdocument.getElementById(\"firstnameerror\").innerHTML = \"<font color=\"+gColor+\">Your name must only contain alpha characters !</font>\"; \r\n\t\tnameOk = false; \r\n\t}\r\n\telse{\r\n\t\tnameOK = true;\r\n\t\tdocument.getElementById(\"firstnameerror\").innerHTML = \"\"; \r\n\t}\r\n\t\r\n\tvar applicantLN = document.getElementById(\"Lastname\").value;\r\n\tvar patternLN = /^[a-zA-Z-]+$/ //check only alpha characters or space \r\n\tif ((applicantLN.length == 0)){ \r\n\t\tdocument.getElementById(\"lastnameerror\").innerHTML = \"<font color=\"+gColor+\">Last name cannot be blank !</font>\"; \r\n\t\tnameOk = false; \r\n\t}\r\n\telse if (!patternLN.test(applicantLN)){\r\n\t\tdocument.getElementById(\"lastnameerror\").innerHTML = \"<font color=\"+gColor+\">Your name must only contain alpha characters !</font>\"; \r\n\t\tnameOk = false; //checks for correct pattern\r\n\t}\r\n\telse {\r\n\t\tnameOK = true;\r\n\t\tdocument.getElementById(\"lastnameerror\").innerHTML = \"\"; \r\n\t}\r\n\t\r\n\treturn nameOk;\r\n}", "title": "" }, { "docid": "2ba1aeb394f6abf9df2360cbf9ef0358", "score": "0.68769467", "text": "function isNameValid() {\n return $('#name').val().length > 0; \n}", "title": "" }, { "docid": "bb5179dbc3467b053c3fd8ed1c86d4cd", "score": "0.6876366", "text": "function check_owner_name() {\n\t\n\t\t\t\tvar owner_name_length = $(\"#owner_name\").val().length;\n\n\n\t\t\t\tif (owner_name_length =='0') {\n\n $(\"#owner_name_error_msg\").html(\"the shop owner name field is required\");\n\t\t\t\t\t$(\"#owner_name_error_msg\").show();\n\t\t\t\t\terror_owner_name = true;\n\n\t\t\t\t}else if(owner_name_length < 5 || owner_name_length > 25) {\n\n\t\t\t\t\t$(\"#owner_name_error_msg\").html(\"shop owner name should be between 5-25 characters\");\n\t\t\t\t\t$(\"#owner_name_error_msg\").show();\n\t\t\t\t\terror_owner_name = true;\n\t\t\t\t} else {\n\t\t\t\t\t$(\"#owner_name_error_msg\").hide();\n\t\t\t\t}\n\t\t\t\n\t\t\t}", "title": "" }, { "docid": "81611312bb58e7e17ce492a0f74e00fe", "score": "0.687393", "text": "function validateUsername() {\r\n var username = document.getElementById(\"username\")\r\n if (username.value === \"\") {\r\n var errorField = document.getElementById(\"required-field-error\")\r\n if (errorField.innerHTML === \"\") {\r\n errorField.innerHTML = \"Missing required values: username\"\r\n }\r\n else {\r\n errorField.innerHTML = errorField.innerHTML + \" - username\"\r\n }\r\n return false\r\n }\r\n return true\r\n}", "title": "" }, { "docid": "ecae6273407d1a7e841e679d3e146560", "score": "0.6867717", "text": "function isNameValid(){\n if (userName.value.trim() === ''){\n //className is added that will print CSS rules in case if false\n userName.parentNode.className = 'not-valid';\n //.hide class the lastElementChild of parentNode will be set to block if false\n userName.parentNode.lastElementChild.style.display = 'block'\n return false;\n } else {\n userName.parentNode.className = 'valid'\n userName.parentNode.lastElementChild.style.display = 'none'\n return true;\n }\n}", "title": "" }, { "docid": "3030a94400b12691da61a2ae02dc752a", "score": "0.6866661", "text": "function validateUser(){\n\t//send request to make sure that username is unique\n}", "title": "" }, { "docid": "20456d9cd1e7b5b6fa46c82093dbadd9", "score": "0.6855875", "text": "function verificar_name() {\n if ($(this).val().length >= 3 && regexName.test($(this).val())) {\n console.log('firstname valid');\n name_business=true;\n allInputsValid($btn_bussiness);\n } else {\n name_business = false;\n desactiveButton($btn_bussiness);\n }\n }", "title": "" }, { "docid": "cff52f807cfe31b09ebb9f3543a4aefa", "score": "0.68506944", "text": "function checkUserFullName() {\n var userSurname = document.getElementById(\"userFullName\").value;\n var flag = false;\n if (userSurname === \"\") {\n flag = true;\n }\n if (flag) {\n document.getElementById(\"userFullNameError\").style.display = \"block\";\n } else {\n document.getElementById(\"userFullNameError\").style.display = \"none\";\n }\n}", "title": "" }, { "docid": "8ae183fd8a073f40e7f8ef1c4d34a54c", "score": "0.6849924", "text": "function validateUsername(){\n\t\tlet usernameEle = document.getElementById('username');\n\t\tlet result ={};\n\t\tlet usernameStr = usernameEle.value;\n\t\tusernameRag = /^[a-zA-Z0-9]{6,40}$/;\n\t\tif(!usernameRag.test(usernameStr)){\n\t\t\tresult['isValid'] = false;\n\t\t\tresult['message'] = \"6-40 characters of the alphabet and numbers\";\n\t\t}else{\n\t\t\tresult['isValid'] = true;\n\t\t}\n\t\treturn result;\n\t}", "title": "" }, { "docid": "45498b711d7ad86a970144d64ec9aa6d", "score": "0.68498826", "text": "function StatusUname(){\n\t\t\t\tif(stusername.val() == \"\"){\n\t\t\t\t\terror_uname.text(\"Please enter your username.\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\terror_uname.text(\"\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "db5b472de7a3357bf5201fdf6b18da56", "score": "0.68457156", "text": "function checkUserFullName(){\n var userSurname = document.getElementById(\"userFullName\").value;\n var flag = false;\n if(userSurname === \"\"){\n flag = true;\n }\n if(flag){\n document.getElementById(\"userFullNameError\").style.display = \"block\";\n }else{\n document.getElementById(\"userFullNameError\").style.display = \"none\";\n }\n}", "title": "" }, { "docid": "ee4542281853fa600c63c6114583e65a", "score": "0.6841116", "text": "validateName() {\n let value = typeof this.name.value === 'string'\n ? this.name.value.trim()\n : this.name.value;\n let error = null;\n\n if (!isEmpty(value)) {\n if (value.length >= this.name.min) {\n if (value.length <= this.name.max) {\n this.name.isOk();\n return true;\n } else {\n error = `Debe tener máximo ${this.name.max} caracteres.`;\n }\n } else {\n error = `Debe tener minimo ${this.name.min} caracteres.`\n }\n } else {\n error = 'Este campo es obligatorio.'\n }\n\n this.name.setError(error);\n return false;\n }", "title": "" }, { "docid": "878192b9dcdf777422184a0d2e3623b0", "score": "0.68396544", "text": "function checkUsername() {\n let string = this.value\n let regex = / /\n}", "title": "" }, { "docid": "8fd561dbfa4a8da138204e0ffb2d2332", "score": "0.68378437", "text": "function validateBlankName(value){\n\nif(!trim(value) || trim(value).length<=0 )\n\t\t\t return true;\n\nreturn false;\n}", "title": "" }, { "docid": "5819064f454c189c5516dd2794f4da13", "score": "0.6833339", "text": "function userFirstNameCheck() {\n if (userFirstName.value.trim().length < 2 || userFirstName.value.trim() === \"\" || !userFirstName.value.match(regexName)) {\n userFirstName.parentElement.setAttribute('data-error-visible', 'true');\n userFirstName.style.border = \"2px solid #e54858\";\n return false;\n }\n userFirstName.parentElement.setAttribute('data-error-visible', false);\n userFirstName.style.border = \"2px solid #279e7a\";\n return true;\n}", "title": "" }, { "docid": "178954cb8b5aaab6bea7a21536241fee", "score": "0.68213433", "text": "function validateName() {\n let nameText = $.trim($('#name').val());\n let validName = nameText !== '';\n\n // Make the field red if name is invalid\n $('#name-form-group').toggleClass('has-error', !validName);\n\n // Display the cross and hide the okay icons based on the validity of the current input\n $('#name-form-group .form-control-feedback').toggleClass('glyphicon-ok', validName)\n $('#name-form-group .form-control-feedback').toggleClass('glyphicon-remove', !validName)\n \n // If the field's not valid, tell the user why via a tooltip, otherwise hide it\n if(!validName) {\n nameField.tooltip(getTooltipObject('You must enter a name')).tooltip('show');\n } else {\n nameField.tooltip('destroy');\n }\n\n // Return the validity of the name field.\n return validName;\n }", "title": "" }, { "docid": "17c4a7fe3b095a46889bb571e52937ce", "score": "0.68046093", "text": "getUserName(value) {\n var status = content.falseValue;\n this.state.nameValue=value;\n if (!_.isEmpty(value)) {\n userDetails[fieldTypes.FULLNAME] = value;\n status = content.trueValue;\n } else {\n status = content.falseValue;\n }\n this.setState({\n isValidName: status\n });\n }", "title": "" }, { "docid": "bbea547e80501caceea8f650b38932f5", "score": "0.67924714", "text": "function check_username() {\r\n\t\t\r\n\t\tvar pattern = new RegExp(/^[a-zA-Zñ\\s]+$/);\r\n\t\r\n\t\tif(pattern.test($(\"#nombreUsuario\").val())) {\r\n\t\t\t\t$(\"#errornombreUsuario\").hide();\r\n\t\t\t} else {\r\n\t\t\t\t$(\"#errornombreUsuario\").html(\"el nombre solo debe tener letras\");\r\n\t\t\t\t$(\"#errornombreUsuario\").show();\r\n\t\t\t\terror_nombreUsuario = true;\r\n\t\t}\t\r\n\r\n\t}", "title": "" }, { "docid": "4e5da39f06576e80712b469fabefd9ed", "score": "0.67848164", "text": "function validateRealname()\n {\n var realNameSel = '.realName';\n var realNameEle = $(realNameSel);\n var realNameEleVal = realNameEle.val();\n if (realNameEleVal.length <=2) {\n showErrorMsg(realNameSel,'please enter full name atleast 2 characters');\n return false;\n }\n else {\n removeErrorMsg(realNameSel);\n return true;\n }\n }", "title": "" }, { "docid": "8f7ef943fdf78337d4b82cb65e55dd16", "score": "0.67841595", "text": "function validateName(){ // //\n // get value from name input // //\n const name = $(\"#name\").val(); // //\n const regexName = /^[A-Za-z]+\\s?([A-Za-z]+)?$/; // //\n if(regexName.test(name)){ // //\n return true; // //\n } else{ // //\n return false; // //\n } // //\n} // //", "title": "" }, { "docid": "a9d491e589010a7c7c1a82a143d8fac0", "score": "0.6771502", "text": "function usernameVerify() {\n if (username.value !== '' || username.value.length > 3 || username.value.length < 15 || username.value.match(letters)) {\n username.style.border = '1px solid #5e6e66';\n username_div.style.color = '#5e6e66';\n username_error.innerHTML = '';\n var passName = username.value.charAt(0).toUpperCase() + username.value.slice(1);\n username.value = passName;\n return true;\n }\n}", "title": "" }, { "docid": "d55a3dff9ba2796ad7def8756460286a", "score": "0.67673445", "text": "function companyNameValidation(){\n if(/^[a-zA-Z ]+$/.test(companyName.value)&&companyName.value.trim()!=0){return valid;}\n else{\n companyName.className=\"invalidate-Input\";\n companyName.nextElementSibling.innerHTML=\"Please fill valid company name\";\n valid=false;\n } //if\n }", "title": "" }, { "docid": "b21c2c4985be507250f5ddb391960969", "score": "0.6764907", "text": "validateName(name)\n {\n if(name !== ''){\n return true;\n } else{\n alert(\"Invalid Name\");\n return false;\n }\n }", "title": "" }, { "docid": "f40e78a4c6dfad4ca0701bcd198f49f7", "score": "0.6764011", "text": "function nameValidator() {\n /** The name validator below test for first and last names and will allow for a middle inital\n * or name */\n //const nameIsValid = /^[a-zA-Z]{3,40}(?:\\s[A-Z])?\\s[a-zA-Z]{2,40}$/mg.test(nameInput.value);\n /**This validator just tests if the name is there's an entry. The rubrick doesn't require \n * anything more complex.\n */\n const nameIsValid = /^[a-zA-Z]{3,40}/mg.test(nameInput.value);\n return nameIsValid;\n}", "title": "" }, { "docid": "1d234975cf78704e70327fd5fc2dfea3", "score": "0.67632645", "text": "function validateName(id) {\n const nameMessage = $(\".name-message\");\n if (\n /^[a-zA-Z ]{2,30}$/.test(\n $(id)\n .val()\n .trim()\n )\n ) {\n $(id).removeClass(\"is-invalid\");\n $(id).addClass(\"is-valid\");\n return true;\n } else if ($(id).val() === \"\") {\n nameMessage.text(\"Your name is required.\");\n return false;\n } else {\n $(id).addClass(\"is-invalid\");\n nameMessage.text(\"This is not a valid name.\");\n return false;\n }\n }", "title": "" }, { "docid": "0b21f1ff54addc1122c548bd21bf95c7", "score": "0.675811", "text": "verifyStudentName () {\n if (!_.isNil(this.model.student.name) && !_.isEmpty(this.model.student.name)) {\n this.e1 = 2;\n this.courseAutoFocus = true;\n } else {\n this.isStudentError = true;\n this.errorMessages.searchStudentErrorMessage = 'Name is required!'\n }\n }", "title": "" }, { "docid": "77075c38a1a0b2080bbfc549be19609d", "score": "0.6756983", "text": "function validateNameField(name, event) {\n if (!isValidName(name)) {\n $(\"#name-feedback\").text(\"Please enter at least two characters\");\n event.preventDefault();\n } else {\n $(\"#name-feedback\").text(\"\");\n }\n }", "title": "" }, { "docid": "546fd28da99ae33d0feb9205fb2d9b9f", "score": "0.6756627", "text": "function nameValidator () {\n const nameInput = nameElement.value;\n const nameIsValid = /^[a-zA-Z]+ ?[a-zA-Z]*? ?[a-zA-Z]*?$/.test(nameInput);\n return nameIsValid;\n}", "title": "" }, { "docid": "bddf660bb5e6148c3855a02b94190536", "score": "0.6746356", "text": "function validateName(){\n\n if ($('#username').val() ===''){\n showErrorUserName();\n return false;\n }\n else if ($('#username').val().length<=3){\n showErrorUserNameTwo();\n return false;\n }\n else{\n\n $('.modal.ErrorUserName').fadeOut(200, function(){$(this).remove()});\n $('.modal.ErrorUserNameTwo').fadeOut(600, function(){$(this).remove()}); \n return true;\n };\n }", "title": "" }, { "docid": "4db5bfd0004e8409661937f11e4cb9fd", "score": "0.6744451", "text": "function checkName() {\n let nameField = $('#name');//calls class name\n let nameRegex = /^[a-zA-Z]+$/;\n //let nameError = false;\n var name = nameField.val();// gets the value of the name\n $('#nameError').remove();\n if (name == '' || !nameRegex.test(name)) {\n nameError = true;\n nameField.after('<p id=\"nameError\" class=\"error\">Please provide a name</p>');//created an error message \n\n }\n }", "title": "" }, { "docid": "0164371bc9db982dbd8de557cd3200f2", "score": "0.6742092", "text": "function testNames(fName, lName){\n let messageArea = $(\"#messageArea\");\n let isValid = true;\n // checking if the first name and last name are less than 2 characters\n if(fName.length < 2 || lName.length < 2){\n // setting isValid to false because if statement was met\n isValid = false;\n // Displaying an alert message\n messageArea.show().addClass(\"alert alert-danger\").text(\"Please enter valid First and Last names ie.Must be greater than a character long\");\n \n }\n return isValid;\n }", "title": "" }, { "docid": "0819b48e2f3336745a52ad908c35451c", "score": "0.6735431", "text": "function validate_name() {\n var val = $(\"#name\").val();\n if (val == '') {\n $(\"#nameError\").html(\"<b>Name is Required.<b>\");\n $(\"#nameError\").css(\"color\", \"red\");\n $(\"#nameError\").show();\n\n nameError = false;\n } else {\n $(\"#nameError\").hide();\n nameError = true;\n }\n }", "title": "" }, { "docid": "7a6c2b46d619e912399fd9f51978ba05", "score": "0.6729273", "text": "function validateHamsterName () {\n\tvar name = document.getElementById('hamsterName').value;\n\tif (name != null && name.trim() !== '') {\n\t\treturn name;\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "ece6bae692d464c079ba986ae168b548", "score": "0.67264783", "text": "function fnameValidate() {\n if (fname.value.trim() != \"\") {\n fname_err.classList.add(\"hide-me\");\n if (/^[A-Za-z ]+$/.test(fname.value)) {\n fname_err.classList.add(\"hide-me\");\n if (fname.value.trim().length <= 15) {\n fname_err.classList.add(\"hide-me\");\n return true;\n } else {\n fname_err.innerHTML = \"The first name can be 15 character max\";\n fname_err.classList.remove(\"hide-me\");\n return false;\n }\n } else {\n fname_err.innerHTML = \"The first name must include alphabetical character only\";\n fname_err.classList.remove(\"hide-me\");\n return false;\n }\n } else {\n if (fname.value == \"\") {\n fname_err.innerHTML = \"The first name field is required\";\n fname_err.classList.remove(\"hide-me\");\n return false;\n } else {\n fname_err.innerHTML = \"The first name can't be blank space\";\n fname_err.classList.remove(\"hide-me\");\n return false;\n }\n }\n}", "title": "" }, { "docid": "6736bf87a24129219cabf784fdb266c7", "score": "0.67201304", "text": "function lastNameValidation() {\n if(/^[a-zA-Z ]+$/.test(lastName.value)&&lastName.value.trim()!=0){return valid;}\n else{\n lastName.className=\"invalidate-Input\";\n lastName.nextElementSibling.innerHTML=\"Please fill valid last name\";\n valid=false; } //if\n } //lastNameValidation", "title": "" }, { "docid": "155c9c4dc917666aa3a535517f16d7bb", "score": "0.671903", "text": "function testUserName( firstname ) {\n\n\tif ( ! firstname ) {\n\n\t\tthrow(\n\t\t\tappError({\n\t\t\t\ttype: \"App.InvalidArgument\",\n\t\t\t\tmessage: \"First name must be a non-zero length.\",\n\t\t\t\terrorCode: \"User.name.short\"\n\t\t\t})\n\t\t);\n\n\t}\n}", "title": "" }, { "docid": "c768920d6576e0479df6e5cd7e438b3a", "score": "0.6718683", "text": "function ValidateName() {\r\n var userName = document.getElementById(\"txtName\").value;\r\n var regex = /^[a-zA-Z]+(([',. -][a-zA-Z ])?[a-zA-Z]*)*$/;\r\n var name = regex.test(userName);\r\n if (name) {\r\n document.getElementById(\"ValidName\").style.display = \"none\";\r\n isNameVAlid = true;\r\n }\r\n else {\r\n document.getElementById(\"ValidName\").style.display = \"block\"\r\n isNameVAlid = false;\r\n }\r\n}", "title": "" }, { "docid": "f85326de0efcaa42ca30994c60564d94", "score": "0.6716375", "text": "function nameValidation(event) {\n //first : HTML5 verifications : value is not \"\" and more than 2 characters\n if (event.target.validity.valueMissing) {\n notifyError(event.target, messageTable.required);\n } else {\n if (event.target.validity.tooShort) {\n notifyError(event.target, messageTable.name);\n } else {\n //value is ok for HTML5, now more advanced JS verification to avoid special characters and numbers\n let regex = /^[^@&\"()\\[\\]\\{\\}<>_$*%§¤€£`+=\\/\\\\|~'\"°;:!,?#0-9]+$/;\n if (!regex.test(event.target.value)) {\n notifyError(event.target, messageTable.noSpecial);\n } else {\n notifyError(event.target, \"\");\n }\n }\n }\n}", "title": "" }, { "docid": "20faef8a7732f9be2a6e0b94c23e98cd", "score": "0.6712361", "text": "function lastnameSignUpValidation(lastname)\n{\n\t\n\tif(/[^a-zA-ZšđžčćŠĐŽČĆ]/gi.test(lastname) || lastname.length==0)\n\t{\n\t\tvar $signUpLastname = $('#signUpLastname');\n\t\t$signUpLastname.css({\"background-color\": \"#ff9db3\"});\n\n\t\t$signUpLastname.attr(\"placeholder\", \"Lastname can only contain letters including šđžčćŠĐŽČĆ. \");\n\t\t$('#signUpLastname').val(\"\");\n\t\treturn false;\n\t}\n\t\n\treturn true;\n}", "title": "" }, { "docid": "2ec554ae35c6cf7280c660b5051c3983", "score": "0.6699766", "text": "function lname_verify(){\n if(lname.value != '' && lname.value.match(nameRegex)){\n lname.style.border = '1px solid green';\n lastNameError('');\n return true;\n }\n else{\n lname.style.border = '2px solid red';\n lastNameError('Name should be letters only,atleast 2 characters \\n and atmost 50 characters');\n return false;\n }\n}", "title": "" }, { "docid": "ed41a4c529a0d8a5fc8859b1bb2f7b5c", "score": "0.6695306", "text": "function validateLastName(el) {\r\n if (!el.val().match(/^[a-zA-Z\\'\\-\\ ]+$/)) {\r\n } else {\r\n removeAlert(el, 'err-invalidAccntNo');\r\n }\r\n }", "title": "" }, { "docid": "570c2664b05384d5c5e9d0973b93dfcb", "score": "0.66942215", "text": "function validateUser(req, res, next) {\n const userData = req.body;\n\n if (!userData.name) {\n res.status(400).json({ errorMessage: \"Please provide a name for the user.\" })\n } else {\n next();\n }\n}", "title": "" }, { "docid": "6d3acadc02de485921962e0db2874b32", "score": "0.66925913", "text": "function theUserName(){ \n\n //Grab the value they put in for their username \n var getUserName = document.getElementById(\"signup\").username.value; \n\n // check to see if username has more than one character \n //make sure username is enough characters and matches what I set is required \n if (getUserName.length > 5){\n return true; \n } else {\n //alert if username isn't enough characters and return false\n alert(\"Please create a username that has more than five characters\"); \n return false; \n }\n }", "title": "" }, { "docid": "7d50ae6b7c8dbabf5469b06d3cbfd203", "score": "0.66914713", "text": "function validateUserForm(){\n var name= $('#name').val();\n\n if(name.trim() == '' || name.toLowerCase()== 'null' || !isNaN(parseInt(name,10)) ){\n alert(\"Вы ввели недопустимое имя пользователя! \" + name\n + \"\\nВведите правильное имя и повторите попытку! \");\n return false;\n }\n //return true;\n}", "title": "" }, { "docid": "6a21d0ddcb0d1dd14469f71895f32852", "score": "0.66870296", "text": "function validateNameInputs() {\n\n\tconst firstnameValue = firstname.value.trim(); // Making new const and trimming any spaces\n\tconst lastnameValue = lastname.value.trim(); // Making new const and trimming any spaces\n\n if(!nameRegex.test(firstnameValue)){ // Using regex to check first name is valid\n setErrorFor(firstname, 'Invalid First Name(Check Capital Letters)') // Setting error message if above is false\n\t\tvalidFirstName = false; // Making sure name isn't valid.\n } else {\n setSuccessFor(firstname) // Setting success if above is true\n\t\tvalidFirstName = true // Setting the first name to valid\n }\n\n if(!nameRegex.test(lastnameValue)){ // Checking Name is valid to regex.\n setErrorFor(lastname, 'Invalid Last Name(Check Capital Letters)') // Sending error message if name isn't valid.\n\t\tvalidLastName = false; // Making sure name isn't valid if returns false.\n } else {\n setSuccessFor(lastname) // Setting success if name is valid\n\t\tvalidLastName = true; // Setting the last name to valid\n }\n}", "title": "" }, { "docid": "93e2ee79326fc6118facabc69e2f85d6", "score": "0.6682288", "text": "function validateLastName(field){\r\n\t\tvar error = \"\";\r\n\t\tif( typeof(field !== \"undefined\")){\r\n\t\t\tif(field.length == 0){\r\n\t\t\t\terror = \"Please Enter Last Name \\n\";\r\n\t\t\t\t$(\".error_secondName\").html(error);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn error;\r\n\t}", "title": "" }, { "docid": "d2e83d4d04367133ddba47f830ff4486", "score": "0.6672383", "text": "LastName(obj){\n if ($('#last_name').val() === \"\" ) {\n vm.error_message('#last_name', 'last Name Case is Empty');\n }else{\n let first_name = $('#last_name').val().search(/^[a-zA-Z]+$/);\n if (first_name == -1) {\n vm.error_message('#last_name', 'Incorrect last Name Format');\n }else{\n vm.remove_error_message('#last_name');\n }\n }\n}", "title": "" }, { "docid": "9812fb5e0994b838106570eaf9d87192", "score": "0.6665904", "text": "function checkName(name,field)\n{\n\tif (name.value == '')\n\t{\n\t\tO(field).innerHTML= ''\n\t\treturn\n\t}\n\telse if (/[^a-zA-Z-'\" \"]/.test(name.value))\n\t\tO(field).innerHTML= \"<span class='unacceptable'>&nbsp;&#x2718; Names cannot include non-alphabetic characters.</span>\"\n\telse O(field).innerHTML= \"<span class= 'acceptable'>&nbsp;&#x2714; </span> \"\n}", "title": "" }, { "docid": "8f5d1c72106db7d2607631e43f1a700e", "score": "0.6665459", "text": "function validateFirstName() {\r\n\tif (document.signupForm.nameInput.value == \"\") {\r\n\t\tdocument.getElementById('nameError').style.display = 'block';\r\n\t\tdocument.getElementById('nameError').innerHTML = \"Please Enter valid Name \";\r\n\t} else if (document.signupForm.nameInput.value != \"\") {\r\n\t\tvar firtNamePattern = /^[a-zA-Z]*$/;\r\n\t\tif (document.signupForm.nameInput.value.match(firtNamePattern)) {\r\n\t\t\tdocument.getElementById('nameError').style.display = 'none';\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\r\n\t\t\tdocument.getElementById('nameError').style.display = 'block';\r\n\t\t\tdocument.getElementById('nameError').innerHTML = \"Please Enter only alphabets \";\r\n\t\t}\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "e7641e5d2552cb6f6c67738d22686759", "score": "0.6662446", "text": "function checkUsername(addHelper) {\n\tvar x = document.getElementById(\"username\");\n\tif ((x.value.length >= 4) && (regex_username.test(x.value))) {\n\t\tdelErr(x);\n\t\treturn true;\n\t}\n\telse {\n\t\tif (!addHelper)\n\t\t\tshowErr(x, ERR_USERNAME);\n\t\telse\n\t\t\tshowErr(x, ERR_USERNAME + ERR_HELPER);\n\t\t\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "e18501009e84c59c796fa486bd52a73b", "score": "0.6662353", "text": "function fname() {\n let a = document.getElementById('fname').value.trim();\n\n if (a.length === 0) {\n document.querySelector(\"#errfn\").insertAdjacentHTML(\"afterbegin\",\"<p>Please enter your first name properly!</p>\");\n return false;\n }\n else if (a.length < 3) {\n document.querySelector(\"#errfn\").insertAdjacentHTML(\"afterbegin\",\"<p>you can't have a first name with less than 3 charecters!</p>\");\n return false;\n }\n else if (a.length > 15) {\n document.querySelector(\"#errfn\").insertAdjacentHTML(\"afterbegin\",\"<p>you can't have a first name with grater than 15 charecters!</p>\");\n return false;\n }\n else {\n return true;\n }\n }", "title": "" }, { "docid": "cdd329a4a30f18316106d378c9cbb10d", "score": "0.6660453", "text": "function validate(form) {\r\n\t\r\n\tvar user_name = document.getElementById(\"use_id\").value;\r\n\tif (user_name == \"\" || user_name ==null){\r\n\t\twindow.alert(\"No username entered.\");//display the error message\r\n\t\treturn false;\r\n\t}\r\n}", "title": "" }, { "docid": "c17669d326ca56bfec3188384676bbb7", "score": "0.6659411", "text": "function checkUsername() {\n\tvar usernameRegex = new RegExp(\"^[A-Za-z0-9]+$\");\n\tvar username = $(\"#username\");\n\tif (username.val().length < 8) {\n\t\t$(\"#user_error\").html(\"Username length min 8 letter\");\n\t\treturn false;\n\t}\n\tif (usernameRegex.test(username.value)) {\n\t\t$(\"#user_error\").empty();\n\t\treturn true;\n\t}\n\t$(\"#user_error\").html(\"Invalid Username\");\n\treturn false;\n}", "title": "" }, { "docid": "33d6008b78e75d6e6560b999a85bd230", "score": "0.665741", "text": "function createUser() {\r\n const givenName = document.getElementById('username').value;\r\n if (givenName == \"\" || givenName.length == 0 || givenName == null) {\r\n alert(\"No name given. Try again\");\r\n document.getElementById('dropDownMenu').style.display = 'none';\r\n }\r\n else if(givenName.indexOf(';')>=1 || givenName.indexOf('}')>=1 || givenName.indexOf('{')>=1 || givenName.indexOf('<')>=1) {\r\n alert('Epäkelpo nimi. Yritä uudelleen');\r\n } else {\r\n alert(givenName);\r\n postUser(givenName);\r\n }\r\n document.getElementById('loginInfo').style.display = 'none';\r\n}", "title": "" }, { "docid": "a3d4718a9f1411e3f02ba4721ef47ebe", "score": "0.6650602", "text": "function validate_name(name){\n if (name.length<3){return 'Length needs to be at least 3 characters'}; // validating length\n if (name.length>10){return 'Length needs to be no more than 10 characters'}; // validating length\n if (/^[a-zA-Z]*$/.test(name)===false){return 'Only alphanumeric (upper/lowercase) allowed'}; // no number/special chars allowed \n return true;\n}", "title": "" }, { "docid": "025265d97c9001f8d1eacaea67321297", "score": "0.6642974", "text": "function setUsername() {\n var requestedUsername = cleanInput($usernameInput.val().trim());\n\n // If the username is valid\n if (requestedUsername) {\n // Check that the username contains no spaces\n if (requestedUsername.indexOf(' ') === -1) {\n // Tell the server your username\n socket.emit('validate username', requestedUsername);\n } else {\n // The username contained a space, which is not allowed\n $loginMsg.text(\"Your username cannot contain any spaces. Please try another!\");\n $currentInput.val('');\n $currentInput.focus();\n }\n }\n }", "title": "" }, { "docid": "81fde1b50747abb4f06220fc36396631", "score": "0.66377115", "text": "function validateName(isvalid, className,errorDiv) {\n var name = document.forms[\"signup\"][className].value;\n var fieldName = className.replace(\"_\", \" \");\n\n var err = \"\";\n \n if (name.charAt(0) < \"A\" || name.charAt(0) > \"Z\") {\n err = \"* first character of \" + fieldName + \" must be uppercase *\";\n }\n // check all character are letters\n else if(name.match(/([^A-z])/g)){\n err = \"* please enter alphabets only *\";\n }\n document.getElementById(errorDiv).innerHTML = err;\n if (err.length > 0 || !isvalid) {\n return false;\n }\n else {\n return true;\n }\n}", "title": "" }, { "docid": "e9dac680f129a5e970a2b4c24ea3901e", "score": "0.66372985", "text": "function adminname(str)\n{\n\tvar error=\"\";\t\n\tif(str==\"\")\n\t{\t\n\t\tvar error=\"Enter User Name\";\t\t\n\t\tdocument.getElementById(\"admin_name_err\").innerHTML=error;\n\t}\telse {\n\t\terror=\"\";\n\t\tdocument.getElementById(\"admin_name_err\").innerHTML=\"\"; }\nreturn error;\n }", "title": "" }, { "docid": "9d84221b8e5e8a13648b2093ecd95c46", "score": "0.6627847", "text": "function fname_verify(){\n if(fname.value != '' && fname.value.match(nameRegex)){\n fname.style.border = '1px solid green';\n firstNameError('');\n return true;\n }\n else{\n fname.style.border = '2px solid red';\n firstNameError('Name should be letters only,atleast 2 characters \\n and atmost 50 characters');\n return false;\n }\n}", "title": "" }, { "docid": "326ca48debd010e371ca7d69d48b2806", "score": "0.662702", "text": "function nameValidator() {\n const nameValue = name.value;\n const nameIsValid = /^[a-zA-Z]+ ?[a-zA-Z]*? ?[a-zA-Z]*?$/.test(nameValue);\n validator(nameIsValid, name);\n return nameIsValid;\n}", "title": "" }, { "docid": "08bc86796645310e9ef0777cb7f65f71", "score": "0.6622605", "text": "function validateUserInfo(){\n\tif ( UserNameRegex( $(\"input[name=firstName]\").val() ) && UserNameRegex( $(\"input[name=lastName]\").val() ) )\n\t\treturn true;\n\treturn false;\n\n}", "title": "" }, { "docid": "9520994c444c3b30466b3f8581bf602e", "score": "0.66190326", "text": "function validateName(text) {\n if ((text.length != 0) && (nameFormat.test(text))) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "b6a99a4514bc661274dbba2cc427ea9d", "score": "0.6616797", "text": "static validate (data, callback) {\n if (Validator.isAlphanumeric(data.username)) {\n if (Validator.isEmail(data.mail)) {\n callback(null, data)\n } else {\n callback({ errors : 'Email contained invalid characters'})\n }\n } else {\n callback({ errors : 'Username contained invalid characters'})\n }\n }", "title": "" }, { "docid": "a7f6aa6d8e3d3957f5b61a6ea3a4eb9d", "score": "0.66155666", "text": "function check_fruit_botanical_name() \n\t\t{ \n\t\t\tvar boname_length = $(\"#update_fruit_botanical_name\").val().length;\n\n\t\t\tif(boname_length == \"\" || boname_length == null)\n\t\t\t\t{\n\t\t\t\t\t$(\"#update_fruit_botanical_name_error_message\").html(\"Please fill in data into the field\"); \n\t\t\t\t\t$(\"#update_fruit_botanical_name_error_message\").show(); \n\t\t\t\t\terror_fruit_botanical_name = true;\n\t\t\t\t}\n\t\t\t\n\t\t\telse if(boname_length <2 || boname_length > 40) {\n\t\t\t\t$(\"#update_fruit_botanical_name_error_message\").html(\"Should be between 2-40 characters\");\n\t\t\t\t$(\"#update_fruit_botanical_name_error_message\").show(); \n\t\t\t\terror_fruit_botanical_name = true;\n\t\t\t}\n\t\t\t\n\t\t\telse \n\t\t\t{\n\t\t\t\t$(\"#update_fruit_botanical_name_error_message\").hide();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "025df34075032b03292c35379f3cc2be", "score": "0.66113687", "text": "function checkName(val,formKey,f) {\n val = val.trim()\n var name = FORMS[formKey].fields[f].name.EN\n toggleError(formKey+'-'+f,val && val.length>=2 ? '' : 'Error: enter a valid '+name+'.')\n return val\n}", "title": "" }, { "docid": "23c7604cd72049aaa26b7408bedc2264", "score": "0.6609862", "text": "function validateUser() {\n \tvar username = $(\"#inputUser\").val();//get value at input username\n \tvar error = $(\"#erroruser\");\n \tif (username.length < 8) {\n \t\terror.html(\"Username lenght min 8 letter\");\n \t\treturn false;\n \t}\n \tif (username.length > 50) {\n \t\terror.html(\"Username lenght max 50 letter\");\n \t\treturn false;\n \t}\n \tif (isSpecialCharacterRegExp(username)) {\n \t\terror.html(\"Password contains `~!#$%^&*()+=[{]}'<,>?/\\\";:\");\n \t\treturn false;\n \t}\n \terror.html(\"Checked\");\n \treturn true;\n }", "title": "" } ]
c50e57a2e1717cef2bf6c29deb0cf23a
I will refactor imports into lazy imports after Unit 2 is done with building out their forms tdubs
[ { "docid": "f9d2417584f83d67a142277009b7500c", "score": "0.0", "text": "function App() {\n return (\n <Router>\n <Suspense fallback={<h2>Loading...</h2>}>\n {/* Unit 2 - Your code goes here :) */}\n <Switch>\n {/* Unit 2 - Your code goes here :) */}\n </Switch>\n </Suspense>\n </Router>\n );\n}", "title": "" } ]
[ { "docid": "be11f03fa21c26574a24ed0760c0f711", "score": "0.5640754", "text": "function formUtils() {\n\n let formio = new Formio('https://examples.form.io/example');\n formio.loadForm().then((form) => {\n let component = FuGetComponent(form.components, 'survey');\n console.log('survey:', component);\n });\n\n return (\n <h2>test 3 - getComponent - FormioUtils</h2>\n );\n}", "title": "" }, { "docid": "9aa46f39fd0200d726ee903c982a1471", "score": "0.5552023", "text": "$onInit() {\n this.ui = {\n hasType: true,\n loading: true,\n editType: true,\n submitting: false,\n require: {\n guestMembers: true,\n awardNumber: true,\n associatedProjects: true,\n referencedData: true,\n nhEvents: false,\n coPis: false,\n teamMembers: false,\n },\n requireWorks: true,\n invalidUserError: false,\n invalidUser: ''\n };\n this.project = this.resolve.project;\n this.FormDefaults = FormDefaults;\n\n if (this.project) {\n let projectCopy = structuredClone(this.project.value);\n this.naturalHazardTypes = FormOptions.nhTypes;\n this.fieldResearchTypes = FormOptions.frTypes;\n this.otherTypes = FormOptions.otherTypes;\n this.relatedWorkTypes = (projectCopy.projectType != 'other' ? FormOptions.rwTypes : FormOptions.rwTypesOther);\n\n if (projectCopy.projectType in this.FormDefaults) {\n this.form = structuredClone(this.FormDefaults[projectCopy.projectType]);\n } else {\n this.form = structuredClone(this.FormDefaults.new);\n this.ui.hasType = false;\n }\n for (let key in this.form) {\n if (projectCopy[key] instanceof Array && projectCopy[key].length){\n this.form[key] = projectCopy[key];\n } else if (projectCopy[key] instanceof Object && Object.keys(projectCopy[key]).length){\n this.form[key] = projectCopy[key];\n } else if (['nhEventStart', 'nhEventEnd'].includes(key)) {\n this.form[key] = (projectCopy[key] ? new Date(projectCopy[key]) : null);\n } else if (typeof projectCopy[key] === 'string' && projectCopy[key]) {\n this.form[key] = projectCopy[key];\n }\n }\n if (Date.parse(this.form.nhEventStart) == Date.parse(this.form.nhEventEnd)) {\n this.form.nhEventEnd = null;\n }\n this.form.uuid = this.project.uuid;\n\n const usernames = new Set([\n ...[projectCopy.pi],\n ...projectCopy.coPis,\n ...projectCopy.teamMembers\n ]);\n const promisesToResolve = {\n proj_users: this.UserService.getPublic([...usernames]),\n creator: this.UserService.authenticate()\n };\n this.PublicationService.getPublished(projectCopy.projectId)\n .then((_) => { this.ui.editType = false; });\n this.$q.all(promisesToResolve).then(({proj_users, creator}) => {\n this.form.creator = creator\n this.form.pi = proj_users.userData.find(user => user.username == projectCopy.pi);\n let copis = proj_users.userData.filter(user => projectCopy.coPis.includes(user.username));\n let team = proj_users.userData.filter(user => projectCopy.teamMembers.includes(user.username));\n if (copis.length) {\n this.form.coPis = copis;\n this.ui.require.coPis = true;\n };\n if (team.length) {\n this.form.teamMembers = team;\n this.ui.require.teamMembers = true;\n };\n if (this.form.projectType in this.FormDefaults) {\n this.ui.require.guestMembers = this.requireField(this.form.guestMembers);\n this.ui.require.awardNumber = this.requireField(this.form.awardNumber);\n this.ui.require.nhEvents = this.requireEvent();\n if (this.form.projectType === 'other') {\n this.ui.require.associatedProjects = this.requireField(this.form.associatedProjects);\n this.ui.require.referencedData = this.requireField(this.form.referencedData);\n }\n }\n this.ui.loading = false;\n });\n } else {\n this.UserService.authenticate().then((creator) => {\n this.form = structuredClone(this.FormDefaults.new);\n this.form.creator = creator\n this.ui.loading = false;\n });\n }\n }", "title": "" }, { "docid": "5917027bd429874df8ad7b7330e092fd", "score": "0.5534497", "text": "setup() {\n // Handle events for the name form\n const testForm = document.getElementById('testForm');\n const nameTF = document.getElementById('nameTF');\n const numIterTF = document.getElementById('numIterTF');\n const delayTF = document.getElementById('delayTF');\n if (testForm) {\n const events = fromEvent(testForm, 'submit');\n events.subscribe((event) => {\n event.preventDefault();\n const name = nameTF.value;\n const iterations = Number(numIterTF.value);\n const delay = Number(delayTF.value);\n const test = new LoadTest(name,\n iterations,\n delay,\n this.collectorURL,\n this.buildId);\n const observable = test.runTest();\n TestSummary.display(name, iterations, observable);\n return false;\n });\n }\n }", "title": "" }, { "docid": "b69894a75a1c0e78955fc0187b0695e9", "score": "0.54851073", "text": "static async buildAll() {\n // get all available organisations from db connection string environment variables\n const organisations = Object.keys(process.env)\n .filter(env => env.slice(0, 3)=='DB_' && env!='DB_USERS')\n .map(db => db.slice(3).toLowerCase().replace(/_/g, '-'));\n\n // look for form specifications held in the database\n for (const org of organisations) {\n const formSpecs = await FormSpecification.getAll(org);\n // we may have spec divided into many pages, so use a set to get unique list of projects\n const projects = new Set(formSpecs.map(spec => spec.project));\n // build all projects for this organisation\n for (const project of projects) {\n try {\n await FormGenerator.build(org, project);\n console.info(`Form db:${org}/${project} built`);\n } catch (e) {\n const msg = e instanceof ReferenceError ? 'Specification not found' : e.message;\n console.error(`ERR building form spec ${org}/${project}:`, msg);\n }\n }\n }\n\n // look for form specifications held in the local filesystem, noting that '-test' org's\n // use the canonical organisation name for the form specs\n const canonicalOrgs = new Set(organisations.map(org => org.replace(/-test$/, '')));\n for (const org of canonicalOrgs) {\n for (const submitLists of await glob(`public/spec/${org}/submit-list.json`)) {\n const projects = JSON.parse(await fs.readFile(submitLists, 'utf8'));\n for (const project in projects) {\n try {\n await FormGenerator.build(org, project);\n console.info(`Form fs:${org}/${project} built`);\n } catch (e) {\n const msg = e instanceof ReferenceError ? 'Specification not found' : e.message;\n console.error(`ERR building form spec ${org}/${project}:`, msg);\n }\n }\n }\n }\n\n allBuilt = true;\n }", "title": "" }, { "docid": "49d181c4d9540e5a922ae01d08823c79", "score": "0.54148006", "text": "get form() {\r\n return this.internals_.form;\r\n }", "title": "" }, { "docid": "af8c2bb971b927cc72220b11d690fdc3", "score": "0.5296801", "text": "function buildForm() {\n //this.rawJson.innerHTML = JSON.stringify(payload, null, 2)\n jsonForm.create(\"#Form1\", JSON.parse(JSON.stringify(payload, null, 2)), \"Form1\")\n //jsonForm.createForm(\"Form1\", \"Form1\", payload, handleData)\n }", "title": "" }, { "docid": "99ca6265ad17a5fce7035c234466abf0", "score": "0.52940965", "text": "function genCustom(form) {\n var original = form.txt1_1.value;\n var mod1 = form.txt1_2.value;\n var mod2 = form.txt2_2.value;\n var mod = form.txt3_2.value;\n\n form.txt_out.value += form.genUnitTest(original, mod1, mod2, mod) + \"\\n\";\n}", "title": "" }, { "docid": "8af8320a6496304c9f4e9318532755ef", "score": "0.52597296", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr['input'] = function (props) {\n for (var i = 0, len = props.length; i < len; i++) {\n attrs[props[i]] = !!(props[i] in inputElem);\n }\n\n if (attrs.list) {\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n }\n\n return attrs;\n }('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n /*>>input*/\n\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n\n\n Modernizr['inputtypes'] = function (props) {\n for (var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++) {\n inputElem.setAttribute('type', inputElemType = props[i]);\n bool = inputElem.type !== 'text'; // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n\n if (bool) {\n inputElem.value = smile;\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n if (/^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined) {\n docElement.appendChild(inputElem);\n defaultView = document.defaultView; // Safari 2-4 allows the smiley as a value, despite making a slider\n\n bool = defaultView.getComputedStyle && defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' && // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n inputElem.offsetHeight !== 0;\n docElement.removeChild(inputElem);\n } else if (/^(search|tel)$/.test(inputElemType)) {// Spec doesn't define any special parsing or detectable UI\n // behaviors so we pass these through as true\n // Interestingly, opera fails the earlier test, so it doesn't\n // even make it here.\n } else if (/^(url|email)$/.test(inputElemType)) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n\n inputs[props[i]] = !!bool;\n }\n\n return inputs;\n }('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n /*>>inputtypes*/\n\n }", "title": "" }, { "docid": "3a8550d05b61b7eaf427893fe6e57323", "score": "0.525475", "text": "function webforms() {\n\t /*>>input*/\n\t // Run through HTML5's new input attributes to see if the UA understands any.\n\t // We're using f which is the <input> element created early on\n\t // Mike Taylr has created a comprehensive resource for testing these attributes\n\t // when applied to all input types:\n\t // miketaylr.com/code/input-type-attr.html\n\t // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n\n\t // Only input placeholder is tested while textarea's placeholder is not.\n\t // Currently Safari 4 and Opera 11 have support only for the input placeholder\n\t // Both tests are available in feature-detects/forms-placeholder.js\n\t Modernizr['input'] = (function( props ) {\n\t for ( var i = 0, len = props.length; i < len; i++ ) {\n\t attrs[ props[i] ] = !!(props[i] in inputElem);\n\t }\n\t if (attrs.list){\n\t // safari false positive's on datalist: webk.it/74252\n\t // see also github.com/Modernizr/Modernizr/issues/146\n\t attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n\t }\n\t return attrs;\n\t })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n\t /*>>input*/\n\n\t /*>>inputtypes*/\n\t // Run through HTML5's new input types to see if the UA understands any.\n\t // This is put behind the tests runloop because it doesn't return a\n\t // true/false like all the other tests; instead, it returns an object\n\t // containing each input type with its corresponding true/false value\n\n\t // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n\t Modernizr['inputtypes'] = (function(props) {\n\n\t for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\n\n\t inputElem.setAttribute('type', inputElemType = props[i]);\n\t bool = inputElem.type !== 'text';\n\n\t // We first check to see if the type we give it sticks..\n\t // If the type does, we feed it a textual value, which shouldn't be valid.\n\t // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n\t if ( bool ) {\n\n\t inputElem.value = smile;\n\t inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n\t if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\n\n\t docElement.appendChild(inputElem);\n\t defaultView = document.defaultView;\n\n\t // Safari 2-4 allows the smiley as a value, despite making a slider\n\t bool = defaultView.getComputedStyle &&\n\t defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n\t // Mobile android web browser has false positive, so must\n\t // check the height to see if the widget is actually there.\n\t (inputElem.offsetHeight !== 0);\n\n\t docElement.removeChild(inputElem);\n\n\t } else if ( /^(search|tel)$/.test(inputElemType) ){\n\t // Spec doesn't define any special parsing or detectable UI\n\t // behaviors so we pass these through as true\n\n\t // Interestingly, opera fails the earlier test, so it doesn't\n\t // even make it here.\n\n\t } else if ( /^(url|email)$/.test(inputElemType) ) {\n\t // Real url and email support comes with prebaked validation.\n\t bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n\t } else {\n\t // If the upgraded input compontent rejects the :) text, we got a winner\n\t bool = inputElem.value != smile;\n\t }\n\t }\n\n\t inputs[ props[i] ] = !!bool;\n\t }\n\t return inputs;\n\t })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n\t /*>>inputtypes*/\n\t }", "title": "" }, { "docid": "a87c2de009a0ac993ea9e2874b6a0f2d", "score": "0.5247726", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr['input'] = (function( props ) {\n for ( var i = 0, len = props.length; i < len; i++ ) {\n attrs[ props[i] ] = !!(props[i] in inputElem);\n }\n if (attrs.list){\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n }\n return attrs;\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n /*>>input*/\n\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n Modernizr['inputtypes'] = (function(props) {\n\n for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\n\n inputElem.setAttribute('type', inputElemType = props[i]);\n bool = inputElem.type !== 'text';\n\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if ( bool ) {\n\n inputElem.value = smile;\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\n\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle &&\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n (inputElem.offsetHeight !== 0);\n\n docElement.removeChild(inputElem);\n\n } else if ( /^(search|tel)$/.test(inputElemType) ){\n // Spec doesn't define any special parsing or detectable UI\n // behaviors so we pass these through as true\n\n // Interestingly, opera fails the earlier test, so it doesn't\n // even make it here.\n\n } else if ( /^(url|email)$/.test(inputElemType) ) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n\n inputs[ props[i] ] = !!bool;\n }\n return inputs;\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n /*>>inputtypes*/\n }", "title": "" }, { "docid": "a87c2de009a0ac993ea9e2874b6a0f2d", "score": "0.5247726", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr['input'] = (function( props ) {\n for ( var i = 0, len = props.length; i < len; i++ ) {\n attrs[ props[i] ] = !!(props[i] in inputElem);\n }\n if (attrs.list){\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n }\n return attrs;\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n /*>>input*/\n\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n Modernizr['inputtypes'] = (function(props) {\n\n for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\n\n inputElem.setAttribute('type', inputElemType = props[i]);\n bool = inputElem.type !== 'text';\n\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if ( bool ) {\n\n inputElem.value = smile;\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\n\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle &&\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n (inputElem.offsetHeight !== 0);\n\n docElement.removeChild(inputElem);\n\n } else if ( /^(search|tel)$/.test(inputElemType) ){\n // Spec doesn't define any special parsing or detectable UI\n // behaviors so we pass these through as true\n\n // Interestingly, opera fails the earlier test, so it doesn't\n // even make it here.\n\n } else if ( /^(url|email)$/.test(inputElemType) ) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n\n inputs[ props[i] ] = !!bool;\n }\n return inputs;\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n /*>>inputtypes*/\n }", "title": "" }, { "docid": "a87c2de009a0ac993ea9e2874b6a0f2d", "score": "0.5247726", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr['input'] = (function( props ) {\n for ( var i = 0, len = props.length; i < len; i++ ) {\n attrs[ props[i] ] = !!(props[i] in inputElem);\n }\n if (attrs.list){\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n }\n return attrs;\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n /*>>input*/\n\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n Modernizr['inputtypes'] = (function(props) {\n\n for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\n\n inputElem.setAttribute('type', inputElemType = props[i]);\n bool = inputElem.type !== 'text';\n\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if ( bool ) {\n\n inputElem.value = smile;\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\n\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle &&\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n (inputElem.offsetHeight !== 0);\n\n docElement.removeChild(inputElem);\n\n } else if ( /^(search|tel)$/.test(inputElemType) ){\n // Spec doesn't define any special parsing or detectable UI\n // behaviors so we pass these through as true\n\n // Interestingly, opera fails the earlier test, so it doesn't\n // even make it here.\n\n } else if ( /^(url|email)$/.test(inputElemType) ) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n\n inputs[ props[i] ] = !!bool;\n }\n return inputs;\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n /*>>inputtypes*/\n }", "title": "" }, { "docid": "a87c2de009a0ac993ea9e2874b6a0f2d", "score": "0.5247726", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr['input'] = (function( props ) {\n for ( var i = 0, len = props.length; i < len; i++ ) {\n attrs[ props[i] ] = !!(props[i] in inputElem);\n }\n if (attrs.list){\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n }\n return attrs;\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n /*>>input*/\n\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n Modernizr['inputtypes'] = (function(props) {\n\n for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\n\n inputElem.setAttribute('type', inputElemType = props[i]);\n bool = inputElem.type !== 'text';\n\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if ( bool ) {\n\n inputElem.value = smile;\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\n\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle &&\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n (inputElem.offsetHeight !== 0);\n\n docElement.removeChild(inputElem);\n\n } else if ( /^(search|tel)$/.test(inputElemType) ){\n // Spec doesn't define any special parsing or detectable UI\n // behaviors so we pass these through as true\n\n // Interestingly, opera fails the earlier test, so it doesn't\n // even make it here.\n\n } else if ( /^(url|email)$/.test(inputElemType) ) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n\n inputs[ props[i] ] = !!bool;\n }\n return inputs;\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n /*>>inputtypes*/\n }", "title": "" }, { "docid": "a87c2de009a0ac993ea9e2874b6a0f2d", "score": "0.5247726", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr['input'] = (function( props ) {\n for ( var i = 0, len = props.length; i < len; i++ ) {\n attrs[ props[i] ] = !!(props[i] in inputElem);\n }\n if (attrs.list){\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n }\n return attrs;\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n /*>>input*/\n\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n Modernizr['inputtypes'] = (function(props) {\n\n for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\n\n inputElem.setAttribute('type', inputElemType = props[i]);\n bool = inputElem.type !== 'text';\n\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if ( bool ) {\n\n inputElem.value = smile;\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\n\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle &&\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n (inputElem.offsetHeight !== 0);\n\n docElement.removeChild(inputElem);\n\n } else if ( /^(search|tel)$/.test(inputElemType) ){\n // Spec doesn't define any special parsing or detectable UI\n // behaviors so we pass these through as true\n\n // Interestingly, opera fails the earlier test, so it doesn't\n // even make it here.\n\n } else if ( /^(url|email)$/.test(inputElemType) ) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n\n inputs[ props[i] ] = !!bool;\n }\n return inputs;\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n /*>>inputtypes*/\n }", "title": "" }, { "docid": "a87c2de009a0ac993ea9e2874b6a0f2d", "score": "0.5247726", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr['input'] = (function( props ) {\n for ( var i = 0, len = props.length; i < len; i++ ) {\n attrs[ props[i] ] = !!(props[i] in inputElem);\n }\n if (attrs.list){\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n }\n return attrs;\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n /*>>input*/\n\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n Modernizr['inputtypes'] = (function(props) {\n\n for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\n\n inputElem.setAttribute('type', inputElemType = props[i]);\n bool = inputElem.type !== 'text';\n\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if ( bool ) {\n\n inputElem.value = smile;\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\n\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle &&\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n (inputElem.offsetHeight !== 0);\n\n docElement.removeChild(inputElem);\n\n } else if ( /^(search|tel)$/.test(inputElemType) ){\n // Spec doesn't define any special parsing or detectable UI\n // behaviors so we pass these through as true\n\n // Interestingly, opera fails the earlier test, so it doesn't\n // even make it here.\n\n } else if ( /^(url|email)$/.test(inputElemType) ) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n\n inputs[ props[i] ] = !!bool;\n }\n return inputs;\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n /*>>inputtypes*/\n }", "title": "" }, { "docid": "a87c2de009a0ac993ea9e2874b6a0f2d", "score": "0.5247726", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr['input'] = (function( props ) {\n for ( var i = 0, len = props.length; i < len; i++ ) {\n attrs[ props[i] ] = !!(props[i] in inputElem);\n }\n if (attrs.list){\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n }\n return attrs;\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n /*>>input*/\n\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n Modernizr['inputtypes'] = (function(props) {\n\n for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\n\n inputElem.setAttribute('type', inputElemType = props[i]);\n bool = inputElem.type !== 'text';\n\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if ( bool ) {\n\n inputElem.value = smile;\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\n\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle &&\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n (inputElem.offsetHeight !== 0);\n\n docElement.removeChild(inputElem);\n\n } else if ( /^(search|tel)$/.test(inputElemType) ){\n // Spec doesn't define any special parsing or detectable UI\n // behaviors so we pass these through as true\n\n // Interestingly, opera fails the earlier test, so it doesn't\n // even make it here.\n\n } else if ( /^(url|email)$/.test(inputElemType) ) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n\n inputs[ props[i] ] = !!bool;\n }\n return inputs;\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n /*>>inputtypes*/\n }", "title": "" }, { "docid": "a87c2de009a0ac993ea9e2874b6a0f2d", "score": "0.5247726", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr['input'] = (function( props ) {\n for ( var i = 0, len = props.length; i < len; i++ ) {\n attrs[ props[i] ] = !!(props[i] in inputElem);\n }\n if (attrs.list){\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n }\n return attrs;\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n /*>>input*/\n\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n Modernizr['inputtypes'] = (function(props) {\n\n for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\n\n inputElem.setAttribute('type', inputElemType = props[i]);\n bool = inputElem.type !== 'text';\n\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if ( bool ) {\n\n inputElem.value = smile;\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\n\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle &&\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n (inputElem.offsetHeight !== 0);\n\n docElement.removeChild(inputElem);\n\n } else if ( /^(search|tel)$/.test(inputElemType) ){\n // Spec doesn't define any special parsing or detectable UI\n // behaviors so we pass these through as true\n\n // Interestingly, opera fails the earlier test, so it doesn't\n // even make it here.\n\n } else if ( /^(url|email)$/.test(inputElemType) ) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n\n inputs[ props[i] ] = !!bool;\n }\n return inputs;\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n /*>>inputtypes*/\n }", "title": "" }, { "docid": "a87c2de009a0ac993ea9e2874b6a0f2d", "score": "0.5247726", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr['input'] = (function( props ) {\n for ( var i = 0, len = props.length; i < len; i++ ) {\n attrs[ props[i] ] = !!(props[i] in inputElem);\n }\n if (attrs.list){\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n }\n return attrs;\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n /*>>input*/\n\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n Modernizr['inputtypes'] = (function(props) {\n\n for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\n\n inputElem.setAttribute('type', inputElemType = props[i]);\n bool = inputElem.type !== 'text';\n\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if ( bool ) {\n\n inputElem.value = smile;\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\n\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle &&\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n (inputElem.offsetHeight !== 0);\n\n docElement.removeChild(inputElem);\n\n } else if ( /^(search|tel)$/.test(inputElemType) ){\n // Spec doesn't define any special parsing or detectable UI\n // behaviors so we pass these through as true\n\n // Interestingly, opera fails the earlier test, so it doesn't\n // even make it here.\n\n } else if ( /^(url|email)$/.test(inputElemType) ) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n\n inputs[ props[i] ] = !!bool;\n }\n return inputs;\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n /*>>inputtypes*/\n }", "title": "" }, { "docid": "a87c2de009a0ac993ea9e2874b6a0f2d", "score": "0.5247726", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr['input'] = (function( props ) {\n for ( var i = 0, len = props.length; i < len; i++ ) {\n attrs[ props[i] ] = !!(props[i] in inputElem);\n }\n if (attrs.list){\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n }\n return attrs;\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n /*>>input*/\n\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n Modernizr['inputtypes'] = (function(props) {\n\n for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\n\n inputElem.setAttribute('type', inputElemType = props[i]);\n bool = inputElem.type !== 'text';\n\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if ( bool ) {\n\n inputElem.value = smile;\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\n\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle &&\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n (inputElem.offsetHeight !== 0);\n\n docElement.removeChild(inputElem);\n\n } else if ( /^(search|tel)$/.test(inputElemType) ){\n // Spec doesn't define any special parsing or detectable UI\n // behaviors so we pass these through as true\n\n // Interestingly, opera fails the earlier test, so it doesn't\n // even make it here.\n\n } else if ( /^(url|email)$/.test(inputElemType) ) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n\n inputs[ props[i] ] = !!bool;\n }\n return inputs;\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n /*>>inputtypes*/\n }", "title": "" }, { "docid": "a87c2de009a0ac993ea9e2874b6a0f2d", "score": "0.5247726", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr['input'] = (function( props ) {\n for ( var i = 0, len = props.length; i < len; i++ ) {\n attrs[ props[i] ] = !!(props[i] in inputElem);\n }\n if (attrs.list){\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n }\n return attrs;\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n /*>>input*/\n\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n Modernizr['inputtypes'] = (function(props) {\n\n for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\n\n inputElem.setAttribute('type', inputElemType = props[i]);\n bool = inputElem.type !== 'text';\n\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if ( bool ) {\n\n inputElem.value = smile;\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\n\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle &&\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n (inputElem.offsetHeight !== 0);\n\n docElement.removeChild(inputElem);\n\n } else if ( /^(search|tel)$/.test(inputElemType) ){\n // Spec doesn't define any special parsing or detectable UI\n // behaviors so we pass these through as true\n\n // Interestingly, opera fails the earlier test, so it doesn't\n // even make it here.\n\n } else if ( /^(url|email)$/.test(inputElemType) ) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n\n inputs[ props[i] ] = !!bool;\n }\n return inputs;\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n /*>>inputtypes*/\n }", "title": "" }, { "docid": "a87c2de009a0ac993ea9e2874b6a0f2d", "score": "0.5247726", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr['input'] = (function( props ) {\n for ( var i = 0, len = props.length; i < len; i++ ) {\n attrs[ props[i] ] = !!(props[i] in inputElem);\n }\n if (attrs.list){\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n }\n return attrs;\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n /*>>input*/\n\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n Modernizr['inputtypes'] = (function(props) {\n\n for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\n\n inputElem.setAttribute('type', inputElemType = props[i]);\n bool = inputElem.type !== 'text';\n\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if ( bool ) {\n\n inputElem.value = smile;\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\n\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle &&\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n (inputElem.offsetHeight !== 0);\n\n docElement.removeChild(inputElem);\n\n } else if ( /^(search|tel)$/.test(inputElemType) ){\n // Spec doesn't define any special parsing or detectable UI\n // behaviors so we pass these through as true\n\n // Interestingly, opera fails the earlier test, so it doesn't\n // even make it here.\n\n } else if ( /^(url|email)$/.test(inputElemType) ) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n\n inputs[ props[i] ] = !!bool;\n }\n return inputs;\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n /*>>inputtypes*/\n }", "title": "" }, { "docid": "a87c2de009a0ac993ea9e2874b6a0f2d", "score": "0.5247726", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr['input'] = (function( props ) {\n for ( var i = 0, len = props.length; i < len; i++ ) {\n attrs[ props[i] ] = !!(props[i] in inputElem);\n }\n if (attrs.list){\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n }\n return attrs;\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n /*>>input*/\n\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n Modernizr['inputtypes'] = (function(props) {\n\n for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\n\n inputElem.setAttribute('type', inputElemType = props[i]);\n bool = inputElem.type !== 'text';\n\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if ( bool ) {\n\n inputElem.value = smile;\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\n\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle &&\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n (inputElem.offsetHeight !== 0);\n\n docElement.removeChild(inputElem);\n\n } else if ( /^(search|tel)$/.test(inputElemType) ){\n // Spec doesn't define any special parsing or detectable UI\n // behaviors so we pass these through as true\n\n // Interestingly, opera fails the earlier test, so it doesn't\n // even make it here.\n\n } else if ( /^(url|email)$/.test(inputElemType) ) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n\n inputs[ props[i] ] = !!bool;\n }\n return inputs;\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n /*>>inputtypes*/\n }", "title": "" }, { "docid": "a87c2de009a0ac993ea9e2874b6a0f2d", "score": "0.5247726", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr['input'] = (function( props ) {\n for ( var i = 0, len = props.length; i < len; i++ ) {\n attrs[ props[i] ] = !!(props[i] in inputElem);\n }\n if (attrs.list){\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n }\n return attrs;\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n /*>>input*/\n\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n Modernizr['inputtypes'] = (function(props) {\n\n for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\n\n inputElem.setAttribute('type', inputElemType = props[i]);\n bool = inputElem.type !== 'text';\n\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if ( bool ) {\n\n inputElem.value = smile;\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\n\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle &&\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n (inputElem.offsetHeight !== 0);\n\n docElement.removeChild(inputElem);\n\n } else if ( /^(search|tel)$/.test(inputElemType) ){\n // Spec doesn't define any special parsing or detectable UI\n // behaviors so we pass these through as true\n\n // Interestingly, opera fails the earlier test, so it doesn't\n // even make it here.\n\n } else if ( /^(url|email)$/.test(inputElemType) ) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n\n inputs[ props[i] ] = !!bool;\n }\n return inputs;\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n /*>>inputtypes*/\n }", "title": "" }, { "docid": "a87c2de009a0ac993ea9e2874b6a0f2d", "score": "0.5247726", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr['input'] = (function( props ) {\n for ( var i = 0, len = props.length; i < len; i++ ) {\n attrs[ props[i] ] = !!(props[i] in inputElem);\n }\n if (attrs.list){\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n }\n return attrs;\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n /*>>input*/\n\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n Modernizr['inputtypes'] = (function(props) {\n\n for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\n\n inputElem.setAttribute('type', inputElemType = props[i]);\n bool = inputElem.type !== 'text';\n\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if ( bool ) {\n\n inputElem.value = smile;\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\n\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle &&\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n (inputElem.offsetHeight !== 0);\n\n docElement.removeChild(inputElem);\n\n } else if ( /^(search|tel)$/.test(inputElemType) ){\n // Spec doesn't define any special parsing or detectable UI\n // behaviors so we pass these through as true\n\n // Interestingly, opera fails the earlier test, so it doesn't\n // even make it here.\n\n } else if ( /^(url|email)$/.test(inputElemType) ) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n\n inputs[ props[i] ] = !!bool;\n }\n return inputs;\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n /*>>inputtypes*/\n }", "title": "" }, { "docid": "a87c2de009a0ac993ea9e2874b6a0f2d", "score": "0.5247726", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr['input'] = (function( props ) {\n for ( var i = 0, len = props.length; i < len; i++ ) {\n attrs[ props[i] ] = !!(props[i] in inputElem);\n }\n if (attrs.list){\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n }\n return attrs;\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n /*>>input*/\n\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n Modernizr['inputtypes'] = (function(props) {\n\n for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\n\n inputElem.setAttribute('type', inputElemType = props[i]);\n bool = inputElem.type !== 'text';\n\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if ( bool ) {\n\n inputElem.value = smile;\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\n\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle &&\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n (inputElem.offsetHeight !== 0);\n\n docElement.removeChild(inputElem);\n\n } else if ( /^(search|tel)$/.test(inputElemType) ){\n // Spec doesn't define any special parsing or detectable UI\n // behaviors so we pass these through as true\n\n // Interestingly, opera fails the earlier test, so it doesn't\n // even make it here.\n\n } else if ( /^(url|email)$/.test(inputElemType) ) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n\n inputs[ props[i] ] = !!bool;\n }\n return inputs;\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n /*>>inputtypes*/\n }", "title": "" }, { "docid": "a87c2de009a0ac993ea9e2874b6a0f2d", "score": "0.5247726", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr['input'] = (function( props ) {\n for ( var i = 0, len = props.length; i < len; i++ ) {\n attrs[ props[i] ] = !!(props[i] in inputElem);\n }\n if (attrs.list){\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n }\n return attrs;\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n /*>>input*/\n\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n Modernizr['inputtypes'] = (function(props) {\n\n for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\n\n inputElem.setAttribute('type', inputElemType = props[i]);\n bool = inputElem.type !== 'text';\n\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if ( bool ) {\n\n inputElem.value = smile;\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\n\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle &&\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n (inputElem.offsetHeight !== 0);\n\n docElement.removeChild(inputElem);\n\n } else if ( /^(search|tel)$/.test(inputElemType) ){\n // Spec doesn't define any special parsing or detectable UI\n // behaviors so we pass these through as true\n\n // Interestingly, opera fails the earlier test, so it doesn't\n // even make it here.\n\n } else if ( /^(url|email)$/.test(inputElemType) ) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n\n inputs[ props[i] ] = !!bool;\n }\n return inputs;\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n /*>>inputtypes*/\n }", "title": "" }, { "docid": "a87c2de009a0ac993ea9e2874b6a0f2d", "score": "0.5247726", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr['input'] = (function( props ) {\n for ( var i = 0, len = props.length; i < len; i++ ) {\n attrs[ props[i] ] = !!(props[i] in inputElem);\n }\n if (attrs.list){\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n }\n return attrs;\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n /*>>input*/\n\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n Modernizr['inputtypes'] = (function(props) {\n\n for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\n\n inputElem.setAttribute('type', inputElemType = props[i]);\n bool = inputElem.type !== 'text';\n\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if ( bool ) {\n\n inputElem.value = smile;\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\n\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle &&\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n (inputElem.offsetHeight !== 0);\n\n docElement.removeChild(inputElem);\n\n } else if ( /^(search|tel)$/.test(inputElemType) ){\n // Spec doesn't define any special parsing or detectable UI\n // behaviors so we pass these through as true\n\n // Interestingly, opera fails the earlier test, so it doesn't\n // even make it here.\n\n } else if ( /^(url|email)$/.test(inputElemType) ) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n\n inputs[ props[i] ] = !!bool;\n }\n return inputs;\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n /*>>inputtypes*/\n }", "title": "" }, { "docid": "a87c2de009a0ac993ea9e2874b6a0f2d", "score": "0.5247726", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr['input'] = (function( props ) {\n for ( var i = 0, len = props.length; i < len; i++ ) {\n attrs[ props[i] ] = !!(props[i] in inputElem);\n }\n if (attrs.list){\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n }\n return attrs;\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n /*>>input*/\n\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n Modernizr['inputtypes'] = (function(props) {\n\n for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\n\n inputElem.setAttribute('type', inputElemType = props[i]);\n bool = inputElem.type !== 'text';\n\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if ( bool ) {\n\n inputElem.value = smile;\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\n\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle &&\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n (inputElem.offsetHeight !== 0);\n\n docElement.removeChild(inputElem);\n\n } else if ( /^(search|tel)$/.test(inputElemType) ){\n // Spec doesn't define any special parsing or detectable UI\n // behaviors so we pass these through as true\n\n // Interestingly, opera fails the earlier test, so it doesn't\n // even make it here.\n\n } else if ( /^(url|email)$/.test(inputElemType) ) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n\n inputs[ props[i] ] = !!bool;\n }\n return inputs;\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n /*>>inputtypes*/\n }", "title": "" }, { "docid": "a87c2de009a0ac993ea9e2874b6a0f2d", "score": "0.5247726", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr['input'] = (function( props ) {\n for ( var i = 0, len = props.length; i < len; i++ ) {\n attrs[ props[i] ] = !!(props[i] in inputElem);\n }\n if (attrs.list){\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n }\n return attrs;\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n /*>>input*/\n\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n Modernizr['inputtypes'] = (function(props) {\n\n for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\n\n inputElem.setAttribute('type', inputElemType = props[i]);\n bool = inputElem.type !== 'text';\n\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if ( bool ) {\n\n inputElem.value = smile;\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\n\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle &&\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n (inputElem.offsetHeight !== 0);\n\n docElement.removeChild(inputElem);\n\n } else if ( /^(search|tel)$/.test(inputElemType) ){\n // Spec doesn't define any special parsing or detectable UI\n // behaviors so we pass these through as true\n\n // Interestingly, opera fails the earlier test, so it doesn't\n // even make it here.\n\n } else if ( /^(url|email)$/.test(inputElemType) ) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n\n inputs[ props[i] ] = !!bool;\n }\n return inputs;\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n /*>>inputtypes*/\n }", "title": "" }, { "docid": "a87c2de009a0ac993ea9e2874b6a0f2d", "score": "0.5247726", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr['input'] = (function( props ) {\n for ( var i = 0, len = props.length; i < len; i++ ) {\n attrs[ props[i] ] = !!(props[i] in inputElem);\n }\n if (attrs.list){\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n }\n return attrs;\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n /*>>input*/\n\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n Modernizr['inputtypes'] = (function(props) {\n\n for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\n\n inputElem.setAttribute('type', inputElemType = props[i]);\n bool = inputElem.type !== 'text';\n\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if ( bool ) {\n\n inputElem.value = smile;\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\n\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle &&\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n (inputElem.offsetHeight !== 0);\n\n docElement.removeChild(inputElem);\n\n } else if ( /^(search|tel)$/.test(inputElemType) ){\n // Spec doesn't define any special parsing or detectable UI\n // behaviors so we pass these through as true\n\n // Interestingly, opera fails the earlier test, so it doesn't\n // even make it here.\n\n } else if ( /^(url|email)$/.test(inputElemType) ) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n\n inputs[ props[i] ] = !!bool;\n }\n return inputs;\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n /*>>inputtypes*/\n }", "title": "" }, { "docid": "2308f5f8fb77b468d8556fab4d566759", "score": "0.52250636", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr['input'] = (function(props) {\n for (var i = 0, len = props.length; i < len; i++) {\n attrs[props[i]] = !!(props[i] in inputElem);\n }\n if (attrs.list) {\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\n }\n return attrs;\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n /*>>input*/\n\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n Modernizr['inputtypes'] = (function(props) {\n\n for (var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++) {\n\n inputElem.setAttribute('type', inputElemType = props[i]);\n bool = inputElem.type !== 'text';\n\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if (bool) {\n\n inputElem.value = smile;\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n if (/^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined) {\n\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle &&\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n (inputElem.offsetHeight !== 0);\n\n docElement.removeChild(inputElem);\n\n } else if (/^(search|tel)$/.test(inputElemType)) {\n // Spec doesn't define any special parsing or detectable UI\n // behaviors so we pass these through as true\n\n // Interestingly, opera fails the earlier test, so it doesn't\n // even make it here.\n\n } else if (/^(url|email)$/.test(inputElemType)) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n\n inputs[props[i]] = !!bool;\n }\n return inputs;\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n /*>>inputtypes*/\n }", "title": "" }, { "docid": "a03f6c30a3fc4d7b054d158a0ec20b0e", "score": "0.5224419", "text": "function runAllForms(){$.fn.slider&&$(\".slider\").slider(),$.fn.select2&&$(\"select.select2\").each(function(){var a=$(this),b=a.attr(\"data-select-width\")||\"100%\";a.select2({\"allowClear\":!0,\"width\":b}),a=null}),$.fn.mask&&$(\"[data-mask]\").each(function(){var a=$(this),b=a.attr(\"data-mask\")||\"error...\",c=a.attr(\"data-mask-placeholder\")||\"X\";a.mask(b,{\"placeholder\":c}),a=null}),$.fn.autocomplete&&$(\"[data-autocomplete]\").each(function(){var a=$(this),b=a.data(\"autocomplete\")||[\"The\",\"Quick\",\"Brown\",\"Fox\",\"Jumps\",\"Over\",\"Three\",\"Lazy\",\"Dogs\"];a.autocomplete({\"source\":b}),a=null}),$.fn.datepicker&&$(\".datepicker\").each(function(){var a=$(this),b=a.attr(\"data-dateformat\")||\"dd.mm.yy\";a.datepicker({\"dateFormat\":b,\"prevText\":'<i class=\"fa fa-chevron-left\"></i>',\"nextText\":'<i class=\"fa fa-chevron-right\"></i>'}),a=null}),$(\"button[data-loading-text]\").on(\"click\",function(){var a=$(this);a.button(\"loading\"),setTimeout(function(){a.button(\"reset\"),a=null},3e3)})}", "title": "" }, { "docid": "87955d91584fe9de51aa9b9b987ae5ba", "score": "0.5222689", "text": "function initForm() {\n\n // bind UI events and load schema select box\n\n var orientation = ('portrait' === template.orientation) ? Y.doccirrus.i18n('FormEditorMojit.generic.LBL_PORTRAIT') : Y.doccirrus.i18n('FormEditorMojit.generic.LBL_LANDSCAPE');\n\n formLang = template.userLang;\n\n // load reduced schema into select box\n jq.divSelFormSchema.html(Y.dcforms.reducedschema.renderSelectBoxSync('selectSchema', 'selSelectSchema'));\n\n jq.selSelectSchema = $('#selSelectSchema');\n jq.selSelectSchema.val(template.reducedSchema);\n jq.selSelectSchema.addClass('form-control');\n\n // set user language in this form to match page/template\n jq.selFormLang\n .val(formLang)\n .off('change.form')\n .on('change.form', onLangChanged);\n\n // set form template\n jq.txtFormName\n .val(template.name[formLang])\n .off('change.form')\n .on('change.form', onFormChanged);\n\n jq.txtFormShortName\n .val(template.shortName)\n .off('change.form')\n .on('change.form', onFormChanged);\n\n // set form grid size\n jq.txtFormGrid.val(template.gridSize);\n\n // boolean form properties\n jq.chkSubform.prop('checked', template.isSubform);\n jq.chkFixed.prop('checked', template.isFixed);\n jq.chkReadOnly.prop('checked', template.isReadOnly);\n jq.chkBFB.prop('checked', template.isBFB);\n updateInSight2();\n jq.chkInSight2.off( 'click' ).on( 'click', onClickInSight2 );\n jq.chkUseReporting.prop('checked', template.useReporting);\n jq.chkIsPdfAttached.prop('checked', template.isPdfAttached);\n jq.chkIsLetter.prop('checked', template.isLetter);\n jq.chkUtf8.prop('checked', template.utf8);\n\n jq.spanPaperSize.html(template.paper.width + 'x' + template.paper.height + ' mm ' + orientation);\n\n jq.btnUpdateFormProperties.off('click.forms').on('click.forms', function onUpdateClicked(){\n onFormChanged();\n });\n\n jq.btnCopyForm.off('click.forms').on('click.forms', copyForm);\n jq.btnDeleteForm.off('click.forms').on('click.forms', deleteForm);\n jq.btnBumpVersion.off('click.forms').on('click.forms', bumpVersion);\n jq.btnResizePaper.off('click.forms').on('click.forms', onResizePaper);\n\n jq.chkBFB.off('change.forms').on('change.forms', onBFBStateChange);\n jq.chkBFB.off('click.forms').on('click.forms', onBFBStateChange);\n\n jq.chkUseReporting.off('change.forms').on('change.forms', onUseReportingChange);\n jq.chkUseReporting.off('click.forms').on('click.forms', onUseReportingChange);\n\n jq.chkIsPdfAttached.off('change.forms').on('click.forms', onIsPdfAttachedChange);\n jq.chkIsPdfAttached.off('click.forms').on('click.forms', onIsPdfAttachedChange);\n\n jq.chkIsLetter.off('change.forms').on('click.forms', onIsLetterChange);\n jq.chkIsLetter.off('click.forms').on('click.forms', onIsLetterChange);\n\n jq.chkUtf8.off('change.forms').on('click.forms', onUtf8Change);\n jq.chkUtf8.off('click.forms').on('click.forms', onUtf8Change);\n\n addFormRoles();\n addActivityTypes();\n\n jq.selActType.off('change.forms').on('change.forms', onActTypeChange);\n\n if ('casefile-prescription' === template.defaultFor) {\n template.defaultFor = 'casefile-prescription-kbv';\n }\n\n jq.selDefaultFor.val(template.defaultFor);\n\n jq.txtFormFile.val(template.templateFile);\n\n // add listeners for form events which affect this panel\n\n Y.dcforms.event.on('formLangChanged', NAME, onFormLangChanged);\n\n template.on( 'schemaSet', NAME, onReducedSchemaChanged );\n\n setDevMode();\n }", "title": "" }, { "docid": "fff46902269839dd005c0fe3ad52e60c", "score": "0.5210944", "text": "function runAllForms(){$.fn.slider&&$(\".slider\").slider(),$.fn.select2&&$(\".select2\").each(function(){var a=$(this),b=a.attr(\"data-select-width\")||\"100%\";a.select2({allowClear:!0,width:b}),a=null}),$.fn.mask&&$(\"[data-mask]\").each(function(){var a=$(this),b=a.attr(\"data-mask\")||\"error...\",c=a.attr(\"data-mask-placeholder\")||\"X\";a.mask(b,{placeholder:c}),a=null}),$.fn.autocomplete&&$(\"[data-autocomplete]\").each(function(){var a=$(this),b=a.data(\"autocomplete\")||[\"The\",\"Quick\",\"Brown\",\"Fox\",\"Jumps\",\"Over\",\"Three\",\"Lazy\",\"Dogs\"];a.autocomplete({source:b}),a=null}),$.fn.datepicker&&$(\".datepicker\").each(function(){var a=$(this),b=a.attr(\"data-dateformat\")||\"dd.mm.yy\";a.datepicker({dateFormat:b,prevText:'<i class=\"fa fa-chevron-left\"></i>',nextText:'<i class=\"fa fa-chevron-right\"></i>'}),a=null}),$(\"button[data-loading-text]\").on(\"click\",function(){var a=$(this);a.button(\"loading\"),setTimeout(function(){a.button(\"reset\")},3e3),a=null})}", "title": "" }, { "docid": "9bbcc8fd7a1228488580f232da9864d6", "score": "0.5203426", "text": "static async ajaxFormSpec(ctx) {\n const db = ctx.state.user.db;\n\n try {\n const formSpec = await FormSpecification.get(db, ctx.params.id);\n ctx.response.status = 200; // Ok\n ctx.response.body = { spec: formSpec };\n } catch (e) {\n ctx.response.status = 500; // Internal Server Error\n ctx.response.body = e;\n await Log.error(ctx, e);\n }\n }", "title": "" }, { "docid": "1d69eccaef7e07c362e93a6007ea476d", "score": "0.51830155", "text": "function initForm(formKey) {\n var a = []\n var form = FORMS[formKey]\n var fields = form.fields\n var complex = !form.simple\n if (form.descr) getElem(''+formKey+'-descr').innerHTML = multiLang(form.descr)\n a.push('<table class=\"add\">')\n a.push('<tr>')\n if (complex) {\n var nameHtml = '<span class=\"EN\">'+form.item.EN+'</span><span class=\"NL\">'+form.item.NL+'</span>'\n a.push('<td rowspan=\"'+(2*count(fields)+2)+'\" style=\"padding-right:2ex\"><div class=\"id\">'+nameHtml+'<br><select id=\"'+formKey+'-id\" onchange=\"selectItem(getValue(this),\\''+formKey+'\\')\"><option selected value=\"0\">0</option></select></div></td>')\n }\n a.push('<td colspan=\"4\"><div id=\"'+formKey+'-form-error\" class=\"error\"/></td></tr>')\n for (var k in fields) {\n var f = fields[k]\n a.push('<tr><td colspan=\"4\"><div id=\"'+formKey+'-'+k+'-error\" class=\"error\"/></td></tr>')\n a.push('<tr><td class=\"key'+(f.tooltip ? ' tt0' : '')+'\">'+(f.tooltip ? '<span class=\"EN tt1\">'+f.tooltip.EN+'</span><span class=\"NL tt1\">'+f.tooltip.NL+'</span>' : '')+'<span class=\"EN\">'+f.name.EN+'</span><span class=\"NL\">'+f.name.NL+'</span></td><td class=\"price\">'+(f.price ? '&euro; '+f.price.toFixed(2) : '')+'</td><td class=\"colon\">:</td><td class=\"value\">')\n if (f.type == 'text') a.push('<input id=\"'+formKey+'-'+k+'\" type=\"text\" value=\"\"/>')\n if (f.type == 'textarea') a.push('<textarea id=\"'+formKey+'-'+k+'\" rows=\"3\" value=\"\"></textarea>')\n if (f.type == 'date') a.push('<input id=\"'+formKey+'-'+k+'\" type=\"date\" value=\"\"/>')\n if (f.type == 'select') {\n a.push('<select id=\"'+formKey+'-'+k+'\"'+(complex ? 'onchange=\"updateForm(\\''+formKey+'\\')\"' : 'onchange=\"simpleChange(\\''+formKey+'\\',\\''+k+'\\')\"')+'>')\n a.push('</select>')\n }\n if (f.type == 'radio') {\n var options = f.options()\n var first = true\n for (var n in options) {\n var optionName = '<span class=\"EN\">'+options[n].EN+'</span><span class=\"NL\">'+options[n].NL+'</span>'\n a.push('<input '+(first ? 'id=\"'+formKey+'-'+k+'\" ' : '')+' name=\"'+formKey+'-'+k+'\" type=\"radio\" value=\"'+n+'\"/>'+optionName)\n first = false\n }\n }\n a.push('</td></tr>')\n }\n if (complex) {\n a.push('<tr><td colspan=\"4\"><span id=\"'+formKey+'-buttons\">'+formButtons(formKey)+'</span></td></tr>')\n }\n a.push('</table>')\n getElem(formKey+'-form').innerHTML = a.join('') \n updateForm(formKey) // will populate options for select fields\n if (complex) updateItems(formKey)\n else updateValues(formKey)\n}", "title": "" }, { "docid": "8d9ae6c108a307a5be2424bec50f65d9", "score": "0.5182773", "text": "function webforms() {\r\n /*>>input*/\r\n // Run through HTML5's new input attributes to see if the UA understands any.\r\n // We're using f which is the <input> element created early on\r\n // Mike Taylr has created a comprehensive resource for testing these attributes\r\n // when applied to all input types:\r\n // miketaylr.com/code/input-type-attr.html\r\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\r\n\r\n // Only input placeholder is tested while textarea's placeholder is not.\r\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\r\n // Both tests are available in feature-detects/forms-placeholder.js\r\n Modernizr['input'] = (function( props ) {\r\n for ( var i = 0, len = props.length; i < len; i++ ) {\r\n attrs[ props[i] ] = !!(props[i] in inputElem);\r\n }\r\n if (attrs.list){\r\n // safari false positive's on datalist: webk.it/74252\r\n // see also github.com/Modernizr/Modernizr/issues/146\r\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\r\n }\r\n return attrs;\r\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\r\n /*>>input*/\r\n\r\n /*>>inputtypes*/\r\n // Run through HTML5's new input types to see if the UA understands any.\r\n // This is put behind the tests runloop because it doesn't return a\r\n // true/false like all the other tests; instead, it returns an object\r\n // containing each input type with its corresponding true/false value\r\n\r\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\r\n Modernizr['inputtypes'] = (function(props) {\r\n\r\n for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\r\n\r\n inputElem.setAttribute('type', inputElemType = props[i]);\r\n bool = inputElem.type !== 'text';\r\n\r\n // We first check to see if the type we give it sticks..\r\n // If the type does, we feed it a textual value, which shouldn't be valid.\r\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\r\n if ( bool ) {\r\n\r\n inputElem.value = smile;\r\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\r\n\r\n if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\r\n\r\n docElement.appendChild(inputElem);\r\n defaultView = document.defaultView;\r\n\r\n // Safari 2-4 allows the smiley as a value, despite making a slider\r\n bool = defaultView.getComputedStyle &&\r\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\r\n // Mobile android web browser has false positive, so must\r\n // check the height to see if the widget is actually there.\r\n (inputElem.offsetHeight !== 0);\r\n\r\n docElement.removeChild(inputElem);\r\n\r\n } else if ( /^(search|tel)$/.test(inputElemType) ){\r\n // Spec doesn't define any special parsing or detectable UI\r\n // behaviors so we pass these through as true\r\n\r\n // Interestingly, opera fails the earlier test, so it doesn't\r\n // even make it here.\r\n\r\n } else if ( /^(url|email)$/.test(inputElemType) ) {\r\n // Real url and email support comes with prebaked validation.\r\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\r\n\r\n } else {\r\n // If the upgraded input compontent rejects the :) text, we got a winner\r\n bool = inputElem.value != smile;\r\n }\r\n }\r\n\r\n inputs[ props[i] ] = !!bool;\r\n }\r\n return inputs;\r\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\r\n /*>>inputtypes*/\r\n }", "title": "" }, { "docid": "8d9ae6c108a307a5be2424bec50f65d9", "score": "0.5182773", "text": "function webforms() {\r\n /*>>input*/\r\n // Run through HTML5's new input attributes to see if the UA understands any.\r\n // We're using f which is the <input> element created early on\r\n // Mike Taylr has created a comprehensive resource for testing these attributes\r\n // when applied to all input types:\r\n // miketaylr.com/code/input-type-attr.html\r\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\r\n\r\n // Only input placeholder is tested while textarea's placeholder is not.\r\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\r\n // Both tests are available in feature-detects/forms-placeholder.js\r\n Modernizr['input'] = (function( props ) {\r\n for ( var i = 0, len = props.length; i < len; i++ ) {\r\n attrs[ props[i] ] = !!(props[i] in inputElem);\r\n }\r\n if (attrs.list){\r\n // safari false positive's on datalist: webk.it/74252\r\n // see also github.com/Modernizr/Modernizr/issues/146\r\n attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);\r\n }\r\n return attrs;\r\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\r\n /*>>input*/\r\n\r\n /*>>inputtypes*/\r\n // Run through HTML5's new input types to see if the UA understands any.\r\n // This is put behind the tests runloop because it doesn't return a\r\n // true/false like all the other tests; instead, it returns an object\r\n // containing each input type with its corresponding true/false value\r\n\r\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\r\n Modernizr['inputtypes'] = (function(props) {\r\n\r\n for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\r\n\r\n inputElem.setAttribute('type', inputElemType = props[i]);\r\n bool = inputElem.type !== 'text';\r\n\r\n // We first check to see if the type we give it sticks..\r\n // If the type does, we feed it a textual value, which shouldn't be valid.\r\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\r\n if ( bool ) {\r\n\r\n inputElem.value = smile;\r\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\r\n\r\n if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\r\n\r\n docElement.appendChild(inputElem);\r\n defaultView = document.defaultView;\r\n\r\n // Safari 2-4 allows the smiley as a value, despite making a slider\r\n bool = defaultView.getComputedStyle &&\r\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\r\n // Mobile android web browser has false positive, so must\r\n // check the height to see if the widget is actually there.\r\n (inputElem.offsetHeight !== 0);\r\n\r\n docElement.removeChild(inputElem);\r\n\r\n } else if ( /^(search|tel)$/.test(inputElemType) ){\r\n // Spec doesn't define any special parsing or detectable UI\r\n // behaviors so we pass these through as true\r\n\r\n // Interestingly, opera fails the earlier test, so it doesn't\r\n // even make it here.\r\n\r\n } else if ( /^(url|email)$/.test(inputElemType) ) {\r\n // Real url and email support comes with prebaked validation.\r\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\r\n\r\n } else {\r\n // If the upgraded input compontent rejects the :) text, we got a winner\r\n bool = inputElem.value != smile;\r\n }\r\n }\r\n\r\n inputs[ props[i] ] = !!bool;\r\n }\r\n return inputs;\r\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\r\n /*>>inputtypes*/\r\n }", "title": "" }, { "docid": "8cc4c4de31183b781fdfdd3ffb9f4a60", "score": "0.5164726", "text": "function fillUnit(){\n\tvar c=abWasteTrackStorageController;\n\tvar form=c.abWasteTrackStorageWasteStorageForm;\n\tvar form1=c.abWasteTrackStorageWasteTankForm;\n\tvar form2=c.abWasteTrackStorageWasteAccumForm;\n\tvar typeSelect = '';\n\tif(form.visible){\n\t\ttypeSelect=$('unitsType1')\n\t}else if(form1.visible){\n\t\ttypeSelect=$('unitsType')\n\t}else{\n\t\ttypeSelect=$('unitsType2')\n\t}\n\tvar type=typeSelect.value;\n\tvar res=\"bill_unit.bill_type_id='\"+type+\"' \";\n\tvar records=c.abWasteDefMainfestsUnit.getRecords(res);\n\tvar record='';\n\tvar unit='';\n\tif(records!=''){\n\t\trecord =records[0];\n\t\tunit=record.getValue('bill_unit.bill_unit_id');\n\t}\n\t\n\tvar dataRes=\"bill_unit.bill_type_id='\"+type+\"'\";\n\tvar form=c.abWasteTrackStorageWasteStorageForm;\n\t\n\tif(form.visible){\n\t\tif(record==''){\n\t\t\tfillList('abWasteDefMainfestsUnit','units1','bill_unit.bill_unit_id','',dataRes);\n\t\t}else{\n\t\t\tfillList('abWasteDefMainfestsUnit','units1','bill_unit.bill_unit_id',unit,dataRes);\n\t\t}\n\t}else if(form1.visible){\n\t\tif(record==''){\n\t\t\tfillList('abWasteDefMainfestsUnit','units','bill_unit.bill_unit_id','',dataRes);\n\t\t}else{\n\t\t\tfillList('abWasteDefMainfestsUnit','units','bill_unit.bill_unit_id',unit,dataRes);\n\t\t}\n\t}else{\n\t\tif(record==''){\n\t\t\tfillList('abWasteDefMainfestsUnit','units2','bill_unit.bill_unit_id','',dataRes);\n\t\t}else{\n\t\t\tfillList('abWasteDefMainfestsUnit','units2','bill_unit.bill_unit_id',unit,dataRes);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "995f51d7889bb5c1cb9af1e1810044ce", "score": "0.5161933", "text": "function getFormUtil(formId)\r\n{\r\n var formInstance = null;\r\n try\r\n {\r\n loadScript(APP_ROOT+\"common/form/XperteamFormUtil.js\");\r\n formInstance = new XperteamFormUtil(formId);\r\n }\r\n catch(e)\r\n {\r\n alert(\"ERROR getFormUtil\")\r\n throw e;\r\n }\r\n return formInstance\r\n}", "title": "" }, { "docid": "ebe14071ee07da5b6df4a73f1dafe383", "score": "0.5160514", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr[\"input\"] = function(props) {\n for (var i = 0, len = props.length; i < len; i++) {\n attrs[props[i]] = !!(props[i] in inputElem);\n }\n if (attrs.list) {\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement(\"datalist\") && window.HTMLDataListElement);\n }\n return attrs;\n }(\"autocomplete autofocus list placeholder max min multiple pattern required step\".split(\" \"));\n /*>>input*/\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n Modernizr[\"inputtypes\"] = function(props) {\n for (var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++) {\n inputElem.setAttribute(\"type\", inputElemType = props[i]);\n bool = inputElem.type !== \"text\";\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if (bool) {\n inputElem.value = smile;\n inputElem.style.cssText = \"position:absolute;visibility:hidden;\";\n if (/^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined) {\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle && defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== \"textfield\" && // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n inputElem.offsetHeight !== 0;\n docElement.removeChild(inputElem);\n } else if (/^(search|tel)$/.test(inputElemType)) {} else if (/^(url|email)$/.test(inputElemType)) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n inputs[props[i]] = !!bool;\n }\n return inputs;\n }(\"search tel url email datetime date month week time datetime-local number range color\".split(\" \"));\n }", "title": "" }, { "docid": "ebe14071ee07da5b6df4a73f1dafe383", "score": "0.5160514", "text": "function webforms() {\n /*>>input*/\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // miketaylr.com/code/input-type-attr.html\n // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n // Only input placeholder is tested while textarea's placeholder is not.\n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr[\"input\"] = function(props) {\n for (var i = 0, len = props.length; i < len; i++) {\n attrs[props[i]] = !!(props[i] in inputElem);\n }\n if (attrs.list) {\n // safari false positive's on datalist: webk.it/74252\n // see also github.com/Modernizr/Modernizr/issues/146\n attrs.list = !!(document.createElement(\"datalist\") && window.HTMLDataListElement);\n }\n return attrs;\n }(\"autocomplete autofocus list placeholder max min multiple pattern required step\".split(\" \"));\n /*>>input*/\n /*>>inputtypes*/\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/\n Modernizr[\"inputtypes\"] = function(props) {\n for (var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++) {\n inputElem.setAttribute(\"type\", inputElemType = props[i]);\n bool = inputElem.type !== \"text\";\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if (bool) {\n inputElem.value = smile;\n inputElem.style.cssText = \"position:absolute;visibility:hidden;\";\n if (/^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined) {\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle && defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== \"textfield\" && // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n inputElem.offsetHeight !== 0;\n docElement.removeChild(inputElem);\n } else if (/^(search|tel)$/.test(inputElemType)) {} else if (/^(url|email)$/.test(inputElemType)) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n inputs[props[i]] = !!bool;\n }\n return inputs;\n }(\"search tel url email datetime date month week time datetime-local number range color\".split(\" \"));\n }", "title": "" }, { "docid": "efe33d6f7879ae0893f98ab930c3730b", "score": "0.51580995", "text": "function webforms() {\n // Run through HTML5's new input attributes to see if the UA understands any.\n // We're using f which is the <input> element created early on\n // Mike Taylr has created a comprehensive resource for testing these attributes\n // when applied to all input types:\n // http://miketaylr.com/code/input-type-attr.html\n // spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n \n // Only input placeholder is tested while textarea's placeholder is not. \n // Currently Safari 4 and Opera 11 have support only for the input placeholder\n // Both tests are available in feature-detects/forms-placeholder.js\n Modernizr['input'] = (function( props ) {\n for ( var i = 0, len = props.length; i < len; i++ ) {\n attrs[ props[i] ] = !!(props[i] in inputElem);\n }\n return attrs;\n })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));\n\n // Run through HTML5's new input types to see if the UA understands any.\n // This is put behind the tests runloop because it doesn't return a\n // true/false like all the other tests; instead, it returns an object\n // containing each input type with its corresponding true/false value\n\n // Big thanks to @miketaylr for the html5 forms expertise. http://miketaylr.com/\n Modernizr['inputtypes'] = (function(props) {\n\n for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {\n\n inputElem.setAttribute('type', inputElemType = props[i]);\n bool = inputElem.type !== 'text';\n\n // We first check to see if the type we give it sticks..\n // If the type does, we feed it a textual value, which shouldn't be valid.\n // If the value doesn't stick, we know there's input sanitization which infers a custom UI\n if ( bool ) {\n\n inputElem.value = smile;\n inputElem.style.cssText = 'position:absolute;visibility:hidden;';\n\n if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {\n\n docElement.appendChild(inputElem);\n defaultView = document.defaultView;\n\n // Safari 2-4 allows the smiley as a value, despite making a slider\n bool = defaultView.getComputedStyle &&\n defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&\n // Mobile android web browser has false positive, so must\n // check the height to see if the widget is actually there.\n (inputElem.offsetHeight !== 0);\n\n docElement.removeChild(inputElem);\n\n } else if ( /^(search|tel)$/.test(inputElemType) ){\n // Spec doesnt define any special parsing or detectable UI\n // behaviors so we pass these through as true\n\n // Interestingly, opera fails the earlier test, so it doesn't\n // even make it here.\n\n } else if ( /^(url|email)$/.test(inputElemType) ) {\n // Real url and email support comes with prebaked validation.\n bool = inputElem.checkValidity && inputElem.checkValidity() === false;\n\n } else if ( /^color$/.test(inputElemType) ) {\n // chuck into DOM and force reflow for Opera bug in 11.00\n // github.com/Modernizr/Modernizr/issues#issue/159\n docElement.appendChild(inputElem);\n docElement.offsetWidth;\n bool = inputElem.value != smile;\n docElement.removeChild(inputElem);\n\n } else {\n // If the upgraded input compontent rejects the :) text, we got a winner\n bool = inputElem.value != smile;\n }\n }\n\n inputs[ props[i] ] = !!bool;\n }\n return inputs;\n })('search tel url email datetime date month week time datetime-local number range color'.split(' '));\n }", "title": "" }, { "docid": "971a6260ffaeb98de9eb67b4be4a7606", "score": "0.51260227", "text": "function formish() {\n add_sortables($('form'));\n create_addlinks($('form'));\n add_mousedown_to_addlinks($('form'));\n add_remove_buttons($('form'));\n}", "title": "" }, { "docid": "13a1422b91c493c69fb33df87c0701da", "score": "0.51098233", "text": "function testValidFields() {\n\t// fill in the form values\n\tF(\"#firstName\").visible(function() {\n\t\tthis.type(VALID_FIRSTNAME);\n\t});\n\tF(\"#lastName\").visible(function() {\n\t\tthis.type(VALID_LASTNAME);\n\t});\n\tF(\"#dateOfBirth\").visible(function() {\n\t\tthis.type(VALID_DATEOFBIRTH);\n\t});\n\tF(\"#gender\").visible(function() {\n\t\tthis.type(VALID_GENDER);\n\t});\n\tF(\"#email\").visible(function() {\n\t\tthis.type(VALID_EMAIL);\n\t});\n\tF(\"#password\").visible(function() {\n\t\tthis.type(VALID_PASSWORD);\n\t});\n\tF(\"#confirmPassword\").visible(function() {\n\t\t this.type(VALID_PASSWORD);\n\t});\n\n\t// click the button once all the fields are filled in\n\tF(\"#profileSubmit\").visible(function() {\n\t\tthis.click();\n\t});\n\n\t// in forms, we want to assert the form worked as expected\n\t// here, we assert we got the success message from the AJAX call\n\tF(\".alert\").visible(function() {\n\t\t// the ok() function from qunit is equivalent to SimpleTest's assertTrue()\n\t\tok(F(this).hasClass(\"alert-success\"), \"successful alert CSS\");\n\t\tok(F(this).html().indexOf(\"Updated Successful\") >= 0, \"successful message\");\n\t});\n}", "title": "" }, { "docid": "1f9752b1da18b4a836f1c258f3b76b3b", "score": "0.5105536", "text": "function makeFormAvailable() {\n makeFormElAvailable(window.keksobooking.map.filteres, 'map__filters');\n makeFormElAvailable(formElement, 'ad-form');\n }", "title": "" }, { "docid": "c1513d4cb0b33b417f17826f4b309985", "score": "0.51047534", "text": "function testValidFields() {\n\t// fill in the form values\n\tF(\"#firstName\").visible(function() {\n\t\tthis.type(VALID_FIRSTNAME);\n\t});\n\tF(\"#middleName\").visible(function() {\n\t\tthis.type(VALID_MIDDLENAME);\n\t});\n\tF(\"#lastName\").visible(function() {\n\t\tthis.type(VALID_LASTNAME);\n\t});\n\tF(\"#location\").visible(function() {\n\t\tthis.type(VALID_LOCATION);\n\t});\n\tF(\"#description\").visible(function() {\n\t\tthis.type(VALID_DESCRIPTION);\n\t});\n\n\t// click the button once all the fields are filled in\n\tF(\"#profileSubmit\").visible(function() {\n\t\tthis.click();\n\t});\n\n\t// in forms, we want to assert the form worked as expected\n\t// here, we assert we got the success message from the AJAX call\n\tF(\".alert\").visible(function() {\n\t\t// the ok() function from qunit is equivalent to SimpleTest's assertTrue()\n\t\tok(F(this).hasClass(\"alert-success\"), \"successful alert CSS\");\n\t\tok(F(this).html().indexOf(\"Updated Successful\") >= 0, \"successful message\");\n\t});\n}", "title": "" }, { "docid": "0692a95798e6697d6135f21b843c90a5", "score": "0.51042366", "text": "function updateForm() {\n // set form template\n jq.txtFormName.val(template.name[formLang]);\n jq.txtFormFile.val(template.templateFile);\n jq.txtFormShortName.val(template.shortName);\n jq.txtFormGrid.val(template.gridSize);\n jq.selDefaultFor.val(template.defaultFor);\n jq.chkSubform.prop('checked', template.isSubform);\n jq.chkFixed.prop('checked', template.isFixed);\n jq.chkReadOnly.prop('checked', template.isReadOnly);\n jq.chkBFB.prop('checked', template.isBFB);\n jq.chkUseReporting.prop('checked', template.useReporting);\n jq.chkIsLetter.prop('checked', template.isLetter);\n jq.chkUtf8.prop('checked', template.utf8);\n setDevMode();\n }", "title": "" }, { "docid": "3d66948d6638dc72ff5e558774ff092a", "score": "0.510043", "text": "function checkForms() {\n frms.some((index, frm) => {\n let form = frms[frm];\n if (typeof form.formObj != 'undefined') { \n /**\n * Add User Settings Modal from inputs.js\n */\n addUserSettingsModal(inputs);\n /**\n * Call the form's helper\n */\n form.helperFn(form.formObj, inputs); \n }\n });\n}", "title": "" }, { "docid": "230272f3e77a0ca5c425216307ef3b6d", "score": "0.5097656", "text": "function testFormCompleteness() {\n\t\t\tif (inchesComplete && greyYNComplete) {\n\t\t\t\tcreateRecommendation();\n\t\t\t}\n}", "title": "" }, { "docid": "b0b688e2f6b72325c97b3a92d2919b55", "score": "0.50867695", "text": "constructor () {\n this.adminLink = element(by.linkText('Admin'))\n this.requestslink = element(by.cssContainingText('div.toolbarItem.incident-config > a.toolbarItemButton', 'Requests'))\n this.customizationlink = element(by.cssContainingText('div.sectionNavItemTitle', 'Customizations'))\n this.botomAdd = element(by.xpath(\"//div[@id='body']/div[2]/div[2]/div/div[4]/div/div[2]/a/span[2]\"))\n this.botomEdit = element(by.linkText('Edit'))\n this.name = element(by.id(\"input_name\"))\n this.description = element(by.id(\"input_description\"))\n this.fieldCatalog = element(by.xpath(\"//div[@id='body']/div[2]/div[8]/div/form/div[6]/div/div[2]/div/div[3]/div[2]/div/div/div\"))\n this.fieldType = element(by.xpath(\"//div[@id='body']/div[2]/div[8]/div/form/div[6]/div/div[2]/div/div[6]/div[2]/div/div/div\"))\n this.botomSave = element(by.xpath(\"(//a[contains(text(),'Save')])[6]\"))\n\n }", "title": "" }, { "docid": "df613d18e6ba4896335fb702d8fcbc40", "score": "0.50593626", "text": "function callUseForm(expect){\n props.handler(expect)\n }", "title": "" }, { "docid": "352680c0cd960cb441e07de5f097503e", "score": "0.50566775", "text": "function _setupAppInternal()\n{\n console.log('Setting app header and the form...');\n \n // Initializing the form\n setupLayout();\n var hooksObj = createHooksObj();\n langObj.hooks = hooksObj;\n langObj.languageOverride = numberFormatObj;\n langObj.formio = {};\n langObj.formio.formsUrl = window.location.href;\n fillUserInfo();\n setupPredefinedTheme();\n setInitialTimeZone();\n\n generateForm(function()\n {\n formDestroyed = false;\n setupPredefinedLanguage();\n configureMenu();\n });\n}", "title": "" }, { "docid": "559f96dc547d975fa1f4c6b603b93142", "score": "0.50555366", "text": "renderForms() {\n let form;\n\n if (this.state.registrationStep.toString() === \"1\") {\n form = this.renderStep1();\n } else if (this.state.registrationStep.toString() === \"2\") {\n form = this.renderStep2(this.state.orgType);\n } else if (this.state.registrationStep.toString() === \"3\") {\n form = this.renderStep3();\n }\n\n return (form);\n\n }", "title": "" }, { "docid": "4eecd50101b1958d6b56ba61f35d755d", "score": "0.5038097", "text": "render () {\nreturn(\n \n<MuiThemeProvider muiTheme={getMuiTheme()}>\n <Styles>\n <h1> React Final Form Example</h1>\n <h2>Third Party Components</h2>\n <a href=\"https://github.com/erikras/react-final-form#-react-final-form\">\n Read Docs\n </a>\n \n\n <Form\n onSubmit={onSubmit}\n render={({ handleSubmit, form, submitting, pristine, covid19testdata }) => (\n <form onSubmit={handleSubmit}>\n <div>\n <Field\n name=\"testdate\"\n component={TextFieldAdapter}\n hintText=\"TestDate\"\n floatingLabelText=\"Test Date\"\n />\n </div>\n\n <div>\n <Field\n name=\"issuedby\"\n component={TextFieldAdapter}\n validate={required}\n hintText=\"Issued By\"\n floatingLabelText=\"Issued By\"\n />\n </div>\n <div>\n <Field\n name=\"testtype\"\n component={TextFieldAdapter}\n validate={required}\n hintText=\"Test Type\"\n floatingLabelText=\"Test Type\"\n />\n </div>\n <div>\n <Field\n name=\"testnumber\"\n component={TextFieldAdapter}\n validate={required}\n hintText=\"Test Number\"\n floatingLabelText=\"Test Number\"\n />\n </div>\n <div>\n <Field\n name=\"restresult\"\n component={TextFieldAdapter}\n validate={required}\n hintText=\"Test Result\"\n floatingLabelText=\"Test Result\"\n />\n </div>\n\n <div>\n <Field\n name=\"locationstate\"\n component={ReactSelectAdapter}\n options={states}\n />\n </div>\n \n <div>\n <Field\n name=\"testupdatedata\"\n component={TextFieldAdapter}\n hintText=\"Test Update Date\"\n floatingLabelText=\"TestUpdate Date\"\n />\n \n </div>\n <div className=\"buttons\">\n <button type=\"submit\" disabled={submitting}>\n Submit Test Results\n </button>\n <button\n type=\"button\"\n onClick={form.reset}\n disabled={submitting || pristine}\n >\n Reset\n </button>\n </div>\n <pre>{JSON.stringify(covid19testdata, 0, 2)}</pre>\n //This is no longer working//\n </form>\n )}\n />\n </Styles>\n </MuiThemeProvider>\n )\n\n\nReactDOM.render(\n <StartForm />, \n document.getElementById('content')\n\n)\n}", "title": "" }, { "docid": "e54c25b6680dd404a9705873095ae918", "score": "0.50372624", "text": "function formLoaded(){\n\tvar lang = determineLanguage( relExampleURL[currentExample] ) ;\n\tformW.loadForm( baseCode[currentExample], lang ) ;\n}", "title": "" }, { "docid": "4d2eb8946de5e98c206b4c5ddef9186e", "score": "0.50335824", "text": "async setUpAwe() {\n // onload event\n this.showInput();\n // Choice\n this.getChoiceInfo().catch((e) => {});\n if (this.frm.doc.docstatus !== 0) {\n // submitted, comfirmed form\n } else {\n // new form\n if (ud(this.frm.doc.__islocal)) {\n // draft form\n let fieldValue = this.frm.doc[this.field];\n await this.choiceFunc({});\n for (let i = 0; i < this.choice.length; i++) {\n if (this.choice[i].id === fieldValue) {\n this.aweField.replace(this.choice[i]);\n this.hasValue = 1;\n }\n }\n }\n }\n // Toggle Display\n this.toggleDisplay();\n this.showHideField(this.frm.doc.docstatus === 0);\n // Update awesomelink if value is exist > amend form\n setTimeout(() => {\n let val = $('[data-fieldname='+this.field+'] a.grey').text();\n if (val !== '') {\n if (!ud(this.choice)) {\n for (let i = 0; i < this.choice.length; i++) {\n if (this.choice[i].id === val) {\n this.aweField.replace(this.choice[i]);\n this.hasValue = 1;\n }\n }\n }\n }\n }, 1);\n }", "title": "" }, { "docid": "515330fd990fd4c94b13e4fdc127924b", "score": "0.50324434", "text": "constructor(){\n this.name = Selector('input').withAttribute('id','inputName')\n this.description = Selector('input').withAttribute('id','inputDescription')\n this.machinenumber = Selector('input').withAttribute('id','inputMachineNumber')\n this.active = Selector('input').withAttribute('name','inputActive')\n this.maintenance = Selector('input').withAttribute('name','inputMaintenanceRequired')\n this.save_btn = Selector('button').withAttribute('type','submit')\n }", "title": "" }, { "docid": "958423989bbb2205669dae59752b90e6", "score": "0.5017364", "text": "build($formNode) {\n this.addChangeListener();\n // use label for data testid and remove special characters such as a colon\n this.$rootNode = $formNode\n .append('div')\n .classed(this.inline ? 'col-sm-auto' : 'col-sm-12 mt-1 mb-1', true)\n .attr('data-testid', this.elementDesc.label.replace(/[^\\w\\s]/gi, ''));\n this.$inputNode = this.$rootNode.append('div');\n this.setVisible(this.elementDesc.visible);\n if (this.inline && this.elementDesc.onChange) {\n // change the default onChange handler for the inline cas\n this.inlineOnChange = this.elementDesc.onChange;\n this.elementDesc.onChange = null;\n }\n // do not add the class in inline mode\n this.$inputNode.classed('row', !this.inline);\n if (this.inline) {\n if (!this.elementDesc.options.badgeProvider) {\n // default badge provider for inline\n this.elementDesc.options.badgeProvider = (rows) => (rows.length === 0 ? '' : rows.length.toString());\n }\n this.$inputNode.classed('dropdown', true);\n this.$inputNode.html(`\n <button class=\"btn bg-white border border-gray-400 border-1 dropdown-toggle\" data-testid=\"form-map-button\" type=\"button\" id=\"${this.elementDesc.attributes.id}l\" data-bs-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"true\">\n ${this.elementDesc.label}\n <span class=\"badge rounded-pill bg-secondary\"></span>\n <span class=\"caret\"></span>\n </button>\n <div class=\"dropdown-menu p-2\" data-bs-popper=\"static\" data-testid=\"form-map-dropdown\" aria-labelledby=\"${this.elementDesc.attributes.id}l\" style=\"min-width: 25em\">\n <div class=\"form-map-container\"></div>\n <div class=\"form-map-apply mt-3\">\n <button class=\"btn btn-secondary btn-sm\" data-testid=\"apply-button\">${I18nextManager.getInstance().i18n.t('tdp:core.FormMap.apply')}</button>\n </div>\n </div>\n `);\n this.$inputNode.select('.form-map-apply button').on('click', () => {\n d3event.preventDefault();\n });\n this.$group = this.$inputNode.select('div.form-map-container');\n this.$group.on('click', () => {\n // stop click propagation to avoid closing the dropdown\n d3event.stopPropagation();\n });\n }\n else {\n if (!this.elementDesc.hideLabel) {\n const $label = this.$inputNode.append('label').classed('form-label', true).attr('for', this.elementDesc.attributes.id);\n if (this.elementDesc.options.badgeProvider) {\n $label.html(`${this.elementDesc.label} <span class=\"badge rounded-pill bg-secondary\"></span>`);\n }\n else {\n $label.text(this.elementDesc.label);\n }\n }\n this.$group = this.$inputNode.append('div');\n }\n this.setAttributes(this.$group, this.elementDesc.attributes);\n // adapt default settings\n this.$group.classed('form-map-container', true).classed('form-control', false); // remove form-control class to be complient with Bootstrap 4\n }", "title": "" }, { "docid": "3183e0096032c55ef847fa57c4229e6d", "score": "0.5014062", "text": "static get forms() {\n return forms;\n }", "title": "" }, { "docid": "02ad833cf4d28ca5d9bf2568a988000e", "score": "0.50105244", "text": "createForm3() {\n this.stepThreeForm = this.fb.group({\n monday_start: [''],\n monday_end: [''],\n tuesday_start: [''],\n tuesday_end: [''],\n wednesday_start: [''],\n wednesday_end: [''],\n thusday_start: [''],\n thusday_end: [''],\n friday_start: [''],\n friday_end: [''],\n saturday_start: [''],\n saturday_end: [''],\n sunday_start: [''],\n sunday_end: [''],\n });\n }", "title": "" }, { "docid": "4c4c4f82caa6fc4ccad744d0c122a73b", "score": "0.49983567", "text": "function UI()\n {\n var submitHandler; // Function which is later bound to handle form submits\n var mapMeta = {\n formDataProperty: \"smarty-form\", // Indicates whether we've stored the form already\n identifiers: {\n streets: { // both street1 and street2, separated later.\n names: [ // Names are hidden from the user; \"name\" and \"id\" attributes\n 'street',\n 'address', // This (\"address\") is a dangerous inclusion; but we have a strong set of exclusions below to prevent false positives.\n 'address1', // If there are automapping issues (specifically if it is too greedy when mapping fields) it will be because\n 'address2', // of these arrays for the \"streets\" fields, namely the \"address\" entry right around here, or potentially others.\n 'addr1',\n 'addr2',\n 'address-1',\n 'address-2',\n 'address_1',\n 'address_2',\n 'line',\n 'primary'\n ],\n labels: [ // Labels are visible to the user (labels and placeholder texts)\n 'street',\n 'address', // hazardous (e.g. \"Email address\") -- but we deal with that later\n 'line ',\n ' line'\n ]\n },\n secondary: {\n names: [\n 'suite',\n 'apartment',\n 'primary',\n //'box', // This false-positives fields like \"searchBox\" ...\n 'pmb',\n //'unit', // I hesitate to allow this, since \"Units\" (as in quantity) might be common...\n 'secondary'\n ],\n labels: [\n 'suite',\n 'apartment',\n 'apt:',\n 'apt.',\n 'ste:',\n 'ste.',\n 'unit:',\n 'unit.',\n 'unit ',\n 'box',\n 'pmb'\n ]\n },\n city: {\n names: [\n 'city',\n 'town',\n 'village',\n 'cityname',\n 'city-name',\n 'city_name',\n 'cities'\n ],\n labels: [\n 'city',\n 'town',\n 'city name'\n ]\n },\n state: {\n names: [\n 'state',\n 'province',\n 'region',\n 'section',\n 'territory'\n ],\n labels: [\n 'state',\n 'province',\n 'region',\n 'section',\n 'territory'\n ]\n },\n zipcode: {\n names: [\n 'zip',\n 'zipcode',\n 'zip-code',\n 'zip_code',\n 'postal_code',\n 'postal-code',\n 'postalcode',\n 'postcode',\n 'post-code',\n 'post_code',\n 'postal',\n 'zcode'\n ],\n labels: [\n 'zip',\n 'zip code',\n 'postal code',\n 'postcode',\n 'locality'\n ]\n },\n lastline: {\n names: [\n 'lastline',\n 'last-line',\n 'citystatezip',\n 'city-state-zip',\n 'city_state_zip'\n ],\n labels: [\n 'last line',\n 'city/state/zip',\n 'city / state / zip',\n 'city - state - zip',\n 'city-state-zip',\n 'city, state, zip'\n ]\n },\n country: { // We only use country to see if we should submit to the API\n names: [\n 'country',\n 'nation',\n 'sovereignty'\n ],\n labels: [\n 'country',\n 'nation',\n 'sovereignty'\n ]\n }\n }, // We'll iterate through these (above) to make a basic map of fields, then refine:\n street1exacts: { // List of case-insensitive EXACT matches for street1 field\n names: [\n 'address',\n 'street',\n 'address1',\n 'streetaddress',\n 'street-address',\n 'street_address',\n 'streetaddr',\n 'street-addr',\n 'street_addr',\n 'str',\n 'str1',\n 'street1',\n 'addr'\n ]\n },\n street2: { // Terms which would identify a \"street2\" field\n names: [\n 'address2',\n 'address_2',\n 'address-2',\n 'street2',\n 'addr2',\n 'addr_2',\n 'line2',\n 'str2',\n 'second',\n 'two'\n ],\n labels: [\n ' 2',\n 'second ',\n 'two'\n ]\n },\n exclude: { // Terms we look for to exclude an element from the mapped set to prevent false positives\n names: [ // The intent is to keep non-address elements from being mapped accidently.\n 'email',\n 'e-mail',\n 'e_mail',\n 'firstname',\n 'first-name',\n 'first_name',\n 'lastname',\n 'last-name',\n 'last_name',\n 'fname',\n 'lname',\n 'name', // Sometimes problematic (\"state_name\" ...) -- also see same label value below\n 'eml',\n 'type',\n 'township',\n 'zip4',\n 'plus4',\n 'method',\n 'location',\n 'store',\n 'save',\n 'keep',\n 'phn',\n 'phone',\n 'cardholder', // I hesitate to exclude \"card\" because of common names like: \"card_city\" or something...\n 'security',\n 'comp',\n 'firm',\n 'org',\n 'addressee',\n 'addresses',\n 'group',\n 'gate',\n 'fax',\n 'cvc',\n 'cvv',\n 'file',\n 'search',\n 'list' // AmeriCommerce cart uses this as an \"Address Book\" dropdown to choose an entire address...\n ],\n labels: [\n 'email',\n 'e-mail',\n 'e mail',\n ' type',\n 'save ',\n 'keep',\n 'name',\n 'method',\n 'phone',\n 'organization',\n 'company',\n 'addressee',\n 'township',\n 'firm',\n 'group',\n 'gate',\n 'cardholder',\n 'cvc',\n 'cvv',\n 'search',\n 'file',\n ' list',\n 'fax',\n 'book'\n ]\n }\n };\n\n var autocompleteResponse; // The latest response from the autocomplete server\n var autocplCounter = 0; // A counter so that only the most recent JSONP request is used\n var autocplRequests = []; // The array that holds autocomplete requests in order\n var loaderWidth = 24, loaderHeight = 8; // TODO: Update these if the image changes\n var uiCss = \"<style>\"\n + \".smarty-dots { display: none; position: absolute; z-index: 999; width: \"+loaderWidth+\"px; height: \"+loaderHeight+\"px; background-image: url('data:image/gif;base64,R0lGODlhGAAIAOMAALSytOTi5MTCxPTy9Ly6vPz6/Ozq7MzKzLS2tOTm5PT29Ly+vPz+/MzOzP///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJBgAOACwAAAAAGAAIAAAEUtA5NZi8jNrr2FBScQAAYVyKQC6gZBDkUTRkXUhLDSwhojc+XcAx0JEGjoRxCRgWjcjAkqZr5WoIiSJIaohIiATqimglg4KWwrDBDNiczgDpiAAAIfkECQYAFwAsAAAAABgACACEVFZUtLK05OLkxMbE9PL0jI6MvL68bG5s7Ors1NbU/Pr8ZGJkvLq8zM7MXFpctLa05ObkzMrM9Pb0nJqcxMLE7O7s/P78////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWDgZVWQcp2nJREWmhLSKRWOcySoRAWBEZ8IBi+imAAcxwXhZODxDCfFwxloLI6A7OBCoPKWEG/giqxRuOLKRSA2lpVM6kM2dTZmyBuK0Aw8fhcQdQMxIwImLiMSLYkVPyEAIfkECQYAFwAsAAAAABgACACEBAIEpKak1NbU7O7svL68VFZU/Pr8JCIktLK05OLkzMrMDA4M9Pb0vLq87Ors9PL0xMLEZGZk/P78tLa05ObkzM7MFBIU////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWLgJVGCcZ2n9DASmq7nUwDAQaAPhCAEgzqNncIQodEWgxNht7tdDBMmorIw0gKXh3T3uCSYgV3VitUiwrskZTspGpFKsJMRRVdkNBuKseT5Tg4TUQo+BgkCfygSDCwuIgN/IQAh+QQJBgAXACwAAAAAGAAIAIRUVlS0srTk4uR8enz08vTExsRsbmzs6uyMjoz8+vzU1tRkYmS8urzMzsxcWly0trTk5uR8fnz09vTMyszs7uycmpz8/vz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFYOBlUVBynad1QBaaEtIpIY5jKOgxAM5w5IxAYJKo8HgLwmnnAAAGsodQ2FgcnYUL5Nh0QLTTqbXryB6cXcBPEBYaybEL0wm9SNqFWfOWY0Z+JxBSAXkiFAImLiolLoZxIQAh+QQJBgAQACwAAAAAGAAIAIQEAgS0srTc2tz08vTMyszk5uT8+vw0MjS8ury0trTk4uT09vTMzszs6uz8/vw0NjT///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFWiAELYMjno4gmCfkDItoEEGANKfwAMAjnA1EjWBg1I4G14HHO5gMiWOAEZUqIAIm86eQeo/XrBbA/RqlMceS6RxVa4xZLVHI7QCHn6hQRbAWDSwoKoIiLzEQIQAh+QQJBgAXACwAAAAAGAAIAIRUVlS0srTk4uR8enz08vTExsRsbmzs6uyMjoz8+vzU1tRkYmS8urzMzsxcWly0trTk5uR8fnz09vTMyszs7uycmpz8/vz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFY+B1SYQlntYBmeeVQJSZTEHAHCcUOUCEiwqDw4GQNGrIhGgA4DkGIsIC0ARUHsia4AKpOiGXghewyGq5YwCu4Gw6jlnJ0gu9SKvWRKH2AIt0TQN+F0FNRSISMS0XKSuLCQKKIQAh+QQJBgAXACwAAAAAGAAIAIQEAgSkpqTU1tTs7uy8vrxUVlT8+vwkIiS0srTk4uTMyswMDgz09vS8urzs6uz08vTEwsRkZmT8/vy0trTk5uTMzswUEhT///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFZOB1MY8knhJpnpchUKahIEjjnAxEE8xJHABA4VGhGQ0ighFBEA0swWBkYgxMEpfHkva4BKLBxRaBHdACCHT3C14U0VbkRWlsXgYLcERGJQxOD3Q8PkBCfyMDKygMDIoiDAIJJiEAIfkECQYAFwAsAAAAABgACACEVFZUtLK05OLkxMbE9PL0jI6MvL68bG5s7Ors1NbU/Pr8ZGJkvLq8zM7MXFpctLa05ObkzMrM9Pb0nJqcxMLE7O7s/P78////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABWPgdUmEJZ4WaZ6XAlWmEgUBg5wSRRvSmRwOR0HSoBkVIoMxYBARFgBHdPJYBgSXijVAuAykUsBii5VsK96oelFc9i5K40MkgYInigHtAcHFH28XP1EFXSMwLBcWFRIrJwoCiCEAOw=='); }\"\n + \".smarty-ui { position: absolute; z-index: 99999; text-shadow: none; text-align: left; text-decoration: none; }\"\n + \".smarty-popup { border: 3px solid #4C4C4C; padding: 0; background: #F6F6F6; box-shadow: 0px 10px 35px rgba(0, 0, 0, .8); }\"\n + \".smarty-popup-header { background: #DDD; height: 12px; text-transform: uppercase; font: bold 12px/1em 'Arial Black', sans-serif; padding: 12px; }\"\n + \".smarty-popup-ambiguous-header { color: #333; }\"\n + \".smarty-popup-invalid-header { color: #CC0000; }\"\n + \".smarty-popup-close { color: #CC0000 !important; text-decoration: none !important; position: absolute; right: 15px; top: 10px; display: block; padding: 4px 6px; text-transform: uppercase; }\"\n + \".smarty-popup-close:hover { color: #FFF !important; background: #CC0000; }\"\n + \".smarty-choice-list .smarty-choice { padding: 10px 15px;}\"\n + \".smarty-choice { display: block; font: 300 14px/1.5em sans-serif; text-decoration: none !important; border-top: 1px solid #CCC; }\"\n + \".smarty-choice-list .smarty-choice:hover { text-decoration: none !important; }\"\n + \".smarty-choice-alt { border-top: 1px solid #4C4C4C; background: #F6F6F6 !important; box-shadow: inset 0 4px 15px -5px rgba(0, 0, 0, .45); }\"\n + \".smarty-choice-alt .smarty-choice-abort, .smarty-choice-override { padding: 6px 15px; text-decoration: none !important; }\"\n + \".smarty-choice-alt .smarty-choice:first-child { border-top: 0; }\"\n //+ \".smarty-choice-abort:hover { color: #333 !important; }\"\n + \".smarty-choice-override:hover { color: #CC0000 !important; }\"\n + \".smarty-tag { position: absolute; display: block; overflow: hidden; font: 15px/1.2em sans-serif; text-decoration: none !important; width: 20px; height: 18px; border-radius: 25px; transition: all .25s; -moz-transition: all .25s; -webkit-transition: all .25s; -o-transition: all .25s; }\"\n + \".smarty-tag:hover { width: 70px; text-decoration: none !important; color: #999; }\"\n + \".smarty-tag:hover .smarty-tag-text { color: #000 !important; }\"\n + \".smarty-tag-grayed { border: 1px solid #B4B4B4 !important; color: #999 !important; background: #DDD !important; box-shadow: inset 0 9px 15px #FFF; }\"\n + \".smarty-tag-green { border: 1px solid #407513 !important; color: #407513 !important; background: #A6D187 !important; box-shadow: inset 0 9px 15px #E3F6D5; }\"\n + \".smarty-tag-grayed:hover { border-color: #333 !important; }\"\n + \".smarty-tag-check { padding-left: 4px; text-decoration: none !important; }\"\n + \".smarty-tag-text { font-size: 12px !important; position: absolute; top: 0; left: 16px; width: 50px !important; text-align: center !important; }\"\n + \".smarty-autocomplete { display: block; border: 1px solid #777; background: white; overflow: hidden; white-space: nowrap; box-shadow: 1px 1px 3px #555; }\"\n + \".smarty-suggestion { display: block; color: #444; text-decoration: none !important; font-size: 12px; padding: 1px 5px; }\"\n + \".smarty-active-suggestion { background: #EEE; color: #000; border: none; outline: none; }\"\n + \".smarty-no-suggestions { padding: 1px 5px; font-size: 12px; color: #AAA; font-style: italic; }\"\n + \"</style>\";\n\n\n this.postMappingOperations = function()\n {\n // Injects materials into the DOM, binds to form submit events, etc... very important.\n\n if (config.ui)\n {\n // Prepend CSS to head tag to allow cascading and give their style rules priority\n $('head').prepend(uiCss);\n\n // For each address on the page, inject the loader and \"address verified\" markup after the last element\n var addresses = instance.getMappedAddresses();\n for (var i = 0; i < addresses.length; i++)\n {\n var id = addresses[i].id();\n $('body').append('<div class=\"smarty-ui\"><div title=\"Loading...\" class=\"smarty-dots smarty-addr-'+id+'\"></div></div>');\n var offset = uiTagOffset(addresses[i].corners(true));\n $('body').append('<div class=\"smarty-ui\" style=\"top: '+offset.top+'px; left: '+offset.left+'px;\"><a href=\"javascript:\" class=\"smarty-tag smarty-tag-grayed smarty-addr-'+id+'\" title=\"Address not verified. Click to verify.\" data-addressid=\"'+id+'\"><span class=\"smarty-tag-check\">&#10003;</span><span class=\"smarty-tag-text\">Verify</span></a></div>');\n\n // Move the UI elements around when browser window is resized\n $(window).resize({ addr: addresses[i] }, function(e)\n {\n var addr = e.data.addr;\n var offset = uiTagOffset(addr.corners(true)); // Position of lil' tag\n $('.smarty-tag.smarty-addr-'+addr.id())\n .parent('.smarty-ui')\n .css('top', offset.top+'px')\n .css('left', offset.left+'px');\n\n var addrOffset = addr.corners(); // Position of any popup windows\n $('.smarty-popup.smarty-addr-'+addr.id())\n .parent('.smarty-ui')\n .css('top', addrOffset.top+'px')\n .css('left', addrOffset.left+'px');\n\n if (config.autocomplete) // Position of autocomplete boxes\n {\n var containerUi = $('.smarty-autocomplete.smarty-addr-'+addr.id()).closest('.smarty-ui');\n var domFields = addr.getDomFields();\n if (domFields['street'])\n {\n containerUi.css({\n \"left\": $(domFields['street']).offset().left + \"px\",\n \"top\": ($(domFields['street']).offset().top + $(domFields['street']).outerHeight()) + \"px\"\n });\n }\n }\n });\n\n // Disable for addresses defaulting to a foreign/non-US value\n if (!addresses[i].isDomestic())\n {\n var uiTag = $('.smarty-ui .smarty-tag.smarty-addr-'+id)\n if (uiTag.is(':visible'))\n uiTag.hide();\n addresses[i].accept({ address: addresses[i] }, false);\n }\n }\n\n $('body').delegate('.smarty-tag-grayed', 'click', function(e)\n {\n // \"Verify\" clicked -- manually invoke verification\n var addrId = $(this).data('addressid');\n instance.verify(addrId);\n });\n\n $('body').delegate('.smarty-undo', 'click', function(e)\n {\n // \"Undo\" clicked -- replace field values with previous input\n var addrId = $(this).parent().data('addressid');\n var addr = instance.getMappedAddressByID(addrId);\n addr.undo(true);\n // If fields are re-mapped after an address was verified, it loses its \"accepted\" status even if no values were changed.\n // Thus, in some rare occasions, the undo link and the \"verified!\" text may not disappear when the user clicks \"Undo\",\n // The undo functionality still works in those cases, but with no visible changes, the address doesn't fire \"AddressChanged\"...\n });\n\n\n\n // Prepare autocomplete UI\n if (config.autocomplete && config.key)\n {\n // For every mapped address, wire up autocomplete\n for (var i = 0; i < forms.length; i++)\n {\n var f = forms[i];\n\n for (var j = 0; j < f.addresses.length; j++)\n {\n var addr = f.addresses[j];\n var domFields = addr.getDomFields();\n\n if (domFields['street'])\n {\n var strField = $(domFields['street']);\n var containerUi = $('<div class=\"smarty-ui\"></div>');\n var autoUi = $('<div class=\"smarty-autocomplete\"></div>');\n\n autoUi.addClass('smarty-addr-' + addr.id());\n containerUi.data(\"addrID\", addr.id())\n containerUi.append(autoUi);\n\n containerUi.css({\n \"position\": \"absolute\",\n \"left\": strField.offset().left + \"px\",\n \"top\": (strField.offset().top + strField.outerHeight()) + \"px\"\n });\n\n containerUi.hide().appendTo(\"body\");\n\n containerUi.delegate(\".smarty-suggestion\", \"click\", { addr: addr, containerUi: containerUi }, function(event) {\n var sugg = autocompleteResponse.suggestions[$(this).data('suggIndex')];\n useAutocompleteSuggestion(event.data.addr, sugg, event.data.containerUi);\n });\n\n containerUi.delegate(\".smarty-suggestion\", \"mouseover\", function() {\n $('.smarty-active-suggestion').removeClass('smarty-active-suggestion');\n $(this).addClass('smarty-active-suggestion');\n });\n\n containerUi.delegate(\".smarty-active-suggestion\", \"mouseleave\", function() {\n $(this).removeClass('smarty-active-suggestion');\n });\n\n\n strField.attr(\"autocomplete\", \"off\"); // Tell Firefox to keep quiet\n\n strField.blur({ containerUi: containerUi }, function(event) {\n setTimeout( (function(event) { return function() { if (event.data) event.data.containerUi.hide(); }; })(event), 300); // This line is proudly IE9-compatible\n });\n\n strField.keydown({ containerUi: containerUi, addr: addr }, function(event) {\n var suggContainer = $('.smarty-autocomplete', event.data.containerUi);\n var currentChoice = $('.smarty-active-suggestion:visible', suggContainer).first();\n var choiceSelectionIsNew = false;\n\n if (event.keyCode == 9) // Tab key\n {\n if (currentChoice.length > 0)\n {\n var domFields = event.data.addr.getDomFields();\n if (domFields['zipcode'])\n $(domFields['zipcode']).focus();\n else\n $(domFields['street']).blur();\n useAutocompleteSuggestion(event.data.addr, autocompleteResponse.suggestions[currentChoice.data(\"suggIndex\")], event.data.containerUi);\n return addr.isFreeform() ? true : suppress(event);\n }\n else\n event.data.containerUi.hide();\n return;\n }\n else if (event.keyCode == 40) // Down arrow\n {\n if (!currentChoice.hasClass('smarty-suggestion'))\n {\n currentChoice = $('.smarty-suggestion', suggContainer).first().mouseover();\n choiceSelectionIsNew = true;\n }\n\n if (!choiceSelectionIsNew)\n {\n if (currentChoice.next('.smarty-addr-'+event.data.addr.id()+' .smarty-suggestion').length > 0)\n currentChoice.next('.smarty-suggestion').mouseover();\n else\n currentChoice.removeClass('smarty-active-suggestion');\n }\n\n moveCursorToEnd(this);\n return;\n }\n else if (event.keyCode == 38) // Up arrow\n {\n if (!currentChoice.hasClass('smarty-suggestion'))\n {\n currentChoice = $('.smarty-suggestion', suggContainer).last().mouseover();\n choiceSelectionIsNew = true;\n }\n\n if (!choiceSelectionIsNew)\n {\n if (currentChoice.prev('.smarty-addr-'+event.data.addr.id()+' .smarty-suggestion').length > 0)\n currentChoice.prev('.smarty-suggestion').mouseover();\n else\n currentChoice.removeClass('smarty-active-suggestion');\n }\n\n moveCursorToEnd(this);\n return;\n }\n });\n\n // Flip the on switch!\n strField.keyup({ form: f, addr: addr, streetField: strField, containerUi: containerUi }, doAutocomplete);\n }\n }\n\n $(document).keyup(function(event) {\n if (event.keyCode == 27) // Esc key\n $('.smarty-autocomplete').closest('.smarty-ui').hide();\n });\n }\n\n // Try .5 and 1.5 seconds after the DOM loads to re-position UI elements; hack for Firefox.\n setTimeout(function() { $(window).resize(); }, 500);\n setTimeout(function() { $(window).resize(); }, 1500);\n }\n }\n\n if (config.submitVerify)\n {\n // Bind to form submits through form submit and submit button click events\n for (var i = 0; i < forms.length; i++)\n {\n var f = forms[i];\n\n submitHandler = function(e)\n {\n // Don't invoke verification if it's already processing or autocomplete is open and the user was pressing Enter to use a suggestion\n if ((e.data.form && e.data.form.processing) || $('.smarty-active-suggestion:visible').length > 0)\n return suppress(e);\n\n /*\n IMPORTANT!\n Prior to version 2.4.8, the plugin would call syncWithDom() at submit-time\n in case programmatic changes were made to the address input fields, including\n browser auto-fills. The sync function would detect those changes and force\n a re-verification to not let invalid addresses through. Unfortunately, this\n frequently caused infinite loops (runaway lookups), ultimately preventing\n form submission, which is unacceptable. As a safety measure to protect our\n customer's subscriptions, we've removed syncWithDom(). The website owner is\n responsible for making sure that any changes to address field values raise the\n \"change\" event on that element. Example: $('#city').val('New City').change();\n */\n\n if (!e.data.form.allActiveAddressesAccepted())\n {\n // We could verify all the addresses at once, but that can overwhelm the user.\n // An API request is usually quick, so let's do one at a time: it's much cleaner.\n var unaccepted = e.data.form.activeAddressesNotAccepted();\n if (unaccepted.length > 0)\n trigger(\"VerificationInvoked\", { address: unaccepted[0], invoke: e.data.invoke, invokeFn: e.data.invokeFn });\n return suppress(e);\n }\n };\n\n // Performs the tricky operation of uprooting existing event handlers that we have references to\n // (either by jQuery's data cache or HTML attributes) planting ours, then laying theirs on top\n var bindSubmitHandler = function(domElement, eventName)\n {\n if (!domElement || !eventName)\n return;\n\n var oldHandlers = [], eventsRef = $._data(domElement, 'events');\n\n // If there are previously-bound-event-handlers (from jQuery), get those.\n if (eventsRef && eventsRef[eventName] && eventsRef[eventName].length > 0)\n {\n // Get a reference to the old handlers previously bound by jQuery\n oldHandlers = $.extend(true, [], eventsRef[eventName]);\n }\n\n // Unbind them...\n $(domElement).unbind(eventName);\n\n // ... then bind ours first ...\n $(domElement)[eventName]({ form: f, invoke: domElement, invokeFn: eventName }, submitHandler);\n\n // ... then bind theirs last:\n // First bind their onclick=\"...\" or onsubmit=\"...\" handles...\n if (typeof domElement['on'+eventName] === 'function')\n {\n var temp = domElement['on'+eventName];\n domElement['on'+eventName] = null;\n $(domElement)[eventName](temp);\n }\n\n // ... then finish up with their old jQuery handles.\n for (var j = 0; j < oldHandlers.length; j++)\n $(domElement)[eventName](oldHandlers[j].data, oldHandlers[j].handler);\n };\n\n // Take any existing handlers (bound via jQuery) and re-bind them for AFTER our handler(s).\n var formSubmitElements = $(config.submitSelector, f.dom);\n\n // Form submit() events are apparently invoked by CLICKING the submit button (even jQuery does this at its core for binding)\n // (but jQuery, when raising a form submit event with .submit() will NOT necessarily click the submit button)\n formSubmitElements.each(function(idx) {\n bindSubmitHandler(this, 'click'); // These get fired first\n });\n\n // These fire after button clicks, so these need to be bound AFTER binding to the submit button click events\n bindSubmitHandler(f.dom, 'submit');\n }\n }\n\n trigger(\"MapInitialized\");\n };\n\n function doAutocomplete(event)\n {\n var addr = event.data.addr;\n var streetField = event.data.streetField;\n var input = $.trim(event.data.streetField.val());\n var containerUi = event.data.containerUi;\n var suggContainer = $('.smarty-autocomplete', containerUi);\n\n if (!input)\n {\n addr.lastStreetInput = input;\n suggContainer.empty();\n containerUi.hide();\n }\n\n if (event.keyCode == 13) // Enter/return\n {\n if ($('.smarty-active-suggestion:visible').length > 0)\n useAutocompleteSuggestion(addr, autocompleteResponse.suggestions[$('.smarty-active-suggestion:visible').first().data('suggIndex')], containerUi);\n containerUi.hide();\n streetField.blur();\n return suppress(event);\n }\n\n if (event.keyCode == 40) // Down arrow\n {\n moveCursorToEnd(streetField[0]);\n return;\n }\n\n if (event.keyCode == 38) // Up arrow\n {\n moveCursorToEnd(streetField[0]);\n return;\n }\n\n if (!input || input == addr.lastStreetInput || !addr.isDomestic())\n return;\n\n addr.lastStreetInput = input; // Used so that autocomplete only fires on real changes (i.e. not just whitespace)\n\n trigger('AutocompleteInvoked', {\n containerUi: containerUi,\n suggContainer: suggContainer,\n streetField: streetField,\n input: input,\n addr: addr\n });\n }\n\n this.requestAutocomplete = function(event, data)\n {\n if (data.input && data.addr.isDomestic() && autocompleteResponse)\n data.containerUi.show();\n\n var autocplrequest = {\n callback: function(counter, json)\n {\n autocompleteResponse = json;\n data.suggContainer.empty();\n\n if (!json.suggestions || json.suggestions.length == 0)\n {\n data.suggContainer.html('<div class=\"smarty-no-suggestions\">No suggestions</div>');\n return;\n }\n\n for (var j = 0; j < json.suggestions.length; j++)\n {\n var link = $('<a href=\"javascript:\" class=\"smarty-suggestion\"><span class=\"glyphicon glyphicon-map-marker\"></span> ' + json.suggestions[j].text.replace(/<|>/g, \"\") + '</a>');\n link.data(\"suggIndex\", j);\n data.suggContainer.append(link);\n }\n\n data.suggContainer.css({\n \"width\": Math.max(data.streetField.outerWidth(), 250) + \"px\"\n });\n\n data.containerUi.show();\n\n // Delete all older callbacks so they don't get executed later because of latency\n autocplRequests.splice(0, counter);\n },\n number: autocplCounter++\n };\n\n autocplRequests[autocplrequest.number] = autocplrequest;\n\n $.getJSON(\"https://autocomplete-api.smartystreets.com/suggest?callback=?\", {\n \"auth-id\": config.key,\n prefix: data.input,\n city_filter: config.cityFilter,\n state_filter: config.stateFilter,\n prefer: config.cityStatePreference,\n suggestions: config.autocomplete,\n geolocate: config.geolocate\n }, function(json)\n {\n trigger(\"AutocompleteReceived\", $.extend(data, {\n json: json,\n autocplrequest: autocplrequest\n }));\n });\n };\n\n this.showAutocomplete = function(event, data)\n {\n if (autocplRequests[data.autocplrequest.number])\n autocplRequests[data.autocplrequest.number].callback(data.autocplrequest.number, data.json);\n };\n\n function useAutocompleteSuggestion(addr, suggestion, containerUi)\n {\n var domfields = addr.getDomFields();\n containerUi.hide(); // It's important that the suggestions are hidden before AddressChanged event fires\n\n if (addr.isFreeform())\n $(domfields['street']).val(suggestion.text).change();\n else\n {\n if(domfields['zipcode'])\n $(domfields['zipcode']).val(\"\").change();\n if (domfields['street'])\n $(domfields['street']).val(suggestion.street_line).change();\n // State filled in before city so autoverify is not invoked without finishing using the suggestion\n if (domfields['state'])\n {\n if(domfields['state'].options) // Checks for dropdown\n {\n for(var i = 0; i < domfields['state'].options.length; i++)\n {\n // Checks for abbreviation match and maps full state name to abbreviation\n if(domfields['state'].options[i].text.toUpperCase() === suggestion.state || allStatesByName[domfields['state'].options[i].text.toUpperCase()] === suggestion.state)\n {\n $(domfields['state'])[0].selectedIndex = i;\n $(domfields['state']).change();\n break;\n }\n }\n }\n else\n $(domfields['state']).val(suggestion.state).change();\n }\n if (domfields['city'])\n $(domfields['city']).val(suggestion.city).change();\n if (domfields['lastline'])\n $(domfields['lastline']).val(suggestion.city + \" \" + suggestion.state).change();\n }\n }\n\n // Computes where the little checkmark tag of the UI goes, relative to the boundaries of the last field\n function uiTagOffset(corners)\n {\n return {\n top: corners.top + corners.height / 2 - 10,\n left: corners.right - 6\n };\n }\n\n // This function is used to find and properly map elements to their field type\n function filterDomElement(domElement, names, labels)\n {\n /*\n Where we look to find a match, in this order:\n name, id, <label> tags, placeholder, title\n Our searches first conduct fairly liberal \"contains\" searches:\n if the attribute even contains the name or label, we map it.\n The names and labels we choose to find are very particular.\n */\n\n var name = lowercase(domElement.name);\n var id = lowercase(domElement.id);\n var selectorSafeID = id.replace(/[\\[|\\]|\\(|\\)|\\:|\\'|\\\"|\\=|\\||\\#|\\.|\\!|\\||\\@|\\^|\\&|\\*]/g, '\\\\\\\\$&');\n var placeholder = lowercase(domElement.placeholder);\n var title = lowercase(domElement.title);\n\n // First look through name and id attributes of the element, the most common\n for (var i = 0; i < names.length; i++)\n if (name.indexOf(names[i]) > -1 || id.indexOf(names[i]) > -1)\n return true;\n\n // If we can't find it in name or id, look at labels associated to the element.\n // Webkit automatically associates labels with form elements for us. But for other\n // browsers, we have to find them manually, which this next block does.\n if (!('labels' in domElement))\n {\n var lbl = $('label[for=\"' + selectorSafeID + '\"]')[0] || $(domElement).parents('label')[0];\n domElement.labels = !lbl ? [] : [lbl];\n }\n\n // Iterate through the <label> tags now to search for a match.\n for (var i = 0; i < domElement.labels.length; i++)\n {\n // This inner loop compares each label value with what we're looking for\n for (var j = 0; j < labels.length; j++)\n if ($(domElement.labels[i]).text().toLowerCase().indexOf(labels[j]) > -1)\n return true;\n }\n\n // Still not found? Then look in \"placeholder\" or \"title\"...\n for (var i = 0; i < labels.length; i++)\n if (placeholder.indexOf(labels[i]) > -1 || title.indexOf(labels[i]) > -1)\n return true;\n\n // Got all the way to here? Probably not a match then.\n return false;\n };\n\n // User aborted the verification process (X click or esc keyup)\n function userAborted(uiPopup, e)\n {\n // Even though there may be more than one bound, and this disables the others,\n // this is for simplicity: and I figure, it won't happen too often.\n // (Otherwise \"Completed\" events are raised by pressing Esc even if nothing is happening)\n $(document).unbind('keyup');\n $(uiPopup).slideUp(defaults.speed, function() { $(this).parent('.smarty-ui').remove(); });\n trigger(\"Completed\", e.data);\n }\n\n // When we're done with a \"pop-up\" where the user chooses what to do,\n // we need to remove all other events bound on that whole \"pop-up\"\n // so that it doesn't interfere with any future \"pop-ups\".\n function undelegateAllClicks(selectors)\n {\n for (var selector in selectors)\n $('body').undelegate(selectors[selector], 'click');\n }\n\n // Utility function\n function moveCursorToEnd(el) // Courtesy of http://css-tricks.com/snippets/javascript/move-cursor-to-end-of-input/\n {\n if (typeof el.selectionStart == \"number\")\n el.selectionStart = el.selectionEnd = el.value.length;\n else if (typeof el.createTextRange != \"undefined\")\n {\n el.focus();\n var range = el.createTextRange();\n range.collapse(false);\n range.select();\n }\n }\n\n\n // If anything was previously mapped, this resets it all for a new mapping.\n this.clean = function()\n {\n if (forms.length == 0)\n return;\n\n if (config.debug)\n console.log(\"Cleaning up old form map data and bindings...\");\n\n // Spare none alive!\n\n for (var i = 0; i < forms.length; i++)\n {\n $(forms[i].dom).data(mapMeta.formDataProperty, '');\n\n // Clean up each form's DOM by resetting the address fields to the way they were\n for (var j = 0; j < forms[i].addresses.length; j++)\n {\n var doms = forms[i].addresses[j].getDomFields();\n for (var prop in doms)\n {\n if (config.debug)\n $(doms[prop]).css('background', 'none').attr('placeholder', '');\n $(doms[prop]).unbind('change');\n }\n if (doms['street'])\n $(doms['street']).unbind('keyup').unbind('keydown').unbind('blur');\n }\n\n // Unbind our form submit and submit-button click handlers\n $.each(forms, function(idx) { $(this.dom).unbind('submit', submitHandler); });\n $(config.submitSelector, forms[i].dom).each(function(idx) { $(this).unbind('click', submitHandler); });\n }\n\n $('.smarty-ui').undelegate('.smarty-suggestion', 'click').undelegate('.smarty-suggestion', 'mouseover').undelegate('.smarty-suggestion', 'mouseleave').remove();\n $('body').undelegate('.smarty-undo', 'click');\n $('body').undelegate('.smarty-tag-grayed', 'click');\n $(window).unbind('resize');\n $(document).unbind('keyup');\n\n forms = [];\n mappedAddressCount = 0;\n\n if (config.debug)\n console.log(\"Done cleaning up; ready for new mapping.\");\n };\n\n function disableBrowserAutofill(dom) {\n //Does not disable autofill if config.autocomplete is disabled\n if(config.autocomplete > 0) {\n for (var i = 0; i < dom.getElementsByTagName(\"input\").length; i++) {\n dom.getElementsByTagName(\"input\")[i].autocomplete = \"smartystreets\";\n }\n }\n }\n\n function addDefaultToStateDropdown(dom) {\n if (dom.getElementsByTagName(\"option\").length > 0) {\n if (arrayContains(stateNames, dom.getElementsByTagName(\"option\")[0].text.toUpperCase()) ||\n arrayContains(stateAbbreviations, dom.getElementsByTagName(\"option\")[0].text.toUpperCase())) {\n var option = document.createElement(\"OPTION\");\n option.innerText = \"State\";\n option.selected = true;\n $(dom.getElementsByTagName(\"select\")[0]).prepend(option);\n $(dom).change();\n }\n }\n }\n\n // ** AUTOMAPPING ** //\n this.automap = function(context)\n {\n if (config.debug)\n console.log(\"Automapping fields...\");\n\n this.clean();\n\n //$('form').add($('iframe').contents().find('form')).each(function(idx) // Include forms in iframes, but they must be hosted on same domain (and iframe must have already loaded)\n $('form').each(function(idx) // For each form ...\n {\n var form = new Form(this);\n var potential = {};\n\n // Look for each type of field in this form\n for (var fieldName in mapMeta.identifiers)\n {\n var names = mapMeta.identifiers[fieldName].names;\n var labels = mapMeta.identifiers[fieldName].labels;\n\n // Find matching form elements and store them away\n potential[fieldName] = $(config.fieldSelector, this)\n .filter(function()\n {\n // This potential address input element must be within the user's set of selected elements\n return $(context).has(this).length > 0; // (Using has() is compatible with as low as jQuery 1.4)\n })\n .filter(':visible') // No \"hidden\" input fields allowed\n .filter(function()\n {\n var name = lowercase(this.name), id = lowercase(this.id);\n\n // \"Street address line 1\" is a special case because \"address\" is an ambiguous\n // term, so we pre-screen this field by looking for exact matches.\n if (fieldName == \"streets\")\n {\n for (var i = 0; i < mapMeta.street1exacts.names.length; i++)\n if (name == mapMeta.street1exacts.names[i] || id == mapMeta.street1exacts.names[i])\n return true;\n }\n\n // Now perform the main filtering.\n // If this is TRUE, then this form element is probably a match for this field type.\n var filterResult = filterDomElement(this, names, labels);\n\n if (fieldName == \"streets\")\n {\n // Looking for \"address\" is a very liberal search, so we need to see if it contains another\n // field name, too... this helps us find freeform addresses (SLAP).\n var otherFields = [\"secondary\", \"city\", \"state\", \"zipcode\", \"country\", \"lastline\"];\n for (var i = 0; i < otherFields.length; i ++)\n {\n // If any of these filters turns up true, then it's\n // probably neither a \"street\" field, nor a SLAP address.\n if (filterDomElement(this, mapMeta.identifiers[otherFields[i]].names,\n mapMeta.identifiers[otherFields[i]].labels))\n return false;\n }\n }\n\n return filterResult;\n })\n .not(function()\n {\n // The filter above can be a bit liberal at times, so we need to filter out\n // results that are actually false positives (fields that aren't part of the address)\n // Returning true from this function excludes the element from the result set.\n var name = lowercase(this.name), id = lowercase(this.id);\n if (name == \"name\" || id == \"name\") // Exclude fields like \"First Name\", et al.\n return true;\n return filterDomElement(this, mapMeta.exclude.names, mapMeta.exclude.labels);\n })\n .toArray();\n }\n\n // Now prepare to differentiate between street1 and street2.\n potential.street = [], potential.street2 = [];\n\n // If the ratio of 'street' fields to the number of addresses in the form\n // (estimated by number of city or zip fields) is about the same, it's all street1.\n if (potential.streets.length <= potential.city.length * 1.5\n || potential.streets.length <= potential.zipcode.length * 1.5)\n {\n potential.street = potential.streets;\n }\n else\n {\n // Otherwise, differentiate between the two\n for (var i = 0; i < potential.streets.length; i++)\n {\n // Try to map it to a street2 field first. If it fails, it's street1.\n // The second condition is for naming schemes like \"street[]\" or \"address[]\", where the names\n // are the same: the second one is usually street2.\n var current = potential.streets[i];\n if (filterDomElement(current, mapMeta.street2.names, mapMeta.street2.labels)\n || (i > 0 && current.name == potential.streets[i-1].name))\n {\n // Mapped it to street2\n potential.street2.push(current);\n }\n else // Could not map to street2, so put it in street1\n potential.street.push(current);\n }\n }\n\n delete potential.streets; // No longer needed; we've moved them into street/street2.\n\n if (config.debug)\n console.log(\"For form \" + idx + \", the initial scan found these fields:\", potential);\n\n\n\n // Now organize the mapped fields into addresses\n\n // The number of addresses will be the number of street1 fields,\n // and in case we support it in the future, maybe street2, or\n // in case a mapping went a little awry.\n var addressCount = Math.max(potential.street.length, potential.street2.length);\n\n if (config.debug && addressCount == 0)\n console.log(\"No addresses were found in form \" + idx + \".\");\n\n for (var i = 0; i < addressCount; i++)\n {\n var addrObj = {};\n for (var field in potential)\n {\n var current = potential[field][i];\n if (current)\n addrObj[field] = current;\n }\n\n // Don't map the address if there's not enough fields for a complete address\n var hasCityAndStateOrZip = addrObj.zipcode || (addrObj.state && addrObj.city);\n var hasCityOrStateOrZip = addrObj.city || addrObj.state || addrObj.zipcode;\n if ((!addrObj.street && hasCityAndStateOrZip) || (addrObj.street && !hasCityAndStateOrZip && hasCityOrStateOrZip))\n {\n if (config.debug)\n console.log(\"Form \" + idx + \" contains some address input elements that could not be resolved to a complete address.\");\n continue;\n }\n\n form.addresses.push(new Address(addrObj, form, \"auto\" + (++mappedAddressCount)));\n }\n\n // Save the form we just finished mapping\n disableBrowserAutofill(form.dom);\n addDefaultToStateDropdown(form.dom);\n forms.push(form);\n\n if (config.debug)\n console.log(\"Form \" + idx + \" is finished:\", form);\n });\n\n if (config.debug)\n console.log(\"Automapping complete.\");\n\n trigger(\"FieldsMapped\");\n };\n\n\n // ** MANUAL MAPPING ** //\n this.mapFields = function(map, context)\n {\n // \"map\" should be an array of objects mapping field types\n // to a field by selector, all supplied by the user.\n // \"context\" should be the set of elements in which fields will be mapped\n // Context can be acquired like: $('#something').not('#something-else').LiveAddress( ... ); ...\n\n if (config.debug)\n console.log(\"Manually mapping fields given this data:\", map);\n\n this.clean();\n var formsFound = [];\n map = map instanceof Array ? map : [map];\n\n for (var addrIdx in map)\n {\n var address = map[addrIdx];\n\n if (!address.street)\n continue;\n\n // Convert selectors into actual DOM references\n for (var fieldType in address)\n {\n if (fieldType != \"id\")\n {\n if (!arrayContains(acceptableFields, fieldType))\n { // Make sure the field name is allowed\n if (config.debug)\n console.log(\"NOTICE: Field named \" + fieldType + \" is not allowed. Skipping...\");\n delete address[fieldType];\n continue;\n }\n var matched = $(address[fieldType], context);\n if (matched.length == 0)\n { // Don't try to map an element that couldn't be matched or found at all\n if (config.debug)\n console.log(\"NOTICE: No matches found for selector \" + address[fieldType] + \". Skipping...\");\n delete address[fieldType];\n continue;\n }\n else if (matched.parents('form').length == 0)\n { // We should only map elements inside a <form> tag; otherwise we can't bind to submit handlers later\n if (config.debug)\n console.log(\"NOTICE: Element with selector \\\"\" + address[fieldType] + \"\\\" is not inside a <form> tag. Skipping...\");\n delete address[fieldType];\n continue;\n }\n else\n address[fieldType] = matched[0];\n }\n }\n\n if (!((address.street) && (((address.city) && (address.state)) || (address.zipcode) || (address.lastline)\n || (!address.street2 && !address.city && !address.state && !address.zipcode && !address.lastline))))\n {\n if (config.debug)\n console.log(\"NOTICE: Address map (index \"+addrIdx+\") was not mapped to a complete street address. Skipping...\");\n continue;\n }\n\n // Acquire the form based on the street address field (the required field)\n var formDom = $(address.street).parents('form')[0];\n var form = new Form(formDom);\n\n // Persist a reference to the form if it wasn't acquired before\n if (!$(formDom).data(mapMeta.formDataProperty))\n {\n // Mark the form as mapped then add it to our list\n $(formDom).data(mapMeta.formDataProperty, 1);\n disableBrowserAutofill(form.dom);\n addDefaultToStateDropdown(form.dom);\n formsFound.push(form);\n }\n else\n {\n // Find the form in our list since we already put it there\n for (var i = 0; i < formsFound.length; i++)\n {\n if (formsFound[i].dom == formDom)\n {\n form = formsFound[i];\n break;\n }\n }\n }\n\n // Add this address to the form\n mappedAddressCount ++;\n form.addresses.push(new Address(address, form, address.id));\n\n if (config.debug)\n console.log(\"Finished mapping address with ID: \"+form.addresses[form.addresses.length-1].id());\n }\n\n forms = formsFound;\n trigger(\"FieldsMapped\");\n };\n\n\n this.disableFields = function(address)\n {\n // Given an address, disables the input fields for the address, also the submit button\n if (!config.ui)\n return;\n\n var fields = address.getDomFields();\n for (var field in fields)\n $(fields[field]).prop ? $(fields[field]).prop('disabled', true) : $(fields[field]).attr('disabled', 'disabled');\n\n // Disable submit buttons\n if (address.form && address.form.dom)\n {\n var buttons = $(config.submitSelector, address.form.dom);\n buttons.prop ? buttons.prop('disabled', true) : buttons.attr('disabled', 'disabled');\n }\n };\n\n this.enableFields = function(address)\n {\n // Given an address, re-enables the input fields for the address\n if (!config.ui)\n return;\n\n var fields = address.getDomFields();\n for (var field in fields)\n $(fields[field]).prop ? $(fields[field]).prop('disabled', false) : $(fields[field]).removeAttr('disabled');\n\n // Enable submit buttons\n if (address.form && address.form.dom)\n {\n var buttons = $(config.submitSelector, address.form.dom);\n buttons.prop ? buttons.prop('disabled', false) : buttons.removeAttr('disabled');\n }\n };\n\n this.showLoader = function(addr)\n {\n if (!config.ui || !addr.hasDomFields())\n return;\n\n // Get position information now instead of earlier in case elements shifted since page load\n var lastFieldCorners = addr.corners(true);\n var loaderUI = $('.smarty-dots.smarty-addr-'+addr.id()).parent();\n\n loaderUI.css(\"top\", (lastFieldCorners.top + lastFieldCorners.height / 2 - loaderHeight / 2) + \"px\")\n .css(\"left\", (lastFieldCorners.right - loaderWidth - 10) + \"px\");\n $('.smarty-dots', loaderUI).show();\n };\n\n this.hideLoader = function(addr)\n {\n if (config.ui)\n $('.smarty-dots.smarty-addr-'+addr.id()).hide();\n };\n\n this.markAsValid = function(addr)\n {\n if (!config.ui || !addr)\n return;\n\n var domTag = $('.smarty-tag.smarty-tag-grayed.smarty-addr-'+addr.id());\n domTag.removeClass('smarty-tag-grayed').addClass('smarty-tag-green').attr(\"title\", \"Address verified! Click to undo.\");\n $('.smarty-tag-text', domTag).text('Verified').hover(function () {\n $(this).text('Undo');\n }, function() {\n $(this).text('Verified');\n }).addClass('smarty-undo');\n };\n\n this.unmarkAsValid = function(addr)\n {\n var validSelector = '.smarty-tag.smarty-addr-'+addr.id();\n if (!config.ui || !addr || $(validSelector).length == 0)\n return;\n\n var domTag = $('.smarty-tag.smarty-tag-green.smarty-addr-'+addr.id());\n domTag.removeClass('smarty-tag-green').addClass('smarty-tag-grayed').attr(\"title\", \"Address not verified. Click to verify.\");\n $('.smarty-tag-text', domTag).text('Verify').unbind('mouseenter mouseleave').removeClass('smarty-undo');\n };\n\n this.showAmbiguous = function(data)\n {\n if (!config.ui || !data.address.hasDomFields())\n return;\n\n var addr = data.address;\n var response = data.response;\n var corners = addr.corners();\n corners.width = Math.max(corners.width, 300); // minimum width\n corners.height = Math.max(corners.height, response.length * 63 + 119); // minimum height\n\n var html = '<div class=\"smarty-ui\" style=\"top: '+corners.top+'px; left: '+corners.left+'px; width: '+corners.width+'px; height: '+corners.height+'px;\">'\n + '<div class=\"smarty-popup smarty-addr-'+addr.id()+'\" style=\"width: '+(corners.width - 6)+'px; height: '+(corners.height - 3)+'px;\">'\n + '<div class=\"smarty-popup-header smarty-popup-ambiguous-header\">'+config.ambiguousMessage+'<a href=\"javascript:\" class=\"smarty-popup-close smarty-abort\" title=\"Cancel\"><span class=\"glyphicon glyphicon-remove-circle\"></span></a></div>'\n + '<div class=\"smarty-choice-list\">';\n\n for (var i = 0; i < response.raw.length; i++)\n {\n var line1 = response.raw[i].delivery_line_1, city = response.raw[i].components.city_name,\n st = response.raw[i].components.state_abbreviation,\n zip = response.raw[i].components.zipcode + \"-\" + response.raw[i].components.plus4_code;\n html += '<a href=\"javascript:\" class=\"smarty-choice\" data-index=\"'+i+'\">'+line1+'<br>'+city+', '+st+' '+zip+'</a>';\n }\n\n html += '</div><div class=\"smarty-choice-alt\">';\n html += '<a href=\"javascript:\" class=\"btn btn-primary smarty-choice smarty-choice-abort smarty-abort\">Click here to change your address</a>';\n html += '<a href=\"javascript:\" class=\"smarty-choice smarty-choice-override\">Click here to certify the address is correct<br>('+addr.toString()+')</a>';\n html += '</div></div></div>';\n $(html).hide().appendTo('body').show(defaults.speed);\n\n // Scroll to it if needed\n if ($(document).scrollTop() > corners.top - 100\n || $(document).scrollTop() < corners.top - $(window).height() + 100)\n {\n $('html, body').stop().animate({\n scrollTop: $('.smarty-popup.smarty-addr-'+addr.id()).offset().top - 100\n }, 500);\n }\n\n data.selectors = {\n goodAddr: '.smarty-popup.smarty-addr-'+addr.id()+' .smarty-choice-list .smarty-choice',\n useOriginal: '.smarty-popup.smarty-addr-'+addr.id()+' .smarty-choice-override',\n abort: '.smarty-popup.smarty-addr-'+addr.id()+' .smarty-abort'\n };\n\n // User chose a candidate address\n $('body').delegate(data.selectors.goodAddr, 'click', data, function(e)\n {\n $('.smarty-popup.smarty-addr-'+addr.id()).slideUp(defaults.speed, function()\n {\n $(this).parent('.smarty-ui').remove();\n $(this).remove();\n });\n\n undelegateAllClicks(e.data.selectors);\n delete e.data.selectors;\n\n trigger(\"UsedSuggestedAddress\", {\n address: e.data.address,\n response: e.data.response,\n invoke: e.data.invoke,\n invokeFn: e.data.invokeFn,\n chosenCandidate: response.raw[$(this).data('index')]\n });\n });\n\n // User wants to revert to what they typed (forced accept)\n $('body').delegate(data.selectors.useOriginal, 'click', data, function(e)\n {\n $(this).parents('.smarty-popup').slideUp(defaults.speed, function()\n {\n $(this).parent('.smarty-ui').remove();\n $(this).remove();\n });\n\n undelegateAllClicks(e.data.selectors);\n delete e.data.selectors;\n trigger(\"OriginalInputSelected\", e.data);\n });\n\n // User presses Esc key\n $(document).keyup(data, function(e)\n {\n if (e.keyCode == 27) //Esc\n {\n undelegateAllClicks(e.data.selectors);\n delete e.data.selectors;\n userAborted($('.smarty-popup.smarty-addr-'+e.data.address.id()), e);\n suppress(e);\n }\n });\n\n // User clicks \"x\" in corner or chooses to try a different address (same effect as Esc key)\n $('body').delegate(data.selectors.abort, 'click', data, function(e)\n {\n undelegateAllClicks(e.data.selectors);\n delete e.data.selectors;\n userAborted($(this).parents('.smarty-popup'), e);\n });\n };\n\n\n this.showInvalid = function(data)\n {\n if (!config.ui || !data.address.hasDomFields())\n return;\n\n var addr = data.address;\n var response = data.response;\n var corners = addr.corners();\n corners.width = Math.max(corners.width, 300); // minimum width\n corners.height = Math.max(corners.height, 180); // minimum height\n\n var html = '<div class=\"smarty-ui\" style=\"top: '+corners.top+'px; left: '+corners.left+'px; width: '+corners.width+'px; height: '+corners.height+'px;\">'\n + '<div class=\"smarty-popup smarty-addr-'+addr.id()+'\" style=\"width: '+(corners.width - 6)+'px; height: '+(corners.height - 3)+'px;\">'\n + '<div class=\"smarty-popup-header smarty-popup-invalid-header\">'+config.invalidMessage+'<a href=\"javascript:\" class=\"smarty-popup-close smarty-abort\" title=\"Cancel\"><span class=\"glyphicon glyphicon-remove-circle\"></span></a></div>'\n + '<div class=\"smarty-choice-alt\"><a href=\"javascript:\" class=\"btn btn-primary smarty-choice smarty-choice-abort smarty-abort\">Click here to change your address</a></div>'\n + '<div class=\"smarty-choice-alt\"><a href=\"javascript:\" class=\"smarty-choice smarty-choice-override\">Click here to certify the address is correct<br>('+addr.toString()+')</a></div>'\n + '</div></div>';\n\n $(html).hide().appendTo('body').show(defaults.speed);\n\n data.selectors = {\n useOriginal: '.smarty-popup.smarty-addr-'+addr.id()+' .smarty-choice-override ',\n abort: '.smarty-popup.smarty-addr-'+addr.id()+' .smarty-abort'\n }\n\n // Scroll to it if necessary\n if ($(document).scrollTop() > corners.top - 100\n || $(document).scrollTop() < corners.top - $(window).height() + 100)\n {\n $('html, body').stop().animate({\n scrollTop: $('.smarty-popup.smarty-addr-'+addr.id()).offset().top - 100\n }, 500);\n }\n\n // User rejects original input and agrees to double-check it\n $('body').delegate(data.selectors.abort, 'click', data, function(e)\n {\n userAborted('.smarty-popup.smarty-addr-'+e.data.address.id(), e);\n delete e.data.selectors;\n trigger(\"InvalidAddressRejected\", e.data);\n });\n\n // User certifies that what they typed is correct\n $('body').delegate(data.selectors.useOriginal, 'click', data, function(e)\n {\n userAborted('.smarty-popup.smarty-addr-'+e.data.address.id(), e);\n delete e.data.selectors;\n trigger(\"OriginalInputSelected\", e.data);\n });\n\n // User presses esc key\n $(document).keyup(data, function(e)\n {\n if (e.keyCode == 27) //Esc\n {\n $(data.selectors.abort).click();\n undelegateAllClicks(e.data.selectors);\n userAborted('.smarty-popup.smarty-addr-'+e.data.address.id(), e);\n }\n });\n };\n\n this.isDropdown = function(dom)\n {\n return dom && ((dom.tagName || dom.nodeName || \"\").toUpperCase() == \"SELECT\");\n };\n }", "title": "" }, { "docid": "9ba54f8b247ec2eba60a9a340e5dc468", "score": "0.49979076", "text": "render() {\n return <DumbTaskForm \n form={this.state}\n handleSubmit={this.handleSubmit}\n handleDate={this.handleDate}\n handleChange={this.handleChange}\n />;\n }", "title": "" }, { "docid": "a48c319e6965f57254c90e7b76ce675c", "score": "0.49953288", "text": "function BuildForm() {\n\n // Answer options and questions\n var ansOptions = ['a', 'b', 'c', 'd'];\n var questions =\n [\n {\n question: \"What year was it that the Census Bureau first reported that a majority of new mothers were remaining in the new job market?\",\n choices: [\"1968\", \"1978\", \"1988\", \"1970\"]\n },\n\n {\n question: \"In the year 1900 in the U.S. what were the most popular first names given to boy and girl babies?\",\n choices: [\"William and Elizabeth\", \"Joseph and Catherine\", \"John and Mary\", \"George and Anne\"]\n },\n\n {\n question: \"Which of the following items was owned by the fewest U.S. homes in 1990?\",\n choices: [\"home computer\", \"compact disk player\", \"cordless phone\", \"dishwasher\"]\n },\n\n {\n question: \"Who holds the record for the most victories in a row on the professional golf tour?\",\n choices: [\"Jack Nicklaus\", \"Arnold Palmer\", \"Byron Nelson\", \"Ben Hogan\"]\n },\n\n {\n question: \"What did the D in D-Day stand for?\",\n choices: [\"doom\", \"day\", \"Dwight\", \"Dunkirk\"]\n },\n\n {\n question: \"The Brownie Box Camera introduced by Eastman Kodak in 1900 had a retail price of what?\",\n choices: [\"$1\", \"$5\", \"$10\", \"$20\"]\n },\n \n {\n question: \"Which of these characters turned 40 years old in 1990?\",\n choices: [\"Charlie Brown\", \"Bugs Bunny\", \"Mickey Mouse\", \"Fred Flintstone\"]\n },\n \n {\n question: \"The Philadelphia mint started putting a P mint mark on quarters when?\",\n choices: [\"1960\", \"1980\", \"never\", \"1956\"]\n },\n \n {\n question: \"When Mt. St. Helens erupted on May 18, 1980, how many people were killed?\",\n choices: [\"1\", \"57\", \"571\", \"50\"]\n }, \n \n {\n question: \"In J. Edgar Hoover, what did the J stand for?\",\n choices: [\"James\", \"John\", \"Joseph\", \"Jack\"]\n }, \n \n {\n question: \"The Daniel Boon museum at the home where he died can best be described how?\",\n choices: [\"a log cabin in Kentucky\", \"a two-story clapboard house in Tennessee\", \"a four-story Georgian-style home in Missouri\", \"a three story brick house in Arkansas\"],\n },\n \n {\n question: \"Who is third behind Hank Aaron and Babe Ruth in major league career home runs?\",\n choices: [\"Reggie Jackson\",\"Harmon Killebrew\", \"Willie Mays\", \"Frank Robinson\"]\n }\n ];\n \n //Count down display\n $(\"#displayTime\").text(\"Time Remaining: \" + time);\n\n // Access the form\n var frm = $('form[name=\"quizForm\"');\n\n // Add all the questions and multiple choice options to form\n for (var i = 0; i < questions.length; i++) {\n $(\"<h3/>\", {\n text: questions[i].question\n }).appendTo(frm);\n\n var options = questions[i].choices;\n console.log(options);\n for (var j = 0; j < options.length; j++) {\n var x = $('<input type=\"radio\" name=q' + i + ' value=' + ansOptions[j] + '>' + options[j] + '</input>');\n frm.append(x);\n\n }\n var br = $('<br><br>')\n frm.append(br);\n }\n\n // Add the submit button to the form\n frm.append('<br><br>');\n var submitBtn = $('<input type=\"submit\" value=\"Submit Answers\"/>');\n frm.append(submitBtn);\n\n}", "title": "" }, { "docid": "e46c63072da925b06f714e5cc8b1a37e", "score": "0.49920484", "text": "function setupForm(ref,formData){\n const { getByTestId } = render(<SignupForm ref={ref} dispatchFormData={jest.fn()}/>);\n fireEvent.change(getByTestId(\"firstNameField\"), { target: { value: formData.firstName }});\n fireEvent.change(getByTestId(\"emailField\"), { target: { value: formData.email }});\n fireEvent.change(getByTestId(\"passwordField\"), { target: { value: formData.password }});\n fireEvent.click(getByTestId(\"button\"))\n return getByTestId;\n}", "title": "" }, { "docid": "767c9b8210c651ea22ab75accf0d7985", "score": "0.49901277", "text": "initializeForm(templateName, form) {\n if (templateName !== null) {\n this.disableFormDOM(this.scanResultsArea, true);\n this.updateRandomValues(templateName, form)\n .then(resultForm => {\n this.setFormData(resultForm);\n this.setFormDOM();\n this.setupRemoveFromStorageEvents(templateName);\n this.setupRemoveFromDOMEvents();\n this.rebuildDOM();\n this.setupFocusoutEvent(templateName);\n this.setupTemplateSelectorChangeEvent(templateName);\n this.setupTemplateSelectorsValues(templateName, resultForm);\n this.disableFormDOM(this.scanResultsArea, false);\n });\n }\n }", "title": "" }, { "docid": "069c2b9ce24a0baafa615fffebcbde0e", "score": "0.4989271", "text": "function addTest()\n {\n App.prototype.unitTests[template] = function ()\n {\n return {\n init : function ()\n {\n test(\"global masthead structure\", function()\n {\n ok($('#masthead_container'), \"masthead_container exists\");\n ok($('#global_masthead'), \"global_masthead exists\");\n ok($('#global_masthead h2'), \"global_masthead h2 exists\");\n ok($('#global_masthead h2 span#data_chapter_number').length > 0, \"global_masthead h2 span#data_chapter_number exists\");\n ok($('#global_masthead h2 span#data_chapter_name').length > 0, \"global_masthead h2 span#data_chapter_name exists\");\n ok($('#global_masthead h3').length > 0, \"global_masthead h3 exists\");\n ok($('#global_masthead h3 span#data_chapter_description').length > 0, \"global_masthead h3 span#data_chapter_description exists\");\n });\n \n test(\"global navigation structure\", function()\n {\n ok($('#navigation_container'), \"navigation_container exists\");\n \n $('#menu_button').trigger('click');\n ok($('#page_array_container').css('display') === 'block', \"menu showing\");\n \n $('#nav_menu_close').trigger('click');\n ok($('#page_array_container').css('display') === 'none', \"menu hiding\");\n });\n \n test(\"contextual glossary check\", function()\n {\n\n \n // Get all contextual glossary items\n var contextualGlossary = $('.contextual_glossary');\n \n if (contextualGlossary.length > 0) {\n // Get expected values\n var glossaryData = app.glossary.getData();\n \n // Click each, and check the values against expected values\n $.each(contextualGlossary, function (linkIndex, linkValue)\n {\n var expectedDefinition,\n expectedTerm,\n tempDOMHolder = $('<span>');\n \n $.each(glossaryData.terms, function (glossaryIndex, glossaryValue)\n {\n // Put glossaryValue.name in a DOM element to convert it's HTML entities\n $(tempDOMHolder).html(glossaryValue.name);\n \n if ($(tempDOMHolder).html() === $(linkValue).html()) {\n expectedDefinition = glossaryValue.description[0];\n expectedTerm = $(tempDOMHolder).html();\n \n // Click the contextual glossary link\n $(contextualGlossary[linkIndex]).trigger('click');\n }\n \n });\n \n ok($('#Glossary.contextual_view').length > 0, \"contextual glossary opened\");\n ok($('#data_glossary h3').html(), \"<h3> has data: \" + $('#data_glossary h3').html());\n ok($('#data_glossary p').html(), \"<p> has data: \" + $('#data_glossary p').html());\n ok($('#data_glossary h3').html() === expectedTerm, \"expected contextual glossary term: \" + expectedTerm + \", found: \" + $('#data_glossary h3').html());\n ok($('#data_glossary p').html() === expectedDefinition, \"expected contextual glossary definition: \" + expectedDefinition + \", found: \" + $('#data_glossary p').html());\n \n // Click the document (close the link)\n $(document).trigger('click');\n \n ok($('#Glossary.contextual_view').length === 0, \"contextual glossary closed\");\n });\n }\n });\n }\n };\n };\n }", "title": "" }, { "docid": "de438d22dacc604f71cccb520660c6e8", "score": "0.49779004", "text": "render() {\n // Return what you want the form to look like using components from `jsx/Form.js`\n return (\n <FormElement\n name='addListItem'\n id='addListItem'\n onSubmit={this.handleSubmit}\n >\n <TextboxElement\n name='itemID'\n label='Item ID'\n value={this.state.formData.itemID}\n onUserInput={this.setFormData}\n required={true}\n />\n <StaticElement\n label='UI type'\n text={this.state.uiType[this.props.uiType]}\n />\n <TextboxElement\n name='question'\n label='Question text'\n value={this.state.formData.question}\n onUserInput={this.setFormData}\n required={true}\n />\n <TextboxElement\n name='description'\n label='Description'\n value={this.state.formData.description}\n onUserInput={this.setFormData}\n />\n <SelectElement\n name='selectedType'\n label='Data type'\n options={this.state.dataType}\n value={this.state.formData.selectedType}\n onUserInput={this.setFormData}\n required={true}\n />\n <StaticElement\n label='Field options:'\n />\n {this.renderFieldOptions()}\n <CheckboxElement\n name='multipleChoice'\n label='Allow multiple values'\n value={this.state.formData.options.multipleChoice}\n onUserInput={this.setCheckbox}\n />\n <TextboxElement\n name='branching'\n label='Branching formula'\n value={this.state.formData.rules.branching}\n onUserInput={this.setRules}\n />\n <TextboxElement\n name='scoring'\n label='Scoring formula'\n value={this.state.formData.rules.scoring}\n onUserInput={this.setRules}\n />\n <CheckboxElement\n name='requiredValue'\n label='Required item'\n value={this.state.formData.options.requiredValue}\n onUserInput={this.setCheckbox}\n />\n <ButtonElement\n name='submit'\n type='submit'\n label='Add item'\n />\n </FormElement>\n );\n }", "title": "" }, { "docid": "ac1161cae07378c8fc48ca482cbd6a42", "score": "0.49759793", "text": "function FormProxy() {}", "title": "" }, { "docid": "3aba0cad1a6d108f47373934ba126830", "score": "0.4973337", "text": "function setUpTestData(){\n ac.components.push({'title':'Angular','value':'use angular for front end javascript '});\n ac.components.push({'title':'Node','value':'use to install project compnents'});\n ac.components.push({'title':'Grunt','value':'use at front end build tool, might migrate to gradle at a later date'});\n ac.components.push({'title':'Bootstrap UI','value':'avoid using jquery -- stick with jquery lite'});\n ac.components.push({'title':'Tomcat','value':'Currently using -- will migrate to cloud.. probably Azure'});\n ac.components.push({'title':'JsHint','value':'Javascript Code Cleanup'});\n ac.components.push({'title':'Database','value':'Yet to be determined'});\n ac.components.push({'title':'Accessibility','value':'NgAria -- yet to be implemented'});\n ac.components.push({'title':'Mobile','value':'Use Responsive Code Techniques and test before checkins.'});\n }", "title": "" }, { "docid": "bfd8bca4b1b2ada93426f61c28124f42", "score": "0.49649626", "text": "build() {\n if (!this._formElement) {\n return;\n }\n\n this._buildCustomDropDown();\n this._buildSubmit();\n\n this._formValidator.enableValidation();\n }", "title": "" }, { "docid": "0f505d15d30d5aa20e81f24970b726a2", "score": "0.4961408", "text": "_getFormType() {\n return t.struct({\n title__c: t.String,\n facilitator_1__c: t.String,\n facilitator_2__c: t.maybe(t.String),\n start_date__c: t.Date,\n end_date__c: t.Date,\n });\n }", "title": "" }, { "docid": "8ead74807731c1c8055ca023b4540724", "score": "0.4960911", "text": "function setUnitAndUnitype(form,unitsType1,selectedValue,units1,previousValue){\n\tvar c=abWasteTrackStorageController;\n\tvar res=\"bill_unit.bill_type_id='\"+selectedValue+\"' \";\n\tvar records=c.abWasteDefMainfestsUnit.getRecords(res);\n\tvar dataRes=\"bill_unit.bill_type_id='\"+selectedValue+\"'\";\n\tvar record='';\n\tvar unit='';\n\tif(records!=''){\n\t\trecord =records[0];\n\t\tunit=record.getValue('bill_unit.bill_unit_id');\n\t}\n\tfillList('abWasteDefMainfestsType',unitsType1,'bill_type.bill_type_id',selectedValue);\n\tif(form.newRecord||(selectedValue!=previousValue&&previousValue!='')){\n\t\tif(record==''){\n\t\t\tfillList('abWasteDefMainfestsUnit',units1,'bill_unit.bill_unit_id','',dataRes);\n\t\t}else{\n\t\t\tfillList('abWasteDefMainfestsUnit',units1,'bill_unit.bill_unit_id',unit,dataRes);\n\t\t}\n\t}else{\n\t\tfillList('abWasteDefMainfestsUnit',units1,'bill_unit.bill_unit_id',form.getFieldValue('waste_out.units'),dataRes);\n\t}\n}", "title": "" }, { "docid": "e7b4c1eb5f621415a553198652a98c2c", "score": "0.49527428", "text": "function watchForm() {\n urbanAreasDropdown();\n startOver();\n setupDropdownSubmit();\n setupSecondaryDropdownSubmit();\n updateDOM();\n}", "title": "" }, { "docid": "1b96502a132986ac3bd16d933ee8c294", "score": "0.4949738", "text": "build () { }", "title": "" }, { "docid": "6ed681a4a887831ef1ed24222af7d66f", "score": "0.49416244", "text": "embedForm() {\n\t\tlet self = this\n\t\tlet form\n\t\tlet rs = this.readyState\n\t\tif (rs && rs !== 'complete' && rs !== 'loaded') {\n\t\t\treturn\n\t\t}\n\t\ttry {\n\t\t\tform = new window.WufooForm()\n\t\t\tform.initialize(self.props)\n\t\t\tform.display()\n\t\t} catch (e) {\n\t\t\tthrow e\n\t\t}\n\t}", "title": "" }, { "docid": "723cddb1862e07b1340dd94591985ea9", "score": "0.4936557", "text": "function main() {\n\t\t\thtmlModule = new htmlUtil(); // View creation / HTML logic\n\t\t\tarrModule = new arrMethods(); // Array Method shortcuts\n\t\t\tmsg = htmlModule.msg; // Logging\n\t\t\tmsg.set(\"Starting Module\");\n\n\t\t\t// Setup Form.\n\t\t\tsquareForm();\n\t\t}", "title": "" }, { "docid": "ce18f29c5307a1dfabe3003368044fa6", "score": "0.493094", "text": "function initForms(){\n let formElems = document.querySelectorAll('select');\n M.FormSelect.init(formElems);\n}", "title": "" }, { "docid": "2d6bdb815f5893aa0c17331628237c25", "score": "0.49297756", "text": "function setUnitAndUnitype(form,unitsType1,selectedValue,units1,previousValue){\n\tvar c=abWasteTrackAccumController;\n\tvar res=\"bill_unit.bill_type_id='\"+selectedValue+\"' \";\n\tvar records=c.abWasteDefMainfestsUnit.getRecords(res);\n\tvar dataRes=\"bill_unit.bill_type_id='\"+selectedValue+\"'\";\n\tvar record='';\n\tvar unit='';\n\tif(records!=''){\n\t\trecord =records[0];\n\t\tunit=record.getValue('bill_unit.bill_unit_id');\n\t}\n\tfillList('abWasteDefMainfestsType',unitsType1,'bill_type.bill_type_id',selectedValue);\n\tif(form.newRecord||(selectedValue!=previousValue&&previousValue!='')){\n\t\tif(record==''){\n\t\t\tfillList('abWasteDefMainfestsUnit',units1,'bill_unit.bill_unit_id','',dataRes);\n\t\t}else{\n\t\t\tfillList('abWasteDefMainfestsUnit',units1,'bill_unit.bill_unit_id',unit,dataRes);\n\t\t}\n\t}else{\n\t\tfillList('abWasteDefMainfestsUnit',units1,'bill_unit.bill_unit_id',form.getFieldValue('waste_out.units'),dataRes);\n\t}\n}", "title": "" }, { "docid": "a2b223c01f89adaf7809520144907671", "score": "0.49295855", "text": "static initForm(){\n this.listing.deselectAll()\n this.listing.form.cleanup()\n this.menuTypeNoeud.classList.add('hidden')\n delete this._current\n message(\"Formulaire initialisé.\", {keep:false})\n}", "title": "" }, { "docid": "fe3508acdefc8c190c788a7a9968f49b", "score": "0.49212244", "text": "clearForms() {\n throw new Error(`clearForms() not implemented in ${this.constructor.name}`);\n }", "title": "" }, { "docid": "ed2b3532130283e6a7ce2c020ebeaa70", "score": "0.49185708", "text": "get helpers() {\n return {\n generateModuleResult,\n generateUser,\n generateModuleResultObject: generateModuleResult, // Backwards compatibility\n generateUserObject: generateUser // Backwards compatibility\n };\n }", "title": "" }, { "docid": "f9eab97525f1d06164a09ba4d8ed2616", "score": "0.4917736", "text": "makeForm() {\n this.clearForm();\n $(this.form).attr('name', this.name);\n $(this.form).attr('action', this.url);\n $(this.form).find('.free').prepend(this.createInputs());\n }", "title": "" }, { "docid": "ee2343550509e380ec07e515e61157ae", "score": "0.4917511", "text": "function initPage() {\n \n try {\n document.getElementById(\"unit2-test1-submit\").addEventListener('click', Test1_Submit, false);\n document.getElementById(\"unit2-test2-submit\").addEventListener('click', Test2_Submit, false);\n document.getElementById(\"unit2-test3-submit\").addEventListener('click', Test3_Submit, false);\n document.getElementById(\"unit2-test4-submit\").addEventListener('click', Test4_Submit, false);\n document.getElementById(\"unit2-test5-submit\").addEventListener('click', Test5_Submit, false);\n document.getElementById(\"unit2-test6-submit\").addEventListener('click', Test6_Submit, false);\n document.getElementById(\"unit2-test7-submit\").addEventListener('click', Test7_Submit, false);\n document.getElementById(\"unit2-test8-submit\").addEventListener('click', Test8_Submit, false);\n } catch(failed) {\n \n } \n }", "title": "" }, { "docid": "7db89f00d59d58b5dde6a9617a0fdd0e", "score": "0.49075496", "text": "function makeFormOffline() {\n app.doOnOpen();\n}", "title": "" }, { "docid": "942982ecae504c87461168db6d77fe78", "score": "0.4900337", "text": "function pullForm() {\n\tconst humanAttr = ['name', 'cost', 'link', 'type', 'info'];\n\tlet humanEl = humanAttr.map((stat) => {\n\t\treturn document.getElementById(stat).value;\n\t});\n\thuman = new Human(...humanEl);\n}", "title": "" }, { "docid": "5a3d2039c2ef0654696ecbf695e4cf84", "score": "0.4899655", "text": "function FormBuilderUtilityServices(kendo, FormListConst, FormBuilderService) {\n kendoInstance = kendo;\n formListConstant = FormListConst;\n curPage = FormBuilderService.getCurPage();\n return {\n compare: compare,\n nameTemplate: nameTemplate,\n descriptionTemplate: descriptionTemplate,\n lastModifiedByTemplate: lastModifiedByTemplate,\n lastModifiedDateTemplate: lastModifiedDateTemplate,\n fileSizeTemplate: fileSizeTemplate,\n enabledTemplate: enabledTemplate\n };\n }", "title": "" }, { "docid": "2261f7914605a749d949078982d20fae", "score": "0.48978847", "text": "_buildForm(json, instance=\"default\") {\n if(!(instance in this.formInstances)) {\n console.error(\"Instance \"+instance+\" has not been initialized\")\n }\n\n var formInstance = this.formInstances[instance]\n \n // For each item in the JSON, trigger the _buildField based on field.type\n json.fields.forEach((field, index) => {\n if (!('type' in field)) {\n console.error(\"Field lacks a 'type' in payload\", field)\n return\n }\n\n if (field.type == \"field\") {\n // Make sure field is in field\n if(!('field' in field)){\n console.error(\"Field lacks a 'field' property when using type=field\")\n return\n }\n\n this._buildField(field, instance)\n }\n\n if (field.type == \"html\") {\n // Make sure HTML property is in field\n if(!('html' in field)){\n console.error(\"Field lacks a 'html' property when using type=html\")\n return\n }\n\n $(formInstance.BodyID).append(`<div class=\"col-12\">`+field.html+`</div>`)\n }\n })\n\n if (!(\"submit_button_text\" in json)){\n json.submit_button_text = \"Submit\"\n }\n\n if (!(\"cancel_button_text\" in json)){\n json.cancel_button_text = \"Cancel\"\n }\n\n if (!(\"hide_validation\" in json)){\n json.hide_validation = true\n }\n\n if (!(\"button_orientation\" in json)){\n json.button_orientation = \"right\"\n }\n\n this.formInstances[instance].JSON = json\n\n if((\"form_controls_id\" in json)) {\n this.formInstances[instance].ControlsID = json.form_controls_id\n }\n\n // Configure orientation and options\n var controls = `\n <div class=\"float-right mt-3\">\n <button type=\"submit\" class=\"btn btn-primary\">`+json.submit_button_text+`</button>\n </div>`\n\n if (json.button_orientation == \"left\") {\n controls = `\n <div class=\"mt-3\">\n <button type=\"submit\" class=\"btn btn-primary\">`+json.submit_button_text+`</button>\n </div>`\n }\n\n if (json.button_orientation == \"center\") {\n controls = `\n <div class=\"d-flex mt-3\">\n <div class=\"justify-content-center\">\n <button type=\"submit\" class=\"btn btn-primary\">`+json.submit_button_text+`</button>\n </div>\n </div>`\n }\n\n // Build form controls\n $(this.formInstances[instance].ControlsID).html(controls)\n\n }", "title": "" }, { "docid": "68ccbb74c978976d9cd50eed790a0158", "score": "0.4893335", "text": "constructor(form, formOptions) {\n this.formOptions = formOptions;\n this.form = form;\n }", "title": "" }, { "docid": "a8732ac7f5c07caabf820dd47dad1609", "score": "0.48848873", "text": "function loadForm() {\n\t\n $.when(cashiersFundAjax,cashierTillAjax,acctAjax,transferTypeAjax,bankAccountAjax)\n .done(function (dataCashiersFund, dataCashierTill,dataAcct,dataTransferType,dataBankAccount) {\n cashiersFund = dataCashiersFund[2].responseJSON;\n cashierTills = dataCashierTill[2].responseJSON;\n accts = dataAcct[2].responseJSON;\n transferTypes = dataTransferType[2].responseJSON;\n bankGLAcctIds = dataBankAccount[2].responseJSON;\n\t\t\tgetBankGlAccounts(bankGLAcctIds);\n\t\t\tgetCashGlAccounts();\n\t\t\t\n //Prepares UI\n prepareUi();\n\t\t\tdismissLoadingDialog();\n\n });\n}", "title": "" }, { "docid": "5da69d2647155ca469d8499811beb759", "score": "0.48790866", "text": "validateForm() {\n let flag = false;\n let errormsg = \"\";\n let numberGroupError = 0;\n let numberElementError = 0;\n this.setState(\n produce(draft => {\n draft.nameError = draft.name === \"\" ? true : false;\n _.forEach(draft.form.formElementGroups, group => {\n group.error = false;\n group.expanded = false;\n if (!group.voided && group.name.trim() === \"\") {\n group.error = true;\n flag = true;\n numberGroupError += 1;\n }\n let groupError = false;\n group.formElements.forEach(fe => {\n fe.errorMessage = {};\n fe.error = false;\n fe.expanded = false;\n if (fe.errorMessage) {\n Object.keys(fe.errorMessage).forEach(key => {\n fe.errorMessage[key] = false;\n });\n }\n if (\n !fe.voided &&\n (fe.name === \"\" ||\n fe.concept.dataType === \"\" ||\n fe.concept.dataType === \"NA\" ||\n (fe.concept.dataType === \"Coded\" && fe.type === \"\") ||\n (fe.concept.dataType === \"Video\" &&\n parseInt(fe.keyValues.durationLimitInSecs) < 0) ||\n (fe.concept.dataType === \"Image\" && parseInt(fe.keyValues.maxHeight) < 0) ||\n (fe.concept.dataType === \"Image\" && parseInt(fe.keyValues.maxWidth) < 0) ||\n !areValidFormatValuesValid(fe))\n ) {\n numberElementError = numberElementError + 1;\n fe.error = true;\n\n fe.expanded = true;\n flag = groupError = true;\n if (fe.name === \"\") fe.errorMessage.name = true;\n if (fe.concept.dataType === \"\") fe.errorMessage.concept = true;\n if (fe.concept.dataType === \"Coded\" && fe.type === \"\") fe.errorMessage.type = true;\n if (fe.concept.dataType === \"Video\" && parseInt(fe.keyValues.durationLimitInSecs) < 0)\n fe.errorMessage.durationLimitInSecs = true;\n if (fe.concept.dataType === \"Image\" && parseInt(fe.keyValues.maxHeight) < 0)\n fe.errorMessage.maxHeight = true;\n if (fe.concept.dataType === \"Image\" && parseInt(fe.keyValues.maxWidth) < 0)\n fe.errorMessage.maxWidth = true;\n if (!areValidFormatValuesValid(fe)) fe.errorMessage.validFormat = true;\n }\n });\n if (groupError || group.error) {\n group.expanded = true;\n }\n });\n if (flag) {\n if (numberGroupError !== 0) {\n errormsg += \"There is a error in \" + numberGroupError + \" form group\";\n if (numberElementError !== 0)\n errormsg += \" and \" + numberElementError + \" form element.\";\n } else if (numberElementError !== 0)\n errormsg += \"There is a error in \" + numberElementError + \" form element.\";\n }\n draft.saveCall = !flag;\n draft.errorMsg = errormsg;\n })\n );\n }", "title": "" }, { "docid": "b224c928dee50b11d0b8ef9892beba82", "score": "0.48747396", "text": "_validateForm() {\n return new Promise((resolve) => {\n this.dom.state.validated = false;\n this.dom.setTimeout(`trigger-form-validation`, null);\n this.dom.setTimeout(`validate-form`, () => {\n this.ui.form.updateValueAndValidity();\n setTimeout(() => {\n this.dom.state.validated = true; // mock stub for now\n return resolve(this.ui.form.valid);\n }, 0);\n }, 0);\n });\n }", "title": "" }, { "docid": "b224c928dee50b11d0b8ef9892beba82", "score": "0.48747396", "text": "_validateForm() {\n return new Promise((resolve) => {\n this.dom.state.validated = false;\n this.dom.setTimeout(`trigger-form-validation`, null);\n this.dom.setTimeout(`validate-form`, () => {\n this.ui.form.updateValueAndValidity();\n setTimeout(() => {\n this.dom.state.validated = true; // mock stub for now\n return resolve(this.ui.form.valid);\n }, 0);\n }, 0);\n });\n }", "title": "" }, { "docid": "b224c928dee50b11d0b8ef9892beba82", "score": "0.48747396", "text": "_validateForm() {\n return new Promise((resolve) => {\n this.dom.state.validated = false;\n this.dom.setTimeout(`trigger-form-validation`, null);\n this.dom.setTimeout(`validate-form`, () => {\n this.ui.form.updateValueAndValidity();\n setTimeout(() => {\n this.dom.state.validated = true; // mock stub for now\n return resolve(this.ui.form.valid);\n }, 0);\n }, 0);\n });\n }", "title": "" }, { "docid": "81f43ecef2b1fc61cbe84a0afd1d7265", "score": "0.48696557", "text": "function _buildForm(options){\n\t\tvar form = serverWidget.createForm({\n\t\t\t\t\t\ttitle: _buildTitle(options.mailboxType) \n\t\t\t\t});\t\n\t\tif (dicConfig.ENV === 'debug'){\n\t\t\tvar currentUsr = runtime.getCurrentUser();\n\t\t\tform.clientScriptFileId = \tdicMailbox.CLIENT_SCRIPT[options.sideType][options.mailboxType][currentUsr.email]['Id'];\n\t\t}else{ \n\t\t\tform.clientScriptFileId = \tdicMailbox.CLIENT_SCRIPT[options.sideType][options.mailboxType]['Id'];\n\t\t\t\n\t\t}\n\t\treturn form;\n\t}", "title": "" }, { "docid": "16d51e4a5f4473068ac15b8627648d9a", "score": "0.48682618", "text": "_validateAndPrepare() {\n\n let _this = this;\n\n // If not interactive, throw error\n if (!this.S.config.interactive) {\n return BbPromise.reject(new SError('Sorry, this is only available in interactive mode'));\n }\n\n // Get all functions in CWD\n let sPath = _this.getSPathFromCwd(_this.S.config.projectPath);\n\n _this.components = _this.S.state.getComponents({\n paths: sPath ? [sPath] : []\n });\n\n return BbPromise.resolve();\n }", "title": "" }, { "docid": "8d132fe8e09ebfe6bff7cc619f2957be", "score": "0.48664564", "text": "function _suiteInfo(){}", "title": "" }, { "docid": "1c6e5e527b898d3a36450ebaa3509980", "score": "0.48646456", "text": "function setupForm_(sheet) {\n\n var sheetPassedIn = ! (sheet == undefined);\n if (! sheetPassedIn && SpreadsheetApp.getActiveSpreadsheet().getName().toLowerCase() == \"legalese controller\") {\n\tLogger.log(\"in controller mode, switching to setupOtherForms_()\");\n\tsetupOtherForms_();\n\treturn;\n }\n var sheet = sheet || SpreadsheetApp.getActiveSheet();\n\n var ss = sheet.getParent();\n var entitiesByName = {};\n var readRows = readRows_(sheet, entitiesByName);\n\n Logger.log(\"setupForm: readRows complete: %s\", readRows);\n\n if (readRows.principal\n\t && readRows.principal._origin_sheet_id\n\t && readRows.principal._origin_sheet_id != sheet.getSheetId()) {\n\tLogger.log(\"setupForm: switching target of the form to the %s sheet.\", sheet.getSheetName());\n\tsheet = getSheetById_(ss, readRows.principal._origin_sheet_id);\n\tentitiesByName = {};\n\treadRows = readRows_(sheet, entitiesByName);\n }\n \n var data = readRows.terms;\n var config = readRows.config;\n\n var form = ss.getFormUrl();\n\n if (form != undefined) {\n var ui = SpreadsheetApp.getUi();\n var response = ui.prompt('A form was previously created.', 'Reset it?', ui.ButtonSet.YES_NO);\n\n\tif (response.getSelectedButton() == ui.Button.NO) { return }\n\n\t// resetting the form internals isn't enough because the form title may have changed.\n\t// TODO: delete the old form. delete the old onSubmit Trigger. then recreate the form entirely from scratch.\n\n form = FormApp.openByUrl(form);\n\tvar items = form.getItems();\n\tfor (var i in items) {\n\t form.deleteItem(0);\n\t}\n }\t \n else {\n\tvar form_title = config.form_title != undefined ? config.form_title.value : ss.getName();\n\tvar form_description = config.form_description != undefined ? config.form_description.value : \"Please fill in your details.\";\n\tform = FormApp.create(form_title)\n .setDescription(form_description)\n .setConfirmationMessage('Thanks for responding!')\n .setAllowResponseEdits(true)\n .setAcceptingResponses(true)\n\t .setProgressBar(false);\n\n\t// don't create a new trigger if there is already one available\n\tvar triggers = ScriptApp.getUserTriggers(ss);\n\tif (triggers.length > 0 && // is there already a trigger for onFormSubmit?\n\t\ttriggers.filter(function(t) { return t.getEventType() == ScriptApp.EventType.ON_FORM_SUBMIT }).length > 0) {\n\t Logger.log(\"we already have an onFormSubmit trigger, so no need to add a new one.\");\n\t}\n\telse {\n\t ScriptApp.newTrigger('onFormSubmit').forSpreadsheet(ss).onFormSubmit().create();\n\t Logger.log(\"setting onFormSubmit trigger\");\n\t}\n }\n\n // Create the form and add a multiple-choice question for each timeslot.\n form.setDestination(FormApp.DestinationType.SPREADSHEET, ss.getId());\n Logger.log(\"setting form destination to %s\", ss.getId());\n PropertiesService.getUserProperties().setProperty(\"legalese.\"+ss.getId()+\".formActiveSheetId\", sheet.getSheetId().toString());\n Logger.log(\"setting formActiveSheetId to %s\", sheet.getSheetId().toString());\n\n var origentityfields = readRows._origentityfields;\n Logger.log(\"origentityfields = \" + origentityfields);\n for (var i in origentityfields) {\n\tif (i == undefined) { continue }\n\tvar entityfield = origentityfields[i];\n\tif (entityfield == undefined) { continue }\n\tLogger.log(\"entityfield \"+i+\" = \" + entityfield.fieldname);\n\tif (i == \"undefined\") { Logger.log(\"that's, like, literally the string undefined, btw.\"); continue; } // yes, this actually happens.\n\tif (entityfield.itemtype.match(/^list/)) {\n\t var enums = entityfield.itemtype.split(' ');\n\t enums.shift();\n\n\t // TODO: get this out of the Data Validation https://developers.google.com/apps-script/reference/spreadsheet/data-validation\n\t // instead of the Config section.\n\t form.addListItem()\n\t\t.setTitle(entityfield.fieldname)\n\t\t.setRequired(entityfield.required)\n\t\t.setChoiceValues(enums)\n\t\t.setHelpText(entityfield.helptext);\n\t}\n\telse if (entityfield.itemtype.match(/^(email|number)/)) {\n\t form.addTextItem()\n\t\t.setTitle(entityfield.fieldname)\n\t\t.setRequired(entityfield.required)\n\t\t.setHelpText(entityfield.helptext);\n\t // in the future, when Google Apps Scripts adds validation to its FormApp, validate the input as a valid email address or number as appropriate.\n\t}\n\telse if (entityfield.itemtype.match(/^paragraph/)) { // for the address field\n\t form.addParagraphTextItem()\n\t\t.setTitle(entityfield.fieldname)\n\t\t.setRequired(entityfield.required)\n\t\t.setHelpText(entityfield.helptext);\n\t}\t \n\telse if (entityfield.itemtype.match(/^text/)) {\n\t form.addTextItem()\n\t\t.setTitle(entityfield.fieldname)\n\t\t.setRequired(entityfield.required)\n\t\t.setHelpText(entityfield.helptext);\n\t}\t \n\telse if (entityfield.itemtype.match(/^hidden/)) {\n\t // we don't want to display the Legalese Status field.\n\t}\t \n }\n\n if (config[\"form_extras\"] != undefined) {\n\tfor (var i in config.form_extras.values) {\n\t var field = asvar_(config.form_extras.values[i]);\n\t form.addListItem()\n\t\t.setTitle(config[field].dict[\"name\"][0])\n\t\t.setRequired(config[field].dict[\"required\"][0])\n\t\t.setChoiceValues(config[field].dict[\"choicevalues\"])\n\t\t.setHelpText(config[field].dict[\"helptext\"][0]);\n\t}\n }\n\n var legalese_root = legaleseRootFolder_();\n legalese_root.addFile(DriveApp.getFileById(form.getId()));\n legalese_root.addFile(DriveApp.getFileById(ss.getId()));\n Logger.log(\"added to legalese root folder\");\n\n DriveApp.getRootFolder().removeFile(DriveApp.getFileById(form.getId()));\n DriveApp.getRootFolder().removeFile(DriveApp.getFileById(ss.getId()));\n\n var form_url = form.getPublishedUrl();\n var short_url = form.shortenFormUrl(form_url);\n return short_url;\n}", "title": "" }, { "docid": "34601af9752a0a8c1fb362fdc6538458", "score": "0.4861636", "text": "function buildFormUsingJavaScript() {\n var myDiv = document.getElementById('bottom-wrapper');\n\n // Build the new form\n // Form has a text input and a dropdown selector\n var innerDiv = document.createElement('div');\n\n var newInput = document.createElement('input');\n newInput.type = \"text\";\n newInput.placeholder = \"Content\";\n newInput.className = \"task-form\";\n innerDiv.appendChild(newInput);\n\n // Build the \"Assigned to: \" text\n var assignedToSpan = document.createElement('span');\n assignedToSpan.innerHTML = 'Assigned to: ';\n innerDiv.appendChild(assignedToSpan)\n\n // Build the Dropdown selector\n var newSelector = document.createElement('select');\n var optionDefault = document.createElement('option');\n var optionAlice = document.createElement('option');\n var optionBob = document.createElement('option');\n optionDefault.value = \"\";\n optionDefault.selected = true;\n optionDefault.style = \"display: none\";\n optionAlice.value = 0;\n optionAlice.innerHTML = 'Alice';\n optionBob.value = 1;\n optionBob.innerHTML = 'Bob';\n newSelector.appendChild(optionDefault);\n newSelector.appendChild(optionAlice);\n newSelector.appendChild(optionBob);\n innerDiv.appendChild(newSelector);\n\n\n // Add new form to the DOM\n myDiv.appendChild(innerDiv);\n\n // disable click event after it's been clicked\n // check styles.css for disabled background color\n this.disabled = true;\n}", "title": "" }, { "docid": "a8f88db6b3ee7a08098bb2edaa4ab774", "score": "0.48575127", "text": "@action\n addForm() {\n return super.addForm({subject: \"\", type: \"\", typeVocab: \"\"});\n }", "title": "" }, { "docid": "428d49cd7da157b4f23049608bae3ca6", "score": "0.48558265", "text": "constructor() {\n super();\n this.innerHTML =\n `<div id='internalFormContainer'>\n ${this.createForm()}\n </div>`;\n /** @property {Array<HTMLInputElement>} allInputs */\n this.allInputs = [...document.querySelectorAll('input')];\n this.form = document.querySelector('form');\n this.submitButton = document.querySelector('#submit');\n this.keyStorage = \"responseApi\";\n this.fetchDataInstance = FetchData._getInstance();\n }", "title": "" } ]
4a864c36fe475ee62fd5808f97d5175c
empty UCC DOM container
[ { "docid": "2fe56e2d092ef18a4cc5e22858b61ac6", "score": "0.0", "text": "function emptyContainer() {\n //remove all\n _.each(regionMap, function (value, key) {\n value.emptyContainer();\n });\n }", "title": "" } ]
[ { "docid": "18afec7bfd13e23e0d88d7f8d7f03680", "score": "0.73289794", "text": "emptyDOM() {\n this.rootEl.innerHTML = '';\n this.rootEl.setAttribute('style', 'background-color: #FFF');\n }", "title": "" }, { "docid": "e904cdbf1c19cb80d70625672a3e43fa", "score": "0.7296291", "text": "function clearDOM(){\t\n\twhile (container.hasChildNodes()) {\n container.removeChild(container.lastChild);\n}\n\t\n}", "title": "" }, { "docid": "bd6b145a118aba148a0dd3beb5189762", "score": "0.72243667", "text": "static empty (el) {\n while (el.firstChild) el.removeChild(el.firstChild)\n }", "title": "" }, { "docid": "0fcffb9fb9f885d9505ff24fad2b032c", "score": "0.7169815", "text": "function clearContainer () {\n\t\t\t$container.innerHTML = ``;\n\t\t\tres();\n\t\t}", "title": "" }, { "docid": "d42fc51a93937b9e9e8d48f22497654f", "score": "0.71200377", "text": "function emptyDOM (elem){\n\twhile (elem.firstChild) elem.removeChild(elem.firstChild);\n}", "title": "" }, { "docid": "ced18b0cea8d503dc739158a63ad497d", "score": "0.7109977", "text": "function clearContainer(){\n\t\tif (this.container){\n\t\t\tthis.container.innerHTML = \"\";\t\n\t\t}\n\t}", "title": "" }, { "docid": "327752d88e84c0a6d89156072d194872", "score": "0.70882034", "text": "function clear() {\n while (p.container.childNodes.length) {\n p.container.removeChild(p.container.lastChild);\n }\n }", "title": "" }, { "docid": "71e344df7b58c4164b733df6f368aa74", "score": "0.701757", "text": "empty(){\n this.nodes.forEach( (node) => node.innerHTML = \"\" )\n }", "title": "" }, { "docid": "599666415ac9af2b429b5e8324e1b35a", "score": "0.70082736", "text": "empty() {\r\n this.elements.forEach(element => {\r\n while (element.hasChildNodes())\r\n element.removeChild(element.lastChild)\r\n })\r\n }", "title": "" }, { "docid": "2417f0fe2c08f26cf699b7a2dd1961ad", "score": "0.6954319", "text": "clear() {\r\n this.root.innerHTML = \"\";\r\n }", "title": "" }, { "docid": "ca230f6c6ac75e59b8a5e9ea281f221d", "score": "0.6919934", "text": "clear() {\n moveNodes(this.parentNode, this.beforeNode, this.afterNode, this.node instanceof DocumentFragment && this.node);\n this.node = emptyNode;\n }", "title": "" }, { "docid": "b7a6adc2cae2a0d998e74cce3b9ed6eb", "score": "0.69072175", "text": "function clearContainer() {\n container.textContent = '';\n}", "title": "" }, { "docid": "4d25bc83c9e2c14d32b5a2f52692d847", "score": "0.68869126", "text": "empty() {\n while (this.firstElementChild) this.firstElementChild.remove();\n }", "title": "" }, { "docid": "ea853b7d462cbd368344fad306cb1707", "score": "0.68842864", "text": "function emptyLibraryDisplay() {\n while (libraryContainer.firstChild) {\n libraryContainer.removeChild(libraryContainer.lastChild);\n };\n}", "title": "" }, { "docid": "46fcb2bb6ae712f00a7228a4aaf800e9", "score": "0.6866953", "text": "clearContainer() {\n var _a;\n while ((_a = this.contentEl) === null || _a === void 0 ? void 0 : _a.lastChild) {\n this.contentEl.removeChild(this.contentEl.lastChild);\n }\n }", "title": "" }, { "docid": "2e4081321a05305aabdb0ebbeb40710c", "score": "0.6835771", "text": "function clearData() {\n // DOM (!)\n root.replaceChildren();\n }", "title": "" }, { "docid": "7056145abe986897f3d4022297858718", "score": "0.6830737", "text": "empty() {\n this.contents(\"\");\n this.next();\n }", "title": "" }, { "docid": "8becd986f09ca7aa3a472ebeee112010", "score": "0.6812477", "text": "function clearData()\r\n {\r\n while (content.firstChild) {\r\n content.removeChild(content.firstChild);\r\n } \r\n }", "title": "" }, { "docid": "75cd22c9aa9cc98d70eddf57a71d4786", "score": "0.67439944", "text": "function clearView() {\n\twhile ( content.childNodes.length > 0 ) {\n\t\tcontent.removeChild(content.firstChild);\n\t}\n}", "title": "" }, { "docid": "753271e2afa746c65db9e02d01e274df", "score": "0.67321545", "text": "function clearDom () {\n $(\"#list\").empty();\n }", "title": "" }, { "docid": "468ef9bdcddc1306b3ea5962f307ff75", "score": "0.67225087", "text": "function empty(el) {\n\t\twhile (el.firstChild) {\n\t\t\tel.removeChild(el.firstChild);\n\t\t}\n\t}", "title": "" }, { "docid": "86b93c9cf45cbeb9ec7aed2a4b15fd38", "score": "0.6719031", "text": "clear () {\n const taskCenter = getTaskCenter(this.docId)\n /* istanbul ignore else */\n if (taskCenter) {\n this.pureChildren.forEach(node => {\n taskCenter.send(\n 'dom',\n { action: 'removeElement' },\n [node.ref]\n )\n })\n }\n this.children.forEach(node => {\n node.destroy()\n })\n this.children.length = 0\n this.pureChildren.length = 0\n }", "title": "" }, { "docid": "a5226f640ed9a71db7a7a47a03607159", "score": "0.6689979", "text": "function cleargrid() {\n container.innerHTML = '';\n}", "title": "" }, { "docid": "7f585d6c4775caf5632c1e79814e9d32", "score": "0.6675443", "text": "clear() {\n\t\tthis.getElement().children = []\n\t}", "title": "" }, { "docid": "9e8f12c837e37557fbad31c82e7c30df", "score": "0.6665999", "text": "clear() {\n this.elements.clear();\n }", "title": "" }, { "docid": "8f4a7c32d0324b1e03102b6c6470b1ed", "score": "0.66646427", "text": "empty() {\n\n while ( this.group.firstChild ) {\n this.group.removeChild( this.group.firstChild );\n }\n }", "title": "" }, { "docid": "641fbbb36ed95b8c12e0b1c62b5af814", "score": "0.6662851", "text": "empty() {\n this.__internalClear(false);\n }", "title": "" }, { "docid": "7968ba3ed7db017637e32ed457109e94", "score": "0.6638918", "text": "function empty() {\n\n\t\t\t}", "title": "" }, { "docid": "7968ba3ed7db017637e32ed457109e94", "score": "0.6638918", "text": "function empty() {\n\n\t\t\t}", "title": "" }, { "docid": "6841bb111bce7b2aba85cc4e582280f1", "score": "0.66343236", "text": "function removeAll(){\n\tdocument.documentElement.innerHTML = \"\";\n}", "title": "" }, { "docid": "612783fb6c9c60ae87c411ed61a547d0", "score": "0.66259295", "text": "function _XMLNode_clear()\n{\n\tthis.setModified( true );\n\tthis.children = new Array();\n\tfor( ;this.domNode.childNodes.length > 0 ; )\n\t{\n\t\tthis.domNode.removeChild( this.domNode.childNodes[0] );\n\t}\n}", "title": "" }, { "docid": "6bf56a03f3bd43acb782cd9e1c73d734", "score": "0.6618244", "text": "function clearContainer() {\n document.getElementsByClassName('container')[0].innerHTML = \"\"\n}", "title": "" }, { "docid": "40172f42c4d8d9c73b320213273c3689", "score": "0.6603471", "text": "function empty() {\n\t\t\t}", "title": "" }, { "docid": "2353af5ed8d9cb604d0fb0c9cdeb63c5", "score": "0.658588", "text": "__emptyTarget() {\n var target = this.getTarget();\n for (var i = target.children.length - 1; i >= 0; i--) {\n var el = target.children[i];\n el.$$model = null;\n qx.dom.Element.remove(el);\n }\n target.innerHTML = \"\";\n }", "title": "" }, { "docid": "3768431215a7576faf6d8db93cdc2b62", "score": "0.65797895", "text": "function clear() {\n $(\"amoeba\").empty()\n $(\"container\").empty()\n stop()\n}", "title": "" }, { "docid": "47cd60d25ddc8fb4f55da29b39e0dc4f", "score": "0.65290314", "text": "function emptyAlbumsList(){\n albums.innerHTML = null\n }", "title": "" }, { "docid": "15519e925aae7f50d281d35a862cfbd6", "score": "0.65261495", "text": "function clearXMLContent() {\n content = \"\";\n\t $content = null;\n }", "title": "" }, { "docid": "002a4cd124fe1368210b46994b507761", "score": "0.6514145", "text": "function emptyResultsContainer() {\n opt.resultsContainer.innerHTML = \"\";\n }", "title": "" }, { "docid": "651513445696526f5a7826881a458988", "score": "0.65005434", "text": "function clearScreen() {\n while (content.hasChildNodes())\n content.removeChild(content.lastChild)\n}", "title": "" }, { "docid": "33affade1565690dbac7ba9771fd4a1a", "score": "0.6484433", "text": "function ClearDOM() {\n $(\"#brojstola\").html('');\n $(\".rrr\").html('<span class=\"glyphicon glyphicon-shopping-cart text-muted\"></span>');\n $(\"#desktoploader,#desktoploader2\").hide();\n $(\"#pregledstolalist\").html('');\n GetDocTotal();\n GetSearchProductsList(0);\n }", "title": "" }, { "docid": "778d1b90717bbfda5ce1ef490d03b1e9", "score": "0.64362645", "text": "function empty_node() {\r\n var tinyq = this;\r\n for (var nodes = tinyq.nodes, i = 0, len = nodes.length; i < len; ++i) {\r\n var node = get_valid_element(nodes[i]);\r\n if (!node) continue;\r\n node.textContent = ''; // the short way\r\n }\r\n tinyq.chain += '.empty()';\r\n return tinyq;\r\n }", "title": "" }, { "docid": "e5c5d5b899879991c43c9934b3902665", "score": "0.6433953", "text": "function clearChildren(elemnt) {\n\t\t\telemnt.innerHTML = '';\n\t\t}", "title": "" }, { "docid": "f7e1b269a3ae2fddd124be7d7b2ca36c", "score": "0.64303863", "text": "function clearcontainer(){\n\tvar removeContainer = document.getElementById(\"container\");\n\tremoveContainer.remove();\n\tfoundNames = false;\n\tfoundNumber = false;\n}", "title": "" }, { "docid": "d3a3cb26782a7e76282d3d917e742b61", "score": "0.6429197", "text": "function cleanDOM() {\n removeElementsFromDOM('hat');\n removeElementsFromDOM('socks');\n removeElementsFromDOM('sunglasses');\n removeElementsFromDOM('gloves');\n}", "title": "" }, { "docid": "aadc80dccef2f89f3edb7ae88cdb9e0d", "score": "0.64289707", "text": "function uunodeclear(parent) { // @param Node: parent node\n // @return Node: parent\n // [1][clear children] uu.node.clear(<body>)\n\n var rv = uutag(\"\", parent), v, i = 0;\n\n for (; v = rv[i++]; ) {\n uunodeidremove(v);\n uueventunbind(v);\n }\n while (parent[_lastChild]) {\n parent[_removeChild](parent[_lastChild]);\n }\n return parent;\n}", "title": "" }, { "docid": "1515f28415eccaaddad913fc172da2e5", "score": "0.641998", "text": "function empty () {}", "title": "" }, { "docid": "1515f28415eccaaddad913fc172da2e5", "score": "0.641998", "text": "function empty () {}", "title": "" }, { "docid": "1515f28415eccaaddad913fc172da2e5", "score": "0.641998", "text": "function empty () {}", "title": "" }, { "docid": "1515f28415eccaaddad913fc172da2e5", "score": "0.641998", "text": "function empty () {}", "title": "" }, { "docid": "1515f28415eccaaddad913fc172da2e5", "score": "0.641998", "text": "function empty () {}", "title": "" }, { "docid": "1515f28415eccaaddad913fc172da2e5", "score": "0.641998", "text": "function empty () {}", "title": "" }, { "docid": "1515f28415eccaaddad913fc172da2e5", "score": "0.641998", "text": "function empty () {}", "title": "" }, { "docid": "1515f28415eccaaddad913fc172da2e5", "score": "0.641998", "text": "function empty () {}", "title": "" }, { "docid": "1515f28415eccaaddad913fc172da2e5", "score": "0.641998", "text": "function empty () {}", "title": "" }, { "docid": "1515f28415eccaaddad913fc172da2e5", "score": "0.641998", "text": "function empty () {}", "title": "" }, { "docid": "1515f28415eccaaddad913fc172da2e5", "score": "0.641998", "text": "function empty () {}", "title": "" }, { "docid": "df2b70c328c398be47c547f050ee09e6", "score": "0.6413066", "text": "function empty(d) {\n\twhile(d.firstChild) {\n\t\td.removeChild(d.firstChild);\n\t}\n}", "title": "" }, { "docid": "b2377fb06de20d5be240d29d198da9e5", "score": "0.6408487", "text": "function clear(){\n\t$('#container_p').empty();\n\t$('#one_dlv_pending').empty();\n\t$('#one_sbj').empty();\n\t$('#one_tch').empty();\n\t$('#list_subjects').empty();\n\t$('#list_teachers').empty();\n\t$('#personal_data').empty();\n\t$('#confirm_edit').empty();\n\t$('#container_c').empty();\n\t$('#one_dlv_completed').empty();\n}", "title": "" }, { "docid": "d2796eed6592b228d78db26c01859698", "score": "0.6396661", "text": "function ELEMENT_EMPTY$static_(){ProjectsTodosWidget.ELEMENT_EMPTY=( ProjectsTodosWidget.BLOCK.createElement(\"empty\"));}", "title": "" }, { "docid": "b816bf1e707ea664fd09ea06dd7cf106", "score": "0.639035", "text": "static clearGraph() {\n inner.html(\"\");\n }", "title": "" }, { "docid": "3a471bea6f117a711471e7dbc94eb025", "score": "0.63624465", "text": "empty () {}", "title": "" }, { "docid": "2da0254b61bc482ce96c7097f0f96354", "score": "0.6360517", "text": "function clearElements(container) {\n if (container.children()) {\n container.children().remove();\n }\n }", "title": "" }, { "docid": "2da0254b61bc482ce96c7097f0f96354", "score": "0.6360517", "text": "function clearElements(container) {\n if (container.children()) {\n container.children().remove();\n }\n }", "title": "" }, { "docid": "02aa368a024728505987a46c3bd363fd", "score": "0.6357073", "text": "function clearPage() {\n var parent = document.getElementById(\"content\");\n while (parent.firstChild) {\n parent.removeChild(parent.firstChild);\n }\n}", "title": "" }, { "docid": "f59289d49745f319082fdd0499550b62", "score": "0.6352776", "text": "clear() {\n const $this = this;\n const emptyHtmlContainer = () => {\n const mainContainer = document.getElementById(this.elementId);\n if (mainContainer) {\n mainContainer.innerHTML = \"\";\n this.__resetBasicLayout(mainContainer);\n }\n }\n\n if (this.html5Qrcode) {\n return new Promise((resolve, reject) => {\n if ($this.html5Qrcode._isScanning) {\n $this.html5Qrcode.stop().then(_ => {\n $this.html5Qrcode.clear();\n emptyHtmlContainer();\n resolve();\n }).catch(error => {\n if ($this.verbose) {\n console.error(\"Unable to stop qrcode scanner\", error);\n }\n reject(error);\n })\n }\n });\n }\n }", "title": "" }, { "docid": "115381d7fb1370e9bc6b4a92efbb94f0", "score": "0.63455904", "text": "clear(){\n this.each((element)=>{\n while (element.firstChild) {\n element.removeChild(element.firstChild)\n }\n })\n return this\n }", "title": "" }, { "docid": "f6049a6c2e834ab08bf43281b6e1c26a", "score": "0.63427824", "text": "function clearContent()\n{\n var content = document.getElementById(\"content\");\n\n if (content) {\n while (content.hasChildNodes()) {\n content.removeChild(content.firstChild);\n }\n }\n}", "title": "" }, { "docid": "e4b246992f22973e72b9d21a3df0ce3d", "score": "0.63348526", "text": "function _xempty(mynode) {\n\t//return dojo.empty(mynode);\t\n\treturn jQuery(\"#\" + mynode).empty()\n}", "title": "" }, { "docid": "b642b16f6efab6895ee4d302ad88955c", "score": "0.6317544", "text": "function createEmptyElement() {\n\t return {\n\t type: '#empty'\n\t };\n\t}", "title": "" }, { "docid": "bb5a4c3f4f3e781855f658458d95955a", "score": "0.63164675", "text": "static empty (...els) {\n for (const el of els) while (el.firstChild) el.removeChild(el.firstChild)\n }", "title": "" }, { "docid": "431b0ca3286cfdbea351d4980e2c9ba6", "score": "0.63153404", "text": "limpiarHtml(){\n while(agregarCita.firstChild){\n agregarCita.removeChild(agregarCita.firstChild);\n }\n }", "title": "" }, { "docid": "6ca53c301d28fc645137e86cb87bbf48", "score": "0.63021123", "text": "function cleanHisto() {\n\tvar divhisto = getEl(IDS.histo);\n\tif (divhisto.childNodes.length > 0) {\n\t\tdivhisto.innerHTML = \"\";\n\t}\n}", "title": "" }, { "docid": "f557364b9433f2e626479a026678d24a", "score": "0.6297965", "text": "clear() {\n if (this._liveElement) {\n this._liveElement.textContent = '';\n }\n }", "title": "" }, { "docid": "f557364b9433f2e626479a026678d24a", "score": "0.6297965", "text": "clear() {\n if (this._liveElement) {\n this._liveElement.textContent = '';\n }\n }", "title": "" }, { "docid": "beab9eff1483519e8a6b0c5d9530686e", "score": "0.62932", "text": "clear() {\n const that = this;\n\n if (!that.isCompleted || that.nodeName !== 'Smart-WINDOW') {\n return;\n }\n\n that.$.content.innerHTML = '';\n }", "title": "" }, { "docid": "ea996ec0b40ee011180701f00b56ecd1", "score": "0.62853205", "text": "function clear() {\n\tdialogueTree = null;\n\tcurrentChild = dialogueTree;\n\tlastRead = null;\n\tdocument.getElementById(\"output\").innerText = \"\";\n}", "title": "" }, { "docid": "25387d70faeb20dd1e3bf4a367029209", "score": "0.62770355", "text": "_clear() {\n this._parentElement.innerHTML = \"\";\n }", "title": "" }, { "docid": "569fe888f9716a94e5611ee032c504c9", "score": "0.62766814", "text": "function empty(elem){\n\twhile(elem.firstChild) {\n\t\tremove(elem.firstChild);\n\t}\n}", "title": "" }, { "docid": "6355c3eb1e0bf96759f1e7db77b75b86", "score": "0.62698793", "text": "clear() {\n this._clearElement();\n }", "title": "" }, { "docid": "c80832a51797cb214ae86e78db584e8f", "score": "0.6260028", "text": "function clear()\n{\n\tvar clear = createElement('div', '');\n\tclear.className = 'clear';\n\treturn clear;\n}", "title": "" }, { "docid": "6c2f1ba4d1b0c6c60bc62d022573f299", "score": "0.6255501", "text": "clearStartDiv () {\n const element = document.querySelector('#container')\n element.remove()\n }", "title": "" }, { "docid": "b490a364266a9faed0227159ee6a22c1", "score": "0.6250052", "text": "function clearChildren(node){\n\tnode.innerHTML = \"\";\n}", "title": "" }, { "docid": "f99a05a9c0a2bafcb746c3d661e11876", "score": "0.62385327", "text": "function removeEverything() {\n while (document.body.firstChild) {\n document.body.firstChild.remove();\n }\n }", "title": "" }, { "docid": "a152b9e7a7f02444b6c097e364149305", "score": "0.62360334", "text": "function create_empty_tag() {\n var tag = document.createElement('div');\n return tag;\n}", "title": "" }, { "docid": "98f9dd44f2156ee7e8d87eda20f86f60", "score": "0.6229137", "text": "async destroy() {\n // Clear structure\n this.item.innerHTML = \"\";\n }", "title": "" }, { "docid": "6b5fe5ae63f3554c7fa6271346edcdf7", "score": "0.6228619", "text": "function clearUI() {\n $(\"#coinsContainer\").empty();\n }", "title": "" }, { "docid": "100abf5eeed61ee808cdea463db8c87a", "score": "0.6223709", "text": "function empty(el) {\n while (el.firstChild) {\n el.removeChild(el.firstChild);\n }\n } // @function toFront(el: HTMLElement)", "title": "" }, { "docid": "b4a2d4c8cd197d70cf0aed654b288205", "score": "0.6222373", "text": "cleanContent () {\n while (this.content.firstChild) {\n this.content.removeChild(this.content.firstChild)\n }\n this.svgDiv = document.createElementNS('http://www.w3.org/2000/svg', 'svg')\n this.content.appendChild(this.svgDiv)\n this.svgDiv.setAttribute('width', this.width)\n this.svgDiv.setAttribute('height', this.height)\n this.svg = d3.select(this.svgDiv)\n }", "title": "" }, { "docid": "5534027e49eb83ba832738f38a18bf8b", "score": "0.6221901", "text": "function clearArea() {\n container.textContent = \"\";\n while (container.firstChild) {\n container.removeChild(container.lastChild);\n } makeGrid();\n}", "title": "" }, { "docid": "f866a26188a07a6cfe575db4c8437596", "score": "0.62197936", "text": "emptyBody() {\n // remove current view\n let body = document.body;\n while (body.hasChildNodes()) {\n let oldchild = body.removeChild(body.lastChild);\n }\n\n // test to check if body has indeed been emptied\n testAssert(document.body.children.length === 0, 'Document.body expected to have no children.')\n\n }", "title": "" }, { "docid": "e4745e0541071135322b44fcf13505ef", "score": "0.62186676", "text": "function clearComponents(){\n\t$(\"#mainContainer\").empty();\n\t$(\"#sideContainerColumnsUl\").empty();\n\t$(\"#sideContainerItemInfoContent\").empty();\n\t$(\"#sideContainerLogsUl\").empty();\n}", "title": "" }, { "docid": "7295ad8e50b5e3cefa9119c31d7611fa", "score": "0.6210736", "text": "function empty() {\n $(\".content\").empty()\n}", "title": "" }, { "docid": "29e336e37a0b58c0299b471c5d7a612d", "score": "0.6209503", "text": "function resetDOM() {\n const main = document.querySelector(\".main\");\n while (main.hasChildNodes()) {\n main.removeChild(main.lastChild);\n }\n}", "title": "" }, { "docid": "e1c9ff669d2e98c7e7f076b2eb68e225", "score": "0.6204134", "text": "empty() {\n this.contents = [];\n }", "title": "" }, { "docid": "e01eeed22bae8d12a337a13874915354", "score": "0.62018603", "text": "function clearContent() {\n content.innerHTML = \"\";\n}", "title": "" }, { "docid": "c7d1cb76fad4b36f2b07c9056431e3ba", "score": "0.62010556", "text": "function emptyDiv() {\n\n // Get all the playlist titles added to the container.\n var allAlbums = $('playlistTitles').children();\n\n //Iterate through the playlist title and remove each child, or album.\n var album = allAlbums.firstChild;\n while( album ) {\n allAlbums.removeChild(album);\n album = allAlbums.firstChild;\n }\n\n // Empty out any associated leftover elements for the albums that\n // were just deleted.\n $('#playlistTitles').empty();\n\n}", "title": "" }, { "docid": "58066003698117c2d84d5264a1cc67eb", "score": "0.61980844", "text": "clear() {\n this.$svg.innerHTML = '';\n this.$svg_header.innerHTML = '';\n }", "title": "" }, { "docid": "a2f359b409ccd63197a4ca26ad1c1238", "score": "0.61913806", "text": "function clear(){\n\n while(mainArticle.firstChild)\n mainArticle.removeChild(mainArticle.firstChild);\n\n while(symptomDiv.firstChild)\n symptomDiv.removeChild(symptomDiv.firstChild);\n\n while(treatmentDiv.firstChild)\n treatmentDiv.removeChild(treatmentDiv.firstChild);\n}", "title": "" }, { "docid": "4ee078b9d3179d669ceb2b8b45f923f1", "score": "0.618465", "text": "function empty(element) {\r\n $each($A(element.childNodes), function (node) {\r\n empty(node);\r\n element.removeChild(node);\r\n });\r\n}", "title": "" }, { "docid": "4afca8fca82c2b972acd7959f9ed92d2", "score": "0.6180323", "text": "function clearLayersDOM() {\n\t$(\"#layers-list\").html(\"\");\n}", "title": "" }, { "docid": "108a5b6b3ca26cb90323e3ba3c3c9451", "score": "0.6176845", "text": "function removeEmpty() {\n\t\t\t\tvar nodes = $A(t.editorDoc.getElementsByTagName(na));\n\t\t\t\tif(nodes.length > 0)\n\t\t\t\t\tnodes.reverse();\n\t\t\t\t$A(nodes).each(function(n) {\n\t\t\t\t\tvar c = 0;\n\n\t\t\t\t\t// Check if there is any attributes\n\t\t\t\t\tvar n_attrs = t.attrs(n);\n\t\t\t\t\tfor (var k in n_attrs ) {\n\t\t\t\t\t\tvar v = n_attrs[k];\n\t\t\t\t\t\tif (k.substring(0, 1) != '_' && v != '' && v != null) {\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// No attributes then remove the element and keep the children\n\t\t\t\t\tif (c == 0) {\n\t\t\t\t\t\tfor (i = n.childNodes.length - 1; i >= 0; i--)\n\t\t\t\t\t\t\tt.insertAfter(n, n.childNodes[i]);\n\t\t\t\t\t\tn.parentNode.removeChild(n);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}", "title": "" } ]
f78a2a74a4f9d9fb7ed488650b386811
speed is whatever units the user wants to use
[ { "docid": "fa61a07f6c0bb04cb12680275de6fbb1", "score": "0.67813", "text": "function calcSpeed(distance, time){\n return distance/time;\n}", "title": "" } ]
[ { "docid": "3adddfd0a1eaaaa5be432a7fc74b2279", "score": "0.7776892", "text": "function getSpeed()\r\n {\r\n return speed;\r\n }", "title": "" }, { "docid": "3fba5a3e29e6480a3ba1bc9eb6472103", "score": "0.7759597", "text": "updateSpeed (speed) {\n this.speed = speed;\n }", "title": "" }, { "docid": "e234dd401325c983b407acaf3cd3c722", "score": "0.77492714", "text": "function set_speed(s) {\n\tspeed = s;\n}", "title": "" }, { "docid": "242fee525307b45df451a711e01cdf2c", "score": "0.76479584", "text": "function setSpeed(\r\n speed_)\r\n {\r\n speed = speed_;\r\n }", "title": "" }, { "docid": "3172802d77add7eb3588ea366f9218b4", "score": "0.76464206", "text": "setSpeed(speed) {\n this.speed = speed;\n }", "title": "" }, { "docid": "ad57745776ef00d963fd16df8d83999d", "score": "0.7588416", "text": "getSpeed() { return this.speed; }", "title": "" }, { "docid": "f40af4854fa4f9c0e22bd3b6f2a93a5a", "score": "0.7567282", "text": "setSpeed(value) {\n\t\tthis.moveSpeed = value;\n\t\tthis.speed = Math.round((6.66666666667 * GAME_SPEED) / this.moveSpeed);\n\t}", "title": "" }, { "docid": "634588c33b39d239374bc1ed244ab63f", "score": "0.7486059", "text": "function getSpeed(){\n\t\treturn controls.speed;\n\t}", "title": "" }, { "docid": "70f06c8b31cec057132015a37cf8991c", "score": "0.7387215", "text": "speed(theSpeed) {\n if (theSpeed < -100 || theSpeed > 100) {\n throw \"Speed must be between -100 and 100\"\n }\n this._speed = theSpeed;\n this._applySpeed();\n }", "title": "" }, { "docid": "340687b9252ea93414fbba9dc00f87e1", "score": "0.7374351", "text": "function speed() {\n\tif (count < 5) {\n\t\treturn 700;\n\t} else if (count < 13) {\n\t\treturn 650;\n\t} else {\n\t\treturn 600;\n\t}\n}", "title": "" }, { "docid": "f06c4e65234c13c6adcd811efd6c38a6", "score": "0.7334963", "text": "function setSpeed(speed) {\n ANIMATION_DUR = speed[0]\n CYCLE_DUR = speed[1]\n $(\"#speedText\").text(speed[2])\n EASING = speed[3]\n clearInterval(ANIMATE_INTERVAL)\n ANIMATE_INTERVAL = setInterval(\"animate()\", CYCLE_DUR)\n}", "title": "" }, { "docid": "3416791d7c9038a2c5679efb7a9f5b97", "score": "0.7292868", "text": "get unitSpeed() { return this._unitSpeed; }", "title": "" }, { "docid": "3416791d7c9038a2c5679efb7a9f5b97", "score": "0.7292868", "text": "get unitSpeed() { return this._unitSpeed; }", "title": "" }, { "docid": "3416791d7c9038a2c5679efb7a9f5b97", "score": "0.7292868", "text": "get unitSpeed() { return this._unitSpeed; }", "title": "" }, { "docid": "3ed378bdde00e2a912ff1fb3e1cea20d", "score": "0.7287267", "text": "function changeSpeed(s) {\n player.speed += s;\n}", "title": "" }, { "docid": "c426b8732f3b380ebda1b8a419b74868", "score": "0.7272052", "text": "function setSpeed(newSpeed) {\n\tnewSpeed = Math.max(newSpeed, 1);\n\tnewSpeed = Math.min(newSpeed, 999);\n\t\t\n\tspeed = newSpeed;\t\n}", "title": "" }, { "docid": "ca27578f6933a7634c2b04a78ff68033", "score": "0.7260412", "text": "function SelectSpeed() {\n // Starting from screens 9,12,15 game is quite\n // challenging so we decrese speed much slower\n if (screen < 9) {\n speed = 300 - screen * 25\n } else if (screen < 12) {\n speed = 500 - screen * 20\n } else if (screen < 15) {\n speed = 500 - screen * 15\n } else {\n speed = 600 - screen * 10\n }\n}", "title": "" }, { "docid": "c613ca44ebfbf5e2e0c9729e90de1697", "score": "0.72599626", "text": "function setSpeed(speed){\n for (m in motors){\n ms.setMotorSpeed(motors[m], speed);\n }\n //currentSpeed = speed;\n console.log(\"Speed set to\" + speed);\n }", "title": "" }, { "docid": "b6fa583b3ef35e2ad6053f99da580c60", "score": "0.72468144", "text": "function changeSpeed() {\n if (id(\"start\").disabled) {\n clearInterval(timer);\n let speed = parseInt(id(\"speed\").value);\n timer = setInterval(handleText, speed);\n }\n }", "title": "" }, { "docid": "be4ab2dcfa33f561a9e031f30b830736", "score": "0.7232595", "text": "function set_speed() {\r\n frameRate(speed_box.value * 1);\r\n}", "title": "" }, { "docid": "6c1cd13acbb00ffc7bac8d97e4ac0e7a", "score": "0.7218609", "text": "function setSpeed(speed) {\n if (globals.speed == null) {\n globals.speed = 0;\n }\n globals.speed = speed;\n}", "title": "" }, { "docid": "18c74603561a69ce7f2eb721eb7bed8b", "score": "0.7204185", "text": "function inc_speed()\n{\n if(speed == speed_normal)\n speed = speed_fast;\t\n}", "title": "" }, { "docid": "044234b4c665b47fa571afe0808b219f", "score": "0.7197352", "text": "function doSpeeding()\r\n{\r\n\tplaySound(\"speeding\");\r\n\tspeed += speedingIncrementSpeed;\r\n\tchangeInterval(speed);\r\n\taddMessage(\"Current Speed: \"+(speed), \"speed\");\r\n}", "title": "" }, { "docid": "50b27dc2617dfc5975b2935035d370d0", "score": "0.7170886", "text": "function setSpeed(speed_data){\r\n\tif(speed_data == 0)\r\n\t\tset_speed = 40;\r\n\telse if(speed_data == 1)\r\n\t\tset_speed = 25;\r\n\telse\r\n\t\tset_speed = 15;\r\n}", "title": "" }, { "docid": "0c8426d3157d26ad5c8dabb490c6cafa", "score": "0.71656364", "text": "function speedUpdate() {\n\tvar r = this.rotation;\n\tif (r < 0) {\n\t\tspeed = 1+(r/150);\n\t} else {\n\t\tspeed = (r/25)+1;\n\t} \n\ttl.timeScale(speed.toFixed(2));\n}", "title": "" }, { "docid": "1e2c3eb88b91d46012e8f77de46ee09f", "score": "0.7136137", "text": "function setSpeed(s)\r\n{\r\nif(s==\"0\")\r\n{\r\n speed=15;\r\n}\r\nif(s==\"1\")\r\n{\r\n speed=10;\r\n}\r\nif(s==\"2\"){\r\n speed=5;\r\n}\r\n}", "title": "" }, { "docid": "ba3a9d02dff2eb82477350bead96443b", "score": "0.7128893", "text": "increaseSpeed() {\n\n this.speed = Math.max(this.speed - Snake.SPEED_INCREMENT, Snake.MAX_SPEED);\n\n }", "title": "" }, { "docid": "7af3b5d1d7ab0a12a67d8288c2b62f56", "score": "0.7120629", "text": "function updateSpeed() {\n\tif(!paused) {\n\t\tclearInterval(interval);\n\t\tinterval = setInterval(doTick, speed);\n\t}\n\t$('#speed-input').val(speed);\n\t$('#speed-text').html(speed);\n\n\tlet rotation = (speed / (MAX_SPEED - MIN_SPEED) ) * 180 - 90;\n\trotation *= -1;\n\t$('#speed-line').css('transform', 'rotate('+rotation+'deg)');\n}", "title": "" }, { "docid": "9232b3e231a43db2dd1812448b863471", "score": "0.71203786", "text": "function setSpeed(speed)\n{\n if(parseInt(speed) == 1)\n {\n ballSpeed = 20;\n }\n else if (parseInt(speed) == 2)\n {\n ballSpeed = 10;\n }\n else \n {\n ballSpeed = 30;\n }\n}", "title": "" }, { "docid": "549b1c2437925dfd2c2178a1cac887e2", "score": "0.71057606", "text": "calcSpeed(){\n\treturn this.distance/(this.time/60);//miles per hour\n }", "title": "" }, { "docid": "ad20ff9671abd65c222febe0ac625aff", "score": "0.7103585", "text": "function getSpeedInIntForm(speed) {\n if (speed == \"1x\") return 100;\n else if (speed == \"2x\") return 50;\n else if (speed == \"3x\") return 10;\n}", "title": "" }, { "docid": "193d45d42773be76abf7aeb6563b760c", "score": "0.7091097", "text": "getSpeed() {\n return this.speed;\n }", "title": "" }, { "docid": "82a114e5a9fab866a2172f44c92fd59d", "score": "0.70796424", "text": "function show_speed() {\r\n $('.label #speedstatus').html(Math.round(speed) + ' (frames/sec)');\r\n\t\tdelay = 1000.0 / speed;\r\n }", "title": "" }, { "docid": "c4489597888aad67c3eab30e65615e6e", "score": "0.7077753", "text": "function setSpeed() {\n if (isPause) {\n speedFactor = 0;\n return;\n }\n var val = inputSpeed.value;\n speedFactor = Math.pow(2, val);\n}", "title": "" }, { "docid": "2598400da5245aa72d75ca38e03af409", "score": "0.70600975", "text": "static toMsecond(speed) {\n return speed / 3.6;\n }", "title": "" }, { "docid": "e18124b1e1542009967a76384f50395c", "score": "0.7044486", "text": "getspeed() {\n\t\tif(this.vars.alive){\n\t\t\treturn distance(this.vars.x,this.vars.y,this.vars.px,this.vars.py);\n\t\t}else{\n\t\t\treturn 0;\n\t\t}\n\t}", "title": "" }, { "docid": "26c1be90ee5592162925f25cb447d2ab", "score": "0.70439875", "text": "function turboSpeed() {\r\n\t \tdelta = 500;\r\n\t}", "title": "" }, { "docid": "7b4bad2ed5cda05f380a6e66d229272f", "score": "0.7015277", "text": "function setSpeed(){\n speed = this.value;\n}", "title": "" }, { "docid": "dabf8a0b3e4f4f8761d68b20c7949a24", "score": "0.7001619", "text": "function displaySpeed(speed) {\n\tlet returnSpeed = speed\n\tif(!isMetric()){\n\t\treturnSpeed = speed / 1.609\n\t}\n\t//rounding the speed\n\treturn Math.round(returnSpeed)\n}", "title": "" }, { "docid": "0c1322891a1c9bd3dd32d69df8f30ba9", "score": "0.70011455", "text": "setSpeed() {\n const speedChoice = this.getRandom();\n const slow = 3;\n const medium = 6;\n const fast = 9;\n \n if (speedChoice < 4) {\n return slow;\n } else if (speedChoice < 7) {\n return medium;\n } else {\n return fast;\n }\n }", "title": "" }, { "docid": "6087d900eedbad8c644af7458680be83", "score": "0.6973785", "text": "function changespeed(value) {\n if (startflag) { //change speed on run only in running mode on the game\n clearInterval(interval);\n interval = setInterval(\"gameoflife()\", parseInt(value));\n }\n}", "title": "" }, { "docid": "e8cbd63a67ae21fd714b68616327a64c", "score": "0.6966647", "text": "accelerate(){\n this.speed += 10;\n }", "title": "" }, { "docid": "cf7e2361d92338a6a6b5512bdcb16ab0", "score": "0.6965955", "text": "addSpeed(speedChange) {\n this.velocity.setMag(Math.max(0, this.velocity.mag() + speedChange));\n }", "title": "" }, { "docid": "f81aacc22afbcc3595e21d4fa0dfcb92", "score": "0.6954985", "text": "getSpeed(){\n return this.speed;\n }", "title": "" }, { "docid": "6aa2a1415a55dcfee966fd98b11bb68f", "score": "0.6946744", "text": "function handleSpeed () {\n if (keyIsDown(DOWN_ARROW) && !game.gamePaused) {\n frameRate(20)\n } else {\n frameRate(3)\n }\n}", "title": "" }, { "docid": "6ed84bf23b8c3f45ab4c67f67ae65176", "score": "0.6946425", "text": "function format_speed(speed) {\n return (Math.round(speed * 100) / 100) + \" km/h\";\n}", "title": "" }, { "docid": "de83b31d9d37bfcc01e6fd9aff959eb7", "score": "0.6944733", "text": "function changeSpeed(speed) {\n var newSpeed = videoSpeed + speed;\n setSlider(newSpeed);\n }", "title": "" }, { "docid": "c46be4f75ba4ec1a77b4d9fbec64764b", "score": "0.69387805", "text": "function setSpeed() {\n\tvar baseSpeed = 25;\n\tvar raceMod = 0;\n\tif (race !== \"Gnome\" && race !== \"Halfling\" && race !== \"Dwarf\")\n\t\traceMod += 5;\n\tif (subrace + race == \"Wood Elf\")\n\t\traceMod += 5;\n\tspeed = baseSpeed + raceMod;\n\treturn \"Speed: \" + speed;\n}", "title": "" }, { "docid": "96f7c2e4ec56965efc0458bff2edeaba", "score": "0.69331515", "text": "setSimulationSpeed(speed) {\n this.speed = speed;\n }", "title": "" }, { "docid": "7af9d35cd1366db530ae6d201e4c10a1", "score": "0.69283885", "text": "function updateSpeed()\n {\n // WPM and CPM does not need to be calculated on error\n if (my.current.state == my.STATE.ERROR) {\n return\n }\n\n var goodChars = my.current.correctInputLength\n\n // Determine the time elapsed since the user began typing\n var currentTime = new Date().getTime()\n var timeElapsed = currentTime - my.current.startTime\n my.current.timeElapsed = timeElapsed\n\n // Calculate WPM and CPM\n var wpm\n if (timeElapsed == 0) {\n wpm = goodChars == 0 ? 0 : '\\u221e'\n } else {\n wpm = Math.round(60000 * goodChars / 5 / timeElapsed)\n my.current.wpm = wpm\n my.current.cpm = Math.round(60000 * goodChars / timeElapsed)\n }\n\n // Display WPM\n Util.setChildren(my.html.speed, wpm + ' wpm')\n }", "title": "" }, { "docid": "d9e6dce483a992db8a69e2d8b61e0e88", "score": "0.69129443", "text": "function setAnimationSpeedFactor(speed){\n if (speed >= 0.5 && speed <= 2){\n speedFactor = speed;\n }\n // Speed range to be within 0.5 to 2\n // Just a precaution\n else{\n console.log(\"Please set speed within 0.5 and 2\");\n }\n}", "title": "" }, { "docid": "8d7e5391b66bf14fcbb1ef8fe8c1e5a0", "score": "0.69085145", "text": "function setSpeed() {\n return (Math.random()*(400 - 60)) + 60;\n}", "title": "" }, { "docid": "a35f7a64faae076f62c3e30454d760c6", "score": "0.6905137", "text": "run(speed = 0){\n this.speed += speed;\n console.log(`${this.name} runs with speed ${this.speed}.`);\n }", "title": "" }, { "docid": "97278d35fcabe49ecaaa0def9e0e525f", "score": "0.68966305", "text": "function changeSpeed() {\n gameSpeed = (gameSpeed % 3) + 1;\n updateSpeedOption();\n}", "title": "" }, { "docid": "3a61a3091f3a50366320e6b6f30e9656", "score": "0.6892745", "text": "function setSpeed(speed){\r\n if(speed==0&&control==1)\r\n {\r\n clear();\r\n Interval(10);\r\n }\r\n if(speed==1&&control==1)\r\n {\r\n clear();\r\n Interval(5);\r\n }\r\n if(speed==2&&control==1)\r\n {\r\n clear();\r\n Interval(1);\r\n }\r\n}", "title": "" }, { "docid": "cf9166ec7d25c4d39afa32b11e43a04e", "score": "0.6891682", "text": "function getSpeed() {\n var speed = 999;\n switch (document.getElementById(\"speed\").value) {\n case \"easy\":\n speed = 1500;\n break;\n case \"medium\":\n speed = 1000;\n break;\n case \"hard\":\n speed = 500;\n break;\n case \"crazy\":\n speed = 250;\n break;\n default:\n console.log(\"getSpeed returned invalid value: \" + document.getElementById(\"speed\").value);\n }\n return speed;\n }", "title": "" }, { "docid": "755a57bad6c25b3d0ec0a8bf5dd5a5c4", "score": "0.68427396", "text": "speed (prm) {\n try {\n\t return this.confmng(\"speed\", prm);\n } catch (e) {\n console.error(e.stack);\n throw e;\n }\n }", "title": "" }, { "docid": "24d417e4e91606199bdcb2123448ed73", "score": "0.6837799", "text": "function adjustSpeed(n) {\n\tsetSpeed(speed+n);\n}", "title": "" }, { "docid": "b5e90bef25cc0f174d0322b4c5bdeb27", "score": "0.6836981", "text": "function changeSpeed() {\n\t\tcurrentSpeed = getSpeed();\n\t\tif (running) {\n\t\t\tclearInterval(currentInterval);\n\t\t\tcurrentInterval = setInterval(insertFrame, currentSpeed);\n\t\t}\n\t}", "title": "" }, { "docid": "28d632d1c4c5b8a0dd25246764980231", "score": "0.6826407", "text": "function spedometer() {\n speedout = document.getElementById('speed');\n speedout.value = speed/1000;\n}", "title": "" }, { "docid": "28aae78415df8a5ff92c86e39153d85b", "score": "0.68215156", "text": "setSpeed(speed){\n if (speed === 0){\n this.setState({\n gameSpeed: speed\n });\n }else if (speed >= 1){\n let ms = 1000 / 30 / speed;\n let oneDay = 1000;\n clearInterval(this.timer);\n this.timer = setInterval(() => {\n this.onTick();\n }, ms)\n this.setState({\n gameSpeed: speed,\n gameTimerSpeed: ms,\n gameOneDay: oneDay / speed,\n });\n }\n console.log(\"setting speed to: \" + speed);\n }", "title": "" }, { "docid": "dadf2e084b4acb0dd86d170912942627", "score": "0.6818153", "text": "function changeSpeed(e) {\n const y = e.pageY - this.offsetTop;\n const percent = y / this.offsetHeight;\n const [max, min] = [4, 0.4];\n const playbackRate = (percent * (max - min) + min).toFixed(2);\n console.log(playbackRate);\n speedBar.style.height = `${Math.round(percent * 100)}%`;\n speedBar.textContent = `${playbackRate} ×`;\n video.playbackRate = playbackRate;\n}", "title": "" }, { "docid": "b5a335b75a18c867b16b551fa30d6249", "score": "0.6817941", "text": "constructor() {\n this.speed = 0;\n }", "title": "" }, { "docid": "765bcb384daf7c4a64492af34149cbc2", "score": "0.68140775", "text": "function update_speed() {\r\n\t\tvar new_speed = $(\"#speed_range\").val()\r\n\t\tif (new_speed != speed_input) {\r\n\t\t\tset_speed(new_speed)\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "add6819e270fddaaa97fbf86b166ab53", "score": "0.6811352", "text": "function getSpeed(unit){\n\treturn parseFloat(unitConfig.find(unit+\" speed\").text());\n}", "title": "" }, { "docid": "2b528173ea0dcbdc99333bf621ad9987", "score": "0.6808935", "text": "forwards(speed) {\n if (speed === undefined) {\n this._speed = 100;\n } else {\n if (speed < 0 || speed > 100) {\n throw \"Speed must be between 0 and 100\"\n }\n this._speed = speed;\n }\n this._applySpeed();\n }", "title": "" }, { "docid": "1caccce60207f1254f26895e1963cd45", "score": "0.68075025", "text": "run(speed) {\n this.speed = speed;\n console.log(`${this.name} runs with speed ${this.speed}.`);\n }", "title": "" }, { "docid": "a62ac856009769150386cba93f41d35f", "score": "0.6785708", "text": "setVelocity(direction, speed) {\n this.velocity = direction.normalize().mult(speed);\n this.speed = speed >= this.maxSpeed ? this.maxSpeed : speed;\n }", "title": "" }, { "docid": "3b6a93d03f503e4e2b1618a65c9498fd", "score": "0.6770605", "text": "function updateSpeed() {\n let deltaX = (batX - lastX) * (batX - lastX);\n let deltaY = (batY - lastY) * (batY - lastY);\n let distance = Math.sqrt(deltaX + deltaY);\n if (currentFrame - lastFrame != 0) {\n speed = round(distance / (currentFrame - lastFrame));\n }\n if (lastX > batX) {\n velIsPos = false;\n } else {\n velIsPos = true;\n }\n //text(\"Speed: \" + speed, 20, 20);\n //text(\"MaxSpeed: \" + maxSpeed, 100, 20);\n //console.log(maxSpeed);\n}", "title": "" }, { "docid": "e19a73891f75b3e121ffd720a34dfea1", "score": "0.67553174", "text": "function onSpeedButtonPressed() {\n window.speed = window.speed * 2 > window.maxSpeed ? 1 : window.speed * 2;\n $('#speedButton').text('X' + window.speed);\n}", "title": "" }, { "docid": "d28c7a0ef8c306b36b1b4ba7a9cb1d27", "score": "0.6751101", "text": "function msPerTick(speed) {\n return 1000.0/speed;\n }", "title": "" }, { "docid": "46ca216a74d8abb2b524b4faad4791d9", "score": "0.674537", "text": "function gameSpeed() {\n speed -= 50;\n if (speed <= 100) {\n speed = 100;\n }\n clearInterval(drawer);\n drawer = setInterval(draw, speed);\n console.log('speeding', speed);\n }", "title": "" }, { "docid": "5bf750698e7a1afa0a409e9c0b6c5266", "score": "0.6742304", "text": "function setSpeed() {\n advanceDelay = document.getElementById('speed').selectedIndex;\n }", "title": "" }, { "docid": "54c62e4c6ba738bc8f85f645a008ef9e", "score": "0.67310804", "text": "function formatSpeed(speed, units) {\n\tif (units == 'us') { var unit = 'mph'; }\n\tif (units == 'si') { var unit = 'km/h'; }\n\n\treturn Math.round(speed) + ' ' + unit;\n}", "title": "" }, { "docid": "ae921e664a33aebbaf091915db7ecc22", "score": "0.67262816", "text": "function gameSpeed(level)\n{\n return 300-(12 * level);\n}", "title": "" }, { "docid": "b53003d08b828a86a9e1b78505890a7e", "score": "0.6719404", "text": "function setSpeed(speed) {\n timer = window.setInterval(() => {\n if (!isPaused) {\n if (winOrLose != \"Game Over\") {\n MoveTetrominoDown();\n }\n }\n }, 1000 / speed);\n}", "title": "" }, { "docid": "bb9659ffffb870b6305cf83e5e8ff8bf", "score": "0.6704798", "text": "function speedChange() {\r\n speed = Number(speedInput.options[speedInput.selectedIndex].value);\r\n}", "title": "" }, { "docid": "85f6ba0aafa2da7bccde97e20a606897", "score": "0.6680533", "text": "function _setTrueAirSpeed(speed){\n // Make me work!\n }", "title": "" }, { "docid": "461b6c36728d3a1ff7f25c8cf484512d", "score": "0.6679476", "text": "_updateGenerationSpeed(speed) {\n this['generationSpeed'] = parseInt(speed, 10);\n this._layoutWords();\n }", "title": "" }, { "docid": "ba5077ac090e7f0f0e224f76dfbe7f65", "score": "0.66769236", "text": "setSpeed() {\n return Math.floor(Math.random() * 250) + 120;\n }", "title": "" }, { "docid": "2d5ad8f895664fb86b1c4e8eee4ca13f", "score": "0.6673081", "text": "function dec_speed()\n{\n if(speed == speed_fast)\n speed = speed_normal;\t\n}", "title": "" }, { "docid": "363f1dd276232498a2c94670ffbd5316", "score": "0.6663019", "text": "function setSpeed(speed) {\n timer = window.setInterval(() => {\n if (!isPaused) {\n if (winOrLose != \"Game Over\") {\n MoveTetrominoDown();\n }\n }\n }, 1000 / speed);\n}", "title": "" }, { "docid": "f89f2cc8556f68173be35502ddf0c69a", "score": "0.6643628", "text": "getSpeed() {\n return this.velocity.mag();\n }", "title": "" }, { "docid": "1971bc5b26b884a75a6ec2ec2464728c", "score": "0.6602975", "text": "function speedchange() {\n\ttime = this.value;\n\tif(document.getElementById(\"start\").disabled) {\n\t\tclearInterval(timer);\n\t\ttimer = setInterval(run, time);\n\t}\n}", "title": "" }, { "docid": "4cb5e7c62d694b432d6bca78e3d459bf", "score": "0.6598283", "text": "get speed() {\n return this.getFeature('speed');\n }", "title": "" }, { "docid": "d48444ef9197eab625dcf44c4cb9c5d5", "score": "0.6588016", "text": "function setSpeed(newSpeed) {\n console.log(newSpeed);\n speedObj.speed[myTabId] = newSpeed;\n videoSpeed = parseFloat(newSpeed);\n input.value = videoSpeed.toFixed(2);\n chrome.tabs.query({ currentWindow: true, active: true },\n function (tabs) {\n chrome.tabs.sendMessage(tabs[0].id, {\n type: 'video-speed',\n speed: newSpeed\n })\n });\n }", "title": "" }, { "docid": "db13349baba3bae82f7d4fbb2d173333", "score": "0.6572773", "text": "accelerate(amount) {\n\t\tthis.speed += amount;\n\t}", "title": "" }, { "docid": "db13349baba3bae82f7d4fbb2d173333", "score": "0.6572773", "text": "accelerate(amount) {\n\t\tthis.speed += amount;\n\t}", "title": "" }, { "docid": "c216ae5d91e7450c25543e7ea1ef1b1e", "score": "0.65608186", "text": "function incrementSpeed() {\n setInterval(function() {\n // This will work only when game is not paused or over.\n if (checkGamePause === false) {\n spikeSpeed = spikeSpeed + 0.05;\n otherCarsspeed = otherCarsspeed + 0.05;\n coinSpeed = coinSpeed + 0.05;\n // console.log(\"spike,car,coin: \"+spikeSpeed+\" \"+otherCarsspeed+\" \"+coinSpeed);\n }\n }, 4000);\n\n }", "title": "" }, { "docid": "e5d175af3a1ee622273f93f42fc23972", "score": "0.6557355", "text": "handleSpeedChange(event) {\n this.setState({speed: event.target.value});\n }", "title": "" }, { "docid": "39bd19dd390a65206ecf50534a510a9c", "score": "0.65534556", "text": "function SetSpeed(speed) {\n guiData.cursorSpeed = speed;\n}", "title": "" }, { "docid": "0cfc57a7094790249f0f79b66ebb3db5", "score": "0.6552154", "text": "changeSpeed({ speed = 1 }) {\n this.stopTimer();\n this.setState({\n speed: speed\n }, () => {\n this.resumeTimer();\n });\n }", "title": "" }, { "docid": "83fb959ade59ef63e61a51f3ecce309a", "score": "0.6541313", "text": "function changeSpeed() {\n\tif($video[0].playbackRate === 1) {\n\t\t$video[0].playbackRate = 2;\n\t\t$fastFwd.text(\"2x Speed\");\n\t} else if ($video[0].playbackRate === 2) {\n\t\t$video[0].playbackRate = 1;\n\t\t$fastFwd.text(\"1x Speed\");\t\t\t\t\n\t}\n}", "title": "" }, { "docid": "7d53f11d5aaf96c028e3dff16c81029d", "score": "0.6522087", "text": "decodeSpeed(speed) {\n if (speed < 0.5) {\n return `Calm, ${speed} m/s`;\n } else if (speed >= 0.5 && speed < 1.5) {\n return `Light air, ${speed} m/s`;\n } else if (speed >= 1.5 && speed < 3.3) {\n return `Light breeze, ${speed} m/s`;\n } else if (speed >= 3.3 && speed < 5.5) {\n return `Gentle breeze, ${speed} m/s`;\n } else if (speed >= 5.5 && speed < 7.9) {\n return `Moderate breeze, ${speed} m/s`;\n } else if (speed >= 7.9 && speed < 10.7) {\n return `Fresh breeze, ${speed} m/s`;\n } else if (speed >= 10.7 && speed < 13.8) {\n return `Strong breeze, ${speed} m/s`;\n } else if (speed >= 13.8 && speed < 17.1) {\n return `High wind, moderate gale, ${speed} m/s`;\n } else if (speed >= 17.1 && speed < 20.7) {\n return `Gale, fresh gale, ${speed} m/s`;\n } else if (speed >= 20.7 && speed < 24.4) {\n return `Strong/severe gale, ${speed} m/s`;\n } else if (speed >= 24.4 && speed < 28.4) {\n return `Storm, whole gale, ${speed} m/s`;\n } else if (speed >= 28.4 && speed < 32.6) {\n return `Violent storm, ${speed} m/s`;\n } else if (speed >= 32.6) {\n return `Hurricane force, ${speed} m/s`;\n }\n }", "title": "" }, { "docid": "fa7ab811297fb4091c79ce405a871b23", "score": "0.6521113", "text": "function Level() {\n\tvar queryString = window.location.search; //take the part of the url after ?\n\tvar urlParams = new URLSearchParams(queryString);\n\n\tspeed = urlParams.get('speed'); //recover the speed\n\tconsole.log(speed);\n\tspeedZ = 1.5;\n\tif(speed == 'easy'){\n\t\ttotalcups = 4;\n\t\ttotalcones = 4;\n\t\tmaxTime = 3;\n\t}else if(speed == 'medium'){\n\t\ttotalcups = 4;\n\t\ttotalcones = 6;\n\t\tmaxTime = 2;\n\t}else if(speed == 'hard'){ //depending on the speed selected change the parameters of the animation\n\t\ttotalcups = 4;\n\t\ttotalcones = 8;\n\t\tmaxTime = 1;\n\t}\n\t\n\t\n}", "title": "" }, { "docid": "e9d2be90a884c762dbe9231e721186c5", "score": "0.65187335", "text": "function Vehicle(speed,propulsionUnits) {\n\t\tthis.speed=speed;\n\t\tthis.propulsionUnits = propulsionUnits;\n\t}", "title": "" }, { "docid": "5621e9d0f0c557946ec97b28f8ee704c", "score": "0.650704", "text": "function get_MET(speed) {\n if ( 1 <= speed && speed < 3) {\n return 2;\n } else if ( 3 <= speed && speed < 4.1) {\n return 2.5;\n } else if ( 4.1 <= speed && speed < 5.1) {\n return 3.2;\n } else if ( 5.2 <= speed && speed < 6.4) {\n return 4.4;\n } else if ( 6.5 <= speed && speed < 7.2) {\n return 5.2;\n } else if ( 7.3 <= speed && speed < 8) {\n return 7;\n } else if ( 8.1 <= speed && speed < 9.6) {\n return 9;\n } else if ( 9.7 <= speed && speed < 10.7) {\n return 10.5;\n } else if ( 10.8 <= speed && speed < 11.2){\n return 11;\n } else if ( 11.3 <= speed && speed < 12.8){\n return 11.6;\n } else if ( 12.9 <= speed && speed < 13.8){\n return 12.3; \n } else if ( 13.9 <= speed && speed < 14.4){\n return 12.8; \n } else if ( 14.5 <= speed && speed < 16){\n return 14.5; \n } else if ( 16.1 <= speed && speed < 17.7){\n return 16; \n } else if ( 17.8 <= speed && speed < 19.3){\n return 19;\n } else if ( 19.4 <= speed && speed < 20.9){\n return 19.8; \n } else if ( 21 <= speed && speed < 22.5){\n return 23; \n } else {\n return 1;\n }\n}", "title": "" }, { "docid": "b565ca29130f54d5c003f458dc9dd02d", "score": "0.6503784", "text": "function setScrollingSpeed(value, type){\r\n setVariableState('scrollingSpeed', value, type);\r\n }", "title": "" }, { "docid": "b565ca29130f54d5c003f458dc9dd02d", "score": "0.6503784", "text": "function setScrollingSpeed(value, type){\r\n setVariableState('scrollingSpeed', value, type);\r\n }", "title": "" }, { "docid": "b565ca29130f54d5c003f458dc9dd02d", "score": "0.6503784", "text": "function setScrollingSpeed(value, type){\r\n setVariableState('scrollingSpeed', value, type);\r\n }", "title": "" } ]
53d78a6171125753dbb4fa6f9bb23643
The function whose prototype chain sequence wrappers inherit from.
[ { "docid": "94d209651535670a08e9df4a9c2e1a53", "score": "0.0", "text": "function baseLodash() {\n\t // No operation performed.\n\t}", "title": "" } ]
[ { "docid": "3cb0cd9559bdfd798ea97f4a4f190033", "score": "0.60924053", "text": "function inherit4() {\n\n}", "title": "" }, { "docid": "a97924215a7036b60f895d63446f54e6", "score": "0.5900003", "text": "function inherit3() {\n\n}", "title": "" }, { "docid": "871212b29952f8513c9aea693eea4885", "score": "0.5782834", "text": "function s(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)}))}", "title": "" }, { "docid": "b826ec957e34051bd53f26c63676254e", "score": "0.57596785", "text": "function F () {\n return parent.call(this, [].slice.call(arguments)[0]);\n }", "title": "" }, { "docid": "9a7f30b51738b1deb33c0581285a916f", "score": "0.5731611", "text": "function a(e,t){c(e,t),Object.getOwnPropertyNames(t.prototype).forEach(function(r){c(e.prototype,t.prototype,r)}),Object.getOwnPropertyNames(t).forEach(function(r){c(e,t,r)})}", "title": "" }, { "docid": "387f573dcf2303a14af6b5ac6c6f67f5", "score": "0.57187253", "text": "function getFunctionParent() {\n\t return this.findParent(function (path) {\n\t return path.isFunction() || path.isProgram();\n\t });\n\t}", "title": "" }, { "docid": "82c373e97a3b32a834c54ea89519c808", "score": "0.5706107", "text": "function a(e,t){s(e,t),Object.getOwnPropertyNames(t.prototype).forEach((function(r){s(e.prototype,t.prototype,r)})),Object.getOwnPropertyNames(t).forEach((function(r){s(e,t,r)}))}", "title": "" }, { "docid": "0e8a010e1a29c9066297f56ca4a656ec", "score": "0.56897074", "text": "function a(e,t){s(e,t),Object.getOwnPropertyNames(t.prototype).forEach((function(n){s(e.prototype,t.prototype,n)})),Object.getOwnPropertyNames(t).forEach((function(n){s(e,t,n)}))}", "title": "" }, { "docid": "5799c74a5b77b00aae14e81da0c00348", "score": "0.5679559", "text": "function F() {}", "title": "" }, { "docid": "5799c74a5b77b00aae14e81da0c00348", "score": "0.5679559", "text": "function F() {}", "title": "" }, { "docid": "5799c74a5b77b00aae14e81da0c00348", "score": "0.5679559", "text": "function F() {}", "title": "" }, { "docid": "5799c74a5b77b00aae14e81da0c00348", "score": "0.5679559", "text": "function F() {}", "title": "" }, { "docid": "5799c74a5b77b00aae14e81da0c00348", "score": "0.5679559", "text": "function F() {}", "title": "" }, { "docid": "5799c74a5b77b00aae14e81da0c00348", "score": "0.5679559", "text": "function F() {}", "title": "" }, { "docid": "5799c74a5b77b00aae14e81da0c00348", "score": "0.5679559", "text": "function F() {}", "title": "" }, { "docid": "5799c74a5b77b00aae14e81da0c00348", "score": "0.5679559", "text": "function F() {}", "title": "" }, { "docid": "5799c74a5b77b00aae14e81da0c00348", "score": "0.5679559", "text": "function F() {}", "title": "" }, { "docid": "5799c74a5b77b00aae14e81da0c00348", "score": "0.5679559", "text": "function F() {}", "title": "" }, { "docid": "5799c74a5b77b00aae14e81da0c00348", "score": "0.5679559", "text": "function F() {}", "title": "" }, { "docid": "c01d70ed2c27330523bbc7da10cbabbe", "score": "0.5672901", "text": "function i(t,e){c(t,e),Object.getOwnPropertyNames(e.prototype).forEach((function(n){c(t.prototype,e.prototype,n)})),Object.getOwnPropertyNames(e).forEach((function(n){c(t,e,n)}))}", "title": "" }, { "docid": "90b6b1fe5c1f95fe97c462557cfe01e0", "score": "0.56680685", "text": "function inherit2() {\n // TODO: This generally relies on the application of apply()\n}", "title": "" }, { "docid": "99d84defc398410b42c7a26ecadccf04", "score": "0.5649284", "text": "function b(a,b,c){return a.prototype[b].apply(this,c)}", "title": "" }, { "docid": "cf62f45df6557a48b5658524bd55a60f", "score": "0.5642194", "text": "function inherit(){}", "title": "" }, { "docid": "0b942debebb78ba3354a35e241d9e88a", "score": "0.5642066", "text": "function inheritTetrominoBlockClassPrototype(subClassFunctionConstructor){\n subClassFunctionConstructor.prototype = new TetrominoBlock();\n subClassFunctionConstructor.prototype.constructor = subClassFunctionConstructor; // is this line still needed?\n}", "title": "" }, { "docid": "1a73117cea4ef34c9460c1482878c686", "score": "0.56286216", "text": "function r(t,e){s(t,e),Object.getOwnPropertyNames(e.prototype).forEach(function(i){s(t.prototype,e.prototype,i)}),Object.getOwnPropertyNames(e).forEach(function(i){s(t,e,i)})}", "title": "" }, { "docid": "fa2a058e35c1ed93cadf7429572d34e4", "score": "0.5624181", "text": "function A() {}", "title": "" }, { "docid": "fa2a058e35c1ed93cadf7429572d34e4", "score": "0.5624181", "text": "function A() {}", "title": "" }, { "docid": "9e2d6a9addaf907cfabe97c8621a7f75", "score": "0.56188166", "text": "function getFunctionParent() {\n return this.findParent(function (path) {\n return path.isFunction() || path.isProgram();\n });\n}", "title": "" }, { "docid": "b6199e91639fb8504d1740f2401d015a", "score": "0.5607026", "text": "function Nothing$prototype$chain(f) {\n return this;\n }", "title": "" }, { "docid": "6b14b4ae995e08768dbd32b681c8ef91", "score": "0.5573761", "text": "function r(e,t){function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "title": "" }, { "docid": "cc5478fd19f1caf9ea558d008bc789e0", "score": "0.5534079", "text": "function Ba(e,t){Ha(e,t),Object.getOwnPropertyNames(t.prototype).forEach((function(n){Ha(e.prototype,t.prototype,n)})),Object.getOwnPropertyNames(t).forEach((function(n){Ha(e,t,n)}))}", "title": "" }, { "docid": "16a74b27c0f631834c76b2764beb3c80", "score": "0.55131805", "text": "get superClassChain(){\n return this.constructor.superClassChain\n }", "title": "" }, { "docid": "06ed312763129a9c23f8d9bead3e9508", "score": "0.55074155", "text": "function ObjectGetPrototypeOfFunc(className) {\n\tFunctionTypeBase.call(this, 1, className || 'Function');\n}", "title": "" }, { "docid": "d7319f53c21f81debeff7d37d4d2266b", "score": "0.5492177", "text": "function I(e,t){function n(){this.constructor=e}R(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "title": "" }, { "docid": "d7319f53c21f81debeff7d37d4d2266b", "score": "0.5492177", "text": "function I(e,t){function n(){this.constructor=e}R(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "title": "" }, { "docid": "d7319f53c21f81debeff7d37d4d2266b", "score": "0.5492177", "text": "function I(e,t){function n(){this.constructor=e}R(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "title": "" }, { "docid": "7c237c51a586e7e363c6067444c1ec4d", "score": "0.54820436", "text": "function i(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "title": "" }, { "docid": "a80ab554c6947da123c2101ceeb7cc90", "score": "0.54813445", "text": "function C(e,t){function n(){this.constructor=e}A(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "title": "" }, { "docid": "8d2ab4a7e2ee47e3a5ea3b1e9ea55214", "score": "0.54619706", "text": "function i(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}", "title": "" }, { "docid": "eb38c915051536b656dc76d729530684", "score": "0.54615253", "text": "function x() {}", "title": "" }, { "docid": "f42e7679a71ae35ce5e846b667e2ff3a", "score": "0.54562926", "text": "function A() { }", "title": "" }, { "docid": "cf0a57449809180dd500551832b80afb", "score": "0.5447166", "text": "function t(){function t(t,e,r,n){var i;if(n){var u=n.prototype;i=ne.create(u)}else i=t.prototype;return ne.keys(e).forEach(function(t){i[t]=e[t]}),ne.keys(r).forEach(function(e){t[e]=r[e]}),i.constructor=t,t.prototype=i,t}function e(t,e,r,n){return ne.getPrototypeOf(e)[r].apply(t,n)}function r(t,r,n){e(t,r,\"constructor\",n)}function n(){return Object.create(ae)}function i(t){var e=Object.create(ce);return e.__reversedIndices=t?t.__reversedIndices:!1,e}function u(t,e,r,n){var i=t.get?t.get(e[n],de):de;return i===de?r:++n===e.length?i:u(i,e,r,n)}function s(t,e,r){return(0===t||null!=r&&-r>=t)&&(null==e||null!=r&&e>=r)}function a(t,e){return 0>t?Math.max(0,e+t):e?Math.min(e,t):t}function h(t,e){return null==t?e:0>t?Math.max(0,e+t):e?Math.min(e,t):t}function o(t){return t}function c(t,e){return[e,t]}function f(){return!0}function l(){return this}function _(t){return(t||0)+1}function v(t,e,r,n,i){var u=t.__makeSequence();return u.__iterateUncached=function(u,s,a){var h=0,o=t.__iterate(function(t,i,s){if(e.call(r,t,i,s)){if(u(t,n?i:h,s)===!1)return!1;h++}},s,a);return i?o:h},u}function g(t){return function(){return!t.apply(this,arguments)}}function p(t){return\"string\"==typeof t?JSON.stringify(t):t}function m(t,e){for(var r=\"\";e;)1&e&&(r+=t),(e>>=1)&&(t+=t);return r}function d(t,e){return t>e?1:e>t?-1:0}function y(t){I(1/0!==t,\"Cannot perform this action with an infinite sequence.\")}function w(t,e){return t===e?0!==t||0!==e||1/t===1/e:t!==t?e!==e:t instanceof ue?t.equals(e):!1}function I(t,e){if(!t)throw Error(e)}function D(t,e,r){var n=t._rootData.updateIn(t._keyPath,e),i=t._keyPath||[];return t._onChange&&t._onChange.call(void 0,n,t._rootData,r?i.concat(r):i),new _e(n,t._keyPath,t._onChange)}function O(){}function b(t){for(var e=t.length,r=Array(e),n=0;e>n;n++)r[n]=t[n];return r}function M(t){return Ae.value=t,Ae}function k(t,e,r){var n=Object.create(Ie);return n.length=t,n._root=e,n.__ownerID=r,n}function S(t,e,r){var n=M(),i=x(t._root,t.__ownerID,0,L(e),e,r,n),u=t.length+(n.value?r===de?-1:1:0);return t.__ownerID?(t.length=u,t._root=i,t):i?i===t._root?t:k(u,i):ye.empty()\n}function x(t,e,r,n,i,u,s){return t?t.update(e,r,n,i,u,s):u===de?t:(s&&(s.value=!0),new xe(e,n,[i,u]))}function E(t){return t.constructor===xe||t.constructor===ke}function C(t,e,r,n,i){if(t.hash===n)return new ke(e,n,[t.entry,i]);var u,s=t.hash>>>r&me,a=n>>>r&me,h=s===a?[C(t,e,r+ge,n,i)]:(u=new xe(e,n,i),a>s?[t,u]:[u,t]);return new De(e,1<<s|1<<a,h)}function A(t,e,r,n){for(var i=0,u=0,s=Array(r),a=0,h=1,o=e.length;o>a;a++,h<<=1){var c=e[a];null!=c&&a!==n&&(i|=h,s[u++]=c)}return new De(t,i,s)}function q(t,e,r,n,i){for(var u=0,s=Array(pe),a=0;0!==r;a++,r>>>=1)s[a]=1&r?e[u++]:null;return s[n]=i,new be(t,u+1,s)}function j(t,e,r){for(var n=[],i=0;r.length>i;i++){var u=r[i];u&&n.push(Array.isArray(u)?ue(u).fromEntries():ue(u))}return z(t,e,n)}function U(t){return function(e,r){return e&&e.mergeDeepWith?e.mergeDeepWith(t,r):t?t(e,r):r}}function z(t,e,r){return 0===r.length?t:t.withMutations(function(t){for(var n=e?function(r,n){var i=t.get(n,de);t.set(n,i===de?r:e(i,r))}:function(e,r){t.set(r,e)},i=0;r.length>i;i++)r[i].forEach(n)})}function R(t,e,r,n){var i=e[n],u=t.get?t.get(i,de):de;return u===de&&(u=ye.empty()),I(t.set,\"updateIn with invalid keyPath\"),t.set(i,++n===e.length?r(u):R(u,e,r,n))}function P(t){return t-=t>>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function W(t,e,r,n){var i=n?t:b(t);return i[e]=r,i}function J(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var u=Array(i),s=0,a=0;i>a;a++)a===e?(u[a]=r,s=-1):u[a]=t[a+s];return u}function B(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=Array(n),u=0,s=0;n>s;s++)s===e&&(u=1),i[s]=t[s+u];return i}function L(t){if(!t)return 0;if(t===!0)return 1;var e=typeof t;if(\"number\"===e){if((0|t)===t)return t&qe;t=\"\"+t,e=\"string\"}if(\"string\"===e)return t.length>je?V(t):K(t);if(t.hashCode&&\"function\"==typeof t.hashCode)return t.hashCode();throw Error(\"Unable to hash: \"+t)}function V(t){var e=Re[t];return null==e&&(e=K(t),ze===Ue&&(ze=0,Re={}),ze++,Re[t]=e),e}function K(t){for(var e=0,r=0;t.length>r;r++)e=31*e+t.charCodeAt(r)&qe;\nreturn e}function N(t,e,r,n,i){return{array:t,level:e,offset:r,max:n,__prev:i}}function F(t,e,r,n,i,u){var s=Object.create(Le);return s.length=e-t,s._origin=t,s._size=e,s._level=r,s._root=n,s._tail=i,s.__ownerID=u,s}function G(t,e){if(e>=X(t._size))return t._tail;if(1<<t._level+ge>e){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&me],n-=ge;return r}}function H(t,e,r){var n=t.__ownerID||new O,i=t._origin,u=t._size,s=i+e,a=null==r?u:0>r?u+r:i+r;if(s===i&&a===u)return t;if(s>=a)return t.clear();for(var h=t._level,o=t._root,c=0;0>s+c;)o=new Ve(o.array.length?[,o]:[],n),h+=ge,c+=1<<h;c&&(s+=c,i+=c,a+=c,u+=c);for(var f=X(u),l=X(a);l>=1<<h+ge;)o=new Ve(o.array.length?[o]:[],n),h+=ge;var _=t._tail,v=f>l?G(t,a-1):l>f?new Ve([],n):_;if(l>f&&u>s&&_.array.length){o=o.ensureOwner(n);for(var g=o,p=h;p>ge;p-=ge){var m=f>>>p&me;g=g.array[m]=g.array[m]?g.array[m].ensureOwner(n):new Ve([],n)}g.array[f>>>ge&me]=_}if(u>a&&(v=v.removeAfter(n,0,a)),s>=l)s-=l,a-=l,h=ge,o=Ge,v=v.removeBefore(n,0,s);else if(s>i||f>l){var d,y;c=0;do d=s>>>h&me,y=l-1>>>h&me,d===y&&(d&&(c+=(1<<h)*d),h-=ge,o=o&&o.array[d]);while(o&&d===y);o&&s>i&&(o=o.removeBefore(n,h,s-c)),o&&f>l&&(o=o.removeAfter(n,h,l-c)),c&&(s-=c,a-=c),o=o||Ge}return t.__ownerID?(t.length=a-s,t._origin=s,t._size=a,t._level=h,t._root=o,t._tail=v,t):F(s,a,h,o,v)}function Q(t,e,r){for(var n=[],i=0;r.length>i;i++){var u=r[i];u&&n.push(u.forEach?u:ue(u))}var s=Math.max.apply(null,n.map(function(t){return t.length||0}));return s>t.length&&(t=t.setLength(s)),z(t,e,n)}function T(t,e){return I(t>=0,\"Index out of bounds\"),t+e}function X(t){return pe>t?0:t-1>>>ge<<ge}function Y(t,e){var r=Object.create(Te);return r.length=t?t.length:0,r._map=t,r.__ownerID=e,r}function Z(t,e,r){var n=Object.create(Ye.prototype);return n.length=t?t.length:0,n._map=t,n._vector=e,n.__ownerID=r,n}function $(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}function te(t,e){return e?ee(e,t,\"\",{\"\":t}):re(t)}function ee(t,e,r,n){return e&&(Array.isArray(e)||e.constructor===Object)?t.call(n,r,ue(e).map(function(r,n){return ee(t,r,n,e)\n})):e}function re(t){if(t){if(Array.isArray(t))return ue(t).map(re).toVector();if(t.constructor===Object)return ue(t).map(re).toMap()}return t}var ne=Object,ie={};ie.createClass=t,ie.superCall=e,ie.defaultSuperCall=r;var ue=function(t){return se.from(1===arguments.length?t:Array.prototype.slice.call(arguments))},se=ue;ie.createClass(ue,{toString:function(){return this.__toString(\"Seq {\",\"}\")},__toString:function(t,e){return 0===this.length?t+e:t+\" \"+this.map(this.__toStringMapper).join(\", \")+\" \"+e},__toStringMapper:function(t,e){return e+\": \"+p(t)},toJS:function(){return this.map(function(t){return t instanceof se?t.toJS():t}).__toJS()},toArray:function(){y(this.length);var t=Array(this.length||0);return this.values().forEach(function(e,r){t[r]=e}),t},toObject:function(){y(this.length);var t={};return this.forEach(function(e,r){t[r]=e}),t},toVector:function(){return y(this.length),Je.from(this)},toMap:function(){return y(this.length),ye.from(this)},toOrderedMap:function(){return y(this.length),Ye.from(this)},toSet:function(){return y(this.length),He.from(this)},equals:function(t){if(this===t)return!0;if(!(t instanceof se))return!1;if(null!=this.length&&null!=t.length){if(this.length!==t.length)return!1;if(0===this.length&&0===t.length)return!0}return this.__deepEquals(t)},__deepEquals:function(t){var e=this.cacheResult().entries().toArray(),r=0;return t.every(function(t,n){var i=e[r++];return w(n,i[0])&&w(t,i[1])})},join:function(t){t=t||\",\";var e=\"\",r=!0;return this.forEach(function(n){r?(r=!1,e+=n):e+=t+n}),e},count:function(t,e){return t?this.filter(t,e).count():(null==this.length&&(this.length=this.forEach(f)),this.length)},countBy:function(t){var e=this;return Ye.empty().withMutations(function(r){e.forEach(function(e,n,i){r.update(t(e,n,i),_)})})},concat:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];var r=[this].concat(t.map(function(t){return se(t)})),n=this.__makeSequence();return n.length=r.reduce(function(t,e){return null!=t&&null!=e.length?t+e.length:void 0},0),n.__iterateUncached=function(t,e){for(var n,i=0,u=r.length-1,s=0;u>=s&&!n;s++){var a=r[e?u-s:s];\ni+=a.__iterate(function(e,r,i){return t(e,r,i)===!1?(n=!0,!1):void 0},e)}return i},n},reverse:function(){var t=this,e=t.__makeSequence();return e.length=t.length,e.__iterateUncached=function(e,r){return t.__iterate(e,!r)},e.reverse=function(){return t},e},keys:function(){return this.flip().values()},values:function(){var t=this,e=i(t);return e.length=t.length,e.values=l,e.__iterateUncached=function(e,r,n){if(n&&null==this.length)return this.cacheResult().__iterate(e,r,n);var i,u=0;return n?(u=this.length-1,i=function(t,r,n){return e(t,u--,n)!==!1}):i=function(t,r,n){return e(t,u++,n)!==!1},t.__iterate(i,r),n?this.length:u},e},entries:function(){var t=this;if(t._cache)return se(t._cache);var e=t.map(c).values();return e.fromEntries=function(){return t},e},forEach:function(t,e){return this.__iterate(e?t.bind(e):t)},reduce:function(t,e,r){var n=e;return this.forEach(function(e,i,u){n=t.call(r,n,e,i,u)}),n},reduceRight:function(t,e,r){return this.reverse(!0).reduce(t,e,r)},every:function(t,e){var r=!0;return this.forEach(function(n,i,u){return t.call(e,n,i,u)?void 0:(r=!1,!1)}),r},some:function(t,e){return!this.every(g(t),e)},first:function(){return this.find(f)},last:function(){return this.findLast(f)},rest:function(){return this.slice(1)},butLast:function(){return this.slice(0,-1)},has:function(t){return this.get(t,de)!==de},get:function(t,e){return this.find(function(e,r){return w(r,t)},null,e)},getIn:function(t,e){return t&&0!==t.length?u(this,t,e,0):this},contains:function(t){return this.find(function(e){return w(e,t)},null,de)!==de},find:function(t,e,r){var n=r;return this.forEach(function(r,i,u){return t.call(e,r,i,u)?(n=r,!1):void 0}),n},findKey:function(t,e){var r;return this.forEach(function(n,i,u){return t.call(e,n,i,u)?(r=i,!1):void 0}),r},findLast:function(t,e,r){return this.reverse(!0).find(t,e,r)},findLastKey:function(t,e){return this.reverse(!0).findKey(t,e)},flip:function(){var t=this,e=n();return e.length=t.length,e.flip=function(){return t},e.__iterateUncached=function(e,r){return t.__iterate(function(t,r,n){return e(r,t,n)!==!1\n},r)},e},map:function(t,e){var r=this,n=r.__makeSequence();return n.length=r.length,n.__iterateUncached=function(n,i){return r.__iterate(function(r,i,u){return n(t.call(e,r,i,u),i,u)!==!1},i)},n},mapKeys:function(t,e){var r=this,n=r.__makeSequence();return n.length=r.length,n.__iterateUncached=function(n,i){return r.__iterate(function(r,i,u){return n(r,t.call(e,i,r,u),u)!==!1},i)},n},filter:function(t,e){return v(this,t,e,!0,!1)},slice:function(t,e){if(s(t,e,this.length))return this;var r=a(t,this.length),n=h(e,this.length);if(r!==r||n!==n)return this.entries().slice(t,e).fromEntries();var i=0===r?this:this.skip(r);return null==n||n===this.length?i:i.take(n-r)},take:function(t){var e=0,r=this.takeWhile(function(){return e++<t});return r.length=this.length&&Math.min(this.length,t),r},takeLast:function(t,e){return this.reverse(e).take(t).reverse(e)},takeWhile:function(t,e){var r=this,n=r.__makeSequence();return n.__iterateUncached=function(n,i,u){if(i)return this.cacheResult().__iterate(n,i,u);var s=0;return r.__iterate(function(r,i,u){return t.call(e,r,i,u)&&n(r,i,u)!==!1?void s++:!1},i,u),s},n},takeUntil:function(t,e,r){return this.takeWhile(g(t),e,r)},skip:function(t,e){if(0===t)return this;var r=0,n=this.skipWhile(function(){return r++<t},null,e);return n.length=this.length&&Math.max(0,this.length-t),n},skipLast:function(t,e){return this.reverse(e).skip(t).reverse(e)},skipWhile:function(t,e){var r=this,n=r.__makeSequence();return n.__iterateUncached=function(n,i,u){if(i)return this.cacheResult().__iterate(n,i,u);var s=!0,a=0;return r.__iterate(function(r,i,u){if(!s||!(s=t.call(e,r,i,u))){if(n(r,i,u)===!1)return!1;a++}},i,u),a},n},skipUntil:function(t,e,r){return this.skipWhile(g(t),e,r)},groupBy:function(t){var e=this,r=Ye.empty().withMutations(function(r){e.forEach(function(e,n,i){var u=t(e,n,i),s=r.get(u,de);s===de&&(s=[],r.set(u,s)),s.push([n,e])})});return r.map(function(t){return se(t).fromEntries()})},sort:function(t,e){return this.sortBy(o,t,e)},sortBy:function(t,e){e=e||d;var r=this;return se(this.entries().entries().toArray().sort(function(n,i){return e(t(n[1][1],n[1][0],r),t(i[1][1],i[1][0],r))||n[0]-i[0]\n})).fromEntries().values().fromEntries()},cacheResult:function(){return!this._cache&&this.__iterateUncached&&(y(this.length),this._cache=this.entries().toArray(),null==this.length&&(this.length=this._cache.length)),this},__iterate:function(t,e,r){if(!this._cache)return this.__iterateUncached(t,e,r);var n=this.length-1,i=this._cache,u=this;if(e)for(var s=i.length-1;s>=0;s--){var a=i[s];if(t(a[1],r?a[0]:n-a[0],u)===!1)break}else i.every(r?function(e){return t(e[1],n-e[0],u)!==!1}:function(e){return t(e[1],e[0],u)!==!1});return this.length},__makeSequence:function(){return n()}},{from:function(t){if(t instanceof se)return t;if(!Array.isArray(t)){if(t&&t.constructor===Object)return new fe(t);t=[t]}return new le(t)}});var ae=ue.prototype;ae.toJSON=ae.toJS,ae.__toJS=ae.toObject,ae.inspect=ae.toSource=function(){return\"\"+this};var he=function(){ie.defaultSuperCall(this,oe.prototype,arguments)},oe=he;ie.createClass(he,{toString:function(){return this.__toString(\"Seq [\",\"]\")},toArray:function(){y(this.length);var t=Array(this.length||0);return t.length=this.forEach(function(e,r){t[r]=e}),t},fromEntries:function(){var t=this,e=n();return e.length=t.length,e.entries=function(){return t},e.__iterateUncached=function(e,r,n){return t.__iterate(function(t,r,n){return e(t[1],t[0],n)},r,n)},e},join:function(t){t=t||\",\";var e=\"\",r=0;return this.forEach(function(n,i){var u=i-r;r=i,e+=(1===u?t:m(t,u))+n}),this.length&&this.length-1>r&&(e+=m(t,this.length-1-r)),e},concat:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];var r=[this].concat(t).map(function(t){return ue(t)}),n=this.__makeSequence();return n.length=r.reduce(function(t,e){return null!=t&&null!=e.length?t+e.length:void 0},0),n.__iterateUncached=function(t,e,n){if(n&&!this.length)return this.cacheResult().__iterate(t,e,n);for(var i,u=0,s=n&&this.length-1,a=r.length-1,h=0;a>=h&&!i;h++){var o=r[e?a-h:h];o instanceof oe||(o=o.values()),u+=o.__iterate(function(e,r,a){return r+=u,t(e,n?s-r:r,a)===!1?(i=!0,!1):void 0},e)}return u},n},reverse:function(t){var e=this,r=e.__makeSequence();\nreturn r.length=e.length,r.__reversedIndices=!!(t^e.__reversedIndices),r.__iterateUncached=function(r,n,i){return e.__iterate(r,!n,i^t)},r.reverse=function(r){return t===r?e:ce.reverse.call(this,r)},r},values:function(){var t=ie.superCall(this,oe.prototype,\"values\",[]);return t.length=void 0,t},filter:function(t,e,r){var n=v(this,t,e,r,r);return r&&(n.length=this.length),n},indexOf:function(t){return this.findIndex(function(e){return w(e,t)})},lastIndexOf:function(t){return this.reverse(!0).indexOf(t)},findIndex:function(t,e){var r=this.findKey(t,e);return null==r?-1:r},findLastIndex:function(t,e){return this.reverse(!0).findIndex(t,e)},slice:function(t,e,r){var n=this;if(s(t,e,n.length))return n;var i=n.__makeSequence(),u=a(t,n.length),o=h(e,n.length);return i.length=n.length&&(r?n.length:o-u),i.__reversedIndices=n.__reversedIndices,i.__iterateUncached=function(i,s,c){if(s)return this.cacheResult().__iterate(i,s,c);var f=this.__reversedIndices^c;if(u!==u||o!==o||f&&null==n.length){var l=n.count();u=a(t,l),o=h(e,l)}var _=f?n.length-o:u,v=f?n.length-u:o,g=n.__iterate(function(t,e,n){return f?null!=v&&e>=v||e>=_&&i(t,r?e:e-_,n)!==!1:_>e||(null==v||v>e)&&i(t,r?e:e-_,n)!==!1},s,c);return null!=this.length?this.length:r?g:Math.max(0,g-_)},i},splice:function(t,e){for(var r=[],n=2;arguments.length>n;n++)r[n-2]=arguments[n];return 0===e&&0===r.length?this:this.slice(0,t).concat(r,this.slice(t+e))},takeWhile:function(t,e,r){var n=this,i=n.__makeSequence();return i.__iterateUncached=function(u,s,a){if(s)return this.cacheResult().__iterate(u,s,a);var h=0,o=!0,c=n.__iterate(function(r,n,i){return t.call(e,r,n,i)&&u(r,n,i)!==!1?void(h=n):(o=!1,!1)},s,a);return r?i.length:o?c:h+1},r&&(i.length=this.length),i},skipWhile:function(t,e,r){var n=this,i=n.__makeSequence();return r&&(i.length=this.length),i.__iterateUncached=function(i,u,s){if(u)return this.cacheResult().__iterate(i,u,s);var a=n.__reversedIndices^s,h=!0,o=0,c=n.__iterate(function(n,u,a){return h&&(h=t.call(e,n,u,a),h||(o=u)),h||i(n,s||r?u:u-o,a)!==!1},u,s);return r?c:a?o+1:c-o\n},i},groupBy:function(t,e,r){var n=this,i=Ye.empty().withMutations(function(e){n.forEach(function(i,u,s){var a=t(i,u,s),h=e.get(a,de);h===de&&(h=Array(r?n.length:0),e.set(a,h)),r?h[u]=i:h.push(i)})});return i.map(function(t){return ue(t)})},sortBy:function(t,e,r){var n=ie.superCall(this,oe.prototype,\"sortBy\",[t,e]);return r||(n=n.values()),n.length=this.length,n},__makeSequence:function(){return i(this)}},{},ue);var ce=he.prototype;ce.__toJS=ce.toArray,ce.__toStringMapper=p;var fe=function(t){var e=Object.keys(t);this._object=t,this._keys=e,this.length=e.length};ie.createClass(fe,{toObject:function(){return this._object},get:function(t,e){return void 0===e||this.has(t)?this._object[t]:e},has:function(t){return this._object.hasOwnProperty(t)},__iterate:function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,u=0;i>=u;u++){var s=e?i-u:u;if(t(r[n[s]],n[s],r)===!1)break}return u}},{},ue);var le=function(t){this._array=t,this.length=t.length};ie.createClass(le,{toArray:function(){return this._array},__iterate:function(t,e,r){var n=this._array,i=n.length-1,u=-1;if(e){for(var s=i;s>=0;s--){if(n.hasOwnProperty(s)&&t(n[s],r?s:i-s,n)===!1)return u+1;u=s}return n.length}var a=n.every(function(e,s){return t(e,r?i-s:s,n)===!1?!1:(u=s,!0)});return a?n.length:u+1}},{},he),le.prototype.get=fe.prototype.get,le.prototype.has=fe.prototype.has;var _e=function(t,e,r){this._rootData=t,this._keyPath=e,this._onChange=r},ve=_e;ie.createClass(_e,{get:function(t,e){var r=this._rootData.getIn(this._keyPath,ye.empty());return t?r.get(t,e):r},set:function(t,e){return D(this,function(r){return r.set(t,e)},t)},\"delete\":function(t){return D(this,function(e){return e.delete(t)},t)},update:function(t,e){var r;return\"function\"==typeof t?(r=t,t=void 0):r=function(r){return r.update(t,e)},D(this,r,t)},cursor:function(t){return t&&!Array.isArray(t)&&(t=[t]),t&&0!==t.length?new ve(this._rootData,this._keyPath?this._keyPath.concat(t):t,this._onChange):this}},{});var ge=5,pe=1<<ge,me=pe-1,de={},ye=function(t){var e=we.empty();return t?t.constructor===we?t:e.merge(t):e\n},we=ye;ie.createClass(ye,{toString:function(){return this.__toString(\"Map {\",\"}\")},get:function(t,e){return this._root?this._root.get(0,L(t),t,e):e},set:function(t,e){return S(this,t,e)},\"delete\":function(t){return S(this,t,de)},update:function(t,e){return this.set(t,e(this.get(t)))},clear:function(){return this.__ownerID?(this.length=0,this._root=null,this):we.empty()},merge:function(){return j(this,null,arguments)},mergeWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return j(this,t,e)},mergeDeep:function(){return j(this,U(null),arguments)},mergeDeepWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return j(this,U(t),e)},updateIn:function(t,e){return t&&0!==t.length?R(this,t,e,0):e(this)},cursor:function(t,e){return e||\"function\"!=typeof t||(e=t,t=null),t&&!Array.isArray(t)&&(t=[t]),new _e(this,t,e)},withMutations:function(t){var e=this.asMutable();return t(e),e.__ensureOwner(this.__ownerID)},asMutable:function(){return this.__ownerID?this:this.__ensureOwner(new O)},asImmutable:function(){return this.__ensureOwner()},__iterate:function(t,e){var r=this;if(!r._root)return 0;var n=0;return this._root.iterate(function(e){return t(e[1],e[0],r)===!1?!1:void n++},e),n},__deepEqual:function(t){var e=this;return t.every(function(t,r){return w(e.get(r,de),t)})},__ensureOwner:function(t){return t===this.__ownerID?this:t?k(this.length,this._root,t):(this.__ownerID=t,this)}},{empty:function(){return Ce||(Ce=k(0))}},ue);var Ie=ye.prototype;ye.from=ye;var De=function(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r},Oe=De;ie.createClass(De,{get:function(t,e,r,n){var i=1<<(e>>>t&me),u=this.bitmap;return 0===(u&i)?n:this.nodes[P(u&i-1)].get(t+ge,e,r,n)},update:function(t,e,r,n,i,u){var s=r>>>e&me,a=1<<s,h=this.bitmap,o=0!==(h&a);if(!o&&i===de)return this;var c=P(h&a-1),f=this.nodes,l=o?f[c]:null,_=x(l,t,e+ge,r,n,i,u);if(_===l)return this;if(!o&&_&&f.length>=Pe)return q(t,f,h,c,_);if(o&&!_&&2===f.length&&E(f[1^c]))return f[1^c];if(o&&_&&1===f.length&&E(_))return _;var v=t&&t===this.ownerID,g=o?_?h:h^a:h|a,p=o?_?W(f,c,_,v):B(f,c,v):J(f,c,_,v);\nreturn v?(this.bitmap=g,this.nodes=p,this):new Oe(t,g,p)},iterate:function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++)if(r[e?i-n:n].iterate(t,e)===!1)return!1}},{});var be=function(t,e,r){this.ownerID=t,this.count=e,this.nodes=r},Me=be;ie.createClass(be,{get:function(t,e,r,n){var i=e>>>t&me,u=this.nodes[i];return u?u.get(t+ge,e,r,n):n},update:function(t,e,r,n,i,u){var s=r>>>e&me,a=i===de,h=this.nodes,o=h[s];if(a&&!o)return this;var c=x(o,t,e+ge,r,n,i,u);if(c===o)return this;var f=this.count;if(o){if(!c&&(f--,We>f))return A(t,h,f,s)}else f++;var l=t&&t===this.ownerID,_=W(h,s,c,l);return l?(this.count=f,this.nodes=_,this):new Me(t,f,_)},iterate:function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++){var u=r[e?i-n:n];if(u&&u.iterate(t,e)===!1)return!1}}},{});var ke=function(t,e,r){this.ownerID=t,this.hash=e,this.entries=r},Se=ke;ie.createClass(ke,{get:function(t,e,r,n){for(var i=this.entries,u=0,s=i.length;s>u;u++)if(w(r,i[u][0]))return i[u][1];return n},update:function(t,e,r,n,i,u){var s=i===de;if(r!==this.hash)return s?this:(u&&(u.value=!0),C(this,t,e,r,[n,i]));for(var a=this.entries,h=0,o=a.length;o>h&&!w(n,a[h][0]);h++);var c=o>h;if(s&&!c)return this;if((s||!c)&&u&&(u.value=!0),s&&2===o)return new xe(t,this.hash,a[1^h]);var f=t&&t===this.ownerID,l=f?a:b(a);return c?s?h===o-1?l.pop():l[h]=l.pop():l[h]=[n,i]:l.push([n,i]),f?(this.entries=l,this):new Se(t,this.hash,l)},iterate:function(t,e){for(var r=this.entries,n=0,i=r.length-1;i>=n;n++)if(t(r[e?i-n:n])===!1)return!1}},{});var xe=function(t,e,r){this.ownerID=t,this.hash=e,this.entry=r},Ee=xe;ie.createClass(xe,{get:function(t,e,r,n){return w(r,this.entry[0])?this.entry[1]:n},update:function(t,e,r,n,i,u){var s=w(n,this.entry[0]);return i===de?(s&&u&&(u.value=!0),s?null:this):s?i===this.entry[1]?this:t&&t===this.ownerID?(this.entry[1]=i,this):new Ee(t,r,[n,i]):(u&&(u.value=!0),C(this,t,e,r,[n,i]))},iterate:function(t){return t(this.entry)}},{});var Ce,Ae={value:!1},qe=2147483647,je=16,Ue=255,ze=0,Re={},Pe=pe/2,We=pe/4,Je=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];\nreturn Be.from(t)},Be=Je;ie.createClass(Je,{toString:function(){return this.__toString(\"Vector [\",\"]\")},get:function(t,e){if(t=T(t,this._origin),t>=this._size)return e;var r=G(this,t),n=t&me;return r&&(void 0===e||r.array.hasOwnProperty(n))?r.array[n]:e},first:function(){return this.get(0)},last:function(){return this.get(this.length?this.length-1:0)},set:function(t,e){var r=X(this._size);if(t>=this.length)return this.withMutations(function(r){return H(r,0,t+1).set(t,e)});if(this.get(t,de)===e)return this;if(t=T(t,this._origin),t>=r){var n=this._tail.ensureOwner(this.__ownerID);n.array[t&me]=e;var i=t>=this._size?t+1:this._size;return this.__ownerID?(this.length=i-this._origin,this._size=i,this._tail=n,this):F(this._origin,i,this._level,this._root,n)}for(var u=this._root.ensureOwner(this.__ownerID),s=u,a=this._level;a>0;a-=ge){var h=t>>>a&me;s=s.array[h]=s.array[h]?s.array[h].ensureOwner(this.__ownerID):new Ve([],this.__ownerID)}return s.array[t&me]=e,this.__ownerID?(this._root=u,this):F(this._origin,this._size,this._level,u,this._tail)},\"delete\":function(t){if(!this.has(t))return this;var e=X(this._size);if(t=T(t,this._origin),t>=e){var r=this._tail.ensureOwner(this.__ownerID);return delete r.array[t&me],this.__ownerID?(this._tail=r,this):F(this._origin,this._size,this._level,this._root,r)}for(var n=this._root.ensureOwner(this.__ownerID),i=n,u=this._level;u>0;u-=ge){var s=t>>>u&me;i=i.array[s]=i.array[s].ensureOwner(this.__ownerID)}return delete i.array[t&me],this.__ownerID?(this._root=n,this):F(this._origin,this._size,this._level,n,this._tail)},clear:function(){return this.__ownerID?(this.length=this._origin=this._size=0,this._level=ge,this._root=this._tail=Ge,this):Be.empty()},push:function(){var t=arguments,e=this.length;return this.withMutations(function(r){H(r,0,e+t.length);for(var n=0;t.length>n;n++)r.set(e+n,t[n])})},pop:function(){return H(this,0,-1)},unshift:function(){var t=arguments;return this.withMutations(function(e){H(e,-t.length);for(var r=0;t.length>r;r++)e.set(r,t[r])})},shift:function(){return H(this,1)\n},merge:function(){return Q(this,null,arguments)},mergeWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return Q(this,t,e)},mergeDeep:function(){return Q(this,U(null),arguments)},mergeDeepWith:function(t){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];return Q(this,U(t),e)},setLength:function(t){return H(this,0,t)},slice:function(t,e,r){var n=ie.superCall(this,Be.prototype,\"slice\",[t,e,r]);if(!r&&n!==this){var i=this,u=i.length;n.toVector=function(){return H(i,0>t?Math.max(0,u+t):u?Math.min(u,t):t,null==e?u:0>e?Math.max(0,u+e):u?Math.min(u,e):e)}}return n},iterator:function(){return new Ne(this,this._origin,this._size,this._level,this._root,this._tail)},__iterate:function(t,e,r){var n=this,i=0,u=n.length-1;r^=e;var s,a=function(e,s){return t(e,r?u-s:s,n)===!1?!1:(i=s,!0)},h=X(this._size);return s=e?this._tail.iterate(0,h-this._origin,this._size-this._origin,a,e)&&this._root.iterate(this._level,-this._origin,h-this._origin,a,e):this._root.iterate(this._level,-this._origin,h-this._origin,a,e)&&this._tail.iterate(0,h-this._origin,this._size-this._origin,a,e),(s?u:e?u-i:i)+1},__deepEquals:function(t){var e=this.iterator();return t.every(function(t,r){var n=e.next().value;return n&&r===n[0]&&w(t,n[1])})},__ensureOwner:function(t){return t===this.__ownerID?this:t?F(this._origin,this._size,this._level,this._root,this._tail,t):(this.__ownerID=t,this)}},{empty:function(){return Fe||(Fe=F(0,0,ge,Ge,Ge))},from:function(t){if(!t||0===t.length)return Be.empty();if(t.constructor===Be)return t;var e=Array.isArray(t);return t.length>0&&pe>t.length?F(0,t.length,ge,Ge,new Ve(e?b(t):ue(t).toArray())):(e||(t=ue(t),t instanceof he||(t=t.values())),Be.empty().merge(t))}},he);var Le=Je.prototype;Le[\"@@iterator\"]=Le.iterator,Le.update=Ie.update,Le.updateIn=Ie.updateIn,Le.cursor=Ie.cursor,Le.withMutations=Ie.withMutations,Le.asMutable=Ie.asMutable,Le.asImmutable=Ie.asImmutable;var Ve=function(t,e){this.array=t,this.ownerID=e},Ke=Ve;ie.createClass(Ve,{ensureOwner:function(t){return t&&t===this.ownerID?this:new Ke(this.array.slice(),t)\n},removeBefore:function(t,e,r){if(r===e?1<<e:0||0===this.array.length)return this;var n=r>>>e&me;if(n>=this.array.length)return new Ke([],t);var i,u=0===n;if(e>0){var s=this.array[n];if(i=s&&s.removeBefore(t,e-ge,r),i===s&&u)return this}if(u&&!i)return this;var a=this.ensureOwner();if(!u)for(var h=0;n>h;h++)delete a.array[h];return i&&(a.array[n]=i),a},removeAfter:function(t,e,r){if(r===e?1<<e:0||0===this.array.length)return this;var n=r-1>>>e&me;if(n>=this.array.length)return this;var i,u=n===this.array.length-1;if(e>0){var s=this.array[n];if(i=s&&s.removeAfter(t,e-ge,r),i===s&&u)return this}if(u&&!i)return this;var a=this.ensureOwner();return u||(a.array.length=n+1),i&&(a.array[n]=i),a},iterate:function(t,e,r,n,i){var u,s=this.array,a=s.length-1;if(0===t)for(u=0;a>=u;u++){var h=i?a-u:u;if(s.hasOwnProperty(h)){var o=h+e;if(o>=0&&r>o&&n(s[h],o)===!1)return!1}}else{var c=1<<t,f=t-ge;for(u=0;a>=u;u++){var l=i?a-u:u,_=e+l*c;if(r>_&&_+c>0){var v=s[l];if(v&&!v.iterate(f,_,r,n,i))return!1}}}return!0}},{});var Ne=function(t,e,r,n,i,u){var s=X(r);this._stack=N(i.array,n,-e,s-e,N(u.array,0,s-e,r-e))};ie.createClass(Ne,{next:function(){var t=this._stack;t:for(;t;){if(0===t.level)for(t.rawIndex||(t.rawIndex=0);t.array.length>t.rawIndex;){var e=t.rawIndex+t.offset;if(e>=0&&t.max>e&&t.array.hasOwnProperty(t.rawIndex)){var r=t.array[t.rawIndex];return t.rawIndex++,{value:[e,r],done:!1}}t.rawIndex++}else{var n=1<<t.level;for(t.levelIndex||(t.levelIndex=0);t.array.length>t.levelIndex;){var i=t.offset+t.levelIndex*n;if(i+n>0&&t.max>i){var u=t.array[t.levelIndex];if(u){t.levelIndex++,t=this._stack=N(u.array,t.level-ge,i,t.max,t);continue t}}t.levelIndex++}}t=this._stack=this._stack.__prev}return{value:void 0,done:!0}}},{});var Fe,Ge=new Ve([]),He=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return Qe.from(t)},Qe=He;ie.createClass(He,{toString:function(){return this.__toString(\"Set {\",\"}\")},has:function(t){return this._map?this._map.has(t):!1},get:function(t,e){return this.has(t)?t:e},add:function(t){var e=this._map;\nreturn e||(e=ye.empty().__ensureOwner(this.__ownerID)),e=e.set(t,null),this.__ownerID?(this.length=e.length,this._map=e,this):e===this._map?this:Y(e)},\"delete\":function(t){if(null==this._map)return this;var e=this._map.delete(t);return 0===e.length?this.clear():this.__ownerID?(this.length=e.length,this._map=e,this):e===this._map?this:Y(e)},clear:function(){return this.__ownerID?(this.length=0,this._map=null,this):Qe.empty()},union:function(){var t=arguments;return 0===t.length?this:this.withMutations(function(e){for(var r=0;t.length>r;r++){var n=t[r];n=n.forEach?n:ue(n),n.forEach(function(t){return e.add(t)})}})},intersect:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return ue(t)});var r=this;return this.withMutations(function(e){r.forEach(function(r){t.every(function(t){return t.contains(r)})||e.delete(r)})})},subtract:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return ue(t)});var r=this;return this.withMutations(function(e){r.forEach(function(r){t.some(function(t){return t.contains(r)})&&e.delete(r)})})},isSubset:function(t){return t=ue(t),this.every(function(e){return t.contains(e)})},isSuperset:function(t){var e=this;return t=ue(t),t.every(function(t){return e.contains(t)})},__iterate:function(t,e){var r=this;return this._map?this._map.__iterate(function(e,n){return t(n,n,r)},e):0},__deepEquals:function(t){return!(this._map||t._map)||this._map.equals(t._map)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?Y(e,t):(this.__ownerID=t,this._map=e,this)}},{empty:function(){return Xe||(Xe=Y())},from:function(t){var e=Qe.empty();return t?t.constructor===Qe?t:e.union(t):e},fromKeys:function(t){return Qe.from(ue(t).flip())}},ue);var Te=He.prototype;Te.contains=Te.has,Te.withMutations=ye.prototype.withMutations,Te.asMutable=ye.prototype.asMutable,Te.asImmutable=ye.prototype.asImmutable,Te.__toJS=he.prototype.__toJS,Te.__toStringMapper=he.prototype.__toStringMapper;\nvar Xe,Ye=function(t){var e=Ze.empty();return t?t.constructor===Ze?t:e.merge(t):e},Ze=Ye;ie.createClass(Ye,{toString:function(){return this.__toString(\"OrderedMap {\",\"}\")},get:function(t,e){if(null!=t&&this._map){var r=this._map.get(t);if(null!=r)return this._vector.get(r)[1]}return e},clear:function(){return this.__ownerID?(this.length=0,this._map=this._vector=null,this):Ze.empty()},set:function(t,e){if(null==t)return this;var r=this._map,n=this._vector;if(r){var i=r.get(t);null==i?(r=r.set(t,n.length),n=n.push([t,e])):n.get(i)[1]!==e&&(n=n.set(i,[t,e]))}else n=Je.empty().__ensureOwner(this.__ownerID).set(0,[t,e]),r=ye.empty().__ensureOwner(this.__ownerID).set(t,0);return this.__ownerID?(this.length=r.length,this._map=r,this._vector=n,this):n===this._vector?this:Z(r,n)},\"delete\":function(t){if(null==t||null==this._map)return this;var e=this._map.get(t);if(null==e)return this;var r=this._map.delete(t),n=this._vector.delete(e);return 0===r.length?this.clear():this.__ownerID?(this.length=r.length,this._map=r,this._vector=n,this):r===this._map?this:Z(r,n)},__iterate:function(t,e){return this._vector?this._vector.fromEntries().__iterate(t,e):0},__deepEqual:function(t){var e=this._vector.iterator();return t.every(function(t,r){var n=e.next().value;return n&&(n=n[1]),n&&w(r,n[0])&&w(t,n[1])})},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t),r=this._vector&&this._vector.__ensureOwner(t);return t?Z(e,r,t):(this.__ownerID=t,this._map=e,this._vector=r,this)}},{empty:function(){return $e||($e=Z())}},ye),Ye.from=Ye;var $e,tr=function(t,e){var r=function(t){this._map=ye(t)};t=ue(t);var n=r.prototype=Object.create(rr);n.constructor=r,n._name=e,n._defaultValues=t;var i=Object.keys(t);return r.prototype.length=i.length,Object.defineProperty&&t.forEach(function(t,e){Object.defineProperty(r.prototype,e,{get:function(){return this.get(e)},set:function(t){I(this.__ownerID,\"Cannot set on an immutable record.\"),this.set(e,t)}})}),r},er=tr;ie.createClass(tr,{toString:function(){return this.__toString((this._name||\"Record\")+\" {\",\"}\")\n},has:function(t){return this._defaultValues.has(t)},get:function(t,e){return void 0===e||this.has(t)?this._map.get(t,this._defaultValues.get(t)):e},clear:function(){if(this.__ownerID)return this._map.clear(),this;Object.getPrototypeOf(this).constructor;return er._empty||(er._empty=$(this,ye.empty()))},set:function(t,e){if(null==t||!this.has(t))return this;var r=this._map.set(t,e);return this.__ownerID||r===this._map?this:$(this,r)},\"delete\":function(t){if(null==t||!this.has(t))return this;var e=this._map.delete(t);return this.__ownerID||e===this._map?this:$(this,e)},__iterate:function(t,e){var r=this;return this._defaultValues.map(function(t,e){return r.get(e)}).__iterate(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?$(this,e,t):(this.__ownerID=t,this._map=e,this)}},{},ue);var rr=tr.prototype;rr.__deepEqual=Ie.__deepEqual,rr.merge=Ie.merge,rr.mergeWith=Ie.mergeWith,rr.mergeDeep=Ie.mergeDeep,rr.mergeDeepWith=Ie.mergeDeepWith,rr.update=Ie.update,rr.updateIn=Ie.updateIn,rr.cursor=Ie.cursor,rr.withMutations=Ie.withMutations,rr.asMutable=Ie.asMutable,rr.asImmutable=Ie.asImmutable;var nr=function(t,e,r){return this instanceof ir?(I(0!==r,\"Cannot step a Range by 0\"),t=t||0,null==e&&(e=1/0),t===e&&sr?sr:(r=null==r?1:Math.abs(r),t>e&&(r=-r),this._start=t,this._end=e,this._step=r,void(this.length=Math.max(0,Math.ceil((e-t)/r-1)+1)))):new ir(t,e,r)},ir=nr;ie.createClass(nr,{toString:function(){return 0===this.length?\"Range []\":\"Range [ \"+this._start+\"...\"+this._end+(this._step>1?\" by \"+this._step:\"\")+\" ]\"},has:function(t){return I(t>=0,\"Index out of bounds\"),this.length>t},get:function(t,e){return I(t>=0,\"Index out of bounds\"),1/0===this.length||this.length>t?this._start+t*this._step:e},contains:function(t){var e=(t-this._start)/this._step;return e>=0&&this.length>e&&e===Math.floor(e)},slice:function(t,e,r){return s(t,e,this.length)?this:r?ie.superCall(this,ir.prototype,\"slice\",[t,e,r]):(t=a(t,this.length),e=h(e,this.length),t>=e?sr:new ir(this.get(t,this._end),this.get(e,this._end),this._step))\n},indexOf:function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&this.length>r)return r}return-1},lastIndexOf:function(t){return this.indexOf(t)},take:function(t){return this.slice(0,t)},skip:function(t,e){return e?ie.superCall(this,ir.prototype,\"skip\",[t]):this.slice(t)},__iterate:function(t,e,r){for(var n=e^r,i=this.length-1,u=this._step,s=e?this._start+i*u:this._start,a=0;i>=a&&t(s,n?i-a:a,this)!==!1;a++)s+=e?-u:u;return n?this.length:a},__deepEquals:function(t){return this._start===t._start&&this._end===t._end&&this._step===t._step}},{},he);var ur=nr.prototype;ur.__toJS=ur.toArray,ur.first=Le.first,ur.last=Le.last;var sr=nr(0,0),ar=function(t,e){return 0===e&&cr?cr:this instanceof hr?(this._value=t,void(this.length=null==e?1/0:Math.max(0,e))):new hr(t,e)},hr=ar;ie.createClass(ar,{toString:function(){return 0===this.length?\"Repeat []\":\"Repeat [ \"+this._value+\" \"+this.length+\" times ]\"},get:function(t,e){return I(t>=0,\"Index out of bounds\"),1/0===this.length||this.length>t?this._value:e},first:function(){return this._value},contains:function(t){return w(this._value,t)},slice:function(t,e,r){if(r)return ie.superCall(this,hr.prototype,\"slice\",[t,e,r]);var n=this.length;return t=0>t?Math.max(0,n+t):Math.min(n,t),e=null==e?n:e>0?Math.min(n,e):Math.max(0,n+e),e>t?new hr(this._value,e-t):cr},reverse:function(t){return t?ie.superCall(this,hr.prototype,\"reverse\",[t]):this},indexOf:function(t){return w(this._value,t)?0:-1},lastIndexOf:function(t){return w(this._value,t)?this.length:-1},__iterate:function(t,e,r){var n=e^r;I(!n||1/0>this.length,\"Cannot access end of infinite range.\");for(var i=this.length-1,u=0;i>=u&&t(this._value,n?i-u:u,this)!==!1;u++);return n?this.length:u},__deepEquals:function(t){return w(this._value,t._value)}},{},he);var or=ar.prototype;or.last=or.first,or.has=ur.has,or.take=ur.take,or.skip=ur.skip,or.__toJS=ur.__toJS;var cr=new ar(void 0,0),fr={Sequence:ue,Map:ye,Vector:Je,Set:He,OrderedMap:Ye,Record:tr,Range:nr,Repeat:ar,is:w,fromJS:te};return fr}", "title": "" }, { "docid": "36319f7e186794313b285b4eaefde9e2", "score": "0.54280573", "text": "function I(e,t){function n(){this.constructor=e}L(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "title": "" }, { "docid": "8dc872070e56fa82a7227cee4ba1d12b", "score": "0.5405059", "text": "function a(){n.call(this)}", "title": "" }, { "docid": "f2dfdfbd0e83733b7f96c9576b806963", "score": "0.5404791", "text": "function pi(e,t){if(\"function\"!==typeof t&&null!==t)throw new TypeError(\"Class extends value \"+String(t)+\" is not a constructor or null\");function n(){this.constructor=e}ui(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "title": "" }, { "docid": "ce203a3867410e81235e1a848a082985", "score": "0.53904736", "text": "function X() { }", "title": "" }, { "docid": "7136ee1c3f92a605421efc875c4d0095", "score": "0.53888613", "text": "function r(e){return\"function\"===typeof e}", "title": "" }, { "docid": "7136ee1c3f92a605421efc875c4d0095", "score": "0.53888613", "text": "function r(e){return\"function\"===typeof e}", "title": "" }, { "docid": "7136ee1c3f92a605421efc875c4d0095", "score": "0.53888613", "text": "function r(e){return\"function\"===typeof e}", "title": "" }, { "docid": "7136ee1c3f92a605421efc875c4d0095", "score": "0.53888613", "text": "function r(e){return\"function\"===typeof e}", "title": "" }, { "docid": "7136ee1c3f92a605421efc875c4d0095", "score": "0.53888613", "text": "function r(e){return\"function\"===typeof e}", "title": "" }, { "docid": "7136ee1c3f92a605421efc875c4d0095", "score": "0.53888613", "text": "function r(e){return\"function\"===typeof e}", "title": "" }, { "docid": "7136ee1c3f92a605421efc875c4d0095", "score": "0.53888613", "text": "function r(e){return\"function\"===typeof e}", "title": "" }, { "docid": "412ed8e6e174daced7c7fe7d2f281317", "score": "0.53879154", "text": "function P() { }", "title": "" }, { "docid": "8b6ec2df056233fe185d47d25eeb2176", "score": "0.5373528", "text": "function F(){}", "title": "" }, { "docid": "1afa122b443150da8ed5655e8fe4d3f3", "score": "0.53727984", "text": "function C() {}", "title": "" }, { "docid": "441b8e35acba12d90d4d6df51c665f13", "score": "0.5370293", "text": "function n(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e}", "title": "" }, { "docid": "441b8e35acba12d90d4d6df51c665f13", "score": "0.5370293", "text": "function n(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e}", "title": "" }, { "docid": "8dc2694f71e3375eeb6d094f415a07dd", "score": "0.5367402", "text": "function protoIsFirst(func) {\n return {__proto__: func(), a: 2, b: 3};\n}", "title": "" }, { "docid": "29e5c5ccfbc9e3cdc41cb3122dc3c039", "score": "0.5357375", "text": "function F(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Class extends value \"+String(t)+\" is not a constructor or null\");function n(){this.constructor=e}H(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "title": "" }, { "docid": "5408e4a4de4e5f4b5bfa97220cfdbe11", "score": "0.5354263", "text": "function Parent() {}", "title": "" }, { "docid": "5408e4a4de4e5f4b5bfa97220cfdbe11", "score": "0.5354263", "text": "function Parent() {}", "title": "" }, { "docid": "39dece11a2eb6fc696ec8d89815e2ce7", "score": "0.5344792", "text": "function pr(t,r){function e(){this.constructor=t}fr(t,r),t.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)}", "title": "" }, { "docid": "e506ddbefdb5a03fb30e4ebd93dedfa4", "score": "0.533506", "text": "function functionPrototypeTest() {\n var ret;\n var pd;\n\n print(Object.prototype.toString.call(Function.prototype));\n print(Object.getPrototypeOf(Function.prototype) === Object.prototype);\n print(Object.isExtensible(Function.prototype));\n print('length' in Function.prototype, Function.prototype.length);\n print('constructor' in Function.prototype, Function.prototype.constructor === Function);\n\n ret = Function.prototype('foo', 'bar');\n print(typeof ret, ret);\n\n // ES2015 added '.name'. Function.prototype provides an empty default name.\n // It is not writable, but it is configurable so that Object.defineProperty()\n // can be used to set the name of an anonymous function.\n pd = Object.getOwnPropertyDescriptor(Function.prototype, 'name');\n print(typeof pd.value, JSON.stringify(pd.value), pd.writable, pd.enumerable, pd.configurable);\n}", "title": "" }, { "docid": "dcd4863d246427b3662121304a354081", "score": "0.53318167", "text": "function C(e,t){function n(){this.constructor=e}k(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "title": "" }, { "docid": "7ff61c1a8003b422ba71d072bd79fc6a", "score": "0.53310317", "text": "function so(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "a568c98cafc9e431f416fd55ed8abeda", "score": "0.53278244", "text": "function o(e,t){s(e,t),Object.getOwnPropertyNames(t.prototype).forEach(function(n){s(e.prototype,t.prototype,n)}),Object.getOwnPropertyNames(t).forEach(function(n){s(e,t,n)})}", "title": "" }, { "docid": "98bc49b939370ec051cf445e08862c6e", "score": "0.5323042", "text": "function Nothing$prototype$extend(f) {\n return this;\n }", "title": "" }, { "docid": "d9c95c95aa4d4f0e09292ebf00270012", "score": "0.53145313", "text": "function L(e,t){function n(){this.constructor=e}B(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "title": "" }, { "docid": "d9c95c95aa4d4f0e09292ebf00270012", "score": "0.53145313", "text": "function L(e,t){function n(){this.constructor=e}B(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "title": "" }, { "docid": "006d8ba1f584c7d227636b1b9f2a744e", "score": "0.5311153", "text": "function o(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)})}", "title": "" }, { "docid": "1be65cc08d9aca3bd3dd9972c456c807", "score": "0.5308478", "text": "function myProto5() {\n\n}", "title": "" }, { "docid": "372b3c357dbae0875438634816929f97", "score": "0.530677", "text": "function n(e){return\"function\"===typeof e}", "title": "" }, { "docid": "c7e5d07acef0935b821fa80a70f54f36", "score": "0.53066796", "text": "function o(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)}))}", "title": "" }, { "docid": "5dad16bd3daa745261c76c7e189f5ed4", "score": "0.53037655", "text": "function o(e,t){a(e,t),Object.getOwnPropertyNames(t.prototype).forEach((function(n){a(e.prototype,t.prototype,n)})),Object.getOwnPropertyNames(t).forEach((function(n){a(e,t,n)}))}", "title": "" }, { "docid": "59fe6fc56b60f7f47c07312b9397aa3c", "score": "0.530286", "text": "function sIb(a){return\"function\"===typeof a}", "title": "" }, { "docid": "9661ce9c829f2fbf13dcafeddab3d9c0", "score": "0.53002477", "text": "static isPrototype(value) { console.log(Object.getPrototypeOf(value) === prototype1); }", "title": "" }, { "docid": "9661ce9c829f2fbf13dcafeddab3d9c0", "score": "0.53002477", "text": "static isPrototype(value) { console.log(Object.getPrototypeOf(value) === prototype1); }", "title": "" }, { "docid": "ecffdacbda1142453227b006c757e985", "score": "0.5297971", "text": "function I(e,t){function n(){this.constructor=e}j(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}", "title": "" }, { "docid": "ec847e7ec62ef03bd51612cafaf56f1f", "score": "0.5292846", "text": "function newable(value) {\n return typeof value === 'function' && keys(value.prototype)\n }", "title": "" }, { "docid": "f7cd555b78e528c85d4203ed228051fb", "score": "0.5287902", "text": "function i(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "title": "" }, { "docid": "ad9f77e157b17fec376a0bd025fe961e", "score": "0.5282822", "text": "visitStandard_function(ctx) {\n\t return this.visitChildren(ctx);\n\t}", "title": "" }, { "docid": "a7012e8f6bc2cbfb027338d05b80e647", "score": "0.5269292", "text": "function y(){f.call(this)}", "title": "" }, { "docid": "a7012e8f6bc2cbfb027338d05b80e647", "score": "0.5269292", "text": "function y(){f.call(this)}", "title": "" }, { "docid": "405fa5929032f7383efd0d7e5beedfd3", "score": "0.52640146", "text": "function getSuperCallInConstructor(constructor) {\n var links = getNodeLinks(constructor);\n // Only trying to find super-call if we haven't yet tried to find one. Once we try, we will record the result\n if (links.hasSuperCall === undefined) {\n links.superCall = findFirstSuperCall(constructor.body);\n links.hasSuperCall = links.superCall ? true : false;\n }\n return links.superCall;\n }", "title": "" }, { "docid": "260a0c9099c39f9be9cb34637e7c9764", "score": "0.52606386", "text": "function a(t,e){function i(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}", "title": "" }, { "docid": "9a936670caa7dba82ce4bd1ee5746444", "score": "0.52586323", "text": "function h(t,e){function r(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}", "title": "" }, { "docid": "a9ac6b5a18137505d22b1974c0387ce7", "score": "0.52526176", "text": "function ae(t,e){function n(){this.constructor=t}re(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}", "title": "" }, { "docid": "7f1cfc9f8067dd8666ed526cedb7b83f", "score": "0.52525544", "text": "function i(n,t){if(!n)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?n:t}", "title": "" }, { "docid": "c3a1ed765500109d41b016a023e93590", "score": "0.5250957", "text": "function a() {}", "title": "" }, { "docid": "c3a1ed765500109d41b016a023e93590", "score": "0.5250957", "text": "function a() {}", "title": "" }, { "docid": "c7761f1eeb63588deff908948ae110a1", "score": "0.52472943", "text": "proxifyFunction(func) {\n // NOT IMPLEMENTED\n return;\n }", "title": "" }, { "docid": "123e50ae5ce7a088c28e2309a3d25620", "score": "0.524458", "text": "visitOverriding_function_spec(ctx) {\n\t return this.visitChildren(ctx);\n\t}", "title": "" }, { "docid": "8287155c65a3f2c1faf8f34f04930cf7", "score": "0.52429026", "text": "function _seq_ () {\n return namespace + '::sequence';\n}", "title": "" }, { "docid": "95c83684d25f58b42d65a98ed25551cd", "score": "0.5229424", "text": "function c() {}", "title": "" }, { "docid": "95c83684d25f58b42d65a98ed25551cd", "score": "0.5229424", "text": "function c() {}", "title": "" }, { "docid": "c447d6f7d4a37e777d3bce7b51206420", "score": "0.5223977", "text": "function L(){A.call(this)}", "title": "" }, { "docid": "0b198586d0582d6c6d8a9c6f1b2c7fd8", "score": "0.5216558", "text": "function printable(constructorFN) {\n constructorFN.prototype.print = function () {\n console.log(this);\n };\n}", "title": "" }, { "docid": "a006bb6f0acafcb1743fdf4bba6d4b13", "score": "0.52098954", "text": "function B(){n.call(this)}", "title": "" }, { "docid": "19ef337c0d1ef40b453541e93993896e", "score": "0.5208189", "text": "function qn(t,e){function r(){this.constructor=t}Wn(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}", "title": "" }, { "docid": "65a5fcdcde8c4792a7210e998f2b6afa", "score": "0.52044034", "text": "function getFakeProtoOf(func) {\n if (typeof func === 'function') {\n var shadow = getShadow(func);\n return shadow.prototype;\n } else if (typeof func === 'object' && func !== null) {\n return func.prototype;\n } else {\n return void 0;\n }\n }", "title": "" } ]
1f565e3ca35189d449974ea99b94fb71
Sends (via method POST) the values of name and nameID (Nafn og notendanafn) to user_log.php which creates cookies from the values of name and nameID. These cookies are what define the personal scoreboard the user gets.
[ { "docid": "ede039adb718080fa7f96060d5713176", "score": "0.4905937", "text": "function signUp() {\n\tvar name = $(\"#name\").val();\n\tvar nameID = $(\"#nameID\").val();\n\n\tif (name !== \"\" && nameID !== \"\") {\n\t\t$.ajax({\n\t\t\ttype: \"POST\",\n\t\t\turl: \"user_log.php\",\n\t\t\tdata: {nameID: nameID, name: name},\n\t\t\tsuccess: function(data) {\n\t\t\t\tconsole.log(\"User sign up\");\n\t\t\t\t$(\"#overlay, #signUpBox\").hide();\n\t\t\t\twindow.location.reload();\n\t\t\t},\n\t\t\terror: function(XMLHttpRequest, textStatus, errorThrown) {\n\t\t\t\tconsole.log(\"Object: \" + XMLHttpRequest);\n\t\t\t\tconsole.log(\"Error: \" + textStatus);\n\t\t\t}\n\t\t});\n\t}\n\n\tif (name == \"\") {\n\t\t$(\"#errorName\").html(\"* Vinsamlegast settu inn nafn\");\n\t} else if (name !== \"\") {\n\t\t$(\"#errorName\").empty();\n\t}\n\n\tif (nameID == \"\") {\n\t\t$(\"#errorNameID\").html(\"* Vinsamlegast settu inn notendanafn\");\n\t} else if (nameID !== \"\") {\n\t\t$(\"#errorNameID\").empty();\n\t}\n}", "title": "" } ]
[ { "docid": "42f2ade6c95a8d2ac15d44bc08ddd007", "score": "0.584814", "text": "function addUserName() {\n if (nameInput.value !== \"\") {\n myCookie = nameInput.value;\n CookieUtil.set('name', myCookie);\n\n $('#myTabs a[href=\"#tab-home\"]').trigger('click');\n\n $('loginmessage').innerHTML = \"\";\n }\n else {\n window.alert(\"Please enter a name\");\n }\n }", "title": "" }, { "docid": "10563687f46da5038a1eb9d23489794a", "score": "0.5797645", "text": "inputCharName(charactername) {\n let un =B.Id(\"cusername\").value || charactername;\n if (un.length<2 || un.match(/\\s\\s+/g)) {alert(\"invalid name - no blank or subsequent spaces please\");\n return;}\n\tvar user = un;\n\tdocument.cookie=\"messengerUname=\" + user;\n\tR.checkcookie();\n R.setrecipients();\n}", "title": "" }, { "docid": "ada774b7341032453080d002ff9b1ead", "score": "0.57034683", "text": "function writeCookie(name) {\n\t\t// use base64 encoding?\n\t\tvar cookie = cookies[name];\n\t\tvar value = JSON.stringify(cookie.value);\n\n\t\tdocument.cookie += cookie.name + '=' + window.escape(value) + ';expires=' + cookie.expires + \"; domain=\" + cookie.domain + \"; path=\" + cookie.path + (cookie.secure ? \"; secure\" : \"\");\n\t\t/* Old:\n\t\tvar date = new Date( ( new Date() ).getTime() + parseInt(expiry) );\n\t\tvar value=escape(val) + ((expiry==null) ? \"\" : \"; expires=\"+date.toUTCString());\n\t\tdocument.cookie=name + \"=\" + value;\n\t\t*/\n\t}", "title": "" }, { "docid": "adbacd62b7efdb53f8fc37c4290ccb7d", "score": "0.55536807", "text": "function saveGame(){\n\tdocument.cookie = \"player1=\" + player1.name;\n\tdocument.cookie = \"word=\" + game1.word;\n\tdocument.cookie = \"opportunities=\" + game1.opportunities;\n\tdocument.cookie = \"guesses=\" + player1.guesses;\n\tdocument.cookie = \"wordCount=\" + game1.wordCount;\n\tdocument.cookie = \"hangCounter=\" + game1.hangCounter;\n\tdocument.cookie = \"multiP =\" + game1.multiP;\n\tdocument.cookie = \"player2=\" + player2.name;\n}", "title": "" }, { "docid": "9e9d23ede44912bbfbab09b5b01417a3", "score": "0.5541217", "text": "function setCookie() {\n document.cookie = \"name=\" + preferredName + \"=color=\" + preferredColor;\n console.log(\"name=\" + preferredName + \"=color=\" + preferredColor);\n }", "title": "" }, { "docid": "810d36fa41c328984637f5983cadddeb", "score": "0.5507529", "text": "function getUserName() {\r\n var userName = cookies.getCookie(\"user_name\");\r\n var userEle;\r\n var txtEle;\r\n if(!userName){\r\n userName = prompt(\"Enter your name\");\r\n cookies.setCookie(\"user_name\", userName || \"Anon\");\r\n }\r\n userEle = document.getElementById(\"user_name\");\r\n txtEle = document.createTextNode(userName);\r\n userEle.appendChild(txtEle);\r\n }", "title": "" }, { "docid": "3d1af481999fb8030e226af767843c33", "score": "0.5490352", "text": "function saveUsername(name){\n\tif(name){\n\t\t\tvalues.username = name;\n\t}else {\n\t\tvalues.username = document.getElementById(\"username\").value;\n }\n\n\tset(\"username\");\n}", "title": "" }, { "docid": "f983412d5fed59c7047c9004cf0efee9", "score": "0.54878056", "text": "function setCookie() {\r\n\t$.cookie(\"LastVisitUserId\", null, {path: '/app/'});\r\n\t\r\n\tvar j_username = document.forms[0].j_username.value;\r\n\t\r\n\t//设置最后访问人\r\n\t$.cookie(\"LastVisitUserId\", j_username, {path: '/app/'});\r\n\t\r\n\t// modify by xujiakun GA\r\n\t_gaq.push(['_trackEvent', 'Home', 'Login', j_username]);\r\n}", "title": "" }, { "docid": "4e1d18dd8698c3fbca869f475794a3af", "score": "0.54820174", "text": "function cookieSave() {\n\n\t\t\t\tvar cookieString = document.cookie;\n\t\t\t\t//Finds the cookie document and assigns it to string cookieString. - KH\n\n\t\t\t\tvar first = document.getElementById(\"firstName\").value;\n\t\t\t\tvar last = document.getElementById(\"lastName\").value;\n\t\t\t\tvar phone = document.getElementById(\"phoneNumber\").value;\n\t\t\t\tvar region = document.getElementById(\"province\").value;\n\t\t\t\tvar area = document.getElementById(\"city\").value;\n\t\t\t\t//Creates 5 variables to hold my first name, last name, phone number, province, and city of the user input and further gives them the text values of the specified text inputted. - KH\n\n\t\t\t\tif (first==\"\" || last==\"\" || phone==\"\" || region==\"\" || area==\"\") {\n\t\t\t\t\talert(\"Please fill out all 5 required fields\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tusername= \"First_Name_\"+first+\"Last_Name_\"+last+\"Phone_Number_\"+phone+\"Province_\"+region+\"City_\"+area+\"__\";\n\t\t\t\t\tsetCookie('TimeMachineCookie',username,365);\n\t\t\t\t\tdocument.getElementById(\"firstName\").value = \"\";\n\t\t\t\t\tdocument.getElementById(\"lastName\").value = \"\";\n\t\t\t\t\tdocument.getElementById(\"phoneNumber\").value = \"\";\n\t\t\t\t\tdocument.getElementById(\"province\").value = \"\";\n\t\t\t\t\tdocument.getElementById(\"city\").value = \"\";\n\t\t\t\t\talert(\"User \"+first+\" \"+last+\" Registered\");\n\t\t\t\t\tHide(); //Mikey Adjusted\n\t\t\t\t}\n\t\t\t\t//Cookie expire date is set for 1 year (365 days) from current day. - KH\n\t\t\t\t//Checks if the username exists, if so the user is presented with a you have already created your account, if not the function will add the users first + last name and assign the concatenated value as the username (will also include phone number, province, and city). - KH\n\t\t\t\t//Tweaked this code and added the else if to check that the user didn't leave a field blank. - KH\n\n\t\t\t}", "title": "" }, { "docid": "f4b1154b0233b410deae6fe18b644b3b", "score": "0.54521114", "text": "function createCookie(name,value){\n\tvar cookie_string = name + \"=\" + escape ( value );\n//\tconsole.log(cookie_string);\n\tdocument.cookie = cookie_string;\n\t//console.log(\"setting cookie: \"+name+\"=\"+value);\n}", "title": "" }, { "docid": "eade55fc66a66e331c0dfc9112da5066", "score": "0.5451691", "text": "function createCookie(name, value) {\n document.cookie = name + \"=\" + value;\n}", "title": "" }, { "docid": "b642eed5bc1a156ab7534c874d325c28", "score": "0.5448251", "text": "function callSetCookie()\n\t{\n\t\tvar userInfo = document.hidden_form.user_name.value;\n\t\tvar passInfo = document.hidden_form.server_details.value;\n\t\tvar value = userInfo + \"=\" + passInfo;\n\t\t//call to set cookie\n\t\t//setCookie(\"usernameUpStage\", value, 0, 1);\n\t}", "title": "" }, { "docid": "a7c21d432723357125bfd077034ca681", "score": "0.5443444", "text": "function setName()\n\t{\t\n\n\t\tvar name= Cookies.get('name');\n\t\tif (!name || name == null)\n\t\t{\n\t\t\tvar name= window.prompt('What is you name?');\n\t\t Cookies.set('name',name);\n\t\t}\n\t\tsocket.emit('io:name',name);\n\t\t$('#messageBox').focus();\n\t\t\n\t\treturn name;\n}", "title": "" }, { "docid": "9e8f87d551a83d7dfbd5c626b84e1856", "score": "0.5439515", "text": "function enteredName() {\n var txtBoxValue = nameTxtBox.value;\n var error = \"Enter a name!\";\n if (txtBoxValue.length < 1)\n nameTxtBox.value = error;\n else if (txtBoxValue == error)\n nameTxtBox.value = error;\n else {\n name = txtBoxValue;\n main.setCookie(\"name\", name, 1000);\n startGame();\n }\n }", "title": "" }, { "docid": "3f11bdb62657a78833cc102986479c42", "score": "0.54151326", "text": "function cookieTest() {\n\n \t\t\t\tevent.preventDefault();\n\t\t\t\tvar cookieString = document.cookie;\n\t\t\t\t//Finds the cookie document and assigns it to string cookieString. - KH\n\n\t\t\t\tvar fn1 = cookieString.indexOf(\"First_Name_\");\n\t\t\t\tvar fn2 = cookieString.indexOf(\"Last_Name_\");\n\t\t\t\tvar fnt = cookieString.substring(fn1+11, fn2);\n\t\t\t\t//Finds the First Name from the cookie document if it exists already. - KH\n\n\t\t\t\tvar ln1 = cookieString.indexOf(\"Last_Name_\");\n\t\t\t\tvar ln2 = cookieString.indexOf(\"Phone_Number_\");\n\t\t\t\tvar lnt = cookieString.substring(ln1+10, ln2);\n\t\t\t\t//Finds the Last Name from the cookie document if it exists already. - KH\n\n\t\t\t\tvar firstLogin = document.getElementById(\"firstNameLogin\").value;\n\t\t\t\tvar lastLogin = document.getElementById(\"lastNameLogin\").value;\n\t\t\t\t//Create variables to pass the text fields for login to the function. - KH\n\n\t\t\t\tif (firstLogin == \"\" || lastLogin == \"\") {\n\t\t\t\t\talert(\"Please enter a first name and last name for the site\");\n\t\t\t\t\tShow(); //Mikey Adjusted\n\t\t\t\t}\n\t\t\t\telse if (firstLogin == \"admin\" && lastLogin == 1234) {\n\t\t\t\t\t\tvar first = document.getElementById(\"firstNameLogin\").value;\n\t\t\t\t\t\tvar last = document.getElementById(\"lastNameLogin\").value;\n\t\t\t\t\t\tusername= (\"First_Name_\"+first+\"Last_Name_\"+last);\n\t\t\t\t\t\tsetCookie('TimeMachineCookie',username,365);\n\t\t\t\t\t\t$('form').fadeOut(50);\n\t\t\t\t\t\t$('#welcome').fadeIn(400); //Added Time Machine Explination -PP\n\t\t\t\t\t}\n\t\t\t\telse if (fnt != firstLogin || lnt != lastLogin) {\n\t\t\t\t\t\talert(\"Invalid information.\\nPlease register.\");\n\t\t\t\t\t\tShow(); //Mikey Adjusted\n\t\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\t$('form').fadeOut(50);\n\t\t\t\t\t\t$('#welcome').fadeIn(400); //Added Time Machine Explination -PP\n\t\t\t\t\t}\n\t\t\t\t//If/else statement checks that the username fields have been populated and that the username is correct from the cookies following which will displays an alert accordingly (both for the first name and the last name). If both the first name and last name are correct the user will be redirected to the main redirection page. - KH\n\n\t\t\t}", "title": "" }, { "docid": "f8054e46ee2ea5efee7b7d6319b4352a", "score": "0.53876406", "text": "function guardar_logs(xuser, texto){\n\n $.post(\"../php/guardar_log.php\", {user: xuser, text: texto});\n\n}", "title": "" }, { "docid": "c62b9a5f5980e92b1947ce9a430d4d7a", "score": "0.53856665", "text": "function userLog(event) {\n event.preventDefault();\n userLogEntry = event.target.reflectionLog.value; // grabs data from textbox\n new UserLogs (retrievedUser.name, retrievedUser.timer, userLogEntry);\n event.target.reflectionLog.value = ''; // clears out box after sumbiting\n\n localStorage.setItem('savedUserLogs', JSON.stringify(userLogArray)); // Saving Logs to Local Storage\n}", "title": "" }, { "docid": "ea290f0a0481455d0c97966360a08e07", "score": "0.5357709", "text": "function print_cookies_with_values_containing_usernames(domain) {\n var cb_cookies = (function(domain) {\n\t return function(all_cookies) {\n\t\tvar tot_hostonly = 0;\n\t\tvar tot_httponly = 0;\n\t\tvar tot_secure = 0;\n\t\tvar tot_session = 0;\n\t\tvar detected_usernames = {};\n\t\t\n\t\tvar pi_usernames = get_all_values_of_types([\"username\", \"name\", \"email\"], true);\n\n\t\tconsole.log(\"APPU DEBUG: Printing all cookies containing usernames for: \" + domain);\n\t\tfor (var i = 0; i < all_cookies.length; i++) {\n\t\t for (var j = 0; j < pi_usernames.length; j++) {\n\t\t\tif (all_cookies[i].value.indexOf(pi_usernames[j]) != -1) {\n\t\t\t detected_usernames[pi_usernames[j]] = true;\n\t\t\t var cookie_str = \"\";\n\t\t\t var cookie_name = all_cookies[i].name;\n\t\t\t var cookie_domain = all_cookies[i].domain;\n\t\t\t var cookie_path = all_cookies[i].path;\n\t\t\t var cookie_protocol = (all_cookies[i].secure) ? \"https://\" : \"http://\";\n\t\t\t var cookie_key = cookie_protocol + cookie_domain + cookie_path + \":\" + cookie_name;\n\t\t\t \n\t\t\t cookie_str += \"Cookie Key: \" + cookie_key;\n\t\t\t cookie_str += \", HostOnly: '\" + all_cookies[i].hostOnly + \"'\";\n\t\t\t cookie_str += \", Secure: '\" + all_cookies[i].secure + \"'\";\n\t\t\t cookie_str += \", HttpOnly: '\" + all_cookies[i].httpOnly + \"'\";\n\t\t\t cookie_str += \", Session: '\" + all_cookies[i].session + \"'\";\n\t\t\t cookie_str += \", Value: '\" + all_cookies[i].value + \"'\";\n\t\t\t cookie_str += \", Expiration: '\" + all_cookies[i].expirationDate + \"'\";\n\t\t\t \n\t\t\t if (all_cookies[i].hostOnly) {\n\t\t\t\ttot_hostonly += 1;\n\t\t\t }\n\t\t\t \n\t\t\t if (all_cookies[i].secure) {\n\t\t\t\ttot_secure += 1;\n\t\t\t }\n\t\t\t \n\t\t\t if (all_cookies[i].httpOnly) {\n\t\t\t\ttot_httponly += 1;\n\t\t\t }\n\t\t\t \n\t\t\t if (all_cookies[i].session) {\n\t\t\t\ttot_session += 1;\n\t\t\t }\n\t\t\t \n\t\t\t console.log(\"APPU DEBUG: \" + cookie_str);\n\t\t\t \n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t}\n\t\tconsole.log(\"APPU DEBUG: Total HostOnly Cookies: \" + tot_hostonly);\n\t\tconsole.log(\"APPU DEBUG: Total HTTPOnly Cookies: \" + tot_httponly);\n\t\tconsole.log(\"APPU DEBUG: Total Secure Cookies: \" + tot_secure);\n\t\tconsole.log(\"APPU DEBUG: Total Session Cookies: \" + tot_session);\n\t\tconsole.log(\"APPU DEBUG: Total number of cookies: \" + all_cookies.length);\n\t\tconsole.log(\"APPU DEBUG: Detected usernames: \" + JSON.stringify(Object.keys(detected_usernames)));\n\t }\n\t})(domain);\n\n get_all_cookies(domain, cb_cookies);\n}", "title": "" }, { "docid": "2942534538548da48500f7d0023bdd00", "score": "0.5325137", "text": "function post() {\n setNickCookie($F('post-remember'));\n setReturnPostCookie($F('post-by-return'));\n if ($F('post-nick') == '' || $F('post-text') == '') return;\n disablePost();\n new Ajax.Request(\"@@httpd-url@@@@url-path@@@@cgi-script@@\",\n {\n parameters : {\n nick: $F('post-nick'), \n\ttext: $F('post-text')\n },\n onSuccess : function (t) { enablePost(true); },\n onFailure : function (t) { enablePost(false); },\n onException : function (r, e) { enablePost(false); }\n });\n}", "title": "" }, { "docid": "592fafcbd28a76117923ec01159c9d5c", "score": "0.53220123", "text": "function log_in(){\n\tconsole.log(\"Trying login\");\n\tvar ID_value = document.getElementsByName('name')[0].value;\n\tvar PW_value = document.getElementsByName('password')[0].value;\n\tif(validateID(ID_value)){\n\t\tvar log_ret = validatePW(ID_value, PW_value);\n\t\tswitch(log_ret){\n\t\t\tcase 1: \n\t\t\t\tvar current_user = getUser(ID_value);\n\t\t\t\tlocalStorage.setItem('logged_user', JSON.stringify(current_user)); \n\t\t\t\tconsole.log(\"Succesfully logged\");\n\t\t\t\twindow.location.href = \"profilo.html\";\n\t\t\t\tbreak;\n\t\t\tcase -1:\n\t\t\t\terror(\"Carta d'Identità non registrata\");\n\t\t\t\tbreak;\n\t\t\tcase -2:\n\t\t\t\terror(\"Password non corretta\");\n\t\t\t\tbreak;\n\t\t\tcase -3:\n\t\t\t\terror(\"La password non può essere vuota\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\terror(\"Errore irreparabile del Kernel\"); // =)\n\t\t}\n\t}else error(\"Carta d'Identità non valida\");\n}", "title": "" }, { "docid": "2e3420762d5d667cad42961c1faa268b", "score": "0.5286059", "text": "function TalkSaveSettings() {\n /*document.cookie = \"username=\" + $(\"#talk_name\").val();\n document.cookie = \"room=\" + $(\"#talk_room\").val();*/\n}", "title": "" }, { "docid": "c9fa73750a4988b1f13bde01bdf7ad9a", "score": "0.525038", "text": "function cookieWriter() {\n if (cookiesAllowed === true) {\n let cookieMe = [];\n cookieMe.push(countdown);\n cookieMe.push(keyboardMode[1]);\n cookieMe.push(mutestate);\n cookieMe.push(highscore);\n cookieMe.push(gamesPlayed);\n cookieMe.push(keyValue1);\n cookieMe.push(keyValue2);\n cookieMe.push(keyValue3);\n cookieMe.push(keyValue4);\n cookieMe.push(cookiesAllowed);\n let date = \"Mon, 31 Dec 2018 23:59:59 GMT\";\n let parsed = cookieMe.join(\"_\");\n document.cookie = `options=${parsed}; expires=${date}`;\n }\n}", "title": "" }, { "docid": "e851bcec3f486fc9a577a5344e7ead61", "score": "0.52495384", "text": "function sign_up_tutor(){\n const username_ckeck = document.getElementById(\"user_name_input_1\").value;\n const password_check = document.getElementById(\"user_password_input_1\").value;\n const Nickname_check = document.getElementById(\"user_nickname_input_1\").value;\n if (!username_ckeck){\n window.alert('Please input your username!');\n return false;\n }else if (!password_check){\n window.alert('Please input your password!')\n }else{\n console.log(\"login-line163\")\n const user_check = {\n \"ID\" : username_ckeck,\n \"Password\" : password_check,\n \"Nickname\" : Nickname_check,\n }\n const headers = {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n };\n const method = 'POST'; \n const path = 'auth/signup_tutor';\n api.makeAPIRequest(path,{\n method,headers,\n body: JSON.stringify(user_check)})\n .then(function(res){\n if (res[\"Token\"]){\n console.log(\"\")\n Nickname = res[\"Nickname\"];\n const author_JSON = String(res[\"Token\"]); \n setCookie(\"Nickname\",Nickname,30);\n setCookie(\"author_JSON\",author_JSON,30);\n \n \n window.location.href = \"tutor.html\";\n }else{\n window.alert(\"Invalied Username/Password\");\n }\n })\n }\n\n}", "title": "" }, { "docid": "698a5439890c84e0116d7a165dd83d91", "score": "0.5247202", "text": "function setCookie(name,value){ \n var Days = 30; \n var exp = new Date(); \n exp.setTime(exp.getTime() + Days*24*60*60*1000); \n //cookie will be saved as \"user=username\"\n document.cookie = name + \"=\"+ escape (value) + \";expires=\" + exp.toGMTString(); \n }", "title": "" }, { "docid": "768f97951c426274a3c2b2b1beb1ac25", "score": "0.5243234", "text": "function pushInformation(modal) {\n if (modal == 'B') {\n username = document.getElementById('username').value;\n document.cookie = \"username=\" + username;\n document.cookie = \"char=\" + characterNames[lastChar].name;\n console.log(document.cookie);\n if (username.trim().length > 0) {\n inTheGame = true;\n $('#user_input').addClass('disabled');\n $('#btn-play').addClass('disabled');\n $('#btn-blocks').addClass('disabled');\n document.getElementById('btnPrev').disabled = true;\n document.getElementById('btnNext').disabled = true;\n loadInfo(maps[lastMap].name, characterNames[lastChar].name, username, \"BombTag\");\n } else {\n showMessage(\"Debe ingresar un nombre de usuario\");\n }\n\n } else if (modal == 'F') {\n username = document.getElementById('username').value;\n document.cookie = \"username=\" + username;\n // document.cookie = \"char=\" + characterNames[lastChar].name;\n console.log(document.cookie);\n\n\n if (username.trim().length != 0) {\n inTheGame = true;\n $('#user_input').addClass('disabled');\n $('#btn-play').addClass('disabled');\n $('#btn-blocks').addClass('disabled');\n document.getElementById('btnPrev').disabled = true;\n document.getElementById('btnNext').disabled = true;\n\n loadInfo(maps[lastMap].name, characterNames[lastChar].name, username, \"FallingBlocks\");\n } else {\n showMessage(\"Debe ingresar un nombre de usuario\");\n }\n }\n\n }", "title": "" }, { "docid": "9ddb5ff9347f21625fc27bf37428ebec", "score": "0.522992", "text": "function submitDataToServer() {\n console.log(\"SUBMIT clicked!!!\"); // display a message\n // create an object to post to the server\n // IMPORTANT: ONE NAME - VALUE PAIR FOR EACH FIELD\n let dataObj = {\n username: document.getElementById(\"userName\").value,\n score: document.getElementById(\"scoreVal\").value\n };\n\n // JUST USE THESE LINES AS THEY ARE - NO NEED TO CHANGE\n event.preventDefault(); // prevents 2 calls to this function!!\n\n const requestMsg = new XMLHttpRequest();\n requestMsg.open(\"post\", URLname + \"/putData\", true); // open a HTTP post request\n requestMsg.setRequestHeader(\"Content-Type\", \"application/json;charset=UTF-8\");\n\n requestMsg.send(JSON.stringify(dataObj));\n}", "title": "" }, { "docid": "0761a60a2722195e45e51d9cf93e5324", "score": "0.52169704", "text": "function readCookie()\n{\n\tuserId = -1;\n\tvar data = document.cookie;\n\tvar splits = data.split(\",\");\n\tfor(var i = 0; i < splits.length; i++)\n\t{\n\t\tvar thisOne = splits[i].trim();\n\t\tvar tokens = thisOne.split(\"=\");\n\t\tif( tokens[0] == \"firstName\" )\n\t\t{\n\t\t\tfirstName = tokens[1];\n\t\t}\n\t\telse if( tokens[0] == \"lastName\" )\n\t\t{\n\t\t\tlastName = tokens[1];\n\t\t}\n\t\telse if( tokens[0] == \"userId\" )\n\t\t{\n\t\t\tuserId = parseInt( tokens[1].trim() );\n\t\t}\n\t}\n\n\tif( userId < 0 )\n\t{\n\t\tself.location = \"index.html\";\n\t}\n\telse\n\t{\n\t\t//document.getElementById(\"result\").innerHTML = \"Logged in as \" + firstName + \" \" + lastName;\n\t}\n}", "title": "" }, { "docid": "a7ec24a01d4771ba33f6b24acc37a656", "score": "0.52121407", "text": "function checkCookie(){\n var username = getCookie(\"username\");\n var uName = document.getElementById('n1'),\n pWord = document.getElementById('n2');\n\n if (username != \"\"){\n alert(\"Welcome again \" + username);\n uName.value = \"rosebud\";\n pWord.value = \"komodo\";\n \n } \n // else {\n\n // username = prompt(\"Please enter your name:\",\"\");\n // if (user != \"\" && user != null){\n // // stores the username into a cookie and save it for 365 days\n // setCookie(\"username\", user, 365)\n // }\n // }\n}", "title": "" }, { "docid": "3976f7c80d421d978760fd4cdfae579e", "score": "0.5211113", "text": "static saveUserInCookie(dataDefaultCryptoList, duration) {\n //Cookies\n let userCookie = {\n user: 'username',\n accepted: true,\n date: new Date(),\n listCrypto: dataDefaultCryptoList\n }\n\n this.setCookie('InfoCryptoUsername', JSON.stringify(userCookie), parseInt(duration))\n }", "title": "" }, { "docid": "cba34c6cc3a94dabc6b0672e74090aee", "score": "0.5210501", "text": "function post(){\n\n// store user's username and comment\nvar username = document.getElementById(\"username\").value;\nconsole.log(username);\nvar comment = document.getElementById(\"comment\").value;\nconsole.log(comment);\nvar d = new Date()\n\n\n// user's user name and comment are printed to document\n\tvar bigDiv = document.createElement(\"div\");\n\tbigDiv.className = \"newdivstyle\";\n\tbigDiv.id = \"bigdiv\";\n\tdocument.body.appendChild(bigDiv);\n\n\tvar nameDiv = document.createElement(\"div\");\n\tnameDiv.className = \"newusername\"\n\tnameDiv.id = \"namediv\";\n\tnameDiv.innerText = username;\n\tdocument.getElementById(\"bigdiv\").appendChild(nameDiv);\n\n\tvar commentDiv = document.createElement(\"div\");\n\tcommentDiv.className = \"newcomment\"\n\tcommentDiv.id = \"commentDiv\";\n\tcommentDiv.innerText = comment;\n\tdocument.getElementById(\"bigdiv\").appendChild(commentDiv);\n\n\tvar p = document.createElement(\"p\");\n\tp.className = \"timestamp\"\n\tp.innerHTML = d.toString();\n\tdocument.getElementById(\"bigdiv\").appendChild(p);\n}", "title": "" }, { "docid": "1f7a6f2f0c42b48ee79ca97ad12a82b8", "score": "0.52089787", "text": "function sign_up(){\n const username_ckeck = document.getElementById(\"user_name_input\").value;\n const password_check = document.getElementById(\"user_password_input\").value;\n const Nickname_check = document.getElementById(\"user_nickname_input\").value;\n if (!username_ckeck){\n window.alert('Please input your username!');\n return false;\n }else if (!password_check){\n window.alert('Please input your password!')\n }else{\n console.log(\"login-line163\")\n const user_check = {\n \"ID\" : username_ckeck,\n \"Password\" : password_check,\n \"Nickname\" : Nickname_check,\n }\n const headers = {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n };\n const method = 'POST'; \n const path = 'auth/signup';\n api.makeAPIRequest(path,{\n method,headers,\n body: JSON.stringify(user_check)})\n .then(function(res){\n if (res[\"Token\"]){\n Nickname = res[\"Nickname\"];\n setCookie(\"Nickname\",Nickname,30);\n const author_JSON = String(res[\"Token\"]); \n setCookie(\"author_JSON\",author_JSON,30);\n window.location.href = \"student_choice.html\";\n }else{\n window.alert(\"Invalied Username/Password\");\n }\n })\n }\n\n}", "title": "" }, { "docid": "54cf1593b305240f5fc0464fba5300f7", "score": "0.51771146", "text": "function createCookie() {\n // sets cookie to expire in 5 years\n var futureDate = getDate(5, 0, 0);\n var secure = \"\";\n if (window.isSecureContext) {\n secure = \" Secure;\";\n }\n document.cookie = COOKIE_CONSENT_NAME + \"=true; expires=\" + futureDate + \";path=/; SameSite=Lax;\" + secure;\n\n dismissDialog();\n\n postEntry();\n}", "title": "" }, { "docid": "c050312f4ba7a4d48addfeb48a9caea7", "score": "0.51750576", "text": "function setCookiesFromForm(){\n\tcreateCookie(\"remember\", $(\"#rememberBox\")[0].checked );\n\tcreateCookie(\"meetingID\", $(\"#inputMeetingID\").val());\n\tcreateCookie(\"meetingSessionID\", $(\"#inputSessionID\").val());\n\tcreateCookie(\"url\", $(\"#inputClientUrl\").val());\n\tcreateCookie(\"JSON\", $(\"#inputJSON\").val().toString().replace(/(\\r\\n|\\n|\\r)/gm,'') );\n}", "title": "" }, { "docid": "73bc3ede741b19eb04154f0e6068d3d8", "score": "0.5152197", "text": "function bakeCookie() {\n var cookie = [\"SonificationMetricData=\", JSON.stringify(data), \"; domain=.\", window.location.host.toString(), \"; path=/;\"].join('');\n document.cookie = cookie;\n}", "title": "" }, { "docid": "ea6a33d0e9b3b13ff187e12129351a59", "score": "0.5142091", "text": "function postName(name)\n{\n\t//sends user input name to socket\n\tsocket.emit('name', name);\t\n}", "title": "" }, { "docid": "0ac117fb011b103139c7b8734c824a74", "score": "0.514164", "text": "function encryptWriteCookie(historyItem, name){\r\n\t\tvar cookieObject = {statement: historyItem.statement, additionalDescription: historyItem.additionalDescription};\r\n\t\tvar cookie = JSON.stringify(cookieObject);\r\n\t\t\r\n\t\t$.ajax({\r\n\t\t\turl : encryptionUrl,\r\n\t\t\ttype : 'POST',\r\n\t\t\tdata : {\r\n\t\t\t\tcookie: cookie\r\n\t\t\t},\r\n\t\t\theaders : {\r\n\t\t\t\t'Accept' : 'application/json'\r\n\t\t\t},\r\n\t\t\tsuccess : function(data) {\r\n\t\t\t\tif (data.exception) {\r\n\t\t\t\t\tdeleteCookie(name);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tcreateCookie(name,data.ciphertext);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\terror : hac.global.err\r\n\t\t});\r\n\t}", "title": "" }, { "docid": "dad06fcb954686bc62e3a45c7704f3e0", "score": "0.51376224", "text": "function saveGame(gameName) {\n\tif (findGame(gameName) != null) {\n\t window.alert('Save data with given name already exists.');\n\t\treturn;\n\t}\n\tvar i = currentStats['theDay'] - 1;\n\tsaveNames[i].push(gameName);\n\tvar d = new Date();\n\td.setTime(d.getTime() + (365*24*60*60*1000));\n\tvar expDate = \"expires=\" + d.toUTCString();\n\tdocument.cookie = SAVE_STATS_NAME + \"=\" + JSON.stringify(saveNames) + \"; \" + expDate;\n\tdocument.cookie = gameName + \"=\" + JSON.stringify(currentStats);\n\tallCookies = document.cookie.split(';');\n}", "title": "" }, { "docid": "01917428b5216f3d4a03cac3fda869e0", "score": "0.5133554", "text": "function setCookie(name, value){\n document.cookie = `${name}=${value}`;\n }", "title": "" }, { "docid": "24640d68d6f549a1b502e871c5d13d79", "score": "0.512941", "text": "function check_login_tutor(){\n const username_ckeck = document.getElementById(\"user_name_input\").value;\n const password_check = document.getElementById(\"user_password_input\").value;\n console.log(\"login.js--line120\");\n if (!username_ckeck){\n window.alert('Please empty your username!');\n return false;\n }else if (!password_check){\n window.alert('Please empty your password!')\n }else{\n console.log(\"login-line127\")\n const user_check = {\n \"ID\" : username_ckeck,\n \"Password\" : password_check\n }\n const headers = {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n };\n const method = 'POST'; \n const path = 'auth/login_tutor';\n api.makeAPIRequest(path,{\n method,headers,\n body: JSON.stringify(user_check)})\n .then(function(res){\n if (res[\"Token\"]){\n \n const author_JSON = String(res[\"Token\"]); \n setCookie(\"author_JSON\",author_JSON,30);\n \n Nickname = res[\"Nickname\"];\n setCookie(\"Nickname\",Nickname,30);\n window.location.href = \"tutor.html\";\n }else{\n alert(\"Permission limited\");\n }\n })\n }\n}", "title": "" }, { "docid": "f4887bebb3ee7cf798d8a0a8c26c1765", "score": "0.5100235", "text": "function submitName() {\n let submitButton = document.getElementById(\"submit-button\");\n submitButton.disabled = true;\n let xhttp = new XMLHttpRequest();\n let name = document.getElementById(\"name\").value;\n let score = document.getElementById(\"score\").value;\n\n if (name.includes(\"#\")) {\n let warning = document.getElementById(\"warning\");\n warning.innerHTML = \"Cannot put # in name\";\n warning.style.fontSize = \"1.5vmax\";\n return;\n }\n\n let url = \"omitted\" + name + \"&score=\" + score;\n xhttp.open('GET', url, true);\n xhttp.send();\n\n xhttp.onreadystatechange = function () { \n window.location.replace(\"./leaderboard.html\");\n }\n}", "title": "" }, { "docid": "dd97d8b1ec9c7a5bf5860703e6a7b5cc", "score": "0.50998616", "text": "function createCookie(name, value) {\n var date = new Date();\n date.setTime(date.getTime() + 600000);\n var expires = \"; expires=\" + date.toGMTString();\n\n document.cookie = name + \"=\" + value + expires + \"; path=/\";\n}", "title": "" }, { "docid": "3a326ac889089a56405cf975c9ab2978", "score": "0.50975853", "text": "function record_prelogin_cookies(username, domain) {\n var cb_cookies = (function(username, domain) {\n\t return function(all_cookies) {\n\t\tpre_login_cookies[domain] = {};\n\t\tpre_login_cookies[domain].cookies = {};\n\t\tpre_login_cookies[domain].username = username;\n\t\tfor (var i = 0; i < all_cookies.length; i++) {\n\t\t var hashed_cookie_val = sjcl.codec.hex.fromBits(sjcl.hash.sha256.hash(all_cookies[i].value));\n\t\t var cookie_name = all_cookies[i].name;\n\t\t var cookie_domain = all_cookies[i].domain;\n\t\t var cookie_path = all_cookies[i].path;\n\t\t var cookie_protocol = (all_cookies[i].secure) ? \"https://\" : \"http://\";\n\t\t var cookie_key = cookie_protocol + cookie_domain + cookie_path + \":\" + cookie_name;\n\t\t pre_login_cookies[domain].cookies[cookie_key] = hashed_cookie_val;\n\t\t}\n\t }\n\t})(username, domain);\n\n get_all_cookies(domain, cb_cookies);\n}", "title": "" }, { "docid": "63f3e0b4dded7f8e4efe1d62c16ce0a9", "score": "0.5093973", "text": "function setCookie(cookieName, cookieValue, expirationDays){ //Sets a cookie on your system so that I can hack into your webcam and watch you fap to boku no pico\r\n\t\tvar expirationDate = new Date();\r\n\t\texpirationDate.setDate(expirationDate.getDate() + expirationDays);\r\n\t\tvar cValue=escape(cookieValue) + ((expirationDays==null) ? \"\" : \"; expires=\"+expirationDate.toUTCString());\r\n\t\tvar theNewCookie= cookieName + \"=\" + cValue;\r\n\t\tconsole.log(document.cookie);\r\n\t}", "title": "" }, { "docid": "3e9c8d1ae12d2c67351995751703d225", "score": "0.50639695", "text": "function change_name(){\r\n var name = prompt(\"Enter your username\", get_cookie(\"playername\"));\r\n if (!name) \r\n return;\r\n players[0].name = name;\r\n write_player(0,0,0,0);\r\n set_cookie(\"playername\", name);\r\n}", "title": "" }, { "docid": "41c83ef8769a13829ce79608236bfbbc", "score": "0.5063196", "text": "function writeCookieStuff(){ }", "title": "" }, { "docid": "34bd3bfa4c7971aff393d7a6243b6b6e", "score": "0.5058688", "text": "function make_cookie(){\n let cookie_name = \"name=\" + name + \";\";\n let user_speed = $('input[name=Speed]:checked').val();\n let cookie_speed = \"speed=\" + user_speed + \";\";\n let user_color = $('input[name=Color]:checked').val();\n let cookie_color = \"color=\"+user_color+\";\";\n let now = new Date(), expires = now;\n expires.setSeconds(expires.getSeconds()+10); //expire after 10 seconds\n let cookie_expires = \"expires=\" + expires.toUTCString() + \";\";\n let cookie_path = \"path=\" + window.location.pathname;\n document.cookie = cookie_name + cookie_expires + cookie_path;\n document.cookie = cookie_speed + cookie_expires + cookie_path;\n document.cookie = cookie_color + cookie_expires + cookie_path;\n}", "title": "" }, { "docid": "a9692a45b92c0eed0951064738b2fefe", "score": "0.5038749", "text": "function addMessage() {\n var cookie = getCookie('session');\n var idUser = cookie.split(\"-\")[0];\n var nickuser = cookie.split(\"-\")[1];\n\n sendMessage(idUser, nickuser);\n }", "title": "" }, { "docid": "8c47fdc3fa0ac97168b5d98e9081d772", "score": "0.50342923", "text": "function setCookie(name,value) {\n if (window.localStorage !== undefined) {\n window.localStorage.setItem(name,value);\n return;\n }\n var expires = \"; expires=\" + new Date(3000, 00, 01).toGMTString() + \"; path=/\";\n var cookies = document.cookie.split(';');\n var x = \"qqTimer=\";\n var found = false;\n for (var i=0; i<cookies.length; i++) {\n var c = cookies[i];\n while (c.charAt(0)==' ') c = c.substring(1,c.length);\n if (c.indexOf(x) == 0) { // this is the qqtimer cookie\n found = true;\n var str = c.substring(x.length,c.length);\n var options = str.split('.');\n var good = false;\n for (var j=0; j<options.length; j++) {\n if (options[j].split(',')[0] == name) {\n good = true;\n options[j] = name + \",\" + value;\n }\n }\n if (!good) {\n options[options.length] = name + \",\" + value;\n }\n var s = x;\n for (var j=0; j<options.length; j++) {\n if (j>0) s+=\".\";\n s+=options[j];\n }\n document.cookie = s + expires;\n }\n }\n if (!found) {\n document.cookie = x + name + \",\" + value + expires;\n }\n}", "title": "" }, { "docid": "3ecec7288a6d984ac5ce7a9dee88104b", "score": "0.50326926", "text": "function setCookie( cookie_name, data ) {\n\tvar domain = wgServer.split(\"//\")[1];\n\tdocument.cookie =\n\t\tcookie_name + \"=\" + data +\n\t\t\"; max-age=\" + 60*60*24*150 +\n\t\t\"; path=/; domain=\" + domain;\n}", "title": "" }, { "docid": "edf2de2451365e15273bbeabb2933b35", "score": "0.5032047", "text": "function sendNames(names) {\n data = [];\n for (var i = completed; i < names.length; i++) {\n data.push(names[i].textContent.slice(1));\n }\n var setNames = function(rData, stat) {\n rData = JSON.parse(rData)\n if (stat === \"success\") {\n for (var i = 0; i < rData.length; i++) {\n if (Number(rData[i]) < -0.1) { \n names[completed + i].innerHTML += hate; \n }\n else if (Number(rData[i]) > 0.1) {\n names[completed + i].innerHTML += love; \n }\n else {\n names[completed + i].innerHTML += switzerland;\n }\n bindLink(GraphCache);\n }\n completed = names.length;\n }\n }\n $.post(\"//suhasarehalli.me/python/shades\", JSON.stringify({ usernames: data, isChart: false }), setNames);\n }", "title": "" }, { "docid": "9c5e3240c50ba3e47298ce69b88cf1ff", "score": "0.50157595", "text": "static async name(apiKey, name){\n let header = {\n 'Connection' : 'keep-alive',\n 'content-type' : 'application/json',\n 'apiKey' : apiKey\n };\n\n let body = {\n 'name' : name,\n }\n //------------------------------------------------------------------------------------------------------------------\n let post = await helpers.post('/tools/profile/name', header, body);\n console.log(post);\n await helpers.logs('tools', 'name', post);\n }", "title": "" }, { "docid": "3a1853a8aa875ad2f33f01a54d6e44fc", "score": "0.50148714", "text": "function writeCookie(){\n if( document.myform.customer.value == \"\" ){\n\t alert(\"Enter some value!\");\n return;\n }\n cookievalue= escape(document.myform.customer.value) + \";\";\n document.cookie=\"name=\" + cookievalue;\n alert (\"Setting Cookies : \" + \"name=\" + cookievalue );\n}", "title": "" }, { "docid": "e5189882009747d41cae7b2cbcf30b43", "score": "0.50128525", "text": "function setCookie( cookie_name, data ) {\n\tvar splitServer = wgServer.split(\"//\");\n\tvar domain = splitServer[1];\n\tdocument.cookie =\n\t\tcookie_name + \"=\" + data +\n\t\t\"; max-age=\" + 60*60*24*100 +\n\t\t\"; path=/; domain=\" + domain ;\n}", "title": "" }, { "docid": "dac5edcc329044b185deb39e0ddda471", "score": "0.50105304", "text": "function checkLoginCookie() {\n const username = getCookie('username');\n const password = getCookie('password');\n\n const usernameField = document.getElementsByName('username')[0];\n const passwordField = document.getElementsByName('password')[0];\n if(usernameField != null && passwordField != null) {\n usernameField.value = username;\n passwordField.value = password;\n }\n}", "title": "" }, { "docid": "7b6e495d0205da7d4c342efa8628d1cb", "score": "0.50029343", "text": "handleSubmitForm (name, size) {\n \n var cookie = this.state.userCookie;\n if (!cookie) {\n var cookie = Math.floor(Math.random() * 10000);\n };\n this.setState({\n userName : name,\n gameStart: true,\n size: size,\n userCookie: cookie,\n }, () => {\n this.getData();\n });\n }", "title": "" }, { "docid": "0cf6c20ebce846c73943a7054df95f7e", "score": "0.49974704", "text": "function welcomeAfterAunthentication(userName){\n document.cookie = userName + \";path=/\";\n //cookieParser.JSONCookie(userName)\n window.location =\"../Content/index.html\"\n}", "title": "" }, { "docid": "c8ed26a8dc6a8b2102595829c53f2094", "score": "0.4994142", "text": "function setCookie(name,value) {\n document.cookie = name+'='+escape(value);\n}", "title": "" }, { "docid": "c8ed26a8dc6a8b2102595829c53f2094", "score": "0.4994142", "text": "function setCookie(name,value) {\n document.cookie = name+'='+escape(value);\n}", "title": "" }, { "docid": "042be2fa7ac6d663525ceec8c7dc2334", "score": "0.49843177", "text": "function getName(session) {\n name = session.message.text;\n session.userData.name = name;\n session.send(\"Hi, \" + name + \". What is your Email ID?\");\n}", "title": "" }, { "docid": "66aa6703d932c14c16b820a5770bf5a5", "score": "0.49837607", "text": "function guildNameTake(){\r\n\tif(document.getElementById('content').getElementsByTagName('b')[0]){\r\n\t\tvar guildName=document.getElementById('content').getElementsByTagName('b')[0].innerHTML;\r\n\t\tSet_Cookie('guildName',guildName);\r\n\t}\r\n}", "title": "" }, { "docid": "bce57ba150406ecc5b1b700b1362d79e", "score": "0.4974767", "text": "static getCookie(name)\n {\n var cookieValue = null;\n if (document.cookie && document.cookie !== '') {\n var cookies = document.cookie.split(';');\n for (var i = 0; i < cookies.length; i++) {\n var cookie = jQuery.trim(cookies[i]);\n // Does this cookie string begin with the name we want?\n if (cookie.substring(0, name.length + 1) === (name + '=')) {\n cookieValue = decodeURIComponent(cookie.substring(name.length + 1));\n break;\n }\n }\n }\n return cookieValue;\n }", "title": "" }, { "docid": "9684221642d3a70cc78191007075fa5d", "score": "0.4962628", "text": "function login() {\n let user = `{\"name\":\"${USER_NAME}\"}`;\n client.write(user, false);\n}", "title": "" }, { "docid": "4c2339039fe9099be77cb7f417da07ff", "score": "0.49603125", "text": "function createCookie(name,value) {\r\n\t\t\t// expire 7 days from now\r\n\t\t\tvar expires = new Date();\r\n\t\t\texpires.setDate(expires.getDate()+7);\r\n\t\t\tdocument.cookie = name+\"=\"+value+\";expires=\"+expires.toGMTString()+\"; path=/\";\r\n\t\t}", "title": "" }, { "docid": "831f8fe810db0097a352a37801dde540", "score": "0.4954578", "text": "function readCookie()\n{\n\tuserId = -1;\n\tvar data = document.cookie;\n\t// document.cookie has data like \"cookie_name=value; cookie_name=value\"\n\t// we're looking for \"account_data=some_base_64_string\"\n\tvar splits = data.split(\";\");\n\tfor(var i = 0; i < splits.length; i++) \n\t{\n\t\tvar thisOne = splits[i].trim();\n\t\tvar tokens = thisOne.split(\"=\");\n\t\t// found it\n\t\tif( tokens[0] == \"account_data\" )\n\t\t{\n\t\t\t// now getting user data is much easier - we can treat user_data as a regular object\n\t\t\tuser_data = JSON.parse(atob(tokens[1]));\n\t\t\tuserId = user_data.userId;\n\t\t\tfirstName = user_data.firstName;\n\t\t\tlastName = user_data.lastName;\n\t\t}\n\t}\n\t\n\tif( userId < 0 )\n\t{\n\t\twindow.location.href = \"index.php\";\n\t}\n\telse\n\t{\n\t\tdocument.getElementById(\"nameDisplay\").innerHTML = \"Logged in as \" + firstName + \" \" + lastName;\n\t}\n}", "title": "" }, { "docid": "85394992af77ba6e2205ce127769595c", "score": "0.4933282", "text": "function save(){\n var table = document.getElementsByClassName(\"bouton_libre\");\n for(i=0; i<table.length; i++){\n setCookie(table[i].id, table[i].value);\n }\n }", "title": "" }, { "docid": "1b141a817d26339b0ce6ec77f15e26fd", "score": "0.49313682", "text": "function setCookie(name, value) {\n document.cookie = name + '=' + value;\n}", "title": "" }, { "docid": "c96d85fb462278631f720127d2cd0c2b", "score": "0.49305487", "text": "function submitID() {\r\n\r\n // Gets the value of the input\r\n let employeeID = $(\"#employeeID\").val();\r\n let employeePW = $(\"#password\").val();\r\n let requestURL = \"http://www.tomiheimonen.info/wd211/apis/employee-login.php\";\r\n\r\n\t// Post request\r\n $.post(requestURL, {\r\n username: employeeID,\r\n password: employeePW\r\n }, function(data) {\r\n $(\"#employeeLogin\").slideUp(200);\r\n $(\"#storeSelector\").toggle(200);\r\n })\r\n\t\t// Function that runs if request failed\r\n .fail(function() {\r\n\t\t\t$(\"#error\").empty();\r\n $(\"#error\").append(\"Incorrect ID or Password\");\r\n });\r\n}", "title": "" }, { "docid": "87b71877a09855ca4629cd00da2ae31a", "score": "0.49256492", "text": "function sendAuthentication() {\n var t=w.document.getElementById('txtText');\n var r={'{NICK}':reqUserId,'{NAME}':reqUserName};\n logger(hhmm()+str(16,r)); // AUTHENTICATING: {NAME} ({NICK})\n s='A\\t'+reqUserId+'\\t'+reqUserName+'\\t'+reqDate+'\\t'+reqSignature+'\\t'+t.value;\n ws.send(s);\n}", "title": "" }, { "docid": "f2159d7d1886f8ed247d89050f5369a1", "score": "0.49221984", "text": "function verify()\r\n{\r\nif(document.getElementsByName(\"user_name\")[0].value.length>4 && document.getElementsByName(\"password\")[0].value.length>5)\r\n{\r\n\t\tif(document.getElementsByName(\"person\")[0].checked)\r\n\t{\r\n\t\tvar person=document.getElementsByName(\"person\")[0].value;\r\n\t}\r\n\telse if(document.getElementsByName(\"person\")[1].checked)\r\n\t\t\tvar person=document.getElementsByName(\"person\")[1].value;\r\n\telse var person=document.getElementsByName(\"person\")[2].value;\r\n\tvar xmlhttp= new XMLHttpRequest();\r\n\txmlhttp.onreadystatechange=function(){\r\n\tif(this.readyState==4 && this.status==200 && this.responseText==1)\r\n\t{\r\n\t//document.cookie=document.getElementsByName(\"user_name\")[0].value+\"=\"+person+\";path=/notice_stu.html;\";\r\n\tlocalStorage.setItem(\"name\",document.getElementsByName(\"user_name\")[0].value);\r\n\tlocalStorage.setItem(\"cat\",person);\r\n\tlocation.href=\"/notice_stu.html\";\r\n\t}\r\n\telse if(this.readyState==4 && this.status==200 && this.responseText==2)\r\n\t{\r\n\tlocation.href=\"/notice_admin.html\";\r\n\t}\r\n\telse if(this.readyState==4 && this.status==200 && this.responseText==0)\r\n\t\talert(\"user name and password dint match\");\r\n\t}\r\n\txmlhttp.open(\"GET\",\"login.php?q=\"+document.getElementsByName(\"user_name\")[0].value+\"/\"+document.getElementsByName(\"password\")[0].value+\"/\"+person,true);\r\n\txmlhttp.send();\r\n}\r\nelse {\r\nalert(\"invalid username and password\");\r\ndocument.getElementsByName(\"password\")[0].value=\"\";\r\ndocument.getElementsByName(\"user_name\")[0].value=\"\";\r\n}\r\n}", "title": "" }, { "docid": "03a5f3930cb60e80e423fd9279696ff7", "score": "0.49201941", "text": "function changeInfo()\n{\n\t//document.getElementById(logName).innerHTML = $pseudo.val();\n\tif ($colorTheme.val() != \"\")\n\t\tchangeColor(escapeHtml($colorTheme.val()).toString());\n\tif ($usernameColor.val() != \"\")\n\t{\n\t\tcreateCookie(\"usernameColor\", escapeHtml(document.getElementById('usernameColor').value));\n\t}\n\telse\n\t\tcreateCookie(\"usernameColor\", \"\");\n\tif ($usernameGlow.val() != \"\")\n\t{\n\t\tcreateCookie(\"usernameGlow\", escapeHtml(document.getElementById('usernameGlow').value));\n\t}\n\telse\n\t\tcreateCookie(\"usernameGlow\", \"\");\n\tif (escapeHtml($background.val()) == \"\")\n\t\tif (isCinema == true)\n\t\t\t$('#body').css({'background': 'linear-gradient( rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7) ), url(background.jpg)'});\n\t\telse\n\t\t\tdocument.getElementById('body').style.backgroundImage = \"url(background.jpg)\";\n\telse\n\tif (isCinema == true)\n\t\t$('#body').css({'background': 'linear-gradient( rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7) ), url(' + escapeHtml($background.val()) + ')'});\n\telse\n\t\tdocument.getElementById('body').style.backgroundImage = \"url(\" + escapeHtml($background.val()) + \")\";\n\tcreateCookie(\"background\", escapeHtml($background.val()));\n\tsocket.emit('send message', document.getElementById('pseudo').value, document.getElementById('image').value, escapeHtml(document.getElementById('usernameColor').value), escapeHtml(document.getElementById('usernameGlow').value), false);\n\tcreateCookie(\"username\", document.getElementById('pseudo').value);\n\tcreateCookie(\"avatar\", document.getElementById('image').value);\n\tshowOffSettings();\n}", "title": "" }, { "docid": "c16d6f7b2f581266211be257ccf09a08", "score": "0.4915893", "text": "static doPostSSRLogs(logger, request, cookie) {\n if (!logger) {\n return;\n }\n const logRequest = {};\n const response = request.response || {};\n logRequest.requestInfo = request.requestInfo;\n logRequest.responseCode = response.status;\n logRequest.traceId = response.headers && response.headers.get('x-trace-id');\n if (!isEmpty(cookie)) {\n logRequest.cookies = {\n DPOrder: cookie.DPOrder,\n DPJSESSIONID: cookie.DPJSESSIONID,\n DPInstance: cookie.DPInstance,\n DPCluster: cookie.DPCluster,\n DPCloudOrigin: cookie['DP-Cloud-Origin'],\n DPCloudCluster: cookie['DP-Cloud-Cluster'],\n };\n }\n const errorInfo = Array.isArray(response.data) ? response.data[0] : response.data;\n if (errorInfo && errorInfo.errorCode) {\n logRequest.errorInfo = errorInfo;\n }\n logger.info(logRequest);\n }", "title": "" }, { "docid": "db8ae3a2d52a046efbe67460d3703315", "score": "0.49146643", "text": "function make_cookie(){\n\tlet cookie_name = \"name=\" + our_name + \";\";\n\tlet cookie_speed = \"speed=\" + our_speed + \";\";\n\tlet cookie_color = \"color=\" + our_color + \";\";\n\tlet now = new Date(), expires = now;\n\texpires.setSeconds(expires.getSeconds()+10);\n\tlet cookie_expires = \"expires=\" + expires.toUTCString() + \";\";\n\tlet cookie_path = \"path=/;\"\n\tdocument.cookie = cookie_name + cookie_expires + cookie_path;\n\tdocument.cookie = cookie_speed + cookie_expires + cookie_path;\n\tdocument.cookie = cookie_color + cookie_expires + cookie_path;\n}", "title": "" }, { "docid": "d8629c57d180fcfef8f5b17fffdd1e7e", "score": "0.4913464", "text": "function savePlayerName() {\r\n var name = document.getElementById('playerName').value;\r\n var namesTaken = getStorage('usernamesTaken');\r\n //check name against namesTaken\r\n var isNameTaken;\r\n for (var i=0; i<namesTaken.length; i++) {\r\n if (name === namesTaken[i]) {\r\n isNameTaken = true; } \r\n else {\r\n isNameTaken = false;\r\n }\r\n }\r\n //set id value for this user to emit to the server\r\n id = Math.floor(Date.now() * Math.random());\r\n \r\n if (name == \"\" || name == \" \" || name == undefined || name == null) {\r\n document.getElementById('nameFail').innerHTML = 'That is not an acceptable name. Enter a name.';\r\n } else if (isNameTaken === true) {\r\n document.getElementById('nameFail').innerHTML = 'That is taken by another user. Enter a different name.';\r\n } else {\r\n setStorage('username', name);\r\n console.log('saving new username: ' + name);\r\n // Send the name and id to the socket (server)\r\n var clientSideUser = { 'name': name, 'userID': id };\r\n // setStorage('userInfo', {name, id});\r\n socket.emit('join', clientSideUser);\r\n //name has been sent to server. hide modal/show chat room\r\n $.modal.close();\r\n hideModalOverlays();\r\n //revealing elements and hiding others\r\n document.getElementById('nameFail').innerHTML = '';\r\n document.getElementById('chatFeature').classList.remove('hidden');\r\n document.getElementById('banner').classList.remove('hidden');\r\n document.getElementById('currentUsers').classList.remove('hidden');\r\n document.getElementById('nameForm').classList.add('hidden');\r\n document.getElementById('chatWelcomeModal').classList.add('hidden');\r\n document.getElementById('confirmSettings').classList.add('hidden');\r\n }\r\n}", "title": "" }, { "docid": "bcb86aacd92ec323fba31aa2fdd3ae87", "score": "0.49075952", "text": "function postPlayer(userName) {\n $.post({\n headers: {\n 'Content-Type': 'application/json'\n },\n dataType: \"text\",\n url: \"/players\",\n data: JSON.stringify({ \"userName\": userName })\n })\n .done(function() {\n showOutput( \"Saved -- reloading\");\n loadData();\n })\n .fail(function( jqXHR, textStatus ) {\n showOutput( \"Failed: \" + textStatus );\n });\n }", "title": "" }, { "docid": "15015f3bad4948aa259df39b39153d95", "score": "0.49033317", "text": "function submitPost(Login) {\n $.post(\"/api/login/\", Login, function (data) {\n $(\"#userInfo\").text(Login.username);\n $(\"#signupModal\").modal(\"hide\");\n $(\"#suusername\").val(\"\");\n $(\"#suemail\").val(\"\");\n $(\"#supwd\").val(\"\");\n $(\"#supwdrpt\").val(\"\");\n\n $(\"#sunamerr\").text(\"\");\n $(\"#suemailerr\").text(\"\");\n $(\"#supwdrpterr\").text(\"\");\n localStorage.setItem(\"user\", Login.username);\n localStorage.setItem(\"progress\", Login.progress);\n window.location.href = \"/home\";\n\n });\n }", "title": "" }, { "docid": "a59f7d4b92b36f1e5498963cdc4ef173", "score": "0.49018806", "text": "function createCookie(name,value) {\r\n\t\t// expire 7 days from now\r\n\t\tvar expires = new Date();\r\n\t\texpires.setDate(expires.getDate()+7);\r\n\t\tdocument.cookie = name+\"=\"+value+\";expires=\"+expires.toGMTString()+\"; path=/\";\r\n\t}", "title": "" }, { "docid": "2e8117f3c3e3996852a19c1f26332660", "score": "0.49012515", "text": "function cookieswap_loggerPrefChanged(branch, name)\r\n{\r\n cookieswap_dbg(\"loggerPrefChanged(\" + branch + \",\" + name + \")\");\r\n cookieswap_dbg(\"BEFORE gCsDbgEnabled=\" + gCsDbgEnabled + \r\n \" gCsDbgErrConsole=\" + gCsDbgErrConsole +\r\n \" gCsDbgOsConsole=\" + gCsDbgOsConsole +\r\n \" gCsDbgFile=\" + gCsDbgFile);\r\n switch (name) \r\n {\r\n case \"GeneralBrowserEnable\":\r\n // extensions.cookieswap.debug.GeneralBrowserEnable was changed\r\n //Not relevant here in the browser/chrome\r\n break;\r\n case \"GeneralXpcomEnable\":\r\n // extensions.cookieswap.debug.GeneralXpcomEnable was changed\r\n gCsDbgEnabled = branch.getBoolPref(name);\r\n break;\r\n case \"ErrorConsole\":\r\n // extensions.cookieswap.debug.ErrorConsole was changed\r\n //Defines if we write to the Firefox Error Console (Tools->Error Console)\r\n gCsDbgErrConsole = branch.getBoolPref(name); \r\n break;\r\n case \"OsConsole\":\r\n // extensions.cookieswap.debug.OsConsole was changed\r\n //Defines if we write to the OS console (firefox.exe -console)\r\n gCsDbgOsConsole = branch.getBoolPref(name); \r\n break;\r\n case \"File\":\r\n // extensions.cookieswap.debug.File was changed\r\n //Defines if we write to a file\r\n var filename = branch.getCharPref(name); \r\n\r\n if (filename != \"\")\r\n {\r\n cookieswap_dbg(\"[cookieswap]: Creating file '\" + filename + \"'\");\r\n //This will get the directory of the current Mozilla profile.\r\n // We'll put the CookieSwap dir under there since Firefox's cookies.txt file\r\n // is stored in this profile dir.\r\n var logFile = Components.classes[\"@mozilla.org/file/directory_service;1\"]\r\n .getService(Components.interfaces.nsIProperties)\r\n .get(\"ProfD\", Components.interfaces.nsIFile);\r\n logFile.append(COOKIE_SWAP_DIR_NAME);\r\n logFile.append(filename);\r\n \r\n if (logFile.exists() == true)\r\n {\r\n logFile.remove(true);\r\n }\r\n logFile.create(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, COOKIE_FILE_PERMISSIONS);\r\n cookieswap_dbg(\"[cookieswap]: Created\" );\r\n \r\n gCsDbgFile = ffGetFileOutputStream();\r\n //Open the file with default flags and default permission\r\n gCsDbgFile.init(logFile, -1, -1, 0);\r\n cookieswap_dbg(\"[cookieswap]: Inited\" );\r\n }\r\n else\r\n {\r\n //No filename specified\r\n \r\n //If a file is open, close it\r\n if (gCsDbgFile != null)\r\n {\r\n gCsDbgFile.close();\r\n }\r\n gCsDbgFile = null;\r\n }\r\n break;\r\n }\r\n\r\n cookieswap_dbg(\"AFTER gCsDbgEnabled=\" + gCsDbgEnabled + \r\n \" gCsDbgErrConsole=\" + gCsDbgErrConsole +\r\n \" gCsDbgOsConsole=\" + gCsDbgOsConsole +\r\n \" gCsDbgFile=\" + gCsDbgFile);\r\n\r\n}", "title": "" }, { "docid": "bef96c5053be1b48d39e32945a4aba03", "score": "0.48996127", "text": "function saveData(step) {\n $.each($(\"form input:not([type=submit]), form select\"), function(index, value) {\n that = $(value);\n if(that.attr(\"type\") == \"checkbox\") {\n $.cookie(\"signup_step_\" + step + \"__\" + that.attr(\"name\"), that.is(\":checked\"), {\"path\": \"/\"});\n } else {\n $.cookie(\"signup_step_\" + step + \"__\" + that.attr(\"name\"), that.val(), {\"path\": \"/\"});\n }\n });\n}", "title": "" }, { "docid": "8bf4b417f6a904c43d669ac4c2153dce", "score": "0.48983213", "text": "function SH_nicknameForm(charID, sheetID) {\n\tlet postdata = {\n\t\t\"char\": charID,\n\t\t\"sheet\": sheetID\n\t};\n\n\t$.ajax({\n\t\ttype: 'POST',\n\t\turl: '/eoschargen/handler/index.php',\n\t\tdata: { nickNameForm: postdata }\n\t})\n\t\t.done(function (data) {\n\t\t\tSH_animateFormDiv(data); /* show the response */\n\t\t})\n\t\t.fail(function () {\n\t\t\tSH_animateFormDiv(\"<h4><i class=\\\"fas fa-warning\\\"></i>&nbsp;Posting failed. [err 702]</h4>\"); /* just in case posting your form failed */\n\t\t});\n\n\t/* prevent a refresh by returning false in the end. */\n\treturn false;\n}", "title": "" }, { "docid": "47f020cde2f84cada4beec4c9a2eaa06", "score": "0.48890942", "text": "function setCookie(c_name,value, expiredays, hour)\n{\n\tvar exdate=new Date();\n\texdate.setDate(exdate.getDate()+expiredays);\n\texdate.setHours(exdate.getHours() + hour);\n\tdocument.cookie=c_name+ \"=\" +escape(value)+((expiredays==null) ? \"\" : \";path=/;expires=\"+exdate.toGMTString());\n\tvar num=document.cookie.indexOf(\"usernameUpStage\" + \"=\");\n\t\n}", "title": "" }, { "docid": "d49b3f061f53504e5aa525b9a747681e", "score": "0.4888942", "text": "handleSubmit() {\n\n //write a post call that uses the user_api.py\n this.setState({\n name: document.getElementById(\"user_name\").value,\n uniqname: document.getElementById(\"user_uniqname\").value,\n grad_year: document.getElementById(\"user_grad\").value,\n majors: document.getElementById(\"user_majors\").value,\n minors: document.getElementById(\"user_minors\").value,\n pledge_class: document.getElementById(\"user_pledge\").value,\n })\n // make post request ----- NOT CHECKED vvvvv\n alert('fetching from: ' + window.location.origin + '/api/user/scores');\n fetch(window.location.origin + '/api/user/scores', {\n   credentials: 'include',\n   method: 'post',\n   body: JSON.stringify({\n n : this.state.name,\n u : this.state.uniqname,\n g : this.state.grad_year,\n ma : this.state.majors,\n mi : this.state.minors,\n p : this.state.pledge_class,\n   }),\n }).then(res => res.json())\n .then(response => console.log('Success:', JSON.stringify(response)))\n .catch(function (error) {\n console.log('Request failed', error);\n });\n }", "title": "" }, { "docid": "2ac3eaefafd17c5647f870e82d9719c1", "score": "0.48867598", "text": "function setPostEvent() {\n\n var eventMethod = window.addEventListener ? \"addEventListener\" : \"attachEvent\",\n eventer = window[eventMethod],\n messageEvent = eventMethod == \"attachEvent\" ? \"onmessage\" : \"message\";\n\n eventer(messageEvent, function (e) {\n\n var logout, login, ui_url;\n\n ui_url = mobbr.getUiUrl();\n source = e.source;\n\n if(ui_url.substr(-1) == '/') {\n ui_url = ui_url.substr(0, ui_url.length - 1);\n }\n\n if (e.origin === ui_url) {\n\n // If we don't get a logout message and our data is not the same\n // we set a new cookie with the userdata cookie value\n // if the user is logged in and we get a logout message we remove the cookie by setting days to -1\n\n logout = e.data === 'logout' && (cookie && cookie !== 'deleted');\n login = e.data !== 'logout' && e.data !== cookie;\n\n if (login || logout) {\n cookie = createCookie('mobbr-auth', login && e.data || 'deleted', logout && -1 || undefined);\n setTimeout(function () { window.location.reload(true); }, 500);\n }\n }\n\n }, false);\n }", "title": "" }, { "docid": "c0b2a5fefb0d591fbb16e67e72ffca19", "score": "0.48835552", "text": "function SaveData () {\r\n\t// Convinience\r\n\tvar toSavedData = [\"0.04\",time,money,food,pop,territory,militiamen,swordmen,archers,barrack,farms,well,house,barn,outpost];\r\n\t\r\n\tset_cookie(\"save\",toSavedData);\r\n\tTextboxSave(\"ftpTextbox\",toSavedData);\r\n\t\r\n\tpushMessage(\"Saved!\");\r\n\t\r\n}", "title": "" }, { "docid": "71b059e70caff3fa6f1c209c0d7a7d7d", "score": "0.48769307", "text": "function saveUserInfo(webSocket, username, sessionId) {\n let user = findUser(webSocket);\n currentlySavedUserId = parseInt(user.userId); // Convert to int for later comparison\n if (username === undefined) {\n // if username was parsed it is because the user changed name from User_n\n currentlySavedusername = user.name;\n } else currentlySavedusername = username;\n if (sessionId === undefined) {\n currentlySavedSessionId = user.sessionId;\n } else currentlySavedSessionId = sessionId;\n webSocket.send([\"infoWasSaved\"].toString());\n}", "title": "" }, { "docid": "380792cc01fe62d40845e1ffbf6cbb2d", "score": "0.48732242", "text": "function loginSubmit(event){\r\n event.preventDefault();\r\n loginForm.classList.add(\"hidden\");\r\n const ID = loginId.value;\r\n const PASSWORD = loginPassword.value;\r\n localStorage.setItem(\"ID\",ID);\r\n localStorage.setItem(\"password\",PASSWORD);\r\n paintGreetings(ID);\r\n\r\n\r\n \r\n}", "title": "" }, { "docid": "6bce3c5b636568967c943769709f794c", "score": "0.4871441", "text": "function add_name (selector_input, selector_button, type_name){\n const name = document.querySelector(selector_input).value;\n const request = new XMLHttpRequest();\n request.open('POST', `/has/${type_name}`);\n request.onload = () => {\n const resp = JSON.parse(request.responseText);\n if (resp.name) {\n document.querySelector('.alert').removeAttribute('hidden');\n document.querySelector('#error').innerHTML = \"This name is busy!\";\n }\n else {\n socket.emit('join', {'type_name': type_name, 'name': name});\n document.querySelector('.alert').removeAttribute('hidden');\n document.querySelector('#error').innerHTML = \"Success!\";\n if (type_name === 'users'){\n localStorage.setItem('username', name);\n update_username();\n }\n }\n };\n const names = new FormData();\n names.append('name', name);\n request.send(names);\n document.querySelector(selector_input).value = '';\n document.querySelector(selector_button).disabled = true;\n }", "title": "" }, { "docid": "b67f1a351438be274c796507d48afbe8", "score": "0.4870299", "text": "function createTheme(){\r\n\tvar newTheme = {\r\n\t\tback1: document.getElementById('colorBack1').value, \r\n\t\tback2: document.getElementById('colorBack2').value, \r\n\t\ttext1: document.getElementById('colorText1').value, \r\n\t\ttext2: document.getElementById('colorText2').value, \r\n\t\ticon:document.getElementById('colorIcon').value, \r\n\t\tanchor: document.getElementById('colorLink').value,\r\n\t\tname: document.getElementById('themeName').value\r\n\t};\r\n\r\n\tCookies.set('createdTheme', [newTheme.back1, newTheme.back2, newTheme.text1, newTheme.text2, newTheme.icon, newTheme.anchor, newTheme.name]);\r\n\tconsole.log(Cookies.get('createdTheme').split(\",\"));\r\n\tconsole.log(newTheme);\r\n\r\n}", "title": "" }, { "docid": "536ca4d38af41f6e9fb4189995433f4b", "score": "0.48680297", "text": "function createCookie(name,value,opt_days,opt_domain) {\n\t// FF can import weird, broken cookies from IE which will then appear as duplicate cookies.\n\t// To work around this problem, we explicitly erase cookies. Our erase function removes\n\t// any random IE cookies that might be lurking around.\n\teraseCookie(name);\n\tcreateCookie_(name,value,opt_days,opt_domain);\n}", "title": "" }, { "docid": "a46536d9211517293024116db6054dca", "score": "0.48667365", "text": "function cookieCreated() {\n screenad.executeScript('WeboGetCookie();', getCookie);\n}", "title": "" }, { "docid": "9797cff47f63e9df73100bc7d95c0461", "score": "0.48667043", "text": "function getUserName2(sess){\r\n $.post(\"php/session.php\",{\r\n method: \"retrieve\",\r\n session: sess,\r\n user: null\r\n })\r\n .done(function(data){\r\n\t // On completeion, kicks off php to get quickstats and inventory overview of userID\r\n\t quickstats(data);\r\n\t landing(data);\r\n\t return data;\r\n });\r\n}", "title": "" }, { "docid": "e2d391062a2614527f8584947987cbe6", "score": "0.48651424", "text": "save_name(name) {\n // Save name to localStorage\n localStorage.setItem(\"name\", name);\n }", "title": "" }, { "docid": "73567aac02c0bf043e9bafba2619b63a", "score": "0.48610714", "text": "function createCookie(name, value) {\n\tif (\"localStorage\" in window && window[\"localStorage\"] != null) {\n\t\t//\tLocal storage supported\n\t\tlocalStorage.setItem(name, value);\n\t}\n\telse {\n\t\tvar date = new Date();\n\t\tdate.setTime(date.getTime() + (360 * 24 * 60 * 60 * 1000));\n\t\tvar expires = \"; expires=\" + date.toGMTString();\n\t\tdocument.cookie = name + \"=\" + value + expires + \"; path=/\";\n\t}\n}", "title": "" }, { "docid": "4454bb611d15538dc46db2522928ab7e", "score": "0.48554716", "text": "function setUser(user){ //Sets the cookies for user\n\tsetCookie(\"user.type\", user.type, 1);\n\tsetCookie(\"user.name\", user.name, 1);\n\tsetCookie(\"user.password\", user.password, 1);\n\tsetCookie(\"user.status\", user.status, 1);\n}", "title": "" }, { "docid": "932769ccf94d46312d4f27be91adfe42", "score": "0.4850726", "text": "function setCookie(){\n console.log(favListID);\n document.cookie = `name=${JSON.stringify(favListID)};expires= Thu, 30 June 2021 02:40:00 UTC; path=/`;\n }", "title": "" }, { "docid": "40e58c2749b76962d25ed529308bca7f", "score": "0.48501533", "text": "function saveTextState()\n{\n var el=document.getElementById('backlog');\n\tcookieSave('backlog',el.value);\n}", "title": "" }, { "docid": "b2b95d84f31e578de04a041baa509aad", "score": "0.48489523", "text": "function saveCookie()\n{\n\tvar minutes = 20;\n\tvar date = new Date();\n\tdate.setTime(date.getTime()+(minutes*60*1000));\n\tdocument.cookie = \"firstName=\" + firstName + \",lastName=\" + lastName + \",userId=\" + userId + \";expires=\" + date.toGMTString();\n}", "title": "" }, { "docid": "c233551cc22839a48fad23534eebd0d4", "score": "0.48374933", "text": "function sendUsername() {\n var username = document.getElementById(\"usernameInput\");\n if(hasValue(username)) {\n localStorage.setItem(\"usernameLS\", username.value);\n localStorage.setItem(\"scoreLS\", eindscore);\n goToHighScore();\n } else {\n alert(\"You need a username to submit, try again!\")\n }\n}", "title": "" }, { "docid": "2c30dd676e8f44100d0f65b382b4f449", "score": "0.4835807", "text": "function setUsername(username) {\r\n\t//set username on the backend\r\n\t$.post( \"/setusername/\" + getCookie(\"guid\") + \"/\" + username + \"/\", function( data ) {\r\n\t\t\t$(\".chat\").css(\"display\", \"block\");\r\n\t\t\t$(\"#start\").css(\"display\", \"none\");\r\n\t});\r\n}", "title": "" }, { "docid": "a8ec5d1aefa7c603fc350f6a4c6fc5f2", "score": "0.4830807", "text": "function logout(){\n document.cookie = \"ID= ; expires = Thu, 01 Jan 1970 00:00:00 GMT\"\n document.cookie = \"wall= ; expires = Thu, 01 Jan 1970 00:00:00 GMT\"\n document.cookie = \"name= ; expires = Thu, 01 Jan 1970 00:00:00 GMT\"\n}", "title": "" }, { "docid": "80e5f18089779186592eb02e3388b511", "score": "0.48295033", "text": "function createPersona(selected) {\n persona = $(selected).attr('id');\n cookie_data = document.cookie;\n cookie_data = cookie_data.replace(\";path='/'\", \"\")\n document.cookie = cookie_data + \"|\" + persona + \"|1;path='/'\";\n $('iframe#game').contents().find('div#profiles').removeClass('slideup');\n setTimeout(function () {\n level = 1;\n loadLevel(1);\n }, 1000);\n}", "title": "" } ]
0d3c65cb93e156893d2805543e73aff2
render a button for the toggle
[ { "docid": "c88b2eaa88142810b86563aa19692c52", "score": "0.0", "text": "render() {\n return (\n <button onClick={this.props.triggerStop}>\n Stop\n </button>\n );\n }", "title": "" } ]
[ { "docid": "b735e79adbfc46825a94dc08da3ee4d1", "score": "0.7399494", "text": "toggleButton(){\n if (this.state.showText === true ) return (<div></div>)\n else\n return(<div><Button variant=\"outline-secondary\" onClick={this.handleToggleButton}>About this app</Button></div>)\n }", "title": "" }, { "docid": "d3f2854bc89387957a6c43fe5cf410e3", "score": "0.70267963", "text": "function ToggleButton(props){\n return (\n <button key={\"btn-\" + props.text} className={\"DataVis-title-buttonbar-button\" + (props.isToggled ? (\" DataVis-title-buttonbar-button--toggle\") : (\"\"))} onClick={props.toggle}>\n {props.text}\n </button>\n );\n}", "title": "" }, { "docid": "68fb1f84ddf22ddd5122dfd561e73ed7", "score": "0.6983162", "text": "_MakeToggleButton() {\n // Make the menu collapse button\n this.menuButton = this.container.appendChild(document.createElement('button'));\n this.menuButton.className = this.styles['guify-panel-toggle-button'];\n css(this.menuButton, {\n left: this.opts.align == 'left' ? '0px' : 'unset',\n right: this.opts.align == 'left' ? 'unset' : '0px',\n });\n\n this.menuButton.onclick = () => {\n this.ToggleVisible();\n }\n\n // Defocus on mouse up (for non-accessibility users)\n this.menuButton.addEventListener('mouseup', () => {\n this.menuButton.blur();\n });\n\n this.menuButton.innerHTML = `\n <svg width=\"100%\" height=\"100%\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"10%\" y=\"10%\" width=\"80%\" height=\"80%\"/>\n </svg>\n `;\n }", "title": "" }, { "docid": "fcd403ef98cb33bdbe7daf54308b198e", "score": "0.6838828", "text": "renderButton () {\n if (this.props.toggle === true) {\n return <Button onPress={this.onButtonPress.bind(this)} title='Save' />\n }\n }", "title": "" }, { "docid": "c0ff52d31205676ee8aec50a44a4e2cf", "score": "0.6671978", "text": "function generateSideToggleButton(callback = null){\n const sideButton = document.createElement(\"button\")\n sideButton.setAttribute(\"class\", \"side-button\")\n sideButton.setAttribute(\"id\", \"sideButton\")\n sideButton.innerHTML = \"*\" + \"</br>\" + \"*\" + \"</br>\" + \"*\"\n if(!document.body.contains(document.getElementById(\"sideButton\"))){\n document.body.appendChild(sideButton)\n }\n sideButton.onclick = () =>{\n toggleBar(callback)\n }\n}", "title": "" }, { "docid": "ba825896f9efcd72dbed838e901361dc", "score": "0.6589683", "text": "function init_toggleButton(id, ontext, offtext, isOn) {\n var toggleButton = document.getElementById(id);\n toggleButton.innerHTML = \"\";\n if (isOn) {\n toggleButton.appendChild(document.createTextNode(ontext));\n toggleButton.classList.add(\"active\");\n } else {\n toggleButton.appendChild(document.createTextNode(offtext));\n toggleButton.classList.remove(\"active\");\n }\n $(toggleButton).state({\n text: {\n inactive: offtext,\n active : ontext\n }\n });\n}", "title": "" }, { "docid": "52ba80eacfa691a5036dac5607dcfa24", "score": "0.6556613", "text": "function updateButton(){\n const icon=this.paused ? '>' : '||';\n toggle.textContent=icon;\n}", "title": "" }, { "docid": "b706e0903ead246ce6d59274b16be44e", "score": "0.6528218", "text": "onClick(evt) {\n this.toggle();\n }", "title": "" }, { "docid": "60449e7b4c45797cdfef151c417ceae5", "score": "0.65077084", "text": "function renderJoinFanClub() {\n hideChat();\n $joinChatPH.html('');\n let btn = \"<button id='\" + chosenShowID + \"' class='button' onclick='JoinFanClub()'>Join \" + chosenShowName + \" Fan Club</button> \";\n $joinChatPH.append(btn);\n}", "title": "" }, { "docid": "5a1c7f60dfa887d169360a965934f33b", "score": "0.6469242", "text": "function render_swing_btns(data, clicked_btn, hasClass){\n\n $(\"#swing_buttons\")\n .html(_.templateFromURL('swing-snippets.html','#swing_buttons_template')({\n data: data, clicked_btn: hasClass? '' : clicked_btn, parties: parties\n }));\n\n }", "title": "" }, { "docid": "c7709c547d062d3d3c0fbe91f5f8d9c8", "score": "0.6457634", "text": "toggle() {\n\n\t}", "title": "" }, { "docid": "8c49c953b3efea82eff0e181c8080539", "score": "0.644891", "text": "function updateButton() {\n let icon = this.paused ? \"►\" : \"II\";\n toggle.textContent = icon;\n}", "title": "" }, { "docid": "29ee37eae03baf36195ca93821760364", "score": "0.6425747", "text": "toggle (button) {\n if (button.value ===\"+\") { // If we're expanding\n button.value = \"__\";\n\n // Show all the button's siblings\n let sibling = button.nextElementSibling;\n while (sibling) {\n sibling.hidden = false;\n sibling = sibling.nextElementSibling;\n }\n this.relCell.hidden = false;\n }\n\n else { // we're collapsing\n button.value = \"+\";\n\n // Hide all the button's siblings\n let sibling = button.nextElementSibling;\n while (sibling) {\n sibling.hidden = true;\n sibling = sibling.nextElementSibling;\n }\n this.relCell.hidden = true;\n }\n\n // log\n const obj = {};\n obj.id = app.domFunctions.widgetGetId(button);\n obj.idr = button.getAttribute(\"idr\");\n obj.action = \"click\";\n app.regression.log(JSON.stringify(obj));\n app.regression.record(obj);\n }", "title": "" }, { "docid": "6ba1d714bf88091e77f78f90680df1fb", "score": "0.64152366", "text": "_toggleBtn(){\n let txt= this._nextOption();\n\n /** The item only changes value and emits a signal if next value is valid */\n if(txt!==null){\n this._btnLabel.set_text(txt);\n\n this.emit('toggled-option', txt);\n }\n }", "title": "" }, { "docid": "74de57d5977aa6ede0103ba0d597579d", "score": "0.6406322", "text": "function buttonToggle(state)\n{\n\t//clear any existing selection and its outline\n\tif(selected != null)\n\t{\n\t\tselected.style.outline = 'none';\n\t\tselected = null;\n\t}\n\t\n\t//toggle button state class and value\n\tif(state == 'on')\n\t{\n\t\tbutton.className = 'on';\n\t\tbutton.innerHTML = 'Inspect <em>= ON</em>';\n\t}\n\telse\n\t{\n\t\tbutton.className = 'off';\n\t\tbutton.innerHTML = 'Inspect <em>= OFF</em>';\n\t}\n}", "title": "" }, { "docid": "aa6e31e7b39b92a87d29876d4e5f6517", "score": "0.63894576", "text": "function updateButton() {\n toggle.innerHTML = this.paused ? \"►\" : \"❚❚\";\n}", "title": "" }, { "docid": "a81915c69c1bbf6917d03ffa65f35fa8", "score": "0.6379974", "text": "render() {\n\t\treturn (\n\t\t\t<button type=\"button\" className=\"btn btn-extended\">Remove</button>\n\t\t);\n\t}", "title": "" }, { "docid": "98f9cebd6cea447a40a84f073b302507", "score": "0.6373332", "text": "function renderButton() {\n // Deleting the Aquatic buttons prior to adding new Aquatic buttons(this is necessary otherwise we will have repeat buttons)\n $(\"#aquatic-view\").empty();\n //looping through the array of Aquatic Animals\n for (var i = 0; i < topics.length; i++) {\n // Then dynamicaly generating buttons for each movie in the array.\n // This code $(\"<button>\") is all jQuery needs to create the start and end tag. (<button></button>)\n var a = $(\"<button>\");\n //adding a class\n a.addClass(topics);\n // Adding a data-attribute with a value of the topic at index i\n a.attr(\"data-name\", topics[i]);\n a.attr(\"class\", \"btn btn-info\");\n // Providing the button's text with a value of the topic at index i\n a.text(topics[i]);\n // Adding the button to the HTML\n $(\"#aquatic-view\").append(a);\n }\n }", "title": "" }, { "docid": "bffbe226cd02ed864d50ad349254a632", "score": "0.635063", "text": "function toggleButton() {\n isRunning = !(isRunning);\n if (isRunning) {\n startBtn.html(\"Pause\");\n } else {\n startBtn.html(\"Go!\");\n }\n }", "title": "" }, { "docid": "1678c53542d685fbd05ce391e16a84ab", "score": "0.63414764", "text": "render() {\n const {\n value\n } = this.props;\n return _react.default.createElement(\"div\", null, _react.default.createElement(_ButtonIcon.default, {\n icon: \"arrow-right\",\n size: \"sm\",\n onClick: this.toggleSubRow\n }), value);\n }", "title": "" }, { "docid": "1032669c9f4046daddc08debde801466", "score": "0.6323287", "text": "function showGetEnvolvedBtn() {\n btnState = true;\n console.log(\"showing button\");\n toggleEnvolvedBtn();\n }", "title": "" }, { "docid": "75ad76ff78403c981b01dde5ac2a27ef", "score": "0.6302823", "text": "function createSwitchButton(book) {\n const switchToggle = doc.createElement(\"div\");\n switchToggle.innerHTML = `\n <label class=\"switch\">\n <input type=\"checkbox\" ${book != null ? (book.read ? \"checked\" : \"\") : \"\"}>\n <span class=\"slider round\"></span>\n </label>`;\n return switchToggle;\n}", "title": "" }, { "docid": "b9c770e1479109355d2d337b7b74e517", "score": "0.6271305", "text": "renderAction() {\n let plusMinus = this.props.isRemoval === true ? '-' : '+'\n if(plusMinus === '+') {\n return <button className=\"Track-action\" onClick={this.addTrack}>{plusMinus}</button>;\n }\n else {\n return <button className=\"Track-action\" onClick={this.removeTrack}>{plusMinus}</button>;\n }\n }", "title": "" }, { "docid": "cbd0b38e65e660bade20d00c3e577b8a", "score": "0.6268475", "text": "renderif(bool, button, otherbutton) {\n if (bool) {\n return button //'accept' and 'reject' \n }\n else {\n return otherbutton // \"ok\"\n }\n }", "title": "" }, { "docid": "494462f350053ed965efeadde63909a1", "score": "0.6264452", "text": "function updateButton() {\n toggle.textContent = this.paused ? '►' : '❚ ❚';\n}", "title": "" }, { "docid": "19abf5dabdd8c9fe72c5994c797d905c", "score": "0.62633723", "text": "function makeButton(settingsName, onText, offText) {\n let buttonClass = \"option\" + (settings[settingsName] ? \"\" : \" off\");\n let buttonId = 'CYOLbutton' + settingsName;\n let onclick = \"CYOL.UI.toggleSettings('\" + buttonId + \"', '\" +\n settingsName + \"', '\" + onText + \"', '\" + offText + \"');\" +\n 'PlaySound(\\'snd/tick.mp3\\');';\n return '<a class=\"' + buttonClass + '\"' +\n ' id=\"' + buttonId + '\"' +\n ' onclick=\"' + onclick + '\">' +\n (settings[settingsName] ? onText : offText) +\n '</a>';\n }", "title": "" }, { "docid": "ffef443d1322f88c2937de6f3394248c", "score": "0.6226323", "text": "getTemplateHtml() {\n return `<div class=\"like\">\n <button class=\"like-toggle active\">❤<span class=\"numberLikes\"></span></button>\n </div>`;\n }", "title": "" }, { "docid": "849f6364519e3615a92561349c0ed185", "score": "0.6200632", "text": "function button_handler(button, ids){\n $(\"#\" + ids + \" p\").toggle();\n if($(button).html() == \"Open\"){\n $(button).empty().append(\"Close\");\n }else{\n $(button).empty().append(\"Open\");\n }\n}", "title": "" }, { "docid": "92740b5613fc6d5a6589f1bf27804faf", "score": "0.6199698", "text": "toggle(e) {\n if (e) e.preventDefault();\n const self = e ? this[buttonComponent] : this;\n const { element } = self;\n\n if (hasClass(element, 'disabled')) return;\n\n self.isActive = hasClass(element, activeClass);\n const { isActive } = self;\n\n const action = isActive ? removeClass : addClass;\n const ariaValue = isActive ? 'false' : 'true';\n\n action(element, activeClass);\n element.setAttribute(ariaPressed, ariaValue);\n }", "title": "" }, { "docid": "17acb05f823d644653d2ec9d839a7256", "score": "0.6188519", "text": "function viewToggleButton(){\n\t\t if($('#'+uniqueId+' .monthly-event-list').is(\":visible\")) {\n\t\t \t$('#'+uniqueId+' .monthly-cal').remove();\n\t\t \t$('#'+uniqueId+' .monthly-header-title').prepend('<a href=\"#\" class=\"monthly-cal\" title=\"Volver a la vista mensual\"><div></div></a>');\n\t\t }\n\t\t}", "title": "" }, { "docid": "b55cf26892f276fa108b066e507dff18", "score": "0.61863863", "text": "toggle()\n {\n this.shown = !this.shown;\n let type = (this.shown) ? 'text' : 'password';\n this.toggleBtn.innerHTML = (this.shown) ? eye_open : eye_close;\n this.inputs.forEach(el => {\n el.setAttribute('type', type);\n });\n }", "title": "" }, { "docid": "c6fc98cb5c148f0658bae112ad4ec5eb", "score": "0.61862427", "text": "function renderButtons() {\n // (this is necessary otherwise you will have repeat buttons)\n $(\"#gifButtonDisplay\").empty();\n // Looping through the array of topics\n for (var i = 0; i < topics.length; i++) {\n var a = $(\"<button class='btn btn-primary' id = 'show'>\");\n // Adding a data-attribute\n a.attr(\"data-name\", topics[i]);\n // Providing the initial button text\n a.text(topics[i]);\n // Adding the button to the buttons-view div\n $(\"#gifButtonDisplay\").append(a);\n }\n }", "title": "" }, { "docid": "87c1a935b74a469e23ccc2d9e2194d89", "score": "0.6175508", "text": "function setupToggleButtons() {\n // your code here\n}", "title": "" }, { "docid": "cdceb70d227311b610e3bb12de36bae0", "score": "0.61600983", "text": "function toggleButton(idx) {\n\n return function() {\n\n // make sure user enabled the mic\n if (buttonState[idx] === 0 && micOn) {\n // record to our p5.SoundFile\n recorder.record(soundFile[idx]);\n\n buttons[idx].html('Stop recording'); \n buttons[idx].style('background-color','#ff0000');\n buttonState[idx] = 1;\n }\n else if (buttonState[idx] === 1) {\n\n // stop recorder and\n // send result to soundFile\n recorder.stop();\n\n buttons[idx].html('Play sound '+idx);\n buttons[idx].style('background-color','#00cc00');\n buttonState[idx] = 2;\n }\n else if (buttonState[idx] === 2) {\n mic.stop();\n micOn = false;\n micButton.style('background-color','#888888');\n\n fft.setInput(soundFile[idx]);\n soundFile[idx].play(); // play the result! \n }\n }\n}", "title": "" }, { "docid": "910faedc7b344a52fa95788936e78489", "score": "0.6151438", "text": "onToggleExample() {\n this.setState({toggle: !this.state.toggle});\n }", "title": "" }, { "docid": "bf2c91d0dcebe0cb24b6f2bec6cda5e0", "score": "0.61352605", "text": "function viewToggleButton() {\n\t\t\tif($(parent + \" .monthly-event-list\").is(\":visible\")) {\n\t\t\t\t$(parent + \" .monthly-cal\").remove();\n\t\t\t\t$(parent + \" .monthly-header-title\").prepend('<a href=\"#\" class=\"monthly-cal\"></a>');\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "7a07f1a3d83198b214df896b9ee8088a", "score": "0.61341536", "text": "render() {\n if (this.state.visibility) {\n return (\n <div>\n <button onClick={this.toggleVisibility}>Click Me</button>\n <h1>Now you see me!</h1>\n </div>\n );\n } else {\n return (\n <div>\n <button onClick={this.toggleVisibility}>Click Me</button>\n </div>\n );\n }\n }", "title": "" }, { "docid": "7a07f1a3d83198b214df896b9ee8088a", "score": "0.61341536", "text": "render() {\n if (this.state.visibility) {\n return (\n <div>\n <button onClick={this.toggleVisibility}>Click Me</button>\n <h1>Now you see me!</h1>\n </div>\n );\n } else {\n return (\n <div>\n <button onClick={this.toggleVisibility}>Click Me</button>\n </div>\n );\n }\n }", "title": "" }, { "docid": "400729bbf6f5feba47f367d1ce5e80b3", "score": "0.6127405", "text": "function add_switch_button(){\n\t\tvar left_btn_css={\n\t\t display:'block',\n\t\t 'text-decoration':'none',\n\t\t background:'#099',\n\t\t position:'absolute',\n\t\t 'z-index':200,\n\t\t color:'#FFF',\n\t\t left:0,\n\t\t\ttop:'40%'\n\t\t}\n\t\t\n\t\tvar right_btn_css={\n\t\t display:'block',\n\t\t 'text-decoration':'none',\n\t\t background:'#09F',\n\t\t position:'absolute',\n\t\t 'z-index':500,\n\t\t color:'#FFF',\n\t\t top:'40%',\n\t\t right:0\n\t\t}\n\t\t\n\t\t \n\t\t\n\t\tvar dom = $('.outMain');\n\t\t\n\t\t$('<a></a>',\n\t\t\t{ \n\t\t\t \tid:'left_btn',\n\t\t\t\thref:\"#\",\n\t\t\t\tcss:left_btn_css\n\t\t\t}\n\t\t )\n\t\t.appendTo(dom);\n\t\t\n\t\t$('<a></a>',\n\t\t\t{ \n\t\t\t \tid:'right_btn',\n\t\t\t\thref:\"#\",\n\t\t\t\tcss:right_btn_css,\n\t\t\t}\n\t\t )\n\t\t .appendTo(dom);\n\n\t\t $('#left_btn').html('&larr; prev');\n\t\t $('#right_btn').html('next &rarr;');\n\t\t \n\t\t //default\n\t\t $('#left_btn').hide();\n\t\t $('#right_btn').show();\n\t}", "title": "" }, { "docid": "9574114e31f69d54a8720f86135f146e", "score": "0.61202013", "text": "function renderButtons() {\n\n // Delete the content inside the topics-view div prior to adding new topics\n // (this is necessary otherwise you will have repeat buttons)\n $('#topics-view').empty();\n // Loop through the array of topics, then generate buttons for each topic in the array\n for (var i=0;i<topics.length; i++){\n var a= $(\"<button>\");\n a.addClass(\"topic\");\n a.attr(\"data-name\", topics[i]);\n \n // console.log(a.attr(\"data-state\"));\n a.text(topics[i]);\n $(\"#topics-view\").append(a);\n \n }\n\n }", "title": "" }, { "docid": "4ee20d082c4a8a77a71e8d301335dd1f", "score": "0.6115939", "text": "render() {\n return (h(\"button\", { class: \"my-btn\", onClick: () => this.testBtnClick() }, this.name));\n }", "title": "" }, { "docid": "c69d99c1b90bde023344f3752e586678", "score": "0.6113424", "text": "renderBtn (name, id) {\n const li = document.createElement('li')\n li.classList.add('btn--project')\n li.setAttribute('data-project', `project-${id}`)\n\n const button = document.createElement('button')\n button.classList.add('btn', 'btn--filter')\n button.setAttribute('type', 'button')\n button.setAttribute('data-filter', `project-${id}`)\n button.innerHTML = name\n\n const closeBtn = document.createElement('button')\n closeBtn.classList.add('btn--delete')\n closeBtn.setAttribute('type', 'button')\n closeBtn.innerHTML = '<i class=\"fas fa-times\"></i>'\n\n li.append(button, closeBtn)\n document.querySelector('.projects').append(li)\n }", "title": "" }, { "docid": "bb063f2627d88088bc9cda4be7cb144d", "score": "0.6104216", "text": "function renderPanelPaymentBtn() {\n const htmlStr = `\n <button class=\"btn btn-primary\" onclick=\"onOrderBtn()\">הזמן</button>\n `;\n $('.PanelPaymentBtn').html(htmlStr);\n}", "title": "" }, { "docid": "ca484185e0785f24848c2f157159dede", "score": "0.6103015", "text": "constructor(props) {\n super(props);\n this.state = {showText: false}\n this.handleToggleButton = this.handleToggleButton.bind(this);\n\n \n }", "title": "" }, { "docid": "e09f8199e712dc1ca54f33ae954c6530", "score": "0.6102065", "text": "function createShowListButton (){\n if($(\"#show-list-toggle\").length === 0){\n var showListButton = \"<a id='show-list-toggle' class='btn btn-info center-block' onclick='toggleList()'>Show List</a>\";\n $(\"#locationDetails\").prepend(showListButton);\n }else{\n $(\"#show-list-toggle\").text(\"Show List\");\n }\n}", "title": "" }, { "docid": "a14de39022b6c491324005ff8ab26fd7", "score": "0.60979575", "text": "getFilterButtonContent() {\n if(this.state.active){\n return (\n <div>\n &lt; Hide Filters\n </div>\n );\n } else {\n return (\n <div>\n Show Filters &gt;\n </div>\n );\n }\n\n }", "title": "" }, { "docid": "4d6b7ad431e2cae24fd14fbcb3a3c11b", "score": "0.609586", "text": "render() {\n if (this.state.visibility) {\n return (\n <div>\n <button onClick={this.toggleVisibility}>Click Me</button>\n <h1>Now you see me!</h1>\n </div>\n );\n } else {\n return (\n <div>\n <button onClick={this.toggleVisibility}>Click Me</button>\n </div>\n );\n }\n }", "title": "" }, { "docid": "4d6b7ad431e2cae24fd14fbcb3a3c11b", "score": "0.609586", "text": "render() {\n if (this.state.visibility) {\n return (\n <div>\n <button onClick={this.toggleVisibility}>Click Me</button>\n <h1>Now you see me!</h1>\n </div>\n );\n } else {\n return (\n <div>\n <button onClick={this.toggleVisibility}>Click Me</button>\n </div>\n );\n }\n }", "title": "" }, { "docid": "94ffa06494506998a88f450f2c3cdbf2", "score": "0.6091678", "text": "function renderButtons() {\n\n // Clear the list of shows prior to adding new shows.\n $(\"#show-buttons\").empty();\n\n for (i = 0; i < topics.length; i++) {\n var a = $(\"<button>\");\n a.addClass(\"btn btn-secondary btn-sm\");\n a.addClass(\"show-button\");\n a.css(\"margin-right\", \"10px\");\n a.attr(\"data\", topics[i]);\n a.text(topics[i]);\n $(\"#show-buttons\").append(a);\n };\n }", "title": "" }, { "docid": "d3abd0c94977a296c9a157361b22534f", "score": "0.60909605", "text": "function updateButton() {\n video.paused ? (toggle.innerHTML = \"►\") : (toggle.innerHTML = \"❚❚\");\n}", "title": "" }, { "docid": "c069e60976d7b801be20ddf06602aed7", "score": "0.6071843", "text": "toggle() {\n if (this.props.toggle && this.isActive()) {\n this.unactivate();\n } else {\n // activate the element\n this.activate();\n }\n }", "title": "" }, { "docid": "afe6b541a99f499b65fdf4884072c7b8", "score": "0.6064872", "text": "build() {\n this.$node.html(`<div id=\"nav-bar\">\n <div class=\"btn-group change\" role=\"group\" aria-label=\"Toggle visibility of changes by type\">\n </div>\n </div>`);\n const $buttons = this.$node.select('.btn-group.change')\n .selectAll('button').data(ChangeTypes.TYPE_ARRAY);\n $buttons.enter().append('button')\n .attr('type', 'button')\n .attr('class', (d) => (d.isActive) ? 'btn btn-default active' : 'btn btn-default inactive')\n .attr('id', (d) => `btn-${d.type}`)\n .text((d) => d.label);\n }", "title": "" }, { "docid": "1c4903d556b7f293429070cc56882c5e", "score": "0.60636127", "text": "toggleNewIssue() {\n this.createNewIssueBtn.innerHTML = ''\n this.createNewIssue = !this.createNewIssue\n if (this.createNewIssue) {\n this.createNewIssueBtn.innerHTML = `<i class=\"fas fa-minus\"></i> Hide Form`\n this.newIssueForm.style.display = 'block'\n } else {\n this.createNewIssueBtn.innerHTML = `<i class=\"fas fa-plus\"></i> Create New Issue`\n this.newIssueForm.style.display = 'none'\n }\n }", "title": "" }, { "docid": "a79c9eb2975b4ffe9c9b88a3a16f396d", "score": "0.60580635", "text": "function renderBtns(){\n\t\t\t\t// console.log(\"rendering buttons\");\n\t\t\t\t$(\"#animalBtns\").empty();\n\t\t\t\tfor (var i=0; i<topics.length; i++){\n\t\t\t\t\tnewBtn = $(\"<button>\");\n\t\t\t\t\tnewBtn.text(topics[i]);\n\t\t\t\t\tnewBtn.addClass(\"btn\");\n\t\t\t\t\t$(\"#animalBtns\").append(newBtn);\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "c19a9b3422b5e3423d810cb90031870d", "score": "0.604807", "text": "render() {\n\t\tconst { children } = this.props;\n\t\treturn (\n\t\t\tchildren({\n\t\t\t\ton: this.state.on,\n\t\t\t\ttoggle: this.toggle,\n\t\t\t})\n\t\t);\n\t}", "title": "" }, { "docid": "47bfe70034e376f73f6185dcfaa430a1", "score": "0.60480505", "text": "getHTML(){\n var id = this.isID() ? 'id=\"'+ this.id +'\"' : '';\n var classes = this.isClasses() ? 'class=\"'+ this.classes +'\"' : '';\n return'<button '+id+\" \"+classes+'>'+this.text+'</button>';\n }", "title": "" }, { "docid": "cac8beb2e67ffc704035a7cbf8d51b2d", "score": "0.6043963", "text": "render() {\n return (\n <div className=\"App\">\n <Header />\n <p className=\"App-intro\">\n <button onClick={this.showTodos}>Todos for graham</button>\n <button onClick={this.toggle}>Show/Hide</button>\n </p>\n {this.state.toggle &&\n <FlashingText toggle={this.state.toggle} />\n }\n </div>\n );\n }", "title": "" }, { "docid": "12c3698ac66d07f7c028ebb674783b31", "score": "0.60370547", "text": "showDeleteButton() {\n if (this.state.focusToDo.toDoDone) {\n return <div className=\"deleteButton\"><img className=\"plus-sign\" src='/assets/images/001-plus-black-symbol.svg'/></div>;\n }\n return <div className=\"deleteButton\"><img className=\"letterX\" src='/assets/images/002-remove-symbol.svg'/></div>;\n }", "title": "" }, { "docid": "a1408a4f33bbe1ee82c0bbb7778f3444", "score": "0.6032762", "text": "function showNumButton(num) {\n\n \n if (clicked_num !== 1) {\n document.getElementById(clicked_num).checked = false;\n }\n clicked_num = parseInt(num);\n\n if (document.getElementById('num_btn')) {\n return false;\n }\n \n document.getElementById('conference_num').innerHTML +=\n '<button id=\\'num_btn\\' onclick=\\'nameConferences();return false;\\'>OK!</button>';\n\n document.getElementById(num).checked = true;\n\n var editing = document.getElementById('editing');\n\n var btn_text = '';\n btn_text += '<button onclick=\\'restartCreate();return false;\\'>';\n btn_text += 'Start Over</button>';\n\n editing.innerHTML = btn_text;\n\n}", "title": "" }, { "docid": "70d69e616e6933b096918e4e9d4ca242", "score": "0.60280544", "text": "_clickEditButton(e) {\n this.toggle();\n }", "title": "" }, { "docid": "24784255c9d9d5498f0a3318bbb9235b", "score": "0.60259145", "text": "render() {\n const text = this.context.mode === 'dark' ? 'light' : 'dark';\n return (\n <>\n <h2>Theme Settings</h2>\n <button onClick={this.context.toggleMode}>{text}</button>\n </>\n );\n }", "title": "" }, { "docid": "c2399a94f5a4ea4931d30cebe0597e07", "score": "0.60160196", "text": "function Usage({\n onToggle = (...args) => console.log('onToggle', ...args),\n}) {\n return (\n <Toggle\n onToggle={onToggle}\n render={({on, toggle}) => (\n <div>\n {on ? 'The button is on' : 'The button is off'}\n <Switch on={on} onClick={toggle} />\n <hr />\n <button aria-label=\"custom-button\" onClick={toggle}>\n {on ? 'on' : 'off'}\n </button>\n </div>\n )}\n />\n )\n}", "title": "" }, { "docid": "21d4a54012e82a9a7b51812ad4a495cf", "score": "0.60120124", "text": "get simpleTemplate() {\n return `\n <div class=\"button-container\">\n <button class=\"ok\" tabindex=0>${this.yesText}</button>\n <button class=\"no\" tabindex=0>${this.noText}</button>\n <button class=\"skip\" tabindex=0>${this.skipText}</button>\n ${this.qNumber !== 1 ? `<button class=\"previous\" tabindex=0>${this.previousText}</button>` : ''}\n </div>\n `;\n }", "title": "" }, { "docid": "7eab78ee5efd88503b63613938f6bab0", "score": "0.5998021", "text": "function renderBtn() {\n if (settings.units === \"METRIC\") {\n return \"Farenheit\";\n } else {\n return \"METRIC\";\n }\n }", "title": "" }, { "docid": "7c2d7f77efedda5aec8ade40fa7762e0", "score": "0.5988612", "text": "function renderButtons() {\n\n $('#button-view').empty();\n for (i = 0; i < topics.length; i++){\n var a = $(\"<button>\");\n a.addClass(\"gifbut\");\n a.attr(\"data-name\",topics[i]); \n a.text(topics[i]);\n $(\"#button-view\").append(a); \n }\n }", "title": "" }, { "docid": "165aeba1c87fcfd65a73ad027109d8fb", "score": "0.5983758", "text": "toggle() {\n this.on = !this.on;\n }", "title": "" }, { "docid": "ebc59e8e3ddcdffe42363a9e983fd4aa", "score": "0.5976335", "text": "function toggleSchematicView(evt) {\n var schematicBtn = $(this);\n if (schematicBtn.data('state') === \"hidden\") {\n schematicBtn.text(\"Hide Schematic\");\n schematicBtn.data('state', \"visible\");\n $schematic.css('display', 'block');\n } else {\n schematicBtn.text(\"Show Schematic\");\n schematicBtn.data('state', \"hidden\");\n $schematic.css('display', 'none');\n }\n }", "title": "" }, { "docid": "fdaad925672cda9c0db8c7bb367fa2cd", "score": "0.59742403", "text": "function renderButtons() {\n\t \t//event listener which prevents there from being repeat buttons\n\t \t $(\"#buttons-view\").empty();\n\t \t // loop which goes through each of he topics in our topics array and adds\n\t \t // a button tag,class, attribute and text inside button to our html\n\t \t for (var i = 0; i < topics.length; i++) {\n\n\t \t \tvar button = $(\"<button>\");\n\t \t \tbutton.addClass(\"tvShow\");\n\t \t \t//data name is added to button so that when display show function runs we can use \n\t \t \t//the data name in the url we are using to query the api\n\t \t \tbutton.attr(\"data-name\", topics[i]);\n\t \t \tbutton.text(topics[i]);\n\t \t \t$(\"#buttons-view\").append(button);\n\n\t \t }\n\n\t }", "title": "" }, { "docid": "5b37eee2005cb55a1996330615042c35", "score": "0.59725463", "text": "function createToggleButton(target, id) {\n var div = document.getElementById(target.id.slice(1));\n var button = document.createElement(\"button\");\n var text = document.createTextNode(\"\\u2713\");\n button.classList.add(\"roundButton\");\n button.id = \"togglebtn\" + id;\n button.appendChild(text);\n button.addEventListener(\"click\", function () {\n clickButton(button, target);\n });\n if (document.body != null) {\n div.append(button);\n }\n // button.style.left = target.offsetLeft;\n // button.style.top = target.offsetTop + 100;\n}", "title": "" }, { "docid": "dcd7a4d1b6db6470641d7536a7780c15", "score": "0.5966494", "text": "render() {\n\t\treturn html`\n\t\t\t<label>\n\t\t\t\t<input\n\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t@click=\"${this.handleClick}\"\n\t\t\t\t\t?checked=${this.checked}\n\t\t\t\t/>\n\t\t\t\t<slot></slot>\n\t\t\t</label>\n\t\t`;\n\t}", "title": "" }, { "docid": "9274e45d53ef4f71c8ef70c5277cc3d0", "score": "0.5963172", "text": "render() {\n var ulClass, buttonText;\n if(this.state.hidden){\n ulClass = 'hidden'\n buttonText = 'Show'\n }\n else{\n ulClass = 'visible'\n buttonText = 'Hide'\n }\n return (\n <div className=\"form-container\">\n <h1>Home Folder:</h1>\n <ul className={ulClass}>\n <li>File 1</li>\n <li>File 2</li>\n <li>File 3</li>\n </ul>\n <button onClick={this.handleToggle.bind(this)}>{buttonText}</button>\n </div>\n );\n }", "title": "" }, { "docid": "ecf73037b90e478311a4422b2435c4ab", "score": "0.5943235", "text": "function renderButtons() {\n\t\n\t\t$(\"#sitcoms-view\").empty();\n\t\t$.each(topics, function (index, value) {\n\t\t\tvar b = $(\"<button>\")\n\t\t\tb.addClass(\"button2\")\n\t\t\tb.attr(\"data-name\", topics[index])\n\t\t\tb.text(topics[index]),\n\t\t\t$(\"#sitcoms-view\").append(b);\n\t\t});\n\t\n\t}", "title": "" }, { "docid": "426319429851ea445334fbfb10a6025d", "score": "0.5939534", "text": "function renderButton() {\n $(\"#buttonHere\").empty();\n\n for (var i = 0; i < array.length; i++) {\n var a = $(\"<button>\");\n a.addClass(\"button\");\n a.attr(\"data-name\", array[i]);\n a.text(array[i]);\n $(\"#buttonHere\").append(a);\n }\n }", "title": "" }, { "docid": "7e7c33f439ba958769fc027f60cfd798", "score": "0.5936471", "text": "function Toggle({ toggle, setToggle }) {\n\tconst handleChange = () => {\n\t\tsetToggle((toggle) => {\n\t\t\treturn !toggle;\n\t\t});\n\t};\n\n\treturn (\n\t\t<div className='toggle-btn'>\n\t\t\t<Switch\n\t\t\t\tchecked={toggle}\n\t\t\t\tonChange={handleChange}\n\t\t\t\tvalue='checkedA'\n\t\t\t\tinputProps={{ 'aria-label': 'secondary checkbox' }}\n\t\t\t/>\n\t\t\t{/* <div>{!state.checkedA && <Graph ticket={ticket} />}</div> */}\n\t\t</div>\n\t);\n}", "title": "" }, { "docid": "6734081fe5ff8912ec7d45cb97b44ce6", "score": "0.5935047", "text": "function toggle () {\n var $btn = editor.$tb.find('.fr-command[data-cmd=\"html\"]');\n\n if (isActive()) {\n editor.$box.toggleClass('fr-code-view', false);\n _showText($btn);\n } else {\n editor.popups.hideAll();\n var height = editor.$wp.outerHeight();\n editor.$box.toggleClass('fr-code-view', true);\n _showHTML($btn, height);\n }\n }", "title": "" }, { "docid": "5f1ba56ddfd7ae1e327c92c178f23159", "score": "0.5916303", "text": "render() {\n\n\t\tlet opa = 0.5\n\t\tlet bordCol = \"\"\n\t\tlet bordWid = 0\n\n\t\tif(isSelected === this.props.id) {\n\t\t\topa = 1\n\t\t\tbordCol = \"#707070\"\n\t\t\tbordWid = 2\n\t\t}\n\n\t\tlet divStyle={\n\t\t\tbackgroundColor: `${this.props.color}`,\n\t\t\topacity: `${opa}`,\n\t\t\tborderWidth: bordWid,\n\t\t\tborderColor: `${bordCol}`,\n\t\t\tborderStyle: \"solid\",\n\t\t}\n\n\t\treturn(\n\t\t\t<Button className=\"mountainSelection\" text={`${this.props.name}`} style={divStyle} onClick={() => this.handleClick(this.props.id)} />\n\t\t)\n\t}", "title": "" }, { "docid": "0e12318712080540d033bd9c227463e6", "score": "0.59129685", "text": "function renderButtons() {\n $(\"#gifs-view\").empty();\n for (var i = 0; i < topics.length; i++) {\n var a = $(\"<button>\");\n a.addClass(\"gif-btn\");\n a.attr(\"gifName\", topics[i]);\n a.text(topics[i]);\n $(\"#gifs-view\").append(a);\n }\n }", "title": "" }, { "docid": "a15a3aeb7f11aa6bdda18fdeb83a8f20", "score": "0.59013695", "text": "function Plugin(option){return this.each(function(){var $this=$(this),data=$this.data(\"bs.button\"),options=\"object\"==typeof option&&option;data||$this.data(\"bs.button\",data=new Button(this,options)),\"toggle\"==option?data.toggle():option&&data.setState(option)})}", "title": "" }, { "docid": "6b0a4273fd4095a94f6017ca8209e4fc", "score": "0.59004", "text": "function renderButtons() {\n\t$(\"#buttons-view\").empty();\n\t$.each(topics, function(x, y) {\n\t\tvar a = $(\"<button>\");\n\t\ta.addClass(\"movie-button btn btn-primary\");\n\t\ta.attr(\"data-name\", y);\n\t\ta.text(y);\n\t\t$(\"#buttons-view\").append(a);\n\t});\n}", "title": "" }, { "docid": "925f61beed920164339c5e95b034b45f", "score": "0.589992", "text": "function Plugin(option){return this.each(function(){var $this=$(this);var data=$this.data('bs.button');var options=typeof option == 'object' && option;if(!data)$this.data('bs.button',data = new Button(this,options));if(option == 'toggle')data.toggle();else if(option)data.setState(option);});}", "title": "" }, { "docid": "c9d8ee628ee46bfde9db4134d741d1a4", "score": "0.5898758", "text": "renderViewButton(resourcetype, resource) {\n const s = this.sanitize;\n return `<button id=\"view_${s(resource.replace('.', '_'))}\" class=\"btn btn-primary\">\n View Resource</button>`\n }", "title": "" }, { "docid": "ac43a79a3c4b541411cddfe50b42d5b7", "score": "0.5897279", "text": "toggleClicked() {\n\t\tconsole.log('DEBUG: Toggle signal received!!'); //TODO DEBUG \n\t\tvar isCharacterizedView_newState = this.state.isCharacterizedViewEnabled ? false : true; //Establish the new view state of the image based on the current state. \n\t\t//Doing it this way avoids unexpected \n\t\tvar newImageSrc = this.getNewCurrentImage(isCharacterizedView_newState, this.state.currentImageIdx); //Retrieve the new current image to be displayed on screen\n\t\tthis.setState({ isCharacterizedViewEnabled: isCharacterizedView_newState, currentImageSrc: newImageSrc }); //Set new component state and re-render the DOM \n\t}", "title": "" }, { "docid": "35f8be2778fac0ce96bc24bad0fc916d", "score": "0.588622", "text": "function renderButtons() {\n \n // Deleting the band buttons prior to adding new band buttons\n $(\"#buttons-go-here\").empty();\n\n // Looping through the array of bands\n for (var i = 0; i < topics.length; i++) {\n\n // Then dynamicaly generating buttons for each band/artist in the array.\n var bandName = $(\"<button>\");\n // Adding a class\n bandName.addClass(\"band\");\n // Adding a data-name attribute with a value of the band/artist topic at index i\n bandName.data(\"name\", topics[i]);\n // Providing the button's text with a value of the band/artist topic at index i\n bandName.text(topics[i]);\n // Adding the button to the HTML\n $(\"#buttons-go-here\").append(bandName);\n \n }\n }", "title": "" }, { "docid": "30efc3027d5c614fc207bbd0b5524c40", "score": "0.5883858", "text": "function renderButtons() {\n // Deletes the movies prior to adding new movies\n $(\".buttons-view\").empty();\n // Loops through the array of topics to create buttons for all topics\n for (var i = 0; i < topics.length; i++) {\n var createButtons = $(\"<button>\");\n createButtons.addClass(\"topic btn btn-info\");\n createButtons.attr(\"data-name\", topics[i]);\n createButtons.text(topics[i]);\n $(\".buttons-view\").append(createButtons);\n }\n }", "title": "" }, { "docid": "50ae3e2c5e0798a1aee2a2a1c8048fa5", "score": "0.58810586", "text": "function renderButtons() {\n\n // Deleting the topics prior to adding new movies\n // (this is necessary otherwise you will have repeat buttons)\n $(\"#buttons-view\").empty();\n\n // Looping through the array of topics\n for (var i = 0; i < topics.length; i++) {\n\n // Then dynamicaly generating buttons for each topic in the array\n // This code $(\"<button>\") is all jQuery needs to create the beginning and end tag. (<button></button>)\n var a = $(\"<button>\");\n // Adding a class of topic-btn to our button\n a.addClass(\"topic-btn\");\n\n // Adding a data-attribute\n a.attr(\"data-name\", topics[i]);\n // Providing the initial button text\n a.text(topics[i]);\n // Adding the button to the buttons-view div\n $(\"#buttons-view\").append(a);\n }\n }", "title": "" }, { "docid": "0d8ef1646a106c524842237cd49604a2", "score": "0.5878127", "text": "renderHardmode(){\n if (this.props.hardmode)\n {\n return(\n <div className = \"d-flex mt-2 justify-content-center\">\n <button onClick = {() => this.handleHMClick(this.props.hmclick)}>Hardmode <h6 className=\"bg-danger\">On</h6></button>\n </div>\n );\n }\n else{\n return(\n <div className = \"d-flex mt-2 justify-content-center\">\n <button onClick = {() => this.handleHMClick(this.props.hmclick)}>Hardmode <h6 className=\"bg-success\">Off</h6></button>\n </div>\n );\n }\n }", "title": "" }, { "docid": "1a78943341eb982d732271a042fac927", "score": "0.5867466", "text": "function createButtonHTML(button) {\n return '<li class=\"'+ button.styleClassDisabled +'\" id=\"' + button.id + '\" '+\n 'onclick=\"toggleAction(\\'' + button.id + '\\');\">'+\n //'<a href=\"#\">' +\n '<img ' +\n 'alt=\"' + button.alt + '\" ' + \n 'title=\"' + button.alt + '\" ' +\n 'id=\"' + button.id + '-img\" ' +\n 'src=\"' + button.imageSrcDisabled + '\" ' +\n 'width=\"50\" height=\"50\" />' +\n //'</a>'+\n '</li>';\n}//createButtonHTMLbutton()", "title": "" }, { "docid": "9830fad4c9a57f39e793619cce25dbbc", "score": "0.5862508", "text": "toggle () {\n this.shown = !this.shown\n }", "title": "" }, { "docid": "76da2be19e1b9d337e62c7c707b6dc3d", "score": "0.5862251", "text": "function createOnOffButton() {\n let onOff = document.createElement('button');\n onOff.innerText = \"click [here] or on my [eyes]\";\n onOff.addEventListener('click', function() {\n let catchEyes = document.querySelector('.chead');\n catchEyes.classList.toggle(\"magic\");\n });\n page.appendChild(onOff);\n}", "title": "" }, { "docid": "784e5ecaf54ceec3b202fa7ccb036436", "score": "0.5859453", "text": "function createToggleLedButton(key) {\n var upImagePath = path.resolve(IMAGE_FOLDER + key.upImage);\n var downImagePath = path.resolve(IMAGE_FOLDER + key.downImage);\n\n if (!key.currentImage) {\n key.currentImage = upImagePath;\n }\n\n // Draw the key immediately so that we can see it.\n draw(key);\n\n // Draw the new image when the LED state changes.\n api.on(key.led, (value) => {\n key.currentImage = value ? downImagePath : upImagePath;\n draw(key);\n });\n}", "title": "" }, { "docid": "6eb59e957d8ed5fd658cfaa1f00e6a0a", "score": "0.58541363", "text": "function togglePlay(e) {\r\n if(music.paused){\r\n music.play();\r\n playBtn.innerHTML = '<button><img src=\"./img/svg/pause-circle.svg\" alt=\"\"> <span class=\"playsong\"> Pause </span></button>';\r\n }\r\n else{\r\n music.pause();\r\n playBtn.innerHTML = '<button><img src=\"./img/svg/play.svg\" alt=\"\"> <span class=\"playsong\"> Play</span></button>';\r\n }\r\n}", "title": "" }, { "docid": "dd55fb83194100561d8d3c70a2917ab6", "score": "0.5853897", "text": "renderAction() {\n if(this.props.isRemoval) {\n return <button \n className='Track-action'\n onClick={this.removeTrack}>-</button>\n } else {\n return <button \n className='Track-action'\n onClick={this.addTrack}>+</button>\n }\n }", "title": "" }, { "docid": "a22b48ad959e2420a801c3dc6d45cddf", "score": "0.5846035", "text": "togglDrawer() {\n this.open = !this.open\n }", "title": "" }, { "docid": "9d6ae5dff4b13a0c06a99af09369ec31", "score": "0.58457214", "text": "function renderButtons() {\n $(\"#buttons-view\").empty();\n for (var i = 0; i < shows.length; i++) {\n var a = $(\"<button>\");\n a.addClass(\"show\");\n a.attr(\"data-name\", shows[i]);\n a.text(shows[i]);\n $(\"#buttons-view\").append(a);\n }\n }", "title": "" }, { "docid": "aa3ca88bc40bebd461ea6851c984da52", "score": "0.5832283", "text": "toggle() {\n this.open ? this.hide() : this.show();\n }", "title": "" }, { "docid": "07e108feef82872a9d717d061fec5a8c", "score": "0.5831821", "text": "renderHMLoad(){\n if (this.props.hardmode)\n {\n return(\n <div className = \"d-flex mt-2 justify-content-center\">\n <button>Hardmode <h6 className=\"bg-danger\">On</h6></button>\n </div>\n );\n }\n else{\n return(\n <div className = \"d-flex mt-2 justify-content-center\">\n <button>Hardmode <h6 className=\"bg-success\">Off</h6></button>\n </div>\n );\n }\n }", "title": "" }, { "docid": "a403ebfadbb177c63f823b7d7cf02833", "score": "0.58284855", "text": "button() {\n return this.native.button();\n }", "title": "" }, { "docid": "f0bb2a379980d01a548a7efc6651c23b", "score": "0.58260816", "text": "toggleButton() {\n this.setState({buttonExists: !this.state.buttonExists})\n }", "title": "" }, { "docid": "1dd6c124b970d1b2cf6fc0d17e15ab7d", "score": "0.58243865", "text": "function toggleButtons(event) {\n const row = event.path[2];\n row.childNodes[3].remove();\n const editButton = document.createElement(\"button\");\n const newTd = document.createElement(\"td\")\n editButton.innerHTML = \"Edit\";\n editButton.classList.add(\"edit-buttons\");\n newTd.appendChild(editButton);\n row.insertBefore(newTd, row.lastChild);\n\n editButton.addEventListener('click', editButtonHandler);\n}", "title": "" }, { "docid": "f9c4bb88b4ce7058d28e20b74f55cd49", "score": "0.5808036", "text": "function renderButtons() {\n //clear the buttons so I don't duplicate\n $(\"#topics-view\").html(\"\");\n\n // Loop through the the topics to generate new buttons\n for (var i = 0; i < topics.length; i++) {\n var newButton = $(\"<button>\");\n newButton.addClass(\"topic\");\n newButton.attr(\"data-name\", topics[i]);\n newButton.text(topics[i]);\n $(\"#topics-view\").append(newButton);\n }\n}", "title": "" }, { "docid": "b1f41cf8416cbcf2200d34ddff66e108", "score": "0.5807146", "text": "function renderButtons() {\n // deletes original buttons so there no repeats when new button is generated\n $(\"#display-buttons\").empty();\n // loops through the topics array\n for (var j = 0; j < topics.length; j++) {\n\n var newButton = $(\"<button>\");\n newButton.attr(\"data-name\", topics[j]); // add a data-attribute\n newButton.text(topics[j]); // assigns button text\n $(\"#display-buttons\").append(newButton);\n }\n\n }", "title": "" } ]
706fa814ba3c2daa9b2023481e43ea5d
Returns the current timestamp in the UTC format
[ { "docid": "75e51b18708fcd875cf053ae3edd8cf3", "score": "0.76674086", "text": "static getTimeUTC() {\n return new Date().getTime().toString().slice(0, -3);\n }", "title": "" } ]
[ { "docid": "9e8d2e0a9294506d2e7916c5341e616b", "score": "0.76848286", "text": "function getTimestamp() {\n 'use strict';\n return new Date().toUTCString();\n}", "title": "" }, { "docid": "fa4e6a025ee67633251ccd1d92f34490", "score": "0.7603453", "text": "function utcNow() {\n return Math.floor(Date.now() / 1000);\n}", "title": "" }, { "docid": "eadfe90d8cea9b633464c04390c814b8", "score": "0.7334866", "text": "function getCurrentUTCHourTimestamp() {\n const date = new Date();\n date.setUTCMinutes(0);\n date.setUTCSeconds(0);\n date.setUTCMilliseconds(0);\n return getCurrentUTCTimestamp(date);\n}", "title": "" }, { "docid": "6f194d67443e6dead76091f304ffe012", "score": "0.707974", "text": "function conf_sch_get_current_date_utc() {\n\t// @TODO reset?\n\t//return new Date( '2020-07-29T14:45:00Z' );\n\treturn new Date();\n}", "title": "" }, { "docid": "9ad97c560005fcd4a99433dffd4eaf3f", "score": "0.7006462", "text": "function getUTCTimestampISOFormat() {\n return new Date(Date.now()).toISOString();\n}", "title": "" }, { "docid": "5abcce2274f207668676b1378cf024e3", "score": "0.69503284", "text": "function timestamp() {\n return (new Date)\n .toISOString()\n .replace(/z|t/gi, ' ')\n .trim()\n}", "title": "" }, { "docid": "92dbcc83b3937050b5607abeba9240c2", "score": "0.68936384", "text": "function getUTC() {\n var d = new Date();\n var year = d.getUTCFullYear();\n var month = d.getUTCMonth() + 1;\n if (month < 10) month = \"0\" + month;\n else month = \"\" + month;\n var day = d.getUTCDate();\n if (day < 10) day = \"0\" + day;\n else day = \"\" + day;\n var hours = d.getUTCHours();\n if (hours < 10) hours = \"0\" + hours;\n else hours = \"\" + hours;\n return year + month + day + hours + \"00\";\n}", "title": "" }, { "docid": "74cc2ebe693a1e03b3650192fcc13808", "score": "0.6892811", "text": "static now(utc = true, seconds = true)\n {\n let date = utc ? new Date().toISOString().slice(0, 10) : new Date().toLocaleDateString();\n let time = utc ? new Date().toISOString().slice(11, 19) : new Date().toLocaleTimeString();\n\n return `${date} ${seconds ? `${time.slice(0, 5)}:00` : time}`\n }", "title": "" }, { "docid": "19cf5651929c1f4c9b2a1a7c8f06ce1e", "score": "0.6854353", "text": "static get currentUnixTimestamp() {\n return Math.round( Date.now()/1000 );\n }", "title": "" }, { "docid": "d44d8f37f40a83bd8c66922487f2c60b", "score": "0.6788777", "text": "function getLocalTimestampISOFormat() {\n var timeZoneOffset = (new Date()).getTimezoneOffset() * 60000, //offset in milliseconds\n localISOTime = (new Date(Date.now() - timeZoneOffset)).toISOString();\n\n return localISOTime;\n}", "title": "" }, { "docid": "8be84986613706ff9b584c0c0dc68f53", "score": "0.6780154", "text": "function getTimestamp() {\n\treturn dateformat(new Date(), \"yyyy-mm-dd hh:MM:ss\");\n}", "title": "" }, { "docid": "75491677589061576fda35c2edafa173", "score": "0.6752976", "text": "function now() {\n\treturn new Date().toISOString();\n}", "title": "" }, { "docid": "305983bb2d9d3399d4cf7979711fcfdc", "score": "0.67230797", "text": "function getTodayValue() {\n return new Date().toUTCString();\n}", "title": "" }, { "docid": "c6ddb05b093e18e27caa777ea244f238", "score": "0.67214197", "text": "function getISOCurrentTime() {\n return new Date().toISOString();\n }", "title": "" }, { "docid": "54af46f96cf996a0d9fdf27615fbfae8", "score": "0.6708418", "text": "function timestamp() {\n return '[' + (new Date()).toUTCString() + ']';\n}", "title": "" }, { "docid": "0c58035feb72df30eb484ce27338db11", "score": "0.66717976", "text": "function getTimeStamp() {\n var now = new Date();\n return now.getTime();\n }", "title": "" }, { "docid": "0c58035feb72df30eb484ce27338db11", "score": "0.66717976", "text": "function getTimeStamp() {\n var now = new Date();\n return now.getTime();\n }", "title": "" }, { "docid": "77a286c8a2d2f877bb747c7501ca08d2", "score": "0.6668724", "text": "function getTimestamp() {\n const date = new Date();\n return date.toISOString();\n}", "title": "" }, { "docid": "bbd867e0c6587c93b00bca197f8c8154", "score": "0.666128", "text": "function getTimestamp() {\n let time = new Date(Date.now());\n return `${String(time.getHours()).padStart(2, '0')}:${String(time.getMinutes()).padStart(2, '0')}:${String(time.getSeconds()).padStart(2, '0')}`;\n}", "title": "" }, { "docid": "0fdc75718298155c4c98bca4936fd9d3", "score": "0.66552746", "text": "timestampToUTC(timestamp) {\n const data = new Date(Date.UTC(96, 11, 1, 0, 0, timestamp));\n const dataToString = data.toString().split(\" \");\n return dataToString[4];\n }", "title": "" }, { "docid": "4f27d4a684f16bff1644775d351994c1", "score": "0.6651492", "text": "function getCurrentTime() {\n return Date().toLocaleString('en-US', {\n timeZone: 'Asia/Kolkata'\n });\n // return Date().slice(0, 24);\n}", "title": "" }, { "docid": "bc93688e5bf1b5ea3e38c3a3c8781617", "score": "0.66474825", "text": "function now() {\n return moment().toISOString();\n}", "title": "" }, { "docid": "c581d69549c0237626a64a760566ee26", "score": "0.6643573", "text": "function timeNowUnix() { return + new Date() }", "title": "" }, { "docid": "60591c6c2099ef2a71ada01e7cfd8886", "score": "0.6637834", "text": "function nowInTimeStamp() {\n var today = new Date().getDate();\n var month = new Date().getMonth() + 1;\n var year = new Date().getFullYear();\n var now = parseInt((new Date(month + \"/\" + today + \"/\" + year).getTime() - Date.UTC(1970, 0, 1)) / 1000);\n return now;\n }", "title": "" }, { "docid": "a93407e84e506a362906543d507ba115", "score": "0.6632386", "text": "function getTimeStamp() {\n var now = new Date();\n return now.getTime();\n }", "title": "" }, { "docid": "97b49cb85b6d34a4fe3df40b0d2d8d92", "score": "0.66247046", "text": "function getCurrUnixTime() {\n return Math.floor((new Date().getTime()) / 1000);\n}", "title": "" }, { "docid": "dc1d76c870f2bea6dc67b95d17dae73e", "score": "0.66223556", "text": "function newTime() {\n var timestamp = new Date();\n return timestamp.toISOString();\n }", "title": "" }, { "docid": "59dbca34ebec63eb50b46b23ed1459d0", "score": "0.66188556", "text": "get_timestamp() {\r\n return Math.floor(Date.now() / 1000)\r\n }", "title": "" }, { "docid": "33e1a17a83b1a793d94651f8b3c2caaa", "score": "0.6602088", "text": "function getTimeStamp() {\n\t\t\tvar now = new Date();\n\t\t\treturn now.getTime();\n\t\t}", "title": "" }, { "docid": "665156866bba05f69826e7aac1d6cd53", "score": "0.65928763", "text": "function getTimestamp() {\n var time = new Date().getTime();\n return time;\n }", "title": "" }, { "docid": "48436ffd8bbeb1db5ee6bf79db5b0d14", "score": "0.6575277", "text": "function getLocalTime() {\n return new Date(new Date().toString().split('GMT')[0] + ' UTC').toISOString().split('.')[0];\n}", "title": "" }, { "docid": "fe9150f5dea4074fde4915824eecebf1", "score": "0.65681833", "text": "function currentTime() {\n var info = web3.eth.getBlock('latest');\n var date = new Date((info.timestamp) * 1000);\n\n var year = date.getFullYear();\n //var month = (\"0\" + date.getMonth()).slice(-2);\n var month = date.getUTCMonth() + 1; //months from 1-12\n //var currentDate = (\"0\" + date.getDate()).slice(-2);\n var day = (\"0\" + date.getUTCDate()).slice(-2);\n // Hours part from the timestamp\n var hours = date.getHours();\n // Minutes part from the timestamp\n var minutes = \"0\" + date.getMinutes();\n // Seconds part from the timestamp\n var seconds = \"0\" + date.getSeconds();\n // Will display time in 10:30:23 format\n // var formattedTime = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2);\n var formattedTime = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2);\n return formattedTime;\n}", "title": "" }, { "docid": "8b88674988bce9a8ffd7114c09b9c58b", "score": "0.65663666", "text": "function getCurrentTime() {\n\t\treturn Date.now();\n\t}", "title": "" }, { "docid": "625cd0b40b8043313f23c89aba3fb3d5", "score": "0.6562464", "text": "function getTimestamp() {\n\t\tvar d, s = \"\";\n\t\tvar c = \":\";\n\t\td = new Date();\n\t\ts += d.getHours() + c;\n\t\ts += d.getMinutes() + c;\n\t\ts += d.getSeconds() + c;\n\t\ts += d.getMilliseconds();\n\t\t\n\t\treturn s;\n\t}", "title": "" }, { "docid": "1138200988406801732ce0e5c573fb0f", "score": "0.65393716", "text": "function getCurrentTime() {\n return new Date();\n}", "title": "" }, { "docid": "77e771e3feb824cd58b6f1978ee3b150", "score": "0.6536207", "text": "function getNow() {\n const time = moment().format('HH:mm:ss: A');\n return time;\n }", "title": "" }, { "docid": "69753bd0a4b0152b72a9054ddacff40f", "score": "0.6535751", "text": "function getDate() {\n // Get current time\n let time = new Date();\n\n // Convert to local time\n time -= time.getTimezoneOffset() * 60000;\n\n // Change the format to Timestamp\n return new Date(time).toISOString().slice(0, 19).replace(\"T\", \" \");\n}", "title": "" }, { "docid": "9bd7b55d6e4c1d4376485b2d0ba03b95", "score": "0.65227324", "text": "function currentTime(timezoneOffset) {\n if (timezoneOffset) {\n return moment(moment(moment.now()).utcOffset(timezoneOffset, true).toDate()).format(\"YYYY-MM-DDTHH-mm-ss\");\n } else {\n return moment\n .utc()\n .format('YYYY-MM-DDTHH-mm-ss');\n }\n}", "title": "" }, { "docid": "5726ae7008d31135e96e619aa5ee84dd", "score": "0.65117925", "text": "function timestamp() {\n let d = new Date();\n d.setSeconds(0,0);\n return '[' + d.toUTCString() + ']';\n}", "title": "" }, { "docid": "0ffcfda8a2fc36f924d35a8098ecaa42", "score": "0.6502756", "text": "function getNowDate() {\n return new Date() + new Date().getTimezoneOffset() * 60000;\n }", "title": "" }, { "docid": "ba2bd431664614c45096c7a7e8f367f8", "score": "0.65011746", "text": "function getNow() {\n var now = moment().format('HH:mm:ss: A');\n return now;\n }", "title": "" }, { "docid": "a54025405340a9356d6b8dcd9c792b7f", "score": "0.6473944", "text": "function getTimeStamp() {\n var now = new Date();\n return now.getTime();\n }", "title": "" }, { "docid": "74096a734cd5a3e2304b6c68221bf6ec", "score": "0.6466294", "text": "function nowTimeString() {\n\t\tvar d = new Date();\n\t\tvar hours = d.getHours() + getTimeZoneAdjustment(\"EDT\");\n\t\tvar minutes = d.getMinutes();\n\t\tvar seconds = d.getSeconds();\n\t\tvar output = ((''+hours).length<2 ? '0' : '') + hours + ':' +\n\t\t ((''+minutes).length<2 ? '0' : '') + minutes + ':' +\n\t\t ((''+seconds).length<2 ? '0' : '') + seconds;\n\n\t\treturn output;\n\t}", "title": "" }, { "docid": "6ada4f41648730ee0c768531adfecaba", "score": "0.64374816", "text": "function getCurrentTime() {\n return Math.round(Date.now() / 1000);\n}", "title": "" }, { "docid": "ddeb3b2da5c981e9ff65cf5bf7ab6eca", "score": "0.64281285", "text": "function now() {\n var d = cal.jsDateToDateTime(new Date());\n return d.getInTimezone(calendarDefaultTimezone());\n}", "title": "" }, { "docid": "3ae59601427795ab104c29100e525e1e", "score": "0.641442", "text": "function getCurrentDateTimeStamp() {\n let time = new Date();\n return time.getFullYear()+\"-\"\n +(time.getMonth()+1).toString().padStart(2,\"00\")+\"-\"\n +time.getDate().toString().padStart(2,\"00\")+\" \"\n +time.toLocaleTimeString();\n}", "title": "" }, { "docid": "bb98304511cf2d154b19ca2b735ae78b", "score": "0.64016086", "text": "function getNowTimeStamp(){\n //var now = Date.parse(new Date()) /1000;\n return Math.round(new Date().getTime());\n}", "title": "" }, { "docid": "e07968456322451eccabb45d42012f69", "score": "0.63978344", "text": "function isoTimestamp () {\n var date = new Date()\n return date.toISOString()\n}", "title": "" }, { "docid": "e37f47c8f18a071a4c76f87cf77d9779", "score": "0.63977283", "text": "function currentTime(){\n\treturn new Date().toLocaleTimeString();\n}", "title": "" }, { "docid": "7fb999d5429dc040dd5990ee8dba923f", "score": "0.6396879", "text": "function currentTime() {\n return Math.floor(Date.now() / 1000);\n }", "title": "" }, { "docid": "cb26f3f2c3cf12aba24072cbed2105d3", "score": "0.6395458", "text": "function getCurrentTime() {\n return Date.now()/1000;\n}", "title": "" }, { "docid": "a080805d9c2cd755ab9d208ac5fdcf2e", "score": "0.6383462", "text": "function timestamp () {\n return Math.floor((new Date().getTime()) / 1000);\n }", "title": "" }, { "docid": "a080805d9c2cd755ab9d208ac5fdcf2e", "score": "0.6383462", "text": "function timestamp () {\n return Math.floor((new Date().getTime()) / 1000);\n }", "title": "" }, { "docid": "bdda50e6256e91b6de2d09c8c9ba6ca6", "score": "0.63711315", "text": "function time_UTC(time){\n var d = new Date(time);\n\n return d.getUTCFullYear() + '/' + (d.getUTCMonth()+1) + '/' + d.getUTCDate();\n}", "title": "" }, { "docid": "f9ab8699c1d9f0329344f7b12c706d52", "score": "0.634994", "text": "function getNow() {\n return Date.now(); // returns a UNIX timestamp\n }", "title": "" }, { "docid": "082b5e891d6d37bcfcfff994fb6a9e7b", "score": "0.63406307", "text": "function formatDateStamp() {\n var now = new Date();\n return now.toLocaleTimeString() + now.getMilliseconds();\n }", "title": "" }, { "docid": "4c6449620836a5faf68c5a9f7faa8c3a", "score": "0.63365763", "text": "function getCurrentTime(past) { // past is minutes back in time\n var date = new Date();\n if (past) {\n var time = date.setTime(date.getTime() - past * 60 * 1000);\n date = new Date(time);\n }\n var day = pad(date.getUTCDate(), 2);\n var month = pad(date.getUTCMonth() + 1, 2);\n var year = date.getUTCFullYear();\n var hour = pad(date.getUTCHours(), 2);\n var minute = pad(date.getUTCMinutes(), 2);\n var seconds = pad(date.getUTCSeconds(), 2);\n\n return \"\" + year + \"-\" + month + \"-\" + day + \" \" + hour + \"-\" + minute + \"-\" + seconds;\n}", "title": "" }, { "docid": "6e0b06dc561f41055d3511bf77436ae3", "score": "0.63332206", "text": "function getTimeStamp() {\n var now = new Date();\n return (now.getFullYear() + \"-\" +\n (now.getMonth() + 1) + '-' +\n (now.getDate()) + 'T' +\n now.getHours() + ':' +\n ((now.getMinutes() < 10)\n ? (\"0\" + now.getMinutes())\n : (now.getMinutes())) + ':' +\n ((now.getSeconds() < 10)\n ? (\"0\" + now.getSeconds())\n : (now.getSeconds())));\n }", "title": "" }, { "docid": "6a20e5dbd8a1e34b633f78a6ee5fbb46", "score": "0.633194", "text": "function convertTimestampToUTC(timestamp) {\n // if the cookie has no expiration date, it is a session cookie\n if (timestamp == null) {\n return \"Expires by the end of your session\";\n } else {\n timestamp = Math.floor(timestamp * 1000);\n var convertedTime = new Date(timestamp).toString();\n // add some commas\n convertedTime = convertedTime.substring(0, 3) + \",\" + convertedTime.substring(3, 15) + \",\" + convertedTime.substring(15, 24);\n return convertedTime;\n }\n}", "title": "" }, { "docid": "99deb66d8f7f732b651254c1426ed087", "score": "0.6331871", "text": "function _timestamp() {\n return new Date().toString();\n}", "title": "" }, { "docid": "2ae5be08724bd609b6cfd8101abe0fb7", "score": "0.63251007", "text": "function now () {\n var date = new Date();\n return date.getHours() * 60 * 60 +\n date.getMinutes() * 60 +\n date.getSeconds();\n }", "title": "" }, { "docid": "6884fba601e3c685facd2f4ffb62ffaf", "score": "0.631058", "text": "function getCurrentTime() { \n var date = new Date(),\n m = date.getMonth(),\n d = date.getDate(),\n y = date.getFullYear(),\n t = date.toLocaleTimeString().toLowerCase();\n\n return ( m + '/' + d + '/' + y + ' ' + t );\n}", "title": "" }, { "docid": "64fc239660550a8c1665df5b3746c404", "score": "0.6306622", "text": "function currentTime() {\n\t\tvar currTime = new Date;\n\t\t\n\t\treturn currTime.toLocaleDateString() + ' ' + currTime.toTimeString();\n\t}", "title": "" }, { "docid": "4cdc36d9653572680ec1df8ad51450ac", "score": "0.6299523", "text": "function timestamp() {\n let timestamp = new Date; \n return timestamp.toLocaleString(\"en-GB\");\n \n }", "title": "" }, { "docid": "5faa1af3db11079bdda1952f5d6df02b", "score": "0.62989855", "text": "function getTimestamp() {\n\tlet date = new Date();\n\n\tlet year = date.getFullYear();\n\tlet month = pad(date.getMonth() + 1);\n\tlet day = pad(date.getDate());\n\tlet hour = pad(date.getHours());\n\tlet minute = pad(date.getMinutes());\n\tlet second = pad(date.getSeconds());\n\n\treturn `${year}-${month}-${day}_${hour}:${minute}:${second}`;\n}", "title": "" }, { "docid": "d43923a00c2971e129cf03d0159816f6", "score": "0.62900615", "text": "function getCurrentDate() {\n return (new Date()).toISOString().substring(0, 10);\n}", "title": "" }, { "docid": "f50f334ebcbc08cf3976b61b1f6108ee", "score": "0.62899405", "text": "function currentTime() {\n return new Date().toLocaleTimeString();\n}", "title": "" }, { "docid": "ec91818622fc87cf327431c856ca4fe8", "score": "0.6276368", "text": "function now() {\n var date = new Date();\n return date.getHours() * 60 * 60 +\n date.getMinutes() * 60 +\n date.getSeconds();\n }", "title": "" }, { "docid": "fff1c011174954e9a46c3091a5db9bc4", "score": "0.62671626", "text": "function getCurrentFullDate() {\n\t\t\treturn dateFormat(Date.now(), \"yyyymmddHHMM\")\n\t\t}", "title": "" }, { "docid": "b24fed72660e0a924e7a25c98a1f8202", "score": "0.62598044", "text": "function getTimeStamp()\n {\n var date= new Date(year, month, day, hours, minutes, seconds, milliseconds);\n date.currentDate.getDate();\n date.currentDate.getHours();\n date.currentDate.getMinutes();\n date.currentDate.getSeconds();\n\n return date.currentDate.getHours() + \" \" + date.currentDate.getHours()+\":\"+ date.currentDate.getMinutes()+ date.currentDate.getSeconds();\n }", "title": "" }, { "docid": "11c651e31d9154eaf6443b1a19f74f61", "score": "0.625339", "text": "utcTimeZone() {\n try {\n return momentTimeZone.tz(this.currentTime(), 'Europe/London');\n } catch (error) {\n cloudWatchLogger.log('ERROR', {\n 'event': 'utcTimeZone of TimeZoneUtil',\n 'error': error\n });\n throw new Error('Error in utcTimeZone method of TimeZoneUtil.');\n }\n }", "title": "" }, { "docid": "c8b5a0b98c8df13d867296f30128afb0", "score": "0.62523603", "text": "function timestamp () {\n console.log(\"timestamp()\");\n\n let date = new Date();\n let now = date.toLocaleDateString(\"sv-SE\");\n\n return now; \n }", "title": "" }, { "docid": "a56b7bdf7007da63c2c083b78fd27291", "score": "0.62507", "text": "function timestamp() {\n\tvar nowDate = new Date();\n\tvar result = nowDate.toLocaleDateString() + \" \"+ nowDate.toLocaleTimeString();\n return result+\" => \";\n}", "title": "" }, { "docid": "8740e6c1948847a24d6b1af9acac5b63", "score": "0.62497073", "text": "function getTimeStamp() {\n return Math.round(new Date().getTime() / 1000);\n}", "title": "" }, { "docid": "6377b704c9dbb5ef119ddd41473fbd60", "score": "0.62483186", "text": "function timestamp() {\n var d = new Date();\n return d.getFullYear() +\n '-' + pad(d.getMonth() + 1) +\n '-' + pad(d.getDate()) +\n 'T' + pad(d.getHours()) +\n ':' + pad(d.getMinutes()) +\n ':' + pad(d.getSeconds()) +\n '.' + (d.getMilliseconds() / 1000).toFixed(3).slice(2, 5);\n }", "title": "" }, { "docid": "b283871d5a2d21d33c9dbd06edd32342", "score": "0.6240265", "text": "function getCurrentTime() {\n var d = new Date();\n var h = d.getHours();\n var m = d.getMinutes();\n var s = d.getSeconds();\n\n if (h < 10) h = \"0\" + h;\n if (m < 10) m = \"0\" + m;\n if (s < 10) s = \"0\" + s;\n\n return \"[\" + h + \":\" + m + \":\" + s + \"]\";\n }", "title": "" }, { "docid": "497f26a892ba39390140fe3b2db7cc8e", "score": "0.62348914", "text": "function getCurrentDate(){\n var now = new Date()\n var date = now.toJSON().slice(0,10);\n var hours = now.getHours();\n var minutes = now.getMinutes();\n var sec = now.getSeconds();\n var ampm = hours >= 12 ? 'PM' : 'AM';\n \n hours = hours % 12;\n hours = hours ? hours : 12; // the hour '0' should be '12'\n minutes = minutes < 10 ? '0'+minutes : minutes;\n var strTime = hours + ':' + minutes + ':' +sec+ ' ' + ampm;\n return date+' '+strTime;\n \n }", "title": "" }, { "docid": "a8f3e9b684be663afb4eed22584c6799", "score": "0.6232258", "text": "function getCurrentTime(){\n\tconst {offset_sec} = JSON.parse(localStorage.getItem('geoData'))\n\tconst time = new Date().getTime();\n\tconst utcOffset = new Date().getTimezoneOffset() * 60000;\n\tconst utcTime = time+utcOffset;\n\tconst currentTime = new Date(utcTime+(offset_sec*1000))\n\treturn currentTime;\n}", "title": "" }, { "docid": "03043e5254afcc0cc09adcc8a7bd45e6", "score": "0.62306714", "text": "function timestamp() {\r\n\tdate = new Date;\r\n\tdateString = date.toISOString();\r\n\treturn dateString;\r\n}", "title": "" }, { "docid": "fd379e00e7c79e42ef8092a5de042f61", "score": "0.62226266", "text": "function current_time(){\n var time = new Date();\n return time.toLocaleString('en-US', { hour: 'numeric', minute: 'numeric', hour12: true })\n}", "title": "" }, { "docid": "6930f608e7eba5c783e0e055114e37e3", "score": "0.6221701", "text": "function getTimestamp() {\r\n var d = new Date();\r\n return d.getHours() + ':' + (d.getMinutes() < 10 ? '0' : '') + d.getMinutes() + ':' + (d.getSeconds() < 10 ? '0' : '') + d.getSeconds();\r\n}", "title": "" }, { "docid": "ec0bdbcfc6f08340cf4ac7095f94b4ef", "score": "0.62105334", "text": "getCurrTime(timezone){\n const now = moment.tz(timezone);\n const currHour = now.hour();\n const currMin = now.minute();\n \n return `${currHour}:${currMin}`;\n }", "title": "" }, { "docid": "7caf5257b8411016c76d77b81402d108", "score": "0.62079245", "text": "function getTimeStamp() {\n\tvar hours = new Date().getHours();\n\tvar minutes = new Date().getMinutes();\n\tvar seconds = new Date().getSeconds();\n\tvar year = new Date().getFullYear();\n\tvar month = new Date().getMonth() + 1;\n\tmonth = (month < 10 ? \"0\" : \"\") + month;\n\tvar day = new Date().getDate();\n\tday = (day < 10 ? \"0\" : \"\") + day;\n\tif (hours < 10) hours = \"0\" + hours;\n\tif (minutes < 10) minutes = \"0\" + minutes;\n\tif (seconds < 10) seconds = \"0\" + seconds;\n\treturn day + \".\" + month + \".\" + year + \" \" + hours + \":\" + minutes + \":\" + seconds;\n}", "title": "" }, { "docid": "51379236718d76060bcfc47822f77b23", "score": "0.619409", "text": "getCurrentDateTime() {\n const today = new Date();\n let dd = today.getDate();\n let mm = today.getMonth() + 1; // January is 0!\n const yyyy = today.getFullYear();\n let hours = today.getHours();\n let minutes = today.getMinutes();\n let seconds = today.getSeconds();\n\n if (dd < 10) {\n dd = `0${dd}`;\n }\n if (mm < 10) {\n mm = `0${mm}`;\n }\n if (hours < 10) {\n hours = `0${hours}`;\n }\n if (minutes < 10) {\n minutes = `0${minutes}`;\n }\n if (seconds < 10) {\n seconds = `0${seconds}`;\n }\n return `${dd}-${mm}-${yyyy}-${hours}:${minutes}:${seconds}`;\n }", "title": "" }, { "docid": "314bef1766e20735f305f9101dca358c", "score": "0.6184863", "text": "function getTime() {\n var curTime = new Date()\n var curYear = curTime.getFullYear()\n var curMonth = curTime.getMonth() + 1\n var curDate = curTime.getDate()\n var curHour = curTime.getHours()\n var curMin = curTime.getMinutes()\n var curSec = curTime.getSeconds()\n return `${curYear}-${curMonth}-${curDate}-${curHour}-${curMin}-${curSec}`\n}", "title": "" }, { "docid": "934c9ea37a65fdd9d7e018a90012aa8c", "score": "0.6180631", "text": "function timeStamp() {\n var now = new Date();\n return pad(now.getHours(), 2) + \":\"\n + pad(now.getMinutes(), 2) + \":\"\n + pad(now.getSeconds(), 2);\n}", "title": "" }, { "docid": "8a03a9415b82e2070443a00960d3de88", "score": "0.6176602", "text": "function currentDate() {\n\treturn ((new Date()).toISOString().substr(0, 10));\n}", "title": "" }, { "docid": "0b4a555741a40a7e9e8293c5989c045c", "score": "0.61755145", "text": "function getCurrentTime(){\n var time = new Date().toLocaleTimeString();\n return console.log(time);\n}", "title": "" }, { "docid": "cad5e71b30e24426f112c8a6ab3cb236", "score": "0.6174697", "text": "function currentDate(){\n\tvar date = new Date();\n\treturn date.getTime()/86400000 - 10957.5;\t// UT date in ms / (86400 * 1000) + 2440587.5 - 2451545.0\n}", "title": "" }, { "docid": "cd3687790b2d02bb677aa2e8812b1cc8", "score": "0.61672354", "text": "timestamp () {\n return moment().format('YYYYMMDD-HH:mm:ss')\n }", "title": "" }, { "docid": "6600e12f505e807fe21b8e960b87bd83", "score": "0.616522", "text": "function getCurrentDate() {\n var now = new Date();\n now.setHours( 0, 0, 0, 0 );\n return now;\n }", "title": "" }, { "docid": "20f3dedf129007f5777e6ea6421d9225", "score": "0.6164727", "text": "function getCurrentTime() {\n var date = new Date();\n var currentTime = '';\n currentTime = date.getHours() + ':' + date.getMinutes();\n\n return currentTime;\n}", "title": "" }, { "docid": "c26c2919ac092d0929d951325f172de1", "score": "0.61634016", "text": "function timestamp(){\n\t\n\tvar date = new Date();\n\t\n\t// Munge.\n\tvar y = date.getFullYear();\n\tvar m = date.getMonth() + 1;\n\tm = (m < 10 ? \"0\" : \"\") + m;\n\tvar d = date.getDate();\n\td = (d < 10 ? \"0\" : \"\") + d;\n\tvar h = date.getHours();\n\th = (h < 10 ? \"0\" : \"\") + h;\n\tvar min = date.getMinutes();\n\tmin = (min < 10 ? \"0\" : \"\") + m;\n\tvar s = date.getSeconds();\n\ts = (s < 10 ? \"0\" : \"\") + s;\n\t\n\t// Assemble.\n\treturn y +\"-\"+ m +\"-\"+ d + \"T\" + h + \":\" + min + \":\" + s;\n }", "title": "" }, { "docid": "c02325396644542ee117e5b0982b949c", "score": "0.6159654", "text": "function getTimeStamp_us() {\n var dt = new Date();\n \n var year = dt.getFullYear();\n var mon = pad(2, dt.getMonth() + 1, '0');\n var day = pad(2, dt.getDate(), '0');\n \n var hour = pad(2, dt.getHours(), '0');\n var min = pad(2, dt.getMinutes(), '0');\n var sec = pad(2, dt.getSeconds(), '0');\n \n var usec = getMilliseconds();\n return(year + mon + day + hour + min + sec + usec);\n}", "title": "" }, { "docid": "28779ff340bb385d6d36266625ed18d5", "score": "0.61584336", "text": "function getCurrentDateTime() {\n var currentdate = new Date();\n // Components\n var year = currentdate.getFullYear();\n var month = (currentdate.getMonth() + 1) < 10 ? \"0\" + (currentdate.getMonth() + 1) : currentdate.getMonth() + 1;\n var day = currentdate.getDate() < 10 ? \"0\" + currentdate.getDate() : currentdate.getDate();\n var hours = currentdate.getHours();\n var minutes = currentdate.getMinutes();\n var seconds = currentdate.getSeconds();\n // Datetime format\n return year + \"-\" + month + \"-\" + day + \"T\" + hours + \":\" + minutes + \":\" + seconds;\n}", "title": "" }, { "docid": "6be290464e131adb5cf89d2a701c3cbe", "score": "0.61550146", "text": "function get_current_time() {\n var new_date = new Date();\n var hour = new_date.getHours();\n var minute = new_date.getMinutes();\n var cur_time = (hour * 60) + (minute * 1);\n return(cur_time);\n}", "title": "" }, { "docid": "98cc581550e31a1f2bc42dfcfbda4ce3", "score": "0.6152322", "text": "function timeStamp(){var e=new Date,t=[e.getFullYear(),e.getMonth()+1,e.getDate()],n=[e.getHours(),e.getMinutes(),e.getSeconds()];for(var r=1;r<3;r++)n[r]<10&&(n[r]=\"0\"+n[r]);for(var r=1;r<3;r++)t[r]<10&&(t[r]=\"0\"+t[r]);return t.join(\"-\")+\"T\"+n.join(\":\")}", "title": "" }, { "docid": "c1c471f6172be4fb76d5c0b8e706ce2e", "score": "0.614295", "text": "function getTime() {\n let now = new Date(),\n h = now.getHours(),\n m = now.getMinutes(),\n s = now.getSeconds(),\n f = now.getMilliseconds();\n h = h < 10 ? '0' + h : h;\n m = m < 10 ? '0' + m : m;\n s = s < 10 ? '0' + s : s;\n f = f < 100 ? (f < 1 ? '00' + f : '0' + f) : f;\n return `${h}:${m}:${s}.${f}`;\n}", "title": "" }, { "docid": "fb5e4dcb4032a4a99557ec7221fd66a6", "score": "0.61422676", "text": "function getCurrentTime() {\n const date = new Date()\n const hours = date.getHours()\n const minutes = date.getMinutes()\n const seconds = date.getSeconds()\n\n const twelveHoursFormat = hours > 12 ? hours - 12 : hours\n const formatHours =\n twelveHoursFormat < 10 ? '0' + twelveHoursFormat : twelveHoursFormat\n const formatMinutes = minutes < 10 ? '0' + minutes : minutes\n const formatSeconds = seconds < 10 ? '0' + seconds : seconds\n\n console.log(`${formatHours}:${formatMinutes}:${formatSeconds}`)\n}", "title": "" }, { "docid": "0415f2868eabc3fd9887d7d6b1da2c57", "score": "0.61393934", "text": "function getTime() {\n let now = new Date();\n let month = now.getMonth() + 1;\n let day = now.getDate();\n let year = now.getFullYear();\n let hour = now.getHours();\n let minute = now.getMinutes().toString();\n if (minute.length != 2) {\n minute = \"0\" + minute;\n }\n let second = now.getSeconds().toString();\n if (second.length != 2) {\n second = \"0\" + second;\n }\n let currTime =\n month + \"/\" + day + \"/\" + year + \"-\" + hour + \":\" + minute + \":\" + second;\n return currTime;\n}", "title": "" } ]